@remotion/lambda 3.3.38 → 3.3.40

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,5 +1,4 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
- import type { ChromiumOptions } from '@remotion/renderer/src/open-browser';
1
+ import type { ChromiumOptions, LogLevel } from '@remotion/renderer';
3
2
  import type { TCompMetadata } from 'remotion';
4
3
  import type { AwsRegion } from '../client';
5
4
  export declare type GetCompositionsOnLambdaInput = {
@@ -1,5 +1,4 @@
1
- import type { FrameRange, ImageFormat, LogLevel, PixelFormat, ProResProfile } from '@remotion/renderer';
2
- import type { ChromiumOptions } from '@remotion/renderer/src/open-browser';
1
+ import type { ChromiumOptions, FrameRange, ImageFormat, LogLevel, PixelFormat, ProResProfile } from '@remotion/renderer';
3
2
  import type { AwsRegion } from '../pricing/aws-regions';
4
3
  import type { OutNameInput, Privacy } from '../shared/constants';
5
4
  import type { DownloadBehavior } from '../shared/content-disposition-header';
@@ -1,5 +1,4 @@
1
- import type { LogLevel, StillImageFormat } from '@remotion/renderer';
2
- import type { ChromiumOptions } from '@remotion/renderer/src/open-browser';
1
+ import type { ChromiumOptions, LogLevel, StillImageFormat } from '@remotion/renderer';
3
2
  import type { AwsRegion } from '../pricing/aws-regions';
4
3
  import type { CostsInfo, OutNameInput, Privacy } from '../shared/constants';
5
4
  import type { DownloadBehavior } from '../shared/content-disposition-header';
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.uploadDir = exports.getDirFiles = void 0;
7
- const client_s3_1 = require("@aws-sdk/client-s3");
8
7
  const lib_storage_1 = require("@aws-sdk/lib-storage");
9
8
  const fs_1 = require("fs");
10
9
  const mime_types_1 = __importDefault(require("mime-types"));
@@ -52,7 +51,7 @@ const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, priv
52
51
  progresses[file.name] = 0;
53
52
  }
54
53
  const client = (0, aws_clients_1.getS3Client)(region, null);
