codebase-snapshot 0.9.4 → 0.9.6
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 +84 -0
- package/README.md +4 -1
- package/dist/bin.js +594 -304
- package/dist/{chunk-FCWD4LY7.js → chunk-3KUL3QRH.js} +564 -318
- package/dist/{chunk-EWZYK3VX.js → chunk-ZKZOGGM3.js} +33 -7
- package/dist/cli.cjs +697 -411
- package/dist/cli.d.cts +7 -1
- package/dist/cli.d.ts +7 -1
- package/dist/cli.js +19 -6
- package/dist/index.cjs +570 -312
- package/dist/index.d.cts +54 -2
- package/dist/index.d.ts +54 -2
- package/dist/index.js +1 -1
- package/dist/mcp.cjs +31 -4
- package/dist/mcp.d.cts +14 -1
- package/dist/mcp.d.ts +14 -1
- package/dist/mcp.js +2 -2
- package/docs/cli.md +29 -2
- package/docs/mcp.md +3 -3
- package/package.json +1 -1
package/dist/cli.d.cts
CHANGED
|
@@ -72,7 +72,13 @@ declare function parseCliArgs(argv: string[]): ParsedInvocation;
|
|
|
72
72
|
* project's package manager.
|
|
73
73
|
*/
|
|
74
74
|
declare function cleanInstallEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
75
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Runs one invocation, and mentions a newer release when there is one.
|
|
77
|
+
*
|
|
78
|
+
* The check is *started* before the command and awaited after it, so on any real work the request
|
|
79
|
+
* overlaps the command entirely and adds no wall time. The notice goes to stderr: stdout belongs
|
|
80
|
+
* to the payload, and a JSON consumer must never have to parse a suggestion.
|
|
81
|
+
*/
|
|
76
82
|
declare function main(argv?: string[]): Promise<number>;
|
|
77
83
|
/** Coalesce bursts of filesystem events into one run. */
|
|
78
84
|
declare const WATCH_DEBOUNCE_MS = 250;
|
package/dist/cli.d.ts
CHANGED
|
@@ -72,7 +72,13 @@ declare function parseCliArgs(argv: string[]): ParsedInvocation;
|
|
|
72
72
|
* project's package manager.
|
|
73
73
|
*/
|
|
74
74
|
declare function cleanInstallEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
75
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Runs one invocation, and mentions a newer release when there is one.
|
|
77
|
+
*
|
|
78
|
+
* The check is *started* before the command and awaited after it, so on any real work the request
|
|
79
|
+
* overlaps the command entirely and adds no wall time. The notice goes to stderr: stdout belongs
|
|
80
|
+
* to the payload, and a JSON consumer must never have to parse a suggestion.
|
|
81
|
+
*/
|
|
76
82
|
declare function main(argv?: string[]): Promise<number>;
|
|
77
83
|
/** Coalesce bursts of filesystem events into one run. */
|
|
78
84
|
declare const WATCH_DEBOUNCE_MS = 250;
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { buildAgentContract, runStdioServer, COMMAND_OPTION_SCOPE, commandsForOption, SKILL_NAME, renderSkill, renderContractText } from './chunk-
|
|
2
|
-
import { loadConfigFileDetailed, resolveConfig, validateSnapshot, describeManifestShapeProblem, explainPath, compareManifests, loadManifest, renderDiffText, generateSnapshot, formatNumber,
|
|
1
|
+
import { buildAgentContract, runStdioServer, COMMAND_OPTION_SCOPE, commandsForOption, SKILL_NAME, renderSkill, renderContractText } from './chunk-ZKZOGGM3.js';
|
|
2
|
+
import { shouldCheck, checkForUpdate, GENERATOR_VERSION, cacheFilePath, formatUpdateNotice, loadConfigFileDetailed, resolveConfig, validateSnapshot, describeManifestShapeProblem, explainPath, compareManifests, loadManifest, renderDiffText, generateSnapshot, formatNumber, isDiscoveryMode, ARTIFACT_NAMES, getPreset, unknownPresetMessage, GENERATOR_NAME, runInit, PromptCancelled, planFirstRun, isEffectivelyEmpty, isInteractive, defaultIO, hasPriorSnapshot, DEFAULT_ANSWERS, findConfigFile, firstRunMessage, parseByteSize, gitignorePath, appendGitignoreEntries, escapeControls, MIN_MAX_PART_BYTES, renderExplainText } from './chunk-3KUL3QRH.js';
|
|
3
3
|
import { spawnSync } from 'child_process';
|
|
4
4
|
import * as fs from 'fs';
|
|
5
5
|
import * as path2 from 'path';
|
|
@@ -145,6 +145,7 @@ var CLI_OPTIONS = {
|
|
|
145
145
|
install: { type: "boolean" },
|
|
146
146
|
"no-install": { type: "boolean" },
|
|
147
147
|
target: { type: "string" },
|
|
148
|
+
"no-update-check": { type: "boolean" },
|
|
148
149
|
help: { type: "boolean", short: "h" },
|
|
149
150
|
version: { type: "boolean", short: "v" }
|
|
150
151
|
};
|
|
@@ -219,6 +220,8 @@ Options:
|
|
|
219
220
|
--install Write the skill into the repository instead of printing
|
|
220
221
|
--target <name> claude | cursor | all (default: all)
|
|
221
222
|
|
|
223
|
+
--no-update-check Skip the daily check for a newer published version
|
|
224
|
+
|
|
222
225
|
-h, --help Display this help message
|
|
223
226
|
-v, --version Display version
|
|
224
227
|
|
|
@@ -587,14 +590,13 @@ function installDependencies(cwd) {
|
|
|
587
590
|
const manager = detectPackageManager(cwd);
|
|
588
591
|
const command = `${manager.command} ${manager.args.join(" ")}`;
|
|
589
592
|
const started = performance.now();
|
|
590
|
-
const
|
|
593
|
+
const spawnOptions = {
|
|
591
594
|
cwd,
|
|
592
595
|
encoding: "utf8",
|
|
593
|
-
// npm, pnpm and yarn ship as `.cmd` shims on Windows, which spawnSync cannot exec directly.
|
|
594
|
-
shell: process.platform === "win32",
|
|
595
596
|
timeout: INSTALL_TIMEOUT_MS,
|
|
596
597
|
env: cleanInstallEnv()
|
|
597
|
-
}
|
|
598
|
+
};
|
|
599
|
+
const result = process.platform === "win32" ? spawnSync(command, { ...spawnOptions, shell: true }) : spawnSync(manager.command, manager.args, spawnOptions);
|
|
598
600
|
const seconds = `${((performance.now() - started) / 1e3).toFixed(1)}s`;
|
|
599
601
|
if (result.error) {
|
|
600
602
|
return { manager: manager.name, command, ok: false, detail: `${result.error.message} (${seconds})` };
|
|
@@ -844,6 +846,17 @@ function requestsJsonFormat(argv) {
|
|
|
844
846
|
return format === "json";
|
|
845
847
|
}
|
|
846
848
|
async function main(argv = process.argv.slice(2)) {
|
|
849
|
+
const pending = process.stdout.isTTY === true && shouldCheck(argv, process.env) ? checkForUpdate({ current: GENERATOR_VERSION, cacheFile: cacheFilePath() }) : null;
|
|
850
|
+
const code = await runCommand(argv);
|
|
851
|
+
if (pending) {
|
|
852
|
+
const notice = await pending;
|
|
853
|
+
if (notice) process.stderr.write(`
|
|
854
|
+
${formatUpdateNotice(notice)}
|
|
855
|
+
`);
|
|
856
|
+
}
|
|
857
|
+
return code;
|
|
858
|
+
}
|
|
859
|
+
async function runCommand(argv) {
|
|
847
860
|
let invocation;
|
|
848
861
|
try {
|
|
849
862
|
invocation = parseCliArgs(argv);
|