@remotion/lambda 4.0.244 → 4.0.246

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 (258) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/admin/make-layer-public.js +10 -11
  3. package/dist/api/app-router-webhook.d.ts +10 -0
  4. package/dist/api/app-router-webhook.js +43 -0
  5. package/dist/api/create-function.d.ts +1 -2
  6. package/dist/api/create-function.js +10 -10
  7. package/dist/api/delete-function.d.ts +4 -13
  8. package/dist/api/delete-function.js +2 -5
  9. package/dist/api/delete-render.d.ts +0 -8
  10. package/dist/api/delete-render.js +4 -10
  11. package/dist/api/delete-site.d.ts +0 -10
  12. package/dist/api/delete-site.js +4 -11
  13. package/dist/api/deploy-function.d.ts +8 -15
  14. package/dist/api/deploy-function.js +21 -27
  15. package/dist/api/deploy-site.d.ts +2 -11
  16. package/dist/api/deploy-site.js +14 -22
  17. package/dist/api/download-media.d.ts +0 -11
  18. package/dist/api/download-media.js +3 -12
  19. package/dist/api/estimate-price.d.ts +0 -6
  20. package/dist/api/estimate-price.js +1 -3
  21. package/dist/api/get-aws-client.d.ts +1 -9
  22. package/dist/api/get-aws-client.js +2 -6
  23. package/dist/api/get-compositions-on-lambda.d.ts +1 -14
  24. package/dist/api/get-compositions-on-lambda.js +12 -17
  25. package/dist/api/get-function-info.d.ts +1 -14
  26. package/dist/api/get-function-info.js +2 -5
  27. package/dist/api/get-functions.d.ts +1 -8
  28. package/dist/api/get-functions.js +2 -5
  29. package/dist/api/get-or-create-bucket.d.ts +0 -6
  30. package/dist/api/get-or-create-bucket.js +3 -5
  31. package/dist/api/get-regions.d.ts +0 -5
  32. package/dist/api/get-regions.js +3 -4
  33. package/dist/api/get-render-progress.d.ts +0 -10
  34. package/dist/api/get-render-progress.js +3 -11
  35. package/dist/api/get-sites.d.ts +0 -6
  36. package/dist/api/get-sites.js +4 -7
  37. package/dist/api/iam-validation/simulate.d.ts +0 -7
  38. package/dist/api/iam-validation/simulate.js +2 -5
  39. package/dist/api/iam-validation/suggested-policy.d.ts +0 -10
  40. package/dist/api/iam-validation/suggested-policy.js +2 -4
  41. package/dist/api/make-lambda-payload.d.ts +2 -1
  42. package/dist/api/make-lambda-payload.js +19 -13
  43. package/dist/api/pages-router-webhook.d.ts +3 -0
  44. package/dist/api/pages-router-webhook.js +47 -0
  45. package/dist/api/presign-url.d.ts +0 -10
  46. package/dist/api/presign-url.js +2 -8
  47. package/dist/api/render-media-on-lambda.d.ts +1 -20
  48. package/dist/api/render-media-on-lambda.js +4 -19
  49. package/dist/api/render-still-on-lambda.d.ts +2 -19
  50. package/dist/api/render-still-on-lambda.js +6 -17
  51. package/dist/api/speculate-function-name.d.ts +0 -8
  52. package/dist/api/speculate-function-name.js +3 -7
  53. package/dist/api/upload-dir.d.ts +1 -7
  54. package/dist/api/upload-dir.js +1 -5
  55. package/dist/api/validate-webhook-signature.d.ts +0 -8
  56. package/dist/api/validate-webhook-signature.js +3 -7
  57. package/dist/cli/args.d.ts +2 -1
  58. package/dist/cli/commands/compositions/index.d.ts +7 -1
  59. package/dist/cli/commands/compositions/index.js +2 -2
  60. package/dist/cli/commands/functions/deploy.d.ts +7 -1
  61. package/dist/cli/commands/functions/deploy.js +7 -2
  62. package/dist/cli/commands/functions/index.d.ts +8 -1
  63. package/dist/cli/commands/functions/index.js +8 -4
  64. package/dist/cli/commands/functions/ls.d.ts +6 -1
  65. package/dist/cli/commands/functions/ls.js +2 -3
  66. package/dist/cli/commands/functions/rmall.d.ts +6 -1
  67. package/dist/cli/commands/functions/rmall.js +2 -3
  68. package/dist/cli/commands/render/render.d.ts +6 -1
  69. package/dist/cli/commands/render/render.js +9 -7
  70. package/dist/cli/commands/sites/create.js +2 -0
  71. package/dist/cli/commands/sites/index.d.ts +1 -1
  72. package/dist/cli/commands/sites/index.js +4 -4
  73. package/dist/cli/commands/still.d.ts +2 -2
  74. package/dist/cli/commands/still.js +5 -5
  75. package/dist/cli/get-aws-region.js +0 -4
  76. package/dist/cli/helpers/find-function-name.d.ts +6 -1
  77. package/dist/cli/helpers/find-function-name.js +4 -5
  78. package/dist/cli/index.d.ts +2 -2
  79. package/dist/cli/index.js +36 -16
  80. package/dist/client.d.ts +17 -22
  81. package/dist/client.js +17 -13
  82. package/dist/functions/aws-implementation.d.ts +13 -1
  83. package/dist/functions/aws-implementation.js +46 -0
  84. package/dist/functions/aws-server-implementation.d.ts +2 -0
  85. package/dist/functions/aws-server-implementation.js +25 -0
  86. package/dist/functions/full-client-implementation.d.ts +3 -0
  87. package/dist/functions/full-client-implementation.js +16 -0
  88. package/dist/functions/helpers/clean-tmpdir.js +1 -3
  89. package/dist/functions/helpers/get-current-region.js +0 -4
  90. package/dist/functions/helpers/get-output-url-from-metadata.d.ts +3 -7
  91. package/dist/functions/helpers/get-output-url-from-metadata.js +1 -1
  92. package/dist/functions/helpers/lifecycle.d.ts +4 -2
  93. package/dist/functions/helpers/lifecycle.js +3 -18
  94. package/dist/functions/helpers/timer.d.ts +2 -4
  95. package/dist/functions/http-client.d.ts +7 -0
  96. package/dist/functions/http-client.js +22 -0
  97. package/dist/functions/index.d.ts +1 -8
  98. package/dist/functions/index.js +12 -235
  99. package/dist/index.d.ts +6 -6
  100. package/dist/index.js +27 -6
  101. package/dist/internals.d.ts +6 -5
  102. package/dist/pricing/price-per-1-s.js +102 -0
  103. package/dist/regions.d.ts +1 -1
  104. package/dist/regions.js +3 -0
  105. package/dist/shared/call-lambda-async.d.ts +3 -0
  106. package/dist/shared/call-lambda-async.js +20 -0
  107. package/dist/shared/call-lambda-streaming.d.ts +7 -0
  108. package/dist/shared/{call-lambda.js → call-lambda-streaming.js} +36 -61
  109. package/dist/shared/call-lambda-sync.d.ts +3 -0
  110. package/dist/shared/call-lambda-sync.js +30 -0
  111. package/dist/shared/check-credentials.js +2 -3
  112. package/dist/shared/constants.d.ts +2 -91
  113. package/dist/shared/constants.js +1 -8
  114. package/dist/shared/convert-to-serve-url.js +2 -2
  115. package/dist/shared/get-account-id.d.ts +3 -4
  116. package/dist/shared/get-account-id.js +3 -3
  117. package/dist/shared/get-aws-urls.d.ts +4 -8
  118. package/dist/shared/get-aws-urls.js +1 -1
  119. package/dist/shared/get-function-version.js +4 -4
  120. package/dist/shared/get-layers.d.ts +1 -2
  121. package/dist/shared/get-layers.js +2 -4
  122. package/dist/shared/get-s3-operations.d.ts +4 -1
  123. package/dist/shared/get-s3-operations.js +2 -3
  124. package/dist/shared/get-service-client.js +2 -2
  125. package/dist/shared/hosted-layers.d.ts +0 -1
  126. package/dist/shared/hosted-layers.js +139 -537
  127. package/dist/shared/lambda-insights-extensions.d.ts +1 -1
  128. package/dist/shared/lambda-insights-extensions.js +3 -0
  129. package/dist/shared/read-dir.d.ts +2 -10
  130. package/dist/shared/read-dir.js +5 -4
  131. package/dist/shared/validate-aws-region.js +1 -1
  132. package/dist/shared/validate-bucketname.d.ts +1 -1
  133. package/package.json +15 -15
  134. package/remotionlambda-arm64.zip +0 -0
  135. package/dist/api/__mocks__/clean-items.d.ts +0 -2
  136. package/dist/api/__mocks__/clean-items.js +0 -24
  137. package/dist/api/__mocks__/create-function.d.ts +0 -2
  138. package/dist/api/__mocks__/create-function.js +0 -21
  139. package/dist/api/__mocks__/delete-function.d.ts +0 -2
  140. package/dist/api/__mocks__/delete-function.js +0 -9
  141. package/dist/api/__mocks__/get-functions.d.ts +0 -2
  142. package/dist/api/__mocks__/get-functions.js +0 -9
  143. package/dist/api/__mocks__/upload-dir.d.ts +0 -3
  144. package/dist/api/__mocks__/upload-dir.js +0 -47
  145. package/dist/api/mock-functions.d.ts +0 -18
  146. package/dist/api/mock-functions.js +0 -36
  147. package/dist/cli/helpers/__mocks__/quit.d.ts +0 -1
  148. package/dist/cli/helpers/__mocks__/quit.js +0 -7
  149. package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +0 -7
  150. package/dist/functions/chunk-optimization/plan-frame-ranges.js +0 -17
  151. package/dist/functions/chunk-optimization/types.d.ts +0 -8
  152. package/dist/functions/chunk-optimization/types.js +0 -2
  153. package/dist/functions/helpers/__mocks__/get-browser-instance.d.ts +0 -3
  154. package/dist/functions/helpers/__mocks__/get-browser-instance.js +0 -12
  155. package/dist/functions/helpers/__mocks__/leak-detection.d.ts +0 -4
  156. package/dist/functions/helpers/__mocks__/leak-detection.js +0 -9
  157. package/dist/functions/helpers/__mocks__/timer.d.ts +0 -2
  158. package/dist/functions/helpers/__mocks__/timer.js +0 -10
  159. package/dist/functions/helpers/best-frames-per-lambda-param.d.ts +0 -1
  160. package/dist/functions/helpers/best-frames-per-lambda-param.js +0 -17
  161. package/dist/functions/helpers/calculate-chunk-times.d.ts +0 -5
  162. package/dist/functions/helpers/calculate-chunk-times.js +0 -29
  163. package/dist/functions/helpers/calculate-price-from-bucket.d.ts +0 -15
  164. package/dist/functions/helpers/calculate-price-from-bucket.js +0 -30
  165. package/dist/functions/helpers/can-concat-seamlessly.d.ts +0 -3
  166. package/dist/functions/helpers/can-concat-seamlessly.js +0 -17
  167. package/dist/functions/helpers/cleanup-props.d.ts +0 -8
  168. package/dist/functions/helpers/cleanup-props.js +0 -23
  169. package/dist/functions/helpers/concat-videos.d.ts +0 -23
  170. package/dist/functions/helpers/concat-videos.js +0 -54
  171. package/dist/functions/helpers/create-post-render-data.d.ts +0 -17
  172. package/dist/functions/helpers/create-post-render-data.js +0 -67
  173. package/dist/functions/helpers/find-output-file-in-bucket.d.ts +0 -14
  174. package/dist/functions/helpers/find-output-file-in-bucket.js +0 -38
  175. package/dist/functions/helpers/format-costs-info.d.ts +0 -2
  176. package/dist/functions/helpers/format-costs-info.js +0 -23
  177. package/dist/functions/helpers/get-overall-progress-s3.d.ts +0 -10
  178. package/dist/functions/helpers/get-overall-progress-s3.js +0 -24
  179. package/dist/functions/helpers/get-overall-progress.d.ts +0 -9
  180. package/dist/functions/helpers/get-overall-progress.js +0 -23
  181. package/dist/functions/helpers/get-progress.d.ts +0 -15
  182. package/dist/functions/helpers/get-progress.js +0 -254
  183. package/dist/functions/helpers/get-retry-stats.d.ts +0 -5
  184. package/dist/functions/helpers/get-retry-stats.js +0 -2
  185. package/dist/functions/helpers/inspect-errors.d.ts +0 -4
  186. package/dist/functions/helpers/inspect-errors.js +0 -39
  187. package/dist/functions/helpers/is-warm.d.ts +0 -2
  188. package/dist/functions/helpers/is-warm.js +0 -10
  189. package/dist/functions/helpers/leak-detection.d.ts +0 -4
  190. package/dist/functions/helpers/leak-detection.js +0 -40
  191. package/dist/functions/helpers/make-timeout-error.d.ts +0 -10
  192. package/dist/functions/helpers/make-timeout-error.js +0 -31
  193. package/dist/functions/helpers/make-timeout-message.d.ts +0 -10
  194. package/dist/functions/helpers/make-timeout-message.js +0 -75
  195. package/dist/functions/helpers/merge-chunks.d.ts +0 -36
  196. package/dist/functions/helpers/merge-chunks.js +0 -84
  197. package/dist/functions/helpers/min-max.d.ts +0 -2
  198. package/dist/functions/helpers/min-max.js +0 -33
  199. package/dist/functions/helpers/on-downloads-logger.d.ts +0 -2
  200. package/dist/functions/helpers/on-downloads-logger.js +0 -29
  201. package/dist/functions/helpers/overall-render-progress.d.ts +0 -59
  202. package/dist/functions/helpers/overall-render-progress.js +0 -180
  203. package/dist/functions/helpers/print-concurrency-curve.d.ts +0 -1
  204. package/dist/functions/helpers/print-concurrency-curve.js +0 -8
  205. package/dist/functions/helpers/print-logging-helper.d.ts +0 -4
  206. package/dist/functions/helpers/print-logging-helper.js +0 -12
  207. package/dist/functions/helpers/render-has-audio-video.d.ts +0 -6
  208. package/dist/functions/helpers/render-has-audio-video.js +0 -21
  209. package/dist/functions/helpers/request-context.d.ts +0 -5
  210. package/dist/functions/helpers/request-context.js +0 -2
  211. package/dist/functions/helpers/stream-renderer.d.ts +0 -17
  212. package/dist/functions/helpers/stream-renderer.js +0 -148
  213. package/dist/functions/launch.d.ts +0 -10
  214. package/dist/functions/launch.js +0 -596
  215. package/dist/functions/progress.d.ts +0 -11
  216. package/dist/functions/progress.js +0 -51
  217. package/dist/functions/renderer.d.ts +0 -17
  218. package/dist/functions/renderer.js +0 -341
  219. package/dist/functions/start.d.ts +0 -13
  220. package/dist/functions/start.js +0 -113
  221. package/dist/functions/still.d.ts +0 -19
  222. package/dist/functions/still.js +0 -330
  223. package/dist/shared/__mocks__/aws-clients.d.ts +0 -2
  224. package/dist/shared/__mocks__/aws-clients.js +0 -62
  225. package/dist/shared/__mocks__/bundle-site.d.ts +0 -2
  226. package/dist/shared/__mocks__/bundle-site.js +0 -32
  227. package/dist/shared/__mocks__/check-credentials.d.ts +0 -1
  228. package/dist/shared/__mocks__/check-credentials.js +0 -5
  229. package/dist/shared/__mocks__/get-account-id.d.ts +0 -2
  230. package/dist/shared/__mocks__/get-account-id.js +0 -11
  231. package/dist/shared/__mocks__/read-dir.d.ts +0 -2
  232. package/dist/shared/__mocks__/read-dir.js +0 -13
  233. package/dist/shared/call-lambda.d.ts +0 -16
  234. package/dist/shared/cleanup-serialized-input-props.d.ts +0 -14
  235. package/dist/shared/cleanup-serialized-input-props.js +0 -34
  236. package/dist/shared/docs-url.d.ts +0 -1
  237. package/dist/shared/docs-url.js +0 -4
  238. package/dist/shared/get-most-expensive-chunks.d.ts +0 -8
  239. package/dist/shared/get-most-expensive-chunks.js +0 -28
  240. package/dist/shared/invoke-webhook.d.ts +0 -48
  241. package/dist/shared/invoke-webhook.js +0 -140
  242. package/dist/shared/parse-lambda-timings-key.d.ts +0 -5
  243. package/dist/shared/parse-lambda-timings-key.js +0 -2
  244. package/dist/shared/return-values.d.ts +0 -16
  245. package/dist/shared/return-values.js +0 -2
  246. package/dist/shared/stackback.d.ts +0 -6
  247. package/dist/shared/stackback.js +0 -59
  248. package/dist/shared/validate-download-behavior.d.ts +0 -1
  249. package/dist/shared/validate-download-behavior.js +0 -21
  250. package/dist/shared/validate-frames-per-lambda.d.ts +0 -4
  251. package/dist/shared/validate-frames-per-lambda.js +0 -29
  252. package/dist/shared/validate-privacy.d.ts +0 -2
  253. package/dist/shared/validate-privacy.js +0 -14
  254. package/dist/shared/validate.d.ts +0 -4
  255. package/dist/shared/validate.js +0 -8
  256. package/dist/shared/why-is-node-running.d.ts +0 -15
  257. package/dist/shared/why-is-node-running.js +0 -88
  258. package/vitest.config.mts +0 -11
