@remotion/lambda 4.0.0-alpha11 → 4.0.0-alpha13

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.
@@ -19,7 +19,8 @@ const deleteSite = async ({ bucketName, siteName, region, onAfterItemDeleted, })
19
19
  const accountId = await (0, get_account_id_1.getAccountId)({ region });
20
20
  let files = await (0, io_1.lambdaLs)({
21
21
  bucketName,
22
- prefix: (0, defaults_1.getSitesKey)(siteName),
22
+ // The `/` is important to not accidentially delete sites with the same name but containing a suffix.
23
+ prefix: `${(0, defaults_1.getSitesKey)(siteName)}/`,
23
24
  region,
24
25
  expectedBucketOwner: accountId,
25
26
  });
@@ -38,7 +39,8 @@ const deleteSite = async ({ bucketName, siteName, region, onAfterItemDeleted, })
38
39
  });
39
40
  files = await (0, io_1.lambdaLs)({
40
41
  bucketName,
41
- prefix: (0, defaults_1.getSitesKey)(siteName),
42
+ // The `/` is important to not accidentially delete sites with the same name but containing a suffix.
43
+ prefix: `${(0, defaults_1.getSitesKey)(siteName)}/`,
42
44
  region,
43
45
  expectedBucketOwner: accountId,
44
46
  });
@@ -52,7 +52,8 @@ const deploySite = async ({ bucketName, entryPoint, siteName, options, region, p
52
52
  bucketName,
53
53
  expectedBucketOwner: accountId,
54
54
  region,
55
- prefix: subFolder,
55
+ // The `/` is important to not accidentially delete sites with the same name but containing a suffix.
56
+ prefix: `${subFolder}/`,
56
57
  }),
57
58
  (0, bundle_site_1.bundleSite)({
58
59
  publicPath: `/${subFolder}/`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "4.0.0-alpha11",
3
+ "version": "4.0.0-alpha13",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -25,10 +25,10 @@
25
25
  "@aws-sdk/s3-request-presigner": "3.338.0",
26
26
  "aws-policies": "^1.0.1",
27
27
  "mime-types": "2.1.34",
28
- "@remotion/bundler": "4.0.0-alpha11",
29
- "@remotion/cli": "4.0.0-alpha11",
30
- "@remotion/renderer": "4.0.0-alpha11",
31
- "remotion": "4.0.0-alpha11"
28
+ "@remotion/bundler": "4.0.0-alpha13",
29
+ "@remotion/cli": "4.0.0-alpha13",
30
+ "remotion": "4.0.0-alpha13",
31
+ "@remotion/renderer": "4.0.0-alpha13"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@jonny/eslint-config": "3.0.266",
@@ -43,11 +43,11 @@
43
43
  "typescript": "^4.7.0",
44
44
  "vitest": "^0.24.3",
45
45
  "zip-lib": "^0.7.2",
46
- "@remotion/bundler": "4.0.0-alpha11",
47
- "@remotion/compositor-linux-arm64-gnu": "4.0.0-alpha11"
46
+ "@remotion/bundler": "4.0.0-alpha13",
47
+ "@remotion/compositor-linux-arm64-gnu": "4.0.0-alpha13"
48
48
  },
49
49
  "peerDependencies": {
50
- "@remotion/bundler": "4.0.0-alpha11"
50
+ "@remotion/bundler": "4.0.0-alpha13"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
Binary file
@@ -1,2 +0,0 @@
1
- import type { LambdaArchitecture } from '../../shared/validate-architecture';
2
- export declare const getCurrentArchitecture: () => LambdaArchitecture;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCurrentArchitecture = void 0;
4
- const is_in_lambda_1 = require("../../shared/is-in-lambda");
5
- const getCurrentArchitecture = () => {
6
- if (!(0, is_in_lambda_1.isInsideLambda)()) {
7
- throw new Error('Should not call getCurrentArchitecture() if not inside a lambda function');
8
- }
9
- return process.arch.includes('arm') ? 'arm64' : 'x86_64';
10
- };
11
- exports.getCurrentArchitecture = getCurrentArchitecture;
@@ -1,4 +0,0 @@
1
- declare const validArchitectures: readonly ["arm64", "x86_64"];
2
- export declare type LambdaArchitecture = typeof validArchitectures[number];
3
- export declare const validateArchitecture: (architecture: unknown) => void;
4
- export {};
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateArchitecture = void 0;
4
- const validArchitectures = ['arm64', 'x86_64'];
5
- const validateArchitecture = (architecture) => {
6
- if (typeof architecture !== 'string') {
7
- throw new TypeError('You must pass an architecture when deploying: One of ' +
8
- validArchitectures.join(', '));
9
- }
10
- if (!validArchitectures.find((a) => a === architecture)) {
11
- throw new TypeError(`You must pass an "architecture" when deploying a function: either "arm64" or "x86_64"`);
12
- }
13
- };
14
- exports.validateArchitecture = validateArchitecture;