effortless-aws 0.16.0 → 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,11 +72367,15 @@ 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,
72373
72375
  OriginProtocolPolicy: "https-only",
72374
- OriginSslProtocols: { Quantity: 1, Items: ["TLSv1.2"] }
72376
+ OriginSslProtocols: { Quantity: 1, Items: ["TLSv1.2"] },
72377
+ OriginReadTimeout: 30,
72378
+ OriginKeepaliveTimeout: 5
72375
72379
  },
72376
72380
  CustomHeaders: { Quantity: 0, Items: [] }
72377
72381
  }] : []
@@ -72390,8 +72394,12 @@ var ensureDistribution = (input) => Effect_exports.gen(function* () {
72390
72394
  CachedMethods: { Quantity: 2, Items: [...CACHED_METHODS] }
72391
72395
  },
72392
72396
  Compress: true,
72397
+ SmoothStreaming: false,
72393
72398
  CachePolicyId: CACHING_DISABLED_POLICY_ID,
72394
- 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: ""
72395
72403
  }))
72396
72404
  } : { Quantity: 0, Items: [] };
72397
72405
  const { errorPagePath } = input;
@@ -74416,7 +74424,7 @@ var deployProject = (input) => Effect_exports.gen(function* () {
74416
74424
  const totalHttpHandlers = httpHandlers.reduce((acc, h) => acc + h.exports.length, 0);
74417
74425
  const totalTableHandlers = tableHandlers.reduce((acc, h) => acc + h.exports.length, 0);
74418
74426
  const totalAppHandlers = appHandlers.reduce((acc, h) => acc + h.exports.length, 0);
74419
- 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);
74420
74428
  const totalFifoQueueHandlers = fifoQueueHandlers.reduce((acc, h) => acc + h.exports.length, 0);
74421
74429
  const totalBucketHandlers = bucketHandlers.reduce((acc, h) => acc + h.exports.length, 0);
74422
74430
  const totalMailerHandlers = mailerHandlers.reduce((acc, h) => acc + h.exports.length, 0);
@@ -74466,7 +74474,7 @@ var deployProject = (input) => Effect_exports.gen(function* () {
74466
74474
  }
74467
74475
  let apiId;
74468
74476
  let apiUrl;
74469
- const staticSitesNeedApi = staticSiteHandlers.some(
74477
+ const staticSitesNeedApi = !input.noSites && staticSiteHandlers.some(
74470
74478
  ({ exports }) => exports.some((fn2) => fn2.routePatterns.length > 0)
74471
74479
  );
74472
74480
  if (totalHttpHandlers > 0 || totalAppHandlers > 0 || staticSitesNeedApi) {
@@ -74499,8 +74507,10 @@ var deployProject = (input) => Effect_exports.gen(function* () {
74499
74507
  for (const fn2 of exports) manifest.push({ name: fn2.exportName, type: "table" });
74500
74508
  for (const { exports } of appHandlers)
74501
74509
  for (const fn2 of exports) manifest.push({ name: fn2.exportName, type: "app" });
74502
- for (const { exports } of staticSiteHandlers)
74503
- 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
+ }
74504
74514
  for (const { exports } of fifoQueueHandlers)
74505
74515
  for (const fn2 of exports) manifest.push({ name: fn2.exportName, type: "queue" });
74506
74516
  for (const { exports } of bucketHandlers)
@@ -74530,13 +74540,13 @@ var deployProject = (input) => Effect_exports.gen(function* () {
74530
74540
  ...apiId ? buildHttpTasks(ctx, httpHandlers, apiId, httpResults) : [],
74531
74541
  ...buildTableTasks(ctx, tableHandlers, tableResults),
74532
74542
  ...apiId ? buildAppTasks(ctx, appHandlers, apiId, appResults) : [],
74533
- ...buildStaticSiteTasks(ctx, staticSiteHandlers, staticSiteResults, apiId),
74543
+ ...input.noSites ? [] : buildStaticSiteTasks(ctx, staticSiteHandlers, staticSiteResults, apiId),
74534
74544
  ...buildFifoQueueTasks(ctx, fifoQueueHandlers, fifoQueueResults),
74535
74545
  ...buildBucketTasks(ctx, bucketHandlers, bucketResults),
74536
74546
  ...buildMailerTasks(ctx, mailerHandlers, mailerResults)
74537
74547
  ];
74538
74548
  yield* Effect_exports.all(tasks, { concurrency: DEPLOY_CONCURRENCY, discard: true });
74539
- if (staticSiteResults.length > 0) {
74549
+ if (!input.noSites && staticSiteResults.length > 0) {
74540
74550
  yield* cleanupOrphanedFunctions(input.project, stage).pipe(
74541
74551
  Effect_exports.provide(clients_exports.makeClients({
74542
74552
  cloudfront: { region: "us-east-1" },
@@ -74631,6 +74641,9 @@ var outputOption = Options_exports.text("output").pipe(
74631
74641
  Options_exports.withDescription("Output directory"),
74632
74642
  Options_exports.withDefault(".effortless")
74633
74643
  );
74644
+ var noSitesOption = Options_exports.boolean("no-sites").pipe(
74645
+ Options_exports.withDescription("Skip static site deployments")
74646
+ );
74634
74647
  var dryRunOption = Options_exports.boolean("dry-run").pipe(
74635
74648
  Options_exports.withDescription("Show what would be deleted without deleting")
74636
74649
  );
@@ -74659,8 +74672,8 @@ var isFilePath = (target) => {
74659
74672
  };
74660
74673
  var deployCommand = Command_exports.make(
74661
74674
  "deploy",
74662
- { target: deployTargetArg, project: projectOption, stage: stageOption, region: regionOption, verbose: verboseOption },
74663
- ({ 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* () {
74664
74677
  const config2 = yield* Effect_exports.promise(loadConfig);
74665
74678
  const project2 = Option_exports.getOrElse(projectOpt, () => config2?.name ?? "");
74666
74679
  const finalStage = config2?.stage ?? stage;
@@ -74693,7 +74706,8 @@ var deployCommand = Command_exports.make(
74693
74706
  patterns,
74694
74707
  project: project2,
74695
74708
  stage: finalStage,
74696
- region: finalRegion
74709
+ region: finalRegion,
74710
+ noSites
74697
74711
  });
74698
74712
  const total = results.httpResults.length + results.tableResults.length + results.appResults.length + results.staticSiteResults.length;
74699
74713
  yield* Console_exports.log(`