@remotion/lambda 4.0.70 → 4.0.72

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.
@@ -1,6 +1,6 @@
1
1
  import type { ChromiumOptions, LogLevel, ToOptions } from '@remotion/renderer';
2
2
  import type { BrowserSafeApis } from '@remotion/renderer/client';
3
- import type { VideoConfig } from 'remotion';
3
+ import type { VideoConfig } from 'remotion/no-react';
4
4
  import type { AwsRegion } from '../client';
5
5
  export type GetCompositionsOnLambdaInput = {
6
6
  chromiumOptions?: ChromiumOptions;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeProgressString = exports.makeMultiProgressFromStatus = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
5
  const renderer_1 = require("@remotion/renderer");
6
- const remotion_1 = require("remotion");
6
+ const no_react_1 = require("remotion/no-react");
7
7
  const truthy_1 = require("../../../shared/truthy");
8
8
  const makeInvokeProgress = (invokeProgress, totalSteps, retriesInfo) => {
9
9
  const { lambdasInvoked, totalLambdas } = invokeProgress;
@@ -97,7 +97,7 @@ const makeDownloadProgress = (downloadInfo, totalSteps) => {
97
97
  ? null
98
98
  : `${cli_1.CliInternals.formatBytes(downloadInfo.totalSize)}`,
99
99
  ]
100
- .filter(remotion_1.Internals.truthy)
100
+ .filter(no_react_1.NoReactInternals.truthy)
101
101
  .join('/')
102
102
  : cli_1.CliInternals.chalk.gray(`${downloadInfo.doneIn}ms`),
103
103
  ].join(' ');
@@ -142,7 +142,7 @@ const makeProgressString = ({ progress, steps, downloadInfo, retriesInfo, logLev
142
142
  makeCleanupProgress(progress.cleanupInfo, steps, logLevel === 'verbose'),
143
143
  downloadInfo ? makeDownloadProgress(downloadInfo, steps) : null,
144
144
  ]
145
- .filter(remotion_1.Internals.truthy)
145
+ .filter(no_react_1.NoReactInternals.truthy)
146
146
  .join('\n');
147
147
  };
148
148
  exports.makeProgressString = makeProgressString;
@@ -4,7 +4,7 @@ exports.renderCommand = exports.RENDER_COMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
5
  const config_1 = require("@remotion/cli/config");
6
6
  const renderer_1 = require("@remotion/renderer");
7
- const remotion_1 = require("remotion");
7
+ const no_react_1 = require("remotion/no-react");
8
8
  const download_media_1 = require("../../../api/download-media");
9
9
  const get_render_progress_1 = require("../../../api/get-render-progress");
10
10
  const render_media_on_lambda_1 = require("../../../api/render-media-on-lambda");
@@ -68,7 +68,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
68
68
  envVariables,
69
69
  height,
70
70
  indent: false,
71
- serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
71
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
72
72
  indent: undefined,
73
73
  staticBase: null,
74
74
  data: inputProps,
@@ -4,7 +4,7 @@ exports.sitesCreateSubcommand = exports.SITES_CREATE_SUBCOMMAND = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
5
  const config_1 = require("@remotion/cli/config");
6
6
  const client_1 = require("@remotion/renderer/client");
7
- const remotion_1 = require("remotion");
7
+ const no_react_1 = require("remotion/no-react");
8
8
  const deploy_site_1 = require("../../../api/deploy-site");
9
9
  const get_or_create_bucket_1 = require("../../../api/get-or-create-bucket");
10
10
  const constants_1 = require("../../../shared/constants");
@@ -123,7 +123,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
123
123
  log_1.Log.info();
124
124
  log_1.Log.info(cli_1.CliInternals.chalk.blueBright('ℹ️ If you make changes to your code, you need to redeploy the site. You can overwrite the existing site by running:'));
125
125
  log_1.Log.info(cli_1.CliInternals.chalk.blueBright(['npx remotion lambda sites create', args[0], `--site-name=${siteName}`]
126
- .filter(remotion_1.Internals.truthy)
126
+ .filter(no_react_1.NoReactInternals.truthy)
127
127
  .join(' ')));
128
128
  };
