skilld 1.7.3 → 2.0.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/dist/_chunks/add.mjs +66 -0
- package/dist/_chunks/add.mjs.map +1 -0
- package/dist/_chunks/agent-prompt.mjs +88 -0
- package/dist/_chunks/agent-prompt.mjs.map +1 -0
- package/dist/_chunks/agent.mjs +737 -619
- package/dist/_chunks/agent.mjs.map +1 -1
- package/dist/_chunks/args.mjs +42 -0
- package/dist/_chunks/args.mjs.map +1 -0
- package/dist/_chunks/assemble.mjs +11 -8
- package/dist/_chunks/assemble.mjs.map +1 -1
- package/dist/_chunks/author.mjs +77 -131
- package/dist/_chunks/author.mjs.map +1 -1
- package/dist/_chunks/cache.mjs +320 -54
- package/dist/_chunks/cache.mjs.map +1 -1
- package/dist/_chunks/cache2.mjs +7 -6
- package/dist/_chunks/cache2.mjs.map +1 -1
- package/dist/_chunks/client.mjs +117 -0
- package/dist/_chunks/client.mjs.map +1 -0
- package/dist/_chunks/core.mjs +7 -4
- package/dist/_chunks/detect.mjs +54 -44
- package/dist/_chunks/detect.mjs.map +1 -1
- package/dist/_chunks/eject.mjs +69 -0
- package/dist/_chunks/eject.mjs.map +1 -0
- package/dist/_chunks/embedding-cache2.mjs +2 -2
- package/dist/_chunks/env.mjs +19 -0
- package/dist/_chunks/env.mjs.map +1 -0
- package/dist/_chunks/install-many.mjs +376 -0
- package/dist/_chunks/install-many.mjs.map +1 -0
- package/dist/_chunks/install.mjs +86 -371
- package/dist/_chunks/install.mjs.map +1 -1
- package/dist/_chunks/intro.mjs +63 -0
- package/dist/_chunks/intro.mjs.map +1 -0
- package/dist/_chunks/list.mjs +2 -2
- package/dist/_chunks/list.mjs.map +1 -1
- package/dist/_chunks/lockfile.mjs +31 -7
- package/dist/_chunks/lockfile.mjs.map +1 -1
- package/dist/_chunks/login.mjs +233 -0
- package/dist/_chunks/login.mjs.map +1 -0
- package/dist/_chunks/logout.mjs +27 -0
- package/dist/_chunks/logout.mjs.map +1 -0
- package/dist/_chunks/map.mjs +11 -0
- package/dist/_chunks/map.mjs.map +1 -0
- package/dist/_chunks/markdown.mjs +79 -54
- package/dist/_chunks/markdown.mjs.map +1 -1
- package/dist/_chunks/menu.mjs +33 -0
- package/dist/_chunks/menu.mjs.map +1 -0
- package/dist/_chunks/model-picker.mjs +61 -0
- package/dist/_chunks/model-picker.mjs.map +1 -0
- package/dist/_chunks/monorepo.mjs +73 -0
- package/dist/_chunks/monorepo.mjs.map +1 -0
- package/dist/_chunks/package-json.mjs.map +1 -1
- package/dist/_chunks/paths.mjs +47 -0
- package/dist/_chunks/paths.mjs.map +1 -0
- package/dist/_chunks/pipeline.mjs +985 -0
- package/dist/_chunks/pipeline.mjs.map +1 -0
- package/dist/_chunks/pool2.mjs +2 -2
- package/dist/_chunks/portable.mjs +151 -0
- package/dist/_chunks/portable.mjs.map +1 -0
- package/dist/_chunks/prepare-hook.mjs +2 -0
- package/dist/_chunks/prepare-hook2.mjs +61 -0
- package/dist/_chunks/prepare-hook2.mjs.map +1 -0
- package/dist/_chunks/prepare.mjs +47 -3
- package/dist/_chunks/prepare.mjs.map +1 -1
- package/dist/_chunks/prepare2.mjs +9 -8
- package/dist/_chunks/prepare2.mjs.map +1 -1
- package/dist/_chunks/prompts.mjs +784 -26
- package/dist/_chunks/prompts.mjs.map +1 -1
- package/dist/_chunks/pull.mjs +219 -0
- package/dist/_chunks/pull.mjs.map +1 -0
- package/dist/_chunks/regex.mjs +19 -0
- package/dist/_chunks/regex.mjs.map +1 -0
- package/dist/_chunks/retriv.mjs +2 -171
- package/dist/_chunks/retriv2.mjs +159 -0
- package/dist/_chunks/retriv2.mjs.map +1 -0
- package/dist/_chunks/sanitize.mjs +12 -9
- package/dist/_chunks/sanitize.mjs.map +1 -1
- package/dist/_chunks/search-helpers.mjs +9 -8
- package/dist/_chunks/search-helpers.mjs.map +1 -1
- package/dist/_chunks/search-interactive.mjs +23 -20
- package/dist/_chunks/search-interactive.mjs.map +1 -1
- package/dist/_chunks/search.mjs +3 -4
- package/dist/_chunks/search.mjs.map +1 -1
- package/dist/_chunks/{sources.mjs → semver.mjs} +1128 -838
- package/dist/_chunks/semver.mjs.map +1 -0
- package/dist/_chunks/skill-installer.mjs +2 -0
- package/dist/_chunks/skill-installer2.mjs +154 -0
- package/dist/_chunks/skill-installer2.mjs.map +1 -0
- package/dist/_chunks/skills.mjs +12 -12
- package/dist/_chunks/skills.mjs.map +1 -1
- package/dist/_chunks/store.mjs +107 -0
- package/dist/_chunks/store.mjs.map +1 -0
- package/dist/_chunks/sync.mjs +761 -1349
- package/dist/_chunks/sync.mjs.map +1 -1
- package/dist/_chunks/sync2.mjs +2 -3
- package/dist/_chunks/telemetry.mjs +26 -0
- package/dist/_chunks/telemetry.mjs.map +1 -0
- package/dist/_chunks/uninstall.mjs +15 -13
- package/dist/_chunks/uninstall.mjs.map +1 -1
- package/dist/_chunks/update.mjs +171 -0
- package/dist/_chunks/update.mjs.map +1 -0
- package/dist/_chunks/upload.mjs +4 -4
- package/dist/_chunks/validate.mjs +1 -1
- package/dist/_chunks/version.mjs +16 -27
- package/dist/_chunks/version.mjs.map +1 -1
- package/dist/_chunks/whoami.mjs +21 -0
- package/dist/_chunks/whoami.mjs.map +1 -0
- package/dist/_chunks/wizard.mjs +2 -190
- package/dist/_chunks/wizard2.mjs +200 -0
- package/dist/_chunks/wizard2.mjs.map +1 -0
- package/dist/cli.mjs +77 -59
- package/dist/cli.mjs.map +1 -1
- package/dist/prepare.mjs +5 -4
- package/dist/prepare.mjs.map +1 -1
- package/dist/retriv/worker.d.mts +5 -1
- package/dist/retriv/worker.d.mts.map +1 -1
- package/dist/retriv/worker.mjs +1 -1
- package/package.json +20 -29
- package/dist/_chunks/author-group.mjs +0 -17
- package/dist/_chunks/author-group.mjs.map +0 -1
- package/dist/_chunks/cli-helpers.mjs +0 -335
- package/dist/_chunks/cli-helpers.mjs.map +0 -1
- package/dist/_chunks/cli-helpers2.mjs +0 -2
- package/dist/_chunks/config.mjs +0 -122
- package/dist/_chunks/config.mjs.map +0 -1
- package/dist/_chunks/index.d.mts +0 -151
- package/dist/_chunks/index.d.mts.map +0 -1
- package/dist/_chunks/index2.d.mts +0 -44
- package/dist/_chunks/index2.d.mts.map +0 -1
- package/dist/_chunks/index3.d.mts +0 -589
- package/dist/_chunks/index3.d.mts.map +0 -1
- package/dist/_chunks/prefix.mjs +0 -108
- package/dist/_chunks/prefix.mjs.map +0 -1
- package/dist/_chunks/retriv.mjs.map +0 -1
- package/dist/_chunks/setup.mjs +0 -17
- package/dist/_chunks/setup.mjs.map +0 -1
- package/dist/_chunks/shared.mjs +0 -503
- package/dist/_chunks/shared.mjs.map +0 -1
- package/dist/_chunks/skill.mjs +0 -329
- package/dist/_chunks/skill.mjs.map +0 -1
- package/dist/_chunks/sources.mjs.map +0 -1
- package/dist/_chunks/sync-registry.mjs +0 -59
- package/dist/_chunks/sync-registry.mjs.map +0 -1
- package/dist/_chunks/sync-shared.mjs +0 -2
- package/dist/_chunks/sync-shared2.mjs +0 -1020
- package/dist/_chunks/sync-shared2.mjs.map +0 -1
- package/dist/_chunks/types.d.mts +0 -88
- package/dist/_chunks/types.d.mts.map +0 -1
- package/dist/_chunks/wizard.mjs.map +0 -1
- package/dist/agent/index.d.mts +0 -346
- package/dist/agent/index.d.mts.map +0 -1
- package/dist/agent/index.mjs +0 -5
- package/dist/cache/index.d.mts +0 -2
- package/dist/cache/index.mjs +0 -4
- package/dist/index.d.mts +0 -5
- package/dist/index.mjs +0 -5
- package/dist/retriv/index.d.mts +0 -3
- package/dist/retriv/index.mjs +0 -2
- package/dist/sources/index.d.mts +0 -2
- package/dist/sources/index.mjs +0 -3
- package/dist/types.d.mts +0 -4
- package/dist/types.mjs +0 -1
package/dist/_chunks/prefix.mjs
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { h as parseGitSkillInput } from "./sources.mjs";
|
|
2
|
-
function parseSkillInput(input) {
|
|
3
|
-
const trimmed = input.trim();
|
|
4
|
-
if (trimmed.startsWith("npm:")) {
|
|
5
|
-
const { name, tag } = splitPackageTag(trimmed.slice(4));
|
|
6
|
-
return {
|
|
7
|
-
type: "npm",
|
|
8
|
-
package: name,
|
|
9
|
-
tag
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
if (trimmed.startsWith("crate:")) {
|
|
13
|
-
const rest = trimmed.slice(6).trim();
|
|
14
|
-
const atIdx = rest.indexOf("@");
|
|
15
|
-
return {
|
|
16
|
-
type: "crate",
|
|
17
|
-
package: (atIdx === -1 ? rest : rest.slice(0, atIdx)).toLowerCase(),
|
|
18
|
-
version: atIdx === -1 ? void 0 : rest.slice(atIdx + 1) || void 0
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
if (trimmed.startsWith("gh:") || trimmed.startsWith("github:")) {
|
|
22
|
-
const rest = trimmed.startsWith("gh:") ? trimmed.slice(3) : trimmed.slice(7);
|
|
23
|
-
const gitSource = parseGitSkillInput(rest);
|
|
24
|
-
if (gitSource) return {
|
|
25
|
-
type: "git",
|
|
26
|
-
source: gitSource
|
|
27
|
-
};
|
|
28
|
-
if (/^[\w.-]+\/[\w.-]+/.test(rest)) {
|
|
29
|
-
const [owner, repo] = rest.split("/");
|
|
30
|
-
return {
|
|
31
|
-
type: "git",
|
|
32
|
-
source: {
|
|
33
|
-
type: "github",
|
|
34
|
-
owner,
|
|
35
|
-
repo
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
type: "bare",
|
|
41
|
-
package: rest
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
if (trimmed.startsWith("@")) {
|
|
45
|
-
const rest = trimmed.slice(1);
|
|
46
|
-
if (rest.indexOf("/") === -1) return {
|
|
47
|
-
type: "curator",
|
|
48
|
-
handle: rest
|
|
49
|
-
};
|
|
50
|
-
const { name, tag } = splitPackageTag(trimmed);
|
|
51
|
-
return {
|
|
52
|
-
type: "bare",
|
|
53
|
-
package: name,
|
|
54
|
-
tag
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
const gitSource = parseGitSkillInput(trimmed);
|
|
58
|
-
if (gitSource) return {
|
|
59
|
-
type: "git",
|
|
60
|
-
source: gitSource
|
|
61
|
-
};
|
|
62
|
-
const { name, tag } = splitPackageTag(trimmed);
|
|
63
|
-
return {
|
|
64
|
-
type: "bare",
|
|
65
|
-
package: name,
|
|
66
|
-
tag
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
function resolveSkillName(input) {
|
|
70
|
-
const source = parseSkillInput(input);
|
|
71
|
-
switch (source.type) {
|
|
72
|
-
case "npm":
|
|
73
|
-
case "bare": return source.package;
|
|
74
|
-
case "crate": return `crate:${source.package}`;
|
|
75
|
-
case "git":
|
|
76
|
-
if (source.source.type === "github" && source.source.repo) return source.source.repo;
|
|
77
|
-
return null;
|
|
78
|
-
case "curator":
|
|
79
|
-
case "collection": return null;
|
|
80
|
-
default: throw new Error(`Unhandled SkillSource type: ${JSON.stringify(source)}`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
function toStoragePackageName(identityName) {
|
|
84
|
-
if (identityName.startsWith("crate:")) return `@skilld-crate/${identityName.slice(6)}`;
|
|
85
|
-
return identityName;
|
|
86
|
-
}
|
|
87
|
-
function splitPackageTag(spec) {
|
|
88
|
-
if (spec.startsWith("@")) {
|
|
89
|
-
const slashIdx = spec.indexOf("/");
|
|
90
|
-
if (slashIdx !== -1) {
|
|
91
|
-
const afterSlash = spec.indexOf("@", slashIdx);
|
|
92
|
-
if (afterSlash !== -1) return {
|
|
93
|
-
name: spec.slice(0, afterSlash),
|
|
94
|
-
tag: spec.slice(afterSlash + 1) || void 0
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
return { name: spec };
|
|
98
|
-
}
|
|
99
|
-
const atIdx = spec.indexOf("@");
|
|
100
|
-
if (atIdx !== -1) return {
|
|
101
|
-
name: spec.slice(0, atIdx),
|
|
102
|
-
tag: spec.slice(atIdx + 1) || void 0
|
|
103
|
-
};
|
|
104
|
-
return { name: spec };
|
|
105
|
-
}
|
|
106
|
-
export { resolveSkillName as n, toStoragePackageName as r, parseSkillInput as t };
|
|
107
|
-
|
|
108
|
-
//# sourceMappingURL=prefix.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prefix.mjs","names":["_exhaustive"],"sources":["../../src/core/prefix.ts"],"sourcesContent":["/**\n * Prefix-based input parser for `skilld add`\n *\n * All sources require an explicit prefix:\n * npm:vue → package skill from registry\n * crate:serde → Rust crate from crates.io\n * gh:owner/repo → git skill\n * github:o/r → git skill (alias)\n * @handle → curator's skills\n * @handle/coll → specific collection\n *\n * Bare names (no prefix) are deprecated but still resolve as npm: with a warning.\n */\n\nimport type { GitSkillSource } from '../sources/git-skills.ts'\nimport { parseGitSkillInput } from '../sources/git-skills.ts'\n\nexport type SkillSource\n = | { type: 'npm', package: string, tag?: string }\n | { type: 'crate', package: string, version?: string }\n | { type: 'git', source: GitSkillSource }\n | { type: 'curator', handle: string }\n | { type: 'collection', handle: string, name: string }\n | { type: 'bare', package: string, tag?: string }\n\n/**\n * Parse a single CLI input token into a typed SkillSource.\n *\n * Does NOT emit deprecation warnings; callers handle that for `bare` type.\n */\nexport function parseSkillInput(input: string): SkillSource {\n const trimmed = input.trim()\n\n // npm: prefix → package skill\n if (trimmed.startsWith('npm:')) {\n const rest = trimmed.slice(4)\n const { name, tag } = splitPackageTag(rest)\n return { type: 'npm', package: name, tag }\n }\n\n // crate: prefix → Rust crate from crates.io\n if (trimmed.startsWith('crate:')) {\n const rest = trimmed.slice(6).trim()\n const atIdx = rest.indexOf('@')\n const name = (atIdx === -1 ? rest : rest.slice(0, atIdx)).toLowerCase()\n const version = atIdx === -1 ? undefined : rest.slice(atIdx + 1) || undefined\n return { type: 'crate', package: name, version }\n }\n\n // gh: or github: prefix → git skill\n if (trimmed.startsWith('gh:') || trimmed.startsWith('github:')) {\n const rest = trimmed.startsWith('gh:') ? trimmed.slice(3) : trimmed.slice(7)\n const gitSource = parseGitSkillInput(rest)\n if (gitSource)\n return { type: 'git', source: gitSource }\n // If gh: prefix used but can't parse as git, treat as github shorthand\n if (/^[\\w.-]+\\/[\\w.-]+/.test(rest)) {\n const [owner, repo] = rest.split('/')\n return { type: 'git', source: { type: 'github', owner, repo } }\n }\n // Invalid gh: input, fall through to bare\n return { type: 'bare', package: rest }\n }\n\n // @handle (curator) or @scope/pkg (npm scoped package)\n if (trimmed.startsWith('@')) {\n const rest = trimmed.slice(1)\n const slashIdx = rest.indexOf('/')\n if (slashIdx === -1) {\n return { type: 'curator', handle: rest }\n }\n // @scope/pkg → treat as npm scoped package (bare, deprecated form)\n // Collections must be installed via npm:@handle/coll or a future prefix.\n const { name, tag } = splitPackageTag(trimmed)\n return { type: 'bare', package: name, tag }\n }\n\n // Try existing git detection (SSH, URLs, local paths, owner/repo shorthand)\n const gitSource = parseGitSkillInput(trimmed)\n if (gitSource)\n return { type: 'git', source: gitSource }\n\n // Bare name (deprecated) → resolves as npm\n const { name, tag } = splitPackageTag(trimmed)\n return { type: 'bare', package: name, tag }\n}\n\n/**\n * Parse multiple CLI input tokens, classifying each.\n */\nexport function parseSkillInputs(inputs: string[]): SkillSource[] {\n return inputs.map(parseSkillInput)\n}\n\n/**\n * Resolve a CLI input to the bare package/skill name used for lookup in the lockfile.\n * Strips `npm:` / `gh:` prefixes. Returns null for curator/collection (not addressable\n * as a single skill name).\n */\nexport function resolveSkillName(input: string): string | null {\n const source = parseSkillInput(input)\n switch (source.type) {\n case 'npm':\n case 'bare':\n return source.package\n case 'crate':\n return `crate:${source.package}`\n case 'git':\n if (source.source.type === 'github' && source.source.repo)\n return source.source.repo\n return null\n case 'curator':\n case 'collection':\n return null\n default: {\n const _exhaustive: never = source\n throw new Error(`Unhandled SkillSource type: ${JSON.stringify(_exhaustive)}`)\n }\n }\n}\n\n/**\n * Map a lockfile/identity package name to the storage-safe name used for\n * cache directories and symlinks. `crate:serde` → `@skilld-crate/serde`;\n * other names pass through unchanged.\n */\nexport function toStoragePackageName(identityName: string): string {\n if (identityName.startsWith('crate:'))\n return `@skilld-crate/${identityName.slice('crate:'.length)}`\n return identityName\n}\n\n/**\n * Split \"package@tag\" into name and optional tag.\n * Handles scoped packages: \"@scope/pkg@tag\"\n */\nfunction splitPackageTag(spec: string): { name: string, tag?: string } {\n // Scoped: @scope/pkg@tag → find the @ after the scope\n if (spec.startsWith('@')) {\n const slashIdx = spec.indexOf('/')\n if (slashIdx !== -1) {\n const afterSlash = spec.indexOf('@', slashIdx)\n if (afterSlash !== -1)\n return { name: spec.slice(0, afterSlash), tag: spec.slice(afterSlash + 1) || undefined }\n }\n return { name: spec }\n }\n // Unscoped: pkg@tag\n const atIdx = spec.indexOf('@')\n if (atIdx !== -1)\n return { name: spec.slice(0, atIdx), tag: spec.slice(atIdx + 1) || undefined }\n return { name: spec }\n}\n"],"mappings":";;;;;EA8BA,OAAgB;GACd,MAAM;GAGN,SAAI;GAEF;GACA;;KAAsB,QAAS,WAAA,SAAA,EAAA;QAAM,OAAA,QAAA,MAAA,EAAA,CAAA,MAAA;QAAK,QAAA,KAAA,QAAA,IAAA;;GAI5C,MAAI;GACF,UAAM,UAAe,KAAA,OAAS,KAAM,MAAA,GAAA,MAAA,EAAA,aAAA;GACpC,SAAM,UAAa,KAAA,KAAQ,IAAI,KAAA,MAAA,QAAA,EAAA,IAAA,KAAA;GAG/B;;KAAwB,QAFV,WAAU,MAAK,IAAA,QAAY,WAAS,UAAQ,EAAA;QAEnB,OADvB,QAAU,WAAK,MAAY,GAAK,QAAM,MAAU,EAAA,GAAI,QAAA,MAAA,EAAA;QACpB,YAAA,mBAAA,KAAA;;GAIlD,MAAI;GACF,QAAM;GACN;EACA,IAAI,oBACK,KAAA,KAAA,EAAA;GAAE,MAAM,CAAA,OAAA,QAAA,KAAA,MAAA,IAAA;GAAO,OAAA;IAAmB,MAAA;IAE3C,QAAI;KACF,MAAO;KACP;KAAS;KAAa;;;SAAiC;SAAM;YAAE;;;KAGxD,QAAM,WAAA,IAAA,EAAA;QAAQ,OAAS,QAAA,MAAA,EAAA;MAAM,KAAA,QAAA,IAAA,KAAA,IAAA,OAAA;;GAIxC,QAAI;GACF;EAEA,MADiB,EAAA,MAAK,QACV,gBACH,QAAA;SAAQ;GAAW,MAAA;GAAc,SAAA;GAI1C;GACA;;OAAuB,YAAS,mBAAA,QAAA;KAAM,WAAA,OAAA;QAAK;;EAI7C;CACA,MAAI,EAAA,MAAA,QACK,gBAAA,QAAA;QAAQ;EAAO,MAAA;EAAmB,SAAA;EAG3C;EACA;;SAAsC,iBAAA,OAAA;OAAK,SAAA,gBAAA,MAAA;;;;;;;GAe7C,OAAgB;EACd,KAAM;EACN,KAAA,cAAe,OAAf;EACE,SAAK,MAAA,IAAA,MAAA,+BAAA,KAAA,UAAA,OAAA,GAAA;;;SAMC,qBAAuB,cAAY;KAEvC,aAAO,WAAA,SAAA,EAAA,OAAA,iBAAA,aAAA,MAAA,EAAA;QACJ;;;;;;;;;IAeT,KAAgB,KAAA,MAAA,aAAqB,EAAA,IAAA,KAA8B;IACjE;;;;;;;EASF,KAAA,KAAS,MAAA,QAAgB,EAAA,IAA8C,KAAA;EAErE;QACQ,EAAA,MAAA,MAAW;;SAGX,oBACF,GAAA,wBAAO,GAAA,mBAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retriv.mjs","names":[],"sources":["../../src/retriv/index.ts"],"sourcesContent":["import type { ChunkEntity, Document, IndexConfig, IndexPhase, IndexProgress, SearchFilter, SearchOptions, SearchResult, SearchSnippet } from './types.ts'\nimport { stripFrontmatter } from '../core/markdown.ts'\n\nexport type { ChunkEntity, Document, IndexConfig, IndexPhase, IndexProgress, SearchFilter, SearchOptions, SearchResult, SearchSnippet }\n\ntype RetrivInstance = Awaited<ReturnType<typeof getDb>>\n\nexport class SearchDepsUnavailableError extends Error {\n constructor(cause: unknown, message?: string) {\n super(message ?? 'Search dependencies unavailable (sqlite-vec or retriv not installed). Search indexing skipped.')\n this.name = 'SearchDepsUnavailableError'\n this.cause = cause\n }\n}\n\nlet _fts5Available: boolean | null = null\n\n/**\n * Probe whether SQLite FTS5 module is available.\n * Windows Node.js binaries often ship without FTS5 compiled in.\n */\nfunction checkFts5(): boolean {\n if (_fts5Available !== null)\n return _fts5Available\n const nodeSqlite = globalThis.process?.getBuiltinModule?.('node:sqlite') as typeof import('node:sqlite') | undefined\n if (!nodeSqlite) {\n _fts5Available = false\n return false\n }\n const db = new nodeSqlite.DatabaseSync(':memory:')\n try {\n db.exec('CREATE VIRTUAL TABLE _fts5_probe USING fts5(content)')\n db.exec('DROP TABLE _fts5_probe')\n _fts5Available = true\n }\n catch {\n _fts5Available = false\n }\n finally {\n db.close()\n }\n return _fts5Available\n}\n\n// Dynamic imports: retriv/chunkers/auto eagerly loads typescript which may not be installed (e.g. npx)\nexport async function getDb(config: Pick<IndexConfig, 'dbPath'>) {\n if (!checkFts5())\n throw new SearchDepsUnavailableError(new Error('FTS5 module not available'), 'SQLite FTS5 module not available. Search indexing skipped. On Windows, run from WSL where FTS5 is included.')\n\n let createRetriv, autoChunker, sqliteMod, sqliteVec, transformersJs, cachedEmbeddings\n try {\n ;([\n { createRetriv },\n { autoChunker },\n sqliteMod,\n sqliteVec,\n { transformersJs },\n { cachedEmbeddings },\n ] = await Promise.all([\n import('retriv'),\n import('retriv/chunkers/auto'),\n import('retriv/db/sqlite'),\n import('sqlite-vec'),\n import('retriv/embeddings/transformers-js'),\n import('./embedding-cache.ts'),\n ]))\n }\n catch (err: any) {\n if (err?.code === 'ERR_MODULE_NOT_FOUND')\n throw new SearchDepsUnavailableError(err)\n throw err\n }\n const embeddings = await cachedEmbeddings(transformersJs())\n return createRetriv({\n driver: sqliteMod.default({\n path: config.dbPath,\n embeddings,\n sqliteVec,\n }),\n chunking: autoChunker(),\n })\n}\n\n/**\n * Index documents in-process (no worker thread).\n * Preferred for tests and environments where worker_threads is unreliable.\n */\nexport async function createIndexDirect(\n documents: Document[],\n config: IndexConfig & { removeIds?: string[] },\n): Promise<void> {\n const db = await getDb(config)\n if (config.removeIds?.length)\n await db.remove?.(config.removeIds)\n await db.index(documents, { onProgress: config.onProgress })\n await db.close?.()\n}\n\n/**\n * Index documents in a background worker thread.\n * Falls back to direct indexing if worker fails to spawn.\n */\nexport async function createIndex(\n documents: Document[],\n config: IndexConfig & { removeIds?: string[] },\n): Promise<void> {\n // Dynamic import justified: search/searchSnippets shouldn't pull in worker_threads\n const { createIndexInWorker } = await import('./pool.ts')\n return createIndexInWorker(documents, config)\n}\n\n/**\n * List all raw document IDs in an existing index.\n * Returns chunk IDs (e.g. \"doc-id#chunk-0\") for chunked docs.\n * Queries sqlite directly to bypass createRetriv's parent-ID deduplication,\n * so callers can use these IDs for exact removal and parent-ID grouping.\n */\nexport async function listIndexIds(\n config: Pick<IndexConfig, 'dbPath'>,\n): Promise<string[]> {\n const nodeSqlite = globalThis.process?.getBuiltinModule?.('node:sqlite') as typeof import('node:sqlite') | undefined\n if (!nodeSqlite)\n return []\n const db = new nodeSqlite.DatabaseSync(config.dbPath, { open: true, readOnly: true })\n try {\n const rows = db.prepare('SELECT id FROM documents_meta').all() as Array<{ id: string }>\n return rows.map(r => r.id)\n }\n finally {\n db.close()\n }\n}\n\n/**\n * Remove documents by ID from an existing index.\n */\nexport async function removeFromIndex(\n ids: string[],\n config: Pick<IndexConfig, 'dbPath'>,\n): Promise<void> {\n if (ids.length === 0)\n return\n const db = await getDb(config)\n await db.remove?.(ids)\n await db.close?.()\n}\n\nexport async function search(\n query: string,\n config: IndexConfig,\n options: SearchOptions = {},\n): Promise<SearchResult[]> {\n const { limit = 10, filter } = options\n const db = await getDb(config)\n const results = await db.search(query, { limit, filter, returnContent: true, returnMetadata: true, returnMeta: true })\n await db.close?.()\n\n return results.map(r => ({\n id: r.id,\n content: r.content ?? '',\n score: r.score,\n metadata: r.metadata ?? {},\n highlights: r._meta?.highlights ?? [],\n lineRange: r._chunk?.lineRange,\n entities: r._chunk?.entities,\n scope: r._chunk?.scope,\n }))\n}\n\n/**\n * Search and return formatted snippets\n */\nexport async function searchSnippets(\n query: string,\n config: IndexConfig,\n options: SearchOptions = {},\n): Promise<SearchSnippet[]> {\n const results = await search(query, config, options)\n return toSnippets(results)\n}\n\nfunction toSnippets(results: SearchResult[]): SearchSnippet[] {\n return results.map((r) => {\n const content = stripFrontmatter(r.content)\n const source = r.metadata.source || r.id\n const lines = content.split('\\n').length\n\n return {\n package: r.metadata.package || 'unknown',\n source,\n lineStart: r.lineRange?.[0] ?? 1,\n lineEnd: r.lineRange?.[1] ?? lines,\n content,\n score: r.score,\n highlights: r.highlights,\n entities: r.entities,\n scope: r.scope,\n }\n })\n}\n\n// ── Pooled DB access for interactive search ──\n\nexport async function openPool(dbPaths: string[]): Promise<Map<string, RetrivInstance>> {\n const pool = new Map<string, RetrivInstance>()\n await Promise.all(dbPaths.map(async (dbPath) => {\n const db = await getDb({ dbPath })\n pool.set(dbPath, db)\n }))\n return pool\n}\n\nexport async function searchPooled(\n query: string,\n pool: Map<string, RetrivInstance>,\n options: SearchOptions = {},\n): Promise<SearchSnippet[]> {\n const { limit = 10, filter } = options\n const fetchLimit = limit * 2 // Over-fetch to compensate for dedup\n const allResults = await Promise.all(\n Array.from(pool.values(), async (db) => {\n const results = await db.search(query, { limit: fetchLimit, filter, returnContent: true, returnMetadata: true, returnMeta: true })\n return results.map(r => ({\n id: r.id,\n content: r.content ?? '',\n score: r.score,\n metadata: r.metadata ?? {},\n highlights: r._meta?.highlights ?? [],\n lineRange: r._chunk?.lineRange as [number, number] | undefined,\n entities: r._chunk?.entities,\n scope: r._chunk?.scope,\n }))\n }),\n )\n // Deduplicate by source+lineRange (overlapping chunks from same doc)\n const seen = new Set<string>()\n const merged = allResults.flat()\n .sort((a, b) => b.score - a.score)\n .filter((r) => {\n const lr = r.lineRange\n const key = `${r.metadata.source || r.id}:${lr?.[0]}-${lr?.[1]}`\n if (seen.has(key))\n return false\n seen.add(key)\n return true\n })\n .slice(0, limit)\n return toSnippets(merged)\n}\n\nexport async function closePool(pool: Map<string, RetrivInstance>): Promise<void> {\n await Promise.all(Array.from(pool.values(), db => db.close?.()))\n pool.clear()\n}\n"],"mappings":"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"}
|
package/dist/_chunks/setup.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { b as resolveAgent, x as sharedArgs } from "./cli-helpers.mjs";
|
|
2
|
-
import { t as runWizard } from "./wizard.mjs";
|
|
3
|
-
import { defineCommand } from "citty";
|
|
4
|
-
const setupCommandDef = defineCommand({
|
|
5
|
-
meta: {
|
|
6
|
-
name: "setup",
|
|
7
|
-
description: "Re-run the setup wizard to configure features and model"
|
|
8
|
-
},
|
|
9
|
-
args: { agent: sharedArgs.agent },
|
|
10
|
-
async run({ args }) {
|
|
11
|
-
const agent = resolveAgent(args.agent);
|
|
12
|
-
await runWizard({ agent: agent && agent !== "none" ? agent : void 0 });
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
export { setupCommandDef };
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=setup.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.mjs","names":[],"sources":["../../src/commands/setup.ts"],"sourcesContent":["import type { AgentType } from '../agent/index.ts'\nimport { defineCommand } from 'citty'\nimport { resolveAgent, sharedArgs } from '../cli-helpers.ts'\nimport { runWizard } from './wizard.ts'\n\nexport const setupCommandDef = defineCommand({\n meta: {\n name: 'setup',\n description: 'Re-run the setup wizard to configure features and model',\n },\n args: {\n agent: sharedArgs.agent,\n },\n async run({ args }) {\n const agent = resolveAgent(args.agent)\n await runWizard({\n agent: agent && agent !== 'none' ? agent as AgentType : undefined,\n })\n },\n})\n"],"mappings":";;;AAKA,MAAa,kBAAkB,cAAc;CAC3C,MAAM;EACJ,MAAM;EACN,aAAa;EACd;CACD,MAAM,EACJ,OAAO,WAAW,OACnB;CACD,MAAM,IAAI,EAAE,QAAQ;EAClB,MAAM,QAAQ,aAAa,KAAK,MAAM;EACtC,MAAM,UAAU,EACd,OAAO,SAAS,UAAU,SAAS,QAAqB,KAAA,GACzD,CAAC;;CAEL,CAAC"}
|
package/dist/_chunks/shared.mjs
DELETED
|
@@ -1,503 +0,0 @@
|
|
|
1
|
-
import { join } from "pathe";
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { execSync } from "node:child_process";
|
|
4
|
-
import { diff, gt, valid } from "semver";
|
|
5
|
-
import { isWindows } from "std-env";
|
|
6
|
-
const REPO_REGISTRY = {
|
|
7
|
-
"vuejs/core": {
|
|
8
|
-
owner: "vuejs",
|
|
9
|
-
repo: "core",
|
|
10
|
-
docsRepo: "docs",
|
|
11
|
-
docsPath: "src",
|
|
12
|
-
homepage: "https://vuejs.org",
|
|
13
|
-
prereleaseChangelogRef: "minor",
|
|
14
|
-
packages: {
|
|
15
|
-
"vue": {
|
|
16
|
-
primary: true,
|
|
17
|
-
filePatterns: ["*.vue"],
|
|
18
|
-
rules: ["ALWAYS use `<script setup lang=\"ts\">`", "Use ```vue code fences for SFC examples containing `<script>` or `<template>` tags, ```ts for plain TypeScript"]
|
|
19
|
-
},
|
|
20
|
-
"@vue/compiler-core": {},
|
|
21
|
-
"@vue/compiler-dom": {},
|
|
22
|
-
"@vue/reactivity": {},
|
|
23
|
-
"@vue/runtime-core": {},
|
|
24
|
-
"@vue/runtime-dom": {},
|
|
25
|
-
"@vue/shared": {}
|
|
26
|
-
},
|
|
27
|
-
blogReleases: [
|
|
28
|
-
{
|
|
29
|
-
version: "3.5",
|
|
30
|
-
url: "https://blog.vuejs.org/posts/vue-3-5",
|
|
31
|
-
date: "2024-09-01"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
version: "3.4",
|
|
35
|
-
url: "https://blog.vuejs.org/posts/vue-3-4",
|
|
36
|
-
date: "2023-12-28"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
version: "3.3",
|
|
40
|
-
url: "https://blog.vuejs.org/posts/vue-3-3",
|
|
41
|
-
date: "2023-05-11"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
version: "3.2",
|
|
45
|
-
url: "https://blog.vuejs.org/posts/vue-3-2",
|
|
46
|
-
date: "2021-08-05"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
version: "3.1",
|
|
50
|
-
url: "https://blog.vuejs.org/posts/vue-3-1",
|
|
51
|
-
date: "2021-06-07"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
version: "3.0",
|
|
55
|
-
url: "https://blog.vuejs.org/posts/vue-3-0",
|
|
56
|
-
date: "2020-09-18"
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
},
|
|
60
|
-
"tailwindlabs/tailwindcss": {
|
|
61
|
-
owner: "tailwindlabs",
|
|
62
|
-
repo: "tailwindcss",
|
|
63
|
-
docsRepo: "tailwindcss.com",
|
|
64
|
-
docsPath: "src/docs",
|
|
65
|
-
homepage: "https://tailwindcss.com",
|
|
66
|
-
packages: { tailwindcss: { primary: true } }
|
|
67
|
-
},
|
|
68
|
-
"withastro/astro": {
|
|
69
|
-
owner: "withastro",
|
|
70
|
-
repo: "astro",
|
|
71
|
-
docsRepo: "docs",
|
|
72
|
-
docsPath: "src/content/docs/en",
|
|
73
|
-
homepage: "https://docs.astro.build",
|
|
74
|
-
packages: { astro: {
|
|
75
|
-
primary: true,
|
|
76
|
-
filePatterns: ["*.astro"]
|
|
77
|
-
} }
|
|
78
|
-
},
|
|
79
|
-
"vueuse/vueuse": {
|
|
80
|
-
owner: "vueuse",
|
|
81
|
-
repo: "vueuse",
|
|
82
|
-
docsPath: "packages",
|
|
83
|
-
packages: { "@vueuse/core": { primary: true } }
|
|
84
|
-
},
|
|
85
|
-
"sveltejs/svelte": {
|
|
86
|
-
owner: "sveltejs",
|
|
87
|
-
repo: "svelte",
|
|
88
|
-
packages: { svelte: {
|
|
89
|
-
primary: true,
|
|
90
|
-
filePatterns: ["*.svelte"],
|
|
91
|
-
rules: ["ALWAYS use runes syntax ($state, $derived, $effect, $props)"]
|
|
92
|
-
} }
|
|
93
|
-
},
|
|
94
|
-
"solidjs/solid": {
|
|
95
|
-
owner: "solidjs",
|
|
96
|
-
repo: "solid",
|
|
97
|
-
packages: { "solid-js": {
|
|
98
|
-
primary: true,
|
|
99
|
-
filePatterns: ["*.jsx", "*.tsx"]
|
|
100
|
-
} }
|
|
101
|
-
},
|
|
102
|
-
"QwikDev/qwik": {
|
|
103
|
-
owner: "QwikDev",
|
|
104
|
-
repo: "qwik",
|
|
105
|
-
packages: { qwik: {
|
|
106
|
-
primary: true,
|
|
107
|
-
filePatterns: ["*.tsx"]
|
|
108
|
-
} }
|
|
109
|
-
},
|
|
110
|
-
"marko-js/marko": {
|
|
111
|
-
owner: "marko-js",
|
|
112
|
-
repo: "marko",
|
|
113
|
-
packages: { marko: {
|
|
114
|
-
primary: true,
|
|
115
|
-
filePatterns: ["*.marko"]
|
|
116
|
-
} }
|
|
117
|
-
},
|
|
118
|
-
"riot/riot": {
|
|
119
|
-
owner: "riot",
|
|
120
|
-
repo: "riot",
|
|
121
|
-
packages: { riot: {
|
|
122
|
-
primary: true,
|
|
123
|
-
filePatterns: ["*.riot"]
|
|
124
|
-
} }
|
|
125
|
-
},
|
|
126
|
-
"microsoft/TypeScript": {
|
|
127
|
-
owner: "microsoft",
|
|
128
|
-
repo: "TypeScript",
|
|
129
|
-
packages: { typescript: {
|
|
130
|
-
primary: true,
|
|
131
|
-
filePatterns: [
|
|
132
|
-
"*.ts",
|
|
133
|
-
"*.tsx",
|
|
134
|
-
"*.mts",
|
|
135
|
-
"*.cts"
|
|
136
|
-
]
|
|
137
|
-
} },
|
|
138
|
-
blogReleases: [
|
|
139
|
-
{
|
|
140
|
-
version: "6.0",
|
|
141
|
-
url: "https://devblogs.microsoft.com/typescript/announcing-typescript-6-0-beta/",
|
|
142
|
-
date: "2026-02-11",
|
|
143
|
-
title: "Announcing TypeScript 6.0 Beta"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
version: "5.9",
|
|
147
|
-
url: "https://devblogs.microsoft.com/typescript/announcing-typescript-5-9/",
|
|
148
|
-
date: "2025-08-01",
|
|
149
|
-
title: "Announcing TypeScript 5.9"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
version: "5.8",
|
|
153
|
-
url: "https://devblogs.microsoft.com/typescript/announcing-typescript-5-8/",
|
|
154
|
-
date: "2025-02-28",
|
|
155
|
-
title: "Announcing TypeScript 5.8"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
version: "5.7",
|
|
159
|
-
url: "https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/",
|
|
160
|
-
date: "2024-11-22",
|
|
161
|
-
title: "Announcing TypeScript 5.7"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
version: "5.6",
|
|
165
|
-
url: "https://devblogs.microsoft.com/typescript/announcing-typescript-5-6/",
|
|
166
|
-
date: "2024-09-09",
|
|
167
|
-
title: "Announcing TypeScript 5.6"
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
version: "5.5",
|
|
171
|
-
url: "https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/",
|
|
172
|
-
date: "2024-06-20",
|
|
173
|
-
title: "Announcing TypeScript 5.5"
|
|
174
|
-
}
|
|
175
|
-
]
|
|
176
|
-
},
|
|
177
|
-
"jashkenas/coffeescript": {
|
|
178
|
-
owner: "jashkenas",
|
|
179
|
-
repo: "coffeescript",
|
|
180
|
-
packages: { coffeescript: {
|
|
181
|
-
primary: true,
|
|
182
|
-
filePatterns: ["*.coffee"]
|
|
183
|
-
} }
|
|
184
|
-
},
|
|
185
|
-
"gkz/LiveScript": {
|
|
186
|
-
owner: "gkz",
|
|
187
|
-
repo: "LiveScript",
|
|
188
|
-
packages: { livescript: {
|
|
189
|
-
primary: true,
|
|
190
|
-
filePatterns: ["*.ls"]
|
|
191
|
-
} }
|
|
192
|
-
},
|
|
193
|
-
"elm/compiler": {
|
|
194
|
-
owner: "elm",
|
|
195
|
-
repo: "compiler",
|
|
196
|
-
packages: { elm: {
|
|
197
|
-
primary: true,
|
|
198
|
-
filePatterns: ["*.elm"]
|
|
199
|
-
} }
|
|
200
|
-
},
|
|
201
|
-
"sass/dart-sass": {
|
|
202
|
-
owner: "sass",
|
|
203
|
-
repo: "dart-sass",
|
|
204
|
-
packages: { sass: {
|
|
205
|
-
primary: true,
|
|
206
|
-
filePatterns: ["*.scss", "*.sass"]
|
|
207
|
-
} }
|
|
208
|
-
},
|
|
209
|
-
"less/less.js": {
|
|
210
|
-
owner: "less",
|
|
211
|
-
repo: "less.js",
|
|
212
|
-
packages: { less: {
|
|
213
|
-
primary: true,
|
|
214
|
-
filePatterns: ["*.less"]
|
|
215
|
-
} }
|
|
216
|
-
},
|
|
217
|
-
"stylus/stylus": {
|
|
218
|
-
owner: "stylus",
|
|
219
|
-
repo: "stylus",
|
|
220
|
-
packages: { stylus: {
|
|
221
|
-
primary: true,
|
|
222
|
-
filePatterns: ["*.styl"]
|
|
223
|
-
} }
|
|
224
|
-
},
|
|
225
|
-
"postcss/postcss": {
|
|
226
|
-
owner: "postcss",
|
|
227
|
-
repo: "postcss",
|
|
228
|
-
packages: { postcss: {
|
|
229
|
-
primary: true,
|
|
230
|
-
filePatterns: ["*.css", "*.pcss"]
|
|
231
|
-
} }
|
|
232
|
-
},
|
|
233
|
-
"pugjs/pug": {
|
|
234
|
-
owner: "pugjs",
|
|
235
|
-
repo: "pug",
|
|
236
|
-
packages: { pug: {
|
|
237
|
-
primary: true,
|
|
238
|
-
filePatterns: ["*.pug"]
|
|
239
|
-
} }
|
|
240
|
-
},
|
|
241
|
-
"mde/ejs": {
|
|
242
|
-
owner: "mde",
|
|
243
|
-
repo: "ejs",
|
|
244
|
-
packages: { ejs: {
|
|
245
|
-
primary: true,
|
|
246
|
-
filePatterns: ["*.ejs"]
|
|
247
|
-
} }
|
|
248
|
-
},
|
|
249
|
-
"handlebars-lang/handlebars.js": {
|
|
250
|
-
owner: "handlebars-lang",
|
|
251
|
-
repo: "handlebars.js",
|
|
252
|
-
packages: { handlebars: {
|
|
253
|
-
primary: true,
|
|
254
|
-
filePatterns: ["*.hbs", "*.handlebars"]
|
|
255
|
-
} }
|
|
256
|
-
},
|
|
257
|
-
"janl/mustache.js": {
|
|
258
|
-
owner: "janl",
|
|
259
|
-
repo: "mustache.js",
|
|
260
|
-
packages: { mustache: {
|
|
261
|
-
primary: true,
|
|
262
|
-
filePatterns: ["*.mustache"]
|
|
263
|
-
} }
|
|
264
|
-
},
|
|
265
|
-
"mozilla/nunjucks": {
|
|
266
|
-
owner: "mozilla",
|
|
267
|
-
repo: "nunjucks",
|
|
268
|
-
packages: { nunjucks: {
|
|
269
|
-
primary: true,
|
|
270
|
-
filePatterns: ["*.njk"]
|
|
271
|
-
} }
|
|
272
|
-
},
|
|
273
|
-
"Shopify/liquid": {
|
|
274
|
-
owner: "Shopify",
|
|
275
|
-
repo: "liquid",
|
|
276
|
-
packages: { liquid: {
|
|
277
|
-
primary: true,
|
|
278
|
-
filePatterns: ["*.liquid"]
|
|
279
|
-
} }
|
|
280
|
-
},
|
|
281
|
-
"eemeli/yaml": {
|
|
282
|
-
owner: "eemeli",
|
|
283
|
-
repo: "yaml",
|
|
284
|
-
packages: { yaml: {
|
|
285
|
-
primary: true,
|
|
286
|
-
filePatterns: ["*.yaml", "*.yml"]
|
|
287
|
-
} }
|
|
288
|
-
},
|
|
289
|
-
"nodeca/js-yaml": {
|
|
290
|
-
owner: "nodeca",
|
|
291
|
-
repo: "js-yaml",
|
|
292
|
-
packages: { "js-yaml": {
|
|
293
|
-
primary: true,
|
|
294
|
-
filePatterns: ["*.yaml", "*.yml"]
|
|
295
|
-
} }
|
|
296
|
-
},
|
|
297
|
-
"BinaryMuse/toml-node": {
|
|
298
|
-
owner: "BinaryMuse",
|
|
299
|
-
repo: "toml-node",
|
|
300
|
-
packages: {
|
|
301
|
-
"toml": {
|
|
302
|
-
primary: true,
|
|
303
|
-
filePatterns: ["*.toml"]
|
|
304
|
-
},
|
|
305
|
-
"@iarna/toml": { filePatterns: ["*.toml"] }
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
|
-
"json5/json5": {
|
|
309
|
-
owner: "json5",
|
|
310
|
-
repo: "json5",
|
|
311
|
-
packages: { json5: {
|
|
312
|
-
primary: true,
|
|
313
|
-
filePatterns: ["*.json5"]
|
|
314
|
-
} }
|
|
315
|
-
},
|
|
316
|
-
"microsoft/node-jsonc-parser": {
|
|
317
|
-
owner: "microsoft",
|
|
318
|
-
repo: "node-jsonc-parser",
|
|
319
|
-
packages: { "jsonc-parser": {
|
|
320
|
-
primary: true,
|
|
321
|
-
filePatterns: ["*.jsonc"]
|
|
322
|
-
} }
|
|
323
|
-
},
|
|
324
|
-
"markdown-it/markdown-it": {
|
|
325
|
-
owner: "markdown-it",
|
|
326
|
-
repo: "markdown-it",
|
|
327
|
-
packages: { "markdown-it": {
|
|
328
|
-
primary: true,
|
|
329
|
-
filePatterns: ["*.md"]
|
|
330
|
-
} }
|
|
331
|
-
},
|
|
332
|
-
"markedjs/marked": {
|
|
333
|
-
owner: "markedjs",
|
|
334
|
-
repo: "marked",
|
|
335
|
-
packages: { marked: {
|
|
336
|
-
primary: true,
|
|
337
|
-
filePatterns: ["*.md"]
|
|
338
|
-
} }
|
|
339
|
-
},
|
|
340
|
-
"remarkjs/remark": {
|
|
341
|
-
owner: "remarkjs",
|
|
342
|
-
repo: "remark",
|
|
343
|
-
packages: { remark: {
|
|
344
|
-
primary: true,
|
|
345
|
-
filePatterns: ["*.md", "*.mdx"]
|
|
346
|
-
} }
|
|
347
|
-
},
|
|
348
|
-
"mdx-js/mdx": {
|
|
349
|
-
owner: "mdx-js",
|
|
350
|
-
repo: "mdx",
|
|
351
|
-
packages: { "@mdx-js/mdx": {
|
|
352
|
-
primary: true,
|
|
353
|
-
filePatterns: ["*.mdx"]
|
|
354
|
-
} }
|
|
355
|
-
},
|
|
356
|
-
"graphql/graphql-js": {
|
|
357
|
-
owner: "graphql",
|
|
358
|
-
repo: "graphql-js",
|
|
359
|
-
packages: {
|
|
360
|
-
"graphql": {
|
|
361
|
-
primary: true,
|
|
362
|
-
filePatterns: ["*.graphql", "*.gql"]
|
|
363
|
-
},
|
|
364
|
-
"graphql-tag": { filePatterns: ["*.graphql", "*.gql"] }
|
|
365
|
-
}
|
|
366
|
-
},
|
|
367
|
-
"dotansimha/graphql-code-generator": {
|
|
368
|
-
owner: "dotansimha",
|
|
369
|
-
repo: "graphql-code-generator",
|
|
370
|
-
packages: { "@graphql-codegen/cli": {
|
|
371
|
-
primary: true,
|
|
372
|
-
filePatterns: ["*.graphql", "*.gql"]
|
|
373
|
-
} }
|
|
374
|
-
},
|
|
375
|
-
"quasarframework/quasar": {
|
|
376
|
-
owner: "quasarframework",
|
|
377
|
-
repo: "quasar",
|
|
378
|
-
docsPath: "docs/src/pages",
|
|
379
|
-
docsRef: "dev",
|
|
380
|
-
homepage: "https://quasar.dev",
|
|
381
|
-
packages: { quasar: { primary: true } }
|
|
382
|
-
},
|
|
383
|
-
"motiondivision/motion-vue": {
|
|
384
|
-
owner: "motiondivision",
|
|
385
|
-
repo: "motion-vue",
|
|
386
|
-
homepage: "https://motion.dev",
|
|
387
|
-
crawlUrl: "https://motion.dev/docs/vue**",
|
|
388
|
-
packages: { "motion-v": { primary: true } }
|
|
389
|
-
},
|
|
390
|
-
"prisma/prisma": {
|
|
391
|
-
owner: "prisma",
|
|
392
|
-
repo: "prisma",
|
|
393
|
-
packages: {
|
|
394
|
-
"prisma": {
|
|
395
|
-
primary: true,
|
|
396
|
-
filePatterns: ["*.prisma"]
|
|
397
|
-
},
|
|
398
|
-
"@prisma/client": { filePatterns: ["*.prisma"] }
|
|
399
|
-
}
|
|
400
|
-
},
|
|
401
|
-
"nicolo-ribaudo/tc39-proposal-wasm-esm-integration": {
|
|
402
|
-
owner: "nicolo-ribaudo",
|
|
403
|
-
repo: "tc39-proposal-wasm-esm-integration",
|
|
404
|
-
packages: { "wasm-pack": {
|
|
405
|
-
primary: true,
|
|
406
|
-
filePatterns: ["*.wasm"]
|
|
407
|
-
} }
|
|
408
|
-
}
|
|
409
|
-
};
|
|
410
|
-
const PACKAGE_TO_REPO_MAP = {};
|
|
411
|
-
for (const [repoKey, entry] of Object.entries(REPO_REGISTRY)) for (const packageName of Object.keys(entry.packages)) PACKAGE_TO_REPO_MAP[packageName] = repoKey;
|
|
412
|
-
function getDocOverride(packageName) {
|
|
413
|
-
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
414
|
-
if (!repoKey) return void 0;
|
|
415
|
-
const entry = REPO_REGISTRY[repoKey];
|
|
416
|
-
if (!entry?.docsRepo && !entry?.docsPath) return void 0;
|
|
417
|
-
return {
|
|
418
|
-
owner: entry.owner,
|
|
419
|
-
repo: entry.docsRepo || entry.repo,
|
|
420
|
-
path: entry.docsPath || "",
|
|
421
|
-
ref: entry.docsRef,
|
|
422
|
-
homepage: entry.homepage
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
function getBlogPreset(packageName) {
|
|
426
|
-
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
427
|
-
if (!repoKey) return void 0;
|
|
428
|
-
const entry = REPO_REGISTRY[repoKey];
|
|
429
|
-
if (!entry?.blogReleases) return void 0;
|
|
430
|
-
return {
|
|
431
|
-
packageName,
|
|
432
|
-
releases: entry.blogReleases
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
function getFilePatterns(packageName) {
|
|
436
|
-
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
437
|
-
if (!repoKey) return void 0;
|
|
438
|
-
return REPO_REGISTRY[repoKey]?.packages[packageName]?.filePatterns;
|
|
439
|
-
}
|
|
440
|
-
function getRepoEntry(repoKey) {
|
|
441
|
-
return REPO_REGISTRY[repoKey];
|
|
442
|
-
}
|
|
443
|
-
function getRepoKeyForPackage(packageName) {
|
|
444
|
-
return PACKAGE_TO_REPO_MAP[packageName];
|
|
445
|
-
}
|
|
446
|
-
function getPackageRules(packageName) {
|
|
447
|
-
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
448
|
-
if (!repoKey) return [];
|
|
449
|
-
return REPO_REGISTRY[repoKey]?.packages[packageName]?.rules ?? [];
|
|
450
|
-
}
|
|
451
|
-
function getPrereleaseChangelogRef(packageName) {
|
|
452
|
-
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
453
|
-
if (!repoKey) return void 0;
|
|
454
|
-
return REPO_REGISTRY[repoKey]?.prereleaseChangelogRef;
|
|
455
|
-
}
|
|
456
|
-
function getCrawlUrl(packageName) {
|
|
457
|
-
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
458
|
-
if (!repoKey) return void 0;
|
|
459
|
-
return REPO_REGISTRY[repoKey]?.crawlUrl;
|
|
460
|
-
}
|
|
461
|
-
function getRelatedPackages(packageName) {
|
|
462
|
-
const repoKey = PACKAGE_TO_REPO_MAP[packageName];
|
|
463
|
-
if (!repoKey) return [];
|
|
464
|
-
const entry = REPO_REGISTRY[repoKey];
|
|
465
|
-
if (!entry) return [];
|
|
466
|
-
return Object.keys(entry.packages);
|
|
467
|
-
}
|
|
468
|
-
function mapInsert(map, key, create) {
|
|
469
|
-
let val = map.get(key);
|
|
470
|
-
if (val === void 0) {
|
|
471
|
-
val = create();
|
|
472
|
-
map.set(key, val);
|
|
473
|
-
}
|
|
474
|
-
return val;
|
|
475
|
-
}
|
|
476
|
-
function semverValid(v) {
|
|
477
|
-
return valid(v, true);
|
|
478
|
-
}
|
|
479
|
-
function semverGt(a, b) {
|
|
480
|
-
return gt(a, b, true);
|
|
481
|
-
}
|
|
482
|
-
function semverDiff(a, b) {
|
|
483
|
-
return diff(a, b);
|
|
484
|
-
}
|
|
485
|
-
let _skilldCommand;
|
|
486
|
-
function resolveSkilldCommand() {
|
|
487
|
-
if (_skilldCommand !== void 0) return _skilldCommand;
|
|
488
|
-
try {
|
|
489
|
-
execSync(`${isWindows ? "where" : "which"} skilld`, { stdio: "ignore" });
|
|
490
|
-
_skilldCommand = "skilld";
|
|
491
|
-
} catch {
|
|
492
|
-
_skilldCommand = "npx -y skilld";
|
|
493
|
-
}
|
|
494
|
-
return _skilldCommand;
|
|
495
|
-
}
|
|
496
|
-
const SHARED_SKILLS_DIR = ".skills";
|
|
497
|
-
function getSharedSkillsDir(cwd = process.cwd()) {
|
|
498
|
-
const dir = join(cwd, SHARED_SKILLS_DIR);
|
|
499
|
-
return existsSync(dir) ? dir : null;
|
|
500
|
-
}
|
|
501
|
-
export { semverDiff as a, getBlogPreset as c, getFilePatterns as d, getPackageRules as f, getRepoKeyForPackage as g, getRepoEntry as h, resolveSkilldCommand as i, getCrawlUrl as l, getRelatedPackages as m, getSharedSkillsDir as n, semverGt as o, getPrereleaseChangelogRef as p, mapInsert as r, semverValid as s, SHARED_SKILLS_DIR as t, getDocOverride as u };
|
|
502
|
-
|
|
503
|
-
//# sourceMappingURL=shared.mjs.map
|