@everystack/cli 0.2.24 → 0.2.25
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.
- package/package.json +1 -1
- package/src/cli/discover.ts +7 -2
package/package.json
CHANGED
package/src/cli/discover.ts
CHANGED
|
@@ -226,7 +226,9 @@ export async function discoverBuckets(
|
|
|
226
226
|
|
|
227
227
|
const updatesNeedle = `${prefix}updatesbucket-`.toLowerCase();
|
|
228
228
|
const clientNeedle = `${prefix}clientbundlesbucket-`.toLowerCase();
|
|
229
|
-
|
|
229
|
+
// Media bucket resource is named 'Media' (not 'MediaBucket'), so match both patterns
|
|
230
|
+
const mediaNeedle = `${prefix}media-`.toLowerCase();
|
|
231
|
+
const mediaBucketNeedle = `${prefix}mediabucket-`.toLowerCase();
|
|
230
232
|
|
|
231
233
|
let updatesBucket: string | undefined;
|
|
232
234
|
let clientBundlesBucket: string | undefined;
|
|
@@ -237,7 +239,7 @@ export async function discoverBuckets(
|
|
|
237
239
|
const lower = b.Name.toLowerCase();
|
|
238
240
|
if (lower.startsWith(updatesNeedle)) updatesBucket = b.Name;
|
|
239
241
|
if (lower.startsWith(clientNeedle)) clientBundlesBucket = b.Name;
|
|
240
|
-
if (lower.startsWith(mediaNeedle)) mediaBucket = b.Name;
|
|
242
|
+
if (!mediaBucket && (lower.startsWith(mediaNeedle) || lower.startsWith(mediaBucketNeedle))) mediaBucket = b.Name;
|
|
241
243
|
if (updatesBucket && clientBundlesBucket && mediaBucket) break;
|
|
242
244
|
}
|
|
243
245
|
|
|
@@ -320,6 +322,7 @@ interface CachedOutputs {
|
|
|
320
322
|
workerFunctionName?: string;
|
|
321
323
|
updatesBucket?: string;
|
|
322
324
|
clientBundlesBucket?: string;
|
|
325
|
+
mediaBucket?: string;
|
|
323
326
|
kvsArn?: string;
|
|
324
327
|
distributionId?: string;
|
|
325
328
|
}
|
|
@@ -344,6 +347,7 @@ export async function getCachedConfig(stage: string): Promise<DiscoveredConfig |
|
|
|
344
347
|
workerFunctionName: cached.workerFunctionName,
|
|
345
348
|
updatesBucket: cached.updatesBucket,
|
|
346
349
|
clientBundlesBucket: cached.clientBundlesBucket,
|
|
350
|
+
mediaBucket: cached.mediaBucket,
|
|
347
351
|
kvsArn: cached.kvsArn,
|
|
348
352
|
distributionId: cached.distributionId,
|
|
349
353
|
};
|
|
@@ -361,6 +365,7 @@ export async function setCachedConfig(stage: string, config: DiscoveredConfig):
|
|
|
361
365
|
workerFunctionName: config.workerFunctionName,
|
|
362
366
|
updatesBucket: config.updatesBucket,
|
|
363
367
|
clientBundlesBucket: config.clientBundlesBucket,
|
|
368
|
+
mediaBucket: config.mediaBucket,
|
|
364
369
|
kvsArn: config.kvsArn,
|
|
365
370
|
distributionId: config.distributionId,
|
|
366
371
|
};
|