@absolutejs/absolute 0.19.0-beta.662 → 0.19.0-beta.663

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
@@ -2385,6 +2385,13 @@ import { resolve as resolve6 } from "path";
2385
2385
  var serviceTag = (name, color) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[${name}]\x1B[0m`;
2386
2386
  var workspaceTag = (color, message) => `${serviceTag("workspace", color)} ${color}${message}\x1B[0m`;
2387
2387
  var sleep = (ms) => new Promise((resolvePromise) => setTimeout(resolvePromise, ms));
2388
+ var getVisibility = (service) => service.visibility ?? "public";
2389
+ var getServiceUrl = (service) => {
2390
+ if (!service.port) {
2391
+ return null;
2392
+ }
2393
+ return `http://localhost:${service.port}/`;
2394
+ };
2388
2395
  var ensureWorkspaceConfig = (config) => {
2389
2396
  if (!config.workspace?.services || Object.keys(config.workspace.services).length === 0) {
2390
2397
  throw new Error("absolute.config.ts is missing workspace.services. Add a workspace section before using `absolute workspace dev`.");
@@ -2508,6 +2515,8 @@ var resolveService = (name, service, options) => {
2508
2515
  const env3 = {
2509
2516
  ...process.env,
2510
2517
  ...service.env,
2518
+ ABSOLUTE_WORKSPACE_SERVICE_NAME: name,
2519
+ ABSOLUTE_WORKSPACE_SERVICE_VISIBILITY: getVisibility(service),
2511
2520
  FORCE_COLOR: "1",
2512
2521
  NODE_ENV: "development"
2513
2522
  };
@@ -2531,7 +2540,8 @@ var resolveService = (name, service, options) => {
2531
2540
  cwd,
2532
2541
  env: env3,
2533
2542
  name,
2534
- service
2543
+ service,
2544
+ visibility: getVisibility(service)
2535
2545
  };
2536
2546
  }
2537
2547
  return {
@@ -2539,7 +2549,8 @@ var resolveService = (name, service, options) => {
2539
2549
  cwd,
2540
2550
  env: env3,
2541
2551
  name,
2542
- service
2552
+ service,
2553
+ visibility: getVisibility(service)
2543
2554
  };
2544
2555
  };
2545
2556
  var workspace = async (subcommand, options) => {
@@ -2570,7 +2581,11 @@ var workspace = async (subcommand, options) => {
2570
2581
  process.on("SIGTERM", () => {
2571
2582
  shutdown(0);
2572
2583
  });
2573
- console.log(workspaceTag("\x1B[36m", `Starting workspace services: ${orderedNames.join(", ")}`));
2584
+ console.log(workspaceTag("\x1B[36m", `Starting workspace services: ${orderedNames.map((name) => {
2585
+ const service = workspaceConfig.services[name];
2586
+ const visibility = service ? getVisibility(service) : "public";
2587
+ return visibility === "internal" ? `${name} (internal)` : `${name} (public)`;
2588
+ }).join(", ")}`));
2574
2589
  for (const name of orderedNames) {
2575
2590
  const service = workspaceConfig.services[name];
2576
2591
  if (!service) {
@@ -2604,6 +2619,27 @@ var workspace = async (subcommand, options) => {
2604
2619
  await waitForHealthcheck(name, resolved.service.healthcheck);
2605
2620
  }
2606
2621
  console.log(workspaceTag("\x1B[32m", `Workspace ready with ${running.length} services.`));
2622
+ const publicServices = orderedNames.map((name) => {
2623
+ const service = workspaceConfig.services[name];
2624
+ if (!service || getVisibility(service) !== "public") {
2625
+ return null;
2626
+ }
2627
+ const url = getServiceUrl(service);
2628
+ return url ? `${name}: ${url}` : `${name}`;
2629
+ }).filter(Boolean);
2630
+ const internalServices = orderedNames.map((name) => {
2631
+ const service = workspaceConfig.services[name];
2632
+ if (!service || getVisibility(service) !== "internal") {
2633
+ return null;
2634
+ }
2635
+ return service.port ? `${name}: :${service.port}` : `${name}`;
2636
+ }).filter(Boolean);
2637
+ if (publicServices.length > 0) {
2638
+ console.log(workspaceTag("\x1B[32m", `Public services: ${publicServices.join(", ")}`));
2639
+ }
2640
+ if (internalServices.length > 0) {
2641
+ console.log(workspaceTag("\x1B[2m", `Internal services: ${internalServices.join(", ")}`));
2642
+ }
2607
2643
  await Promise.all(running.map((service) => service.process.exited));
2608
2644
  };
2609
2645
 
package/dist/index.js CHANGED
@@ -174803,7 +174803,7 @@ ${registrations}
174803
174803
  ({ tsLibDir } = cached);
174804
174804
  cached.lastUsed = Date.now();
174805
174805
  } else {
174806
- const tsPath = __require.resolve("/home/alexkahn/abs/absolutejs/node_modules/typescript/lib/typescript.js");
174806
+ const tsPath = __require.resolve("typescript");
174807
174807
  const tsRootDir = dirname9(tsPath);
174808
174808
  tsLibDir = tsRootDir.endsWith("lib") ? tsRootDir : resolve18(tsRootDir, "lib");
174809
174809
  const config = readConfiguration("./tsconfig.json");
@@ -182354,6 +182354,7 @@ var getLocalIPAddress = () => {
182354
182354
  init_startupBanner();
182355
182355
  var host = env4.HOST ?? "localhost";
182356
182356
  var port = env4.PORT ?? DEFAULT_PORT;
182357
+ var visibility = env4.ABSOLUTE_WORKSPACE_SERVICE_VISIBILITY ?? "public";
182357
182358
  var localIP;
182358
182359
  var args = argv;
182359
182360
  var hostFlag = args.includes("--host");
@@ -182384,6 +182385,9 @@ var networking = (app) => app.listen({
182384
182385
  }
182385
182386
  } : {}
182386
182387
  }, () => {
182388
+ if (visibility === "internal") {
182389
+ return;
182390
+ }
182387
182391
  const isHotReload = Boolean(globalThis.__hmrServerStartup);
182388
182392
  globalThis.__hmrServerStartup = true;
182389
182393
  if (isHotReload) {
@@ -188803,5 +188807,5 @@ export {
188803
188807
  ANGULAR_INIT_TIMEOUT_MS
188804
188808
  };
188805
188809
 
188806
- //# debugId=CDE81E54B75AFAE164756E2164756E21
188810
+ //# debugId=845140FABD0993C064756E2164756E21
188807
188811
  //# sourceMappingURL=index.js.map