@remotion/lambda 3.3.7 → 3.3.9

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 (45) hide show
  1. package/dist/admin/generate-etag-list.d.ts +1 -0
  2. package/dist/admin/generate-etag-list.js +14 -0
  3. package/dist/api/deploy-site.js +0 -5
  4. package/dist/api/get-aws-client.d.ts +2 -0
  5. package/dist/api/get-aws-client.js +2 -0
  6. package/dist/api/get-or-create-bucket.js +0 -5
  7. package/dist/api/iam-validation/simulate-rule.js +0 -22
  8. package/dist/api/iam-validation/simulate.js +24 -5
  9. package/dist/api/iam-validation/user-permissions.js +0 -8
  10. package/dist/cli/commands/render/progress.d.ts +6 -3
  11. package/dist/cli/commands/render/progress.js +49 -39
  12. package/dist/cli/commands/render/render.js +16 -1
  13. package/dist/cli/commands/sites/create.js +0 -2
  14. package/dist/cli/helpers/progress-bar.d.ts +1 -2
  15. package/dist/cli/helpers/progress-bar.js +2 -2
  16. package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +4 -1
  17. package/dist/functions/helpers/concat-videos.d.ts +10 -6
  18. package/dist/functions/helpers/concat-videos.js +5 -21
  19. package/dist/functions/helpers/create-post-render-data.js +0 -12
  20. package/dist/functions/helpers/get-encoding-metadata.d.ts +4 -8
  21. package/dist/functions/helpers/get-encoding-metadata.js +4 -18
  22. package/dist/functions/helpers/get-final-encoding-status.d.ts +2 -4
  23. package/dist/functions/helpers/get-final-encoding-status.js +1 -4
  24. package/dist/functions/helpers/get-lambdas-invoked-stats.d.ts +1 -5
  25. package/dist/functions/helpers/get-lambdas-invoked-stats.js +1 -9
  26. package/dist/functions/helpers/get-overall-progress.d.ts +2 -1
  27. package/dist/functions/helpers/get-overall-progress.js +7 -5
  28. package/dist/functions/helpers/get-progress.js +40 -26
  29. package/dist/functions/helpers/get-rendered-frames-progress.d.ts +8 -0
  30. package/dist/functions/helpers/get-rendered-frames-progress.js +37 -0
  31. package/dist/functions/launch.js +48 -37
  32. package/dist/functions/renderer.js +15 -22
  33. package/dist/functions/still.js +2 -0
  34. package/dist/shared/aws-clients.d.ts +3 -0
  35. package/dist/shared/aws-clients.js +55 -13
  36. package/dist/shared/check-credentials.js +3 -0
  37. package/dist/shared/chunk-progress.d.ts +9 -0
  38. package/dist/shared/chunk-progress.js +2034 -0
  39. package/dist/shared/constants.d.ts +5 -5
  40. package/dist/shared/get-account-id.js +4 -6
  41. package/dist/shared/invoke-webhook.d.ts +0 -2
  42. package/dist/shared/parse-chunk-key.d.ts +4 -0
  43. package/dist/shared/parse-chunk-key.js +14 -0
  44. package/package.json +8 -6
  45. package/remotionlambda.zip +0 -0
