deepstrike 4.0.0 → 5.0.0

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/cli.js +19 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -22881,6 +22881,7 @@ Usage:
22881
22881
  deepstrike create <environment>
22882
22882
  deepstrike push <environment>
22883
22883
  deepstrike pull <environment>
22884
+ deepstrike export <environment>
22884
22885
 
22885
22886
  Notes:
22886
22887
  Config directory: ${deepstrikeDirName}
@@ -22951,6 +22952,17 @@ var pullCommand = async (environmentRaw) => {
22951
22952
  process.stdout.write(`Pulled secrets for environment ${environmentRaw} to ${outPath}
22952
22953
  `);
22953
22954
  };
22955
+ var exportCommand = async (environmentRaw) => {
22956
+ const secretsFile = await readEnvironmentSecretsFile(environmentRaw);
22957
+ const outFileName = `.env.${environmentRaw}`;
22958
+ const outPath = path5.join(getProjectRoot(), outFileName);
22959
+ const lines = (secretsFile.secrets ?? []).map((secret) => `${secret.name}=${secret.value}`);
22960
+ await fs6.writeFile(outPath, lines.join(`
22961
+ `) + `
22962
+ `, "utf8");
22963
+ process.stdout.write(`Exported secrets for environment ${environmentRaw} to ${outPath}
22964
+ `);
22965
+ };
22954
22966
  var main = async () => {
22955
22967
  const [, , command, ...args] = process.argv;
22956
22968
  if (!command || command === "help" || command === "--help" || command === "-h") {
@@ -22982,6 +22994,13 @@ var main = async () => {
22982
22994
  await pullCommand(environment);
22983
22995
  return;
22984
22996
  }
22997
+ if (command === "export") {
22998
+ const environment = args[0];
22999
+ if (!environment)
23000
+ throw new Error("export requires <environment>");
23001
+ await exportCommand(environment);
23002
+ return;
23003
+ }
22985
23004
  throw new Error(`Unknown command: ${command}`);
22986
23005
  };
22987
23006
  main().catch((error) => {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.0.0",
2
+ "version": "5.0.0",
3
3
  "name": "deepstrike",
4
4
  "type": "module",
5
5
  "devDependencies": {