create-video 4.0.225 → 4.0.227
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/hyperlinks/is-supported.js +0 -1
- package/dist/init.js +5 -3
- package/dist/open-in-editor.js +10 -8
- package/dist/patch-readme.js +1 -1
- package/dist/pkg-managers.js +8 -7
- package/dist/prompts.js +0 -3
- package/dist/templates.js +1 -1
- package/package.json +7 -4
|
@@ -50,7 +50,6 @@ function supportsHyperlink() {
|
|
|
50
50
|
case 'WezTerm':
|
|
51
51
|
return version.major >= 20200620 ? 'Click' : false;
|
|
52
52
|
case 'vscode':
|
|
53
|
-
// eslint-disable-next-line no-mixed-operators
|
|
54
53
|
return version.major > 1 ||
|
|
55
54
|
(version.major === 1 && version.minor >= 72)
|
|
56
55
|
? process.platform === 'darwin'
|
package/dist/init.js
CHANGED
|
@@ -26,7 +26,7 @@ const gitExists = (commandToCheck, argsToCheck) => {
|
|
|
26
26
|
execa_1.default.sync(commandToCheck, argsToCheck);
|
|
27
27
|
return true;
|
|
28
28
|
}
|
|
29
|
-
catch (
|
|
29
|
+
catch (_a) {
|
|
30
30
|
return false;
|
|
31
31
|
}
|
|
32
32
|
};
|
|
@@ -40,7 +40,7 @@ const checkGitAvailability = async (cwd, commandToCheck, argsToCheck) => {
|
|
|
40
40
|
});
|
|
41
41
|
return { type: 'is-git-repo', location: result.stdout };
|
|
42
42
|
}
|
|
43
|
-
catch (
|
|
43
|
+
catch (_a) {
|
|
44
44
|
return {
|
|
45
45
|
type: 'no-git-repo',
|
|
46
46
|
};
|
|
@@ -87,7 +87,9 @@ const init = async () => {
|
|
|
87
87
|
}
|
|
88
88
|
const latestRemotionVersionPromise = (0, latest_remotion_version_1.getLatestRemotionVersion)();
|
|
89
89
|
const selectedTemplate = await (0, select_template_1.selectTemplate)();
|
|
90
|
-
const shouldOverrideTailwind = selectedTemplate
|
|
90
|
+
const shouldOverrideTailwind = selectedTemplate.allowEnableTailwind
|
|
91
|
+
? await (0, ask_tailwind_1.askTailwind)()
|
|
92
|
+
: false;
|
|
91
93
|
const pkgManager = (0, pkg_managers_1.selectPackageManager)();
|
|
92
94
|
const pkgManagerVersion = await (0, pkg_managers_1.getPackageManagerVersionOrNull)(pkgManager);
|
|
93
95
|
try {
|
package/dist/open-in-editor.js
CHANGED
|
@@ -36,6 +36,7 @@ const node_fs_1 = __importDefault(require("node:fs"));
|
|
|
36
36
|
const node_os_1 = __importDefault(require("node:os"));
|
|
37
37
|
const node_path_1 = __importDefault(require("node:path"));
|
|
38
38
|
const node_util_1 = __importDefault(require("node:util"));
|
|
39
|
+
const log_1 = require("./log");
|
|
39
40
|
const execProm = node_util_1.default.promisify(node_child_process_1.exec);
|
|
40
41
|
const isVsCodeDerivative = (editor) => {
|
|
41
42
|
return (editor === 'code' ||
|
|
@@ -56,6 +57,7 @@ function isTerminalEditor(editor) {
|
|
|
56
57
|
return false;
|
|
57
58
|
}
|
|
58
59
|
}
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
59
61
|
const editorNames = [
|
|
60
62
|
'atom',
|
|
61
63
|
'/Applications/Atom Beta.app/Contents/MacOS/Atom Beta',
|
|
@@ -364,7 +366,7 @@ async function guessEditor() {
|
|
|
364
366
|
return availableEditors;
|
|
365
367
|
}
|
|
366
368
|
}
|
|
367
|
-
catch (
|
|
369
|
+
catch (_a) {
|
|
368
370
|
// Ignore...
|
|
369
371
|
}
|
|
370
372
|
// Last resort, use old skool env vars
|
|
@@ -422,14 +424,14 @@ async function launchEditor({ colNumber, editor, fileName, lineNumber, vsCodeNew
|
|
|
422
424
|
// of valid file names but should cover almost all of them in practice.
|
|
423
425
|
if (process.platform === 'win32' &&
|
|
424
426
|
!WINDOWS_FILE_NAME_WHITELIST.test(fileName.trim())) {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
427
|
+
log_1.Log.info();
|
|
428
|
+
log_1.Log.info('Could not open ' + node_path_1.default.basename(fileName) + ' in the editor.');
|
|
429
|
+
log_1.Log.info();
|
|
430
|
+
log_1.Log.info('When running on Windows, file names are checked against a whitelist ' +
|
|
429
431
|
'to protect against remote code execution attacks. File names may ' +
|
|
430
432
|
'consist only of alphanumeric characters (all languages), periods, ' +
|
|
431
433
|
'dashes, slashes, and underscores.');
|
|
432
|
-
|
|
434
|
+
log_1.Log.info();
|
|
433
435
|
return false;
|
|
434
436
|
}
|
|
435
437
|
const shouldOpenVsCodeNewWindow = (0, exports.isVsCodeDerivative)(editor.command) && vsCodeNewWindow;
|
|
@@ -471,11 +473,11 @@ async function launchEditor({ colNumber, editor, fileName, lineNumber, vsCodeNew
|
|
|
471
473
|
_childProcess.on('exit', (errorCode) => {
|
|
472
474
|
_childProcess = null;
|
|
473
475
|
if (errorCode) {
|
|
474
|
-
|
|
476
|
+
log_1.Log.info(`Process exited with code ${errorCode}`);
|
|
475
477
|
}
|
|
476
478
|
});
|
|
477
479
|
_childProcess.on('error', (error) => {
|
|
478
|
-
|
|
480
|
+
log_1.Log.info('Error opening file in editor', fileName, error.message);
|
|
479
481
|
});
|
|
480
482
|
return true;
|
|
481
483
|
}
|
package/dist/patch-readme.js
CHANGED
|
@@ -16,7 +16,7 @@ const patchReadmeMd = (projectRoot, packageManager, template) => {
|
|
|
16
16
|
if (c.startsWith('npm install') || c.startsWith('npm i')) {
|
|
17
17
|
return (0, pkg_managers_1.getInstallCommand)(packageManager);
|
|
18
18
|
}
|
|
19
|
-
if (c.startsWith('npm
|
|
19
|
+
if (c.startsWith('npm run dev')) {
|
|
20
20
|
return (0, pkg_managers_1.getDevCommand)(packageManager, template);
|
|
21
21
|
}
|
|
22
22
|
if (c.startsWith('npm run build')) {
|
package/dist/pkg-managers.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.getPackageManagerVersionOrNull = exports.getPackageManagerVersion = exports.getDevCommand = exports.getRenderCommand = exports.getRunCommand = exports.getInstallCommand = exports.selectPackageManager = void 0;
|
|
7
7
|
const node_child_process_1 = require("node:child_process");
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const log_1 = require("./log");
|
|
9
10
|
const shouldUseBun = () => {
|
|
10
11
|
var _a, _b;
|
|
11
12
|
if (((_a = process.env._) === null || _a === void 0 ? void 0 : _a.endsWith('/bin/bun')) ||
|
|
@@ -30,7 +31,7 @@ const shouldUsePnpm = () => {
|
|
|
30
31
|
const conf = JSON.parse(process.env.npm_config_argv);
|
|
31
32
|
return conf.remain[0] === 'dlx';
|
|
32
33
|
}
|
|
33
|
-
catch (
|
|
34
|
+
catch (_a) {
|
|
34
35
|
return false;
|
|
35
36
|
}
|
|
36
37
|
};
|
|
@@ -64,16 +65,16 @@ const getInstallCommand = (manager) => {
|
|
|
64
65
|
exports.getInstallCommand = getInstallCommand;
|
|
65
66
|
const getStartCommand = (manager) => {
|
|
66
67
|
if (manager === 'npm') {
|
|
67
|
-
return `npm
|
|
68
|
+
return `npm run dev`;
|
|
68
69
|
}
|
|
69
70
|
if (manager === 'yarn') {
|
|
70
|
-
return `yarn
|
|
71
|
+
return `yarn dev`;
|
|
71
72
|
}
|
|
72
73
|
if (manager === 'pnpm') {
|
|
73
|
-
return `pnpm
|
|
74
|
+
return `pnpm run dev`;
|
|
74
75
|
}
|
|
75
76
|
if (manager === 'bun') {
|
|
76
|
-
return `bun
|
|
77
|
+
return `bun run dev`;
|
|
77
78
|
}
|
|
78
79
|
};
|
|
79
80
|
const getRunCommand = (manager) => {
|
|
@@ -140,8 +141,8 @@ const getPackageManagerVersionOrNull = async (manager) => {
|
|
|
140
141
|
const version = await (0, exports.getPackageManagerVersion)(manager);
|
|
141
142
|
return version;
|
|
142
143
|
}
|
|
143
|
-
catch (
|
|
144
|
-
|
|
144
|
+
catch (_a) {
|
|
145
|
+
log_1.Log.warn(`Could not determine the version of ${manager}.`);
|
|
145
146
|
return null;
|
|
146
147
|
}
|
|
147
148
|
};
|
package/dist/prompts.js
CHANGED
|
@@ -29,12 +29,10 @@ async function selectAsync(questions) {
|
|
|
29
29
|
}
|
|
30
30
|
this.fire();
|
|
31
31
|
// Without this, the value will be `0` instead of a string.
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
33
32
|
this.value = (this.choices[this.cursor] || {}).value;
|
|
34
33
|
// Support up arrow and `k` key -- no looping
|
|
35
34
|
this.up = () => {
|
|
36
35
|
let next = this.cursor;
|
|
37
|
-
// eslint-disable-next-line no-constant-condition
|
|
38
36
|
while (true) {
|
|
39
37
|
if (next <= 0)
|
|
40
38
|
break;
|
|
@@ -54,7 +52,6 @@ async function selectAsync(questions) {
|
|
|
54
52
|
// Support down arrow and `j` key -- no looping
|
|
55
53
|
this.down = () => {
|
|
56
54
|
let next = this.cursor;
|
|
57
|
-
// eslint-disable-next-line no-constant-condition
|
|
58
55
|
while (true) {
|
|
59
56
|
if (next >= this.choices.length - 1)
|
|
60
57
|
break;
|
package/dist/templates.js
CHANGED
|
@@ -298,7 +298,7 @@ exports.FEATURED_TEMPLATES = [
|
|
|
298
298
|
repoName: 'template-code-hike',
|
|
299
299
|
description: 'Beautiful code animations',
|
|
300
300
|
longerDescription: `
|
|
301
|
-
Add code snippets and animate between them using
|
|
301
|
+
Add code snippets and animate between them using
|
|
302
302
|
<a href="https://codehike.org/">Code Hike</a>. Supports many languages,
|
|
303
303
|
TypeScript error annotations, and many themes.
|
|
304
304
|
`,
|
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.227",
|
|
7
7
|
"description": "Create a new Remotion project",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"bin": {
|
|
@@ -25,12 +25,15 @@
|
|
|
25
25
|
"@types/minimist": "1.2.2",
|
|
26
26
|
"@types/prompts": "^2.0.12",
|
|
27
27
|
"@types/tar": "6.1.1",
|
|
28
|
-
"react": "18.3.1"
|
|
28
|
+
"react": "18.3.1",
|
|
29
|
+
"eslint": "9.14.0",
|
|
30
|
+
"@remotion/eslint-config-internal": "4.0.227"
|
|
29
31
|
},
|
|
30
32
|
"homepage": "https://remotion.dev/templates",
|
|
31
33
|
"scripts": {
|
|
32
34
|
"formatting": "prettier src --check",
|
|
33
|
-
"lint": "eslint src
|
|
34
|
-
"test": "bun test src"
|
|
35
|
+
"lint": "eslint src",
|
|
36
|
+
"test": "bun test src",
|
|
37
|
+
"make": "tsc -d"
|
|
35
38
|
}
|
|
36
39
|
}
|