create-video 4.0.127 → 4.0.129

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: "reset" | "bold" | "dim" | "italic" | "underline" | "inverse" | "hidden" | "strikethrough" | "visible";
9
+ Modifiers: "bold" | "reset" | "dim" | "italic" | "underline" | "inverse" | "hidden" | "strikethrough" | "visible";
10
10
  stderr: chalk.Chalk & {
11
11
  supportsColor: false | chalk.ColorSupport;
12
12
  };
@@ -110,6 +110,7 @@ exports.getRunCommand = getRunCommand;
110
110
  const getDevCommand = (manager, template) => {
111
111
  if (template.cliId === 'remix' ||
112
112
  template.cliId === 'next' ||
113
+ template.cliId === 'next-tailwind' ||
113
114
  template.cliId === 'next-pages-dir') {
114
115
  return `${(0, exports.getRunCommand)(manager)} dev`;
115
116
  }
@@ -1,4 +1 @@
1
- export declare const resolveProjectRoot: () => Promise<[
2
- string,
3
- string
4
- ]>;
1
+ export declare const resolveProjectRoot: () => Promise<[string, string]>;
@@ -21,7 +21,7 @@ export type Template = {
21
21
  repoName: string;
22
22
  homePageLabel: string;
23
23
  longerDescription: React.ReactNode;
24
- cliId: 'hello-world' | 'javascript' | 'blank' | 'next' | 'next-pages-dir' | 'remix' | 'three' | 'still' | 'tts' | 'google-tts' | 'audiogram' | 'skia' | 'tailwind' | 'overlay' | 'stargazer' | 'tiktok';
24
+ cliId: 'hello-world' | 'javascript' | 'blank' | 'next' | 'next-tailwind' | 'next-pages-dir' | 'remix' | 'three' | 'still' | 'tts' | 'google-tts' | 'audiogram' | 'skia' | 'tailwind' | 'overlay' | 'stargazer' | 'tiktok';
25
25
  defaultBranch: string;
26
26
  featuredOnHomePage: string | null;
27
27
  } & DynamicTemplate;
package/dist/templates.js CHANGED
@@ -41,6 +41,23 @@ exports.FEATURED_TEMPLATES = [
41
41
  defaultBranch: 'main',
42
42
  featuredOnHomePage: 'Next.js',
43
43
  },
44
+ {
45
+ homePageLabel: 'Next.js (App dir + TailwindCSS)',
46
+ shortName: 'Next.js (App dir + TailwindCSS)',
47
+ org: 'remotion-dev',
48
+ repoName: 'template-next-app-dir-tailwind',
49
+ description: 'SaaS template for video generation apps',
50
+ longerDescription: 'A SaaS starter kit which has the Remotion Player and rendering via Remotion Lambda built-in. Our recommended choice for people who want to build an app that can generate videos.',
51
+ promoVideo: {
52
+ width: 1280,
53
+ height: 720,
54
+ muxId: 'RufnZIJZh6L1MAaeG02jnXuM9pK96tNuHRxmXHbWqCBI',
55
+ },
56
+ cliId: 'next-tailwind',
57
+ type: 'video',
58
+ defaultBranch: 'main',
59
+ featuredOnHomePage: null,
60
+ },
44
61
  {
45
62
  homePageLabel: 'Next.js (Pages dir)',
46
63
  shortName: 'Next.js (Pages dir)',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-video",
3
- "version": "4.0.127",
3
+ "version": "4.0.129",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -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
- });