deepstrike 8.0.0 → 9.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 +27 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -23235,6 +23235,13 @@ var writeSecretFileIfMissing = async () => {
23235
23235
  `, "utf8");
23236
23236
  return true;
23237
23237
  };
23238
+ var writeSecretFileOverwrite = async (clientSecret) => {
23239
+ const filePath = path5.join(getDeepstrikeDir(), SECRET_INPUT_FILE_NAME);
23240
+ await ensureDir(getDeepstrikeDir());
23241
+ await fs6.writeFile(filePath, `AZURE_CLIENT_SECRET=${clientSecret}
23242
+ `, "utf8");
23243
+ return filePath;
23244
+ };
23238
23245
  var appendGitignoreRules = async (projectRoot) => {
23239
23246
  const gitignorePath = path5.join(projectRoot, ".gitignore");
23240
23247
  const rules = [
@@ -23291,6 +23298,7 @@ var printHelp = () => {
23291
23298
  const text = `deepstrike
23292
23299
 
23293
23300
  Usage:
23301
+ deepstrike bootstrap <clientSecret>
23294
23302
  deepstrike init
23295
23303
  deepstrike create <environment>
23296
23304
  deepstrike push <environment>
@@ -23306,6 +23314,18 @@ Notes:
23306
23314
  `;
23307
23315
  process.stdout.write(text);
23308
23316
  };
23317
+ var bootstrapCommand = async (clientSecret) => {
23318
+ const projectRoot = getProjectRoot();
23319
+ const wrotePath = await writeSecretFileOverwrite(clientSecret);
23320
+ const updatedGitignore = await appendGitignoreRules(projectRoot);
23321
+ process.stdout.write(`Wrote secret input file: ${path5.relative(projectRoot, wrotePath)}
23322
+ `);
23323
+ process.stdout.write(updatedGitignore ? `.gitignore updated.
23324
+ ` : `.gitignore already up to date.
23325
+ `);
23326
+ process.stdout.write(`Next: deepstrike init
23327
+ `);
23328
+ };
23309
23329
  var initCommand = async () => {
23310
23330
  const projectRoot = getProjectRoot();
23311
23331
  const deepstrikeDir = getDeepstrikeDir();
@@ -23459,6 +23479,13 @@ var main = async () => {
23459
23479
  printHelp();
23460
23480
  return;
23461
23481
  }
23482
+ if (command === "bootstrap") {
23483
+ const clientSecret = args[0];
23484
+ if (!clientSecret)
23485
+ throw new Error("bootstrap requires <clientSecret>");
23486
+ await bootstrapCommand(clientSecret);
23487
+ return;
23488
+ }
23462
23489
  if (command === "init") {
23463
23490
  await initCommand();
23464
23491
  return;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "8.0.0",
2
+ "version": "9.0.0",
3
3
  "name": "deepstrike",
4
4
  "type": "module",
5
5
  "devDependencies": {