Skip to content

🎥 Make videos programmatically with React

Fix isProduction cli option

Pramod5df9b7c5b5bd
diff --git a/packages/cli/src/parsed-cli.ts b/packages/cli/src/parsed-cli.ts
index 3eab672dc6..f3c5d43a2b 100644
--- a/packages/cli/src/parsed-cli.ts
+++ b/packages/cli/src/parsed-cli.ts
@@ -35,6 +35,7 @@ export const BooleanFlags = [
'compatible-only',
'force-path-style',
'onlyAllocateCpuDuringRequestProcessing',
+ BrowserSafeApis.options.isProductionOption.cliFlag,
];
export const parsedCli = minimist<CommandLineOptions>(process.argv.slice(2), {
diff --git a/packages/lambda/src/cli/commands/render/render.ts b/packages/lambda/src/cli/commands/render/render.ts
index 0ec95b169a..22c3c2179b 100644
--- a/packages/lambda/src/cli/commands/render/render.ts
+++ b/packages/lambda/src/cli/commands/render/render.ts
@@ -359,7 +359,7 @@ export const renderCommand = async ({
storageClass: parsedLambdaCli['storage-class'] ?? null,
requestHandler: null,
isProduction:
- parsedLambdaCli[BrowserSafeApis.options.isProductionKeyOption.cliFlag] ??
+ parsedLambdaCli[BrowserSafeApis.options.isProductionOption.cliFlag] ??
true,
});
diff --git a/packages/lambda/src/cli/commands/still.ts b/packages/lambda/src/cli/commands/still.ts
index dc377919e3..06328ae9ab 100644
--- a/packages/lambda/src/cli/commands/still.ts
+++ b/packages/lambda/src/cli/commands/still.ts
@@ -291,7 +291,7 @@ export const stillCommand = async ({
requestHandler: null,
mediaCacheSizeInBytes,
isProduction:
- parsedLambdaCli[BrowserSafeApis.options.isProductionKeyOption.cliFlag] ??
+ parsedLambdaCli[BrowserSafeApis.options.isProductionOption.cliFlag] ??
true,
});
Log.info(
diff --git a/packages/renderer/src/options/index.tsx b/packages/renderer/src/options/index.tsx
index fe24addf23..fdd8e4e45b 100644
--- a/packages/renderer/src/options/index.tsx
+++ b/packages/renderer/src/options/index.tsx
@@ -24,7 +24,7 @@ import {glOption} from './gl';
import {hardwareAccelerationOption} from './hardware-acceleration';
import {headlessOption} from './headless';
import {imageSequencePatternOption} from './image-sequence-pattern';
-import {isProductionKeyOption} from './is-production-key';
+import {isProductionOption} from './is-production';
import {jpegQualityOption} from './jpeg-quality';
import {keyboardShortcutsOption} from './keyboard-shortcuts';
import {audioLatencyHintOption} from './latency-hint';
@@ -103,7 +103,7 @@ export const allOptions = {
mediaCacheSizeInBytesOption,
darkModeOption,
publicLicenseKeyOption,
- isProductionKeyOption,
+ isProductionOption,
askAIOption,
experimentalClientSideRenderingOption,
keyboardShortcutsOption,
diff --git a/packages/renderer/src/options/is-production-key.tsx b/packages/renderer/src/options/is-production.tsx
similarity index 70%
rename from packages/renderer/src/options/is-production-key.tsx
rename to packages/renderer/src/options/is-production.tsx
index 79ea666556..426a445fc2 100644
--- a/packages/renderer/src/options/is-production-key.tsx
+++ b/packages/renderer/src/options/is-production.tsx
@@ -1,19 +1,20 @@
import type {AnyRemotionOption} from './option';
-const cliFlag = 'is-production-key' as const;
+const cliFlag = 'is-production' as const;
let currentIsProductionKey: boolean | null = null;
-export const isProductionKeyOption = {
- name: 'Is Production Key',
+export const isProductionOption = {
+ name: 'Is Production',
cliFlag,
description: () => (
<>
- Pass "true" if you are rendering in production. All the production renders
- are considered as billable renders on the Pro platform.
+ Pass "true" if you are rendering in production and the default value is
+ "true". All the production renders are considered as billable renders on
+ the Pro platform.
</>
),
- ssrName: 'isProductionKey' as const,
+ ssrName: 'isProduction' as const,
docLink: 'https://www.remotion.dev/docs/licensing',
getValue: ({commandLine}) => {
if (commandLine[cliFlag] !== undefined) {