@@ -254,9 +254,6 @@ export declare type LambdaPayloads = {
254
254
  export declare type LambdaPayload = LambdaPayloads[LambdaRoutines];
255
255
  export declare type EncodingProgress = {
256
256
  framesEncoded: number;
257
- totalFrames: number | null;
258
- doneIn: number | null;
259
- timeToInvoke: number | null;
260
257
  };
261
258
  export declare type RenderMetadata = {
262
259
  siteId: string;
@@ -277,6 +274,8 @@ export declare type RenderMetadata = {
277
274
  renderId: string;
278
275
  outName: OutNameInputWithoutCredentials | undefined;
279
276
  privacy: Privacy;
277
+ frameRange: [number, number];
278
+ everyNthFrame: number;
280
279
  };
281
280
  export declare type PostRenderData = {
282
281
  cost: {
@@ -297,7 +296,6 @@ export declare type PostRenderData = {
297
296
  timeToEncode: number;
298
297
  timeToCleanUp: number;
299
298
  timeToRenderChunks: number;
300
- timeToInvokeLambdas: number;
301
299
  retriesInfo: ChunkRetry[];
302
300
  mostExpensiveFrameRanges: ExpensiveChunk[] | undefined;
303
301
  };
@@ -331,10 +329,12 @@ export declare type RenderProgress = {
331
329
  lambdasInvoked: number;
332
330
  cleanup: CleanupInfo | null;
333
331
  timeToFinishChunks: number | null;
334
- timeToInvokeLambdas: number | null;
332
+ timeToEncode: number | null;
335
333
  overallProgress: number;
336
334
  retriesInfo: ChunkRetry[];
337
335
  mostExpensiveFrameRanges: ExpensiveChunk[] | null;
336
+ framesRendered: number;
337
+ outputSizeInBytes: number | null;
338
338
  };
339
339
  export declare type Privacy = 'public' | 'private' | 'no-acl';
340
340
  export declare const LAMBDA_CONCURRENCY_LIMIT_QUOTA = "L-B99A9384";
@@ -1,17 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAccountId = void 0;
4
- const client_iam_1 = require("@aws-sdk/client-iam");
4
+ const client_sts_1 = require("@aws-sdk/client-sts");
5
5
  const aws_clients_1 = require("./aws-clients");
6
6
  const validate_aws_region_1 = require("./validate-aws-region");
7
7
  const getAccountId = async (options) => {
8
- var _a, _b;
9
8
  (0, validate_aws_region_1.validateAwsRegion)(options.region);
10
- const user = await (0, aws_clients_1.getIamClient)(options.region).send(new client_iam_1.GetUserCommand({}));
11
- const accountId = (_b = (_a = user.User) === null || _a === void 0 ? void 0 : _a.Arn) === null || _b === void 0 ? void 0 : _b.match(/aws:iam::([0-9]+)/);
12
- if (!accountId) {
9
+ const callerIdentity = await (0, aws_clients_1.getStsClient)(options.region).send(new client_sts_1.GetCallerIdentityCommand({}));
10
+ if (!callerIdentity.Account) {
13
11
  throw new Error('Cannot get account ID');
14
12
  }
15
- return accountId[1];
13
+ return callerIdentity.Account;
16
14
  };
17
15
  exports.getAccountId = getAccountId;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import http from 'http';
4
2
  import https from 'https';
5
3
  import type { EnhancedErrorInfo } from '../functions/helpers/write-lambda-error';
@@ -0,0 +1,4 @@
1
+ export declare const parseLambdaChunkKey: (key: string) => {
2
+ renderId: string;
3
+ chunk: number;
4
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseLambdaChunkKey = void 0;
4
+ const parseLambdaChunkKey = (key) => {
5
+ const match = key.match(/^renders\/(.*)\/chunks\/chunk:([0-9]+)$/);
6
+ if (!match) {
7
+ throw new Error(`Cannot parse filename ${key} into timing information. Malformed data.`);
8
+ }
9
+ return {
10
+ renderId: match[1],
11
+ chunk: Number(match[2]),
12
+ };
13
+ };
14
+ exports.parseLambdaChunkKey = parseLambdaChunkKey;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "3.3.7",
3
+ "version": "3.3.9",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -29,14 +29,16 @@
29
29
  "@aws-sdk/client-lambda": "3.215.0",
30
30
  "@aws-sdk/client-s3": "3.215.0",
31
31
  "@aws-sdk/client-service-quotas": "3.215.0",
32
+ "@aws-sdk/client-sts": "3.215.0",
33
+ "@aws-sdk/credential-providers": "3.215.0",
32
34
  "@aws-sdk/lib-storage": "3.215.0",
33
35
  "@aws-sdk/s3-request-presigner": "3.215.0",
34
- "@remotion/bundler": "3.3.7",
35
- "@remotion/cli": "3.3.7",
36
- "@remotion/renderer": "3.3.7",
36
+ "@remotion/bundler": "3.3.9",
37
+ "@remotion/cli": "3.3.9",
38
+ "@remotion/renderer": "3.3.9",
37
39
  "aws-policies": "^1.0.1",
38
40
  "mime-types": "2.1.34",
39
- "remotion": "3.3.7"
41
+ "remotion": "3.3.9"
40
42
  },
41
43
  "peerDependencies": {
42
44
  "react": ">=16.8.0",
@@ -59,5 +61,5 @@
59
61
  "publishConfig": {
60
62
  "access": "public"
61
63
  },
62
- "gitHead": "5a9310dd3db431e7a3e2eb2e2b3c508bbc7b258a"
64
+ "gitHead": "86269c98522cb7ea280f8283fa6c57885b971b3b"
63
65
  }
Binary file