@remotion/lambda 4.0.70 → 4.0.71

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.
@@ -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
  };
@@ -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 {
@@ -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';
@@ -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.71",
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.71",
30
+ "@remotion/cli": "4.0.71",
31
+ "@remotion/renderer": "4.0.71",
32
+ "remotion": "4.0.71"
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.71",
47
+ "@remotion/compositor-linux-arm64-gnu": "4.0.71"
48
48
  },
49
49
  "peerDependencies": {
50
- "@remotion/bundler": "4.0.70"
50
+ "@remotion/bundler": "4.0.71"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
Binary file