@stacksjs/ts-cloud 0.7.65 → 0.7.67

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.
Files changed (59) hide show
  1. package/dist/aws/index.js +1 -1
  2. package/dist/bin/cli.js +257 -257
  3. package/dist/{chunk-gcsv7g83.js → chunk-ef2dwfrg.js} +3 -3
  4. package/dist/{chunk-001z7khv.js → chunk-gttvakpv.js} +12 -6
  5. package/dist/{chunk-267f6qd0.js → chunk-n59was4s.js} +2 -2
  6. package/dist/{chunk-z3bakpnh.js → chunk-s9c2x5jv.js} +2 -2
  7. package/dist/{chunk-0z7ry8fm.js → chunk-xawdhj7z.js} +13 -10
  8. package/dist/deploy/index.js +4 -4
  9. package/dist/deploy/management-dashboard.d.ts +0 -5
  10. package/dist/dns/index.js +1 -1
  11. package/dist/drivers/index.js +1 -1
  12. package/dist/index.js +4 -4
  13. package/dist/ui/access-denied.html +2 -2
  14. package/dist/ui/account/automation.html +3 -3
  15. package/dist/ui/account/security.html +2 -2
  16. package/dist/ui/applications/compose.html +4 -4
  17. package/dist/ui/applications/new.html +2 -2
  18. package/dist/ui/data/backups.html +4 -4
  19. package/dist/ui/data/services.html +4 -4
  20. package/dist/ui/data/volumes.html +4 -4
  21. package/dist/ui/index.html +4 -4
  22. package/dist/ui/operations/alerts.html +4 -4
  23. package/dist/ui/operations/configuration.html +4 -4
  24. package/dist/ui/operations/jobs.html +4 -4
  25. package/dist/ui/operations/maintenance.html +4 -4
  26. package/dist/ui/operations/observability.html +4 -4
  27. package/dist/ui/operations/previews.html +3 -3
  28. package/dist/ui/operations/queue.html +4 -4
  29. package/dist/ui/operations/regions.html +3 -3
  30. package/dist/ui/operations/releases.html +3 -3
  31. package/dist/ui/operations/workloads.html +4 -4
  32. package/dist/ui/security.html +2 -2
  33. package/dist/ui/server/actions.html +4 -4
  34. package/dist/ui/server/capacity.html +4 -4
  35. package/dist/ui/server/database.html +4 -4
  36. package/dist/ui/server/deployments.html +4 -4
  37. package/dist/ui/server/diagnostics.html +2 -2
  38. package/dist/ui/server/firewall.html +4 -4
  39. package/dist/ui/server/fleet.html +4 -4
  40. package/dist/ui/server/logs.html +4 -4
  41. package/dist/ui/server/metrics.html +4 -4
  42. package/dist/ui/server/services.html +2 -2
  43. package/dist/ui/server/sites.html +4 -4
  44. package/dist/ui/server/ssh-keys.html +4 -4
  45. package/dist/ui/server/team.html +4 -4
  46. package/dist/ui/server/terminal.html +2 -2
  47. package/dist/ui/serverless/alarms.html +4 -4
  48. package/dist/ui/serverless/assets.html +2 -2
  49. package/dist/ui/serverless/cost.html +2 -2
  50. package/dist/ui/serverless/data.html +4 -4
  51. package/dist/ui/serverless/firewall.html +2 -2
  52. package/dist/ui/serverless/functions.html +4 -4
  53. package/dist/ui/serverless/logs.html +4 -4
  54. package/dist/ui/serverless/metrics.html +2 -2
  55. package/dist/ui/serverless/queues.html +3 -3
  56. package/dist/ui/serverless/secrets.html +4 -4
  57. package/dist/ui/serverless/traces.html +4 -4
  58. package/dist/ui/serverless.html +4 -4
  59. package/package.json +3 -3
@@ -7,7 +7,7 @@ import {
7
7
  Route53Provider,
8
8
  UnifiedDnsValidator,
9
9
  createDnsProvider
10
- } from "./chunk-001z7khv.js";
10
+ } from "./chunk-gttvakpv.js";
11
11
  import {
12
12
  CloudFormationClient
13
13
  } from "./chunk-4cjrg98a.js";
