effortless-aws 0.16.1 → 0.16.2

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/dist/cli/index.js CHANGED
@@ -72239,7 +72239,7 @@ var findCertificate = (domain) => Effect_exports.gen(function* () {
72239
72239
 
72240
72240
  // src/aws/cloudfront.ts
72241
72241
  var CACHING_OPTIMIZED_POLICY_ID = "658327ea-f89d-4fab-a63d-7e88639e58f6";
72242
- var CACHING_DISABLED_POLICY_ID = "4135ea2d-bfcb-4884-b0c3-f7c1dc6e36b4";
72242
+ var CACHING_DISABLED_POLICY_ID = "4135ea2d-6df8-44a3-9df3-4b5a84be39ad";
72243
72243
  var ALL_VIEWER_EXCEPT_HOST_HEADER_POLICY_ID = "b689b0a8-53d0-40ab-baf2-68738e2966ac";
72244
72244
  var SECURITY_HEADERS_POLICY_ID = "67f7725c-6f97-4210-82d7-5512b31e9d03";
72245
72245
  var ensureOAC = (input) => Effect_exports.gen(function* () {
@@ -72367,6 +72367,8 @@ var ensureDistribution = (input) => Effect_exports.gen(function* () {
72367
72367
  Id: apiOriginId,
72368
72368
  DomainName: apiOriginDomain,
72369
72369
  OriginPath: "",
72370
+ ConnectionAttempts: 3,
72371
+ ConnectionTimeout: 10,
72370
72372
  CustomOriginConfig: {
72371
72373
  HTTPPort: 80,
72372
72374
  HTTPSPort: 443,
@@ -72392,8 +72394,12 @@ var ensureDistribution = (input) => Effect_exports.gen(function* () {
72392
72394
  CachedMethods: { Quantity: 2, Items: [...CACHED_METHODS] }
72393
72395
  },
72394
72396
  Compress: true,
72397
+ SmoothStreaming: false,
72395
72398
  CachePolicyId: CACHING_DISABLED_POLICY_ID,
72396
- OriginRequestPolicyId: ALL_VIEWER_EXCEPT_HOST_HEADER_POLICY_ID
72399
+ OriginRequestPolicyId: ALL_VIEWER_EXCEPT_HOST_HEADER_POLICY_ID,
72400
+ FunctionAssociations: { Quantity: 0, Items: [] },
72401
+ LambdaFunctionAssociations: { Quantity: 0, Items: [] },
72402
+ FieldLevelEncryptionId: ""
72397
72403
  }))
72398
72404
  } : { Quantity: 0, Items: [] };
72399
72405
  const { errorPagePath } = input;
@@ -74418,7 +74424,7 @@ var deployProject = (input) => Effect_exports.gen(function* () {
74418
74424
  const totalHttpHandlers = httpHandlers.reduce((acc, h) => acc + h.exports.length, 0);
74419
74425
  const totalTableHandlers = tableHandlers.reduce((acc, h) => acc + h.exports.length, 0);
74420
74426
  const totalAppHandlers = appHandlers.reduce((acc, h) => acc + h.exports.length, 0);
74421
- const totalStaticSiteHandlers = staticSiteHandlers.reduce((acc, h) => acc + h.exports.length, 0);
74427
+ const totalStaticSiteHandlers = input.noSites ? 0 : staticSiteHandlers.reduce((acc, h) => acc + h.exports.length, 0);
74422
74428
  const totalFifoQueueHandlers = fifoQueueHandlers.reduce((acc, h) => acc + h.exports.length, 0);
74423
74429
  const totalBucketHandlers = bucketHandlers.reduce((acc, h) => acc + h.exports.length, 0);
74424
74430
  const totalMailerHandlers = mailerHandlers.reduce((acc, h) => acc + h.exports.length, 0);
@@ -74468,7 +74474,7 @@ var deployProject = (input) => Effect_exports.gen(function* () {
74468
74474
  }
74469
74475
  let apiId;
74470
74476
  let apiUrl;
74471
- const staticSitesNeedApi = staticSiteHandlers.some(
74477
+ const staticSitesNeedApi = !input.noSites && staticSiteHandlers.some(
74472
74478
  ({ exports }) => exports.some((fn2) => fn2.routePatterns.length > 0)
74473
74479
  );
74474
74480
  if (totalHttpHandlers > 0 || totalAppHandlers > 0 || staticSitesNeedApi) {
@@ -74501,8 +74507,10 @@ var deployProject = (input) => Effect_exports.gen(function* () {
74501
74507
  for (const fn2 of exports) manifest.push({ name: fn2.exportName, type: "table" });
74502
74508
  for (const { exports } of appHandlers)
74503
74509
  for (const fn2 of exports) manifest.push({ name: fn2.exportName, type: "app" });
74504
- for (const { exports } of staticSiteHandlers)
74505
- for (const fn2 of exports) manifest.push({ name: fn2.exportName, type: "site" });
74510
+ if (!input.noSites) {
74511
+ for (const { exports } of staticSiteHandlers)
74512
+ for (const fn2 of exports) manifest.push({ name: fn2.exportName, type: "site" });
74513
+ }
74506
74514
  for (const { exports } of fifoQueueHandlers)
74507
74515
  for (const fn2 of exports) manifest.push({ name: fn2.exportName, type: "queue" });
74508
74516
  for (const { exports } of bucketHandlers)
@@ -74532,13 +74540,13 @@ var deployProject = (input) => Effect_exports.gen(function* () {
74532
74540
  ...apiId ? buildHttpTasks(ctx, httpHandlers, apiId, httpResults) : [],
74533
74541
  ...buildTableTasks(ctx, tableHandlers, tableResults),
74534
74542
  ...apiId ? buildAppTasks(ctx, appHandlers, apiId, appResults) : [],
74535
- ...buildStaticSiteTasks(ctx, staticSiteHandlers, staticSiteResults, apiId),
74543
+ ...input.noSites ? [] : buildStaticSiteTasks(ctx, staticSiteHandlers, staticSiteResults, apiId),
74536
74544
  ...buildFifoQueueTasks(ctx, fifoQueueHandlers, fifoQueueResults),
74537
74545
  ...buildBucketTasks(ctx, bucketHandlers, bucketResults),
74538
74546
  ...buildMailerTasks(ctx, mailerHandlers, mailerResults)
74539
74547
  ];
74540
74548
  yield* Effect_exports.all(tasks, { concurrency: DEPLOY_CONCURRENCY, discard: true });
74541
- if (staticSiteResults.length > 0) {
74549
+ if (!input.noSites && staticSiteResults.length > 0) {
74542
74550
  yield* cleanupOrphanedFunctions(input.project, stage).pipe(
74543
74551
  Effect_exports.provide(clients_exports.makeClients({
74544
74552
  cloudfront: { region: "us-east-1" },
@@ -74633,6 +74641,9 @@ var outputOption = Options_exports.text("output").pipe(
74633
74641
  Options_exports.withDescription("Output directory"),
74634
74642
  Options_exports.withDefault(".effortless")
74635
74643
  );
74644
+ var noSitesOption = Options_exports.boolean("no-sites").pipe(
74645
+ Options_exports.withDescription("Skip static site deployments")
74646
+ );
74636
74647
  var dryRunOption = Options_exports.boolean("dry-run").pipe(
74637
74648
  Options_exports.withDescription("Show what would be deleted without deleting")
74638
74649
  );
@@ -74661,8 +74672,8 @@ var isFilePath = (target) => {
74661
74672
  };
74662
74673
  var deployCommand = Command_exports.make(
74663
74674
  "deploy",
74664
- { target: deployTargetArg, project: projectOption, stage: stageOption, region: regionOption, verbose: verboseOption },
74665
- ({ target, project: projectOpt, stage, region, verbose }) => Effect_exports.gen(function* () {
74675
+ { target: deployTargetArg, project: projectOption, stage: stageOption, region: regionOption, verbose: verboseOption, noSites: noSitesOption },
74676
+ ({ target, project: projectOpt, stage, region, verbose, noSites }) => Effect_exports.gen(function* () {
74666
74677
  const config2 = yield* Effect_exports.promise(loadConfig);
74667
74678
  const project2 = Option_exports.getOrElse(projectOpt, () => config2?.name ?? "");
74668
74679
  const finalStage = config2?.stage ?? stage;
@@ -74695,7 +74706,8 @@ var deployCommand = Command_exports.make(
74695
74706
  patterns,
74696
74707
  project: project2,
74697
74708
  stage: finalStage,
74698
- region: finalRegion
74709
+ region: finalRegion,
74710
+ noSites
74699
74711
  });
74700
74712
  const total = results.httpResults.length + results.tableResults.length + results.appResults.length + results.staticSiteResults.length;
74701
74713
  yield* Console_exports.log(`