@hasna/microservices 0.0.31 → 0.0.33

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 (2) hide show
  1. package/bin/index.js +14 -3
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -3742,6 +3742,9 @@ Installing ${targets.length} microservice(s)...
3742
3742
  }
3743
3743
  }
3744
3744
  console.log();
3745
+ if (results.some((result) => !result.success)) {
3746
+ process.exit(1);
3747
+ }
3745
3748
  });
3746
3749
  program2.command("remove <name>").description("Remove an installed microservice").option("-y, --yes", "Skip confirmation prompt").action(async (name, opts) => {
3747
3750
  if (!opts.yes) {
@@ -3749,7 +3752,10 @@ program2.command("remove <name>").description("Remove an installed microservice"
3749
3752
  console.error(source_default.red("Refusing to remove without confirmation in non-interactive mode. Re-run with --yes."));
3750
3753
  process.exit(1);
3751
3754
  }
3752
- const rl = createInterface({ input: process.stdin, output: process.stdout });
3755
+ const rl = createInterface({
3756
+ input: process.stdin,
3757
+ output: process.stdout
3758
+ });
3753
3759
  try {
3754
3760
  const answer = await rl.question(`Remove ${name} from your global Bun installation? [y/N] `);
3755
3761
  const confirmed = ["y", "yes"].includes(answer.trim().toLowerCase());
@@ -3866,7 +3872,12 @@ Starting ${installed.length} installed microservices...
3866
3872
  const m = installed[i];
3867
3873
  const color = colors[i % colors.length];
3868
3874
  const prefix = color(`[${m.name.padEnd(10)}] `);
3869
- const proc = spawn2(m.binary, ["serve"], {
3875
+ const binaryPath = resolveMicroserviceBinary(m.name);
3876
+ if (!binaryPath) {
3877
+ console.error(`${prefix}${source_default.red("Failed to start:")} could not resolve ${m.binary}`);
3878
+ continue;
3879
+ }
3880
+ const proc = spawn2(binaryPath, ["serve"], {
3870
3881
  env: process.env,
3871
3882
  stdio: ["ignore", "pipe", "pipe"]
3872
3883
  });
@@ -3904,7 +3915,7 @@ program2.command("init-all").description("Run init (migrations) for all installe
3904
3915
  return;
3905
3916
  }
3906
3917
  if (!opts.db) {
3907
- console.error(source_default.red("--db <url> is required. Example: microservices init-all --db postgres://localhost/myapp"));
3918
+ console.error(source_default.red("--db <url> is required. Example: microservices init-all --db <postgres-connection-url>"));
3908
3919
  process.exit(1);
3909
3920
  }
3910
3921
  process.env.DATABASE_URL = opts.db;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/microservices",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
4
  "description": "21 production-grade microservice building blocks for AI-native SaaS — auth, billing, LLM gateway, agent registry, RAG, guardrails, tracing, and more. Each with PostgreSQL, HTTP API, MCP server, and CLI.",
5
5
  "type": "module",
6
6
  "bin": {