@stacksjs/ts-cloud 0.7.76 → 0.7.78

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 (63) hide show
  1. package/dist/bin/cli.js +1136 -1121
  2. package/dist/{chunk-ecsyc3p0.js → chunk-1qjyqrc5.js} +3 -1
  3. package/dist/{chunk-wwv7rmmh.js → chunk-23pnrvex.js} +12 -4
  4. package/dist/{chunk-28vh1h91.js → chunk-d2aw5vyv.js} +1 -1
  5. package/dist/{chunk-0pn5yzev.js → chunk-qk1qcsrh.js} +64 -26
  6. package/dist/{chunk-zcvdzvmz.js → chunk-tq4v58zp.js} +2 -2
  7. package/dist/deploy/dashboard-data-server.d.ts +7 -0
  8. package/dist/deploy/index.js +4 -4
  9. package/dist/deploy/local-dashboard-server.d.ts +1 -0
  10. package/dist/deploy/telemetry-collection.d.ts +2 -0
  11. package/dist/drivers/index.js +2 -2
  12. package/dist/drivers/shared/compute-deploy.d.ts +1 -1
  13. package/dist/index.js +4 -4
  14. package/dist/queue/worker.d.ts +1 -0
  15. package/dist/ui/account/automation.html +3 -3
  16. package/dist/ui/account/security.html +2 -2
  17. package/dist/ui/applications/compose.html +4 -4
  18. package/dist/ui/applications/new.html +2 -2
  19. package/dist/ui/data/backups.html +4 -4
  20. package/dist/ui/data/services.html +4 -4
  21. package/dist/ui/data/volumes.html +4 -4
  22. package/dist/ui/index.html +4 -4
  23. package/dist/ui/integrations.html +2 -2
  24. package/dist/ui/operations/alerts.html +4 -4
  25. package/dist/ui/operations/configuration.html +4 -4
  26. package/dist/ui/operations/jobs.html +4 -4
  27. package/dist/ui/operations/maintenance.html +4 -4
  28. package/dist/ui/operations/observability.html +4 -4
  29. package/dist/ui/operations/previews.html +4 -4
  30. package/dist/ui/operations/queue.html +4 -4
  31. package/dist/ui/operations/regions.html +4 -4
  32. package/dist/ui/operations/releases.html +4 -4
  33. package/dist/ui/operations/workloads.html +4 -4
  34. package/dist/ui/security.html +2 -2
  35. package/dist/ui/server/actions.html +4 -4
  36. package/dist/ui/server/activity.html +2 -2
  37. package/dist/ui/server/capacity.html +4 -4
  38. package/dist/ui/server/database.html +4 -4
  39. package/dist/ui/server/deployments.html +4 -4
  40. package/dist/ui/server/diagnostics.html +2 -2
  41. package/dist/ui/server/firewall.html +3 -3
  42. package/dist/ui/server/fleet.html +4 -4
  43. package/dist/ui/server/logs.html +4 -4
  44. package/dist/ui/server/metrics.html +4 -4
  45. package/dist/ui/server/security.html +2 -2
  46. package/dist/ui/server/services.html +2 -2
  47. package/dist/ui/server/sites.html +4 -4
  48. package/dist/ui/server/ssh-keys.html +4 -4
  49. package/dist/ui/server/team.html +4 -4
  50. package/dist/ui/server/terminal.html +2 -2
  51. package/dist/ui/serverless/alarms.html +4 -4
  52. package/dist/ui/serverless/assets.html +2 -2
  53. package/dist/ui/serverless/cost.html +2 -2
  54. package/dist/ui/serverless/data.html +3 -3
  55. package/dist/ui/serverless/deployments.html +2 -2
  56. package/dist/ui/serverless/functions.html +4 -4
  57. package/dist/ui/serverless/logs.html +3 -3
  58. package/dist/ui/serverless/metrics.html +2 -2
  59. package/dist/ui/serverless/queues.html +4 -4
  60. package/dist/ui/serverless/secrets.html +4 -4
  61. package/dist/ui/serverless/traces.html +4 -4
  62. package/dist/ui/serverless.html +3 -3
  63. package/package.json +3 -3