@@ -815,7 +815,7 @@ async function deployStaticSiteWithExternalDnsFull(config) {
815
815
  }
816
816
  }
817
817
  onProgress?.("upload", "Uploading files to S3...");
818
- const { uploadStaticFiles } = await import("./chunk-z3bakpnh.js");
818
+ const { uploadStaticFiles } = await import("./chunk-s9c2x5jv.js");
819
819
  const uploadResult = await uploadStaticFiles({
820
820
  sourceDir,
821
821
  bucket: infraResult.bucket,
@@ -835,7 +835,7 @@ async function deployStaticSiteWithExternalDnsFull(config) {
835
835
  }
836
836
  if (infraResult.distributionId && uploadResult.uploaded > 0) {
837
837
  onProgress?.("invalidate", "Invalidating CloudFront cache...");
838
- const { invalidateCache } = await import("./chunk-z3bakpnh.js");
838
+ const { invalidateCache } = await import("./chunk-s9c2x5jv.js");
839
839
  await invalidateCache(infraResult.distributionId);
840
840
  }
841
841
  onProgress?.("complete", "Deployment complete!");
@@ -869,8 +869,14 @@ class Route53Provider {
869
869
  }
870
870
  return null;
871
871
  }
872
- normalizeName(name) {
873
- return name.endsWith(".") ? name : `${name}.`;
872
+ normalizeName(domain, name) {
873
+ const zone = domain.replace(/\.$/, "");
874
+ const record = name.replace(/\.$/, "");
875
+ if (!record || record === "@")
876
+ return `${zone}.`;
877
+ if (record === zone || record.endsWith(`.${zone}`))
878
+ return `${record}.`;
879
+ return `${record}.${zone}.`;
874
880
  }
875
881
  async createRecord(domain, record) {
876
882
  try {
@@ -881,7 +887,7 @@ class Route53Provider {
881
887
  message: `No hosted zone found for domain: ${domain}`
882
888
  };
883
889
  }
884
- const recordName = this.normalizeName(record.name);
890
+ const recordName = this.normalizeName(domain, record.name);
885
891
  let recordValue = record.content;
886
892
  if (record.type === "TXT" && !recordValue.startsWith('"')) {
887
893
  recordValue = `"${recordValue}"`;
@@ -927,7 +933,7 @@ class Route53Provider {
927
933
  message: `No hosted zone found for domain: ${domain}`
928
934
  };
929
935
  }
930
- const recordName = this.normalizeName(record.name);
936
+ const recordName = this.normalizeName(domain, record.name);
931
937
  let recordValue = record.content;
932
938
  if (record.type === "TXT" && !recordValue.startsWith('"')) {
933
939
  recordValue = `"${recordValue}"`;
@@ -973,7 +979,7 @@ class Route53Provider {
973
979
  message: `No hosted zone found for domain: ${domain}`
974
980
  };
975
981
  }
976
- const recordName = this.normalizeName(record.name);
982
+ const recordName = this.normalizeName(domain, record.name);
977
983
  let recordValue = record.content;
978
984
  if (record.type === "TXT" && !recordValue.startsWith('"')) {
979
985
  recordValue = `"${recordValue}"`;
@@ -1091,7 +1097,7 @@ class Route53Provider {
1091
1097
  }
1092
1098
  const result = await this.client.createAliasRecord({
1093
1099
  HostedZoneId: hostedZoneId,
1094
- Name: this.normalizeName(params.name),
1100
+ Name: this.normalizeName(params.domain, params.name),
1095
1101
  TargetHostedZoneId: params.targetHostedZoneId,
1096
1102
  TargetDNSName: params.targetDnsName,
1097
1103
  EvaluateTargetHealth: params.evaluateTargetHealth,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  deployStaticSiteWithExternalDnsFull
3
- } from "./chunk-gcsv7g83.js";
3
+ } from "./chunk-ef2dwfrg.js";
4
4
  import {
5
5
  box,
6
6
  error,
@@ -45,7 +45,7 @@ import {
45
45
  resolveSiteKind,
46
46
  resolveUiSource,
47
47
  siteInstallBase
48
- } from "./chunk-0z7ry8fm.js";
48
+ } from "./chunk-xawdhj7z.js";
49
49
  import {
50
50
  artifactKey,
51
51
  buildCloudFormationTemplate,
@@ -5,9 +5,9 @@ import {
5
5
  generateStaticSiteTemplate,
6
6
  invalidateCache,
7
7
  uploadStaticFiles
8
- } from "./chunk-gcsv7g83.js";
8
+ } from "./chunk-ef2dwfrg.js";
9
9
  import"./chunk-01d86gt1.js";
10
- import"./chunk-001z7khv.js";
10
+ import"./chunk-gttvakpv.js";
11
11
  import"./chunk-4cjrg98a.js";
12
12
  import"./chunk-32e7ya18.js";
13
13
  import"./chunk-wj3s95p9.js";
@@ -4925,10 +4925,7 @@ function truthy(v) {
4925
4925
  function liveStageDir() {
4926
4926
  return statePath("dashboard-release");
4927
4927
  }
4928
- function resolveDashboardVersion() {
4929
- const explicit = process.env.TS_CLOUD_UI_VERSION?.trim();
4930
- if (explicit)
4931
- return explicit;
4928
+ function resolvePackagedDashboardVersion() {
4932
4929
  const here = dirname(fileURLToPath(import.meta.url));
4933
4930
  for (const candidate of [join5(here, "..", "..", "package.json"), join5(here, "..", "package.json")]) {
4934
4931
  try {
@@ -4939,6 +4936,10 @@ function resolveDashboardVersion() {
4939
4936
  }
4940
4937
  return "latest";
4941
4938
  }
4939
+ function resolveDashboardVersion() {
4940
+ const explicit = process.env.TS_CLOUD_UI_VERSION?.trim();
4941
+ return explicit || resolvePackagedDashboardVersion();
4942
+ }
4942
4943
  function stageLiveDashboardRoot(config, cwd, logger) {
4943
4944
  if (!config?.project?.slug) {
4944
4945
  logger.warn("Management dashboard: the cloud config has no project slug — skipping the live dashboard.");
@@ -4953,13 +4954,15 @@ function stageLiveDashboardRoot(config, cwd, logger) {
4953
4954
  const requested = dependency.slice("file:".length);
4954
4955
  const source = isAbsolute(requested) ? requested : resolve(cwd, requested);
4955
4956
  if (!existsSync2(source) || !statSync(source).isFile()) {
4956
- throw new Error(`TS_CLOUD_UI_VERSION points to a missing package file: ${source}`);
4957
+ dependency = resolvePackagedDashboardVersion();
4958
+ logger.warn(`Management dashboard: TS_CLOUD_UI_VERSION points to a missing package file (${source}); using the deploying ts-cloud version ${dependency} instead.`);
4959
+ } else {
4960
+ const name = basename(source);
4961
+ const destination = join5(stage, name);
4962
+ if (source !== destination)
4963
+ copyFileSync(source, destination);
4964
+ dependency = `file:./${name}`;
4957
4965
  }
4958
- const name = basename(source);
4959
- const destination = join5(stage, name);
4960
- if (source !== destination)
4961
- copyFileSync(source, destination);
4962
- dependency = `file:./${name}`;
4963
4966
  }
4964
4967
  const pkg = {
4965
4968
  name: "ts-cloud-dashboard",
@@ -32,7 +32,7 @@ import {
32
32
  synchronizeDashboardUsers,
33
33
  trackDashboardOperation,
34
34
  verifyStaticApiOrigin
35
- } from "../chunk-267f6qd0.js";
35
+ } from "../chunk-n59was4s.js";
36
36
  import {
37
37
  deleteStaticSite,
38
38
  deployStaticSite,
@@ -43,7 +43,7 @@ import {
43
43
  generateStaticSiteTemplate,
44
44
  invalidateCache,
45
45
  uploadStaticFiles
46
- } from "../chunk-gcsv7g83.js";
46
+ } from "../chunk-ef2dwfrg.js";
47
47
  import {
48
48
  buildAndPushServerlessImage
49
49
  } from "../chunk-28vh1h91.js";
@@ -51,7 +51,7 @@ import"../chunk-ybcz6sxc.js";
51
51
  import"../chunk-01d86gt1.js";
52
52
  import"../chunk-50jpda9q.js";
53
53
  import"../chunk-he9a874b.js";
54
- import"../chunk-001z7khv.js";
54
+ import"../chunk-gttvakpv.js";
55
55
  import {
56
56
  MANAGEMENT_DASHBOARD_SITE,
57
57
  buildManagementDashboardArtifact,
@@ -65,7 +65,7 @@ import {
65
65
  shipsARelease,
66
66
  siteInstallBase,
67
67
  validateDeploymentConfig
68
- } from "../chunk-0z7ry8fm.js";
68
+ } from "../chunk-xawdhj7z.js";
69
69
  import"../chunk-ecsyc3p0.js";
70
70
  import"../chunk-703nkybg.js";
71
71
  import"../chunk-4cjrg98a.js";
@@ -65,11 +65,6 @@ export interface EnsureDashboardLogger {
65
65
  }
66
66
  /** Where the live dashboard's release is staged, inside the project checkout. */
67
67
  export declare function liveStageDir(): string;
68
- /**
69
- * The ts-cloud version the box should install. Reads this package's own version
70
- * so a box runs a dashboard matching the CLI that deployed it, rather than
71
- * drifting to whatever `latest` happens to be mid-deploy.
72
- */
73
68
  export declare function resolveDashboardVersion(): string;
74
69
  /**
75
70
  * Stage the live dashboard's release: the RESOLVED cloud config inlined as a
package/dist/dns/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  createRoute53Validator,
12
12
  detectDnsProvider,
13
13
  dnsProviders
14
- } from "../chunk-001z7khv.js";
14
+ } from "../chunk-gttvakpv.js";
15
15
  import"../chunk-32e7ya18.js";
16
16
  import"../chunk-zqtpg06c.js";
17
17
  import"../chunk-v0bahtg2.js";
@@ -68,7 +68,7 @@ import {
68
68
  waitForSsh,
69
69
  wrapCloudInitUserData,
70
70
  writeResizeCheckpoint
71
- } from "../chunk-0z7ry8fm.js";
71
+ } from "../chunk-xawdhj7z.js";
72
72
  import"../chunk-ecsyc3p0.js";
73
73
  import"../chunk-703nkybg.js";
74
74
  import"../chunk-4cjrg98a.js";
package/dist/index.js CHANGED
@@ -285,7 +285,7 @@ import {
285
285
  volumeCapabilities,
286
286
  webhookEndpoint,
287
287
  zeroCapacity
288
- } from "./chunk-267f6qd0.js";
288
+ } from "./chunk-n59was4s.js";
289
289
  import {
290
290
  deleteStaticSite,
291
291
  deployStaticSite,
@@ -296,7 +296,7 @@ import {
296
296
  generateStaticSiteTemplate,
297
297
  invalidateCache,
298
298
  uploadStaticFiles
299
- } from "./chunk-gcsv7g83.js";
299
+ } from "./chunk-ef2dwfrg.js";
300
300
  import {
301
301
  buildAndPushServerlessImage
302
302
  } from "./chunk-28vh1h91.js";
@@ -361,7 +361,7 @@ import {
361
361
  createRoute53Validator,
362
362
  detectDnsProvider,
363
363
  dnsProviders
364
- } from "./chunk-001z7khv.js";
364
+ } from "./chunk-gttvakpv.js";
365
365
  import {
366
366
  AwsDriver,
367
367
  CloudDriverFactory,
@@ -398,7 +398,7 @@ import {
398
398
  waitForCloudInit,
399
399
  waitForSsh,
400
400
  wrapCloudInitUserData
401
- } from "./chunk-0z7ry8fm.js";
401
+ } from "./chunk-xawdhj7z.js";
402
402
  import {
403
403
  ABTestManager,
404
404
  AI,