@maestro-js/cli 1.0.0-alpha.15 → 1.0.0-alpha.17
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/bin.js +9 -6
- package/package.json +11 -11
package/dist/bin.js
CHANGED
|
@@ -456,7 +456,6 @@ async function resolveDbConfig(opts) {
|
|
|
456
456
|
password,
|
|
457
457
|
database
|
|
458
458
|
};
|
|
459
|
-
console.log(resolved);
|
|
460
459
|
return resolved;
|
|
461
460
|
}
|
|
462
461
|
async function createDb(config) {
|
|
@@ -609,15 +608,19 @@ function hashMakeKey() {
|
|
|
609
608
|
import { execSync as execSync3 } from "child_process";
|
|
610
609
|
async function configRun(opts) {
|
|
611
610
|
const { Config } = await import("@maestro-js/config").catch(() => requirePeer("@maestro-js/config"));
|
|
612
|
-
const
|
|
613
|
-
if (
|
|
611
|
+
const configNames = opts.config ? Array.isArray(opts.config) ? opts.config : [opts.config] : [];
|
|
612
|
+
if (configNames.length === 0) {
|
|
614
613
|
console.error("Missing required --config <name> option");
|
|
615
614
|
process.exit(1);
|
|
616
615
|
}
|
|
617
616
|
const rootDir = opts.root ?? process.cwd();
|
|
618
617
|
const envName = opts.env ?? null;
|
|
619
618
|
const encryptionKey = opts.key ?? process.env["MAESTRO_ENV_ENCRYPTION_KEY"] ?? null;
|
|
620
|
-
const
|
|
619
|
+
const merged = {};
|
|
620
|
+
for (const configName of configNames) {
|
|
621
|
+
const config = await Config.getConfig({ rootDir, configName, envName, encryptionKey });
|
|
622
|
+
Object.assign(merged, config);
|
|
623
|
+
}
|
|
621
624
|
const command = opts._.join(" ");
|
|
622
625
|
if (!command) {
|
|
623
626
|
console.error("No command provided. Usage: maestro config:run --config <name> [options] -- <command>");
|
|
@@ -625,7 +628,7 @@ async function configRun(opts) {
|
|
|
625
628
|
}
|
|
626
629
|
execSync3(command, {
|
|
627
630
|
stdio: "inherit",
|
|
628
|
-
env: { ...process.env, ...
|
|
631
|
+
env: { ...process.env, ...merged }
|
|
629
632
|
});
|
|
630
633
|
}
|
|
631
634
|
|
|
@@ -905,7 +908,7 @@ prog.command("env:encrypt <env>").describe("Encrypt a .env file").option("--key
|
|
|
905
908
|
prog.command("env:decrypt <env>").describe("Decrypt a .env.encrypted file").option("--key <value>", "Encryption key (env: MAESTRO_ENV_ENCRYPTION_KEY)").option("--force", "Overwrite existing .env file").action(envDecrypt);
|
|
906
909
|
prog.command("components:list").describe("List available components").action(componentsList);
|
|
907
910
|
prog.command("components:add [name]").describe("Add components to the current project").option("--directory", "Target directory (default: cwd)").option("--overwrite", "Overwrite existing files").option("--all", "Add all available components").action(componentsAdd);
|
|
908
|
-
prog.command("config:run").describe("Resolve config and run a command with the config values as environment variables").option("--config <name>", "Config name (required)").option("--root <path>", "Project root directory (default: cwd)").option("--env <name>", "Environment name (e.g. production)").option("--key <value>", "Encryption key (env: MAESTRO_ENV_ENCRYPTION_KEY)").action(configRun);
|
|
911
|
+
prog.command("config:run").describe("Resolve config and run a command with the config values as environment variables").option("--config <name>", "Config name (required, repeatable; later configs override earlier)").option("--root <path>", "Project root directory (default: cwd)").option("--env <name>", "Environment name (e.g. production)").option("--key <value>", "Encryption key (env: MAESTRO_ENV_ENCRYPTION_KEY)").action(configRun);
|
|
909
912
|
prog.command("skills:install").describe("Install agent skills from @maestro-js/agent-skills").option("--interactive", "Run in interactive mode (select skills manually)").option("--copy", "Copy skill files instead of symlinking").action(skillsInstall);
|
|
910
913
|
prog.command("upgrade").describe("Upgrade @maestro-js/* packages to a newer version").action(upgrade);
|
|
911
914
|
prog.command("init <name>").describe("Scaffold a new Maestro project").action(init);
|
package/package.json
CHANGED
|
@@ -13,22 +13,22 @@
|
|
|
13
13
|
"sade": "^1.8.1"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@maestro-js/
|
|
17
|
-
"@maestro-js/
|
|
18
|
-
"@maestro-js/config": "1.0.0-alpha.
|
|
19
|
-
"@maestro-js/db": "1.0.0-alpha.
|
|
20
|
-
"@maestro-js/db-migrate": "1.0.0-alpha.
|
|
16
|
+
"@maestro-js/components": "1.0.0-alpha.17",
|
|
17
|
+
"@maestro-js/agent-container": "1.0.0-alpha.17",
|
|
18
|
+
"@maestro-js/config": "1.0.0-alpha.17",
|
|
19
|
+
"@maestro-js/db": "1.0.0-alpha.17",
|
|
20
|
+
"@maestro-js/db-migrate": "1.0.0-alpha.17"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^22.19.11",
|
|
24
24
|
"@types/prompts": "^2.4.9",
|
|
25
|
-
"@maestro-js/agent-container": "1.0.0-alpha.
|
|
26
|
-
"@maestro-js/
|
|
27
|
-
"@maestro-js/
|
|
28
|
-
"@maestro-js/db": "1.0.0-alpha.
|
|
29
|
-
"@maestro-js/db
|
|
25
|
+
"@maestro-js/agent-container": "1.0.0-alpha.17",
|
|
26
|
+
"@maestro-js/config": "1.0.0-alpha.17",
|
|
27
|
+
"@maestro-js/components": "1.0.0-alpha.17",
|
|
28
|
+
"@maestro-js/db-migrate": "1.0.0-alpha.17",
|
|
29
|
+
"@maestro-js/db": "1.0.0-alpha.17"
|
|
30
30
|
},
|
|
31
|
-
"version": "1.0.0-alpha.
|
|
31
|
+
"version": "1.0.0-alpha.17",
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "restricted"
|
|
34
34
|
},
|