create-video 4.0.0-webhook.27 → 4.1.0-alpha2
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 +8 -8
- package/dist/add-yarn2-support.d.ts +6 -0
- package/dist/add-yarn2-support.js +27 -0
- package/dist/degit.d.ts +0 -0
- package/dist/degit.js +8 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/init.d.ts +8 -0
- package/dist/init.js +55 -13
- package/dist/latest-remotion-version.d.ts +0 -0
- package/dist/latest-remotion-version.js +0 -0
- package/dist/list-of-remotion-packages.d.ts +1 -0
- package/dist/list-of-remotion-packages.js +29 -0
- package/dist/log.d.ts +0 -0
- package/dist/log.js +0 -0
- package/dist/mkdirp.d.ts +0 -0
- package/dist/mkdirp.js +4 -4
- package/dist/open-in-editor-flow.d.ts +0 -0
- package/dist/open-in-editor-flow.js +2 -2
- package/dist/open-in-editor.d.ts +2 -2
- package/dist/open-in-editor.js +16 -16
- package/dist/patch-package-json.d.ts +6 -2
- package/dist/patch-package-json.js +26 -35
- package/dist/patch-readme.d.ts +2 -1
- package/dist/patch-readme.js +9 -9
- package/dist/pkg-managers.d.ts +7 -3
- package/dist/pkg-managers.js +55 -9
- package/dist/prompts.d.ts +3 -3
- package/dist/prompts.js +0 -0
- package/dist/resolve-project-root.d.ts +0 -0
- package/dist/resolve-project-root.js +6 -6
- package/dist/select-template.d.ts +0 -0
- package/dist/select-template.js +0 -0
- package/dist/strip-ansi.d.ts +0 -0
- package/dist/strip-ansi.js +0 -0
- package/dist/templates.d.ts +21 -8
- package/dist/templates.js +103 -14
- package/dist/test/git-status.test.d.ts +1 -0
- package/dist/test/git-status.test.js +26 -0
- package/dist/test/patch-package-json.test.d.ts +1 -0
- package/dist/test/patch-package-json.test.js +53 -0
- package/dist/test/validate-templates.test.d.ts +1 -0
- package/dist/test/validate-templates.test.js +136 -0
- package/dist/validate-name.d.ts +0 -0
- package/dist/validate-name.js +0 -0
- package/dist/yesno.d.ts +0 -0
- package/dist/yesno.js +0 -0
- package/package.json +42 -38
package/dist/patch-readme.js
CHANGED
|
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.patchReadmeMd = void 0;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const pkg_managers_1 = require("./pkg-managers");
|
|
10
|
-
const patchReadmeMd = (projectRoot, packageManager) => {
|
|
11
|
-
const fileName =
|
|
12
|
-
const contents =
|
|
10
|
+
const patchReadmeMd = (projectRoot, packageManager, template) => {
|
|
11
|
+
const fileName = node_path_1.default.join(projectRoot, 'README.md');
|
|
12
|
+
const contents = node_fs_1.default.readFileSync(fileName, 'utf8');
|
|
13
13
|
const newContents = contents
|
|
14
14
|
.split('\n')
|
|
15
15
|
.map((c) => {
|
|
@@ -17,17 +17,17 @@ const patchReadmeMd = (projectRoot, packageManager) => {
|
|
|
17
17
|
return (0, pkg_managers_1.getInstallCommand)(packageManager);
|
|
18
18
|
}
|
|
19
19
|
if (c.startsWith('npm start')) {
|
|
20
|
-
return (0, pkg_managers_1.
|
|
20
|
+
return (0, pkg_managers_1.getDevCommand)(packageManager, template);
|
|
21
21
|
}
|
|
22
22
|
if (c.startsWith('npm run build')) {
|
|
23
23
|
return (0, pkg_managers_1.getRenderCommand)(packageManager);
|
|
24
24
|
}
|
|
25
|
-
if (c.startsWith('npm run
|
|
26
|
-
return (0, pkg_managers_1.
|
|
25
|
+
if (c.startsWith('npm run ')) {
|
|
26
|
+
return (0, pkg_managers_1.getRunCommand)(packageManager) + c.replace('npm run', '');
|
|
27
27
|
}
|
|
28
28
|
return c;
|
|
29
29
|
})
|
|
30
30
|
.join('\n');
|
|
31
|
-
|
|
31
|
+
node_fs_1.default.writeFileSync(fileName, newContents);
|
|
32
32
|
};
|
|
33
33
|
exports.patchReadmeMd = patchReadmeMd;
|
package/dist/pkg-managers.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Template } from './templates';
|
|
2
|
+
export type PackageManager = 'npm' | 'yarn' | 'pnpm';
|
|
2
3
|
export declare const selectPackageManager: () => PackageManager;
|
|
3
4
|
export declare const getInstallCommand: (manager: PackageManager) => "yarn" | "npm i" | "pnpm i" | undefined;
|
|
4
|
-
export declare const
|
|
5
|
+
export declare const getDevCommand: (manager: PackageManager, template: Template) => string | undefined;
|
|
6
|
+
export declare const getRenderCommandForTemplate: (manager: PackageManager, template: Template) => string | undefined;
|
|
5
7
|
export declare const getRenderCommand: (manager: PackageManager) => "npm run build" | "yarn build" | "pnpm build" | undefined;
|
|
6
|
-
export declare const
|
|
8
|
+
export declare const getRunCommand: (manager: PackageManager) => "npm run" | "yarn run" | "pnpm run";
|
|
9
|
+
export declare const getPackageManagerVersion: (manager: PackageManager) => Promise<string>;
|
|
10
|
+
export declare const getPackageManagerVersionOrNull: (manager: PackageManager) => Promise<string | null>;
|
package/dist/pkg-managers.js
CHANGED
|
@@ -3,15 +3,16 @@ 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.
|
|
7
|
-
const
|
|
6
|
+
exports.getPackageManagerVersionOrNull = exports.getPackageManagerVersion = exports.getRunCommand = exports.getRenderCommand = exports.getRenderCommandForTemplate = exports.getDevCommand = exports.getInstallCommand = exports.selectPackageManager = void 0;
|
|
7
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
9
|
const shouldUseYarn = () => {
|
|
9
10
|
var _a, _b;
|
|
10
11
|
return Boolean(((_a = process.env.npm_execpath) === null || _a === void 0 ? void 0 : _a.includes('yarn.js')) ||
|
|
11
12
|
((_b = process.env.npm_config_user_agent) === null || _b === void 0 ? void 0 : _b.includes('yarn')));
|
|
12
13
|
};
|
|
13
14
|
const shouldUsePnpm = () => {
|
|
14
|
-
if (__dirname.includes(
|
|
15
|
+
if (__dirname.includes(node_path_1.default.join('.pnpm', 'create-video'))) {
|
|
15
16
|
return true;
|
|
16
17
|
}
|
|
17
18
|
if (!process.env.npm_config_argv) {
|
|
@@ -47,6 +48,23 @@ const getInstallCommand = (manager) => {
|
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
exports.getInstallCommand = getInstallCommand;
|
|
51
|
+
const getDevCommand = (manager, template) => {
|
|
52
|
+
if (template.cliId === 'remix' || template.cliId === 'next') {
|
|
53
|
+
return `${(0, exports.getRunCommand)(manager)} dev`;
|
|
54
|
+
}
|
|
55
|
+
return getStartCommand(manager);
|
|
56
|
+
};
|
|
57
|
+
exports.getDevCommand = getDevCommand;
|
|
58
|
+
const getRenderCommandForTemplate = (manager, template) => {
|
|
59
|
+
if (template.cliId === 'remix' || template.cliId === 'next') {
|
|
60
|
+
return `${(0, exports.getRunCommand)(manager)} remotion:render`;
|
|
61
|
+
}
|
|
62
|
+
if (template.cliId === 'still') {
|
|
63
|
+
return `${(0, exports.getRunCommand)(manager)} render`;
|
|
64
|
+
}
|
|
65
|
+
return (0, exports.getRenderCommand)(manager);
|
|
66
|
+
};
|
|
67
|
+
exports.getRenderCommandForTemplate = getRenderCommandForTemplate;
|
|
50
68
|
const getStartCommand = (manager) => {
|
|
51
69
|
if (manager === 'npm') {
|
|
52
70
|
return `npm start`;
|
|
@@ -58,7 +76,6 @@ const getStartCommand = (manager) => {
|
|
|
58
76
|
return `pnpm start`;
|
|
59
77
|
}
|
|
60
78
|
};
|
|
61
|
-
exports.getStartCommand = getStartCommand;
|
|
62
79
|
const getRenderCommand = (manager) => {
|
|
63
80
|
if (manager === 'npm') {
|
|
64
81
|
return `npm run build`;
|
|
@@ -71,15 +88,44 @@ const getRenderCommand = (manager) => {
|
|
|
71
88
|
}
|
|
72
89
|
};
|
|
73
90
|
exports.getRenderCommand = getRenderCommand;
|
|
74
|
-
const
|
|
91
|
+
const getRunCommand = (manager) => {
|
|
75
92
|
if (manager === 'npm') {
|
|
76
|
-
return `npm run
|
|
93
|
+
return `npm run`;
|
|
77
94
|
}
|
|
78
95
|
if (manager === 'yarn') {
|
|
79
|
-
return `yarn run
|
|
96
|
+
return `yarn run`;
|
|
80
97
|
}
|
|
81
98
|
if (manager === 'pnpm') {
|
|
82
|
-
return `pnpm run
|
|
99
|
+
return `pnpm run`;
|
|
100
|
+
}
|
|
101
|
+
throw new TypeError('unknown package manager');
|
|
102
|
+
};
|
|
103
|
+
exports.getRunCommand = getRunCommand;
|
|
104
|
+
const getPackageManagerVersion = (manager) => {
|
|
105
|
+
const cmd = `${manager} -v`;
|
|
106
|
+
return new Promise((resolve, reject) => {
|
|
107
|
+
(0, node_child_process_1.exec)(cmd, (error, stdout, stderr) => {
|
|
108
|
+
if (error) {
|
|
109
|
+
reject(error);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (stderr) {
|
|
113
|
+
reject(stderr);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
resolve(stdout.trim());
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
exports.getPackageManagerVersion = getPackageManagerVersion;
|
|
121
|
+
const getPackageManagerVersionOrNull = async (manager) => {
|
|
122
|
+
try {
|
|
123
|
+
const version = await (0, exports.getPackageManagerVersion)(manager);
|
|
124
|
+
return version;
|
|
125
|
+
}
|
|
126
|
+
catch (err) {
|
|
127
|
+
console.warn(`Could not determine the version of ${manager}.`);
|
|
128
|
+
return null;
|
|
83
129
|
}
|
|
84
130
|
};
|
|
85
|
-
exports.
|
|
131
|
+
exports.getPackageManagerVersionOrNull = getPackageManagerVersionOrNull;
|
package/dist/prompts.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Options, PromptObject } from 'prompts';
|
|
2
2
|
import prompts from 'prompts';
|
|
3
|
-
export
|
|
3
|
+
export type Question<V extends string = string> = PromptObject<V> & {
|
|
4
4
|
optionsPerPage?: number;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
7
|
-
|
|
6
|
+
export type NamelessQuestion = Omit<Question<'value'>, 'name' | 'type'>;
|
|
7
|
+
type PromptOptions = {
|
|
8
8
|
nonInteractiveHelp?: string;
|
|
9
9
|
} & Options;
|
|
10
10
|
declare function prompt(questions: Question | Question[], { nonInteractiveHelp, ...options }?: PromptOptions): Promise<prompts.Answers<string>>;
|
package/dist/prompts.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.resolveProjectRoot = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
10
10
|
const log_1 = require("./log");
|
|
11
11
|
const mkdirp_1 = require("./mkdirp");
|
|
12
12
|
const prompts_1 = __importDefault(require("./prompts"));
|
|
@@ -18,7 +18,7 @@ function assertValidName(folderName) {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
function assertFolderEmptyAsync(projectRoot) {
|
|
21
|
-
const conflicts =
|
|
21
|
+
const conflicts = node_fs_1.default
|
|
22
22
|
.readdirSync(projectRoot)
|
|
23
23
|
.filter((file) => !/\.iml$/.test(file));
|
|
24
24
|
if (conflicts.length > 0) {
|
|
@@ -39,7 +39,7 @@ const resolveProjectRoot = async () => {
|
|
|
39
39
|
message: 'What would you like to name your video?',
|
|
40
40
|
initial: 'my-video',
|
|
41
41
|
validate: (name) => {
|
|
42
|
-
const validation = (0, validate_name_1.validateName)(
|
|
42
|
+
const validation = (0, validate_name_1.validateName)(node_path_1.default.basename(node_path_1.default.resolve(name)));
|
|
43
43
|
if (typeof validation === 'string') {
|
|
44
44
|
return 'Invalid project name: ' + validation;
|
|
45
45
|
}
|
|
@@ -56,8 +56,8 @@ const resolveProjectRoot = async () => {
|
|
|
56
56
|
throw error;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
const projectRoot =
|
|
60
|
-
const folderName =
|
|
59
|
+
const projectRoot = node_path_1.default.resolve(projectName);
|
|
60
|
+
const folderName = node_path_1.default.basename(projectRoot);
|
|
61
61
|
assertValidName(folderName);
|
|
62
62
|
(0, mkdirp_1.mkdirp)(projectRoot);
|
|
63
63
|
if (assertFolderEmptyAsync(projectRoot).exists) {
|
|
File without changes
|
package/dist/select-template.js
CHANGED
|
File without changes
|
package/dist/strip-ansi.d.ts
CHANGED
|
File without changes
|
package/dist/strip-ansi.js
CHANGED
|
File without changes
|
package/dist/templates.d.ts
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
org: string;
|
|
5
|
-
repoName: string;
|
|
6
|
-
homePageLabel: string;
|
|
7
|
-
longerDescription: string;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type DynamicTemplate = {
|
|
3
|
+
type: 'video';
|
|
8
4
|
promoVideo: {
|
|
9
5
|
muxId: string;
|
|
10
6
|
width: number;
|
|
11
7
|
height: number;
|
|
12
8
|
};
|
|
13
|
-
|
|
9
|
+
} | {
|
|
10
|
+
type: 'image';
|
|
11
|
+
promoBanner: {
|
|
12
|
+
src: string;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
};
|
|
14
16
|
};
|
|
17
|
+
export type Template = {
|
|
18
|
+
shortName: string;
|
|
19
|
+
description: string;
|
|
20
|
+
org: string;
|
|
21
|
+
repoName: string;
|
|
22
|
+
homePageLabel: string;
|
|
23
|
+
longerDescription: React.ReactNode;
|
|
24
|
+
cliId: 'hello-world' | 'javascript' | 'blank' | 'next' | 'remix' | 'three' | 'still' | 'tts' | 'google-tts' | 'audiogram' | 'skia' | 'tailwind' | 'overlay';
|
|
25
|
+
defaultBranch: string;
|
|
26
|
+
} & DynamicTemplate;
|
|
15
27
|
export declare const FEATURED_TEMPLATES: Template[];
|
|
28
|
+
export {};
|
package/dist/templates.js
CHANGED
|
@@ -1,13 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FEATURED_TEMPLATES = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
function truthy(value) {
|
|
6
|
+
return Boolean(value);
|
|
7
|
+
}
|
|
8
|
+
const ENABLE_NEXT = false;
|
|
9
|
+
const nextTemplate = {
|
|
10
|
+
homePageLabel: 'Next.js',
|
|
11
|
+
shortName: 'Next.js',
|
|
12
|
+
org: 'remotion-dev',
|
|
13
|
+
repoName: 'template-next',
|
|
14
|
+
description: 'SaaS template for video generation apps',
|
|
15
|
+
longerDescription: 'A software-as-a-service starter kit which has the Remotion Player and rendering via Remotion Lambda built-in. Our recommended choice for people who want to build a video generation app.',
|
|
16
|
+
promoBanner: {
|
|
17
|
+
width: 1280,
|
|
18
|
+
height: 720,
|
|
19
|
+
src: '/img/remix-template.png',
|
|
20
|
+
},
|
|
21
|
+
cliId: 'next',
|
|
22
|
+
type: 'image',
|
|
23
|
+
defaultBranch: 'main',
|
|
24
|
+
};
|
|
25
|
+
// Note that this page is statically analyzed by extract-articles.mjs
|
|
4
26
|
exports.FEATURED_TEMPLATES = [
|
|
5
27
|
{
|
|
6
|
-
homePageLabel: '
|
|
28
|
+
homePageLabel: 'Hello World',
|
|
7
29
|
shortName: 'Hello World',
|
|
8
30
|
org: 'remotion-dev',
|
|
9
31
|
repoName: 'template-helloworld',
|
|
10
|
-
description: '
|
|
32
|
+
description: 'A "Hello World" starter template',
|
|
11
33
|
longerDescription: 'A basic template with TypeScript, Prettier and ESLint preconfigured. Our recommended choice for beginners.',
|
|
12
34
|
promoVideo: {
|
|
13
35
|
muxId: 'vKvV6aa7GXGlR01cmpc6J8Zz4Gkj9d2hBSnVYoef00900I',
|
|
@@ -15,10 +37,29 @@ exports.FEATURED_TEMPLATES = [
|
|
|
15
37
|
width: 1920,
|
|
16
38
|
},
|
|
17
39
|
cliId: 'hello-world',
|
|
40
|
+
type: 'video',
|
|
41
|
+
defaultBranch: 'main',
|
|
42
|
+
},
|
|
43
|
+
ENABLE_NEXT ? nextTemplate : null,
|
|
44
|
+
{
|
|
45
|
+
homePageLabel: 'Blank',
|
|
46
|
+
shortName: 'Blank',
|
|
47
|
+
description: 'Nothing except an empty canvas',
|
|
48
|
+
org: 'remotion-dev',
|
|
49
|
+
repoName: 'template-empty',
|
|
50
|
+
longerDescription: 'A template containing nothing but an empty canvas. Recommended for people who already worked with Remotion.',
|
|
51
|
+
promoVideo: {
|
|
52
|
+
muxId: 'JD00x15y859GjqO7C9hpILkrSddGzd55K4lfj02dv8gU4',
|
|
53
|
+
width: 1280,
|
|
54
|
+
height: 720,
|
|
55
|
+
},
|
|
56
|
+
cliId: 'blank',
|
|
57
|
+
type: 'video',
|
|
58
|
+
defaultBranch: 'main',
|
|
18
59
|
},
|
|
19
60
|
{
|
|
20
61
|
homePageLabel: 'JavaScript',
|
|
21
|
-
shortName: 'Hello World (
|
|
62
|
+
shortName: 'Hello World (JavaScript)',
|
|
22
63
|
org: 'remotion-dev',
|
|
23
64
|
repoName: 'template-helloworld-javascript',
|
|
24
65
|
description: 'The default starter template in plain JS',
|
|
@@ -29,20 +70,24 @@ exports.FEATURED_TEMPLATES = [
|
|
|
29
70
|
height: 1080,
|
|
30
71
|
},
|
|
31
72
|
cliId: 'javascript',
|
|
73
|
+
type: 'video',
|
|
74
|
+
defaultBranch: 'main',
|
|
32
75
|
},
|
|
33
76
|
{
|
|
34
|
-
homePageLabel: '
|
|
35
|
-
shortName: '
|
|
36
|
-
description: 'Nothing except an empty canvas',
|
|
77
|
+
homePageLabel: 'Remix',
|
|
78
|
+
shortName: 'Remix',
|
|
37
79
|
org: 'remotion-dev',
|
|
38
|
-
repoName: 'template-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
80
|
+
repoName: 'template-remix',
|
|
81
|
+
description: 'Remotion + Remix Starter Kit',
|
|
82
|
+
longerDescription: 'A software-as-a-service starter kit which has the Remotion Player and rendering via Remotion Lambda built-in. Built with remix.run.',
|
|
83
|
+
promoBanner: {
|
|
42
84
|
width: 1280,
|
|
43
85
|
height: 720,
|
|
86
|
+
src: '/img/remix-template.png',
|
|
44
87
|
},
|
|
45
|
-
cliId: '
|
|
88
|
+
cliId: 'remix',
|
|
89
|
+
type: 'image',
|
|
90
|
+
defaultBranch: 'main',
|
|
46
91
|
},
|
|
47
92
|
{
|
|
48
93
|
homePageLabel: '3D',
|
|
@@ -57,6 +102,8 @@ exports.FEATURED_TEMPLATES = [
|
|
|
57
102
|
height: 720,
|
|
58
103
|
},
|
|
59
104
|
cliId: 'three',
|
|
105
|
+
type: 'video',
|
|
106
|
+
defaultBranch: 'main',
|
|
60
107
|
},
|
|
61
108
|
{
|
|
62
109
|
homePageLabel: 'Stills',
|
|
@@ -71,10 +118,12 @@ exports.FEATURED_TEMPLATES = [
|
|
|
71
118
|
width: 1200,
|
|
72
119
|
},
|
|
73
120
|
cliId: 'still',
|
|
121
|
+
type: 'video',
|
|
122
|
+
defaultBranch: 'main',
|
|
74
123
|
},
|
|
75
124
|
{
|
|
76
|
-
homePageLabel: '
|
|
77
|
-
shortName: '
|
|
125
|
+
homePageLabel: 'Text-To-Speech (Azure)',
|
|
126
|
+
shortName: 'TTS (Azure)',
|
|
78
127
|
org: 'FelippeChemello',
|
|
79
128
|
repoName: 'Remotion-TTS-Example',
|
|
80
129
|
description: 'Turns text into speech and makes a video',
|
|
@@ -85,6 +134,24 @@ exports.FEATURED_TEMPLATES = [
|
|
|
85
134
|
height: 1080,
|
|
86
135
|
},
|
|
87
136
|
cliId: 'tts',
|
|
137
|
+
type: 'video',
|
|
138
|
+
defaultBranch: 'master',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
homePageLabel: 'Text-To-Speech (Google)',
|
|
142
|
+
shortName: 'TTS (Google)',
|
|
143
|
+
org: 'thecmdrunner',
|
|
144
|
+
repoName: 'remotion-gtts-template',
|
|
145
|
+
description: 'Turns text into speech and makes a video',
|
|
146
|
+
longerDescription: 'A template that turns text into a spoken video. Integrates with Firebase for Storage, and Google Cloud for Speech synthesis.',
|
|
147
|
+
promoVideo: {
|
|
148
|
+
muxId: '82dzhGhv3bl3p8LW009cFGd8oltqt6UvxTWdP27202BAY',
|
|
149
|
+
width: 1920,
|
|
150
|
+
height: 1080,
|
|
151
|
+
},
|
|
152
|
+
cliId: 'google-tts',
|
|
153
|
+
type: 'video',
|
|
154
|
+
defaultBranch: 'master',
|
|
88
155
|
},
|
|
89
156
|
{
|
|
90
157
|
homePageLabel: 'Audiogram',
|
|
@@ -99,6 +166,8 @@ exports.FEATURED_TEMPLATES = [
|
|
|
99
166
|
width: 1080,
|
|
100
167
|
},
|
|
101
168
|
cliId: 'audiogram',
|
|
169
|
+
type: 'video',
|
|
170
|
+
defaultBranch: 'main',
|
|
102
171
|
},
|
|
103
172
|
{
|
|
104
173
|
homePageLabel: 'Skia',
|
|
@@ -113,6 +182,8 @@ exports.FEATURED_TEMPLATES = [
|
|
|
113
182
|
width: 1920,
|
|
114
183
|
},
|
|
115
184
|
cliId: 'skia',
|
|
185
|
+
type: 'video',
|
|
186
|
+
defaultBranch: 'main',
|
|
116
187
|
},
|
|
117
188
|
{
|
|
118
189
|
homePageLabel: 'Tailwind',
|
|
@@ -127,5 +198,23 @@ exports.FEATURED_TEMPLATES = [
|
|
|
127
198
|
width: 1280,
|
|
128
199
|
},
|
|
129
200
|
cliId: 'tailwind',
|
|
201
|
+
type: 'video',
|
|
202
|
+
defaultBranch: 'main',
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
homePageLabel: 'Overlay',
|
|
206
|
+
shortName: 'Overlay',
|
|
207
|
+
org: 'remotion-dev',
|
|
208
|
+
repoName: 'template-overlay',
|
|
209
|
+
description: 'Overlays for video editing software',
|
|
210
|
+
longerDescription: ((0, jsx_runtime_1.jsxs)("span", { children: ["A starter template to create overlays to use in conventional video editing software.", ' ', (0, jsx_runtime_1.jsx)("a", { href: "/docs/overlay", children: "Read more about creating overlays." })] })),
|
|
211
|
+
promoVideo: {
|
|
212
|
+
muxId: 'zgy7XK01009y33Vfzhns02cZS00rOyeZ6WaanaxcrDysqmU',
|
|
213
|
+
height: 720,
|
|
214
|
+
width: 1280,
|
|
215
|
+
},
|
|
216
|
+
cliId: 'overlay',
|
|
217
|
+
type: 'video',
|
|
218
|
+
defaultBranch: 'main',
|
|
130
219
|
},
|
|
131
|
-
];
|
|
220
|
+
].filter(truthy);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
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 node_path_1 = __importDefault(require("node:path"));
|
|
7
|
+
const vitest_1 = require("vitest");
|
|
8
|
+
const init_1 = require("../init");
|
|
9
|
+
(0, vitest_1.test)('Get git status', async () => {
|
|
10
|
+
const status = await (0, init_1.checkGitAvailability)(process.cwd(), 'git', [
|
|
11
|
+
'--version',
|
|
12
|
+
]);
|
|
13
|
+
if (status.type !== 'is-git-repo') {
|
|
14
|
+
throw new Error('is git repo');
|
|
15
|
+
}
|
|
16
|
+
(0, vitest_1.expect)(status.location ===
|
|
17
|
+
node_path_1.default.posix.join(__dirname, '..', '..', '..', '..').replace(/\\/g, '/') ||
|
|
18
|
+
status.location === 'D:/a/remotion/remotion').toEqual(true);
|
|
19
|
+
if (status.type !== 'is-git-repo') {
|
|
20
|
+
throw new Error('is git repo');
|
|
21
|
+
}
|
|
22
|
+
const status2 = await (0, init_1.checkGitAvailability)(node_path_1.default.dirname(status.location), 'git', ['--version']);
|
|
23
|
+
(0, vitest_1.expect)(status2).toEqual({ type: 'no-git-repo' });
|
|
24
|
+
const status3 = await (0, init_1.checkGitAvailability)(node_path_1.default.dirname(status.location), 'wronggitbinary', ['--version']);
|
|
25
|
+
(0, vitest_1.expect)(status3).toEqual({ type: 'git-not-installed' });
|
|
26
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const vitest_1 = require("vitest");
|
|
4
|
+
const patch_package_json_1 = require("../patch-package-json");
|
|
5
|
+
const packageManagers = ['npm', 'pnpm', 'yarn'];
|
|
6
|
+
for (const packageManager of packageManagers) {
|
|
7
|
+
(0, vitest_1.test)(`Using ${packageManager} package manager provides the correct "packageManager" entry in package.json`, () => {
|
|
8
|
+
const latestRemotionVersion = '1.0.0';
|
|
9
|
+
const packageManagerVersion = '1.22.19';
|
|
10
|
+
const packageJson = {
|
|
11
|
+
name: 'my-video',
|
|
12
|
+
version: '1.0.0',
|
|
13
|
+
description: 'My Remotion video',
|
|
14
|
+
scripts: {
|
|
15
|
+
start: 'remotion studio',
|
|
16
|
+
},
|
|
17
|
+
dependencies: {
|
|
18
|
+
'@remotion/cli': 'stale-remotion-version',
|
|
19
|
+
react: '^18.0.0',
|
|
20
|
+
remotion: 'stale-remotion-version',
|
|
21
|
+
},
|
|
22
|
+
devDependencies: {
|
|
23
|
+
'@types/react': '^18.0.6',
|
|
24
|
+
'@remotion/eslint-config': '^2.0.0',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
let newPackageJson = null;
|
|
28
|
+
(0, patch_package_json_1.patchPackageJson)({
|
|
29
|
+
projectRoot: '/path/to/project',
|
|
30
|
+
latestRemotionVersion,
|
|
31
|
+
packageManager: `${packageManager}@${packageManagerVersion}`,
|
|
32
|
+
projectName: 'my-video',
|
|
33
|
+
}, {
|
|
34
|
+
getPackageJson: () => JSON.stringify(packageJson),
|
|
35
|
+
setPackageJson: (_, content) => {
|
|
36
|
+
newPackageJson = JSON.parse(content);
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
(0, vitest_1.expect)(newPackageJson).to.deep.equal({
|
|
40
|
+
...packageJson,
|
|
41
|
+
dependencies: {
|
|
42
|
+
...packageJson.dependencies,
|
|
43
|
+
'@remotion/cli': latestRemotionVersion,
|
|
44
|
+
remotion: latestRemotionVersion,
|
|
45
|
+
},
|
|
46
|
+
devDependencies: {
|
|
47
|
+
...packageJson.devDependencies,
|
|
48
|
+
'@remotion/eslint-config': latestRemotionVersion,
|
|
49
|
+
},
|
|
50
|
+
packageManager: `${packageManager}@${packageManagerVersion}`,
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|