UNPKG

@remotion/cli

Version:

Control Remotion features using the `npx remotion` command

20 lines (19 loc) 855 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseCommandLine = void 0; const client_1 = require("@remotion/renderer/client"); const config_1 = require("./config"); const parsed_cli_1 = require("./parsed-cli"); const { licenseKeyOption } = client_1.BrowserSafeApis.options; const parseCommandLine = () => { if (parsed_cli_1.parsedCli.png) { throw new Error('The --png flag has been removed. Use --sequence --image-format=png from now on.'); } const { value: licenseKey, source } = licenseKeyOption.getValue({ commandLine: parsed_cli_1.parsedCli, }); if (source === 'cli' && (licenseKey === null || licenseKey === void 0 ? void 0 : licenseKey.startsWith('rm_pub_'))) { config_1.Config.setPublicLicenseKey(licenseKey); } }; exports.parseCommandLine = parseCommandLine;