@isarai/maestro 0.1.1 → 0.1.3
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/README.md +3 -0
- package/dist/index.js +140 -5
- package/dist/index.js.map +2 -2
- package/dist/server.js +32 -325
- package/dist/server.js.map +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
import * as os from "node:os";
|
|
4
4
|
import * as path from "node:path";
|
|
5
|
-
import { spawn } from "node:child_process";
|
|
5
|
+
import { execFileSync, spawn } from "node:child_process";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
var PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
8
|
+
var PACKAGE_JSON_PATH = path.join(PACKAGE_ROOT, "package.json");
|
|
8
9
|
var MAESTRO_DIR = path.join(os.homedir(), ".maestro");
|
|
9
10
|
var PID_PATH = path.join(MAESTRO_DIR, "server.pid");
|
|
10
11
|
var META_PATH = path.join(MAESTRO_DIR, "server-meta.json");
|
|
11
12
|
var LOG_PATH = path.join(MAESTRO_DIR, "server.log");
|
|
12
|
-
var TOKEN_PATH = path.join(MAESTRO_DIR, "
|
|
13
|
+
var TOKEN_PATH = path.join(MAESTRO_DIR, "token");
|
|
14
|
+
var LEGACY_TOKEN_PATH = path.join(MAESTRO_DIR, "api-token");
|
|
13
15
|
var SERVER_PATH = path.join(PACKAGE_ROOT, "dist", "server.js");
|
|
14
16
|
var DEFAULT_HOST = process.env.HOST || "0.0.0.0";
|
|
15
17
|
var DEFAULT_PORT = process.env.PORT || "4800";
|
|
@@ -20,6 +22,13 @@ function fail(message) {
|
|
|
20
22
|
console.error(message);
|
|
21
23
|
process.exit(1);
|
|
22
24
|
}
|
|
25
|
+
function readPackageMeta() {
|
|
26
|
+
try {
|
|
27
|
+
return JSON.parse(fs.readFileSync(PACKAGE_JSON_PATH, "utf8"));
|
|
28
|
+
} catch {
|
|
29
|
+
fail(`Maestro package metadata not found at ${PACKAGE_JSON_PATH}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
23
32
|
function preflight() {
|
|
24
33
|
if (!fs.existsSync(SERVER_PATH)) {
|
|
25
34
|
fail(`Maestro server bundle not found at ${SERVER_PATH}`);
|
|
@@ -76,12 +85,82 @@ function cleanupState() {
|
|
|
76
85
|
} catch {
|
|
77
86
|
}
|
|
78
87
|
}
|
|
88
|
+
function resolveTokenPath() {
|
|
89
|
+
if (fs.existsSync(TOKEN_PATH)) {
|
|
90
|
+
return TOKEN_PATH;
|
|
91
|
+
}
|
|
92
|
+
if (fs.existsSync(LEGACY_TOKEN_PATH)) {
|
|
93
|
+
return LEGACY_TOKEN_PATH;
|
|
94
|
+
}
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
79
97
|
function displayHost(host) {
|
|
80
98
|
if (!host || host === "0.0.0.0" || host === "::") {
|
|
81
99
|
return "127.0.0.1";
|
|
82
100
|
}
|
|
83
101
|
return host;
|
|
84
102
|
}
|
|
103
|
+
function isContainerManagedInstall() {
|
|
104
|
+
return fs.existsSync("/.dockerenv") || Boolean(process.env.KUBERNETES_SERVICE_HOST);
|
|
105
|
+
}
|
|
106
|
+
function getNpmCommand() {
|
|
107
|
+
const npmCommand = process.platform === "win32" ? "npm.cmd" : "npm";
|
|
108
|
+
try {
|
|
109
|
+
execFileSync(npmCommand, ["--version"], { stdio: ["ignore", "ignore", "ignore"] });
|
|
110
|
+
return npmCommand;
|
|
111
|
+
} catch {
|
|
112
|
+
fail("npm is required for `maestro update`, but it was not found in PATH.");
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function getGlobalNpmRoot(npmCommand) {
|
|
116
|
+
try {
|
|
117
|
+
return execFileSync(npmCommand, ["root", "-g"], {
|
|
118
|
+
encoding: "utf8",
|
|
119
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
120
|
+
}).trim();
|
|
121
|
+
} catch {
|
|
122
|
+
fail("Failed to determine the global npm install directory.");
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function ensureGlobalNpmInstall(npmCommand, packageName) {
|
|
126
|
+
const globalRoot = path.resolve(getGlobalNpmRoot(npmCommand));
|
|
127
|
+
const expectedRoot = path.resolve(globalRoot, packageName);
|
|
128
|
+
const installedRoot = path.resolve(PACKAGE_ROOT);
|
|
129
|
+
if (installedRoot !== expectedRoot) {
|
|
130
|
+
fail(
|
|
131
|
+
`maestro update only supports global npm installs. Expected package path ${expectedRoot}, found ${installedRoot}.`
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function getLatestPublishedVersion(npmCommand, packageName) {
|
|
136
|
+
try {
|
|
137
|
+
const raw = execFileSync(npmCommand, ["view", `${packageName}@latest`, "version"], {
|
|
138
|
+
encoding: "utf8",
|
|
139
|
+
stdio: ["ignore", "pipe", "inherit"]
|
|
140
|
+
}).trim();
|
|
141
|
+
if (!raw) {
|
|
142
|
+
throw new Error("empty version response");
|
|
143
|
+
}
|
|
144
|
+
return raw;
|
|
145
|
+
} catch {
|
|
146
|
+
fail(`Failed to query the latest published version for ${packageName}.`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function version() {
|
|
150
|
+
const meta = readPackageMeta();
|
|
151
|
+
console.log(meta.version);
|
|
152
|
+
}
|
|
153
|
+
function runNpmInstallGlobal(npmCommand, packageName, versionSpec) {
|
|
154
|
+
try {
|
|
155
|
+
execFileSync(
|
|
156
|
+
npmCommand,
|
|
157
|
+
["install", "-g", `${packageName}@${versionSpec}`],
|
|
158
|
+
{ stdio: "inherit" }
|
|
159
|
+
);
|
|
160
|
+
} catch {
|
|
161
|
+
throw new Error(`Failed to update ${packageName}@${versionSpec}.`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
85
164
|
function getStatus() {
|
|
86
165
|
const pid = readPid();
|
|
87
166
|
const meta = readMeta();
|
|
@@ -170,16 +249,60 @@ function status() {
|
|
|
170
249
|
console.log(`Log: ${LOG_PATH}`);
|
|
171
250
|
}
|
|
172
251
|
function auth() {
|
|
173
|
-
|
|
252
|
+
const tokenPath = resolveTokenPath();
|
|
253
|
+
if (!tokenPath) {
|
|
174
254
|
fail(`Maestro API token not found at ${TOKEN_PATH}. Start Maestro first.`);
|
|
175
255
|
}
|
|
176
|
-
const token = fs.readFileSync(
|
|
256
|
+
const token = fs.readFileSync(tokenPath, "utf8").trim();
|
|
177
257
|
const current = getStatus();
|
|
178
258
|
const host = displayHost(current.meta?.host || DEFAULT_HOST);
|
|
179
259
|
const port = current.meta?.port || DEFAULT_PORT;
|
|
180
260
|
console.log(`Server URL: http://${host}:${port}`);
|
|
181
261
|
console.log(`API token: ${token}`);
|
|
182
|
-
console.log(`Token path: ${
|
|
262
|
+
console.log(`Token path: ${tokenPath}`);
|
|
263
|
+
}
|
|
264
|
+
async function update(args) {
|
|
265
|
+
if (isContainerManagedInstall()) {
|
|
266
|
+
fail("maestro update is only supported for bare-metal npm installs. Redeploy the container image instead.");
|
|
267
|
+
}
|
|
268
|
+
const meta = readPackageMeta();
|
|
269
|
+
const npmCommand = getNpmCommand();
|
|
270
|
+
ensureGlobalNpmInstall(npmCommand, meta.name);
|
|
271
|
+
const latestVersion = getLatestPublishedVersion(npmCommand, meta.name);
|
|
272
|
+
const currentVersion = meta.version;
|
|
273
|
+
const checkOnly = args.includes("--check");
|
|
274
|
+
console.log(`Installed: ${currentVersion}`);
|
|
275
|
+
console.log(`Latest: ${latestVersion}`);
|
|
276
|
+
if (currentVersion === latestVersion) {
|
|
277
|
+
console.log("Maestro is already up to date.");
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
if (checkOnly) {
|
|
281
|
+
console.log(`Update available: ${currentVersion} -> ${latestVersion}`);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
const current = getStatus();
|
|
285
|
+
const wasRunning = current.running;
|
|
286
|
+
if (wasRunning) {
|
|
287
|
+
console.log("Stopping Maestro before update...");
|
|
288
|
+
await stop();
|
|
289
|
+
}
|
|
290
|
+
console.log(`Updating ${meta.name} to ${latestVersion}...`);
|
|
291
|
+
try {
|
|
292
|
+
runNpmInstallGlobal(npmCommand, meta.name, "latest");
|
|
293
|
+
} catch (error) {
|
|
294
|
+
if (wasRunning) {
|
|
295
|
+
console.log("Update failed; attempting to restart the previous Maestro process...");
|
|
296
|
+
start();
|
|
297
|
+
}
|
|
298
|
+
fail(error instanceof Error ? error.message : "Maestro update failed.");
|
|
299
|
+
}
|
|
300
|
+
if (wasRunning) {
|
|
301
|
+
console.log("Starting Maestro after update...");
|
|
302
|
+
start();
|
|
303
|
+
} else {
|
|
304
|
+
console.log("Update complete.");
|
|
305
|
+
}
|
|
183
306
|
}
|
|
184
307
|
function help() {
|
|
185
308
|
console.log("Usage: maestro <command>");
|
|
@@ -189,9 +312,15 @@ function help() {
|
|
|
189
312
|
console.log(" stop Stop the background Maestro server");
|
|
190
313
|
console.log(" status Show whether the Maestro server is running");
|
|
191
314
|
console.log(" auth Print the local Maestro API token");
|
|
315
|
+
console.log(" version Print the installed Maestro CLI version");
|
|
316
|
+
console.log(" update Update the globally installed Maestro CLI");
|
|
317
|
+
console.log("");
|
|
318
|
+
console.log("Options:");
|
|
319
|
+
console.log(" maestro update --check Check whether an update is available");
|
|
192
320
|
}
|
|
193
321
|
async function main() {
|
|
194
322
|
const cmd = process.argv[2];
|
|
323
|
+
const args = process.argv.slice(3);
|
|
195
324
|
switch (cmd) {
|
|
196
325
|
case "start":
|
|
197
326
|
start();
|
|
@@ -205,6 +334,12 @@ async function main() {
|
|
|
205
334
|
case "auth":
|
|
206
335
|
auth();
|
|
207
336
|
break;
|
|
337
|
+
case "version":
|
|
338
|
+
version();
|
|
339
|
+
break;
|
|
340
|
+
case "update":
|
|
341
|
+
await update(args);
|
|
342
|
+
break;
|
|
208
343
|
case "help":
|
|
209
344
|
case "--help":
|
|
210
345
|
case "-h":
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as fs from \"node:fs\";\nimport * as os from \"node:os\";\nimport * as path from \"node:path\";\nimport { spawn } from \"node:child_process\";\nimport { fileURLToPath } from \"node:url\";\n\nconst PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), \"..\");\nconst MAESTRO_DIR = path.join(os.homedir(), \".maestro\");\nconst PID_PATH = path.join(MAESTRO_DIR, \"server.pid\");\nconst META_PATH = path.join(MAESTRO_DIR, \"server-meta.json\");\nconst LOG_PATH = path.join(MAESTRO_DIR, \"server.log\");\nconst TOKEN_PATH = path.join(MAESTRO_DIR, \"api-token\");\nconst SERVER_PATH = path.join(PACKAGE_ROOT, \"dist\", \"server.js\");\nconst DEFAULT_HOST = process.env.HOST || \"0.0.0.0\";\nconst DEFAULT_PORT = process.env.PORT || \"4800\";\n\ninterface ServerMeta {\n pid: number;\n host: string;\n port: string;\n logPath: string;\n startedAt: string;\n cwd: string;\n}\n\nfunction ensureMaestroDir(): void {\n fs.mkdirSync(MAESTRO_DIR, { recursive: true });\n}\n\nfunction fail(message: string): never {\n console.error(message);\n process.exit(1);\n}\n\nfunction preflight(): void {\n if (!fs.existsSync(SERVER_PATH)) {\n fail(`Maestro server bundle not found at ${SERVER_PATH}`);\n }\n}\n\nfunction readPid(): number | null {\n try {\n const raw = fs.readFileSync(PID_PATH, \"utf8\").trim();\n if (!raw) return null;\n const pid = Number(raw);\n return Number.isInteger(pid) && pid > 0 ? pid : null;\n } catch {\n return null;\n }\n}\n\nfunction isProcessAlive(pid: number): boolean {\n try {\n process.kill(pid, 0);\n if (process.platform === \"linux\") {\n try {\n const stat = fs.readFileSync(`/proc/${pid}/stat`, \"utf8\");\n const fields = stat.trim().split(\" \");\n if (fields[2] === \"Z\") {\n return false;\n }\n } catch {\n // Ignore /proc read failures and fall back to kill(0).\n }\n }\n return true;\n } catch (error) {\n return Boolean(\n error &&\n typeof error === \"object\" &&\n \"code\" in error &&\n (error as NodeJS.ErrnoException).code === \"EPERM\"\n );\n }\n}\n\nfunction readMeta(): ServerMeta | null {\n try {\n return JSON.parse(fs.readFileSync(META_PATH, \"utf8\")) as ServerMeta;\n } catch {\n return null;\n }\n}\n\nfunction writeMeta(meta: ServerMeta): void {\n ensureMaestroDir();\n fs.writeFileSync(META_PATH, JSON.stringify(meta, null, 2) + \"\\n\", \"utf8\");\n}\n\nfunction cleanupState(): void {\n try {\n fs.unlinkSync(PID_PATH);\n } catch {}\n try {\n fs.unlinkSync(META_PATH);\n } catch {}\n}\n\nfunction displayHost(host: string | undefined): string {\n if (!host || host === \"0.0.0.0\" || host === \"::\") {\n return \"127.0.0.1\";\n }\n return host;\n}\n\nfunction getStatus(): { running: boolean; pid: number | null; meta: ServerMeta | null } {\n const pid = readPid();\n const meta = readMeta();\n\n if (!pid) {\n return { running: false, pid: null, meta };\n }\n\n if (!isProcessAlive(pid)) {\n cleanupState();\n return { running: false, pid: null, meta };\n }\n\n return { running: true, pid, meta };\n}\n\nfunction start(): void {\n preflight();\n ensureMaestroDir();\n\n const current = getStatus();\n if (current.running) {\n const host = displayHost(current.meta?.host || DEFAULT_HOST);\n const port = current.meta?.port || DEFAULT_PORT;\n console.log(`Maestro is already running (pid ${current.pid})`);\n console.log(`URL: http://${host}:${port}`);\n console.log(`Log: ${LOG_PATH}`);\n return;\n }\n\n const out = fs.openSync(LOG_PATH, \"a\");\n const env = {\n ...process.env,\n NODE_ENV: process.env.NODE_ENV || \"production\",\n HOST: DEFAULT_HOST,\n PORT: DEFAULT_PORT,\n MAESTRO_INSTALL_ROOT: PACKAGE_ROOT,\n };\n\n const child = spawn(process.execPath, [SERVER_PATH], {\n cwd: process.cwd(),\n detached: true,\n stdio: [\"ignore\", out, out],\n env,\n });\n\n child.unref();\n\n fs.writeFileSync(PID_PATH, `${child.pid}\\n`, \"utf8\");\n writeMeta({\n pid: child.pid ?? 0,\n host: env.HOST,\n port: env.PORT,\n logPath: LOG_PATH,\n startedAt: new Date().toISOString(),\n cwd: process.cwd(),\n });\n\n console.log(`Started Maestro (pid ${child.pid})`);\n console.log(`URL: http://${displayHost(env.HOST)}:${env.PORT}`);\n console.log(`Log: ${LOG_PATH}`);\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nasync function stop(): Promise<void> {\n const status = getStatus();\n if (!status.running || !status.pid) {\n console.log(\"Maestro is not running\");\n cleanupState();\n return;\n }\n\n process.kill(status.pid, \"SIGTERM\");\n\n const deadline = Date.now() + 10_000;\n while (Date.now() < deadline) {\n if (!isProcessAlive(status.pid)) {\n cleanupState();\n console.log(`Stopped Maestro (pid ${status.pid})`);\n return;\n }\n await sleep(200);\n }\n\n fail(`Timed out waiting for Maestro (pid ${status.pid}) to stop`);\n}\n\nfunction status(): void {\n const current = getStatus();\n if (!current.running) {\n console.log(\"Maestro is not running\");\n return;\n }\n\n const host = displayHost(current.meta?.host || DEFAULT_HOST);\n const port = current.meta?.port || DEFAULT_PORT;\n console.log(`Maestro is running (pid ${current.pid})`);\n console.log(`URL: http://${host}:${port}`);\n console.log(`Log: ${LOG_PATH}`);\n}\n\nfunction auth(): void {\n if (!fs.existsSync(TOKEN_PATH)) {\n fail(`Maestro API token not found at ${TOKEN_PATH}. Start Maestro first.`);\n }\n\n const token = fs.readFileSync(TOKEN_PATH, \"utf8\").trim();\n const current = getStatus();\n const host = displayHost(current.meta?.host || DEFAULT_HOST);\n const port = current.meta?.port || DEFAULT_PORT;\n\n console.log(`Server URL: http://${host}:${port}`);\n console.log(`API token: ${token}`);\n console.log(`Token path: ${TOKEN_PATH}`);\n}\n\nfunction help(): void {\n console.log(\"Usage: maestro <command>\");\n console.log(\"\");\n console.log(\"Commands:\");\n console.log(\" start Start the Maestro server in the background\");\n console.log(\" stop Stop the background Maestro server\");\n console.log(\" status Show whether the Maestro server is running\");\n console.log(\" auth Print the local Maestro API token\");\n}\n\nasync function main(): Promise<void> {\n const cmd = process.argv[2];\n\n switch (cmd) {\n case \"start\":\n start();\n break;\n case \"stop\":\n await stop();\n break;\n case \"status\":\n status();\n break;\n case \"auth\":\n auth();\n break;\n case \"help\":\n case \"--help\":\n case \"-h\":\n case undefined:\n help();\n break;\n default:\n fail(`Unknown command: ${cmd}`);\n }\n}\n\nvoid main();\n"],
|
|
5
|
-
"mappings": ";AAAA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,SAAS,aAAa;
|
|
4
|
+
"sourcesContent": ["import * as fs from \"node:fs\";\nimport * as os from \"node:os\";\nimport * as path from \"node:path\";\nimport { execFileSync, spawn } from \"node:child_process\";\nimport { fileURLToPath } from \"node:url\";\n\nconst PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), \"..\");\nconst PACKAGE_JSON_PATH = path.join(PACKAGE_ROOT, \"package.json\");\nconst MAESTRO_DIR = path.join(os.homedir(), \".maestro\");\nconst PID_PATH = path.join(MAESTRO_DIR, \"server.pid\");\nconst META_PATH = path.join(MAESTRO_DIR, \"server-meta.json\");\nconst LOG_PATH = path.join(MAESTRO_DIR, \"server.log\");\nconst TOKEN_PATH = path.join(MAESTRO_DIR, \"token\");\nconst LEGACY_TOKEN_PATH = path.join(MAESTRO_DIR, \"api-token\");\nconst SERVER_PATH = path.join(PACKAGE_ROOT, \"dist\", \"server.js\");\nconst DEFAULT_HOST = process.env.HOST || \"0.0.0.0\";\nconst DEFAULT_PORT = process.env.PORT || \"4800\";\n\ninterface ServerMeta {\n pid: number;\n host: string;\n port: string;\n logPath: string;\n startedAt: string;\n cwd: string;\n}\n\ninterface PackageMeta {\n name: string;\n version: string;\n}\n\nfunction ensureMaestroDir(): void {\n fs.mkdirSync(MAESTRO_DIR, { recursive: true });\n}\n\nfunction fail(message: string): never {\n console.error(message);\n process.exit(1);\n}\n\nfunction readPackageMeta(): PackageMeta {\n try {\n return JSON.parse(fs.readFileSync(PACKAGE_JSON_PATH, \"utf8\")) as PackageMeta;\n } catch {\n fail(`Maestro package metadata not found at ${PACKAGE_JSON_PATH}`);\n }\n}\n\nfunction preflight(): void {\n if (!fs.existsSync(SERVER_PATH)) {\n fail(`Maestro server bundle not found at ${SERVER_PATH}`);\n }\n}\n\nfunction readPid(): number | null {\n try {\n const raw = fs.readFileSync(PID_PATH, \"utf8\").trim();\n if (!raw) return null;\n const pid = Number(raw);\n return Number.isInteger(pid) && pid > 0 ? pid : null;\n } catch {\n return null;\n }\n}\n\nfunction isProcessAlive(pid: number): boolean {\n try {\n process.kill(pid, 0);\n if (process.platform === \"linux\") {\n try {\n const stat = fs.readFileSync(`/proc/${pid}/stat`, \"utf8\");\n const fields = stat.trim().split(\" \");\n if (fields[2] === \"Z\") {\n return false;\n }\n } catch {\n // Ignore /proc read failures and fall back to kill(0).\n }\n }\n return true;\n } catch (error) {\n return Boolean(\n error &&\n typeof error === \"object\" &&\n \"code\" in error &&\n (error as NodeJS.ErrnoException).code === \"EPERM\"\n );\n }\n}\n\nfunction readMeta(): ServerMeta | null {\n try {\n return JSON.parse(fs.readFileSync(META_PATH, \"utf8\")) as ServerMeta;\n } catch {\n return null;\n }\n}\n\nfunction writeMeta(meta: ServerMeta): void {\n ensureMaestroDir();\n fs.writeFileSync(META_PATH, JSON.stringify(meta, null, 2) + \"\\n\", \"utf8\");\n}\n\nfunction cleanupState(): void {\n try {\n fs.unlinkSync(PID_PATH);\n } catch {}\n try {\n fs.unlinkSync(META_PATH);\n } catch {}\n}\n\nfunction resolveTokenPath(): string | null {\n if (fs.existsSync(TOKEN_PATH)) {\n return TOKEN_PATH;\n }\n if (fs.existsSync(LEGACY_TOKEN_PATH)) {\n return LEGACY_TOKEN_PATH;\n }\n return null;\n}\n\nfunction displayHost(host: string | undefined): string {\n if (!host || host === \"0.0.0.0\" || host === \"::\") {\n return \"127.0.0.1\";\n }\n return host;\n}\n\nfunction isContainerManagedInstall(): boolean {\n return fs.existsSync(\"/.dockerenv\") || Boolean(process.env.KUBERNETES_SERVICE_HOST);\n}\n\nfunction getNpmCommand(): string {\n const npmCommand = process.platform === \"win32\" ? \"npm.cmd\" : \"npm\";\n try {\n execFileSync(npmCommand, [\"--version\"], { stdio: [\"ignore\", \"ignore\", \"ignore\"] });\n return npmCommand;\n } catch {\n fail(\"npm is required for `maestro update`, but it was not found in PATH.\");\n }\n}\n\nfunction getGlobalNpmRoot(npmCommand: string): string {\n try {\n return execFileSync(npmCommand, [\"root\", \"-g\"], {\n encoding: \"utf8\",\n stdio: [\"ignore\", \"pipe\", \"ignore\"],\n }).trim();\n } catch {\n fail(\"Failed to determine the global npm install directory.\");\n }\n}\n\nfunction ensureGlobalNpmInstall(npmCommand: string, packageName: string): void {\n const globalRoot = path.resolve(getGlobalNpmRoot(npmCommand));\n const expectedRoot = path.resolve(globalRoot, packageName);\n const installedRoot = path.resolve(PACKAGE_ROOT);\n\n if (installedRoot !== expectedRoot) {\n fail(\n `maestro update only supports global npm installs. Expected package path ${expectedRoot}, found ${installedRoot}.`\n );\n }\n}\n\nfunction getLatestPublishedVersion(npmCommand: string, packageName: string): string {\n try {\n const raw = execFileSync(npmCommand, [\"view\", `${packageName}@latest`, \"version\"], {\n encoding: \"utf8\",\n stdio: [\"ignore\", \"pipe\", \"inherit\"],\n }).trim();\n if (!raw) {\n throw new Error(\"empty version response\");\n }\n return raw;\n } catch {\n fail(`Failed to query the latest published version for ${packageName}.`);\n }\n}\n\nfunction version(): void {\n const meta = readPackageMeta();\n console.log(meta.version);\n}\n\nfunction runNpmInstallGlobal(npmCommand: string, packageName: string, versionSpec: string): void {\n try {\n execFileSync(\n npmCommand,\n [\"install\", \"-g\", `${packageName}@${versionSpec}`],\n { stdio: \"inherit\" }\n );\n } catch {\n throw new Error(`Failed to update ${packageName}@${versionSpec}.`);\n }\n}\n\nfunction getStatus(): { running: boolean; pid: number | null; meta: ServerMeta | null } {\n const pid = readPid();\n const meta = readMeta();\n\n if (!pid) {\n return { running: false, pid: null, meta };\n }\n\n if (!isProcessAlive(pid)) {\n cleanupState();\n return { running: false, pid: null, meta };\n }\n\n return { running: true, pid, meta };\n}\n\nfunction start(): void {\n preflight();\n ensureMaestroDir();\n\n const current = getStatus();\n if (current.running) {\n const host = displayHost(current.meta?.host || DEFAULT_HOST);\n const port = current.meta?.port || DEFAULT_PORT;\n console.log(`Maestro is already running (pid ${current.pid})`);\n console.log(`URL: http://${host}:${port}`);\n console.log(`Log: ${LOG_PATH}`);\n return;\n }\n\n const out = fs.openSync(LOG_PATH, \"a\");\n const env = {\n ...process.env,\n NODE_ENV: process.env.NODE_ENV || \"production\",\n HOST: DEFAULT_HOST,\n PORT: DEFAULT_PORT,\n MAESTRO_INSTALL_ROOT: PACKAGE_ROOT,\n };\n\n const child = spawn(process.execPath, [SERVER_PATH], {\n cwd: process.cwd(),\n detached: true,\n stdio: [\"ignore\", out, out],\n env,\n });\n\n child.unref();\n\n fs.writeFileSync(PID_PATH, `${child.pid}\\n`, \"utf8\");\n writeMeta({\n pid: child.pid ?? 0,\n host: env.HOST,\n port: env.PORT,\n logPath: LOG_PATH,\n startedAt: new Date().toISOString(),\n cwd: process.cwd(),\n });\n\n console.log(`Started Maestro (pid ${child.pid})`);\n console.log(`URL: http://${displayHost(env.HOST)}:${env.PORT}`);\n console.log(`Log: ${LOG_PATH}`);\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nasync function stop(): Promise<void> {\n const status = getStatus();\n if (!status.running || !status.pid) {\n console.log(\"Maestro is not running\");\n cleanupState();\n return;\n }\n\n process.kill(status.pid, \"SIGTERM\");\n\n const deadline = Date.now() + 10_000;\n while (Date.now() < deadline) {\n if (!isProcessAlive(status.pid)) {\n cleanupState();\n console.log(`Stopped Maestro (pid ${status.pid})`);\n return;\n }\n await sleep(200);\n }\n\n fail(`Timed out waiting for Maestro (pid ${status.pid}) to stop`);\n}\n\nfunction status(): void {\n const current = getStatus();\n if (!current.running) {\n console.log(\"Maestro is not running\");\n return;\n }\n\n const host = displayHost(current.meta?.host || DEFAULT_HOST);\n const port = current.meta?.port || DEFAULT_PORT;\n console.log(`Maestro is running (pid ${current.pid})`);\n console.log(`URL: http://${host}:${port}`);\n console.log(`Log: ${LOG_PATH}`);\n}\n\nfunction auth(): void {\n const tokenPath = resolveTokenPath();\n if (!tokenPath) {\n fail(`Maestro API token not found at ${TOKEN_PATH}. Start Maestro first.`);\n }\n\n const token = fs.readFileSync(tokenPath, \"utf8\").trim();\n const current = getStatus();\n const host = displayHost(current.meta?.host || DEFAULT_HOST);\n const port = current.meta?.port || DEFAULT_PORT;\n\n console.log(`Server URL: http://${host}:${port}`);\n console.log(`API token: ${token}`);\n console.log(`Token path: ${tokenPath}`);\n}\n\nasync function update(args: string[]): Promise<void> {\n if (isContainerManagedInstall()) {\n fail(\"maestro update is only supported for bare-metal npm installs. Redeploy the container image instead.\");\n }\n\n const meta = readPackageMeta();\n const npmCommand = getNpmCommand();\n ensureGlobalNpmInstall(npmCommand, meta.name);\n\n const latestVersion = getLatestPublishedVersion(npmCommand, meta.name);\n const currentVersion = meta.version;\n const checkOnly = args.includes(\"--check\");\n\n console.log(`Installed: ${currentVersion}`);\n console.log(`Latest: ${latestVersion}`);\n\n if (currentVersion === latestVersion) {\n console.log(\"Maestro is already up to date.\");\n return;\n }\n\n if (checkOnly) {\n console.log(`Update available: ${currentVersion} -> ${latestVersion}`);\n return;\n }\n\n const current = getStatus();\n const wasRunning = current.running;\n\n if (wasRunning) {\n console.log(\"Stopping Maestro before update...\");\n await stop();\n }\n\n console.log(`Updating ${meta.name} to ${latestVersion}...`);\n try {\n runNpmInstallGlobal(npmCommand, meta.name, \"latest\");\n } catch (error) {\n if (wasRunning) {\n console.log(\"Update failed; attempting to restart the previous Maestro process...\");\n start();\n }\n fail(error instanceof Error ? error.message : \"Maestro update failed.\");\n }\n\n if (wasRunning) {\n console.log(\"Starting Maestro after update...\");\n start();\n } else {\n console.log(\"Update complete.\");\n }\n}\n\nfunction help(): void {\n console.log(\"Usage: maestro <command>\");\n console.log(\"\");\n console.log(\"Commands:\");\n console.log(\" start Start the Maestro server in the background\");\n console.log(\" stop Stop the background Maestro server\");\n console.log(\" status Show whether the Maestro server is running\");\n console.log(\" auth Print the local Maestro API token\");\n console.log(\" version Print the installed Maestro CLI version\");\n console.log(\" update Update the globally installed Maestro CLI\");\n console.log(\"\");\n console.log(\"Options:\");\n console.log(\" maestro update --check Check whether an update is available\");\n}\n\nasync function main(): Promise<void> {\n const cmd = process.argv[2];\n const args = process.argv.slice(3);\n\n switch (cmd) {\n case \"start\":\n start();\n break;\n case \"stop\":\n await stop();\n break;\n case \"status\":\n status();\n break;\n case \"auth\":\n auth();\n break;\n case \"version\":\n version();\n break;\n case \"update\":\n await update(args);\n break;\n case \"help\":\n case \"--help\":\n case \"-h\":\n case undefined:\n help();\n break;\n default:\n fail(`Unknown command: ${cmd}`);\n }\n}\n\nvoid main();\n"],
|
|
5
|
+
"mappings": ";AAAA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,SAAS,cAAc,aAAa;AACpC,SAAS,qBAAqB;AAE9B,IAAM,eAAoB,aAAa,aAAQ,cAAc,YAAY,GAAG,CAAC,GAAG,IAAI;AACpF,IAAM,oBAAyB,UAAK,cAAc,cAAc;AAChE,IAAM,cAAmB,UAAQ,WAAQ,GAAG,UAAU;AACtD,IAAM,WAAgB,UAAK,aAAa,YAAY;AACpD,IAAM,YAAiB,UAAK,aAAa,kBAAkB;AAC3D,IAAM,WAAgB,UAAK,aAAa,YAAY;AACpD,IAAM,aAAkB,UAAK,aAAa,OAAO;AACjD,IAAM,oBAAyB,UAAK,aAAa,WAAW;AAC5D,IAAM,cAAmB,UAAK,cAAc,QAAQ,WAAW;AAC/D,IAAM,eAAe,QAAQ,IAAI,QAAQ;AACzC,IAAM,eAAe,QAAQ,IAAI,QA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