document360-writer 0.5.26 → 0.5.27
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.js +69 -69
- package/dist/commands/reset.d.ts +7 -6
- package/package.json +1 -1
package/dist/commands/reset.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { ReplContext } from '../repl.js';
|
|
2
2
|
import type { SlashCommandResult } from './index.js';
|
|
3
3
|
/**
|
|
4
|
-
* Hard gate on what /reset may delete
|
|
5
|
-
* `.d360-writer/` (
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Hard gate on what /reset may delete. d360-writer owns ONLY `.d360-writer/` (+ pre-consolidation root
|
|
5
|
+
* dot-files), so anything outside `.d360-writer/` (except our own dot-files) is refused — no matter what
|
|
6
|
+
* the config says or how a target was computed. Cheap insurance against a bad config pointing the docs
|
|
7
|
+
* dir at a real repo folder and nuking it. (No "gold set" anymore — see CLAUDE.md; the guard stays
|
|
8
|
+
* because refusing to rm a repo-root folder is just good hygiene.)
|
|
8
9
|
*/
|
|
9
10
|
export declare function isResettable(rel: string): boolean;
|
|
10
11
|
/** Repo-relative paths that exist and would be removed by /reset — strictly within `.d360-writer/`
|
|
11
|
-
(+ legacy root dot-files). NEVER a repo-root docs folder
|
|
12
|
+
(+ legacy root dot-files). NEVER a repo-root docs folder (refused by isResettable, no matter the config). */
|
|
12
13
|
export declare function resetTargets(cwd: string): string[];
|
|
13
14
|
/** Delete each target (recursive, force) — but re-check isResettable on every path as a final
|
|
14
|
-
safety net, so a non-resettable path (e.g.
|
|
15
|
+
safety net, so a non-resettable path (e.g. any repo-root folder) can never be deleted even if
|
|
15
16
|
it somehow reached this list. Returns what was removed, refused, and what failed. */
|
|
16
17
|
export declare function performReset(cwd: string, targets: string[]): {
|
|
17
18
|
removed: string[];
|
package/package.json
CHANGED