@osdlc/wayfinder 0.7.4 → 0.9.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/CHANGELOG.md +240 -0
- package/CONTRIBUTING.md +6 -0
- package/README.md +310 -150
- package/SECURITY.md +19 -5
- package/dist/actions.d.ts +23 -0
- package/dist/actions.js +97 -0
- package/dist/app.d.ts +1 -13
- package/dist/app.js +1 -13
- package/dist/args.d.ts +11 -6
- package/dist/args.js +25 -7
- package/dist/cache.d.ts +2 -4
- package/dist/cache.js +5 -10
- package/dist/catalog.d.ts +45 -4
- package/dist/catalog.js +134 -13
- package/dist/clean-command.d.ts +65 -36
- package/dist/clean-command.js +372 -226
- package/dist/cli.d.ts +24 -57
- package/dist/cli.js +139 -568
- package/dist/commands/browse.d.ts +128 -0
- package/dist/commands/browse.js +153 -0
- package/dist/commands/index.d.ts +25 -0
- package/dist/commands/index.js +71 -0
- package/dist/commands/list.d.ts +224 -0
- package/dist/commands/list.js +178 -0
- package/dist/commands/query.d.ts +166 -0
- package/dist/commands/query.js +73 -0
- package/dist/commands/run.d.ts +114 -0
- package/dist/commands/run.js +139 -0
- package/dist/commands/shared.d.ts +152 -0
- package/dist/commands/shared.js +209 -0
- package/dist/config-command.d.ts +27 -43
- package/dist/config-command.js +129 -330
- package/dist/config-keys.d.ts +25 -0
- package/dist/config-keys.js +29 -0
- package/dist/config.d.ts +272 -257
- package/dist/config.js +611 -460
- package/dist/core/copy-text.d.ts +30 -0
- package/dist/core/copy-text.js +50 -0
- package/dist/core/filter.d.ts +55 -0
- package/dist/core/filter.js +59 -0
- package/dist/core/run.d.ts +22 -0
- package/dist/core/run.js +59 -0
- package/dist/core/saved-view.d.ts +59 -0
- package/dist/core/saved-view.js +119 -0
- package/dist/core/session.d.ts +282 -0
- package/dist/core/session.js +602 -0
- package/dist/core/skills.d.ts +53 -0
- package/dist/core/skills.js +54 -0
- package/dist/core/unknowns.d.ts +72 -0
- package/dist/core/unknowns.js +68 -0
- package/dist/devlink.d.ts +3 -0
- package/dist/devlink.js +5 -2
- package/dist/document-schemas.generated.d.ts +22 -0
- package/dist/document-schemas.generated.js +916 -0
- package/dist/documents.d.ts +508 -0
- package/dist/documents.js +181 -0
- package/dist/groups.d.ts +22 -26
- package/dist/groups.js +13 -29
- package/dist/guide.d.ts +26 -13
- package/dist/guide.js +119 -103
- package/dist/index.d.ts +118 -0
- package/dist/index.js +61 -0
- package/dist/keys.d.ts +51 -0
- package/dist/keys.js +273 -0
- package/dist/page.d.ts +18 -8
- package/dist/page.js +28 -17
- package/dist/providers-command.d.ts +81 -20
- package/dist/providers-command.js +33 -75
- package/dist/schema.d.ts +48 -0
- package/dist/schema.js +61 -0
- package/dist/serve/auth.d.ts +46 -0
- package/dist/serve/auth.js +82 -0
- package/dist/serve/catalog-share.d.ts +63 -0
- package/dist/serve/catalog-share.js +155 -0
- package/dist/serve/index.d.ts +100 -0
- package/dist/serve/index.js +259 -0
- package/dist/serve/routes.d.ts +60 -0
- package/dist/serve/routes.js +186 -0
- package/dist/serve/terminal-input.d.ts +50 -0
- package/dist/serve/terminal-input.js +108 -0
- package/dist/skills.d.ts +19 -0
- package/dist/skills.js +54 -0
- package/dist/terminal-text.d.ts +8 -0
- package/dist/terminal-text.js +19 -6
- package/dist/tool-info.d.ts +24 -0
- package/dist/tool-info.js +17 -0
- package/dist/trust-command.d.ts +15 -27
- package/dist/trust-command.js +110 -208
- package/dist/trust-store.d.ts +5 -10
- package/dist/trust-store.js +9 -42
- package/dist/tui/app.d.ts +193 -0
- package/dist/tui/app.js +1400 -0
- package/dist/tui/copy.d.ts +29 -0
- package/dist/tui/copy.js +39 -0
- package/dist/tui/index.d.ts +33 -0
- package/dist/tui/index.js +97 -0
- package/dist/tui/keys-input.d.ts +27 -0
- package/dist/tui/keys-input.js +87 -0
- package/dist/tui/settings.d.ts +94 -0
- package/dist/tui/settings.js +198 -0
- package/dist/tui/style.d.ts +62 -0
- package/dist/tui/style.js +77 -0
- package/dist/version.d.ts +6 -0
- package/dist/version.js +7 -0
- package/dist/vocabulary.d.ts +91 -0
- package/dist/vocabulary.js +155 -0
- package/dist/web/main.js +2232 -582
- package/dist/web/page.html +41 -33
- package/dist/web/styles.css +513 -329
- package/dist/xdg.d.ts +76 -4
- package/dist/xdg.js +77 -5
- package/package.json +27 -8
- package/schema/config.json +133 -0
- package/dist/http.d.ts +0 -22
- package/dist/http.js +0 -149
- package/dist/origin-owner.d.ts +0 -19
- package/dist/origin-owner.js +0 -85
- package/dist/serve.d.ts +0 -98
- package/dist/serve.js +0 -671
- package/dist/tui.d.ts +0 -177
- package/dist/tui.js +0 -840
package/dist/clean-command.d.ts
CHANGED
|
@@ -1,43 +1,72 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* holds something.
|
|
2
|
+
* `way clean`: the data wayfinder keeps outside your repositories. Bare
|
|
3
|
+
* `clean` only reports what each store is, where it is, and whether anything
|
|
4
|
+
* is in it. A flag names what to remove; with no flag nothing is removed.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
6
|
+
* | flag | store |
|
|
7
|
+
* |---|---|
|
|
8
|
+
* | `--cache` | stored probe results: derived, costs one slow probe |
|
|
9
|
+
* | `--trust` | the repositories you trusted: consent, asked again |
|
|
10
|
+
* | `--user-config` | your user config: the only store a person wrote, so it needs `--yes` |
|
|
11
|
+
* | `--dev` | `way dev` link state, and the `way dev install` shims on PATH |
|
|
12
|
+
* | `--legacy` | files kept under the tool's name before its first release |
|
|
8
13
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
14
|
+
* `--everything` is every one of them, and needs `--yes`. A store that is only
|
|
15
|
+
* listed when it holds something (shims, old files) is left out of the report
|
|
16
|
+
* when it is empty. Once a store is gone, the directories above it are removed
|
|
17
|
+
* while they are empty, up to the base directory (`~/.config`, say).
|
|
13
18
|
*
|
|
14
|
-
*
|
|
19
|
+
* Nothing inside a repository is touched: `wayfinder.config.json` belongs to
|
|
20
|
+
* the project. A user config that `WAYFINDER_CONFIG` names is named with the
|
|
21
|
+
* variable in the report and again before it is removed, since it may live in
|
|
22
|
+
* a dotfiles repository.
|
|
15
23
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* So `--config` (and `--all`, which includes it) also needs `--yes`.
|
|
25
|
-
*
|
|
26
|
-
* ## What it will not touch
|
|
27
|
-
*
|
|
28
|
-
* Anything inside a repository. `wayfinder.config.json` is a project file that
|
|
29
|
-
* belongs to whoever wrote it, not to this tool's data. Only paths under the
|
|
30
|
-
* user's home (or their XDG overrides) are removed.
|
|
31
|
-
*
|
|
32
|
-
* `stdout`, `stderr`, `env` and `home` are injected, so a test cannot read or
|
|
33
|
-
* delete the developer's real stores.
|
|
24
|
+
* Clean removes only what it owns. A file store must be a file (a symbolic
|
|
25
|
+
* link is removed, not its target), a directory store a directory, and no
|
|
26
|
+
* store may be the home directory, a directory above it or a filesystem root.
|
|
27
|
+
* A store whose path is, holds or sits in another flag's store is removed
|
|
28
|
+
* only with `--yes`.
|
|
29
|
+
* A file `WAYFINDER_CONFIG` names is removed only when its `$schema` names
|
|
30
|
+
* wayfinder's config schema, which every file wayfinder writes has.
|
|
34
31
|
*/
|
|
35
|
-
import {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
import { z } from 'zod';
|
|
33
|
+
import { type DataCommand } from '@osdlc/cli-tool/command';
|
|
34
|
+
import type { FlagSpec } from '@osdlc/cli-tool/define-cli';
|
|
35
|
+
import { type CommandEnvOptions } from './config-command.ts';
|
|
36
|
+
/** What a flag removes. */
|
|
37
|
+
export type StoreKey = 'cache' | 'trust' | 'config' | 'dev' | 'legacy';
|
|
38
|
+
/** `way clean`'s output. */
|
|
39
|
+
export declare const CleanOutputSchema: z.ZodObject<{
|
|
40
|
+
mode: z.ZodEnum<{
|
|
41
|
+
report: "report";
|
|
42
|
+
remove: "remove";
|
|
43
|
+
}>;
|
|
44
|
+
stores: z.ZodArray<z.ZodObject<{
|
|
45
|
+
key: z.ZodEnum<{
|
|
46
|
+
config: "config";
|
|
47
|
+
trust: "trust";
|
|
48
|
+
cache: "cache";
|
|
49
|
+
dev: "dev";
|
|
50
|
+
legacy: "legacy";
|
|
51
|
+
}>;
|
|
52
|
+
flag: z.ZodString;
|
|
53
|
+
what: z.ZodString;
|
|
54
|
+
path: z.ZodString;
|
|
55
|
+
bytes: z.ZodNullable<z.ZodNumber>;
|
|
56
|
+
removed: z.ZodBoolean;
|
|
57
|
+
envVar: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
/** What {@link cleanCommand} takes, beside the app's global flags. */
|
|
61
|
+
export interface CleanCommandOptions extends CommandEnvOptions {
|
|
62
|
+
/** The platform the paths are for. Defaults to `process.platform`. */
|
|
63
|
+
platform?: string;
|
|
42
64
|
}
|
|
43
|
-
|
|
65
|
+
/**
|
|
66
|
+
* The `clean` command. Mount it as `clean: cleanCommand({ globals })`.
|
|
67
|
+
* A call with a flag that removes something is `cli-only`: the MCP and HTTP
|
|
68
|
+
* adapters refuse it. A bare `clean`, the report, is open to them.
|
|
69
|
+
*/
|
|
70
|
+
export declare function cleanCommand<G extends FlagSpec = Record<never, never>>(options?: CleanCommandOptions & {
|
|
71
|
+
globals?: G;
|
|
72
|
+
}): DataCommand;
|