@remotion/lambda 4.0.225 → 4.0.227

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.
@@ -129,7 +129,7 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
129
129
  RuntimeVersionArn,
130
130
  }));
131
131
  }
132
- catch (err) {
132
+ catch (_b) {
133
133
  console.warn('⚠️ Could not lock the runtime version. We recommend to update your policies to prevent your functions from breaking in the future in case the AWS runtime changes. See https://remotion.dev/docs/lambda/feb-2023-incident for an example on how to update your policy.');
134
134
  }
135
135
  renderer_1.RenderInternals.Log.verbose({ indent: false, logLevel }, `Function runtime is locked to ${RuntimeVersionArn}`);
@@ -53,7 +53,7 @@ const getFunctions = async (params) => {
53
53
  });
54
54
  return version;
55
55
  }
56
- catch (err) {
56
+ catch (_b) {
57
57
  return null;
58
58
  }
59
59
  }));
package/dist/cli/log.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  export declare const Log: {
2
- verbose: (options: import("@remotion/renderer/dist/logger").LogOptions & {
2
+ verbose: (options: import("@remotion/renderer").LogOptions & {
3
3
  tag?: string;
4
4
  }, ...args: Parameters<typeof console.log>) => void;
5
5
  info: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => void;
6
- warn: (options: import("@remotion/renderer/dist/logger").LogOptions, ...args: Parameters<typeof console.log>) => void;
7
- error: (options: import("@remotion/renderer/dist/logger").LogOptions & {
6
+ warn: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => void;
7
+ error: (options: import("@remotion/renderer").LogOptions & {
8
8
  tag?: string;
9
9
  }, ...args: Parameters<typeof console.log>) => void;
10
10
  };
@@ -1,13 +1,14 @@
1
- import type { CloudProvider, ProviderSpecifics } from '@remotion/serverless';
1
+ import type { CloudProvider } from '@remotion/serverless';
2
2
  import type { RenderMetadata } from '@remotion/serverless/client';
3
+ import type { AwsRegion } from '../../regions';
3
4
  import type { ParsedTiming } from '../../shared/parse-lambda-timings-key';
4
- export declare const estimatePriceFromBucket: <Provider extends CloudProvider>({ renderMetadata, memorySizeInMb, diskSizeInMb, lambdasInvoked, timings, providerSpecifics, }: {
5
+ export declare const estimatePriceFromBucket: <Provider extends CloudProvider>({ renderMetadata, memorySizeInMb, diskSizeInMb, lambdasInvoked, timings, region, }: {
5
6
  renderMetadata: RenderMetadata<Provider> | null;
6
7
  memorySizeInMb: number;
7
8
  diskSizeInMb: number;
8
9
  lambdasInvoked: number;
9
10
  timings: ParsedTiming[];
10
- providerSpecifics: ProviderSpecifics<Provider>;
11
+ region: AwsRegion;
11
12
  }) => {
12
13
  accruedSoFar: number;
13
14
  estimatedBillingDurationInMilliseconds: number;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.estimatePriceFromBucket = void 0;
4
4
  const estimate_price_1 = require("../../api/estimate-price");
5
5
  const calculate_chunk_times_1 = require("./calculate-chunk-times");
6
- const estimatePriceFromBucket = ({ renderMetadata, memorySizeInMb, diskSizeInMb, lambdasInvoked, timings, providerSpecifics, }) => {
6
+ const estimatePriceFromBucket = ({ renderMetadata, memorySizeInMb, diskSizeInMb, lambdasInvoked, timings, region, }) => {
7
7
  var _a, _b;
8
8
  if (!renderMetadata) {
9
9
  return null;
@@ -19,7 +19,7 @@ const estimatePriceFromBucket = ({ renderMetadata, memorySizeInMb, diskSizeInMb,
19
19
  timings,
20
20
  }) + timeElapsedOfUnfinished;
21
21
  const accruedSoFar = Number((0, estimate_price_1.estimatePrice)({
22
- region: providerSpecifics.getCurrentRegionInFunction(),
22
+ region,
23
23
  durationInMilliseconds: estimatedBillingDurationInMilliseconds,
24
24
  memorySizeInMb,
25
25
  diskSizeInMb,
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.canConcatVideoSeamlessly = exports.canConcatAudioSeamlessly = void 0;
4
4
  // Cannot do WAV yet, because currently assumes AAC in+outpoint
5
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
5
  const canConcatAudioSeamlessly = (audioCodec, chunkDurationInFrames) => {
7
6
  // Rendering a chunk that is too small generates too much overhead
8
7
  // and is currently buggy
@@ -19,7 +19,7 @@ const deleteAllFilesInAFolderRecursively = (path) => {
19
19
  node_fs_1.default.unlinkSync(filePath);
20
20
  }
21
21
  }
22
- catch (err) {
22
+ catch (_a) {
23
23
  // Can fail if file was already deleted by cleanup. In that case
24
24
  // let's ignore it
25
25
  }
@@ -153,7 +153,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
153
153
  // overestimate the price, but will only have a miniscule effect (~0.2%)
154
154
  diskSizeInMb: constants_1.MAX_EPHEMERAL_STORAGE_IN_MB,
155
155
  timings: (_j = overallProgress.timings) !== null && _j !== void 0 ? _j : [],
156
- providerSpecifics,
156
+ region: region,
157
157
  });
158
158
  const chunkMultiplier = [hasAudio, hasVideo].filter(client_1.truthy).length;
159
159
  if (renderMetadata.type === 'still') {
@@ -11,7 +11,7 @@ const parseJsonOrThrowSource = (data, type) => {
11
11
  try {
12
12
  return JSON.parse(asString);
13
13
  }
14
- catch (err) {
14
+ catch (_a) {
15
15
  throw new Error(`Invalid JSON (${type}): ${asString}`);
16
16
  }
17
17
  };
@@ -66,7 +66,7 @@ const callLambdaWithoutRetry = async ({ functionName, type, payload, region, tim
66
66
  try {
67
67
  return JSON.parse(decoded);
68
68
  }
69
- catch (err) {
69
+ catch (_a) {
70
70
  throw new Error(`Invalid JSON (${type}): ${JSON.stringify(decoded)}`);
71
71
  }
72
72
  };
@@ -37,7 +37,7 @@ const isLikelyToHaveAwsProfile = () => {
37
37
  const content = (0, fs_1.readFileSync)(credentialsFile, 'utf-8');
38
38
  return content.includes('[default]');
39
39
  }
40
- catch (err) {
40
+ catch (_a) {
41
41
  return false;
42
42
  }
43
43
  };
@@ -47,7 +47,6 @@ function readDirectory({ dir, etags, originalDir, onProgress, }) {
47
47
  };
48
48
  continue;
49
49
  }
50
- // eslint-disable-next-line no-lonely-if
51
50
  if (fs.lstatSync(filePath).isSymbolicLink()) {
52
51
  const realPath = fs.realpathSync(filePath);
53
52
  etags[path.relative(originalDir, filePath)] = (0, get_etag_1.getEtagOfFile)(realPath, onProgress);
@@ -10,7 +10,7 @@ function FormatStackTrace(error, frames) {
10
10
  try {
11
11
  lines.push('<error: ' + e + '>');
12
12
  }
13
- catch (ee) {
13
+ catch (_a) {
14
14
  lines.push('<error>');
15
15
  }
16
16
  }
@@ -24,7 +24,7 @@ function FormatStackTrace(error, frames) {
24
24
  try {
25
25
  line = '<error: ' + e + '>';
26
26
  }
27
- catch (ee) {
27
+ catch (_b) {
28
28
  // Any code that reaches this point is seriously nasty!
29
29
  line = '<error>';
30
30
  }
@@ -73,7 +73,7 @@ function whyIsNodeRunning({ active, hook }) {
73
73
  ' - ' +
74
74
  src[s.getLineNumber() - 1].trim());
75
75
  }
76
- catch (e) {
76
+ catch (_a) {
77
77
  console.error(prefix + padding.slice(prefix.length));
78
78
  }
79
79
  });
@@ -0,0 +1,36 @@
1
+ import {remotionFlatConfig} from '@remotion/eslint-config-internal';
2
+
3
+ const config = remotionFlatConfig({react: false});
4
+
5
+ export default [
6
+ {
7
+ ...config,
8
+ ignores: ['src/cli/**'],
9
+ rules: {
10
+ ...config.rules,
11
+ 'no-console': 'off',
12
+ 'arrow-body-style': 'off',
13
+ 'no-restricted-imports': [
14
+ 'error',
15
+ {
16
+ patterns: ['@remotion/cli', '@remotion/*/src/*', 'remotion/src/*'],
17
+ paths: ['remotion', 'react', 'react-dom'],
18
+ },
19
+ ],
20
+ },
21
+ },
22
+ {
23
+ ...config,
24
+ files: ['src/cli/**.ts'],
25
+ rules: {
26
+ 'no-console': 'error',
27
+ 'no-restricted-imports': [
28
+ 'error',
29
+ {
30
+ patterns: ['@remotion/*/src/*', 'remotion/src/*'],
31
+ paths: ['remotion', 'react', 'react-dom'],
32
+ },
33
+ ],
34
+ },
35
+ },
36
+ ];
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda"
4
4
  },
5
5
  "name": "@remotion/lambda",
6
- "version": "4.0.225",
6
+ "version": "4.0.227",
7
7
  "description": "Render Remotion videos on AWS Lambda",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
@@ -22,13 +22,13 @@
22
22
  "@aws-sdk/s3-request-presigner": "3.645.0",
23
23
  "mime-types": "2.1.34",
24
24
  "zod": "3.22.3",
25
- "@remotion/bundler": "4.0.225",
26
- "@remotion/renderer": "4.0.225",
27
- "@remotion/studio-server": "4.0.225",
28
- "remotion": "4.0.225",
29
- "@remotion/cli": "4.0.225",
30
- "@remotion/serverless": "4.0.225",
31
- "@remotion/streaming": "4.0.225"
25
+ "@remotion/bundler": "4.0.227",
26
+ "@remotion/renderer": "4.0.227",
27
+ "@remotion/cli": "4.0.227",
28
+ "@remotion/studio-server": "4.0.227",
29
+ "@remotion/serverless": "4.0.227",
30
+ "@remotion/streaming": "4.0.227",
31
+ "remotion": "4.0.227"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/mime-types": "2.1.1",
@@ -37,11 +37,13 @@
37
37
  "pureimage": "0.4.13",
38
38
  "vitest": "0.31.1",
39
39
  "zip-lib": "^0.7.2",
40
- "@remotion/bundler": "4.0.225",
41
- "@remotion/compositor-linux-arm64-gnu": "4.0.225"
40
+ "eslint": "9.14.0",
41
+ "@remotion/eslint-config-internal": "4.0.227",
42
+ "@remotion/compositor-linux-arm64-gnu": "4.0.227",
43
+ "@remotion/bundler": "4.0.227"
42
44
  },
43
45
  "peerDependencies": {
44
- "@remotion/bundler": "4.0.225"
46
+ "@remotion/bundler": "4.0.227"
45
47
  },
46
48
  "publishConfig": {
47
49
  "access": "public"
@@ -74,9 +76,9 @@
74
76
  "homepage": "https://www.remotion.dev/docs/lambda",
75
77
  "scripts": {
76
78
  "formatting": "prettier src --check",
77
- "testintegration": "vitest src/test/integration --run",
78
- "lint": "eslint src --ext ts,tsx",
79
+ "lint": "eslint src",
80
+ "testlambda": "vitest src/test/integration --run",
79
81
  "test": "vitest src/test/unit --run",
80
- "make": "bun build.ts"
82
+ "make": "tsc -d && bun build.ts"
81
83
  }
82
84
  }
Binary file