@remotion/lambda 4.0.0-alpha4 → 4.0.0-alpha6

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 (86) hide show
  1. package/dist/admin/bundle-lambda.js +24 -30
  2. package/dist/admin/generate-etag-list.js +4 -4
  3. package/dist/admin/make-layer-public.js +59 -87
  4. package/dist/api/clean-items.js +1 -1
  5. package/dist/api/create-function.d.ts +1 -3
  6. package/dist/api/create-function.js +8 -8
  7. package/dist/api/deploy-function.d.ts +0 -3
  8. package/dist/api/deploy-function.js +1 -7
  9. package/dist/api/deploy-site.js +4 -9
  10. package/dist/api/download-media.d.ts +0 -4
  11. package/dist/api/download-media.js +3 -7
  12. package/dist/api/estimate-price.d.ts +1 -3
  13. package/dist/api/estimate-price.js +3 -9
  14. package/dist/api/get-compositions-on-lambda.d.ts +2 -2
  15. package/dist/api/get-or-create-bucket.d.ts +0 -1
  16. package/dist/api/get-or-create-bucket.js +0 -3
  17. package/dist/api/get-sites.d.ts +0 -1
  18. package/dist/api/iam-validation/simulate.js +4 -2
  19. package/dist/api/make-lambda-payload.d.ts +41 -0
  20. package/dist/api/make-lambda-payload.js +65 -0
  21. package/dist/api/render-media-on-lambda.d.ts +10 -6
  22. package/dist/api/render-media-on-lambda.js +5 -58
  23. package/dist/api/render-still-on-lambda.d.ts +7 -3
  24. package/dist/api/render-still-on-lambda.js +6 -3
  25. package/dist/api/upload-dir.js +7 -7
  26. package/dist/cli/args.d.ts +0 -2
  27. package/dist/cli/commands/functions/deploy.js +7 -9
  28. package/dist/cli/commands/functions/ls.js +4 -1
  29. package/dist/cli/commands/functions/rm.js +8 -2
  30. package/dist/cli/commands/functions/rmall.js +8 -2
  31. package/dist/cli/commands/quotas/increase.js +2 -2
  32. package/dist/cli/commands/render/render.js +22 -12
  33. package/dist/cli/commands/sites/create.js +7 -8
  34. package/dist/cli/commands/still.js +7 -5
  35. package/dist/cli/help.js +4 -0
  36. package/dist/cli/helpers/progress-bar.d.ts +1 -2
  37. package/dist/cli/helpers/progress-bar.js +3 -7
  38. package/dist/cli/index.js +3 -3
  39. package/dist/cli/log.d.ts +12 -0
  40. package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +4 -1
  41. package/dist/functions/compositions.d.ts +1 -1
  42. package/dist/functions/compositions.js +0 -2
  43. package/dist/functions/helpers/calculate-price-from-bucket.d.ts +1 -3
  44. package/dist/functions/helpers/calculate-price-from-bucket.js +1 -2
  45. package/dist/functions/helpers/clean-tmpdir.js +7 -7
  46. package/dist/functions/helpers/concat-videos.d.ts +2 -4
  47. package/dist/functions/helpers/concat-videos.js +8 -11
  48. package/dist/functions/helpers/create-post-render-data.js +0 -2
  49. package/dist/functions/helpers/get-chromium-executable-path.js +6 -1
  50. package/dist/functions/helpers/get-current-region.d.ts +1 -1
  51. package/dist/functions/helpers/get-files-in-folder.js +5 -5
  52. package/dist/functions/helpers/get-progress.js +0 -2
  53. package/dist/functions/helpers/io.d.ts +1 -1
  54. package/dist/functions/helpers/is-enosp-err.js +1 -1
  55. package/dist/functions/helpers/validate-composition.d.ts +3 -5
  56. package/dist/functions/helpers/validate-composition.js +1 -3
  57. package/dist/functions/index.d.ts +15 -4
  58. package/dist/functions/index.js +1 -1
  59. package/dist/functions/launch.js +10 -14
  60. package/dist/functions/renderer.js +15 -15
  61. package/dist/functions/start.js +1 -1
  62. package/dist/functions/still.js +7 -11
  63. package/dist/index.d.ts +5 -6
  64. package/dist/index.js +1 -2
  65. package/dist/internals.d.ts +40 -0
  66. package/dist/internals.js +2 -0
  67. package/dist/shared/aws-clients.js +2 -2
  68. package/dist/shared/call-lambda.js +11 -0
  69. package/dist/shared/constants.d.ts +20 -17
  70. package/dist/shared/constants.js +1 -2
  71. package/dist/shared/function-zip-path.d.ts +0 -1
  72. package/dist/shared/function-zip-path.js +3 -4
  73. package/dist/shared/get-etag.js +4 -4
  74. package/dist/shared/hosted-layers.d.ts +2 -91
  75. package/dist/shared/hosted-layers.js +64 -363
  76. package/dist/shared/invoke-webhook.d.ts +1 -3
  77. package/dist/shared/invoke-webhook.js +4 -4
  78. package/dist/shared/make-s3-key.js +2 -2
  79. package/dist/shared/make-s3-url.js +2 -2
  80. package/dist/shared/read-dir.js +2 -2
  81. package/dist/shared/serialize-input-props.js +1 -1
  82. package/dist/shared/validate-privacy.js +1 -1
  83. package/package.json +9 -10
  84. package/remotionlambda-arm64.zip +0 -0
  85. package/remotionlambda-x64.zip +0 -0
  86. package/remotionlambda.zip +0 -0
