@remotion/lambda 4.0.202 → 4.0.205

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.
Files changed (68) hide show
  1. package/dist/admin/make-layer-public.js +19 -5
  2. package/dist/api/create-function.d.ts +3 -1
  3. package/dist/api/create-function.js +7 -5
  4. package/dist/api/deploy-function.d.ts +3 -1
  5. package/dist/api/deploy-function.js +6 -4
  6. package/dist/cli/args.d.ts +2 -0
  7. package/dist/cli/commands/functions/deploy.js +3 -1
  8. package/dist/functions/helpers/cleanup-props.d.ts +1 -4
  9. package/dist/functions/helpers/expected-out-name.d.ts +1 -1
  10. package/dist/functions/helpers/get-browser-instance.d.ts +3 -2
  11. package/dist/functions/helpers/get-browser-instance.js +3 -4
  12. package/dist/functions/helpers/get-custom-out-name.d.ts +1 -1
  13. package/dist/functions/helpers/io.d.ts +3 -33
  14. package/dist/functions/helpers/io.js +3 -104
  15. package/dist/functions/helpers/print-cloudwatch-helper.d.ts +1 -1
  16. package/dist/functions/helpers/print-cloudwatch-helper.js +3 -3
  17. package/dist/functions/helpers/write-lambda-error.d.ts +2 -3
  18. package/dist/functions/helpers/write-lambda-error.js +3 -2
  19. package/dist/functions/provider-implementation.d.ts +0 -0
  20. package/dist/functions/provider-implementation.js +1 -0
  21. package/dist/shared/compress-props.d.ts +8 -6
  22. package/dist/shared/compress-props.js +11 -14
  23. package/dist/shared/get-layers.d.ts +11 -0
  24. package/dist/shared/get-layers.js +38 -0
  25. package/dist/shared/hosted-layers.d.ts +5 -4
  26. package/dist/shared/hosted-layers.js +588 -84
  27. package/package.json +11 -11
  28. package/remotionlambda-arm64.zip +0 -0
  29. package/dist/functions/helpers/check-if-render-exists.d.ts +0 -3
  30. package/dist/functions/helpers/check-if-render-exists.js +0 -15
  31. package/dist/functions/helpers/delete-chunks.d.ts +0 -9
  32. package/dist/functions/helpers/delete-chunks.js +0 -25
  33. package/dist/functions/helpers/get-cleanup-progress.d.ts +0 -10
  34. package/dist/functions/helpers/get-cleanup-progress.js +0 -35
  35. package/dist/functions/helpers/get-encoding-metadata.d.ts +0 -7
  36. package/dist/functions/helpers/get-encoding-metadata.js +0 -15
  37. package/dist/functions/helpers/get-encoding-progress-step-size.d.ts +0 -1
  38. package/dist/functions/helpers/get-encoding-progress-step-size.js +0 -7
  39. package/dist/functions/helpers/get-files-to-delete.d.ts +0 -10
  40. package/dist/functions/helpers/get-files-to-delete.js +0 -52
  41. package/dist/functions/helpers/get-final-encoding-status.d.ts +0 -6
  42. package/dist/functions/helpers/get-final-encoding-status.js +0 -18
  43. package/dist/functions/helpers/get-folder-size.d.ts +0 -1
  44. package/dist/functions/helpers/get-folder-size.js +0 -8
  45. package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts +0 -8
  46. package/dist/functions/helpers/get-lambdas-invoked-stats.js +0 -14
  47. package/dist/functions/helpers/get-post-render-data.d.ts +0 -8
  48. package/dist/functions/helpers/get-post-render-data.js +0 -22
  49. package/dist/functions/helpers/get-render-metadata.d.ts +0 -8
  50. package/dist/functions/helpers/get-render-metadata.js +0 -17
  51. package/dist/functions/helpers/get-rendered-frames-progress.d.ts +0 -8
  52. package/dist/functions/helpers/get-rendered-frames-progress.js +0 -37
  53. package/dist/functions/helpers/get-time-to-finish.d.ts +0 -5
  54. package/dist/functions/helpers/get-time-to-finish.js +0 -13
  55. package/dist/functions/helpers/streaming-payloads.d.ts +0 -19
  56. package/dist/functions/helpers/streaming-payloads.js +0 -25
  57. package/dist/functions/helpers/write-post-render-data.d.ts +0 -9
  58. package/dist/functions/helpers/write-post-render-data.js +0 -18
  59. package/dist/functions/merge.d.ts +0 -9
  60. package/dist/functions/merge.js +0 -61
  61. package/dist/shared/chunk-progress.d.ts +0 -9
  62. package/dist/shared/chunk-progress.js +0 -2034
  63. package/dist/shared/parse-chunk-key.d.ts +0 -5
  64. package/dist/shared/parse-chunk-key.js +0 -15
  65. package/dist/shared/parse-lambda-initialized-key.d.ts +0 -5
  66. package/dist/shared/parse-lambda-initialized-key.js +0 -15
  67. package/dist/shared/serialize-props.d.ts +0 -14
  68. package/dist/shared/serialize-props.js +0 -36
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getLayers = exports.validateRuntimePreference = void 0;
4
+ const hosted_layers_1 = require("./hosted-layers");
5
+ const runtimePreferenceOptions = ['default', 'apple-emojis', 'cjk'];
6
+ const validateRuntimePreference = (option) => {
7
+ if (!option) {
8
+ return;
9
+ }
10
+ if (!runtimePreferenceOptions.includes(option)) {
11
+ throw new Error(`Invalid runtime preference ${option}. Must be one of ${runtimePreferenceOptions.join(', ')}`);
12
+ }
13
+ };
14
+ exports.validateRuntimePreference = validateRuntimePreference;
15
+ const getLayers = ({ option, region, enableV5Runtime, }) => {
16
+ const layers = enableV5Runtime
17
+ ? hosted_layers_1.v5HostedLayers[region]
18
+ : hosted_layers_1.hostedLayers[region];
19
+ return layers.filter((layer) => {
20
+ if (layer.layerArn.includes('emoji-apple')) {
21
+ return option === 'apple-emojis';
22
+ }
23
+ if (layer.layerArn.includes('emoji-google')) {
24
+ return option !== 'apple-emojis';
25
+ }
26
+ if (layer.layerArn.includes('cjk')) {
27
+ return option !== 'apple-emojis';
28
+ }
29
+ if (layer.layerArn.includes('chromium')) {
30
+ return true;
31
+ }
32
+ if (layer.layerArn.includes('fonts')) {
33
+ return true;
34
+ }
35
+ throw new Error('Unhandled layer type ');
36
+ });
37
+ };
38
+ exports.getLayers = getLayers;
@@ -1,10 +1,11 @@
1
1
  import type { AwsRegion } from '../regions';
2
2
  export declare const REMOTION_HOSTED_LAYER_ARN = "arn:aws:lambda:*:678892195805:layer:remotion-binaries-*";
3
+ export type AwsLayer = {
4
+ layerArn: string;
5
+ version: number;
6
+ };
3
7
  export type HostedLayers = {
4
- [region in AwsRegion]: {
5
- layerArn: string;
6
- version: number;
7
- }[];
8
+ [region in AwsRegion]: AwsLayer[];
8
9
  };
9
10
  export declare const hostedLayers: HostedLayers;
10
11
  export declare const v5HostedLayers: HostedLayers;