skilld 1.2.0 → 1.2.1
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/agent.mjs +8 -0
- package/dist/_chunks/agent.mjs.map +1 -1
- package/dist/_chunks/cache.mjs +3 -3
- package/dist/_chunks/cache.mjs.map +1 -1
- package/dist/_chunks/detect.mjs +6 -6
- package/dist/_chunks/detect.mjs.map +1 -1
- package/dist/_chunks/index2.d.mts.map +1 -1
- package/dist/_chunks/skills.mjs +5 -11
- package/dist/_chunks/skills.mjs.map +1 -1
- package/dist/_chunks/sources.mjs +38 -66
- package/dist/_chunks/sources.mjs.map +1 -1
- package/dist/_chunks/yaml.mjs +10 -1
- package/dist/_chunks/yaml.mjs.map +1 -1
- package/package.json +6 -6
package/dist/_chunks/yaml.mjs
CHANGED
|
@@ -22,7 +22,16 @@ function yamlEscape(value) {
|
|
|
22
22
|
function yamlUnescape(raw) {
|
|
23
23
|
const trimmed = raw.trim();
|
|
24
24
|
if (!trimmed) return "";
|
|
25
|
-
if (trimmed.startsWith("\"") && trimmed.endsWith("\"")) return trimmed.slice(1, -1).replace(/\\
|
|
25
|
+
if (trimmed.startsWith("\"") && trimmed.endsWith("\"")) return trimmed.slice(1, -1).replace(/\\([\\nrt"])/g, (_, c) => {
|
|
26
|
+
switch (c) {
|
|
27
|
+
case "\\": return "\\";
|
|
28
|
+
case "n": return "\n";
|
|
29
|
+
case "r": return "\r";
|
|
30
|
+
case "t": return " ";
|
|
31
|
+
case "\"": return "\"";
|
|
32
|
+
default: return c;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
26
35
|
if (trimmed.startsWith("'") && trimmed.endsWith("'")) return trimmed.slice(1, -1);
|
|
27
36
|
return trimmed;
|
|
28
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml.mjs","names":[],"sources":["../../src/core/yaml.ts"],"sourcesContent":["/**\n * Minimal YAML value escaping/unescaping for our hand-rolled parsers.\n *\n * Handles the characters that break naive `:` splitting and quote stripping:\n * colons, quotes, newlines, backslashes.\n */\n\n/** Characters that require double-quoting in YAML values */\nconst NEEDS_QUOTING = /[:\"'\\\\\\n\\r\\t#{}[\\],&*!|>%@`]/\n\n/**\n * Escape a value for safe YAML emission. Always double-quotes if the value\n * contains any special characters; returns unquoted for simple values.\n */\nexport function yamlEscape(value: string): string {\n if (!NEEDS_QUOTING.test(value))\n return value\n // Escape backslashes first, then double quotes, then control chars\n const escaped = value\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/\\t/g, '\\\\t')\n return `\"${escaped}\"`\n}\n\n/**\n * Parse a raw YAML value string back to its actual value.\n * Handles double-quoted (with escapes), single-quoted, and unquoted values.\n */\nexport function yamlUnescape(raw: string): string {\n const trimmed = raw.trim()\n if (!trimmed)\n return ''\n\n // Double-quoted:
|
|
1
|
+
{"version":3,"file":"yaml.mjs","names":[],"sources":["../../src/core/yaml.ts"],"sourcesContent":["/**\n * Minimal YAML value escaping/unescaping for our hand-rolled parsers.\n *\n * Handles the characters that break naive `:` splitting and quote stripping:\n * colons, quotes, newlines, backslashes.\n */\n\n/** Characters that require double-quoting in YAML values */\nconst NEEDS_QUOTING = /[:\"'\\\\\\n\\r\\t#{}[\\],&*!|>%@`]/\n\n/**\n * Escape a value for safe YAML emission. Always double-quotes if the value\n * contains any special characters; returns unquoted for simple values.\n */\nexport function yamlEscape(value: string): string {\n if (!NEEDS_QUOTING.test(value))\n return value\n // Escape backslashes first, then double quotes, then control chars\n const escaped = value\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/\\t/g, '\\\\t')\n return `\"${escaped}\"`\n}\n\n/**\n * Parse a raw YAML value string back to its actual value.\n * Handles double-quoted (with escapes), single-quoted, and unquoted values.\n */\nexport function yamlUnescape(raw: string): string {\n const trimmed = raw.trim()\n if (!trimmed)\n return ''\n\n // Double-quoted: single-pass escape processing to handle backslashes correctly\n if (trimmed.startsWith('\"') && trimmed.endsWith('\"')) {\n return trimmed.slice(1, -1)\n .replace(/\\\\([\\\\nrt\"])/g, (_, c) => {\n switch (c) {\n case '\\\\': return '\\\\'\n case 'n': return '\\n'\n case 'r': return '\\r'\n case 't': return '\\t'\n case '\"': return '\"'\n default: return c\n }\n })\n }\n\n // Single-quoted: no escape processing, just strip quotes\n if (trimmed.startsWith('\\'') && trimmed.endsWith('\\''))\n return trimmed.slice(1, -1)\n\n return trimmed\n}\n\n/**\n * Parse a YAML `key: value` line, correctly handling colons inside quoted values.\n * Returns [key, value] or null if not a valid KV line.\n */\nexport function yamlParseKV(line: string): [string, string] | null {\n const trimmed = line.trim()\n // Find the first `: ` or `:\\n` or `:$` — the YAML key-value separator\n const colonIdx = trimmed.indexOf(':')\n if (colonIdx === -1)\n return null\n const key = trimmed.slice(0, colonIdx).trim()\n const rawValue = trimmed.slice(colonIdx + 1)\n if (!key)\n return null\n return [key, yamlUnescape(rawValue)]\n}\n"],"mappings":";;;;;;;;AAQA,MAAM,gBAAgB;;;;;AAMtB,SAAgB,WAAW,OAAuB;AAChD,KAAI,CAAC,cAAc,KAAK,MAAM,CAC5B,QAAO;AAQT,QAAO,IANS,MACb,QAAQ,OAAO,OAAO,CACtB,QAAQ,MAAM,OAAM,CACpB,QAAQ,OAAO,MAAM,CACrB,QAAQ,OAAO,MAAM,CACrB,QAAQ,OAAO,MAAM,CACL;;;;;;AAOrB,SAAgB,aAAa,KAAqB;CAChD,MAAM,UAAU,IAAI,MAAM;AAC1B,KAAI,CAAC,QACH,QAAO;AAGT,KAAI,QAAQ,WAAW,KAAI,IAAI,QAAQ,SAAS,KAAI,CAClD,QAAO,QAAQ,MAAM,GAAG,GAAG,CACxB,QAAQ,kBAAkB,GAAG,MAAM;AAClC,UAAQ,GAAR;GACE,KAAK,KAAM,QAAO;GAClB,KAAK,IAAK,QAAO;GACjB,KAAK,IAAK,QAAO;GACjB,KAAK,IAAK,QAAO;GACjB,KAAK,KAAK,QAAO;GACjB,QAAS,QAAO;;GAElB;AAIN,KAAI,QAAQ,WAAW,IAAK,IAAI,QAAQ,SAAS,IAAK,CACpD,QAAO,QAAQ,MAAM,GAAG,GAAG;AAE7B,QAAO;;;;;;AAOT,SAAgB,YAAY,MAAuC;CACjE,MAAM,UAAU,KAAK,MAAM;CAE3B,MAAM,WAAW,QAAQ,QAAQ,IAAI;AACrC,KAAI,aAAa,GACf,QAAO;CACT,MAAM,MAAM,QAAQ,MAAM,GAAG,SAAS,CAAC,MAAM;CAC7C,MAAM,WAAW,QAAQ,MAAM,WAAW,EAAE;AAC5C,KAAI,CAAC,IACH,QAAO;AACT,QAAO,CAAC,KAAK,aAAa,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skilld",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"description": "Generate AI agent skills from npm package documentation",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"micromark-extension-frontmatter": "^2.0.0",
|
|
58
58
|
"mlly": "^1.8.1",
|
|
59
59
|
"ofetch": "^1.5.1",
|
|
60
|
-
"oxc-parser": "^0.
|
|
60
|
+
"oxc-parser": "^0.118.0",
|
|
61
61
|
"p-limit": "^7.3.0",
|
|
62
62
|
"pathe": "^2.0.3",
|
|
63
63
|
"retriv": "^0.10.4",
|
|
@@ -70,15 +70,15 @@
|
|
|
70
70
|
"unist-util-visit": "^5.1.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@antfu/eslint-config": "^7.7.
|
|
74
|
-
"@types/node": "^25.
|
|
73
|
+
"@antfu/eslint-config": "^7.7.2",
|
|
74
|
+
"@types/node": "^25.5.0",
|
|
75
75
|
"@types/semver": "^7.7.1",
|
|
76
|
-
"@vitest/coverage-v8": "^4.0
|
|
76
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
77
77
|
"bumpp": "^10.4.1",
|
|
78
78
|
"evalite": "^0.19.0",
|
|
79
79
|
"obuild": "^0.4.32",
|
|
80
80
|
"tsx": "^4.21.0",
|
|
81
|
-
"vitest": "^4.0
|
|
81
|
+
"vitest": "^4.1.0"
|
|
82
82
|
},
|
|
83
83
|
"scripts": {
|
|
84
84
|
"build": "obuild",
|