create-cedar-app 4.0.1-next.0 → 4.1.0-rc.70

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.
@@ -4,9 +4,9 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@cedarjs/api": "4.0.1-next.1",
8
- "@cedarjs/graphql-server": "4.0.1-next.1",
9
- "@prisma/adapter-pg": "{{PRISMA_VERSION}}",
7
+ "@cedarjs/api": "4.1.0-rc.70",
8
+ "@cedarjs/graphql-server": "4.1.0-rc.70",
9
+ "@prisma/adapter-pg": "7.7.0",
10
10
  "pg": "^8.13.0"
11
11
  }
12
12
  }
@@ -4,11 +4,11 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@cedarjs/api": "4.0.1-next.1",
8
- "@cedarjs/graphql-server": "4.0.1-next.1",
7
+ "@cedarjs/api": "4.1.0-rc.70",
8
+ "@cedarjs/graphql-server": "4.1.0-rc.70",
9
9
  "@electric-sql/pglite": "^0.4.2",
10
10
  "@electric-sql/pglite-socket": "^0.1.2",
11
- "@prisma/adapter-pg": "{{PRISMA_VERSION}}",
11
+ "@prisma/adapter-pg": "7.7.0",
12
12
  "pg": "^8.13.0"
13
13
  }
14
14
  }
