@stacksjs/ts-cloud 0.7.77 → 0.7.79

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 (56) hide show
  1. package/dist/bin/cli.js +4 -4
  2. package/dist/{chunk-r54226j9.js → chunk-d9w1prap.js} +1 -1
  3. package/dist/{chunk-z7djhs5g.js → chunk-swe680be.js} +10 -6
  4. package/dist/deploy/index.js +2 -2
  5. package/dist/drivers/index.js +1 -1
  6. package/dist/drivers/shared/compute-deploy.d.ts +1 -1
  7. package/dist/index.js +2 -2
  8. package/dist/ui/access-denied.html +2 -2
  9. package/dist/ui/account/automation.html +3 -3
  10. package/dist/ui/account/security.html +2 -2
  11. package/dist/ui/applications/compose.html +4 -4
  12. package/dist/ui/applications/new.html +2 -2
  13. package/dist/ui/data/backups.html +4 -4
  14. package/dist/ui/data/services.html +4 -4
  15. package/dist/ui/data/volumes.html +4 -4
  16. package/dist/ui/index.html +4 -4
  17. package/dist/ui/integrations.html +2 -2
  18. package/dist/ui/operations/alerts.html +4 -4
  19. package/dist/ui/operations/configuration.html +3 -3
  20. package/dist/ui/operations/jobs.html +4 -4
  21. package/dist/ui/operations/maintenance.html +4 -4
  22. package/dist/ui/operations/observability.html +4 -4
  23. package/dist/ui/operations/previews.html +4 -4
  24. package/dist/ui/operations/queue.html +4 -4
  25. package/dist/ui/operations/regions.html +4 -4
  26. package/dist/ui/operations/releases.html +3 -3
  27. package/dist/ui/operations/workloads.html +3 -3
  28. package/dist/ui/security.html +2 -2
  29. package/dist/ui/server/actions.html +3 -3
  30. package/dist/ui/server/activity.html +2 -2
  31. package/dist/ui/server/capacity.html +4 -4
  32. package/dist/ui/server/database.html +4 -4
  33. package/dist/ui/server/deployments.html +4 -4
  34. package/dist/ui/server/firewall.html +4 -4
  35. package/dist/ui/server/fleet.html +4 -4
  36. package/dist/ui/server/logs.html +4 -4
  37. package/dist/ui/server/metrics.html +4 -4
  38. package/dist/ui/server/security.html +2 -2
  39. package/dist/ui/server/services.html +2 -2
  40. package/dist/ui/server/sites.html +4 -4
  41. package/dist/ui/server/ssh-keys.html +3 -3
  42. package/dist/ui/server/team.html +4 -4
  43. package/dist/ui/server/terminal.html +2 -2
  44. package/dist/ui/serverless/alarms.html +4 -4
  45. package/dist/ui/serverless/assets.html +2 -2
  46. package/dist/ui/serverless/cost.html +2 -2
  47. package/dist/ui/serverless/data.html +4 -4
  48. package/dist/ui/serverless/firewall.html +2 -2
  49. package/dist/ui/serverless/functions.html +4 -4
  50. package/dist/ui/serverless/logs.html +4 -4
  51. package/dist/ui/serverless/metrics.html +2 -2
  52. package/dist/ui/serverless/queues.html +4 -4
  53. package/dist/ui/serverless/secrets.html +4 -4
  54. package/dist/ui/serverless/traces.html +4 -4
  55. package/dist/ui/serverless.html +3 -3
  56. package/package.json +3 -3
@@ -45,7 +45,7 @@ import {
45
45
  resolveSiteKind,
46
46
  resolveUiSource,
47
47
  siteInstallBase
48
- } from "./chunk-z7djhs5g.js";
48
+ } from "./chunk-swe680be.js";
49
49
  import {
50
50
  artifactKey,
51
51
  buildCloudFormationTemplate,
@@ -3154,9 +3154,6 @@ class HetznerDriver {
3154
3154
  privateIp: server.private_net?.[0]?.ip,
3155
3155
  status: server.status
3156
3156
  });
