@maestro-js/cli 1.0.0-alpha.14 → 1.0.0-alpha.16

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/dist/bin.js +9 -5
  2. package/package.json +11 -11
package/dist/bin.js CHANGED
@@ -609,15 +609,19 @@ function hashMakeKey() {
609
609
  import { execSync as execSync3 } from "child_process";
610
610
  async function configRun(opts) {
611
611
  const { Config } = await import("@maestro-js/config").catch(() => requirePeer("@maestro-js/config"));
612
- const configName = opts.config;
613
- if (!configName) {
612
+ const configNames = opts.config ? Array.isArray(opts.config) ? opts.config : [opts.config] : [];
613
+ if (configNames.length === 0) {
614
614
  console.error("Missing required --config <name> option");
615
615
  process.exit(1);
616
616
  }
617
617
  const rootDir = opts.root ?? process.cwd();
618
618
  const envName = opts.env ?? null;
619
619
  const encryptionKey = opts.key ?? process.env["MAESTRO_ENV_ENCRYPTION_KEY"] ?? null;
620
- const config = await Config.getConfig({ rootDir, configName, envName, encryptionKey });
620
+ const merged = {};
621
+ for (const configName of configNames) {
622
+ const config = await Config.getConfig({ rootDir, configName, envName, encryptionKey });
623
+ Object.assign(merged, config);
624
+ }
621
625
  const command = opts._.join(" ");
622
626
  if (!command) {
623
627
  console.error("No command provided. Usage: maestro config:run --config <name> [options] -- <command>");
@@ -625,7 +629,7 @@ async function configRun(opts) {
625
629
  }
626
630
  execSync3(command, {
627
631
  stdio: "inherit",
628
- env: { ...process.env, ...config }
632
+ env: { ...process.env, ...merged }
629
633
  });
630
634
  }
631
635
 
@@ -905,7 +909,7 @@ prog.command("env:encrypt <env>").describe("Encrypt a .env file").option("--key
905
909
  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
910
  prog.command("components:list").describe("List available components").action(componentsList);
907
911
  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);
912
+ 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
913
  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
914
  prog.command("upgrade").describe("Upgrade @maestro-js/* packages to a newer version").action(upgrade);
911
915
  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/agent-container": "1.0.0-alpha.14",
17
- "@maestro-js/components": "1.0.0-alpha.14",
18
- "@maestro-js/config": "1.0.0-alpha.14",
19
- "@maestro-js/db": "1.0.0-alpha.14",
20
- "@maestro-js/db-migrate": "1.0.0-alpha.14"
16
+ "@maestro-js/components": "1.0.0-alpha.16",
17
+ "@maestro-js/config": "1.0.0-alpha.16",
18
+ "@maestro-js/db": "1.0.0-alpha.16",
19
+ "@maestro-js/db-migrate": "1.0.0-alpha.16",
20
+ "@maestro-js/agent-container": "1.0.0-alpha.16"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/node": "^22.19.11",
24
24
  "@types/prompts": "^2.4.9",
25
- "@maestro-js/components": "1.0.0-alpha.14",
26
- "@maestro-js/agent-container": "1.0.0-alpha.14",
27
- "@maestro-js/config": "1.0.0-alpha.14",
28
- "@maestro-js/db-migrate": "1.0.0-alpha.14",
29
- "@maestro-js/db": "1.0.0-alpha.14"
25
+ "@maestro-js/components": "1.0.0-alpha.16",
26
+ "@maestro-js/config": "1.0.0-alpha.16",
27
+ "@maestro-js/db": "1.0.0-alpha.16",
28
+ "@maestro-js/db-migrate": "1.0.0-alpha.16",
29
+ "@maestro-js/agent-container": "1.0.0-alpha.16"
30
30
  },
31
- "version": "1.0.0-alpha.14",
31
+ "version": "1.0.0-alpha.16",
32
32
  "publishConfig": {
33
33
  "access": "restricted"
34
34
  },