@remotion/cloudrun 4.0.226 → 4.0.228

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.
@@ -0,0 +1,31 @@
1
+
2
+ 
3
+ > @remotion/cloudrun@4.0.226 lint /Users/jonathanburger/remotion/packages/cloudrun
4
+ > eslint src
5
+
6
+ 
7
+ /Users/jonathanburger/remotion/packages/cloudrun/src/api/check-if-service-exists.ts
8
+  59:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
9
+ 
10
+ /Users/jonathanburger/remotion/packages/cloudrun/src/api/get-sites.ts
11
+  60:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
12
+  64:40 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
13
+ 
14
+ /Users/jonathanburger/remotion/packages/cloudrun/src/api/render-media-on-cloudrun.ts
15
+  209:3 warning Unexpected 'todo' comment: 'TODO: Add any sort of type safety' no-warning-comments
16
+  218:17 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
17
+ 
18
+ /Users/jonathanburger/remotion/packages/cloudrun/src/api/render-still-on-cloudrun.ts
19
+  161:17 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
20
+ 
21
+ /Users/jonathanburger/remotion/packages/cloudrun/src/cli/commands/render/helpers/renderArgsCheck.ts
22
+  79:4 warning Unexpected 'todo' comment: 'TODO: Log if there is an incompatible...' no-warning-comments
23
+ 
24
+ /Users/jonathanburger/remotion/packages/cloudrun/src/cli/commands/render/index.ts
25
+  181:2 warning Unexpected 'todo' comment: 'Todo: Check cloudRunUrl is valid, as the...' no-warning-comments
26
+ 
27
+ /Users/jonathanburger/remotion/packages/cloudrun/src/cli/commands/still.ts
28
+  162:2 warning Unexpected 'todo' comment: 'Todo: Check cloudRunUrl is valid, as the...' no-warning-comments
29
+ 
30
+ ✖ 9 problems (0 errors, 9 warnings)
31
+ 
@@ -1,7 +1,6 @@
1
1
 
2
2
  
3
- > @remotion/cloudrun@4.0.225 make /Users/jonathanburger/remotion/packages/cloudrun
4
- > bun build.ts
3
+ > @remotion/cloudrun@4.0.227 make /Users/jonathanburger/remotion/packages/cloudrun
4
+ > tsc -d && bun build.ts
5
5
 
6
- distribution bundled.
7
- Making reproducible build with gtar
6
+ [14.55ms] Made reproducible build with gtar
@@ -1,23 +1,24 @@
1
1
 
2
- > @remotion/cloudrun@4.0.217 test /Users/jonathanburger/remotion/packages/cloudrun
2
+ 
3
+ > @remotion/cloudrun@4.0.226 test /Users/jonathanburger/remotion/packages/cloudrun
3
4
  > bun test src
4
5
 
5
6
  bun test v1.1.29 (6d43b366)
6
7
  
7
8
  src/api/test/service-names.test.ts:
8
- ✓ Parse service names [0.52ms]
9
+ ✓ Parse service names [0.31ms]
9
10
  
10
11
  src/api/test/running-in-what-server.test.ts:
11
12
  ✓ is running in cloud tasks = true
12
13
  ✓ is running in cloud tasks = false
13
14
  ✓ which project Id = remotion-test
14
- ✓ which project Id = remotion-test-cloudtask [0.01ms]
15
+ ✓ which project Id = remotion-test-cloudtask
15
16
  
16
17
  src/api/test/make-console.test.ts:
17
- ✓ app is in cloud tasks
18
+ ✓ app is in cloud tasks [0.08ms]
18
19
  ✓ app is not in cloud tasks [0.01ms]
19
20
 
20
21
   7 pass
21
22
   0 fail
22
23
  11 expect() calls
