@follenfang/wowdoc 0.0.4 → 0.0.5
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 +9 -15
- package/package.json +2 -3
- package/scripts/check-package.mjs +8 -2
- package/scripts/install.mjs +14 -15
- package/bin/wowdata.mjs +0 -3
package/README.md
CHANGED
|
@@ -13,24 +13,20 @@ The product is CLI-only. The included Agent Skill translates a natural-language
|
|
|
13
13
|
```powershell
|
|
14
14
|
npm install -g @follenfang/wowdoc
|
|
15
15
|
wowdoc --version
|
|
16
|
-
|
|
16
|
+
wowdoc --help
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
The package installs
|
|
20
|
-
|
|
21
|
-
- `wowdoc`: read-only source queries and explicit source/index operations;
|
|
22
|
-
- `wowdata`: local data initialization, update, cleanup, and uninstall;
|
|
23
|
-
- the `wowdoc` Skill in `~/.agents/skills/wowdoc`.
|
|
19
|
+
The package installs the `wowdoc` CLI and the `wowdoc` Skill in `~/.agents/skills/wowdoc`. The single CLI handles queries, source/index operations, initialization, updates, cleanup, and uninstall.
|
|
24
20
|
|
|
25
21
|
Run the one-time data initialization before querying source:
|
|
26
22
|
|
|
27
23
|
```powershell
|
|
28
|
-
|
|
24
|
+
wowdoc init
|
|
29
25
|
```
|
|
30
26
|
|
|
31
27
|
Initialization creates `~/.wowdoc`, fetches the configured Git mirrors, and builds searchable SQLite snapshots for each product branch and its hot Tags. It can take time and substantial disk space. The command is resumable: rerunning it keeps completed work and continues failed or pending snapshots.
|
|
32
28
|
|
|
33
|
-
If Git is missing, `
|
|
29
|
+
If Git is missing, `wowdoc init` detects the platform package manager, shows the exact package and installer command, installs Git, refreshes `PATH`, and verifies `git --version`. `wowdoc doctor` remains read-only.
|
|
34
30
|
|
|
35
31
|
## Supported source
|
|
36
32
|
|
|
@@ -86,8 +82,7 @@ wowdoc query|explore|inspect|diff|validate
|
|
|
86
82
|
wowdoc source list|check|sync
|
|
87
83
|
wowdoc index build|refresh|status
|
|
88
84
|
wowdoc doctor
|
|
89
|
-
|
|
90
|
-
wowdata init|update|clean|uninstall
|
|
85
|
+
wowdoc init|update|clean|uninstall
|
|
91
86
|
```
|
|
92
87
|
|
|
93
88
|
Common lifecycle:
|
|
@@ -103,10 +98,10 @@ wowdoc source sync --source elvui --product main
|
|
|
103
98
|
wowdoc index refresh --source elvui --product main --ref latest
|
|
104
99
|
|
|
105
100
|
# Preview cleanup; no files are deleted
|
|
106
|
-
|
|
101
|
+
wowdoc clean
|
|
107
102
|
```
|
|
108
103
|
|
|
109
|
-
Use `
|
|
104
|
+
Use `wowdoc clean --yes` only after reviewing its candidates. Removing indexed versions requires an explicit version or range. `wowdoc uninstall` requires confirmation and removes the npm package, managed Skill, and `~/.wowdoc` data.
|
|
110
105
|
|
|
111
106
|
## Storage model
|
|
112
107
|
|
|
@@ -114,7 +109,7 @@ Local state lives under `~/.wowdoc`:
|
|
|
114
109
|
|
|
115
110
|
```text
|
|
116
111
|
config/ versioned source catalog and local configuration
|
|
117
|
-
repositories/ bare
|
|
112
|
+
repositories/ complete bare Git mirrors
|
|
118
113
|
objects/ content-addressed source and asset bytes
|
|
119
114
|
ast/ auditable per-file JSON syntax trees
|
|
120
115
|
indexes/ one WAL SQLite database per product branch
|
|
@@ -142,10 +137,9 @@ go test ./...
|
|
|
142
137
|
go vet ./...
|
|
143
138
|
npm pack --dry-run
|
|
144
139
|
go run ./cmd/wowdoc --help
|
|
145
|
-
go run ./cmd/wowdata --help
|
|
146
140
|
```
|
|
147
141
|
|
|
148
|
-
Release tags use `vMAJOR.MINOR.PATCH`. GitHub Actions tests the project, builds `wowdoc`
|
|
142
|
+
Release tags use `vMAJOR.MINOR.PATCH`. GitHub Actions tests the project, builds `wowdoc` for Windows amd64, Linux amd64/arm64, and macOS amd64/arm64, publishes checksums and a GitHub Release, then publishes the matching npm version through npm Trusted Publisher OIDC with provenance.
|
|
149
143
|
|
|
150
144
|
## License
|
|
151
145
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@follenfang/wowdoc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Auditable WoW UI source intelligence CLI for coding agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"url": "https://github.com/Follen/wowdoc"
|
|
10
10
|
},
|
|
11
11
|
"bin": {
|
|
12
|
-
"wowdoc": "bin/wowdoc.mjs"
|
|
13
|
-
"wowdata": "bin/wowdata.mjs"
|
|
12
|
+
"wowdoc": "bin/wowdoc.mjs"
|
|
14
13
|
},
|
|
15
14
|
"files": [
|
|
16
15
|
"bin/",
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
|
|
3
|
+
for (const path of ["bin/wowdoc.mjs", "scripts/install.mjs", "skill/SKILL.md"]) {
|
|
3
4
|
if (!existsSync(new URL(`../${path}`, import.meta.url))) throw new Error(`package file missing: ${path}`);
|
|
4
5
|
}
|
|
6
|
+
|
|
7
|
+
const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
8
|
+
if (JSON.stringify(pkg.bin) !== JSON.stringify({ wowdoc: "bin/wowdoc.mjs" })) {
|
|
9
|
+
throw new Error("package must expose only the wowdoc executable");
|
|
10
|
+
}
|
package/scripts/install.mjs
CHANGED
|
@@ -20,22 +20,21 @@ if (!platform) throw new Error(`unsupported_platform: ${process.platform}-${proc
|
|
|
20
20
|
const nativeDir = join(root, "native");
|
|
21
21
|
mkdirSync(nativeDir, { recursive: true });
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
if (process.platform !== "win32") chmodSync(target, 0o755);
|
|
23
|
+
const name = "wowdoc";
|
|
24
|
+
const target = join(nativeDir, name + suffix);
|
|
25
|
+
const supplied = process.env.WOWDOC_BINARY_DIR && join(process.env.WOWDOC_BINARY_DIR, name + suffix);
|
|
26
|
+
if (supplied && existsSync(supplied)) {
|
|
27
|
+
cpSync(supplied, target);
|
|
28
|
+
} else if (existsSync(join(root, "go.mod"))) {
|
|
29
|
+
execFileSync("go", ["build", "-trimpath", "-ldflags", `-s -w -X github.com/follenfang/wowdoc/internal/app.Version=${pkg.version}`, "-o", target, `./cmd/${name}`], { cwd: root, stdio: "inherit" });
|
|
30
|
+
} else {
|
|
31
|
+
const asset = `${name}-${platform}${suffix}`;
|
|
32
|
+
const url = `https://github.com/Follen/wowdoc/releases/download/v${pkg.version}/${asset}`;
|
|
33
|
+
const response = await fetch(url, { redirect: "follow" });
|
|
34
|
+
if (!response.ok) throw new Error(`binary_download_failed: ${response.status} ${url}`);
|
|
35
|
+
writeFileSync(target, Buffer.from(await response.arrayBuffer()));
|
|
38
36
|
}
|
|
37
|
+
if (process.platform !== "win32") chmodSync(target, 0o755);
|
|
39
38
|
|
|
40
39
|
const skillSource = join(root, "skill");
|
|
41
40
|
const skillTarget = join(homedir(), ".agents", "skills", "wowdoc");
|
package/bin/wowdata.mjs
DELETED