@remotion/lambda 4.0.0-alpha12 → 4.0.0-alpha14

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 (76) hide show
  1. package/dist/api/delete-function.d.ts +1 -1
  2. package/dist/api/delete-render.d.ts +1 -1
  3. package/dist/api/delete-site.d.ts +2 -2
  4. package/dist/api/delete-site.js +4 -2
  5. package/dist/api/deploy-function.d.ts +2 -2
  6. package/dist/api/deploy-site.d.ts +2 -2
  7. package/dist/api/deploy-site.js +2 -1
  8. package/dist/api/download-media.d.ts +2 -2
  9. package/dist/api/estimate-price.d.ts +1 -1
  10. package/dist/api/get-aws-client.d.ts +3 -3
  11. package/dist/api/get-buckets.d.ts +1 -1
  12. package/dist/api/get-compositions-on-lambda.d.ts +2 -2
  13. package/dist/api/get-function-info.d.ts +2 -2
  14. package/dist/api/get-functions.d.ts +1 -1
  15. package/dist/api/get-or-create-bucket.d.ts +2 -2
  16. package/dist/api/get-regions.d.ts +1 -1
  17. package/dist/api/get-render-progress.d.ts +1 -1
  18. package/dist/api/get-sites.d.ts +3 -3
  19. package/dist/api/iam-validation/simulate-rule.d.ts +2 -2
  20. package/dist/api/iam-validation/simulate.d.ts +2 -2
  21. package/dist/api/iam-validation/simulate.js +1 -1
  22. package/dist/api/presign-url.d.ts +1 -1
  23. package/dist/api/render-media-on-lambda.d.ts +2 -2
  24. package/dist/api/render-still-on-lambda.d.ts +2 -2
  25. package/dist/api/speculate-function-name.d.ts +1 -1
  26. package/dist/api/upload-dir.d.ts +2 -2
  27. package/dist/cli/args.d.ts +1 -1
  28. package/dist/cli/commands/render/progress.d.ts +4 -4
  29. package/dist/cli/commands/render/render.js +9 -1
  30. package/dist/cli/commands/still.js +9 -1
  31. package/dist/cli/helpers/progress-bar.d.ts +4 -4
  32. package/dist/cli/log.d.ts +1 -0
  33. package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +4 -1
  34. package/dist/functions/chunk-optimization/types.d.ts +2 -2
  35. package/dist/functions/compositions.d.ts +1 -1
  36. package/dist/functions/compositions.js +11 -7
  37. package/dist/functions/helpers/find-output-file-in-bucket.d.ts +1 -1
  38. package/dist/functions/helpers/get-browser-instance.d.ts +1 -2
  39. package/dist/functions/helpers/get-browser-instance.js +4 -1
  40. package/dist/functions/helpers/get-current-architecture.d.ts +2 -0
  41. package/dist/functions/helpers/get-current-architecture.js +11 -0
  42. package/dist/functions/helpers/get-files-in-folder.d.ts +1 -1
  43. package/dist/functions/helpers/get-files-to-delete.d.ts +1 -1
  44. package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts +1 -1
  45. package/dist/functions/helpers/get-retry-stats.d.ts +1 -1
  46. package/dist/functions/helpers/io.d.ts +3 -3
  47. package/dist/functions/helpers/read-with-progress.d.ts +1 -1
  48. package/dist/functions/helpers/validate-composition.d.ts +5 -5
  49. package/dist/functions/helpers/validate-composition.js +5 -3
  50. package/dist/functions/helpers/write-lambda-error.d.ts +2 -2
  51. package/dist/functions/index.js +1 -1
  52. package/dist/functions/launch.d.ts +1 -1
  53. package/dist/functions/launch.js +6 -8
  54. package/dist/functions/progress.d.ts +1 -1
  55. package/dist/functions/renderer.d.ts +1 -1
  56. package/dist/functions/renderer.js +13 -12
  57. package/dist/functions/start.d.ts +1 -1
  58. package/dist/functions/still.d.ts +1 -1
  59. package/dist/functions/still.js +25 -11
  60. package/dist/pricing/aws-regions.d.ts +1 -1
  61. package/dist/shared/await.d.ts +1 -1
  62. package/dist/shared/aws-clients.d.ts +3 -3
  63. package/dist/shared/constants.d.ts +18 -18
  64. package/dist/shared/content-disposition-header.d.ts +1 -1
  65. package/dist/shared/get-most-expensive-chunks.d.ts +1 -1
  66. package/dist/shared/hosted-layers.d.ts +1 -1
  67. package/dist/shared/invoke-webhook.d.ts +2 -2
  68. package/dist/shared/parse-lambda-timings-key.d.ts +1 -1
  69. package/dist/shared/return-values.d.ts +1 -1
  70. package/dist/shared/truthy.d.ts +1 -1
  71. package/dist/shared/validate-architecture.d.ts +4 -0
  72. package/dist/shared/validate-architecture.js +14 -0
  73. package/dist/shared/validate-lambda-codec.d.ts +1 -1
  74. package/dist/shared/validate-outname.js +12 -12
  75. package/package.json +11 -11
  76. package/remotionlambda-arm64.zip +0 -0
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateArchitecture = void 0;
4
+ const validArchitectures = ['arm64', 'x86_64'];
5
+ const validateArchitecture = (architecture) => {
6
+ if (typeof architecture !== 'string') {
7
+ throw new TypeError('You must pass an architecture when deploying: One of ' +
8
+ validArchitectures.join(', '));
9
+ }
10
+ if (!validArchitectures.find((a) => a === architecture)) {
11
+ throw new TypeError(`You must pass an "architecture" when deploying a function: either "arm64" or "x86_64"`);
12
+ }
13
+ };
14
+ exports.validateArchitecture = validateArchitecture;
@@ -1,4 +1,4 @@
1
1
  declare const lambdaCodecs: readonly ["h264", "vp8", "vp9", "mp3", "aac", "wav", "gif", "prores"];