23
- Ran 7 tests across 3 files. [48.00ms]
24
+ Ran 7 tests across 3 files. [33.00ms]
@@ -37,18 +37,20 @@ const bundleInstaller = async () => {
37
37
  const tarArgs = `-cf ../gcpInstaller/gcpInstaller.tar -C . ${path_1.default.relative(outdir, bundlemjs)} ${path_1.default.relative(outdir, tfoutfile)} ${path_1.default.relative(outdir, sapermissionsoutfile)}`;
38
38
  // A reproducible build will lead to no pending change in Git
39
39
  if ((0, exports.hasGTar)()) {
40
- console.log('Making reproducible build with gtar');
40
+ console.time('Made reproducible build with gtar');
41
41
  (0, child_process_1.execSync)(`gtar --mtime='2023-01-01 00:00Z' --sort=name --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime ${tarArgs}`, {
42
42
  stdio: 'inherit',
43
43
  cwd: outdir,
44
44
  });
45
+ console.timeEnd('Made reproducible build with gtar');
45
46
  }
46
47
  else {
47
- console.log('Making non-reproducible build with tar.');
48
+ console.time('Made non-reproducible build with tar.');
48
49
  (0, child_process_1.execSync)(`tar ${tarArgs}`, {
49
50
  stdio: 'inherit',
50
51
  cwd: outdir,
51
52
  });
53
+ console.timeEnd('Made non-reproducible build with tar.');
52
54
  }
53
55
  (0, fs_1.rmSync)(outdir, { recursive: true });
54
56
  };
@@ -38,6 +38,5 @@ const bundleRenderLogic = async () => {
38
38
  fs_1.default.cpSync(path_1.default.join(compositor_linux_x64_gnu_1.dir, file), path_1.default.join(outdir, file));
39
39
  }
40
40
  fs_1.default.cpSync(path_1.default.join(__dirname, '..', '..', '..', 'renderer', 'node_modules', 'source-map', 'lib', 'mappings.wasm'), `${outdir}/mappings.wasm`);
41
- console.log('distribution bundled.');
42
41
  };
43
42
  exports.bundleRenderLogic = bundleRenderLogic;
@@ -86,7 +86,7 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
86
86
  parsedData = JSON.parse(accumulatedChunks.trim());
87
87
  accumulatedChunks = ''; // Clear the buffer after successful parsing.
88
88
  }
