@remotion/cloudrun 4.0.46 → 4.0.47

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.
@@ -1,14 +1,14 @@
1
1
 
2
- > @remotion/cloudrun@4.0.45 build /Users/jonathanburger/remotion/packages/cloudrun
2
+ > @remotion/cloudrun@4.0.46 build /Users/jonathanburger/remotion/packages/cloudrun
3
3
  > tsc -d && cp src/shared/sa-permissions.json dist/shared/sa-permissions.json && pnpm run buildContainer && pnpm run tarInstaller
4
4
 
5
5
 
6
- > @remotion/cloudrun@4.0.45 buildContainer /Users/jonathanburger/remotion/packages/cloudrun
6
+ > @remotion/cloudrun@4.0.46 buildContainer /Users/jonathanburger/remotion/packages/cloudrun
7
7
  > ts-node src/admin/bundle-renderLogic.ts
8
8
 
9
9
  distribution bundled.
10
10
 
11
- > @remotion/cloudrun@4.0.45 tarInstaller /Users/jonathanburger/remotion/packages/cloudrun
11
+ > @remotion/cloudrun@4.0.46 tarInstaller /Users/jonathanburger/remotion/packages/cloudrun
12
12
  > ts-node src/admin/bundle-installer.ts
13
13
 
14
14
  Making reproducible build with gtar
package/LICENSE.md CHANGED
@@ -38,4 +38,4 @@ Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
38
38
 
39
39
  You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](/docs/support)).
40
40
 
