@remotion/lambda 3.0.0-lambda.288 → 3.0.0-lambda.327
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/dist/api/create-function.d.ts +2 -1
- package/dist/api/create-function.d.ts.map +1 -1
- package/dist/api/create-function.js +2 -2
- package/dist/api/create-function.js.map +1 -1
- package/dist/api/deploy-function.d.ts +2 -0
- package/dist/api/deploy-function.d.ts.map +1 -1
- package/dist/api/deploy-function.js +5 -0
- package/dist/api/deploy-function.js.map +1 -1
- package/dist/api/deploy-site.d.ts.map +1 -1
- package/dist/api/deploy-site.js +2 -6
- package/dist/api/deploy-site.js.map +1 -1
- package/dist/api/download-media.d.ts.map +1 -1
- package/dist/api/download-media.js +4 -15
- package/dist/api/download-media.js.map +1 -1
- package/dist/api/get-aws-client.d.ts +30 -0
- package/dist/api/get-aws-client.d.ts.map +1 -0
- package/dist/api/get-aws-client.js +47 -0
- package/dist/api/get-aws-client.js.map +1 -0
- package/dist/api/presign-url.d.ts +20 -0
- package/dist/api/presign-url.d.ts.map +1 -0
- package/dist/api/presign-url.js +47 -0
- package/dist/api/presign-url.js.map +1 -0
- package/dist/api/render-media-on-lambda.d.ts +7 -2
- package/dist/api/render-media-on-lambda.d.ts.map +1 -1
- package/dist/api/render-media-on-lambda.js +9 -3
- package/dist/api/render-media-on-lambda.js.map +1 -1
- package/dist/api/render-still-on-lambda.d.ts +6 -1
- package/dist/api/render-still-on-lambda.d.ts.map +1 -1
- package/dist/api/render-still-on-lambda.js +9 -2
- package/dist/api/render-still-on-lambda.js.map +1 -1
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/commands/functions/deploy.d.ts.map +1 -1
- package/dist/cli/commands/functions/deploy.js +11 -2
- package/dist/cli/commands/functions/deploy.js.map +1 -1
- package/dist/cli/commands/render/render.d.ts.map +1 -1
- package/dist/cli/commands/render/render.js +18 -14
- package/dist/cli/commands/render/render.js.map +1 -1
- package/dist/cli/commands/sites/create.d.ts.map +1 -1
- package/dist/cli/commands/sites/create.js +4 -1
- package/dist/cli/commands/sites/create.js.map +1 -1
- package/dist/cli/commands/still.d.ts.map +1 -1
- package/dist/cli/commands/still.js +11 -7
- package/dist/cli/commands/still.js.map +1 -1
- package/dist/cli/helpers/confirm.d.ts.map +1 -1
- package/dist/cli/helpers/confirm.js +4 -18
- package/dist/cli/helpers/confirm.js.map +1 -1
- package/dist/cli/helpers/yes-or-no.d.ts +5 -0
- package/dist/cli/helpers/yes-or-no.d.ts.map +1 -0
- package/dist/cli/helpers/yes-or-no.js +45 -0
- package/dist/cli/helpers/yes-or-no.js.map +1 -0
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts +1 -4
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/optimize-profile.d.ts +2 -8
- package/dist/functions/chunk-optimization/optimize-profile.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts +1 -4
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts.map +1 -1
- package/dist/functions/helpers/best-frames-per-lambda-param.d.ts +2 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.d.ts.map +1 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.js +18 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.js.map +1 -0
- package/dist/functions/helpers/concat-videos.d.ts.map +1 -1
- package/dist/functions/helpers/concat-videos.js +4 -2
- package/dist/functions/helpers/concat-videos.js.map +1 -1
- package/dist/functions/helpers/expected-out-name.d.ts.map +1 -1
- package/dist/functions/helpers/expected-out-name.js +3 -0
- package/dist/functions/helpers/expected-out-name.js.map +1 -1
- package/dist/functions/helpers/get-browser-instance.d.ts +2 -1
- package/dist/functions/helpers/get-browser-instance.d.ts.map +1 -1
- package/dist/functions/helpers/get-browser-instance.js +2 -1
- package/dist/functions/helpers/get-browser-instance.js.map +1 -1
- package/dist/functions/helpers/get-chromium-executable-path.d.ts +1 -1
- package/dist/functions/helpers/get-chromium-executable-path.d.ts.map +1 -1
- package/dist/functions/helpers/get-chromium-executable-path.js.map +1 -1
- package/dist/functions/helpers/get-progress.d.ts.map +1 -1
- package/dist/functions/helpers/get-progress.js +3 -0
- package/dist/functions/helpers/get-progress.js.map +1 -1
- package/dist/functions/helpers/presign-url.d.ts +2 -0
- package/dist/functions/helpers/presign-url.d.ts.map +1 -0
- package/dist/functions/helpers/presign-url.js +9 -0
- package/dist/functions/helpers/presign-url.js.map +1 -0
- package/dist/functions/helpers/print-concurrency-curve.d.ts +2 -0
- package/dist/functions/helpers/print-concurrency-curve.d.ts.map +1 -0
- package/dist/functions/helpers/print-concurrency-curve.js +9 -0
- package/dist/functions/helpers/print-concurrency-curve.js.map +1 -0
- package/dist/functions/helpers/read-with-progress.d.ts +5 -3
- package/dist/functions/helpers/read-with-progress.d.ts.map +1 -1
- package/dist/functions/helpers/read-with-progress.js +4 -12
- package/dist/functions/helpers/read-with-progress.js.map +1 -1
- package/dist/functions/launch.d.ts.map +1 -1
- package/dist/functions/launch.js +21 -12
- package/dist/functions/launch.js.map +1 -1
- package/dist/functions/renderer.d.ts.map +1 -1
- package/dist/functions/renderer.js +16 -8
- package/dist/functions/renderer.js.map +1 -1
- package/dist/functions/start.d.ts.map +1 -1
- package/dist/functions/start.js +5 -1
- package/dist/functions/start.js.map +1 -1
- package/dist/functions/still.d.ts.map +1 -1
- package/dist/functions/still.js +12 -6
- package/dist/functions/still.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/shared/aws-clients.d.ts +7 -1
- package/dist/shared/aws-clients.d.ts.map +1 -1
- package/dist/shared/aws-clients.js.map +1 -1
- package/dist/shared/constants.d.ts +25 -9
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/constants.js +7 -7
- package/dist/shared/constants.js.map +1 -1
- package/dist/shared/hosted-layers.js +30 -30
- package/dist/shared/random-hash.d.ts +3 -1
- package/dist/shared/random-hash.d.ts.map +1 -1
- package/dist/shared/random-hash.js +2 -1
- package/dist/shared/random-hash.js.map +1 -1
- package/dist/shared/validate-bucketname.d.ts +2 -0
- package/dist/shared/validate-bucketname.d.ts.map +1 -0
- package/dist/shared/validate-bucketname.js +14 -0
- package/dist/shared/validate-bucketname.js.map +1 -0
- package/dist/shared/validate-frames-per-lambda.d.ts.map +1 -1
- package/dist/shared/validate-frames-per-lambda.js +5 -1
- package/dist/shared/validate-frames-per-lambda.js.map +1 -1
- package/dist/shared/validate-outname.d.ts +2 -0
- package/dist/shared/validate-outname.d.ts.map +1 -0
- package/dist/shared/validate-outname.js +19 -0
- package/dist/shared/validate-outname.js.map +1 -0
- package/dist/shared/validate-presign-expiration.d.ts +4 -0
- package/dist/shared/validate-presign-expiration.d.ts.map +1 -0
- package/dist/shared/validate-presign-expiration.js +30 -0
- package/dist/shared/validate-presign-expiration.js.map +1 -0
- package/dist/shared/validate-retention-period.d.ts +2 -0
- package/dist/shared/validate-retention-period.d.ts.map +1 -0
- package/dist/shared/validate-retention-period.js +30 -0
- package/dist/shared/validate-retention-period.js.map +1 -0
- package/dist/shared/validate-site-name.d.ts +1 -1
- package/dist/shared/validate-site-name.d.ts.map +1 -1
- package/dist/shared/validate-site-name.js +6 -0
- package/dist/shared/validate-site-name.js.map +1 -1
- package/package.json +9 -8
- package/remotionlambda.zip +0 -0
- package/dist/api/download-video.d.ts +0 -20
- package/dist/api/download-video.d.ts.map +0 -1
- package/dist/api/download-video.js +0 -55
- package/dist/api/download-video.js.map +0 -1
- package/dist/api/render-video-on-lambda.d.ts +0 -72
- package/dist/api/render-video-on-lambda.d.ts.map +0 -1
- package/dist/api/render-video-on-lambda.js +0 -64
- package/dist/api/render-video-on-lambda.js.map +0 -1
- package/dist/pricing/calculate-price.d.ts +0 -15
- package/dist/pricing/calculate-price.d.ts.map +0 -1
- package/dist/pricing/calculate-price.js +0 -34
- package/dist/pricing/calculate-price.js.map +0 -1
- package/dist/pricing/estimate-price.d.ts +0 -15
- package/dist/pricing/estimate-price.d.ts.map +0 -1
- package/dist/pricing/estimate-price.js +0 -34
- package/dist/pricing/estimate-price.js.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateOutname = void 0;
|
|
4
|
+
const validateOutname = (outName) => {
|
|
5
|
+
if (outName === null) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (typeof outName !== 'string') {
|
|
9
|
+
throw new TypeError('The `outName` property must be a string. Passed an object of type ' +
|
|
10
|
+
typeof outName);
|
|
11
|
+
}
|
|
12
|
+
if (!outName.match(/([0-9a-zA-Z-!_.*'()]+)/g)) {
|
|
13
|
+
throw new Error("The `outName` must match the RegExp `/([0-9a-zA-Z-!_.*'()]+)/g`. You passed: " +
|
|
14
|
+
outName +
|
|
15
|
+
'. Check for invalid characters.');
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
exports.validateOutname = validateOutname;
|
|
19
|
+
//# sourceMappingURL=validate-outname.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-outname.js","sourceRoot":"","sources":["../../src/shared/validate-outname.ts"],"names":[],"mappings":";;;AAAO,MAAM,eAAe,GAAG,CAAC,OAAsB,EAAE,EAAE;IACzD,IAAI,OAAO,KAAK,IAAI,EAAE;QACrB,OAAO;KACP;IAED,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAChC,MAAM,IAAI,SAAS,CAClB,oEAAoE;YACnE,OAAO,OAAO,CACf,CAAC;KACF;IAED,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,EAAE;QAC9C,MAAM,IAAI,KAAK,CACd,+EAA+E;YAC9E,OAAO;YACP,iCAAiC,CAClC,CAAC;KACF;AACF,CAAC,CAAC;AAnBW,QAAA,eAAe,mBAmB1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-presign-expiration.d.ts","sourceRoot":"","sources":["../../src/shared/validate-presign-expiration.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,SAAS,CAAC;AAC7C,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,eAAO,MAAM,yBAAyB,sBAAuB,OAAO,SA0CnE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validatePresignExpiration = exports.MIN_PRESIGN_EXPIRATION = exports.MAX_PRESIGN_EXPIRATION = void 0;
|
|
4
|
+
exports.MAX_PRESIGN_EXPIRATION = 604800;
|
|
5
|
+
exports.MIN_PRESIGN_EXPIRATION = 1;
|
|
6
|
+
const validatePresignExpiration = (presignExpiration) => {
|
|
7
|
+
if (typeof presignExpiration === 'undefined' || presignExpiration === null) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (typeof presignExpiration !== 'number') {
|
|
11
|
+
throw new TypeError(`'expiresIn' should be a number, but is ${JSON.stringify(presignExpiration)}`);
|
|
12
|
+
}
|
|
13
|
+
if (Number.isNaN(presignExpiration)) {
|
|
14
|
+
throw new TypeError(`'expiresIn' should not be NaN, but is NaN`);
|
|
15
|
+
}
|
|
16
|
+
if (!Number.isFinite(presignExpiration)) {
|
|
17
|
+
throw new TypeError(`'expiresIn' should be finite but is ${presignExpiration}`);
|
|
18
|
+
}
|
|
19
|
+
if (presignExpiration % 1 !== 0) {
|
|
20
|
+
throw new TypeError(`'expiresIn' should be an integer but is ${JSON.stringify(presignExpiration)}`);
|
|
21
|
+
}
|
|
22
|
+
if (presignExpiration > exports.MAX_PRESIGN_EXPIRATION) {
|
|
23
|
+
throw new TypeError(`The 'expiresIn' parameter must be less or equal than ${exports.MAX_PRESIGN_EXPIRATION} (7 days) as enforced by AWS`);
|
|
24
|
+
}
|
|
25
|
+
if (presignExpiration < exports.MIN_PRESIGN_EXPIRATION) {
|
|
26
|
+
throw new TypeError(`The 'expiresIn' parameter must be greater or equal than ${exports.MIN_PRESIGN_EXPIRATION}`);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.validatePresignExpiration = validatePresignExpiration;
|
|
30
|
+
//# sourceMappingURL=validate-presign-expiration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-presign-expiration.js","sourceRoot":"","sources":["../../src/shared/validate-presign-expiration.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG,MAAM,CAAC;AAChC,QAAA,sBAAsB,GAAG,CAAC,CAAC;AAEjC,MAAM,yBAAyB,GAAG,CAAC,iBAA0B,EAAE,EAAE;IACvE,IAAI,OAAO,iBAAiB,KAAK,WAAW,IAAI,iBAAiB,KAAK,IAAI,EAAE;QAC3E,OAAO;KACP;IAED,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;QAC1C,MAAM,IAAI,SAAS,CAClB,0CAA0C,IAAI,CAAC,SAAS,CACvD,iBAAiB,CACjB,EAAE,CACH,CAAC;KACF;IAED,IAAI,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE;QACpC,MAAM,IAAI,SAAS,CAAC,2CAA2C,CAAC,CAAC;KACjE;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE;QACxC,MAAM,IAAI,SAAS,CAClB,uCAAuC,iBAAiB,EAAE,CAC1D,CAAC;KACF;IAED,IAAI,iBAAiB,GAAG,CAAC,KAAK,CAAC,EAAE;QAChC,MAAM,IAAI,SAAS,CAClB,2CAA2C,IAAI,CAAC,SAAS,CACxD,iBAAiB,CACjB,EAAE,CACH,CAAC;KACF;IAED,IAAI,iBAAiB,GAAG,8BAAsB,EAAE;QAC/C,MAAM,IAAI,SAAS,CAClB,wDAAwD,8BAAsB,8BAA8B,CAC5G,CAAC;KACF;IAED,IAAI,iBAAiB,GAAG,8BAAsB,EAAE;QAC/C,MAAM,IAAI,SAAS,CAClB,2DAA2D,8BAAsB,EAAE,CACnF,CAAC;KACF;AACF,CAAC,CAAC;AA1CW,QAAA,yBAAyB,6BA0CpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-retention-period.d.ts","sourceRoot":"","sources":["../../src/shared/validate-retention-period.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iCAAiC,WAAY,OAAO,SA0ChE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateCloudWatchRetentionPeriod = void 0;
|
|
4
|
+
const MIN_RETENTION_PERIOD = 1;
|
|
5
|
+
const MAX_RETENTION_PERIOD = 10 * 365;
|
|
6
|
+
const validateCloudWatchRetentionPeriod = (period) => {
|
|
7
|
+
if (period === null || period === undefined) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (typeof period !== 'number') {
|
|
11
|
+
throw new TypeError(`CloudWatch retention period should be a number, got: ${JSON.stringify(period)}`);
|
|
12
|
+
}
|
|
13
|
+
if (Number.isNaN(period)) {
|
|
14
|
+
throw new TypeError(`CloudWatch retention period must be an integer, but is NaN`);
|
|
15
|
+
}
|
|
16
|
+
if (!Number.isFinite(period)) {
|
|
17
|
+
throw new TypeError(`CloudWatch retention period must be finite, but is ${period}`);
|
|
18
|
+
}
|
|
19
|
+
if (period % 1 !== 0) {
|
|
20
|
+
throw new TypeError(`CloudWatch retention period must be an integer, but is ${period}`);
|
|
21
|
+
}
|
|
22
|
+
if (period < MIN_RETENTION_PERIOD) {
|
|
23
|
+
throw new Error(`CloudWatch retention period must be at least ${MIN_RETENTION_PERIOD}, but is ${period}`);
|
|
24
|
+
}
|
|
25
|
+
if (period > MAX_RETENTION_PERIOD) {
|
|
26
|
+
throw new Error(`CloudWatch retention period must be at most ${MAX_RETENTION_PERIOD}, but is ${period}`);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.validateCloudWatchRetentionPeriod = validateCloudWatchRetentionPeriod;
|
|
30
|
+
//# sourceMappingURL=validate-retention-period.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-retention-period.js","sourceRoot":"","sources":["../../src/shared/validate-retention-period.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,GAAG,GAAG,CAAC;AAE/B,MAAM,iCAAiC,GAAG,CAAC,MAAe,EAAE,EAAE;IACpE,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,EAAE;QAC5C,OAAO;KACP;IAED,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC/B,MAAM,IAAI,SAAS,CAClB,wDAAwD,IAAI,CAAC,SAAS,CACrE,MAAM,CACN,EAAE,CACH,CAAC;KACF;IAED,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;QACzB,MAAM,IAAI,SAAS,CAClB,4DAA4D,CAC5D,CAAC;KACF;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAC7B,MAAM,IAAI,SAAS,CAClB,sDAAsD,MAAM,EAAE,CAC9D,CAAC;KACF;IAED,IAAI,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;QACrB,MAAM,IAAI,SAAS,CAClB,0DAA0D,MAAM,EAAE,CAClE,CAAC;KACF;IAED,IAAI,MAAM,GAAG,oBAAoB,EAAE;QAClC,MAAM,IAAI,KAAK,CACd,gDAAgD,oBAAoB,YAAY,MAAM,EAAE,CACxF,CAAC;KACF;IAED,IAAI,MAAM,GAAG,oBAAoB,EAAE;QAClC,MAAM,IAAI,KAAK,CACd,+CAA+C,oBAAoB,YAAY,MAAM,EAAE,CACvF,CAAC;KACF;AACF,CAAC,CAAC;AA1CW,QAAA,iCAAiC,qCA0C5C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const validateSiteName: (siteName:
|
|
1
|
+
export declare const validateSiteName: (siteName: unknown) => void;
|
|
2
2
|
//# sourceMappingURL=validate-site-name.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-site-name.d.ts","sourceRoot":"","sources":["../../src/shared/validate-site-name.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,aAAc,
|
|
1
|
+
{"version":3,"file":"validate-site-name.d.ts","sourceRoot":"","sources":["../../src/shared/validate-site-name.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,aAAc,OAAO,SAoBjD,CAAC"}
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateSiteName = void 0;
|
|
4
4
|
const validateSiteName = (siteName) => {
|
|
5
|
+
if (typeof siteName === 'undefined') {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (typeof siteName !== 'string') {
|
|
9
|
+
throw new TypeError(`The 'projectName' argument must be a string if provided, but is ${JSON.stringify(siteName)}`);
|
|
10
|
+
}
|
|
5
11
|
if (!siteName.match(/([0-9a-zA-Z-!_.*'()]+)/g)) {
|
|
6
12
|
throw new Error("The `siteName` must match the RegExp `/([0-9a-zA-Z-!_.*'()]+)/g`. You passed: " +
|
|
7
13
|
siteName +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-site-name.js","sourceRoot":"","sources":["../../src/shared/validate-site-name.ts"],"names":[],"mappings":";;;AAAO,MAAM,gBAAgB,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"validate-site-name.js","sourceRoot":"","sources":["../../src/shared/validate-site-name.ts"],"names":[],"mappings":";;;AAAO,MAAM,gBAAgB,GAAG,CAAC,QAAiB,EAAE,EAAE;IACrD,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QACpC,OAAO;KACP;IAED,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QACjC,MAAM,IAAI,SAAS,CAClB,mEAAmE,IAAI,CAAC,SAAS,CAChF,QAAQ,CACR,EAAE,CACH,CAAC;KACF;IAED,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,yBAAyB,CAAC,EAAE;QAC/C,MAAM,IAAI,KAAK,CACd,gFAAgF;YAC/E,QAAQ;YACR,iCAAiC,CAClC,CAAC;KACF;AACF,CAAC,CAAC;AApBW,QAAA,gBAAgB,oBAoB3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "3.0.0-lambda.
|
|
3
|
+
"version": "3.0.0-lambda.327+85d431c9c",
|
|
4
4
|
"description": "Utility functions for audio and video",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"module": "true",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"
|
|
12
|
+
"testintegration": "jest src/test/integration --runInBand",
|
|
13
|
+
"test": "eslint src --ext ts,tsx && tsc -d && jest src/test/unit",
|
|
13
14
|
"watch": "tsc -w",
|
|
14
15
|
"build": "tsc -d && pnpm run buildlambda",
|
|
15
16
|
"buildlambda": "ts-node src/admin/bundle-lambda.ts",
|
|
@@ -21,21 +22,21 @@
|
|
|
21
22
|
"url": "https://github.com/JonnyBurger/remotion"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
25
|
+
"@aws-sdk/abort-controller": "3.40.0",
|
|
24
26
|
"@aws-sdk/client-cloudwatch-logs": "3.42.0",
|
|
25
27
|
"@aws-sdk/client-iam": "3.42.0",
|
|
26
28
|
"@aws-sdk/client-lambda": "3.42.0",
|
|
27
29
|
"@aws-sdk/client-s3": "3.42.0",
|
|
28
30
|
"@aws-sdk/lib-storage": "3.42.0",
|
|
29
31
|
"@aws-sdk/s3-request-presigner": "3.42.0",
|
|
30
|
-
"@remotion/bundler": "3.0.0-lambda.
|
|
31
|
-
"@remotion/cli": "3.0.0-lambda.
|
|
32
|
-
"@remotion/renderer": "3.0.0-lambda.
|
|
32
|
+
"@remotion/bundler": "3.0.0-lambda.327+85d431c9c",
|
|
33
|
+
"@remotion/cli": "3.0.0-lambda.327+85d431c9c",
|
|
34
|
+
"@remotion/renderer": "3.0.0-lambda.327+85d431c9c",
|
|
33
35
|
"aws-policies": "^1.0.1",
|
|
34
36
|
"dotenv": "^10.0.0",
|
|
35
37
|
"minimist": "^1.2.5",
|
|
36
38
|
"p-limit": "^3.1.0",
|
|
37
|
-
"
|
|
38
|
-
"remotion": "3.0.0-lambda.288+6ab6c681d"
|
|
39
|
+
"remotion": "3.0.0-lambda.327+85d431c9c"
|
|
39
40
|
},
|
|
40
41
|
"peerDependencies": {
|
|
41
42
|
"react": "^17.0.1",
|
|
@@ -59,5 +60,5 @@
|
|
|
59
60
|
"publishConfig": {
|
|
60
61
|
"access": "public"
|
|
61
62
|
},
|
|
62
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "85d431c9c4e32f2b58c1bb2683a2dc77ca736698"
|
|
63
64
|
}
|
package/remotionlambda.zip
CHANGED
|
Binary file
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { LambdaReadFileProgress } from '../functions/helpers/read-with-progress';
|
|
2
|
-
import { AwsRegion } from '../pricing/aws-regions';
|
|
3
|
-
declare type DownloadMediaInput = {
|
|
4
|
-
region: AwsRegion;
|
|
5
|
-
bucketName: string;
|
|
6
|
-
renderId: string;
|
|
7
|
-
outPath: string;
|
|
8
|
-
onProgress?: LambdaReadFileProgress;
|
|
9
|
-
};
|
|
10
|
-
declare type DownloadMediaOutput = {
|
|
11
|
-
outputPath: string;
|
|
12
|
-
sizeInBytes: number;
|
|
13
|
-
};
|
|
14
|
-
export declare const downloadMedia: (input: DownloadMediaInput) => Promise<DownloadMediaOutput>;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Renamed to downloadMedia()
|
|
17
|
-
*/
|
|
18
|
-
export declare const downloadVideo: (input: DownloadMediaInput) => Promise<DownloadMediaOutput>;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=download-video.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"download-video.d.ts","sourceRoot":"","sources":["../../src/api/download-video.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,sBAAsB,EAEtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAGjD,aAAK,kBAAkB,GAAG;IACzB,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACpC,CAAC;AAEF,aAAK,mBAAmB,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,aAAa,UAClB,kBAAkB,KACvB,QAAQ,mBAAmB,CAuC7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,UA7ClB,kBAAkB,KACvB,QAAQ,mBAAmB,CA4CY,CAAC"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.downloadVideo = exports.downloadMedia = void 0;
|
|
7
|
-
const renderer_1 = require("@remotion/renderer");
|
|
8
|
-
const fs_1 = require("fs");
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const expected_out_name_1 = require("../functions/helpers/expected-out-name");
|
|
11
|
-
const get_render_metadata_1 = require("../functions/helpers/get-render-metadata");
|
|
12
|
-
const read_with_progress_1 = require("../functions/helpers/read-with-progress");
|
|
13
|
-
const get_account_id_1 = require("../shared/get-account-id");
|
|
14
|
-
const downloadMedia = async (input) => {
|
|
15
|
-
var _a;
|
|
16
|
-
const expectedBucketOwner = await (0, get_account_id_1.getAccountId)({
|
|
17
|
-
region: input.region,
|
|
18
|
-
});
|
|
19
|
-
const renderMetadata = await (0, get_render_metadata_1.getRenderMetadata)({
|
|
20
|
-
bucketName: input.bucketName,
|
|
21
|
-
expectedBucketOwner,
|
|
22
|
-
region: input.region,
|
|
23
|
-
renderId: input.renderId,
|
|
24
|
-
});
|
|
25
|
-
const readable = await (0, read_with_progress_1.lambdaReadFileWithProgress)({
|
|
26
|
-
bucketName: input.bucketName,
|
|
27
|
-
expectedBucketOwner,
|
|
28
|
-
key: (0, expected_out_name_1.getExpectedOutName)(renderMetadata),
|
|
29
|
-
region: input.region,
|
|
30
|
-
onProgress: (_a = input.onProgress) !== null && _a !== void 0 ? _a : (() => undefined),
|
|
31
|
-
});
|
|
32
|
-
const outputPath = path_1.default.resolve(process.cwd(), input.outPath);
|
|
33
|
-
renderer_1.RenderInternals.ensureOutputDirectory(outputPath);
|
|
34
|
-
const writeStream = (0, fs_1.createWriteStream)(outputPath);
|
|
35
|
-
let sizeInBytes = 0;
|
|
36
|
-
await new Promise((resolve, reject) => {
|
|
37
|
-
readable
|
|
38
|
-
.on('data', (d) => {
|
|
39
|
-
sizeInBytes += d.length;
|
|
40
|
-
})
|
|
41
|
-
.pipe(writeStream)
|
|
42
|
-
.on('error', (err) => reject(err))
|
|
43
|
-
.on('close', () => resolve());
|
|
44
|
-
});
|
|
45
|
-
return {
|
|
46
|
-
outputPath,
|
|
47
|
-
sizeInBytes,
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
exports.downloadMedia = downloadMedia;
|
|
51
|
-
/**
|
|
52
|
-
* @deprecated Renamed to downloadMedia()
|
|
53
|
-
*/
|
|
54
|
-
exports.downloadVideo = exports.downloadMedia;
|
|
55
|
-
//# sourceMappingURL=download-video.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"download-video.js","sourceRoot":"","sources":["../../src/api/download-video.ts"],"names":[],"mappings":";;;;;;AAAA,iDAAmD;AACnD,2BAAqC;AACrC,gDAAwB;AACxB,8EAA0E;AAC1E,kFAA2E;AAC3E,gFAGiD;AAEjD,6DAAsD;AAe/C,MAAM,aAAa,GAAG,KAAK,EACjC,KAAyB,EACM,EAAE;;IACjC,MAAM,mBAAmB,GAAG,MAAM,IAAA,6BAAY,EAAC;QAC9C,MAAM,EAAE,KAAK,CAAC,MAAM;KACpB,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,MAAM,IAAA,uCAAiB,EAAC;QAC9C,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,mBAAmB;QACnB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;KACxB,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,MAAM,IAAA,+CAA0B,EAAC;QACjD,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,mBAAmB;QACnB,GAAG,EAAE,IAAA,sCAAkB,EAAC,cAAc,CAAC;QACvC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,UAAU,EAAE,MAAA,KAAK,CAAC,UAAU,mCAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;KACjD,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAE9D,0BAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAElD,MAAM,WAAW,GAAG,IAAA,sBAAiB,EAAC,UAAU,CAAC,CAAC;IAClD,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,QAAQ;aACN,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;YACjB,WAAW,IAAI,CAAC,CAAC,MAAM,CAAC;QACzB,CAAC,CAAC;aACD,IAAI,CAAC,WAAW,CAAC;aACjB,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;aACjC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;IAEH,OAAO;QACN,UAAU;QACV,WAAW;KACX,CAAC;AACH,CAAC,CAAC;AAzCW,QAAA,aAAa,iBAyCxB;AAEF;;GAEG;AACU,QAAA,aAAa,GAAG,qBAAa,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { FrameRange, ImageFormat, LogLevel, PixelFormat, ProResProfile } from 'remotion';
|
|
2
|
-
import { AwsRegion } from '../pricing/aws-regions';
|
|
3
|
-
import { Privacy } from '../shared/constants';
|
|
4
|
-
/**
|
|
5
|
-
* @description Triggers a render on a lambda given a composition and a lambda function.
|
|
6
|
-
* @link https://remotion-3.vercel.app/docs/lambda/rendermediaonlambda
|
|
7
|
-
* @param params.functionName The name of the Lambda function that should be used
|
|
8
|
-
* @param params.serveUrl The URL of the deployed project
|
|
9
|
-
* @param params.composition The ID of the composition which should be rendered.
|
|
10
|
-
* @param params.inputProps The input props that should be passed to the composition.
|
|
11
|
-
* @param params.codec The video codec which should be used for encoding.
|
|
12
|
-
* @param params.imageFormat In which image format the frames should be rendered.
|
|
13
|
-
* @param params.crf The constant rate factor to be used during encoding.
|
|
14
|
-
* @param params.envVariables Object containing environment variables to be inserted into the video environment
|
|
15
|
-
* @param params.proResProfile The ProRes profile if rendering a ProRes video
|
|
16
|
-
* @param params.quality JPEG quality if JPEG was selected as the image format.
|
|
17
|
-
* @param params.region The AWS region in which the video should be rendered.
|
|
18
|
-
* @param params.maxRetries How often rendering a chunk may fail before the video render gets aborted.
|
|
19
|
-
* @param params.enableChunkOptimization Whether Remotion should restructure and optimize chunks for subsequent renders. Default true.
|
|
20
|
-
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
|
|
21
|
-
* @returns `Promise<{renderId: string; bucketName: string}>`
|
|
22
|
-
*/
|
|
23
|
-
export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, }: {
|
|
24
|
-
region: AwsRegion;
|
|
25
|
-
functionName: string;
|
|
26
|
-
serveUrl: string;
|
|
27
|
-
composition: string;
|
|
28
|
-
inputProps: unknown;
|
|
29
|
-
codec: 'h264-mkv' | 'mp3' | 'aac' | 'wav';
|
|
30
|
-
imageFormat: ImageFormat;
|
|
31
|
-
crf?: number | undefined;
|
|
32
|
-
envVariables?: Record<string, string> | undefined;
|
|
33
|
-
pixelFormat?: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le" | undefined;
|
|
34
|
-
proResProfile?: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
35
|
-
privacy: Privacy;
|
|
36
|
-
quality?: number | undefined;
|
|
37
|
-
maxRetries: number;
|
|
38
|
-
framesPerLambda?: number | undefined;
|
|
39
|
-
enableChunkOptimization?: boolean | undefined;
|
|
40
|
-
logLevel?: "verbose" | "info" | "warn" | "error" | undefined;
|
|
41
|
-
frameRange?: FrameRange | undefined;
|
|
42
|
-
}) => Promise<{
|
|
43
|
-
renderId: string;
|
|
44
|
-
bucketName: string;
|
|
45
|
-
}>;
|
|
46
|
-
/**
|
|
47
|
-
* @deprecated Renamed to renderMediaOnLambda()
|
|
48
|
-
*/
|
|
49
|
-
export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, }: {
|
|
50
|
-
region: AwsRegion;
|
|
51
|
-
functionName: string;
|
|
52
|
-
serveUrl: string;
|
|
53
|
-
composition: string;
|
|
54
|
-
inputProps: unknown;
|
|
55
|
-
codec: 'h264-mkv' | 'mp3' | 'aac' | 'wav';
|
|
56
|
-
imageFormat: ImageFormat;
|
|
57
|
-
crf?: number | undefined;
|
|
58
|
-
envVariables?: Record<string, string> | undefined;
|
|
59
|
-
pixelFormat?: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le" | undefined;
|
|
60
|
-
proResProfile?: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
61
|
-
privacy: Privacy;
|
|
62
|
-
quality?: number | undefined;
|
|
63
|
-
maxRetries: number;
|
|
64
|
-
framesPerLambda?: number | undefined;
|
|
65
|
-
enableChunkOptimization?: boolean | undefined;
|
|
66
|
-
logLevel?: "verbose" | "info" | "warn" | "error" | undefined;
|
|
67
|
-
frameRange?: FrameRange | undefined;
|
|
68
|
-
}) => Promise<{
|
|
69
|
-
renderId: string;
|
|
70
|
-
bucketName: string;
|
|
71
|
-
}>;
|
|
72
|
-
//# sourceMappingURL=render-video-on-lambda.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render-video-on-lambda.d.ts","sourceRoot":"","sources":["../../src/api/render-video-on-lambda.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,WAAW,EAEX,QAAQ,EACR,WAAW,EACX,aAAa,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAGN,OAAO,EACP,MAAM,qBAAqB,CAAC;AAI7B;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,mBAAmB;YAoBvB,SAAS;kBACH,MAAM;cACV,MAAM;iBACH,MAAM;gBACP,OAAO;WACZ,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK;iBAC5B,WAAW;UAClB,MAAM,GAAG,SAAS;;;;aAIf,OAAO;;gBAEJ,MAAM;;;;;;;;EAmClB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;YArDvB,SAAS;kBACH,MAAM;cACV,MAAM;iBACH,MAAM;gBACP,OAAO;WACZ,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK;iBAC5B,WAAW;UAClB,MAAM,GAAG,SAAS;;;;aAIf,OAAO;;gBAEJ,MAAM;;;;;;;;EAwCmC,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderVideoOnLambda = exports.renderMediaOnLambda = void 0;
|
|
4
|
-
const remotion_1 = require("remotion");
|
|
5
|
-
const call_lambda_1 = require("../shared/call-lambda");
|
|
6
|
-
const constants_1 = require("../shared/constants");
|
|
7
|
-
const convert_to_serve_url_1 = require("../shared/convert-to-serve-url");
|
|
8
|
-
const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lambda");
|
|
9
|
-
/**
|
|
10
|
-
* @description Triggers a render on a lambda given a composition and a lambda function.
|
|
11
|
-
* @link https://remotion-3.vercel.app/docs/lambda/rendermediaonlambda
|
|
12
|
-
* @param params.functionName The name of the Lambda function that should be used
|
|
13
|
-
* @param params.serveUrl The URL of the deployed project
|
|
14
|
-
* @param params.composition The ID of the composition which should be rendered.
|
|
15
|
-
* @param params.inputProps The input props that should be passed to the composition.
|
|
16
|
-
* @param params.codec The video codec which should be used for encoding.
|
|
17
|
-
* @param params.imageFormat In which image format the frames should be rendered.
|
|
18
|
-
* @param params.crf The constant rate factor to be used during encoding.
|
|
19
|
-
* @param params.envVariables Object containing environment variables to be inserted into the video environment
|
|
20
|
-
* @param params.proResProfile The ProRes profile if rendering a ProRes video
|
|
21
|
-
* @param params.quality JPEG quality if JPEG was selected as the image format.
|
|
22
|
-
* @param params.region The AWS region in which the video should be rendered.
|
|
23
|
-
* @param params.maxRetries How often rendering a chunk may fail before the video render gets aborted.
|
|
24
|
-
* @param params.enableChunkOptimization Whether Remotion should restructure and optimize chunks for subsequent renders. Default true.
|
|
25
|
-
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
|
|
26
|
-
* @returns `Promise<{renderId: string; bucketName: string}>`
|
|
27
|
-
*/
|
|
28
|
-
const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, }) => {
|
|
29
|
-
(0, validate_frames_per_lambda_1.validateFramesPerLambda)(framesPerLambda);
|
|
30
|
-
const realServeUrl = await (0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region);
|
|
31
|
-
const res = await (0, call_lambda_1.callLambda)({
|
|
32
|
-
functionName,
|
|
33
|
-
type: constants_1.LambdaRoutines.start,
|
|
34
|
-
payload: {
|
|
35
|
-
framesPerLambda: framesPerLambda !== null && framesPerLambda !== void 0 ? framesPerLambda : constants_1.DEFAULT_FRAMES_PER_LAMBDA,
|
|
36
|
-
composition,
|
|
37
|
-
serveUrl: realServeUrl,
|
|
38
|
-
inputProps,
|
|
39
|
-
codec,
|
|
40
|
-
imageFormat,
|
|
41
|
-
crf,
|
|
42
|
-
envVariables,
|
|
43
|
-
pixelFormat,
|
|
44
|
-
proResProfile,
|
|
45
|
-
quality,
|
|
46
|
-
maxRetries,
|
|
47
|
-
privacy,
|
|
48
|
-
enableChunkOptimization,
|
|
49
|
-
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : remotion_1.Internals.Logging.DEFAULT_LOG_LEVEL,
|
|
50
|
-
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
|
|
51
|
-
},
|
|
52
|
-
region,
|
|
53
|
-
});
|
|
54
|
-
return {
|
|
55
|
-
renderId: res.renderId,
|
|
56
|
-
bucketName: res.bucketName,
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
exports.renderMediaOnLambda = renderMediaOnLambda;
|
|
60
|
-
/**
|
|
61
|
-
* @deprecated Renamed to renderMediaOnLambda()
|
|
62
|
-
*/
|
|
63
|
-
exports.renderVideoOnLambda = exports.renderMediaOnLambda;
|
|
64
|
-
//# sourceMappingURL=render-video-on-lambda.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render-video-on-lambda.js","sourceRoot":"","sources":["../../src/api/render-video-on-lambda.ts"],"names":[],"mappings":";;;AAAA,uCAOkB;AAElB,uDAAiD;AACjD,mDAI6B;AAC7B,yEAAiE;AACjE,qFAA6E;AAE7E;;;;;;;;;;;;;;;;;;GAkBG;AAEI,MAAM,mBAAmB,GAAG,KAAK,EAAE,EACzC,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,KAAK,EACL,WAAW,EACX,GAAG,EACH,YAAY,EACZ,WAAW,EACX,aAAa,EACb,OAAO,EACP,MAAM,EACN,UAAU,EACV,WAAW,EACX,eAAe,EACf,OAAO,EACP,uBAAuB,EACvB,QAAQ,EACR,UAAU,GAoBV,EAAE,EAAE;IACJ,IAAA,oDAAuB,EAAC,eAAe,CAAC,CAAC;IACzC,MAAM,YAAY,GAAG,MAAM,IAAA,wCAAiB,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAU,EAAC;QAC5B,YAAY;QACZ,IAAI,EAAE,0BAAc,CAAC,KAAK;QAC1B,OAAO,EAAE;YACR,eAAe,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,qCAAyB;YAC7D,WAAW;YACX,QAAQ,EAAE,YAAY;YACtB,UAAU;YACV,KAAK;YACL,WAAW;YACX,GAAG;YACH,YAAY;YACZ,WAAW;YACX,aAAa;YACb,OAAO;YACP,UAAU;YACV,OAAO;YACP,uBAAuB;YACvB,QAAQ,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,oBAAS,CAAC,OAAO,CAAC,iBAAiB;YACzD,UAAU,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,IAAI;SAC9B;QACD,MAAM;KACN,CAAC,CAAC;IACH,OAAO;QACN,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,UAAU,EAAE,GAAG,CAAC,UAAU;KAC1B,CAAC;AACH,CAAC,CAAC;AApEW,QAAA,mBAAmB,uBAoE9B;AAEF;;GAEG;AACU,QAAA,mBAAmB,GAAG,2BAAmB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AwsRegion } from './aws-regions';
|
|
2
|
-
declare type EstimatePriceInput = {
|
|
3
|
-
region: AwsRegion;
|
|
4
|
-
durationInMiliseconds: number;
|
|
5
|
-
memorySizeInMb: number;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @description Calculates the AWS costs incurred for AWS Lambda given the region, execution duration and memory size.
|
|
10
|
-
* @link https://remotion-3.vercel.app/docs/lambda/estimateprice
|
|
11
|
-
* @returns `number` Price in USD
|
|
12
|
-
*/
|
|
13
|
-
export declare const estimatePrice: ({ region, durationInMiliseconds, memorySizeInMb, }: EstimatePriceInput) => number;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=calculate-price.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculate-price.d.ts","sourceRoot":"","sources":["../../src/pricing/calculate-price.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAGxC,aAAK,kBAAkB,GAAG;IACzB,MAAM,EAAE,SAAS,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;CACvB,CAAC;AACF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,uDAIvB,kBAAkB,WAkCpB,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.estimatePrice = void 0;
|
|
4
|
-
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
5
|
-
const validate_memory_size_1 = require("../shared/validate-memory-size");
|
|
6
|
-
const price_per_1_s_1 = require("./price-per-1-s");
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @description Calculates the AWS costs incurred for AWS Lambda given the region, execution duration and memory size.
|
|
10
|
-
* @link https://remotion-3.vercel.app/docs/lambda/estimateprice
|
|
11
|
-
* @returns `number` Price in USD
|
|
12
|
-
*/
|
|
13
|
-
const estimatePrice = ({ region, durationInMiliseconds, memorySizeInMb, }) => {
|
|
14
|
-
(0, validate_memory_size_1.validateMemorySize)(memorySizeInMb);
|
|
15
|
-
(0, validate_aws_region_1.validateAwsRegion)(region);
|
|
16
|
-
if (typeof durationInMiliseconds !== 'number') {
|
|
17
|
-
throw new TypeError(`Parameter 'durationInMiliseconds' must be a number but got ${typeof durationInMiliseconds}`);
|
|
18
|
-
}
|
|
19
|
-
if (Number.isNaN(durationInMiliseconds)) {
|
|
20
|
-
throw new TypeError(`Parameter 'durationInMiliseconds' must not be NaN but it is.`);
|
|
21
|
-
}
|
|
22
|
-
if (!Number.isFinite(durationInMiliseconds)) {
|
|
23
|
-
throw new TypeError(`Parameter 'durationInMiliseconds' must be finite but it is ${durationInMiliseconds}`);
|
|
24
|
-
}
|
|
25
|
-
if (durationInMiliseconds < 0) {
|
|
26
|
-
throw new TypeError(`Parameter 'durationInMiliseconds' must be over 0 but it is ${durationInMiliseconds}.`);
|
|
27
|
-
}
|
|
28
|
-
const timeCostDollars = Number(price_per_1_s_1.pricing[region]['Lambda Duration'].price) *
|
|
29
|
-
((memorySizeInMb * durationInMiliseconds) / 1000 / 1024);
|
|
30
|
-
const invocationCost = Number(price_per_1_s_1.pricing[region]['Lambda Requests'].price);
|
|
31
|
-
return Number((timeCostDollars + invocationCost).toFixed(5));
|
|
32
|
-
};
|
|
33
|
-
exports.estimatePrice = estimatePrice;
|
|
34
|
-
//# sourceMappingURL=calculate-price.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculate-price.js","sourceRoot":"","sources":["../../src/pricing/calculate-price.ts"],"names":[],"mappings":";;;AAAA,uEAAgE;AAChE,yEAAkE;AAElE,mDAAwC;AAOxC;;;;;GAKG;AACI,MAAM,aAAa,GAAG,CAAC,EAC7B,MAAM,EACN,qBAAqB,EACrB,cAAc,GACM,EAAE,EAAE;IACxB,IAAA,yCAAkB,EAAC,cAAc,CAAC,CAAC;IACnC,IAAA,uCAAiB,EAAC,MAAM,CAAC,CAAC;IAC1B,IAAI,OAAO,qBAAqB,KAAK,QAAQ,EAAE;QAC9C,MAAM,IAAI,SAAS,CAClB,8DAA8D,OAAO,qBAAqB,EAAE,CAC5F,CAAC;KACF;IAED,IAAI,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE;QACxC,MAAM,IAAI,SAAS,CAClB,8DAA8D,CAC9D,CAAC;KACF;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE;QAC5C,MAAM,IAAI,SAAS,CAClB,8DAA8D,qBAAqB,EAAE,CACrF,CAAC;KACF;IAED,IAAI,qBAAqB,GAAG,CAAC,EAAE;QAC9B,MAAM,IAAI,SAAS,CAClB,8DAA8D,qBAAqB,GAAG,CACtF,CAAC;KACF;IAED,MAAM,eAAe,GACpB,MAAM,CAAC,uBAAO,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,KAAK,CAAC;QAChD,CAAC,CAAC,cAAc,GAAG,qBAAqB,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;IAE1D,MAAM,cAAc,GAAG,MAAM,CAAC,uBAAO,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,KAAK,CAAC,CAAC;IAExE,OAAO,MAAM,CAAC,CAAC,eAAe,GAAG,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC,CAAC;AAtCW,QAAA,aAAa,iBAsCxB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AwsRegion } from './aws-regions';
|
|
2
|
-
declare type EstimatePriceInput = {
|
|
3
|
-
region: AwsRegion;
|
|
4
|
-
durationInMiliseconds: number;
|
|
5
|
-
memorySizeInMb: number;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @description Calculates the AWS costs incurred for AWS Lambda given the region, execution duration and memory size.
|
|
10
|
-
* @link https://remotion-3.vercel.app/docs/lambda/estimateprice
|
|
11
|
-
* @returns `number` Price in USD
|
|
12
|
-
*/
|
|
13
|
-
export declare const estimatePrice: ({ region, durationInMiliseconds, memorySizeInMb, }: EstimatePriceInput) => number;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=estimate-price.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"estimate-price.d.ts","sourceRoot":"","sources":["../../src/pricing/estimate-price.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAGxC,aAAK,kBAAkB,GAAG;IACzB,MAAM,EAAE,SAAS,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;CACvB,CAAC;AACF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,uDAIvB,kBAAkB,WAkCpB,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.estimatePrice = void 0;
|
|
4
|
-
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
5
|
-
const validate_memory_size_1 = require("../shared/validate-memory-size");
|
|
6
|
-
const price_per_1_s_1 = require("./price-per-1-s");
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @description Calculates the AWS costs incurred for AWS Lambda given the region, execution duration and memory size.
|
|
10
|
-
* @link https://remotion-3.vercel.app/docs/lambda/estimateprice
|
|
11
|
-
* @returns `number` Price in USD
|
|
12
|
-
*/
|
|
13
|
-
const estimatePrice = ({ region, durationInMiliseconds, memorySizeInMb, }) => {
|
|
14
|
-
(0, validate_memory_size_1.validateMemorySize)(memorySizeInMb);
|
|
15
|
-
(0, validate_aws_region_1.validateAwsRegion)(region);
|
|
16
|
-
if (typeof durationInMiliseconds !== 'number') {
|
|
17
|
-
throw new TypeError(`Parameter 'durationInMiliseconds' must be a number but got ${typeof durationInMiliseconds}`);
|
|
18
|
-
}
|
|
19
|
-
if (Number.isNaN(durationInMiliseconds)) {
|
|
20
|
-
throw new TypeError(`Parameter 'durationInMiliseconds' must not be NaN but it is.`);
|
|
21
|
-
}
|
|
22
|
-
if (!Number.isFinite(durationInMiliseconds)) {
|
|
23
|
-
throw new TypeError(`Parameter 'durationInMiliseconds' must be finite but it is ${durationInMiliseconds}`);
|
|
24
|
-
}
|
|
25
|
-
if (durationInMiliseconds < 0) {
|
|
26
|
-
throw new TypeError(`Parameter 'durationInMiliseconds' must be over 0 but it is ${durationInMiliseconds}.`);
|
|
27
|
-
}
|
|
28
|
-
const timeCostDollars = Number(price_per_1_s_1.pricing[region]['Lambda Duration'].price) *
|
|
29
|
-
((memorySizeInMb * durationInMiliseconds) / 1000 / 1024);
|
|
30
|
-
const invocationCost = Number(price_per_1_s_1.pricing[region]['Lambda Requests'].price);
|
|
31
|
-
return Number((timeCostDollars + invocationCost).toFixed(5));
|
|
32
|
-
};
|
|
33
|
-
exports.estimatePrice = estimatePrice;
|
|
34
|
-
//# sourceMappingURL=estimate-price.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"estimate-price.js","sourceRoot":"","sources":["../../src/pricing/estimate-price.ts"],"names":[],"mappings":";;;AAAA,uEAAgE;AAChE,yEAAkE;AAElE,mDAAwC;AAOxC;;;;;GAKG;AACI,MAAM,aAAa,GAAG,CAAC,EAC7B,MAAM,EACN,qBAAqB,EACrB,cAAc,GACM,EAAE,EAAE;IACxB,IAAA,yCAAkB,EAAC,cAAc,CAAC,CAAC;IACnC,IAAA,uCAAiB,EAAC,MAAM,CAAC,CAAC;IAC1B,IAAI,OAAO,qBAAqB,KAAK,QAAQ,EAAE;QAC9C,MAAM,IAAI,SAAS,CAClB,8DAA8D,OAAO,qBAAqB,EAAE,CAC5F,CAAC;KACF;IAED,IAAI,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE;QACxC,MAAM,IAAI,SAAS,CAClB,8DAA8D,CAC9D,CAAC;KACF;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE;QAC5C,MAAM,IAAI,SAAS,CAClB,8DAA8D,qBAAqB,EAAE,CACrF,CAAC;KACF;IAED,IAAI,qBAAqB,GAAG,CAAC,EAAE;QAC9B,MAAM,IAAI,SAAS,CAClB,8DAA8D,qBAAqB,GAAG,CACtF,CAAC;KACF;IAED,MAAM,eAAe,GACpB,MAAM,CAAC,uBAAO,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,KAAK,CAAC;QAChD,CAAC,CAAC,cAAc,GAAG,qBAAqB,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;IAE1D,MAAM,cAAc,GAAG,MAAM,CAAC,uBAAO,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,KAAK,CAAC,CAAC;IAExE,OAAO,MAAM,CAAC,CAAC,eAAe,GAAG,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC,CAAC;AAtCW,QAAA,aAAa,iBAsCxB"}
|