create-video 4.0.136 → 4.0.138
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/log.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const Log: {
|
|
|
6
6
|
Color: ("black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright") | ("bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "bgGray" | "bgGrey" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright");
|
|
7
7
|
ForegroundColor: "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright";
|
|
8
8
|
BackgroundColor: "bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "bgGray" | "bgGrey" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright";
|
|
9
|
-
Modifiers: "
|
|
9
|
+
Modifiers: "bold" | "reset" | "dim" | "italic" | "underline" | "inverse" | "hidden" | "strikethrough" | "visible";
|
|
10
10
|
stderr: chalk.Chalk & {
|
|
11
11
|
supportsColor: false | chalk.ColorSupport;
|
|
12
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-video",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.138",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"tar": "6.1.11"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@jonny/eslint-config": "3.0.
|
|
23
|
+
"@jonny/eslint-config": "3.0.281",
|
|
24
24
|
"@types/minimist": "1.2.2",
|
|
25
25
|
"@types/node": "18.14.6",
|
|
26
26
|
"@types/prompts": "^2.0.12",
|
|
27
27
|
"@types/react": "18.2.48",
|
|
28
28
|
"@types/tar": "6.1.1",
|
|
29
|
-
"eslint": "8.
|
|
30
|
-
"prettier": "3.
|
|
29
|
+
"eslint": "8.56.0",
|
|
30
|
+
"prettier": "3.2.5",
|
|
31
31
|
"prettier-plugin-organize-imports": "3.2.4",
|
|
32
32
|
"vitest": "0.31.1"
|
|
33
33
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const got_1 = __importDefault(require("got"));
|
|
7
|
-
const vitest_1 = require("vitest");
|
|
8
|
-
const templates_1 = require("../templates");
|
|
9
|
-
const getFileForTemplate = (template, file) => {
|
|
10
|
-
return `https://github.com/${template.org}/${template.repoName}/raw/${template.defaultBranch}/${file}`;
|
|
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
|
-
};
|
|
27
|
-
(0, vitest_1.describe)('Templates should be valid', () => {
|
|
28
|
-
for (const template of templates_1.FEATURED_TEMPLATES) {
|
|
29
|
-
(0, vitest_1.it)(template.shortName + ' should have a valid package.json', async () => {
|
|
30
|
-
var _a, _b;
|
|
31
|
-
const packageJson = getFileForTemplate(template, 'package.json');
|
|
32
|
-
const res = await (0, got_1.default)(packageJson, {
|
|
33
|
-
throwHttpErrors: false,
|
|
34
|
-
cache: false,
|
|
35
|
-
followRedirect: true,
|
|
36
|
-
});
|
|
37
|
-
(0, vitest_1.expect)(res.statusCode).toBe(200);
|
|
38
|
-
const body = JSON.parse(res.body);
|
|
39
|
-
if (!template.shortName.includes('Remix') &&
|
|
40
|
-
!template.shortName.includes('Next') &&
|
|
41
|
-
!template.shortName.includes('Still')) {
|
|
42
|
-
(0, vitest_1.expect)(body.scripts.build).toMatch(/render/);
|
|
43
|
-
(0, vitest_1.expect)(body.scripts.build).not.toContain('index');
|
|
44
|
-
}
|
|
45
|
-
(0, vitest_1.expect)(body.dependencies.remotion).toMatch(/^\^?4/);
|
|
46
|
-
(0, vitest_1.expect)(body.dependencies['@remotion/cli']).toMatch(/^\^?4/);
|
|
47
|
-
(0, vitest_1.expect)(body.dependencies.react).toMatch(/^\^?18/);
|
|
48
|
-
(0, vitest_1.expect)(body.dependencies['react-dom']).toMatch(/^\^?18/);
|
|
49
|
-
(0, vitest_1.expect)(body.devDependencies.prettier).toMatch(/^\^?2.8.8/);
|
|
50
|
-
if (!template.shortName.includes('JavaScript')) {
|
|
51
|
-
(0, vitest_1.expect)(body.devDependencies.eslint).toMatch(/^\^?8.43/);
|
|
52
|
-
(0, vitest_1.expect)(body.devDependencies.typescript).toMatch(/^\^?4/);
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
54
|
-
const eitherPluginOrConfig = ((_a = body.devDependencies['@remotion/eslint-config']) === null || _a === void 0 ? void 0 : _a.match(/^\^?4/)) ||
|
|
55
|
-
((_b = body.devDependencies['@remotion/eslint-plugin']) === null || _b === void 0 ? void 0 : _b.match(/^\^?4/));
|
|
56
|
-
(0, vitest_1.expect)(eitherPluginOrConfig).toBeTruthy();
|
|
57
|
-
}
|
|
58
|
-
}, 12000);
|
|
59
|
-
(0, vitest_1.it)(template.shortName + ' should not have a package-lock.json', async () => {
|
|
60
|
-
const packageLockJson = getFileForTemplate(template, 'package-lock.json');
|
|
61
|
-
const res = await (0, got_1.default)(packageLockJson, {
|
|
62
|
-
throwHttpErrors: false,
|
|
63
|
-
});
|
|
64
|
-
(0, vitest_1.expect)(res.statusCode).toBe(404);
|
|
65
|
-
}, 12000);
|
|
66
|
-
(0, vitest_1.it)(template.shortName + ' should not have a yarn.lock', async () => {
|
|
67
|
-
const packageLockJson = getFileForTemplate(template, 'yarn.lock');
|
|
68
|
-
const res = await (0, got_1.default)(packageLockJson, {
|
|
69
|
-
throwHttpErrors: false,
|
|
70
|
-
});
|
|
71
|
-
(0, vitest_1.expect)(res.statusCode).toBe(404);
|
|
72
|
-
}, 12000);
|
|
73
|
-
(0, vitest_1.it)(template.shortName + ' should not have a pnpm-lock.yaml', async () => {
|
|
74
|
-
const packageLockJson = getFileForTemplate(template, 'pnpm-lock.yaml');
|
|
75
|
-
const res = await (0, got_1.default)(packageLockJson, {
|
|
76
|
-
throwHttpErrors: false,
|
|
77
|
-
});
|
|
78
|
-
(0, vitest_1.expect)(res.statusCode).toBe(404);
|
|
79
|
-
}, 12000);
|
|
80
|
-
(0, vitest_1.it)(template.shortName + ' should not have a bun.lockb', async () => {
|
|
81
|
-
const packageLockJson = getFileForTemplate(template, 'bun.lockb');
|
|
82
|
-
const res = await (0, got_1.default)(packageLockJson, {
|
|
83
|
-
throwHttpErrors: false,
|
|
84
|
-
});
|
|
85
|
-
(0, vitest_1.expect)(res.statusCode).toBe(404);
|
|
86
|
-
}, 12000);
|
|
87
|
-
(0, vitest_1.it)(template.shortName + ' should not have a standard entry point', async () => {
|
|
88
|
-
const { contents, entryPoint } = await findFile([
|
|
89
|
-
getFileForTemplate(template, 'src/index.ts'),
|
|
90
|
-
getFileForTemplate(template, 'src/index.js'),
|
|
91
|
-
getFileForTemplate(template, 'remotion/index.ts'),
|
|
92
|
-
getFileForTemplate(template, 'app/remotion/index.ts'),
|
|
93
|
-
]);
|
|
94
|
-
(0, vitest_1.expect)(entryPoint).toBeTruthy();
|
|
95
|
-
(0, vitest_1.expect)(contents).toMatch(/RemotionRoot/);
|
|
96
|
-
}, 12000);
|
|
97
|
-
(0, vitest_1.it)(template.shortName + ' should not have a standard Root file', async () => {
|
|
98
|
-
const { contents, entryPoint } = await findFile([
|
|
99
|
-
getFileForTemplate(template, 'src/Root.tsx'),
|
|
100
|
-
getFileForTemplate(template, 'src/Root.jsx'),
|
|
101
|
-
getFileForTemplate(template, 'remotion/Root.tsx'),
|
|
102
|
-
getFileForTemplate(template, 'app/remotion/Root.tsx'),
|
|
103
|
-
]);
|
|
104
|
-
(0, vitest_1.expect)(entryPoint).toBeTruthy();
|
|
105
|
-
(0, vitest_1.expect)(contents).toMatch(/export const RemotionRoot/);
|
|
106
|
-
}, 12000);
|
|
107
|
-
(0, vitest_1.it)(template.shortName + ' should not have a standard Root file', async () => {
|
|
108
|
-
const { contents, entryPoint } = await findFile([
|
|
109
|
-
getFileForTemplate(template, 'src/Root.tsx'),
|
|
110
|
-
getFileForTemplate(template, 'src/Root.jsx'),
|
|
111
|
-
getFileForTemplate(template, 'remotion/Root.tsx'),
|
|
112
|
-
getFileForTemplate(template, 'app/remotion/Root.tsx'),
|
|
113
|
-
]);
|
|
114
|
-
(0, vitest_1.expect)(entryPoint).toBeTruthy();
|
|
115
|
-
(0, vitest_1.expect)(contents).toMatch(/export const RemotionRoot/);
|
|
116
|
-
}, 12000);
|
|
117
|
-
(0, vitest_1.it)(`${template.shortName} should use the new config file format`, async () => {
|
|
118
|
-
const { contents, entryPoint } = await findFile([
|
|
119
|
-
getFileForTemplate(template, 'remotion.config.ts'),
|
|
120
|
-
getFileForTemplate(template, 'remotion.config.js'),
|
|
121
|
-
]);
|
|
122
|
-
(0, vitest_1.expect)(entryPoint).toBeTruthy();
|
|
123
|
-
(0, vitest_1.expect)(contents).not.toContain('Config.Rendering');
|
|
124
|
-
(0, vitest_1.expect)(contents).not.toContain('Config.Bundling');
|
|
125
|
-
(0, vitest_1.expect)(contents).not.toContain('Config.Log');
|
|
126
|
-
(0, vitest_1.expect)(contents).not.toContain('Config.Puppeteer');
|
|
127
|
-
(0, vitest_1.expect)(contents).not.toContain('Config.Output');
|
|
128
|
-
(0, vitest_1.expect)(contents).not.toContain('Config.Preview');
|
|
129
|
-
}, 12000);
|
|
130
|
-
(0, vitest_1.it)(template.shortName + ' should use noUnusedLocals', async () => {
|
|
131
|
-
if (template.shortName.includes('JavaScript')) {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
const { contents } = await findFile([
|
|
135
|
-
getFileForTemplate(template, 'tsconfig.json'),
|
|
136
|
-
]);
|
|
137
|
-
const json = JSON.parse(contents);
|
|
138
|
-
(0, vitest_1.expect)(json.compilerOptions.noUnusedLocals).toBe(true);
|
|
139
|
-
}, 12000);
|
|
140
|
-
}
|
|
141
|
-
});
|