@@ -557,12 +557,12 @@ Bus `);for(let r=1;r<n.length;r++){let c=tqe(n[r]);t.push(c)}}i&&i(t),e(t)}),$Ye
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>Wr.stringWidth(n)&&(l+=" ".repeat(u-Wr.stringWidth(n))),e[r].align&&e[r].align!=="left"&&this.wrap){let f=Pne[e[r].align];l=f(l,u),Wr.stringWidth(l)<u&&(l+=" ".repeat((c||0)-Wr.stringWidth(l)-1))}let p=e[r].padding||[0,0,0,0];p[Ap]&&(s+=" ".repeat(p[Ap])),s+=IP(e[r],l,"| "),s+=l,s+=IP(e[r],l," |"),p[gp]&&(s+=" ".repeat(p[gp])),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=Wr.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=Wr.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[Cne]||0).fill("")),a.push(...new Array(s.padding[Rne]||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[Ap]||0)+(e.padding[gp]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(n=>n.width||Wr.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,Nne(e[r])):n)}};function IP(i,e,t){return i.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?t:" ":""}function Nne(i){let e=i.padding||[],t=1+(e[Ap]||0)+(e[gp]||0);return i.border?t+4:t}function Dne(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Mne(i,e){i=i.trim();let t=Wr.stringWidth(i);return t<e?" ".repeat(e-t)+i:i}function bne(i,e){i=i.trim();let t=Wr.stringWidth(i);return t>=e?i:" ".repeat(e-t>>1)+i}var Wr;function LP(i,e){return Wr=e,new gm({width:i?.width||Dne(),wrap:i?.wrap})}var wP=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function Am(i){return i.replace(wP,"")}function UP(i,e){let[t,o]=i.match(wP)||["",""];i=Am(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 vm(i){return LP(i,{stringWidth:e=>[...e].length,stripAnsi:Am,wrap:UP})}import{dirname as VP,resolve as BP}from"path";import{readdirSync as Ine,statSync as Lne}from"fs";function GP(i,e){let t=BP(".",i),o;for(Lne(t).isDirectory()||(t=VP(t));;){if(o=e(t,Ine(t)),o)return BP(t,o);if(t=VP(o=t),o===t)break}}import{inspect as jne}from"util";import{readFileSync as Yne}from"fs";import{fileURLToPath as qne}from"url";import{basename as Wne,dirname as Kne,extname as $ne,relative as zne,resolve as jP}from"path";import{readFileSync as wne,statSync as Une,writeFile as Vne}from"fs";import{format as Bne}from"util";import{resolve as Gne}from"path";var FP={fs:{readFileSync:wne,writeFile:Vne},format:Bne,resolve:Gne,exists:i=>{try{return Une(i).isFile()}catch{return!1}}};var Dn,ym=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(),Dn.format.apply(Dn.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),Dn.format.apply(Dn.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);Dn.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{Dn.fs.readFileSync&&(e=JSON.parse(Dn.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=Dn.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(o)&&~t.lastIndexOf("_")){let a=Dn.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(a)&&(o=a)}return o}_fileExistsSync(e){return Dn.exists(e)}};function kP(i,e){Dn=e;let t=new ym(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 Fne=i=>kP(i,FP),HP=Fne;var Xne="require is not supported by ESM",YP="loading a directory of commands is not supported yet for ESM",tu;try{tu=qne(import.meta.url)}catch{tu=process.cwd()}var Jne=tu.substring(0,tu.lastIndexOf("node_modules")),Qne={assert:{notStrictEqual:kne,strictEqual:Hne},cliui:vm,findUp:GP,getEnv:i=>process.env[i],inspect:jne,getCallerFile:()=>{throw new qo(YP)},getProcessArgvBin:CP,mainFilename:Jne||process.cwd(),Parser:eu,path:{basename:Wne,dirname:Kne,extname:$ne,relative:zne,resolve:jP},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:Yne,require:()=>{throw new qo(Xne)},requireDirectory:()=>{throw new qo(YP)},stringWidth:i=>[...i].length,y18n:HP({directory:jP(tu,"../../../locales"),updateFiles:!1})};var AR=jt(gR(),1),{applyExtends:soe,cjsPlatformShim:aoe,Parser:coe,processArgv:uoe,Yargs:Gp}=AR.default;Gp.applyExtends=(i,e,t)=>soe(i,e,t,aoe);Gp.hideBin=uoe.hideBin;Gp.Parser=coe;var vR=Gp;var It=jt(Aa(),1);var yu={name:"create-cedar-app",version:"4.0.1-next.0+006a79e314",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.1-next.1","@cedarjs/tui":"4.0.1-next.0+006a79e314","@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:"006a79e314ffa914671658f8e733fad4fc2cb09e"};var MZ=jt(ST(),1),ks=jt(Aa(),1);Ie();Ie();var PZ=jt(yj(),1),ty=jt(qd(),1),o_=jt(TJ(),1);var gJ="service.name",AJ="service.version";var CZ=jt(xJ(),1),RZ=jt(CJ(),1),ry=jt(OZ(),1);var dr=[];for(let i=0;i<256;++i)dr.push((i+256).toString(16).slice(1));function xZ(i,e=0){return(dr[i[e+0]]+dr[i[e+1]]+dr[i[e+2]]+dr[i[e+3]]+"-"+dr[i[e+4]]+dr[i[e+5]]+"-"+dr[i[e+6]]+dr[i[e+7]]+"-"+dr[i[e+8]]+dr[i[e+9]]+"-"+dr[i[e+10]]+dr[i[e+11]]+dr[i[e+12]]+dr[i[e+13]]+dr[i[e+14]]+dr[i[e+15]]).toLowerCase()}import{randomFillSync as jqe}from"crypto";var i_=new Uint8Array(256),n_=i_.length;function Qv(){return n_>i_.length-16&&(jqe(i_),n_=0),i_.slice(n_,n_+=16)}import{randomUUID as Yqe}from"crypto";var Zv={randomUUID:Yqe};function qqe(i,e,t){if(Zv.randomUUID&&!e&&!i)return Zv.randomUUID();i=i||{};let o=i.random??i.rng?.()??Qv();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 xZ(o)}var ey=qqe;var{name:Wqe,version:Kqe}=yu,$qe="os.type",zqe="os.version",ny,iy,oy,sy=ey();async function NZ(){Yt.setLogger(new Fl,$t.ERROR);let i=JSON.parse(await RZ.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 ry.default.cpu(),o=await ry.default.mem(),a;Object.keys(process.env).some(n=>n.startsWith("GITPOD_"))&&(a="gitpod");let s=ty.Resource.default().merge(new ty.Resource({[gJ]:Wqe,[AJ]:Kqe,[$qe]:i.System?.OS?.split(" ")[0],[zqe]: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":CZ.default.isCI,"dev.environment":a,uid:sy}));oy=new PZ.OTLPTraceExporter({url:process.env.REDWOOD_REDIRECT_TELEMETRY||"https://quark.quantumparticle.io/v1/traces"}),iy=new o_.BatchSpanProcessor(oy),ny=new o_.NodeTracerProvider({resource:s,spanProcessors:[iy]}),ny.register(),process.on("SIGTERM",async()=>{await gt()})}async function gt(){try{Yc.trace.getActiveSpan()?.end(),await ny?.shutdown(),await iy?.shutdown(),await oy?.shutdown()}catch(i){process.env.REDWOOD_VERBOSE_TELEMETRY&&console.error("Telemetry: shutdown error",i)}}function Nt(i){Yc.trace.getActiveSpan()?.setStatus({code:wi.ERROR,message:String(i).split(`
560
+ `),a+=i.charAt(s);return t&&o&&(a=`${t}${a}${o}`),a}function vm(i){return LP(i,{stringWidth:e=>[...e].length,stripAnsi:Am,wrap:UP})}import{dirname as VP,resolve as BP}from"path";import{readdirSync as Ine,statSync as Lne}from"fs";function GP(i,e){let t=BP(".",i),o;for(Lne(t).isDirectory()||(t=VP(t));;){if(o=e(t,Ine(t)),o)return BP(t,o);if(t=VP(o=t),o===t)break}}import{inspect as jne}from"util";import{readFileSync as Yne}from"fs";import{fileURLToPath as qne}from"url";import{basename as Wne,dirname as Kne,extname as $ne,relative as zne,resolve as jP}from"path";import{readFileSync as wne,statSync as Une,writeFile as Vne}from"fs";import{format as Bne}from"util";import{resolve as Gne}from"path";var FP={fs:{readFileSync:wne,writeFile:Vne},format:Bne,resolve:Gne,exists:i=>{try{return Une(i).isFile()}catch{return!1}}};var Dn,ym=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(),Dn.format.apply(Dn.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),Dn.format.apply(Dn.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);Dn.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{Dn.fs.readFileSync&&(e=JSON.parse(Dn.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=Dn.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(o)&&~t.lastIndexOf("_")){let a=Dn.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(a)&&(o=a)}return o}_fileExistsSync(e){return Dn.exists(e)}};function kP(i,e){Dn=e;let t=new ym(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 Fne=i=>kP(i,FP),HP=Fne;var Xne="require is not supported by ESM",YP="loading a directory of commands is not supported yet for ESM",tu;try{tu=qne(import.meta.url)}catch{tu=process.cwd()}var Jne=tu.substring(0,tu.lastIndexOf("node_modules")),Qne={assert:{notStrictEqual:kne,strictEqual:Hne},cliui:vm,findUp:GP,getEnv:i=>process.env[i],inspect:jne,getCallerFile:()=>{throw new qo(YP)},getProcessArgvBin:CP,mainFilename:Jne||process.cwd(),Parser:eu,path:{basename:Wne,dirname:Kne,extname:$ne,relative:zne,resolve:jP},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:Yne,require:()=>{throw new qo(Xne)},requireDirectory:()=>{throw new qo(YP)},stringWidth:i=>[...i].length,y18n:HP({directory:jP(tu,"../../../locales"),updateFiles:!1})};var AR=jt(gR(),1),{applyExtends:soe,cjsPlatformShim:aoe,Parser:coe,processArgv:uoe,Yargs:Gp}=AR.default;Gp.applyExtends=(i,e,t)=>soe(i,e,t,aoe);Gp.hideBin=uoe.hideBin;Gp.Parser=coe;var vR=Gp;var It=jt(Aa(),1);var yu={name:"create-cedar-app",version:"4.1.0-rc.70",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.1.0-rc.70","@cedarjs/tui":"4.1.0-rc.70","@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:"240b5e35e3d5e34cb4221940651248e4b67ce19c"};var MZ=jt(ST(),1),ks=jt(Aa(),1);Ie();Ie();var PZ=jt(yj(),1),ty=jt(qd(),1),o_=jt(TJ(),1);var gJ="service.name",AJ="service.version";var CZ=jt(xJ(),1),RZ=jt(CJ(),1),ry=jt(OZ(),1);var dr=[];for(let i=0;i<256;++i)dr.push((i+256).toString(16).slice(1));function xZ(i,e=0){return(dr[i[e+0]]+dr[i[e+1]]+dr[i[e+2]]+dr[i[e+3]]+"-"+dr[i[e+4]]+dr[i[e+5]]+"-"+dr[i[e+6]]+dr[i[e+7]]+"-"+dr[i[e+8]]+dr[i[e+9]]+"-"+dr[i[e+10]]+dr[i[e+11]]+dr[i[e+12]]+dr[i[e+13]]+dr[i[e+14]]+dr[i[e+15]]).toLowerCase()}import{randomFillSync as jqe}from"crypto";var i_=new Uint8Array(256),n_=i_.length;function Qv(){return n_>i_.length-16&&(jqe(i_),n_=0),i_.slice(n_,n_+=16)}import{randomUUID as Yqe}from"crypto";var Zv={randomUUID:Yqe};function qqe(i,e,t){if(Zv.randomUUID&&!e&&!i)return Zv.randomUUID();i=i||{};let o=i.random??i.rng?.()??Qv();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 xZ(o)}var ey=qqe;var{name:Wqe,version:Kqe}=yu,$qe="os.type",zqe="os.version",ny,iy,oy,sy=ey();async function NZ(){Yt.setLogger(new Fl,$t.ERROR);let i=JSON.parse(await RZ.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 ry.default.cpu(),o=await ry.default.mem(),a;Object.keys(process.env).some(n=>n.startsWith("GITPOD_"))&&(a="gitpod");let s=ty.Resource.default().merge(new ty.Resource({[gJ]:Wqe,[AJ]:Kqe,[$qe]:i.System?.OS?.split(" ")[0],[zqe]: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":CZ.default.isCI,"dev.environment":a,uid:sy}));oy=new PZ.OTLPTraceExporter({url:process.env.REDWOOD_REDIRECT_TELEMETRY||"https://quark.quantumparticle.io/v1/traces"}),iy=new o_.BatchSpanProcessor(oy),ny=new o_.NodeTracerProvider({resource:s,spanProcessors:[iy]}),ny.register(),process.on("SIGTERM",async()=>{await gt()})}async function gt(){try{Yc.trace.getActiveSpan()?.end(),await ny?.shutdown(),await iy?.shutdown(),await oy?.shutdown()}catch(i){process.env.REDWOOD_VERBOSE_TELEMETRY&&console.error("Telemetry: shutdown error",i)}}function Nt(i){Yc.trace.getActiveSpan()?.setStatus({code:wi.ERROR,message:String(i).split(`
561
561
  `)[0]}),Yc.trace.getActiveSpan()?.recordException(i instanceof Error?i:new Error(String(i)))}var DZ=jt(Aa(),1),Me=new DZ.RedwoodTUI;var ay="Initial commit";async function bZ(i){if(i){let e=i==="."?"the current directory":i;return Me.drawText(`${ks.RedwoodStyling.green("\u2714")} Creating your Cedar app in ${e} based on command line argument`),i}try{let e=await Me.prompt({type:"input",name:"targetDir",message:"Where would you like to create your CedarJS app?",initial:"my-cedar-app"});return/^~\w/.test(e.targetDir)&&(Me.stopReactive(!0),Me.displayError("The `~username` syntax is not supported here","Please use the full path or specify the target directory on the command line."),Nt("Target dir prompt path syntax not supported"),await gt(),process.exit(1)),(0,MZ.default)(e.targetDir)}catch{Nt("User cancelled install at target dir prompt"),await gt(),process.exit(1)}}async function IZ(i){if(i!==null)return Me.drawText(`${ks.RedwoodStyling.green("\u2714")} Using ${i?"TypeScript":"JavaScript"} based on command line flag`),i;try{return(await Me.prompt({type:"Select",name:"language",choices:["TypeScript","JavaScript"],message:"Select your preferred language",initial:"TypeScript"})).language==="TypeScript"}catch{Nt("User cancelled install at language prompt"),await gt(),process.exit(1)}}async function LZ(i){return i!==null?(Me.drawText(`${ks.RedwoodStyling.green("\u2714")} Setting up ${i?"an ESM":"a CJS"} project based on command line flag`),i):!1}async function wZ(i){if(i!==null)return Me.drawText(`${ks.RedwoodStyling.green("\u2714")} ${i?"Will":"Will not"} initialize a git repo based on command line flag`),i;try{return(await Me.prompt({type:"Toggle",name:"git",message:"Do you want to initialize a git repo?",enabled:"Yes",disabled:"no",initial:"Yes"})).git}catch{Nt("User cancelled install at git prompt"),await gt(),process.exit(1)}}async function UZ(){try{return(await Me.prompt({type:"input",name:"targetDirectoryInput",message:"What directory would you like to create the app in?",initial:"my-cedar-app"})).targetDirectoryInput}catch{Nt("User cancelled install at specify a different directory prompt"),await gt(),process.exit(1)}}async function VZ(i){if(i!==null)return i;try{return(await Me.prompt({type:"input",name:"commitMessage",message:"Enter a commit message",initial:ay})).commitMessage}catch{Nt("User cancelled install at commit message prompt"),await gt(),process.exit(1)}}async function BZ(i,e){if(i!==null)return Me.drawText(`${ks.RedwoodStyling.green("\u2714")} ${i?"Will":"Will not"} run ${e} install based on command line flag`),i;try{return(await Me.prompt({type:"Toggle",name:"install",message:`Do you want to run ${e} install?`,enabled:"Yes",disabled:"no",initial:"Yes"})).install}catch{Nt("User cancelled install at install prompt"),await gt(),process.exit(1)}}function Xqe(i){return["yarn","npm","pnpm"].includes(i??"")}function cy(){let e=process.env.npm_config_user_agent?.split(" ")[0]?.split("/")[0];if(e==="yarn"||e==="npm"||e==="pnpm")return e}async function GZ(i){if(Xqe(i))return Me.drawText(`${ks.RedwoodStyling.green("\u2714")} Using ${i} based on command line flag`),i;try{let e=cy();return(await Me.prompt({type:"Select",name:"packageManager",choices:["yarn","npm","pnpm"],message:"Select your preferred package manager",initial:e})).packageManager}catch{Nt("User cancelled install at package manager prompt"),await gt(),process.exit(1)}}async function FZ(i,e){let t=["sqlite","pglite","neon-postgres"];return i&&!t.includes(i)&&(Me.stopReactive(!0),Me.displayError("Invalid database",`Unknown database "${i}". Supported values: `+t.join(", ")),Nt("Invalid database flag"),await gt(),process.exit(1)),i==="pglite"&&!e&&(Me.stopReactive(!0),Me.displayError("Invalid configuration",`The --db pglite flag requires --esm. Use:
