@remotion/lambda 3.3.101 → 3.3.102

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,6 +4,6 @@ export declare type BucketWithLocation = {
4
4
  creationDate: number;
5
5
  region: AwsRegion;
6
6
  };
7
- export declare const getRemotionS3Buckets: (region: AwsRegion) => Promise<{
7
+ export declare const getRemotionS3Buckets: (region: AwsRegion, forceBucketName?: string) => Promise<{
8
8
  remotionBuckets: BucketWithLocation[];
9
9
  }>;
@@ -2,15 +2,21 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRemotionS3Buckets = void 0;
4
4
  const client_s3_1 = require("@aws-sdk/client-s3");
5
+ const defaults_1 = require("../defaults");
5
6
  const aws_clients_1 = require("../shared/aws-clients");
6
- const constants_1 = require("../shared/constants");
7
7
  const validate_bucketname_1 = require("../shared/validate-bucketname");
8
- const getRemotionS3Buckets = async (region) => {
8
+ const getRemotionS3Buckets = async (region, forceBucketName) => {
9
9
  const { Buckets } = await (0, aws_clients_1.getS3Client)(region, null).send(new client_s3_1.ListBucketsCommand({}));
10
10
  if (!Buckets) {
11
11
  return { remotionBuckets: [] };
12
12
  }
13
- const remotionBuckets = Buckets.filter((b) => { var _a; return (_a = b.Name) === null || _a === void 0 ? void 0 : _a.startsWith(constants_1.REMOTION_BUCKET_PREFIX); });
13
+ const remotionBuckets = Buckets.filter((b) => {
14
+ var _a;
15
+ if (forceBucketName) {
16
+ return b.Name === forceBucketName;
17
+ }
18
+ return (_a = b.Name) === null || _a === void 0 ? void 0 : _a.startsWith(defaults_1.REMOTION_BUCKET_PREFIX);
19
+ });
14
20
  const locations = await Promise.all(remotionBuckets.map(async (bucket) => {
15
21
  var _a, _b;
16
22
  const { region: parsedRegion } = (0, validate_bucketname_1.parseBucketName)(bucket.Name);
@@ -9,6 +9,7 @@ declare type Site = {
9
9
  };
10
10
  export declare type GetSitesInput = {
11
11
  region: AwsRegion;
12
+ forceBucketName?: string;
12
13
  };
13
14
  export declare type GetSitesOutput = {
14
15
  sites: Site[];
@@ -20,5 +21,5 @@ export declare type GetSitesOutput = {
20
21
  * @param {AwsRegion} params.region The AWS region that you want to query for.
21
22
  * @returns {Promise<GetSitesOutput>} A Promise containing an object with `sites` and `bucket` keys. Consult documentation for details.
22
23
  */
23
- export declare const getSites: ({ region, }: GetSitesInput) => Promise<GetSitesOutput>;
24
+ export declare const getSites: ({ region, forceBucketName, }: GetSitesInput) => Promise<GetSitesOutput>;
24
25
  export {};
@@ -12,9 +12,11 @@ const get_buckets_1 = require("./get-buckets");
12
12
  * @param {AwsRegion} params.region The AWS region that you want to query for.
13
13
  * @returns {Promise<GetSitesOutput>} A Promise containing an object with `sites` and `bucket` keys. Consult documentation for details.
14
14
  */
15
- const getSites = async ({ region, }) => {
15
+ const getSites = async ({ region, forceBucketName, }) => {
16
16
  var _a;
17
- const { remotionBuckets } = await (0, get_buckets_1.getRemotionS3Buckets)(region);
17
+ const { remotionBuckets } = forceBucketName
18
+ ? await (0, get_buckets_1.getRemotionS3Buckets)(region, forceBucketName)
19
+ : await (0, get_buckets_1.getRemotionS3Buckets)(region);
18
20
  const accountId = await (0, get_account_id_1.getAccountId)({ region });
19
21
  const sites = {};
20
22
  for (const bucket of remotionBuckets) {
@@ -88,6 +88,7 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
88
88
  },
89
89
  enableCaching: cli_1.ConfigInternals.getWebpackCaching(),
90
90
  webpackOverride: (_c = cli_1.ConfigInternals.getWebpackOverrideFn()) !== null && _c !== void 0 ? _c : ((f) => f),
91
+ bypassBucketNameValidation: Boolean(args_1.parsedLambdaCli['force-bucket-name']),
91
92
  },
92
93
  region: (0, get_aws_region_1.getAwsRegion)(),
93
94
  privacy: args_1.parsedLambdaCli.privacy,
@@ -24,9 +24,10 @@ const sitesRmSubcommand = async (args) => {
24
24
  const region = (0, get_aws_region_1.getAwsRegion)();
25
25
  const deployedSites = await (0, get_sites_1.getSites)({
26
26
  region,
27
+ forceBucketName: args_1.parsedLambdaCli['force-bucket-name'],
27
28
  });
29
+ const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.getOrCreateBucket)({ region })).bucketName;
28
30
  for (const siteName of args) {
29
- const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.getOrCreateBucket)({ region })).bucketName;
30
31
  const site = deployedSites.sites.find((s) => s.id === siteName.trim());
31
32
  if (!site) {
32
33
  log_1.Log.error(`No site ${siteName.trim()} was found in your bucket ${bucketName}.`);
@@ -3,8 +3,5 @@ export declare const planFrameRanges: ({ framesPerLambda, frameRange, everyNthFr
3
3
  frameRange: [number, number];
4
4
  everyNthFrame: number;
5
5
  }) => {
6
- chunks: [
7
- number,
8
- number
9
- ][];
6
+ chunks: [number, number][];
10
7
  };
package/dist/index.d.ts CHANGED
@@ -56,6 +56,6 @@ declare const presignUrl: <CheckIfObjectExists extends boolean = false>({ region
56
56
  /**
57
57
  * @deprecated Import this from `@remotion/lambda/client` instead
58
58
  */
59
- declare const getSites: ({ region, }: GetSitesInput) => Promise<GetSitesOutput>;
59
+ declare const getSites: ({ region, forceBucketName, }: GetSitesInput) => Promise<GetSitesOutput>;
60
60
  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, };
61
61
  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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "3.3.101",
3
+ "version": "3.3.102",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -23,18 +23,18 @@
23
23
  "@aws-sdk/credential-providers": "3.338.0",
24
24
  "@aws-sdk/lib-storage": "3.338.0",
25
25
  "@aws-sdk/s3-request-presigner": "3.338.0",
26
- "@remotion/bundler": "3.3.101",
27
- "@remotion/cli": "3.3.101",
28
- "@remotion/renderer": "3.3.101",
26
+ "@remotion/bundler": "3.3.102",
27
+ "@remotion/cli": "3.3.102",
28
+ "@remotion/renderer": "3.3.102",
29
29
  "aws-policies": "^1.0.1",
30
30
  "mime-types": "2.1.34",
31
- "remotion": "3.3.101"
31
+ "remotion": "3.3.102"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@jonny/eslint-config": "3.0.266",
35
- "@remotion/bundler": "3.3.101",
36
- "@remotion/compositor-linux-arm64-musl": "3.3.101",
37
- "@remotion/compositor-linux-x64-musl": "3.3.101",
35
+ "@remotion/bundler": "3.3.102",
36
+ "@remotion/compositor-linux-arm64-musl": "3.3.102",
37
+ "@remotion/compositor-linux-x64-musl": "3.3.102",
38
38
  "@types/mime-types": "2.1.1",
39
39
  "@types/minimist": "1.2.2",
40
40
  "@types/node": "^14.14.14",
@@ -48,7 +48,7 @@
48
48
  "zip-lib": "^0.7.2"
49
49
  },
50
50
  "peerDependencies": {
51
- "@remotion/bundler": "3.3.101"
51
+ "@remotion/bundler": "3.3.102"
52
52
  },
53
53
  "publishConfig": {
54
54
  "access": "public"
Binary file
Binary file