🎥 Make videos programmatically with React
fix: #2421. Propagate --force-bucket-name in rm.ts and get-sites.ts
TachyonicBytesaddf4092b695
diff --git a/packages/lambda/src/api/get-buckets.ts b/packages/lambda/src/api/get-buckets.tsindex 801a505031..0970628bde 100644--- a/packages/lambda/src/api/get-buckets.ts+++ b/packages/lambda/src/api/get-buckets.ts@@ -11,7 +11,7 @@ export type BucketWithLocation = {};export const getRemotionS3Buckets = async (- region: AwsRegion+ region: AwsRegion, bucketPrefix: string = REMOTION_BUCKET_PREFIX): Promise<{remotionBuckets: BucketWithLocation[];}> => {@@ -23,7 +23,7 @@ export const getRemotionS3Buckets = async (}const remotionBuckets = Buckets.filter((b) =>- b.Name?.startsWith(REMOTION_BUCKET_PREFIX)+ b.Name?.startsWith(bucketPrefix));const locations = await Promise.all(diff --git a/packages/lambda/src/api/get-sites.ts b/packages/lambda/src/api/get-sites.tsindex c72c5ae209..608eeac194 100644--- a/packages/lambda/src/api/get-sites.ts+++ b/packages/lambda/src/api/get-sites.ts@@ -31,8 +31,8 @@ export type GetSitesOutput = {*/export const getSites = async ({region,-}: GetSitesInput): Promise<GetSitesOutput> => {- const {remotionBuckets} = await getRemotionS3Buckets(region);+}: GetSitesInput, forced: boolean): Promise<GetSitesOutput> => {+ const {remotionBuckets} = forced ? await getRemotionS3Buckets(region) : await getRemotionS3Buckets(region, "");const accountId = await getAccountId({region});const sites: {[key: string]: Site} = {};diff --git a/packages/lambda/src/cli/commands/sites/create.ts b/packages/lambda/src/cli/commands/sites/create.tsindex 79cc171314..5c0307b66a 100644--- a/packages/lambda/src/cli/commands/sites/create.ts+++ b/packages/lambda/src/cli/commands/sites/create.ts@@ -124,6 +124,7 @@ export const sitesCreateSubcommand = async (},enableCaching: ConfigInternals.getWebpackCaching(),webpackOverride: ConfigInternals.getWebpackOverrideFn() ?? ((f) => f),+ bypassBucketNameValidation: Boolean(parsedLambdaCli['force-bucket-name']),},region: getAwsRegion(),privacy: parsedLambdaCli.privacy as Exclude<Privacy, 'private'> | undefined,diff --git a/packages/lambda/src/cli/commands/sites/rm.ts b/packages/lambda/src/cli/commands/sites/rm.tsindex 9483ca796a..37211723cf 100644--- a/packages/lambda/src/cli/commands/sites/rm.ts+++ b/packages/lambda/src/cli/commands/sites/rm.ts@@ -25,7 +25,7 @@ export const sitesRmSubcommand = async (args: string[]) => {const region = getAwsRegion();const deployedSites = await getSites({region,- });+ }, Boolean(parsedLambdaCli['force-bucket-name']));for (const siteName of args) {const bucketName =