@remotion/lambda 4.0.0-alpha.4 → 4.0.0-alpha10
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/LICENSE.md +8 -8
- package/dist/admin/bundle-lambda.d.ts +0 -0
- package/dist/admin/bundle-lambda.js +24 -13
- package/dist/admin/generate-etag-list.d.ts +1 -0
- package/dist/admin/generate-etag-list.js +14 -0
- package/dist/admin/make-layer-public.d.ts +0 -0
- package/dist/admin/make-layer-public.js +61 -67
- package/dist/api/bucket-exists.d.ts +0 -0
- package/dist/api/bucket-exists.js +1 -1
- package/dist/api/clean-items.d.ts +0 -0
- package/dist/api/clean-items.js +2 -2
- package/dist/api/create-bucket.d.ts +0 -0
- package/dist/api/create-bucket.js +35 -2
- package/dist/api/create-function.d.ts +1 -3
- package/dist/api/create-function.js +27 -6
- package/dist/api/delete-function.d.ts +3 -3
- package/dist/api/delete-function.js +3 -3
- package/dist/api/delete-render.d.ts +19 -0
- package/dist/api/delete-render.js +66 -0
- package/dist/api/delete-site.d.ts +5 -5
- package/dist/api/delete-site.js +5 -10
- package/dist/api/deploy-function.d.ts +9 -11
- package/dist/api/deploy-function.js +32 -33
- package/dist/api/deploy-site.d.ts +13 -3
- package/dist/api/deploy-site.js +60 -23
- package/dist/api/download-media.d.ts +12 -3
- package/dist/api/download-media.js +18 -10
- package/dist/api/estimate-price.d.ts +2 -4
- package/dist/api/estimate-price.js +4 -10
- package/dist/api/get-aws-client.d.ts +7 -3
- package/dist/api/get-aws-client.js +10 -3
- package/dist/api/get-buckets.d.ts +0 -0
- package/dist/api/get-buckets.js +27 -10
- package/dist/api/get-compositions-on-lambda.d.ts +31 -0
- package/dist/api/get-compositions-on-lambda.js +56 -0
- package/dist/api/get-function-info.d.ts +2 -3
- package/dist/api/get-function-info.js +1 -1
- package/dist/api/get-functions.d.ts +4 -6
- package/dist/api/get-functions.js +10 -11
- package/dist/api/get-or-create-bucket.d.ts +4 -4
- package/dist/api/get-or-create-bucket.js +10 -18
- package/dist/api/get-regions.d.ts +6 -2
- package/dist/api/get-regions.js +6 -3
- package/dist/api/get-render-progress.d.ts +5 -2
- package/dist/api/get-render-progress.js +7 -8
- package/dist/api/get-sites.d.ts +1 -2
- package/dist/api/get-sites.js +1 -2
- 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 -22
- package/dist/api/iam-validation/simulate.d.ts +1 -1
- package/dist/api/iam-validation/simulate.js +27 -6
- 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 +1 -1
- package/dist/api/iam-validation/user-permissions.js +3 -8
- package/dist/api/make-lambda-payload.d.ts +5 -0
- package/dist/api/make-lambda-payload.js +77 -0
- package/dist/api/mock-functions.d.ts +4 -5
- package/dist/api/mock-functions.js +0 -0
- package/dist/api/presign-url.d.ts +4 -5
- package/dist/api/presign-url.js +9 -4
- package/dist/api/render-media-on-lambda.d.ts +36 -14
- package/dist/api/render-media-on-lambda.js +43 -51
- package/dist/api/render-still-on-lambda.d.ts +14 -4
- package/dist/api/render-still-on-lambda.js +64 -32
- package/dist/api/speculate-function-name.d.ts +14 -0
- package/dist/api/speculate-function-name.js +22 -0
- package/dist/api/upload-dir.d.ts +4 -3
- package/dist/api/upload-dir.js +55 -52
- 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 +8 -4
- package/dist/cli/args.js +1 -5
- package/dist/cli/commands/compositions/index.d.ts +2 -0
- package/dist/cli/commands/compositions/index.js +44 -0
- package/dist/cli/commands/functions/deploy.d.ts +0 -0
- package/dist/cli/commands/functions/deploy.js +17 -16
- package/dist/cli/commands/functions/index.d.ts +0 -0
- package/dist/cli/commands/functions/index.js +16 -17
- package/dist/cli/commands/functions/ls.d.ts +0 -0
- package/dist/cli/commands/functions/ls.js +17 -10
- package/dist/cli/commands/functions/rm.d.ts +0 -0
- package/dist/cli/commands/functions/rm.js +20 -7
- package/dist/cli/commands/functions/rmall.d.ts +0 -0
- package/dist/cli/commands/functions/rmall.js +20 -8
- 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 +30 -10
- package/dist/cli/commands/quotas/index.d.ts +0 -0
- package/dist/cli/commands/quotas/index.js +8 -9
- 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 +6 -2
- package/dist/cli/commands/render/progress.d.ts +7 -3
- package/dist/cli/commands/render/progress.js +55 -45
- package/dist/cli/commands/render/render.d.ts +1 -1
- package/dist/cli/commands/render/render.js +110 -37
- package/dist/cli/commands/sites/create.d.ts +1 -1
- package/dist/cli/commands/sites/create.js +36 -33
- package/dist/cli/commands/sites/index.d.ts +1 -1
- package/dist/cli/commands/sites/index.js +18 -16
- package/dist/cli/commands/sites/ls.d.ts +0 -0
- package/dist/cli/commands/sites/ls.js +9 -10
- package/dist/cli/commands/sites/rm.d.ts +0 -0
- package/dist/cli/commands/sites/rm.js +6 -16
- package/dist/cli/commands/sites/rmall.d.ts +0 -0
- package/dist/cli/commands/sites/rmall.js +5 -16
- package/dist/cli/commands/still.d.ts +1 -1
- package/dist/cli/commands/still.js +55 -30
- package/dist/cli/get-aws-region.d.ts +0 -0
- package/dist/cli/get-aws-region.js +2 -1
- package/dist/cli/help.d.ts +0 -0
- package/dist/cli/help.js +4 -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 +37 -7
- package/dist/cli/helpers/progress-bar.d.ts +9 -4
- package/dist/cli/helpers/progress-bar.js +20 -11
- 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 +1 -1
- package/dist/cli/index.js +23 -12
- package/dist/cli/is-cli.d.ts +0 -0
- package/dist/cli/is-cli.js +0 -0
- package/dist/cli/log.d.ts +14 -0
- package/dist/cli/log.js +0 -0
- package/dist/client.d.ts +10 -2
- package/dist/client.js +11 -1
- package/dist/defaults.d.ts +0 -0
- package/dist/defaults.js +0 -0
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -5
- package/dist/functions/chunk-optimization/plan-frame-ranges.js +2 -15
- package/dist/functions/chunk-optimization/types.d.ts +0 -12
- package/dist/functions/chunk-optimization/types.js +0 -0
- package/dist/functions/compositions.d.ts +8 -0
- package/dist/functions/compositions.js +56 -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 +1 -3
- package/dist/functions/helpers/calculate-price-from-bucket.js +1 -2
- 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 -0
- package/dist/functions/helpers/clean-tmpdir.js +8 -8
- package/dist/functions/helpers/concat-videos.d.ts +13 -5
- package/dist/functions/helpers/concat-videos.js +38 -39
- package/dist/functions/helpers/create-post-render-data.d.ts +0 -0
- package/dist/functions/helpers/create-post-render-data.js +1 -15
- 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 +4 -2
- package/dist/functions/helpers/expected-out-name.js +27 -6
- package/dist/functions/helpers/find-output-file-in-bucket.d.ts +3 -1
- package/dist/functions/helpers/find-output-file-in-bucket.js +17 -9
- 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 +3 -2
- package/dist/functions/helpers/get-chromium-executable-path.d.ts +1 -1
- package/dist/functions/helpers/get-chromium-executable-path.js +8 -6
- 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 +1 -1
- package/dist/functions/helpers/get-current-region.js +0 -0
- 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 +5 -8
- package/dist/functions/helpers/get-encoding-metadata.js +7 -17
- package/dist/functions/helpers/get-files-in-folder.d.ts +0 -0
- package/dist/functions/helpers/get-files-in-folder.js +5 -5
- package/dist/functions/helpers/get-files-to-delete.d.ts +0 -0
- package/dist/functions/helpers/get-files-to-delete.js +1 -1
- package/dist/functions/helpers/get-final-encoding-status.d.ts +2 -4
- package/dist/functions/helpers/get-final-encoding-status.js +1 -4
- 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 -5
- package/dist/functions/helpers/get-lambdas-invoked-stats.js +2 -10
- package/dist/functions/helpers/get-output-url-from-metadata.d.ts +2 -1
- package/dist/functions/helpers/get-output-url-from-metadata.js +2 -2
- package/dist/functions/helpers/get-overall-progress.d.ts +2 -1
- package/dist/functions/helpers/get-overall-progress.js +7 -5
- 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 +4 -2
- package/dist/functions/helpers/get-progress.js +54 -46
- 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-rendered-frames-progress.d.ts +8 -0
- package/dist/functions/helpers/get-rendered-frames-progress.js +37 -0
- package/dist/functions/helpers/get-retry-stats.d.ts +0 -0
- package/dist/functions/helpers/get-retry-stats.js +1 -1
- 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 +24 -2
- package/dist/functions/helpers/io.js +44 -7
- package/dist/functions/helpers/is-enosp-err.d.ts +0 -0
- package/dist/functions/helpers/is-enosp-err.js +1 -1
- package/dist/functions/helpers/is-warm.d.ts +0 -0
- package/dist/functions/helpers/is-warm.js +0 -0
- package/dist/functions/helpers/make-timeout-error.d.ts +8 -0
- package/dist/functions/helpers/make-timeout-error.js +35 -0
- package/dist/functions/helpers/make-timeout-message.d.ts +6 -0
- package/dist/functions/helpers/make-timeout-message.js +31 -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 +0 -0
- 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 +3 -1
- package/dist/functions/helpers/read-with-progress.js +3 -3
- package/dist/functions/helpers/streamify-response.d.ts +16 -0
- package/dist/functions/helpers/streamify-response.js +67 -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 +7 -6
- package/dist/functions/helpers/validate-composition.js +13 -12
- package/dist/functions/helpers/write-lambda-error.d.ts +1 -1
- package/dist/functions/helpers/write-lambda-error.js +1 -0
- package/dist/functions/helpers/write-post-render-data.d.ts +0 -0
- package/dist/functions/helpers/write-post-render-data.js +1 -0
- package/dist/functions/index.d.ts +1 -7
- package/dist/functions/index.js +45 -12
- package/dist/functions/info.d.ts +2 -2
- package/dist/functions/info.js +2 -1
- package/dist/functions/launch.d.ts +1 -0
- package/dist/functions/launch.js +348 -135
- package/dist/functions/progress.d.ts +1 -1
- package/dist/functions/progress.js +10 -1
- package/dist/functions/renderer.d.ts +0 -0
- package/dist/functions/renderer.js +143 -83
- package/dist/functions/start.d.ts +5 -1
- package/dist/functions/start.js +42 -6
- package/dist/functions/still.d.ts +0 -0
- package/dist/functions/still.js +75 -33
- package/dist/index.d.ts +28 -8
- package/dist/index.js +27 -6
- package/dist/internals.d.ts +3 -1
- package/dist/internals.js +3 -0
- package/dist/pricing/aws-regions.d.ts +2 -1
- package/dist/pricing/aws-regions.js +31 -1
- package/dist/pricing/price-per-1-s.d.ts +0 -0
- package/dist/pricing/price-per-1-s.js +413 -39
- 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 +16 -2
- package/dist/shared/aws-clients.js +118 -26
- package/dist/shared/bundle-site.d.ts +2 -1
- package/dist/shared/bundle-site.js +0 -0
- package/dist/shared/call-lambda.d.ts +0 -0
- package/dist/shared/call-lambda.js +27 -2
- package/dist/shared/check-credentials.d.ts +0 -0
- package/dist/shared/check-credentials.js +3 -0
- package/dist/shared/chunk-progress.d.ts +9 -0
- package/dist/shared/chunk-progress.js +2034 -0
- package/dist/shared/cleanup-serialized-input-props.d.ts +7 -0
- package/dist/shared/cleanup-serialized-input-props.js +19 -0
- package/dist/shared/constants.d.ts +147 -71
- package/dist/shared/constants.js +20 -10
- 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 +5 -1
- package/dist/shared/convert-to-serve-url.js +1 -5
- package/dist/shared/deserialize-input-props.d.ts +8 -0
- package/dist/shared/deserialize-input-props.js +26 -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 +1 -1
- package/dist/shared/function-zip-path.js +3 -3
- package/dist/shared/get-account-id.d.ts +0 -0
- package/dist/shared/get-account-id.js +4 -6
- package/dist/shared/get-aws-urls.d.ts +14 -0
- package/dist/shared/get-aws-urls.js +12 -0
- package/dist/shared/get-etag.d.ts +1 -0
- package/dist/shared/get-etag.js +24 -0
- package/dist/shared/get-function-version.d.ts +1 -2
- package/dist/shared/get-function-version.js +0 -0
- package/dist/shared/get-most-expensive-chunks.d.ts +1 -1
- package/dist/shared/get-most-expensive-chunks.js +3 -2
- package/dist/shared/get-s3-operations.d.ts +10 -0
- package/dist/shared/get-s3-operations.js +36 -0
- package/dist/shared/hosted-layers.d.ts +4 -7
- package/dist/shared/hosted-layers.js +210 -284
- package/dist/shared/invoke-webhook.d.ts +46 -0
- package/dist/shared/invoke-webhook.js +89 -0
- package/dist/shared/is-in-lambda.d.ts +0 -0
- package/dist/shared/is-in-lambda.js +5 -1
- 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 +0 -0
- package/dist/shared/make-s3-key.js +2 -2
- package/dist/shared/make-s3-url.d.ts +0 -0
- package/dist/shared/make-s3-url.js +2 -2
- package/dist/shared/p-limit.d.ts +0 -0
- package/dist/shared/p-limit.js +0 -0
- package/dist/shared/parse-chunk-key.d.ts +4 -0
- package/dist/shared/parse-chunk-key.js +14 -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/read-dir.d.ts +9 -0
- package/dist/shared/read-dir.js +57 -0
- package/dist/shared/return-values.d.ts +7 -0
- package/dist/shared/return-values.js +0 -0
- package/dist/shared/serialize-input-props.d.ts +8 -0
- package/dist/shared/serialize-input-props.js +42 -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 +0 -0
- package/dist/shared/truthy.js +0 -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 +5 -0
- package/dist/shared/validate-bucketname.js +19 -1
- 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 +4 -1
- package/dist/shared/validate-frames-per-lambda.js +4 -3
- package/dist/shared/validate-lambda-codec.d.ts +1 -1
- package/dist/shared/validate-lambda-codec.js +1 -1
- 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 +3 -2
- package/dist/shared/validate-outname.js +13 -3
- 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 +1 -1
- package/dist/shared/validate-privacy.js +5 -2
- 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 +89 -65
- package/remotionlambda-arm64.zip +0 -0
- package/.prettierrc.js +0 -14
- package/client.d.ts +0 -1
- package/client.js +0 -1
- 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 +0 -5
- package/dist/api/enable-s3-website.d.ts.map +0 -1
- package/dist/api/enable-s3-website.js +0 -16
- 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 +0 -8
- package/dist/cli/helpers/get-cloudwatch-stream-url.d.ts.map +0 -1
- package/dist/cli/helpers/get-cloudwatch-stream-url.js +0 -7
- 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 +0 -6
- package/dist/functions/chunk-optimization/can-use-optimization.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/can-use-optimization.js +0 -23
- package/dist/functions/chunk-optimization/can-use-optimization.js.map +0 -1
- package/dist/functions/chunk-optimization/collect-data.d.ts +0 -9
- package/dist/functions/chunk-optimization/collect-data.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/collect-data.js +0 -27
- package/dist/functions/chunk-optimization/collect-data.js.map +0 -1
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts +0 -3
- 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 +0 -11
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.js.map +0 -1
- package/dist/functions/chunk-optimization/get-profile-duration.d.ts +0 -3
- package/dist/functions/chunk-optimization/get-profile-duration.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/get-profile-duration.js +0 -18
- package/dist/functions/chunk-optimization/get-profile-duration.js.map +0 -1
- package/dist/functions/chunk-optimization/is-valid-profile.d.ts +0 -2
- package/dist/functions/chunk-optimization/is-valid-profile.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/is-valid-profile.js +0 -12
- package/dist/functions/chunk-optimization/is-valid-profile.js.map +0 -1
- package/dist/functions/chunk-optimization/optimize-invocation-order.d.ts +0 -2
- package/dist/functions/chunk-optimization/optimize-invocation-order.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/optimize-invocation-order.js +0 -19
- package/dist/functions/chunk-optimization/optimize-invocation-order.js.map +0 -1
- package/dist/functions/chunk-optimization/optimize-profile.d.ts +0 -9
- package/dist/functions/chunk-optimization/optimize-profile.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/optimize-profile.js +0 -74
- 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 +0 -17
- package/dist/functions/chunk-optimization/s3-optimization-file.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/s3-optimization-file.js +0 -46
- package/dist/functions/chunk-optimization/s3-optimization-file.js.map +0 -1
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts +0 -7
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/simulate-frame-ranges.js +0 -47
- package/dist/functions/chunk-optimization/simulate-frame-ranges.js.map +0 -1
- package/dist/functions/chunk-optimization/sort-by-duration.d.ts +0 -2
- package/dist/functions/chunk-optimization/sort-by-duration.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/sort-by-duration.js +0 -25
- 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/remotionlambda.zip +0 -0
- package/tsconfig.json +0 -16
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
-
import type { LambdaArchitecture } from '../shared/validate-architecture';
|
|
3
2
|
export declare type DeployFunctionInput = {
|
|
4
3
|
createCloudWatchLogGroup: boolean;
|
|
5
4
|
cloudWatchLogRetentionPeriodInDays?: number;
|
|
6
5
|
region: AwsRegion;
|
|
7
6
|
timeoutInSeconds: number;
|
|
8
7
|
memorySizeInMb: number;
|
|
9
|
-
architecture: LambdaArchitecture;
|
|
10
8
|
diskSizeInMb?: number;
|
|
11
9
|
customRoleArn?: string;
|
|
12
10
|
};
|
|
@@ -16,14 +14,14 @@ export declare type DeployFunctionOutput = {
|
|
|
16
14
|
};
|
|
17
15
|
/**
|
|
18
16
|
* @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.
|
|
19
|
-
* @
|
|
20
|
-
* @param
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
23
|
-
* @param
|
|
24
|
-
* @param
|
|
25
|
-
* @param
|
|
26
|
-
* @param
|
|
17
|
+
* @see [Documentation](https://www.remotion.dev/docs/lambda/deployfunction)
|
|
18
|
+
* @param params.createCloudWatchLogGroup Whether you'd like to create a CloudWatch Log Group to store the logs for this function.
|
|
19
|
+
* @param params.cloudWatchLogRetentionPeriodInDays (optional) The number of days to retain the CloudWatch logs for this function. Default is 14 days.
|
|
20
|
+
* @param params.region The region you want to deploy your function to.
|
|
21
|
+
* @param params.timeoutInSeconds After how many seconds the lambda function should be killed if it does not end itself.
|
|
22
|
+
* @param params.memorySizeInMb How much memory should be allocated to the Lambda function.
|
|
23
|
+
* @param params.architecture The architecture Lambda should run on. One of x86_64 and x64
|
|
24
|
+
* @param params.diskSizeInMb The amount of storage the function should be allocated. The higher, the longer videos you can render. Default 512.
|
|
27
25
|
* @returns {Promise<DeployFunctionOutput>} An object that contains the `functionName` property
|
|
28
26
|
*/
|
|
29
|
-
export declare const deployFunction: (
|
|
27
|
+
export declare const deployFunction: (params: DeployFunctionInput) => Promise<DeployFunctionOutput>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deployFunction = void 0;
|
|
4
|
+
const version_1 = require("remotion/version");
|
|
4
5
|
const get_functions_1 = require("../api/get-functions");
|
|
5
6
|
const constants_1 = require("../shared/constants");
|
|
6
7
|
const function_zip_path_1 = require("../shared/function-zip-path");
|
|
7
8
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
8
|
-
const
|
|
9
|
+
const lambda_version_string_1 = require("../shared/lambda-version-string");
|
|
9
10
|
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
10
11
|
const validate_custom_role_arn_1 = require("../shared/validate-custom-role-arn");
|
|
11
12
|
const validate_disk_size_in_mb_1 = require("../shared/validate-disk-size-in-mb");
|
|
@@ -15,54 +16,52 @@ const validate_timeout_1 = require("../shared/validate-timeout");
|
|
|
15
16
|
const create_function_1 = require("./create-function");
|
|
16
17
|
/**
|
|
17
18
|
* @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.
|
|
18
|
-
* @
|
|
19
|
-
* @param
|
|
20
|
-
* @param
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
23
|
-
* @param
|
|
24
|
-
* @param
|
|
25
|
-
* @param
|
|
19
|
+
* @see [Documentation](https://www.remotion.dev/docs/lambda/deployfunction)
|
|
20
|
+
* @param params.createCloudWatchLogGroup Whether you'd like to create a CloudWatch Log Group to store the logs for this function.
|
|
21
|
+
* @param params.cloudWatchLogRetentionPeriodInDays (optional) The number of days to retain the CloudWatch logs for this function. Default is 14 days.
|
|
22
|
+
* @param params.region The region you want to deploy your function to.
|
|
23
|
+
* @param params.timeoutInSeconds After how many seconds the lambda function should be killed if it does not end itself.
|
|
24
|
+
* @param params.memorySizeInMb How much memory should be allocated to the Lambda function.
|
|
25
|
+
* @param params.architecture The architecture Lambda should run on. One of x86_64 and x64
|
|
26
|
+
* @param params.diskSizeInMb The amount of storage the function should be allocated. The higher, the longer videos you can render. Default 512.
|
|
26
27
|
* @returns {Promise<DeployFunctionOutput>} An object that contains the `functionName` property
|
|
27
28
|
*/
|
|
28
|
-
const deployFunction = async (
|
|
29
|
+
const deployFunction = async (params) => {
|
|
29
30
|
var _a, _b;
|
|
30
|
-
const diskSizeInMb = (_a =
|
|
31
|
-
(0, validate_memory_size_1.validateMemorySize)(
|
|
32
|
-
(0, validate_timeout_1.validateTimeout)(
|
|
33
|
-
(0, validate_aws_region_1.validateAwsRegion)(
|
|
34
|
-
(0, validate_retention_period_1.validateCloudWatchRetentionPeriod)(
|
|
35
|
-
(0, validate_architecture_1.validateArchitecture)(options.architecture);
|
|
31
|
+
const diskSizeInMb = (_a = params.diskSizeInMb) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_EPHEMERAL_STORAGE_IN_MB;
|
|
32
|
+
(0, validate_memory_size_1.validateMemorySize)(params.memorySizeInMb);
|
|
33
|
+
(0, validate_timeout_1.validateTimeout)(params.timeoutInSeconds);
|
|
34
|
+
(0, validate_aws_region_1.validateAwsRegion)(params.region);
|
|
35
|
+
(0, validate_retention_period_1.validateCloudWatchRetentionPeriod)(params.cloudWatchLogRetentionPeriodInDays);
|
|
36
36
|
(0, validate_disk_size_in_mb_1.validateDiskSizeInMb)(diskSizeInMb);
|
|
37
|
-
(0, validate_custom_role_arn_1.validateCustomRoleArn)(
|
|
37
|
+
(0, validate_custom_role_arn_1.validateCustomRoleArn)(params.customRoleArn);
|
|
38
38
|
const fnNameRender = [
|
|
39
|
-
`${constants_1.RENDER_FN_PREFIX}${
|
|
40
|
-
`mem${
|
|
39
|
+
`${constants_1.RENDER_FN_PREFIX}${lambda_version_string_1.LAMBDA_VERSION_STRING}`,
|
|
40
|
+
`mem${params.memorySizeInMb}mb`,
|
|
41
41
|
`disk${diskSizeInMb}mb`,
|
|
42
|
-
`${
|
|
42
|
+
`${params.timeoutInSeconds}sec`,
|
|
43
43
|
].join('-');
|
|
44
|
-
const accountId = await (0, get_account_id_1.getAccountId)({ region:
|
|
44
|
+
const accountId = await (0, get_account_id_1.getAccountId)({ region: params.region });
|
|
45
45
|
const fns = await (0, get_functions_1.getFunctions)({
|
|
46
46
|
compatibleOnly: true,
|
|
47
|
-
region:
|
|
47
|
+
region: params.region,
|
|
48
48
|
});
|
|
49
|
-
const alreadyDeployed = fns.find((f) => f.version ===
|
|
50
|
-
f.memorySizeInMb ===
|
|
51
|
-
f.timeoutInSeconds ===
|
|
49
|
+
const alreadyDeployed = fns.find((f) => f.version === version_1.VERSION &&
|
|
50
|
+
f.memorySizeInMb === params.memorySizeInMb &&
|
|
51
|
+
f.timeoutInSeconds === params.timeoutInSeconds &&
|
|
52
52
|
f.diskSizeInMb === diskSizeInMb);
|
|
53
53
|
const created = await (0, create_function_1.createFunction)({
|
|
54
|
-
createCloudWatchLogGroup:
|
|
55
|
-
region:
|
|
56
|
-
zipFile: function_zip_path_1.
|
|
54
|
+
createCloudWatchLogGroup: params.createCloudWatchLogGroup,
|
|
55
|
+
region: params.region,
|
|
56
|
+
zipFile: function_zip_path_1.FUNCTION_ZIP_ARM64,
|
|
57
57
|
functionName: fnNameRender,
|
|
58
58
|
accountId,
|
|
59
|
-
memorySizeInMb:
|
|
60
|
-
timeoutInSeconds:
|
|
61
|
-
retentionInDays: (_b =
|
|
59
|
+
memorySizeInMb: params.memorySizeInMb,
|
|
60
|
+
timeoutInSeconds: params.timeoutInSeconds,
|
|
61
|
+
retentionInDays: (_b = params.cloudWatchLogRetentionPeriodInDays) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_CLOUDWATCH_RETENTION_PERIOD,
|
|
62
62
|
alreadyCreated: Boolean(alreadyDeployed),
|
|
63
|
-
architecture: options.architecture,
|
|
64
63
|
ephemerealStorageInMb: diskSizeInMb,
|
|
65
|
-
customRoleArn:
|
|
64
|
+
customRoleArn: params.customRoleArn,
|
|
66
65
|
});
|
|
67
66
|
if (!created.FunctionName) {
|
|
68
67
|
throw new Error('Lambda was created but has no name');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WebpackOverrideFn } from 'remotion';
|
|
1
|
+
import type { WebpackOverrideFn } from '@remotion/bundler';
|
|
2
2
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
3
3
|
import type { UploadDirProgress } from './upload-dir';
|
|
4
4
|
export declare type DeploySiteInput = {
|
|
@@ -10,20 +10,30 @@ export declare type DeploySiteInput = {
|
|
|
10
10
|
onBundleProgress?: (progress: number) => void;
|
|
11
11
|
onUploadProgress?: (upload: UploadDirProgress) => void;
|
|
12
12
|
webpackOverride?: WebpackOverrideFn;
|
|
13
|
+
ignoreRegisterRootWarning?: boolean;
|
|
13
14
|
enableCaching?: boolean;
|
|
15
|
+
publicDir?: string | null;
|
|
16
|
+
rootDir?: string;
|
|
17
|
+
bypassBucketNameValidation?: boolean;
|
|
14
18
|
};
|
|
19
|
+
privacy?: 'public' | 'no-acl';
|
|
15
20
|
};
|
|
16
21
|
export declare type DeploySiteOutput = Promise<{
|
|
17
22
|
serveUrl: string;
|
|
18
23
|
siteName: string;
|
|
24
|
+
stats: {
|
|
25
|
+
uploadedFiles: number;
|
|
26
|
+
deletedFiles: number;
|
|
27
|
+
untouchedFiles: number;
|
|
28
|
+
};
|
|
19
29
|
}>;
|
|
20
30
|
/**
|
|
21
31
|
* @description Deploys a Remotion project to an S3 bucket to prepare it for rendering on AWS Lambda.
|
|
22
|
-
* @
|
|
32
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/deploysite)
|
|
23
33
|
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
|
|
24
34
|
* @param {string} params.entryPoint An absolute path to the entry file of your Remotion project.
|
|
25
35
|
* @param {string} params.bucketName The name of the bucket to deploy your project into.
|
|
26
36
|
* @param {string} params.siteName The name of the folder in which the project gets deployed to.
|
|
27
37
|
* @param {object} params.options Further options, see documentation page for this function.
|
|
28
38
|
*/
|
|
29
|
-
export declare const deploySite: ({ bucketName, entryPoint, siteName, options, region, }: DeploySiteInput) => DeploySiteOutput;
|
|
39
|
+
export declare const deploySite: ({ bucketName, entryPoint, siteName, options, region, privacy: passedPrivacy, }: DeploySiteInput) => DeploySiteOutput;
|
package/dist/api/deploy-site.js
CHANGED
|
@@ -1,70 +1,107 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.deploySite = void 0;
|
|
4
|
-
const
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
+
const io_1 = require("../functions/helpers/io");
|
|
5
9
|
const bundle_site_1 = require("../shared/bundle-site");
|
|
6
10
|
const constants_1 = require("../shared/constants");
|
|
7
11
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
12
|
+
const get_s3_operations_1 = require("../shared/get-s3-operations");
|
|
8
13
|
const make_s3_url_1 = require("../shared/make-s3-url");
|
|
9
14
|
const random_hash_1 = require("../shared/random-hash");
|
|
10
15
|
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
11
16
|
const validate_bucketname_1 = require("../shared/validate-bucketname");
|
|
17
|
+
const validate_privacy_1 = require("../shared/validate-privacy");
|
|
12
18
|
const validate_site_name_1 = require("../shared/validate-site-name");
|
|
13
19
|
const bucket_exists_1 = require("./bucket-exists");
|
|
14
|
-
const enable_s3_website_1 = require("./enable-s3-website");
|
|
15
20
|
const upload_dir_1 = require("./upload-dir");
|
|
16
21
|
/**
|
|
17
22
|
* @description Deploys a Remotion project to an S3 bucket to prepare it for rendering on AWS Lambda.
|
|
18
|
-
* @
|
|
23
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/deploysite)
|
|
19
24
|
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
|
|
20
25
|
* @param {string} params.entryPoint An absolute path to the entry file of your Remotion project.
|
|
21
26
|
* @param {string} params.bucketName The name of the bucket to deploy your project into.
|
|
22
27
|
* @param {string} params.siteName The name of the folder in which the project gets deployed to.
|
|
23
28
|
* @param {object} params.options Further options, see documentation page for this function.
|
|
24
29
|
*/
|
|
25
|
-
const deploySite = async ({ bucketName, entryPoint, siteName, options, region, }) => {
|
|
30
|
+
const deploySite = async ({ bucketName, entryPoint, siteName, options, region, privacy: passedPrivacy, }) => {
|
|
26
31
|
var _a, _b, _c, _d;
|
|
27
32
|
(0, validate_aws_region_1.validateAwsRegion)(region);
|
|
28
|
-
(0, validate_bucketname_1.validateBucketName)(bucketName, {
|
|
33
|
+
(0, validate_bucketname_1.validateBucketName)(bucketName, {
|
|
34
|
+
mustStartWithRemotion: !(options === null || options === void 0 ? void 0 : options.bypassBucketNameValidation),
|
|
35
|
+
});
|
|
29
36
|
const siteId = siteName !== null && siteName !== void 0 ? siteName : (0, random_hash_1.randomHash)();
|
|
30
37
|
(0, validate_site_name_1.validateSiteName)(siteId);
|
|
38
|
+
const privacy = passedPrivacy !== null && passedPrivacy !== void 0 ? passedPrivacy : 'public';
|
|
39
|
+
(0, validate_privacy_1.validatePrivacy)(privacy, false);
|
|
40
|
+
const accountId = await (0, get_account_id_1.getAccountId)({ region });
|
|
31
41
|
const bucketExists = await (0, bucket_exists_1.bucketExistsInRegion)({
|
|
32
42
|
bucketName,
|
|
33
43
|
region,
|
|
34
|
-
expectedBucketOwner:
|
|
44
|
+
expectedBucketOwner: accountId,
|
|
35
45
|
});
|
|
36
46
|
if (!bucketExists) {
|
|
37
47
|
throw new Error(`No bucket with the name ${bucketName} exists`);
|
|
38
48
|
}
|
|
39
49
|
const subFolder = (0, constants_1.getSitesKey)(siteId);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
const [files, bundled] = await Promise.all([
|
|
51
|
+
(0, io_1.lambdaLs)({
|
|
52
|
+
bucketName,
|
|
53
|
+
expectedBucketOwner: accountId,
|
|
54
|
+
region,
|
|
55
|
+
prefix: subFolder,
|
|
56
|
+
}),
|
|
57
|
+
(0, bundle_site_1.bundleSite)({
|
|
58
|
+
publicPath: `/${subFolder}/`,
|
|
59
|
+
webpackOverride: (_a = options === null || options === void 0 ? void 0 : options.webpackOverride) !== null && _a !== void 0 ? _a : ((f) => f),
|
|
60
|
+
enableCaching: (_b = options === null || options === void 0 ? void 0 : options.enableCaching) !== null && _b !== void 0 ? _b : true,
|
|
61
|
+
publicDir: options === null || options === void 0 ? void 0 : options.publicDir,
|
|
62
|
+
rootDir: options === null || options === void 0 ? void 0 : options.rootDir,
|
|
63
|
+
ignoreRegisterRootWarning: options === null || options === void 0 ? void 0 : options.ignoreRegisterRootWarning,
|
|
64
|
+
onProgress: (_c = options === null || options === void 0 ? void 0 : options.onBundleProgress) !== null && _c !== void 0 ? _c : (() => undefined),
|
|
65
|
+
entryPoint,
|
|
66
|
+
}),
|
|
67
|
+
]);
|
|
68
|
+
const { toDelete, toUpload, existingCount } = await (0, get_s3_operations_1.getS3DiffOperations)({
|
|
69
|
+
objects: files,
|
|
70
|
+
bundle: bundled,
|
|
71
|
+
prefix: subFolder,
|
|
50
72
|
});
|
|
51
73
|
await Promise.all([
|
|
52
74
|
(0, upload_dir_1.uploadDir)({
|
|
53
75
|
bucket: bucketName,
|
|
54
76
|
region,
|
|
55
|
-
|
|
77
|
+
localDir: bundled,
|
|
56
78
|
onProgress: (_d = options === null || options === void 0 ? void 0 : options.onUploadProgress) !== null && _d !== void 0 ? _d : (() => undefined),
|
|
57
|
-
|
|
58
|
-
privacy: 'public',
|
|
59
|
-
|
|
60
|
-
(0, enable_s3_website_1.enableS3Website)({
|
|
61
|
-
region,
|
|
62
|
-
bucketName,
|
|
79
|
+
keyPrefix: subFolder,
|
|
80
|
+
privacy: privacy !== null && privacy !== void 0 ? privacy : 'public',
|
|
81
|
+
toUpload,
|
|
63
82
|
}),
|
|
83
|
+
Promise.all(toDelete.map((d) => {
|
|
84
|
+
return (0, io_1.lambdaDeleteFile)({
|
|
85
|
+
bucketName,
|
|
86
|
+
customCredentials: null,
|
|
87
|
+
key: d.Key,
|
|
88
|
+
region,
|
|
89
|
+
});
|
|
90
|
+
})),
|
|
64
91
|
]);
|
|
92
|
+
if (!process.env.VITEST) {
|
|
93
|
+
node_fs_1.default.rmSync(bundled, {
|
|
94
|
+
recursive: true,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
65
97
|
return {
|
|
66
98
|
serveUrl: (0, make_s3_url_1.makeS3ServeUrl)({ bucketName, subFolder, region }),
|
|
67
99
|
siteName: siteId,
|
|
100
|
+
stats: {
|
|
101
|
+
uploadedFiles: toUpload.length,
|
|
102
|
+
deletedFiles: toDelete.length,
|
|
103
|
+
untouchedFiles: existingCount,
|
|
104
|
+
},
|
|
68
105
|
};
|
|
69
106
|
};
|
|
70
107
|
exports.deploySite = deploySite;
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import type { LambdaReadFileProgress } from '../functions/helpers/read-with-progress';
|
|
2
2
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
3
|
+
import type { CustomCredentials } from '../shared/aws-clients';
|
|
3
4
|
export declare type DownloadMediaInput = {
|
|
4
5
|
region: AwsRegion;
|
|
5
6
|
bucketName: string;
|
|
6
7
|
renderId: string;
|
|
7
8
|
outPath: string;
|
|
8
9
|
onProgress?: LambdaReadFileProgress;
|
|
10
|
+
customCredentials?: CustomCredentials;
|
|
9
11
|
};
|
|
10
12
|
export declare type DownloadMediaOutput = {
|
|
11
13
|
outputPath: string;
|
|
12
14
|
sizeInBytes: number;
|
|
13
15
|
};
|
|
14
|
-
export declare const downloadMedia: (input: DownloadMediaInput) => Promise<DownloadMediaOutput>;
|
|
15
16
|
/**
|
|
16
|
-
* @
|
|
17
|
+
* @description Downloads a rendered video, audio or still to the disk of the machine this API is called from.
|
|
18
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/downloadmedia)
|
|
19
|
+
* @param params.region The AWS region in which the media resides.
|
|
20
|
+
* @param params.bucketName The `bucketName` that was specified during the render.
|
|
21
|
+
* @param params.renderId The `renderId` that was obtained after triggering the render.
|
|
22
|
+
* @param params.outPath Where to save the media.
|
|
23
|
+
* @param params.onProgress Progress callback function - see docs for details.
|
|
24
|
+
* @param params.customCredentials If the file was saved to a foreign cloud, pass credentials for reading from it.
|
|
25
|
+
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
17
26
|
*/
|
|
18
|
-
export declare const
|
|
27
|
+
export declare const downloadMedia: (input: DownloadMediaInput) => Promise<DownloadMediaOutput>;
|
|
@@ -3,15 +3,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.downloadMedia = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
-
const
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const expected_out_name_1 = require("../functions/helpers/expected-out-name");
|
|
10
10
|
const get_render_metadata_1 = require("../functions/helpers/get-render-metadata");
|
|
11
11
|
const read_with_progress_1 = require("../functions/helpers/read-with-progress");
|
|
12
12
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
13
|
+
/**
|
|
14
|
+
* @description Downloads a rendered video, audio or still to the disk of the machine this API is called from.
|
|
15
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/downloadmedia)
|
|
16
|
+
* @param params.region The AWS region in which the media resides.
|
|
17
|
+
* @param params.bucketName The `bucketName` that was specified during the render.
|
|
18
|
+
* @param params.renderId The `renderId` that was obtained after triggering the render.
|
|
19
|
+
* @param params.outPath Where to save the media.
|
|
20
|
+
* @param params.onProgress Progress callback function - see docs for details.
|
|
21
|
+
* @param params.customCredentials If the file was saved to a foreign cloud, pass credentials for reading from it.
|
|
22
|
+
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
23
|
+
*/
|
|
13
24
|
const downloadMedia = async (input) => {
|
|
14
|
-
var _a;
|
|
25
|
+
var _a, _b;
|
|
15
26
|
const expectedBucketOwner = await (0, get_account_id_1.getAccountId)({
|
|
16
27
|
region: input.region,
|
|
17
28
|
});
|
|
@@ -21,16 +32,17 @@ const downloadMedia = async (input) => {
|
|
|
21
32
|
region: input.region,
|
|
22
33
|
renderId: input.renderId,
|
|
23
34
|
});
|
|
24
|
-
const outputPath =
|
|
35
|
+
const outputPath = node_path_1.default.resolve(process.cwd(), input.outPath);
|
|
25
36
|
renderer_1.RenderInternals.ensureOutputDirectory(outputPath);
|
|
26
|
-
const { key, renderBucketName } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, input.bucketName);
|
|
37
|
+
const { key, renderBucketName, customCredentials } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, input.bucketName, (_a = input.customCredentials) !== null && _a !== void 0 ? _a : null);
|
|
27
38
|
const { sizeInBytes } = await (0, read_with_progress_1.lambdaDownloadFileWithProgress)({
|
|
28
39
|
bucketName: renderBucketName,
|
|
29
40
|
expectedBucketOwner,
|
|
30
41
|
key,
|
|
31
42
|
region: input.region,
|
|
32
|
-
onProgress: (
|
|
43
|
+
onProgress: (_b = input.onProgress) !== null && _b !== void 0 ? _b : (() => undefined),
|
|
33
44
|
outputPath,
|
|
45
|
+
customCredentials,
|
|
34
46
|
});
|
|
35
47
|
return {
|
|
36
48
|
outputPath,
|
|
@@ -38,7 +50,3 @@ const downloadMedia = async (input) => {
|
|
|
38
50
|
};
|
|
39
51
|
};
|
|
40
52
|
exports.downloadMedia = downloadMedia;
|
|
41
|
-
/**
|
|
42
|
-
* @deprecated Renamed to downloadMedia()
|
|
43
|
-
*/
|
|
44
|
-
exports.downloadVideo = exports.downloadMedia;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
-
import type { LambdaArchitecture } from '../shared/validate-architecture';
|
|
3
2
|
export declare type EstimatePriceInput = {
|
|
4
3
|
region: AwsRegion;
|
|
5
4
|
durationInMiliseconds: number;
|
|
6
5
|
memorySizeInMb: number;
|
|
7
6
|
diskSizeInMb: number;
|
|
8
|
-
architecture: LambdaArchitecture;
|
|
9
7
|
lambdasInvoked: number;
|
|
10
8
|
};
|
|
11
9
|
/**
|
|
12
10
|
*
|
|
13
11
|
* @description Calculates the AWS costs incurred for AWS Lambda given the region, execution duration and memory size.
|
|
14
|
-
* @
|
|
12
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/estimateprice)
|
|
15
13
|
* @returns {number} Price in USD
|
|
16
14
|
*/
|
|
17
|
-
export declare const estimatePrice: ({ region, durationInMiliseconds, memorySizeInMb, diskSizeInMb,
|
|
15
|
+
export declare const estimatePrice: ({ region, durationInMiliseconds, memorySizeInMb, diskSizeInMb, lambdasInvoked, }: EstimatePriceInput) => number;
|
|
@@ -3,20 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.estimatePrice = void 0;
|
|
4
4
|
const defaults_1 = require("../defaults");
|
|
5
5
|
const price_per_1_s_1 = require("../pricing/price-per-1-s");
|
|
6
|
-
const validate_architecture_1 = require("../shared/validate-architecture");
|
|
7
6
|
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
8
7
|
const validate_disk_size_in_mb_1 = require("../shared/validate-disk-size-in-mb");
|
|
9
8
|
const validate_memory_size_1 = require("../shared/validate-memory-size");
|
|
10
9
|
/**
|
|
11
10
|
*
|
|
12
11
|
* @description Calculates the AWS costs incurred for AWS Lambda given the region, execution duration and memory size.
|
|
13
|
-
* @
|
|
12
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/estimateprice)
|
|
14
13
|
* @returns {number} Price in USD
|
|
15
14
|
*/
|
|
16
|
-
const estimatePrice = ({ region, durationInMiliseconds, memorySizeInMb, diskSizeInMb,
|
|
15
|
+
const estimatePrice = ({ region, durationInMiliseconds, memorySizeInMb, diskSizeInMb, lambdasInvoked, }) => {
|
|
17
16
|
(0, validate_memory_size_1.validateMemorySize)(memorySizeInMb);
|
|
18
17
|
(0, validate_aws_region_1.validateAwsRegion)(region);
|
|
19
|
-
(0, validate_architecture_1.validateArchitecture)(architecture);
|
|
20
18
|
(0, validate_disk_size_in_mb_1.validateDiskSizeInMb)(diskSizeInMb);
|
|
21
19
|
if (typeof durationInMiliseconds !== 'number') {
|
|
22
20
|
throw new TypeError(`Parameter 'durationInMiliseconds' must be a number but got ${typeof durationInMiliseconds}`);
|
|
@@ -30,15 +28,11 @@ const estimatePrice = ({ region, durationInMiliseconds, memorySizeInMb, diskSize
|
|
|
30
28
|
if (durationInMiliseconds < 0) {
|
|
31
29
|
throw new TypeError(`Parameter 'durationInMiliseconds' must be over 0 but it is ${durationInMiliseconds}.`);
|
|
32
30
|
}
|
|
33
|
-
const durationPrice =
|
|
34
|
-
? price_per_1_s_1.pricing[region]['Lambda Duration'].price
|
|
35
|
-
: price_per_1_s_1.pricing[region]['Lambda Duration-ARM'].price;
|
|
31
|
+
const durationPrice = price_per_1_s_1.pricing[region]['Lambda Duration-ARM'].price;
|
|
36
32
|
// In GB-second
|
|
37
33
|
const timeCostDollars = Number(durationPrice) *
|
|
38
34
|
((memorySizeInMb * durationInMiliseconds) / 1000 / 1024);
|
|
39
|
-
const diskSizePrice =
|
|
40
|
-
? price_per_1_s_1.pricing[region]['Lambda Storage-Duration'].price
|
|
41
|
-
: price_per_1_s_1.pricing[region]['Lambda Storage-Duration-ARM'].price;
|
|
35
|
+
const diskSizePrice = price_per_1_s_1.pricing[region]['Lambda Storage-Duration-ARM'].price;
|
|
42
36
|
const chargedDiskSize = Math.max(0, diskSizeInMb - defaults_1.MIN_EPHEMERAL_STORAGE_IN_MB);
|
|
43
37
|
// In GB-second
|
|
44
38
|
const diskSizeDollars = chargedDiskSize *
|
|
@@ -3,11 +3,13 @@ import * as IamSdk from '@aws-sdk/client-iam';
|
|
|
3
3
|
import * as LambdaSDK from '@aws-sdk/client-lambda';
|
|
4
4
|
import * as S3SDK from '@aws-sdk/client-s3';
|
|
5
5
|
import * as ServiceQuotasSDK from '@aws-sdk/client-service-quotas';
|
|
6
|
+
import * as StsSdk from '@aws-sdk/client-sts';
|
|
6
7
|
import type { AwsRegion } from '../client';
|
|
7
|
-
import type { ServiceMapping } from '../shared/aws-clients';
|
|
8
|
+
import type { CustomCredentials, ServiceMapping } from '../shared/aws-clients';
|
|
8
9
|
export declare type GetAwsClientInput<T extends keyof ServiceMapping> = {
|
|
9
10
|
region: AwsRegion;
|
|
10
11
|
service: T;
|
|
12
|
+
customCredentials?: CustomCredentials | null;
|
|
11
13
|
};
|
|
12
14
|
declare type SdkMapping = {
|
|
13
15
|
s3: typeof S3SDK;
|
|
@@ -15,6 +17,7 @@ declare type SdkMapping = {
|
|
|
15
17
|
iam: typeof IamSdk;
|
|
16
18
|
lambda: typeof LambdaSDK;
|
|
17
19
|
servicequotas: typeof ServiceQuotasSDK;
|
|
20
|
+
sts: typeof StsSdk;
|
|
18
21
|
};
|
|
19
22
|
export declare type GetAwsClientOutput<T extends keyof ServiceMapping> = {
|
|
20
23
|
client: ServiceMapping[T];
|
|
@@ -22,10 +25,11 @@ export declare type GetAwsClientOutput<T extends keyof ServiceMapping> = {
|
|
|
22
25
|
};
|
|
23
26
|
/**
|
|
24
27
|
* @description Gets the full AWS SDK and an instantiated client for an AWS service
|
|
25
|
-
* @
|
|
28
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/getawsclient)
|
|
26
29
|
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
|
|
27
30
|
* @param {string} params.service One of `iam`, `s3`, `cloudwatch`, `iam` or `servicequotas`
|
|
31
|
+
* @param {CustomCredentials} params.customCredentials Pass endpoint and credentials if you want to connect to a different cloud for S3
|
|
28
32
|
* @returns {GetAwsClientOutput<T>} Returns `client` and `sdk` of a AWS service
|
|
29
33
|
*/
|
|
30
|
-
export declare const getAwsClient: <T extends keyof ServiceMapping>({ region, service, }: GetAwsClientInput<T>) => GetAwsClientOutput<T>;
|
|
34
|
+
export declare const getAwsClient: <T extends keyof ServiceMapping>({ region, service, customCredentials, }: GetAwsClientInput<T>) => GetAwsClientOutput<T>;
|
|
31
35
|
export {};
|
|
@@ -29,23 +29,30 @@ const IamSdk = __importStar(require("@aws-sdk/client-iam"));
|
|
|
29
29
|
const LambdaSDK = __importStar(require("@aws-sdk/client-lambda"));
|
|
30
30
|
const S3SDK = __importStar(require("@aws-sdk/client-s3"));
|
|
31
31
|
const ServiceQuotasSDK = __importStar(require("@aws-sdk/client-service-quotas"));
|
|
32
|
+
const StsSdk = __importStar(require("@aws-sdk/client-sts"));
|
|
32
33
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
33
34
|
/**
|
|
34
35
|
* @description Gets the full AWS SDK and an instantiated client for an AWS service
|
|
35
|
-
* @
|
|
36
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/getawsclient)
|
|
36
37
|
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
|
|
37
38
|
* @param {string} params.service One of `iam`, `s3`, `cloudwatch`, `iam` or `servicequotas`
|
|
39
|
+
* @param {CustomCredentials} params.customCredentials Pass endpoint and credentials if you want to connect to a different cloud for S3
|
|
38
40
|
* @returns {GetAwsClientOutput<T>} Returns `client` and `sdk` of a AWS service
|
|
39
41
|
*/
|
|
40
|
-
const getAwsClient = ({ region, service, }) => {
|
|
42
|
+
const getAwsClient = ({ region, service, customCredentials, }) => {
|
|
41
43
|
return {
|
|
42
|
-
client: (0, aws_clients_1.getServiceClient)(
|
|
44
|
+
client: (0, aws_clients_1.getServiceClient)({
|
|
45
|
+
region,
|
|
46
|
+
service,
|
|
47
|
+
customCredentials: customCredentials !== null && customCredentials !== void 0 ? customCredentials : null,
|
|
48
|
+
}),
|
|
43
49
|
sdk: {
|
|
44
50
|
lambda: LambdaSDK,
|
|
45
51
|
cloudwatch: CloudWatchSDK,
|
|
46
52
|
iam: IamSdk,
|
|
47
53
|
s3: S3SDK,
|
|
48
54
|
servicequotas: ServiceQuotasSDK,
|
|
55
|
+
sts: StsSdk,
|
|
49
56
|
}[service],
|
|
50
57
|
};
|
|
51
58
|
};
|
|
File without changes
|
package/dist/api/get-buckets.js
CHANGED
|
@@ -4,26 +4,43 @@ exports.getRemotionS3Buckets = void 0;
|
|
|
4
4
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
5
5
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
6
6
|
const constants_1 = require("../shared/constants");
|
|
7
|
+
const validate_bucketname_1 = require("../shared/validate-bucketname");
|
|
7
8
|
const getRemotionS3Buckets = async (region) => {
|
|
8
|
-
const { Buckets } = await (0, aws_clients_1.getS3Client)(region).send(new client_s3_1.ListBucketsCommand({}));
|
|
9
|
+
const { Buckets } = await (0, aws_clients_1.getS3Client)(region, null).send(new client_s3_1.ListBucketsCommand({}));
|
|
9
10
|
if (!Buckets) {
|
|
10
11
|
return { remotionBuckets: [] };
|
|
11
12
|
}
|
|
12
13
|
const remotionBuckets = Buckets.filter((b) => { var _a; return (_a = b.Name) === null || _a === void 0 ? void 0 : _a.startsWith(constants_1.REMOTION_BUCKET_PREFIX); });
|
|
13
|
-
const locations = await Promise.all(remotionBuckets.map((bucket) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const locations = await Promise.all(remotionBuckets.map(async (bucket) => {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const { region: parsedRegion } = (0, validate_bucketname_1.parseBucketName)(bucket.Name);
|
|
17
|
+
if (parsedRegion) {
|
|
18
|
+
return parsedRegion;
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const result = await (0, aws_clients_1.getS3Client)(region, null).send(new client_s3_1.GetBucketLocationCommand({
|
|
22
|
+
Bucket: bucket.Name,
|
|
23
|
+
}));
|
|
24
|
+
// AWS docs: Buckets in Region us-east-1 have a LocationConstraint of null!!
|
|
25
|
+
return (_a = result.LocationConstraint) !== null && _a !== void 0 ? _a : 'us-east-1';
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
// Sometimes the API returns a bucket even if it was deleted before
|
|
29
|
+
if ((_b = err.stack) === null || _b === void 0 ? void 0 : _b.includes('NoSuchBucket')) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
throw err;
|
|
33
|
+
}
|
|
17
34
|
}));
|
|
18
|
-
const bucketsWithLocation = remotionBuckets
|
|
19
|
-
|
|
35
|
+
const bucketsWithLocation = remotionBuckets
|
|
36
|
+
.map((bucket, i) => {
|
|
20
37
|
return {
|
|
21
38
|
creationDate: bucket.CreationDate.getTime(),
|
|
22
39
|
name: bucket.Name,
|
|
23
|
-
|
|
24
|
-
region: ((_a = locations[i].LocationConstraint) !== null && _a !== void 0 ? _a : 'us-east-1'),
|
|
40
|
+
region: locations[i],
|
|
25
41
|
};
|
|
26
|
-
})
|
|
42
|
+
})
|
|
43
|
+
.filter((b) => b.region);
|
|
27
44
|
return {
|
|
28
45
|
remotionBuckets: bucketsWithLocation.filter((bucket) => {
|
|
29
46
|
return bucket.region === region;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ChromiumOptions, LogLevel } from '@remotion/renderer';
|
|
2
|
+
import type { AnyCompMetadata } from 'remotion';
|
|
3
|
+
import type { AwsRegion } from '../client';
|
|
4
|
+
export declare type GetCompositionsOnLambdaInput = {
|
|
5
|
+
chromiumOptions?: ChromiumOptions;
|
|
6
|
+
region: AwsRegion;
|
|
7
|
+
inputProps: Record<string, unknown>;
|
|
8
|
+
functionName: string;
|
|
9
|
+
serveUrl: string;
|
|
10
|
+
envVariables?: Record<string, string>;
|
|
11
|
+
logLevel?: LogLevel;
|
|
12
|
+
timeoutInMilliseconds?: number;
|
|
13
|
+
forceBucketName?: string;
|
|
14
|
+
dumpBrowserLogs?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare type GetCompositionsOnLambdaOutput = AnyCompMetadata[];
|
|
17
|
+
/**
|
|
18
|
+
* @description Returns the compositions from a serveUrl
|
|
19
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/getcompositionsonlambda)
|
|
20
|
+
* @param params.functionName The name of the Lambda function that should be used
|
|
21
|
+
* @param params.serveUrl The URL of the deployed project
|
|
22
|
+
* @param params.inputProps The input props that should be passed while the compositions are evaluated.
|
|
23
|
+
* @param params.envVariables Object containing environment variables to be inserted into the video environment
|
|
24
|
+
* @param params.region The AWS region in which the video should be rendered.
|
|
25
|
+
* @param params.logLevel The log level of the Lambda function
|
|
26
|
+
* @param params.timeoutInMilliseconds The timeout of the Lambda function
|
|
27
|
+
* @param params.chromiumOptions The options to pass to Chromium
|
|
28
|
+
* @param params.dumpBrowserLogs Whether to print browser logs to CloudWatch
|
|
29
|
+
* @returns The compositions
|
|
30
|
+
*/
|
|
31
|
+
export declare const getCompositionsOnLambda: ({ chromiumOptions, serveUrl, region, inputProps, functionName, envVariables, logLevel, timeoutInMilliseconds, forceBucketName: bucketName, dumpBrowserLogs, }: GetCompositionsOnLambdaInput) => Promise<GetCompositionsOnLambdaOutput>;
|