@remotion/lambda 4.0.0-audiopipeline.61 → 4.0.0-bitrate.18
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 -1
- package/dist/admin/bundle-lambda.js +1 -1
- package/dist/admin/make-layer-public.d.ts +0 -1
- package/dist/admin/make-layer-public.js +8 -9
- package/dist/api/bucket-exists.d.ts +1 -2
- package/dist/api/bucket-exists.js +1 -2
- package/dist/api/clean-items.d.ts +1 -2
- package/dist/api/clean-items.js +3 -7
- package/dist/api/create-bucket.d.ts +1 -2
- package/dist/api/create-bucket.js +1 -2
- package/dist/api/create-function.d.ts +4 -4
- package/dist/api/create-function.js +3 -3
- package/dist/api/delete-function.d.ts +1 -2
- package/dist/api/delete-function.js +0 -1
- package/dist/api/delete-render.d.ts +19 -0
- package/dist/api/delete-render.js +66 -0
- package/dist/api/delete-site.d.ts +1 -2
- package/dist/api/delete-site.js +0 -6
- package/dist/api/deploy-function.d.ts +3 -3
- package/dist/api/deploy-function.js +7 -3
- package/dist/api/deploy-site.d.ts +5 -4
- package/dist/api/deploy-site.js +4 -4
- package/dist/api/download-media.d.ts +15 -3
- package/dist/api/download-media.js +15 -4
- package/dist/api/enable-s3-website.d.ts +1 -2
- package/dist/api/enable-s3-website.js +1 -2
- package/dist/api/estimate-price.d.ts +2 -3
- package/dist/api/estimate-price.js +0 -1
- package/dist/api/get-aws-client.d.ts +5 -4
- package/dist/api/get-aws-client.js +12 -4
- package/dist/api/get-buckets.d.ts +1 -2
- package/dist/api/get-buckets.js +2 -3
- package/dist/api/get-function-info.d.ts +2 -4
- package/dist/api/get-function-info.js +0 -1
- package/dist/api/get-functions.d.ts +2 -3
- package/dist/api/get-functions.js +2 -2
- package/dist/api/get-or-create-bucket.d.ts +1 -2
- package/dist/api/get-or-create-bucket.js +0 -1
- package/dist/api/get-regions.d.ts +1 -2
- package/dist/api/get-regions.js +0 -1
- package/dist/api/get-render-progress.d.ts +6 -4
- package/dist/api/get-render-progress.js +5 -2
- package/dist/api/get-sites.d.ts +2 -3
- package/dist/api/get-sites.js +0 -1
- package/dist/api/iam-validation/role-permissions.d.ts +2 -2
- package/dist/api/iam-validation/role-permissions.js +0 -1
- package/dist/api/iam-validation/simulate-rule.d.ts +1 -2
- package/dist/api/iam-validation/simulate-rule.js +0 -1
- package/dist/api/iam-validation/simulate.d.ts +2 -3
- package/dist/api/iam-validation/simulate.js +0 -1
- package/dist/api/iam-validation/suggested-policy.d.ts +0 -1
- package/dist/api/iam-validation/suggested-policy.js +0 -1
- package/dist/api/iam-validation/user-permissions.d.ts +0 -1
- package/dist/api/iam-validation/user-permissions.js +0 -1
- package/dist/api/mock-functions.d.ts +6 -8
- package/dist/api/mock-functions.js +0 -1
- package/dist/api/presign-url.d.ts +3 -3
- package/dist/api/presign-url.js +6 -2
- package/dist/api/render-media-on-lambda.d.ts +31 -17
- package/dist/api/render-media-on-lambda.js +71 -38
- package/dist/api/render-still-on-lambda.d.ts +9 -8
- package/dist/api/render-still-on-lambda.js +49 -32
- package/dist/api/upload-dir.d.ts +2 -3
- package/dist/api/upload-dir.js +10 -6
- package/dist/api/validate-webhook-signature.d.ts +13 -0
- package/dist/api/validate-webhook-signature.js +32 -0
- package/dist/cli/args.d.ts +7 -4
- package/dist/cli/args.js +0 -1
- package/dist/cli/commands/functions/deploy.d.ts +0 -1
- package/dist/cli/commands/functions/deploy.js +8 -4
- package/dist/cli/commands/functions/index.d.ts +0 -1
- package/dist/cli/commands/functions/index.js +0 -1
- package/dist/cli/commands/functions/ls.d.ts +0 -1
- package/dist/cli/commands/functions/ls.js +1 -2
- package/dist/cli/commands/functions/rm.d.ts +0 -1
- package/dist/cli/commands/functions/rm.js +0 -1
- package/dist/cli/commands/functions/rmall.d.ts +0 -1
- package/dist/cli/commands/functions/rmall.js +0 -1
- package/dist/cli/commands/policies/policies.d.ts +0 -1
- package/dist/cli/commands/policies/policies.js +0 -1
- package/dist/cli/commands/policies/role.d.ts +0 -1
- package/dist/cli/commands/policies/role.js +0 -1
- package/dist/cli/commands/policies/user.d.ts +0 -1
- package/dist/cli/commands/policies/user.js +0 -1
- package/dist/cli/commands/policies/validate.d.ts +0 -1
- package/dist/cli/commands/policies/validate.js +0 -1
- package/dist/cli/commands/quotas/increase.d.ts +0 -1
- package/dist/cli/commands/quotas/increase.js +0 -1
- package/dist/cli/commands/quotas/index.d.ts +0 -1
- package/dist/cli/commands/quotas/index.js +0 -1
- package/dist/cli/commands/quotas/list.d.ts +0 -1
- package/dist/cli/commands/quotas/list.js +0 -1
- package/dist/cli/commands/regions.d.ts +0 -1
- package/dist/cli/commands/regions.js +0 -1
- package/dist/cli/commands/render/progress.d.ts +4 -5
- package/dist/cli/commands/render/progress.js +11 -4
- package/dist/cli/commands/render/render.d.ts +0 -1
- package/dist/cli/commands/render/render.js +38 -18
- package/dist/cli/commands/sites/create.d.ts +0 -1
- package/dist/cli/commands/sites/create.js +2 -4
- package/dist/cli/commands/sites/index.d.ts +0 -1
- package/dist/cli/commands/sites/index.js +0 -1
- package/dist/cli/commands/sites/ls.d.ts +0 -1
- package/dist/cli/commands/sites/ls.js +1 -3
- package/dist/cli/commands/sites/rm.d.ts +0 -1
- package/dist/cli/commands/sites/rm.js +2 -4
- package/dist/cli/commands/sites/rmall.d.ts +0 -1
- package/dist/cli/commands/sites/rmall.js +2 -4
- package/dist/cli/commands/still.d.ts +0 -1
- package/dist/cli/commands/still.js +21 -19
- package/dist/cli/get-aws-region.d.ts +1 -2
- package/dist/cli/get-aws-region.js +2 -2
- package/dist/cli/help.d.ts +0 -1
- package/dist/cli/help.js +0 -1
- package/dist/cli/helpers/confirm.d.ts +0 -1
- package/dist/cli/helpers/confirm.js +0 -1
- package/dist/cli/helpers/date-string.d.ts +0 -1
- package/dist/cli/helpers/date-string.js +0 -1
- package/dist/cli/helpers/determine-image-format.d.ts +10 -0
- package/dist/cli/helpers/determine-image-format.js +47 -0
- package/dist/cli/helpers/find-function-name.d.ts +0 -1
- package/dist/cli/helpers/find-function-name.js +3 -3
- package/dist/cli/helpers/get-cloudwatch-stream-url.d.ts +2 -3
- package/dist/cli/helpers/get-cloudwatch-stream-url.js +0 -1
- package/dist/cli/helpers/progress-bar.d.ts +0 -1
- package/dist/cli/helpers/progress-bar.js +1 -3
- package/dist/cli/helpers/quit.d.ts +0 -1
- package/dist/cli/helpers/quit.js +0 -1
- package/dist/cli/helpers/webhook-types.d.ts +6 -0
- package/dist/cli/helpers/webhook-types.js +2 -0
- package/dist/cli/helpers/yes-or-no.d.ts +0 -1
- package/dist/cli/helpers/yes-or-no.js +0 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +11 -2
- package/dist/cli/is-cli.d.ts +0 -1
- package/dist/cli/is-cli.js +0 -1
- package/dist/cli/log.d.ts +0 -1
- package/dist/cli/log.js +0 -1
- package/dist/client.d.ts +4 -3
- package/dist/client.js +3 -2
- package/dist/defaults.d.ts +0 -1
- package/dist/defaults.js +5 -2
- package/dist/functions/chunk-optimization/can-use-optimization.d.ts +1 -2
- package/dist/functions/chunk-optimization/can-use-optimization.js +2 -3
- package/dist/functions/chunk-optimization/collect-data.d.ts +1 -2
- package/dist/functions/chunk-optimization/collect-data.js +0 -1
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts +1 -2
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.js +0 -1
- package/dist/functions/chunk-optimization/get-profile-duration.d.ts +1 -2
- package/dist/functions/chunk-optimization/get-profile-duration.js +0 -1
- package/dist/functions/chunk-optimization/is-valid-profile.d.ts +1 -2
- package/dist/functions/chunk-optimization/is-valid-profile.js +2 -3
- package/dist/functions/chunk-optimization/optimize-invocation-order.d.ts +1 -2
- package/dist/functions/chunk-optimization/optimize-invocation-order.js +0 -1
- package/dist/functions/chunk-optimization/optimize-profile.d.ts +1 -2
- package/dist/functions/chunk-optimization/optimize-profile.js +0 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +7 -5
- package/dist/functions/chunk-optimization/plan-frame-ranges.js +7 -7
- package/dist/functions/chunk-optimization/s3-optimization-file.d.ts +2 -3
- package/dist/functions/chunk-optimization/s3-optimization-file.js +2 -1
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts +1 -2
- package/dist/functions/chunk-optimization/simulate-frame-ranges.js +0 -1
- package/dist/functions/chunk-optimization/sort-by-duration.d.ts +1 -2
- package/dist/functions/chunk-optimization/sort-by-duration.js +0 -1
- package/dist/functions/chunk-optimization/types.d.ts +2 -3
- package/dist/functions/chunk-optimization/types.js +0 -1
- package/dist/functions/helpers/best-frames-per-lambda-param.d.ts +0 -1
- package/dist/functions/helpers/best-frames-per-lambda-param.js +0 -1
- package/dist/functions/helpers/calculate-chunk-times.d.ts +1 -2
- package/dist/functions/helpers/calculate-chunk-times.js +0 -1
- package/dist/functions/helpers/calculate-price-from-bucket.d.ts +4 -5
- package/dist/functions/helpers/calculate-price-from-bucket.js +0 -1
- package/dist/functions/helpers/check-if-render-exists.d.ts +3 -0
- package/dist/functions/helpers/check-if-render-exists.js +14 -0
- package/dist/functions/helpers/clean-tmpdir.d.ts +0 -1
- package/dist/functions/helpers/clean-tmpdir.js +0 -1
- package/dist/functions/helpers/concat-videos.d.ts +6 -5
- package/dist/functions/helpers/concat-videos.js +8 -3
- package/dist/functions/helpers/create-post-render-data.d.ts +6 -7
- package/dist/functions/helpers/create-post-render-data.js +12 -8
- package/dist/functions/helpers/delete-chunks.d.ts +3 -4
- package/dist/functions/helpers/delete-chunks.js +0 -1
- package/dist/functions/helpers/expected-out-name.d.ts +4 -3
- package/dist/functions/helpers/expected-out-name.js +26 -6
- package/dist/functions/helpers/find-output-file-in-bucket.d.ts +5 -4
- package/dist/functions/helpers/find-output-file-in-bucket.js +17 -10
- package/dist/functions/helpers/format-costs-info.d.ts +1 -2
- package/dist/functions/helpers/format-costs-info.js +0 -1
- package/dist/functions/helpers/get-browser-instance.d.ts +2 -2
- package/dist/functions/helpers/get-browser-instance.js +3 -2
- package/dist/functions/helpers/get-chromium-executable-path.d.ts +0 -1
- package/dist/functions/helpers/get-chromium-executable-path.js +0 -1
- package/dist/functions/helpers/get-cleanup-progress.d.ts +2 -3
- package/dist/functions/helpers/get-cleanup-progress.js +0 -1
- package/dist/functions/helpers/get-current-architecture.d.ts +1 -2
- package/dist/functions/helpers/get-current-architecture.js +0 -1
- package/dist/functions/helpers/get-current-region.d.ts +0 -1
- package/dist/functions/helpers/get-current-region.js +0 -1
- package/dist/functions/helpers/get-custom-out-name.d.ts +6 -0
- package/dist/functions/helpers/get-custom-out-name.js +31 -0
- package/dist/functions/helpers/get-encoding-metadata.d.ts +2 -3
- package/dist/functions/helpers/get-encoding-metadata.js +0 -1
- package/dist/functions/helpers/get-files-in-folder.d.ts +0 -1
- package/dist/functions/helpers/get-files-in-folder.js +0 -1
- package/dist/functions/helpers/get-files-to-delete.d.ts +0 -1
- package/dist/functions/helpers/get-files-to-delete.js +3 -4
- package/dist/functions/helpers/get-final-encoding-status.d.ts +2 -3
- package/dist/functions/helpers/get-final-encoding-status.js +0 -1
- package/dist/functions/helpers/get-folder-size.d.ts +0 -1
- package/dist/functions/helpers/get-folder-size.js +0 -1
- package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts +8 -4
- package/dist/functions/helpers/get-lambdas-invoked-stats.js +8 -9
- package/dist/functions/helpers/get-output-url-from-metadata.d.ts +3 -3
- package/dist/functions/helpers/get-output-url-from-metadata.js +2 -3
- package/dist/functions/helpers/get-overall-progress.d.ts +0 -1
- package/dist/functions/helpers/get-overall-progress.js +0 -1
- package/dist/functions/helpers/get-post-render-data.d.ts +2 -3
- package/dist/functions/helpers/get-post-render-data.js +0 -1
- package/dist/functions/helpers/get-progress.d.ts +6 -5
- package/dist/functions/helpers/get-progress.js +32 -17
- package/dist/functions/helpers/get-render-metadata.d.ts +2 -3
- package/dist/functions/helpers/get-render-metadata.js +0 -1
- package/dist/functions/helpers/get-retry-stats.d.ts +1 -2
- package/dist/functions/helpers/get-retry-stats.js +1 -2
- package/dist/functions/helpers/get-time-to-finish.d.ts +1 -2
- package/dist/functions/helpers/get-time-to-finish.js +0 -1
- package/dist/functions/helpers/inspect-errors.d.ts +3 -4
- package/dist/functions/helpers/inspect-errors.js +0 -1
- package/dist/functions/helpers/io.d.ts +24 -7
- package/dist/functions/helpers/io.js +33 -8
- package/dist/functions/helpers/is-enosp-err.d.ts +0 -1
- package/dist/functions/helpers/is-enosp-err.js +0 -1
- package/dist/functions/helpers/is-warm.d.ts +0 -1
- package/dist/functions/helpers/is-warm.js +0 -1
- package/dist/functions/helpers/min-max.d.ts +1 -2
- package/dist/functions/helpers/min-max.js +1 -2
- package/dist/functions/helpers/print-cloudwatch-helper.d.ts +2 -3
- package/dist/functions/helpers/print-cloudwatch-helper.js +0 -1
- package/dist/functions/helpers/print-concurrency-curve.d.ts +0 -1
- package/dist/functions/helpers/print-concurrency-curve.js +0 -1
- package/dist/functions/helpers/read-with-progress.d.ts +6 -4
- package/dist/functions/helpers/read-with-progress.js +15 -4
- package/dist/functions/helpers/timer.d.ts +0 -1
- package/dist/functions/helpers/timer.js +0 -1
- package/dist/functions/helpers/validate-composition.d.ts +11 -5
- package/dist/functions/helpers/validate-composition.js +8 -2
- package/dist/functions/helpers/write-lambda-error.d.ts +2 -3
- package/dist/functions/helpers/write-lambda-error.js +2 -1
- package/dist/functions/helpers/write-post-render-data.d.ts +2 -3
- package/dist/functions/helpers/write-post-render-data.js +2 -1
- package/dist/functions/index.d.ts +3 -3
- package/dist/functions/index.js +16 -10
- package/dist/functions/info.d.ts +2 -3
- package/dist/functions/info.js +2 -2
- package/dist/functions/launch.d.ts +1 -2
- package/dist/functions/launch.js +249 -32
- package/dist/functions/progress.d.ts +2 -3
- package/dist/functions/progress.js +10 -2
- package/dist/functions/renderer.d.ts +1 -2
- package/dist/functions/renderer.js +119 -76
- package/dist/functions/start.d.ts +6 -3
- package/dist/functions/start.js +28 -4
- package/dist/functions/still.d.ts +1 -2
- package/dist/functions/still.js +35 -10
- package/dist/index.d.ts +39 -21
- package/dist/index.js +5 -2
- package/dist/internals.d.ts +0 -1
- package/dist/internals.js +0 -1
- package/dist/pricing/aws-regions.d.ts +0 -1
- package/dist/pricing/aws-regions.js +0 -1
- package/dist/pricing/price-per-1-s.d.ts +1 -2
- package/dist/pricing/price-per-1-s.js +0 -1
- package/dist/regions.d.ts +0 -1
- package/dist/regions.js +0 -1
- package/dist/shared/await.d.ts +0 -1
- package/dist/shared/await.js +0 -1
- package/dist/shared/aws-clients.d.ts +14 -4
- package/dist/shared/aws-clients.js +56 -27
- package/dist/shared/bundle-site.d.ts +2 -7
- package/dist/shared/bundle-site.js +0 -1
- package/dist/shared/call-lambda.d.ts +3 -4
- package/dist/shared/call-lambda.js +0 -1
- package/dist/shared/check-credentials.d.ts +0 -1
- package/dist/shared/check-credentials.js +2 -3
- package/dist/shared/constants.d.ts +64 -19
- package/dist/shared/constants.js +15 -9
- package/dist/shared/content-disposition-header.d.ts +7 -0
- package/dist/shared/content-disposition-header.js +19 -0
- package/dist/shared/convert-to-serve-url.d.ts +1 -2
- package/dist/shared/convert-to-serve-url.js +0 -1
- package/dist/shared/docs-url.d.ts +0 -1
- package/dist/shared/docs-url.js +0 -1
- package/dist/shared/function-zip-path.d.ts +0 -1
- package/dist/shared/function-zip-path.js +0 -1
- package/dist/shared/get-account-id.d.ts +1 -2
- package/dist/shared/get-account-id.js +0 -1
- package/dist/shared/get-cloudwatch-stream-url.d.ts +8 -0
- package/dist/shared/get-cloudwatch-stream-url.js +7 -0
- package/dist/shared/get-function-version.d.ts +2 -4
- package/dist/shared/get-function-version.js +0 -1
- package/dist/shared/get-most-expensive-chunks.d.ts +8 -0
- package/dist/shared/get-most-expensive-chunks.js +25 -0
- package/dist/shared/hosted-layers.d.ts +2 -3
- package/dist/shared/hosted-layers.js +60 -61
- package/dist/shared/invoke-webhook.d.ts +44 -0
- package/dist/shared/invoke-webhook.js +89 -0
- package/dist/shared/is-in-lambda.d.ts +0 -1
- package/dist/shared/is-in-lambda.js +5 -2
- package/dist/shared/lambda-version-string.d.ts +1 -0
- package/dist/shared/lambda-version-string.js +7 -0
- package/dist/shared/make-s3-key.d.ts +1 -0
- package/dist/shared/make-s3-key.js +11 -0
- package/dist/shared/make-s3-url.d.ts +1 -2
- package/dist/shared/make-s3-url.js +0 -1
- package/dist/shared/p-limit.d.ts +1 -0
- package/dist/shared/p-limit.js +57 -0
- package/dist/shared/parse-lambda-initialized-key.d.ts +0 -1
- package/dist/shared/parse-lambda-initialized-key.js +0 -1
- package/dist/shared/parse-lambda-timings-key.d.ts +0 -1
- package/dist/shared/parse-lambda-timings-key.js +0 -1
- package/dist/shared/random-hash.d.ts +2 -3
- package/dist/shared/random-hash.js +1 -2
- package/dist/shared/return-values.d.ts +7 -8
- package/dist/shared/return-values.js +0 -2
- package/dist/shared/sleep.d.ts +0 -1
- package/dist/shared/sleep.js +0 -1
- package/dist/shared/stream-to-string.d.ts +2 -2
- package/dist/shared/stream-to-string.js +0 -1
- package/dist/shared/truthy.d.ts +3 -0
- package/dist/shared/truthy.js +7 -0
- package/dist/shared/validate-architecture.d.ts +0 -1
- package/dist/shared/validate-architecture.js +0 -1
- package/dist/shared/validate-aws-region.d.ts +1 -2
- package/dist/shared/validate-aws-region.js +0 -1
- package/dist/shared/validate-bucketname.d.ts +0 -1
- package/dist/shared/validate-bucketname.js +0 -1
- package/dist/shared/validate-custom-role-arn.d.ts +1 -0
- package/dist/shared/validate-custom-role-arn.js +11 -0
- package/dist/shared/validate-disk-size-in-mb.d.ts +0 -1
- package/dist/shared/validate-disk-size-in-mb.js +0 -1
- package/dist/shared/validate-download-behavior.d.ts +1 -0
- package/dist/shared/validate-download-behavior.js +21 -0
- package/dist/shared/validate-frames-per-lambda.d.ts +4 -2
- package/dist/shared/validate-frames-per-lambda.js +4 -4
- package/dist/shared/validate-lambda-codec.d.ts +4 -0
- package/dist/shared/validate-lambda-codec.js +30 -0
- package/dist/shared/validate-memory-size.d.ts +0 -1
- package/dist/shared/validate-memory-size.js +0 -1
- package/dist/shared/validate-outname.d.ts +3 -3
- package/dist/shared/validate-outname.js +5 -2
- package/dist/shared/validate-presign-expiration.d.ts +0 -3
- package/dist/shared/validate-presign-expiration.js +7 -8
- package/dist/shared/validate-privacy.d.ts +1 -2
- package/dist/shared/validate-privacy.js +2 -3
- package/dist/shared/validate-retention-period.d.ts +0 -1
- package/dist/shared/validate-retention-period.js +0 -1
- package/dist/shared/validate-retries.d.ts +0 -1
- package/dist/shared/validate-retries.js +0 -1
- package/dist/shared/validate-serveurl.d.ts +0 -1
- package/dist/shared/validate-serveurl.js +0 -1
- package/dist/shared/validate-site-name.d.ts +0 -1
- package/dist/shared/validate-site-name.js +0 -1
- package/dist/shared/validate-timeout.d.ts +0 -1
- package/dist/shared/validate-timeout.js +0 -1
- package/package.json +14 -15
- package/remotionlambda.zip +0 -0
- package/dist/admin/bundle-lambda.d.ts.map +0 -1
- package/dist/admin/bundle-lambda.js.map +0 -1
- package/dist/admin/make-layer-public.d.ts.map +0 -1
- package/dist/admin/make-layer-public.js.map +0 -1
- package/dist/api/bucket-exists.d.ts.map +0 -1
- package/dist/api/bucket-exists.js.map +0 -1
- package/dist/api/clean-items.d.ts.map +0 -1
- package/dist/api/clean-items.js.map +0 -1
- package/dist/api/create-bucket.d.ts.map +0 -1
- package/dist/api/create-bucket.js.map +0 -1
- package/dist/api/create-function.d.ts.map +0 -1
- package/dist/api/create-function.js.map +0 -1
- package/dist/api/delete-function.d.ts.map +0 -1
- package/dist/api/delete-function.js.map +0 -1
- package/dist/api/delete-site.d.ts.map +0 -1
- package/dist/api/delete-site.js.map +0 -1
- package/dist/api/deploy-function.d.ts.map +0 -1
- package/dist/api/deploy-function.js.map +0 -1
- package/dist/api/deploy-site.d.ts.map +0 -1
- package/dist/api/deploy-site.js.map +0 -1
- package/dist/api/download-media.d.ts.map +0 -1
- package/dist/api/download-media.js.map +0 -1
- package/dist/api/enable-s3-website.d.ts.map +0 -1
- package/dist/api/enable-s3-website.js.map +0 -1
- package/dist/api/estimate-price.d.ts.map +0 -1
- package/dist/api/estimate-price.js.map +0 -1
- package/dist/api/get-aws-client.d.ts.map +0 -1
- package/dist/api/get-aws-client.js.map +0 -1
- package/dist/api/get-buckets.d.ts.map +0 -1
- package/dist/api/get-buckets.js.map +0 -1
- package/dist/api/get-function-info.d.ts.map +0 -1
- package/dist/api/get-function-info.js.map +0 -1
- package/dist/api/get-functions.d.ts.map +0 -1
- package/dist/api/get-functions.js.map +0 -1
- package/dist/api/get-or-create-bucket.d.ts.map +0 -1
- package/dist/api/get-or-create-bucket.js.map +0 -1
- package/dist/api/get-regions.d.ts.map +0 -1
- package/dist/api/get-regions.js.map +0 -1
- package/dist/api/get-render-progress.d.ts.map +0 -1
- package/dist/api/get-render-progress.js.map +0 -1
- package/dist/api/get-sites.d.ts.map +0 -1
- package/dist/api/get-sites.js.map +0 -1
- package/dist/api/iam-validation/role-permissions.d.ts.map +0 -1
- package/dist/api/iam-validation/role-permissions.js.map +0 -1
- package/dist/api/iam-validation/simulate-rule.d.ts.map +0 -1
- package/dist/api/iam-validation/simulate-rule.js.map +0 -1
- package/dist/api/iam-validation/simulate.d.ts.map +0 -1
- package/dist/api/iam-validation/simulate.js.map +0 -1
- package/dist/api/iam-validation/suggested-policy.d.ts.map +0 -1
- package/dist/api/iam-validation/suggested-policy.js.map +0 -1
- package/dist/api/iam-validation/user-permissions.d.ts.map +0 -1
- package/dist/api/iam-validation/user-permissions.js.map +0 -1
- package/dist/api/mock-functions.d.ts.map +0 -1
- package/dist/api/mock-functions.js.map +0 -1
- package/dist/api/presign-url.d.ts.map +0 -1
- package/dist/api/presign-url.js.map +0 -1
- package/dist/api/render-media-on-lambda.d.ts.map +0 -1
- package/dist/api/render-media-on-lambda.js.map +0 -1
- package/dist/api/render-still-on-lambda.d.ts.map +0 -1
- package/dist/api/render-still-on-lambda.js.map +0 -1
- package/dist/api/upload-dir.d.ts.map +0 -1
- package/dist/api/upload-dir.js.map +0 -1
- package/dist/cli/args.d.ts.map +0 -1
- package/dist/cli/args.js.map +0 -1
- package/dist/cli/commands/functions/deploy.d.ts.map +0 -1
- package/dist/cli/commands/functions/deploy.js.map +0 -1
- package/dist/cli/commands/functions/index.d.ts.map +0 -1
- package/dist/cli/commands/functions/index.js.map +0 -1
- package/dist/cli/commands/functions/ls.d.ts.map +0 -1
- package/dist/cli/commands/functions/ls.js.map +0 -1
- package/dist/cli/commands/functions/rm.d.ts.map +0 -1
- package/dist/cli/commands/functions/rm.js.map +0 -1
- package/dist/cli/commands/functions/rmall.d.ts.map +0 -1
- package/dist/cli/commands/functions/rmall.js.map +0 -1
- package/dist/cli/commands/policies/policies.d.ts.map +0 -1
- package/dist/cli/commands/policies/policies.js.map +0 -1
- package/dist/cli/commands/policies/role.d.ts.map +0 -1
- package/dist/cli/commands/policies/role.js.map +0 -1
- package/dist/cli/commands/policies/user.d.ts.map +0 -1
- package/dist/cli/commands/policies/user.js.map +0 -1
- package/dist/cli/commands/policies/validate.d.ts.map +0 -1
- package/dist/cli/commands/policies/validate.js.map +0 -1
- package/dist/cli/commands/quotas/increase.d.ts.map +0 -1
- package/dist/cli/commands/quotas/increase.js.map +0 -1
- package/dist/cli/commands/quotas/index.d.ts.map +0 -1
- package/dist/cli/commands/quotas/index.js.map +0 -1
- package/dist/cli/commands/quotas/list.d.ts.map +0 -1
- package/dist/cli/commands/quotas/list.js.map +0 -1
- package/dist/cli/commands/regions.d.ts.map +0 -1
- package/dist/cli/commands/regions.js.map +0 -1
- package/dist/cli/commands/render/progress.d.ts.map +0 -1
- package/dist/cli/commands/render/progress.js.map +0 -1
- package/dist/cli/commands/render/render.d.ts.map +0 -1
- package/dist/cli/commands/render/render.js.map +0 -1
- package/dist/cli/commands/sites/create.d.ts.map +0 -1
- package/dist/cli/commands/sites/create.js.map +0 -1
- package/dist/cli/commands/sites/index.d.ts.map +0 -1
- package/dist/cli/commands/sites/index.js.map +0 -1
- package/dist/cli/commands/sites/ls.d.ts.map +0 -1
- package/dist/cli/commands/sites/ls.js.map +0 -1
- package/dist/cli/commands/sites/rm.d.ts.map +0 -1
- package/dist/cli/commands/sites/rm.js.map +0 -1
- package/dist/cli/commands/sites/rmall.d.ts.map +0 -1
- package/dist/cli/commands/sites/rmall.js.map +0 -1
- package/dist/cli/commands/still.d.ts.map +0 -1
- package/dist/cli/commands/still.js.map +0 -1
- package/dist/cli/get-aws-region.d.ts.map +0 -1
- package/dist/cli/get-aws-region.js.map +0 -1
- package/dist/cli/help.d.ts.map +0 -1
- package/dist/cli/help.js.map +0 -1
- package/dist/cli/helpers/confirm.d.ts.map +0 -1
- package/dist/cli/helpers/confirm.js.map +0 -1
- package/dist/cli/helpers/date-string.d.ts.map +0 -1
- package/dist/cli/helpers/date-string.js.map +0 -1
- package/dist/cli/helpers/find-function-name.d.ts.map +0 -1
- package/dist/cli/helpers/find-function-name.js.map +0 -1
- package/dist/cli/helpers/format-bytes.d.ts +0 -7
- package/dist/cli/helpers/format-bytes.d.ts.map +0 -1
- package/dist/cli/helpers/format-bytes.js +0 -104
- package/dist/cli/helpers/format-bytes.js.map +0 -1
- package/dist/cli/helpers/get-cloudwatch-stream-url.d.ts.map +0 -1
- package/dist/cli/helpers/get-cloudwatch-stream-url.js.map +0 -1
- package/dist/cli/helpers/progress-bar.d.ts.map +0 -1
- package/dist/cli/helpers/progress-bar.js.map +0 -1
- package/dist/cli/helpers/quit.d.ts.map +0 -1
- package/dist/cli/helpers/quit.js.map +0 -1
- package/dist/cli/helpers/yes-or-no.d.ts.map +0 -1
- package/dist/cli/helpers/yes-or-no.js.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/is-cli.d.ts.map +0 -1
- package/dist/cli/is-cli.js.map +0 -1
- package/dist/cli/log.d.ts.map +0 -1
- package/dist/cli/log.js.map +0 -1
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/defaults.d.ts.map +0 -1
- package/dist/defaults.js.map +0 -1
- package/dist/functions/chunk-optimization/can-use-optimization.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/can-use-optimization.js.map +0 -1
- package/dist/functions/chunk-optimization/collect-data.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/collect-data.js.map +0 -1
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.js.map +0 -1
- package/dist/functions/chunk-optimization/get-profile-duration.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/get-profile-duration.js.map +0 -1
- package/dist/functions/chunk-optimization/is-valid-profile.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/is-valid-profile.js.map +0 -1
- package/dist/functions/chunk-optimization/optimize-invocation-order.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/optimize-invocation-order.js.map +0 -1
- package/dist/functions/chunk-optimization/optimize-profile.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/optimize-profile.js.map +0 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.js.map +0 -1
- package/dist/functions/chunk-optimization/s3-optimization-file.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/s3-optimization-file.js.map +0 -1
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/simulate-frame-ranges.js.map +0 -1
- package/dist/functions/chunk-optimization/sort-by-duration.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/sort-by-duration.js.map +0 -1
- package/dist/functions/chunk-optimization/types.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/types.js.map +0 -1
- package/dist/functions/helpers/best-frames-per-lambda-param.d.ts.map +0 -1
- package/dist/functions/helpers/best-frames-per-lambda-param.js.map +0 -1
- package/dist/functions/helpers/calculate-chunk-times.d.ts.map +0 -1
- package/dist/functions/helpers/calculate-chunk-times.js.map +0 -1
- package/dist/functions/helpers/calculate-price-from-bucket.d.ts.map +0 -1
- package/dist/functions/helpers/calculate-price-from-bucket.js.map +0 -1
- package/dist/functions/helpers/clean-tmpdir.d.ts.map +0 -1
- package/dist/functions/helpers/clean-tmpdir.js.map +0 -1
- package/dist/functions/helpers/concat-videos.d.ts.map +0 -1
- package/dist/functions/helpers/concat-videos.js.map +0 -1
- package/dist/functions/helpers/create-post-render-data.d.ts.map +0 -1
- package/dist/functions/helpers/create-post-render-data.js.map +0 -1
- package/dist/functions/helpers/delete-chunks.d.ts.map +0 -1
- package/dist/functions/helpers/delete-chunks.js.map +0 -1
- package/dist/functions/helpers/expected-out-name.d.ts.map +0 -1
- package/dist/functions/helpers/expected-out-name.js.map +0 -1
- package/dist/functions/helpers/find-output-file-in-bucket.d.ts.map +0 -1
- package/dist/functions/helpers/find-output-file-in-bucket.js.map +0 -1
- package/dist/functions/helpers/format-costs-info.d.ts.map +0 -1
- package/dist/functions/helpers/format-costs-info.js.map +0 -1
- package/dist/functions/helpers/get-browser-instance.d.ts.map +0 -1
- package/dist/functions/helpers/get-browser-instance.js.map +0 -1
- package/dist/functions/helpers/get-chromium-executable-path.d.ts.map +0 -1
- package/dist/functions/helpers/get-chromium-executable-path.js.map +0 -1
- package/dist/functions/helpers/get-cleanup-progress.d.ts.map +0 -1
- package/dist/functions/helpers/get-cleanup-progress.js.map +0 -1
- package/dist/functions/helpers/get-current-architecture.d.ts.map +0 -1
- package/dist/functions/helpers/get-current-architecture.js.map +0 -1
- package/dist/functions/helpers/get-current-region.d.ts.map +0 -1
- package/dist/functions/helpers/get-current-region.js.map +0 -1
- package/dist/functions/helpers/get-encoding-metadata.d.ts.map +0 -1
- package/dist/functions/helpers/get-encoding-metadata.js.map +0 -1
- package/dist/functions/helpers/get-files-in-folder.d.ts.map +0 -1
- package/dist/functions/helpers/get-files-in-folder.js.map +0 -1
- package/dist/functions/helpers/get-files-to-delete.d.ts.map +0 -1
- package/dist/functions/helpers/get-files-to-delete.js.map +0 -1
- package/dist/functions/helpers/get-final-encoding-status.d.ts.map +0 -1
- package/dist/functions/helpers/get-final-encoding-status.js.map +0 -1
- package/dist/functions/helpers/get-folder-size.d.ts.map +0 -1
- package/dist/functions/helpers/get-folder-size.js.map +0 -1
- package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts.map +0 -1
- package/dist/functions/helpers/get-lambdas-invoked-stats.js.map +0 -1
- package/dist/functions/helpers/get-output-url-from-metadata.d.ts.map +0 -1
- package/dist/functions/helpers/get-output-url-from-metadata.js.map +0 -1
- package/dist/functions/helpers/get-overall-progress.d.ts.map +0 -1
- package/dist/functions/helpers/get-overall-progress.js.map +0 -1
- package/dist/functions/helpers/get-post-render-data.d.ts.map +0 -1
- package/dist/functions/helpers/get-post-render-data.js.map +0 -1
- package/dist/functions/helpers/get-progress.d.ts.map +0 -1
- package/dist/functions/helpers/get-progress.js.map +0 -1
- package/dist/functions/helpers/get-render-metadata.d.ts.map +0 -1
- package/dist/functions/helpers/get-render-metadata.js.map +0 -1
- package/dist/functions/helpers/get-retry-stats.d.ts.map +0 -1
- package/dist/functions/helpers/get-retry-stats.js.map +0 -1
- package/dist/functions/helpers/get-time-to-finish.d.ts.map +0 -1
- package/dist/functions/helpers/get-time-to-finish.js.map +0 -1
- package/dist/functions/helpers/inspect-errors.d.ts.map +0 -1
- package/dist/functions/helpers/inspect-errors.js.map +0 -1
- package/dist/functions/helpers/io.d.ts.map +0 -1
- package/dist/functions/helpers/io.js.map +0 -1
- package/dist/functions/helpers/is-enosp-err.d.ts.map +0 -1
- package/dist/functions/helpers/is-enosp-err.js.map +0 -1
- package/dist/functions/helpers/is-warm.d.ts.map +0 -1
- package/dist/functions/helpers/is-warm.js.map +0 -1
- package/dist/functions/helpers/min-max.d.ts.map +0 -1
- package/dist/functions/helpers/min-max.js.map +0 -1
- package/dist/functions/helpers/print-cloudwatch-helper.d.ts.map +0 -1
- package/dist/functions/helpers/print-cloudwatch-helper.js.map +0 -1
- package/dist/functions/helpers/print-concurrency-curve.d.ts.map +0 -1
- package/dist/functions/helpers/print-concurrency-curve.js.map +0 -1
- package/dist/functions/helpers/read-with-progress.d.ts.map +0 -1
- package/dist/functions/helpers/read-with-progress.js.map +0 -1
- package/dist/functions/helpers/timer.d.ts.map +0 -1
- package/dist/functions/helpers/timer.js.map +0 -1
- package/dist/functions/helpers/validate-composition.d.ts.map +0 -1
- package/dist/functions/helpers/validate-composition.js.map +0 -1
- package/dist/functions/helpers/write-lambda-error.d.ts.map +0 -1
- package/dist/functions/helpers/write-lambda-error.js.map +0 -1
- package/dist/functions/helpers/write-post-render-data.d.ts.map +0 -1
- package/dist/functions/helpers/write-post-render-data.js.map +0 -1
- package/dist/functions/index.d.ts.map +0 -1
- package/dist/functions/index.js.map +0 -1
- package/dist/functions/info.d.ts.map +0 -1
- package/dist/functions/info.js.map +0 -1
- package/dist/functions/launch.d.ts.map +0 -1
- package/dist/functions/launch.js.map +0 -1
- package/dist/functions/progress.d.ts.map +0 -1
- package/dist/functions/progress.js.map +0 -1
- package/dist/functions/renderer.d.ts.map +0 -1
- package/dist/functions/renderer.js.map +0 -1
- package/dist/functions/start.d.ts.map +0 -1
- package/dist/functions/start.js.map +0 -1
- package/dist/functions/still.d.ts.map +0 -1
- package/dist/functions/still.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internals.d.ts.map +0 -1
- package/dist/internals.js.map +0 -1
- package/dist/pricing/aws-regions.d.ts.map +0 -1
- package/dist/pricing/aws-regions.js.map +0 -1
- package/dist/pricing/price-per-1-s.d.ts.map +0 -1
- package/dist/pricing/price-per-1-s.js.map +0 -1
- package/dist/regions.d.ts.map +0 -1
- package/dist/regions.js.map +0 -1
- package/dist/shared/await.d.ts.map +0 -1
- package/dist/shared/await.js.map +0 -1
- package/dist/shared/aws-clients.d.ts.map +0 -1
- package/dist/shared/aws-clients.js.map +0 -1
- package/dist/shared/bundle-site.d.ts.map +0 -1
- package/dist/shared/bundle-site.js.map +0 -1
- package/dist/shared/call-lambda.d.ts.map +0 -1
- package/dist/shared/call-lambda.js.map +0 -1
- package/dist/shared/check-credentials.d.ts.map +0 -1
- package/dist/shared/check-credentials.js.map +0 -1
- package/dist/shared/chunk.d.ts +0 -2
- package/dist/shared/chunk.d.ts.map +0 -1
- package/dist/shared/chunk.js +0 -12
- package/dist/shared/chunk.js.map +0 -1
- package/dist/shared/constants.d.ts.map +0 -1
- package/dist/shared/constants.js.map +0 -1
- package/dist/shared/convert-to-serve-url.d.ts.map +0 -1
- package/dist/shared/convert-to-serve-url.js.map +0 -1
- package/dist/shared/docs-url.d.ts.map +0 -1
- package/dist/shared/docs-url.js.map +0 -1
- package/dist/shared/function-zip-path.d.ts.map +0 -1
- package/dist/shared/function-zip-path.js.map +0 -1
- package/dist/shared/get-account-id.d.ts.map +0 -1
- package/dist/shared/get-account-id.js.map +0 -1
- package/dist/shared/get-function-version.d.ts.map +0 -1
- package/dist/shared/get-function-version.js.map +0 -1
- package/dist/shared/hosted-layers.d.ts.map +0 -1
- package/dist/shared/hosted-layers.js.map +0 -1
- package/dist/shared/is-in-lambda.d.ts.map +0 -1
- package/dist/shared/is-in-lambda.js.map +0 -1
- package/dist/shared/make-s3-url.d.ts.map +0 -1
- package/dist/shared/make-s3-url.js.map +0 -1
- package/dist/shared/parse-lambda-initialized-key.d.ts.map +0 -1
- package/dist/shared/parse-lambda-initialized-key.js.map +0 -1
- package/dist/shared/parse-lambda-timings-key.d.ts.map +0 -1
- package/dist/shared/parse-lambda-timings-key.js.map +0 -1
- package/dist/shared/random-hash.d.ts.map +0 -1
- package/dist/shared/random-hash.js.map +0 -1
- package/dist/shared/return-values.d.ts.map +0 -1
- package/dist/shared/return-values.js.map +0 -1
- package/dist/shared/sleep.d.ts.map +0 -1
- package/dist/shared/sleep.js.map +0 -1
- package/dist/shared/stream-to-string.d.ts.map +0 -1
- package/dist/shared/stream-to-string.js.map +0 -1
- package/dist/shared/validate-architecture.d.ts.map +0 -1
- package/dist/shared/validate-architecture.js.map +0 -1
- package/dist/shared/validate-aws-region.d.ts.map +0 -1
- package/dist/shared/validate-aws-region.js.map +0 -1
- package/dist/shared/validate-bucketname.d.ts.map +0 -1
- package/dist/shared/validate-bucketname.js.map +0 -1
- package/dist/shared/validate-disk-size-in-mb.d.ts.map +0 -1
- package/dist/shared/validate-disk-size-in-mb.js.map +0 -1
- package/dist/shared/validate-frames-per-lambda.d.ts.map +0 -1
- package/dist/shared/validate-frames-per-lambda.js.map +0 -1
- package/dist/shared/validate-memory-size.d.ts.map +0 -1
- package/dist/shared/validate-memory-size.js.map +0 -1
- package/dist/shared/validate-outname.d.ts.map +0 -1
- package/dist/shared/validate-outname.js.map +0 -1
- package/dist/shared/validate-presign-expiration.d.ts.map +0 -1
- package/dist/shared/validate-presign-expiration.js.map +0 -1
- package/dist/shared/validate-privacy.d.ts.map +0 -1
- package/dist/shared/validate-privacy.js.map +0 -1
- package/dist/shared/validate-retention-period.d.ts.map +0 -1
- package/dist/shared/validate-retention-period.js.map +0 -1
- package/dist/shared/validate-retries.d.ts.map +0 -1
- package/dist/shared/validate-retries.js.map +0 -1
- package/dist/shared/validate-serveurl.d.ts.map +0 -1
- package/dist/shared/validate-serveurl.js.map +0 -1
- package/dist/shared/validate-site-name.d.ts.map +0 -1
- package/dist/shared/validate-site-name.js.map +0 -1
- package/dist/shared/validate-timeout.d.ts.map +0 -1
- package/dist/shared/validate-timeout.js.map +0 -1
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,12 +9,12 @@ 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) => {
|
|
16
|
-
process.env.
|
|
17
|
-
const
|
|
16
|
+
process.env.__RESERVED_IS_INSIDE_REMOTION_LAMBDA = 'true';
|
|
17
|
+
const timeoutInMilliseconds = context.getRemainingTimeInMillis();
|
|
18
18
|
if (!context || !context.invokedFunctionArn) {
|
|
19
19
|
throw new Error('Lambda function unexpectedly does not have context.invokedFunctionArn');
|
|
20
20
|
}
|
|
@@ -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,42 +34,47 @@ 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
|
-
return (0, start_1.startHandler)(params);
|
|
39
|
+
return (0, start_1.startHandler)(params, { expectedBucketOwner: currentUserId });
|
|
38
40
|
}
|
|
39
41
|
if (params.type === constants_1.LambdaRoutines.launch) {
|
|
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,
|
|
52
|
-
|
|
56
|
+
timeoutInMilliseconds,
|
|
53
57
|
});
|
|
54
58
|
}
|
|
55
59
|
if (params.type === constants_1.LambdaRoutines.renderer) {
|
|
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);
|
|
72
79
|
};
|
|
73
80
|
exports.handler = handler;
|
|
74
|
-
//# sourceMappingURL=index.js.map
|
package/dist/functions/info.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { LambdaPayload
|
|
1
|
+
import type { LambdaPayload } from '../shared/constants';
|
|
2
2
|
export declare const infoHandler: (lambdaParams: LambdaPayload) => Promise<{
|
|
3
|
-
version:
|
|
3
|
+
version: string;
|
|
4
4
|
}>;
|
|
5
|
-
//# sourceMappingURL=info.d.ts.map
|
package/dist/functions/info.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.infoHandler = void 0;
|
|
4
|
+
const version_1 = require("remotion/version");
|
|
4
5
|
const constants_1 = require("../shared/constants");
|
|
5
6
|
const infoHandler = (lambdaParams) => {
|
|
6
7
|
if (lambdaParams.type !== constants_1.LambdaRoutines.info) {
|
|
7
8
|
throw new TypeError('Expected info type');
|
|
8
9
|
}
|
|
9
10
|
const returnValue = {
|
|
10
|
-
version:
|
|
11
|
+
version: version_1.VERSION,
|
|
11
12
|
};
|
|
12
13
|
return Promise.resolve(returnValue);
|
|
13
14
|
};
|
|
14
15
|
exports.infoHandler = infoHandler;
|
|
15
|
-
//# sourceMappingURL=info.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { LambdaPayload } from '../shared/constants';
|
|
1
|
+
import type { LambdaPayload } from '../shared/constants';
|
|
2
2
|
declare type Options = {
|
|
3
3
|
expectedBucketOwner: string;
|
|
4
4
|
};
|
|
5
5
|
export declare const launchHandler: (params: LambdaPayload, options: Options) => Promise<void>;
|
|
6
6
|
export {};
|
|
7
|
-
//# sourceMappingURL=launch.d.ts.map
|
package/dist/functions/launch.js
CHANGED
|
@@ -8,9 +8,11 @@ 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 remotion_1 = require("remotion");
|
|
11
|
+
const version_1 = require("remotion/version");
|
|
11
12
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
12
13
|
const constants_1 = require("../shared/constants");
|
|
13
14
|
const docs_url_1 = require("../shared/docs-url");
|
|
15
|
+
const invoke_webhook_1 = require("../shared/invoke-webhook");
|
|
14
16
|
const make_s3_url_1 = require("../shared/make-s3-url");
|
|
15
17
|
const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lambda");
|
|
16
18
|
const validate_outname_1 = require("../shared/validate-outname");
|
|
@@ -28,6 +30,7 @@ const concat_videos_1 = require("./helpers/concat-videos");
|
|
|
28
30
|
const create_post_render_data_1 = require("./helpers/create-post-render-data");
|
|
29
31
|
const delete_chunks_1 = require("./helpers/delete-chunks");
|
|
30
32
|
const expected_out_name_1 = require("./helpers/expected-out-name");
|
|
33
|
+
const find_output_file_in_bucket_1 = require("./helpers/find-output-file-in-bucket");
|
|
31
34
|
const get_browser_instance_1 = require("./helpers/get-browser-instance");
|
|
32
35
|
const get_current_region_1 = require("./helpers/get-current-region");
|
|
33
36
|
const get_files_to_delete_1 = require("./helpers/get-files-to-delete");
|
|
@@ -39,14 +42,78 @@ const timer_1 = require("./helpers/timer");
|
|
|
39
42
|
const validate_composition_1 = require("./helpers/validate-composition");
|
|
40
43
|
const write_lambda_error_1 = require("./helpers/write-lambda-error");
|
|
41
44
|
const write_post_render_data_1 = require("./helpers/write-post-render-data");
|
|
45
|
+
const callFunctionWithRetry = async (payload, retries = 0) => {
|
|
46
|
+
try {
|
|
47
|
+
await (0, aws_clients_1.getLambdaClient)((0, get_current_region_1.getCurrentRegionInFunction)()).send(new client_lambda_1.InvokeCommand({
|
|
48
|
+
FunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
|
|
49
|
+
// @ts-expect-error
|
|
50
|
+
Payload: JSON.stringify(payload),
|
|
51
|
+
InvocationType: 'Event',
|
|
52
|
+
}), {});
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
if (err.name === 'ResourceConflictException') {
|
|
56
|
+
if (retries > 10) {
|
|
57
|
+
throw err;
|
|
58
|
+
}
|
|
59
|
+
await new Promise((resolve) => {
|
|
60
|
+
setTimeout(resolve, 1000);
|
|
61
|
+
});
|
|
62
|
+
return callFunctionWithRetry(payload, retries + 1);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
42
66
|
const innerLaunchHandler = async (params, options) => {
|
|
43
|
-
var _a, _b;
|
|
67
|
+
var _a, _b, _c, _d;
|
|
44
68
|
if (params.type !== constants_1.LambdaRoutines.launch) {
|
|
45
69
|
throw new Error('Expected launch type');
|
|
46
70
|
}
|
|
47
71
|
const startedDate = Date.now();
|
|
72
|
+
let webhookInvoked = false;
|
|
73
|
+
const webhookDueToTimeout = setTimeout(async () => {
|
|
74
|
+
if (params.webhook && !webhookInvoked) {
|
|
75
|
+
try {
|
|
76
|
+
await (0, invoke_webhook_1.invokeWebhook)({
|
|
77
|
+
url: params.webhook.url,
|
|
78
|
+
secret: params.webhook.secret,
|
|
79
|
+
payload: {
|
|
80
|
+
type: 'timeout',
|
|
81
|
+
renderId: params.renderId,
|
|
82
|
+
expectedBucketOwner: options.expectedBucketOwner,
|
|
83
|
+
bucketName: params.bucketName,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
webhookInvoked = true;
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
if (process.env.NODE_ENV === 'test') {
|
|
90
|
+
throw err;
|
|
91
|
+
}
|
|
92
|
+
await (0, write_lambda_error_1.writeLambdaError)({
|
|
93
|
+
bucketName: params.bucketName,
|
|
94
|
+
errorInfo: {
|
|
95
|
+
type: 'webhook',
|
|
96
|
+
message: err.message,
|
|
97
|
+
name: err.name,
|
|
98
|
+
stack: err.stack,
|
|
99
|
+
tmpDir: null,
|
|
100
|
+
frame: 0,
|
|
101
|
+
chunk: 0,
|
|
102
|
+
isFatal: false,
|
|
103
|
+
attempt: 1,
|
|
104
|
+
willRetry: false,
|
|
105
|
+
totalAttempts: 1,
|
|
106
|
+
},
|
|
107
|
+
renderId: params.renderId,
|
|
108
|
+
expectedBucketOwner: options.expectedBucketOwner,
|
|
109
|
+
});
|
|
110
|
+
console.log('Failed to invoke webhook:');
|
|
111
|
+
console.log(err);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}, Math.max(params.timeoutInMilliseconds - 1000, 1000));
|
|
48
115
|
const [browserInstance, optimization] = await Promise.all([
|
|
49
|
-
(0, get_browser_instance_1.getBrowserInstance)(
|
|
116
|
+
(0, get_browser_instance_1.getBrowserInstance)(renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'), params.chromiumOptions),
|
|
50
117
|
(0, s3_optimization_file_1.getOptimization)({
|
|
51
118
|
bucketName: params.bucketName,
|
|
52
119
|
siteId: (0, make_s3_url_1.getServeUrlHash)(params.serveUrl),
|
|
@@ -55,34 +122,46 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
55
122
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
56
123
|
}),
|
|
57
124
|
]);
|
|
125
|
+
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
58
126
|
const comp = await (0, validate_composition_1.validateComposition)({
|
|
59
127
|
serveUrl: params.serveUrl,
|
|
60
128
|
composition: params.composition,
|
|
61
129
|
browserInstance,
|
|
62
130
|
inputProps: params.inputProps,
|
|
131
|
+
envVariables: params.envVariables,
|
|
132
|
+
ffmpegExecutable: null,
|
|
133
|
+
ffprobeExecutable: null,
|
|
134
|
+
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
135
|
+
chromiumOptions: params.chromiumOptions,
|
|
136
|
+
port: null,
|
|
137
|
+
downloadMap,
|
|
63
138
|
});
|
|
64
|
-
remotion_1.Internals.validateDurationInFrames(comp.durationInFrames, 'passed to
|
|
65
|
-
remotion_1.Internals.validateFps(comp.fps, 'passed to
|
|
66
|
-
remotion_1.Internals.validateDimension(comp.height, 'height', 'passed to
|
|
67
|
-
remotion_1.Internals.validateDimension(comp.width, 'width', 'passed to
|
|
139
|
+
remotion_1.Internals.validateDurationInFrames(comp.durationInFrames, 'passed to a Lambda render');
|
|
140
|
+
remotion_1.Internals.validateFps(comp.fps, 'passed to a Lambda render', false);
|
|
141
|
+
remotion_1.Internals.validateDimension(comp.height, 'height', 'passed to a Lambda render');
|
|
142
|
+
remotion_1.Internals.validateDimension(comp.width, 'width', 'passed to a Lambda render');
|
|
143
|
+
renderer_1.RenderInternals.validateConcurrency(params.concurrencyPerLambda, 'concurrencyPerLambda');
|
|
68
144
|
const realFrameRange = renderer_1.RenderInternals.getRealFrameRange(comp.durationInFrames, params.frameRange);
|
|
69
|
-
const frameCount = renderer_1.RenderInternals.
|
|
70
|
-
const framesPerLambda = (_a = params.framesPerLambda) !== null && _a !== void 0 ? _a : (0, best_frames_per_lambda_param_1.bestFramesPerLambdaParam)(frameCount);
|
|
71
|
-
(0, validate_frames_per_lambda_1.validateFramesPerLambda)(
|
|
72
|
-
|
|
145
|
+
const frameCount = renderer_1.RenderInternals.getFramesToRender(realFrameRange, params.everyNthFrame);
|
|
146
|
+
const framesPerLambda = (_a = params.framesPerLambda) !== null && _a !== void 0 ? _a : (0, best_frames_per_lambda_param_1.bestFramesPerLambdaParam)(frameCount.length);
|
|
147
|
+
(0, validate_frames_per_lambda_1.validateFramesPerLambda)({
|
|
148
|
+
framesPerLambda,
|
|
149
|
+
durationInFrames: frameCount.length,
|
|
150
|
+
});
|
|
151
|
+
const chunkCount = Math.ceil(frameCount.length / framesPerLambda);
|
|
73
152
|
if (chunkCount > constants_1.MAX_FUNCTIONS_PER_RENDER) {
|
|
74
153
|
throw new Error(`Too many functions: This render would cause ${chunkCount} functions to spawn. We limit this amount to ${constants_1.MAX_FUNCTIONS_PER_RENDER} functions as more would result in diminishing returns. Values set: frameCount = ${frameCount}, framesPerLambda=${framesPerLambda}. See ${docs_url_1.DOCS_URL}/docs/lambda/concurrency for how this parameter is calculated.`);
|
|
75
154
|
}
|
|
76
|
-
(0, validate_outname_1.validateOutname)(params.outName);
|
|
155
|
+
(0, validate_outname_1.validateOutname)(params.outName, params.codec);
|
|
77
156
|
(0, validate_privacy_1.validatePrivacy)(params.privacy);
|
|
78
157
|
renderer_1.RenderInternals.validatePuppeteerTimeout(params.timeoutInMilliseconds);
|
|
79
158
|
const { chunks, didUseOptimization } = (0, plan_frame_ranges_1.planFrameRanges)({
|
|
80
|
-
chunkCount,
|
|
81
159
|
framesPerLambda,
|
|
82
160
|
optimization,
|
|
83
161
|
// TODO: Re-enable chunk optimization later
|
|
84
162
|
shouldUseOptimization: false,
|
|
85
163
|
frameRange: realFrameRange,
|
|
164
|
+
everyNthFrame: params.everyNthFrame,
|
|
86
165
|
});
|
|
87
166
|
const sortedChunks = chunks.slice().sort((a, b) => a[0] - b[0]);
|
|
88
167
|
const invokers = Math.round(Math.sqrt(chunks.length));
|
|
@@ -104,18 +183,21 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
104
183
|
inputProps: params.inputProps,
|
|
105
184
|
renderId: params.renderId,
|
|
106
185
|
imageFormat: params.imageFormat,
|
|
107
|
-
codec: params.codec,
|
|
186
|
+
codec: params.codec === 'h264' ? 'h264-mkv' : params.codec,
|
|
108
187
|
crf: params.crf,
|
|
109
188
|
envVariables: params.envVariables,
|
|
110
189
|
pixelFormat: params.pixelFormat,
|
|
111
190
|
proResProfile: params.proResProfile,
|
|
112
191
|
quality: params.quality,
|
|
113
192
|
privacy: params.privacy,
|
|
114
|
-
logLevel: (_a = params.logLevel) !== null && _a !== void 0 ? _a :
|
|
193
|
+
logLevel: (_a = params.logLevel) !== null && _a !== void 0 ? _a : 'info',
|
|
115
194
|
attempt: 1,
|
|
116
195
|
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
117
196
|
chromiumOptions: params.chromiumOptions,
|
|
118
197
|
scale: params.scale,
|
|
198
|
+
everyNthFrame: params.everyNthFrame,
|
|
199
|
+
concurrencyPerLambda: params.concurrencyPerLambda,
|
|
200
|
+
muted: params.muted,
|
|
119
201
|
};
|
|
120
202
|
return payload;
|
|
121
203
|
});
|
|
@@ -138,13 +220,37 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
138
220
|
type: 'video',
|
|
139
221
|
imageFormat: params.imageFormat,
|
|
140
222
|
inputProps: params.inputProps,
|
|
141
|
-
lambdaVersion:
|
|
223
|
+
lambdaVersion: version_1.VERSION,
|
|
142
224
|
framesPerLambda,
|
|
143
225
|
memorySizeInMb: Number(process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE),
|
|
144
226
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
145
227
|
renderId: params.renderId,
|
|
146
228
|
outName: (_b = params.outName) !== null && _b !== void 0 ? _b : undefined,
|
|
229
|
+
privacy: params.privacy,
|
|
147
230
|
};
|
|
231
|
+
const { key, renderBucketName, customCredentials } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, params.bucketName, typeof params.outName === 'string' || typeof params.outName === 'undefined'
|
|
232
|
+
? null
|
|
233
|
+
: (_d = (_c = params.outName) === null || _c === void 0 ? void 0 : _c.s3OutputProvider) !== null && _d !== void 0 ? _d : null);
|
|
234
|
+
const output = await (0, find_output_file_in_bucket_1.findOutputFileInBucket)({
|
|
235
|
+
bucketName: params.bucketName,
|
|
236
|
+
customCredentials,
|
|
237
|
+
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
238
|
+
renderMetadata,
|
|
239
|
+
});
|
|
240
|
+
if (output) {
|
|
241
|
+
if (params.overwrite) {
|
|
242
|
+
console.info('Deleting', { bucketName: renderBucketName, key }, 'because it already existed and will be overwritten');
|
|
243
|
+
await (0, io_1.lambdaDeleteFile)({
|
|
244
|
+
bucketName: renderBucketName,
|
|
245
|
+
customCredentials,
|
|
246
|
+
key,
|
|
247
|
+
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
throw new TypeError(`Output file "${key}" in bucket "${renderBucketName}" in region "${(0, get_current_region_1.getCurrentRegionInFunction)()}" already exists. Delete it before re-rendering, or use the overwrite option to delete it before render."`);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
148
254
|
await (0, io_1.lambdaWriteFile)({
|
|
149
255
|
bucketName: params.bucketName,
|
|
150
256
|
key: (0, constants_1.renderMetadataKey)(params.renderId),
|
|
@@ -152,22 +258,19 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
152
258
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
153
259
|
privacy: 'private',
|
|
154
260
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
261
|
+
downloadBehavior: null,
|
|
262
|
+
customCredentials: null,
|
|
155
263
|
});
|
|
156
264
|
await Promise.all(lambdaPayloads.map(async (payload, index) => {
|
|
157
265
|
const callingLambdaTimer = (0, timer_1.timer)('Calling chunk ' + index);
|
|
158
|
-
await (
|
|
159
|
-
FunctionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
|
|
160
|
-
// @ts-expect-error
|
|
161
|
-
Payload: JSON.stringify(payload),
|
|
162
|
-
InvocationType: 'Event',
|
|
163
|
-
}), {});
|
|
266
|
+
await callFunctionWithRetry(payload);
|
|
164
267
|
callingLambdaTimer.end();
|
|
165
268
|
}));
|
|
166
269
|
reqSend.end();
|
|
167
270
|
let lastProgressUploaded = 0;
|
|
168
271
|
let encodingStop = null;
|
|
169
272
|
const onProgress = (framesEncoded, start) => {
|
|
170
|
-
const relativeProgress = framesEncoded / frameCount;
|
|
273
|
+
const relativeProgress = framesEncoded / frameCount.length;
|
|
171
274
|
const deltaSinceLastProgressUploaded = relativeProgress - lastProgressUploaded;
|
|
172
275
|
if (relativeProgress === 1) {
|
|
173
276
|
encodingStop = Date.now();
|
|
@@ -178,7 +281,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
178
281
|
lastProgressUploaded = relativeProgress;
|
|
179
282
|
const encodingProgress = {
|
|
180
283
|
framesEncoded,
|
|
181
|
-
totalFrames: frameCount,
|
|
284
|
+
totalFrames: frameCount.length,
|
|
182
285
|
doneIn: encodingStop ? encodingStop - start : null,
|
|
183
286
|
timeToInvoke: null,
|
|
184
287
|
};
|
|
@@ -189,6 +292,8 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
189
292
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
190
293
|
privacy: 'private',
|
|
191
294
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
295
|
+
downloadBehavior: null,
|
|
296
|
+
customCredentials: null,
|
|
192
297
|
}).catch((err) => {
|
|
193
298
|
(0, write_lambda_error_1.writeLambdaError)({
|
|
194
299
|
bucketName: params.bucketName,
|
|
@@ -210,20 +315,22 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
210
315
|
});
|
|
211
316
|
});
|
|
212
317
|
};
|
|
318
|
+
const fps = comp.fps / params.everyNthFrame;
|
|
213
319
|
const { outfile, cleanupChunksProm, encodingStart } = await (0, concat_videos_1.concatVideosS3)({
|
|
214
320
|
bucket: params.bucketName,
|
|
215
321
|
expectedFiles: chunkCount,
|
|
216
322
|
onProgress,
|
|
217
|
-
numberOfFrames: frameCount,
|
|
323
|
+
numberOfFrames: frameCount.length,
|
|
218
324
|
renderId: params.renderId,
|
|
219
325
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
220
326
|
codec: params.codec,
|
|
221
327
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
328
|
+
fps,
|
|
329
|
+
numberOfGifLoops: params.numberOfGifLoops,
|
|
222
330
|
});
|
|
223
331
|
if (!encodingStop) {
|
|
224
332
|
encodingStop = Date.now();
|
|
225
333
|
}
|
|
226
|
-
const { key, renderBucketName } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, params.bucketName);
|
|
227
334
|
const outputSize = fs_1.default.statSync(outfile);
|
|
228
335
|
await (0, io_1.lambdaWriteFile)({
|
|
229
336
|
bucketName: renderBucketName,
|
|
@@ -232,6 +339,8 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
232
339
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
233
340
|
privacy: params.privacy,
|
|
234
341
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
342
|
+
downloadBehavior: params.downloadBehavior,
|
|
343
|
+
customCredentials,
|
|
235
344
|
});
|
|
236
345
|
let chunkProm = Promise.resolve();
|
|
237
346
|
// TODO: Enable in a later release
|
|
@@ -254,8 +363,9 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
254
363
|
newTiming: (0, get_profile_duration_1.getProfileDuration)(optimizedProfile),
|
|
255
364
|
createdFromRenderId: params.renderId,
|
|
256
365
|
framesPerLambda,
|
|
257
|
-
lambdaVersion:
|
|
366
|
+
lambdaVersion: version_1.VERSION,
|
|
258
367
|
frameRange: realFrameRange,
|
|
368
|
+
everyNthFrame: params.everyNthFrame,
|
|
259
369
|
},
|
|
260
370
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
261
371
|
compositionId: params.composition,
|
|
@@ -274,10 +384,16 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
274
384
|
}),
|
|
275
385
|
]);
|
|
276
386
|
const finalEncodingProgress = {
|
|
277
|
-
framesEncoded: frameCount,
|
|
278
|
-
totalFrames: frameCount,
|
|
387
|
+
framesEncoded: frameCount.length,
|
|
388
|
+
totalFrames: frameCount.length,
|
|
279
389
|
doneIn: encodingStop ? encodingStop - encodingStart : null,
|
|
280
|
-
timeToInvoke: (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)(
|
|
390
|
+
timeToInvoke: (0, get_lambdas_invoked_stats_1.getLambdasInvokedStats)({
|
|
391
|
+
contents,
|
|
392
|
+
renderId: params.renderId,
|
|
393
|
+
estimatedRenderLambdaInvokations: renderMetadata.estimatedRenderLambdaInvokations,
|
|
394
|
+
checkIfAllLambdasWereInvoked: false,
|
|
395
|
+
startDate: renderMetadata.startedDate,
|
|
396
|
+
}).timeToInvokeLambdas,
|
|
281
397
|
};
|
|
282
398
|
const finalEncodingProgressProm = (0, io_1.lambdaWriteFile)({
|
|
283
399
|
bucketName: params.bucketName,
|
|
@@ -286,6 +402,8 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
286
402
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
287
403
|
privacy: 'private',
|
|
288
404
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
405
|
+
downloadBehavior: null,
|
|
406
|
+
customCredentials: null,
|
|
289
407
|
});
|
|
290
408
|
const errorExplanationsProm = (0, inspect_errors_1.inspectErrors)({
|
|
291
409
|
contents,
|
|
@@ -304,7 +422,8 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
304
422
|
contents,
|
|
305
423
|
jobs,
|
|
306
424
|
});
|
|
307
|
-
const
|
|
425
|
+
const outputUrl = (0, get_output_url_from_metadata_1.getOutputUrlFromMetadata)(renderMetadata, params.bucketName, customCredentials);
|
|
426
|
+
const postRenderData = (0, create_post_render_data_1.createPostRenderData)({
|
|
308
427
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
309
428
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
310
429
|
renderId: params.renderId,
|
|
@@ -317,7 +436,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
317
436
|
outputFile: {
|
|
318
437
|
lastModified: Date.now(),
|
|
319
438
|
size: outputSize.size,
|
|
320
|
-
url:
|
|
439
|
+
url: outputUrl,
|
|
321
440
|
},
|
|
322
441
|
});
|
|
323
442
|
await finalEncodingProgressProm;
|
|
@@ -328,9 +447,61 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
328
447
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
329
448
|
renderId: params.renderId,
|
|
330
449
|
});
|
|
450
|
+
await (0, io_1.lambdaDeleteFile)({
|
|
451
|
+
bucketName: params.bucketName,
|
|
452
|
+
key: (0, constants_1.initalizedMetadataKey)(params.renderId),
|
|
453
|
+
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
454
|
+
customCredentials: null,
|
|
455
|
+
});
|
|
331
456
|
await Promise.all([cleanupChunksProm, fs_1.default.promises.rm(outfile)]);
|
|
457
|
+
clearTimeout(webhookDueToTimeout);
|
|
458
|
+
if (params.webhook && !webhookInvoked) {
|
|
459
|
+
try {
|
|
460
|
+
await (0, invoke_webhook_1.invokeWebhook)({
|
|
461
|
+
url: params.webhook.url,
|
|
462
|
+
secret: params.webhook.secret,
|
|
463
|
+
payload: {
|
|
464
|
+
type: 'success',
|
|
465
|
+
renderId: params.renderId,
|
|
466
|
+
expectedBucketOwner: options.expectedBucketOwner,
|
|
467
|
+
bucketName: params.bucketName,
|
|
468
|
+
outputUrl,
|
|
469
|
+
lambdaErrors: postRenderData.errors,
|
|
470
|
+
outputFile: postRenderData.outputFile,
|
|
471
|
+
timeToFinish: postRenderData.timeToFinish,
|
|
472
|
+
},
|
|
473
|
+
});
|
|
474
|
+
webhookInvoked = true;
|
|
475
|
+
}
|
|
476
|
+
catch (err) {
|
|
477
|
+
if (process.env.NODE_ENV === 'test') {
|
|
478
|
+
throw err;
|
|
479
|
+
}
|
|
480
|
+
await (0, write_lambda_error_1.writeLambdaError)({
|
|
481
|
+
bucketName: params.bucketName,
|
|
482
|
+
errorInfo: {
|
|
483
|
+
type: 'webhook',
|
|
484
|
+
message: err.message,
|
|
485
|
+
name: err.name,
|
|
486
|
+
stack: err.stack,
|
|
487
|
+
tmpDir: null,
|
|
488
|
+
frame: 0,
|
|
489
|
+
chunk: 0,
|
|
490
|
+
isFatal: false,
|
|
491
|
+
attempt: 1,
|
|
492
|
+
willRetry: false,
|
|
493
|
+
totalAttempts: 1,
|
|
494
|
+
},
|
|
495
|
+
renderId: params.renderId,
|
|
496
|
+
expectedBucketOwner: options.expectedBucketOwner,
|
|
497
|
+
});
|
|
498
|
+
console.log('Failed to invoke webhook:');
|
|
499
|
+
console.log(err);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
332
502
|
};
|
|
333
503
|
const launchHandler = async (params, options) => {
|
|
504
|
+
var _a, _b;
|
|
334
505
|
if (params.type !== constants_1.LambdaRoutines.launch) {
|
|
335
506
|
throw new Error('Expected launch type');
|
|
336
507
|
}
|
|
@@ -338,6 +509,9 @@ const launchHandler = async (params, options) => {
|
|
|
338
509
|
await innerLaunchHandler(params, options);
|
|
339
510
|
}
|
|
340
511
|
catch (err) {
|
|
512
|
+
if (process.env.NODE_ENV === 'test') {
|
|
513
|
+
throw err;
|
|
514
|
+
}
|
|
341
515
|
console.log('Error occurred', err);
|
|
342
516
|
await (0, write_lambda_error_1.writeLambdaError)({
|
|
343
517
|
bucketName: params.bucketName,
|
|
@@ -357,7 +531,50 @@ const launchHandler = async (params, options) => {
|
|
|
357
531
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
358
532
|
renderId: params.renderId,
|
|
359
533
|
});
|
|
534
|
+
if ((_a = params.webhook) === null || _a === void 0 ? void 0 : _a.url) {
|
|
535
|
+
try {
|
|
536
|
+
await (0, invoke_webhook_1.invokeWebhook)({
|
|
537
|
+
url: params.webhook.url,
|
|
538
|
+
secret: (_b = params.webhook.secret) !== null && _b !== void 0 ? _b : null,
|
|
539
|
+
payload: {
|
|
540
|
+
type: 'error',
|
|
541
|
+
renderId: params.renderId,
|
|
542
|
+
expectedBucketOwner: options.expectedBucketOwner,
|
|
543
|
+
bucketName: params.bucketName,
|
|
544
|
+
errors: [err].map((e) => ({
|
|
545
|
+
message: e.message,
|
|
546
|
+
name: e.name,
|
|
547
|
+
stack: e.stack,
|
|
548
|
+
})),
|
|
549
|
+
},
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
catch (error) {
|
|
553
|
+
if (process.env.NODE_ENV === 'test') {
|
|
554
|
+
throw error;
|
|
555
|
+
}
|
|
556
|
+
await (0, write_lambda_error_1.writeLambdaError)({
|
|
557
|
+
bucketName: params.bucketName,
|
|
558
|
+
errorInfo: {
|
|
559
|
+
type: 'webhook',
|
|
560
|
+
message: err.message,
|
|
561
|
+
name: err.name,
|
|
562
|
+
stack: err.stack,
|
|
563
|
+
tmpDir: null,
|
|
564
|
+
frame: 0,
|
|
565
|
+
chunk: 0,
|
|
566
|
+
isFatal: false,
|
|
567
|
+
attempt: 1,
|
|
568
|
+
willRetry: false,
|
|
569
|
+
totalAttempts: 1,
|
|
570
|
+
},
|
|
571
|
+
renderId: params.renderId,
|
|
572
|
+
expectedBucketOwner: options.expectedBucketOwner,
|
|
573
|
+
});
|
|
574
|
+
console.log('Failed to invoke webhook:');
|
|
575
|
+
console.log(error);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
360
578
|
}
|
|
361
579
|
};
|
|
362
580
|
exports.launchHandler = launchHandler;
|
|
363
|
-
//# sourceMappingURL=launch.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { LambdaPayload, RenderProgress } from '../shared/constants';
|
|
1
|
+
import type { LambdaPayload, RenderProgress } from '../shared/constants';
|
|
2
2
|
declare type Options = {
|
|
3
3
|
expectedBucketOwner: string;
|
|
4
|
-
|
|
4
|
+
timeoutInMilliseconds: number;
|
|
5
5
|
};
|
|
6
6
|
export declare const progressHandler: (lambdaParams: LambdaPayload, options: Options) => Promise<RenderProgress>;
|
|
7
7
|
export {};
|
|
8
|
-
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.progressHandler = void 0;
|
|
4
|
+
const version_1 = require("remotion/version");
|
|
4
5
|
const constants_1 = require("../shared/constants");
|
|
5
6
|
const get_current_region_1 = require("./helpers/get-current-region");
|
|
6
7
|
const get_progress_1 = require("./helpers/get-progress");
|
|
7
8
|
const progressHandler = (lambdaParams, options) => {
|
|
9
|
+
var _a;
|
|
8
10
|
if (lambdaParams.type !== constants_1.LambdaRoutines.status) {
|
|
9
11
|
throw new TypeError('Expected status type');
|
|
10
12
|
}
|
|
13
|
+
if (lambdaParams.version !== version_1.VERSION) {
|
|
14
|
+
if (!lambdaParams.version) {
|
|
15
|
+
throw new Error(`Version mismatch: When calling getRenderProgress(), the deployed Lambda function had version ${version_1.VERSION} but the @remotion/lambda package is an older version. Align the versions.`);
|
|
16
|
+
}
|
|
17
|
+
throw new Error(`Version mismatch: When calling getRenderProgress(), get deployed Lambda function had version ${version_1.VERSION} and the @remotion/lambda package has version ${lambdaParams.version}. Align the versions.`);
|
|
18
|
+
}
|
|
11
19
|
return (0, get_progress_1.getProgress)({
|
|
12
20
|
bucketName: lambdaParams.bucketName,
|
|
13
21
|
renderId: lambdaParams.renderId,
|
|
14
22
|
expectedBucketOwner: options.expectedBucketOwner,
|
|
15
23
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
16
24
|
memorySizeInMb: Number(process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE),
|
|
17
|
-
|
|
25
|
+
timeoutInMilliseconds: options.timeoutInMilliseconds,
|
|
26
|
+
customCredentials: (_a = lambdaParams.s3OutputProvider) !== null && _a !== void 0 ? _a : null,
|
|
18
27
|
});
|
|
19
28
|
};
|
|
20
29
|
exports.progressHandler = progressHandler;
|
|
21
|
-
//# sourceMappingURL=progress.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { LambdaPayload } from '../shared/constants';
|
|
1
|
+
import type { LambdaPayload } from '../shared/constants';
|
|
2
2
|
declare type Options = {
|
|
3
3
|
expectedBucketOwner: string;
|
|
4
4
|
isWarm: boolean;
|
|
5
5
|
};
|
|
6
6
|
export declare const rendererHandler: (params: LambdaPayload, options: Options) => Promise<void>;
|
|
7
7
|
export {};
|
|
8
|
-
//# sourceMappingURL=renderer.d.ts.map
|