3157
- const exact = servers.filter((server) => matchesTsCloudLabels(server.labels, options.slug, options.environment, role));
3158
- if (exact.length > 0)
3159
- return exact.map(toTarget);
3160
3157
  if (role === "app" || role === "lb" || role === "services") {
3161
3158
  const state = await readDriverState(options.stackName ?? `${options.slug}-${options.environment}`);
3162
3159
  const pinnedIds = [
@@ -3173,6 +3170,9 @@ class HetznerDriver {
3173
3170
  return pinned.map(toTarget);
3174
3171
  }
3175
3172
  }
3173
+ const exact = servers.filter((server) => matchesTsCloudLabels(server.labels, options.slug, options.environment, role));
3174
+ if (exact.length > 0)
3175
+ return exact.map(toTarget);
3176
3176
  if (role === "app") {
3177
3177
  const candidates = servers.filter((server) => server.status !== "off" && server.labels?.[`${TS_CLOUD_LABEL_PREFIX}/managed-by`] === "ts-cloud" && server.labels?.[`${TS_CLOUD_LABEL_PREFIX}/environment`] === options.environment && server.labels?.[`${TS_CLOUD_LABEL_PREFIX}/role`] === "app");
3178
3178
  if (candidates.length === 1)
@@ -5755,18 +5755,22 @@ async function deploySiteRelease(driver, options, logger = noopLogger2) {
5755
5755
  function shellSingleQuote(value) {
5756
5756
  return `'${value.replaceAll("'", "'\\''")}'`;
5757
5757
  }
5758
- function buildManagementDashboardServiceReconciliationScript(slug, desiredSiteNames) {
5758
+ function buildManagementDashboardServiceReconciliationScript(slug, desiredSiteNames, serverOwner = false) {
5759
5759
  const prefix = `${slug}-dashboard-`;
5760
5760
  const desiredUnits = desiredSiteNames.map((siteName) => `${slug}-${siteName}.service`);
5761
5761
  return [
5762
5762
  "set -euo pipefail",
5763
5763
  `TS_CLOUD_DASHBOARD_PREFIX=${shellSingleQuote(prefix)}`,
5764
+ `TS_CLOUD_DASHBOARD_SERVER_OWNER=${serverOwner ? "1" : "0"}`,
5764
5765
  `TS_CLOUD_DASHBOARD_DESIRED=${shellSingleQuote(` ${desiredUnits.join(" ")} `)}`,
5765
5766
  "for TS_CLOUD_UNIT_FILE in /etc/systemd/system/*.service; do",
5766
5767
  ' [ -e "$TS_CLOUD_UNIT_FILE" ] || continue',
5767
5768
  ' TS_CLOUD_UNIT=$(basename "$TS_CLOUD_UNIT_FILE")',
5768
5769
  ' case "$TS_CLOUD_UNIT" in',
5769
- ' "$TS_CLOUD_DASHBOARD_PREFIX"*.service)',
5770
+ " *-dashboard-*.service)",
5771
+ ' if [ "$TS_CLOUD_DASHBOARD_SERVER_OWNER" != 1 ]; then',
5772
+ ' case "$TS_CLOUD_UNIT" in "$TS_CLOUD_DASHBOARD_PREFIX"*.service) ;; *) continue ;; esac',
5773
+ " fi",
5770
5774
  ' case "$TS_CLOUD_DASHBOARD_DESIRED" in',
5771
5775
  ' *" $TS_CLOUD_UNIT "*) ;;',
5772
5776
  " *)",
@@ -5790,7 +5794,7 @@ async function reconcileManagementDashboardServices(driver, options, desiredSite
5790
5794
  return true;
5791
5795
  const result = await driver.runRemoteDeploy({
5792
5796
  targets,
5793
- commands: buildManagementDashboardServiceReconciliationScript(slug, desiredSiteNames),
5797
+ commands: buildManagementDashboardServiceReconciliationScript(slug, desiredSiteNames, !config.cloud?.attachTo),
5794
5798
  comment: `ts-cloud reconcile management dashboard ${slug}`,
5795
5799
  tags: {
5796
5800
  Project: slug,
@@ -32,7 +32,7 @@ import {
32
32
  synchronizeDashboardUsers,
33
33
  trackDashboardOperation,
34
34
  verifyStaticApiOrigin
35
- } from "../chunk-r54226j9.js";
35
+ } from "../chunk-d9w1prap.js";
36
36
  import {
37
37
  deleteStaticSite,
38
38
  deployStaticSite,
@@ -65,7 +65,7 @@ import {
65
65
  shipsARelease,
66
66
  siteInstallBase,
67
67
  validateDeploymentConfig
68
- } from "../chunk-z7djhs5g.js";
68
+ } from "../chunk-swe680be.js";
69
69
  import"../chunk-1qjyqrc5.js";
70
70
  import"../chunk-703nkybg.js";
71
71
  import"../chunk-4cjrg98a.js";
@@ -68,7 +68,7 @@ import {
68
68
  waitForSsh,
69
69
  wrapCloudInitUserData,
70
70
  writeResizeCheckpoint
71
- } from "../chunk-z7djhs5g.js";
71
+ } from "../chunk-swe680be.js";
72
72
  import"../chunk-1qjyqrc5.js";
73
73
  import"../chunk-703nkybg.js";
74
74
  import"../chunk-4cjrg98a.js";
@@ -42,7 +42,7 @@ export interface DeployAllSitesOptions {
42
42
  * and can keep crash-looping on its old port. Release data and shared dashboard
43
43
  * state stay on disk for recovery.
44
44
  */
45
- export declare function buildManagementDashboardServiceReconciliationScript(slug: string, desiredSiteNames: string[]): string[];
45
+ export declare function buildManagementDashboardServiceReconciliationScript(slug: string, desiredSiteNames: string[], serverOwner?: boolean): string[];
46
46
  /**
47
47
  * Deploy every site that targets the compute server — both dynamic apps
48
48
  * (`server` + `start`, run as systemd services) and static sites (`server`
package/dist/index.js CHANGED
@@ -285,7 +285,7 @@ import {
285
285
  volumeCapabilities,
286
286
  webhookEndpoint,
287
287
  zeroCapacity
288
- } from "./chunk-r54226j9.js";
288
+ } from "./chunk-d9w1prap.js";
289
289
  import {
290
290
  deleteStaticSite,
291
291
  deployStaticSite,
@@ -398,7 +398,7 @@ import {
398
398
  waitForCloudInit,
399
399
  waitForSsh,
400
400
  wrapCloudInitUserData
401
- } from "./chunk-z7djhs5g.js";
401
+ } from "./chunk-swe680be.js";
402
402
  import {
403
403
  ABTestManager,
404
404
  AI,