@remotion/lambda 4.0.84 → 4.0.86

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.
@@ -34,7 +34,6 @@ export type RenderMediaOnLambdaInput = {
34
34
  chromiumOptions?: Omit<ChromiumOptions, 'enableMultiProcessOnLinux'>;
35
35
  scale?: number;
36
36
  everyNthFrame?: number;
37
- numberOfGifLoops?: number | null;
38
37
  concurrencyPerLambda?: number;
39
38
  downloadBehavior?: DownloadBehavior | null;
40
39
  muted?: boolean;
@@ -97,7 +97,7 @@ const renderMediaOnLambda = (options) => {
97
97
  logLevel: (_s = options.logLevel) !== null && _s !== void 0 ? _s : 'info',
98
98
  maxRetries: (_t = options.maxRetries) !== null && _t !== void 0 ? _t : 1,
99
99
  muted: (_u = options.muted) !== null && _u !== void 0 ? _u : false,
100
- numberOfGifLoops: (_v = options.numberOfGifLoops) !== null && _v !== void 0 ? _v : 0,
100
+ numberOfGifLoops: (_v = options.numberOfGifLoops) !== null && _v !== void 0 ? _v : null,
101
101
  offthreadVideoCacheSizeInBytes: (_w = options.offthreadVideoCacheSizeInBytes) !== null && _w !== void 0 ? _w : null,
102
102
  outName: (_x = options.outName) !== null && _x !== void 0 ? _x : null,
103
103
  overwrite: (_y = options.overwrite) !== null && _y !== void 0 ? _y : false,
@@ -59,6 +59,6 @@ const quotasListCommand = async (logLevel) => {
59
59
  else {
60
60
  log_1.Log.info(`Burst concurrency: ${burstDefault}, but only ${effectiveBurstConcurrency} effective because of concurrency limit`);
61
61
  }
62
- log_1.Log.info(cli_1.CliInternals.chalk.gray('The maximum amount of Lambda functions that can spawn in a short amount of time'));
62
+ log_1.Log.info(cli_1.CliInternals.chalk.gray('The maximum amount of concurrency increase in 10 seconds'));
63
63
  };
64
64
  exports.quotasListCommand = quotasListCommand;
@@ -24,7 +24,6 @@ const getCredentials = () => {
24
24
  if (process.env.REMOTION_AWS_ACCESS_KEY_ID &&
25
25
  process.env.REMOTION_AWS_SECRET_ACCESS_KEY &&
26
26
  process.env.REMOTION_AWS_SESSION_TOKEN) {
27
- console.log('Using credentials from Remotion assumed role.');
28
27
  return {
29
28
  accessKeyId: process.env.REMOTION_AWS_ACCESS_KEY_ID,
30
29
  secretAccessKey: process.env.REMOTION_AWS_SECRET_ACCESS_KEY,
@@ -46,7 +45,6 @@ const getCredentials = () => {
46
45
  if (process.env.AWS_ACCESS_KEY_ID &&
47
46
  process.env.AWS_SECRET_ACCESS_KEY &&
48
47
  process.env.AWS_SESSION_TOKEN) {
49
- console.log('Using credentials from AWS STS');
50
48
  return {
51
49
  accessKeyId: process.env.AWS_ACCESS_KEY_ID,
52
50
  secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkCredentials = void 0;
4
4
  const is_cli_1 = require("../cli/is-cli");
5
5
  const docs_url_1 = require("./docs-url");
6
+ const is_likely_to_have_aws_profile_1 = require("./is-likely-to-have-aws-profile");
6
7
  const truthy_1 = require("./truthy");
7
8
  const messageForVariable = (variable) => {
8
9
  return [
@@ -20,6 +21,9 @@ const checkCredentials = () => {
20
21
  if (process.env.REMOTION_AWS_PROFILE || process.env.AWS_PROFILE) {
21
22
  return;
22
23
  }
24
+ if ((0, is_likely_to_have_aws_profile_1.isLikelyToHaveAwsProfile)()) {
25
+ return;
26
+ }
23
27
  if (!process.env.AWS_ACCESS_KEY_ID &&
24
28
  !process.env.REMOTION_AWS_ACCESS_KEY_ID) {
25
29
  throw new Error(messageForVariable('AWS_ACCESS_KEY_ID or REMOTION_AWS_ACCESS_KEY_ID'));
@@ -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';
@@ -0,0 +1 @@
1
+ export declare const isLikelyToHaveAwsProfile: () => boolean;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isLikelyToHaveAwsProfile = void 0;
4
+ const fs_1 = require("fs");
5
+ const os_1 = require("os");
6
+ const path_1 = require("path");
7
+ const homeDirCache = {};
8
+ const getHomeDirCacheKey = () => {
9
+ // geteuid is only available on POSIX platforms (i.e. not Windows or Android).
10
+ if (process && process.geteuid) {
11
+ return `${process.geteuid()}`;
12
+ }
13
+ return 'DEFAULT';
14
+ };
15
+ const getHomeDir = () => {
16
+ const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env;
17
+ if (HOME)
18
+ return HOME;
19
+ if (USERPROFILE)
20
+ return USERPROFILE;
21
+ if (HOMEPATH)
22
+ return `${HOMEDRIVE}${HOMEPATH}`;
23
+ const homeDirCacheKey = getHomeDirCacheKey();
24
+ if (!homeDirCache[homeDirCacheKey])
25
+ homeDirCache[homeDirCacheKey] = (0, os_1.homedir)();
26
+ return homeDirCache[homeDirCacheKey];
27
+ };
28
+ const ENV_CREDENTIALS_PATH = 'AWS_SHARED_CREDENTIALS_FILE';
29
+ // Logic is inline to https://github.com/smithy-lang/smithy-typescript/blob/main/packages/shared-ini-file-loader/src/getCredentialsFilepath.ts#L7
30
+ const pathOfCredentialsFile = () => {
31
+ return (process.env[ENV_CREDENTIALS_PATH] ||
32
+ (0, path_1.join)(getHomeDir(), '.aws', 'credentials'));
33
+ };
34
+ const isLikelyToHaveAwsProfile = () => {
35
+ const credentialsFile = pathOfCredentialsFile();
36
+ if (!(0, fs_1.existsSync)(credentialsFile)) {
37
+ return false;
38
+ }
39
+ const content = (0, fs_1.readFileSync)(credentialsFile, 'utf-8');
40
+ return content.includes('[default]');
41
+ };
42
+ exports.isLikelyToHaveAwsProfile = isLikelyToHaveAwsProfile;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "4.0.84",
3
+ "version": "4.0.86",
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.84",
30
- "@remotion/cli": "4.0.84",
31
- "remotion": "4.0.84",
32
- "@remotion/renderer": "4.0.84"
29
+ "@remotion/bundler": "4.0.86",
30
+ "@remotion/cli": "4.0.86",
31
+ "remotion": "4.0.86",
32
+ "@remotion/renderer": "4.0.86"
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/compositor-linux-arm64-gnu": "4.0.84",
47
- "@remotion/bundler": "4.0.84"
46
+ "@remotion/bundler": "4.0.86",
47
+ "@remotion/compositor-linux-arm64-gnu": "4.0.86"
48
48
  },
49
49
  "peerDependencies": {
50
- "@remotion/bundler": "4.0.84"
50
+ "@remotion/bundler": "4.0.86"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
Binary file