562
562
  create-cedar-app --esm --db pglite my-app`),Nt("pglite without esm"),await gt(),process.exit(1)),i==="neon-postgres"&&!e&&(Me.stopReactive(!0),Me.displayError("Invalid configuration",`The --db neon-postgres flag requires --esm. Use:
563
563
  create-cedar-app --esm --db neon-postgres my-app`),Nt("neon-postgres without esm"),await gt(),process.exit(1)),i??"sqlite"}var c_=jt(rv(),1),bl=jt(qZ(),1),u_=jt(Aa(),1);import c7e from"node:fs";import u7e from"node:path";async function WZ(i){let e=new u_.ReactiveTUIContent({mode:"text",content:"Checking node compatibility",spinner:{enabled:!0}});Me.startReactive(e);let{isSatisfied:t,nodeRange:o}=l7e(i);if(t){e.update({spinner:{enabled:!1},content:`${u_.RedwoodStyling.green("\u2714")} Compatibility checks passed`}),Me.stopReactive();return}let a=c_.default.minVersion(o);a&&c_.default.lt(process.version,a)&&(Me.stopReactive(!0),Me.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,bl.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,bl.terminalLink)("Tutorial - Prerequisites","https://cedarjs.com/docs/tutorial/chapter1/prerequisites",{fallback:()=>"Tutorial - Prerequisites https://cedarjs.com/docs/tutorial/chapter1/prerequisites"})}`].join(`
564
564
  `)),Nt("Compatibility checks failed"),await gt(),process.exit(1)),Me.stopReactive(!0),Me.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,bl.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,bl.terminalLink)("Tutorial - Prerequisites","https://cedarjs.com/docs/tutorial/chapter1/prerequisites",{fallback:()=>"Tutorial - Prerequisites https://cedarjs.com/docs/tutorial/chapter1/prerequisites"})}`].join(`
