@absolutejs/absolute 0.19.0-beta.670 → 0.19.0-beta.671

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
@@ -2384,6 +2384,7 @@ var start = async (serverEntry, outdir, configPath2) => {
2384
2384
  // src/cli/scripts/workspace.ts
2385
2385
  init_constants();
2386
2386
  init_loadConfig();
2387
+ init_getDurationString();
2387
2388
  import { existsSync as existsSync8, readFileSync as readFileSync8 } from "fs";
2388
2389
  import { resolve as resolve6 } from "path";
2389
2390
 
@@ -2664,8 +2665,8 @@ var createWorkspaceTui = ({
2664
2665
  const statusWidth = 10;
2665
2666
  const rows = [];
2666
2667
  rows.push(padLine(title, width));
2667
- rows.push(padLine(`${colors.bold}Services${colors.reset}`, width));
2668
2668
  rows.push(divider);
2669
+ rows.push(padLine(`${colors.bold}Services${colors.reset}`, width));
2669
2670
  for (const service of servicesSnapshot) {
2670
2671
  const stateColor = getStatusColor(service.status);
2671
2672
  const detail = service.detail ? ` \xB7 ${service.detail}` : "";
@@ -3120,6 +3121,7 @@ var workspace = async (subcommand, options) => {
3120
3121
  const workspaceConfig = ensureWorkspaceConfig(config);
3121
3122
  const orderedNames = topologicallySortServices(workspaceConfig.services);
3122
3123
  const running = [];
3124
+ const serviceBootStartedAt = new Map;
3123
3125
  let shuttingDown = false;
3124
3126
  let restarting = false;
3125
3127
  let paused = false;
@@ -3199,6 +3201,7 @@ var workspace = async (subcommand, options) => {
3199
3201
  if (resolved.service.kind === "absolute" && resolved.configPath && !existsSync8(resolved.configPath)) {
3200
3202
  throw new Error(`${name} references missing config "${resolved.configPath}"`);
3201
3203
  }
3204
+ serviceBootStartedAt.set(name, performance.now());
3202
3205
  tui.setServiceStatus(name, restarting ? "restarting" : "starting");
3203
3206
  const processHandle = Bun.spawn(resolved.command, {
3204
3207
  cwd: resolved.cwd,
@@ -3226,7 +3229,9 @@ var workspace = async (subcommand, options) => {
3226
3229
  shutdown(exitCode || 1);
3227
3230
  });
3228
3231
  await waitForHealthcheck(getHealthcheckUrl(resolved.service));
3229
- tui.setServiceStatus(name, "ready");
3232
+ const startedAt = serviceBootStartedAt.get(name);
3233
+ const readyDuration = typeof startedAt === "number" ? `ready in ${getDurationString(performance.now() - startedAt)}` : undefined;
3234
+ tui.setServiceStatus(name, "ready", readyDuration);
3230
3235
  }
3231
3236
  };
3232
3237
  const restartWorkspace = async () => {
package/package.json CHANGED
@@ -302,5 +302,5 @@
302
302
  "typecheck": "bun run src/cli/index.ts typecheck --config example/absolute.config.ts"
303
303
  },
304
304
  "types": "./dist/src/index.d.ts",
305
- "version": "0.19.0-beta.670"
305
+ "version": "0.19.0-beta.671"
306
306
  }