129
129
  exports.sitesCreateSubcommand = sitesCreateSubcommand;
@@ -5,7 +5,7 @@ const cli_1 = require("@remotion/cli");
5
5
  const config_1 = require("@remotion/cli/config");
6
6
  const renderer_1 = require("@remotion/renderer");
7
7
  const client_1 = require("@remotion/renderer/client");
8
- const remotion_1 = require("remotion");
8
+ const no_react_1 = require("remotion/no-react");
9
9
  const download_media_1 = require("../../api/download-media");
10
10
  const render_still_on_lambda_1 = require("../../api/render-still-on-lambda");
11
11
  const constants_1 = require("../../shared/constants");
@@ -60,7 +60,7 @@ const stillCommand = async (args, remotionRoot, logLevel) => {
60
60
  browserExecutable,
61
61
  chromiumOptions,
62
62
  envVariables,
63
- serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
63
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
64
64
  indent: undefined,
65
65
  staticBase: null,
66
66
  data: inputProps,
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeDeployProgressBar = exports.makeBucketProgress = exports.makeBundleProgress = void 0;
4
4
  const cli_1 = require("@remotion/cli");
5
- const remotion_1 = require("remotion");
5
+ const no_react_1 = require("remotion/no-react");
6
6
  const makeBundleProgress = ({ progress, doneIn }) => {
7
7
  return [
8
8
  `(1/3)`,
@@ -36,7 +36,7 @@ const makeUploadDiff = ({ stats }) => {
36
36
  stats.addedFiles ? `+${stats.addedFiles}` : null,
37
37
  stats.removedFiles ? `-${stats.removedFiles}` : null,
38
38
  ]
39
- .filter(remotion_1.Internals.truthy)
39
+ .filter(no_react_1.NoReactInternals.truthy)
40
40
  .join(',')} ${total === 1 ? 'file' : 'files'})`);
41
41
  };
42
42
  const makeDeployProgressBar = ({ sizeUploaded, totalSize, doneIn, stats, }) => {
@@ -52,7 +52,7 @@ const makeDeployProgressBar = ({ sizeUploaded, totalSize, doneIn, stats, }) => {
52
52
  : cli_1.CliInternals.chalk.gray(`${doneIn}ms`),
53
53
  makeUploadDiff({ stats }),
54
54
  ]
55
- .filter(remotion_1.Internals.truthy)
55
+ .filter(no_react_1.NoReactInternals.truthy)
56
56
  .join(' ');
57
57
  };
58
58
  exports.makeDeployProgressBar = makeDeployProgressBar;
@@ -3,8 +3,5 @@ export declare const planFrameRanges: ({ framesPerLambda, frameRange, everyNthFr
3
3
  frameRange: [number, number];
4
4
  everyNthFrame: number;
5
5
  }) => {
6
- chunks: [
7
- number,
8
- number
9
- ][];
6
+ chunks: [number, number][];
10
7
  };
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.bestFramesPerLambdaParam = void 0;
4
- const remotion_1 = require("remotion");
4
+ const no_react_1 = require("remotion/no-react");
5
5
  // Always update the code in docs/lambda/concurrency.md too
6
6
  const bestFramesPerLambdaParam = (frameCount) => {
7
7
  // Between 0 and 10 minutes (at 30fps), interpolate the concurrency from 75 to 150
8
- const concurrency = (0, remotion_1.interpolate)(frameCount, [0, 18000], [75, 150], {
8
+ const concurrency = (0, no_react_1.interpolate)(frameCount, [0, 18000], [75, 150], {
9
9
  extrapolateRight: 'clamp',
10
10
  });
11
11
  // At least have 20 as a `framesPerLambda` value
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getProgress = void 0;
4
4
  const renderer_1 = require("@remotion/renderer");
5
- const remotion_1 = require("remotion");
5
+ const no_react_1 = require("remotion/no-react");
6
6
  const constants_1 = require("../../shared/constants");
7
7
  const parse_chunk_key_1 = require("../../shared/parse-chunk-key");
8
8
  const calculate_chunk_times_1 = require("./calculate-chunk-times");
@@ -197,7 +197,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
197
197
  })
198
198
  : null,
199
199
  ...errorExplanations,
200
- ].filter(remotion_1.Internals.truthy);
200
+ ].filter(no_react_1.NoReactInternals.truthy);
201
201
  return {
202
202
  framesRendered,
203
203
  chunks: chunkCount,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.inspectErrors = void 0;
4
- const remotion_1 = require("remotion");
4
+ const no_react_1 = require("remotion/no-react");
5
5
  const constants_1 = require("../../shared/constants");
6
6
  const docs_url_1 = require("../../shared/docs-url");
7
7
  const stream_to_string_1 = require("../../shared/stream-to-string");
@@ -35,7 +35,7 @@ const inspectErrors = async ({ contents, bucket, region, renderId, expectedBucke
35
35
  const errs = contents
36
36
  .filter((c) => { var _a; return (_a = c.Key) === null || _a === void 0 ? void 0 : _a.startsWith((0, constants_1.getErrorKeyPrefix)(renderId)); })
37
37
  .map((c) => c.Key)
38
- .filter(remotion_1.Internals.truthy);
38
+ .filter(no_react_1.NoReactInternals.truthy);
39
39
  if (errs.length === 0) {
40
40
  return [];
41
41
  }
@@ -9,6 +9,7 @@ const makeTimeoutError = ({ timeoutInMilliseconds, missingChunks, renderMetadata
9
9
  timeoutInMilliseconds,
10
10
  renderId,
11
11
  });
12
+ const error = new Error(message);
12
13
  return {
13
14
  attempt: 1,
14
15
  chunk: null,
@@ -16,7 +17,7 @@ const makeTimeoutError = ({ timeoutInMilliseconds, missingChunks, renderMetadata
16
17
  frame: null,
17
18
  isFatal: true,
18
19
  s3Location: '',
19
- stack: new Error().stack,
20
+ stack: error.stack,
20
21
  tmpDir: null,
21
22
  totalAttempts: 1,
22
23
  type: 'stitcher',
@@ -1,5 +1,5 @@
1
1
  import type { ChromiumOptions, LogLevel, openBrowser, RemotionServer } from '@remotion/renderer';
2
- import type { VideoConfig } from 'remotion';
2
+ import type { VideoConfig } from 'remotion/no-react';
3
3
  import type { Await } from '../../shared/await';
4
4
  type ValidateCompositionOptions = {
5
5
  serveUrl: string;
@@ -70,11 +70,13 @@ const innerLaunchHandler = async ({ functionName, params, options, onAllChunksAv
70
70
  logLevel: params.logLevel,
71
71
  };
72
72
  const serializedInputPropsWithCustomSchema = await inputPropsPromise;
73
+ renderer_1.RenderInternals.Log.infoAdvanced(logOptions, 'Waiting for browser to be ready:', serializedInputPropsWithCustomSchema);
74
+ const { instance } = await browserInstance;
73
75
  renderer_1.RenderInternals.Log.infoAdvanced(logOptions, 'Validating composition, input props:', serializedInputPropsWithCustomSchema);
74
76
  const comp = await (0, validate_composition_1.validateComposition)({
75
77
  serveUrl: params.serveUrl,
76
78
  composition: params.composition,
77
- browserInstance: (await browserInstance).instance,
79
+ browserInstance: instance,
78
80
  serializedInputPropsWithCustomSchema,
79
81
  envVariables: (_a = params.envVariables) !== null && _a !== void 0 ? _a : {},
80
82
  timeoutInMilliseconds: params.timeoutInMilliseconds,
@@ -4,6 +4,7 @@ type Options = {
4
4
  expectedBucketOwner: string;
5
5
  isWarm: boolean;
6
6
  };
7
+ export declare const ENABLE_SLOW_LEAK_DETECTION = false;
7
8
  export declare const rendererHandler: (params: LambdaPayload, options: Options, requestContext: RequestContext) => Promise<{
8
9
  type: 'success';
9
10
  }>;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.rendererHandler = void 0;
6
+ exports.rendererHandler = exports.ENABLE_SLOW_LEAK_DETECTION = void 0;
7
7
  const renderer_1 = require("@remotion/renderer");
8
8
  const node_fs_1 = __importDefault(require("node:fs"));
9
9
  const node_path_1 = __importDefault(require("node:path"));
@@ -212,12 +212,13 @@ const renderHandler = async (params, options, logs) => {
212
212
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel: params.logLevel }, 'Done!');
213
213
  return {};
214
214
  };
215
+ exports.ENABLE_SLOW_LEAK_DETECTION = false;
215
216
  const rendererHandler = async (params, options, requestContext) => {
216
217
  if (params.type !== constants_1.LambdaRoutines.renderer) {
217
218
  throw new Error('Params must be renderer');
218
219
  }
219
220
  const logs = [];
220
- const leakDetection = (0, why_is_node_running_1.enableNodeIntrospection)();
221
+ const leakDetection = (0, why_is_node_running_1.enableNodeIntrospection)(exports.ENABLE_SLOW_LEAK_DETECTION);
221
222
  try {
222
223
  await renderHandler(params, options, logs);
223
224
  return {
@@ -7,7 +7,7 @@ exports.stillHandler = void 0;
7
7
  const renderer_1 = require("@remotion/renderer");
8
8
  const node_fs_1 = __importDefault(require("node:fs"));
9
9
  const node_path_1 = __importDefault(require("node:path"));
10
- const remotion_1 = require("remotion");
10
+ const no_react_1 = require("remotion/no-react");
11
11
  const version_1 = require("remotion/version");
12
12
  const estimate_price_1 = require("../api/estimate-price");
13
13
  const get_or_create_bucket_1 = require("../api/get-or-create-bucket");
@@ -154,7 +154,7 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
154
154
  port: null,
155
155
  server,
156
156
  logLevel: lambdaParams.logLevel,
157
- serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
157
+ serializedResolvedPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
158
158
  indent: undefined,
159
159
  staticBase: null,
160
160
  data: composition.props,
@@ -1,6 +1,6 @@
1
1
  import type { AudioCodec, ChromiumOptions, ColorSpace, FrameRange, LogLevel, PixelFormat, ProResProfile, StillImageFormat, ToOptions, VideoImageFormat, X264Preset } from '@remotion/renderer';
2
2
  import type { BrowserSafeApis } from '@remotion/renderer/client';
3
- import type { VideoConfig } from 'remotion';
3
+ import type { VideoConfig } from 'remotion/no-react';
4
4
  import type { ChunkRetry } from '../functions/helpers/get-retry-stats';
5
5
  import type { DeleteAfter } from '../functions/helpers/lifecycle';
6
6
  import type { EnhancedErrorInfo } from '../functions/helpers/write-lambda-error';
@@ -1,3 +1,5 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
1
3
  import https from 'https';
2
4
  import http from 'node:http';
3
5
  import type { EnhancedErrorInfo } from '../functions/helpers/write-lambda-error';
@@ -1,4 +1,4 @@
1
- import { Internals } from 'remotion';
2
- export declare const validateFps: typeof Internals.validateFps;
3
- export declare const validateDimension: typeof Internals.validateDimension;
4
- export declare const validateDurationInFrames: typeof Internals.validateDurationInFrames;
1
+ import { NoReactInternals } from 'remotion/no-react';
2
+ export declare const validateFps: typeof NoReactInternals.validateFps;
3
+ export declare const validateDimension: typeof NoReactInternals.validateDimension;
4
+ export declare const validateDurationInFrames: typeof NoReactInternals.validateDurationInFrames;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateDurationInFrames = exports.validateDimension = exports.validateFps = void 0;
4
4
  /* eslint-disable prefer-destructuring */
5
- const remotion_1 = require("remotion");
6
- exports.validateFps = remotion_1.Internals.validateFps;
7
- exports.validateDimension = remotion_1.Internals.validateDimension;
8
- exports.validateDurationInFrames = remotion_1.Internals.validateDurationInFrames;
5
+ const no_react_1 = require("remotion/no-react");
6
+ exports.validateFps = no_react_1.NoReactInternals.validateFps;
7
+ exports.validateDimension = no_react_1.NoReactInternals.validateDimension;
8
+ exports.validateDurationInFrames = no_react_1.NoReactInternals.validateDurationInFrames;
@@ -9,9 +9,9 @@ type Resource = {
9
9
  };
10
10
  };
11
11
  export type NodeIntrospection = {
12
- hook: asyncHooks.AsyncHook;
12
+ hook: asyncHooks.AsyncHook | null;
13
13
  active: Map<number, Resource>;
14
14
  };
15
- export declare const enableNodeIntrospection: () => NodeIntrospection;
15
+ export declare const enableNodeIntrospection: (enabled: boolean) => NodeIntrospection;
16
16
  export declare function whyIsNodeRunning({ active, hook }: NodeIntrospection): void;
17
17
  export {};
@@ -8,8 +8,14 @@ const async_hooks_1 = __importDefault(require("async_hooks"));
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const path_1 = require("path");
10
10
  const stackback_1 = require("./stackback");
11
- const enableNodeIntrospection = () => {
11
+ const enableNodeIntrospection = (enabled) => {
12
12
  const active = new Map();
13
+ if (!enabled) {
14
+ return {
15
+ active,
16
+ hook: null,
17
+ };
18
+ }
13
19
  const hook = async_hooks_1.default.createHook({
14
20
  init(asyncId, type, _triggerAsyncId, resource) {
15
21
  if (type === 'TIMERWRAP' || type === 'PROMISE')
@@ -29,6 +35,9 @@ const enableNodeIntrospection = () => {
29
35
  };
30
36
  exports.enableNodeIntrospection = enableNodeIntrospection;
31
37
  function whyIsNodeRunning({ active, hook }) {
38
+ if (!hook) {
39
+ return;
40
+ }
32
41
  hook.disable();
33
42
  const activeResources = [...active.values()].filter((r) => {
34
43
  if (typeof r.resource.hasRef === 'function' && !r.resource.hasRef())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "4.0.70",
3
+ "version": "4.0.72",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -26,10 +26,10 @@
26
26
  "aws-policies": "^1.0.1",
27
27
  "mime-types": "2.1.34",
28
28
  "zod": "3.22.3",
29
- "@remotion/bundler": "4.0.70",
30
- "@remotion/renderer": "4.0.70",
31
- "remotion": "4.0.70",
32
- "@remotion/cli": "4.0.70"
29
+ "@remotion/bundler": "4.0.72",
30
+ "@remotion/renderer": "4.0.72",
31
+ "@remotion/cli": "4.0.72",
32
+ "remotion": "4.0.72"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@jonny/eslint-config": "3.0.276",
@@ -43,11 +43,11 @@
43
43
  "ts-node": "^10.8.0",
44
44
  "vitest": "0.31.1",
45
45
  "zip-lib": "^0.7.2",
46
- "@remotion/bundler": "4.0.70",
47
- "@remotion/compositor-linux-arm64-gnu": "4.0.70"
46
+ "@remotion/bundler": "4.0.72",
47
+ "@remotion/compositor-linux-arm64-gnu": "4.0.72"
48
48
  },
49
49
  "peerDependencies": {
50
- "@remotion/bundler": "4.0.70"
50
+ "@remotion/bundler": "4.0.72"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
Binary file