@pithosai/pithosai 1.0.5 → 1.0.7
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 +56 -10
- package/dist/cosai.mjs +105 -104
- package/dist/heartbeat.mjs +105 -104
- package/dist/mktai.mjs +105 -104
- package/dist/pithosai.mjs +105 -104
- package/dist/pmsai.mjs +105 -104
- package/dist/qasai.mjs +105 -104
- package/dist/rdsai.mjs +105 -104
- package/dist/render-markdown.mjs +2 -2
- package/dist/wrsai.mjs +105 -104
- package/package.json +1 -1
package/dist/render-markdown.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createRequire as e}from"node:module";let t=e(import.meta.url);var r,n,a,i,s,l,o,c={5590(e){e.exports=import("chalk").then(function(e){return e})},8703(e){e.exports=import("marked").then(function(e){return e})},1421(e){e.exports=t("node:child_process")},1455(e){e.exports=t("node:fs/promises")},6760(e){e.exports=t("node:path")},
|
|
2
|
+
import{createRequire as e}from"node:module";let t=e(import.meta.url);var r,n,a,i,s,l,o,c={5590(e){e.exports=import("chalk").then(function(e){return e})},8703(e){e.exports=import("marked").then(function(e){return e})},1421(e){e.exports=t("node:child_process")},1455(e){e.exports=t("node:fs/promises")},6760(e){e.exports=t("node:path")},6885(e,t,r){r.a(e,async function(e,t){try{var n=r(1421),a=r(1455),i=r(6760),s=r(161),l=e([s]);async function o({text:e,showAll:t}){let r,a=e.endsWith("\n")?e:`${e}
|
|
3
3
|
`;if(t||!process.stdout.isTTY)return void process.stdout.write(a);let i=(r=process.env.PAGER?.trim())||"less -RFX",s=(0,n.spawn)(i,{shell:!0,stdio:["pipe","inherit","inherit"],env:process.env});await new Promise(e=>{let t=!1,r=()=>{t||(t=!0,e())};s.once("error",e=>{process.stderr.write(`pager failed (${e.message}); printing full output to stdout
|
|
4
4
|
`),process.stdout.write(a),r()}),s.once("close",()=>r());let n=s.stdin;if(!n){process.stdout.write(a),r();return}new Promise((e,t)=>{n.end(a,"utf8",r=>{r?t(r):e()})}).catch(e=>{process.stderr.write(`pager write failed (${e.message}); printing full output to stdout
|
|
5
|
-
`),process.stdout.write(a),r()})})}async function
|
|
5
|
+
`),process.stdout.write(a),r()})})}async function c(){var e;let t,r,n=(t=(e=process.argv.slice(2)).includes("--show-all"),r=e.filter(e=>"--show-all"!==e),0===r.length?{ok:!1,message:"Usage: node scripts/render-markdown.js [--show-all] <path-to-file.md>"}:r.length>1?{ok:!1,message:"Expected a single markdown file path."}:{ok:!0,filePath:r[0],showAll:t});n.ok||(console.error(n.message),process.exit(1));let{filePath:l,showAll:c}=n,p=(0,i.resolve)(process.cwd(),l);try{let e=await (0,a.readFile)(p,"utf-8"),t=(0,s.o)(e);await o({text:t,showAll:c})}catch(e){console.error(`Error: ${e.message}`),process.exit(1)}}s=(l.then?(await l)():l)[0],function(){let e=process.argv[1];if(!e)return!1;let t=(0,i.basename)((0,i.resolve)(e));return"render-markdown.js"===t||"render-markdown.mjs"===t}()&&c(),t()}catch(e){t(e)}})},5935(e,t,r){r.d(t,{$0:()=>s,dE:()=>i});let n=RegExp("\\x1b\\[[0-9;]*m","g"),a=RegExp("\\x1b\\]8;;.*?\\x1b\\\\|\\x1b\\]8;;\\x1b\\\\","g");function i(e){return 0===e||e<32||e>=127&&e<160||8205===e||8204===e||e>=65024&&e<=65039||e>=917760&&e<=917999||e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071?0:e>=127744&&e<=129791||e>=9728&&e<=10175||e>=65280&&e<=65519?2:e<4352?e>=12288&&e<=12351?2:1:e>=4352&&e<=4607||e>=11904&&e<=42191||e>=44032&&e<=55215||e>=63744&&e<=64255||e>=65040&&e<=65135||e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}function s(e){let t=e.replace(a,"").replace(n,""),r=0;for(let e=0;e<t.length;){let n=t.codePointAt(e)??0;r+=i(n),e+=n>65535?2:1}return r}},161(e,t,r){r.a(e,async function(e,n){try{r.d(t,{o:()=>o});var a=r(8703),i=r(1483),s=r(6022),l=e([i,a]);[i,a]=l.then?(await l)():l;let c="\x1b]8;;",p=!1;function o(e){if("string"!=typeof e||!e.trim())return e??"";p||(a.marked.use({renderer:{heading({tokens:e,depth:t}){let r=this.parser.parseInline(e),n=i.w4.heading(r);return 1===t?`
|
|
6
6
|
${n}
|
|
7
7
|
`:`${n}
|
|
8
8
|
`},strong({tokens:e}){return i.w4.strong(this.parser.parseInline(e))},em({tokens:e}){return i.w4.muted(this.parser.parseInline(e))},codespan:({text:e})=>i.w4.muted(e),link({tokens:e,href:t}){var r,n;return r=this.parser.parseInline(e),n=t??"",n?.trim()?(0,i.D8)()?`${c}${n}\x1b\\${r}${c}\x1b\\`:`${r} (${n})`:r},blockquote({tokens:e}){let t=this.parser.parse(e).trimEnd().split("\n").map(e=>i.w4.muted("│ ")+e).join("\n");return`
|