@@ -1,54 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.concatVideos = void 0;
7
- const renderer_1 = require("@remotion/renderer");
8
- const node_fs_1 = __importDefault(require("node:fs"));
9
- const node_path_1 = require("node:path");
10
- const constants_1 = require("../../shared/constants");
11
- const can_concat_seamlessly_1 = require("./can-concat-seamlessly");
12
- const timer_1 = require("./timer");
13
- const concatVideos = async ({ onProgress, numberOfFrames, codec, fps, numberOfGifLoops, files, outdir, audioCodec, audioBitrate, logLevel, framesPerLambda, binariesDirectory, cancelSignal, preferLossless, muted, metadata, }) => {
14
- const outfile = (0, node_path_1.join)(renderer_1.RenderInternals.tmpDir(constants_1.REMOTION_CONCATED_TOKEN), `concat.${renderer_1.RenderInternals.getFileExtensionFromCodec(codec, audioCodec)}`);
15
- const combine = (0, timer_1.timer)('Combine chunks', logLevel);
16
- const filelistDir = renderer_1.RenderInternals.tmpDir(constants_1.REMOTION_FILELIST_TOKEN);
17
- const chunkDurationInSeconds = framesPerLambda / fps;
18
- const resolvedAudioCodec = renderer_1.RenderInternals.resolveAudioCodec({
19
- setting: audioCodec,
20
- codec,
21
- preferLossless,
22
- separateAudioTo: null,
23
- });
24
- const seamlessAudio = (0, can_concat_seamlessly_1.canConcatAudioSeamlessly)(resolvedAudioCodec, framesPerLambda);
25
- const seamlessVideo = (0, can_concat_seamlessly_1.canConcatVideoSeamlessly)(codec);
26
- await renderer_1.RenderInternals.combineChunks({
27
- files,
28
- filelistDir,
29
- output: outfile,
30
- onProgress,
31
- numberOfFrames,
32
- codec,
33
- fps,
34
- numberOfGifLoops,
35
- resolvedAudioCodec,
36
- audioBitrate,
37
- indent: false,
38
- logLevel,
39
- chunkDurationInSeconds,
40
- binariesDirectory,
41
- cancelSignal,
42
- seamlessAudio,
43
- seamlessVideo,
44
- muted,
45
- metadata,
46
- });
47
- combine.end();
48
- const cleanupChunksProm = node_fs_1.default.promises.rm(outdir, {
49
- recursive: true,
50
- force: true,
51
- });
52
- return { outfile, cleanupChunksProm };
53
- };
54
- exports.concatVideos = concatVideos;
@@ -1,17 +0,0 @@
1
- import type { CloudProvider, EnhancedErrorInfo } from '@remotion/serverless';
2
- import type { RenderMetadata } from '@remotion/serverless/client';
3
- import type { PostRenderData } from '../../shared/constants';
4
- import type { OutputFileMetadata } from './find-output-file-in-bucket';
5
- import type { OverallRenderProgress } from './overall-render-progress';
6
- export declare const createPostRenderData: <Provider extends CloudProvider>({ region, memorySizeInMb, renderMetadata, errorExplanations, timeToDelete, outputFile, timeToCombine, overallProgress, timeToFinish, outputSize, }: {
7
- region: Provider["region"];
8
- memorySizeInMb: number;
9
- renderMetadata: RenderMetadata<Provider>;
10
- timeToDelete: number;
11
- errorExplanations: EnhancedErrorInfo[];
12
- outputFile: OutputFileMetadata;
13
- timeToCombine: number | null;
14
- overallProgress: OverallRenderProgress<Provider>;
15
- timeToFinish: number;
16
- outputSize: number;
17
- }) => PostRenderData<Provider>;
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createPostRenderData = void 0;
4
- const estimate_price_1 = require("../../api/estimate-price");
5
- const constants_1 = require("../../shared/constants");
6
- const get_most_expensive_chunks_1 = require("../../shared/get-most-expensive-chunks");
7
- const calculate_chunk_times_1 = require("./calculate-chunk-times");
8
- const createPostRenderData = ({ region, memorySizeInMb, renderMetadata, errorExplanations, timeToDelete, outputFile, timeToCombine, overallProgress, timeToFinish, outputSize, }) => {
9
- const parsedTimings = overallProgress.timings;
10
- const estimatedBillingDurationInMilliseconds = parsedTimings
11
- .map((p) => p.rendered - p.start + get_most_expensive_chunks_1.OVERHEAD_TIME_PER_LAMBDA)
12
- .reduce((a, b) => a + b);
13
- const cost = (0, estimate_price_1.estimatePrice)({
14
- durationInMilliseconds: estimatedBillingDurationInMilliseconds,
15
- memorySizeInMb,
16
- region: region,
17
- lambdasInvoked: renderMetadata.estimatedTotalLambdaInvokations,
18
- // We cannot determine the ephemeral storage size, so we
19
- // overestimate the price, but will only have a miniscule effect (~0.2%)
20
- diskSizeInMb: constants_1.MAX_EPHEMERAL_STORAGE_IN_MB,
21
- });
22
- if (!outputFile) {
23
- throw new Error('Cannot wrap up without an output file in the S3 bucket.');
24
- }
25
- const endTime = Date.now();
26
- if (overallProgress.timeToEncode === null) {
27
- throw new Error('Expected time to encode to be set');
28
- }
29
- if (overallProgress.timeToRenderFrames === null) {
30
- throw new Error('Expected time to encode to be set');
31
- }
32
- return {
33
- cost: {
34
- currency: 'USD',
35
- disclaimer: 'Estimated cost for lambda invocations only. Does not include cost for S3 storage and data transfer.',
36
- estimatedCost: cost,
37
- estimatedDisplayCost: `$${new Intl.NumberFormat('en-US', {
38
- currency: 'USD',
39
- currencyDisplay: 'narrowSymbol',
40
- }).format(cost)}`,
41
- },
42
- outputFile: outputFile.url,
43
- timeToFinish,
44
- errors: errorExplanations,
45
- startTime: renderMetadata.startedDate,
46
- endTime,
47
- outputSize,
48
- renderSize: outputSize,
49
- filesCleanedUp: 0,
50
- timeToEncode: overallProgress.timeToEncode,
51
- timeToCleanUp: timeToDelete,
52
- timeToRenderChunks: (0, calculate_chunk_times_1.calculateChunkTimes)({
53
- type: 'absolute-time',
54
- timings: overallProgress.timings,
55
- }),
56
- timeToRenderFrames: overallProgress.timeToRenderFrames,
57
- retriesInfo: overallProgress.retries,
58
- mostExpensiveFrameRanges: renderMetadata.type === 'still'
59
- ? []
60
- : (0, get_most_expensive_chunks_1.getMostExpensiveChunks)(parsedTimings, renderMetadata.framesPerLambda, renderMetadata.frameRange[0], renderMetadata.frameRange[1]),
61
- deleteAfter: renderMetadata.deleteAfter,
62
- estimatedBillingDurationInMilliseconds,
63
- timeToCombine: timeToCombine !== null && timeToCombine !== void 0 ? timeToCombine : null,
64
- artifactProgress: overallProgress.receivedArtifact,
65
- };
66
- };
67
- exports.createPostRenderData = createPostRenderData;
@@ -1,14 +0,0 @@
1
- import type { CloudProvider, ProviderSpecifics } from '@remotion/serverless';
2
- import { type CustomCredentials, type RenderMetadata } from '@remotion/serverless/client';
3
- export type OutputFileMetadata = {
4
- url: string;
5
- };
6
- export declare const findOutputFileInBucket: <Provider extends CloudProvider>({ region, renderMetadata, bucketName, customCredentials, currentRegion, providerSpecifics, forcePathStyle, }: {
7
- region: Provider["region"];
8
- renderMetadata: RenderMetadata<Provider>;
9
- bucketName: string;
10
- customCredentials: CustomCredentials<Provider> | null;
11
- currentRegion: Provider["region"];
12
- providerSpecifics: ProviderSpecifics<Provider>;
13
- forcePathStyle: boolean;
14
- }) => Promise<OutputFileMetadata | null>;
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findOutputFileInBucket = void 0;
4
- const client_1 = require("@remotion/serverless/client");
5
- const suggested_policy_1 = require("../../api/iam-validation/suggested-policy");
6
- const get_output_url_from_metadata_1 = require("./get-output-url-from-metadata");
7
- const findOutputFileInBucket = async ({ region, renderMetadata, bucketName, customCredentials, currentRegion, providerSpecifics, forcePathStyle, }) => {
8
- if (!renderMetadata) {
9
- throw new Error('unexpectedly did not get renderMetadata');
10
- }
11
- const { renderBucketName, key } = (0, client_1.getExpectedOutName)(renderMetadata, bucketName, customCredentials);
12
- try {
13
- await providerSpecifics.headFile({
14
- bucketName,
15
- key,
16
- region,
17
- customCredentials,
18
- forcePathStyle,
19
- });
20
- return {
21
- url: (0, get_output_url_from_metadata_1.getOutputUrlFromMetadata)(renderMetadata, bucketName, customCredentials, currentRegion).url,
22
- };
23
- }
24
- catch (err) {
25
- if (err.name === 'NotFound') {
26
- return null;
27
- }
28
- if (err.message === 'UnknownError' ||
29
- err.$metadata
30
- .httpStatusCode === 403) {
31
- throw new Error(`Unable to access item "${key}" from bucket "${renderBucketName}" ${(customCredentials === null || customCredentials === void 0 ? void 0 : customCredentials.endpoint)
32
- ? `(S3 Endpoint = ${customCredentials === null || customCredentials === void 0 ? void 0 : customCredentials.endpoint})`
33
- : ''}. The "${suggested_policy_1.ROLE_NAME}" role must have permission for both "s3:GetObject" and "s3:ListBucket" actions.`);
34
- }
35
- throw err;
36
- }
37
- };
38
- exports.findOutputFileInBucket = findOutputFileInBucket;
@@ -1,2 +0,0 @@
1
- import type { CostsInfo } from '../../shared/constants';
2
- export declare const formatCostsInfo: (accrued: number) => CostsInfo;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatCostsInfo = void 0;
4
- const display = (accrued) => {
5
- if (accrued < 0.001) {
6
- return '<$0.001';
7
- }
8
- return new Intl.NumberFormat('en-US', {
9
- currency: 'USD',
10
- style: 'currency',
11
- currencyDisplay: 'narrowSymbol',
12
- minimumFractionDigits: 3,
13
- }).format(accrued);
14
- };
15
- const formatCostsInfo = (accrued) => {
16
- return {
17
- accruedSoFar: accrued,
18
- displayCost: display(accrued),
19
- currency: 'USD',
20
- disclaimer: 'Estimated cost only. Does not include charges for other AWS services.',
21
- };
22
- };
23
- exports.formatCostsInfo = formatCostsInfo;
@@ -1,10 +0,0 @@
1
- import type { CloudProvider, ProviderSpecifics } from '@remotion/serverless';
2
- import type { OverallRenderProgress } from './overall-render-progress';
3
- export declare const getOverallProgressS3: <Provider extends CloudProvider>({ renderId, bucketName, expectedBucketOwner, region, providerSpecifics, forcePathStyle, }: {
4
- renderId: string;
5
- expectedBucketOwner: string | null;
6
- bucketName: string;
7
- region: Provider["region"];
8
- providerSpecifics: ProviderSpecifics<Provider>;
9
- forcePathStyle: boolean;
10
- }) => Promise<OverallRenderProgress<Provider>>;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getOverallProgressS3 = void 0;
4
- const client_1 = require("@remotion/serverless/client");
5
- const getOverallProgressS3 = async ({ renderId, bucketName, expectedBucketOwner, region, providerSpecifics, forcePathStyle, }) => {
6
- try {
7
- const Body = await providerSpecifics.readFile({
8
- bucketName,
9
- key: (0, client_1.overallProgressKey)(renderId),
10
- expectedBucketOwner,
11
- region,
12
- forcePathStyle,
13
- });
14
- const str = await (0, client_1.streamToString)(Body);
15
- return JSON.parse(str);
16
- }
17
- catch (err) {
18
- if (err.name === 'NotFound') {
19
- throw new TypeError(`No render with ID "${renderId}" found in bucket ${bucketName} and region ${region}`);
20
- }
21
- throw err;
22
- }
23
- };
24
- exports.getOverallProgressS3 = getOverallProgressS3;
@@ -1,9 +0,0 @@
1
- export declare const getOverallProgress: ({ encoding, invoking, frames, invokedLambda, visitedServeUrl, gotComposition, combining, }: {
2
- invokedLambda: number;
3
- visitedServeUrl: number | null;
4
- gotComposition: number | null;
5
- encoding: number;
6
- invoking: number;
7
- frames: number;
8
- combining: number;
9
- }) => number;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getOverallProgress = void 0;
4
- const weights = {
5
- evaluating: 0.1,
6
- encoding: 0.1,
7
- frames: 0.6,
8
- invoking: 0.1,
9
- combining: 0.1,
10
- };
11
- const getOverallProgress = ({ encoding, invoking, frames, invokedLambda, visitedServeUrl, gotComposition, combining, }) => {
12
- const evaluationProgress = [
13
- Boolean(invokedLambda),
14
- Boolean(visitedServeUrl),
15
- Boolean(gotComposition),
16
- ].reduce((a, b) => Number(a) + Number(b), 0) / 3;
17
- return (evaluationProgress * weights.evaluating +
18
- encoding * weights.encoding +
19
- invoking * weights.invoking +
20
- frames * weights.frames +
21
- combining * weights.combining);
22
- };
23
- exports.getOverallProgress = getOverallProgress;
@@ -1,15 +0,0 @@
1
- import type { CloudProvider, ProviderSpecifics } from '@remotion/serverless';
2
- import { type CustomCredentials } from '@remotion/serverless/client';
3
- import type { GenericRenderProgress } from '../../shared/constants';
4
- export declare const getProgress: <Provider extends CloudProvider>({ bucketName, renderId, expectedBucketOwner, region, memorySizeInMb, timeoutInMilliseconds, customCredentials, providerSpecifics, forcePathStyle, functionName, }: {
5
- bucketName: string;
6
- renderId: string;
7
- expectedBucketOwner: string | null;
8
- region: Provider["region"];
9
- memorySizeInMb: number;
10
- timeoutInMilliseconds: number;
11
- customCredentials: CustomCredentials<Provider> | null;
12
- providerSpecifics: ProviderSpecifics<Provider>;
13
- forcePathStyle: boolean;
14
- functionName: string;
15
- }) => Promise<GenericRenderProgress<Provider>>;
@@ -1,254 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getProgress = void 0;
4
- const pure_1 = require("@remotion/renderer/pure");
5
- const client_1 = require("@remotion/serverless/client");
6
- const no_react_1 = require("remotion/no-react");
7
- const constants_1 = require("../../shared/constants");
8
- const calculate_chunk_times_1 = require("./calculate-chunk-times");
9
- const calculate_price_from_bucket_1 = require("./calculate-price-from-bucket");
10
- const format_costs_info_1 = require("./format-costs-info");
11
- const get_overall_progress_1 = require("./get-overall-progress");
12
- const get_overall_progress_s3_1 = require("./get-overall-progress-s3");
13
- const inspect_errors_1 = require("./inspect-errors");
14
- const make_timeout_error_1 = require("./make-timeout-error");
15
- const render_has_audio_video_1 = require("./render-has-audio-video");
16
- const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region, memorySizeInMb, timeoutInMilliseconds, customCredentials, providerSpecifics, forcePathStyle, functionName, }) => {
17
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
18
- const overallProgress = await (0, get_overall_progress_s3_1.getOverallProgressS3)({
19
- renderId,
20
- bucketName,
21
- expectedBucketOwner,
22
- region,
23
- providerSpecifics,
24
- forcePathStyle,
25
- });
26
- if (overallProgress.postRenderData) {
27
- if (!overallProgress.renderMetadata) {
28
- throw new Error('No render metadata found even though render is finished');
29
- }
30
- if (overallProgress.renderMetadata.type === 'still') {
31
- throw new Error("You don't need to call getRenderProgress() on a still render. Once you have obtained the `renderId`, the render is already done! 😉");
32
- }
33
- const outData = (0, client_1.getExpectedOutName)(overallProgress.renderMetadata, bucketName, customCredentials);
34
- const totalFrameCount = pure_1.NoReactAPIs.getFramesToRender(overallProgress.renderMetadata.frameRange, overallProgress.renderMetadata.everyNthFrame).length;
35
- return {
36
- framesRendered: totalFrameCount,
37
- bucket: bucketName,
38
- renderSize: overallProgress.postRenderData.renderSize,
39
- chunks: overallProgress.renderMetadata.totalChunks,
40
- cleanup: {
41
- doneIn: overallProgress.postRenderData.timeToCleanUp,
42
- filesDeleted: overallProgress.postRenderData.filesCleanedUp,
43
- minFilesToDelete: overallProgress.postRenderData.filesCleanedUp,
44
- },
45
- costs: {
46
- accruedSoFar: overallProgress.postRenderData.cost.estimatedCost,
47
- displayCost: overallProgress.postRenderData.cost.estimatedDisplayCost,
48
- currency: overallProgress.postRenderData.cost.currency,
49
- disclaimer: overallProgress.postRenderData.cost.disclaimer,
50
- },
51
- currentTime: Date.now(),
52
- done: true,
53
- encodingStatus: {
54
- framesEncoded: totalFrameCount,
55
- combinedFrames: totalFrameCount,
56
- timeToCombine: overallProgress.postRenderData.timeToCombine,
57
- },
58
- errors: overallProgress.postRenderData.errors,
59
- fatalErrorEncountered: false,
60
- lambdasInvoked: overallProgress.renderMetadata.totalChunks,
61
- outputFile: overallProgress.postRenderData.outputFile,
62
- renderId,
63
- timeToFinish: overallProgress.postRenderData.timeToFinish,
64
- timeToFinishChunks: overallProgress.postRenderData.timeToRenderChunks,
65
- timeToRenderFrames: overallProgress.postRenderData.timeToRenderFrames,
66
- overallProgress: 1,
67
- retriesInfo: overallProgress.postRenderData.retriesInfo,
68
- outKey: outData.key,
69
- outBucket: outData.renderBucketName,
70
- mostExpensiveFrameRanges: (_a = overallProgress.postRenderData.mostExpensiveFrameRanges) !== null && _a !== void 0 ? _a : null,
71
- timeToEncode: overallProgress.postRenderData.timeToEncode,
72
- outputSizeInBytes: overallProgress.postRenderData.outputSize,
73
- type: 'success',
74
- estimatedBillingDurationInMilliseconds: overallProgress.postRenderData.estimatedBillingDurationInMilliseconds,
75
- timeToCombine: overallProgress.postRenderData.timeToCombine,
76
- combinedFrames: totalFrameCount,
77
- renderMetadata: overallProgress.renderMetadata,
78
- timeoutTimestamp: overallProgress.timeoutTimestamp,
79
- compositionValidated: overallProgress.compositionValidated,
80
- functionLaunched: overallProgress.functionLaunched,
81
- serveUrlOpened: overallProgress.serveUrlOpened,
82
- artifacts: overallProgress.receivedArtifact,
83
- };
84
- }
85
- const { renderMetadata } = overallProgress;
86
- const errorExplanations = (0, inspect_errors_1.inspectErrors)({
87
- errors: overallProgress.errors,
88
- });
89
- const { hasAudio, hasVideo } = renderMetadata
90
- ? (0, render_has_audio_video_1.lambdaRenderHasAudioVideo)(renderMetadata)
91
- : { hasAudio: false, hasVideo: false };
92
- const chunkCount = (_b = overallProgress.chunks.length) !== null && _b !== void 0 ? _b : 0;
93
- const cleanup = {
94
- doneIn: null,
95
- minFilesToDelete: 0,
96
- filesDeleted: 0,
97
- };
98
- if (renderMetadata === null) {
99
- return {
100
- framesRendered: (_c = overallProgress.framesRendered) !== null && _c !== void 0 ? _c : 0,
101
- chunks: chunkCount,
102
- done: false,
103
- encodingStatus: {
104
- framesEncoded: overallProgress.framesEncoded,
105
- combinedFrames: overallProgress.combinedFrames,
106
- timeToCombine: overallProgress.timeToCombine,
107
- },
108
- timeToRenderFrames: overallProgress.timeToRenderFrames,
109
- costs: (0, format_costs_info_1.formatCostsInfo)(0),
110
- renderId,
111
- renderMetadata,
112
- bucket: bucketName,
113
- outputFile: null,
114
- timeToFinish: null,
115
- errors: errorExplanations,
116
- fatalErrorEncountered: errorExplanations.some((f) => f.isFatal && !f.willRetry),
117
- currentTime: Date.now(),
118
- renderSize: 0,
119
- lambdasInvoked: (_d = overallProgress.lambdasInvoked) !== null && _d !== void 0 ? _d : 0,
120
- cleanup,
121
- timeToFinishChunks: null,
122
- overallProgress: (0, get_overall_progress_1.getOverallProgress)({
123
- encoding: 0,
124
- invoking: 0,
125
- frames: 0,
126
- gotComposition: overallProgress.compositionValidated,
127
- visitedServeUrl: overallProgress.serveUrlOpened,
128
- invokedLambda: overallProgress.lambdasInvoked,
129
- combining: 0,
130
- }),
131
- retriesInfo: (_e = overallProgress.retries) !== null && _e !== void 0 ? _e : [],
132
- outKey: null,
133
- outBucket: null,
134
- mostExpensiveFrameRanges: null,
135
- timeToEncode: overallProgress.timeToEncode,
136
- outputSizeInBytes: null,
137
- estimatedBillingDurationInMilliseconds: null,
138
- combinedFrames: (_f = overallProgress.combinedFrames) !== null && _f !== void 0 ? _f : 0,
139
- timeToCombine: (_g = overallProgress.timeToCombine) !== null && _g !== void 0 ? _g : null,
140
- timeoutTimestamp: overallProgress.timeoutTimestamp,
141
- type: 'success',
142
- compositionValidated: overallProgress.compositionValidated,
143
- functionLaunched: overallProgress.functionLaunched,
144
- serveUrlOpened: overallProgress.serveUrlOpened,
145
- artifacts: overallProgress.receivedArtifact,
146
- };
147
- }
148
- const priceFromBucket = (0, calculate_price_from_bucket_1.estimatePriceFromBucket)({
149
- renderMetadata,
150
- memorySizeInMb,
151
- lambdasInvoked: (_h = renderMetadata.estimatedRenderLambdaInvokations) !== null && _h !== void 0 ? _h : 0,
152
- // We cannot determine the ephemeral storage size, so we
153
- // overestimate the price, but will only have a miniscule effect (~0.2%)
154
- diskSizeInMb: constants_1.MAX_EPHEMERAL_STORAGE_IN_MB,
155
- timings: (_j = overallProgress.timings) !== null && _j !== void 0 ? _j : [],
156
- region: region,
157
- });
158
- const chunkMultiplier = [hasAudio, hasVideo].filter(client_1.truthy).length;
159
- if (renderMetadata.type === 'still') {
160
- throw new Error("You don't need to call getRenderProgress() on a still render. Once you have obtained the `renderId`, the render is already done! 😉");
161
- }
162
- const allChunks = ((_k = overallProgress.chunks) !== null && _k !== void 0 ? _k : []).length / chunkMultiplier ===
163
- ((_l = renderMetadata.totalChunks) !== null && _l !== void 0 ? _l : Infinity);
164
- const frameCount = pure_1.NoReactAPIs.getFramesToRender(renderMetadata.frameRange, renderMetadata.everyNthFrame).length;
165
- const missingChunks = new Array(renderMetadata.totalChunks)
166
- .fill(true)
167
- .map((_, i) => i)
168
- .filter((index) => {
169
- var _a;
170
- return (typeof ((_a = overallProgress.chunks) !== null && _a !== void 0 ? _a : []).find((c) => c === index) ===
171
- 'undefined');
172
- });
173
- // We add a 20 second buffer for it, since AWS timeshifts can be quite a lot. Once it's 20sec over the limit, we consider it timed out
174
- // 1. If we have missing chunks, we consider it timed out
175
- const isBeyondTimeoutAndMissingChunks = Date.now() > renderMetadata.startedDate + timeoutInMilliseconds + 20000 &&
176
- missingChunks &&
177
- missingChunks.length > 0;
178
- // 2. If we have no missing chunks, but the encoding is not done, even after the additional `merge` function has been spawned, we consider it timed out
179
- const isBeyondTimeoutAndHasStitchTimeout = Date.now() > renderMetadata.startedDate + timeoutInMilliseconds * 2 + 20000;
180
- const allErrors = [
181
- isBeyondTimeoutAndMissingChunks || isBeyondTimeoutAndHasStitchTimeout
182
- ? (0, make_timeout_error_1.makeTimeoutError)({
183
- timeoutInMilliseconds,
184
- renderMetadata,
185
- renderId,
186
- missingChunks: missingChunks !== null && missingChunks !== void 0 ? missingChunks : [],
187
- region,
188
- functionName,
189
- })
190
- : null,
191
- ...errorExplanations,
192
- ].filter(no_react_1.NoReactInternals.truthy);
193
- return {
194
- framesRendered: (_m = overallProgress.framesRendered) !== null && _m !== void 0 ? _m : 0,
195
- chunks: chunkCount,
196
- done: false,
197
- encodingStatus: {
198
- framesEncoded: overallProgress.framesEncoded,
199
- combinedFrames: overallProgress.combinedFrames,
200
- timeToCombine: overallProgress.timeToCombine,
201
- },
202
- timeToRenderFrames: overallProgress.timeToRenderFrames,
203
- costs: priceFromBucket
204
- ? (0, format_costs_info_1.formatCostsInfo)(priceFromBucket.accruedSoFar)
205
- : (0, format_costs_info_1.formatCostsInfo)(0),
206
- renderId,
207
- renderMetadata,
208
- bucket: bucketName,
209
- outputFile: null,
210
- timeToFinish: null,
211
- errors: allErrors,
212
- fatalErrorEncountered: allErrors.some((f) => f.isFatal && !f.willRetry),
213
- currentTime: Date.now(),
214
- renderSize: 0,
215
- lambdasInvoked: (_o = overallProgress.lambdasInvoked) !== null && _o !== void 0 ? _o : 0,
216
- cleanup,
217
- timeToFinishChunks: allChunks && overallProgress
218
- ? (0, calculate_chunk_times_1.calculateChunkTimes)({
219
- type: 'absolute-time',
220
- timings: overallProgress.timings,
221
- })
222
- : null,
223
- overallProgress: (0, get_overall_progress_1.getOverallProgress)({
224
- encoding: frameCount
225
- ? ((_p = overallProgress.framesEncoded) !== null && _p !== void 0 ? _p : 0) / frameCount
226
- : 0,
227
- invoking: ((_q = overallProgress.lambdasInvoked) !== null && _q !== void 0 ? _q : 0) /
228
- renderMetadata.estimatedRenderLambdaInvokations,
229
- frames: ((_r = overallProgress.framesRendered) !== null && _r !== void 0 ? _r : 0) / (frameCount !== null && frameCount !== void 0 ? frameCount : 1),
230
- gotComposition: overallProgress.compositionValidated,
231
- visitedServeUrl: overallProgress.serveUrlOpened,
232
- invokedLambda: overallProgress.lambdasInvoked,
233
- combining: overallProgress.combinedFrames / (frameCount !== null && frameCount !== void 0 ? frameCount : 1),
234
- }),
235
- retriesInfo: (_s = overallProgress.retries) !== null && _s !== void 0 ? _s : [],
236
- outKey: null,
237
- outBucket: null,
238
- mostExpensiveFrameRanges: null,
239
- timeToEncode: overallProgress.timeToEncode,
240
- outputSizeInBytes: null,
241
- estimatedBillingDurationInMilliseconds: priceFromBucket
242
- ? priceFromBucket.estimatedBillingDurationInMilliseconds
243
- : null,
244
- combinedFrames: (_t = overallProgress.combinedFrames) !== null && _t !== void 0 ? _t : 0,
245
- timeToCombine: (_u = overallProgress.timeToCombine) !== null && _u !== void 0 ? _u : null,
246
- timeoutTimestamp: overallProgress.timeoutTimestamp,
247
- type: 'success',
248
- compositionValidated: overallProgress.compositionValidated,
249
- functionLaunched: overallProgress.functionLaunched,
250
- serveUrlOpened: overallProgress.serveUrlOpened,
251
- artifacts: overallProgress.receivedArtifact,
252
- };
253
- };
254
- exports.getProgress = getProgress;
@@ -1,5 +0,0 @@
1
- export type ChunkRetry = {
2
- chunk: number;
3
- attempt: number;
4
- time: number;
5
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- import type { EnhancedErrorInfo, LambdaErrorInfo } from '@remotion/serverless';
2
- export declare const inspectErrors: ({ errors, }: {
3
- errors: LambdaErrorInfo[];
4
- }) => EnhancedErrorInfo[];
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.inspectErrors = void 0;
4
- const client_1 = require("@remotion/serverless/client");
5
- const docs_url_1 = require("../../shared/docs-url");
6
- const FAILED_TO_LAUNCH_TOKEN = 'Failed to launch browser.';
7
- const getExplanation = (stack) => {
8
- if (stack.includes('FATAL:zygote_communication_linux.cc')) {
9
- return (FAILED_TO_LAUNCH_TOKEN +
10
- ' Will be retried - you can probably ignore this error.');
11
- }
12
- if (stack.includes('error while loading shared libraries: libnss3.so')) {
13
- return (FAILED_TO_LAUNCH_TOKEN +
14
- ' Will be retried - you can probably ignore this error.');
15
- }
16
- if (stack.includes('TooManyRequestsException')) {
17
- return `AWS returned an "TooManyRequestsException" error message which could mean you reached the concurrency limit of AWS Lambda. You can increase the limit - read this troubleshooting page: ${docs_url_1.DOCS_URL}/docs/lambda/troubleshooting/rate-limit`;
18
- }
19
- if ((0, client_1.errorIsOutOfSpaceError)(stack)) {
20
- return `Your lambda function reached the storage limit. Reduce the amount of space needed per lambda function or increase the storage limit: ${docs_url_1.DOCS_URL}/docs/lambda/disk-size.`;
21
- }
22
- if ((0, client_1.isErrInsufficientResourcesErr)(stack)) {
23
- return 'The lambda ran out of memory. Deploy a new function with more memory.';
24
- }
25
- if ((0, client_1.isBrowserCrashedError)(stack)) {
26
- return 'The browser crashed while rendering the video. Deploy a new function with memory to give the browser more resources.';
27
- }
28
- return null;
29
- };
30
- const inspectErrors = ({ errors, }) => {
31
- return errors.map((e) => {
32
- return {
33
- ...e,
34
- explanation: getExplanation(e.stack),
35
- s3Location: '',
36
- };
37
- });
38
- };
39
- exports.inspectErrors = inspectErrors;
@@ -1,2 +0,0 @@
1
- export declare const setWarm: () => void;
2
- export declare const getWarm: () => boolean;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getWarm = exports.setWarm = void 0;
4
- let warm = false;
5
- const setWarm = () => {
6
- warm = true;
7
- };
8
- exports.setWarm = setWarm;
9
- const getWarm = () => warm;
10
- exports.getWarm = getWarm;
@@ -1,4 +0,0 @@
1
- import type { NodeIntrospection } from '../../shared/why-is-node-running';
2
- export declare const stopLeakDetection: () => void;
3
- export declare const setCurrentRequestId: (awsRequestId: string) => void;
4
- export declare const startLeakDetection: (leakDetection: NodeIntrospection, awsRequestId: string) => void;