@ankurhalder/codebase-snapshot 4.0.7 → 4.1.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.
- package/README.md +4 -1
- package/dist/bin.js +1279 -268
- package/dist/{chunk-VRJTXNJV.js → chunk-6SMZR5EM.js} +998 -193
- package/dist/cli.cjs +1286 -268
- package/dist/cli.d.cts +60 -2
- package/dist/cli.d.ts +60 -2
- package/dist/cli.js +288 -79
- package/dist/index.cjs +997 -190
- package/dist/index.d.cts +163 -54
- package/dist/index.d.ts +163 -54
- package/dist/index.js +1 -1
- package/dist/{types-x7aogSer.d.cts → types-BMP676ER.d.cts} +41 -2
- package/dist/{types-x7aogSer.d.ts → types-BMP676ER.d.ts} +41 -2
- package/docs/agent.md +3 -1
- package/docs/cli.md +34 -3
- package/docs/configuration.md +29 -4
- package/docs/install.md +5 -3
- package/docs/output.md +22 -9
- package/docs/troubleshooting.md +60 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -177,7 +177,10 @@ export default {
|
|
|
177
177
|
```js
|
|
178
178
|
import { generateSnapshot, resolveConfig, validateSnapshot, loadConfigFile } from "@ankurhalder/codebase-snapshot";
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
// Pass the repository explicitly: loadConfigFile returns only the config it found, so a
|
|
181
|
+
// directory with no config file would leave resolveConfig scanning process.cwd() instead.
|
|
182
|
+
const dir = "/path/to/repo";
|
|
183
|
+
const config = resolveConfig(await loadConfigFile(dir), { cwd: dir });
|
|
181
184
|
const manifest = generateSnapshot(config);
|
|
182
185
|
const validation = validateSnapshot(config);
|
|
183
186
|
```
|