@remotion/lambda 4.0.0-webhook.27 → 4.1.0-alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +8 -8
- package/dist/admin/bundle-lambda.d.ts +0 -0
- package/dist/admin/bundle-lambda.js +24 -13
- package/dist/admin/generate-etag-list.d.ts +1 -0
- package/dist/admin/generate-etag-list.js +14 -0
- package/dist/admin/make-layer-public.d.ts +0 -0
- package/dist/admin/make-layer-public.js +59 -65
- package/dist/api/bucket-exists.d.ts +0 -0
- package/dist/api/bucket-exists.js +0 -0
- package/dist/api/clean-items.d.ts +0 -0
- package/dist/api/clean-items.js +1 -1
- package/dist/api/create-bucket.d.ts +0 -0
- package/dist/api/create-bucket.js +34 -1
- package/dist/api/create-function.d.ts +1 -3
- package/dist/api/create-function.js +27 -6
- package/dist/api/delete-function.d.ts +4 -4
- package/dist/api/delete-function.js +3 -3
- package/dist/api/delete-render.d.ts +2 -2
- package/dist/api/delete-render.js +1 -1
- package/dist/api/delete-site.d.ts +7 -7
- package/dist/api/delete-site.js +9 -7
- package/dist/api/deploy-function.d.ts +11 -13
- package/dist/api/deploy-function.js +28 -31
- package/dist/api/deploy-site.d.ts +13 -5
- package/dist/api/deploy-site.js +61 -25
- package/dist/api/download-media.d.ts +4 -8
- package/dist/api/download-media.js +5 -9
- package/dist/api/estimate-price.d.ts +3 -5
- package/dist/api/estimate-price.js +4 -10
- package/dist/api/get-aws-client.d.ts +6 -4
- package/dist/api/get-aws-client.js +3 -1
- package/dist/api/get-buckets.d.ts +1 -1
- package/dist/api/get-buckets.js +26 -9
- package/dist/api/get-compositions-on-lambda.d.ts +31 -0
- package/dist/api/get-compositions-on-lambda.js +56 -0
- package/dist/api/get-function-info.d.ts +3 -3
- package/dist/api/get-function-info.js +1 -1
- package/dist/api/get-functions.d.ts +5 -7
- package/dist/api/get-functions.js +8 -10
- package/dist/api/get-or-create-bucket.d.ts +6 -6
- package/dist/api/get-or-create-bucket.js +10 -18
- package/dist/api/get-regions.d.ts +6 -2
- package/dist/api/get-regions.js +6 -3
- package/dist/api/get-render-progress.d.ts +3 -3
- package/dist/api/get-render-progress.js +6 -11
- package/dist/api/get-sites.d.ts +4 -5
- package/dist/api/get-sites.js +1 -2
- package/dist/api/iam-validation/role-permissions.d.ts +0 -0
- package/dist/api/iam-validation/role-permissions.js +0 -0
- package/dist/api/iam-validation/simulate-rule.d.ts +2 -2
- package/dist/api/iam-validation/simulate-rule.js +0 -22
- package/dist/api/iam-validation/simulate.d.ts +3 -3
- package/dist/api/iam-validation/simulate.js +27 -6
- package/dist/api/iam-validation/suggested-policy.d.ts +0 -0
- package/dist/api/iam-validation/suggested-policy.js +0 -0
- package/dist/api/iam-validation/user-permissions.d.ts +1 -1
- package/dist/api/iam-validation/user-permissions.js +3 -8
- package/dist/api/make-lambda-payload.d.ts +5 -0
- package/dist/api/make-lambda-payload.js +77 -0
- package/dist/api/mock-functions.d.ts +0 -0
- package/dist/api/mock-functions.js +0 -0
- package/dist/api/presign-url.d.ts +4 -5
- package/dist/api/presign-url.js +3 -3
- package/dist/api/render-media-on-lambda.d.ts +25 -11
- package/dist/api/render-media-on-lambda.js +16 -49
- package/dist/api/render-still-on-lambda.d.ts +15 -6
- package/dist/api/render-still-on-lambda.js +23 -9
- package/dist/api/speculate-function-name.d.ts +14 -0
- package/dist/api/speculate-function-name.js +22 -0
- package/dist/api/upload-dir.d.ts +6 -5
- package/dist/api/upload-dir.js +54 -51
- package/dist/api/validate-webhook-signature.d.ts +2 -2
- package/dist/api/validate-webhook-signature.js +1 -1
- package/dist/cli/args.d.ts +7 -5
- package/dist/cli/args.js +1 -5
- package/dist/cli/commands/compositions/index.d.ts +2 -0
- package/dist/cli/commands/compositions/index.js +44 -0
- package/dist/cli/commands/functions/deploy.d.ts +0 -0
- package/dist/cli/commands/functions/deploy.js +15 -15
- package/dist/cli/commands/functions/index.d.ts +0 -0
- package/dist/cli/commands/functions/index.js +16 -17
- package/dist/cli/commands/functions/ls.d.ts +0 -0
- package/dist/cli/commands/functions/ls.js +17 -10
- package/dist/cli/commands/functions/rm.d.ts +0 -0
- package/dist/cli/commands/functions/rm.js +20 -7
- package/dist/cli/commands/functions/rmall.d.ts +0 -0
- package/dist/cli/commands/functions/rmall.js +20 -8
- package/dist/cli/commands/policies/policies.d.ts +0 -0
- package/dist/cli/commands/policies/policies.js +0 -0
- package/dist/cli/commands/policies/role.d.ts +0 -0
- package/dist/cli/commands/policies/role.js +0 -0
- package/dist/cli/commands/policies/user.d.ts +0 -0
- package/dist/cli/commands/policies/user.js +0 -0
- package/dist/cli/commands/policies/validate.d.ts +0 -0
- package/dist/cli/commands/policies/validate.js +0 -0
- package/dist/cli/commands/quotas/increase.d.ts +0 -0
- package/dist/cli/commands/quotas/increase.js +30 -10
- package/dist/cli/commands/quotas/index.d.ts +0 -0
- package/dist/cli/commands/quotas/index.js +8 -9
- package/dist/cli/commands/quotas/list.d.ts +0 -0
- package/dist/cli/commands/quotas/list.js +0 -0
- package/dist/cli/commands/regions.d.ts +0 -0
- package/dist/cli/commands/regions.js +6 -2
- package/dist/cli/commands/render/progress.d.ts +11 -7
- package/dist/cli/commands/render/progress.js +55 -45
- package/dist/cli/commands/render/render.d.ts +1 -1
- package/dist/cli/commands/render/render.js +99 -27
- package/dist/cli/commands/sites/create.d.ts +1 -1
- package/dist/cli/commands/sites/create.js +36 -33
- package/dist/cli/commands/sites/index.d.ts +1 -1
- package/dist/cli/commands/sites/index.js +18 -16
- package/dist/cli/commands/sites/ls.d.ts +0 -0
- package/dist/cli/commands/sites/ls.js +9 -10
- package/dist/cli/commands/sites/rm.d.ts +0 -0
- package/dist/cli/commands/sites/rm.js +6 -16
- package/dist/cli/commands/sites/rmall.d.ts +0 -0
- package/dist/cli/commands/sites/rmall.js +5 -16
- package/dist/cli/commands/still.d.ts +1 -1
- package/dist/cli/commands/still.js +49 -20
- package/dist/cli/get-aws-region.d.ts +0 -0
- package/dist/cli/get-aws-region.js +0 -0
- package/dist/cli/help.d.ts +0 -0
- package/dist/cli/help.js +4 -0
- package/dist/cli/helpers/confirm.d.ts +0 -0
- package/dist/cli/helpers/confirm.js +0 -0
- package/dist/cli/helpers/date-string.d.ts +0 -0
- package/dist/cli/helpers/date-string.js +0 -0
- package/dist/cli/helpers/find-function-name.d.ts +0 -0
- package/dist/cli/helpers/find-function-name.js +35 -6
- package/dist/cli/helpers/progress-bar.d.ts +12 -7
- package/dist/cli/helpers/progress-bar.js +20 -11
- package/dist/cli/helpers/quit.d.ts +0 -0
- package/dist/cli/helpers/quit.js +0 -0
- package/dist/cli/helpers/yes-or-no.d.ts +0 -0
- package/dist/cli/helpers/yes-or-no.js +0 -0
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +23 -12
- package/dist/cli/is-cli.d.ts +0 -0
- package/dist/cli/is-cli.js +0 -0
- package/dist/cli/log.d.ts +15 -0
- package/dist/cli/log.js +0 -0
- package/dist/client.d.ts +8 -2
- package/dist/client.js +9 -1
- package/dist/defaults.d.ts +0 -0
- package/dist/defaults.js +0 -0
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -5
- package/dist/functions/chunk-optimization/plan-frame-ranges.js +2 -15
- package/dist/functions/chunk-optimization/types.d.ts +2 -13
- package/dist/functions/chunk-optimization/types.js +0 -0
- package/dist/functions/compositions.d.ts +8 -0
- package/dist/functions/compositions.js +60 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.d.ts +0 -0
- package/dist/functions/helpers/best-frames-per-lambda-param.js +0 -0
- package/dist/functions/helpers/calculate-chunk-times.d.ts +0 -0
- package/dist/functions/helpers/calculate-chunk-times.js +0 -0
- package/dist/functions/helpers/calculate-price-from-bucket.d.ts +1 -3
- package/dist/functions/helpers/calculate-price-from-bucket.js +1 -2
- package/dist/functions/helpers/check-if-render-exists.d.ts +0 -0
- package/dist/functions/helpers/check-if-render-exists.js +0 -0
- package/dist/functions/helpers/clean-tmpdir.d.ts +0 -0
- package/dist/functions/helpers/clean-tmpdir.js +8 -8
- package/dist/functions/helpers/concat-videos.d.ts +13 -5
- package/dist/functions/helpers/concat-videos.js +38 -39
- package/dist/functions/helpers/create-post-render-data.d.ts +0 -0
- package/dist/functions/helpers/create-post-render-data.js +1 -15
- package/dist/functions/helpers/delete-chunks.d.ts +0 -0
- package/dist/functions/helpers/delete-chunks.js +0 -0
- package/dist/functions/helpers/expected-out-name.d.ts +0 -0
- package/dist/functions/helpers/expected-out-name.js +2 -2
- package/dist/functions/helpers/find-output-file-in-bucket.d.ts +1 -1
- package/dist/functions/helpers/find-output-file-in-bucket.js +0 -0
- package/dist/functions/helpers/format-costs-info.d.ts +0 -0
- package/dist/functions/helpers/format-costs-info.js +0 -0
- package/dist/functions/helpers/get-browser-instance.d.ts +1 -2
- package/dist/functions/helpers/get-browser-instance.js +7 -3
- package/dist/functions/helpers/get-chromium-executable-path.d.ts +1 -1
- package/dist/functions/helpers/get-chromium-executable-path.js +8 -6
- package/dist/functions/helpers/get-cleanup-progress.d.ts +0 -0
- package/dist/functions/helpers/get-cleanup-progress.js +0 -0
- package/dist/functions/helpers/get-current-region.d.ts +1 -1
- package/dist/functions/helpers/get-current-region.js +0 -0
- package/dist/functions/helpers/get-custom-out-name.d.ts +0 -0
- package/dist/functions/helpers/get-custom-out-name.js +1 -1
- package/dist/functions/helpers/get-encoding-metadata.d.ts +5 -8
- package/dist/functions/helpers/get-encoding-metadata.js +7 -17
- package/dist/functions/helpers/get-files-in-folder.d.ts +1 -1
- package/dist/functions/helpers/get-files-in-folder.js +5 -5
- package/dist/functions/helpers/get-files-to-delete.d.ts +1 -1
- package/dist/functions/helpers/get-files-to-delete.js +0 -0
- package/dist/functions/helpers/get-final-encoding-status.d.ts +2 -4
- package/dist/functions/helpers/get-final-encoding-status.js +1 -4
- package/dist/functions/helpers/get-folder-size.d.ts +0 -0
- package/dist/functions/helpers/get-folder-size.js +0 -0
- package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts +2 -6
- package/dist/functions/helpers/get-lambdas-invoked-stats.js +1 -9
- package/dist/functions/helpers/get-output-url-from-metadata.d.ts +0 -0
- package/dist/functions/helpers/get-output-url-from-metadata.js +0 -0
- package/dist/functions/helpers/get-overall-progress.d.ts +2 -1
- package/dist/functions/helpers/get-overall-progress.js +7 -5
- package/dist/functions/helpers/get-post-render-data.d.ts +0 -0
- package/dist/functions/helpers/get-post-render-data.js +0 -0
- package/dist/functions/helpers/get-progress.d.ts +0 -0
- package/dist/functions/helpers/get-progress.js +43 -42
- package/dist/functions/helpers/get-render-metadata.d.ts +0 -0
- package/dist/functions/helpers/get-render-metadata.js +0 -0
- package/dist/functions/helpers/get-rendered-frames-progress.d.ts +8 -0
- package/dist/functions/helpers/get-rendered-frames-progress.js +37 -0
- package/dist/functions/helpers/get-retry-stats.d.ts +1 -1
- package/dist/functions/helpers/get-retry-stats.js +0 -0
- package/dist/functions/helpers/get-time-to-finish.d.ts +0 -0
- package/dist/functions/helpers/get-time-to-finish.js +0 -0
- package/dist/functions/helpers/inspect-errors.d.ts +0 -0
- package/dist/functions/helpers/inspect-errors.js +0 -0
- package/dist/functions/helpers/io.d.ts +10 -4
- package/dist/functions/helpers/io.js +25 -3
- package/dist/functions/helpers/is-enosp-err.d.ts +0 -0
- package/dist/functions/helpers/is-enosp-err.js +1 -1
- package/dist/functions/helpers/is-warm.d.ts +0 -0
- package/dist/functions/helpers/is-warm.js +0 -0
- package/dist/functions/helpers/make-timeout-error.d.ts +8 -0
- package/dist/functions/helpers/make-timeout-error.js +35 -0
- package/dist/functions/helpers/make-timeout-message.d.ts +6 -0
- package/dist/functions/helpers/make-timeout-message.js +31 -0
- package/dist/functions/helpers/min-max.d.ts +0 -0
- package/dist/functions/helpers/min-max.js +0 -0
- package/dist/functions/helpers/print-cloudwatch-helper.d.ts +0 -0
- package/dist/functions/helpers/print-cloudwatch-helper.js +0 -0
- package/dist/functions/helpers/print-concurrency-curve.d.ts +0 -0
- package/dist/functions/helpers/print-concurrency-curve.js +0 -0
- package/dist/functions/helpers/read-with-progress.d.ts +1 -1
- package/dist/functions/helpers/read-with-progress.js +1 -1
- package/dist/functions/helpers/streamify-response.d.ts +16 -0
- package/dist/functions/helpers/streamify-response.js +67 -0
- package/dist/functions/helpers/timer.d.ts +0 -0
- package/dist/functions/helpers/timer.js +0 -0
- package/dist/functions/helpers/validate-composition.d.ts +10 -9
- package/dist/functions/helpers/validate-composition.js +16 -13
- package/dist/functions/helpers/write-lambda-error.d.ts +2 -2
- package/dist/functions/helpers/write-lambda-error.js +0 -0
- package/dist/functions/helpers/write-post-render-data.d.ts +0 -0
- package/dist/functions/helpers/write-post-render-data.js +0 -0
- package/dist/functions/index.d.ts +1 -7
- package/dist/functions/index.js +43 -10
- package/dist/functions/info.d.ts +0 -0
- package/dist/functions/info.js +0 -0
- package/dist/functions/launch.d.ts +2 -1
- package/dist/functions/launch.js +152 -134
- package/dist/functions/progress.d.ts +1 -1
- package/dist/functions/progress.js +2 -2
- package/dist/functions/renderer.d.ts +1 -1
- package/dist/functions/renderer.js +73 -42
- package/dist/functions/start.d.ts +1 -1
- package/dist/functions/start.js +22 -8
- package/dist/functions/still.d.ts +1 -1
- package/dist/functions/still.js +80 -37
- package/dist/index.d.ts +24 -8
- package/dist/index.js +23 -6
- package/dist/internals.d.ts +3 -1
- package/dist/internals.js +3 -0
- package/dist/pricing/aws-regions.d.ts +3 -2
- package/dist/pricing/aws-regions.js +31 -1
- package/dist/pricing/price-per-1-s.d.ts +0 -0
- package/dist/pricing/price-per-1-s.js +413 -39
- package/dist/regions.d.ts +0 -0
- package/dist/regions.js +0 -0
- package/dist/shared/await.d.ts +1 -1
- package/dist/shared/await.js +0 -0
- package/dist/shared/aws-clients.d.ts +6 -3
- package/dist/shared/aws-clients.js +75 -13
- package/dist/shared/bundle-site.d.ts +0 -0
- package/dist/shared/bundle-site.js +0 -0
- package/dist/shared/call-lambda.d.ts +0 -0
- package/dist/shared/call-lambda.js +27 -2
- package/dist/shared/check-credentials.d.ts +0 -0
- package/dist/shared/check-credentials.js +3 -0
- package/dist/shared/chunk-progress.d.ts +9 -0
- package/dist/shared/chunk-progress.js +2034 -0
- package/dist/shared/cleanup-serialized-input-props.d.ts +7 -0
- package/dist/shared/cleanup-serialized-input-props.js +19 -0
- package/dist/shared/constants.d.ts +140 -89
- package/dist/shared/constants.js +7 -4
- package/dist/shared/content-disposition-header.d.ts +1 -1
- package/dist/shared/content-disposition-header.js +0 -0
- package/dist/shared/convert-to-serve-url.d.ts +5 -1
- package/dist/shared/convert-to-serve-url.js +1 -5
- package/dist/shared/deserialize-input-props.d.ts +8 -0
- package/dist/shared/deserialize-input-props.js +26 -0
- package/dist/shared/docs-url.d.ts +0 -0
- package/dist/shared/docs-url.js +0 -0
- package/dist/shared/function-zip-path.d.ts +1 -1
- package/dist/shared/function-zip-path.js +3 -3
- package/dist/shared/get-account-id.d.ts +0 -0
- package/dist/shared/get-account-id.js +4 -6
- package/dist/shared/{get-cloudwatch-stream-url.d.ts → get-aws-urls.d.ts} +7 -1
- package/dist/shared/get-aws-urls.js +12 -0
- package/dist/shared/get-etag.d.ts +1 -0
- package/dist/shared/get-etag.js +24 -0
- package/dist/shared/get-function-version.d.ts +0 -0
- package/dist/shared/get-function-version.js +0 -0
- package/dist/shared/get-most-expensive-chunks.d.ts +2 -2
- package/dist/shared/get-most-expensive-chunks.js +3 -2
- package/dist/shared/get-s3-operations.d.ts +10 -0
- package/dist/shared/get-s3-operations.js +36 -0
- package/dist/shared/hosted-layers.d.ts +5 -8
- package/dist/shared/hosted-layers.js +210 -284
- package/dist/shared/invoke-webhook.d.ts +5 -18
- package/dist/shared/invoke-webhook.js +4 -19
- package/dist/shared/is-in-lambda.d.ts +0 -0
- package/dist/shared/is-in-lambda.js +0 -0
- package/dist/shared/lambda-version-string.d.ts +0 -0
- package/dist/shared/lambda-version-string.js +0 -0
- package/dist/shared/make-s3-key.d.ts +0 -0
- package/dist/shared/make-s3-key.js +2 -2
- package/dist/shared/make-s3-url.d.ts +0 -0
- package/dist/shared/make-s3-url.js +2 -2
- package/dist/shared/p-limit.d.ts +0 -0
- package/dist/shared/p-limit.js +0 -0
- package/dist/shared/parse-chunk-key.d.ts +4 -0
- package/dist/shared/parse-chunk-key.js +14 -0
- package/dist/shared/parse-lambda-initialized-key.d.ts +0 -0
- package/dist/shared/parse-lambda-initialized-key.js +0 -0
- package/dist/shared/parse-lambda-timings-key.d.ts +1 -1
- package/dist/shared/parse-lambda-timings-key.js +0 -0
- package/dist/shared/random-hash.d.ts +0 -0
- package/dist/shared/random-hash.js +0 -0
- package/dist/shared/read-dir.d.ts +9 -0
- package/dist/shared/read-dir.js +57 -0
- package/dist/shared/return-values.d.ts +7 -0
- package/dist/shared/return-values.js +0 -0
- package/dist/shared/serialize-input-props.d.ts +8 -0
- package/dist/shared/serialize-input-props.js +42 -0
- package/dist/shared/sleep.d.ts +0 -0
- package/dist/shared/sleep.js +0 -0
- package/dist/shared/stream-to-string.d.ts +0 -0
- package/dist/shared/stream-to-string.js +0 -0
- package/dist/shared/truthy.d.ts +1 -1
- package/dist/shared/truthy.js +0 -0
- package/dist/shared/validate-aws-region.d.ts +0 -0
- package/dist/shared/validate-aws-region.js +0 -0
- package/dist/shared/validate-bucketname.d.ts +5 -0
- package/dist/shared/validate-bucketname.js +19 -1
- package/dist/shared/validate-custom-role-arn.d.ts +0 -0
- package/dist/shared/validate-custom-role-arn.js +0 -0
- package/dist/shared/validate-disk-size-in-mb.d.ts +0 -0
- package/dist/shared/validate-disk-size-in-mb.js +0 -0
- package/dist/shared/validate-download-behavior.d.ts +0 -0
- package/dist/shared/validate-download-behavior.js +0 -0
- package/dist/shared/validate-frames-per-lambda.d.ts +0 -0
- package/dist/shared/validate-frames-per-lambda.js +0 -0
- package/dist/shared/validate-lambda-codec.d.ts +2 -2
- package/dist/shared/validate-lambda-codec.js +1 -1
- package/dist/shared/validate-memory-size.d.ts +0 -0
- package/dist/shared/validate-memory-size.js +0 -0
- package/dist/shared/validate-outname.d.ts +2 -2
- package/dist/shared/validate-outname.js +16 -10
- package/dist/shared/validate-presign-expiration.d.ts +0 -0
- package/dist/shared/validate-presign-expiration.js +0 -0
- package/dist/shared/validate-privacy.d.ts +1 -1
- package/dist/shared/validate-privacy.js +5 -2
- package/dist/shared/validate-retention-period.d.ts +0 -0
- package/dist/shared/validate-retention-period.js +0 -0
- package/dist/shared/validate-retries.d.ts +0 -0
- package/dist/shared/validate-retries.js +0 -0
- package/dist/shared/validate-serveurl.d.ts +0 -0
- package/dist/shared/validate-serveurl.js +0 -0
- package/dist/shared/validate-site-name.d.ts +0 -0
- package/dist/shared/validate-site-name.js +0 -0
- package/dist/shared/validate-timeout.d.ts +0 -0
- package/dist/shared/validate-timeout.js +0 -0
- package/package.json +89 -65
- package/remotionlambda-arm64.zip +0 -0
- package/.prettierrc.js +0 -14
- package/client.d.ts +0 -1
- package/client.js +0 -1
- package/dist/api/enable-s3-website.d.ts +0 -5
- package/dist/api/enable-s3-website.js +0 -16
- package/dist/cli/helpers/determine-image-format.d.ts +0 -10
- package/dist/cli/helpers/determine-image-format.js +0 -47
- package/dist/cli/helpers/get-cloudwatch-stream-url.d.ts +0 -8
- package/dist/cli/helpers/get-cloudwatch-stream-url.js +0 -7
- package/dist/cli/helpers/webhook-types.d.ts +0 -6
- package/dist/cli/helpers/webhook-types.js +0 -2
- package/dist/functions/chunk-optimization/can-use-optimization.d.ts +0 -6
- package/dist/functions/chunk-optimization/can-use-optimization.js +0 -23
- package/dist/functions/chunk-optimization/collect-data.d.ts +0 -9
- package/dist/functions/chunk-optimization/collect-data.js +0 -27
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.d.ts +0 -3
- package/dist/functions/chunk-optimization/get-frame-ranges-from-profile.js +0 -11
- package/dist/functions/chunk-optimization/get-profile-duration.d.ts +0 -3
- package/dist/functions/chunk-optimization/get-profile-duration.js +0 -18
- package/dist/functions/chunk-optimization/is-valid-profile.d.ts +0 -2
- package/dist/functions/chunk-optimization/is-valid-profile.js +0 -12
- package/dist/functions/chunk-optimization/optimize-invocation-order.d.ts +0 -2
- package/dist/functions/chunk-optimization/optimize-invocation-order.js +0 -19
- package/dist/functions/chunk-optimization/optimize-profile.d.ts +0 -9
- package/dist/functions/chunk-optimization/optimize-profile.js +0 -74
- package/dist/functions/chunk-optimization/s3-optimization-file.d.ts +0 -17
- package/dist/functions/chunk-optimization/s3-optimization-file.js +0 -47
- package/dist/functions/chunk-optimization/simulate-frame-ranges.d.ts +0 -7
- package/dist/functions/chunk-optimization/simulate-frame-ranges.js +0 -47
- package/dist/functions/chunk-optimization/sort-by-duration.d.ts +0 -2
- package/dist/functions/chunk-optimization/sort-by-duration.js +0 -25
- package/dist/functions/helpers/get-current-architecture.d.ts +0 -2
- package/dist/functions/helpers/get-current-architecture.js +0 -11
- package/dist/shared/get-cloudwatch-stream-url.js +0 -7
- package/dist/shared/validate-architecture.d.ts +0 -4
- package/dist/shared/validate-architecture.js +0 -14
- package/remotionlambda.zip +0 -0
- package/tsconfig.json +0 -16
|
@@ -2,45 +2,51 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeProgressString = exports.makeMultiProgressFromStatus = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const renderer_1 = require("@remotion/renderer");
|
|
5
6
|
const remotion_1 = require("remotion");
|
|
7
|
+
const truthy_1 = require("../../../shared/truthy");
|
|
6
8
|
const makeInvokeProgress = (invokeProgress, totalSteps, retriesInfo) => {
|
|
7
|
-
const { lambdasInvoked, totalLambdas
|
|
8
|
-
const progress =
|
|
9
|
-
? 1
|
|
10
|
-
: totalLambdas === null
|
|
11
|
-
? 0
|
|
12
|
-
: lambdasInvoked / totalLambdas;
|
|
9
|
+
const { lambdasInvoked, totalLambdas } = invokeProgress;
|
|
10
|
+
const progress = totalLambdas === null ? 0 : lambdasInvoked / totalLambdas;
|
|
13
11
|
return [
|
|
14
|
-
'⚡️',
|
|
15
12
|
`(1/${totalSteps})`,
|
|
16
13
|
cli_1.CliInternals.makeProgressBar(progress),
|
|
17
|
-
`${
|
|
18
|
-
|
|
19
|
-
?
|
|
20
|
-
:
|
|
14
|
+
`${progress === 0 ? 'Invoked' : 'Invoking'} lambdas`,
|
|
15
|
+
progress === 1
|
|
16
|
+
? cli_1.CliInternals.chalk.gray('100%')
|
|
17
|
+
: `${Math.round(progress * 100)}%`,
|
|
21
18
|
retriesInfo.length > 0 ? `(+${retriesInfo.length} retries)` : [],
|
|
22
19
|
].join(' ');
|
|
23
20
|
};
|
|
24
|
-
const
|
|
25
|
-
const lambdaIsDone = invokeProgress.doneIn !== null;
|
|
21
|
+
const makeRenderProgress = ({ chunkProgress, totalSteps, }) => {
|
|
26
22
|
const { chunksInvoked, totalChunks, doneIn } = chunkProgress;
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
const renderProgress = chunkProgress.totalFrames === null
|
|
24
|
+
? 0
|
|
25
|
+
: chunkProgress.framesRendered / chunkProgress.totalFrames;
|
|
26
|
+
const encodingProgress = totalChunks === null ? 0 : chunksInvoked / totalChunks;
|
|
27
|
+
const frames = chunkProgress.totalFrames === null
|
|
28
|
+
? null
|
|
29
|
+
: `(${chunkProgress.framesRendered}/${chunkProgress.totalFrames})`;
|
|
30
|
+
const first = [
|
|
34
31
|
`(2/${totalSteps})`,
|
|
35
|
-
cli_1.CliInternals.makeProgressBar(
|
|
36
|
-
|
|
32
|
+
cli_1.CliInternals.makeProgressBar(renderProgress),
|
|
33
|
+
doneIn === null ? 'Rendering frames' : 'Rendered frames',
|
|
34
|
+
doneIn === null ? frames : cli_1.CliInternals.chalk.gray(`${doneIn}ms`),
|
|
35
|
+
]
|
|
36
|
+
.filter(truthy_1.truthy)
|
|
37
|
+
.join(' ');
|
|
38
|
+
const second = [
|
|
39
|
+
`(3/${totalSteps})`,
|
|
40
|
+
cli_1.CliInternals.makeProgressBar(encodingProgress),
|
|
41
|
+
`${doneIn === null ? 'Encoding' : 'Encoded'} chunks`,
|
|
37
42
|
doneIn === null
|
|
38
|
-
? `${Math.round(
|
|
43
|
+
? `${Math.round(encodingProgress * 100)}%`
|
|
39
44
|
: cli_1.CliInternals.chalk.gray(`${doneIn}ms`),
|
|
40
45
|
].join(' ');
|
|
46
|
+
return [first, second];
|
|
41
47
|
};
|
|
42
|
-
const makeEncodingProgress = ({ encodingProgress, chunkProgress, totalSteps, }) => {
|
|
43
|
-
const { framesEncoded
|
|
48
|
+
const makeEncodingProgress = ({ encodingProgress, chunkProgress, totalSteps, totalFrames, timeToEncode, }) => {
|
|
49
|
+
const { framesEncoded } = encodingProgress;
|
|
44
50
|
const progress = totalFrames === null ? 0 : framesEncoded / totalFrames;
|
|
45
51
|
const chunksDone = chunkProgress.doneIn !== null;
|
|
46
52
|
const shouldShow = progress > 0 || chunksDone;
|
|
@@ -48,24 +54,28 @@ const makeEncodingProgress = ({ encodingProgress, chunkProgress, totalSteps, })
|
|
|
48
54
|
return '';
|
|
49
55
|
}
|
|
50
56
|
return [
|
|
51
|
-
|
|
52
|
-
`(3/${totalSteps})`,
|
|
57
|
+
`(4/${totalSteps})`,
|
|
53
58
|
cli_1.CliInternals.makeProgressBar(progress),
|
|
54
|
-
`${
|
|
55
|
-
|
|
59
|
+
`${timeToEncode === null ? 'Combining' : 'Combined'} videos`,
|
|
60
|
+
timeToEncode === null
|
|
56
61
|
? `${Math.round(progress * 100)}%`
|
|
57
|
-
: cli_1.CliInternals.chalk.gray(`${
|
|
62
|
+
: cli_1.CliInternals.chalk.gray(`${timeToEncode}ms`),
|
|
58
63
|
].join(' ');
|
|
59
64
|
};
|
|
60
|
-
const makeCleanupProgress = (cleanupInfo, totalSteps) => {
|
|
65
|
+
const makeCleanupProgress = (cleanupInfo, totalSteps, skipped) => {
|
|
61
66
|
if (!cleanupInfo) {
|
|
62
67
|
return '';
|
|
63
68
|
}
|
|
69
|
+
if (skipped) {
|
|
70
|
+
return [
|
|
71
|
+
`(5/${totalSteps})`,
|
|
72
|
+
cli_1.CliInternals.chalk.blueBright(`Not cleaning up because --log=verbose was set`),
|
|
73
|
+
].join(' ');
|
|
74
|
+
}
|
|
64
75
|
const { doneIn, filesDeleted, minFilesToDelete } = cleanupInfo;
|
|
65
76
|
const progress = filesDeleted / minFilesToDelete;
|
|
66
77
|
return [
|
|
67
|
-
|
|
68
|
-
`(4/${totalSteps})`,
|
|
78
|
+
`(5/${totalSteps})`,
|
|
69
79
|
cli_1.CliInternals.makeProgressBar(progress),
|
|
70
80
|
`${doneIn === null ? 'Cleaning up' : 'Cleaned up'} artifacts`,
|
|
71
81
|
doneIn === null
|
|
@@ -75,8 +85,7 @@ const makeCleanupProgress = (cleanupInfo, totalSteps) => {
|
|
|
75
85
|
};
|
|
76
86
|
const makeDownloadProgress = (downloadInfo, totalSteps) => {
|
|
77
87
|
return [
|
|
78
|
-
|
|
79
|
-
`(5/${totalSteps})`,
|
|
88
|
+
`(6/${totalSteps})`,
|
|
80
89
|
downloadInfo.totalSize === null
|
|
81
90
|
? cli_1.CliInternals.getFileSizeDownloadBar(downloadInfo.downloaded)
|
|
82
91
|
: cli_1.CliInternals.makeProgressBar(downloadInfo.downloaded / downloadInfo.totalSize),
|
|
@@ -94,42 +103,43 @@ const makeDownloadProgress = (downloadInfo, totalSteps) => {
|
|
|
94
103
|
].join(' ');
|
|
95
104
|
};
|
|
96
105
|
const makeMultiProgressFromStatus = (status) => {
|
|
97
|
-
var _a, _b, _c, _d, _e, _f
|
|
106
|
+
var _a, _b, _c, _d, _e, _f;
|
|
98
107
|
return {
|
|
99
108
|
chunkProgress: {
|
|
100
109
|
chunksInvoked: status.chunks,
|
|
101
110
|
totalChunks: (_b = (_a = status.renderMetadata) === null || _a === void 0 ? void 0 : _a.totalChunks) !== null && _b !== void 0 ? _b : null,
|
|
102
111
|
doneIn: status.timeToFinishChunks,
|
|
112
|
+
framesRendered: status.framesRendered,
|
|
113
|
+
totalFrames: status.renderMetadata
|
|
114
|
+
? renderer_1.RenderInternals.getFramesToRender(status.renderMetadata.frameRange, status.renderMetadata.everyNthFrame).length
|
|
115
|
+
: null,
|
|
103
116
|
},
|
|
104
117
|
encodingProgress: {
|
|
105
118
|
framesEncoded: (_d = (_c = status.encodingStatus) === null || _c === void 0 ? void 0 : _c.framesEncoded) !== null && _d !== void 0 ? _d : 0,
|
|
106
|
-
totalFrames: (_f = (_e = status.renderMetadata) === null || _e === void 0 ? void 0 : _e.videoConfig.durationInFrames) !== null && _f !== void 0 ? _f : 1,
|
|
107
|
-
doneIn: (_h = (_g = status.encodingStatus) === null || _g === void 0 ? void 0 : _g.doneIn) !== null && _h !== void 0 ? _h : null,
|
|
108
|
-
timeToInvoke: (_k = (_j = status.encodingStatus) === null || _j === void 0 ? void 0 : _j.timeToInvoke) !== null && _k !== void 0 ? _k : null,
|
|
109
119
|
},
|
|
110
120
|
lambdaInvokeProgress: {
|
|
111
|
-
doneIn: status.timeToInvokeLambdas,
|
|
112
121
|
lambdasInvoked: status.lambdasInvoked,
|
|
113
|
-
totalLambdas: (
|
|
122
|
+
totalLambdas: (_f = (_e = status.renderMetadata) === null || _e === void 0 ? void 0 : _e.estimatedRenderLambdaInvokations) !== null && _f !== void 0 ? _f : null,
|
|
114
123
|
},
|
|
115
124
|
cleanupInfo: status.cleanup,
|
|
116
125
|
};
|
|
117
126
|
};
|
|
118
127
|
exports.makeMultiProgressFromStatus = makeMultiProgressFromStatus;
|
|
119
|
-
const makeProgressString = ({ progress, steps, downloadInfo, retriesInfo, }) => {
|
|
128
|
+
const makeProgressString = ({ progress, steps, downloadInfo, retriesInfo, verbose, timeToEncode, totalFrames, }) => {
|
|
120
129
|
return [
|
|
121
130
|
makeInvokeProgress(progress.lambdaInvokeProgress, steps, retriesInfo),
|
|
122
|
-
|
|
131
|
+
...makeRenderProgress({
|
|
123
132
|
chunkProgress: progress.chunkProgress,
|
|
124
|
-
invokeProgress: progress.lambdaInvokeProgress,
|
|
125
133
|
totalSteps: steps,
|
|
126
134
|
}),
|
|
127
135
|
makeEncodingProgress({
|
|
128
136
|
encodingProgress: progress.encodingProgress,
|
|
129
137
|
chunkProgress: progress.chunkProgress,
|
|
130
138
|
totalSteps: steps,
|
|
139
|
+
timeToEncode,
|
|
140
|
+
totalFrames,
|
|
131
141
|
}),
|
|
132
|
-
makeCleanupProgress(progress.cleanupInfo, steps),
|
|
142
|
+
makeCleanupProgress(progress.cleanupInfo, steps, verbose),
|
|
133
143
|
downloadInfo ? makeDownloadProgress(downloadInfo, steps) : null,
|
|
134
144
|
]
|
|
135
145
|
.filter(remotion_1.Internals.truthy)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const RENDER_COMMAND = "render";
|
|
2
|
-
export declare const renderCommand: (args: string[]) => Promise<never>;
|
|
2
|
+
export declare const renderCommand: (args: string[], remotionRoot: string) => Promise<never>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renderCommand = exports.RENDER_COMMAND = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const config_1 = require("@remotion/cli/config");
|
|
5
6
|
const renderer_1 = require("@remotion/renderer");
|
|
6
7
|
const download_media_1 = require("../../../api/download-media");
|
|
7
8
|
const get_render_progress_1 = require("../../../api/get-render-progress");
|
|
@@ -11,6 +12,7 @@ const sleep_1 = require("../../../shared/sleep");
|
|
|
11
12
|
const validate_frames_per_lambda_1 = require("../../../shared/validate-frames-per-lambda");
|
|
12
13
|
const validate_privacy_1 = require("../../../shared/validate-privacy");
|
|
13
14
|
const validate_retries_1 = require("../../../shared/validate-retries");
|
|
15
|
+
const validate_serveurl_1 = require("../../../shared/validate-serveurl");
|
|
14
16
|
const args_1 = require("../../args");
|
|
15
17
|
const get_aws_region_1 = require("../../get-aws-region");
|
|
16
18
|
const find_function_name_1 = require("../../helpers/find-function-name");
|
|
@@ -18,8 +20,8 @@ const quit_1 = require("../../helpers/quit");
|
|
|
18
20
|
const log_1 = require("../../log");
|
|
19
21
|
const progress_1 = require("./progress");
|
|
20
22
|
exports.RENDER_COMMAND = 'render';
|
|
21
|
-
const renderCommand = async (args) => {
|
|
22
|
-
var _a, _b, _c, _d, _e;
|
|
23
|
+
const renderCommand = async (args, remotionRoot) => {
|
|
24
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
23
25
|
const serveUrl = args[0];
|
|
24
26
|
if (!serveUrl) {
|
|
25
27
|
log_1.Log.error('No serve URL passed.');
|
|
@@ -28,32 +30,62 @@ const renderCommand = async (args) => {
|
|
|
28
30
|
log_1.Log.info(`${constants_1.BINARY_NAME} ${exports.RENDER_COMMAND} <serve-url> <composition-id> [output-location]`);
|
|
29
31
|
(0, quit_1.quit)(1);
|
|
30
32
|
}
|
|
31
|
-
const
|
|
33
|
+
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
34
|
+
const { chromiumOptions, crf, envVariables, frameRange, inputProps, logLevel, pixelFormat, proResProfile, puppeteerTimeout, jpegQuality, scale, everyNthFrame, numberOfGifLoops, muted, overwrite, audioBitrate, videoBitrate, height, width, browserExecutable, port, } = await cli_1.CliInternals.getCliOptions({
|
|
35
|
+
type: 'series',
|
|
36
|
+
isLambda: true,
|
|
37
|
+
remotionRoot,
|
|
38
|
+
});
|
|
39
|
+
let composition = args[1];
|
|
32
40
|
if (!composition) {
|
|
33
|
-
log_1.Log.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
log_1.Log.info('No compositions passed. Fetching compositions...');
|
|
42
|
+
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
43
|
+
const server = renderer_1.RenderInternals.prepareServer({
|
|
44
|
+
concurrency: 1,
|
|
45
|
+
indent: false,
|
|
46
|
+
port,
|
|
47
|
+
remotionRoot,
|
|
48
|
+
verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose'),
|
|
49
|
+
webpackConfigOrServeUrl: serveUrl,
|
|
50
|
+
});
|
|
51
|
+
const { compositionId } = await cli_1.CliInternals.getCompositionWithDimensionOverride({
|
|
52
|
+
args,
|
|
53
|
+
compositionIdFromUi: null,
|
|
54
|
+
browserExecutable,
|
|
55
|
+
chromiumOptions,
|
|
56
|
+
envVariables,
|
|
57
|
+
height,
|
|
58
|
+
indent: false,
|
|
59
|
+
inputProps,
|
|
60
|
+
port,
|
|
61
|
+
puppeteerInstance: undefined,
|
|
62
|
+
serveUrlOrWebpackUrl: serveUrl,
|
|
63
|
+
timeoutInMilliseconds: puppeteerTimeout,
|
|
64
|
+
verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose'),
|
|
65
|
+
width,
|
|
66
|
+
server: await server,
|
|
67
|
+
});
|
|
68
|
+
composition = compositionId;
|
|
38
69
|
}
|
|
39
70
|
const outName = args_1.parsedLambdaCli['out-name'];
|
|
40
71
|
const downloadName = (_a = args[2]) !== null && _a !== void 0 ? _a : null;
|
|
41
|
-
const { codec, reason } = cli_1.CliInternals.
|
|
72
|
+
const { codec, reason } = cli_1.CliInternals.getFinalOutputCodec({
|
|
73
|
+
cliFlag: cli_1.CliInternals.parsedCli.codec,
|
|
42
74
|
downloadName,
|
|
43
75
|
outName: outName !== null && outName !== void 0 ? outName : null,
|
|
76
|
+
configFile: (_b = config_1.ConfigInternals.getOutputCodecOrUndefined()) !== null && _b !== void 0 ? _b : null,
|
|
77
|
+
uiCodec: null,
|
|
44
78
|
});
|
|
45
|
-
const
|
|
46
|
-
type: 'series',
|
|
47
|
-
isLambda: true,
|
|
79
|
+
const imageFormat = cli_1.CliInternals.getVideoImageFormat({
|
|
48
80
|
codec,
|
|
81
|
+
uiImageFormat: null,
|
|
49
82
|
});
|
|
50
83
|
const functionName = await (0, find_function_name_1.findFunctionName)();
|
|
51
|
-
const
|
|
52
|
-
const maxRetries = (_b = args_1.parsedLambdaCli['max-retries']) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MAX_RETRIES;
|
|
84
|
+
const maxRetries = (_c = args_1.parsedLambdaCli['max-retries']) !== null && _c !== void 0 ? _c : constants_1.DEFAULT_MAX_RETRIES;
|
|
53
85
|
(0, validate_retries_1.validateMaxRetries)(maxRetries);
|
|
54
|
-
const privacy = (
|
|
55
|
-
(0, validate_privacy_1.validatePrivacy)(privacy);
|
|
56
|
-
const framesPerLambda = (
|
|
86
|
+
const privacy = (_d = args_1.parsedLambdaCli.privacy) !== null && _d !== void 0 ? _d : constants_1.DEFAULT_OUTPUT_PRIVACY;
|
|
87
|
+
(0, validate_privacy_1.validatePrivacy)(privacy, true);
|
|
88
|
+
const framesPerLambda = (_e = args_1.parsedLambdaCli['frames-per-lambda']) !== null && _e !== void 0 ? _e : undefined;
|
|
57
89
|
(0, validate_frames_per_lambda_1.validateFramesPerLambda)({ framesPerLambda, durationInFrames: 1 });
|
|
58
90
|
const res = await (0, render_media_on_lambda_1.renderMediaOnLambda)({
|
|
59
91
|
functionName,
|
|
@@ -65,7 +97,7 @@ const renderCommand = async (args) => {
|
|
|
65
97
|
envVariables,
|
|
66
98
|
pixelFormat,
|
|
67
99
|
proResProfile,
|
|
68
|
-
|
|
100
|
+
jpegQuality,
|
|
69
101
|
region,
|
|
70
102
|
maxRetries,
|
|
71
103
|
composition,
|
|
@@ -82,18 +114,33 @@ const renderCommand = async (args) => {
|
|
|
82
114
|
concurrencyPerLambda: args_1.parsedLambdaCli['concurrency-per-lambda'],
|
|
83
115
|
muted,
|
|
84
116
|
overwrite,
|
|
117
|
+
audioBitrate,
|
|
118
|
+
videoBitrate,
|
|
119
|
+
forceHeight: height,
|
|
120
|
+
forceWidth: width,
|
|
85
121
|
webhook: args_1.parsedLambdaCli.webhook
|
|
86
122
|
? {
|
|
87
123
|
url: args_1.parsedLambdaCli.webhook,
|
|
88
|
-
secret: (
|
|
124
|
+
secret: (_f = args_1.parsedLambdaCli['webhook-secret']) !== null && _f !== void 0 ? _f : null,
|
|
89
125
|
}
|
|
90
126
|
: undefined,
|
|
127
|
+
rendererFunctionName: (_g = args_1.parsedLambdaCli['renderer-function-name']) !== null && _g !== void 0 ? _g : null,
|
|
128
|
+
forceBucketName: args_1.parsedLambdaCli['force-bucket-name'],
|
|
129
|
+
audioCodec: cli_1.CliInternals.parsedCli['audio-codec'],
|
|
130
|
+
});
|
|
131
|
+
const totalSteps = downloadName ? 6 : 5;
|
|
132
|
+
const progressBar = cli_1.CliInternals.createOverwriteableCliOutput({
|
|
133
|
+
quiet: cli_1.CliInternals.quietFlagProvided(),
|
|
134
|
+
cancelSignal: null,
|
|
135
|
+
// No browser logs in Lambda
|
|
136
|
+
updatesDontOverwrite: false,
|
|
137
|
+
indent: false,
|
|
91
138
|
});
|
|
92
|
-
const totalSteps = downloadName ? 5 : 4;
|
|
93
|
-
const progressBar = cli_1.CliInternals.createOverwriteableCliOutput(cli_1.CliInternals.quietFlagProvided());
|
|
94
139
|
log_1.Log.info(cli_1.CliInternals.chalk.gray(`bucket = ${res.bucketName}, function = ${functionName}`));
|
|
95
140
|
log_1.Log.info(cli_1.CliInternals.chalk.gray(`renderId = ${res.renderId}, codec = ${codec} (${reason})`));
|
|
141
|
+
const verbose = renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose');
|
|
96
142
|
log_1.Log.verbose(`CloudWatch logs (if enabled): ${res.cloudWatchLogs}`);
|
|
143
|
+
log_1.Log.verbose(`Render folder: ${res.folderInS3Console}`);
|
|
97
144
|
const status = await (0, get_render_progress_1.getRenderProgress)({
|
|
98
145
|
functionName,
|
|
99
146
|
bucketName: res.bucketName,
|
|
@@ -106,7 +153,10 @@ const renderCommand = async (args) => {
|
|
|
106
153
|
steps: totalSteps,
|
|
107
154
|
downloadInfo: null,
|
|
108
155
|
retriesInfo: status.retriesInfo,
|
|
109
|
-
|
|
156
|
+
verbose,
|
|
157
|
+
totalFrames: getTotalFrames(status),
|
|
158
|
+
timeToEncode: status.timeToEncode,
|
|
159
|
+
}), false);
|
|
110
160
|
// eslint-disable-next-line no-constant-condition
|
|
111
161
|
while (true) {
|
|
112
162
|
await (0, sleep_1.sleep)(1000);
|
|
@@ -122,14 +172,20 @@ const renderCommand = async (args) => {
|
|
|
122
172
|
steps: totalSteps,
|
|
123
173
|
retriesInfo: newStatus.retriesInfo,
|
|
124
174
|
downloadInfo: null,
|
|
125
|
-
|
|
175
|
+
verbose,
|
|
176
|
+
timeToEncode: newStatus.timeToEncode,
|
|
177
|
+
totalFrames: getTotalFrames(newStatus),
|
|
178
|
+
}), false);
|
|
126
179
|
if (newStatus.done) {
|
|
127
180
|
progressBar.update((0, progress_1.makeProgressString)({
|
|
128
181
|
progress: newProgress,
|
|
129
182
|
steps: totalSteps,
|
|
130
183
|
downloadInfo: null,
|
|
131
184
|
retriesInfo: newStatus.retriesInfo,
|
|
132
|
-
|
|
185
|
+
verbose,
|
|
186
|
+
timeToEncode: newStatus.timeToEncode,
|
|
187
|
+
totalFrames: getTotalFrames(newStatus),
|
|
188
|
+
}), false);
|
|
133
189
|
if (downloadName) {
|
|
134
190
|
const downloadStart = Date.now();
|
|
135
191
|
const { outputPath, sizeInBytes } = await (0, download_media_1.downloadMedia)({
|
|
@@ -147,7 +203,10 @@ const renderCommand = async (args) => {
|
|
|
147
203
|
downloaded,
|
|
148
204
|
totalSize,
|
|
149
205
|
},
|
|
150
|
-
|
|
206
|
+
verbose,
|
|
207
|
+
timeToEncode: newStatus.timeToEncode,
|
|
208
|
+
totalFrames: getTotalFrames(newStatus),
|
|
209
|
+
}), false);
|
|
151
210
|
},
|
|
152
211
|
});
|
|
153
212
|
progressBar.update((0, progress_1.makeProgressString)({
|
|
@@ -159,7 +218,10 @@ const renderCommand = async (args) => {
|
|
|
159
218
|
downloaded: sizeInBytes,
|
|
160
219
|
totalSize: sizeInBytes,
|
|
161
220
|
},
|
|
162
|
-
|
|
221
|
+
verbose,
|
|
222
|
+
timeToEncode: newStatus.timeToEncode,
|
|
223
|
+
totalFrames: getTotalFrames(newStatus),
|
|
224
|
+
}), false);
|
|
163
225
|
log_1.Log.info();
|
|
164
226
|
log_1.Log.info();
|
|
165
227
|
log_1.Log.info('Done!', outputPath, cli_1.CliInternals.formatBytes(sizeInBytes));
|
|
@@ -192,7 +254,12 @@ const renderCommand = async (args) => {
|
|
|
192
254
|
}
|
|
193
255
|
if (newStatus.fatalErrorEncountered) {
|
|
194
256
|
log_1.Log.error('\n');
|
|
257
|
+
const uniqueErrors = [];
|
|
195
258
|
for (const err of newStatus.errors) {
|
|
259
|
+
if (uniqueErrors.find((e) => e.stack === err.stack)) {
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
uniqueErrors.push(err);
|
|
196
263
|
if (err.explanation) {
|
|
197
264
|
log_1.Log.error(err.explanation);
|
|
198
265
|
}
|
|
@@ -204,10 +271,15 @@ const renderCommand = async (args) => {
|
|
|
204
271
|
stack: err.stack,
|
|
205
272
|
stackFrame: frames,
|
|
206
273
|
});
|
|
207
|
-
await cli_1.CliInternals.handleCommonError(errorWithStackFrame);
|
|
274
|
+
await cli_1.CliInternals.handleCommonError(errorWithStackFrame, logLevel);
|
|
208
275
|
}
|
|
209
276
|
(0, quit_1.quit)(1);
|
|
210
277
|
}
|
|
211
278
|
}
|
|
212
279
|
};
|
|
213
280
|
exports.renderCommand = renderCommand;
|
|
281
|
+
function getTotalFrames(status) {
|
|
282
|
+
return status.renderMetadata
|
|
283
|
+
? renderer_1.RenderInternals.getFramesToRender(status.renderMetadata.frameRange, status.renderMetadata.everyNthFrame).length
|
|
284
|
+
: null;
|
|
285
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const SITES_CREATE_SUBCOMMAND = "create";
|
|
2
|
-
export declare const sitesCreateSubcommand: (args: string[]) => Promise<void>;
|
|
2
|
+
export declare const sitesCreateSubcommand: (args: string[], remotionRoot: string) => Promise<void>;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.sitesCreateSubcommand = exports.SITES_CREATE_SUBCOMMAND = void 0;
|
|
7
4
|
const cli_1 = require("@remotion/cli");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
5
|
+
const config_1 = require("@remotion/cli/config");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
10
7
|
const deploy_site_1 = require("../../../api/deploy-site");
|
|
11
8
|
const get_or_create_bucket_1 = require("../../../api/get-or-create-bucket");
|
|
12
9
|
const constants_1 = require("../../../shared/constants");
|
|
@@ -17,44 +14,42 @@ const progress_bar_1 = require("../../helpers/progress-bar");
|
|
|
17
14
|
const quit_1 = require("../../helpers/quit");
|
|
18
15
|
const log_1 = require("../../log");
|
|
19
16
|
exports.SITES_CREATE_SUBCOMMAND = 'create';
|
|
20
|
-
const sitesCreateSubcommand = async (args) => {
|
|
21
|
-
var _a, _b;
|
|
22
|
-
const
|
|
23
|
-
if (!
|
|
17
|
+
const sitesCreateSubcommand = async (args, remotionRoot) => {
|
|
18
|
+
var _a, _b, _c;
|
|
19
|
+
const { file, reason } = cli_1.CliInternals.findEntryPoint(args, remotionRoot);
|
|
20
|
+
if (!file) {
|
|
24
21
|
log_1.Log.error('No entry file passed.');
|
|
25
22
|
log_1.Log.info('Pass an additional argument specifying the entry file of your Remotion project:');
|
|
26
23
|
log_1.Log.info();
|
|
27
24
|
log_1.Log.info(`${constants_1.BINARY_NAME} deploy <entry-file.ts>`);
|
|
28
25
|
(0, quit_1.quit)(1);
|
|
26
|
+
return;
|
|
29
27
|
}
|
|
30
|
-
|
|
31
|
-
if (!(0, fs_1.existsSync)(absoluteFile)) {
|
|
32
|
-
log_1.Log.error(`No file exists at ${absoluteFile}. Make sure the path exists and try again.`);
|
|
33
|
-
(0, quit_1.quit)(1);
|
|
34
|
-
}
|
|
35
|
-
if ((0, fs_1.lstatSync)(absoluteFile).isDirectory()) {
|
|
36
|
-
log_1.Log.error(`You passed a path ${absoluteFile} but it is a directory. Pass a file instead.`);
|
|
37
|
-
(0, quit_1.quit)(1);
|
|
38
|
-
}
|
|
28
|
+
log_1.Log.verbose('Entry point:', file, 'Reason:', reason);
|
|
39
29
|
const desiredSiteName = (_a = args_1.parsedLambdaCli['site-name']) !== null && _a !== void 0 ? _a : undefined;
|
|
40
30
|
if (desiredSiteName !== undefined) {
|
|
41
31
|
(0, validate_site_name_1.validateSiteName)(desiredSiteName);
|
|
42
32
|
}
|
|
43
|
-
const progressBar = cli_1.CliInternals.createOverwriteableCliOutput(
|
|
33
|
+
const progressBar = cli_1.CliInternals.createOverwriteableCliOutput({
|
|
34
|
+
quiet: cli_1.CliInternals.quietFlagProvided(),
|
|
35
|
+
cancelSignal: null,
|
|
36
|
+
// No browser logs
|
|
37
|
+
updatesDontOverwrite: false,
|
|
38
|
+
indent: false,
|
|
39
|
+
});
|
|
44
40
|
const multiProgress = {
|
|
45
41
|
bundleProgress: {
|
|
46
42
|
doneIn: null,
|
|
47
43
|
progress: 0,
|
|
48
44
|
},
|
|
49
45
|
bucketProgress: {
|
|
50
|
-
bucketCreated: false,
|
|
51
46
|
doneIn: null,
|
|
52
|
-
websiteEnabled: false,
|
|
53
47
|
},
|
|
54
48
|
deployProgress: {
|
|
55
49
|
doneIn: null,
|
|
56
50
|
totalSize: null,
|
|
57
51
|
sizeUploaded: 0,
|
|
52
|
+
stats: null,
|
|
58
53
|
},
|
|
59
54
|
};
|
|
60
55
|
const updateProgress = () => {
|
|
@@ -62,23 +57,19 @@ const sitesCreateSubcommand = async (args) => {
|
|
|
62
57
|
(0, progress_bar_1.makeBundleProgress)(multiProgress.bundleProgress),
|
|
63
58
|
(0, progress_bar_1.makeBucketProgress)(multiProgress.bucketProgress),
|
|
64
59
|
(0, progress_bar_1.makeDeployProgressBar)(multiProgress.deployProgress),
|
|
65
|
-
].join('\n'));
|
|
60
|
+
].join('\n'), false);
|
|
66
61
|
};
|
|
67
62
|
const bucketStart = Date.now();
|
|
68
|
-
const
|
|
63
|
+
const cliBucketName = (_b = args_1.parsedLambdaCli['force-bucket-name']) !== null && _b !== void 0 ? _b : null;
|
|
64
|
+
const bucketName = cliBucketName !== null && cliBucketName !== void 0 ? cliBucketName : (await (0, get_or_create_bucket_1.getOrCreateBucket)({
|
|
69
65
|
region: (0, get_aws_region_1.getAwsRegion)(),
|
|
70
|
-
|
|
71
|
-
multiProgress.bucketProgress.bucketCreated = true;
|
|
72
|
-
updateProgress();
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
multiProgress.bucketProgress.websiteEnabled = true;
|
|
66
|
+
})).bucketName;
|
|
76
67
|
multiProgress.bucketProgress.doneIn = Date.now() - bucketStart;
|
|
77
68
|
updateProgress();
|
|
78
69
|
const bundleStart = Date.now();
|
|
79
70
|
const uploadStart = Date.now();
|
|
80
|
-
const { serveUrl, siteName } = await (0, deploy_site_1.deploySite)({
|
|
81
|
-
entryPoint:
|
|
71
|
+
const { serveUrl, siteName, stats } = await (0, deploy_site_1.deploySite)({
|
|
72
|
+
entryPoint: file,
|
|
82
73
|
siteName: desiredSiteName,
|
|
83
74
|
bucketName,
|
|
84
75
|
options: {
|
|
@@ -93,19 +84,26 @@ const sitesCreateSubcommand = async (args) => {
|
|
|
93
84
|
sizeUploaded: p.sizeUploaded,
|
|
94
85
|
totalSize: p.totalSize,
|
|
95
86
|
doneIn: null,
|
|
87
|
+
stats: null,
|
|
96
88
|
};
|
|
97
89
|
updateProgress();
|
|
98
90
|
},
|
|
99
|
-
enableCaching:
|
|
100
|
-
webpackOverride: (
|
|
91
|
+
enableCaching: config_1.ConfigInternals.getWebpackCaching(),
|
|
92
|
+
webpackOverride: (_c = config_1.ConfigInternals.getWebpackOverrideFn()) !== null && _c !== void 0 ? _c : ((f) => f),
|
|
101
93
|
},
|
|
102
94
|
region: (0, get_aws_region_1.getAwsRegion)(),
|
|
95
|
+
privacy: args_1.parsedLambdaCli.privacy,
|
|
103
96
|
});
|
|
104
97
|
const uploadDuration = Date.now() - uploadStart;
|
|
105
98
|
multiProgress.deployProgress = {
|
|
106
99
|
sizeUploaded: 1,
|
|
107
100
|
totalSize: 1,
|
|
108
101
|
doneIn: uploadDuration,
|
|
102
|
+
stats: {
|
|
103
|
+
addedFiles: stats.uploadedFiles,
|
|
104
|
+
removedFiles: stats.deletedFiles,
|
|
105
|
+
untouchedFiles: stats.untouchedFiles,
|
|
106
|
+
},
|
|
109
107
|
};
|
|
110
108
|
updateProgress();
|
|
111
109
|
log_1.Log.info();
|
|
@@ -113,5 +111,10 @@ const sitesCreateSubcommand = async (args) => {
|
|
|
113
111
|
log_1.Log.info('Deployed to S3!');
|
|
114
112
|
log_1.Log.info(`Serve URL: ${serveUrl}`);
|
|
115
113
|
log_1.Log.info(`Site Name: ${siteName}`);
|
|
114
|
+
log_1.Log.info();
|
|
115
|
+
log_1.Log.info(cli_1.CliInternals.chalk.blueBright('ℹ️ If you make changes to your code, you need to redeploy the site. You can overwrite the existing site by running:'));
|
|
116
|
+
log_1.Log.info(cli_1.CliInternals.chalk.blueBright(['npx remotion lambda sites create', args[0], `--site-name=${siteName}`]
|
|
117
|
+
.filter(remotion_1.Internals.truthy)
|
|
118
|
+
.join(' ')));
|
|
116
119
|
};
|
|
117
120
|
exports.sitesCreateSubcommand = sitesCreateSubcommand;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const SITES_COMMAND = "sites";
|
|
2
|
-
export declare const sitesCommand: (args: string[]) => Promise<void> | undefined;
|
|
2
|
+
export declare const sitesCommand: (args: string[], remotionRoot: string) => Promise<void> | undefined;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sitesCommand = exports.SITES_COMMAND = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
|
-
const log_1 = require("@remotion/cli/dist/log");
|
|
6
5
|
const constants_1 = require("../../../shared/constants");
|
|
7
6
|
const quit_1 = require("../../helpers/quit");
|
|
8
7
|
const create_1 = require("./create");
|
|
@@ -11,20 +10,23 @@ const rm_1 = require("./rm");
|
|
|
11
10
|
const rmall_1 = require("./rmall");
|
|
12
11
|
exports.SITES_COMMAND = 'sites';
|
|
13
12
|
const printSitesHelp = () => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} <subcommand>`);
|
|
14
|
+
cli_1.CliInternals.Log.info();
|
|
15
|
+
cli_1.CliInternals.Log.info('Available subcommands:');
|
|
16
|
+
cli_1.CliInternals.Log.info();
|
|
17
|
+
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${create_1.SITES_CREATE_SUBCOMMAND} <entry-point>`);
|
|
18
|
+
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('Creates a new site based on a Remotion project'));
|
|
19
|
+
cli_1.CliInternals.Log.info();
|
|
20
|
+
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${ls_1.SITES_LS_SUBCOMMAND}`);
|
|
21
|
+
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('Lists the sites currently deployed'));
|
|
22
|
+
cli_1.CliInternals.Log.info();
|
|
23
|
+
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rm_1.SITES_RM_COMMAND} <site-id>`);
|
|
24
|
+
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('Remove a site from the S3 bucket.'));
|
|
25
|
+
cli_1.CliInternals.Log.info();
|
|
26
|
+
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rmall_1.SITES_RMALL_COMMAND}`);
|
|
27
|
+
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('Remove all sites from the S3 bucket.'));
|
|
26
28
|
};
|
|
27
|
-
const sitesCommand = (args) => {
|
|
29
|
+
const sitesCommand = (args, remotionRoot) => {
|
|
28
30
|
if (args[0] === ls_1.SITES_LS_SUBCOMMAND) {
|
|
29
31
|
return (0, ls_1.sitesLsSubcommand)();
|
|
30
32
|
}
|
|
@@ -35,10 +37,10 @@ const sitesCommand = (args) => {
|
|
|
35
37
|
return (0, rmall_1.sitesRmallSubcommand)();
|
|
36
38
|
}
|
|
37
39
|
if (args[0] === create_1.SITES_CREATE_SUBCOMMAND) {
|
|
38
|
-
return (0, create_1.sitesCreateSubcommand)(args.slice(1));
|
|
40
|
+
return (0, create_1.sitesCreateSubcommand)(args.slice(1), remotionRoot);
|
|
39
41
|
}
|
|
40
42
|
if (args[0]) {
|
|
41
|
-
|
|
43
|
+
cli_1.CliInternals.Log.error(`Subcommand ${args[0]} not found.`);
|
|
42
44
|
printSitesHelp();
|
|
43
45
|
(0, quit_1.quit)(1);
|
|
44
46
|
}
|
|
File without changes
|