codebase-snapshot 0.9.16 → 0.9.18
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/CHANGELOG.md +136 -0
- package/README.md +4 -4
- package/SECURITY.md +18 -6
- package/dist/bin.js +2024 -622
- package/dist/{chunk-WIL536QD.js → chunk-XAW5GY6X.js} +98 -25
- package/dist/{chunk-6TRFLA7N.js → chunk-ZXWAVHSZ.js} +1758 -444
- package/dist/cli.cjs +2006 -608
- package/dist/cli.d.cts +1 -11
- package/dist/cli.d.ts +1 -11
- package/dist/cli.js +17 -6
- package/dist/index.cjs +1752 -438
- package/dist/index.d.cts +106 -9
- package/dist/index.d.ts +106 -9
- package/dist/index.js +1 -1
- package/dist/mcp.cjs +1761 -341
- package/dist/mcp.d.cts +7 -0
- package/dist/mcp.d.ts +7 -0
- package/dist/mcp.js +2 -2
- package/dist/{types-DIX6zWSt.d.cts → types-KbJvBjmV.d.cts} +46 -1
- package/dist/{types-DIX6zWSt.d.ts → types-KbJvBjmV.d.ts} +46 -1
- package/docs/cli.md +20 -13
- package/docs/configuration.md +16 -1
- package/docs/mcp.md +17 -7
- package/docs/output.md +3 -3
- package/docs/vs-gitingest.md +6 -2
- package/docs/vs-repomix.md +9 -5
- package/package.json +16 -18
package/dist/cli.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as OutputFormat, D as DiscoveryMode, R as ResolvedSnapshotConfig } from './types-
|
|
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-
|
|
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-
|
|
2
|
-
export { buildAgentContract } from './chunk-
|
|
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-
|
|
1
|
+
import { buildAgentContract, runStdioServer, COMMAND_OPTION_SCOPE, commandsForOption, SKILL_NAME, renderSkill, renderContractText } from './chunk-XAW5GY6X.js';
|
|
2
|
+
export { buildAgentContract } from './chunk-XAW5GY6X.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-ZXWAVHSZ.js';
|
|
4
4
|
import { spawnSync } from 'child_process';
|
|
5
5
|
import * as fs from 'fs';
|
|
6
6
|
import * as path2 from 'path';
|
|
@@ -237,7 +237,7 @@ Options:
|
|
|
237
237
|
--install Write the skill into the repository instead of printing
|
|
238
238
|
--target <name> claude | cursor | all (default: all)
|
|
239
239
|
|
|
240
|
-
--no-update-check Skip the
|
|
240
|
+
--no-update-check Skip the check for a newer published version
|
|
241
241
|
|
|
242
242
|
-h, --help Display this help message
|
|
243
243
|
-v, --version Display version
|
|
@@ -442,7 +442,9 @@ function parseCliArgs(argv) {
|
|
|
442
442
|
)
|
|
443
443
|
)
|
|
444
444
|
);
|
|
445
|
-
const
|
|
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
|
}
|