@remotion/lambda 3.2.43-retry.19 → 3.2.44

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.
@@ -44,6 +44,7 @@ export declare type RenderMediaOnLambdaOutput = {
44
44
  renderId: string;
45
45
  bucketName: string;
46
46
  cloudWatchLogs: string;
47
+ folderInS3Console: string;
47
48
  };
48
49
  /**
49
50
  * @description Triggers a render on a lambda given a composition and a lambda function.
@@ -5,7 +5,7 @@ const version_1 = require("remotion/version");
5
5
  const call_lambda_1 = require("../shared/call-lambda");
6
6
  const constants_1 = require("../shared/constants");
7
7
  const convert_to_serve_url_1 = require("../shared/convert-to-serve-url");
8
- const get_cloudwatch_stream_url_1 = require("../shared/get-cloudwatch-stream-url");
8
+ const get_aws_urls_1 = require("../shared/get-aws-urls");
9
9
  const serialize_input_props_1 = require("../shared/serialize-input-props");
10
10
  const validate_download_behavior_1 = require("../shared/validate-download-behavior");
11
11
  const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lambda");
@@ -89,12 +89,17 @@ const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec,
89
89
  return {
90
90
  renderId: res.renderId,
91
91
  bucketName: res.bucketName,
92
- cloudWatchLogs: (0, get_cloudwatch_stream_url_1.getCloudwatchStreamUrl)({
92
+ cloudWatchLogs: (0, get_aws_urls_1.getCloudwatchStreamUrl)({
93
93
  functionName,
94
94
  method: constants_1.LambdaRoutines.renderer,
95
95
  region,
96
96
  renderId: res.renderId,
97
97
  }),
98
+ folderInS3Console: (0, get_aws_urls_1.getS3RenderUrl)({
99
+ bucketName: res.bucketName,
100
+ renderId: res.renderId,
101
+ region,
102
+ }),
98
103
  };
99
104
  }
100
105
  catch (err) {
@@ -5,7 +5,7 @@ const version_1 = require("remotion/version");
5
5
  const call_lambda_1 = require("../shared/call-lambda");
6
6
  const constants_1 = require("../shared/constants");
7
7
  const convert_to_serve_url_1 = require("../shared/convert-to-serve-url");
8
- const get_cloudwatch_stream_url_1 = require("../shared/get-cloudwatch-stream-url");
8
+ const get_aws_urls_1 = require("../shared/get-aws-urls");
9
9
  const serialize_input_props_1 = require("../shared/serialize-input-props");
10
10
  /**
11
11
  * @description Renders a still frame on Lambda
@@ -64,7 +64,7 @@ const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFo
64
64
  sizeInBytes: res.size,
65
65
  bucketName: res.bucketName,
66
66
  renderId: res.renderId,
67
- cloudWatchLogs: (0, get_cloudwatch_stream_url_1.getCloudwatchStreamUrl)({
67
+ cloudWatchLogs: (0, get_aws_urls_1.getCloudwatchStreamUrl)({
68
68
  functionName,
69
69
  method: constants_1.LambdaRoutines.still,
70
70
  region,
@@ -22,10 +22,11 @@ declare type DownloadedInfo = {
22
22
  downloaded: number;
23
23
  doneIn: number | null;
24
24
  };
25
- export declare const makeProgressString: ({ progress, steps, downloadInfo, retriesInfo, }: {
25
+ export declare const makeProgressString: ({ progress, steps, downloadInfo, retriesInfo, verbose, }: {
26
26
  progress: MultiRenderProgress;
27
27
  steps: number;
28
28
  downloadInfo: DownloadedInfo | null;
29
29
  retriesInfo: ChunkRetry[];
30
+ verbose: boolean;
30
31
  }) => string;
31
32
  export {};
@@ -57,10 +57,17 @@ const makeEncodingProgress = ({ encodingProgress, chunkProgress, totalSteps, })
57
57
  : cli_1.CliInternals.chalk.gray(`${doneIn}ms`),
58
58
  ].join(' ');
59
59
  };
60
- const makeCleanupProgress = (cleanupInfo, totalSteps) => {
60
+ const makeCleanupProgress = (cleanupInfo, totalSteps, skipped) => {
61
61
  if (!cleanupInfo) {
62
62
  return '';
63
63
  }
64
+ if (skipped) {
65
+ return [
66
+ '🪣 ',
67
+ `(4/${totalSteps})`,
68
+ cli_1.CliInternals.chalk.blueBright(`Not cleaning up because --log=verbose was set`),
69
+ ].join(' ');
70
+ }
64
71
  const { doneIn, filesDeleted, minFilesToDelete } = cleanupInfo;
65
72
  const progress = filesDeleted / minFilesToDelete;
66
73
  return [
@@ -116,7 +123,7 @@ const makeMultiProgressFromStatus = (status) => {
116
123
  };
117
124
  };
118
125
  exports.makeMultiProgressFromStatus = makeMultiProgressFromStatus;
119
- const makeProgressString = ({ progress, steps, downloadInfo, retriesInfo, }) => {
126
+ const makeProgressString = ({ progress, steps, downloadInfo, retriesInfo, verbose, }) => {
120
127
  return [
121
128
  makeInvokeProgress(progress.lambdaInvokeProgress, steps, retriesInfo),
122
129
  makeChunkProgress({
@@ -129,7 +136,7 @@ const makeProgressString = ({ progress, steps, downloadInfo, retriesInfo, }) =>
129
136
  chunkProgress: progress.chunkProgress,
130
137
  totalSteps: steps,
131
138
  }),
132
- makeCleanupProgress(progress.cleanupInfo, steps),
139
+ makeCleanupProgress(progress.cleanupInfo, steps, verbose),
133
140
  downloadInfo ? makeDownloadProgress(downloadInfo, steps) : null,
134
141
  ]
135
142
  .filter(remotion_1.Internals.truthy)
@@ -100,7 +100,9 @@ const renderCommand = async (args) => {
100
100
  const progressBar = cli_1.CliInternals.createOverwriteableCliOutput(cli_1.CliInternals.quietFlagProvided());
101
101
  log_1.Log.info(cli_1.CliInternals.chalk.gray(`bucket = ${res.bucketName}, function = ${functionName}`));
102
102
  log_1.Log.info(cli_1.CliInternals.chalk.gray(`renderId = ${res.renderId}, codec = ${codec} (${reason})`));
103
+ const verbose = renderer_1.RenderInternals.isEqualOrBelowLogLevel(cli_1.ConfigInternals.Logging.getLogLevel(), 'verbose');
103
104
  log_1.Log.verbose(`CloudWatch logs (if enabled): ${res.cloudWatchLogs}`);
105
+ log_1.Log.verbose(`Render folder: ${res.folderInS3Console}`);
104
106
  const status = await (0, get_render_progress_1.getRenderProgress)({
105
107
  functionName,
106
108
  bucketName: res.bucketName,
@@ -113,6 +115,7 @@ const renderCommand = async (args) => {
113
115
  steps: totalSteps,
114
116
  downloadInfo: null,
115
117
  retriesInfo: status.retriesInfo,
118
+ verbose,
116
119
  }));
117
120
  // eslint-disable-next-line no-constant-condition
118
121
  while (true) {
@@ -129,6 +132,7 @@ const renderCommand = async (args) => {
129
132
  steps: totalSteps,
130
133
  retriesInfo: newStatus.retriesInfo,
131
134
  downloadInfo: null,
135
+ verbose,
132
136
  }));
133
137
  if (newStatus.done) {
134
138
  progressBar.update((0, progress_1.makeProgressString)({
@@ -136,6 +140,7 @@ const renderCommand = async (args) => {
136
140
  steps: totalSteps,
137
141
  downloadInfo: null,
138
142
  retriesInfo: newStatus.retriesInfo,
143
+ verbose,
139
144
  }));
140
145
  if (downloadName) {
141
146
  const downloadStart = Date.now();
@@ -154,6 +159,7 @@ const renderCommand = async (args) => {
154
159
  downloaded,
155
160
  totalSize,
156
161
  },
162
+ verbose,
157
163
  }));
158
164
  },
159
165
  });
@@ -166,6 +172,7 @@ const renderCommand = async (args) => {
166
172
  downloaded: sizeInBytes,
167
173
  totalSize: sizeInBytes,
168
174
  },
175
+ verbose,
169
176
  }));
170
177
  log_1.Log.info();
171
178
  log_1.Log.info();
@@ -3,5 +3,8 @@ export declare const planFrameRanges: ({ framesPerLambda, frameRange, everyNthFr
3
3
  frameRange: [number, number];
4
4
  everyNthFrame: number;
5
5
  }) => {
6
- chunks: [number, number][];
6
+ chunks: [
7
+ number,
8
+ number
9
+ ][];
7
10
  };
@@ -45,7 +45,7 @@ const getBrowserInstance = async (shouldDumpIo, chromiumOptions) => {
45
45
  });
46
46
  _browserInstance.on('disconnected', () => {
47
47
  console.log('Browser disconnected / crashed');
48
- _browserInstance === null || _browserInstance === void 0 ? void 0 : _browserInstance.close(true).catch(() => undefined);
48
+ _browserInstance === null || _browserInstance === void 0 ? void 0 : _browserInstance.close().catch(() => undefined);
49
49
  _browserInstance = null;
50
50
  });
51
51
  launching = false;
@@ -66,6 +66,7 @@ const innerLaunchHandler = async (params, options) => {
66
66
  const startedDate = Date.now();
67
67
  let webhookInvoked = false;
68
68
  console.log(`Function has ${Math.max(options.getRemainingTimeInMillis() - 1000, 1000)} before it times out`);
69
+ const verbose = renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose');
69
70
  const webhookDueToTimeout = setTimeout(async () => {
70
71
  if (params.webhook && !webhookInvoked) {
71
72
  try {
@@ -108,7 +109,7 @@ const innerLaunchHandler = async (params, options) => {
108
109
  }
109
110
  }
110
111
  }, Math.max(options.getRemainingTimeInMillis() - 1000, 1000));
111
- const browserInstance = await (0, get_browser_instance_1.getBrowserInstance)(renderer_1.RenderInternals.isEqualOrBelowLogLevel(params.logLevel, 'verbose'), params.chromiumOptions);
112
+ const browserInstance = await (0, get_browser_instance_1.getBrowserInstance)(verbose, params.chromiumOptions);
112
113
  const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
113
114
  const inputPropsPromise = (0, deserialize_input_props_1.deserializeInputProps)({
114
115
  bucketName: params.bucketName,
@@ -403,12 +404,14 @@ const innerLaunchHandler = async (params, options) => {
403
404
  chunkCount,
404
405
  renderId: params.renderId,
405
406
  });
406
- const deletProm = (0, delete_chunks_1.cleanupFiles)({
407
- region: (0, get_current_region_1.getCurrentRegionInFunction)(),
408
- bucket: params.bucketName,
409
- contents,
410
- jobs,
411
- });
407
+ const deletProm = verbose
408
+ ? Promise.resolve(0)
409
+ : (0, delete_chunks_1.cleanupFiles)({
410
+ region: (0, get_current_region_1.getCurrentRegionInFunction)(),
411
+ bucket: params.bucketName,
412
+ contents,
413
+ jobs,
414
+ });
412
415
  const cleanupSerializedInputPropsProm = (0, cleanup_serialized_input_props_1.cleanupSerializedInputProps)({
413
416
  bucketName: params.bucketName,
414
417
  region: (0, get_current_region_1.getCurrentRegionInFunction)(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "3.2.43-retry.19+5671d7797",
3
+ "version": "3.2.44",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -31,12 +31,12 @@
31
31
  "@aws-sdk/client-service-quotas": "3.190.0",
32
32
  "@aws-sdk/lib-storage": "3.190.0",
33
33
  "@aws-sdk/s3-request-presigner": "3.190.0",
34
- "@remotion/bundler": "3.2.43-retry.19+5671d7797",
35
- "@remotion/cli": "3.2.43-retry.19+5671d7797",
36
- "@remotion/renderer": "3.2.43-retry.19+5671d7797",
34
+ "@remotion/bundler": "3.2.44",
35
+ "@remotion/cli": "3.2.44",
36
+ "@remotion/renderer": "3.2.44",
37
37
  "aws-policies": "^1.0.1",
38
38
  "mime-types": "2.1.34",
39
- "remotion": "3.2.43-retry.19+5671d7797"
39
+ "remotion": "3.2.44"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": ">=16.8.0",
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "5671d779758f7837f2f50f75e2cccdd7c6b58f43"
62
+ "gitHead": "443b4b387b78905e747ebe69b3b91ee85966796d"
63
63
  }
Binary file