docs-cache 0.1.3 → 0.1.4
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 +2 -2
- package/dist/chunks/init.mjs +2 -2
- package/dist/cli.mjs +11 -11
- package/dist/shared/docs-cache.DgrUGcWv.mjs +5 -0
- package/package.json +93 -90
package/dist/chunks/add.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{readFile as
|
|
2
|
-
`,"utf8")}else await
|
|
1
|
+
import{readFile as D,writeFile as b,access as k}from"node:fs/promises";import l from"node:path";import{v,D as P,a as E,s as F,w as I,b as U,r as S}from"../shared/docs-cache.D4Fth4X8.mjs";import{e as A}from"../shared/docs-cache.DgrUGcWv.mjs";import{r as N}from"../shared/docs-cache.D9_kM5zq.mjs";import{r as O}from"../shared/docs-cache.BSvQNKuf.mjs";import"zod";import"node:process";import"cac";import"picocolors";const u=async o=>{try{return await k(o),!0}catch{return!1}},y="package.json",x=async o=>{const i=await D(o,"utf8"),e=JSON.parse(i),t=e["docs-cache"];return t?{parsed:e,config:v(t)}:{parsed:e,config:null}},J=async o=>{if(o){const t=S(o);return{resolvedPath:t,mode:l.basename(t)===y?"package":"config"}}const i=S();if(await u(i))return{resolvedPath:i,mode:"config"};const e=l.resolve(process.cwd(),y);return await u(e)&&(await x(e)).config?{resolvedPath:e,mode:"package"}:{resolvedPath:i,mode:"config"}},T=async o=>{const i=await J(o.configPath),e=i.resolvedPath;let t=P,a=null,g=null,d=!1;if(await u(e))if(i.mode==="package"){const r=await x(e);g=r.parsed,a=r.config,t=a??P,d=!!a}else{const r=await D(e,"utf8");a=JSON.parse(r.toString()),t=v(a),d=!0}const C="https://raw.githubusercontent.com/fbosch/docs-cache/main/docs.config.schema.json",p=new Set(t.sources.map(r=>r.id)),m=[],f=o.entries.map(r=>{const n=O(r.repo),w=r.id||n.inferredId;if(!w)throw new Error("Unable to infer id. Provide an explicit id.");const c=E(w,"source id");return p.has(c)?(m.push(c),null):(p.add(c),r.targetDir&&N(e,r.targetDir),{id:c,repo:n.repoUrl,...r.targetDir?{targetDir:r.targetDir}:{},...n.ref?{ref:n.ref}:{}})}).filter(Boolean);if(f.length===0)throw new Error("All sources already exist in config.");const s={$schema:C,sources:[...t.sources,...f]};if(a?.cacheDir&&(s.cacheDir=a.cacheDir),a?.index!==void 0&&(s.index=a.index),a?.defaults&&(s.defaults=a.defaults),i.mode==="package"){const r=g??{};r["docs-cache"]=F(s),await b(e,`${JSON.stringify(r,null,2)}
|
|
2
|
+
`,"utf8")}else await I(e,s);const h=d?null:await A(l.dirname(e),a?.cacheDir??U);return{configPath:e,sources:f,skipped:m,created:!0,gitignoreUpdated:h?.updated??!1,gitignorePath:h?.gitignorePath??null}};export{T as addSources};
|
|
3
3
|
//# sourceMappingURL=add.mjs.map
|
package/dist/chunks/init.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{readFile as
|
|
2
|
-
`,"utf8"),{configPath:e,created:!0}}if(await h(e))throw new Error(`Config already exists at ${e}.`);const
|
|
1
|
+
import{readFile as y,writeFile as N,access as S}from"node:fs/promises";import r from"node:path";import{confirm as V,isCancel as G,select as J,text as U}from"@clack/prompts";import{c as _,b as n,s as L,w as T}from"../shared/docs-cache.D4Fth4X8.mjs";import{g as H,e as F}from"../shared/docs-cache.DgrUGcWv.mjs";import"zod";import"../shared/docs-cache.D9_kM5zq.mjs";import"node:process";import"cac";import"picocolors";const h=async c=>{try{return await S(c),!0}catch{return!1}},M=async(c,s={})=>{const x=s.confirm??V,l=s.isCancel??G,O=s.select??J,$=s.text??U,f=c.cwd??process.cwd(),d=r.resolve(f,_),i=r.resolve(f,"package.json"),g=[];if(await h(d)&&g.push(d),await h(i)){const t=await y(i,"utf8");JSON.parse(t)["docs-cache"]&&g.push(i)}if(g.length>0)throw new Error(`Config already exists at ${g.join(", ")}. Init aborted.`);let C=!1;if(await h(i)){const t=await y(i,"utf8");if(!JSON.parse(t)["docs-cache"]){const o=await O({message:"Config location",options:[{value:"config",label:"docs.config.json"},{value:"package",label:"package.json"}],initialValue:"config"});if(l(o))throw new Error("Init cancelled.");C=o==="package"}}const k=C?i:d,v=c.cacheDirOverride??n,u=await $({message:"Cache directory",initialValue:v});if(l(u))throw new Error("Init cancelled.");const A=u||n,b=await x({message:"Generate index.json (summary of cached sources + paths for tools)",initialValue:!1});if(l(b))throw new Error("Init cancelled.");const D=await H(f,A);let j=!1;if(D.entry&&!D.hasEntry){const t=await x({message:"Add cache directory to .gitignore",initialValue:!0});if(l(t))throw new Error("Init cancelled.");j=t}const a={configPath:k,cacheDir:u,index:b,gitignore:j},e=r.resolve(f,a.configPath);if(r.basename(e)==="package.json"){const t=await y(e,"utf8"),o=JSON.parse(t);if(o["docs-cache"])throw new Error(`docs-cache config already exists in ${e}.`);const p={$schema:"https://raw.githubusercontent.com/fbosch/docs-cache/main/docs.config.schema.json",sources:[]},E=a.cacheDir||n;E!==n&&(p.cacheDir=E),a.index&&(p.index=!0),o["docs-cache"]=L(p),await N(e,`${JSON.stringify(o,null,2)}
|
|
2
|
+
`,"utf8");const P=a.gitignore?await F(r.dirname(e),E):null;return{configPath:e,created:!0,gitignoreUpdated:P?.updated??!1,gitignorePath:P?.gitignorePath??null}}if(await h(e))throw new Error(`Config already exists at ${e}.`);const w={$schema:"https://raw.githubusercontent.com/fbosch/docs-cache/main/docs.config.schema.json",sources:[]},m=a.cacheDir||n;m!==n&&(w.cacheDir=m),a.index&&(w.index=!0),await T(e,w);const I=a.gitignore?await F(r.dirname(e),m):null;return{configPath:e,created:!0,gitignoreUpdated:I?.updated??!1,gitignorePath:I?.gitignorePath??null}};export{M as initConfig};
|
|
3
3
|
//# sourceMappingURL=init.mjs.map
|
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import w from"node:path";import
|
|
1
|
+
import w from"node:path";import a from"node:process";import l from"picocolors";import{p as j,E as f,s as g,u as r}from"./shared/docs-cache.D9_kM5zq.mjs";import"cac";const u="docs-cache",O=`
|
|
2
2
|
Usage: ${u} <command> [options]
|
|
3
3
|
|
|
4
4
|
Commands:
|
|
@@ -23,14 +23,14 @@ Global options:
|
|
|
23
23
|
--concurrency <n>
|
|
24
24
|
--json
|
|
25
25
|
--timeout-ms <n>
|
|
26
|
-
`,m=()=>{
|
|
27
|
-
`)},D=e=>{const t=e.findIndex(i=>!i.startsWith("-")),
|
|
28
|
-
`);else{for(const
|
|
29
|
-
`);else{if(i.removed.length>0&&
|
|
30
|
-
`):n(i);return}if(e==="clean"){const{cleanCache:
|
|
31
|
-
`):n.removed?
|
|
32
|
-
`):n.removed.length===0?
|
|
33
|
-
`):
|
|
34
|
-
`):
|
|
35
|
-
`):
|
|
26
|
+
`,m=()=>{a.stdout.write(O.trimStart())},p=e=>{a.stderr.write(`${g.error} ${e}
|
|
27
|
+
`)},D=e=>{const t=e.findIndex(i=>!i.startsWith("-")),h=t===-1?[]:e.slice(t+1),d=[];let s=-1;const n=new Set(["--config","--cache-dir","--concurrency","--timeout-ms"]);for(let i=0;i<h.length;i+=1){const o=h[i];if(o==="--source"){const c=h[i+1];if(!c||c.startsWith("-"))throw new Error("--source expects a value.");d.push({repo:c}),s=d.length-1,i+=1;continue}if(o==="--target"||o==="--target-dir"){const c=h[i+1];if(!c||c.startsWith("-"))throw new Error("--target expects a value.");if(s===-1)throw new Error("--target must follow a --source entry.");d[s].targetDir=c,i+=1;continue}if(n.has(o)){i+=1;continue}o.startsWith("--")||(d.push({repo:o}),s=d.length-1)}return d},S=async(e,t,h,d)=>{if(e==="add"){const{addSources:s}=await import("./chunks/add.mjs"),{runSync:n}=await import("./chunks/sync.mjs").then(function(c){return c.s}),i=D(d);if(i.length===0)throw new Error("Usage: docs-cache add [--source <repo> --target <dir>] <repo...>");const o=await s({configPath:t.config,entries:i});if(t.offline?t.json||r.line(`${g.warn} Offline: skipped sync`):await n({configPath:t.config,cacheDirOverride:t.cacheDir,json:t.json,lockOnly:t.lockOnly,offline:t.offline,failOnMiss:t.failOnMiss,sourceFilter:o.sources.map(c=>c.id),timeoutMs:t.timeoutMs}),t.json)a.stdout.write(`${JSON.stringify(o,null,2)}
|
|
28
|
+
`);else{for(const c of o.sources){const y=c.repo.replace(/^https?:\/\//,"").replace(/\.git$/,""),v=c.targetDir?` ${l.dim("->")} ${l.magenta(c.targetDir)}`:"";r.item(g.success,c.id,`${l.blue(y)}${v}`)}o.skipped?.length&&r.line(`${g.warn} Skipped ${o.skipped.length} existing source${o.skipped.length===1?"":"s"}: ${o.skipped.join(", ")}`),r.line(`${g.info} Updated ${l.gray(w.relative(a.cwd(),o.configPath)||"docs.config.json")}`),o.gitignoreUpdated&&o.gitignorePath&&r.line(`${g.info} Updated ${l.gray(r.path(o.gitignorePath))}`)}return}if(e==="remove"){const{removeSources:s}=await import("./chunks/remove.mjs"),{pruneCache:n}=await import("./chunks/prune.mjs");if(h.length===0)throw new Error("Usage: docs-cache remove <id...>");const i=await s({configPath:t.config,ids:h});if(t.json)a.stdout.write(`${JSON.stringify(i,null,2)}
|
|
29
|
+
`);else{if(i.removed.length>0&&r.line(`${g.success} Removed ${i.removed.length} source${i.removed.length===1?"":"s"}: ${i.removed.join(", ")}`),i.missing.length>0&&r.line(`${g.warn} Missing ${i.missing.length} source${i.missing.length===1?"":"s"}: ${i.missing.join(", ")}`),i.targetsRemoved.length>0){const o=i.targetsRemoved.map(c=>`${c.id} -> ${r.path(c.targetDir)}`).join(", ");r.line(`${g.success} Removed ${i.targetsRemoved.length} target${i.targetsRemoved.length===1?"":"s"}: ${o}`)}r.line(`${g.info} Updated ${l.gray(w.relative(a.cwd(),i.configPath)||"docs.config.json")}`)}t.prune&&await n({configPath:t.config,cacheDirOverride:t.cacheDir,json:t.json});return}if(e==="status"){const{getStatus:s,printStatus:n}=await import("./chunks/status.mjs"),i=await s({configPath:t.config,cacheDirOverride:t.cacheDir,json:t.json});t.json?a.stdout.write(`${JSON.stringify(i,null,2)}
|
|
30
|
+
`):n(i);return}if(e==="clean"){const{cleanCache:s}=await import("./chunks/clean.mjs"),n=await s({configPath:t.config,cacheDirOverride:t.cacheDir,json:t.json});t.json?a.stdout.write(`${JSON.stringify(n,null,2)}
|
|
31
|
+
`):n.removed?r.line(`${g.success} Removed cache at ${r.path(n.cacheDir)}`):r.line(`${g.info} Cache already missing at ${r.path(n.cacheDir)}`);return}if(e==="prune"){const{pruneCache:s}=await import("./chunks/prune.mjs"),n=await s({configPath:t.config,cacheDirOverride:t.cacheDir,json:t.json});t.json?a.stdout.write(`${JSON.stringify(n,null,2)}
|
|
32
|
+
`):n.removed.length===0?r.line(`${g.info} No cache entries to prune.`):r.line(`${g.success} Pruned ${n.removed.length} cache entr${n.removed.length===1?"y":"ies"}: ${n.removed.join(", ")}`);return}if(e==="sync"){const{printSyncPlan:s,runSync:n}=await import("./chunks/sync.mjs").then(function(o){return o.s}),i=await n({configPath:t.config,cacheDirOverride:t.cacheDir,json:t.json,lockOnly:t.lockOnly,offline:t.offline,failOnMiss:t.failOnMiss,timeoutMs:t.timeoutMs});t.json?a.stdout.write(`${JSON.stringify(i,null,2)}
|
|
33
|
+
`):s(i);return}if(e==="verify"){const{printVerify:s,verifyCache:n}=await import("./chunks/verify.mjs").then(function(o){return o.a}),i=await n({configPath:t.config,cacheDirOverride:t.cacheDir,json:t.json});t.json?a.stdout.write(`${JSON.stringify(i,null,2)}
|
|
34
|
+
`):s(i),i.results.some(o=>!o.ok)&&a.exit(f.FatalError);return}if(e==="init"){const{initConfig:s}=await import("./chunks/init.mjs");if(t.config)throw new Error("Init does not accept --config. Use the project root.");const n=await s({cacheDirOverride:t.cacheDir,json:t.json});t.json?a.stdout.write(`${JSON.stringify(n,null,2)}
|
|
35
|
+
`):(r.line(`${g.success} Wrote ${l.gray(r.path(n.configPath))}`),n.gitignoreUpdated&&n.gitignorePath&&r.line(`${g.info} Updated ${l.gray(r.path(n.gitignorePath))}`));return}r.line(`${u} ${e}: not implemented yet.`)};async function P(){try{a.on("uncaughtException",$),a.on("unhandledRejection",$);const e=j(),t=e.rawArgs;e.help&&(m(),a.exit(f.Success)),e.command||(m(),a.exit(f.InvalidArgument)),e.command!=="add"&&e.command!=="remove"&&e.positionals.length>0&&(p(`${u}: unexpected arguments.`),m(),a.exit(f.InvalidArgument)),e.command!=="add"&&e.options.targetDir&&(p(`${u}: --target-dir is only valid for add.`),m(),a.exit(f.InvalidArgument)),await S(e.command,e.options,e.positionals,e.rawArgs)}catch(e){$(e)}}function $(e){const t=e.message||String(e);p(t),a.exit(f.FatalError)}export{u as CLI_NAME,P as main};
|
|
36
36
|
//# sourceMappingURL=cli.mjs.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{readFile as o,writeFile as f,access as P}from"node:fs/promises";import a from"node:path";import{t as p}from"./docs-cache.D9_kM5zq.mjs";const g=async n=>{try{return await P(n),!0}catch{return!1}},l=n=>{const r=n.trim();if(!r||r.startsWith("#")||r.startsWith("!"))return"";let t=r.replace(/^\//,"");return t=t.replace(/^\.\//,""),t=t.replace(/\/+$/,""),p(t)},d=(n,r)=>{const t=a.isAbsolute(r)?a.resolve(r):a.resolve(n,r),e=a.relative(n,t);return e===".."||e.startsWith(`..${a.sep}`)||a.isAbsolute(e)?null:e.length===0?".":e},u=async(n,r)=>{const t=a.resolve(n,".gitignore"),e=d(n,r);if(!e)return{gitignorePath:t,entry:null,hasEntry:!1};const i=l(e);if(!i)return{gitignorePath:t,entry:null,hasEntry:!1};let s="";await g(t)&&(s=await o(t,"utf8"));const h=s.split(/\r?\n/),c=new Set(h.map(y=>l(y)).filter(Boolean));return{gitignorePath:t,entry:`${i}/`,hasEntry:c.has(i)}},w=async(n,r)=>{const t=await u(n,r);if(!t.entry)return{updated:!1,gitignorePath:t.gitignorePath,entry:null};if(t.hasEntry)return{updated:!1,gitignorePath:t.gitignorePath,entry:t.entry};let e="";await g(t.gitignorePath)&&(e=await o(t.gitignorePath,"utf8"));const i=e.length===0||e.endsWith(`
|
|
2
|
+
`)?"":`
|
|
3
|
+
`,s=`${e}${i}${t.entry}
|
|
4
|
+
`;return await f(t.gitignorePath,s,"utf8"),{updated:!0,gitignorePath:t.gitignorePath,entry:t.entry}};export{w as e,u as g};
|
|
5
|
+
//# sourceMappingURL=docs-cache.DgrUGcWv.mjs.map
|
package/package.json
CHANGED
|
@@ -1,91 +1,94 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
2
|
+
"name": "docs-cache",
|
|
3
|
+
"private": false,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"version": "0.1.4",
|
|
6
|
+
"packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748",
|
|
7
|
+
"description": "CLI for deterministic local caching of external documentation for agents and tools",
|
|
8
|
+
"author": "Frederik Bosch",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"homepage": "https://github.com/fbosch/docs-cache#readme",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/fbosch/docs-cache.git"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/fbosch/docs-cache/issues"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"docs",
|
|
20
|
+
"documentation",
|
|
21
|
+
"cache",
|
|
22
|
+
"agent",
|
|
23
|
+
"ai",
|
|
24
|
+
"git",
|
|
25
|
+
"cli"
|
|
26
|
+
],
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=18"
|
|
30
|
+
},
|
|
31
|
+
"bin": {
|
|
32
|
+
"docs-cache": "./bin/docs-cache.mjs"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"bin",
|
|
36
|
+
"dist/cli.mjs",
|
|
37
|
+
"dist/chunks/*.mjs",
|
|
38
|
+
"dist/lock.mjs",
|
|
39
|
+
"dist/shared/*.mjs",
|
|
40
|
+
"README.md",
|
|
41
|
+
"LICENSE"
|
|
42
|
+
],
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "unbuild",
|
|
45
|
+
"dev": "unbuild --stub",
|
|
46
|
+
"lint": "biome check .",
|
|
47
|
+
"prepublishOnly": "pnpm audit --audit-level=high && pnpm build && pnpm size && pnpm schema:build",
|
|
48
|
+
"release": "pnpm run lint && pnpm run typecheck && bumpp && pnpm publish --access public",
|
|
49
|
+
"test": "pnpm build && node --test",
|
|
50
|
+
"test:coverage": "pnpm build && c8 --include dist --exclude bin --reporter=text node --test",
|
|
51
|
+
"bench": "pnpm build && node scripts/benchmarks/run.mjs",
|
|
52
|
+
"schema:build": "node scripts/generate-schema.mjs",
|
|
53
|
+
"size": "size-limit",
|
|
54
|
+
"test:watch": "node --test --watch",
|
|
55
|
+
"typecheck": "tsc --noEmit",
|
|
56
|
+
"prepare": "simple-git-hooks"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@clack/prompts": "^1.0.0",
|
|
60
|
+
"cac": "^6.7.14",
|
|
61
|
+
"fast-glob": "^3.3.2",
|
|
62
|
+
"picocolors": "^1.1.1",
|
|
63
|
+
"picomatch": "^2.3.1",
|
|
64
|
+
"zod": "^4.3.6"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@biomejs/biome": "^2.3.8",
|
|
68
|
+
"@size-limit/file": "^11.2.0",
|
|
69
|
+
"@types/node": "^24.2.1",
|
|
70
|
+
"bumpp": "^10.3.2",
|
|
71
|
+
"c8": "^10.1.3",
|
|
72
|
+
"jiti": "^2.5.1",
|
|
73
|
+
"lint-staged": "^16.2.7",
|
|
74
|
+
"simple-git-hooks": "^2.13.1",
|
|
75
|
+
"size-limit": "^11.2.0",
|
|
76
|
+
"tinybench": "^6.0.0",
|
|
77
|
+
"typescript": "^5.9.3",
|
|
78
|
+
"unbuild": "^3.6.1"
|
|
79
|
+
},
|
|
80
|
+
"size-limit": [
|
|
81
|
+
{
|
|
82
|
+
"path": "dist/cli.mjs",
|
|
83
|
+
"limit": "10 kB"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"simple-git-hooks": {
|
|
87
|
+
"pre-commit": "pnpm lint-staged"
|
|
88
|
+
},
|
|
89
|
+
"lint-staged": {
|
|
90
|
+
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
|
|
91
|
+
"biome check --write --no-errors-on-unmatched"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
}
|