create-video 4.0.413 → 4.0.415
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.mjs +2 -1
- package/dist/list-of-remotion-packages.js +1 -0
- package/dist/yesno.d.ts +4 -0
- package/dist/yesno.js +45 -0
- package/package.json +2 -2
package/dist/esm/index.mjs
CHANGED
package/dist/yesno.d.ts
ADDED
package/dist/yesno.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Duplicated in Lambda
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.yesOrNo = void 0;
|
|
8
|
+
const readline_1 = __importDefault(require("readline"));
|
|
9
|
+
const options = {
|
|
10
|
+
yes: ['yes', 'y'],
|
|
11
|
+
no: ['no', 'n'],
|
|
12
|
+
};
|
|
13
|
+
function defaultInvalidHandler({ yesValues, noValues, }) {
|
|
14
|
+
process.stdout.write('\nInvalid Response.\n');
|
|
15
|
+
process.stdout.write('Answer either yes : (' + yesValues.join(', ') + ') \n');
|
|
16
|
+
process.stdout.write('Or no: (' + noValues.join(', ') + ') \n\n');
|
|
17
|
+
}
|
|
18
|
+
const yesOrNo = ({ question, defaultValue, }) => {
|
|
19
|
+
const invalid = defaultInvalidHandler;
|
|
20
|
+
const yesValues = options.yes.map((v) => v.toLowerCase());
|
|
21
|
+
const noValues = options.no.map((v) => v.toLowerCase());
|
|
22
|
+
const rl = readline_1.default.createInterface({
|
|
23
|
+
input: process.stdin,
|
|
24
|
+
output: process.stdout,
|
|
25
|
+
});
|
|
26
|
+
return new Promise((resolve) => {
|
|
27
|
+
rl.question(question + ' ', async (answer) => {
|
|
28
|
+
rl.close();
|
|
29
|
+
const cleaned = answer.trim().toLowerCase();
|
|
30
|
+
if (cleaned === '' && defaultValue !== null)
|
|
31
|
+
return resolve(defaultValue);
|
|
32
|
+
if (yesValues.indexOf(cleaned) >= 0)
|
|
33
|
+
return resolve(true);
|
|
34
|
+
if (noValues.indexOf(cleaned) >= 0)
|
|
35
|
+
return resolve(false);
|
|
36
|
+
invalid({ question, yesValues, noValues });
|
|
37
|
+
const result = await (0, exports.yesOrNo)({
|
|
38
|
+
question,
|
|
39
|
+
defaultValue,
|
|
40
|
+
});
|
|
41
|
+
resolve(result);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
exports.yesOrNo = yesOrNo;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/create-video"
|
|
4
4
|
},
|
|
5
5
|
"name": "create-video",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.415",
|
|
7
7
|
"description": "Create a new Remotion project",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"bin": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@types/prompts": "^2.0.12",
|
|
30
30
|
"@types/tar": "6.1.1",
|
|
31
31
|
"react": "19.2.3",
|
|
32
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
32
|
+
"@remotion/eslint-config-internal": "4.0.414",
|
|
33
33
|
"eslint": "9.19.0"
|
|
34
34
|
},
|
|
35
35
|
"exports": {
|