41
- Visit [companies.remotion.dev](https://companies.remotion.dev) for pricing and to buy a license.
41
+ Visit [remotion.pro](https://www.remotion.pro) for pricing and to buy a license.
@@ -8,6 +8,16 @@ const bundler_1 = require("@remotion/bundler");
8
8
  const child_process_1 = require("child_process");
9
9
  const fs_1 = require("fs");
10
10
  const path_1 = __importDefault(require("path"));
11
+ const hasGTar = () => {
12
+ try {
13
+ const output = (0, child_process_1.execSync)('gtar --usage', {});
14
+ return output.includes('--sort');
15
+ }
16
+ catch (_a) {
17
+ return false;
18
+ }
19
+ };
20
+ exports.hasGTar = hasGTar;
11
21
  const bundleInstaller = async () => {
12
22
  const outdir = path_1.default.join(__dirname, '..', `build-installer`);
13
23
  (0, fs_1.mkdirSync)(outdir, { recursive: true });
@@ -43,13 +53,3 @@ const bundleInstaller = async () => {
43
53
  (0, fs_1.rmSync)(outdir, { recursive: true });
44
54
  };
45
55
  bundleInstaller();
46
- const hasGTar = () => {
47
- try {
48
- const output = (0, child_process_1.execSync)('gtar --usage', {});
49
- return output.includes('--sort');
50
- }
51
- catch (_a) {
52
- return false;
53
- }
54
- };
55
- exports.hasGTar = hasGTar;
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const vitest_1 = require("vitest");
4
+ const make_console_url_1 = require("../../cli/helpers/make-console-url");
5
+ const is_in_cloud_task_1 = require("../../functions/helpers/is-in-cloud-task");
6
+ (0, vitest_1.beforeEach)(() => {
7
+ delete process.env.GCLOUD_PROJECT;
8
+ delete process.env.REMOTION_GCP_PROJECT_ID;
9
+ delete process.env.K_CONFIGURATION;
10
+ });
11
+ (0, vitest_1.test)('app is in cloud tasks', () => {
12
+ process.env.GCLOUD_PROJECT = 'remotion-test-cloudtask';
13
+ process.env.K_CONFIGURATION = 'config';
14
+ const isInCloud = (0, is_in_cloud_task_1.isInCloudTask)();
15
+ (0, vitest_1.expect)(isInCloud).toBe(true);
16
+ const consoleUrl = (0, make_console_url_1.makeConsoleUrl)('asia-east1', 'test-name');
17
+ (0, vitest_1.expect)(consoleUrl).toBe('https://console.cloud.google.com/run/detail/asia-east1/test-name/logs?project=remotion-test-cloudtask');
18
+ });
19
+ (0, vitest_1.test)('app is not in cloud tasks', () => {
20
+ process.env.GCLOUD_PROJECT = 'remotion-test';
21
+ process.env.K_CONFIGURATION = 'config';
22
+ const isInCloud = (0, is_in_cloud_task_1.isInCloudTask)();
23
+ (0, vitest_1.expect)(isInCloud).toBe(true);
24
+ const consoleUrl = (0, make_console_url_1.makeConsoleUrl)('asia-east1', 'test-name');
25
+ (0, vitest_1.expect)(consoleUrl).toBe('https://console.cloud.google.com/run/detail/asia-east1/test-name/logs?project=remotion-test');
26
+ });
@@ -13,11 +13,6 @@ const getDirFiles = (entry) => {
13
13
  };
14
14
  exports.getDirFiles = getDirFiles;
15
15
  const uploadDir = async ({ bucket, localDir, onProgress, keyPrefix, toUpload, }) => {
16
- const files = await getFiles(localDir, localDir, toUpload);
17
- const progresses = {};
18
- for (const file of files) {
19
- progresses[file.name] = 0;
20
- }
21
16
  async function getFiles(directory, originalDirectory, filesToUpload) {
22
17
  const dirents = await fs_1.promises.readdir(directory, { withFileTypes: true });
23
18
  const _files = await Promise.all(dirents
@@ -48,6 +43,11 @@ const uploadDir = async ({ bucket, localDir, onProgress, keyPrefix, toUpload, })
48
43
  }));
49
44
  return _files.flat(1);
50
45
  }
46
+ const files = await getFiles(localDir, localDir, toUpload);
47
+ const progresses = {};
48
+ for (const file of files) {
49
+ progresses[file.name] = 0;
50
+ }
51
51
  const cloudStorageClient = (0, get_cloud_storage_client_1.getCloudStorageClient)();
52
52
  const uploads = files.map((file) => {
53
53
  const filePath = file.name;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeConsoleUrl = void 0;
4
+ const is_in_cloud_task_1 = require("../../functions/helpers/is-in-cloud-task");
4
5
  const makeConsoleUrl = (region, shortName) => {
5
- return `https://console.cloud.google.com/run/detail/${region}/${shortName}/logs?project=${process.env.REMOTION_GCP_PROJECT_ID}`;
6
+ return `https://console.cloud.google.com/run/detail/${region}/${shortName}/logs?project=${(0, is_in_cloud_task_1.getProjectId)()}`;
6
7
  };
7
8
  exports.makeConsoleUrl = makeConsoleUrl;
@@ -52,8 +52,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
52
52
  offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
53
53
  colorSpace: z.ZodEnum<["default", "bt709"]>;
54
54
  }, "strip", z.ZodTypeAny, {
55
- serveUrl: string;
56
55
  type: "media";
56
+ serveUrl: string;
57
57
  composition: string;
58
58
  codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
59
59
  serializedInputPropsWithCustomSchema: string;
@@ -92,8 +92,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
92
92
  outName?: string | undefined;
93
93
  privacy?: "public" | "private" | undefined;
94
94
  }, {
95
- serveUrl: string;
96
95
  type: "media";
96
+ serveUrl: string;
97
97
  composition: string;
98
98
  codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
99
99
  serializedInputPropsWithCustomSchema: string;
@@ -169,8 +169,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
169
169
  logLevel: z.ZodEnum<["verbose", "info", "warn", "error"]>;
170
170
  offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
171
171
  }, "strip", z.ZodTypeAny, {
172
- serveUrl: string;
173
172
  type: "still";
173
+ serveUrl: string;
174
174
  composition: string;
175
175
  serializedInputPropsWithCustomSchema: string;
176
176
  imageFormat: "png" | "jpeg" | "pdf" | "webp";
@@ -194,8 +194,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
194
194
  } | undefined;
195
195
  outName?: string | undefined;
196
196
  }, {
197
- serveUrl: string;
198
197
  type: "still";
198
+ serveUrl: string;
199
199
  composition: string;
200
200
  serializedInputPropsWithCustomSchema: string;
201
201
  imageFormat: "png" | "jpeg" | "pdf" | "webp";
@@ -225,13 +225,13 @@ declare const renderFailResponsePayload: z.ZodObject<{
225
225
  name: z.ZodString;
226
226
  stack: z.ZodString;
227
227
  }, "strip", z.ZodTypeAny, {
228
- message: string;
229
228
  type: "error";
229
+ message: string;
230
230
  name: string;
231
231
  stack: string;
232
232
  }, {
233
- message: string;
234
233
  type: "error";
234
+ message: string;
235
235
  name: string;
236
236
  stack: string;
237
237
  }>;
@@ -244,19 +244,19 @@ declare const renderStillOnCloudrunResponsePayload: z.ZodObject<{
244
244
  renderId: z.ZodString;
245
245
  privacy: z.ZodEnum<["public-read", "project-private"]>;
246
246
  }, "strip", z.ZodTypeAny, {
247
- bucketName: string;
248
- size: number;
249
247
  type: "success";
250
248
  privacy: "public-read" | "project-private";
251
249
  cloudStorageUri: string;
250
+ size: number;
251
+ bucketName: string;
252
252
  renderId: string;
253
253
  publicUrl?: string | null | undefined;
254
254
  }, {
255
- bucketName: string;
256
- size: number;
257
255
  type: "success";
258
256
  privacy: "public-read" | "project-private";
259
257
  cloudStorageUri: string;
258
+ size: number;
259
+ bucketName: string;
260
260
  renderId: string;
261
261
  publicUrl?: string | null | undefined;
262
262
  }>;
@@ -269,19 +269,19 @@ declare const renderMediaOnCloudrunResponsePayload: z.ZodObject<{
269
269
  renderId: z.ZodString;
270
270
  privacy: z.ZodEnum<["public-read", "project-private"]>;
271
271
  }, "strip", z.ZodTypeAny, {
272
- bucketName: string;
273
- size: number;
274
272
  type: "success";
275
273
  privacy: "public-read" | "project-private";
276
274
  cloudStorageUri: string;
275
+ size: number;
276
+ bucketName: string;
277
277
  renderId: string;
278
278
  publicUrl?: string | null | undefined;
279
279
  }, {
280
- bucketName: string;
281
- size: number;
282
280
  type: "success";
283
281
  privacy: "public-read" | "project-private";
284
282
  cloudStorageUri: string;
283
+ size: number;
284
+ bucketName: string;
285
285
  renderId: string;
286
286
  publicUrl?: string | null | undefined;
287
287
  }>;
@@ -293,15 +293,15 @@ declare const cloudRunCrashResponse: z.ZodObject<{
293
293
  requestCrashTime: z.ZodString;
294
294
  requestElapsedTimeInSeconds: z.ZodNumber;
295
295
  }, "strip", z.ZodTypeAny, {
296
- message: "Service crashed without sending a response. Check the logs in GCP console.";
297
296
  type: "crash";
297
+ message: "Service crashed without sending a response. Check the logs in GCP console.";
298
298
  cloudRunEndpoint: string;
299
299
  requestStartTime: string;
300
300
  requestCrashTime: string;
301
301
  requestElapsedTimeInSeconds: number;
302
302
  }, {
303
- message: "Service crashed without sending a response. Check the logs in GCP console.";
304
303
  type: "crash";
304
+ message: "Service crashed without sending a response. Check the logs in GCP console.";
305
305
  cloudRunEndpoint: string;
306
306
  requestStartTime: string;
307
307
  requestCrashTime: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cloudrun",
3
- "version": "4.0.46",
3
+ "version": "4.0.47",
4
4
  "description": "GCP Cloud Run alternative to lambda rendering",
5
5
  "main": "dist/index.js",
6
6
  "dependencies": {
@@ -12,13 +12,13 @@
12
12
  "@google-cloud/logging": "^10.5.0",
13
13
  "google-auth-library": "^8.7.0",
14
14
  "zod": "^3.22.3",
15
- "@remotion/bundler": "4.0.46",
16
- "@remotion/cli": "4.0.46",
17
- "remotion": "4.0.46",
18
- "@remotion/renderer": "4.0.46"
15
+ "@remotion/bundler": "4.0.47",
16
+ "@remotion/cli": "4.0.47",
17
+ "remotion": "4.0.47",
18
+ "@remotion/renderer": "4.0.47"
19
19
  },
20
20
  "devDependencies": {
21
- "@jonny/eslint-config": "3.0.266",
21
+ "@jonny/eslint-config": "3.0.276",
22
22
  "@types/node": "^18.11.2",
23
23
  "@types/minimist": "1.2.2",
24
24
  "eslint": "8.42.0",
@@ -26,7 +26,7 @@
26
26
  "prettier-plugin-organize-imports": "^3.2.2",
27
27
  "ts-node": "^10.8.0",
28
28
  "vitest": "0.24.3",
29
- "@remotion/compositor-linux-x64-gnu": "4.0.46"
29
+ "@remotion/compositor-linux-x64-gnu": "4.0.47"
30
30
  },
31
31
  "exports": {
32
32
  "./package.json": "./package.json",