@remotion/lambda 3.0.0-lambda.25 → 3.0.0-lambda.274
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/.prettierrc.js +15 -0
- package/dist/admin/bundle-lambda.js +2 -1
- package/dist/admin/bundle-lambda.js.map +1 -1
- package/dist/admin/make-layer-public.d.ts +1 -1
- package/dist/admin/make-layer-public.d.ts.map +1 -1
- package/dist/admin/make-layer-public.js +4 -16
- package/dist/admin/make-layer-public.js.map +1 -1
- package/dist/api/bucket-exists.d.ts +1 -1
- package/dist/api/bucket-exists.d.ts.map +1 -1
- package/dist/api/create-bucket.d.ts +1 -1
- package/dist/api/create-bucket.d.ts.map +1 -1
- package/dist/api/create-function.d.ts +5 -3
- package/dist/api/create-function.d.ts.map +1 -1
- package/dist/api/create-function.js +31 -4
- package/dist/api/create-function.js.map +1 -1
- package/dist/api/delete-function.d.ts +7 -6
- package/dist/api/delete-function.d.ts.map +1 -1
- package/dist/api/delete-function.js +2 -2
- package/dist/api/delete-function.js.map +1 -1
- package/dist/api/delete-site.d.ts +19 -9
- package/dist/api/delete-site.d.ts.map +1 -1
- package/dist/api/delete-site.js +10 -1
- package/dist/api/delete-site.js.map +1 -1
- package/dist/api/deploy-function.d.ts +14 -9
- package/dist/api/deploy-function.d.ts.map +1 -1
- package/dist/api/deploy-function.js +15 -4
- package/dist/api/deploy-function.js.map +1 -1
- package/dist/api/deploy-site.d.ts +4 -4
- package/dist/api/deploy-site.d.ts.map +1 -1
- package/dist/api/deploy-site.js +5 -3
- package/dist/api/deploy-site.js.map +1 -1
- package/dist/api/download-media.d.ts +19 -0
- package/dist/api/download-media.d.ts.map +1 -0
- package/dist/api/download-media.js +55 -0
- package/dist/api/download-media.js.map +1 -0
- package/dist/api/enable-s3-website.d.ts +1 -1
- package/dist/api/enable-s3-website.d.ts.map +1 -1
- package/dist/api/enable-s3-website.js +0 -1
- package/dist/api/enable-s3-website.js.map +1 -1
- package/dist/{pricing/calculate-price.d.ts → api/estimate-price.d.ts} +5 -6
- package/dist/api/estimate-price.d.ts.map +1 -0
- package/dist/{pricing/calculate-price.js → api/estimate-price.js} +4 -4
- package/dist/api/estimate-price.js.map +1 -0
- package/dist/api/get-buckets.d.ts.map +1 -1
- package/dist/api/get-buckets.js +1 -7
- package/dist/api/get-buckets.js.map +1 -1
- package/dist/api/get-function-info.d.ts +3 -4
- package/dist/api/get-function-info.d.ts.map +1 -1
- package/dist/api/get-function-info.js +1 -1
- package/dist/api/get-function-info.js.map +1 -1
- package/dist/api/get-functions.d.ts +7 -6
- package/dist/api/get-functions.d.ts.map +1 -1
- package/dist/api/get-functions.js +2 -2
- package/dist/api/get-functions.js.map +1 -1
- package/dist/api/get-or-create-bucket.d.ts +5 -6
- package/dist/api/get-or-create-bucket.d.ts.map +1 -1
- package/dist/api/get-or-create-bucket.js +2 -2
- package/dist/api/get-or-create-bucket.js.map +1 -1
- package/dist/api/get-regions.d.ts +8 -0
- package/dist/api/get-regions.d.ts.map +1 -0
- package/dist/api/get-regions.js +14 -0
- package/dist/api/get-regions.js.map +1 -0
- package/dist/api/get-render-progress.d.ts +12 -10
- package/dist/api/get-render-progress.d.ts.map +1 -1
- package/dist/api/get-render-progress.js +4 -4
- package/dist/api/get-render-progress.js.map +1 -1
- package/dist/api/get-sites.d.ts +13 -4
- package/dist/api/get-sites.d.ts.map +1 -1
- package/dist/api/get-sites.js +15 -4
- package/dist/api/get-sites.js.map +1 -1
- package/dist/api/iam-validation/role-permissions.d.ts +2 -2
- package/dist/api/iam-validation/role-permissions.d.ts.map +1 -1
- package/dist/api/iam-validation/role-permissions.js +9 -4
- package/dist/api/iam-validation/role-permissions.js.map +1 -1
- package/dist/api/iam-validation/simulate-rule.d.ts +1 -0
- package/dist/api/iam-validation/simulate-rule.d.ts.map +1 -1
- package/dist/api/iam-validation/simulate-rule.js +42 -29
- package/dist/api/iam-validation/simulate-rule.js.map +1 -1
- package/dist/api/iam-validation/simulate.d.ts +14 -5
- package/dist/api/iam-validation/simulate.d.ts.map +1 -1
- package/dist/api/iam-validation/simulate.js +11 -4
- package/dist/api/iam-validation/simulate.js.map +1 -1
- package/dist/api/iam-validation/suggested-policy.d.ts +3 -2
- package/dist/api/iam-validation/suggested-policy.d.ts.map +1 -1
- package/dist/api/iam-validation/suggested-policy.js +7 -6
- package/dist/api/iam-validation/suggested-policy.js.map +1 -1
- package/dist/api/iam-validation/user-permissions.d.ts +7 -0
- package/dist/api/iam-validation/user-permissions.d.ts.map +1 -0
- package/dist/api/iam-validation/{required-permissions.js → user-permissions.js} +28 -16
- package/dist/api/iam-validation/user-permissions.js.map +1 -0
- package/dist/api/mock-functions.d.ts +1 -1
- package/dist/api/mock-functions.d.ts.map +1 -1
- package/dist/api/{render-video-on-lambda.d.ts → render-media-on-lambda.d.ts} +35 -25
- package/dist/api/render-media-on-lambda.d.ts.map +1 -0
- package/dist/api/{render-video-on-lambda.js → render-media-on-lambda.js} +20 -9
- package/dist/api/render-media-on-lambda.js.map +1 -0
- package/dist/api/render-still-on-lambda.d.ts +27 -21
- package/dist/api/render-still-on-lambda.d.ts.map +1 -1
- package/dist/api/render-still-on-lambda.js +12 -6
- package/dist/api/render-still-on-lambda.js.map +1 -1
- package/dist/api/upload-dir.d.ts +1 -1
- package/dist/api/upload-dir.d.ts.map +1 -1
- package/dist/cli/args.d.ts +7 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +4 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/commands/functions/deploy.d.ts.map +1 -1
- package/dist/cli/commands/functions/deploy.js +16 -5
- package/dist/cli/commands/functions/deploy.js.map +1 -1
- package/dist/cli/commands/functions/index.d.ts.map +1 -1
- package/dist/cli/commands/functions/index.js +9 -1
- package/dist/cli/commands/functions/index.js.map +1 -1
- package/dist/cli/commands/functions/ls.d.ts.map +1 -1
- package/dist/cli/commands/functions/ls.js +8 -8
- package/dist/cli/commands/functions/ls.js.map +1 -1
- package/dist/cli/commands/functions/rm.d.ts.map +1 -1
- package/dist/cli/commands/functions/rm.js +9 -4
- package/dist/cli/commands/functions/rm.js.map +1 -1
- package/dist/cli/commands/functions/rmall.d.ts +3 -0
- package/dist/cli/commands/functions/rmall.d.ts.map +1 -0
- package/dist/cli/commands/functions/rmall.js +41 -0
- package/dist/cli/commands/functions/rmall.js.map +1 -0
- package/dist/cli/commands/policies/policies.d.ts.map +1 -1
- package/dist/cli/commands/policies/policies.js +2 -1
- package/dist/cli/commands/policies/policies.js.map +1 -1
- package/dist/cli/commands/regions.d.ts +3 -0
- package/dist/cli/commands/regions.d.ts.map +1 -0
- package/dist/cli/commands/regions.js +11 -0
- package/dist/cli/commands/regions.js.map +1 -0
- package/dist/cli/commands/render/progress.d.ts +11 -15
- package/dist/cli/commands/render/progress.d.ts.map +1 -1
- package/dist/cli/commands/render/progress.js +40 -22
- package/dist/cli/commands/render/progress.js.map +1 -1
- package/dist/cli/commands/render/render.d.ts.map +1 -1
- package/dist/cli/commands/render/render.js +84 -29
- package/dist/cli/commands/render/render.js.map +1 -1
- package/dist/cli/commands/sites/create.d.ts.map +1 -1
- package/dist/cli/commands/sites/create.js +18 -9
- package/dist/cli/commands/sites/create.js.map +1 -1
- package/dist/cli/commands/sites/index.d.ts.map +1 -1
- package/dist/cli/commands/sites/index.js +6 -1
- package/dist/cli/commands/sites/index.js.map +1 -1
- package/dist/cli/commands/sites/ls.d.ts.map +1 -1
- package/dist/cli/commands/sites/ls.js +13 -9
- package/dist/cli/commands/sites/ls.js.map +1 -1
- package/dist/cli/commands/sites/rm.d.ts +1 -1
- package/dist/cli/commands/sites/rm.d.ts.map +1 -1
- package/dist/cli/commands/sites/rm.js +43 -19
- package/dist/cli/commands/sites/rm.js.map +1 -1
- package/dist/cli/commands/sites/rmall.d.ts +3 -0
- package/dist/cli/commands/sites/rmall.d.ts.map +1 -0
- package/dist/cli/commands/sites/rmall.js +49 -0
- package/dist/cli/commands/sites/rmall.js.map +1 -0
- package/dist/cli/commands/still.d.ts.map +1 -1
- package/dist/cli/commands/still.js +43 -12
- package/dist/cli/commands/still.js.map +1 -1
- package/dist/cli/get-aws-region.d.ts.map +1 -1
- package/dist/cli/get-aws-region.js +2 -2
- package/dist/cli/get-aws-region.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +12 -4
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/helpers/confirm.d.ts.map +1 -1
- package/dist/cli/helpers/confirm.js +5 -18
- package/dist/cli/helpers/confirm.js.map +1 -1
- package/dist/cli/helpers/find-function-name.d.ts.map +1 -1
- package/dist/cli/helpers/find-function-name.js +6 -4
- package/dist/cli/helpers/find-function-name.js.map +1 -1
- package/dist/cli/helpers/get-cloudwatch-stream-url.d.ts +9 -0
- package/dist/cli/helpers/get-cloudwatch-stream-url.d.ts.map +1 -0
- package/dist/cli/helpers/get-cloudwatch-stream-url.js +8 -0
- package/dist/cli/helpers/get-cloudwatch-stream-url.js.map +1 -0
- package/dist/cli/helpers/quit.d.ts +2 -0
- package/dist/cli/helpers/quit.d.ts.map +1 -0
- package/dist/cli/helpers/quit.js +8 -0
- package/dist/cli/helpers/quit.js.map +1 -0
- package/dist/cli/helpers/yes-or-no.d.ts +5 -0
- package/dist/cli/helpers/yes-or-no.d.ts.map +1 -0
- package/dist/cli/helpers/yes-or-no.js +45 -0
- package/dist/cli/helpers/yes-or-no.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +32 -15
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/is-cli.d.ts +3 -0
- package/dist/cli/is-cli.d.ts.map +1 -0
- package/dist/cli/is-cli.js +11 -0
- package/dist/cli/is-cli.js.map +1 -0
- package/dist/client.d.ts +4 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +8 -5
- package/dist/client.js.map +1 -1
- package/dist/functions/chunk-optimization/can-use-optimization.d.ts +2 -2
- package/dist/functions/chunk-optimization/can-use-optimization.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/can-use-optimization.js +6 -3
- package/dist/functions/chunk-optimization/can-use-optimization.js.map +1 -1
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts +4 -1
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/optimize-profile.d.ts +8 -2
- package/dist/functions/chunk-optimization/optimize-profile.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +6 -3
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.js +10 -5
- package/dist/functions/chunk-optimization/plan-frame-ranges.js.map +1 -1
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts +4 -1
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/types.d.ts +2 -2
- package/dist/functions/chunk-optimization/types.d.ts.map +1 -1
- package/dist/functions/helpers/best-frames-per-lambda-param.d.ts +2 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.d.ts.map +1 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.js +18 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.js.map +1 -0
- package/dist/functions/helpers/calculate-chunk-times.d.ts.map +1 -1
- package/dist/functions/helpers/calculate-chunk-times.js +8 -7
- package/dist/functions/helpers/calculate-chunk-times.js.map +1 -1
- package/dist/functions/helpers/calculate-price-from-bucket.d.ts +1 -2
- package/dist/functions/helpers/calculate-price-from-bucket.d.ts.map +1 -1
- package/dist/functions/helpers/calculate-price-from-bucket.js +8 -8
- package/dist/functions/helpers/calculate-price-from-bucket.js.map +1 -1
- package/dist/functions/helpers/concat-videos.d.ts.map +1 -1
- package/dist/functions/helpers/concat-videos.js +7 -5
- package/dist/functions/helpers/concat-videos.js.map +1 -1
- package/dist/functions/helpers/create-post-render-data.d.ts +1 -1
- package/dist/functions/helpers/create-post-render-data.d.ts.map +1 -1
- package/dist/functions/helpers/create-post-render-data.js +14 -5
- package/dist/functions/helpers/create-post-render-data.js.map +1 -1
- package/dist/functions/helpers/delete-chunks.d.ts +1 -1
- package/dist/functions/helpers/delete-chunks.d.ts.map +1 -1
- package/dist/functions/helpers/delete-chunks.js.map +1 -1
- package/dist/functions/helpers/expected-out-name.d.ts.map +1 -1
- package/dist/functions/helpers/expected-out-name.js +5 -1
- package/dist/functions/helpers/expected-out-name.js.map +1 -1
- package/dist/functions/helpers/get-browser-instance.d.ts +2 -4
- package/dist/functions/helpers/get-browser-instance.d.ts.map +1 -1
- package/dist/functions/helpers/get-browser-instance.js +13 -18
- package/dist/functions/helpers/get-browser-instance.js.map +1 -1
- package/dist/functions/helpers/get-cleanup-progress.d.ts.map +1 -1
- package/dist/functions/helpers/get-cleanup-progress.js +2 -2
- package/dist/functions/helpers/get-cleanup-progress.js.map +1 -1
- package/dist/functions/helpers/get-current-region.d.ts +1 -1
- package/dist/functions/helpers/get-current-region.d.ts.map +1 -1
- package/dist/functions/helpers/get-current-region.js +2 -2
- package/dist/functions/helpers/get-current-region.js.map +1 -1
- package/dist/functions/helpers/get-encoding-metadata.d.ts.map +1 -1
- package/dist/functions/helpers/get-encoding-metadata.js +7 -7
- package/dist/functions/helpers/get-encoding-metadata.js.map +1 -1
- package/dist/functions/helpers/get-files-to-delete.d.ts.map +1 -1
- package/dist/functions/helpers/get-files-to-delete.js +4 -10
- package/dist/functions/helpers/get-files-to-delete.js.map +1 -1
- package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts.map +1 -1
- package/dist/functions/helpers/get-lambdas-invoked-stats.js +7 -3
- package/dist/functions/helpers/get-lambdas-invoked-stats.js.map +1 -1
- package/dist/functions/helpers/get-post-render-data.d.ts +1 -1
- package/dist/functions/helpers/get-post-render-data.d.ts.map +1 -1
- package/dist/functions/helpers/get-progress.d.ts +3 -2
- package/dist/functions/helpers/get-progress.d.ts.map +1 -1
- package/dist/functions/helpers/get-progress.js +34 -7
- package/dist/functions/helpers/get-progress.js.map +1 -1
- package/dist/functions/helpers/get-retry-stats.d.ts +11 -0
- package/dist/functions/helpers/get-retry-stats.d.ts.map +1 -0
- package/dist/functions/helpers/get-retry-stats.js +21 -0
- package/dist/functions/helpers/get-retry-stats.js.map +1 -0
- package/dist/functions/helpers/get-time-to-finish.js +1 -1
- package/dist/functions/helpers/get-time-to-finish.js.map +1 -1
- package/dist/functions/helpers/inspect-errors.d.ts.map +1 -1
- package/dist/functions/helpers/inspect-errors.js +6 -0
- package/dist/functions/helpers/inspect-errors.js.map +1 -1
- package/dist/functions/helpers/is-enosp-err.d.ts +1 -0
- package/dist/functions/helpers/is-enosp-err.d.ts.map +1 -1
- package/dist/functions/helpers/is-enosp-err.js +5 -1
- package/dist/functions/helpers/is-enosp-err.js.map +1 -1
- package/dist/functions/helpers/min-max.d.ts +3 -0
- package/dist/functions/helpers/min-max.d.ts.map +1 -0
- package/dist/functions/helpers/min-max.js +34 -0
- package/dist/functions/helpers/min-max.js.map +1 -0
- package/dist/functions/helpers/print-cloudwatch-helper.d.ts +3 -0
- package/dist/functions/helpers/print-cloudwatch-helper.d.ts.map +1 -0
- package/dist/functions/helpers/print-cloudwatch-helper.js +12 -0
- package/dist/functions/helpers/print-cloudwatch-helper.js.map +1 -0
- package/dist/functions/helpers/print-concurrency-curve.d.ts +2 -0
- package/dist/functions/helpers/print-concurrency-curve.d.ts.map +1 -0
- package/dist/functions/helpers/print-concurrency-curve.js +9 -0
- package/dist/functions/helpers/print-concurrency-curve.js.map +1 -0
- package/dist/functions/helpers/read-with-progress.d.ts +15 -0
- package/dist/functions/helpers/read-with-progress.d.ts.map +1 -0
- package/dist/functions/helpers/read-with-progress.js +27 -0
- package/dist/functions/helpers/read-with-progress.js.map +1 -0
- package/dist/functions/helpers/validate-composition.d.ts +6 -7
- package/dist/functions/helpers/validate-composition.d.ts.map +1 -1
- package/dist/functions/helpers/validate-composition.js +2 -10
- package/dist/functions/helpers/validate-composition.js.map +1 -1
- package/dist/functions/helpers/write-lambda-error.d.ts +3 -0
- package/dist/functions/helpers/write-lambda-error.d.ts.map +1 -1
- package/dist/functions/helpers/write-lambda-error.js +5 -2
- package/dist/functions/helpers/write-lambda-error.js.map +1 -1
- package/dist/functions/helpers/write-post-render-data.d.ts +1 -1
- package/dist/functions/helpers/write-post-render-data.d.ts.map +1 -1
- package/dist/functions/index.d.ts +1 -0
- package/dist/functions/index.d.ts.map +1 -1
- package/dist/functions/index.js +30 -3
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/launch.d.ts.map +1 -1
- package/dist/functions/launch.js +39 -38
- package/dist/functions/launch.js.map +1 -1
- package/dist/functions/progress.d.ts +1 -0
- package/dist/functions/progress.d.ts.map +1 -1
- package/dist/functions/progress.js +1 -0
- package/dist/functions/progress.js.map +1 -1
- package/dist/functions/renderer.d.ts.map +1 -1
- package/dist/functions/renderer.js +43 -82
- package/dist/functions/renderer.js.map +1 -1
- package/dist/functions/start.d.ts.map +1 -1
- package/dist/functions/start.js +5 -0
- package/dist/functions/start.js.map +1 -1
- package/dist/functions/still.d.ts +2 -1
- package/dist/functions/still.d.ts.map +1 -1
- package/dist/functions/still.js +40 -47
- package/dist/functions/still.js.map +1 -1
- package/dist/index.d.ts +18 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/dist/pricing/aws-regions.d.ts +1 -1
- package/dist/pricing/aws-regions.d.ts.map +1 -1
- package/dist/pricing/aws-regions.js +3 -14
- package/dist/pricing/aws-regions.js.map +1 -1
- package/dist/pricing/price-per-1-s.d.ts +8 -0
- package/dist/pricing/price-per-1-s.d.ts.map +1 -1
- package/dist/pricing/price-per-1-s.js +72 -190
- package/dist/pricing/price-per-1-s.js.map +1 -1
- package/dist/shared/aws-clients.d.ts +3 -0
- package/dist/shared/aws-clients.d.ts.map +1 -1
- package/dist/shared/aws-clients.js +64 -18
- package/dist/shared/aws-clients.js.map +1 -1
- package/dist/shared/check-credentials.d.ts.map +1 -1
- package/dist/shared/check-credentials.js +21 -6
- package/dist/shared/check-credentials.js.map +1 -1
- package/dist/shared/constants.d.ts +37 -10
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/constants.js +18 -8
- package/dist/shared/constants.js.map +1 -1
- package/dist/shared/convert-to-serve-url.d.ts +3 -0
- package/dist/shared/convert-to-serve-url.d.ts.map +1 -0
- package/dist/shared/convert-to-serve-url.js +19 -0
- package/dist/shared/convert-to-serve-url.js.map +1 -0
- package/dist/shared/docs-url.d.ts +2 -0
- package/dist/shared/docs-url.d.ts.map +1 -0
- package/dist/shared/docs-url.js +5 -0
- package/dist/shared/docs-url.js.map +1 -0
- package/dist/shared/hosted-layers.d.ts +2 -1
- package/dist/shared/hosted-layers.d.ts.map +1 -1
- package/dist/shared/hosted-layers.js +32 -185
- package/dist/shared/hosted-layers.js.map +1 -1
- package/dist/shared/make-s3-url.d.ts +1 -1
- package/dist/shared/make-s3-url.d.ts.map +1 -1
- package/dist/shared/make-s3-url.js +4 -5
- package/dist/shared/make-s3-url.js.map +1 -1
- package/dist/shared/parse-lambda-initialized-key.d.ts +6 -0
- package/dist/shared/parse-lambda-initialized-key.d.ts.map +1 -0
- package/dist/shared/parse-lambda-initialized-key.js +16 -0
- package/dist/shared/parse-lambda-initialized-key.js.map +1 -0
- package/dist/shared/parse-lambda-timings-key.d.ts +0 -1
- package/dist/shared/parse-lambda-timings-key.d.ts.map +1 -1
- package/dist/shared/parse-lambda-timings-key.js +1 -2
- package/dist/shared/parse-lambda-timings-key.js.map +1 -1
- package/dist/shared/validate-frames-per-lambda.d.ts +2 -0
- package/dist/shared/validate-frames-per-lambda.d.ts.map +1 -0
- package/dist/shared/validate-frames-per-lambda.js +26 -0
- package/dist/shared/validate-frames-per-lambda.js.map +1 -0
- package/dist/shared/validate-outname.d.ts +2 -0
- package/dist/shared/validate-outname.d.ts.map +1 -0
- package/dist/shared/validate-outname.js +19 -0
- package/dist/shared/validate-outname.js.map +1 -0
- package/dist/shared/validate-retries.d.ts +2 -0
- package/dist/shared/validate-retries.d.ts.map +1 -0
- package/dist/shared/validate-retries.js +22 -0
- package/dist/shared/validate-retries.js.map +1 -0
- package/dist/shared/validate-site-name.d.ts +2 -0
- package/dist/shared/validate-site-name.d.ts.map +1 -0
- package/dist/shared/validate-site-name.js +12 -0
- package/dist/shared/validate-site-name.js.map +1 -0
- package/package.json +13 -11
- package/remotionlambda.zip +0 -0
- package/dist/admin/replicate-binaries.d.ts +0 -2
- package/dist/admin/replicate-binaries.d.ts.map +0 -1
- package/dist/admin/replicate-binaries.js +0 -50
- package/dist/admin/replicate-binaries.js.map +0 -1
- package/dist/api/bundle-lambda.d.ts +0 -2
- package/dist/api/bundle-lambda.d.ts.map +0 -1
- package/dist/api/bundle-lambda.js +0 -34
- package/dist/api/bundle-lambda.js.map +0 -1
- package/dist/api/bundle-remotion.d.ts +0 -6
- package/dist/api/bundle-remotion.d.ts.map +0 -1
- package/dist/api/bundle-remotion.js +0 -12
- package/dist/api/bundle-remotion.js.map +0 -1
- package/dist/api/deploy-lambda.d.ts +0 -7
- package/dist/api/deploy-lambda.d.ts.map +0 -1
- package/dist/api/deploy-lambda.js +0 -48
- package/dist/api/deploy-lambda.js.map +0 -1
- package/dist/api/deploy-project.d.ts +0 -28
- package/dist/api/deploy-project.d.ts.map +0 -1
- package/dist/api/deploy-project.js +0 -58
- package/dist/api/deploy-project.js.map +0 -1
- package/dist/api/download-video.d.ts +0 -14
- package/dist/api/download-video.d.ts.map +0 -1
- package/dist/api/download-video.js +0 -62
- package/dist/api/download-video.js.map +0 -1
- package/dist/api/ensure-lambda-binaries.d.ts +0 -11
- package/dist/api/ensure-lambda-binaries.d.ts.map +0 -1
- package/dist/api/ensure-lambda-binaries.js +0 -60
- package/dist/api/ensure-lambda-binaries.js.map +0 -1
- package/dist/api/get-deployed-lambdas.d.ts +0 -10
- package/dist/api/get-deployed-lambdas.d.ts.map +0 -1
- package/dist/api/get-deployed-lambdas.js +0 -31
- package/dist/api/get-deployed-lambdas.js.map +0 -1
- package/dist/api/get-function-version.d.ts +0 -7
- package/dist/api/get-function-version.d.ts.map +0 -1
- package/dist/api/get-function-version.js +0 -27
- package/dist/api/get-function-version.js.map +0 -1
- package/dist/api/iam-validation/required-permissions.d.ts +0 -6
- package/dist/api/iam-validation/required-permissions.d.ts.map +0 -1
- package/dist/api/iam-validation/required-permissions.js.map +0 -1
- package/dist/api/render-video-on-lambda.d.ts.map +0 -1
- package/dist/api/render-video-on-lambda.js.map +0 -1
- package/dist/api/validate-frames-per-lambda.d.ts +0 -2
- package/dist/api/validate-frames-per-lambda.d.ts.map +0 -1
- package/dist/api/validate-frames-per-lambda.js +0 -26
- package/dist/api/validate-frames-per-lambda.js.map +0 -1
- package/dist/benchmark.d.ts +0 -2
- package/dist/benchmark.d.ts.map +0 -1
- package/dist/benchmark.js +0 -30
- package/dist/benchmark.js.map +0 -1
- package/dist/build-render/index.js +0 -126181
- package/dist/chunked-upload.d.ts +0 -2
- package/dist/chunked-upload.d.ts.map +0 -1
- package/dist/chunked-upload.js +0 -34
- package/dist/chunked-upload.js.map +0 -1
- package/dist/cleanup/cleanup-lambdas.d.ts +0 -7
- package/dist/cleanup/cleanup-lambdas.d.ts.map +0 -1
- package/dist/cleanup/cleanup-lambdas.js +0 -22
- package/dist/cleanup/cleanup-lambdas.js.map +0 -1
- package/dist/cleanup/s3-buckets.d.ts +0 -16
- package/dist/cleanup/s3-buckets.d.ts.map +0 -1
- package/dist/cleanup/s3-buckets.js +0 -59
- package/dist/cleanup/s3-buckets.js.map +0 -1
- package/dist/cli/cleanup.d.ts +0 -4
- package/dist/cli/cleanup.d.ts.map +0 -1
- package/dist/cli/cleanup.js +0 -77
- package/dist/cli/cleanup.js.map +0 -1
- package/dist/cli/commands/render.d.ts +0 -3
- package/dist/cli/commands/render.d.ts.map +0 -1
- package/dist/cli/commands/render.js +0 -75
- package/dist/cli/commands/render.js.map +0 -1
- package/dist/cli/commands/sites/upload.d.ts +0 -3
- package/dist/cli/commands/sites/upload.d.ts.map +0 -1
- package/dist/cli/commands/sites/upload.js +0 -111
- package/dist/cli/commands/sites/upload.js.map +0 -1
- package/dist/cli/deploy.d.ts +0 -3
- package/dist/cli/deploy.d.ts.map +0 -1
- package/dist/cli/deploy.js +0 -13
- package/dist/cli/deploy.js.map +0 -1
- package/dist/cli/policies.d.ts +0 -3
- package/dist/cli/policies.d.ts.map +0 -1
- package/dist/cli/policies.js +0 -59
- package/dist/cli/policies.js.map +0 -1
- package/dist/cli/render.d.ts +0 -3
- package/dist/cli/render.d.ts.map +0 -1
- package/dist/cli/render.js +0 -96
- package/dist/cli/render.js.map +0 -1
- package/dist/cli/upload.d.ts +0 -3
- package/dist/cli/upload.d.ts.map +0 -1
- package/dist/cli/upload.js +0 -112
- package/dist/cli/upload.js.map +0 -1
- package/dist/functions/chunk-optimization/write-profile.d.ts +0 -8
- package/dist/functions/chunk-optimization/write-profile.d.ts.map +0 -1
- package/dist/functions/chunk-optimization/write-profile.js +0 -18
- package/dist/functions/chunk-optimization/write-profile.js.map +0 -1
- package/dist/functions/get-progress.d.ts +0 -27
- package/dist/functions/get-progress.d.ts.map +0 -1
- package/dist/functions/get-progress.js +0 -161
- package/dist/functions/get-progress.js.map +0 -1
- package/dist/functions/helpers/is-fatal-error.d.ts +0 -3
- package/dist/functions/helpers/is-fatal-error.d.ts.map +0 -1
- package/dist/functions/helpers/is-fatal-error.js +0 -8
- package/dist/functions/helpers/is-fatal-error.js.map +0 -1
- package/dist/pricing/calculate-price.d.ts.map +0 -1
- package/dist/pricing/calculate-price.js.map +0 -1
- package/dist/rendering/chunked-concatenation.d.ts +0 -3
- package/dist/rendering/chunked-concatenation.d.ts.map +0 -1
- package/dist/rendering/chunked-concatenation.js +0 -38
- package/dist/rendering/chunked-concatenation.js.map +0 -1
- package/dist/rendering/create-named-pipe.d.ts +0 -8
- package/dist/rendering/create-named-pipe.d.ts.map +0 -1
- package/dist/rendering/create-named-pipe.js +0 -41
- package/dist/rendering/create-named-pipe.js.map +0 -1
- package/dist/rendering/mount-tmp-fs.d.ts +0 -2
- package/dist/rendering/mount-tmp-fs.d.ts.map +0 -1
- package/dist/rendering/mount-tmp-fs.js +0 -19
- package/dist/rendering/mount-tmp-fs.js.map +0 -1
- package/dist/run.d.ts +0 -2
- package/dist/run.d.ts.map +0 -1
- package/dist/run.js +0 -104
- package/dist/run.js.map +0 -1
- package/dist/scripts2.d.ts +0 -1
- package/dist/scripts2.d.ts.map +0 -1
- package/dist/scripts2.js +0 -2
- package/dist/scripts2.js.map +0 -1
- package/dist/shared/get-file-extension-from-codec.d.ts +0 -3
- package/dist/shared/get-file-extension-from-codec.d.ts.map +0 -1
- package/dist/shared/get-file-extension-from-codec.js +0 -33
- package/dist/shared/get-file-extension-from-codec.js.map +0 -1
- package/dist/shared/parse-chunk-timing-key.d.ts +0 -7
- package/dist/shared/parse-chunk-timing-key.d.ts.map +0 -1
- package/dist/shared/parse-chunk-timing-key.js +0 -17
- package/dist/shared/parse-chunk-timing-key.js.map +0 -1
- package/dist/shared/tmpdir.d.ts +0 -3
- package/dist/shared/tmpdir.d.ts.map +0 -1
- package/dist/shared/tmpdir.js +0 -23
- package/dist/shared/tmpdir.js.map +0 -1
|
@@ -6,38 +6,51 @@ const aws_policies_1 = require("aws-policies");
|
|
|
6
6
|
const aws_clients_1 = require("../../shared/aws-clients");
|
|
7
7
|
const simulateRule = async (options) => {
|
|
8
8
|
var _a;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
try {
|
|
10
|
+
if (options.actionNames.includes(aws_policies_1.iam.GetUser)) {
|
|
11
|
+
try {
|
|
12
|
+
await (0, aws_clients_1.getIamClient)(options.region).send(new client_iam_1.GetUserCommand({}));
|
|
13
|
+
const result = [
|
|
14
|
+
{
|
|
15
|
+
decision: 'allowed',
|
|
16
|
+
name: aws_policies_1.iam.GetUser,
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
catch (err) {
|
|
22
|
+
const result = [
|
|
23
|
+
{
|
|
24
|
+
decision: 'explicitDeny',
|
|
25
|
+
name: aws_policies_1.iam.GetUser,
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
19
30
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
const res = await (0, aws_clients_1.getIamClient)(options.region).send(new client_iam_1.SimulatePrincipalPolicyCommand({
|
|
32
|
+
ActionNames: options.actionNames,
|
|
33
|
+
PolicySourceArn: options.arn,
|
|
34
|
+
ResourceArns: options.resource,
|
|
35
|
+
}));
|
|
36
|
+
return ((_a = res.EvaluationResults) !== null && _a !== void 0 ? _a : []).map((pol) => {
|
|
37
|
+
return {
|
|
38
|
+
decision: pol.EvalDecision,
|
|
39
|
+
name: pol.EvalActionName,
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
// Sometimes the AWS Rate limit hits. In that case we retry up to two times
|
|
45
|
+
// after waiting for 2 seconds.
|
|
46
|
+
if (options.retries <= 0) {
|
|
47
|
+
throw err;
|
|
28
48
|
}
|
|
49
|
+
await new Promise((resolve) => {
|
|
50
|
+
setTimeout(resolve, 2000);
|
|
51
|
+
});
|
|
52
|
+
return (0, exports.simulateRule)({ ...options, retries: options.retries - 1 });
|
|
29
53
|
}
|
|
30
|
-
const res = await (0, aws_clients_1.getIamClient)(options.region).send(new client_iam_1.SimulatePrincipalPolicyCommand({
|
|
31
|
-
ActionNames: options.actionNames,
|
|
32
|
-
PolicySourceArn: options.arn,
|
|
33
|
-
ResourceArns: options.resource,
|
|
34
|
-
}));
|
|
35
|
-
return ((_a = res.EvaluationResults) !== null && _a !== void 0 ? _a : []).map((pol) => {
|
|
36
|
-
return {
|
|
37
|
-
decision: pol.EvalDecision,
|
|
38
|
-
name: pol.EvalActionName,
|
|
39
|
-
};
|
|
40
|
-
});
|
|
41
54
|
};
|
|
42
55
|
exports.simulateRule = simulateRule;
|
|
43
56
|
//# sourceMappingURL=simulate-rule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulate-rule.js","sourceRoot":"","sources":["../../../src/api/iam-validation/simulate-rule.ts"],"names":[],"mappings":";;;AAAA,oDAG6B;AAC7B,+CAAiC;AAEjC,0DAAsD;AAS/C,MAAM,YAAY,GAAG,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"simulate-rule.js","sourceRoot":"","sources":["../../../src/api/iam-validation/simulate-rule.ts"],"names":[],"mappings":";;;AAAA,oDAG6B;AAC7B,+CAAiC;AAEjC,0DAAsD;AAS/C,MAAM,YAAY,GAAG,KAAK,EAAE,OAMlC,EAA+B,EAAE;;IACjC,IAAI;QACH,IAAI,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,kBAAG,CAAC,OAAO,CAAC,EAAE;YAC9C,IAAI;gBACH,MAAM,IAAA,0BAAY,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,2BAAc,CAAC,EAAE,CAAC,CAAC,CAAC;gBAChE,MAAM,MAAM,GAAuB;oBAClC;wBACC,QAAQ,EAAE,SAAS;wBACnB,IAAI,EAAE,kBAAG,CAAC,OAAO;qBACjB;iBACD,CAAC;gBACF,OAAO,MAAM,CAAC;aACd;YAAC,OAAO,GAAG,EAAE;gBACb,MAAM,MAAM,GAAuB;oBAClC;wBACC,QAAQ,EAAE,cAAc;wBACxB,IAAI,EAAE,kBAAG,CAAC,OAAO;qBACjB;iBACD,CAAC;gBACF,OAAO,MAAM,CAAC;aACd;SACD;QAED,MAAM,GAAG,GAAG,MAAM,IAAA,0BAAY,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAClD,IAAI,2CAA8B,CAAC;YAClC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,eAAe,EAAE,OAAO,CAAC,GAAG;YAC5B,YAAY,EAAE,OAAO,CAAC,QAAQ;SAC9B,CAAC,CACF,CAAC;QAEF,OAAO,CAAC,MAAA,GAAG,CAAC,iBAAiB,mCAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAoB,EAAE;YAClE,OAAO;gBACN,QAAQ,EAAE,GAAG,CAAC,YAA4B;gBAC1C,IAAI,EAAE,GAAG,CAAC,cAAwB;aAClC,CAAC;QACH,CAAC,CAAC,CAAC;KACH;IAAC,OAAO,GAAG,EAAE;QACb,2EAA2E;QAC3E,+BAA+B;QAC/B,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,EAAE;YACzB,MAAM,GAAG,CAAC;SACV;QAED,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,OAAO,IAAA,oBAAY,EAAC,EAAC,GAAG,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,GAAG,CAAC,EAAC,CAAC,CAAC;KAChE;AACF,CAAC,CAAC;AAvDW,QAAA,YAAY,gBAuDvB"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { AwsRegion } from '../../pricing/aws-regions';
|
|
2
2
|
import { SimulationResult } from './simulate-rule';
|
|
3
|
-
export declare const logPermissionOutput: (output: SimulationResult) =>
|
|
4
|
-
export declare
|
|
3
|
+
export declare const logPermissionOutput: (output: SimulationResult) => string;
|
|
4
|
+
export declare type SimulatePermissionsInput = {
|
|
5
5
|
region: AwsRegion;
|
|
6
|
-
onSimulation?: (
|
|
7
|
-
}
|
|
6
|
+
onSimulation?: (result: SimulationResult) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare type SimulatePermissionsOutput = {
|
|
8
9
|
results: SimulationResult[];
|
|
9
|
-
}
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @description Simulates calls using the AWS Simulator to validate the correct permissions.
|
|
13
|
+
* @link http://v3.remotion.dev/docs/lambda/simulatepermissions
|
|
14
|
+
* @param {AwsRegion} options.region The region which you would like to validate
|
|
15
|
+
* @param {(result: SimulationResult) => void} options.onSimulation The region which you would like to validate
|
|
16
|
+
* @returns {Promise<SimulatePermissionsOutput>} See documentation for detailed response structure.
|
|
17
|
+
*/
|
|
18
|
+
export declare const simulatePermissions: (options: SimulatePermissionsInput) => Promise<SimulatePermissionsOutput>;
|
|
10
19
|
//# sourceMappingURL=simulate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulate.d.ts","sourceRoot":"","sources":["../../../src/api/iam-validation/simulate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"simulate.d.ts","sourceRoot":"","sources":["../../../src/api/iam-validation/simulate.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAEpD,OAAO,EAA6B,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAY7E,eAAO,MAAM,mBAAmB,WAAY,gBAAgB,WAE3D,CAAC;AAEF,oBAAY,wBAAwB,GAAG;IACtC,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF,oBAAY,yBAAyB,GAAG;IACvC,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,YACtB,wBAAwB,KAC/B,QAAQ,yBAAyB,CAwBnC,CAAC"}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.simulatePermissions = exports.logPermissionOutput = void 0;
|
|
4
4
|
const client_iam_1 = require("@aws-sdk/client-iam");
|
|
5
|
-
const log_1 = require("../../cli/log");
|
|
6
5
|
const aws_clients_1 = require("../../shared/aws-clients");
|
|
7
|
-
const required_permissions_1 = require("./required-permissions");
|
|
8
6
|
const simulate_rule_1 = require("./simulate-rule");
|
|
7
|
+
const user_permissions_1 = require("./user-permissions");
|
|
9
8
|
const getEmojiForStatus = (decision) => {
|
|
10
9
|
switch (decision) {
|
|
11
10
|
case 'allowed':
|
|
@@ -15,9 +14,16 @@ const getEmojiForStatus = (decision) => {
|
|
|
15
14
|
}
|
|
16
15
|
};
|
|
17
16
|
const logPermissionOutput = (output) => {
|
|
18
|
-
|
|
17
|
+
return [getEmojiForStatus(output.decision), output.name].join(' ');
|
|
19
18
|
};
|
|
20
19
|
exports.logPermissionOutput = logPermissionOutput;
|
|
20
|
+
/**
|
|
21
|
+
* @description Simulates calls using the AWS Simulator to validate the correct permissions.
|
|
22
|
+
* @link http://v3.remotion.dev/docs/lambda/simulatepermissions
|
|
23
|
+
* @param {AwsRegion} options.region The region which you would like to validate
|
|
24
|
+
* @param {(result: SimulationResult) => void} options.onSimulation The region which you would like to validate
|
|
25
|
+
* @returns {Promise<SimulatePermissionsOutput>} See documentation for detailed response structure.
|
|
26
|
+
*/
|
|
21
27
|
const simulatePermissions = async (options) => {
|
|
22
28
|
var _a;
|
|
23
29
|
const user = await (0, aws_clients_1.getIamClient)(options.region).send(new client_iam_1.GetUserCommand({}));
|
|
@@ -25,12 +31,13 @@ const simulatePermissions = async (options) => {
|
|
|
25
31
|
throw new Error('No valid AWS user detected');
|
|
26
32
|
}
|
|
27
33
|
const results = [];
|
|
28
|
-
for (const per of
|
|
34
|
+
for (const per of user_permissions_1.requiredPermissions) {
|
|
29
35
|
const result = await (0, simulate_rule_1.simulateRule)({
|
|
30
36
|
actionNames: per.actions,
|
|
31
37
|
arn: user.User.Arn,
|
|
32
38
|
region: options.region,
|
|
33
39
|
resource: per.resource,
|
|
40
|
+
retries: 2,
|
|
34
41
|
});
|
|
35
42
|
for (const res of result) {
|
|
36
43
|
results.push(res);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulate.js","sourceRoot":"","sources":["../../../src/api/iam-validation/simulate.ts"],"names":[],"mappings":";;;AAAA,oDAAmD;
|
|
1
|
+
{"version":3,"file":"simulate.js","sourceRoot":"","sources":["../../../src/api/iam-validation/simulate.ts"],"names":[],"mappings":";;;AAAA,oDAAmD;AAEnD,0DAAsD;AACtD,mDAA6E;AAC7E,yDAAuD;AAEvD,MAAM,iBAAiB,GAAG,CAAC,QAAsB,EAAE,EAAE;IACpD,QAAQ,QAAQ,EAAE;QACjB,KAAK,SAAS;YACb,OAAO,GAAG,CAAC;QACZ;YACC,OAAO,GAAG,CAAC;KACZ;AACF,CAAC,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,MAAwB,EAAE,EAAE;IAC/D,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACpE,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAWF;;;;;;GAMG;AACI,MAAM,mBAAmB,GAAG,KAAK,EACvC,OAAiC,EACI,EAAE;;IACvC,MAAM,IAAI,GAAG,MAAM,IAAA,0BAAY,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,2BAAc,CAAC,EAAE,CAAC,CAAC,CAAC;IAE7E,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;KAC9C;IAED,MAAM,OAAO,GAAuB,EAAE,CAAC;IAEvC,KAAK,MAAM,GAAG,IAAI,sCAAmB,EAAE;QACtC,MAAM,MAAM,GAAG,MAAM,IAAA,4BAAY,EAAC;YACjC,WAAW,EAAE,GAAG,CAAC,OAAO;YACxB,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,GAAa;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,OAAO,EAAE,CAAC;SACV,CAAC,CAAC;QACH,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACzB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAClB,MAAA,OAAO,CAAC,YAAY,+CAApB,OAAO,EAAgB,GAAG,CAAC,CAAC;SAC5B;KACD;IAED,OAAO,EAAC,OAAO,EAAC,CAAC;AAClB,CAAC,CAAC;AA1BW,QAAA,mBAAmB,uBA0B9B"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @description Returns an inline JSON policy to be assigned to the AWS user whose credentials are being used for excuting CLI commands or calling Node.JS functions.
|
|
3
|
-
* @link https://remotion.dev/docs/lambda/getuserpolicy
|
|
3
|
+
* @link https://v3.remotion.dev/docs/lambda/getuserpolicy
|
|
4
4
|
*/
|
|
5
5
|
export declare const getUserPolicy: () => string;
|
|
6
|
+
export declare const ROLE_NAME = "remotion-lambda-role";
|
|
6
7
|
/**
|
|
7
8
|
* @description Returns an inline JSON policy to be assigned to the 'remotion-lambda-role' role that needs to be created in your AWS account.
|
|
8
|
-
* @link https://remotion.dev/docs/lambda/getrolepolicy
|
|
9
|
+
* @link https://v3.remotion.dev/docs/lambda/getrolepolicy
|
|
9
10
|
*/
|
|
10
11
|
export declare const getRolePolicy: () => string;
|
|
11
12
|
//# sourceMappingURL=suggested-policy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggested-policy.d.ts","sourceRoot":"","sources":["../../../src/api/iam-validation/suggested-policy.ts"],"names":[],"mappings":"AA+BA;;;GAGG;AAEH,eAAO,MAAM,aAAa,cAAiD,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,aAAa,cAAqD,CAAC"}
|
|
1
|
+
{"version":3,"file":"suggested-policy.d.ts","sourceRoot":"","sources":["../../../src/api/iam-validation/suggested-policy.ts"],"names":[],"mappings":"AA+BA;;;GAGG;AAEH,eAAO,MAAM,aAAa,cAAiD,CAAC;AAE5E,eAAO,MAAM,SAAS,yBAAyB,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,aAAa,cAAqD,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRolePolicy = exports.getUserPolicy = void 0;
|
|
4
|
-
const required_permissions_1 = require("./required-permissions");
|
|
3
|
+
exports.getRolePolicy = exports.ROLE_NAME = exports.getUserPolicy = void 0;
|
|
5
4
|
const role_permissions_1 = require("./role-permissions");
|
|
5
|
+
const user_permissions_1 = require("./user-permissions");
|
|
6
6
|
const suggestedPolicy = {
|
|
7
7
|
Version: '2012-10-17',
|
|
8
8
|
Statement: [
|
|
9
|
-
...
|
|
9
|
+
...user_permissions_1.requiredPermissions.map((per) => {
|
|
10
10
|
return {
|
|
11
|
-
Sid:
|
|
11
|
+
Sid: per.id,
|
|
12
12
|
Effect: 'Allow',
|
|
13
13
|
Action: per.actions,
|
|
14
14
|
Resource: per.resource,
|
|
@@ -31,13 +31,14 @@ const suggestedRolePolicy = {
|
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
33
|
* @description Returns an inline JSON policy to be assigned to the AWS user whose credentials are being used for excuting CLI commands or calling Node.JS functions.
|
|
34
|
-
* @link https://remotion.dev/docs/lambda/getuserpolicy
|
|
34
|
+
* @link https://v3.remotion.dev/docs/lambda/getuserpolicy
|
|
35
35
|
*/
|
|
36
36
|
const getUserPolicy = () => JSON.stringify(suggestedPolicy, null, 2);
|
|
37
37
|
exports.getUserPolicy = getUserPolicy;
|
|
38
|
+
exports.ROLE_NAME = 'remotion-lambda-role';
|
|
38
39
|
/**
|
|
39
40
|
* @description Returns an inline JSON policy to be assigned to the 'remotion-lambda-role' role that needs to be created in your AWS account.
|
|
40
|
-
* @link https://remotion.dev/docs/lambda/getrolepolicy
|
|
41
|
+
* @link https://v3.remotion.dev/docs/lambda/getrolepolicy
|
|
41
42
|
*/
|
|
42
43
|
const getRolePolicy = () => JSON.stringify(suggestedRolePolicy, null, 2);
|
|
43
44
|
exports.getRolePolicy = getRolePolicy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggested-policy.js","sourceRoot":"","sources":["../../../src/api/iam-validation/suggested-policy.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"suggested-policy.js","sourceRoot":"","sources":["../../../src/api/iam-validation/suggested-policy.ts"],"names":[],"mappings":";;;AAAA,yDAAmD;AACnD,yDAAuD;AAEvD,MAAM,eAAe,GAAG;IACvB,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE;QACV,GAAG,sCAAmB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YAClC,OAAO;gBACN,GAAG,EAAE,GAAG,CAAC,EAAE;gBACX,MAAM,EAAE,OAAO;gBACf,MAAM,EAAE,GAAG,CAAC,OAAO;gBACnB,QAAQ,EAAE,GAAG,CAAC,QAAQ;aACtB,CAAC;QACH,CAAC,CAAC;KACF;CACD,CAAC;AAEF,MAAM,mBAAmB,GAAG;IAC3B,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE;QACV,GAAG,kCAAe,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;YACjC,OAAO;gBACN,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;gBACd,MAAM,EAAE,OAAO;gBACf,MAAM,EAAE,GAAG,CAAC,OAAO;gBACnB,QAAQ,EAAE,GAAG,CAAC,QAAQ;aACtB,CAAC;QACH,CAAC,CAAC;KACF;CACD,CAAC;AAEF;;;GAGG;AAEI,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAA/D,QAAA,aAAa,iBAAkD;AAE/D,QAAA,SAAS,GAAG,sBAAsB,CAAC;AAEhD;;;GAGG;AACI,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,mBAAmB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAAnE,QAAA,aAAa,iBAAsD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-permissions.d.ts","sourceRoot":"","sources":["../../../src/api/iam-validation/user-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAC,MAAM,cAAc,CAAC;AAQnD,eAAO,MAAM,mBAAmB,EAAE;IACjC,OAAO,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACtC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;CACX,EAmEA,CAAC"}
|
|
@@ -3,61 +3,73 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.requiredPermissions = void 0;
|
|
4
4
|
const aws_policies_1 = require("aws-policies");
|
|
5
5
|
const constants_1 = require("../../shared/constants");
|
|
6
|
-
|
|
6
|
+
const hosted_layers_1 = require("../../shared/hosted-layers");
|
|
7
7
|
exports.requiredPermissions = [
|
|
8
8
|
{
|
|
9
|
+
id: 'Identity',
|
|
9
10
|
actions: [aws_policies_1.iam.GetUser],
|
|
10
11
|
// eslint-disable-next-line no-template-curly-in-string
|
|
11
12
|
resource: ['arn:aws:iam::*:user/${aws:username}'],
|
|
12
13
|
},
|
|
13
14
|
{
|
|
15
|
+
id: 'PermissionValidation',
|
|
14
16
|
actions: [aws_policies_1.iam.SimulatePrincipalPolicy],
|
|
15
17
|
resource: ['*'],
|
|
16
18
|
},
|
|
17
19
|
{
|
|
18
|
-
|
|
20
|
+
id: 'LambdaInvokation',
|
|
19
21
|
actions: [aws_policies_1.iam.PassRole],
|
|
20
|
-
resource: ['
|
|
22
|
+
resource: ['arn:aws:iam::*:role/remotion-lambda-role'],
|
|
21
23
|
},
|
|
22
24
|
{
|
|
25
|
+
id: 'Storage',
|
|
23
26
|
actions: [
|
|
24
27
|
aws_policies_1.s3.GetObject,
|
|
25
28
|
aws_policies_1.s3.DeleteObject,
|
|
26
|
-
aws_policies_1.s3.DeleteBucket,
|
|
27
|
-
aws_policies_1.s3.PutBucketWebsite,
|
|
28
|
-
aws_policies_1.s3.DeleteBucketWebsite,
|
|
29
29
|
aws_policies_1.s3.PutObjectAcl,
|
|
30
30
|
aws_policies_1.s3.PutObject,
|
|
31
|
+
aws_policies_1.s3.CreateBucket,
|
|
32
|
+
aws_policies_1.s3.ListBucket,
|
|
31
33
|
aws_policies_1.s3.GetBucketLocation,
|
|
34
|
+
aws_policies_1.s3.PutBucketAcl,
|
|
35
|
+
aws_policies_1.s3.DeleteBucket,
|
|
36
|
+
aws_policies_1.s3.PutBucketWebsite,
|
|
37
|
+
aws_policies_1.s3.DeleteBucketWebsite,
|
|
32
38
|
],
|
|
33
39
|
resource: [`arn:aws:s3:::${constants_1.REMOTION_BUCKET_PREFIX}*`],
|
|
34
40
|
},
|
|
35
41
|
{
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
id: 'BucketListing',
|
|
43
|
+
actions: [aws_policies_1.s3.ListAllMyBuckets],
|
|
44
|
+
resource: ['*'],
|
|
38
45
|
},
|
|
39
46
|
{
|
|
40
|
-
|
|
47
|
+
id: 'FunctionListing',
|
|
48
|
+
actions: [aws_policies_1.lambda.ListFunctions, aws_policies_1.lambda.GetFunction],
|
|
41
49
|
resource: ['*'],
|
|
42
50
|
},
|
|
43
51
|
{
|
|
52
|
+
id: 'FunctionManagement',
|
|
44
53
|
actions: [
|
|
45
|
-
aws_policies_1.lambda.GetFunction,
|
|
46
54
|
aws_policies_1.lambda.InvokeAsync,
|
|
47
55
|
aws_policies_1.lambda.InvokeFunction,
|
|
48
56
|
aws_policies_1.lambda.CreateFunction,
|
|
49
57
|
aws_policies_1.lambda.DeleteFunction,
|
|
58
|
+
aws_policies_1.lambda.PutFunctionEventInvokeConfig,
|
|
50
59
|
],
|
|
51
60
|
resource: [`arn:aws:lambda:*:*:function:${constants_1.RENDER_FN_PREFIX}*`],
|
|
52
61
|
},
|
|
53
62
|
{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
resource: [
|
|
63
|
+
id: 'LogsRetention',
|
|
64
|
+
actions: [aws_policies_1.logs.CreateLogGroup, aws_policies_1.logs.PutRetentionPolicy],
|
|
65
|
+
resource: [
|
|
66
|
+
`arn:aws:logs:*:*:log-group:${constants_1.LOG_GROUP_PREFIX}${constants_1.RENDER_FN_PREFIX}*`,
|
|
67
|
+
],
|
|
57
68
|
},
|
|
58
69
|
{
|
|
59
|
-
|
|
60
|
-
|
|
70
|
+
id: 'FetchBinaries',
|
|
71
|
+
actions: [aws_policies_1.lambda.GetLayerVersion],
|
|
72
|
+
resource: [hosted_layers_1.REMOTION_HOSTED_LAYER_ARN],
|
|
61
73
|
},
|
|
62
74
|
];
|
|
63
|
-
//# sourceMappingURL=
|
|
75
|
+
//# sourceMappingURL=user-permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-permissions.js","sourceRoot":"","sources":["../../../src/api/iam-validation/user-permissions.ts"],"names":[],"mappings":";;;AAAA,+CAAmD;AACnD,sDAIgC;AAChC,8DAAqE;AAExD,QAAA,mBAAmB,GAI1B;IACL;QACC,EAAE,EAAE,UAAU;QACd,OAAO,EAAE,CAAC,kBAAG,CAAC,OAAO,CAAC;QACtB,uDAAuD;QACvD,QAAQ,EAAE,CAAC,qCAAqC,CAAC;KACjD;IACD;QACC,EAAE,EAAE,sBAAsB;QAC1B,OAAO,EAAE,CAAC,kBAAG,CAAC,uBAAuB,CAAC;QACtC,QAAQ,EAAE,CAAC,GAAG,CAAC;KACf;IACD;QACC,EAAE,EAAE,kBAAkB;QACtB,OAAO,EAAE,CAAC,kBAAG,CAAC,QAAQ,CAAC;QACvB,QAAQ,EAAE,CAAC,0CAA0C,CAAC;KACtD;IACD;QACC,EAAE,EAAE,SAAS;QACb,OAAO,EAAE;YACR,iBAAE,CAAC,SAAS;YACZ,iBAAE,CAAC,YAAY;YACf,iBAAE,CAAC,YAAY;YACf,iBAAE,CAAC,SAAS;YACZ,iBAAE,CAAC,YAAY;YACf,iBAAE,CAAC,UAAU;YACb,iBAAE,CAAC,iBAAiB;YACpB,iBAAE,CAAC,YAAY;YACf,iBAAE,CAAC,YAAY;YACf,iBAAE,CAAC,gBAAgB;YACnB,iBAAE,CAAC,mBAAmB;SACtB;QACD,QAAQ,EAAE,CAAC,gBAAgB,kCAAsB,GAAG,CAAC;KACrD;IACD;QACC,EAAE,EAAE,eAAe;QACnB,OAAO,EAAE,CAAC,iBAAE,CAAC,gBAAgB,CAAC;QAC9B,QAAQ,EAAE,CAAC,GAAG,CAAC;KACf;IACD;QACC,EAAE,EAAE,iBAAiB;QACrB,OAAO,EAAE,CAAC,qBAAM,CAAC,aAAa,EAAE,qBAAM,CAAC,WAAW,CAAC;QACnD,QAAQ,EAAE,CAAC,GAAG,CAAC;KACf;IACD;QACC,EAAE,EAAE,oBAAoB;QACxB,OAAO,EAAE;YACR,qBAAM,CAAC,WAAW;YAClB,qBAAM,CAAC,cAAc;YACrB,qBAAM,CAAC,cAAc;YACrB,qBAAM,CAAC,cAAc;YACrB,qBAAM,CAAC,4BAA4B;SACnC;QACD,QAAQ,EAAE,CAAC,+BAA+B,4BAAgB,GAAG,CAAC;KAC9D;IACD;QACC,EAAE,EAAE,eAAe;QACnB,OAAO,EAAE,CAAC,mBAAI,CAAC,cAAc,EAAE,mBAAI,CAAC,kBAAkB,CAAC;QACvD,QAAQ,EAAE;YACT,8BAA8B,4BAAgB,GAAG,4BAAgB,GAAG;SACpE;KACD;IACD;QACC,EAAE,EAAE,eAAe;QACnB,OAAO,EAAE,CAAC,qBAAM,CAAC,eAAe,CAAC;QACjC,QAAQ,EAAE,CAAC,yCAAyB,CAAC;KACrC;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-functions.d.ts","sourceRoot":"","sources":["../../src/api/mock-functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"mock-functions.d.ts","sourceRoot":"","sources":["../../src/api/mock-functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEjD,eAAO,IAAI,kBAAkB,EAAE,CAAC,YAAY,GAAG;IAC9C,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;CACxB,CAAC,EAAO,CAAC;AAEV,eAAO,MAAM,WAAW,OAAQ,YAAY,UAAU,SAAS,SAM9D,CAAC;AAEF,eAAO,MAAM,kBAAkB,SAAU,MAAM,UAAU,MAAM,SAI9D,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,UAAU,MAAM;YAlBhD,SAAS;aACR,cAAc;cAqBvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,WACvB,MAAM,WACL,cAAc,GAAG,IAAI;YA1BtB,SAAS;aACR,cAAc;IA8BvB,CAAC;AAEF,eAAO,MAAM,YAAY,YAExB,CAAC;AAEF,eAAO,MAAM,0BAA0B,iBAAkB,MAAM,SAM9D,CAAC"}
|
|
@@ -1,9 +1,34 @@
|
|
|
1
|
-
import { ImageFormat, PixelFormat, ProResProfile } from 'remotion';
|
|
1
|
+
import { FrameRange, ImageFormat, LogLevel, PixelFormat, ProResProfile } from 'remotion';
|
|
2
2
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
3
3
|
import { Privacy } from '../shared/constants';
|
|
4
|
+
export declare type RenderMediaOnLambdaInput = {
|
|
5
|
+
region: AwsRegion;
|
|
6
|
+
functionName: string;
|
|
7
|
+
serveUrl: string;
|
|
8
|
+
composition: string;
|
|
9
|
+
inputProps: unknown;
|
|
10
|
+
codec: 'h264-mkv' | 'mp3' | 'aac' | 'wav';
|
|
11
|
+
imageFormat: ImageFormat;
|
|
12
|
+
crf?: number | undefined;
|
|
13
|
+
envVariables?: Record<string, string>;
|
|
14
|
+
pixelFormat?: PixelFormat;
|
|
15
|
+
proResProfile?: ProResProfile;
|
|
16
|
+
privacy: Privacy;
|
|
17
|
+
quality?: number;
|
|
18
|
+
maxRetries: number;
|
|
19
|
+
framesPerLambda?: number;
|
|
20
|
+
enableChunkOptimization?: boolean;
|
|
21
|
+
logLevel?: LogLevel;
|
|
22
|
+
frameRange?: FrameRange;
|
|
23
|
+
outName?: string;
|
|
24
|
+
};
|
|
25
|
+
export declare type RenderMediaOnLambdaOutput = {
|
|
26
|
+
renderId: string;
|
|
27
|
+
bucketName: string;
|
|
28
|
+
};
|
|
4
29
|
/**
|
|
5
30
|
* @description Triggers a render on a lambda given a composition and a lambda function.
|
|
6
|
-
* @link https://remotion.dev/docs/lambda/
|
|
31
|
+
* @link https://v3.remotion.dev/docs/lambda/rendermediaonlambda
|
|
7
32
|
* @param params.functionName The name of the Lambda function that should be used
|
|
8
33
|
* @param params.serveUrl The URL of the deployed project
|
|
9
34
|
* @param params.composition The ID of the composition which should be rendered.
|
|
@@ -17,27 +42,12 @@ import { Privacy } from '../shared/constants';
|
|
|
17
42
|
* @param params.region The AWS region in which the video should be rendered.
|
|
18
43
|
* @param params.maxRetries How often rendering a chunk may fail before the video render gets aborted.
|
|
19
44
|
* @param params.enableChunkOptimization Whether Remotion should restructure and optimize chunks for subsequent renders. Default true.
|
|
20
|
-
* @
|
|
45
|
+
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
|
|
46
|
+
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
21
47
|
*/
|
|
22
|
-
export declare const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
codec: 'h264-mkv' | 'mp3' | 'aac' | 'wav';
|
|
29
|
-
imageFormat: ImageFormat;
|
|
30
|
-
crf?: number | undefined;
|
|
31
|
-
envVariables?: Record<string, string> | undefined;
|
|
32
|
-
pixelFormat?: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le" | undefined;
|
|
33
|
-
proResProfile?: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
34
|
-
privacy: Privacy;
|
|
35
|
-
quality?: number | undefined;
|
|
36
|
-
maxRetries: number;
|
|
37
|
-
framesPerLambda?: number | undefined;
|
|
38
|
-
enableChunkOptimization?: boolean | undefined;
|
|
39
|
-
}) => Promise<{
|
|
40
|
-
renderId: string;
|
|
41
|
-
bucketName: string;
|
|
42
|
-
}>;
|
|
43
|
-
//# sourceMappingURL=render-video-on-lambda.d.ts.map
|
|
48
|
+
export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, outName, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated Renamed to renderMediaOnLambda()
|
|
51
|
+
*/
|
|
52
|
+
export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, outName, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
53
|
+
//# sourceMappingURL=render-media-on-lambda.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-media-on-lambda.d.ts","sourceRoot":"","sources":["../../src/api/render-media-on-lambda.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,WAAW,EAEX,QAAQ,EACR,WAAW,EACX,aAAa,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAiB,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAI5D,oBAAY,wBAAwB,GAAG;IACtC,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAC1C,WAAW,EAAE,WAAW,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,yBAAyB,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,mBAAmB,2OAoB7B,wBAAwB,KAAG,QAAQ,yBAAyB,CA+B9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,2OApC7B,wBAAwB,KAAG,QAAQ,yBAAyB,CAoCT,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderVideoOnLambda = void 0;
|
|
3
|
+
exports.renderVideoOnLambda = exports.renderMediaOnLambda = void 0;
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
4
5
|
const call_lambda_1 = require("../shared/call-lambda");
|
|
5
6
|
const constants_1 = require("../shared/constants");
|
|
6
|
-
const
|
|
7
|
+
const convert_to_serve_url_1 = require("../shared/convert-to-serve-url");
|
|
8
|
+
const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lambda");
|
|
7
9
|
/**
|
|
8
10
|
* @description Triggers a render on a lambda given a composition and a lambda function.
|
|
9
|
-
* @link https://remotion.dev/docs/lambda/
|
|
11
|
+
* @link https://v3.remotion.dev/docs/lambda/rendermediaonlambda
|
|
10
12
|
* @param params.functionName The name of the Lambda function that should be used
|
|
11
13
|
* @param params.serveUrl The URL of the deployed project
|
|
12
14
|
* @param params.composition The ID of the composition which should be rendered.
|
|
@@ -20,17 +22,19 @@ const validate_frames_per_lambda_1 = require("./validate-frames-per-lambda");
|
|
|
20
22
|
* @param params.region The AWS region in which the video should be rendered.
|
|
21
23
|
* @param params.maxRetries How often rendering a chunk may fail before the video render gets aborted.
|
|
22
24
|
* @param params.enableChunkOptimization Whether Remotion should restructure and optimize chunks for subsequent renders. Default true.
|
|
23
|
-
* @
|
|
25
|
+
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
|
|
26
|
+
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
24
27
|
*/
|
|
25
|
-
const
|
|
28
|
+
const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, outName, }) => {
|
|
26
29
|
(0, validate_frames_per_lambda_1.validateFramesPerLambda)(framesPerLambda);
|
|
30
|
+
const realServeUrl = await (0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region);
|
|
27
31
|
const res = await (0, call_lambda_1.callLambda)({
|
|
28
32
|
functionName,
|
|
29
33
|
type: constants_1.LambdaRoutines.start,
|
|
30
34
|
payload: {
|
|
31
|
-
framesPerLambda: framesPerLambda !== null && framesPerLambda !== void 0 ? framesPerLambda :
|
|
35
|
+
framesPerLambda: framesPerLambda !== null && framesPerLambda !== void 0 ? framesPerLambda : null,
|
|
32
36
|
composition,
|
|
33
|
-
serveUrl,
|
|
37
|
+
serveUrl: realServeUrl,
|
|
34
38
|
inputProps,
|
|
35
39
|
codec,
|
|
36
40
|
imageFormat,
|
|
@@ -42,6 +46,9 @@ const renderVideoOnLambda = async ({ functionName, serveUrl, inputProps, codec,
|
|
|
42
46
|
maxRetries,
|
|
43
47
|
privacy,
|
|
44
48
|
enableChunkOptimization,
|
|
49
|
+
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : remotion_1.Internals.Logging.DEFAULT_LOG_LEVEL,
|
|
50
|
+
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
|
|
51
|
+
outName: outName !== null && outName !== void 0 ? outName : null,
|
|
45
52
|
},
|
|
46
53
|
region,
|
|
47
54
|
});
|
|
@@ -50,5 +57,9 @@ const renderVideoOnLambda = async ({ functionName, serveUrl, inputProps, codec,
|
|
|
50
57
|
bucketName: res.bucketName,
|
|
51
58
|
};
|
|
52
59
|
};
|
|
53
|
-
exports.
|
|
54
|
-
|
|
60
|
+
exports.renderMediaOnLambda = renderMediaOnLambda;
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated Renamed to renderMediaOnLambda()
|
|
63
|
+
*/
|
|
64
|
+
exports.renderVideoOnLambda = exports.renderMediaOnLambda;
|
|
65
|
+
//# sourceMappingURL=render-media-on-lambda.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-media-on-lambda.js","sourceRoot":"","sources":["../../src/api/render-media-on-lambda.ts"],"names":[],"mappings":";;;AAAA,uCAOkB;AAElB,uDAAiD;AACjD,mDAA4D;AAC5D,yEAAiE;AACjE,qFAA6E;AA6B7E;;;;;;;;;;;;;;;;;;GAkBG;AAEI,MAAM,mBAAmB,GAAG,KAAK,EAAE,EACzC,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,KAAK,EACL,WAAW,EACX,GAAG,EACH,YAAY,EACZ,WAAW,EACX,aAAa,EACb,OAAO,EACP,MAAM,EACN,UAAU,EACV,WAAW,EACX,eAAe,EACf,OAAO,EACP,uBAAuB,EACvB,QAAQ,EACR,UAAU,EACV,OAAO,GACmB,EAAsC,EAAE;IAClE,IAAA,oDAAuB,EAAC,eAAe,CAAC,CAAC;IACzC,MAAM,YAAY,GAAG,MAAM,IAAA,wCAAiB,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAU,EAAC;QAC5B,YAAY;QACZ,IAAI,EAAE,0BAAc,CAAC,KAAK;QAC1B,OAAO,EAAE;YACR,eAAe,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,IAAI;YACxC,WAAW;YACX,QAAQ,EAAE,YAAY;YACtB,UAAU;YACV,KAAK;YACL,WAAW;YACX,GAAG;YACH,YAAY;YACZ,WAAW;YACX,aAAa;YACb,OAAO;YACP,UAAU;YACV,OAAO;YACP,uBAAuB;YACvB,QAAQ,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,oBAAS,CAAC,OAAO,CAAC,iBAAiB;YACzD,UAAU,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,IAAI;YAC9B,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,IAAI;SACxB;QACD,MAAM;KACN,CAAC,CAAC;IACH,OAAO;QACN,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,UAAU,EAAE,GAAG,CAAC,UAAU;KAC1B,CAAC;AACH,CAAC,CAAC;AAnDW,QAAA,mBAAmB,uBAmD9B;AAEF;;GAEG;AACU,QAAA,mBAAmB,GAAG,2BAAmB,CAAC"}
|
|
@@ -1,8 +1,31 @@
|
|
|
1
|
-
import { StillImageFormat } from 'remotion';
|
|
1
|
+
import { LogLevel, StillImageFormat } from 'remotion';
|
|
2
2
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
3
|
+
import { CostsInfo } from '../shared/constants';
|
|
4
|
+
export declare type RenderStillOnLambdaInput = {
|
|
5
|
+
region: AwsRegion;
|
|
6
|
+
functionName: string;
|
|
7
|
+
serveUrl: string;
|
|
8
|
+
composition: string;
|
|
9
|
+
inputProps: unknown;
|
|
10
|
+
imageFormat: StillImageFormat;
|
|
11
|
+
privacy: 'private' | 'public';
|
|
12
|
+
maxRetries?: number;
|
|
13
|
+
envVariables?: Record<string, string>;
|
|
14
|
+
quality?: number;
|
|
15
|
+
frame?: number;
|
|
16
|
+
logLevel?: LogLevel;
|
|
17
|
+
outName?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare type RenderStillOnLambdaOutput = {
|
|
20
|
+
estimatedPrice: CostsInfo;
|
|
21
|
+
url: string;
|
|
22
|
+
sizeInBytes: number;
|
|
23
|
+
bucketName: string;
|
|
24
|
+
renderId: string;
|
|
25
|
+
};
|
|
3
26
|
/**
|
|
4
27
|
* @description Renders a still frame on Lambda
|
|
5
|
-
* @link https://remotion.dev/docs/lambda/renderstillonlambda
|
|
28
|
+
* @link https://v3.remotion.dev/docs/lambda/renderstillonlambda
|
|
6
29
|
* @param params.functionName The name of the Lambda function that should be used
|
|
7
30
|
* @param params.serveUrl The URL of the deployed project
|
|
8
31
|
* @param params.composition The ID of the composition which should be rendered.
|
|
@@ -14,24 +37,7 @@ import { AwsRegion } from '../pricing/aws-regions';
|
|
|
14
37
|
* @param params.maxRetries How often rendering a chunk may fail before the video render gets aborted.
|
|
15
38
|
* @param params.frame Which frame should be used for the still image. Default 0.
|
|
16
39
|
* @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
|
|
17
|
-
* @returns
|
|
40
|
+
* @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
|
|
18
41
|
*/
|
|
19
|
-
export declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, }:
|
|
20
|
-
region: AwsRegion;
|
|
21
|
-
functionName: string;
|
|
22
|
-
serveUrl: string;
|
|
23
|
-
composition: string;
|
|
24
|
-
inputProps: unknown;
|
|
25
|
-
imageFormat: StillImageFormat;
|
|
26
|
-
privacy: 'private' | 'public';
|
|
27
|
-
maxRetries?: number | undefined;
|
|
28
|
-
envVariables?: Record<string, string> | undefined;
|
|
29
|
-
quality?: number | undefined;
|
|
30
|
-
frame?: number | undefined;
|
|
31
|
-
}) => Promise<{
|
|
32
|
-
estimatedPrice: import("../shared/constants").CostsInfo;
|
|
33
|
-
url: string;
|
|
34
|
-
size: number;
|
|
35
|
-
bucketName: string;
|
|
36
|
-
}>;
|
|
42
|
+
export declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
|
|
37
43
|
//# sourceMappingURL=render-still-on-lambda.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-still-on-lambda.d.ts","sourceRoot":"","sources":["../../src/api/render-still-on-lambda.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"render-still-on-lambda.d.ts","sourceRoot":"","sources":["../../src/api/render-still-on-lambda.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,gBAAgB,EAAC,MAAM,UAAU,CAAC;AACpD,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EACN,SAAS,EAGT,MAAM,qBAAqB,CAAC;AAG7B,oBAAY,wBAAwB,GAAG;IACtC,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,OAAO,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,yBAAyB,GAAG;IACvC,cAAc,EAAE,SAAS,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,mBAAmB,oJAc7B,wBAAwB,KAAG,QAAQ,yBAAyB,CA6B9D,CAAC"}
|