@remotion/lambda 3.3.19 → 3.3.26

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.
@@ -4,12 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const bundler_1 = require("@remotion/bundler");
7
+ const compositor_linux_arm64_musl_1 = require("@remotion/compositor-linux-arm64-musl");
8
+ const compositor_linux_x64_musl_1 = require("@remotion/compositor-linux-x64-musl");
7
9
  const fs_1 = __importDefault(require("fs"));
8
10
  const path_1 = __importDefault(require("path"));
9
11
  const quit_1 = require("../cli/helpers/quit");
10
12
  const function_zip_path_1 = require("../shared/function-zip-path");
11
13
  const zl = require("zip-lib");
12
- const bundleLambda = async () => {
14
+ const bundleLambda = async (arch) => {
13
15
  var _a;
14
16
  const outdir = path_1.default.join(__dirname, '..', `build-render`);
15
17
  fs_1.default.mkdirSync(outdir, {
@@ -26,13 +28,27 @@ const bundleLambda = async () => {
26
28
  outfile,
27
29
  entryPoints: [template],
28
30
  treeShaking: true,
31
+ external: ['./compositor', './compositor.exe'],
29
32
  });
30
- await zl.archiveFolder(outdir, function_zip_path_1.FUNCTION_ZIP);
33
+ const compositorFile = `${outdir}/compositor`;
34
+ if (arch === 'arm64') {
35
+ fs_1.default.copyFileSync(compositor_linux_arm64_musl_1.binaryPath, compositorFile);
36
+ await zl.archiveFolder(outdir, function_zip_path_1.FUNCTION_ZIP_ARM64);
37
+ }
38
+ else {
39
+ fs_1.default.copyFileSync(compositor_linux_x64_musl_1.binaryPath, compositorFile);
40
+ await zl.archiveFolder(outdir, function_zip_path_1.FUNCTION_ZIP_X86_64);
41
+ }
42
+ fs_1.default.unlinkSync(compositorFile);
31
43
  fs_1.default.unlinkSync(outfile);
32
44
  };
33
- bundleLambda()
45
+ bundleLambda('arm64')
34
46
  .then(() => {
35
- console.log('Lambda bundled');
47
+ console.log('Lambda bundled for arm64');
48
+ return bundleLambda('x86_64');
49
+ })
50
+ .then(() => {
51
+ console.log('Lambda bundled for x86_64');
36
52
  })
37
53
  .catch((err) => {
38
54
  console.log(err);
@@ -55,7 +55,9 @@ const deployFunction = async (options) => {
55
55
  const created = await (0, create_function_1.createFunction)({
56
56
  createCloudWatchLogGroup: options.createCloudWatchLogGroup,
57
57
  region: options.region,
58
- zipFile: function_zip_path_1.FUNCTION_ZIP,
58
+ zipFile: options.architecture === 'arm64'
59
+ ? function_zip_path_1.FUNCTION_ZIP_ARM64
60
+ : function_zip_path_1.FUNCTION_ZIP_X86_64,
59
61
  functionName: fnNameRender,
60
62
  accountId,
61
63
  memorySizeInMb: options.memorySizeInMb,
@@ -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
  };
@@ -3,6 +3,6 @@ declare type Options = {
3
3
  expectedBucketOwner: string;
4
4
  };
5
5
  export declare const compositionsHandler: (lambdaParams: LambdaPayload, options: Options) => Promise<{
6
- compositions: import("remotion").TCompMetadata[];
6
+ compositions: import("remotion/.").TCompMetadata[];
7
7
  }>;
8
8
  export {};
@@ -1 +1 @@
1
- export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "ap-south-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "sa-east-1" | "eu-south-1" | "af-south-1" | "ap-east-1" | "me-south-1";
1
+ export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-south-1" | "eu-north-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-south-1" | "ap-east-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "me-south-1" | "sa-east-1";
package/dist/index.d.ts CHANGED
@@ -32,9 +32,8 @@ import { simulatePermissions } from './api/iam-validation/simulate';
32
32
  import { getRolePolicy, getUserPolicy } from './api/iam-validation/suggested-policy';
33
33
  import { presignUrl } from './api/presign-url';
34
34
  import type { RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput } from './api/render-media-on-lambda';
35
- import { renderMediaOnLambda, renderVideoOnLambda } from './api/render-media-on-lambda';
35
+ import { renderVideoOnLambda } from './api/render-media-on-lambda';
36
36
  import type { RenderStillOnLambdaInput, RenderStillOnLambdaOutput } from './api/render-still-on-lambda';
37
- import { renderStillOnLambda } from './api/render-still-on-lambda';
38
37
  import { validateWebhookSignature } from './api/validate-webhook-signature';
39
38
  import type { LambdaLSInput, LambdaLsReturnType } from './functions/helpers/io';
40
39
  import type { EnhancedErrorInfo, LambdaErrorInfo } from './functions/helpers/write-lambda-error';
@@ -44,5 +43,13 @@ import type { CustomCredentials } from './shared/aws-clients';
44
43
  import type { RenderProgress } from './shared/constants';
45
44
  import type { WebhookPayload } from './shared/invoke-webhook';
46
45
  import type { LambdaArchitecture } from './shared/validate-architecture';
46
+ /**
47
+ * @deprecated Import this from `@remotion/lambda/client` instead
48
+ */
49
+ declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, numberOfGifLoops, everyNthFrame, concurrencyPerLambda, downloadBehavior, muted, overwrite, audioBitrate, videoBitrate, webhook, forceHeight, forceWidth, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
50
+ /**
51
+ * @deprecated Import this from `@remotion/lambda/client` instead
52
+ */
53
+ declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
47
54
  export { deleteSite, deployFunction, deploySite, downloadMedia, downloadVideo, getFunctions, getUserPolicy, getRolePolicy, getSites, getOrCreateBucket, getRenderProgress, renderVideoOnLambda, renderMediaOnLambda, simulatePermissions, deleteFunction, getFunctionInfo, estimatePrice, LambdaInternals, renderStillOnLambda, getRegions, getAwsClient, presignUrl, deleteRender, validateWebhookSignature, getCompositionsOnLambda, };
48
55
  export type { AwsRegion, RenderProgress, DeploySiteInput, DeploySiteOutput, LambdaLsReturnType, LambdaLSInput, DeleteSiteInput, DeleteSiteOutput, EstimatePriceInput, DeployFunctionInput, DeployFunctionOutput, DeleteFunctionInput, GetFunctionInfoInput, FunctionInfo, GetFunctionsInput, GetSitesInput, GetSitesOutput, DownloadMediaInput, DownloadMediaOutput, GetOrCreateBucketInput, GetOrCreateBucketOutput, GetRenderInput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, SimulatePermissionsInput, SimulatePermissionsOutput, GetAwsClientInput, GetAwsClientOutput, LambdaArchitecture, CustomCredentials, WebhookPayload, LambdaErrorInfo, EnhancedErrorInfo, DeleteRenderInput, GetCompositionsOnLambdaOutput, GetCompositionsOnLambdaInput, };
package/dist/index.js CHANGED
@@ -40,11 +40,19 @@ Object.defineProperty(exports, "getUserPolicy", { enumerable: true, get: functio
40
40
  const presign_url_1 = require("./api/presign-url");
41
41
  Object.defineProperty(exports, "presignUrl", { enumerable: true, get: function () { return presign_url_1.presignUrl; } });
42
42
  const render_media_on_lambda_1 = require("./api/render-media-on-lambda");
43
- Object.defineProperty(exports, "renderMediaOnLambda", { enumerable: true, get: function () { return render_media_on_lambda_1.renderMediaOnLambda; } });
44
43
  Object.defineProperty(exports, "renderVideoOnLambda", { enumerable: true, get: function () { return render_media_on_lambda_1.renderVideoOnLambda; } });
45
44
  const render_still_on_lambda_1 = require("./api/render-still-on-lambda");
46
- Object.defineProperty(exports, "renderStillOnLambda", { enumerable: true, get: function () { return render_still_on_lambda_1.renderStillOnLambda; } });
47
45
  const validate_webhook_signature_1 = require("./api/validate-webhook-signature");
48
46
  Object.defineProperty(exports, "validateWebhookSignature", { enumerable: true, get: function () { return validate_webhook_signature_1.validateWebhookSignature; } });
49
47
  const internals_1 = require("./internals");
50
48
  Object.defineProperty(exports, "LambdaInternals", { enumerable: true, get: function () { return internals_1.LambdaInternals; } });
49
+ /**
50
+ * @deprecated Import this from `@remotion/lambda/client` instead
51
+ */
52
+ const renderMediaOnLambda = render_media_on_lambda_1.renderMediaOnLambda;
53
+ exports.renderMediaOnLambda = renderMediaOnLambda;
54
+ /**
55
+ * @deprecated Import this from `@remotion/lambda/client` instead
56
+ */
57
+ const renderStillOnLambda = render_still_on_lambda_1.renderStillOnLambda;
58
+ exports.renderStillOnLambda = renderStillOnLambda;
@@ -1 +1,2 @@
1
- export declare const FUNCTION_ZIP: string;
1
+ export declare const FUNCTION_ZIP_ARM64: string;
2
+ export declare const FUNCTION_ZIP_X86_64: string;
@@ -3,6 +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.FUNCTION_ZIP = void 0;
6
+ exports.FUNCTION_ZIP_X86_64 = exports.FUNCTION_ZIP_ARM64 = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
- exports.FUNCTION_ZIP = path_1.default.join(path_1.default.resolve(__dirname, '..', '..'), `remotionlambda.zip`);
8
+ exports.FUNCTION_ZIP_ARM64 = path_1.default.join(path_1.default.resolve(__dirname, '..', '..'), `remotionlambda-arm64.zip`);
9
+ exports.FUNCTION_ZIP_X86_64 = path_1.default.join(path_1.default.resolve(__dirname, '..', '..'), `remotionlambda-x64.zip`);
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import http from 'http';
4
2
  import https from 'https';
5
3
  import type { EnhancedErrorInfo } from '../functions/helpers/write-lambda-error';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "3.3.19",
3
+ "version": "3.3.26",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -33,12 +33,12 @@
33
33
  "@aws-sdk/credential-providers": "3.215.0",
34
34
  "@aws-sdk/lib-storage": "3.215.0",
35
35
  "@aws-sdk/s3-request-presigner": "3.215.0",
36
- "@remotion/bundler": "3.3.19",
37
- "@remotion/cli": "3.3.19",
38
- "@remotion/renderer": "3.3.19",
36
+ "@remotion/bundler": "3.3.26",
37
+ "@remotion/cli": "3.3.26",
38
+ "@remotion/renderer": "3.3.26",
39
39
  "aws-policies": "^1.0.1",
40
40
  "mime-types": "2.1.34",
41
- "remotion": "3.3.19"
41
+ "remotion": "3.3.26"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": ">=16.8.0",
@@ -46,6 +46,8 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@jonny/eslint-config": "3.0.266",
49
+ "@remotion/compositor-linux-arm64-musl": "3.3.26",
50
+ "@remotion/compositor-linux-x64-musl": "3.3.26",
49
51
  "@types/mime-types": "2.1.1",
50
52
  "@types/minimist": "1.2.2",
51
53
  "@types/node": "^14.14.14",
@@ -61,5 +63,5 @@
61
63
  "publishConfig": {
62
64
  "access": "public"
63
65
  },
64
- "gitHead": "097ff40cd34ecba3c7ebbbc08b442827b0f4ad7d"
66
+ "gitHead": "8efe8771f7c2b1d22bd50e8c81cc37ae054dfae9"
65
67
  }
Binary file
Binary file
Binary file