55
- const uploads = files.map(async (filePath) => {
54
+ const uploads = files.map((filePath) => {
56
55
  const Key = (0, make_s3_key_1.makeS3Key)(keyPrefix, localDir, filePath.name);
57
56
  const Body = (0, fs_1.createReadStream)(filePath.name);
58
57
  const ContentType = mime_types_1.default.lookup(Key) || 'application/octet-stream';
@@ -61,33 +60,23 @@ const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, priv
61
60
  : privacy === 'private'
62
61
  ? 'private'
63
62
  : 'public-read';
64
- if (filePath.size > 5 * 1024 * 1024) {
65
- const paralellUploads3 = new lib_storage_1.Upload({
66
- client,
67
- queueSize: 4,
68
- partSize: 5 * 1024 * 1024,
69
- params: {
70
- Key,
71
- Bucket: bucket,
72
- Body,
73
- ACL,
74
- ContentType,
75
- },
76
- });
77
- paralellUploads3.on('httpUploadProgress', (progress) => {
78
- var _a;
79
- progresses[filePath.name] = (_a = progress.loaded) !== null && _a !== void 0 ? _a : 0;
80
- });
81
- return paralellUploads3.done();
82
- }
83
- await client.send(new client_s3_1.PutObjectCommand({
84
- Key,
85
- Bucket: bucket,
86
- Body,
87
- ACL,
88
- ContentType,
89
- }));
90
- progresses[filePath.name] = filePath.size;
63
+ const paralellUploads3 = new lib_storage_1.Upload({
64
+ client,
65
+ queueSize: 4,
66
+ partSize: 5 * 1024 * 1024,
67
+ params: {
68
+ Key,
69
+ Bucket: bucket,
70
+ Body,
71
+ ACL,
72
+ ContentType,
73
+ },
74
+ });
75
+ paralellUploads3.on('httpUploadProgress', (progress) => {
76
+ var _a;
77
+ progresses[filePath.name] = (_a = progress.loaded) !== null && _a !== void 0 ? _a : 0;
78
+ });
79
+ return paralellUploads3.done();
91
80
  });
92
81
  const promise = Promise.all(uploads);
93
82
  const interval = setInterval(() => {
@@ -8,6 +8,6 @@
8
8
  */
9
9
  export declare const validateWebhookSignature: ({ secret, body, signatureHeader, }: {
10
10
  secret: string;
11
- body: string;
11
+ body: unknown;
12
12
  signatureHeader: string;
13
13
  }) => void;
@@ -9,7 +9,6 @@ const makeInvokeProgress = (invokeProgress, totalSteps, retriesInfo) => {
9
9
  const { lambdasInvoked, totalLambdas } = invokeProgress;
10
10
  const progress = totalLambdas === null ? 0 : lambdasInvoked / totalLambdas;
11
11
  return [
12
- '⚡️',
13
12
  `(1/${totalSteps})`,
14
13
  cli_1.CliInternals.makeProgressBar(progress),
15
14
  `${progress === 0 ? 'Invoked' : 'Invoking'} lambdas`,
@@ -29,7 +28,6 @@ const makeRenderProgress = ({ chunkProgress, totalSteps, }) => {
29
28
  ? null
30
29
  : `(${chunkProgress.framesRendered}/${chunkProgress.totalFrames})`;
31
30
  const first = [
32
- '🧩',
33
31
  `(2/${totalSteps})`,
34
32
  cli_1.CliInternals.makeProgressBar(renderProgress),
35
33
  doneIn === null ? 'Rendering frames' : 'Rendered frames',
@@ -38,7 +36,6 @@ const makeRenderProgress = ({ chunkProgress, totalSteps, }) => {
38
36
  .filter(truthy_1.truthy)
39
37
  .join(' ');
40
38
  const second = [
41
- '🏗️ ',
42
39
  `(3/${totalSteps})`,
43
40
  cli_1.CliInternals.makeProgressBar(encodingProgress),
44
41
  `${doneIn === null ? 'Encoding' : 'Encoded'} chunks`,
@@ -57,7 +54,6 @@ const makeEncodingProgress = ({ encodingProgress, chunkProgress, totalSteps, tot
57
54
  return '';
58
55
  }
59
56
  return [
60
- '📽 ',
61
57
  `(4/${totalSteps})`,
62
58
  cli_1.CliInternals.makeProgressBar(progress),
63
59
  `${timeToEncode === null ? 'Combining' : 'Combined'} videos`,
@@ -72,7 +68,6 @@ const makeCleanupProgress = (cleanupInfo, totalSteps, skipped) => {
72
68
  }
73
69
  if (skipped) {
74
70
  return [
75
- '🪣 ',
76
71
  `(5/${totalSteps})`,
77
72
  cli_1.CliInternals.chalk.blueBright(`Not cleaning up because --log=verbose was set`),
78
73
  ].join(' ');
@@ -80,7 +75,6 @@ const makeCleanupProgress = (cleanupInfo, totalSteps, skipped) => {
80
75
  const { doneIn, filesDeleted, minFilesToDelete } = cleanupInfo;
81
76
  const progress = filesDeleted / minFilesToDelete;
82
77
  return [
83
- '🪣 ',
84
78
  `(5/${totalSteps})`,
85
79
  cli_1.CliInternals.makeProgressBar(progress),
86
80
  `${doneIn === null ? 'Cleaning up' : 'Cleaned up'} artifacts`,
@@ -91,7 +85,6 @@ const makeCleanupProgress = (cleanupInfo, totalSteps, skipped) => {
91
85
  };
92
86
  const makeDownloadProgress = (downloadInfo, totalSteps) => {
93
87
  return [
94
- '💾',
95
88
  `(6/${totalSteps})`,
96
89
  downloadInfo.totalSize === null
97
90
  ? cli_1.CliInternals.getFileSizeDownloadBar(downloadInfo.downloaded)
@@ -1,12 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.sitesCreateSubcommand = exports.SITES_CREATE_SUBCOMMAND = void 0;
7
4
  const cli_1 = require("@remotion/cli");
8
- const fs_1 = require("fs");
9
- const path_1 = __importDefault(require("path"));
10
5
  const remotion_1 = require("remotion");
11
6
  const deploy_site_1 = require("../../../api/deploy-site");
12
7
  const get_or_create_bucket_1 = require("../../../api/get-or-create-bucket");
@@ -30,15 +25,6 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
30
25
  return;
31
26
  }
32
27
  log_1.Log.verbose('Entry point:', file, 'Reason:', reason);
33
- const absoluteFile = path_1.default.join(process.cwd(), file);
34
- if (!(0, fs_1.existsSync)(absoluteFile)) {
35
- log_1.Log.error(`No file exists at ${absoluteFile}. Make sure the path exists and try again.`);
36
- (0, quit_1.quit)(1);
37
- }
38
- if ((0, fs_1.lstatSync)(absoluteFile).isDirectory()) {
39
- log_1.Log.error(`You passed a path ${absoluteFile} but it is a directory. Pass a file instead.`);
40
- (0, quit_1.quit)(1);
41
- }
42
28
  const desiredSiteName = (_a = args_1.parsedLambdaCli['site-name']) !== null && _a !== void 0 ? _a : undefined;
43
29
  if (desiredSiteName !== undefined) {
44
30
  (0, validate_site_name_1.validateSiteName)(desiredSiteName);
@@ -80,7 +66,7 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
80
66
  const bundleStart = Date.now();
81
67
  const uploadStart = Date.now();
82
68
  const { serveUrl, siteName, stats } = await (0, deploy_site_1.deploySite)({
83
- entryPoint: absoluteFile,
69
+ entryPoint: file,
84
70
  siteName: desiredSiteName,
85
71
  bucketName,
86
72
  options: {
@@ -5,7 +5,6 @@ const cli_1 = require("@remotion/cli");
5
5
  const remotion_1 = require("remotion");
6
6
  const makeBundleProgress = ({ progress, doneIn }) => {
7
7
  return [
8
- '📦',
9
8
  `(1/3)`,
10
9
  cli_1.CliInternals.makeProgressBar(progress / 100),
11
10
  `${doneIn === null ? 'Bundling' : 'Bundled'} video`,
@@ -20,7 +19,6 @@ const makeBucketProgress = ({ bucketCreated, doneIn, }) => {
20
19
  const statesFinished = states.filter(Boolean).map((p) => p).length;
21
20
  const progress = statesFinished / states.length;
22
21
  return [
23
- '🪣 ',
24
22
  `(2/3)`,
25
23
  cli_1.CliInternals.makeProgressBar(progress),
26
24
  `${doneIn === null ? 'Creating' : 'Created'} bucket`,
@@ -48,7 +46,6 @@ const makeUploadDiff = ({ stats }) => {
48
46
  const makeDeployProgressBar = ({ sizeUploaded, totalSize, doneIn, stats, }) => {
49
47
  const progress = totalSize === null ? 0 : sizeUploaded / totalSize;
50
48
  return [
51
- '☁️ ',
52
49
  `(3/3)`,
53
50
  cli_1.CliInternals.makeProgressBar(progress),
54
51
  `${doneIn === null ? 'Uploading' : 'Uploaded'} to S3`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "3.3.38",
3
+ "version": "3.3.40",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -33,17 +33,17 @@
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.38",
37
- "@remotion/cli": "3.3.38",
38
- "@remotion/renderer": "3.3.38",
36
+ "@remotion/bundler": "3.3.40",
37
+ "@remotion/cli": "3.3.40",
38
+ "@remotion/renderer": "3.3.40",
39
39
  "aws-policies": "^1.0.1",
40
40
  "mime-types": "2.1.34",
41
- "remotion": "3.3.38"
41
+ "remotion": "3.3.40"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@jonny/eslint-config": "3.0.266",
45
- "@remotion/compositor-linux-arm64-musl": "3.3.38",
46
- "@remotion/compositor-linux-x64-musl": "3.3.38",
45
+ "@remotion/compositor-linux-arm64-musl": "3.3.40",
46
+ "@remotion/compositor-linux-x64-musl": "3.3.40",
47
47
  "@types/mime-types": "2.1.1",
48
48
  "@types/minimist": "1.2.2",
49
49
  "@types/node": "^14.14.14",
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "ac58695e452e58deb5c010f09bcc94d036930e6c"
62
+ "gitHead": "be5f606a81761f7f8e1e191ebabd5f8d225d8c09"
63
63
  }
Binary file
Binary file