skillwiki 0.9.21 → 0.9.22
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
CHANGED
|
@@ -8,10 +8,6 @@ import {
|
|
|
8
8
|
normalizeDistTag,
|
|
9
9
|
semverGt
|
|
10
10
|
} from "./chunk-E6UWZ3S3.js";
|
|
11
|
-
import {
|
|
12
|
-
git,
|
|
13
|
-
gitStrict
|
|
14
|
-
} from "./chunk-TPS5XD2J.js";
|
|
15
11
|
|
|
16
12
|
// src/cli.ts
|
|
17
13
|
import { join as join49 } from "path";
|
|
@@ -10154,6 +10150,19 @@ ${body}`;
|
|
|
10154
10150
|
import { existsSync as existsSync17 } from "fs";
|
|
10155
10151
|
import { join as join42 } from "path";
|
|
10156
10152
|
|
|
10153
|
+
// src/utils/git.ts
|
|
10154
|
+
import { execFileSync } from "child_process";
|
|
10155
|
+
function git(cwd, args) {
|
|
10156
|
+
try {
|
|
10157
|
+
return execFileSync("git", args, { cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
10158
|
+
} catch {
|
|
10159
|
+
return "";
|
|
10160
|
+
}
|
|
10161
|
+
}
|
|
10162
|
+
function gitStrict(cwd, args) {
|
|
10163
|
+
return execFileSync("git", args, { cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
10164
|
+
}
|
|
10165
|
+
|
|
10157
10166
|
// src/utils/sync-lock.ts
|
|
10158
10167
|
import { existsSync as existsSync16, mkdirSync as mkdirSync6, readFileSync as readFileSync11, renameSync as renameSync2, unlinkSync as unlinkSync5, writeFileSync as writeFileSync7 } from "fs";
|
|
10159
10168
|
import { join as join41 } from "path";
|
|
@@ -10264,6 +10273,15 @@ var VAULT_GENERATED_COMMIT_EXCLUDES = [
|
|
|
10264
10273
|
...VAULT_GENERATED_COMMIT_PATHS.map((path) => `:!${path}`)
|
|
10265
10274
|
];
|
|
10266
10275
|
var VAULT_COMMIT_PATHSPEC = [".", ...VAULT_GENERATED_COMMIT_EXCLUDES];
|
|
10276
|
+
function stageVaultContentChanges(vault) {
|
|
10277
|
+
gitStrict(vault, ["add", "-A", "--", "."]);
|
|
10278
|
+
for (const generatedPath of VAULT_GENERATED_COMMIT_PATHS) {
|
|
10279
|
+
try {
|
|
10280
|
+
gitStrict(vault, ["reset", "HEAD", "--", generatedPath]);
|
|
10281
|
+
} catch (_e) {
|
|
10282
|
+
}
|
|
10283
|
+
}
|
|
10284
|
+
}
|
|
10267
10285
|
|
|
10268
10286
|
// src/commands/sync.ts
|
|
10269
10287
|
function runSyncStatus(input) {
|
|
@@ -10390,13 +10408,7 @@ async function runSyncPush(input) {
|
|
|
10390
10408
|
};
|
|
10391
10409
|
}
|
|
10392
10410
|
try {
|
|
10393
|
-
|
|
10394
|
-
for (const generatedPath of VAULT_GENERATED_COMMIT_PATHS) {
|
|
10395
|
-
try {
|
|
10396
|
-
gitStrict(vault, ["reset", "HEAD", "--", generatedPath]);
|
|
10397
|
-
} catch (_e) {
|
|
10398
|
-
}
|
|
10399
|
-
}
|
|
10411
|
+
stageVaultContentChanges(vault);
|
|
10400
10412
|
} catch (e) {
|
|
10401
10413
|
return {
|
|
10402
10414
|
exitCode: ExitCode.SYNC_PUSH_FAILED,
|
|
@@ -11383,15 +11395,8 @@ async function postCommit(vault, exitCode) {
|
|
|
11383
11395
|
if (lastOps.length === 0) return;
|
|
11384
11396
|
const porcelain = git(vault, ["status", "--porcelain", "--", ...VAULT_COMMIT_PATHSPEC]);
|
|
11385
11397
|
if (!porcelain || porcelain.trim().length === 0) return;
|
|
11386
|
-
const { gitStrict: gitStrict2 } = await import("./git-M4WGJ5G3.js");
|
|
11387
11398
|
try {
|
|
11388
|
-
|
|
11389
|
-
for (const generatedPath of VAULT_GENERATED_COMMIT_PATHS) {
|
|
11390
|
-
try {
|
|
11391
|
-
gitStrict2(vault, ["reset", "HEAD", "--", generatedPath]);
|
|
11392
|
-
} catch (_e) {
|
|
11393
|
-
}
|
|
11394
|
-
}
|
|
11399
|
+
stageVaultContentChanges(vault);
|
|
11395
11400
|
} catch (e) {
|
|
11396
11401
|
process.stderr.write(`auto-commit: git add failed: ${String(e)}
|
|
11397
11402
|
`);
|
|
@@ -11399,7 +11404,7 @@ async function postCommit(vault, exitCode) {
|
|
|
11399
11404
|
}
|
|
11400
11405
|
const commitMessage = lastOps.map((op) => `${op.operation}: ${op.summary} (${op.files.length} files)`).join("; ");
|
|
11401
11406
|
try {
|
|
11402
|
-
|
|
11407
|
+
gitStrict(vault, ["commit", "-m", commitMessage]);
|
|
11403
11408
|
} catch (e) {
|
|
11404
11409
|
process.stderr.write(`auto-commit: git commit failed: ${String(e)}
|
|
11405
11410
|
`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.22",
|
|
4
4
|
"skills": "./",
|
|
5
5
|
"description": "Project-aware Karpathy-style knowledge base for Claude Code: 18 prompt-only skills (wiki-*, proj-*, using-skillwiki) backed by the deterministic `skillwiki` CLI.",
|
|
6
6
|
"author": {
|
package/skills/package.json
CHANGED
package/dist/chunk-TPS5XD2J.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// src/utils/git.ts
|
|
4
|
-
import { execFileSync } from "child_process";
|
|
5
|
-
function git(cwd, args) {
|
|
6
|
-
try {
|
|
7
|
-
return execFileSync("git", args, { cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
8
|
-
} catch {
|
|
9
|
-
return "";
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
function gitStrict(cwd, args) {
|
|
13
|
-
return execFileSync("git", args, { cwd, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
git,
|
|
18
|
-
gitStrict
|
|
19
|
-
};
|