create-video 4.0.334 → 4.0.336

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.
@@ -496,6 +496,19 @@ var FEATURED_TEMPLATES = [
496
496
  allowEnableTailwind: true
497
497
  }
498
498
  ].filter(truthy);
499
+ var PAID_TEMPLATES = [
500
+ {
501
+ homePageLabel: "Editor Starter",
502
+ shortName: "Editor Starter",
503
+ org: "remotion-dev",
504
+ repoName: "editor-starter",
505
+ description: "A boilerplate for starting a video editor",
506
+ longerDescription: "A starting point for building your own video editor.",
507
+ cliId: "editor-starter",
508
+ defaultBranch: "main",
509
+ previewURL: "https://www.remotion.pro/editor-starter"
510
+ }
511
+ ].filter(truthy);
499
512
 
500
513
  // src/index.ts
501
514
  var CreateVideoInternals = {
package/dist/init.js CHANGED
@@ -74,6 +74,13 @@ const init = async () => {
74
74
  // Select template first
75
75
  const selectedTemplate = await (0, select_template_1.selectTemplate)();
76
76
  log_1.Log.info(`Selected ${chalk_1.default.blue(selectedTemplate.shortName)}.`);
77
+ // If Editor Starter (paid) is selected, show purchase link and exit
78
+ if (selectedTemplate.cliId === 'editor-starter') {
79
+ log_1.Log.newLine();
80
+ log_1.Log.info(`${chalk_1.default.yellow('Editor Starter is a paid template.')}\nGet it here: ${chalk_1.default.underline(selectedTemplate.previewURL)}`);
81
+ log_1.Log.newLine();
82
+ return;
83
+ }
77
84
  // Then resolve project root with template info and directory argument
78
85
  const { projectRoot, folderName } = await (0, resolve_project_root_1.resolveProjectRoot)({
79
86
  directoryArgument,
@@ -2,4 +2,14 @@ import type { Template } from './templates';
2
2
  export declare const isTmpFlagSelected: () => boolean;
3
3
  export declare const getPositionalArguments: () => string[];
4
4
  export declare const getDirectoryArgument: () => string | null;
5
- export declare const selectTemplate: () => Promise<Template>;
5
+ export declare const selectTemplate: () => Promise<Template | {
6
+ homePageLabel: string;
7
+ shortName: string;
8
+ org: string;
9
+ repoName: string;
10
+ description: string;
11
+ longerDescription: string;
12
+ cliId: "editor-starter";
13
+ defaultBranch: string;
14
+ previewURL: string;
15
+ }>;
@@ -9,8 +9,9 @@ const minimist_1 = __importDefault(require("minimist"));
9
9
  const make_link_1 = require("./hyperlinks/make-link");
10
10
  const prompts_1 = require("./prompts");
11
11
  const templates_1 = require("./templates");
12
+ const ALL_TEMPLATES = [...templates_1.FEATURED_TEMPLATES, ...templates_1.PAID_TEMPLATES];
12
13
  const parsed = (0, minimist_1.default)(process.argv.slice(2), {
13
- boolean: [...templates_1.FEATURED_TEMPLATES.map((f) => f.cliId), 'tmp'],
14
+ boolean: [...ALL_TEMPLATES.map((f) => f.cliId), 'tmp'],
14
15
  string: ['_'],
15
16
  });
16
17
  const isTmpFlagSelected = () => parsed.tmp;
@@ -23,7 +24,7 @@ const getDirectoryArgument = () => {
23
24
  };
24
25
  exports.getDirectoryArgument = getDirectoryArgument;
25
26
  const selectTemplate = async () => {
26
- const isFlagSelected = templates_1.FEATURED_TEMPLATES.find((f) => {
27
+ const isFlagSelected = ALL_TEMPLATES.find((f) => {
27
28
  return parsed[f.cliId];
28
29
  });
29
30
  if (isFlagSelected) {
@@ -32,12 +33,16 @@ const selectTemplate = async () => {
32
33
  return (await (0, prompts_1.selectAsync)({
33
34
  message: 'Choose a template:',
34
35
  optionsPerPage: 20,
35
- choices: templates_1.FEATURED_TEMPLATES.map((template) => {
36
+ choices: ALL_TEMPLATES.map((template) => {
36
37
  return {
37
38
  value: template,
38
- title: `${chalk_1.default.blue(template.shortName)}${chalk_1.default.reset(` ${chalk_1.default.gray(template.description.trim())} ${chalk_1.default.gray((0, make_link_1.makeHyperlink)({
39
+ title: `${chalk_1.default.blue(template.shortName)}${template.cliId === 'editor-starter'
40
+ ? ' ' + chalk_1.default.yellow('(Paid)')
41
+ : ''}${chalk_1.default.reset(` ${chalk_1.default.gray(template.description.trim())} ${chalk_1.default.gray((0, make_link_1.makeHyperlink)({
39
42
  text: '(?)',
40
- url: `https://remotion.dev/templates/${template.cliId}`,
43
+ url: template.cliId === 'editor-starter'
44
+ ? `${template.previewURL}`
45
+ : `https://remotion.dev/templates/${template.cliId}`,
41
46
  fallback: '',
42
47
  }))}`)}`,
43
48
  };
@@ -20,7 +20,7 @@ export type Template = {
20
20
  repoName: string;
21
21
  homePageLabel: string;
22
22
  longerDescription: string;
23
- cliId: 'hello-world' | 'javascript' | 'blank' | 'next' | 'next-tailwind' | 'next-pages-dir' | 'react-router' | 'three' | 'still' | 'tts' | 'google-tts' | 'audiogram' | 'music-visualization' | 'skia' | 'overlay' | 'stargazer' | 'tiktok' | 'code-hike' | 'render-server' | 'recorder';
23
+ cliId: 'hello-world' | 'javascript' | 'blank' | 'next' | 'next-tailwind' | 'next-pages-dir' | 'react-router' | 'three' | 'still' | 'tts' | 'google-tts' | 'audiogram' | 'music-visualization' | 'skia' | 'overlay' | 'stargazer' | 'tiktok' | 'code-hike' | 'render-server' | 'recorder' | 'editor-starter';
24
24
  defaultBranch: string;
25
25
  featuredOnHomePage: string | null;
26
26
  previewURL: string | null;
@@ -28,4 +28,15 @@ export type Template = {
28
28
  allowEnableTailwind: boolean;
29
29
  } & DynamicTemplate;
30
30
  export declare const FEATURED_TEMPLATES: Template[];
31
+ export declare const PAID_TEMPLATES: {
32
+ homePageLabel: string;
33
+ shortName: string;
34
+ org: string;
35
+ repoName: string;
36
+ description: string;
37
+ longerDescription: string;
38
+ cliId: "editor-starter";
39
+ defaultBranch: string;
40
+ previewURL: string;
41
+ }[];
31
42
  export {};
package/dist/templates.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FEATURED_TEMPLATES = void 0;
3
+ exports.PAID_TEMPLATES = exports.FEATURED_TEMPLATES = void 0;
4
4
  function truthy(value) {
5
5
  return Boolean(value);
6
6
  }
@@ -416,3 +416,16 @@ exports.FEATURED_TEMPLATES = [
416
416
  allowEnableTailwind: true,
417
417
  },
418
418
  ].filter(truthy);
419
+ exports.PAID_TEMPLATES = [
420
+ {
421
+ homePageLabel: 'Editor Starter',
422
+ shortName: 'Editor Starter',
423
+ org: 'remotion-dev',
424
+ repoName: 'editor-starter',
425
+ description: 'A boilerplate for starting a video editor',
426
+ longerDescription: 'A starting point for building your own video editor.',
427
+ cliId: 'editor-starter',
428
+ defaultBranch: 'main',
429
+ previewURL: 'https://www.remotion.pro/editor-starter',
430
+ },
431
+ ].filter(truthy);
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.334",
6
+ "version": "4.0.336",
7
7
  "description": "Create a new Remotion project",
8
8
  "main": "dist/index.js",
9
9
  "bin": {
@@ -27,7 +27,7 @@
27
27
  "@types/tar": "6.1.1",
28
28
  "react": "19.0.0",
29
29
  "eslint": "9.19.0",
30
- "@remotion/eslint-config-internal": "4.0.334"
30
+ "@remotion/eslint-config-internal": "4.0.336"
31
31
  },
32
32
  "exports": {
33
33
  "./package.json": "./package.json",