@p-buddy/parkdown 0.0.13 → 0.0.19
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 +95 -33
- package/dist/cli.js +1 -1
- package/dist/index.js +534 -361
- package/dist/index.umd.cjs +15 -14
- package/package.json +4 -2
package/dist/index.umd.cjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`),
|
|
3
|
-
`}},
|
|
4
|
-
`.repeat(
|
|
5
|
-
`.repeat(
|
|
6
|
-
`))return`\`${e}\``;const
|
|
1
|
+
(function(u,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("node:fs"),require("node:path"),require("node:url"),require("unified"),require("remark-parse"),require("unist-util-visit"),require("ts-dedent")):typeof define=="function"&&define.amd?define(["exports","node:fs","node:path","node:url","unified","remark-parse","unist-util-visit","ts-dedent"],d):(u=typeof globalThis<"u"?globalThis:u||self,d(u.index={},u.node_fs,u.node_path,u.node_url,u.unified,u.remarkParse,u.unistUtilVisit,u.tsDedent))})(this,function(u,d,g,K,we,$e,ye,Ce){"use strict";var mt=Object.defineProperty;var dt=(u,d,g)=>d in u?mt(u,d,{enumerable:!0,configurable:!0,writable:!0,value:g}):u[d]=g;var _=(u,d,g)=>dt(u,typeof d!="symbol"?d+"":d,g);const $=(e,t)=>e.position.start.offset-t.position.start.offset;$.reverse=(e,t)=>$(t,e);const U=e=>e.position!==void 0&&e.position.start.offset!==void 0&&e.position.end.offset!==void 0,be=we.unified().use($e),B={md:e=>be.parse(e)},A=(e,t)=>{const n=[];return ye.visit(e,(s,r,i)=>{if(s.type!=="root"){if(t&&s.type!==t)return;if(U(s)){const o=((i==null?void 0:i.children.length)??0)-1;n.push({...s,siblingIndex:r,siblingCount:o})}}}),n},Ee=e=>e.children.length===0,Y=(e,t,...n)=>{if(n.length===0)throw new Error("No nodes to replace content from");n.sort($);const s=n.at(0),r=n.at(-1);return e.slice(0,s.position.start.offset)+t+e.slice(r.position.end.offset)},Se=(e,t,n)=>{const s=Math.min(t.position.end.offset,n.position.end.offset),r=Math.max(t.position.start.offset,n.position.start.offset);return e.slice(s,r)},O=(...e)=>e.join(" "),ke=(...e)=>e.join(`
|
|
2
|
+
`),xe=e=>{const t=e.split("?");return t.length>1?[t.slice(0,-1).join("?"),t.at(-1)]:[e,""]},Ne=e=>xe(e)[0],F=/,\s*(?![^()]*\))/,ee={reserved:{semi:";",slash:"/",question:"?",colon:":",at:"@",equal:"=",and:"&"},unsafe:{quote:'"',angle:"<",unangle:">",hash:"#",percent:"%",curly:"{",uncurly:"}",pipe:"|",back:"\\",carrot:"^",tilde:"~",square:"[",unsquare:"]",tick:"`",line:`
|
|
3
|
+
`}},Me="-",te={static:[["'''",'"'],["''","'"],[/parkdown:\s+/g,""],[/p↓:\s+/g,""]],url:[...Object.entries(ee.unsafe),...Object.entries(ee.reserved)]},ne=(e,[t,n])=>e.replaceAll(t,n),I=(e,t=Me)=>{const n=te.static.reduce(ne,e);return te.url.map(([s,r])=>[t+s+t,r]).reduce(ne,n).replaceAll(t," ")},Re=["string","number","boolean"],Te=e=>Re.includes(e),je=/^([a-zA-Z0-9_-]+)(?:\(([^)]*)\))?$/,_e=e=>{const t=e.match(je);if(!t)throw new Error(`Invalid invocation: ${e}`);const[,n,s=""]=t;if(!s.trim())return{name:n,parameters:[]};const r=Oe(s);return{name:n,parameters:r}},Ae=(e,t)=>{for(let n=t+1;n<e.length;n++)if(e[n]!==void 0)return!1;return!0},Oe=e=>{const t=[];let n="",s=!1;for(let r=0;r<e.length;r++){const i=e[r],o=i==="'";if(o&&e.at(r+1)==="'"){const l=e.at(r+2)==="'";s=!s,n+=l?"'''":"''",r+=l?2:1}else o?(s=!s,n+=i):i===","&&!s?(t.push(n.trim()),n=""):n+=i}return t.push(n.trim()),t.map(r=>r===""?void 0:r?Ie(r):void 0).filter((r,i,o)=>r!==void 0||!Ae(o,i))},Ie=e=>{const t=e.length>=2&&e[0]==="'"&&e.at(-1)==="'",n=t&&e.length>=4&&e[1]==="'"&&e.at(-2)==="'";return!t||n?e:e.slice(1,-1)},qe=e=>{const t=/^(\w+)(?:\(([^)]*)\))?/,n=e.match(t);if(!n)return{name:e};const[,s,r]=n;if(!r)return{name:s};const i=/(\w+)(\?)?:\s*([^,]+)/g,o=[];let l;for(;(l=i.exec(r))!==null;){const[,c,a,m]=l,p=m.trim();if(!Te(p))throw new Error(`Unsupported type: ${p}`);o.push({name:c,optional:a==="?",type:p})}return{name:s,parameters:o}},M=e=>{const t=e.map(qe).reduce((n,{name:s,parameters:r})=>n.set(s,r),new Map);return n=>{const{name:s,parameters:r}=_e(n);if(!t.has(s))throw new Error(`Unknown method: ${s}`);const i=t.get(s);if(i===void 0)return{name:s};if(r.length>i.length){const o=i.filter(({optional:c})=>!c).length,l=o===i.length?o.toString():`${o} - ${i.length}`;throw new Error(`Too many parameters: ${r.length} for method '${s}' (expected: ${l})`)}return i.reduce((o,{name:l,optional:c,type:a},m)=>{const p=r[m];if(p===void 0){if(c)return o;throw new Error(`Missing required parameter: ${l} for method '${s}'`)}switch(a){case"string":o[l]=p;break;case"number":case"boolean":o[l]=JSON.parse(p);break}if(typeof o[l]!==a)throw new Error(`Invalid type: ${l} must be ${a}, got ${typeof o[l]} for method '${s}'`);return o},{name:s})}},H=e=>Object.entries(e).filter(([t])=>t!=="name"&&!isNaN(Number(t))).map(([t,n])=>n),De=M(["code(lang?: string, meta?: string)","quote()","dropdown(summary: string, open?: boolean, space?: string)"]),x=(e,t=1)=>`
|
|
4
|
+
`.repeat(t)+e+`
|
|
5
|
+
`.repeat(t),Q=(e,t,n)=>`<${t}${n?` ${n}`:""}>${x(e)}</${t}>`,se=(e,t,n)=>{const s=De(t);switch(s.name){case"code":if(!s.lang&&!s.meta&&(n==null?void 0:n.inline)&&!e.includes(`
|
|
6
|
+
`))return`\`${e}\``;const i=s.lang??(n==null?void 0:n.extension)??"",o=s.meta?` ${s.meta}`:"";return x(`\`\`\`${i}${o}${x(e)}\`\`\``);case"quote":return n!=null&&n.inline&&!e.includes(`
|
|
7
7
|
|
|
8
|
-
`)?`> ${e}`:
|
|
9
|
-
`),"details",s.open?"open":void 0))}},q=e=>{const
|
|
10
|
-
`||e===void 0}),
|
|
11
|
-
`;)a--;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`)
|
|
15
|
-
`)
|
|
8
|
+
`)?`> ${e}`:x(Q(x(e),"blockquote"));case"dropdown":const l=Q(I(s.summary),"summary");return x(Q([l,e].join(`
|
|
9
|
+
`),"details",s.open?"open":void 0))}};class v{constructor(...t){_(this,"_intervals",[]);_(this,"collapsed",!0);for(const[n,s]of t)this.push(n,s)}get intervals(){return this._intervals}push(t,n){return n??(n=t+1),this._intervals.push([Math.min(t,n),Math.max(t,n)]),this.collapsed=!1,this}combine(t){for(const[n,s]of t.intervals)this.push(n,s);return this}collapse(t=!1){const{_intervals:n,collapsed:s}=this;if(s&&!t||!n.length)return this;n.sort((l,c)=>l[0]-c[0]);const r=[];let[i,o]=n[0];for(let l=1;l<n.length;l++){const[c,a]=n[l];c<=o?o=Math.max(o,a):(r.push([i,o]),i=c,o=a)}return r.push([i,o]),this._intervals=r,this.collapsed=!0,this}subtract(t){this.collapse(),t.collapse();const{_intervals:n}=this,{_intervals:s}=t;if(!n.length||!s.length)return this;let r=[...n];for(const[i,o]of s){const l=[];for(const[c,a]of r){if(o<=c||i>=a){l.push([c,a]);continue}i>c&&l.push([c,i]),o<a&&l.push([o,a])}r=l}return this._intervals=r,this.collapse(!0),this}test(t,n="head"){const{_intervals:s}=this;switch(n){case"head":return s.some(([r,i])=>t>=r&&t<i);case"tail":return s.some(([r,i])=>t>r&&t<=i);case"both":return s.some(([r,i])=>t>=r&&t<=i);case"none":return s.some(([r,i])=>t>r&&t<i)}}slice(t){this.collapse();const n=[];for(const[s,r]of this._intervals)n.push(t.slice(s,r));return n.filter(Boolean).join("")}offset(t){for(const n of this._intervals)n[0]+=t,n[1]+=t;return this}}const q=e=>{const t=/(\/\/[^\n]*|\/\*[\s\S]*?\*\/|<!--[\s\S]*?-->)/gm,n=[];let s;for(;(s=t.exec(e))!==null;){const r=[s.index,s.index+s[0].length],i=Pe(s[0]).trim();n.push({range:r,value:i})}return n},Pe=e=>e.startsWith("//")?e.slice(2):e.startsWith("/*")?e.slice(2,-2):e.startsWith("<!--")?e.slice(4,-3):e,We=["p↓:","pd:","parkdown:"];M(["splice(delete?: number, insert?: string)"]);const re=(e,t)=>e.range[0]-t.range[0],G=(e,t,n)=>(n??q(e)).filter(({value:s})=>s.split(" ").includes(t)).sort(re),ie=e=>({isSpace:e===" ",isNewline:e===`
|
|
10
|
+
`||e===void 0}),oe=e=>We.flatMap(t=>G(e,t)).sort((t,n)=>t.range[0]-n.range[0]).reverse().reduce((t,{range:[n,s],value:r})=>{const i=(b,E)=>t.slice(0,b)+t.slice(E),o=ie(t[n-1]),l=ie(t[s]),c=s===t.length;let a=n;for(;a>0&&t[a-1]!==`
|
|
11
|
+
`;)a--;let m=s;for(;m<t.length&&t[m]!==`
|
|
12
|
+
`;)m++;const p=t.slice(a,n).trim()===""&&t.slice(s,m).trim()==="";return o.isNewline&&l.isNewline?i(n-(c?1:0),s+1):o.isNewline||p?i(a,s+(l.isSpace||l.isNewline?1:0)):i(n-(o.isSpace?1:0),s)},e),Le=M(["extract(id: string, 0?: string, 1?: string, 2?: string)","remove(id: string, 0?: string, 1?: string, 2?: string)","replace(id: string, with?: string, space?: string)","remap(id: string, from: string, to?: string, space?: string)","single-line(id: string, includeBoundaries?: boolean)","trim(id: string, inside?: boolean, outside?: boolean)","trim-start(id: string, left?: boolean, right?: boolean)","trim-end(id: string, left?: boolean, right?: boolean)","splice-start(id: string, deleteCount?: number, insert?: string, space?: string)","splice-end(id: string, deleteCount?: number, insert?: string, space?: string)","debug()"]),C=(e,t,n)=>{const s=G(e,t,n),r=[];for(let i=0;i<s.length-1;i+=2)r.push([s[i],s[i+1]]);return r},Ue=(e,t,n)=>new v(...G(e,t,n).map(({range:s})=>s)),D=e=>Ce.dedent(e).trim(),Be=(e,...t)=>{if(t.length===0)return e;const n=q(e),s=new v,r=new v;for(const i of t)for(const[o,l]of C(e,i,n)){s.push(o.range[1],l.range[0]);const[c,...a]=e.slice(o.range[1],l.range[0]),m=a[a.length-1];r.push(o.range[0],o.range[1]+(c.trim()?0:1)),r.push(l.range[0],l.range[1]+(m.trim()?0:1))}return D(s.subtract(r).slice(e))},Fe=(e,...t)=>{if(t.length===0)return e;const n=q(e),s=([i,o])=>e.slice(i,o),r=new v;for(const i of t)for(const[o,l]of C(e,i,n)){const c=s([l.range[1],l.range[1]+1]).at(-1);r.push(o.range[0],c===`
|
|
13
|
+
`?l.range[1]+1:l.range[1])}return D(new v([0,e.length]).subtract(r).slice(e))},He=(e,t,n,s)=>{if(!t)return e;let r="",i=0;for(const[o,l]of C(e,t))r+=e.slice(i,o.range[1]),r+=I(n??o.value,s),i=l.range[0];return r+=e.slice(i),D(new v([0,r.length]).subtract(Ue(r,t)).slice(r))},Qe=(e,t,n,s,r,i)=>{if(!t)return e;const o=!(s===void 0||s<0),l=r?I(r,i):"",c=s??0,a=q(e),m=new v(...a.map(({range:p})=>p));return C(e,t,a).map(p=>p[n==="start"?0:1]).sort(re).reverse().reduce((p,{range:b})=>{const E=new v,W=o?1:-1;let T=Math.abs(c),h=o?b[1]:b[0];for(;T>0&&h<p.length&&h>=0;)m.test(h)||(E.push(h),T--),h+=W;return h=Math.min(Math.max(0,h),p.length),p=p.slice(0,h)+l+p.slice(h),new v([0,p.length]).subtract(E.offset(o?0:l.length)).slice(p)},e)},Ge=(e,t,n,s,r)=>{if(!t)return e;let i="",o=0;[n,s]=[n,s??""].map(l=>I(l,r));for(const[l,c]of C(e,t))i+=e.slice(o,l.range[1]),i+=e.slice(l.range[1],c.range[0]).replaceAll(n,s),o=c.range[0];return i+=e.slice(o),i},ze=(e,t)=>{if(!t)return e;let n="",s=0;for(const[r,i]of C(e,t))n+=e.slice(s,r.range[1]),n+=e.slice(r.range[1],i.range[0]).replaceAll(/[\s\n]+/g," "),s=i.range[0];return n+=e.slice(s),n},le=(e,t,n)=>{var i,o,l,c;if(!t)return e;const s=a=>/\s/.test(e[a]),r=new v;for(const[a,m]of C(e,t)){if((i=n.start)!=null&&i.left){let p=a.range[0]-1;for(;s(p);)r.push(p--)}if((o=n.start)!=null&&o.right){let p=a.range[1];for(;s(p);)r.push(p++)}if((l=n.end)!=null&&l.left){let p=m.range[0]-1;for(;s(p);)r.push(p--)}if((c=n.end)!=null&&c.right){let p=m.range[1];for(;s(p);)r.push(p++)}}return new v([0,e.length]).subtract(r).slice(e)},Ve=(e,t,n)=>{if(!t)return oe(e);const s=Le(t);switch(s.name){case"extract":e=Be(e,s.id,...H(s));break;case"remove":e=Fe(e,s.id,...H(s));break;case"replace":e=He(e,s.id,s.with,s.space);break;case"splice-start":case"splice-end":{const{deleteCount:r,insert:i,space:o,id:l}=s,c=s.name==="splice-start"?"start":"end";e=Qe(e,l,c,r,i,o);break}case"trim-start":case"trim-end":{const{left:r,right:i,id:o}=s,l=s.name==="trim-start"?"start":"end";e=le(e,o,{[l]:{left:r??!0,right:i??!0}});break}case"trim":{const{inside:r,outside:i,id:o}=s;e=le(e,o,{start:{left:i??!0,right:r??!0},end:{left:r??!0,right:i??!0}});break}case"single-line":e=ze(e,s.id);break;case"remap":e=Ge(e,s.id,s.from,s.to,s.space);break}return e=n&&s.name!=="debug"?oe(e):e,n?D(e):e},Xe=["recipe(id: string)"],Je=["recipe(id: string, 0?: string, 1?: string, 2?: string)"],ce={register:M(Xe),apply:M(Je)},R=class R{constructor(){_(this,"recipes",new Map)}tryRegister(t){const n=R.Entries(t);for(let s=0;s<n.length;s++){const[r,i]=n[s];if(r!=="register")continue;const o=ce.register(i);switch(o.name){case"recipe":const l=n.slice(s+1).filter(([c])=>c!=="register").map(([c,a])=>`${c}=${a}`).join("&");this.recipes.set(o.id,l);break;default:throw new Error(`Unknown registration: ${o.name}`)}}}apply(t){const n=R.Entries(t),s=[];for(let r=0;r<n.length;r++){const[i,o]=n[r];if(i!=="apply"){s.push(`${i}=${o}`);continue}const l=ce.apply(o);switch(l.name){case"recipe":s.push(this.recipes.get(l.id)),s.push(...H(l).map(c=>this.recipes.get(c)));break;default:throw new Error(`Unknown registration: ${l.name}`)}}return s.join("&")}};_(R,"Entries",t=>Array.from(new URLSearchParams(t).entries()));let z=R;const Ze=["http","./","../","?"],Ke=({url:e})=>Ze.some(t=>e.startsWith(t)),Ye=e=>U(e)&&Ee(e)&&Ke(e),ae=({url:e},t)=>`[](${t?g.join(t,e):e})`,f={_open:"<!--",_close:"-->",_flag:"p↓",get begin(){return O(f._open,f._flag,"BEGIN",f._close)},get end(){return O(f._open,f._flag,"END",f._close)},lengthOf(e){const t=`lines: ${e.split(`
|
|
14
|
+
`).length}`,n=`chars: ${e.length}`;return O(f._open,f._flag,"length",t,n,f._close)}},pe=e=>t=>U(t)&&t.value===f[e],et=({position:e,url:t,siblingCount:n},s)=>({position:e,url:t,headingDepth:s,inline:n>=1}),tt=({position:{start:e},url:t,siblingCount:n},{position:{end:s}},r)=>({position:{start:e,end:s},url:t,headingDepth:r,inline:n>=1}),nt=(e,t,n)=>(e.inline?O:ke)(ae(e,n),f.begin,f.lengthOf(t),t,f.end),st=e=>{const t=A(e,"heading").reduce((n,{position:s,depth:r})=>n.set(s.start.line,r),new Map);return n=>{for(let s=n.position.start.line;s>=1;s--){const r=t.get(s);if(r)return r}return 0}},P={openingCommentDoesNotFollowLink:({position:{start:e}})=>new Error(`Opening comment (@${e.line}:${e.column}) does not follow link`),closingCommentNotMatchedToOpening:({position:{start:e}})=>new Error(`Closing comment (@${e.line}:${e.column}) does not match to opening comment`),openingCommentNotClosed:({position:{start:e}})=>new Error(`Opening comment (@${e.line}:${e.column}) is not followed by a closing comment`)},rt=(e,t)=>{const n=[],s=[...e.map(i=>({node:i,type:"open"})),...t.map(i=>({node:i,type:"close"}))].sort((i,o)=>$(i.node,o.node)),r=[];for(const i of s)if(i.type==="open")r.push(i);else{const o=i.node;if(r.length===0)throw P.closingCommentNotMatchedToOpening(o);const l=r.pop().node;if(r.length>0)continue;n.push({open:l,close:o})}if(r.length>0)throw P.openingCommentNotClosed(r[0].node);return n},it=(e,t,n)=>{const s=[...t].sort($),r=[];return[...n].sort((i,o)=>$.reverse(i.open,o.open)).forEach(i=>{for(;s.length>0;){const o=s.pop();if(o.position.start.offset<i.open.position.start.offset){if(Se(e,o,i.open).trim()!=="")throw P.openingCommentDoesNotFollowLink(i.open);return r.push([o,i])}r.push(o)}throw P.openingCommentDoesNotFollowLink(i.open)}),r.push(...s.reverse()),r.reverse()},ue=(e,t)=>{t??(t=B.md(e));const n=st(t),s=A(t,"link").filter(Ye),r=A(t,"html").sort($),i=r.filter(pe("begin")),o=r.filter(pe("end")),l=rt(i,o);return it(e,s,l).map(a=>Array.isArray(a)?tt(a[0],a[1].close,n(a[0])):et(a,n(a)))},ot=(e,{url:t})=>n=>e(g.join(g.dirname(t),n)),me=(...e)=>{const t=e.reduce((n,s)=>n+s,0);return Math.min(Math.max(t,1),6)},lt=(e,t,n)=>{if(t===0)return e;n??(n=B.md(e));const s=A(n,"heading"),r=e.split(`
|
|
15
|
+
`);for(const i of s){const{depth:o,position:{start:l,end:c}}=i,a=me(o,t),m=r[l.line-1].slice(o,c.column),p="#".repeat(a)+m;r[l.line-1]=p,i.depth=a}return r.join(`
|
|
16
|
+
`)},de=e=>ue(e).reverse().sort($.reverse).reduce((t,n)=>Y(t,ae(n),n),e),ge=(e,t,n,s,r)=>{try{e=de(e),e=lt(e,t);const i=B.md(e),o=new z;return ue(e,i).sort($).reverse().map(l=>{var E,W,T;const{url:c,headingDepth:a}=l,[m,...p]=g.basename(c).split("?"),b=o.apply(p.join("?"));if(c.startsWith("?")){const S=(E=new K.URLSearchParams(b).get("register"))==null?void 0:E.split(F);S==null||S.forEach(L=>o.tryRegister(L))}else if(c.startsWith("./")||c.startsWith("../")){const h=m.split(".").pop()??"",S=g.dirname(c),L=g.join(S,m);let w=n(L);const j=new K.URLSearchParams(b),V=(W=(k=>{const y=Array.from(j.entries()).filter(([N])=>N===k).map(([N,Z])=>Z);return y.length>=1?y.join(","):void 0})("region"))==null?void 0:W.split(F);w=(V==null?void 0:V.reduce((k,y,N,{length:Z})=>Ve(k,y,N===Z-1),w))??w;const at=j.has("skip"),pt=j.get("heading")??0,ut=j.has("inline");let{inline:X}=l;if(ut&&(X=!0),!at)if(h==="md"){const k=ot(n,l),y=r?g.join(r,S):S,N=me(a,Number(pt));w=ge(w,N,k,L,y)}else/^(js|ts)x?|svelte$/i.test(h)&&(w=se(w,"code",{extension:h,inline:X}));const J=(T=j.get("wrap"))==null?void 0:T.split(F);return w=(J==null?void 0:J.reduce((k,y)=>se(k,y,{extension:h,inline:X}),w))??w,{target:l,content:nt(l,w,r)}}else throw c.startsWith("http")?new Error("External web links are not implemented yet"):new Error(`Unsupported link type: ${c}`)}).filter(Boolean).reduce((l,{target:c,content:a})=>Y(l,a,c),e)}catch(i){throw new Error(`Error populating inclusions in file ${s??"(unknown)"}: ${i}`)}},he=e=>d.readFileSync(e,"utf-8"),fe=e=>{const t=g.resolve(e),n=g.dirname(t);return{content:he(t),dir:n,path:t}},ve=(e,t=!0,n)=>{const{dir:s,path:r,content:i}=fe(e);n==null||n.unwatch(r),n==null||n.once("change",(c,a)=>{console.log(`Change detected in "${c}". Regenerating "${r}"...`),ve(e,t,n)});const l=ge(i,0,c=>{const a=g.resolve(s,Ne(c));return n==null||n.add(a),he(a)},r);return t&&d.writeFileSync(r,l),n==null||n.add(r),l},ct=(e,t=!0,n)=>{const{path:s,content:r}=fe(e),i=de(r);return t&&d.writeFileSync(s,i),i};u.depopulateMarkdownInclusions=ct,u.populateMarkdownInclusions=ve,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@p-buddy/parkdown",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.19",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"bin": "./dist/cli.js",
|
|
8
8
|
"files": [
|
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
"build": "pnpm run build:lib && pnpm run build:cli",
|
|
37
37
|
"test": "vitest",
|
|
38
38
|
"test:run": "vitest run",
|
|
39
|
-
"cli": "npx tsx src/cli.ts"
|
|
39
|
+
"cli": "npx tsx src/cli.ts",
|
|
40
|
+
"increment": "npm version patch",
|
|
41
|
+
"publish:commit": "git add -u && git commit -m 'chore: regenerate docs and update version'"
|
|
40
42
|
},
|
|
41
43
|
"typings": "./dist/index.d.ts",
|
|
42
44
|
"exports": {
|