565
- `));try{(await Me.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"&&(Nt("User quit after engine check error"),await gt(),process.exit(0))}catch{Nt("User cancelled install at engine check error"),await gt(),process.exit(1)}}function l7e(i){let t=JSON.parse(c7e.readFileSync(u7e.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:c_.default.satisfies(process.version,t),nodeRange:t}}function Il(i){return`${i} install`}function py(i){return i==="npm"?"npx":i}function KZ(i){return i==="npm"?"npx":i+" dlx"}function l_(i){return`${py(i)} cedar`}var zZ=jt(ST(),1),Ll=jt(Aa(),1);import Cn from"node:fs";import mi from"node:path";import fy from"node:fs";import p7e from"node:path";async function $Z(i,e){let t=Il(e.packageManager),o=l_(e.packageManager),s={"{{PM}}":e.packageManager,"{{PM_INSTALL}}":t,"{{CEDAR_CLI}}":o,"{{PRISMA_VERSION}}":"7.7.0","{{DATABASE_URL}}":e.databaseUrl,"{{DIRECT_DATABASE_URL}}":e.directDatabaseUrl,"{{NEON_CLAIM_EXPIRY}}":e.neonClaimExpiry,"{{NEON_CLAIM_URL}}":e.neonClaimUrl},n=["**/*.{json,md,js,ts,yml,yaml}","**/.*/**/*.{json,md,js,ts,yml,yaml}","**/.env*"];for(let r of n)for await(let c of fy.promises.glob(r,{cwd:i})){let u=p7e.join(i,c),l=await fy.promises.readFile(u,"utf-8");for(let[p,f]of Object.entries(s))f!==void 0&&(l=l.replaceAll(p,f));await fy.promises.writeFile(u,l,"utf-8")}}async function XZ(i,{templateDir:e,templatesDir:t,overwrite:o,packageManager:a,useEsm:s,database:n}){let r=i,c=mi.join(t,"overlays",s?"esm":"cjs",a),u=new Ll.ReactiveTUIContent({mode:"text",content:"Creating project files",spinner:{enabled:!0}});Me.startReactive(u),r=await dy(r,{overwrite:o}),Cn.mkdirSync(mi.dirname(r),{recursive:!0}),await Cn.promises.cp(e,r,{recursive:!0,force:o}),await Cn.promises.cp(c,r,{recursive:!0,force:!0});let l="",p="",f="",h="";if(n==="pglite"){let _=mi.join(r,"api","prisma.config.cjs");try{await Cn.promises.unlink(_)}catch{}let d=mi.join(t,"..","database-overlays","pglite");await Cn.promises.cp(d,r,{recursive:!0,force:!0})}else if(n==="neon-postgres"){let _=mi.join(t,"..","database-overlays","neon-postgres");await Cn.promises.cp(_,r,{recursive:!0,force:!0});try{let d=await fetch("https://neon.new/api/v1/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ref:"cedarjs"})});if(!d.ok)throw new Error(`Neon API returned ${d.status} ${d.statusText}`);let m=await d.json();if(!m.connection_string||!m.expires_at||!m.claim_url)throw new Error(`Neon API returned an invalid response
565
+ `));try{(await Me.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"&&(Nt("User quit after engine check error"),await gt(),process.exit(0))}catch{Nt("User cancelled install at engine check error"),await gt(),process.exit(1)}}function l7e(i){let t=JSON.parse(c7e.readFileSync(u7e.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:c_.default.satisfies(process.version,t),nodeRange:t}}function Il(i){return`${i} install`}function py(i){return i==="npm"?"npx":i}function KZ(i){return i==="npm"?"npx":i+" dlx"}function l_(i){return`${py(i)} cedar`}var zZ=jt(ST(),1),Ll=jt(Aa(),1);import Cn from"node:fs";import mi from"node:path";import fy from"node:fs";import p7e from"node:path";async function $Z(i,e){let t=Il(e.packageManager),o=l_(e.packageManager),a={"{{PM}}":e.packageManager,"{{PM_INSTALL}}":t,"{{CEDAR_CLI}}":o,"{{DATABASE_URL}}":e.databaseUrl,"{{DIRECT_DATABASE_URL}}":e.directDatabaseUrl,"{{NEON_CLAIM_EXPIRY}}":e.neonClaimExpiry,"{{NEON_CLAIM_URL}}":e.neonClaimUrl},s=["**/*.{json,md,js,ts,yml,yaml}","**/.*/**/*.{json,md,js,ts,yml,yaml}","**/.env*"];for(let n of s)for await(let r of fy.promises.glob(n,{cwd:i})){let c=p7e.join(i,r),u=await fy.promises.readFile(c,"utf-8");for(let[l,p]of Object.entries(a))p!==void 0&&(u=u.replaceAll(l,p));await fy.promises.writeFile(c,u,"utf-8")}}async function XZ(i,{templateDir:e,templatesDir:t,overwrite:o,packageManager:a,useEsm:s,database:n}){let r=i,c=mi.join(t,"overlays",s?"esm":"cjs",a),u=new Ll.ReactiveTUIContent({mode:"text",content:"Creating project files",spinner:{enabled:!0}});Me.startReactive(u),r=await dy(r,{overwrite:o}),Cn.mkdirSync(mi.dirname(r),{recursive:!0}),await Cn.promises.cp(e,r,{recursive:!0,force:o}),await Cn.promises.cp(c,r,{recursive:!0,force:!0});let l="",p="",f="",h="";if(n==="pglite"){let _=mi.join(r,"api","prisma.config.cjs");try{await Cn.promises.unlink(_)}catch{}let d=mi.join(t,"..","database-overlays","pglite");await Cn.promises.cp(d,r,{recursive:!0,force:!0})}else if(n==="neon-postgres"){let _=mi.join(t,"..","database-overlays","neon-postgres");await Cn.promises.cp(_,r,{recursive:!0,force:!0});try{let d=await fetch("https://neon.new/api/v1/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ref:"cedarjs"})});if(!d.ok)throw new Error(`Neon API returned ${d.status} ${d.statusText}`);let m=await d.json();if(!m.connection_string||!m.expires_at||!m.claim_url)throw new Error(`Neon API returned an invalid response
566
566
 
