create-video 4.0.45 → 4.0.47
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/LICENSE.md +1 -1
- package/dist/degit.js +7 -7
- package/dist/pkg-managers.d.ts +2 -2
- package/dist/pkg-managers.js +18 -18
- package/dist/test/validate-templates.test.js +15 -15
- package/package.json +2 -2
package/LICENSE.md
CHANGED
|
@@ -38,4 +38,4 @@ Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
|
|
|
38
38
|
|
|
39
39
|
You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](/docs/support)).
|
|
40
40
|
|
|
41
|
-
Visit [
|
|
41
|
+
Visit [remotion.pro](https://www.remotion.pro) for pricing and to buy a license.
|
package/dist/degit.js
CHANGED
|
@@ -34,6 +34,13 @@ function fetch(url, dest) {
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
exports.fetch = fetch;
|
|
37
|
+
function untar(file, dest) {
|
|
38
|
+
return tar_1.default.extract({
|
|
39
|
+
file,
|
|
40
|
+
strip: 1,
|
|
41
|
+
C: dest,
|
|
42
|
+
}, []);
|
|
43
|
+
}
|
|
37
44
|
const degit = async ({ repoOrg, repoName, dest, }) => {
|
|
38
45
|
const base = node_path_1.default.join((0, node_os_1.tmpdir)(), '.degit');
|
|
39
46
|
const dir = node_path_1.default.join(base, repoOrg, repoName);
|
|
@@ -46,10 +53,3 @@ const degit = async ({ repoOrg, repoName, dest, }) => {
|
|
|
46
53
|
node_fs_1.default.unlinkSync(file);
|
|
47
54
|
};
|
|
48
55
|
exports.degit = degit;
|
|
49
|
-
function untar(file, dest) {
|
|
50
|
-
return tar_1.default.extract({
|
|
51
|
-
file,
|
|
52
|
-
strip: 1,
|
|
53
|
-
C: dest,
|
|
54
|
-
}, []);
|
|
55
|
-
}
|
package/dist/pkg-managers.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import type { Template } from './templates';
|
|
|
2
2
|
export type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun';
|
|
3
3
|
export declare const selectPackageManager: () => PackageManager;
|
|
4
4
|
export declare const getInstallCommand: (manager: PackageManager) => "yarn" | "npm i" | "pnpm i" | "bun install" | undefined;
|
|
5
|
-
export declare const getDevCommand: (manager: PackageManager, template: Template) => string | undefined;
|
|
6
|
-
export declare const getRenderCommandForTemplate: (manager: PackageManager, template: Template) => string | undefined;
|
|
7
5
|
export declare const getRenderCommand: (manager: PackageManager) => "npm run build" | "yarn build" | "pnpm build" | "bun run build" | undefined;
|
|
8
6
|
export declare const getRunCommand: (manager: PackageManager) => "npm run" | "yarn run" | "pnpm run" | "bun run";
|
|
7
|
+
export declare const getDevCommand: (manager: PackageManager, template: Template) => string | undefined;
|
|
8
|
+
export declare const getRenderCommandForTemplate: (manager: PackageManager, template: Template) => string | undefined;
|
|
9
9
|
export declare const getPackageManagerVersion: (manager: PackageManager) => Promise<string>;
|
|
10
10
|
export declare const getPackageManagerVersionOrNull: (manager: PackageManager) => Promise<string | null>;
|
package/dist/pkg-managers.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getPackageManagerVersionOrNull = exports.getPackageManagerVersion = exports.
|
|
6
|
+
exports.getPackageManagerVersionOrNull = exports.getPackageManagerVersion = exports.getRenderCommandForTemplate = exports.getDevCommand = exports.getRunCommand = exports.getRenderCommand = 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
9
|
const shouldUseBun = () => {
|
|
@@ -62,23 +62,6 @@ const getInstallCommand = (manager) => {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
exports.getInstallCommand = getInstallCommand;
|
|
65
|
-
const getDevCommand = (manager, template) => {
|
|
66
|
-
if (template.cliId === 'remix' || template.cliId === 'next') {
|
|
67
|
-
return `${(0, exports.getRunCommand)(manager)} dev`;
|
|
68
|
-
}
|
|
69
|
-
return getStartCommand(manager);
|
|
70
|
-
};
|
|
71
|
-
exports.getDevCommand = getDevCommand;
|
|
72
|
-
const getRenderCommandForTemplate = (manager, template) => {
|
|
73
|
-
if (template.cliId === 'remix') {
|
|
74
|
-
return `${(0, exports.getRunCommand)(manager)} remotion:render`;
|
|
75
|
-
}
|
|
76
|
-
if (template.cliId === 'still') {
|
|
77
|
-
return `${(0, exports.getRunCommand)(manager)} render`;
|
|
78
|
-
}
|
|
79
|
-
return (0, exports.getRenderCommand)(manager);
|
|
80
|
-
};
|
|
81
|
-
exports.getRenderCommandForTemplate = getRenderCommandForTemplate;
|
|
82
65
|
const getStartCommand = (manager) => {
|
|
83
66
|
if (manager === 'npm') {
|
|
84
67
|
return `npm start`;
|
|
@@ -124,6 +107,23 @@ const getRunCommand = (manager) => {
|
|
|
124
107
|
throw new TypeError('unknown package manager');
|
|
125
108
|
};
|
|
126
109
|
exports.getRunCommand = getRunCommand;
|
|
110
|
+
const getDevCommand = (manager, template) => {
|
|
111
|
+
if (template.cliId === 'remix' || template.cliId === 'next') {
|
|
112
|
+
return `${(0, exports.getRunCommand)(manager)} dev`;
|
|
113
|
+
}
|
|
114
|
+
return getStartCommand(manager);
|
|
115
|
+
};
|
|
116
|
+
exports.getDevCommand = getDevCommand;
|
|
117
|
+
const getRenderCommandForTemplate = (manager, template) => {
|
|
118
|
+
if (template.cliId === 'remix') {
|
|
119
|
+
return `${(0, exports.getRunCommand)(manager)} remotion:render`;
|
|
120
|
+
}
|
|
121
|
+
if (template.cliId === 'still') {
|
|
122
|
+
return `${(0, exports.getRunCommand)(manager)} render`;
|
|
123
|
+
}
|
|
124
|
+
return (0, exports.getRenderCommand)(manager);
|
|
125
|
+
};
|
|
126
|
+
exports.getRenderCommandForTemplate = getRenderCommandForTemplate;
|
|
127
127
|
const getPackageManagerVersion = (manager) => {
|
|
128
128
|
const cmd = `${manager} -v`;
|
|
129
129
|
return new Promise((resolve, reject) => {
|
|
@@ -9,6 +9,21 @@ const templates_1 = require("../templates");
|
|
|
9
9
|
const getFileForTemplate = (template, file) => {
|
|
10
10
|
return `https://github.com/${template.org}/${template.repoName}/raw/${template.defaultBranch}/${file}`;
|
|
11
11
|
};
|
|
12
|
+
const findFile = async (options) => {
|
|
13
|
+
let entryPoint = null;
|
|
14
|
+
let contents = null;
|
|
15
|
+
for (const point of options) {
|
|
16
|
+
const res = await (0, got_1.default)(point, {
|
|
17
|
+
throwHttpErrors: false,
|
|
18
|
+
});
|
|
19
|
+
if (res.statusCode === 200) {
|
|
20
|
+
entryPoint = point;
|
|
21
|
+
contents = res.body;
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return { entryPoint, contents };
|
|
26
|
+
};
|
|
12
27
|
(0, vitest_1.describe)('Templates should be valid', () => {
|
|
13
28
|
for (const template of templates_1.FEATURED_TEMPLATES) {
|
|
14
29
|
(0, vitest_1.it)(template.shortName + ' should have a valid package.json', async () => {
|
|
@@ -124,18 +139,3 @@ const getFileForTemplate = (template, file) => {
|
|
|
124
139
|
}, 12000);
|
|
125
140
|
}
|
|
126
141
|
});
|
|
127
|
-
const findFile = async (options) => {
|
|
128
|
-
let entryPoint = null;
|
|
129
|
-
let contents = null;
|
|
130
|
-
for (const point of options) {
|
|
131
|
-
const res = await (0, got_1.default)(point, {
|
|
132
|
-
throwHttpErrors: false,
|
|
133
|
-
});
|
|
134
|
-
if (res.statusCode === 200) {
|
|
135
|
-
entryPoint = point;
|
|
136
|
-
contents = res.body;
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return { entryPoint, contents };
|
|
141
|
-
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-video",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.47",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"tar": "6.1.11"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@jonny/eslint-config": "3.0.
|
|
23
|
+
"@jonny/eslint-config": "3.0.276",
|
|
24
24
|
"@types/minimist": "1.2.2",
|
|
25
25
|
"@types/node": "18.14.6",
|
|
26
26
|
"@types/prompts": "^2.0.12",
|