@revideo/create 0.4.2-red.992 → 0.4.2

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.
@@ -9,15 +9,15 @@
9
9
  "render": "tsc && node dist/render.js"
10
10
  },
11
11
  "dependencies": {
12
- "@revideo/core": "^0.4.1",
13
- "@revideo/2d": "^0.4.1",
14
- "@revideo/renderer": "^0.4.1",
15
- "@revideo/vite-plugin": "^0.4.1",
16
- "@revideo/ffmpeg": "^0.4.1"
12
+ "@revideo/core": "^0.4.2",
13
+ "@revideo/2d": "^0.4.2",
14
+ "@revideo/renderer": "^0.4.2",
15
+ "@revideo/vite-plugin": "^0.4.2",
16
+ "@revideo/ffmpeg": "^0.4.2"
17
17
  },
18
18
  "devDependencies": {
19
- "@revideo/ui": "^0.4.1",
20
- "@revideo/cli": "^0.4.1",
19
+ "@revideo/ui": "^0.4.2",
20
+ "@revideo/cli": "^0.4.2",
21
21
  "typescript": "^5.2.2",
22
22
  "vite": "^4.5"
23
23
  }
@@ -19,6 +19,7 @@ function Button({
19
19
  <button
20
20
  className="text-sm flex items-center gap-x-2 rounded-md p-2 bg-gray-200 text-gray-700 hover:bg-gray-300"
21
21
  onClick={() => onClick()}
22
+ disabled={loading}
22
23
  >
23
24
  {loading && <LoaderCircle className="animate-spin h-4 w-4 text-gray-700" />}
24
25
  {children}
@@ -31,11 +32,12 @@ export default function Home() {
31
32
  const [repoImage, setRepoImage] = useState<string | null>();
32
33
  const [stargazerTimes, setStargazerTimes] = useState<number[]>([]);
33
34
 
34
- const [loading, setLoading] = useState(false);
35
+ const [githubLoading, setGithubLoading] = useState(false);
35
36
  const [needsKey, setNeedsKey] = useState(false);
36
37
  const [key, setKey] = useState('');
37
38
  const [error, setError] = useState<string | null>();
38
39
 
40
+ const [renderLoading, setRenderLoading] = useState(false);
39
41
  const [progress, setProgress] = useState(0);
40
42
  const [downloadUrl, setDownloadUrl] = useState<string | null>(null);
41
43
 
@@ -46,9 +48,9 @@ export default function Home() {
46
48
  * @returns
47
49
  */
48
50
  async function fetchInformation(repoName: `${string}/${string}`, key: string) {
49
- setLoading(true);
51
+ setGithubLoading(true);
50
52
  const response = await getGithubRepositoryInfo(repoName, key ?? undefined);
51
- setLoading(false);
53
+ setGithubLoading(false);
52
54
 
53
55
  if (response.status === 'rate-limit') {
54
56
  setNeedsKey(true);
@@ -68,6 +70,7 @@ export default function Home() {
68
70
  * Render the video.
69
71
  */
70
72
  async function render() {
73
+ setRenderLoading(true);
71
74
  const res = await fetch('/api/render', {
72
75
  method: 'POST',
73
76
  headers: {
@@ -75,19 +78,21 @@ export default function Home() {
75
78
  },
76
79
  body: JSON.stringify({
77
80
  variables: {
78
- data: stargazerTimes,
79
- repoName: repoName,
80
- repoImage: repoImage,
81
+ data: stargazerTimes.length ? stargazerTimes : undefined,
82
+ repoName: repoName || undefined,
83
+ repoImage: repoImage || undefined,
81
84
  },
82
85
  streamProgress: true,
83
86
  }),
84
87
  }).catch((e) => console.log(e));
85
88
 
86
89
  if (!res) {
90
+ alert('Failed to render video.');
87
91
  return;
88
92
  }
89
93
 
90
94
  const downloadUrl = await parseStream(res.body!.getReader(), (p) => setProgress(p));
95
+ setRenderLoading(false);
91
96
  setDownloadUrl(downloadUrl);
92
97
  }
93
98
 
@@ -105,7 +110,7 @@ export default function Home() {
105
110
  />
106
111
  {!needsKey && (
107
112
  <Button
108
- loading={loading}
113
+ loading={githubLoading}
109
114
  onClick={() => fetchInformation(repoName as `${string}/${string}`, key)}
110
115
  >
111
116
  Fetch information
@@ -127,7 +132,7 @@ export default function Home() {
127
132
  onChange={(e) => setKey(e.target.value)}
128
133
  />
129
134
  <Button
130
- loading={loading}
135
+ loading={githubLoading}
131
136
  onClick={() => fetchInformation(repoName as `${string}/${string}`, key)}
132
137
  >
133
138
  Fetch information
@@ -171,7 +176,7 @@ export default function Home() {
171
176
  Download video
172
177
  </a>
173
178
  ) : (
174
- <Button onClick={() => render()} loading={false}>
179
+ <Button onClick={() => render()} loading={renderLoading}>
175
180
  Render video
176
181
  </Button>
177
182
  )}
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@radix-ui/react-navigation-menu": "^1.1.4",
13
- "@revideo/player-react": "0.4.1",
13
+ "@revideo/player-react": "0.4.2",
14
14
  "class-variance-authority": "^0.7.0",
15
15
  "lucide-react": "^0.378.0",
16
16
  "next": "14.2.3",
@@ -9,15 +9,15 @@
9
9
  "render": "tsc && node dist/render.js"
10
10
  },
11
11
  "dependencies": {
12
- "@revideo/core": "0.4.1",
13
- "@revideo/2d": "0.4.1",
14
- "@revideo/renderer": "0.4.1",
15
- "@revideo/vite-plugin": "0.4.1",
16
- "@revideo/ffmpeg": "0.4.1"
12
+ "@revideo/core": "0.4.2",
13
+ "@revideo/2d": "0.4.2",
14
+ "@revideo/renderer": "0.4.2",
15
+ "@revideo/vite-plugin": "0.4.2",
16
+ "@revideo/ffmpeg": "0.4.2"
17
17
  },
18
18
  "devDependencies": {
19
- "@revideo/ui": "0.4.1",
20
- "@revideo/cli": "0.4.1",
19
+ "@revideo/ui": "0.4.2",
20
+ "@revideo/cli": "0.4.2",
21
21
  "typescript": "^5.2.2",
22
22
  "vite": "^4.5"
23
23
  }
@@ -13,7 +13,7 @@
13
13
  "audioOffset": 0
14
14
  },
15
15
  "preview": {
16
- "fps": 60,
16
+ "fps": 30,
17
17
  "resolutionScale": 1
18
18
  },
19
19
  "rendering": {
@@ -28,4 +28,4 @@
28
28
  }
29
29
  }
30
30
  }
31
- }
31
+ }
package/index.js CHANGED
@@ -108,19 +108,36 @@ async function run() {
108
108
 
109
109
  // Tell user that the process is complete
110
110
  const manager = getPackageManager();
111
- console.log(kleur.green('\n√ Scaffolding complete. You can now run:'));
111
+ console.log(
112
+ kleur.green(
113
+ '\n√ Scaffolding complete. Run the following commands to get started:',
114
+ ),
115
+ );
112
116
  if (response.path !== process.cwd()) {
113
117
  console.log(
114
118
  ` ${kleur.bold('cd')} ${path.relative(process.cwd(), response.path)}`,
115
119
  );
116
120
  }
121
+
117
122
  const boldManager = kleur.bold(manager);
118
- if (manager === 'yarn') {
119
- console.log(` ${boldManager}`);
123
+ const installCommand =
124
+ manager === 'yarn' ? ` ${boldManager}` : ` ${boldManager} install`;
125
+
126
+ if (response.starter == 'default') {
127
+ console.log(installCommand);
120
128
  console.log(` ${boldManager} start`);
121
129
  } else {
122
- console.log(` ${boldManager} install`);
123
- console.log(` ${boldManager} start`);
130
+ console.log(kleur.blue('\n√ Start the NextJS server:'));
131
+ console.log(` ${kleur.bold('cd')} next`);
132
+ console.log(installCommand);
133
+ console.log(` ${boldManager} run dev`);
134
+
135
+ console.log(
136
+ kleur.blue('\nIn another terminal, serve your revideo project:'),
137
+ );
138
+ console.log(` ${kleur.bold('cd')} revideo`);
139
+ console.log(installCommand);
140
+ console.log(` ${kleur.bold('npx')} revideo serve`);
124
141
  }
125
142
  console.log();
126
143
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revideo/create",
3
- "version": "0.4.2-red.992+05932269",
3
+ "version": "0.4.2",
4
4
  "description": "Quickly scaffold revideo projects",
5
5
  "main": "index.js",
6
6
  "author": "revideo",
@@ -20,17 +20,17 @@
20
20
  "url": "https://github.com/havenhq/revideo.git"
21
21
  },
22
22
  "devDependencies": {
23
- "@revideo/2d": "^0.4.2-red.992+05932269",
24
- "@revideo/core": "^0.4.2-red.992+05932269",
25
- "@revideo/ffmpeg": "^0.4.2-red.992+05932269",
26
- "@revideo/renderer": "^0.4.2-red.992+05932269",
27
- "@revideo/ui": "^0.4.2-red.992+05932269",
28
- "@revideo/vite-plugin": "^0.4.2-red.992+05932269"
23
+ "@revideo/2d": "0.4.2",
24
+ "@revideo/core": "0.4.2",
25
+ "@revideo/ffmpeg": "0.4.2",
26
+ "@revideo/renderer": "0.4.2",
27
+ "@revideo/ui": "0.4.2",
28
+ "@revideo/vite-plugin": "0.4.2"
29
29
  },
30
30
  "dependencies": {
31
- "@revideo/telemetry": "^0.4.2-red.992+05932269",
31
+ "@revideo/telemetry": "0.4.2",
32
32
  "minimist": "^1.2.8",
33
33
  "prompts": "^2.4.2"
34
34
  },
35
- "gitHead": "0593226922ae2b773c68648ed9c40782e72d7417"
35
+ "gitHead": "c4477ae1e4c1fff062566a493e6029728d2c7984"
36
36
  }