89
- catch (e) {
89
+ catch (_a) {
90
90
  // eslint-disable-next-line no-console
91
91
  console.error('Could not parse progress: ', accumulatedChunks.trim());
92
92
  // If parsing fails, it means we don't have a complete JSON string yet.
@@ -91,7 +91,7 @@ const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region,
91
91
  parsedData = JSON.parse(accumulatedChunks.trim());
92
92
  accumulatedChunks = ''; // Clear the buffer after successful parsing.
93
93
  }
94
- catch (e) {
94
+ catch (_a) {
95
95
  // If parsing fails, it means we don't have a complete JSON string yet.
96
96
  // We'll wait for more chunks.
97
97
  return;
@@ -16,7 +16,7 @@ const quit_1 = require("../../helpers/quit");
16
16
  const log_1 = require("../../log");
17
17
  exports.CLOUD_RUN_DEPLOY_SUBCOMMAND = 'deploy';
18
18
  const cloudRunDeploySubcommand = async (logLevel) => {
19
- var _a, _b, _c, _d, _e, _f, _g, _h;
19
+ var _a, _b, _c, _d, _e, _f;
20
20
  const region = (0, get_gcp_region_1.getGcpRegion)();
21
21
  const projectID = process.env.REMOTION_GCP_PROJECT_ID;
22
22
  const memoryLimit = String((_a = args_1.parsedCloudrunCli.memoryLimit) !== null && _a !== void 0 ? _a : '2Gi');
@@ -59,8 +59,8 @@ ${[
59
59
  memoryLimit: memoryLimit !== null && memoryLimit !== void 0 ? memoryLimit : '2Gi',
60
60
  cpuLimit: cpuLimit !== null && cpuLimit !== void 0 ? cpuLimit : '1.0',
61
61
  timeoutSeconds: timeoutSeconds !== null && timeoutSeconds !== void 0 ? timeoutSeconds : constants_1.DEFAULT_TIMEOUT,
62
- minInstances: (_g = Number(minInstances)) !== null && _g !== void 0 ? _g : constants_1.DEFAULT_MIN_INSTANCES,
63
- maxInstances: (_h = Number(maxInstances)) !== null && _h !== void 0 ? _h : constants_1.DEFAULT_MAX_INSTANCES,
62
+ minInstances: Number(minInstances),
63
+ maxInstances: Number(maxInstances),
64
64
  projectID,
65
65
  region,
66
66
  logLevel,
@@ -2,4 +2,4 @@ import type { LogLevel } from '@remotion/renderer';
2
2
  import type { Site } from '../../../api/get-sites';
3
3
  export declare const SITES_COMMAND = "sites";
4
4
  export declare const displaySiteInfo: (site: Site) => string;
5
- export declare const sitesCommand: (args: string[], remotionRoot: string, logLevel: LogLevel) => Promise<void> | undefined;
5
+ export declare const sitesCommand: (args: string[], remotionRoot: string, logLevel: LogLevel) => Promise<boolean | void> | undefined;
@@ -1,3 +1,3 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
2
  export declare const SITES_LS_SUBCOMMAND = "ls";
3
- export declare const sitesLsSubcommand: (logLevel: LogLevel) => Promise<void>;
3
+ export declare const sitesLsSubcommand: (logLevel: LogLevel) => Promise<boolean | void>;
package/dist/cli/log.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  export declare const Log: {
2
2
  verbose: (options: import("@remotion/renderer").LogOptions & {
3
3
  tag?: string;
4
- }, ...args: Parameters<typeof console.log>) => void;
5
- info: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => void;
6
- warn: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => void;
4
+ }, ...args: Parameters<typeof console.log>) => boolean | void;
5
+ info: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
6
+ warn: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
7
7
  error: (options: import("@remotion/renderer").LogOptions & {
8
8
  tag?: string;
9
- }, ...args: Parameters<typeof console.log>) => void;
9
+ }, ...args: Parameters<typeof console.log>) => boolean | void;
10
10
  };
@@ -92,12 +92,14 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
92
92
  metadata: zod_1.z.record(zod_1.z.string()).optional().nullable(),
93
93
  }),
94
94
  ]);
95
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
95
96
  const renderFailResponsePayload = zod_1.z.object({
96
97
  type: zod_1.z.literal('error'),
97
98
  message: zod_1.z.string(),
98
99
  name: zod_1.z.string(),
99
100
  stack: zod_1.z.string(),
100
101
  });