2
- export declare type LambdaCodec = typeof lambdaCodecs[number];
2
+ export type LambdaCodec = typeof lambdaCodecs[number];
3
3
  export declare const validateLambdaCodec: (codec: unknown) => LambdaCodec;
4
4
  export {};
@@ -18,19 +18,19 @@ const validateOutname = (outName, codec, audioCodec) => {
18
18
  if (typeof outName === 'undefined' || outName === null) {
19
19
  return;
20
20
  }
21
- if (typeof outName === 'string') {
22
- if (codec) {
23
- (0, renderer_1.validateOutputFilename)({
24
- codec,
25
- audioCodec,
26
- extension: renderer_1.RenderInternals.getExtensionOfFilename(outName),
27
- preferLossless: false,
28
- });
29
- }
30
- validateS3Key(outName);
21
+ if (typeof outName !== 'string') {
22
+ validateS3Key(outName.key);
23
+ (0, validate_bucketname_1.validateBucketName)(outName.bucketName, { mustStartWithRemotion: false });
31
24
  return;
32
25
  }
33
- validateS3Key(outName.key);
34
- (0, validate_bucketname_1.validateBucketName)(outName.bucketName, { mustStartWithRemotion: false });
26
+ if (codec) {
27
+ (0, renderer_1.validateOutputFilename)({
28
+ codec,
29
+ audioCodec,
30
+ extension: renderer_1.RenderInternals.getExtensionOfFilename(outName),
31
+ preferLossless: false,
32
+ });
33
+ }
34
+ validateS3Key(outName);
35
35
  };
36
36
  exports.validateOutname = validateOutname;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "4.0.0-alpha12",
3
+ "version": "4.0.0-alpha14",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -25,10 +25,10 @@
25
25
  "@aws-sdk/s3-request-presigner": "3.338.0",
26
26
  "aws-policies": "^1.0.1",
27
27
  "mime-types": "2.1.34",
28
- "@remotion/bundler": "4.0.0-alpha12",
29
- "@remotion/renderer": "4.0.0-alpha12",
30
- "remotion": "4.0.0-alpha12",
31
- "@remotion/cli": "4.0.0-alpha12"
28
+ "@remotion/bundler": "4.0.0-alpha14",
29
+ "@remotion/cli": "4.0.0-alpha14",
30
+ "remotion": "4.0.0-alpha14",
31
+ "@remotion/renderer": "4.0.0-alpha14"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@jonny/eslint-config": "3.0.266",
@@ -36,18 +36,18 @@
36
36
  "@types/minimist": "1.2.2",
37
37
  "@types/node": "18.14.6",
38
38
  "@types/prompt": "^1.1.0",
39
- "eslint": "8.25.0",
39
+ "eslint": "8.42.0",
40
40
  "prettier": "^2.4.1",
41
41
  "prettier-plugin-organize-imports": "^2.3.4",
42
42
  "ts-node": "^10.8.0",
43
- "typescript": "^4.7.0",
44
- "vitest": "^0.24.3",
43
+ "typescript": "4.9.5",
44
+ "vitest": "0.31.1",
45
45
  "zip-lib": "^0.7.2",
46
- "@remotion/bundler": "4.0.0-alpha12",
47
- "@remotion/compositor-linux-arm64-gnu": "4.0.0-alpha12"
46
+ "@remotion/bundler": "4.0.0-alpha14",
47
+ "@remotion/compositor-linux-arm64-gnu": "4.0.0-alpha14"
48
48
  },
49
49
  "peerDependencies": {
50
- "@remotion/bundler": "4.0.0-alpha12"
50
+ "@remotion/bundler": "4.0.0-alpha14"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
Binary file