create-cedar-app 3.0.0 → 3.0.1-next.27
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/create-cedar-app.js +3 -3
- package/package.json +7 -7
- package/templates/esm-js/package.json +1 -1
- package/templates/esm-ts/package.json +1 -1
- package/templates/js/api/package.json +2 -2
- package/templates/js/package.json +4 -4
- package/templates/js/web/package.json +4 -4
- package/templates/ts/api/package.json +2 -2
- package/templates/ts/package.json +4 -4
- package/templates/ts/web/package.json +4 -4
- package/templates/esm-js/.yarn/install-state.gz +0 -0
- package/templates/esm-ts/.yarn/install-state.gz +0 -0
package/dist/create-cedar-app.js
CHANGED
|
@@ -181,7 +181,7 @@ ${C}${v}`),V=new Error(`Command failed: ${k}${le}`),V.code=G<0?_(G):G}return V.s
|
|
|
181
181
|
`,F=c(C,T);return Object.keys(v).forEach(function(K){var k=v[K],ee=i(k),le=c(V," "),ce=u.indexOf(ee)!==-1?"":" ",de=y(k)?" [Circular]":P(ee,k,C+1,V);G+=`${le}${F}${K}:${ce}${de}
|
|
182
182
|
`}),G.substring(0,G.length-1)}function g(v){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(v.length===0)return" []";var G=`
|
|
183
183
|
`,F=c(C,T);return v.forEach(function(K){var k=i(K),ee=c(V," "),le=y(K)?"[Circular]":P(k,K,C,V+1).toString().trimLeft();G+=`${ee}${F}- ${le}
|
|
184
|
-
`}),G.substring(0,G.length-1)}function P(v,C,V,G){switch(v){case"array":return g(C,V,G);case"object":return A(C,V,G);case"string":return h.string(C);case"symbol":return h.symbol(C.toString());case"number":return h.number(C);case"boolean":return h.boolean(C);case"null":return h.null("null");case"undefined":return h.undefined("undefined");case"date":return h.date(d(C));case"error":return h.error(m(C));default:return C&&C.toString?C.toString():Object.prototype.toString.call(C)}}function y(v){return!(["object","array"].indexOf(i(v))===-1||!S.has(v)&&(S.set(v),1))}var O="";return S.set(l),i(l)==="object"&&Object.keys(l).length>0?O=A(l):i(l)==="array"&&l.length>0&&(O=g(l)),O.length===0?"":`${E}${O.slice(1)}${_}`}},7344:o=>{"use strict";o.exports=function(a){return Array.isArray(a)?"array":a instanceof Date?"date":a instanceof Error?"error":a===null?"null":typeof a=="object"&&Object.prototype.toString.call(a)==="[object Object]"?"object":typeof a}},6608:o=>{"use strict";o.exports=z("assert")},4368:o=>{"use strict";o.exports=z("child_process")},467:o=>{"use strict";o.exports=z("events")},2058:o=>{"use strict";o.exports=z("fs")},8558:o=>{"use strict";o.exports=z("os")},7072:o=>{"use strict";o.exports=z("path")},8378:o=>{"use strict";o.exports=z("stream")},970:o=>{"use strict";o.exports=z("util")}},e={},t=function o(a){var s=e[a];if(s!==void 0)return s.exports;var i=e[a]={exports:{}};return r[a](i,i.exports,o),i.exports}(2980);HZ.exports=t})()});var YZ=M((bat,P7e)=>{P7e.exports={name:"systeminformation",version:"5.31.
|
|
184
|
+
`}),G.substring(0,G.length-1)}function P(v,C,V,G){switch(v){case"array":return g(C,V,G);case"object":return A(C,V,G);case"string":return h.string(C);case"symbol":return h.symbol(C.toString());case"number":return h.number(C);case"boolean":return h.boolean(C);case"null":return h.null("null");case"undefined":return h.undefined("undefined");case"date":return h.date(d(C));case"error":return h.error(m(C));default:return C&&C.toString?C.toString():Object.prototype.toString.call(C)}}function y(v){return!(["object","array"].indexOf(i(v))===-1||!S.has(v)&&(S.set(v),1))}var O="";return S.set(l),i(l)==="object"&&Object.keys(l).length>0?O=A(l):i(l)==="array"&&l.length>0&&(O=g(l)),O.length===0?"":`${E}${O.slice(1)}${_}`}},7344:o=>{"use strict";o.exports=function(a){return Array.isArray(a)?"array":a instanceof Date?"date":a instanceof Error?"error":a===null?"null":typeof a=="object"&&Object.prototype.toString.call(a)==="[object Object]"?"object":typeof a}},6608:o=>{"use strict";o.exports=z("assert")},4368:o=>{"use strict";o.exports=z("child_process")},467:o=>{"use strict";o.exports=z("events")},2058:o=>{"use strict";o.exports=z("fs")},8558:o=>{"use strict";o.exports=z("os")},7072:o=>{"use strict";o.exports=z("path")},8378:o=>{"use strict";o.exports=z("stream")},970:o=>{"use strict";o.exports=z("util")}},e={},t=function o(a){var s=e[a];if(s!==void 0)return s.exports;var i=e[a]={exports:{}};return r[a](i,i.exports,o),i.exports}(2980);HZ.exports=t})()});var YZ=M((bat,P7e)=>{P7e.exports={name:"systeminformation",version:"5.31.5",description:"Advanced, lightweight system and OS information library",license:"MIT",author:"Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",homepage:"https://systeminformation.io",main:"./lib/index.js",type:"commonjs",bin:{systeminformation:"lib/cli.js"},types:"./lib/index.d.ts",scripts:{test:"node ./test/test.js",testDeno:"deno run -A ./test/test.js"},files:["lib/"],keywords:["system information","sysinfo","monitor","monitoring","os","linux","osx","windows","freebsd","openbsd","netbsd","cpu","cpuload","physical cores","logical cores","processor","cores","threads","socket type","memory","file system","fsstats","diskio","block devices","netstats","network","network interfaces","network connections","network stats","iface","printer","processes","users","internet","battery","docker","docker stats","docker processes","graphics","graphic card","graphic controller","gpu","display","smart","disk layout","usb","audio","bluetooth","wifi","wifinetworks","virtual box","virtualbox","vm","backend","hardware","BIOS","chassis"],repository:{type:"git",url:"git+https://github.com/sebhildebrandt/systeminformation.git"},funding:{type:"Buy me a coffee",url:"https://www.buymeacoffee.com/systeminfo"},os:["darwin","linux","win32","freebsd","openbsd","netbsd","sunos","android"],engines:{node:">=8.0.0"}}});var Jt=M(Be=>{"use strict";var Co=z("os"),xi=z("fs"),R7e=z("path"),gy=z("child_process").spawn,C7e=z("child_process").exec,Ul=z("child_process").execSync,N7e=z("util"),Zs=process.platform,Ay=Zs==="linux"||Zs==="android",KZ=Zs==="darwin",a_=Zs==="win32",$Z=Zs==="freebsd",zZ=Zs==="openbsd",XZ=Zs==="netbsd",dy=0,ni="",Ro=null,ii=null,JZ=process.env.WINDIR||"C:\\Windows",tr,Vc="",wl=[],vy=!1,o_="",hy="$OutputEncoding = [System.Console]::OutputEncoding = [System.Console]::InputEncoding = [System.Text.Encoding]::UTF8 ; ",_y="--###START###--",qZ="--ERROR--",s_="--###ENDCMD###--",Sy="--##ID##--",c_={windowsHide:!0,maxBuffer:1024*102400,encoding:"UTF-8",env:Object.assign({},process.env,{LANG:"en_US.UTF-8"})},u_={maxBuffer:1024*102400,encoding:"UTF-8",stdio:["pipe","pipe","ignore"]};function M7e(r){let e=parseInt(r,10);return isNaN(e)&&(e=0),e}function D7e(r){let e=!1,t="",o="";for(let a of r)a>="0"&&a<="9"||e?(e=!0,t+=a):o+=a;return[o,t]}var i_=new String,my=new String().replace,Ty=new String().toLowerCase,QZ=new String().toString,ZZ=new String().substr,eee=new String().substring,tee=new String().trim,ree=new String().startsWith,nee=Math.min;function I7e(r){return r&&{}.toString.call(r)==="[object Function]"}function L7e(r){let e=[],t={};for(let o=0;o<r.length;o++){let a=Object.keys(r[o]);a.sort((i,n)=>i-n);let s="";for(let i=0;i<a.length;i++)s+=JSON.stringify(a[i]),s+=JSON.stringify(r[o][a[i]]);({}).hasOwnProperty.call(t,s)||(e.push(r[o]),t[s]=!0)}return e}function b7e(r,e){return r.sort((t,o)=>{let a="",s="";return e.forEach(i=>{a=a+t[i],s=s+o[i]}),a<s?-1:a>s?1:0})}function w7e(){return dy===0&&(dy=Co.cpus().length),dy}function No(r,e,t,o,a){t=t||":",e=e.toLowerCase(),o=o||!1,a=a||!1;let s="";return r.some(i=>{let n=i.toLowerCase().replace(/\t/g,"");if(o&&(n=n.trim()),n.startsWith(e)&&(!a||n.match(e+t)||n.match(e+" "+t))){let c=o?i.trim().split(t):i.split(t);if(c.length>=2)return c.shift(),s=c.join(t).trim(),!0}return!1}),s}function U7e(r,e){return e=e||16,r.replace(/\\x([0-9A-Fa-f]{2})/g,function(){return String.fromCharCode(parseInt(arguments[1],e))})}function V7e(r){let e="",t=0;return r.split("").forEach(o=>{o>="0"&&o<="9"?t===1&&t++:(t===0&&t++,t===1&&(e+=o))}),e}function B7e(r,e){e=e||"",r=r.toUpperCase();let t=0,o=0,a=V7e(r),s=r.split(a);if(s.length>=2){s[2]&&(s[1]+=s[2]);let i=s[1]&&s[1].toLowerCase().indexOf("pm")>-1||s[1].toLowerCase().indexOf("p.m.")>-1||s[1].toLowerCase().indexOf("p. m.")>-1||s[1].toLowerCase().indexOf("n")>-1||s[1].toLowerCase().indexOf("ch")>-1||s[1].toLowerCase().indexOf("\xF6s")>-1||e&&s[1].toLowerCase().indexOf(e)>-1;return t=parseInt(s[0],10),o=parseInt(s[1],10),t=i&&t<12?t+12:t,("0"+t).substr(-2)+":"+("0"+o).substr(-2)}}function G7e(r,e){let t={date:"",time:""};e=e||{};let o=(e.dateFormat||"").toLowerCase(),a=e.pmDesignator||"",s=r.split(" ");if(s[0]){if(s[0].indexOf("/")>=0){let i=s[0].split("/");i.length===3&&(i[0].length===4?t.date=i[0]+"-"+("0"+i[1]).substr(-2)+"-"+("0"+i[2]).substr(-2):i[2].length===2?(o.indexOf("/d/")>-1||o.indexOf("/dd/")>-1,t.date="20"+i[2]+"-"+("0"+i[1]).substr(-2)+"-"+("0"+i[0]).substr(-2)):(r.toLowerCase().indexOf("pm")>-1||r.toLowerCase().indexOf("p.m.")>-1||r.toLowerCase().indexOf("p. m.")>-1||r.toLowerCase().indexOf("am")>-1||r.toLowerCase().indexOf("a.m.")>-1||r.toLowerCase().indexOf("a. m.")>-1||o.indexOf("/d/")>-1||o.indexOf("/dd/")>-1)&&o.indexOf("dd/")!==0?t.date=i[2]+"-"+("0"+i[0]).substr(-2)+"-"+("0"+i[1]).substr(-2):t.date=i[2]+"-"+("0"+i[1]).substr(-2)+"-"+("0"+i[0]).substr(-2))}if(s[0].indexOf(".")>=0){let i=s[0].split(".");i.length===3&&(o.indexOf(".d.")>-1||o.indexOf(".dd.")>-1?t.date=i[2]+"-"+("0"+i[0]).substr(-2)+"-"+("0"+i[1]).substr(-2):t.date=i[2]+"-"+("0"+i[1]).substr(-2)+"-"+("0"+i[0]).substr(-2))}if(s[0].indexOf("-")>=0){let i=s[0].split("-");i.length===3&&(t.date=i[0]+"-"+("0"+i[1]).substr(-2)+"-"+("0"+i[2]).substr(-2))}}if(s[1]){s.shift();let i=s.join(" ");t.time=B7e(i,a)}return t}function F7e(r,e){let t=e>0,o=1,a=0,s=0,i=[];for(let c=0;c<r.length;c++)o<=e?(/\s/.test(r[c])&&!t&&(s=c-1,i.push({from:a,to:s+1,cap:r.substring(a,s+1)}),a=s+2,o++),t=r[c]===" "):(!/\s/.test(r[c])&&t&&(s=c-1,a<s&&i.push({from:a,to:s,cap:r.substring(a,s)}),a=s+1,o++),t=r[c]===" ");s=5e3,i.push({from:a,to:s,cap:r.substring(a,s)});let n=i.length;for(let c=0;c<n;c++)i[c].cap.replace(/\s/g,"").length===0&&c+1<n&&(i[c].to=i[c+1].to,i[c].cap=i[c].cap+i[c+1].cap,i.splice(c+1,1),n=n-1);return i}function k7e(r,e,t){for(let o=0;o<r.length;o++)if(r[o][e]===t)return o;return-1}function H7e(){if(o_="powershell.exe",a_){let r=`${JZ}\\system32\\WindowsPowerShell\\v1.0\\powershell.exe`;xi.existsSync(r)&&(o_=r)}}function j7e(){return a_?`"${process.env.VBOX_INSTALL_PATH||process.env.VBOX_MSI_INSTALL_PATH}\\VBoxManage.exe"`:"vboxmanage"}function Ey(r){let e="",t,o="";if(r.indexOf(_y)>=0){t=r.split(_y);let s=t[1].split(Sy);e=s[0],s.length>1&&(r=s.slice(1).join(Sy))}r.indexOf(s_)>=0&&(t=r.split(s_),o=t[0]);let a=-1;for(let s=0;s<wl.length;s++)wl[s].id===e&&(a=s,wl[s].callback(o));a>=0&&wl.splice(a,1)}function Y7e(){tr||(tr=gy(o_,["-NoProfile","-NoLogo","-InputFormat","Text","-NoExit","-Command","-"],{stdio:"pipe",windowsHide:!0,maxBuffer:1024*102400,encoding:"UTF-8",env:Object.assign({},process.env,{LANG:"en_US.UTF-8"})}),tr&&tr.pid&&(vy=!0,tr.stdout.on("data",r=>{Vc=Vc+r.toString("utf8"),r.indexOf(s_)>=0&&(Ey(Vc),Vc="")}),tr.stderr.on("data",()=>{Ey(Vc+qZ)}),tr.on("error",()=>{Ey(Vc+qZ)}),tr.on("close",()=>{tr&&tr.kill()})))}function q7e(){try{tr&&(tr.stdin.write("exit"+Co.EOL),tr.stdin.end())}catch{tr&&tr.kill()}vy=!1,tr=null}function W7e(r){if(vy){let e=Math.random().toString(36).substring(2,12);return new Promise(t=>{process.nextTick(()=>{function o(a){t(a)}wl.push({id:e,cmd:r,callback:o,start:new Date});try{tr&&tr.pid&&tr.stdin.write(hy+"echo "+_y+e+Sy+"; "+Co.EOL+r+Co.EOL+"echo "+s_+Co.EOL)}catch{t("")}})})}else{let e="";return new Promise(t=>{process.nextTick(()=>{try{let o=Co.release().split(".").map(Number),a=o[0]<10?["-NoProfile","-NoLogo","-InputFormat","Text","-NoExit","-ExecutionPolicy","Unrestricted","-Command","-"]:["-NoProfile","-NoLogo","-InputFormat","Text","-ExecutionPolicy","Unrestricted","-Command",hy+r],s=gy(o_,a,{stdio:"pipe",windowsHide:!0,maxBuffer:1024*102400,encoding:"UTF-8",env:Object.assign({},process.env,{LANG:"en_US.UTF-8"})});if(s&&!s.pid&&s.on("error",()=>{t(e)}),s&&s.pid){if(s.stdout.on("data",i=>{e=e+i.toString("utf8")}),s.stderr.on("data",()=>{s.kill(),t(e)}),s.on("close",()=>{s.kill(),t(e)}),s.on("error",()=>{s.kill(),t(e)}),o[0]<10)try{s.stdin.write(hy+r+Co.EOL),s.stdin.write("exit"+Co.EOL),s.stdin.end()}catch{s.kill(),t(e)}}else t(e)}catch{t(e)}})})}}function K7e(r,e,t){let o="";return t=t||{},new Promise(a=>{process.nextTick(()=>{try{let s=gy(r,e,t);s&&!s.pid&&s.on("error",()=>{a(o)}),s&&s.pid?(s.stdout.on("data",i=>{o+=i.toString()}),s.on("close",()=>{s.kill(),a(o)}),s.on("error",()=>{s.kill(),a(o)})):a(o)}catch{a(o)}})})}function $7e(){if(a_){if(!ni)try{let t=Ul("chcp",c_).toString().split(`\r
|
|
185
185
|
`)[0].split(":");ni=t.length>1?t[1].replace(".","").trim():""}catch{ni="437"}return ni}if(Ay||KZ||$Z||zZ||XZ){if(!ni)try{let t=Ul("echo $LANG",u_).toString().split(`\r
|
|
186
186
|
`)[0].split(".");ni=t.length>1?t[1].trim():"",ni||(ni="UTF-8")}catch{ni="UTF-8"}return ni}}function z7e(){if(Ro!==null)return Ro;if(Ro=!1,a_)try{let r=Ul("WHERE smartctl 2>nul",c_).toString().split(`\r
|
|
187
187
|
`);r&&r.length?Ro=r[0].indexOf(":\\")>=0:Ro=!1}catch{Ro=!1}if(Ay||KZ||$Z||zZ||XZ)try{Ro=Ul("which smartctl 2>/dev/null",u_).toString().split(`\r
|
|
@@ -444,7 +444,7 @@ Profile on interface`)}catch(r){return r.status===1&&r.stdout.includes("AutoConf
|
|
|
444
444
|
`);let Ae=V9e(k);A=F9e(k,Ae,Gee),g=H9e(Ae),P=j9e(Ae),y=Y9e(P)}catch{me.noop()}d=me.getValue(de,"duplex"),d=d.startsWith("cat")?"":d,m=parseInt(me.getValue(de,"mtu"),10);let ge=parseInt(me.getValue(de,"speed"),10);T=isNaN(ge)?null:ge;let Z=me.getValue(de,"tx bitrate");T===null&&Z&&(ge=parseFloat(Z),T=isNaN(ge)?null:ge),S=parseInt(me.getValue(de,"carrier_changes"),10);let pe=me.getValue(de,"operstate");O=pe==="up"?me.getValue(de,"wireless").trim()?"wireless":"wired":"unknown",(k==="lo"||k.startsWith("bond"))&&(O="virtual");let he=a[l]&&a[l][0]?a[l][0].internal:!1;(l.toLowerCase().indexOf("loopback")>-1||F.toLowerCase().indexOf("loopback")>-1)&&(he=!0);let j=he?!1:Vy(l,F,_);s.push({iface:k,ifaceName:F,default:K===u,ip4:p,ip4subnet:f,ip6:h,ip6subnet:E,mac:_,internal:he,virtual:j,operstate:pe,type:O,duplex:d,mtu:m,speed:T,dhcp:A,dnsSuffix:g,ieee8021xAuth:P,ieee8021xState:y,carrierChanges:S})}}Jc=s,t.toLowerCase().indexOf("default")>=0&&(s=s.filter(l=>l.default),s.length>0?s=s[0]:s=[]),r&&r(s),o(s)}if(Yl)if(JSON.stringify(a)===JSON.stringify(Xc)&&!e)s=Jc,r&&r(s),o(s);else{Xc=JSON.parse(JSON.stringify(a));let u=ia();N9e().then(l=>{l.forEach(p=>{let f=!1;Object.keys(a).forEach(h=>{f||a[h].forEach(E=>{Object.keys(E).indexOf("mac")>=0&&(f=E.mac===p.mac)})}),f||(a[p.name]=[{mac:p.mac}])}),c=I9e(),n=M9e();for(let p in a){let f="",h=me.isPrototypePolluted()?"---":me.sanitizeShellString(p),E=me.mathMin(h.length,2e3);for(let k=0;k<=E;k++)h[k]!==void 0&&(f=f+h[k]);let _=p,d="",m="",T="",S="",A="",g="",P="",y=null,O=0,v="down",C=!1,V="",G="",F="",K="";if({}.hasOwnProperty.call(a,p)){let k=p;a[p].forEach(ge=>{(ge.family==="IPv4"||ge.family===4)&&(d=ge.address,m=ge.netmask),(ge.family==="IPv6"||ge.family===6)&&(!T||T.match(/^fe80::/i))&&(T=ge.address,S=ge.netmask),A=ge.mac;let Z=parseInt(process.versions.node.split("."),10);A.indexOf("00:00:0")>-1&&(Hi||ji)&&!ge.internal&&Z>=8&&Z<=11&&(Object.keys(Qc).length===0&&(Qc=Fee()),A=Qc[p]||"")}),V=D9e(n.ifaces,f);let ee=!1;l.forEach(ge=>{ge.mac===A&&!ee&&(_=ge.iface||_,k=ge.name,C=ge.dhcp,v=ge.operstate,y=v==="up"?ge.speed:0,K=ge.type,ee=!0)}),(p.toLowerCase().indexOf("wlan")>=0||k.toLowerCase().indexOf("wlan")>=0||k.toLowerCase().indexOf("802.11n")>=0||k.toLowerCase().indexOf("wireless")>=0||k.toLowerCase().indexOf("wi-fi")>=0||k.toLowerCase().indexOf("wifi")>=0)&&(K="wireless");let le=b9e(K,f,c);G=le.protocol,F=le.state;let ce=a[p]&&a[p][0]?a[p][0].internal:!1;(p.toLowerCase().indexOf("loopback")>-1||k.toLowerCase().indexOf("loopback")>-1)&&(ce=!0);let de=ce?!1:Vy(p,k,A);s.push({iface:_,ifaceName:k,default:_===u,ip4:d,ip4subnet:m,ip6:T,ip6subnet:S,mac:A,internal:ce,virtual:de,operstate:v,type:K,duplex:g,mtu:P,speed:y,dhcp:C,dnsSuffix:V,ieee8021xAuth:G,ieee8021xState:F,carrierChanges:O})}}Jc=s,t.toLowerCase().indexOf("default")>=0&&(s=s.filter(p=>p.default),s.length>0?s=s[0]:s=[]),r&&r(s),o(s)})}})})}oa.networkInterfaces=By;function N_(r,e,t,o,a,s,i,n){let c={iface:r,operstate:o,rx_bytes:e,rx_dropped:a,rx_errors:s,tx_bytes:t,tx_dropped:i,tx_errors:n,rx_sec:null,tx_sec:null,ms:0};return ut[r]&&ut[r].ms?(c.ms=Date.now()-ut[r].ms,c.rx_sec=e-ut[r].rx_bytes>=0?(e-ut[r].rx_bytes)/(c.ms/1e3):0,c.tx_sec=t-ut[r].tx_bytes>=0?(t-ut[r].tx_bytes)/(c.ms/1e3):0,ut[r].rx_bytes=e,ut[r].tx_bytes=t,ut[r].rx_sec=c.rx_sec,ut[r].tx_sec=c.tx_sec,ut[r].ms=Date.now(),ut[r].last_ms=c.ms,ut[r].operstate=o):(ut[r]||(ut[r]={}),ut[r].rx_bytes=e,ut[r].tx_bytes=t,ut[r].rx_sec=null,ut[r].tx_sec=null,ut[r].ms=Date.now(),ut[r].last_ms=0,ut[r].operstate=o),c}function jee(r,e){let t=[];return new Promise(o=>{process.nextTick(()=>{if(me.isFunction(r)&&!e)e=r,t=[ia()];else{if(typeof r!="string"&&r!==void 0)return e&&e([]),o([]);r=r||ia();try{r.__proto__.toLowerCase=me.stringToLower,r.__proto__.replace=me.stringReplace,r.__proto__.toString=me.stringToString,r.__proto__.substr=me.stringSubstr,r.__proto__.substring=me.stringSubstring,r.__proto__.trim=me.stringTrim,r.__proto__.startsWith=me.stringStartWith}catch{Object.setPrototypeOf(r,me.stringObj)}r=r.trim().replace(/,+/g,"|"),t=r.split("|")}let a=[],s=[];if(t.length&&t[0].trim()==="*")t=[],By(!1).then(i=>{for(let n of i)t.push(n.iface);jee(t.join(",")).then(n=>{e&&e(n),o(n)})});else{for(let i of t)s.push(q9e(i.trim()));s.length?Promise.all(s).then(i=>{e&&e(i),o(i)}):(e&&e(a),o(a))}})})}function q9e(r){function e(t){let o=[];for(let a in t)if({}.hasOwnProperty.call(t,a)&&t[a].trim()!==""){let s=t[a].trim().split(`\r
|
|
445
445
|
`);o.push({name:me.getValue(s,"Name",":").replace(/[()[\] ]+/g,"").replace(/#|\//g,"_").toLowerCase(),rx_bytes:parseInt(me.getValue(s,"BytesReceivedPersec",":"),10),rx_errors:parseInt(me.getValue(s,"PacketsReceivedErrors",":"),10),rx_dropped:parseInt(me.getValue(s,"PacketsReceivedDiscarded",":"),10),tx_bytes:parseInt(me.getValue(s,"BytesSentPersec",":"),10),tx_errors:parseInt(me.getValue(s,"PacketsOutboundErrors",":"),10),tx_dropped:parseInt(me.getValue(s,"PacketsOutboundDiscarded",":"),10)})}return o}return new Promise(t=>{process.nextTick(()=>{let o="",a=me.isPrototypePolluted()?"---":me.sanitizeShellString(r),s=me.mathMin(a.length,2e3);for(let m=0;m<=s;m++)a[m]!==void 0&&(o=o+a[m]);let i={iface:o,operstate:"unknown",rx_bytes:0,rx_dropped:0,rx_errors:0,tx_bytes:0,tx_dropped:0,tx_errors:0,rx_sec:null,tx_sec:null,ms:0},n="unknown",c=0,u=0,l=0,p=0,f=0,h=0,E,_,d;if(!ut[o]||ut[o]&&!ut[o].ms||ut[o]&&ut[o].ms&&Date.now()-ut[o].ms>=500){if(Hi&&(P9e.existsSync("/sys/class/net/"+o)?(E="cat /sys/class/net/"+o+"/operstate; cat /sys/class/net/"+o+"/statistics/rx_bytes; cat /sys/class/net/"+o+"/statistics/tx_bytes; cat /sys/class/net/"+o+"/statistics/rx_dropped; cat /sys/class/net/"+o+"/statistics/rx_errors; cat /sys/class/net/"+o+"/statistics/tx_dropped; cat /sys/class/net/"+o+"/statistics/tx_errors; ",ln(E,(m,T)=>{m||(_=T.toString().split(`
|
|
446
446
|
`),n=_[0].trim(),c=parseInt(_[1],10),u=parseInt(_[2],10),l=parseInt(_[3],10),p=parseInt(_[4],10),f=parseInt(_[5],10),h=parseInt(_[6],10),i=N_(o,c,u,n,l,p,f,h)),t(i)})):t(i)),(Fo||ko||Ho)&&(E="netstat -ibndI "+o,ln(E,(m,T)=>{if(!m){_=T.toString().split(`
|
|
447
|
-
`);for(let S=1;S<_.length;S++){let A=_[S].replace(/ +/g," ").split(" ");A&&A[0]&&A[7]&&A[10]&&(c=c+parseInt(A[7]),A[6].trim()!=="-"&&(l=l+parseInt(A[6])),A[5].trim()!=="-"&&(p=p+parseInt(A[5])),u=u+parseInt(A[10]),A[12].trim()!=="-"&&(f=f+parseInt(A[12])),A[9].trim()!=="-"&&(h=h+parseInt(A[9])),n="up")}i=N_(o,c,u,n,l,p,f,h)}t(i)})),ji&&(E="ifconfig "+o+' | grep "status"',ln(E,(m,T)=>{i.operstate=(T.toString().split(":")[1]||"").trim(),i.operstate=(i.operstate||"").toLowerCase(),i.operstate=i.operstate==="active"?"up":i.operstate==="inactive"?"down":"unknown",E="netstat -
|
|
447
|
+
`);for(let S=1;S<_.length;S++){let A=_[S].replace(/ +/g," ").split(" ");A&&A[0]&&A[7]&&A[10]&&(c=c+parseInt(A[7]),A[6].trim()!=="-"&&(l=l+parseInt(A[6])),A[5].trim()!=="-"&&(p=p+parseInt(A[5])),u=u+parseInt(A[10]),A[12].trim()!=="-"&&(f=f+parseInt(A[12])),A[9].trim()!=="-"&&(h=h+parseInt(A[9])),n="up")}i=N_(o,c,u,n,l,p,f,h)}t(i)})),ji&&(E="ifconfig "+o+' | grep "status"',ln(E,(m,T)=>{i.operstate=(T.toString().split(":")[1]||"").trim(),i.operstate=(i.operstate||"").toLowerCase(),i.operstate=i.operstate==="active"?"up":i.operstate==="inactive"?"down":"unknown",E="netstat -bdnI "+o,ln(E,(S,A)=>{if(!S&&(_=A.toString().split(`
|
|
448
448
|
`),_.length>1&&_[1].trim()!=="")){d=_[1].replace(/ +/g," ").split(" ");let g=d.length>11?1:0;c=parseInt(d[g+5]),l=parseInt(d[g+10]),p=parseInt(d[g+4]),u=parseInt(d[g+8]),f=parseInt(d[g+10]),h=parseInt(d[g+7]),i=N_(o,c,u,i.operstate,l,p,f,h)}t(i)})})),Yl){let m=[],T=o;me.powerShell("Get-CimInstance Win32_PerfRawData_Tcpip_NetworkInterface | select Name,BytesReceivedPersec,PacketsReceivedErrors,PacketsReceivedDiscarded,BytesSentPersec,PacketsOutboundErrors,PacketsOutboundDiscarded | fl").then((S,A)=>{if(!A){let g=S.toString().split(/\n\s*\n/);m=e(g)}By(!1).then(g=>{c=0,u=0,m.forEach(P=>{g.forEach(y=>{(y.iface.toLowerCase()===o.toLowerCase()||y.mac.toLowerCase()===o.toLowerCase()||y.ip4.toLowerCase()===o.toLowerCase()||y.ip6.toLowerCase()===o.toLowerCase()||y.ifaceName.replace(/[()[\] ]+/g,"").replace(/#|\//g,"_").toLowerCase()===o.replace(/[()[\] ]+/g,"").replace("#","_").toLowerCase())&&y.ifaceName.replace(/[()[\] ]+/g,"").replace(/#|\//g,"_").toLowerCase()===P.name&&(T=y.iface,c=P.rx_bytes,l=P.rx_dropped,p=P.rx_errors,u=P.tx_bytes,f=P.tx_dropped,h=P.tx_errors,n=y.operstate)})}),c&&u&&(i=N_(T,parseInt(c),parseInt(u),n,l,p,f,h)),t(i)})})}}else i.rx_bytes=ut[o].rx_bytes,i.tx_bytes=ut[o].tx_bytes,i.rx_sec=ut[o].rx_sec,i.tx_sec=ut[o].tx_sec,i.ms=ut[o].last_ms,i.operstate=ut[o].operstate,t(i)})})}oa.networkStats=jee;function W9e(r,e){let t="";return r.forEach(o=>{let a=o.split(" ");(parseInt(a[0],10)||-1)===e&&(a.shift(),t=a.join(" ").split(":")[0])}),t=t.split(" -")[0],t=t.split(" /")[0],t}function K9e(r){return new Promise(e=>{process.nextTick(()=>{let t=[];if(Hi||Fo||ko||Ho){let o='export LC_ALL=C; netstat -tunap | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"; unset LC_ALL';(Fo||ko||Ho)&&(o='export LC_ALL=C; netstat -na | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"; unset LC_ALL'),ln(o,{maxBuffer:1024*102400},(a,s)=>{let i=s.toString().split(`
|
|
449
449
|
`);!a&&(i.length>1||i[0]!=="")?(i.forEach(n=>{if(n=n.replace(/ +/g," ").split(" "),n.length>=7){let c=n[3],u="",l=n[3].split(":");l.length>1&&(u=l[l.length-1],l.pop(),c=l.join(":"));let p=n[4],f="",h=n[4].split(":");h.length>1&&(f=h[h.length-1],h.pop(),p=h.join(":"));let E=n[5],_=n[6].split("/");E&&t.push({protocol:n[0],localAddress:c,localPort:u,peerAddress:p,peerPort:f,state:E,pid:_[0]&&_[0]!=="-"?parseInt(_[0],10):null,process:_[1]?_[1].split(" ")[0].split(":")[0]:""})}}),r&&r(t),e(t)):(o='ss -tunap | grep "ESTAB\\|SYN-SENT\\|SYN-RECV\\|FIN-WAIT1\\|FIN-WAIT2\\|TIME-WAIT\\|CLOSE\\|CLOSE-WAIT\\|LAST-ACK\\|LISTEN\\|CLOSING"',ln(o,{maxBuffer:1024*102400},(n,c)=>{n||c.toString().split(`
|
|
450
450
|
`).forEach(l=>{if(l=l.replace(/ +/g," ").split(" "),l.length>=6){let p=l[4],f="",h=l[4].split(":");h.length>1&&(f=h[h.length-1],h.pop(),p=h.join(":"));let E=l[5],_="",d=l[5].split(":");d.length>1&&(_=d[d.length-1],d.pop(),E=d.join(":"));let m=l[1];m==="ESTAB"&&(m="ESTABLISHED"),m==="TIME-WAIT"&&(m="TIME_WAIT");let T=null,S="";if(l.length>=7&&l[6].indexOf("users:")>-1){let A=l[6].replace('users:(("',"").replace(/"/g,"").replace("pid=","").split(",");if(A.length>2){S=A[0];let g=parseInt(A[1],10);g>0&&(T=g)}}m&&t.push({protocol:l[0],localAddress:p,localPort:f,peerAddress:E,peerPort:_,state:m,pid:T,process:S})}}),r&&r(t),e(t)}))})}if(ji){let o='netstat -natvln | head -n2; netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"',a="ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT_1|FIN_WAIT2|FIN_WAIT_2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN".split("|");ln(o,{maxBuffer:1024*102400},(s,i)=>{s||ln("ps -axo pid,command",{maxBuffer:1024*102400},(n,c)=>{let u=c.toString().split(`
|
|
@@ -577,7 +577,7 @@ Bus `);for(let n=1;n<i.length;n++){let c=c$e(i[n]);t.push(c)}}r&&r(t),e(t)}),t$e
|
|
|
577
577
|
`)}rowToString(e,t){return this.rasterize(e).forEach((o,a)=>{let s="";o.forEach((i,n)=>{let{width:c}=e[n],u=this.negatePadding(e[n]),l=i;if(u>rn.stringWidth(i)&&(l+=" ".repeat(u-rn.stringWidth(i))),e[n].align&&e[n].align!=="left"&&this.wrap){let f=xue[e[n].align];l=f(l,u),rn.stringWidth(l)<u&&(l+=" ".repeat((c||0)-rn.stringWidth(l)-1))}let p=e[n].padding||[0,0,0,0];p[pf]&&(s+=" ".repeat(p[pf])),s+=eM(e[n],l,"| "),s+=l,s+=eM(e[n],l," |"),p[lf]&&(s+=" ".repeat(p[lf])),a===0&&t.length>0&&(s=this.renderInline(s,t[t.length-1]))}),t.push({text:s.replace(/ +$/,""),span:e.span})}),t}renderInline(e,t){let o=e.match(/^ */),a=o?o[0].length:0,s=t.text,i=rn.stringWidth(s.trimRight());return t.span?this.wrap?a<i?e:(t.hidden=!0,s.trimRight()+" ".repeat(a-i)+e.trimLeft()):(t.hidden=!0,s+e):e}rasterize(e){let t=[],o=this.columnWidths(e),a;return e.forEach((s,i)=>{s.width=o[i],this.wrap?a=rn.wrap(s.text,this.negatePadding(s),{hard:!0}).split(`
|
|
578
578
|
`):a=s.text.split(`
|
|
579
579
|
`),s.border&&(a.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),a.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(a.unshift(...new Array(s.padding[Pue]||0).fill("")),a.push(...new Array(s.padding[Rue]||0).fill(""))),a.forEach((n,c)=>{t[c]||t.push([]);let u=t[c];for(let l=0;l<i;l++)u[l]===void 0&&u.push("");u.push(n)})}),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[pf]||0)+(e.padding[lf]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(i=>i.width||rn.stringWidth(i.text));let t=e.length,o=this.width,a=e.map(i=>{if(i.width)return t--,o-=i.width,i.width}),s=t?Math.floor(o/t):0;return a.map((i,n)=>i===void 0?Math.max(s,Cue(e[n])):i)}};function eM(r,e,t){return r.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?t:" ":""}function Cue(r){let e=r.padding||[],t=1+(e[pf]||0)+(e[lf]||0);return r.border?t+4:t}function Nue(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Mue(r,e){r=r.trim();let t=rn.stringWidth(r);return t<e?" ".repeat(e-t)+r:r}function Due(r,e){r=r.trim();let t=rn.stringWidth(r);return t>=e?r:" ".repeat(e-t>>1)+r}var rn;function tM(r,e){return rn=e,new bm({width:r?.width||Nue(),wrap:r?.wrap})}var rM=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function wm(r){return r.replace(rM,"")}function nM(r,e){let[t,o]=r.match(rM)||["",""];r=wm(r);let a="";for(let s=0;s<r.length;s++)s!==0&&s%e===0&&(a+=`
|
|
580
|
-
`),a+=r.charAt(s);return t&&o&&(a=`${t}${a}${o}`),a}function Um(r){return tM(r,{stringWidth:e=>[...e].length,stripAnsi:wm,wrap:nM})}import{dirname as iM,resolve as oM}from"path";import{readdirSync as Iue,statSync as Lue}from"fs";function sM(r,e){let t=oM(".",r),o;for(Lue(t).isDirectory()||(t=iM(t));;){if(o=e(t,Iue(t)),o)return oM(t,o);if(t=iM(o=t),o===t)break}}import{inspect as Hue}from"util";import{readFileSync as jue}from"fs";import{fileURLToPath as Yue}from"url";import{basename as que,dirname as Wue,extname as Kue,relative as $ue,resolve as lM}from"path";import{readFileSync as bue,statSync as wue,writeFile as Uue}from"fs";import{format as Vue}from"util";import{resolve as Bue}from"path";var aM={fs:{readFileSync:bue,writeFile:Uue},format:Vue,resolve:Bue,exists:r=>{try{return wue(r).isFile()}catch{return!1}}};var Hn,Vm=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let t=e.shift(),o=function(){};return typeof e[e.length-1]=="function"&&(o=e.pop()),o=o||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o(),Hn.format.apply(Hn.format,[this.cache[this.locale][t]||t].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),t=e.shift(),o=e.shift(),a=e.shift(),s=function(){};typeof e[e.length-1]=="function"&&(s=e.pop()),this.cache[this.locale]||this._readLocaleFile();let i=a===1?t:o;this.cache[this.locale][t]&&(i=this.cache[this.locale][t][a===1?"one":"other"]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:o},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();let n=[i];return~i.indexOf("%d")&&n.push(a),Hn.format.apply(Hn.format,n.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let o="";return e.forEach(function(a,s){let i=t[s+1];o+=a,typeof i<"u"&&(o+="%s")}),this.__.apply(this,[o].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,t=this.writeQueue[0],o=t.directory,a=t.locale,s=t.cb,i=this._resolveLocaleFile(o,a),n=JSON.stringify(this.cache[a],null,2);Hn.fs.writeFile(i,n,"utf-8",function(c){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),s(c)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{Hn.fs.readFileSync&&(e=JSON.parse(Hn.fs.readFileSync(t,"utf-8")))}catch(o){if(o instanceof SyntaxError&&(o.message="syntax error in "+t),o.code==="ENOENT")e={};else throw o}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let o=Hn.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(o)&&~t.lastIndexOf("_")){let a=Hn.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(a)&&(o=a)}return o}_fileExistsSync(e){return Hn.exists(e)}};function cM(r,e){Hn=e;let t=new Vm(r);return{__:t.__.bind(t),__n:t.__n.bind(t),setLocale:t.setLocale.bind(t),getLocale:t.getLocale.bind(t),updateLocale:t.updateLocale.bind(t),locale:t.locale}}var Gue=r=>cM(r,aM),uM=Gue;var zue="require is not supported by ESM",pM="loading a directory of commands is not supported yet for ESM",wu;try{wu=Yue(import.meta.url)}catch{wu=process.cwd()}var Xue=wu.substring(0,wu.lastIndexOf("node_modules")),Jue={assert:{notStrictEqual:Fue,strictEqual:kue},cliui:Um,findUp:sM,getEnv:r=>process.env[r],inspect:Hue,getCallerFile:()=>{throw new fs(pM)},getProcessArgvBin:$N,mainFilename:Xue||process.cwd(),Parser:bu,path:{basename:que,dirname:Wue,extname:Kue,relative:$ue,resolve:lM},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(r,e)=>process.emitWarning(r,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:jue,require:()=>{throw new fs(zue)},requireDirectory:()=>{throw new fs(pM)},stringWidth:r=>[...r].length,y18n:uM({directory:lM(wu,"../../../locales"),updateFiles:!1})};var FD=vr(GD(),1),{applyExtends:ope,cjsPlatformShim:spe,Parser:ape,processArgv:cpe,Yargs:Nf}=FD.default;Nf.applyExtends=(r,e,t)=>ope(r,e,t,spe);Nf.hideBin=cpe.hideBin;Nf.Parser=ape;var kD=Nf;var dt=vr(Vb(),1);var $f="create-cedar-app",zf="3.0.
|
|
580
|
+
`),a+=r.charAt(s);return t&&o&&(a=`${t}${a}${o}`),a}function Um(r){return tM(r,{stringWidth:e=>[...e].length,stripAnsi:wm,wrap:nM})}import{dirname as iM,resolve as oM}from"path";import{readdirSync as Iue,statSync as Lue}from"fs";function sM(r,e){let t=oM(".",r),o;for(Lue(t).isDirectory()||(t=iM(t));;){if(o=e(t,Iue(t)),o)return oM(t,o);if(t=iM(o=t),o===t)break}}import{inspect as Hue}from"util";import{readFileSync as jue}from"fs";import{fileURLToPath as Yue}from"url";import{basename as que,dirname as Wue,extname as Kue,relative as $ue,resolve as lM}from"path";import{readFileSync as bue,statSync as wue,writeFile as Uue}from"fs";import{format as Vue}from"util";import{resolve as Bue}from"path";var aM={fs:{readFileSync:bue,writeFile:Uue},format:Vue,resolve:Bue,exists:r=>{try{return wue(r).isFile()}catch{return!1}}};var Hn,Vm=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let t=e.shift(),o=function(){};return typeof e[e.length-1]=="function"&&(o=e.pop()),o=o||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o(),Hn.format.apply(Hn.format,[this.cache[this.locale][t]||t].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),t=e.shift(),o=e.shift(),a=e.shift(),s=function(){};typeof e[e.length-1]=="function"&&(s=e.pop()),this.cache[this.locale]||this._readLocaleFile();let i=a===1?t:o;this.cache[this.locale][t]&&(i=this.cache[this.locale][t][a===1?"one":"other"]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:o},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();let n=[i];return~i.indexOf("%d")&&n.push(a),Hn.format.apply(Hn.format,n.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let o="";return e.forEach(function(a,s){let i=t[s+1];o+=a,typeof i<"u"&&(o+="%s")}),this.__.apply(this,[o].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,t=this.writeQueue[0],o=t.directory,a=t.locale,s=t.cb,i=this._resolveLocaleFile(o,a),n=JSON.stringify(this.cache[a],null,2);Hn.fs.writeFile(i,n,"utf-8",function(c){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),s(c)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{Hn.fs.readFileSync&&(e=JSON.parse(Hn.fs.readFileSync(t,"utf-8")))}catch(o){if(o instanceof SyntaxError&&(o.message="syntax error in "+t),o.code==="ENOENT")e={};else throw o}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let o=Hn.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(o)&&~t.lastIndexOf("_")){let a=Hn.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(a)&&(o=a)}return o}_fileExistsSync(e){return Hn.exists(e)}};function cM(r,e){Hn=e;let t=new Vm(r);return{__:t.__.bind(t),__n:t.__n.bind(t),setLocale:t.setLocale.bind(t),getLocale:t.getLocale.bind(t),updateLocale:t.updateLocale.bind(t),locale:t.locale}}var Gue=r=>cM(r,aM),uM=Gue;var zue="require is not supported by ESM",pM="loading a directory of commands is not supported yet for ESM",wu;try{wu=Yue(import.meta.url)}catch{wu=process.cwd()}var Xue=wu.substring(0,wu.lastIndexOf("node_modules")),Jue={assert:{notStrictEqual:Fue,strictEqual:kue},cliui:Um,findUp:sM,getEnv:r=>process.env[r],inspect:Hue,getCallerFile:()=>{throw new fs(pM)},getProcessArgvBin:$N,mainFilename:Xue||process.cwd(),Parser:bu,path:{basename:que,dirname:Wue,extname:Kue,relative:$ue,resolve:lM},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(r,e)=>process.emitWarning(r,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:jue,require:()=>{throw new fs(zue)},requireDirectory:()=>{throw new fs(pM)},stringWidth:r=>[...r].length,y18n:uM({directory:lM(wu,"../../../locales"),updateFiles:!1})};var FD=vr(GD(),1),{applyExtends:ope,cjsPlatformShim:spe,Parser:ape,processArgv:cpe,Yargs:Nf}=FD.default;Nf.applyExtends=(r,e,t)=>ope(r,e,t,spe);Nf.hideBin=cpe.hideBin;Nf.Parser=ape;var kD=Nf;var dt=vr(Vb(),1);var $f="create-cedar-app",zf="3.0.1-next.27+ab492debb";be();be();var Hte=vr(CW(),1),uO=vr(Fh(),1),j_=vr(UZ(),1);function VZ(r){let e={},t=r.length;for(let o=0;o<t;o++){let a=r[o];a&&(e[String(a).toUpperCase().replace(/[-.]/g,"_")]=a)}return e}var JYe="cloud.provider",QYe="cloud.account.id",ZYe="cloud.region",eqe="cloud.availability_zone",tqe="cloud.platform",rqe="aws.ecs.container.arn",nqe="aws.ecs.cluster.arn",iqe="aws.ecs.launchtype",oqe="aws.ecs.task.arn",sqe="aws.ecs.task.family",aqe="aws.ecs.task.revision",cqe="aws.eks.cluster.arn",uqe="aws.log.group.names",lqe="aws.log.group.arns",pqe="aws.log.stream.names",fqe="aws.log.stream.arns",dqe="container.name",hqe="container.id",Eqe="container.runtime",_qe="container.image.name",Sqe="container.image.tag",mqe="deployment.environment",Tqe="device.id",gqe="device.model.identifier",Aqe="device.model.name",vqe="faas.name",yqe="faas.id",Oqe="faas.version",xqe="faas.instance",Pqe="faas.max_memory",Rqe="host.id",Cqe="host.name",Nqe="host.type",Mqe="host.arch",Dqe="host.image.name",Iqe="host.image.id",Lqe="host.image.version",bqe="k8s.cluster.name",wqe="k8s.node.name",Uqe="k8s.node.uid",Vqe="k8s.namespace.name",Bqe="k8s.pod.uid",Gqe="k8s.pod.name",Fqe="k8s.container.name",kqe="k8s.replicaset.uid",Hqe="k8s.replicaset.name",jqe="k8s.deployment.uid",Yqe="k8s.deployment.name",qqe="k8s.statefulset.uid",Wqe="k8s.statefulset.name",Kqe="k8s.daemonset.uid",$qe="k8s.daemonset.name",zqe="k8s.job.uid",Xqe="k8s.job.name",Jqe="k8s.cronjob.uid",Qqe="k8s.cronjob.name",Zqe="os.type",e7e="os.description",t7e="os.name",r7e="os.version",n7e="process.pid",i7e="process.executable.name",o7e="process.executable.path",s7e="process.command",a7e="process.command_line",c7e="process.command_args",u7e="process.owner",l7e="process.runtime.name",p7e="process.runtime.version",f7e="process.runtime.description",d7e="service.name",h7e="service.namespace",E7e="service.instance.id",_7e="service.version",S7e="telemetry.sdk.name",m7e="telemetry.sdk.language",T7e="telemetry.sdk.version",g7e="telemetry.auto.version",A7e="webengine.name",v7e="webengine.version",y7e="webengine.description";var bl=VZ([JYe,QYe,ZYe,eqe,tqe,rqe,nqe,iqe,oqe,sqe,aqe,cqe,uqe,lqe,pqe,fqe,dqe,hqe,Eqe,_qe,Sqe,mqe,Tqe,gqe,Aqe,vqe,yqe,Oqe,xqe,Pqe,Rqe,Cqe,Nqe,Mqe,Dqe,Iqe,Lqe,bqe,wqe,Uqe,Vqe,Bqe,Gqe,Fqe,kqe,Hqe,jqe,Yqe,qqe,Wqe,Kqe,$qe,zqe,Xqe,Jqe,Qqe,Zqe,e7e,t7e,r7e,n7e,i7e,o7e,s7e,a7e,c7e,u7e,l7e,p7e,f7e,d7e,h7e,E7e,_7e,S7e,m7e,T7e,g7e,A7e,v7e,y7e]);var jte=vr(kZ(),1),Yte=vr(jZ(),1),lO=vr(Fte(),1);var gr=[];for(let r=0;r<256;++r)gr.push((r+256).toString(16).slice(1));function kte(r,e=0){return(gr[r[e+0]]+gr[r[e+1]]+gr[r[e+2]]+gr[r[e+3]]+"-"+gr[r[e+4]]+gr[r[e+5]]+"-"+gr[r[e+6]]+gr[r[e+7]]+"-"+gr[r[e+8]]+gr[r[e+9]]+"-"+gr[r[e+10]]+gr[r[e+11]]+gr[r[e+12]]+gr[r[e+13]]+gr[r[e+14]]+gr[r[e+15]]).toLowerCase()}import{randomFillSync as X$e}from"crypto";var k_=new Uint8Array(256),F_=k_.length;function sO(){return F_>k_.length-16&&(X$e(k_),F_=0),k_.slice(F_,F_+=16)}import{randomUUID as J$e}from"crypto";var aO={randomUUID:J$e};function Q$e(r,e,t){if(aO.randomUUID&&!e&&!r)return aO.randomUUID();r=r||{};let o=r.random??r.rng?.()??sO();if(o.length<16)throw new Error("Random bytes length must be >= 16");if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let a=0;a<16;++a)e[t+a]=o[a];return e}return kte(o)}var cO=Q$e;var H_,pO,fO,dO=cO();async function qte(){zt.setLogger(new up,Zt.ERROR);let r=JSON.parse(await Yte.default.run({System:["OS","Shell"],Binaries:["Node","Yarn","npm"],npmPackages:"@cedarjs/*",IDEs:["VSCode"]},{json:!0})),e=r.System?.Shell;e?.path?.match("/")?r.System.Shell.name=r.System.Shell.path.split("/").pop():e?.path.match("\\")&&(r.System.Shell.name=r.System.Shell.path.split("\\").pop());let t=await lO.default.cpu(),o=await lO.default.mem(),a;Object.keys(process.env).some(i=>i.startsWith("GITPOD_"))&&(a="gitpod");let s=uO.Resource.default().merge(new uO.Resource({[bl.SERVICE_NAME]:$f,[bl.SERVICE_VERSION]:zf,[bl.OS_TYPE]:r.System?.OS?.split(" ")[0],[bl.OS_VERSION]:r.System?.OS?.split(" ")[1],"shell.name":r.System?.Shell?.name,"node.version":r.Binaries?.Node?.version,"yarn.version":r.Binaries?.Yarn?.version,"npm.version":r.Binaries?.npm?.version,"vscode.version":r.IDEs?.VSCode?.version,"cpu.count":t.physicalCores,"memory.gb":Math.round(o.total/1073741824),"env.node_env":process.env.NODE_ENV||null,"ci.redwood":!!process.env.REDWOOD_CI,"ci.isci":jte.default.isCI,"dev.environment":a,uid:dO}));H_=new j_.NodeTracerProvider({resource:s}),fO=new Hte.OTLPTraceExporter({url:process.env.REDWOOD_REDIRECT_TELEMETRY||"https://quark.quantumparticle.io/v1/traces"}),pO=new j_.BatchSpanProcessor(fO),H_.addSpanProcessor(pO),H_.register(),process.on("SIGTERM",async()=>{await _r()})}async function _r(){try{du.trace.getActiveSpan()?.end(),await H_?.shutdown(),await pO?.shutdown(),await fO?.shutdown()}catch(r){process.env.REDWOOD_VERBOSE_TELEMETRY&&console.error("Telemetry: shutdown error",r)}}function Lr(r){du.trace.getActiveSpan()?.setStatus({code:Xi.ERROR,message:r.toString().split(`
|
|
581
581
|
`)[0]}),du.trace.getActiveSpan()?.recordException(r)}var Kte="Initial commit",{telemetry:eze}=bu(sf(process.argv),{boolean:["telemetry"],default:{telemetry:process.env.REDWOOD_DISABLE_TELEMETRY===void 0||process.env.REDWOOD_DISABLE_TELEMETRY===""}}),Qe=new dt.RedwoodTUI;function tze(){let{npm_config_user_agent:r}=process.env;if(r){let e=r.match(/yarn\/(\d+)/);if(e&&e[1])return parseInt(e[1],10)>=2}return!1}async function rze(r){let e=new dt.ReactiveTUIContent({mode:"text",content:"Checking node and yarn compatibility",spinner:{enabled:!0}});Qe.startReactive(e);let[t,o]=await nze(r);if(t){e.update({spinner:{enabled:!1},content:`${dt.RedwoodStyling.green("\u2714")} Compatibility checks passed`}),Qe.stopReactive();return}if(!t){hO.default.lt(o.node.version.version,hO.default.minVersion(o.node.wanted.raw))&&(Qe.stopReactive(!0),Qe.displayError("Compatibility checks failed",[" You need to upgrade the version of node you're using.",` You're using ${o.node.version.version} and we currently support node ${o.node.wanted.range}.`,""," Please use tools like nvm or corepack to change to a compatible version.",` See: ${(0,ip.terminalLink)("How to - Using nvm","https://cedarjs.com/docs/how-to/using-nvm",{fallback:()=>"How to - Using nvm https://cedarjs.com/docs/how-to/using-nvm"})}`,` See: ${(0,ip.terminalLink)("Tutorial - Prerequisites","https://cedarjs.com/docs/tutorial/chapter1/prerequisites",{fallback:()=>"Tutorial - Prerequisites https://cedarjs.com/docs/tutorial/chapter1/prerequisites"})}`].join(`
|
|
582
582
|
`)),Lr("Compatibility checks failed"),await _r(),process.exit(1)),Qe.stopReactive(!0),Qe.displayWarning("Compatibility checks failed",[" You may want to downgrade the version of node you're using.",` You're using ${o.node.version.version} and we currently support node ${o.node.wanted.range}.`,""," This may make your project incompatible with some deploy targets, especially those using AWS Lambdas.",""," Please use tools like nvm or corepack to change to a compatible version.",` See: ${(0,ip.terminalLink)("How to - Use nvm","https://cedarjs.com/docs/how-to/using-nvm",{fallback:()=>"How to - Use nvm https://cedarjs.com/docs/how-to/using-nvm"})}`,` See: ${(0,ip.terminalLink)("Tutorial - Prerequisites","https://cedarjs.com/docs/tutorial/chapter1/prerequisites",{fallback:()=>"Tutorial - Prerequisites https://cedarjs.com/docs/tutorial/chapter1/prerequisites"})}`].join(`
|
|
583
583
|
`));try{(await Qe.prompt({type:"select",name:"override-engine-error",message:"How would you like to proceed?",choices:["Override error and continue install","Quit install"],initial:0}))["override-engine-error"]==="Quit install"&&(Lr("User quit after engine check error"),await _r(),process.exit(0))}catch{Lr("User cancelled install at engine check error"),await _r(),process.exit(1)}}}function nze(r){return new Promise(e=>{let{engines:t}=JSON.parse(Ki.readFileSync(ci.join(r,"package.json"),"utf-8"));(0,Wte.default)(t,(o,a)=>e([a.isSatisfied,a.versions]))})}async function ize(r,{templateDir:e,overwrite:t}){let o=r,a=new dt.ReactiveTUIContent({mode:"text",content:"Creating project files",spinner:{enabled:!0}});return Qe.startReactive(a),o=await EO(o,{overwrite:t}),Ki.mkdirSync(ci.dirname(o),{recursive:!0}),await Ki.promises.cp(e,o,{recursive:!0,force:t}),Ki.renameSync(ci.join(o,"gitignore.template"),ci.join(o,".gitignore")),Ki.mkdirSync(ci.join(o,".redwood"),{recursive:!0}),Ki.writeFileSync(ci.join(o,".redwood","telemetry.txt"),dO),a.update({spinner:{enabled:!1},content:`${dt.RedwoodStyling.green("\u2714")} Project files created`}),Qe.stopReactive(),o}async function oze(r){let e=new dt.ReactiveTUIContent({mode:"text",header:"Installing node modules",content:" \u23F1 This could take a while...",spinner:{enabled:!0}});Qe.startReactive(e);let t=process.cwd();process.chdir(r);let o=(0,Y_.default)("yarn install",{shell:!0,cwd:r});try{await o}catch(a){Qe.stopReactive(!0),Qe.displayError("Couldn't install node modules",[`We couldn't install node modules via ${dt.RedwoodStyling.info("'yarn install'")}. Please see below for the full error message.`,"",a].join(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cedar-app",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1-next.27+ab492debb",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@babel/core": "^7.26.10",
|
|
28
28
|
"@babel/plugin-transform-typescript": "^7.26.8",
|
|
29
|
-
"@cedarjs/framework-tools": "
|
|
30
|
-
"@cedarjs/tui": "3.0.
|
|
29
|
+
"@cedarjs/framework-tools": "3.0.1-next.27",
|
|
30
|
+
"@cedarjs/tui": "3.0.1-next.27+ab492debb",
|
|
31
31
|
"@opentelemetry/api": "1.9.0",
|
|
32
32
|
"@opentelemetry/exporter-trace-otlp-http": "0.57.2",
|
|
33
33
|
"@opentelemetry/resources": "1.30.1",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"gradient-string": "3.0.0",
|
|
44
44
|
"klaw-sync": "7.0.0",
|
|
45
45
|
"semver": "7.7.4",
|
|
46
|
-
"systeminformation": "5.31.
|
|
46
|
+
"systeminformation": "5.31.5",
|
|
47
47
|
"termi-link": "1.1.0",
|
|
48
48
|
"tsx": "4.21.0",
|
|
49
49
|
"untildify": "4.0.0",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"vitest": "3.2.4",
|
|
52
52
|
"yargs": "17.7.2"
|
|
53
53
|
},
|
|
54
|
-
"
|
|
55
|
-
"
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=24"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "ab492debbba62731613261d67a7b24d747bae5d8"
|
|
58
58
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@cedarjs/api": "3.0.
|
|
7
|
-
"@cedarjs/graphql-server": "3.0.
|
|
6
|
+
"@cedarjs/api": "3.0.1-next.27",
|
|
7
|
+
"@cedarjs/graphql-server": "3.0.1-next.27",
|
|
8
8
|
"@prisma/adapter-better-sqlite3": "7.5.0",
|
|
9
9
|
"better-sqlite3": "12.8.0"
|
|
10
10
|
}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"web"
|
|
6
6
|
],
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@cedarjs/core": "3.0.
|
|
9
|
-
"@cedarjs/eslint-config": "3.0.
|
|
10
|
-
"@cedarjs/project-config": "3.0.
|
|
11
|
-
"@cedarjs/testing": "3.0.
|
|
8
|
+
"@cedarjs/core": "3.0.1-next.27",
|
|
9
|
+
"@cedarjs/eslint-config": "3.0.1-next.27",
|
|
10
|
+
"@cedarjs/project-config": "3.0.1-next.27",
|
|
11
|
+
"@cedarjs/testing": "3.0.1-next.27"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": "=24.x"
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@cedarjs/forms": "3.0.
|
|
15
|
-
"@cedarjs/router": "3.0.
|
|
16
|
-
"@cedarjs/web": "3.0.
|
|
14
|
+
"@cedarjs/forms": "3.0.1-next.27",
|
|
15
|
+
"@cedarjs/router": "3.0.1-next.27",
|
|
16
|
+
"@cedarjs/web": "3.0.1-next.27",
|
|
17
17
|
"react": "18.3.1",
|
|
18
18
|
"react-dom": "18.3.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@cedarjs/vite": "3.0.
|
|
21
|
+
"@cedarjs/vite": "3.0.1-next.27",
|
|
22
22
|
"@types/react": "^18.2.55",
|
|
23
23
|
"@types/react-dom": "^18.2.19"
|
|
24
24
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@cedarjs/api": "3.0.
|
|
7
|
-
"@cedarjs/graphql-server": "3.0.
|
|
6
|
+
"@cedarjs/api": "3.0.1-next.27",
|
|
7
|
+
"@cedarjs/graphql-server": "3.0.1-next.27",
|
|
8
8
|
"@prisma/adapter-better-sqlite3": "7.5.0",
|
|
9
9
|
"better-sqlite3": "12.8.0"
|
|
10
10
|
}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"web"
|
|
6
6
|
],
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@cedarjs/core": "3.0.
|
|
9
|
-
"@cedarjs/eslint-config": "3.0.
|
|
10
|
-
"@cedarjs/project-config": "3.0.
|
|
11
|
-
"@cedarjs/testing": "3.0.
|
|
8
|
+
"@cedarjs/core": "3.0.1-next.27",
|
|
9
|
+
"@cedarjs/eslint-config": "3.0.1-next.27",
|
|
10
|
+
"@cedarjs/project-config": "3.0.1-next.27",
|
|
11
|
+
"@cedarjs/testing": "3.0.1-next.27"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": "=24.x"
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@cedarjs/forms": "3.0.
|
|
15
|
-
"@cedarjs/router": "3.0.
|
|
16
|
-
"@cedarjs/web": "3.0.
|
|
14
|
+
"@cedarjs/forms": "3.0.1-next.27",
|
|
15
|
+
"@cedarjs/router": "3.0.1-next.27",
|
|
16
|
+
"@cedarjs/web": "3.0.1-next.27",
|
|
17
17
|
"react": "18.3.1",
|
|
18
18
|
"react-dom": "18.3.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@cedarjs/vite": "3.0.
|
|
21
|
+
"@cedarjs/vite": "3.0.1-next.27",
|
|
22
22
|
"@types/react": "^18.2.55",
|
|
23
23
|
"@types/react-dom": "^18.2.19"
|
|
24
24
|
}
|
|
Binary file
|
|
Binary file
|