102
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
101
103
  const renderStillOnCloudrunResponsePayload = zod_1.z.object({
102
104
  type: zod_1.z.literal('success'),
103
105
  publicUrl: zod_1.z.string().optional().nullable(),
@@ -107,6 +109,7 @@ const renderStillOnCloudrunResponsePayload = zod_1.z.object({
107
109
  renderId: zod_1.z.string(),
108
110
  privacy: zod_1.z.enum(['public-read', 'project-private']),
109
111
  });
112
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
110
113
  const renderMediaOnCloudrunResponsePayload = zod_1.z.object({
111
114
  type: zod_1.z.literal('success'),
112
115
  publicUrl: zod_1.z.string().optional().nullable(),
@@ -116,6 +119,7 @@ const renderMediaOnCloudrunResponsePayload = zod_1.z.object({
116
119
  renderId: zod_1.z.string(),
117
120
  privacy: zod_1.z.enum(['public-read', 'project-private']),
118
121
  });
122
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
119
123
  const cloudRunCrashResponse = zod_1.z.object({
120
124
  type: zod_1.z.literal('crash'),
121
125
  cloudRunEndpoint: zod_1.z.string(),
@@ -114,6 +114,7 @@ const renderMediaSingleThread = async (body, res) => {
114
114
  },
115
115
  onArtifact,
116
116
  metadata: (_m = body.metadata) !== null && _m !== void 0 ? _m : null,
117
+ hardwareAcceleration: 'disable',
117
118
  });
118
119
  const storage = new storage_1.Storage();
119
120
  const publicUpload = body.privacy === 'public' || !body.privacy;
@@ -42,7 +42,6 @@ async function readDirectory({ dir, etags, originalDir, }) {
42
42
  };
43
43
  continue;
44
44
  }
45
- // eslint-disable-next-line no-lonely-if
46
45
  if (fs.lstatSync(filePath).isSymbolicLink()) {
47
46
  const realPath = fs.realpathSync(filePath);
48
47
  etags[path.relative(originalDir, filePath)] =
@@ -0,0 +1,39 @@
1
+ import {remotionFlatConfig} from '@remotion/eslint-config-internal';
2
+
3
+ const config = remotionFlatConfig({react: false});
4
+
5
+ export default [
6
+ {
7
+ ...config,
8
+ ignores: ['./src/gcpInstaller/**', 'src/admin/**'],
9
+ rules: {
10
+ ...config.rules,
11
+ 'no-console': 'error',
12
+ 'no-restricted-imports': [
13
+ 'error',
14
+ {
15
+ patterns: [
16
+ '@remotion/*/src/*',
17
+ '@remotion/renderer/*/src/*',
18
+ '@remotion/cli/*/src/*',
19
+ 'remotion/src/*',
20
+ ],
21
+ },
22
+ ],
23
+ },
24
+ },
25
+ {
26
+ files: ['./src/gcpInstaller/**'],
27
+ rules: {
28
+ ...config.rules,
29
+ 'no-console': 'off',
30
+ },
31
+ },
32
+ {
33
+ files: ['src/admin/**'],
34
+ rules: {
35
+ ...config.rules,
36
+ 'no-console': 'off',
37
+ },
38
+ },
39
+ ];
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/cloudrun"
4
4
  },
5
5
  "name": "@remotion/cloudrun",
6
- "version": "4.0.226",
6
+ "version": "4.0.228",
7
7
  "description": "Render Remotion videos on Google Cloud Run",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
@@ -16,14 +16,16 @@
16
16
  "@google-cloud/logging": "^11.1.0",
17
17
  "google-auth-library": "^8.7.0",
18
18
  "zod": "3.22.3",
19
- "@remotion/bundler": "4.0.226",
20
- "@remotion/cli": "4.0.226",
21
- "remotion": "4.0.226",
22
- "@remotion/renderer": "4.0.226"
19
+ "@remotion/bundler": "4.0.228",
20
+ "@remotion/cli": "4.0.228",
21
+ "@remotion/renderer": "4.0.228",
22
+ "remotion": "4.0.228"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/minimist": "1.2.2",
26
- "@remotion/compositor-linux-x64-gnu": "4.0.226"
26
+ "eslint": "9.14.0",
27
+ "@remotion/compositor-linux-x64-gnu": "4.0.228",
28
+ "@remotion/eslint-config-internal": "4.0.228"
27
29
  },
28
30
  "exports": {
29
31
  "./package.json": "./package.json",
@@ -48,10 +50,10 @@
48
50
  },
49
51
  "homepage": "https://www.remotion.dev/docs/cloudrun",
50
52
  "scripts": {
51
- "make": "bun build.ts",
53
+ "make": "tsc -d && bun build.ts",
52
54
  "buildContainer": "bun src/admin/bundle-renderLogic.ts",
53
55
  "tarInstaller": "bun src/admin/bundle-installer.ts",
54
- "lint": "eslint src --ext ts,tsx",
56
+ "lint": "eslint src",
55
57
  "test": "bun test src"
56
58
  }
57
59
  }