@karmaniverous/stan-cli 0.13.0-3 → 0.13.1

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/stan.js +11 -2
  2. package/package.json +1 -1
package/dist/cli/stan.js CHANGED
@@ -6996,6 +6996,8 @@ const registerRunAction = (cmd, getFlagPresence) => {
6996
6996
  scriptsDefault,
6997
6997
  dir: runCwd,
6998
6998
  });
6999
+ // Pre-clean output dir (so we can write meta archive safely without it being wiped by the runner)
7000
+ await ensureOutputDir(runCwd, config.stanPath, derived.behavior.keep);
6999
7001
  // Context Mode (dependency graph)
7000
7002
  let dependency;
7001
7003
  if (derived.behavior.context) {
@@ -7025,7 +7027,11 @@ const registerRunAction = (cmd, getFlagPresence) => {
7025
7027
  map: built.map,
7026
7028
  clean: true,
7027
7029
  });
7028
- await createMetaArchive(runCwd, config.stanPath);
7030
+ const metaArch = await createMetaArchive(runCwd, config.stanPath, {
7031
+ includes: config.includes ?? [],
7032
+ excludes: config.excludes ?? [],
7033
+ }, { includeOutputDir: derived.behavior.combine });
7034
+ console.log(`stan: created meta archive ${path.relative(runCwd, metaArch).replace(/\\/g, '/')}`);
7029
7035
  // "meta archive always created when context is in effect"
7030
7036
  // Pass dependency info to runner so it can do "WithDependencyContext" archives.
7031
7037
  dependency = {
@@ -7086,7 +7092,10 @@ const registerRunAction = (cmd, getFlagPresence) => {
7086
7092
  printPlan = false;
7087
7093
  }
7088
7094
  derived.behavior.plan = printPlan;
7089
- await runSelected(runCwd, runnerConfig, derived.selection, derived.mode, derived.behavior, derived.promptChoice);
7095
+ await runSelected(runCwd, runnerConfig, derived.selection, derived.mode,
7096
+ // We already handled output clearing/retention via the explicit ensureOutputDir call above.
7097
+ // Pass keep: true to prevent the runner from clearing the directory again (which would delete the meta archive).
7098
+ { ...derived.behavior, keep: true }, derived.promptChoice);
7090
7099
  });
7091
7100
  };
7092
7101
 
package/package.json CHANGED
@@ -159,5 +159,5 @@
159
159
  },
160
160
  "type": "module",
161
161
  "types": "dist/types/index.d.ts",
162
- "version": "0.13.0-3"
162
+ "version": "0.13.1"
163
163
  }