@@ -27,9 +27,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.invokeWebhook = exports.mockableHttpClients = exports.calculateSignature = void 0;
30
- const Crypto = __importStar(require("crypto"));
31
- const http_1 = __importDefault(require("http"));
32
30
  const https_1 = __importDefault(require("https"));
31
+ const Crypto = __importStar(require("node:crypto"));
32
+ const node_http_1 = __importDefault(require("node:http"));
33
33
  /**
34
34
  * @description Calculates cryptographically secure signature for webhooks using Hmac.
35
35
  * @link https://remotion.dev/docs/lambda/webhooks#validate-webhooks
@@ -56,7 +56,7 @@ const getWebhookClient = (url) => {
56
56
  throw new Error('Can only request URLs starting with http:// or https://');
57
57
  };
58
58
  exports.mockableHttpClients = {
59
- http: http_1.default.request,
59
+ http: node_http_1.default.request,
60
60
  https: https_1.default.request,
61
61
  };
62
62
  function invokeWebhook({ payload, secret, url, }) {
@@ -74,7 +74,7 @@ function invokeWebhook({ payload, secret, url, }) {
74
74
  timeout: 5000,
75
75
  }, (res) => {
76
76
  if (res.statusCode && res.statusCode > 299) {
77
- reject(new Error(`Sent a webhook but got a status code of ${res.statusCode} with message '${res.statusMessage}'`));
77
+ reject(new Error(`Sent a webhook to ${url} but got a status code of ${res.statusCode} with message '${res.statusMessage}'`));
78
78
  return;
79
79
  }
80
80
  resolve();
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.makeS3Key = void 0;
7
- const path_1 = __importDefault(require("path"));
7
+ const node_path_1 = __importDefault(require("node:path"));
8
8
  const makeS3Key = (folder, dir, filePath) => {
9
- return `${folder}/${path_1.default.relative(dir, filePath).split(path_1.default.sep).join('/')}`;
9
+ return `${folder}/${node_path_1.default.relative(dir, filePath).split(node_path_1.default.sep).join('/')}`;
10
10
  };
11
11
  exports.makeS3Key = makeS3Key;
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getServeUrlHash = exports.makeS3ServeUrl = void 0;
7
- const crypto_1 = __importDefault(require("crypto"));
7
+ const node_crypto_1 = __importDefault(require("node:crypto"));
8
8
  const makeS3ServeUrl = ({ bucketName, subFolder, region, }) => {
9
9
  return `https://${bucketName}.s3.${region}.amazonaws.com/${subFolder}/index.html`;
10
10
  };
@@ -14,7 +14,7 @@ const getServeUrlHash = (url) => {
14
14
  if (hashCache[url]) {
15
15
  return hashCache[url];
16
16
  }
17
- const hash = crypto_1.default.createHash('md5').update(url).digest('hex');
17
+ const hash = node_crypto_1.default.createHash('md5').update(url).digest('hex');
18
18
  hashCache[url] = hash;
19
19
  return hash;
20
20
  };
@@ -24,8 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.readDirectory = void 0;
27
- const fs = __importStar(require("fs"));
28
- const path = __importStar(require("path"));
27
+ const fs = __importStar(require("node:fs"));
28
+ const path = __importStar(require("node:path"));
29
29
  const get_etag_1 = require("./get-etag");
30
30
  // Function to recursively read a directory and return a list of files
31
31
  // with their etags and file names
@@ -5,7 +5,7 @@ const get_or_create_bucket_1 = require("../api/get-or-create-bucket");
5
5
  const io_1 = require("../functions/helpers/io");
6
6
  const constants_1 = require("./constants");
7
7
  const random_hash_1 = require("./random-hash");
8
- const serializeInputProps = async ({ inputProps, region, type, userSpecifiedBucketName, }) => {
8
+ const serializeInputProps = async ({ inputProps = {}, region, type, userSpecifiedBucketName, }) => {
9
9
  try {
10
10
  const payload = JSON.stringify(inputProps);
11
11
  const hash = (0, random_hash_1.randomHash)();
@@ -6,7 +6,7 @@ function validatePrivacy(privacy) {
6
6
  throw new TypeError('Privacy must be a string');
7
7
  }
8
8
  if (privacy !== 'private' && privacy !== 'public' && privacy !== 'no-acl') {
9
- throw new TypeError('Privacy must be either "private", "public-read" or "no-acl"');
9
+ throw new TypeError('Privacy must be either "private", "public" or "no-acl"');
10
10
  }
11
11
  }
12
12
  exports.validatePrivacy = validatePrivacy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "4.0.0-alpha4",
3
+ "version": "4.0.0-alpha6",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -23,21 +23,20 @@
23
23
  "@aws-sdk/credential-providers": "3.272.0",
24
24
  "@aws-sdk/lib-storage": "3.272.0",
25
25
  "@aws-sdk/s3-request-presigner": "3.272.0",
26
- "@remotion/bundler": "4.0.0-alpha4",
27
- "@remotion/cli": "4.0.0-alpha4",
28
- "@remotion/renderer": "4.0.0-alpha4",
26
+ "@remotion/bundler": "4.0.0-alpha6",
27
+ "@remotion/cli": "4.0.0-alpha6",
28
+ "@remotion/renderer": "4.0.0-alpha6",
29
29
  "aws-policies": "^1.0.1",
30
30
  "mime-types": "2.1.34",
31
- "remotion": "4.0.0-alpha4"
31
+ "remotion": "4.0.0-alpha6"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@jonny/eslint-config": "3.0.266",
35
- "@remotion/bundler": "4.0.0-alpha4",
36
- "@remotion/compositor-linux-arm64-musl": "4.0.0-alpha4",
37
- "@remotion/compositor-linux-x64-musl": "4.0.0-alpha4",
35
+ "@remotion/bundler": "4.0.0-alpha6",
36
+ "@remotion/compositor-linux-arm64-gnu": "4.0.0-alpha6",
38
37
  "@types/mime-types": "2.1.1",
39
38
  "@types/minimist": "1.2.2",
40
- "@types/node": "^14.14.14",
39
+ "@types/node": "^18.16.0",
41
40
  "@types/prompt": "^1.1.0",
42
41
  "eslint": "8.25.0",
43
42
  "prettier": "^2.4.1",
@@ -48,7 +47,7 @@
48
47
  "zip-lib": "^0.7.2"
49
48
  },
50
49
  "peerDependencies": {
51
- "@remotion/bundler": "4.0.0-alpha4"
50
+ "@remotion/bundler": "4.0.0-alpha6"
52
51
  },
53
52
  "publishConfig": {
54
53
  "access": "public"
Binary file
Binary file
Binary file