@remotion/lambda 3.1.6 → 3.1.7
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/admin/bundle-lambda.d.ts +0 -0
- package/dist/admin/bundle-lambda.js +1 -0
- package/dist/admin/make-layer-public.d.ts +0 -0
- package/dist/admin/make-layer-public.js +0 -0
- package/dist/api/bucket-exists.d.ts +0 -0
- package/dist/api/bucket-exists.js +0 -0
- package/dist/api/clean-items.d.ts +0 -0
- package/dist/api/clean-items.js +0 -0
- package/dist/api/create-bucket.d.ts +0 -0
- package/dist/api/create-bucket.js +0 -0
- package/dist/api/create-function.d.ts +0 -0
- package/dist/api/create-function.js +0 -0
- package/dist/api/delete-function.d.ts +0 -0
- package/dist/api/delete-function.js +0 -0
- package/dist/api/delete-site.d.ts +0 -0
- package/dist/api/delete-site.js +0 -0
- package/dist/api/deploy-function.d.ts +0 -0
- package/dist/api/deploy-function.js +0 -0
- package/dist/api/deploy-site.d.ts +0 -0
- package/dist/api/deploy-site.js +2 -3
- package/dist/api/download-media.d.ts +0 -0
- package/dist/api/download-media.js +0 -0
- package/dist/api/enable-s3-website.d.ts +0 -0
- package/dist/api/enable-s3-website.js +0 -0
- package/dist/api/estimate-price.d.ts +0 -0
- package/dist/api/estimate-price.js +0 -0
- package/dist/api/get-aws-client.d.ts +0 -0
- package/dist/api/get-aws-client.js +0 -0
- package/dist/api/get-buckets.d.ts +0 -0
- package/dist/api/get-buckets.js +0 -0
- package/dist/api/get-function-info.d.ts +0 -0
- package/dist/api/get-function-info.js +0 -0
- package/dist/api/get-functions.d.ts +0 -0
- package/dist/api/get-functions.js +0 -0
- package/dist/api/get-or-create-bucket.d.ts +0 -0
- package/dist/api/get-or-create-bucket.js +0 -0
- package/dist/api/get-regions.d.ts +0 -0
- package/dist/api/get-regions.js +0 -0
- package/dist/api/get-render-progress.d.ts +0 -0
- package/dist/api/get-render-progress.js +0 -0
- package/dist/api/get-sites.d.ts +0 -0
- package/dist/api/get-sites.js +0 -0
- package/dist/api/iam-validation/role-permissions.d.ts +0 -0
- package/dist/api/iam-validation/role-permissions.js +0 -0
- package/dist/api/iam-validation/simulate-rule.d.ts +0 -0
- package/dist/api/iam-validation/simulate-rule.js +0 -0
- package/dist/api/iam-validation/simulate.d.ts +0 -0
- package/dist/api/iam-validation/simulate.js +0 -0
- package/dist/api/iam-validation/suggested-policy.d.ts +0 -0
- package/dist/api/iam-validation/suggested-policy.js +0 -0
- package/dist/api/iam-validation/user-permissions.d.ts +0 -0
- package/dist/api/iam-validation/user-permissions.js +0 -0
- package/dist/api/mock-functions.d.ts +0 -0
- package/dist/api/mock-functions.js +0 -0
- package/dist/api/presign-url.d.ts +0 -0
- package/dist/api/presign-url.js +0 -0
- package/dist/api/render-media-on-lambda.d.ts +1 -2
- package/dist/api/render-media-on-lambda.js +2 -3
- package/dist/api/render-still-on-lambda.d.ts +1 -2
- package/dist/api/render-still-on-lambda.js +2 -3
- package/dist/api/upload-dir.d.ts +0 -0
- package/dist/api/upload-dir.js +0 -0
- package/dist/cli/args.d.ts +0 -0
- package/dist/cli/args.js +0 -0
- package/dist/cli/commands/functions/deploy.d.ts +0 -0
- package/dist/cli/commands/functions/deploy.js +0 -0
- package/dist/cli/commands/functions/index.d.ts +0 -0
- package/dist/cli/commands/functions/index.js +0 -0
- package/dist/cli/commands/functions/ls.d.ts +0 -0
- package/dist/cli/commands/functions/ls.js +0 -0
- package/dist/cli/commands/functions/rm.d.ts +0 -0
- package/dist/cli/commands/functions/rm.js +0 -0
- package/dist/cli/commands/functions/rmall.d.ts +0 -0
- package/dist/cli/commands/functions/rmall.js +0 -0
- package/dist/cli/commands/policies/policies.d.ts +0 -0
- package/dist/cli/commands/policies/policies.js +0 -0
- package/dist/cli/commands/policies/role.d.ts +0 -0
- package/dist/cli/commands/policies/role.js +0 -0
- package/dist/cli/commands/policies/user.d.ts +0 -0
- package/dist/cli/commands/policies/user.js +0 -0
- package/dist/cli/commands/policies/validate.d.ts +0 -0
- package/dist/cli/commands/policies/validate.js +0 -0
- package/dist/cli/commands/quotas/increase.d.ts +0 -0
- package/dist/cli/commands/quotas/increase.js +0 -0
- package/dist/cli/commands/quotas/index.d.ts +0 -0
- package/dist/cli/commands/quotas/index.js +0 -0
- package/dist/cli/commands/quotas/list.d.ts +0 -0
- package/dist/cli/commands/quotas/list.js +0 -0
- package/dist/cli/commands/regions.d.ts +0 -0
- package/dist/cli/commands/regions.js +0 -0
- package/dist/cli/commands/render/progress.d.ts +0 -0
- package/dist/cli/commands/render/progress.js +0 -0
- package/dist/cli/commands/render/render.d.ts +0 -0
- package/dist/cli/commands/render/render.js +0 -0
- package/dist/cli/commands/sites/create.d.ts +0 -0
- package/dist/cli/commands/sites/create.js +2 -3
- package/dist/cli/commands/sites/index.d.ts +0 -0
- package/dist/cli/commands/sites/index.js +0 -0
- package/dist/cli/commands/sites/ls.d.ts +0 -0
- package/dist/cli/commands/sites/ls.js +0 -0
- package/dist/cli/commands/sites/rm.d.ts +0 -0
- package/dist/cli/commands/sites/rm.js +0 -0
- package/dist/cli/commands/sites/rmall.d.ts +0 -0
- package/dist/cli/commands/sites/rmall.js +0 -0
- package/dist/cli/commands/still.d.ts +0 -0
- package/dist/cli/commands/still.js +0 -0
- package/dist/cli/get-aws-region.d.ts +0 -0
- package/dist/cli/get-aws-region.js +0 -0
- package/dist/cli/help.d.ts +0 -0
- package/dist/cli/help.js +0 -0
- package/dist/cli/helpers/confirm.d.ts +0 -0
- package/dist/cli/helpers/confirm.js +0 -0
- package/dist/cli/helpers/date-string.d.ts +0 -0
- package/dist/cli/helpers/date-string.js +0 -0
- package/dist/cli/helpers/find-function-name.d.ts +0 -0
- package/dist/cli/helpers/find-function-name.js +0 -0
- package/dist/cli/helpers/get-cloudwatch-stream-url.d.ts +0 -0
- package/dist/cli/helpers/get-cloudwatch-stream-url.js +0 -0
- package/dist/cli/helpers/progress-bar.d.ts +0 -0
- package/dist/cli/helpers/progress-bar.js +0 -0
- package/dist/cli/helpers/quit.d.ts +0 -0
- package/dist/cli/helpers/quit.js +0 -0
- package/dist/cli/helpers/yes-or-no.d.ts +0 -0
- package/dist/cli/helpers/yes-or-no.js +0 -0
- package/dist/cli/index.d.ts +0 -0
- package/dist/cli/index.js +1 -1
- package/dist/cli/is-cli.d.ts +0 -0
- package/dist/cli/is-cli.js +0 -0
- package/dist/cli/log.d.ts +0 -0
- package/dist/cli/log.js +0 -0
- package/dist/client.d.ts +0 -0
- package/dist/client.js +0 -0
- package/dist/defaults.d.ts +0 -0
- package/dist/defaults.js +0 -0
- package/dist/functions/chunk-optimization/can-use-optimization.d.ts +0 -0
- package/dist/functions/chunk-optimization/can-use-optimization.js +0 -0
- package/dist/functions/chunk-optimization/collect-data.d.ts +0 -0
- package/dist/functions/chunk-optimization/collect-data.js +0 -0
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts +0 -0
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.js +0 -0
- package/dist/functions/chunk-optimization/get-profile-duration.d.ts +0 -0
- package/dist/functions/chunk-optimization/get-profile-duration.js +0 -0
- package/dist/functions/chunk-optimization/is-valid-profile.d.ts +0 -0
- package/dist/functions/chunk-optimization/is-valid-profile.js +0 -0
- package/dist/functions/chunk-optimization/optimize-invocation-order.d.ts +0 -0
- package/dist/functions/chunk-optimization/optimize-invocation-order.js +0 -0
- package/dist/functions/chunk-optimization/optimize-profile.d.ts +0 -0
- package/dist/functions/chunk-optimization/optimize-profile.js +0 -0
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +0 -0
- package/dist/functions/chunk-optimization/plan-frame-ranges.js +0 -0
- package/dist/functions/chunk-optimization/s3-optimization-file.d.ts +0 -0
- package/dist/functions/chunk-optimization/s3-optimization-file.js +0 -0
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts +0 -0
- package/dist/functions/chunk-optimization/simulate-frame-ranges.js +0 -0
- package/dist/functions/chunk-optimization/sort-by-duration.d.ts +0 -0
- package/dist/functions/chunk-optimization/sort-by-duration.js +0 -0
- package/dist/functions/chunk-optimization/types.d.ts +0 -0
- package/dist/functions/chunk-optimization/types.js +0 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.d.ts +0 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.js +0 -0
- package/dist/functions/helpers/calculate-chunk-times.d.ts +0 -0
- package/dist/functions/helpers/calculate-chunk-times.js +0 -0
- package/dist/functions/helpers/calculate-price-from-bucket.d.ts +0 -0
- package/dist/functions/helpers/calculate-price-from-bucket.js +0 -0
- package/dist/functions/helpers/clean-tmpdir.d.ts +0 -0
- package/dist/functions/helpers/clean-tmpdir.js +0 -0
- package/dist/functions/helpers/concat-videos.d.ts +0 -0
- package/dist/functions/helpers/concat-videos.js +0 -0
- package/dist/functions/helpers/create-post-render-data.d.ts +0 -0
- package/dist/functions/helpers/create-post-render-data.js +1 -2
- package/dist/functions/helpers/delete-chunks.d.ts +0 -0
- package/dist/functions/helpers/delete-chunks.js +0 -0
- package/dist/functions/helpers/expected-out-name.d.ts +0 -0
- package/dist/functions/helpers/expected-out-name.js +0 -0
- package/dist/functions/helpers/find-output-file-in-bucket.d.ts +0 -0
- package/dist/functions/helpers/find-output-file-in-bucket.js +0 -0
- package/dist/functions/helpers/format-costs-info.d.ts +0 -0
- package/dist/functions/helpers/format-costs-info.js +0 -0
- package/dist/functions/helpers/get-browser-instance.d.ts +0 -0
- package/dist/functions/helpers/get-browser-instance.js +0 -0
- package/dist/functions/helpers/get-chromium-executable-path.d.ts +0 -0
- package/dist/functions/helpers/get-chromium-executable-path.js +0 -0
- package/dist/functions/helpers/get-cleanup-progress.d.ts +0 -0
- package/dist/functions/helpers/get-cleanup-progress.js +0 -0
- package/dist/functions/helpers/get-current-architecture.d.ts +0 -0
- package/dist/functions/helpers/get-current-architecture.js +0 -0
- package/dist/functions/helpers/get-current-region.d.ts +0 -0
- package/dist/functions/helpers/get-current-region.js +0 -0
- package/dist/functions/helpers/get-encoding-metadata.d.ts +0 -0
- package/dist/functions/helpers/get-encoding-metadata.js +0 -0
- package/dist/functions/helpers/get-files-in-folder.d.ts +0 -0
- package/dist/functions/helpers/get-files-in-folder.js +0 -0
- package/dist/functions/helpers/get-files-to-delete.d.ts +0 -0
- package/dist/functions/helpers/get-files-to-delete.js +0 -0
- package/dist/functions/helpers/get-final-encoding-status.d.ts +0 -0
- package/dist/functions/helpers/get-final-encoding-status.js +0 -0
- package/dist/functions/helpers/get-folder-size.d.ts +0 -0
- package/dist/functions/helpers/get-folder-size.js +0 -0
- package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts +1 -2
- package/dist/functions/helpers/get-lambdas-invoked-stats.js +6 -11
- package/dist/functions/helpers/get-output-url-from-metadata.d.ts +0 -0
- package/dist/functions/helpers/get-output-url-from-metadata.js +0 -0
- package/dist/functions/helpers/get-overall-progress.d.ts +0 -0
- package/dist/functions/helpers/get-overall-progress.js +0 -0
- package/dist/functions/helpers/get-post-render-data.d.ts +0 -0
- package/dist/functions/helpers/get-post-render-data.js +0 -0
- package/dist/functions/helpers/get-progress.d.ts +0 -0
- package/dist/functions/helpers/get-progress.js +5 -5
- package/dist/functions/helpers/get-render-metadata.d.ts +0 -0
- package/dist/functions/helpers/get-render-metadata.js +0 -0
- package/dist/functions/helpers/get-retry-stats.d.ts +0 -0
- package/dist/functions/helpers/get-retry-stats.js +0 -0
- package/dist/functions/helpers/get-time-to-finish.d.ts +0 -0
- package/dist/functions/helpers/get-time-to-finish.js +0 -0
- package/dist/functions/helpers/inspect-errors.d.ts +0 -0
- package/dist/functions/helpers/inspect-errors.js +0 -0
- package/dist/functions/helpers/io.d.ts +0 -0
- package/dist/functions/helpers/io.js +0 -0
- package/dist/functions/helpers/is-enosp-err.d.ts +0 -0
- package/dist/functions/helpers/is-enosp-err.js +0 -0
- package/dist/functions/helpers/is-warm.d.ts +0 -0
- package/dist/functions/helpers/is-warm.js +0 -0
- package/dist/functions/helpers/min-max.d.ts +0 -0
- package/dist/functions/helpers/min-max.js +0 -0
- package/dist/functions/helpers/print-cloudwatch-helper.d.ts +1 -1
- package/dist/functions/helpers/print-cloudwatch-helper.js +0 -0
- package/dist/functions/helpers/print-concurrency-curve.d.ts +0 -0
- package/dist/functions/helpers/print-concurrency-curve.js +0 -0
- package/dist/functions/helpers/read-with-progress.d.ts +0 -0
- package/dist/functions/helpers/read-with-progress.js +0 -0
- package/dist/functions/helpers/timer.d.ts +0 -0
- package/dist/functions/helpers/timer.js +0 -0
- package/dist/functions/helpers/validate-composition.d.ts +4 -3
- package/dist/functions/helpers/validate-composition.js +2 -1
- package/dist/functions/helpers/write-lambda-error.d.ts +0 -0
- package/dist/functions/helpers/write-lambda-error.js +0 -0
- package/dist/functions/helpers/write-post-render-data.d.ts +0 -0
- package/dist/functions/helpers/write-post-render-data.js +0 -0
- package/dist/functions/index.d.ts +0 -0
- package/dist/functions/index.js +12 -5
- package/dist/functions/info.d.ts +0 -0
- package/dist/functions/info.js +0 -0
- package/dist/functions/launch.d.ts +0 -0
- package/dist/functions/launch.js +10 -8
- package/dist/functions/progress.d.ts +0 -0
- package/dist/functions/progress.js +0 -0
- package/dist/functions/renderer.d.ts +0 -0
- package/dist/functions/renderer.js +6 -5
- package/dist/functions/start.d.ts +0 -0
- package/dist/functions/start.js +1 -2
- package/dist/functions/still.d.ts +0 -0
- package/dist/functions/still.js +6 -4
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/internals.d.ts +0 -0
- package/dist/internals.js +0 -0
- package/dist/pricing/aws-regions.d.ts +0 -0
- package/dist/pricing/aws-regions.js +0 -0
- package/dist/pricing/price-per-1-s.d.ts +0 -0
- package/dist/pricing/price-per-1-s.js +0 -0
- package/dist/regions.d.ts +0 -0
- package/dist/regions.js +0 -0
- package/dist/shared/await.d.ts +0 -0
- package/dist/shared/await.js +0 -0
- package/dist/shared/aws-clients.d.ts +0 -0
- package/dist/shared/aws-clients.js +0 -0
- package/dist/shared/bundle-site.d.ts +1 -6
- package/dist/shared/bundle-site.js +0 -0
- package/dist/shared/call-lambda.d.ts +0 -0
- package/dist/shared/call-lambda.js +0 -0
- package/dist/shared/check-credentials.d.ts +0 -0
- package/dist/shared/check-credentials.js +2 -2
- package/dist/shared/constants.d.ts +3 -3
- package/dist/shared/constants.js +1 -1
- package/dist/shared/content-disposition-header.d.ts +0 -0
- package/dist/shared/content-disposition-header.js +0 -0
- package/dist/shared/convert-to-serve-url.d.ts +0 -0
- package/dist/shared/convert-to-serve-url.js +0 -0
- package/dist/shared/docs-url.d.ts +0 -0
- package/dist/shared/docs-url.js +0 -0
- package/dist/shared/function-zip-path.d.ts +0 -0
- package/dist/shared/function-zip-path.js +0 -0
- package/dist/shared/get-account-id.d.ts +0 -0
- package/dist/shared/get-account-id.js +0 -0
- package/dist/shared/get-function-version.d.ts +0 -0
- package/dist/shared/get-function-version.js +0 -0
- package/dist/shared/get-most-expensive-chunks.d.ts +0 -0
- package/dist/shared/get-most-expensive-chunks.js +0 -0
- package/dist/shared/hosted-layers.d.ts +0 -0
- package/dist/shared/hosted-layers.js +0 -0
- package/dist/shared/is-in-lambda.d.ts +0 -0
- package/dist/shared/is-in-lambda.js +0 -0
- package/dist/shared/make-s3-key.d.ts +0 -0
- package/dist/shared/make-s3-key.js +0 -0
- package/dist/shared/make-s3-url.d.ts +0 -0
- package/dist/shared/make-s3-url.js +0 -0
- package/dist/shared/p-limit.d.ts +0 -0
- package/dist/shared/p-limit.js +0 -0
- package/dist/shared/parse-lambda-initialized-key.d.ts +0 -0
- package/dist/shared/parse-lambda-initialized-key.js +0 -0
- package/dist/shared/parse-lambda-timings-key.d.ts +0 -0
- package/dist/shared/parse-lambda-timings-key.js +0 -0
- package/dist/shared/random-hash.d.ts +0 -0
- package/dist/shared/random-hash.js +0 -0
- package/dist/shared/return-values.d.ts +0 -0
- package/dist/shared/return-values.js +0 -0
- package/dist/shared/sleep.d.ts +0 -0
- package/dist/shared/sleep.js +0 -0
- package/dist/shared/stream-to-string.d.ts +0 -0
- package/dist/shared/stream-to-string.js +0 -0
- package/dist/shared/truthy.d.ts +3 -0
- package/dist/shared/truthy.js +7 -0
- package/dist/shared/validate-architecture.d.ts +0 -0
- package/dist/shared/validate-architecture.js +0 -0
- package/dist/shared/validate-aws-region.d.ts +0 -0
- package/dist/shared/validate-aws-region.js +0 -0
- package/dist/shared/validate-bucketname.d.ts +0 -0
- package/dist/shared/validate-bucketname.js +0 -0
- package/dist/shared/validate-custom-role-arn.d.ts +0 -0
- package/dist/shared/validate-custom-role-arn.js +0 -0
- package/dist/shared/validate-disk-size-in-mb.d.ts +0 -0
- package/dist/shared/validate-disk-size-in-mb.js +0 -0
- package/dist/shared/validate-download-behavior.d.ts +0 -0
- package/dist/shared/validate-download-behavior.js +0 -0
- package/dist/shared/validate-frames-per-lambda.d.ts +0 -0
- package/dist/shared/validate-frames-per-lambda.js +0 -0
- package/dist/shared/validate-lambda-codec.d.ts +0 -0
- package/dist/shared/validate-lambda-codec.js +0 -0
- package/dist/shared/validate-memory-size.d.ts +0 -0
- package/dist/shared/validate-memory-size.js +0 -0
- package/dist/shared/validate-outname.d.ts +0 -0
- package/dist/shared/validate-outname.js +0 -0
- package/dist/shared/validate-presign-expiration.d.ts +0 -0
- package/dist/shared/validate-presign-expiration.js +0 -0
- package/dist/shared/validate-privacy.d.ts +0 -0
- package/dist/shared/validate-privacy.js +0 -0
- package/dist/shared/validate-retention-period.d.ts +0 -0
- package/dist/shared/validate-retention-period.js +0 -0
- package/dist/shared/validate-retries.d.ts +0 -0
- package/dist/shared/validate-retries.js +0 -0
- package/dist/shared/validate-serveurl.d.ts +0 -0
- package/dist/shared/validate-serveurl.js +0 -0
- package/dist/shared/validate-site-name.d.ts +0 -0
- package/dist/shared/validate-site-name.js +0 -0
- package/dist/shared/validate-timeout.d.ts +0 -0
- package/dist/shared/validate-timeout.js +0 -0
- package/package.json +6 -6
- package/remotionlambda.zip +0 -0
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { _Object } from '@aws-sdk/client-s3';
|
|
2
2
|
export declare type LambdaInvokeStats = {
|
|
3
3
|
timeToInvokeLambdas: number | null;
|
|
4
|
-
allLambdasInvoked: boolean;
|
|
5
4
|
lambdasInvoked: number;
|
|
6
5
|
};
|
|
7
|
-
export declare const getLambdasInvokedStats: (contents: _Object[], renderId: string,
|
|
6
|
+
export declare const getLambdasInvokedStats: (contents: _Object[], renderId: string, startDate: number | null) => LambdaInvokeStats;
|
|
@@ -2,20 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getLambdasInvokedStats = void 0;
|
|
4
4
|
const constants_1 = require("../../shared/constants");
|
|
5
|
-
const parse_lambda_initialized_key_1 = require("../../shared/parse-lambda-initialized-key");
|
|
6
5
|
const min_max_1 = require("./min-max");
|
|
7
|
-
const getLambdasInvokedStats = (contents, renderId,
|
|
8
|
-
const lambdasInvoked = contents
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
? (0, min_max_1.max)(lambdasInvoked.map((l) => { var _a; return (_a = l.LastModified) === null || _a === void 0 ? void 0 : _a.getTime(); })) -
|
|
14
|
-
startDate
|
|
15
|
-
: null;
|
|
6
|
+
const getLambdasInvokedStats = (contents, renderId, startDate) => {
|
|
7
|
+
const lambdasInvoked = contents.filter((c) => { var _a; return (_a = c.Key) === null || _a === void 0 ? void 0 : _a.startsWith((0, constants_1.lambdaInitializedPrefix)(renderId)); });
|
|
8
|
+
const timeToInvokeLambdas = startDate === null
|
|
9
|
+
? null
|
|
10
|
+
: (0, min_max_1.max)(lambdasInvoked.map((l) => { var _a; return (_a = l.LastModified) === null || _a === void 0 ? void 0 : _a.getTime(); })) -
|
|
11
|
+
startDate;
|
|
16
12
|
return {
|
|
17
13
|
timeToInvokeLambdas,
|
|
18
|
-
allLambdasInvoked,
|
|
19
14
|
lambdasInvoked: lambdasInvoked.length,
|
|
20
15
|
};
|
|
21
16
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -23,7 +23,7 @@ const get_time_to_finish_1 = require("./get-time-to-finish");
|
|
|
23
23
|
const inspect_errors_1 = require("./inspect-errors");
|
|
24
24
|
const io_1 = require("./io");
|
|
25
25
|
const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region, memorySizeInMb, timeoutInMiliseconds, }) => {
|
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
26
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
27
27
|
const postRenderData = await (0, get_post_render_data_1.getPostRenderData)({
|
|
28
28
|
bucketName,
|
|
29
29
|
region,
|
|
@@ -135,7 +135,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
|
|
|
135
135
|
const renderSize = contents
|
|
136
136
|
.map((c) => { var _a; return (_a = c.Size) !== null && _a !== void 0 ? _a : 0; })
|
|
137
137
|
.reduce((a, b) => a + b, 0);
|
|
138
|
-
const lambdasInvokedStats = (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)(contents, renderId, (_g = renderMetadata === null || renderMetadata === void 0 ? void 0 : renderMetadata.
|
|
138
|
+
const lambdasInvokedStats = (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)(contents, renderId, (_g = renderMetadata === null || renderMetadata === void 0 ? void 0 : renderMetadata.startedDate) !== null && _g !== void 0 ? _g : null);
|
|
139
139
|
const retriesInfo = (0, get_retry_stats_1.getRetryStats)({
|
|
140
140
|
contents,
|
|
141
141
|
renderId,
|
|
@@ -147,7 +147,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
|
|
|
147
147
|
lambdaInvokeStatus: lambdasInvokedStats,
|
|
148
148
|
});
|
|
149
149
|
const chunkCount = outputFile
|
|
150
|
-
? (
|
|
150
|
+
? (_h = renderMetadata === null || renderMetadata === void 0 ? void 0 : renderMetadata.totalChunks) !== null && _h !== void 0 ? _h : 0
|
|
151
151
|
: chunks.length;
|
|
152
152
|
// We add a 20 second buffer for it, since AWS timeshifts can be quite a lot. Once it's 20sec over the limit, we consider it timed out
|
|
153
153
|
const isBeyondTimeout = renderMetadata &&
|
|
@@ -178,7 +178,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
|
|
|
178
178
|
renderId,
|
|
179
179
|
renderMetadata,
|
|
180
180
|
bucket: bucketName,
|
|
181
|
-
outputFile: (
|
|
181
|
+
outputFile: (_j = outputFile === null || outputFile === void 0 ? void 0 : outputFile.url) !== null && _j !== void 0 ? _j : null,
|
|
182
182
|
timeToFinish,
|
|
183
183
|
errors: allErrors,
|
|
184
184
|
fatalErrorEncountered: allErrors.some((f) => f.isFatal && !f.willRetry),
|
|
@@ -193,7 +193,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
|
|
|
193
193
|
type: 'absolute-time',
|
|
194
194
|
})
|
|
195
195
|
: null,
|
|
196
|
-
timeToInvokeLambdas: (
|
|
196
|
+
timeToInvokeLambdas: (_k = encodingStatus === null || encodingStatus === void 0 ? void 0 : encodingStatus.timeToInvoke) !== null && _k !== void 0 ? _k : lambdasInvokedStats.timeToInvokeLambdas,
|
|
197
197
|
overallProgress: (0, get_overall_progress_1.getOverallProgress)({
|
|
198
198
|
cleanup: cleanup ? cleanup.filesDeleted / cleanup.minFilesToDelete : 0,
|
|
199
199
|
encoding: finalEncodingStatus && renderMetadata
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { LambdaRoutines } from '../../defaults';
|
|
2
|
-
export declare const printCloudwatchHelper: (type: LambdaRoutines, data: Record<string, string>) => void;
|
|
2
|
+
export declare const printCloudwatchHelper: (type: LambdaRoutines, data: Record<string, string | boolean>) => void;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ChromiumOptions, openBrowser } from '@remotion/renderer';
|
|
2
|
-
import type {
|
|
1
|
+
import type { ChromiumOptions, DownloadMap, FfmpegExecutable, openBrowser } from '@remotion/renderer';
|
|
2
|
+
import type { TCompMetadata } from 'remotion';
|
|
3
3
|
import type { Await } from '../../shared/await';
|
|
4
4
|
declare type ValidateCompositionOptions = {
|
|
5
5
|
serveUrl: string;
|
|
@@ -12,6 +12,7 @@ declare type ValidateCompositionOptions = {
|
|
|
12
12
|
timeoutInMilliseconds: number;
|
|
13
13
|
chromiumOptions: ChromiumOptions;
|
|
14
14
|
port: number | null;
|
|
15
|
+
downloadMap: DownloadMap;
|
|
15
16
|
};
|
|
16
|
-
export declare const validateComposition: ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, ffmpegExecutable, ffprobeExecutable, chromiumOptions, port, }: ValidateCompositionOptions) => Promise<TCompMetadata>;
|
|
17
|
+
export declare const validateComposition: ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, ffmpegExecutable, ffprobeExecutable, chromiumOptions, port, downloadMap, }: ValidateCompositionOptions) => Promise<TCompMetadata>;
|
|
17
18
|
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateComposition = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
|
-
const validateComposition = async ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, ffmpegExecutable, ffprobeExecutable, chromiumOptions, port, }) => {
|
|
5
|
+
const validateComposition = async ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, ffmpegExecutable, ffprobeExecutable, chromiumOptions, port, downloadMap, }) => {
|
|
6
6
|
const compositions = await (0, renderer_1.getCompositions)(serveUrl, {
|
|
7
7
|
puppeteerInstance: browserInstance,
|
|
8
8
|
inputProps: inputProps,
|
|
@@ -12,6 +12,7 @@ const validateComposition = async ({ serveUrl, composition, browserInstance, inp
|
|
|
12
12
|
timeoutInMilliseconds,
|
|
13
13
|
chromiumOptions,
|
|
14
14
|
port,
|
|
15
|
+
downloadMap,
|
|
15
16
|
});
|
|
16
17
|
const found = compositions.find((c) => c.id === composition);
|
|
17
18
|
if (!found) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/functions/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.handler = void 0;
|
|
4
|
-
const
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const constants_1 = require("../shared/constants");
|
|
6
6
|
const clean_tmpdir_1 = require("./helpers/clean-tmpdir");
|
|
7
7
|
const is_warm_1 = require("./helpers/is-warm");
|
|
@@ -9,7 +9,7 @@ const print_cloudwatch_helper_1 = require("./helpers/print-cloudwatch-helper");
|
|
|
9
9
|
const info_1 = require("./info");
|
|
10
10
|
const launch_1 = require("./launch");
|
|
11
11
|
const progress_1 = require("./progress");
|
|
12
|
-
const
|
|
12
|
+
const renderer_2 = require("./renderer");
|
|
13
13
|
const start_1 = require("./start");
|
|
14
14
|
const still_1 = require("./still");
|
|
15
15
|
const handler = async (params, context) => {
|
|
@@ -25,6 +25,7 @@ const handler = async (params, context) => {
|
|
|
25
25
|
if (params.type === constants_1.LambdaRoutines.still) {
|
|
26
26
|
(0, print_cloudwatch_helper_1.printCloudwatchHelper)(constants_1.LambdaRoutines.still, {
|
|
27
27
|
inputProps: JSON.stringify(params.inputProps),
|
|
28
|
+
isWarm,
|
|
28
29
|
});
|
|
29
30
|
return (0, still_1.stillHandler)(params, {
|
|
30
31
|
expectedBucketOwner: currentUserId,
|
|
@@ -33,6 +34,7 @@ const handler = async (params, context) => {
|
|
|
33
34
|
if (params.type === constants_1.LambdaRoutines.start) {
|
|
34
35
|
(0, print_cloudwatch_helper_1.printCloudwatchHelper)(constants_1.LambdaRoutines.start, {
|
|
35
36
|
inputProps: JSON.stringify(params.inputProps),
|
|
37
|
+
isWarm,
|
|
36
38
|
});
|
|
37
39
|
return (0, start_1.startHandler)(params);
|
|
38
40
|
}
|
|
@@ -40,12 +42,14 @@ const handler = async (params, context) => {
|
|
|
40
42
|
(0, print_cloudwatch_helper_1.printCloudwatchHelper)(constants_1.LambdaRoutines.launch, {
|
|
41
43
|
renderId: params.renderId,
|
|
42
44
|
inputProps: JSON.stringify(params.inputProps),
|
|
45
|
+
isWarm,
|
|
43
46
|
});
|
|
44
47
|
return (0, launch_1.launchHandler)(params, { expectedBucketOwner: currentUserId });
|
|
45
48
|
}
|
|
46
49
|
if (params.type === constants_1.LambdaRoutines.status) {
|
|
47
50
|
(0, print_cloudwatch_helper_1.printCloudwatchHelper)(constants_1.LambdaRoutines.status, {
|
|
48
51
|
renderId: params.renderId,
|
|
52
|
+
isWarm,
|
|
49
53
|
});
|
|
50
54
|
return (0, progress_1.progressHandler)(params, {
|
|
51
55
|
expectedBucketOwner: currentUserId,
|
|
@@ -56,16 +60,19 @@ const handler = async (params, context) => {
|
|
|
56
60
|
(0, print_cloudwatch_helper_1.printCloudwatchHelper)(constants_1.LambdaRoutines.renderer, {
|
|
57
61
|
renderId: params.renderId,
|
|
58
62
|
chunk: String(params.chunk),
|
|
59
|
-
dumpLogs: String(
|
|
63
|
+
dumpLogs: String(renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose')),
|
|
60
64
|
inputProps: JSON.stringify(params.inputProps),
|
|
65
|
+
isWarm,
|
|
61
66
|
});
|
|
62
|
-
return (0,
|
|
67
|
+
return (0, renderer_2.rendererHandler)(params, {
|
|
63
68
|
expectedBucketOwner: currentUserId,
|
|
64
69
|
isWarm,
|
|
65
70
|
});
|
|
66
71
|
}
|
|
67
72
|
if (params.type === constants_1.LambdaRoutines.info) {
|
|
68
|
-
(0, print_cloudwatch_helper_1.printCloudwatchHelper)(constants_1.LambdaRoutines.info, {
|
|
73
|
+
(0, print_cloudwatch_helper_1.printCloudwatchHelper)(constants_1.LambdaRoutines.info, {
|
|
74
|
+
isWarm,
|
|
75
|
+
});
|
|
69
76
|
return (0, info_1.infoHandler)(params);
|
|
70
77
|
}
|
|
71
78
|
throw new Error(constants_1.COMMAND_NOT_FOUND);
|
package/dist/functions/info.d.ts
CHANGED
|
File without changes
|
package/dist/functions/info.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/functions/launch.js
CHANGED
|
@@ -46,7 +46,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
46
46
|
}
|
|
47
47
|
const startedDate = Date.now();
|
|
48
48
|
const [browserInstance, optimization] = await Promise.all([
|
|
49
|
-
(0, get_browser_instance_1.getBrowserInstance)(
|
|
49
|
+
(0, get_browser_instance_1.getBrowserInstance)(renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'), params.chromiumOptions),
|
|
50
50
|
(0, s3_optimization_file_1.getOptimization)({
|
|
51
51
|
bucketName: params.bucketName,
|
|
52
52
|
siteId: (0, make_s3_url_1.getServeUrlHash)(params.serveUrl),
|
|
@@ -55,6 +55,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
55
55
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
56
56
|
}),
|
|
57
57
|
]);
|
|
58
|
+
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
58
59
|
const comp = await (0, validate_composition_1.validateComposition)({
|
|
59
60
|
serveUrl: params.serveUrl,
|
|
60
61
|
composition: params.composition,
|
|
@@ -66,11 +67,12 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
66
67
|
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
67
68
|
chromiumOptions: params.chromiumOptions,
|
|
68
69
|
port: null,
|
|
70
|
+
downloadMap,
|
|
69
71
|
});
|
|
70
|
-
remotion_1.Internals.validateDurationInFrames(comp.durationInFrames, 'passed to
|
|
71
|
-
remotion_1.Internals.validateFps(comp.fps, 'passed to
|
|
72
|
-
remotion_1.Internals.validateDimension(comp.height, 'height', 'passed to
|
|
73
|
-
remotion_1.Internals.validateDimension(comp.width, 'width', 'passed to
|
|
72
|
+
remotion_1.Internals.validateDurationInFrames(comp.durationInFrames, 'passed to a Lambda render');
|
|
73
|
+
remotion_1.Internals.validateFps(comp.fps, 'passed to a Lambda render', false);
|
|
74
|
+
remotion_1.Internals.validateDimension(comp.height, 'height', 'passed to a Lambda render');
|
|
75
|
+
remotion_1.Internals.validateDimension(comp.width, 'width', 'passed to a Lambda render');
|
|
74
76
|
renderer_1.RenderInternals.validateConcurrency(params.concurrencyPerLambda, 'concurrencyPerLambda');
|
|
75
77
|
const realFrameRange = renderer_1.RenderInternals.getRealFrameRange(comp.durationInFrames, params.frameRange);
|
|
76
78
|
const frameCount = renderer_1.RenderInternals.getFramesToRender(realFrameRange, params.everyNthFrame);
|
|
@@ -118,7 +120,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
118
120
|
proResProfile: params.proResProfile,
|
|
119
121
|
quality: params.quality,
|
|
120
122
|
privacy: params.privacy,
|
|
121
|
-
logLevel: (_a = params.logLevel) !== null && _a !== void 0 ? _a :
|
|
123
|
+
logLevel: (_a = params.logLevel) !== null && _a !== void 0 ? _a : 'info',
|
|
122
124
|
attempt: 1,
|
|
123
125
|
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
124
126
|
chromiumOptions: params.chromiumOptions,
|
|
@@ -293,7 +295,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
293
295
|
framesEncoded: frameCount.length,
|
|
294
296
|
totalFrames: frameCount.length,
|
|
295
297
|
doneIn: encodingStop ? encodingStop - encodingStart : null,
|
|
296
|
-
timeToInvoke: (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)(contents, params.renderId, renderMetadata.
|
|
298
|
+
timeToInvoke: (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)(contents, params.renderId, renderMetadata.startedDate).timeToInvokeLambdas,
|
|
297
299
|
};
|
|
298
300
|
const finalEncodingProgressProm = (0, io_1.lambdaWriteFile)({
|
|
299
301
|
bucketName: params.bucketName,
|
|
@@ -321,7 +323,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
321
323
|
contents,
|
|
322
324
|
jobs,
|
|
323
325
|
});
|
|
324
|
-
const postRenderData =
|
|
326
|
+
const postRenderData = (0, create_post_render_data_1.createPostRenderData)({
|
|
325
327
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
326
328
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
327
329
|
renderId: params.renderId,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -8,7 +8,6 @@ const client_lambda_1 = require("@aws-sdk/client-lambda");
|
|
|
8
8
|
const renderer_1 = require("@remotion/renderer");
|
|
9
9
|
const fs_1 = __importDefault(require("fs"));
|
|
10
10
|
const path_1 = __importDefault(require("path"));
|
|
11
|
-
const remotion_1 = require("remotion");
|
|
12
11
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
13
12
|
const constants_1 = require("../shared/constants");
|
|
14
13
|
const clean_tmpdir_1 = require("./helpers/clean-tmpdir");
|
|
@@ -23,8 +22,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
23
22
|
if (params.type !== constants_1.LambdaRoutines.renderer) {
|
|
24
23
|
throw new Error('Params must be renderer');
|
|
25
24
|
}
|
|
26
|
-
|
|
27
|
-
const browserInstance = await (0, get_browser_instance_1.getBrowserInstance)(remotion_1.Internals.Logging.isEqualOrBelowLogLevel(params.logLevel, 'verbose'), (_a = params.chromiumOptions) !== null && _a !== void 0 ? _a : {});
|
|
25
|
+
const browserInstance = await (0, get_browser_instance_1.getBrowserInstance)(renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'), (_a = params.chromiumOptions) !== null && _a !== void 0 ? _a : {});
|
|
28
26
|
const outputPath = renderer_1.RenderInternals.tmpDir('remotion-render-');
|
|
29
27
|
if (typeof params.chunk !== 'number') {
|
|
30
28
|
throw new Error('must pass chunk');
|
|
@@ -42,6 +40,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
42
40
|
const outdir = renderer_1.RenderInternals.tmpDir(constants_1.RENDERER_PATH_TOKEN);
|
|
43
41
|
const outputLocation = path_1.default.join(outdir, `localchunk-${String(params.chunk).padStart(8, '0')}.${renderer_1.RenderInternals.getFileExtensionFromCodec(params.codec, 'chunk')}`);
|
|
44
42
|
const chunkCodec = params.codec === 'gif' ? 'h264-mkv' : params.codec;
|
|
43
|
+
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
45
44
|
await (0, renderer_1.renderMedia)({
|
|
46
45
|
composition: {
|
|
47
46
|
id: params.composition,
|
|
@@ -55,7 +54,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
55
54
|
frameRange: params.frameRange,
|
|
56
55
|
onProgress: ({ renderedFrames, encodedFrames, stitchStage }) => {
|
|
57
56
|
if (renderedFrames % 10 === 0 &&
|
|
58
|
-
|
|
57
|
+
renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose')) {
|
|
59
58
|
console.log(`Rendered ${renderedFrames} frames, encoded ${encodedFrames} frames, stage = ${stitchStage}`);
|
|
60
59
|
}
|
|
61
60
|
const allFrames = renderer_1.RenderInternals.getFramesToRender(params.frameRange, params.everyNthFrame);
|
|
@@ -91,7 +90,8 @@ const renderHandler = async (params, options, logs) => {
|
|
|
91
90
|
serveUrl: params.serveUrl,
|
|
92
91
|
quality: params.quality,
|
|
93
92
|
envVariables: params.envVariables,
|
|
94
|
-
dumpBrowserLogs:
|
|
93
|
+
dumpBrowserLogs: renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'),
|
|
94
|
+
verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'),
|
|
95
95
|
onBrowserLog: (log) => {
|
|
96
96
|
logs.push(log);
|
|
97
97
|
},
|
|
@@ -112,6 +112,7 @@ const renderHandler = async (params, options, logs) => {
|
|
|
112
112
|
port: null,
|
|
113
113
|
everyNthFrame: params.everyNthFrame,
|
|
114
114
|
numberOfGifLoops: null,
|
|
115
|
+
downloadMap,
|
|
115
116
|
});
|
|
116
117
|
const endRendered = Date.now();
|
|
117
118
|
console.log('Adding silent audio, chunk', params.chunk);
|
|
File without changes
|
package/dist/functions/start.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.startHandler = void 0;
|
|
4
4
|
const client_lambda_1 = require("@aws-sdk/client-lambda");
|
|
5
|
-
const remotion_1 = require("remotion");
|
|
6
5
|
const get_or_create_bucket_1 = require("../api/get-or-create-bucket");
|
|
7
6
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
8
7
|
const constants_1 = require("../shared/constants");
|
|
@@ -34,7 +33,7 @@ const startHandler = async (params) => {
|
|
|
34
33
|
quality: params.quality,
|
|
35
34
|
maxRetries: params.maxRetries,
|
|
36
35
|
privacy: params.privacy,
|
|
37
|
-
logLevel: (_a = params.logLevel) !== null && _a !== void 0 ? _a :
|
|
36
|
+
logLevel: (_a = params.logLevel) !== null && _a !== void 0 ? _a : 'info',
|
|
38
37
|
frameRange: params.frameRange,
|
|
39
38
|
outName: params.outName,
|
|
40
39
|
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
File without changes
|
package/dist/functions/still.js
CHANGED
|
@@ -8,7 +8,6 @@ const client_lambda_1 = require("@aws-sdk/client-lambda");
|
|
|
8
8
|
const renderer_1 = require("@remotion/renderer");
|
|
9
9
|
const fs_1 = __importDefault(require("fs"));
|
|
10
10
|
const path_1 = __importDefault(require("path"));
|
|
11
|
-
const remotion_1 = require("remotion");
|
|
12
11
|
const estimate_price_1 = require("../api/estimate-price");
|
|
13
12
|
const get_or_create_bucket_1 = require("../api/get-or-create-bucket");
|
|
14
13
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
@@ -28,7 +27,7 @@ const io_1 = require("./helpers/io");
|
|
|
28
27
|
const validate_composition_1 = require("./helpers/validate-composition");
|
|
29
28
|
const write_lambda_error_1 = require("./helpers/write-lambda-error");
|
|
30
29
|
const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
31
|
-
var _a, _b
|
|
30
|
+
var _a, _b;
|
|
32
31
|
if (lambdaParams.type !== constants_1.LambdaRoutines.still) {
|
|
33
32
|
throw new TypeError('Expected still type');
|
|
34
33
|
}
|
|
@@ -40,10 +39,11 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
40
39
|
(0, get_or_create_bucket_1.getOrCreateBucket)({
|
|
41
40
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
42
41
|
}),
|
|
43
|
-
(0, get_browser_instance_1.getBrowserInstance)(
|
|
42
|
+
(0, get_browser_instance_1.getBrowserInstance)(renderer_1.RenderInternals.isEqualOrBelowLogLevel(lambdaParams.logLevel, 'verbose'), (_a = lambdaParams.chromiumOptions) !== null && _a !== void 0 ? _a : {}),
|
|
44
43
|
]);
|
|
45
44
|
const outputDir = renderer_1.RenderInternals.tmpDir('remotion-render-');
|
|
46
45
|
const outputPath = path_1.default.join(outputDir, 'output');
|
|
46
|
+
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
47
47
|
const composition = await (0, validate_composition_1.validateComposition)({
|
|
48
48
|
serveUrl: lambdaParams.serveUrl,
|
|
49
49
|
browserInstance,
|
|
@@ -55,6 +55,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
55
55
|
chromiumOptions: lambdaParams.chromiumOptions,
|
|
56
56
|
timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,
|
|
57
57
|
port: null,
|
|
58
|
+
downloadMap,
|
|
58
59
|
});
|
|
59
60
|
const renderMetadata = {
|
|
60
61
|
startedDate: Date.now(),
|
|
@@ -74,7 +75,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
74
75
|
memorySizeInMb: Number(process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE),
|
|
75
76
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
76
77
|
renderId,
|
|
77
|
-
outName: (
|
|
78
|
+
outName: (_b = lambdaParams.outName) !== null && _b !== void 0 ? _b : undefined,
|
|
78
79
|
};
|
|
79
80
|
await (0, io_1.lambdaWriteFile)({
|
|
80
81
|
bucketName,
|
|
@@ -100,6 +101,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
100
101
|
chromiumOptions: lambdaParams.chromiumOptions,
|
|
101
102
|
scale: lambdaParams.scale,
|
|
102
103
|
timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,
|
|
104
|
+
downloadMap,
|
|
103
105
|
});
|
|
104
106
|
const { key, renderBucketName } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, bucketName);
|
|
105
107
|
const { size } = await fs_1.default.promises.stat(outputPath);
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/internals.d.ts
CHANGED
|
File without changes
|
package/dist/internals.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/regions.d.ts
CHANGED
|
File without changes
|
package/dist/regions.js
CHANGED
|
File without changes
|
package/dist/shared/await.d.ts
CHANGED
|
File without changes
|
package/dist/shared/await.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export declare const bundleSite: (entryPoint: string, onProgressUpdate?: ((progress: number) => void) | undefined, options?:
|
|
2
|
-
webpackOverride?: import("remotion").WebpackOverrideFn | undefined;
|
|
3
|
-
outDir?: string | undefined;
|
|
4
|
-
enableCaching?: boolean | undefined;
|
|
5
|
-
publicPath?: string | undefined;
|
|
6
|
-
} | undefined) => Promise<string>;
|
|
1
|
+
export declare const bundleSite: (entryPoint: string, onProgressUpdate?: ((progress: number) => void) | undefined, options?: import("@remotion/bundler").BundleOptions | undefined) => Promise<string>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.checkCredentials = void 0;
|
|
4
|
-
const remotion_1 = require("remotion");
|
|
5
4
|
const is_cli_1 = require("../cli/is-cli");
|
|
6
5
|
const docs_url_1 = require("./docs-url");
|
|
6
|
+
const truthy_1 = require("./truthy");
|
|
7
7
|
const messageForVariable = (variable) => {
|
|
8
8
|
return [
|
|
9
9
|
`You have tried to call a Remotion Lambda function, but have not set the environment variable ${variable}.`,
|
|
@@ -13,7 +13,7 @@ const messageForVariable = (variable) => {
|
|
|
13
13
|
`- Please refer to the Remotion Lambda docs (${docs_url_1.DOCS_URL}/docs/lambda/setup) to see how to generate the credentials for your AWS account and then set the environment variables.`,
|
|
14
14
|
`- For more reasons see the troubleshooting page: ${docs_url_1.DOCS_URL}/docs/lambda/troubleshooting/permissions`,
|
|
15
15
|
]
|
|
16
|
-
.filter(
|
|
16
|
+
.filter(truthy_1.truthy)
|
|
17
17
|
.join('\n');
|
|
18
18
|
};
|
|
19
19
|
const checkCredentials = () => {
|