@remotion/lambda 3.0.0-lambda.99 → 3.0.0-pnpm.295
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.js +3 -13
- 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 +24 -19
- 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 +15 -10
- package/dist/api/deploy-function.d.ts.map +1 -1
- package/dist/api/deploy-function.js +18 -4
- package/dist/api/deploy-function.js.map +1 -1
- package/dist/api/deploy-site.d.ts +3 -3
- package/dist/api/deploy-site.d.ts.map +1 -1
- package/dist/api/deploy-site.js +6 -8
- 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-aws-client.d.ts +30 -0
- package/dist/api/get-aws-client.d.ts.map +1 -0
- package/dist/api/get-aws-client.js +47 -0
- package/dist/api/get-aws-client.js.map +1 -0
- package/dist/api/get-aws-clients.d.ts +16 -0
- package/dist/api/get-aws-clients.d.ts.map +1 -0
- package/dist/api/get-aws-clients.js +40 -0
- package/dist/api/get-aws-clients.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 +12 -4
- package/dist/api/get-sites.d.ts.map +1 -1
- package/dist/api/get-sites.js +8 -3
- package/dist/api/get-sites.js.map +1 -1
- package/dist/api/iam-validation/role-permissions.d.ts.map +1 -1
- package/dist/api/iam-validation/role-permissions.js +6 -5
- 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/{required-permissions.d.ts → user-permissions.d.ts} +2 -1
- package/dist/api/iam-validation/user-permissions.d.ts.map +1 -0
- package/dist/api/iam-validation/{required-permissions.js → user-permissions.js} +27 -20
- 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/presign-url.d.ts +20 -0
- package/dist/api/presign-url.d.ts.map +1 -0
- package/dist/api/presign-url.js +47 -0
- package/dist/api/presign-url.js.map +1 -0
- package/dist/api/{render-video-on-lambda.d.ts → render-media-on-lambda.d.ts} +36 -27
- 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} +22 -12
- package/dist/api/render-media-on-lambda.js.map +1 -0
- package/dist/api/render-still-on-lambda.d.ts +28 -23
- package/dist/api/render-still-on-lambda.d.ts.map +1 -1
- package/dist/api/render-still-on-lambda.js +12 -7
- 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 +5 -3
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +1 -2
- 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 +24 -6
- 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 -7
- 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 +7 -3
- package/dist/cli/commands/render/progress.d.ts.map +1 -1
- package/dist/cli/commands/render/progress.js +11 -12
- 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 +52 -30
- 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 +8 -5
- 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 +16 -7
- 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 +42 -13
- 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 +9 -1
- 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 +3 -2
- package/dist/cli/helpers/find-function-name.js.map +1 -1
- 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 +30 -8
- 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 +1 -4
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/optimize-profile.d.ts +2 -8
- package/dist/functions/chunk-optimization/optimize-profile.d.ts.map +1 -1
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +3 -6
- 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 +1 -4
- 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 +11 -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 -2
- package/dist/functions/helpers/get-browser-instance.d.ts.map +1 -1
- package/dist/functions/helpers/get-browser-instance.js +2 -1
- package/dist/functions/helpers/get-browser-instance.js.map +1 -1
- package/dist/functions/helpers/get-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-lambdas-invoked-stats.d.ts.map +1 -1
- package/dist/functions/helpers/get-lambdas-invoked-stats.js +3 -2
- 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 +30 -6
- package/dist/functions/helpers/get-progress.js.map +1 -1
- 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 +3 -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-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 +2 -2
- package/dist/functions/helpers/validate-composition.d.ts.map +1 -1
- package/dist/functions/helpers/validate-composition.js +1 -1
- package/dist/functions/helpers/validate-composition.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 +15 -4
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/launch.d.ts.map +1 -1
- package/dist/functions/launch.js +32 -19
- 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 +19 -64
- package/dist/functions/renderer.js.map +1 -1
- package/dist/functions/start.d.ts.map +1 -1
- package/dist/functions/start.js +8 -5
- package/dist/functions/start.js.map +1 -1
- package/dist/functions/still.d.ts.map +1 -1
- package/dist/functions/still.js +10 -7
- package/dist/functions/still.js.map +1 -1
- package/dist/index.d.ts +20 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -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 +7 -0
- package/dist/shared/aws-clients.d.ts.map +1 -1
- package/dist/shared/aws-clients.js +60 -24
- 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 +27 -13
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/constants.js +11 -7
- 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/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-bucketname.d.ts +2 -0
- package/dist/shared/validate-bucketname.d.ts.map +1 -0
- package/dist/shared/validate-bucketname.js +14 -0
- package/dist/shared/validate-bucketname.js.map +1 -0
- package/dist/shared/validate-frames-per-lambda.d.ts +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-presign-expiration.d.ts +4 -0
- package/dist/shared/validate-presign-expiration.d.ts.map +1 -0
- package/dist/shared/validate-presign-expiration.js +30 -0
- package/dist/shared/validate-presign-expiration.js.map +1 -0
- package/dist/shared/validate-retention-period.d.ts +2 -0
- package/dist/shared/validate-retention-period.d.ts.map +1 -0
- package/dist/shared/validate-retention-period.js +30 -0
- package/dist/shared/validate-retention-period.js.map +1 -0
- package/dist/shared/validate-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 +18 -0
- package/dist/shared/validate-site-name.js.map +1 -0
- package/package.json +13 -12
- package/remotionlambda.zip +0 -0
- 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/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/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 -2
- package/dist/cli/cleanup.d.ts.map +0 -1
- package/dist/cli/cleanup.js +0 -3
- package/dist/cli/cleanup.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/functions/helpers/upload-browser-logs.d.ts +0 -11
- package/dist/functions/helpers/upload-browser-logs.d.ts.map +0 -1
- package/dist/functions/helpers/upload-browser-logs.js +0 -18
- package/dist/functions/helpers/upload-browser-logs.js.map +0 -1
- package/dist/functions/helpers/upload-logs.d.ts +0 -1
- package/dist/functions/helpers/upload-logs.d.ts.map +0 -1
- package/dist/functions/helpers/upload-logs.js +0 -2
- package/dist/functions/helpers/upload-logs.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/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/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/normalize-serve-url.d.ts +0 -2
- package/dist/shared/normalize-serve-url.d.ts.map +0 -1
- package/dist/shared/normalize-serve-url.js +0 -20
- package/dist/shared/normalize-serve-url.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
package/.prettierrc.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
singleQuote: true,
|
|
3
|
+
bracketSpacing: false,
|
|
4
|
+
jsxBracketSameLine: false,
|
|
5
|
+
plugins: [require.resolve('prettier-plugin-organize-imports')],
|
|
6
|
+
useTabs: true,
|
|
7
|
+
overrides: [
|
|
8
|
+
{
|
|
9
|
+
files: ['*.yml'],
|
|
10
|
+
options: {
|
|
11
|
+
singleQuote: false,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
};
|
|
@@ -8,6 +8,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
8
8
|
const function_zip_path_1 = require("../shared/function-zip-path");
|
|
9
9
|
const esbuild = require("esbuild");
|
|
10
10
|
const zl = require("zip-lib");
|
|
11
|
+
const quit_1 = require("../cli/helpers/quit");
|
|
11
12
|
const bundleLambda = async () => {
|
|
12
13
|
var _a;
|
|
13
14
|
const outdir = path_1.default.join(__dirname, '..', `build-render`);
|
|
@@ -34,6 +35,6 @@ bundleLambda()
|
|
|
34
35
|
})
|
|
35
36
|
.catch((err) => {
|
|
36
37
|
console.log(err);
|
|
37
|
-
|
|
38
|
+
(0, quit_1.quit)(1);
|
|
38
39
|
});
|
|
39
40
|
//# sourceMappingURL=bundle-lambda.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-lambda.js","sourceRoot":"","sources":["../../src/admin/bundle-lambda.ts"],"names":[],"mappings":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E;KACZ,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAC/B,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACd,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,IAAA,WAAI,EAAC,CAAC,CAAC,CAAC;AACT,CAAC,CAAC,CAAC"}
|
|
@@ -2,31 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const client_lambda_1 = require("@aws-sdk/client-lambda");
|
|
4
4
|
const aws_policies_1 = require("aws-policies");
|
|
5
|
+
const quit_1 = require("../cli/helpers/quit");
|
|
5
6
|
const regions_1 = require("../regions");
|
|
6
7
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
7
8
|
const constants_1 = require("../shared/constants");
|
|
8
9
|
const runtimes = ['nodejs14.x'];
|
|
9
10
|
const layerInfo = {
|
|
10
|
-
'af-south-1': [],
|
|
11
|
-
'ap-east-1': [],
|
|
12
11
|
'ap-northeast-1': [],
|
|
13
|
-
'ap-northeast-2': [],
|
|
14
|
-
'ap-northeast-3': [],
|
|
15
12
|
'ap-south-1': [],
|
|
16
13
|
'ap-southeast-1': [],
|
|
17
14
|
'ap-southeast-2': [],
|
|
18
|
-
'ca-central-1': [],
|
|
19
15
|
'eu-central-1': [],
|
|
20
|
-
'eu-north-1': [],
|
|
21
|
-
'eu-south-1': [],
|
|
22
16
|
'eu-west-1': [],
|
|
23
17
|
'eu-west-2': [],
|
|
24
|
-
'eu-west-3': [],
|
|
25
|
-
'me-south-1': [],
|
|
26
|
-
'sa-east-1': [],
|
|
27
18
|
'us-east-1': [],
|
|
28
19
|
'us-east-2': [],
|
|
29
|
-
'us-west-1': [],
|
|
30
20
|
'us-west-2': [],
|
|
31
21
|
};
|
|
32
22
|
const makeLayerPublic = async () => {
|
|
@@ -37,7 +27,7 @@ const makeLayerPublic = async () => {
|
|
|
37
27
|
const { Version, LayerArn } = await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.PublishLayerVersionCommand({
|
|
38
28
|
Content: {
|
|
39
29
|
S3Bucket: 'remotionlambda-binaries-' + region,
|
|
40
|
-
S3Key: `remotion-layer-${layer}-
|
|
30
|
+
S3Key: `remotion-layer-${layer}-v3.zip`,
|
|
41
31
|
},
|
|
42
32
|
LayerName: layerName,
|
|
43
33
|
LicenseInfo: layer === 'chromium'
|
|
@@ -79,6 +69,6 @@ makeLayerPublic()
|
|
|
79
69
|
})
|
|
80
70
|
.catch((err) => {
|
|
81
71
|
console.log(err);
|
|
82
|
-
|
|
72
|
+
(0, quit_1.quit)(1);
|
|
83
73
|
});
|
|
84
74
|
//# sourceMappingURL=make-layer-public.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-layer-public.js","sourceRoot":"","sources":["../../src/admin/make-layer-public.ts"],"names":[],"mappings":";;AAAA,0DAGgC;AAChC,+CAAoC;
|
|
1
|
+
{"version":3,"file":"make-layer-public.js","sourceRoot":"","sources":["../../src/admin/make-layer-public.ts"],"names":[],"mappings":";;AAAA,0DAGgC;AAChC,+CAAoC;AACpC,8CAAyC;AAEzC,wCAAuC;AACvC,uDAAsD;AACtD,mDAAoD;AAEpD,MAAM,QAAQ,GAAa,CAAC,YAAY,CAAC,CAAC;AAE1C,MAAM,SAAS,GAEX;IACH,gBAAgB,EAAE,EAAE;IACpB,YAAY,EAAE,EAAE;IAChB,gBAAgB,EAAE,EAAE;IACpB,gBAAgB,EAAE,EAAE;IACpB,cAAc,EAAE,EAAE;IAClB,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,eAAe,GAAG,KAAK,IAAI,EAAE;IAClC,MAAM,MAAM,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC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BAClB,OAAO,EAAE,OAAO;aAChB,CAAC,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAC;SACjC;KACD;AACF,CAAC,CAAC;AAEF,eAAe,EAAE;KACf,IAAI,CAAC,GAAG,EAAE;IACV,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACd,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,IAAA,WAAI,EAAC,CAAC,CAAC,CAAC;AACT,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bucket-exists.d.ts","sourceRoot":"","sources":["../../src/api/bucket-exists.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"bucket-exists.d.ts","sourceRoot":"","sources":["../../src/api/bucket-exists.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,oBAAoB;gBAKpB,MAAM;YACV,SAAS;yBACI,MAAM,GAAG,IAAI;sBAkBlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-bucket.d.ts","sourceRoot":"","sources":["../../src/api/create-bucket.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"create-bucket.d.ts","sourceRoot":"","sources":["../../src/api/create-bucket.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,YAAY;YAIhB,SAAS;gBACL,MAAM;mBAQlB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AwsRegion } from '
|
|
2
|
-
export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, }: {
|
|
1
|
+
import { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
+
export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, }: {
|
|
3
3
|
createCloudWatchLogGroup: boolean;
|
|
4
4
|
region: AwsRegion;
|
|
5
5
|
zipFile: string;
|
|
@@ -7,7 +7,9 @@ export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFil
|
|
|
7
7
|
accountId: string;
|
|
8
8
|
memorySizeInMb: number;
|
|
9
9
|
timeoutInSeconds: number;
|
|
10
|
+
alreadyCreated: boolean;
|
|
11
|
+
retentionInDays: number;
|
|
10
12
|
}) => Promise<{
|
|
11
|
-
FunctionName: string
|
|
13
|
+
FunctionName: string;
|
|
12
14
|
}>;
|
|
13
15
|
//# sourceMappingURL=create-function.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-function.d.ts","sourceRoot":"","sources":["../../src/api/create-function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-function.d.ts","sourceRoot":"","sources":["../../src/api/create-function.ts"],"names":[],"mappings":"AAUA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAKjD,eAAO,MAAM,cAAc;8BAWA,OAAO;YACzB,SAAS;aACR,MAAM;kBACD,MAAM;eACT,MAAM;oBACD,MAAM;sBACJ,MAAM;oBACR,OAAO;qBACN,MAAM;;kBACG,MAAM;EAqDhC,CAAC"}
|
|
@@ -4,45 +4,50 @@ exports.createFunction = void 0;
|
|
|
4
4
|
const client_cloudwatch_logs_1 = require("@aws-sdk/client-cloudwatch-logs");
|
|
5
5
|
const client_lambda_1 = require("@aws-sdk/client-lambda");
|
|
6
6
|
const fs_1 = require("fs");
|
|
7
|
-
const log_1 = require("../cli/log");
|
|
8
7
|
const defaults_1 = require("../defaults");
|
|
9
8
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
10
9
|
const hosted_layers_1 = require("../shared/hosted-layers");
|
|
11
|
-
const
|
|
10
|
+
const suggested_policy_1 = require("./iam-validation/suggested-policy");
|
|
11
|
+
const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, }) => {
|
|
12
12
|
if (createCloudWatchLogGroup) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
try {
|
|
14
|
+
await (0, aws_clients_1.getCloudWatchLogsClient)(region).send(new client_cloudwatch_logs_1.CreateLogGroupCommand({
|
|
15
|
+
logGroupName: `${defaults_1.LOG_GROUP_PREFIX}${functionName}`,
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
catch (_err) {
|
|
19
|
+
const err = _err;
|
|
20
|
+
if (!err.message.includes('log group already exists')) {
|
|
21
|
+
throw err;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
16
24
|
await (0, aws_clients_1.getCloudWatchLogsClient)(region).send(new client_cloudwatch_logs_1.PutRetentionPolicyCommand({
|
|
17
25
|
logGroupName: `${defaults_1.LOG_GROUP_PREFIX}${functionName}`,
|
|
18
|
-
retentionInDays
|
|
26
|
+
retentionInDays,
|
|
19
27
|
}));
|
|
20
28
|
}
|
|
29
|
+
if (alreadyCreated) {
|
|
30
|
+
return { FunctionName: functionName };
|
|
31
|
+
}
|
|
21
32
|
const { FunctionName } = await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.CreateFunctionCommand({
|
|
22
33
|
Code: {
|
|
23
34
|
ZipFile: (0, fs_1.readFileSync)(zipFile),
|
|
24
35
|
},
|
|
25
36
|
FunctionName: functionName,
|
|
26
37
|
Handler: 'index.handler',
|
|
27
|
-
|
|
28
|
-
Role: `arn:aws:iam::${accountId}:role/remotion-lambda-role`,
|
|
38
|
+
Role: `arn:aws:iam::${accountId}:role/${suggested_policy_1.ROLE_NAME}`,
|
|
29
39
|
Runtime: 'nodejs14.x',
|
|
30
40
|
Description: 'Renders a Remotion video.',
|
|
31
41
|
MemorySize: memorySizeInMb,
|
|
32
42
|
Timeout: timeoutInSeconds,
|
|
33
43
|
Layers: hosted_layers_1.hostedLayers[region].map(({ layerArn, version }) => `${layerArn}:${version}`),
|
|
44
|
+
Architectures: ['arm64'],
|
|
34
45
|
}));
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
catch (err) {
|
|
43
|
-
log_1.Log.warn('\nWe now require the lambda:PutFunctionEventInvokeConfig permissions for your user. Please run `npx remotion lambda policies user` update your user policy. This will be required for the final version of Remotion Lambda.');
|
|
44
|
-
}
|
|
45
|
-
return { FunctionName };
|
|
46
|
+
await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.PutFunctionEventInvokeConfigCommand({
|
|
47
|
+
MaximumRetryAttempts: 0,
|
|
48
|
+
FunctionName,
|
|
49
|
+
}));
|
|
50
|
+
return { FunctionName: FunctionName };
|
|
46
51
|
};
|
|
47
52
|
exports.createFunction = createFunction;
|
|
48
53
|
//# sourceMappingURL=create-function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-function.js","sourceRoot":"","sources":["../../src/api/create-function.ts"],"names":[],"mappings":";;;AAAA,4EAGyC;AACzC,0DAGgC;AAChC,2BAAgC;
|
|
1
|
+
{"version":3,"file":"create-function.js","sourceRoot":"","sources":["../../src/api/create-function.ts"],"names":[],"mappings":";;;AAAA,4EAGyC;AACzC,0DAGgC;AAChC,2BAAgC;AAChC,0CAA+C;AAE/C,uDAA+E;AAC/E,2DAAqD;AACrD,wEAA4D;AAErD,MAAM,cAAc,GAAG,KAAK,EAAE,EACpC,wBAAwB,EACxB,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AAG,QAAQ,IAAI,OAAO,EAAE,CACjD;QACD,aAAa,EAAE,CAAC,OAAO,CAAC;KACxB,CAAC,CACF,CAAC;IACF,MAAM,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC,IAAI,CACjC,IAAI,mDAAmC,CAAC;QACvC,oBAAoB,EAAE,CAAC;QACvB,YAAY;KACZ,CAAC,CACF,CAAC;IAEF,OAAO,EAAC,YAAY,EAAE,YAAsB,EAAC,CAAC;AAC/C,CAAC,CAAC;AAzEW,QAAA,cAAc,kBAyEzB"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
+
export declare type DeleteFunctionInput = {
|
|
3
|
+
region: AwsRegion;
|
|
4
|
+
functionName: string;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* @description Deletes a function from AWS Lambda.
|
|
4
|
-
* @link https://remotion.dev/docs/lambda/deletefunction
|
|
8
|
+
* @link https://v3.remotion.dev/docs/lambda/deletefunction
|
|
5
9
|
* @param options.region The region the function was deployed to.
|
|
6
10
|
* @param options.functionName The name of the function.
|
|
7
|
-
* @returns Nothing. Throws if the function failed to delete.
|
|
11
|
+
* @returns {Promise<undefined>} Nothing. Throws if the function failed to delete.
|
|
8
12
|
*/
|
|
9
|
-
export declare const deleteFunction: ({ region, functionName, }:
|
|
10
|
-
region: AwsRegion;
|
|
11
|
-
functionName: string;
|
|
12
|
-
}) => Promise<void>;
|
|
13
|
+
export declare const deleteFunction: ({ region, functionName, }: DeleteFunctionInput) => Promise<void>;
|
|
13
14
|
//# sourceMappingURL=delete-function.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-function.d.ts","sourceRoot":"","sources":["../../src/api/delete-function.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAGjD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"delete-function.d.ts","sourceRoot":"","sources":["../../src/api/delete-function.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAGjD,oBAAY,mBAAmB,GAAG;IACjC,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,8BAGxB,mBAAmB,KAAG,QAAQ,IAAI,CAMpC,CAAC"}
|
|
@@ -5,10 +5,10 @@ const client_lambda_1 = require("@aws-sdk/client-lambda");
|
|
|
5
5
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
6
6
|
/**
|
|
7
7
|
* @description Deletes a function from AWS Lambda.
|
|
8
|
-
* @link https://remotion.dev/docs/lambda/deletefunction
|
|
8
|
+
* @link https://v3.remotion.dev/docs/lambda/deletefunction
|
|
9
9
|
* @param options.region The region the function was deployed to.
|
|
10
10
|
* @param options.functionName The name of the function.
|
|
11
|
-
* @returns Nothing. Throws if the function failed to delete.
|
|
11
|
+
* @returns {Promise<undefined>} Nothing. Throws if the function failed to delete.
|
|
12
12
|
*/
|
|
13
13
|
const deleteFunction = async ({ region, functionName, }) => {
|
|
14
14
|
await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.DeleteFunctionCommand({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-function.js","sourceRoot":"","sources":["../../src/api/delete-function.ts"],"names":[],"mappings":";;;AAAA,0DAA6D;AAE7D,uDAAsD;
|
|
1
|
+
{"version":3,"file":"delete-function.js","sourceRoot":"","sources":["../../src/api/delete-function.ts"],"names":[],"mappings":";;;AAAA,0DAA6D;AAE7D,uDAAsD;AAOtD;;;;;;GAMG;AACI,MAAM,cAAc,GAAG,KAAK,EAAE,EACpC,MAAM,EACN,YAAY,GACS,EAAiB,EAAE;IACxC,MAAM,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC,IAAI,CACjC,IAAI,qCAAqB,CAAC;QACzB,YAAY,EAAE,YAAY;KAC1B,CAAC,CACF,CAAC;AACH,CAAC,CAAC;AATW,QAAA,cAAc,kBASzB"}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import { AwsRegion } from '
|
|
2
|
-
declare type
|
|
3
|
-
totalSizeInBytes: number;
|
|
4
|
-
};
|
|
5
|
-
export declare const deleteSite: ({ bucketName, siteName, region, onAfterItemDeleted, }: {
|
|
1
|
+
import { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
+
export declare type DeleteSiteInput = {
|
|
6
3
|
bucketName: string;
|
|
7
4
|
siteName: string;
|
|
8
5
|
region: AwsRegion;
|
|
9
|
-
onAfterItemDeleted?: (
|
|
6
|
+
onAfterItemDeleted?: (data: {
|
|
10
7
|
bucketName: string;
|
|
11
8
|
itemName: string;
|
|
12
|
-
}) => void
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare type DeleteSiteOutput = {
|
|
12
|
+
totalSizeInBytes: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @description Deletes a deployed site from your S3 bucket. The opposite of deploySite().
|
|
17
|
+
* @link https://v3.remotion.dev/docs/lambda/deletesite
|
|
18
|
+
* @param options.bucketName The S3 bucket name where the site resides in.
|
|
19
|
+
* @param options.siteName The ID of the site that you want to delete.
|
|
20
|
+
* @param {AwsRegion} options.region The region in where the S3 bucket resides in.
|
|
21
|
+
* @param options.onAfterItemDeleted Function that gets called after each file that gets deleted, useful for showing progress.
|
|
22
|
+
* @returns {Promise<DeleteSiteOutput>} Object containing info about how much space was freed.
|
|
23
|
+
*/
|
|
24
|
+
export declare const deleteSite: ({ bucketName, siteName, region, onAfterItemDeleted, }: DeleteSiteInput) => Promise<DeleteSiteOutput>;
|
|
15
25
|
//# sourceMappingURL=delete-site.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-site.d.ts","sourceRoot":"","sources":["../../src/api/delete-site.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-site.d.ts","sourceRoot":"","sources":["../../src/api/delete-site.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAIjD,oBAAY,eAAe,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;IAClB,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC,KAAK,IAAI,CAAC;CAC5E,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC9B,gBAAgB,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,0DAKpB,eAAe,KAAG,QAAQ,gBAAgB,CAwC5C,CAAC"}
|
package/dist/api/delete-site.js
CHANGED
|
@@ -5,7 +5,16 @@ const defaults_1 = require("../defaults");
|
|
|
5
5
|
const io_1 = require("../functions/helpers/io");
|
|
6
6
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
7
7
|
const clean_items_1 = require("./clean-items");
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @description Deletes a deployed site from your S3 bucket. The opposite of deploySite().
|
|
11
|
+
* @link https://v3.remotion.dev/docs/lambda/deletesite
|
|
12
|
+
* @param options.bucketName The S3 bucket name where the site resides in.
|
|
13
|
+
* @param options.siteName The ID of the site that you want to delete.
|
|
14
|
+
* @param {AwsRegion} options.region The region in where the S3 bucket resides in.
|
|
15
|
+
* @param options.onAfterItemDeleted Function that gets called after each file that gets deleted, useful for showing progress.
|
|
16
|
+
* @returns {Promise<DeleteSiteOutput>} Object containing info about how much space was freed.
|
|
17
|
+
*/
|
|
9
18
|
const deleteSite = async ({ bucketName, siteName, region, onAfterItemDeleted, }) => {
|
|
10
19
|
const accountId = await (0, get_account_id_1.getAccountId)({ region });
|
|
11
20
|
let files = await (0, io_1.lambdaLs)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-site.js","sourceRoot":"","sources":["../../src/api/delete-site.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"delete-site.js","sourceRoot":"","sources":["../../src/api/delete-site.ts"],"names":[],"mappings":";;;AAAA,0CAAwC;AACxC,gDAAiD;AAEjD,6DAAsD;AACtD,+CAAyC;AAazC;;;;;;;;;GASG;AACI,MAAM,UAAU,GAAG,KAAK,EAAE,EAChC,UAAU,EACV,QAAQ,EACR,MAAM,EACN,kBAAkB,GACD,EAA6B,EAAE;IAChD,MAAM,SAAS,GAAG,MAAM,IAAA,6BAAY,EAAC,EAAC,MAAM,EAAC,CAAC,CAAC;IAE/C,IAAI,KAAK,GAAG,MAAM,IAAA,aAAQ,EAAC;QAC1B,UAAU;QACV,MAAM,EAAE,IAAA,sBAAW,EAAC,QAAQ,CAAC;QAC7B,MAAM;QACN,mBAAmB,EAAE,SAAS;KAC9B,CAAC,CAAC;IAEH,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACvB,OAAO;YACN,gBAAgB,EAAE,CAAC;SACnB,CAAC;KACF;IAED,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACxB,SAAS,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;;YAClC,OAAO,CAAC,GAAG,CAAC,MAAA,CAAC,CAAC,IAAI,mCAAI,CAAC,CAAC,CAAC;QAC1B,CAAC,EAAE,CAAC,CAAC,CAAC;QACN,MAAM,IAAA,wBAAU,EAAC;YAChB,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAa,CAAC;YACvC,MAAM,EAAE,UAAoB;YAC5B,kBAAkB,EAAE,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;YAC3D,mBAAmB,EAAE,GAAG,EAAE,CAAC,SAAS;YACpC,MAAM;SACN,CAAC,CAAC;QACH,KAAK,GAAG,MAAM,IAAA,aAAQ,EAAC;YACtB,UAAU;YACV,MAAM,EAAE,IAAA,sBAAW,EAAC,QAAQ,CAAC;YAC7B,MAAM;YACN,mBAAmB,EAAE,SAAS;SAC9B,CAAC,CAAC;KACH;IAED,OAAO;QACN,gBAAgB,EAAE,SAAS;KAC3B,CAAC;AACH,CAAC,CAAC;AA7CW,QAAA,UAAU,cA6CrB"}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
+
export declare type DeployFunctionInput = {
|
|
3
|
+
createCloudWatchLogGroup: boolean;
|
|
4
|
+
cloudWatchLogRetentionPeriodInDays?: number;
|
|
5
|
+
region: AwsRegion;
|
|
6
|
+
timeoutInSeconds: number;
|
|
7
|
+
memorySizeInMb: number;
|
|
8
|
+
};
|
|
9
|
+
export declare type DeployFunctionOutput = {
|
|
10
|
+
functionName: string;
|
|
11
|
+
alreadyExisted: boolean;
|
|
12
|
+
};
|
|
2
13
|
/**
|
|
3
14
|
* @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.
|
|
4
|
-
* @link https://remotion.dev/docs/lambda/deployfunction
|
|
15
|
+
* @link https://v3.remotion.dev/docs/lambda/deployfunction
|
|
5
16
|
* @param options.createCloudWatchLogGroup Whether you'd like to create a CloudWatch Log Group to store the logs for this function.
|
|
17
|
+
* @param options.cloudWatchLogRetentionPeriodInDays (optional) The number of days to retain the CloudWatch logs for this function. Default is 14 days.
|
|
6
18
|
* @param options.region The region you want to deploy your function to.
|
|
7
19
|
* @param options.timeoutInSeconds After how many seconds the lambda function should be killed if it does not end itself.
|
|
8
20
|
* @param options.memorySizeInMb How much memory should be allocated to the Lambda function.
|
|
9
|
-
* @returns An object that contains the `functionName` property
|
|
21
|
+
* @returns {Promise<DeployFunctionOutput>} An object that contains the `functionName` property
|
|
10
22
|
*/
|
|
11
|
-
export declare const deployFunction: (options:
|
|
12
|
-
createCloudWatchLogGroup: boolean;
|
|
13
|
-
region: AwsRegion;
|
|
14
|
-
timeoutInSeconds: number;
|
|
15
|
-
memorySizeInMb: number;
|
|
16
|
-
}) => Promise<{
|
|
17
|
-
functionName: string;
|
|
18
|
-
}>;
|
|
23
|
+
export declare const deployFunction: (options: DeployFunctionInput) => Promise<DeployFunctionOutput>;
|
|
19
24
|
//# sourceMappingURL=deploy-function.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-function.d.ts","sourceRoot":"","sources":["../../src/api/deploy-function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy-function.d.ts","sourceRoot":"","sources":["../../src/api/deploy-function.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAcjD,oBAAY,mBAAmB,GAAG;IACjC,wBAAwB,EAAE,OAAO,CAAC;IAClC,kCAAkC,CAAC,EAAE,MAAM,CAAC;IAC5C,MAAM,EAAE,SAAS,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,YACjB,mBAAmB,KAC1B,QAAQ,oBAAoB,CA2C9B,CAAC"}
|
|
@@ -1,29 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deployFunction = void 0;
|
|
4
|
+
const get_functions_1 = require("../api/get-functions");
|
|
4
5
|
const constants_1 = require("../shared/constants");
|
|
5
6
|
const function_zip_path_1 = require("../shared/function-zip-path");
|
|
6
7
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
7
|
-
const random_hash_1 = require("../shared/random-hash");
|
|
8
8
|
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
9
9
|
const validate_memory_size_1 = require("../shared/validate-memory-size");
|
|
10
|
+
const validate_retention_period_1 = require("../shared/validate-retention-period");
|
|
10
11
|
const validate_timeout_1 = require("../shared/validate-timeout");
|
|
11
12
|
const create_function_1 = require("./create-function");
|
|
12
13
|
/**
|
|
13
14
|
* @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.
|
|
14
|
-
* @link https://remotion.dev/docs/lambda/deployfunction
|
|
15
|
+
* @link https://v3.remotion.dev/docs/lambda/deployfunction
|
|
15
16
|
* @param options.createCloudWatchLogGroup Whether you'd like to create a CloudWatch Log Group to store the logs for this function.
|
|
17
|
+
* @param options.cloudWatchLogRetentionPeriodInDays (optional) The number of days to retain the CloudWatch logs for this function. Default is 14 days.
|
|
16
18
|
* @param options.region The region you want to deploy your function to.
|
|
17
19
|
* @param options.timeoutInSeconds After how many seconds the lambda function should be killed if it does not end itself.
|
|
18
20
|
* @param options.memorySizeInMb How much memory should be allocated to the Lambda function.
|
|
19
|
-
* @returns An object that contains the `functionName` property
|
|
21
|
+
* @returns {Promise<DeployFunctionOutput>} An object that contains the `functionName` property
|
|
20
22
|
*/
|
|
21
23
|
const deployFunction = async (options) => {
|
|
24
|
+
var _a;
|
|
22
25
|
(0, validate_memory_size_1.validateMemorySize)(options.memorySizeInMb);
|
|
23
26
|
(0, validate_timeout_1.validateTimeout)(options.timeoutInSeconds);
|
|
24
27
|
(0, validate_aws_region_1.validateAwsRegion)(options.region);
|
|
25
|
-
|
|
28
|
+
(0, validate_retention_period_1.validateCloudWatchRetentionPeriod)(options.cloudWatchLogRetentionPeriodInDays);
|
|
29
|
+
const fnNameRender = `${constants_1.RENDER_FN_PREFIX}${constants_1.CURRENT_VERSION}-${options.memorySizeInMb}mb-${options.timeoutInSeconds}sec`;
|
|
26
30
|
const accountId = await (0, get_account_id_1.getAccountId)({ region: options.region });
|
|
31
|
+
const fns = await (0, get_functions_1.getFunctions)({
|
|
32
|
+
compatibleOnly: true,
|
|
33
|
+
region: options.region,
|
|
34
|
+
});
|
|
35
|
+
const alreadyDeployed = fns.find((f) => f.version === constants_1.CURRENT_VERSION &&
|
|
36
|
+
f.memorySizeInMb === options.memorySizeInMb &&
|
|
37
|
+
f.timeoutInSeconds === options.timeoutInSeconds);
|
|
27
38
|
const created = await (0, create_function_1.createFunction)({
|
|
28
39
|
createCloudWatchLogGroup: options.createCloudWatchLogGroup,
|
|
29
40
|
region: options.region,
|
|
@@ -32,12 +43,15 @@ const deployFunction = async (options) => {
|
|
|
32
43
|
accountId,
|
|
33
44
|
memorySizeInMb: options.memorySizeInMb,
|
|
34
45
|
timeoutInSeconds: options.timeoutInSeconds,
|
|
46
|
+
retentionInDays: (_a = options.cloudWatchLogRetentionPeriodInDays) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_CLOUDWATCH_RETENTION_PERIOD,
|
|
47
|
+
alreadyCreated: Boolean(alreadyDeployed),
|
|
35
48
|
});
|
|
36
49
|
if (!created.FunctionName) {
|
|
37
50
|
throw new Error('Lambda was created but has no name');
|
|
38
51
|
}
|
|
39
52
|
return {
|
|
40
53
|
functionName: created.FunctionName,
|
|
54
|
+
alreadyExisted: Boolean(alreadyDeployed),
|
|
41
55
|
};
|
|
42
56
|
};
|
|
43
57
|
exports.deployFunction = deployFunction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-function.js","sourceRoot":"","sources":["../../src/api/deploy-function.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"deploy-function.js","sourceRoot":"","sources":["../../src/api/deploy-function.ts"],"names":[],"mappings":";;;AAAA,wDAAkD;AAElD,mDAI6B;AAC7B,mEAAyD;AACz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AC1C,eAAe,EACd,MAAA,OAAO,CAAC,kCAAkC,mCAC1C,+CAAmC;QACpC,cAAc,EAAE,OAAO,CAAC,eAAe,CAAC;KACxC,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;KACtD;IAED,OAAO;QACN,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,cAAc,EAAE,OAAO,CAAC,eAAe,CAAC;KACxC,CAAC;AACH,CAAC,CAAC;AA7CW,QAAA,cAAc,kBA6CzB"}
|
|
@@ -13,18 +13,18 @@ export declare type DeploySiteInput = {
|
|
|
13
13
|
enableCaching?: boolean;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
export declare type
|
|
16
|
+
export declare type DeploySiteOutput = Promise<{
|
|
17
17
|
serveUrl: string;
|
|
18
18
|
siteName: string;
|
|
19
19
|
}>;
|
|
20
20
|
/**
|
|
21
21
|
* @description Deploys a Remotion project to an S3 bucket to prepare it for rendering on AWS Lambda.
|
|
22
|
-
* @link https://remotion.dev/docs/lambda/deploysite
|
|
22
|
+
* @link https://v3.remotion.dev/docs/lambda/deploysite
|
|
23
23
|
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
|
|
24
24
|
* @param {string} params.entryPoint An absolute path to the entry file of your Remotion project.
|
|
25
25
|
* @param {string} params.bucketName The name of the bucket to deploy your project into.
|
|
26
26
|
* @param {string} params.siteName The name of the folder in which the project gets deployed to.
|
|
27
27
|
* @param {object} params.options Further options, see documentation page for this function.
|
|
28
28
|
*/
|
|
29
|
-
export declare const deploySite: ({ bucketName, entryPoint, siteName, options, region, }: DeploySiteInput) =>
|
|
29
|
+
export declare const deploySite: ({ bucketName, entryPoint, siteName, options, region, }: DeploySiteInput) => DeploySiteOutput;
|
|
30
30
|
//# sourceMappingURL=deploy-site.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-site.d.ts","sourceRoot":"","sources":["../../src/api/deploy-site.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,iBAAiB,EAAC,MAAM,UAAU,CAAC;AAEtD,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy-site.d.ts","sourceRoot":"","sources":["../../src/api/deploy-site.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,iBAAiB,EAAC,MAAM,UAAU,CAAC;AAEtD,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAWjD,OAAO,EAAY,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAE1D,oBAAY,eAAe,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE;QACT,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;QAC9C,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;QACvD,eAAe,CAAC,EAAE,iBAAiB,CAAC;QACpC,aAAa,CAAC,EAAE,OAAO,CAAC;KACxB,CAAC;CACF,CAAC;AAEF,oBAAY,gBAAgB,GAAG,OAAO,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,2DAMpB,eAAe,qBAqDjB,CAAC"}
|
package/dist/api/deploy-site.js
CHANGED
|
@@ -9,12 +9,14 @@ const get_account_id_1 = require("../shared/get-account-id");
|
|
|
9
9
|
const make_s3_url_1 = require("../shared/make-s3-url");
|
|
10
10
|
const random_hash_1 = require("../shared/random-hash");
|
|
11
11
|
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
12
|
+
const validate_bucketname_1 = require("../shared/validate-bucketname");
|
|
13
|
+
const validate_site_name_1 = require("../shared/validate-site-name");
|
|
12
14
|
const bucket_exists_1 = require("./bucket-exists");
|
|
13
15
|
const enable_s3_website_1 = require("./enable-s3-website");
|
|
14
16
|
const upload_dir_1 = require("./upload-dir");
|
|
15
17
|
/**
|
|
16
18
|
* @description Deploys a Remotion project to an S3 bucket to prepare it for rendering on AWS Lambda.
|
|
17
|
-
* @link https://remotion.dev/docs/lambda/deploysite
|
|
19
|
+
* @link https://v3.remotion.dev/docs/lambda/deploysite
|
|
18
20
|
* @param {AwsRegion} params.region The region in which the S3 bucket resides in.
|
|
19
21
|
* @param {string} params.entryPoint An absolute path to the entry file of your Remotion project.
|
|
20
22
|
* @param {string} params.bucketName The name of the bucket to deploy your project into.
|
|
@@ -24,12 +26,9 @@ const upload_dir_1 = require("./upload-dir");
|
|
|
24
26
|
const deploySite = async ({ bucketName, entryPoint, siteName, options, region, }) => {
|
|
25
27
|
var _a, _b, _c, _d;
|
|
26
28
|
(0, validate_aws_region_1.validateAwsRegion)(region);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (typeof siteName !== 'string' && typeof siteName !== 'undefined') {
|
|
31
|
-
throw new TypeError('The `projectName` argument must be a string if provided.');
|
|
32
|
-
}
|
|
29
|
+
(0, validate_bucketname_1.validateBucketName)(bucketName);
|
|
30
|
+
const siteId = siteName !== null && siteName !== void 0 ? siteName : (0, random_hash_1.randomHash)();
|
|
31
|
+
(0, validate_site_name_1.validateSiteName)(siteId);
|
|
33
32
|
const bucketExists = await (0, bucket_exists_1.bucketExistsInRegion)({
|
|
34
33
|
bucketName,
|
|
35
34
|
region,
|
|
@@ -38,7 +37,6 @@ const deploySite = async ({ bucketName, entryPoint, siteName, options, region, }
|
|
|
38
37
|
if (!bucketExists) {
|
|
39
38
|
throw new Error(`No bucket with the name ${bucketName} exists`);
|
|
40
39
|
}
|
|
41
|
-
const siteId = siteName !== null && siteName !== void 0 ? siteName : (0, random_hash_1.randomHash)();
|
|
42
40
|
const subFolder = (0, constants_1.getSitesKey)(siteId);
|
|
43
41
|
await (0, delete_site_1.deleteSite)({
|
|
44
42
|
bucketName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-site.js","sourceRoot":"","sources":["../../src/api/deploy-site.ts"],"names":[],"mappings":";;;AAAA,uCAAsD;AACtD,oDAA8C;AAE9C,uDAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"deploy-site.js","sourceRoot":"","sources":["../../src/api/deploy-site.ts"],"names":[],"mappings":";;;AAAA,uCAAsD;AACtD,oDAA8C;AAE9C,uDAAiD;AACjD,mDAAgD;AAChD,6DAAsD;AACtD,uDAAqD;AACrD,uDAAiD;AACjD,uEAAgE;AAChE,uEAAiE;AACjE,qEAA8D;AAC9D,mDAAqD;AACrD,2DAAoD;AACpD,6CAA0D;AAoB1D;;;;;;;;GAQG;AACI,MAAM,UAAU,GAAG,KAAK,EAAE,EAChC,UAAU,EACV,UAAU,EACV,QAAQ,EACR,OAAO,EACP,MAAM,GACW,EAAoB,EAAE;;IACvC,IAAA,uCAAiB,EAAC,MAAM,CAAC,CAAC;IAC1B,IAAA,wCAAkB,EAAC,UAAU,CAAC,CAAC;IAE/B,MAAM,MAAM,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,IAAA,wBAAU,GAAE,CAAC;IACxC,IAAA,qCAAgB,EAAC,MAAM,CAAC,CAAC;IAEzB,MAAM,YAAY,GAAG,MAAM,IAAA,oCAAoB,EAAC;QAC/C,UAAU;QACV,MAAM;QACN,mBAAmB,EAAE,MAAM,IAAA,6BAAY,EAAC,EAAC,MAAM,EAAC,CAAC;KACjD,CAAC,CAAC;IACH,IAAI,CAAC,YAAY,EAAE;QAClB,MAAM,IAAI,KAAK,CAAC,2BAA2B,UAAU,SAAS,CAAC,CAAC;KAChE;IAED,MAAM,SAAS,GAAG,IAAA,uBAAW,EAAC,MAAM,CAAC,CAAC;IACtC,MAAM,IAAA,wBAAU,EAAC;QAChB,UAAU;QACV,kBAAkB,EAAE,GAAG,EAAE,CAAC,SAAS;QACnC,MAAM;QACN,QAAQ,EAAE,MAAM;KAChB,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,MAAM,IAAA,wBAAU,EAC/B,UAAU,EACV,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,mCAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,EAC9C;QACC,UAAU,EAAE,IAAI,SAAS,GAAG;QAC5B,eAAe,EACd,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,mCAAI,oBAAS,CAAC,oBAAoB,EAAE;QAC7D,aAAa,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,mCAAI,oBAAS,CAAC,iBAAiB,EAAE;KACtE,CACD,CAAC;IAEF,MAAM,OAAO,CAAC,GAAG,CAAC;QACjB,IAAA,sBAAS,EAAC;YACT,MAAM,EAAE,UAAU;YAClB,MAAM;YACN,GAAG,EAAE,OAAO;YACZ,UAAU,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,mCAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;YAC1D,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,QAAQ;SACjB,CAAC;QACF,IAAA,mCAAe,EAAC;YACf,MAAM;YACN,UAAU;SACV,CAAC;KACF,CAAC,CAAC;IAEH,OAAO;QACN,QAAQ,EAAE,IAAA,4BAAc,EAAC,EAAC,UAAU,EAAE,SAAS,EAAE,MAAM,EAAC,CAAC;QACzD,QAAQ,EAAE,MAAM;KAChB,CAAC;AACH,CAAC,CAAC;AA3DW,QAAA,UAAU,cA2DrB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LambdaReadFileProgress } from '../functions/helpers/read-with-progress';
|
|
2
|
+
import { AwsRegion } from '../pricing/aws-regions';
|
|
3
|
+
export declare type DownloadMediaInput = {
|
|
4
|
+
region: AwsRegion;
|
|
5
|
+
bucketName: string;
|
|
6
|
+
renderId: string;
|
|
7
|
+
outPath: string;
|
|
8
|
+
onProgress?: LambdaReadFileProgress;
|
|
9
|
+
};
|
|
10
|
+
export declare type DownloadMediaOutput = {
|
|
11
|
+
outputPath: string;
|
|
12
|
+
sizeInBytes: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const downloadMedia: (input: DownloadMediaInput) => Promise<DownloadMediaOutput>;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Renamed to downloadMedia()
|
|
17
|
+
*/
|
|
18
|
+
export declare const downloadVideo: (input: DownloadMediaInput) => Promise<DownloadMediaOutput>;
|
|
19
|
+
//# sourceMappingURL=download-media.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download-media.d.ts","sourceRoot":"","sources":["../../src/api/download-media.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,sBAAsB,EAEtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAGjD,oBAAY,kBAAkB,GAAG;IAChC,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACpC,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,aAAa,UAClB,kBAAkB,KACvB,QAAQ,mBAAmB,CAuC7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,UA7ClB,kBAAkB,KACvB,QAAQ,mBAAmB,CA4CY,CAAC"}
|