codebase-snapshot 0.9.15 → 0.9.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/cli.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { O as OutputFormat, D as DiscoveryMode, R as ResolvedSnapshotConfig } from './types-DIX6zWSt.cjs';
1
+ import { O as OutputFormat, D as DiscoveryMode, R as ResolvedSnapshotConfig } from './types-KbJvBjmV.cjs';
2
2
 
3
3
  /**
4
4
  * The machine-readable description of this tool.
@@ -310,16 +310,6 @@ declare function parseByteOption(raw: string | undefined, optionName: string, mi
310
310
  * through to the writable `generate` command.
311
311
  */
312
312
  declare function parseCliArgs(argv: string[]): ParsedInvocation;
313
- /**
314
- * The environment a nested package-manager run gets: the caller's, minus npm's own config.
315
- *
316
- * Running `setup` through `npx`/`npm exec` puts the parent npm's resolved config into
317
- * `npm_config_*` variables, and a child that inherits them is not the `npm install` a user would
318
- * type — with an npm that supports an `allowScripts` switch, the child aborted with
319
- * `EALLOWSCRIPTS: --allow-scripts is not allowed in project-scoped installs`. Stripping them makes
320
- * the child read the project's own `.npmrc` and flags, which is the whole point of using the
321
- * project's package manager.
322
- */
323
313
  declare function cleanInstallEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
324
314
  /**
325
315
  * Runs one invocation, and mentions a newer release when there is one.
package/dist/cli.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { O as OutputFormat, D as DiscoveryMode, R as ResolvedSnapshotConfig } from './types-DIX6zWSt.js';
1
+ import { O as OutputFormat, D as DiscoveryMode, R as ResolvedSnapshotConfig } from './types-KbJvBjmV.js';
2
2
 
3
3
  /**
4
4
  * The machine-readable description of this tool.
@@ -310,16 +310,6 @@ declare function parseByteOption(raw: string | undefined, optionName: string, mi
310
310
  * through to the writable `generate` command.
311
311
  */
312
312
  declare function parseCliArgs(argv: string[]): ParsedInvocation;
313
- /**
314
- * The environment a nested package-manager run gets: the caller's, minus npm's own config.
315
- *
316
- * Running `setup` through `npx`/`npm exec` puts the parent npm's resolved config into
317
- * `npm_config_*` variables, and a child that inherits them is not the `npm install` a user would
318
- * type — with an npm that supports an `allowScripts` switch, the child aborted with
319
- * `EALLOWSCRIPTS: --allow-scripts is not allowed in project-scoped installs`. Stripping them makes
320
- * the child read the project's own `.npmrc` and flags, which is the whole point of using the
321
- * project's package manager.
322
- */
323
313
  declare function cleanInstallEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