@@ -21983,6 +21983,8 @@ function isManagementDashboardSiteName(name) {
21983
21983
  function resolveManagementDashboardSites(config, environment, opts) {
21984
21984
  if (hasManagementDashboardSite(config))
21985
21985
  return [];
21986
+ if (config.cloud?.attachTo)
21987
+ return [];
21986
21988
  const auth2 = opts.password ? { auth: { username: opts.username || "admin", password: opts.password, realm: opts.realm } } : {};
21987
21989
  const build = opts.build === false || opts.build === undefined ? {} : { build: opts.build };
21988
21990
  if (opts.live !== false) {
@@ -21998,7 +22000,7 @@ function resolveManagementDashboardSites(config, environment, opts) {
21998
22000
  start: `bun ${DASHBOARD_ENTRY} dashboard:serve --box --host 127.0.0.1 --port ${port}`,
21999
22001
  port,
22000
22002
  env: {
22001
- TS_CLOUD_DASHBOARD_TELEMETRY: config.cloud?.attachTo ? "0" : "1"
22003
+ TS_CLOUD_DASHBOARD_TELEMETRY: "1"
22002
22004
  },
22003
22005
  zeroDowntime: false,
22004
22006
  sharedPaths: [DASHBOARD_STATE_DIR],
@@ -8,7 +8,7 @@ import {
8
8
  resolveProjectStackName,
9
9
  resolveStatePath,
10
10
  statePath
11
- } from "./chunk-ecsyc3p0.js";
11
+ } from "./chunk-1qjyqrc5.js";
12
12
  import {
13
13
  EC2Client,
14
14
  SSMClient
@@ -5002,6 +5002,10 @@ function ensureManagementDashboard(config, options = {}) {
5002
5002
  logger.info("Management dashboard: skipped (TS_CLOUD_UI_DISABLE set).");
5003
5003
  return config;
5004
5004
  }
5005
+ if (config.cloud?.attachTo) {
5006
+ logger.info(`Management dashboard: ${config.project.slug} is attached to ${config.cloud.attachTo}; the server owner's dashboard monitors every attached project.`);
5007
+ return config;
5008
+ }
5005
5009
  if (hasManagementDashboardSite(config))
5006
5010
  return config;
5007
5011
  const environment = config.environments && Object.keys(config.environments)[0];
@@ -5751,18 +5755,22 @@ async function deploySiteRelease(driver, options, logger = noopLogger2) {
5751
5755
  function shellSingleQuote(value) {
5752
5756
  return `'${value.replaceAll("'", "'\\''")}'`;
5753
5757
  }
5754
- function buildManagementDashboardServiceReconciliationScript(slug, desiredSiteNames) {
5758
+ function buildManagementDashboardServiceReconciliationScript(slug, desiredSiteNames, serverOwner = false) {
5755
5759
  const prefix = `${slug}-dashboard-`;
5756
5760
  const desiredUnits = desiredSiteNames.map((siteName) => `${slug}-${siteName}.service`);
5757
5761
  return [
5758
5762
  "set -euo pipefail",
5759
5763
  `TS_CLOUD_DASHBOARD_PREFIX=${shellSingleQuote(prefix)}`,
5764
+ `TS_CLOUD_DASHBOARD_SERVER_OWNER=${serverOwner ? "1" : "0"}`,
5760
5765
  `TS_CLOUD_DASHBOARD_DESIRED=${shellSingleQuote(` ${desiredUnits.join(" ")} `)}`,
5761
5766
  "for TS_CLOUD_UNIT_FILE in /etc/systemd/system/*.service; do",
5762
5767
  ' [ -e "$TS_CLOUD_UNIT_FILE" ] || continue',
5763
5768
  ' TS_CLOUD_UNIT=$(basename "$TS_CLOUD_UNIT_FILE")',
5764
5769
  ' case "$TS_CLOUD_UNIT" in',
5765
- ' "$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",
5766
5774
  ' case "$TS_CLOUD_DASHBOARD_DESIRED" in',
5767
5775
  ' *" $TS_CLOUD_UNIT "*) ;;',
5768
5776
  " *)",
@@ -5786,7 +5794,7 @@ async function reconcileManagementDashboardServices(driver, options, desiredSite
5786
5794
  return true;
5787
5795
  const result = await driver.runRemoteDeploy({
5788
5796
  targets,
5789
- commands: buildManagementDashboardServiceReconciliationScript(slug, desiredSiteNames),
5797
+ commands: buildManagementDashboardServiceReconciliationScript(slug, desiredSiteNames, !config.cloud?.attachTo),
5790
5798
  comment: `ts-cloud reconcile management dashboard ${slug}`,
5791
5799
  tags: {
5792
5800
  Project: slug,
@@ -8,7 +8,7 @@ import {
8
8
  phpRuntimeLayerAssets,
9
9
  runPhpBuildHooks,
10
10
  sha256
11
- } from "./chunk-ecsyc3p0.js";
11
+ } from "./chunk-1qjyqrc5.js";
12
12
 
13
13
  // src/deploy/serverless-image.ts
14
14
  import { execFileSync } from "node:child_process";
@@ -9,7 +9,7 @@ import {
9
9
  step,
10
10
  success,
11
11
  warn
12
- } from "./chunk-28vh1h91.js";
12
+ } from "./chunk-d2aw5vyv.js";
13
13
  import {
14
14
  AwsBackupClient,
15
15
  CloudWatchLogsClient,
@@ -45,7 +45,7 @@ import {
45
45
  resolveSiteKind,
46
46
  resolveUiSource,
47
47
  siteInstallBase
48
- } from "./chunk-wwv7rmmh.js";
48
+ } from "./chunk-23pnrvex.js";
49
49
  import {
50
50
  artifactKey,
51
51
  buildCloudFormationTemplate,
@@ -67,7 +67,7 @@ import {
67
67
  resolveStatePath,
68
68
  setStateDir,
69
69
  statePath
70
- } from "./chunk-ecsyc3p0.js";
70
+ } from "./chunk-1qjyqrc5.js";
71
71
  import {
72
72
  SSMClient
73
73
  } from "./chunk-703nkybg.js";
@@ -3918,6 +3918,7 @@ class DurableQueueWorker {
3918
3918
  onResult;
3919
3919
  onError;
3920
3920
  waits = new Map;
3921
+ nextWaitId = 0;
3921
3922
  lanes = [];
3922
3923
  running = false;
3923
3924
  unsubscribeAvailability;
@@ -3937,7 +3938,7 @@ class DurableQueueWorker {
3937
3938
  return this;
3938
3939
  this.running = true;
3939
3940
  this.unsubscribeAvailability = this.queue.onAvailable(() => this.wake());
3940
- this.lanes = Array.from({ length: this.parallelism }, () => this.runLane());
3941
+ this.lanes = Array.from({ length: this.parallelism }, (_, index) => this.runLane(index));
3941
3942
  return this;
3942
3943
  }
3943
3944
  stop() {
@@ -3947,8 +3948,9 @@ class DurableQueueWorker {
3947
3948
  this.wake();
3948
3949
  }
3949
3950
  wake() {
3950
- for (const [timer, resolve] of this.waits) {
3951
- clearTimeout(timer);
3951
+ for (const { resolve, timer } of this.waits.values()) {
3952
+ if (timer)
3953
+ clearTimeout(timer);
3952
3954
  resolve();
3953
3955
  }
3954
3956
  this.waits.clear();
@@ -3965,17 +3967,18 @@ class DurableQueueWorker {
3965
3967
  return results;
3966
3968
  }
3967
3969
  }
3968
- wait() {
3970
+ wait(useFallbackPoll) {
3969
3971
  return new Promise((resolve) => {
3970
- const timer = setTimeout(() => {
3971
- this.waits.delete(timer);
3972
+ const id = ++this.nextWaitId;
3973
+ const timer = useFallbackPoll ? setTimeout(() => {
3974
+ this.waits.delete(id);
3972
3975
  resolve();
3973
- }, this.pollIntervalMs);
3974
- timer.unref?.();
3975
- this.waits.set(timer, resolve);
3976
+ }, this.pollIntervalMs) : undefined;
3977
+ timer?.unref?.();
3978
+ this.waits.set(id, { resolve, timer });
3976
3979
  });
3977
3980
  }
3978
- async runLane() {
3981
+ async runLane(index) {
3979
3982
  while (this.running) {
3980
3983
  try {
3981
3984
  const result = await this.queue.runOne(this.handlers);
@@ -3983,12 +3986,13 @@ class DurableQueueWorker {
3983
3986
  break;
3984
3987
  if (result.handled) {
3985
3988
  this.onResult?.(result);
3989
+ this.wake();
3986
3990
  continue;
3987
3991
  }
3988
3992
  } catch (error2) {
3989
3993
  this.onError?.(error2);
3990
3994
  }
3991
- await this.wait();
3995
+ await this.wait(index === 0);
3992
3996
  }
3993
3997
  }
3994
3998
  }
@@ -8359,7 +8363,7 @@ async function deployServerlessApp(config, environment2, opts = {}) {
8359
8363
  }
8360
8364
  if (imageMode) {
8361
8365
  step("Building + pushing container image");
8362
- const { buildAndPushServerlessImage } = await import("./chunk-zcvdzvmz.js");
8366
+ const { buildAndPushServerlessImage } = await import("./chunk-tq4v58zp.js");
8363
8367
  const built = await buildAndPushServerlessImage({
8364
8368
  app,
8365
8369
  projectRoot,
@@ -38427,8 +38431,9 @@ var PROBED_SERVICES = [
38427
38431
  var UNKNOWN = "-";
38428
38432
  function sharedBoxProbeScript(projectFilter) {
38429
38433
  const source = String.raw`
38430
- import { basename, join } from 'node:path'
38434
+ import { X509Certificate } from 'node:crypto'
38431
38435
  import { existsSync, readdirSync, readFileSync, readlinkSync, statSync } from 'node:fs'
38436
+ import { basename, join } from 'node:path'
38432
38437
 
38433
38438
  const fragmentsRoot = '/etc/rpx/sites.d'
38434
38439
  const certsRoot = '/etc/rpx/certs'
@@ -38470,7 +38475,20 @@ if (existsSync(fragmentsRoot)) {
38470
38475
  }
38471
38476
  }
38472
38477
 
38473
- const routes = await Promise.all(configuredRoutes.map(async route => {
38478
+ async function mapWithConcurrency(values, limit, mapper) {
38479
+ const results = new Array(values.length)
38480
+ let next = 0
38481
+ const workers = Array.from({ length: Math.min(limit, values.length) }, async () => {
38482
+ while (next < values.length) {
38483
+ const index = next++
38484
+ results[index] = await mapper(values[index])
38485
+ }
38486
+ })
38487
+ await Promise.all(workers)
38488
+ return results
38489
+ }
38490
+
38491
+ const routes = await mapWithConcurrency(configuredRoutes, 8, async route => {
38474
38492
  const started = performance.now()
38475
38493
  let httpStatus = 0
38476
38494
  const probe = async (href) => {
@@ -38496,10 +38514,11 @@ const routes = await Promise.all(configuredRoutes.map(async route => {
38496
38514
  let tlsDaysRemaining
38497
38515
  const cert = join(certsRoot, route.domain + '.crt')
38498
38516
  if (existsSync(cert)) {
38499
- const result = Bun.spawnSync(['openssl', 'x509', '-in', cert, '-noout', '-enddate'])
38500
- const expiry = result.success ? result.stdout.toString().trim().replace(/^notAfter=/, '') : ''
38501
- const expiresAt = Date.parse(expiry)
38502
- if (Number.isFinite(expiresAt)) tlsDaysRemaining = Math.floor((expiresAt - Date.now()) / 86400000)
38517
+ try {
38518
+ const expiresAt = Date.parse(new X509Certificate(readFileSync(cert)).validTo)
38519
+ if (Number.isFinite(expiresAt)) tlsDaysRemaining = Math.floor((expiresAt - Date.now()) / 86400000)
38520
+ }
38521
+ catch {}
38503
38522
  }
38504
38523
  let release
38505
38524
  let deployedAt
@@ -38522,7 +38541,7 @@ const routes = await Promise.all(configuredRoutes.map(async route => {
38522
38541
  release,
38523
38542
  deployedAt,
38524
38543
  }
38525
- }))
38544
+ })
38526
38545
  for (const route of routes) console.log('DISCOVERED_SITE=' + Buffer.from(JSON.stringify(route)).toString('base64'))
38527
38546
 
38528
38547
  const serviceOutput = Bun.spawnSync([
@@ -38588,7 +38607,9 @@ EOF`,
38588
38607
  ];
38589
38608
  if (options.includeServices !== false)
38590
38609
  commands.push(`for s in ${PROBED_SERVICES.join(" ")}; do st=$(systemctl is-active "$s" 2>/dev/null); if [ -n "$st" ] && [ "$st" != "inactive" ] && [ "$st" != "unknown" ]; then mem=$(systemctl show "$s" -p MemoryCurrent --value 2>/dev/null); en=$(systemctl is-enabled "$s" 2>/dev/null); since=$(systemctl show "$s" -p ActiveEnterTimestamp --value 2>/dev/null); echo "SVC=$s=$st=$mem=$en=$since"; fi; done`);
38591
- commands.push(sharedBoxProbeScript(options.projectFilter), "true");
38610
+ if (options.includeSites !== false)
38611
+ commands.push(sharedBoxProbeScript(options.projectFilter));
38612
+ commands.push("true");
38592
38613
  return commands;
38593
38614
  }
38594
38615
  function parseBlock(output) {
@@ -39260,6 +39281,7 @@ async function resolveServerDashboardData(config6, environment2, options = {}) {
39260
39281
  targets: [targets[0]],
39261
39282
  commands: metricsScript({
39262
39283
  includeServices: !options.telemetryOnly,
39284
+ includeSites: options.includeSiteHealth !== false,
39263
39285
  projectFilter: config6.cloud?.attachTo ? config6.project.slug : undefined
39264
39286
  }),
39265
39287
  comment: `ts-cloud dashboard:build ${config6.project.slug}`,
@@ -42286,6 +42308,7 @@ async function collectNow(context) {
42286
42308
  const mode = resolveDeploymentMode(context.config);
42287
42309
  try {
42288
42310
  const data = (mode === "serverless" ? await resolveDashboardData(context.config, context.environment) : await resolveServerDashboardData(context.config, context.environment, {
42311
+ includeSiteHealth: context.includeSiteHealth,
42289
42312
  telemetryOnly: context.lightweight
42290
42313
  })) ?? {};
42291
42314
  if (mode === "serverless") {
@@ -42901,6 +42924,9 @@ function selectedEnvironment(config6, requested) {
42901
42924
  function resolveDashboardEnvironment(available2, fallback, requested) {
42902
42925
  return requested && available2.includes(requested) ? requested : fallback;
42903
42926
  }
42927
+ function dashboardDataRefreshDue(lastRefreshedAt, now, minimumIntervalMs) {
42928
+ return lastRefreshedAt == null || now - lastRefreshedAt >= minimumIntervalMs;
42929
+ }
42904
42930
  async function loadLocalEnv(cwd) {
42905
42931
  const candidates = [
42906
42932
  join13(here, "..", "..", "..", "..", ".env"),
@@ -43485,15 +43511,21 @@ async function startLocalDashboardServer(options = {}) {
43485
43511
  const configPath = resolveCloudConfigPath(cwd);
43486
43512
  const initialData = await resolveLiveDashboardData(config6, defaultEnvironment);
43487
43513
  const latestDataByEnvironment = new Map([[defaultEnvironment, initialData]]);
43514
+ const latestDataRefreshedAtByEnvironment = new Map([[defaultEnvironment, Date.now()]]);
43488
43515
  const liveDataRefreshesByEnvironment = new Map;
43516
+ const dashboardDataMinimumRefreshMs = Math.min(5 * 60000, Math.max(5000, Number(process.env.TS_CLOUD_DASHBOARD_REFRESH_MS) || 30000));
43489
43517
  const refreshLatestDashboardData = (environment2) => {
43518
+ const previous = latestDataByEnvironment.get(environment2);
43519
+ if (previous && !dashboardDataRefreshDue(latestDataRefreshedAtByEnvironment.get(environment2), Date.now(), dashboardDataMinimumRefreshMs))
43520
+ return Promise.resolve(previous);
43490
43521
  const running = liveDataRefreshesByEnvironment.get(environment2);
43491
43522
  if (running)
43492
43523
  return running;
43493
43524
  const refresh = resolveLiveDashboardData(config6, environment2).then((data) => {
43494
- const previous = latestDataByEnvironment.get(environment2);
43525
+ const previous2 = latestDataByEnvironment.get(environment2);
43495
43526
  latestDataByEnvironment.set(environment2, data);
43496
- if (previous?._serverReachable !== data._serverReachable || previous?._metricsStatus !== data._metricsStatus || (previous?.sitesDetail?.length ?? 0) !== (data.sitesDetail?.length ?? 0))
43527
+ latestDataRefreshedAtByEnvironment.set(environment2, Date.now());
43528
+ if (previous2?._serverReachable !== data._serverReachable || previous2?._metricsStatus !== data._metricsStatus || (previous2?.sitesDetail?.length ?? 0) !== (data.sitesDetail?.length ?? 0))
43497
43529
  clearUiCache();
43498
43530
  return data;
43499
43531
  }).finally(() => liveDataRefreshesByEnvironment.delete(environment2));
@@ -43505,11 +43537,16 @@ async function startLocalDashboardServer(options = {}) {
43505
43537
  const backgroundTelemetryEnabled = options.box && telemetryPreference !== "0" && (telemetryPreference === "1" || !config6.cloud?.attachTo);
43506
43538
  if (backgroundTelemetryEnabled) {
43507
43539
  let telemetryCollectionRunning = false;
43540
+ let nextSiteHealthCollectionAt = 0;
43508
43541
  const collectHostHistory = async () => {
43509
43542
  if (telemetryCollectionRunning)
43510
43543
  return;
43511
43544
  telemetryCollectionRunning = true;
43512
43545
  try {
43546
+ const now = Date.now();
43547
+ const includeSiteHealth = now >= nextSiteHealthCollectionAt;
43548
+ if (includeSiteHealth)
43549
+ nextSiteHealthCollectionAt = now + 5 * 60000;
43513
43550
  const environmentRecord = controlPlane.environments.get(defaultEnvironment);
43514
43551
  await collectDashboardTelemetry({
43515
43552
  controlPlane: controlPlane.store,
@@ -43518,7 +43555,8 @@ async function startLocalDashboardServer(options = {}) {
43518
43555
  config: config6,
43519
43556
  environment: defaultEnvironment,
43520
43557
  force: true,
43521
- lightweight: true
43558
+ lightweight: true,
43559
+ includeSiteHealth
43522
43560
  });
43523
43561
  } catch (error2) {
43524
43562
  if (options.verbose)
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  buildAndPushServerlessImage
3
- } from "./chunk-28vh1h91.js";
3
+ } from "./chunk-d2aw5vyv.js";
4
4
  import"./chunk-50jpda9q.js";
5
- import"./chunk-ecsyc3p0.js";
5
+ import"./chunk-1qjyqrc5.js";
6
6
  import"./chunk-zqtpg06c.js";
7
7
  import"./chunk-v0bahtg2.js";
8
8
  export {
@@ -35,6 +35,12 @@ export interface DiscoveredSite {
35
35
  deployedAt?: string;
36
36
  }
37
37
  export declare function sharedBoxProbeScript(projectFilter?: string): string;
38
+ /** Shell script that emits a parseable metrics block (no jq/printf-JSON needed). */
39
+ export declare function metricsScript(options?: {
40
+ includeServices?: boolean;
41
+ includeSites?: boolean;
42
+ projectFilter?: string;
43
+ }): string[];
38
44
  export declare function parseBlock(output: string): Record<string, string> & {
39
45
  services: ProbedService[];
40
46
  discoveredSites: DiscoveredSite[];
@@ -58,6 +64,7 @@ export declare function parseServerSecurity(output: string): Record<string, any>
58
64
  export declare function parseDeployHistory(output: string, sites?: Record<string, any>): Array<Record<string, any>>;
59
65
  export declare function resolveConfigOnlyServerDashboardData(config: CloudConfig, environment: EnvironmentType): Record<string, any>;
60
66
  export declare function resolveServerDashboardData(config: CloudConfig, environment: EnvironmentType, options?: {
67
+ includeSiteHealth?: boolean;
61
68
  telemetryOnly?: boolean;
62
69
  }): Promise<Record<string, any> | null>;
63
70
  export {};
@@ -32,7 +32,7 @@ import {
32
32
  synchronizeDashboardUsers,
33
33
  trackDashboardOperation,
34
34
  verifyStaticApiOrigin
35
- } from "../chunk-0pn5yzev.js";
35
+ } from "../chunk-qk1qcsrh.js";
36
36
  import {
37
37
  deleteStaticSite,
38
38
  deployStaticSite,
@@ -46,7 +46,7 @@ import {
46
46
  } from "../chunk-ef2dwfrg.js";
47
47
  import {
48
48
  buildAndPushServerlessImage
49
- } from "../chunk-28vh1h91.js";
49
+ } from "../chunk-d2aw5vyv.js";
50
50
  import"../chunk-ybcz6sxc.js";
51
51
  import"../chunk-01d86gt1.js";
52
52
  import"../chunk-50jpda9q.js";
@@ -65,8 +65,8 @@ import {
65
65
  shipsARelease,
66
66
  siteInstallBase,
67
67
  validateDeploymentConfig
68
- } from "../chunk-wwv7rmmh.js";
69
- import"../chunk-ecsyc3p0.js";
68
+ } from "../chunk-23pnrvex.js";
69
+ import"../chunk-1qjyqrc5.js";
70
70
  import"../chunk-703nkybg.js";
71
71
  import"../chunk-4cjrg98a.js";
72
72
  import"../chunk-hpv68b4a.js";
@@ -45,6 +45,7 @@ export declare function dashboardMutationAuditPayload(method: string, path: stri
45
45
  };
46
46
  export declare function resolveOidcDashboardOrigin(host: string, port: number, env?: NodeJS.ProcessEnv): string | undefined;
47
47
  export declare function resolveDashboardEnvironment(available: readonly string[], fallback: EnvironmentType, requested?: string | null): EnvironmentType;
48
+ export declare function dashboardDataRefreshDue(lastRefreshedAt: number | undefined, now: number, minimumIntervalMs: number): boolean;
48
49
  /** Reject browser cross-site mutations while retaining header-light CLI access. */
49
50
  export declare function isTrustedMutationRequest(req: Request): boolean;
50
51
  export declare function sanitizeCloudConfig(config: CloudConfig): Record<string, any>;
@@ -31,6 +31,8 @@ export interface TelemetryCollectionContext {
31
31
  force?: boolean;
32
32
  /** Collect host and site metrics without expensive runtime logs or inventory. */
33
33
  lightweight?: boolean;
34
+ /** Include route and TLS probes in lightweight host telemetry. */
35
+ includeSiteHealth?: boolean;
34
36
  }
35
37
  export declare function telemetryRecordsFromLog(input: {
36
38
  projectId: string;
@@ -68,8 +68,8 @@ import {
68
68
  waitForSsh,
69
69
  wrapCloudInitUserData,
70
70
  writeResizeCheckpoint
71
- } from "../chunk-wwv7rmmh.js";
72
- import"../chunk-ecsyc3p0.js";
71
+ } from "../chunk-23pnrvex.js";
72
+ import"../chunk-1qjyqrc5.js";
73
73
  import"../chunk-703nkybg.js";
74
74
  import"../chunk-4cjrg98a.js";
75
75
  import"../chunk-wj3s95p9.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-0pn5yzev.js";
288
+ } from "./chunk-qk1qcsrh.js";
289
289
  import {
290
290
  deleteStaticSite,
291
291
  deployStaticSite,
@@ -299,7 +299,7 @@ import {
299
299
  } from "./chunk-ef2dwfrg.js";
300
300
  import {
301
301
  buildAndPushServerlessImage
302
- } from "./chunk-28vh1h91.js";
302
+ } from "./chunk-d2aw5vyv.js";
303
303
  import {
304
304
  ApplicationAutoScalingClient,
305
305
  BedrockClient,
@@ -398,7 +398,7 @@ import {
398
398
  waitForCloudInit,
399
399
  waitForSsh,
400
400
  wrapCloudInitUserData
401
- } from "./chunk-wwv7rmmh.js";
401
+ } from "./chunk-23pnrvex.js";
402
402
  import {
403
403
  ABTestManager,
404
404
  AI,
@@ -812,7 +812,7 @@ import {
812
812
  withSecurity,
813
813
  withTimeout,
814
814
  xrayManager
815
- } from "./chunk-ecsyc3p0.js";
815
+ } from "./chunk-1qjyqrc5.js";
816
816
  import {
817
817
  EC2Client,
818
818
  SSMClient
@@ -18,6 +18,7 @@ export declare class DurableQueueWorker {
18
18
  private readonly onResult?;
19
19
  private readonly onError?;
20
20
  private readonly waits;
21
+ private nextWaitId;
21
22
  private lanes;
22
23
  private running;
23
24
  private unsubscribeAvailability?;