init commit
This commit is contained in:
46
remotion/node_modules/@remotion/renderer/dist/options/overwrite.js
generated
vendored
Normal file
46
remotion/node_modules/@remotion/renderer/dist/options/overwrite.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.overwriteOption = void 0;
|
||||
const jsx_runtime_1 = require("react/jsx-runtime");
|
||||
let shouldOverwrite = null;
|
||||
const cliFlag = 'overwrite';
|
||||
const validate = (value) => {
|
||||
if (typeof value !== 'boolean') {
|
||||
throw new Error(`overwriteExisting must be a boolean but got ${typeof value} (${value})`);
|
||||
}
|
||||
};
|
||||
exports.overwriteOption = {
|
||||
name: 'Overwrite output',
|
||||
cliFlag,
|
||||
description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["If set to ",
|
||||
jsx_runtime_1.jsx("code", { children: "false" }),
|
||||
", will prevent rendering to a path that already exists. Default is ",
|
||||
jsx_runtime_1.jsx("code", { children: "true" }),
|
||||
"."] })),
|
||||
ssrName: 'overwrite',
|
||||
docLink: 'https://www.remotion.dev/docs/config#setoverwriteoutput',
|
||||
type: false,
|
||||
getValue: ({ commandLine }, defaultValue) => {
|
||||
if (commandLine[cliFlag] !== undefined) {
|
||||
validate(commandLine[cliFlag]);
|
||||
return {
|
||||
source: 'cli',
|
||||
value: commandLine[cliFlag],
|
||||
};
|
||||
}
|
||||
if (shouldOverwrite !== null) {
|
||||
return {
|
||||
source: 'config',
|
||||
value: shouldOverwrite,
|
||||
};
|
||||
}
|
||||
return {
|
||||
source: 'default',
|
||||
value: defaultValue,
|
||||
};
|
||||
},
|
||||
setConfig: (value) => {
|
||||
validate(value);
|
||||
shouldOverwrite = value;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user