567
567
  `+JSON.stringify(m,null,2));l=m.connection_string,p=m.connection_string.replace("-pooler.","."),f=new Date(m.expires_at).toUTCString(),h=m.claim_url;let T=new Date(m.expires_at),S=T.getFullYear(),A=`0${T.getMonth()+1}`.slice(-2),g=`0${T.getDate()}`.slice(-2),P=`${S}-${A}-${g}`;Me.drawText(" Database created successfully"),Me.drawText(" Claim your Neon database by visiting the url below:"),Me.drawText(" "+h),Me.drawText(` You can use the database until ${P} without claiming it`),Me.drawText("")}catch(d){l="";let m=d instanceof Error?d.message:String(d);Me.displayWarning("Could not create database",`Run \`${KZ(a)} neon-new --yes\` to manually create one.
568
568
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cedar-app",
3
- "version": "4.0.1-next.0+006a79e314",
3
+ "version": "4.1.0-rc.70",
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.1-next.1",
31
- "@cedarjs/tui": "4.0.1-next.0+006a79e314",
30
+ "@cedarjs/framework-tools": "4.1.0-rc.70",
31
+ "@cedarjs/tui": "4.1.0-rc.70",
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": "006a79e314ffa914671658f8e733fad4fc2cb09e"
57
+ "gitHead": "240b5e35e3d5e34cb4221940651248e4b67ce19c"
58
58
  }
@@ -4,9 +4,9 @@
4
4
  "version": "0.0.0",
5
5
  "private": true,
6
6
  "dependencies": {
7
- "@cedarjs/api": "4.0.1-next.1",
8
- "@cedarjs/graphql-server": "4.0.1-next.1",
7
+ "@cedarjs/api": "4.1.0-rc.70",
8
+ "@cedarjs/graphql-server": "4.1.0-rc.70",
9
9
  "@prisma/adapter-better-sqlite3": "7.7.0",
10
- "better-sqlite3": "12.8.0"
10
+ "better-sqlite3": "12.9.0"
11
11
  }
12
12
  }
@@ -11,7 +11,7 @@
11
11
  [web]
12
12
  title = "Cedar App"
13
13
  port = 8910
14
- apiUrl = "/.redwood/functions"
14
+ apiUrl = "/.api/functions"
15
15
  includeEnvironmentVariables = [
16
16
  # Add any ENV vars that should be available to the web side to this array
17
17
  # See https://cedarjs.com/docs/environment-variables#web
@@ -6,10 +6,10 @@
6
6
  "web"
7
7
  ],
8
8
  "devDependencies": {
9
- "@cedarjs/core": "4.0.1-next.1",
10
- "@cedarjs/eslint-config": "4.0.1-next.1",
11
- "@cedarjs/project-config": "4.0.1-next.1",
12
- "@cedarjs/testing": "4.0.1-next.1",
9
+ "@cedarjs/core": "4.1.0-rc.70",
10
+ "@cedarjs/eslint-config": "4.1.0-rc.70",
11
+ "@cedarjs/project-config": "4.1.0-rc.70",
12
+ "@cedarjs/testing": "4.1.0-rc.70",
13
13
  "vitest": "3.2.4"
14
14
  },
15
15
  "engines": {
@@ -12,14 +12,14 @@
12
12
  ]
13
13
  },
14
14
  "dependencies": {
15
- "@cedarjs/forms": "4.0.1-next.1",
16
- "@cedarjs/router": "4.0.1-next.1",
17
- "@cedarjs/web": "4.0.1-next.1",
15
+ "@cedarjs/forms": "4.1.0-rc.70",
16
+ "@cedarjs/router": "4.1.0-rc.70",
17
+ "@cedarjs/web": "4.1.0-rc.70",
18
18
  "react": "18.3.1",
19
19
  "react-dom": "18.3.1"
20
20
  },
21
21
  "devDependencies": {
22
- "@cedarjs/vite": "4.0.1-next.1",
22
+ "@cedarjs/vite": "4.1.0-rc.70",
23
23
  "@types/react": "^18.2.55",
24
24
  "@types/react-dom": "^18.2.19"
25
25
  }