@remotion/cloudrun 4.0.220 → 4.0.222
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.
- package/.turbo/turbo-make.log +2 -1
- package/dist/api/deploy-service.d.ts +3 -1
- package/dist/api/deploy-service.js +4 -2
- package/dist/api/helpers/construct-service-deploy-request.d.ts +2 -1
- package/dist/api/helpers/construct-service-deploy-request.js +3 -1
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/commands/services/deploy.js +6 -4
- package/package.json +6 -6
package/.turbo/turbo-make.log
CHANGED
|
@@ -10,6 +10,7 @@ type InternalDeployServiceInput = {
|
|
|
10
10
|
region: string;
|
|
11
11
|
logLevel: LogLevel;
|
|
12
12
|
indent: boolean;
|
|
13
|
+
onlyAllocateCpuDuringRequestProcessing: boolean;
|
|
13
14
|
};
|
|
14
15
|
export type DeployServiceInput = {
|
|
15
16
|
performImageVersionValidation?: boolean;
|
|
@@ -21,6 +22,7 @@ export type DeployServiceInput = {
|
|
|
21
22
|
logLevel?: LogLevel;
|
|
22
23
|
projectID: string;
|
|
23
24
|
region: string;
|
|
25
|
+
onlyAllocateCpuDuringRequestProcessing?: boolean;
|
|
24
26
|
};
|
|
25
27
|
export type DeployServiceOutput = {
|
|
26
28
|
fullName: string | null | undefined;
|
|
@@ -40,5 +42,5 @@ export declare const internalDeployService: (args_0: InternalDeployServiceInput)
|
|
|
40
42
|
* @param params.region GCP region to deploy the Cloud Run service to.
|
|
41
43
|
* @returns {Promise<DeployServiceOutput>} See documentation for detailed structure
|
|
42
44
|
*/
|
|
43
|
-
export declare const deployService: ({ performImageVersionValidation, memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, projectID, region, logLevel, }: DeployServiceInput) => Promise<DeployServiceOutput>;
|
|
45
|
+
export declare const deployService: ({ performImageVersionValidation, memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, projectID, region, logLevel, onlyAllocateCpuDuringRequestProcessing, }: DeployServiceInput) => Promise<DeployServiceOutput>;
|
|
44
46
|
export {};
|
|
@@ -10,7 +10,7 @@ const validate_project_id_1 = require("../shared/validate-project-id");
|
|
|
10
10
|
const check_if_service_exists_1 = require("./check-if-service-exists");
|
|
11
11
|
const construct_service_deploy_request_1 = require("./helpers/construct-service-deploy-request");
|
|
12
12
|
const get_cloud_run_client_1 = require("./helpers/get-cloud-run-client");
|
|
13
|
-
const deployServiceRaw = async ({ performImageVersionValidation = true, memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, projectID, region, logLevel, }) => {
|
|
13
|
+
const deployServiceRaw = async ({ performImageVersionValidation = true, memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, projectID, region, logLevel, onlyAllocateCpuDuringRequestProcessing, }) => {
|
|
14
14
|
(0, validate_gcp_region_1.validateGcpRegion)(region);
|
|
15
15
|
(0, validate_project_id_1.validateProjectID)(projectID);
|
|
16
16
|
if (performImageVersionValidation) {
|
|
@@ -48,6 +48,7 @@ const deployServiceRaw = async ({ performImageVersionValidation = true, memoryLi
|
|
|
48
48
|
timeoutSeconds,
|
|
49
49
|
minInstances,
|
|
50
50
|
maxInstances,
|
|
51
|
+
onlyAllocateCpuDuringRequestProcessing,
|
|
51
52
|
}),
|
|
52
53
|
},
|
|
53
54
|
serviceId: serviceName,
|
|
@@ -74,7 +75,7 @@ exports.internalDeployService = (0, error_handling_1.wrapWithErrorHandling)(depl
|
|
|
74
75
|
* @param params.region GCP region to deploy the Cloud Run service to.
|
|
75
76
|
* @returns {Promise<DeployServiceOutput>} See documentation for detailed structure
|
|
76
77
|
*/
|
|
77
|
-
const deployService = ({ performImageVersionValidation = true, memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, projectID, region, logLevel, }) => {
|
|
78
|
+
const deployService = ({ performImageVersionValidation = true, memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, projectID, region, logLevel, onlyAllocateCpuDuringRequestProcessing, }) => {
|
|
78
79
|
return (0, exports.internalDeployService)({
|
|
79
80
|
performImageVersionValidation,
|
|
80
81
|
memoryLimit: memoryLimit !== null && memoryLimit !== void 0 ? memoryLimit : '2Gi',
|
|
@@ -86,6 +87,7 @@ const deployService = ({ performImageVersionValidation = true, memoryLimit, cpuL
|
|
|
86
87
|
region,
|
|
87
88
|
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
88
89
|
indent: false,
|
|
90
|
+
onlyAllocateCpuDuringRequestProcessing: onlyAllocateCpuDuringRequestProcessing !== null && onlyAllocateCpuDuringRequestProcessing !== void 0 ? onlyAllocateCpuDuringRequestProcessing : false,
|
|
89
91
|
});
|
|
90
92
|
};
|
|
91
93
|
exports.deployService = deployService;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { google } from '@google-cloud/run/build/protos/protos';
|
|
2
|
-
export declare const constructServiceTemplate: ({ memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, }: {
|
|
2
|
+
export declare const constructServiceTemplate: ({ memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, onlyAllocateCpuDuringRequestProcessing, }: {
|
|
3
3
|
memoryLimit: string;
|
|
4
4
|
cpuLimit: string;
|
|
5
5
|
timeoutSeconds: number;
|
|
6
6
|
minInstances: number;
|
|
7
7
|
maxInstances: number;
|
|
8
|
+
onlyAllocateCpuDuringRequestProcessing: boolean;
|
|
8
9
|
}) => google.cloud.run.v2.IRevisionTemplate;
|
|
@@ -9,7 +9,7 @@ var ExecutionEnvironment;
|
|
|
9
9
|
ExecutionEnvironment[ExecutionEnvironment["EXECUTION_ENVIRONMENT_GEN1"] = 1] = "EXECUTION_ENVIRONMENT_GEN1";
|
|
10
10
|
ExecutionEnvironment[ExecutionEnvironment["EXECUTION_ENVIRONMENT_GEN2"] = 2] = "EXECUTION_ENVIRONMENT_GEN2";
|
|
11
11
|
})(ExecutionEnvironment || (ExecutionEnvironment = {}));
|
|
12
|
-
const constructServiceTemplate = ({ memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, }) => {
|
|
12
|
+
const constructServiceTemplate = ({ memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, onlyAllocateCpuDuringRequestProcessing, }) => {
|
|
13
13
|
var _a;
|
|
14
14
|
return {
|
|
15
15
|
scaling: {
|
|
@@ -27,11 +27,13 @@ const constructServiceTemplate = ({ memoryLimit, cpuLimit, timeoutSeconds, minIn
|
|
|
27
27
|
memory: memoryLimit,
|
|
28
28
|
cpu: cpuLimit,
|
|
29
29
|
},
|
|
30
|
+
cpuIdle: onlyAllocateCpuDuringRequestProcessing,
|
|
30
31
|
},
|
|
31
32
|
},
|
|
32
33
|
],
|
|
33
34
|
maxInstanceRequestConcurrency: 1,
|
|
34
35
|
executionEnvironment: ExecutionEnvironment.EXECUTION_ENVIRONMENT_GEN1,
|
|
36
|
+
serviceAccount: process.env.REMOTION_GCP_CLIENT_EMAIL,
|
|
35
37
|
};
|
|
36
38
|
};
|
|
37
39
|
exports.constructServiceTemplate = constructServiceTemplate;
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -16,14 +16,15 @@ 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;
|
|
19
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
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');
|
|
23
23
|
const cpuLimit = String((_b = args_1.parsedCloudrunCli.cpuLimit) !== null && _b !== void 0 ? _b : '1.0');
|
|
24
24
|
const minInstances = String((_c = args_1.parsedCloudrunCli.minInstances) !== null && _c !== void 0 ? _c : constants_1.DEFAULT_MIN_INSTANCES);
|
|
25
25
|
const maxInstances = String((_d = args_1.parsedCloudrunCli.maxInstances) !== null && _d !== void 0 ? _d : constants_1.DEFAULT_MAX_INSTANCES);
|
|
26
|
-
const
|
|
26
|
+
const onlyAllocateCpuDuringRequestProcessing = (_e = args_1.parsedCloudrunCli.onlyAllocateCpuDuringRequestProcessing) !== null && _e !== void 0 ? _e : false;
|
|
27
|
+
const timeoutSeconds = (_f = args_1.parsedCloudrunCli.timeoutSeconds) !== null && _f !== void 0 ? _f : constants_1.DEFAULT_TIMEOUT;
|
|
27
28
|
if (!cli_1.CliInternals.quietFlagProvided()) {
|
|
28
29
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`
|
|
29
30
|
Validating Deployment of Cloud Run Service:
|
|
@@ -58,12 +59,13 @@ ${[
|
|
|
58
59
|
memoryLimit: memoryLimit !== null && memoryLimit !== void 0 ? memoryLimit : '2Gi',
|
|
59
60
|
cpuLimit: cpuLimit !== null && cpuLimit !== void 0 ? cpuLimit : '1.0',
|
|
60
61
|
timeoutSeconds: timeoutSeconds !== null && timeoutSeconds !== void 0 ? timeoutSeconds : constants_1.DEFAULT_TIMEOUT,
|
|
61
|
-
minInstances: (
|
|
62
|
-
maxInstances: (
|
|
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,
|
|
63
64
|
projectID,
|
|
64
65
|
region,
|
|
65
66
|
logLevel,
|
|
66
67
|
indent: false,
|
|
68
|
+
onlyAllocateCpuDuringRequestProcessing,
|
|
67
69
|
});
|
|
68
70
|
if (!deployResult.fullName) {
|
|
69
71
|
log_1.Log.error({ indent: false, logLevel }, 'full service name not returned from Cloud Run API.');
|
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.
|
|
6
|
+
"version": "4.0.222",
|
|
7
7
|
"description": "Render Remotion videos on Google Cloud Run",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -16,14 +16,14 @@
|
|
|
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.
|
|
20
|
-
"remotion": "4.0.
|
|
21
|
-
"@remotion/renderer": "4.0.
|
|
22
|
-
"
|
|
19
|
+
"@remotion/bundler": "4.0.222",
|
|
20
|
+
"@remotion/cli": "4.0.222",
|
|
21
|
+
"@remotion/renderer": "4.0.222",
|
|
22
|
+
"remotion": "4.0.222"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/minimist": "1.2.2",
|
|
26
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
26
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.222"
|
|
27
27
|
},
|
|
28
28
|
"exports": {
|
|
29
29
|
"./package.json": "./package.json",
|