create-cedar-app 4.0.0-canary.13708 → 4.0.0-canary.13709

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.
@@ -557,7 +557,7 @@ Bus `);for(let r=1;r<n.length;r++){let c=WYe(n[r]);t.push(c)}}i&&i(t),e(t)}),GYe
557
557
  `)}rowToString(e,t){return this.rasterize(e).forEach((o,a)=>{let s="";o.forEach((n,r)=>{let{width:c}=e[r],u=this.negatePadding(e[r]),l=n;if(u>$r.stringWidth(n)&&(l+=" ".repeat(u-$r.stringWidth(n))),e[r].align&&e[r].align!=="left"&&this.wrap){let f=dse[e[r].align];l=f(l,u),$r.stringWidth(l)<u&&(l+=" ".repeat((c||0)-$r.stringWidth(l)-1))}let p=e[r].padding||[0,0,0,0];p[Np]&&(s+=" ".repeat(p[Np])),s+=TR(e[r],l,"| "),s+=l,s+=TR(e[r],l," |"),p[Rp]&&(s+=" ".repeat(p[Rp])),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,n=$r.stringWidth(s.trimRight());return t.span?this.wrap?a<n?e:(t.hidden=!0,s.trimRight()+" ".repeat(a-n)+e.trimLeft()):(t.hidden=!0,s+e):e}rasterize(e){let t=[],o=this.columnWidths(e),a;return e.forEach((s,n)=>{s.width=o[n],this.wrap?a=$r.wrap(s.text,this.negatePadding(s),{hard:!0}).split(`
558
558
  `):a=s.text.split(`
559
559
  `),s.border&&(a.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),a.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(a.unshift(...new Array(s.padding[hse]||0).fill("")),a.push(...new Array(s.padding[Ese]||0).fill(""))),a.forEach((r,c)=>{t[c]||t.push([]);let u=t[c];for(let l=0;l<n;l++)u[l]===void 0&&u.push("");u.push(r)})}),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[Np]||0)+(e.padding[Rp]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(n=>n.width||$r.stringWidth(n.text));let t=e.length,o=this.width,a=e.map(n=>{if(n.width)return t--,o-=n.width,n.width}),s=t?Math.floor(o/t):0;return a.map((n,r)=>n===void 0?Math.max(s,_se(e[r])):n)}};function TR(i,e,t){return i.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?t:" ":""}function _se(i){let e=i.padding||[],t=1+(e[Np]||0)+(e[Rp]||0);return i.border?t+4:t}function Sse(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function mse(i,e){i=i.trim();let t=$r.stringWidth(i);return t<e?" ".repeat(e-t)+i:i}function Tse(i,e){i=i.trim();let t=$r.stringWidth(i);return t>=e?i:" ".repeat(e-t>>1)+i}var $r;function gR(i,e){return $r=e,new wS({width:i?.width||Sse(),wrap:i?.wrap})}var AR=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function US(i){return i.replace(AR,"")}function vR(i,e){let[t,o]=i.match(AR)||["",""];i=US(i);let a="";for(let s=0;s<i.length;s++)s!==0&&s%e===0&&(a+=`
560
- `),a+=i.charAt(s);return t&&o&&(a=`${t}${a}${o}`),a}function VS(i){return gR(i,{stringWidth:e=>[...e].length,stripAnsi:US,wrap:vR})}import{dirname as yR,resolve as OR}from"path";import{readdirSync as gse,statSync as Ase}from"fs";function xR(i,e){let t=OR(".",i),o;for(Ase(t).isDirectory()||(t=yR(t));;){if(o=e(t,gse(t)),o)return OR(t,o);if(t=yR(o=t),o===t)break}}import{inspect as Dse}from"util";import{readFileSync as Mse}from"fs";import{fileURLToPath as bse}from"url";import{basename as Ise,dirname as Lse,extname as wse,relative as Use,resolve as NR}from"path";import{readFileSync as vse,statSync as yse,writeFile as Ose}from"fs";import{format as xse}from"util";import{resolve as Pse}from"path";var PR={fs:{readFileSync:vse,writeFile:Ose},format:xse,resolve:Pse,exists:i=>{try{return yse(i).isFile()}catch{return!1}}};var Mn,BS=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(),Mn.format.apply(Mn.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 n=a===1?t:o;this.cache[this.locale][t]&&(n=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 r=[n];return~n.indexOf("%d")&&r.push(a),Mn.format.apply(Mn.format,r.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 n=t[s+1];o+=a,typeof n<"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,n=this._resolveLocaleFile(o,a),r=JSON.stringify(this.cache[a],null,2);Mn.fs.writeFile(n,r,"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{Mn.fs.readFileSync&&(e=JSON.parse(Mn.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=Mn.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(o)&&~t.lastIndexOf("_")){let a=Mn.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(a)&&(o=a)}return o}_fileExistsSync(e){return Mn.exists(e)}};function CR(i,e){Mn=e;let t=new BS(i);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 Cse=i=>CR(i,PR),RR=Cse;var Vse="require is not supported by ESM",DR="loading a directory of commands is not supported yet for ESM",su;try{su=bse(import.meta.url)}catch{su=process.cwd()}var Bse=su.substring(0,su.lastIndexOf("node_modules")),Gse={assert:{notStrictEqual:Rse,strictEqual:Nse},cliui:VS,findUp:xR,getEnv:i=>process.env[i],inspect:Dse,getCallerFile:()=>{throw new Wo(DR)},getProcessArgvBin:dR,mainFilename:Bse||process.cwd(),Parser:ou,path:{basename:Ise,dirname:Lse,extname:wse,relative:Use,resolve:NR},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(i,e)=>process.emitWarning(i,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:Mse,require:()=>{throw new Wo(Vse)},requireDirectory:()=>{throw new Wo(DR)},stringWidth:i=>[...i].length,y18n:RR({directory:NR(su,"../../../locales"),updateFiles:!1})};var aD=Pr(sD(),1),{applyExtends:Kae,cjsPlatformShim:$ae,Parser:zae,processArgv:Xae,Yargs:Kp}=aD.default;Kp.applyExtends=(i,e,t)=>Kae(i,e,t,$ae);Kp.hideBin=Xae.hideBin;Kp.Parser=zae;var cD=Kp;var st=Pr(mb(),1);var Ru={name:"create-cedar-app",version:"4.0.0-canary.13708+d2684aa0f",repository:{type:"git",url:"git+https://github.com/cedarjs/cedar.git",directory:"packages/create-cedar-app"},license:"MIT",type:"module",bin:"./dist/create-cedar-app.js",files:["dist","templates","database-overlays"],scripts:{build:"tsx ./scripts/build.ts","build:pack":"node ./scripts/buildPack.js","build:watch":'nodemon --watch src --ignore dist,template --exec "yarn build"',prepublishOnly:"NODE_ENV=production yarn build","set-up-test-project":"node ./scripts/setUpTestProject.js",test:"vitest run templates","test:e2e":"vitest --pool=forks run e2e","ts-to-js":"yarn node ./scripts/tsToJS.js"},devDependencies:{"@babel/core":"^7.26.10","@babel/plugin-transform-typescript":"^7.26.8","@cedarjs/framework-tools":"4.0.0-canary.13708","@cedarjs/tui":"4.0.0-canary.13708","@opentelemetry/api":"1.9.0","@opentelemetry/exporter-trace-otlp-http":"0.57.2","@opentelemetry/resources":"1.30.1","@opentelemetry/sdk-trace-node":"1.30.1","@opentelemetry/semantic-conventions":"1.38.0","@types/babel__core":"7.20.5","@types/klaw-sync":"6.0.5",ansis:"4.2.0","ci-info":"4.4.0",envinfo:"7.21.0",execa:"5.1.1","gradient-string":"3.0.0","klaw-sync":"7.0.0",semver:"7.7.4",systeminformation:"5.31.5","termi-link":"1.1.0",tsx:"4.21.0",untildify:"4.0.0",uuid:"11.1.0",vitest:"3.2.4",yargs:"17.7.2"},engines:{node:">=24"},gitHead:"d2684aa0fbfc8c40abb85b7b85d8abcda8c50811"};be();be();var yZ=Pr(cq(),1),zv=Pr(Zd(),1),t_=Pr(_J(),1);var SJ="service.name",mJ="service.version";var OZ=Pr(vJ(),1),xZ=Pr(OJ(),1),Xv=Pr(AZ(),1);var fr=[];for(let i=0;i<256;++i)fr.push((i+256).toString(16).slice(1));function vZ(i,e=0){return(fr[i[e+0]]+fr[i[e+1]]+fr[i[e+2]]+fr[i[e+3]]+"-"+fr[i[e+4]]+fr[i[e+5]]+"-"+fr[i[e+6]]+fr[i[e+7]]+"-"+fr[i[e+8]]+fr[i[e+9]]+"-"+fr[i[e+10]]+fr[i[e+11]]+fr[i[e+12]]+fr[i[e+13]]+fr[i[e+14]]+fr[i[e+15]]).toLowerCase()}import{randomFillSync as Lqe}from"crypto";var e_=new Uint8Array(256),ZE=e_.length;function Wv(){return ZE>e_.length-16&&(Lqe(e_),ZE=0),e_.slice(ZE,ZE+=16)}import{randomUUID as wqe}from"crypto";var Kv={randomUUID:wqe};function Uqe(i,e,t){if(Kv.randomUUID&&!e&&!i)return Kv.randomUUID();i=i||{};let o=i.random??i.rng?.()??Wv();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 vZ(o)}var $v=Uqe;var{name:Vqe,version:Bqe}=Ru,Gqe="os.type",Fqe="os.version",Jv,Qv,Zv,ey=$v();async function PZ(){Ht.setLogger(new Ll,Wt.ERROR);let i=JSON.parse(await xZ.default.run({System:["OS","Shell"],Binaries:["Node","Yarn","npm"],npmPackages:"@cedarjs/*",IDEs:["VSCode"]},{json:!0})),e=i.System?.Shell;e?.path?.match("/")?i.System.Shell.name=i.System.Shell.path.split("/").pop():e?.path.match("\\")&&(i.System.Shell.name=i.System.Shell.path.split("\\").pop());let t=await Xv.default.cpu(),o=await Xv.default.mem(),a;Object.keys(process.env).some(n=>n.startsWith("GITPOD_"))&&(a="gitpod");let s=zv.Resource.default().merge(new zv.Resource({[SJ]:Vqe,[mJ]:Bqe,[Gqe]:i.System?.OS?.split(" ")[0],[Fqe]:i.System?.OS?.split(" ")[1],"shell.name":i.System?.Shell?.name,"node.version":i.Binaries?.Node?.version,"yarn.version":i.Binaries?.Yarn?.version,"npm.version":i.Binaries?.npm?.version,"vscode.version":i.IDEs?.VSCode?.version,"cpu.count":t.physicalCores,"memory.gb":Math.round(o.total/1073741824),"env.node_env":process.env.NODE_ENV||void 0,"ci.redwood":!!process.env.REDWOOD_CI,"ci.isci":OZ.default.isCI,"dev.environment":a,uid:ey}));Zv=new yZ.OTLPTraceExporter({url:process.env.REDWOOD_REDIRECT_TELEMETRY||"https://quark.quantumparticle.io/v1/traces"}),Qv=new t_.BatchSpanProcessor(Zv),Jv=new t_.NodeTracerProvider({resource:s,spanProcessors:[Qv]}),Jv.register(),process.on("SIGTERM",async()=>{await kt()})}async function kt(){try{kc.trace.getActiveSpan()?.end(),await Jv?.shutdown(),await Qv?.shutdown(),await Zv?.shutdown()}catch(i){process.env.REDWOOD_VERBOSE_TELEMETRY&&console.error("Telemetry: shutdown error",i)}}function Jt(i){kc.trace.getActiveSpan()?.setStatus({code:wi.ERROR,message:String(i).split(`
560
+ `),a+=i.charAt(s);return t&&o&&(a=`${t}${a}${o}`),a}function VS(i){return gR(i,{stringWidth:e=>[...e].length,stripAnsi:US,wrap:vR})}import{dirname as yR,resolve as OR}from"path";import{readdirSync as gse,statSync as Ase}from"fs";function xR(i,e){let t=OR(".",i),o;for(Ase(t).isDirectory()||(t=yR(t));;){if(o=e(t,gse(t)),o)return OR(t,o);if(t=yR(o=t),o===t)break}}import{inspect as Dse}from"util";import{readFileSync as Mse}from"fs";import{fileURLToPath as bse}from"url";import{basename as Ise,dirname as Lse,extname as wse,relative as Use,resolve as NR}from"path";import{readFileSync as vse,statSync as yse,writeFile as Ose}from"fs";import{format as xse}from"util";import{resolve as Pse}from"path";var PR={fs:{readFileSync:vse,writeFile:Ose},format:xse,resolve:Pse,exists:i=>{try{return yse(i).isFile()}catch{return!1}}};var Mn,BS=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(),Mn.format.apply(Mn.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 n=a===1?t:o;this.cache[this.locale][t]&&(n=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 r=[n];return~n.indexOf("%d")&&r.push(a),Mn.format.apply(Mn.format,r.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 n=t[s+1];o+=a,typeof n<"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,n=this._resolveLocaleFile(o,a),r=JSON.stringify(this.cache[a],null,2);Mn.fs.writeFile(n,r,"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{Mn.fs.readFileSync&&(e=JSON.parse(Mn.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=Mn.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(o)&&~t.lastIndexOf("_")){let a=Mn.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(a)&&(o=a)}return o}_fileExistsSync(e){return Mn.exists(e)}};function CR(i,e){Mn=e;let t=new BS(i);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 Cse=i=>CR(i,PR),RR=Cse;var Vse="require is not supported by ESM",DR="loading a directory of commands is not supported yet for ESM",su;try{su=bse(import.meta.url)}catch{su=process.cwd()}var Bse=su.substring(0,su.lastIndexOf("node_modules")),Gse={assert:{notStrictEqual:Rse,strictEqual:Nse},cliui:VS,findUp:xR,getEnv:i=>process.env[i],inspect:Dse,getCallerFile:()=>{throw new Wo(DR)},getProcessArgvBin:dR,mainFilename:Bse||process.cwd(),Parser:ou,path:{basename:Ise,dirname:Lse,extname:wse,relative:Use,resolve:NR},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(i,e)=>process.emitWarning(i,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:Mse,require:()=>{throw new Wo(Vse)},requireDirectory:()=>{throw new Wo(DR)},stringWidth:i=>[...i].length,y18n:RR({directory:NR(su,"../../../locales"),updateFiles:!1})};var aD=Pr(sD(),1),{applyExtends:Kae,cjsPlatformShim:$ae,Parser:zae,processArgv:Xae,Yargs:Kp}=aD.default;Kp.applyExtends=(i,e,t)=>Kae(i,e,t,$ae);Kp.hideBin=Xae.hideBin;Kp.Parser=zae;var cD=Kp;var st=Pr(mb(),1);var Ru={name:"create-cedar-app",version:"4.0.0-canary.13709+a37accbc4",repository:{type:"git",url:"git+https://github.com/cedarjs/cedar.git",directory:"packages/create-cedar-app"},license:"MIT",type:"module",bin:"./dist/create-cedar-app.js",files:["dist","templates","database-overlays"],scripts:{build:"tsx ./scripts/build.ts","build:pack":"node ./scripts/buildPack.js","build:watch":'nodemon --watch src --ignore dist,template --exec "yarn build"',prepublishOnly:"NODE_ENV=production yarn build","set-up-test-project":"node ./scripts/setUpTestProject.js",test:"vitest run templates","test:e2e":"vitest --pool=forks run e2e","ts-to-js":"yarn node ./scripts/tsToJS.js"},devDependencies:{"@babel/core":"^7.26.10","@babel/plugin-transform-typescript":"^7.26.8","@cedarjs/framework-tools":"4.0.0-canary.13709","@cedarjs/tui":"4.0.0-canary.13709","@opentelemetry/api":"1.9.0","@opentelemetry/exporter-trace-otlp-http":"0.57.2","@opentelemetry/resources":"1.30.1","@opentelemetry/sdk-trace-node":"1.30.1","@opentelemetry/semantic-conventions":"1.38.0","@types/babel__core":"7.20.5","@types/klaw-sync":"6.0.5",ansis:"4.2.0","ci-info":"4.4.0",envinfo:"7.21.0",execa:"5.1.1","gradient-string":"3.0.0","klaw-sync":"7.0.0",semver:"7.7.4",systeminformation:"5.31.5","termi-link":"1.1.0",tsx:"4.21.0",untildify:"4.0.0",uuid:"11.1.0",vitest:"3.2.4",yargs:"17.7.2"},engines:{node:">=24"},gitHead:"a37accbc4c58ec77abf3e21fcea65b4a65388487"};be();be();var yZ=Pr(cq(),1),zv=Pr(Zd(),1),t_=Pr(_J(),1);var SJ="service.name",mJ="service.version";var OZ=Pr(vJ(),1),xZ=Pr(OJ(),1),Xv=Pr(AZ(),1);var fr=[];for(let i=0;i<256;++i)fr.push((i+256).toString(16).slice(1));function vZ(i,e=0){return(fr[i[e+0]]+fr[i[e+1]]+fr[i[e+2]]+fr[i[e+3]]+"-"+fr[i[e+4]]+fr[i[e+5]]+"-"+fr[i[e+6]]+fr[i[e+7]]+"-"+fr[i[e+8]]+fr[i[e+9]]+"-"+fr[i[e+10]]+fr[i[e+11]]+fr[i[e+12]]+fr[i[e+13]]+fr[i[e+14]]+fr[i[e+15]]).toLowerCase()}import{randomFillSync as Lqe}from"crypto";var e_=new Uint8Array(256),ZE=e_.length;function Wv(){return ZE>e_.length-16&&(Lqe(e_),ZE=0),e_.slice(ZE,ZE+=16)}import{randomUUID as wqe}from"crypto";var Kv={randomUUID:wqe};function Uqe(i,e,t){if(Kv.randomUUID&&!e&&!i)return Kv.randomUUID();i=i||{};let o=i.random??i.rng?.()??Wv();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 vZ(o)}var $v=Uqe;var{name:Vqe,version:Bqe}=Ru,Gqe="os.type",Fqe="os.version",Jv,Qv,Zv,ey=$v();async function PZ(){Ht.setLogger(new Ll,Wt.ERROR);let i=JSON.parse(await xZ.default.run({System:["OS","Shell"],Binaries:["Node","Yarn","npm"],npmPackages:"@cedarjs/*",IDEs:["VSCode"]},{json:!0})),e=i.System?.Shell;e?.path?.match("/")?i.System.Shell.name=i.System.Shell.path.split("/").pop():e?.path.match("\\")&&(i.System.Shell.name=i.System.Shell.path.split("\\").pop());let t=await Xv.default.cpu(),o=await Xv.default.mem(),a;Object.keys(process.env).some(n=>n.startsWith("GITPOD_"))&&(a="gitpod");let s=zv.Resource.default().merge(new zv.Resource({[SJ]:Vqe,[mJ]:Bqe,[Gqe]:i.System?.OS?.split(" ")[0],[Fqe]:i.System?.OS?.split(" ")[1],"shell.name":i.System?.Shell?.name,"node.version":i.Binaries?.Node?.version,"yarn.version":i.Binaries?.Yarn?.version,"npm.version":i.Binaries?.npm?.version,"vscode.version":i.IDEs?.VSCode?.version,"cpu.count":t.physicalCores,"memory.gb":Math.round(o.total/1073741824),"env.node_env":process.env.NODE_ENV||void 0,"ci.redwood":!!process.env.REDWOOD_CI,"ci.isci":OZ.default.isCI,"dev.environment":a,uid:ey}));Zv=new yZ.OTLPTraceExporter({url:process.env.REDWOOD_REDIRECT_TELEMETRY||"https://quark.quantumparticle.io/v1/traces"}),Qv=new t_.BatchSpanProcessor(Zv),Jv=new t_.NodeTracerProvider({resource:s,spanProcessors:[Qv]}),Jv.register(),process.on("SIGTERM",async()=>{await kt()})}async function kt(){try{kc.trace.getActiveSpan()?.end(),await Jv?.shutdown(),await Qv?.shutdown(),await Zv?.shutdown()}catch(i){process.env.REDWOOD_VERBOSE_TELEMETRY&&console.error("Telemetry: shutdown error",i)}}function Jt(i){kc.trace.getActiveSpan()?.setStatus({code:wi.ERROR,message:String(i).split(`
561
561
  `)[0]}),kc.trace.getActiveSpan()?.recordException(i instanceof Error?i:new Error(String(i)))}var CZ="Initial commit";function RZ(){let e=process.env.npm_config_user_agent?.split(" ")[0]?.split("/")[0];if(e==="yarn"||e==="npm"||e==="pnpm")return e}function ny(i){return`${i} install`}function NZ(i){return i==="npm"?"npx":i}function DZ(i){return`${NZ(i)} cedar`}var{telemetry:Hqe}=ou(Op(process.argv),{boolean:["telemetry"],default:{telemetry:process.env.REDWOOD_DISABLE_TELEMETRY===void 0||process.env.REDWOOD_DISABLE_TELEMETRY===""}}),je=new st.RedwoodTUI;async function jqe(i){let e=new st.ReactiveTUIContent({mode:"text",content:"Checking node compatibility",spinner:{enabled:!0}});je.startReactive(e);let{isSatisfied:t,nodeRange:o}=Yqe(i);if(t){e.update({spinner:{enabled:!1},content:`${st.RedwoodStyling.green("\u2714")} Compatibility checks passed`}),je.stopReactive();return}let a=r_.default.minVersion(o);a&&r_.default.lt(process.version,a)&&(je.stopReactive(!0),je.displayError("Compatibility checks failed",[" You need to upgrade the version of node you're using.",` You're using ${process.version} and we currently support node ${o}.`,""," Please use tools like nvm or corepack to change to a compatible version.",` See: ${(0,Nl.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,Nl.terminalLink)("Tutorial - Prerequisites","https://cedarjs.com/docs/tutorial/chapter1/prerequisites",{fallback:()=>"Tutorial - Prerequisites https://cedarjs.com/docs/tutorial/chapter1/prerequisites"})}`].join(`
562
562
  `)),Jt("Compatibility checks failed"),await kt(),process.exit(1)),je.stopReactive(!0),je.displayWarning("Compatibility checks failed",[" You may want to downgrade the version of node you're using.",` You're using ${process.version} and we currently support node ${o}.`,""," 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,Nl.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,Nl.terminalLink)("Tutorial - Prerequisites","https://cedarjs.com/docs/tutorial/chapter1/prerequisites",{fallback:()=>"Tutorial - Prerequisites https://cedarjs.com/docs/tutorial/chapter1/prerequisites"})}`].join(`
563
563
  `));try{(await je.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"&&(Jt("User quit after engine check error"),await kt(),process.exit(0))}catch{Jt("User cancelled install at engine check error"),await kt(),process.exit(1)}}function Yqe(i){let t=JSON.parse(Ir.readFileSync(Lr.join(i,"package.json"),"utf-8"))?.engines?.node;if(typeof t!="string")throw new Error("Invalid node engine version range in package.json");return{isSatisfied:r_.default.satisfies(process.version,t),nodeRange:t}}async function qqe(i,{templateDir:e,templatesDir:t,overwrite:o,packageManager:a,useEsm:s,database:n}){let r=i,c=Lr.join(t,"overlays",s?"esm":"cjs",a),u=new st.ReactiveTUIContent({mode:"text",content:"Creating project files",spinner:{enabled:!0}});if(je.startReactive(u),r=await ty(r,{overwrite:o}),Ir.mkdirSync(Lr.dirname(r),{recursive:!0}),await Ir.promises.cp(e,r,{recursive:!0,force:o}),await Ir.promises.cp(c,r,{recursive:!0,force:!0}),n==="pglite"){let p=Lr.join(r,"api","prisma.config.cjs");try{await Ir.promises.unlink(p)}catch{}let f=Lr.join(t,"..","database-overlays","pglite");await Ir.promises.cp(f,r,{recursive:!0,force:!0})}Ir.renameSync(Lr.join(r,"gitignore.template"),Lr.join(r,".gitignore")),await Wqe(r,a),Ir.mkdirSync(Lr.join(r,".redwood"),{recursive:!0}),Ir.writeFileSync(Lr.join(r,".redwood","telemetry.txt"),ey);let l=`${st.RedwoodStyling.green("\u2714")} Project files created`;return u.update({spinner:{enabled:!1},content:l}),je.stopReactive(),r}async function Wqe(i,e){let t=ny(e),o=DZ(e),a={"{{PM}}":e,"{{PM_INSTALL}}":t,"{{CEDAR_CLI}}":o},s=["**/*.{json,md,js,ts,yml,yaml}","**/.*/**/*.{json,md,js,ts,yml,yaml}"];for(let n of s)for await(let r of Ir.promises.glob(n,{cwd:i})){let c=Lr.join(i,r),u=await Ir.promises.readFile(c,"utf-8");for(let[l,p]of Object.entries(a))u=u.replaceAll(l,p);await Ir.promises.writeFile(c,u,"utf-8")}}async function Kqe(i,e){let t=new st.ReactiveTUIContent({mode:"text",header:`Installing node modules with ${e}`,content:" \u23F1 This could take a while...",spinner:{enabled:!0}});je.startReactive(t);let o=process.cwd();process.chdir(i);let a=ny(e),s=(0,n_.default)(a,{shell:!0,cwd:i});try{await s}catch(n){let r=st.RedwoodStyling.info(`'${a}'`);je.stopReactive(!0),je.displayError("Couldn't install node modules",[`We couldn't install node modules via ${r}. Please see below for the full error message.`,"",String(n)].join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cedar-app",
3
- "version": "4.0.0-canary.13708+d2684aa0f",
3
+ "version": "4.0.0-canary.13709+a37accbc4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -27,8 +27,8 @@
27
27
  "devDependencies": {
28
28
  "@babel/core": "^7.26.10",
29
29
  "@babel/plugin-transform-typescript": "^7.26.8",
30
- "@cedarjs/framework-tools": "4.0.0-canary.13708",
31
- "@cedarjs/tui": "4.0.0-canary.13708",
30
+ "@cedarjs/framework-tools": "4.0.0-canary.13709",
31
+ "@cedarjs/tui": "4.0.0-canary.13709",
32
32
  "@opentelemetry/api": "1.9.0",
33
33
  "@opentelemetry/exporter-trace-otlp-http": "0.57.2",
34
34
  "@opentelemetry/resources": "1.30.1",
@@ -54,5 +54,5 @@
54
54
  "engines": {
55
55
  "node": ">=24"
56
56
  },
57
- "gitHead": "d2684aa0fbfc8c40abb85b7b85d8abcda8c50811"
57
+ "gitHead": "a37accbc4c58ec77abf3e21fcea65b4a65388487"
58
58
  }
@@ -3,8 +3,8 @@
3
3
  "version": "0.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@cedarjs/api": "4.0.0-canary.13708",
7
- "@cedarjs/graphql-server": "4.0.0-canary.13708",
6
+ "@cedarjs/api": "4.0.0-canary.13709",
7
+ "@cedarjs/graphql-server": "4.0.0-canary.13709",
8
8
  "@prisma/adapter-better-sqlite3": "7.6.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": "4.0.0-canary.13708",
9
- "@cedarjs/eslint-config": "4.0.0-canary.13708",
10
- "@cedarjs/project-config": "4.0.0-canary.13708",
11
- "@cedarjs/testing": "4.0.0-canary.13708"
8
+ "@cedarjs/core": "4.0.0-canary.13709",
9
+ "@cedarjs/eslint-config": "4.0.0-canary.13709",
10
+ "@cedarjs/project-config": "4.0.0-canary.13709",
11
+ "@cedarjs/testing": "4.0.0-canary.13709"
12
12
  },
13
13
  "engines": {
14
14
  "node": "=24.x"
@@ -11,14 +11,14 @@
11
11
  ]
12
12
  },
13
13
  "dependencies": {
14
- "@cedarjs/forms": "4.0.0-canary.13708",
15
- "@cedarjs/router": "4.0.0-canary.13708",
16
- "@cedarjs/web": "4.0.0-canary.13708",
14
+ "@cedarjs/forms": "4.0.0-canary.13709",
15
+ "@cedarjs/router": "4.0.0-canary.13709",
16
+ "@cedarjs/web": "4.0.0-canary.13709",
17
17
  "react": "19.2.3",
18
18
  "react-dom": "19.2.3"
19
19
  },
20
20
  "devDependencies": {
21
- "@cedarjs/vite": "4.0.0-canary.13708",
21
+ "@cedarjs/vite": "4.0.0-canary.13709",
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": "4.0.0-canary.13708",
7
- "@cedarjs/graphql-server": "4.0.0-canary.13708",
6
+ "@cedarjs/api": "4.0.0-canary.13709",
7
+ "@cedarjs/graphql-server": "4.0.0-canary.13709",
8
8
  "@prisma/adapter-better-sqlite3": "7.6.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": "4.0.0-canary.13708",
9
- "@cedarjs/eslint-config": "4.0.0-canary.13708",
10
- "@cedarjs/project-config": "4.0.0-canary.13708",
11
- "@cedarjs/testing": "4.0.0-canary.13708"
8
+ "@cedarjs/core": "4.0.0-canary.13709",
9
+ "@cedarjs/eslint-config": "4.0.0-canary.13709",
10
+ "@cedarjs/project-config": "4.0.0-canary.13709",
11
+ "@cedarjs/testing": "4.0.0-canary.13709"
12
12
  },
13
13
  "engines": {
14
14
  "node": "=24.x"
@@ -11,14 +11,14 @@
11
11
  ]
12
12
  },
13
13
  "dependencies": {
14
- "@cedarjs/forms": "4.0.0-canary.13708",
15
- "@cedarjs/router": "4.0.0-canary.13708",
16
- "@cedarjs/web": "4.0.0-canary.13708",
14
+ "@cedarjs/forms": "4.0.0-canary.13709",
15
+ "@cedarjs/router": "4.0.0-canary.13709",
16
+ "@cedarjs/web": "4.0.0-canary.13709",
17
17
  "react": "19.2.3",
18
18
  "react-dom": "19.2.3"
19
19
  },
20
20
  "devDependencies": {
21
- "@cedarjs/vite": "4.0.0-canary.13708",
21
+ "@cedarjs/vite": "4.0.0-canary.13709",
22
22
  "@types/react": "^18.2.55",
23
23
  "@types/react-dom": "^18.2.19"
24
24
  }