324
314
  /**
325
315
  * Runs one invocation, and mentions a newer release when there is one.
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
- import { buildAgentContract, runStdioServer, COMMAND_OPTION_SCOPE, commandsForOption, SKILL_NAME, renderSkill, renderContractText } from './chunk-AU2VNTUU.js';
2
- export { buildAgentContract } from './chunk-AU2VNTUU.js';
3
- import { shouldCheck, checkForUpdate, GENERATOR_VERSION, cacheFilePath, formatUpdateNotice, installKind, loadConfigFileDetailed, resolveConfig, validateSnapshot, describeManifestShapeProblem, explainPath, compareManifests, loadManifest, renderDiffText, generateSnapshot, formatNumber, isDiscoveryMode, ARTIFACT_NAMES, getPreset, unknownPresetMessage, GENERATOR_NAME, runInit, installPreCommitHook, PromptCancelled, findConfigFile, planFirstRun, isEffectivelyEmpty, isInteractive, defaultIO, hasPriorSnapshot, DEFAULT_ANSWERS, firstRunMessage, parseByteSize, stripJsonComments, gitignorePath, appendGitignoreEntries, runWithStdoutCapture, escapeControls, MIN_MAX_PART_TOKENS, MIN_MAX_PART_BYTES, renderExplainText } from './chunk-JL4VDGXL.js';
1
+ import { buildAgentContract, runStdioServer, COMMAND_OPTION_SCOPE, commandsForOption, SKILL_NAME, renderSkill, renderContractText } from './chunk-S4367K5X.js';
2
+ export { buildAgentContract } from './chunk-S4367K5X.js';
3
+ import { shouldCheck, checkForUpdate, GENERATOR_VERSION, cacheFilePath, formatUpdateNotice, installKind, loadConfigFileDetailed, resolveConfig, validateSnapshot, describeManifestShapeProblem, explainPath, compareManifests, loadManifest, renderDiffText, generateSnapshot, formatNumber, isDiscoveryMode, ARTIFACT_NAMES, getPreset, unknownPresetMessage, GENERATOR_NAME, runInit, installPreCommitHook, PromptCancelled, findConfigFile, planFirstRun, isEffectivelyEmpty, isInteractive, defaultIO, hasPriorSnapshot, DEFAULT_ANSWERS, firstRunMessage, parseByteSize, stripJsonComments, gitignorePath, appendGitignoreEntries, runWithStdoutCapture, escapeControls, MIN_MAX_PART_TOKENS, MIN_MAX_PART_BYTES, renderExplainText } from './chunk-IIP43I7C.js';
4
4
  import { spawnSync } from 'child_process';
5
5
  import * as fs from 'fs';
6
6
  import * as path2 from 'path';
@@ -442,7 +442,9 @@ function parseCliArgs(argv) {
442
442
  )
443
443
  )
444
444
  );
445
- const hint = ignored.some((flag) => ["--preset", "--include", "--exclude"].includes(flag)) ? " To scope a run, set include/excludePatterns/preset in snapshot.config.ts (or run `codebase-snapshot init` to generate one)." : "";
445
+ const setupOnly = ["--preset", "--include", "--exclude", "--install-hook"];
446
+ const autopilotChose = values.autopilot === true && ignored.some((flag) => setupOnly.includes(flag));
447
+ const hint = autopilotChose ? " --autopilot chooses the preset and takes none of these: name them with `setup` (or `init`) instead." : ignored.some((flag) => ["--preset", "--include", "--exclude"].includes(flag)) ? " To scope a run, set include/excludePatterns/preset in snapshot.config.ts (or run `codebase-snapshot init` to generate one)." : "";
446
448
  throw new UsageError(
447
449
  `${ignored.join(", ")} ${ignored.length === 1 ? "does" : "do"} not apply to \`${command}\` and ${ignored.length === 1 ? "was" : "were"} not applied. ${ignored.length === 1 ? "It is" : "They are"} accepted by: ${owners.join(", ")}.${hint}`
448
450
  );
@@ -645,10 +647,19 @@ function detectPackageManager(cwd) {
645
647
  if (has("yarn.lock")) return { name: "yarn", command: "yarn", args: ["install"] };
646
648
  return { name: "npm", command: "npm", args: ["install"] };
647
649
  }
650
+ var INHERITED_NPM_SETTINGS = /* @__PURE__ */ new Set([
651
+ "npm_config_registry",
652
+ "npm_config_proxy",
653
+ "npm_config_https_proxy",
654
+ "npm_config_noproxy",
655
+ "npm_config_cafile",
656
+ "npm_config_ca",
657
+ "npm_config_strict_ssl"
658
+ ]);
648
659
  function cleanInstallEnv(env = process.env) {
649
660
  const cleaned = {};
650
661
  for (const [key, value] of Object.entries(env)) {
651
- if (/^npm_config_/i.test(key)) continue;
662
+ if (/^npm_config_/i.test(key) && !INHERITED_NPM_SETTINGS.has(key.toLowerCase())) continue;
652
663
  if (key === "npm_lifecycle_event" || key === "npm_lifecycle_script") continue;
653
664
  cleaned[key] = value;
654
665
  }