@hasna/microservices 0.0.30 → 0.0.32
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/bin/index.js +13 -5
- package/bin/mcp.js +3 -3
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -3067,7 +3067,7 @@ var {
|
|
|
3067
3067
|
} = import__.default;
|
|
3068
3068
|
|
|
3069
3069
|
// src/lib/installer.ts
|
|
3070
|
-
import { execFileSync
|
|
3070
|
+
import { execFileSync } from "child_process";
|
|
3071
3071
|
import { accessSync, constants } from "fs";
|
|
3072
3072
|
import { join as join2 } from "path";
|
|
3073
3073
|
|
|
@@ -3551,7 +3551,7 @@ function installMicroservice(name, options = {}) {
|
|
|
3551
3551
|
return { microservice: name, success: true, version: version ?? undefined };
|
|
3552
3552
|
}
|
|
3553
3553
|
try {
|
|
3554
|
-
|
|
3554
|
+
execFileSync("bun", ["install", "-g", meta.package], { stdio: "pipe" });
|
|
3555
3555
|
const version = getMicroserviceVersion(name);
|
|
3556
3556
|
return { microservice: name, success: true, version: version ?? undefined };
|
|
3557
3557
|
} catch (error) {
|
|
@@ -3570,7 +3570,7 @@ function removeMicroservice(name) {
|
|
|
3570
3570
|
if (!meta)
|
|
3571
3571
|
return false;
|
|
3572
3572
|
try {
|
|
3573
|
-
|
|
3573
|
+
execFileSync("bun", ["remove", "-g", meta.package], { stdio: "pipe" });
|
|
3574
3574
|
return true;
|
|
3575
3575
|
} catch {
|
|
3576
3576
|
return false;
|
|
@@ -3749,7 +3749,10 @@ program2.command("remove <name>").description("Remove an installed microservice"
|
|
|
3749
3749
|
console.error(source_default.red("Refusing to remove without confirmation in non-interactive mode. Re-run with --yes."));
|
|
3750
3750
|
process.exit(1);
|
|
3751
3751
|
}
|
|
3752
|
-
const rl = createInterface({
|
|
3752
|
+
const rl = createInterface({
|
|
3753
|
+
input: process.stdin,
|
|
3754
|
+
output: process.stdout
|
|
3755
|
+
});
|
|
3753
3756
|
try {
|
|
3754
3757
|
const answer = await rl.question(`Remove ${name} from your global Bun installation? [y/N] `);
|
|
3755
3758
|
const confirmed = ["y", "yes"].includes(answer.trim().toLowerCase());
|
|
@@ -3866,7 +3869,12 @@ Starting ${installed.length} installed microservices...
|
|
|
3866
3869
|
const m = installed[i];
|
|
3867
3870
|
const color = colors[i % colors.length];
|
|
3868
3871
|
const prefix = color(`[${m.name.padEnd(10)}] `);
|
|
3869
|
-
const
|
|
3872
|
+
const binaryPath = resolveMicroserviceBinary(m.name);
|
|
3873
|
+
if (!binaryPath) {
|
|
3874
|
+
console.error(`${prefix}${source_default.red("Failed to start:")} could not resolve ${m.binary}`);
|
|
3875
|
+
continue;
|
|
3876
|
+
}
|
|
3877
|
+
const proc = spawn2(binaryPath, ["serve"], {
|
|
3870
3878
|
env: process.env,
|
|
3871
3879
|
stdio: ["ignore", "pipe", "pipe"]
|
|
3872
3880
|
});
|
package/bin/mcp.js
CHANGED
|
@@ -19477,7 +19477,7 @@ class StdioServerTransport {
|
|
|
19477
19477
|
}
|
|
19478
19478
|
|
|
19479
19479
|
// src/lib/installer.ts
|
|
19480
|
-
import { execFileSync
|
|
19480
|
+
import { execFileSync } from "child_process";
|
|
19481
19481
|
import { accessSync, constants } from "fs";
|
|
19482
19482
|
import { join } from "path";
|
|
19483
19483
|
|
|
@@ -19961,7 +19961,7 @@ function installMicroservice(name, options = {}) {
|
|
|
19961
19961
|
return { microservice: name, success: true, version: version2 ?? undefined };
|
|
19962
19962
|
}
|
|
19963
19963
|
try {
|
|
19964
|
-
|
|
19964
|
+
execFileSync("bun", ["install", "-g", meta.package], { stdio: "pipe" });
|
|
19965
19965
|
const version2 = getMicroserviceVersion(name);
|
|
19966
19966
|
return { microservice: name, success: true, version: version2 ?? undefined };
|
|
19967
19967
|
} catch (error2) {
|
|
@@ -19977,7 +19977,7 @@ function removeMicroservice(name) {
|
|
|
19977
19977
|
if (!meta)
|
|
19978
19978
|
return false;
|
|
19979
19979
|
try {
|
|
19980
|
-
|
|
19980
|
+
execFileSync("bun", ["remove", "-g", meta.package], { stdio: "pipe" });
|
|
19981
19981
|
return true;
|
|
19982
19982
|
} catch {
|
|
19983
19983
|
return false;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/lib/installer.ts
|
|
3
|
-
import { execFileSync
|
|
3
|
+
import { execFileSync } from "child_process";
|
|
4
4
|
import { accessSync, constants } from "fs";
|
|
5
5
|
import { join } from "path";
|
|
6
6
|
|
|
@@ -498,7 +498,7 @@ function installMicroservice(name, options = {}) {
|
|
|
498
498
|
return { microservice: name, success: true, version: version ?? undefined };
|
|
499
499
|
}
|
|
500
500
|
try {
|
|
501
|
-
|
|
501
|
+
execFileSync("bun", ["install", "-g", meta.package], { stdio: "pipe" });
|
|
502
502
|
const version = getMicroserviceVersion(name);
|
|
503
503
|
return { microservice: name, success: true, version: version ?? undefined };
|
|
504
504
|
} catch (error) {
|
|
@@ -520,7 +520,7 @@ function removeMicroservice(name) {
|
|
|
520
520
|
if (!meta)
|
|
521
521
|
return false;
|
|
522
522
|
try {
|
|
523
|
-
|
|
523
|
+
execFileSync("bun", ["remove", "-g", meta.package], { stdio: "pipe" });
|
|
524
524
|
return true;
|
|
525
525
|
} catch {
|
|
526
526
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/microservices",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.32",
|
|
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": {
|