@remotion/cloudrun 4.0.177 → 4.0.179

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,8 +1,6 @@
1
1
 
2
- > @remotion/cloudrun@4.0.176 build /Users/jonathanburger/remotion/packages/cloudrun
2
+ > @remotion/cloudrun@4.0.178 build /Users/jonathanburger/remotion/packages/cloudrun
3
3
  > bun build.ts
4
4
 
5
- $ ts-node src/admin/bundle-renderLogic.ts
6
5
  distribution bundled.
7
- $ ts-node src/admin/bundle-installer.ts
8
6
  Making reproducible build with gtar
package/build.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import {$} from 'bun';
2
+ import {bundleInstaller} from './src/admin/bundle-installer';
3
+ import {bundleRenderLogic} from './src/admin/bundle-renderLogic';
2
4
 
3
5
  await $`bun x tsc -d`;
4
6
 
5
7
  const permissions = Bun.file('src/shared/sa-permissions.json');
6
8
  await Bun.write('dist/shared/sa-permissions.json', permissions);
7
9
 
8
- await $`bun run buildContainer`;
9
- await $`bun run tarInstaller`;
10
+ await bundleRenderLogic();
11
+ await bundleInstaller();
@@ -1 +1,2 @@
1
1
  export declare const hasGTar: () => boolean;
2
+ export declare const bundleInstaller: () => Promise<void>;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.hasGTar = void 0;
6
+ exports.bundleInstaller = exports.hasGTar = void 0;
7
7
  const bundler_1 = require("@remotion/bundler");
8
8
  const child_process_1 = require("child_process");
9
9
  const fs_1 = require("fs");
@@ -52,4 +52,4 @@ const bundleInstaller = async () => {
52
52
  }
53
53
  (0, fs_1.rmSync)(outdir, { recursive: true });
54
54
  };
55
- bundleInstaller();
55
+ exports.bundleInstaller = bundleInstaller;
@@ -1 +1 @@
1
- export {};
1
+ export declare const bundleRenderLogic: () => Promise<void>;
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.bundleRenderLogic = void 0;
6
7
  const bundler_1 = require("@remotion/bundler");
7
8
  const compositor_linux_x64_gnu_1 = require("@remotion/compositor-linux-x64-gnu");
8
9
  const fs_1 = __importDefault(require("fs"));
@@ -39,4 +40,4 @@ const bundleRenderLogic = async () => {
39
40
  fs_1.default.cpSync(path_1.default.join(__dirname, '..', '..', '..', 'renderer', 'node_modules', 'source-map', 'lib', 'mappings.wasm'), `${outdir}/mappings.wasm`);
40
41
  console.log('distribution bundled.');
41
42
  };
42
- bundleRenderLogic();
43
+ exports.bundleRenderLogic = bundleRenderLogic;
@@ -1,26 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const vitest_1 = require("vitest");
3
+ const bun_test_1 = require("bun:test");
4
4
  const make_console_url_1 = require("../../cli/helpers/make-console-url");
5
5
  const is_in_cloud_task_1 = require("../../functions/helpers/is-in-cloud-task");
6
- (0, vitest_1.beforeEach)(() => {
6
+ (0, bun_test_1.beforeEach)(() => {
7
7
  delete process.env.GCLOUD_PROJECT;
8
8
  delete process.env.REMOTION_GCP_PROJECT_ID;
9
9
  delete process.env.K_CONFIGURATION;
10
10
  });
11
- (0, vitest_1.test)('app is in cloud tasks', () => {
11
+ (0, bun_test_1.test)('app is in cloud tasks', () => {
12
12
  process.env.GCLOUD_PROJECT = 'remotion-test-cloudtask';
13
13
  process.env.K_CONFIGURATION = 'config';
14
14
  const isInCloud = (0, is_in_cloud_task_1.isInCloudTask)();
15
- (0, vitest_1.expect)(isInCloud).toBe(true);
15
+ (0, bun_test_1.expect)(isInCloud).toBe(true);
16
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');
17
+ (0, bun_test_1.expect)(consoleUrl).toBe('https://console.cloud.google.com/run/detail/asia-east1/test-name/logs?project=remotion-test-cloudtask');
18
18
  });
19
- (0, vitest_1.test)('app is not in cloud tasks', () => {
19
+ (0, bun_test_1.test)('app is not in cloud tasks', () => {
20
20
  process.env.GCLOUD_PROJECT = 'remotion-test';
21
21
  process.env.K_CONFIGURATION = 'config';
22
22
  const isInCloud = (0, is_in_cloud_task_1.isInCloudTask)();
23
- (0, vitest_1.expect)(isInCloud).toBe(true);
23
+ (0, bun_test_1.expect)(isInCloud).toBe(true);
24
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');
25
+ (0, bun_test_1.expect)(consoleUrl).toBe('https://console.cloud.google.com/run/detail/asia-east1/test-name/logs?project=remotion-test');
26
26
  });
@@ -1,31 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const vitest_1 = require("vitest");
3
+ const bun_test_1 = require("bun:test");
4
4
  const is_in_cloud_task_1 = require("../../functions/helpers/is-in-cloud-task");
5
- (0, vitest_1.beforeEach)(() => {
5
+ (0, bun_test_1.beforeEach)(() => {
6
6
  delete process.env.GCLOUD_PROJECT;
7
7
  delete process.env.REMOTION_GCP_PROJECT_ID;
8
8
  delete process.env.K_CONFIGURATION;
9
9
  });
10
- (0, vitest_1.test)('is running in cloud tasks = true', () => {
10
+ (0, bun_test_1.test)('is running in cloud tasks = true', () => {
11
11
  process.env.GCLOUD_PROJECT = 'remotion-test-cloudtask';
12
12
  process.env.K_CONFIGURATION = 'config';
13
13
  const isInCloud = (0, is_in_cloud_task_1.isInCloudTask)();
14
- (0, vitest_1.expect)(isInCloud).toBe(true);
14
+ (0, bun_test_1.expect)(isInCloud).toBe(true);
15
15
  });
16
- (0, vitest_1.test)('is running in cloud tasks = false', () => {
16
+ (0, bun_test_1.test)('is running in cloud tasks = false', () => {
17
17
  process.env.REMOTION_GCP_PROJECT_ID = 'remotion-test-cloudtask';
18
18
  const isInCloud = (0, is_in_cloud_task_1.isInCloudTask)();
19
- (0, vitest_1.expect)(isInCloud).toBe(false);
19
+ (0, bun_test_1.expect)(isInCloud).toBe(false);
20
20
  });
21
- (0, vitest_1.test)('which project Id = remotion-test', () => {
21
+ (0, bun_test_1.test)('which project Id = remotion-test', () => {
22
22
  process.env.REMOTION_GCP_PROJECT_ID = 'remotion-test';
23
23
  const projectId = (0, is_in_cloud_task_1.getProjectId)();
24
- (0, vitest_1.expect)(projectId).toBe('remotion-test');
24
+ (0, bun_test_1.expect)(projectId).toBe('remotion-test');
25
25
  });
26
- (0, vitest_1.test)('which project Id = remotion-test-cloudtask', () => {
26
+ (0, bun_test_1.test)('which project Id = remotion-test-cloudtask', () => {
27
27
  process.env.GCLOUD_PROJECT = 'remotion-test-cloudtask';
28
28
  process.env.K_CONFIGURATION = 'config';
29
29
  const projectId = (0, is_in_cloud_task_1.getProjectId)();
30
- (0, vitest_1.expect)(projectId).toBe('remotion-test-cloudtask');
30
+ (0, bun_test_1.expect)(projectId).toBe('remotion-test-cloudtask');
31
31
  });
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const bun_test_1 = require("bun:test");
3
4
  const remotion_1 = require("remotion");
4
- const vitest_1 = require("vitest");
5
5
  const parse_service_name_1 = require("../helpers/parse-service-name");
6
6
  const speculate_service_name_1 = require("../speculate-service-name");
7
7
  const dashedVersion = remotion_1.VERSION.replace(/\./g, '-');
8
8
  const region = 'asia-east1';
9
- (0, vitest_1.test)('Parse service names', () => {
9
+ (0, bun_test_1.test)('Parse service names', () => {
10
10
  process.env.REMOTION_GCP_PROJECT_ID = 'remotion-test-project';
11
11
  const shortServiceName = (0, speculate_service_name_1.speculateServiceName)({
12
12
  cpuLimit: '8.0',
@@ -14,16 +14,16 @@ const region = 'asia-east1';
14
14
  // max timeout
15
15
  timeoutSeconds: 3600,
16
16
  });
17
- (0, vitest_1.expect)(shortServiceName).toBe(`remotion-${remotion_1.VERSION.replace(/\./g, '-')}-mem100000k-cpu8-0-t3600`);
17
+ (0, bun_test_1.expect)(shortServiceName).toBe(`remotion-${remotion_1.VERSION.replace(/\./g, '-')}-mem100000k-cpu8-0-t3600`);
18
18
  const fullServiceName = `${(0, parse_service_name_1.getGcpParent)(region)}/services/${shortServiceName}`;
19
19
  process.env.REMOTION_GCP_PROJECT_ID = 'remotion-test-project';
20
20
  const parsed = (0, parse_service_name_1.parseServiceName)(fullServiceName, region);
21
- (0, vitest_1.expect)(parsed).toEqual({
21
+ (0, bun_test_1.expect)(parsed).toEqual({
22
22
  consoleUrl: `https://console.cloud.google.com/run/detail/asia-east1/remotion-${dashedVersion}-mem100000k-cpu8-0-t3600/logs?project=remotion-test-project`,
23
23
  region: 'asia-east1',
24
24
  remotionVersion: remotion_1.VERSION.replace(/\./g, '-'),
25
25
  serviceName: `remotion-${dashedVersion}-mem100000k-cpu8-0-t3600`,
26
26
  });
27
27
  // Max length of service name is 49 characters, asking for less in case the version string gets longer
28
- (0, vitest_1.expect)(shortServiceName.length).toBeLessThanOrEqual(47);
28
+ (0, bun_test_1.expect)(shortServiceName.length).toBeLessThanOrEqual(47);
29
29
  });
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
+ "repository": {
3
+ "url": "https://github.com/remotion-dev/remotion/tree/main/packages/cloudrun"
4
+ },
2
5
  "name": "@remotion/cloudrun",
3
- "version": "4.0.177",
4
- "description": "GCP Cloud Run alternative to lambda rendering",
6
+ "version": "4.0.179",
7
+ "description": "Render Remotion videos on Google Cloud Run",
5
8
  "main": "dist/index.js",
9
+ "sideEffects": false,
6
10
  "dependencies": {
7
11
  "@google-cloud/artifact-registry": "^3.4.0",
8
12
  "@google-cloud/functions-framework": "^3.4.0",
@@ -12,21 +16,14 @@
12
16
  "@google-cloud/logging": "^11.1.0",
13
17
  "google-auth-library": "^8.7.0",
14
18
  "zod": "3.22.3",
15
- "@remotion/bundler": "4.0.177",
16
- "@remotion/cli": "4.0.177",
17
- "@remotion/renderer": "4.0.177",
18
- "remotion": "4.0.177"
19
+ "@remotion/cli": "4.0.179",
20
+ "@remotion/bundler": "4.0.179",
21
+ "@remotion/renderer": "4.0.179",
22
+ "remotion": "4.0.179"
19
23
  },
20
24
  "devDependencies": {
21
- "@jonny/eslint-config": "3.0.281",
22
- "@types/node": "^18.11.2",
23
25
  "@types/minimist": "1.2.2",
24
- "eslint": "8.56.0",
25
- "prettier": "3.2.5",
26
- "prettier-plugin-organize-imports": "^3.2.4",
27
- "ts-node": "10.9.2",
28
- "vitest": "0.31.1",
29
- "@remotion/compositor-linux-x64-gnu": "4.0.177"
26
+ "@remotion/compositor-linux-x64-gnu": "4.0.179"
30
27
  },
31
28
  "exports": {
32
29
  "./package.json": "./package.json",
@@ -49,11 +46,12 @@
49
46
  ]
50
47
  }
51
48
  },
49
+ "homepage": "https://www.remotion.dev/docs/cloudrun",
52
50
  "scripts": {
53
51
  "build": "bun build.ts",
54
- "buildContainer": "ts-node src/admin/bundle-renderLogic.ts",
55
- "tarInstaller": "ts-node src/admin/bundle-installer.ts",
52
+ "buildContainer": "bun src/admin/bundle-renderLogic.ts",
53
+ "tarInstaller": "bun src/admin/bundle-installer.ts",
56
54
  "lint": "eslint src --ext ts,tsx",
57
- "test": "vitest --run"
55
+ "test": "bun test src"
58
56
  }
59
57
  }
package/readme.md CHANGED
@@ -1,3 +1,18 @@
1
1
  # @remotion/cloudrun
2
-
3
- This package provides Node.JS APIs and a CLI for rendering Remotion videos on GCP Cloud Run. See https://remotion.dev/docs/cloudrun for documentation.
2
+
3
+ Render Remotion videos on Google Cloud Run
4
+
5
+ [![NPM Downloads](https://img.shields.io/npm/dm/@remotion/cloudrun.svg?style=flat&color=black&label=Downloads)](https://npmcharts.com/compare/@remotion/cloudrun?minimal=true)
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @remotion/cloudrun --save-exact
11
+ ```
12
+
13
+ When installing a Remotion package, make sure to align the version of all `remotion` and `@remotion/*` packages to the same version.
14
+ Remove the `^` character from the version number to use the exact version.
15
+
16
+ ## Usage
17
+
18
+ See the [documentation](https://www.remotion.dev/docs/cloudrun) for more information.
@@ -1,20 +0,0 @@
1
-
2
- > @remotion/cloudrun@4.0.163 test /Users/jonathanburger/remotion/packages/cloudrun
3
- > vitest --run
4
-
5
-
6
-  RUN  v0.31.1 /Users/jonathanburger/remotion/packages/cloudrun
7
-
8
- [?25l ✓ src/api/test/service-names.test.ts (1)
9
- ✓ src/api/test/make-console.test.ts (2)
10
- ✓ src/api/test/running-in-what-server.test.ts (4)
11
-  ✓ src/api/test/service-names.test.ts (1)
12
- ✓ src/api/test/make-console.test.ts (2)
13
- ✓ src/api/test/running-in-what-server.test.ts (4)
14
-
15
-  Test Files  3 passed (3)
16
-  Tests  7 passed (7)
17
-  Start at  19:38:46
18
-  Duration  887ms (transform 278ms, setup 0ms, collect 429ms, tests 5ms, environment 0ms, prepare 109ms)
19
-
20
- [?25h