create-cedar-app 5.0.0-rc.280 → 5.0.1-next.0
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/database-overlays/neon-postgres/api/package.json +2 -2
- package/database-overlays/pglite/api/package.json +2 -2
- package/dist/create-cedar-app.js +1 -1
- package/package.json +3 -3
- package/templates/esm-js/api/package.json +2 -2
- package/templates/esm-js/package.json +4 -4
- package/templates/esm-js/web/package.json +4 -4
- package/templates/esm-js/yarn.lock +202 -202
- package/templates/esm-ts/api/package.json +2 -2
- package/templates/esm-ts/package.json +4 -4
- package/templates/esm-ts/web/package.json +4 -4
- package/templates/esm-ts/yarn.lock +202 -202
- 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/js/yarn.lock +202 -202
- package/templates/overlays/cjs/npm/package.json +4 -4
- package/templates/overlays/cjs/pnpm/package.json +4 -4
- package/templates/overlays/cjs/yarn/package.json +4 -4
- package/templates/overlays/esm/npm/package.json +4 -4
- package/templates/overlays/esm/pnpm/package.json +4 -4
- package/templates/overlays/esm/yarn/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/ts/yarn.lock +202 -202
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@cedarjs/api": "5.0.
|
|
8
|
-
"@cedarjs/graphql-server": "5.0.
|
|
7
|
+
"@cedarjs/api": "5.0.1-next.0",
|
|
8
|
+
"@cedarjs/graphql-server": "5.0.1-next.0",
|
|
9
9
|
"@prisma/adapter-pg": "7.8.0",
|
|
10
10
|
"pg": "^8.13.0"
|
|
11
11
|
}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@cedarjs/api": "5.0.
|
|
8
|
-
"@cedarjs/graphql-server": "5.0.
|
|
7
|
+
"@cedarjs/api": "5.0.1-next.0",
|
|
8
|
+
"@cedarjs/graphql-server": "5.0.1-next.0",
|
|
9
9
|
"@electric-sql/pglite": "^0.5.2",
|
|
10
10
|
"@electric-sql/pglite-socket": "^0.2.0",
|
|
11
11
|
"@prisma/adapter-pg": "7.8.0",
|
package/dist/create-cedar-app.js
CHANGED
|
@@ -558,7 +558,7 @@ Bus `);for(let r=1;r<n.length;r++){let c=QWe(n[r]);t.push(c)}}i&&i(t),e(t)}),qWe
|
|
|
558
558
|
`)}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>Zr.stringWidth(n)&&(l+=" ".repeat(u-Zr.stringWidth(n))),e[r].align&&e[r].align!=="left"&&this.wrap){let f=lse[e[r].align];l=f(l,u),Zr.stringWidth(l)<u&&(l+=" ".repeat((c||0)-Zr.stringWidth(l)-1))}let p=e[r].padding||[0,0,0,0];p[Qp]&&(s+=" ".repeat(p[Qp])),s+=HR(e[r],l,"| "),s+=l,s+=HR(e[r],l," |"),p[Jp]&&(s+=" ".repeat(p[Jp])),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=Zr.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=Zr.wrap(s.text,this.negatePadding(s),{hard:!0}).split(`
|
|
559
559
|
`):a=s.text.split(`
|
|
560
560
|
`),s.border&&(a.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),a.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(a.unshift(...new Array(s.padding[pse]||0).fill("")),a.push(...new Array(s.padding[fse]||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[Qp]||0)+(e.padding[Jp]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(n=>n.width||Zr.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,dse(e[r])):n)}};function HR(i,e,t){return i.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?t:" ":""}function dse(i){let e=i.padding||[],t=1+(e[Qp]||0)+(e[Jp]||0);return i.border?t+4:t}function hse(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Ese(i,e){i=i.trim();let t=Zr.stringWidth(i);return t<e?" ".repeat(e-t)+i:i}function _se(i,e){i=i.trim();let t=Zr.stringWidth(i);return t>=e?i:" ".repeat(e-t>>1)+i}var Zr;function jR(i,e){return Zr=e,new TS({width:i?.width||hse(),wrap:i?.wrap})}var YR=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function gS(i){return i.replace(YR,"")}function qR(i,e){let[t,o]=i.match(YR)||["",""];i=gS(i);let a="";for(let s=0;s<i.length;s++)s!==0&&s%e===0&&(a+=`
|
|
561
|
-
`),a+=i.charAt(s);return t&&o&&(a=`${t}${a}${o}`),a}function AS(i){return jR(i,{stringWidth:e=>[...e].length,stripAnsi:gS,wrap:qR})}import{dirname as WR,resolve as $R}from"path";import{readdirSync as mse,statSync as Sse}from"fs";function KR(i,e){let t=$R(".",i),o;for(Sse(t).isDirectory()||(t=WR(t));;){if(o=e(t,mse(t)),o)return $R(t,o);if(t=WR(o=t),o===t)break}}import{inspect as Rse}from"util";import{readFileSync as Nse}from"fs";import{fileURLToPath as Cse}from"url";import{basename as Dse,dirname as Mse,extname as Ise,relative as bse,resolve as QR}from"path";import{readFileSync as Tse,statSync as gse,writeFile as Ase}from"fs";import{format as vse}from"util";import{resolve as yse}from"path";var zR={fs:{readFileSync:Tse,writeFile:Ase},format:vse,resolve:yse,exists:i=>{try{return gse(i).isFile()}catch{return!1}}};var Fn,vS=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(),Fn.format.apply(Fn.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),Fn.format.apply(Fn.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);Fn.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{Fn.fs.readFileSync&&(e=JSON.parse(Fn.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=Fn.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(o)&&~t.lastIndexOf("_")){let a=Fn.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(a)&&(o=a)}return o}_fileExistsSync(e){return Fn.exists(e)}};function XR(i,e){Fn=e;let t=new vS(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 Ose=i=>XR(i,zR),JR=Ose;var Lse="require is not supported by ESM",ZR="loading a directory of commands is not supported yet for ESM",Tu;try{Tu=Cse(import.meta.url)}catch{Tu=process.cwd()}var wse=Tu.substring(0,Tu.lastIndexOf("node_modules")),Use={assert:{notStrictEqual:xse,strictEqual:Pse},cliui:AS,findUp:KR,getEnv:i=>process.env[i],inspect:Rse,getCallerFile:()=>{throw new ns(ZR)},getProcessArgvBin:UR,mainFilename:wse||process.cwd(),Parser:Su,path:{basename:Dse,dirname:Mse,extname:Ise,relative:bse,resolve:QR},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:Nse,require:()=>{throw new ns(Lse)},requireDirectory:()=>{throw new ns(ZR)},stringWidth:i=>[...i].length,y18n:JR({directory:QR(Tu,"../../../locales"),updateFiles:!1})};var DC=$t(CC(),1),{applyExtends:Yae,cjsPlatformShim:qae,Parser:Wae,processArgv:$ae,Yargs:mf}=DC.default;mf.applyExtends=(i,e,t)=>Yae(i,e,t,qae);mf.hideBin=$ae.hideBin;mf.Parser=Wae;var MC=mf;var Bt=$t(Va(),1);var ku={name:"create-cedar-app",version:"5.0.
|
|
561
|
+
`),a+=i.charAt(s);return t&&o&&(a=`${t}${a}${o}`),a}function AS(i){return jR(i,{stringWidth:e=>[...e].length,stripAnsi:gS,wrap:qR})}import{dirname as WR,resolve as $R}from"path";import{readdirSync as mse,statSync as Sse}from"fs";function KR(i,e){let t=$R(".",i),o;for(Sse(t).isDirectory()||(t=WR(t));;){if(o=e(t,mse(t)),o)return $R(t,o);if(t=WR(o=t),o===t)break}}import{inspect as Rse}from"util";import{readFileSync as Nse}from"fs";import{fileURLToPath as Cse}from"url";import{basename as Dse,dirname as Mse,extname as Ise,relative as bse,resolve as QR}from"path";import{readFileSync as Tse,statSync as gse,writeFile as Ase}from"fs";import{format as vse}from"util";import{resolve as yse}from"path";var zR={fs:{readFileSync:Tse,writeFile:Ase},format:vse,resolve:yse,exists:i=>{try{return gse(i).isFile()}catch{return!1}}};var Fn,vS=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(),Fn.format.apply(Fn.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),Fn.format.apply(Fn.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);Fn.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{Fn.fs.readFileSync&&(e=JSON.parse(Fn.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=Fn.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(o)&&~t.lastIndexOf("_")){let a=Fn.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(a)&&(o=a)}return o}_fileExistsSync(e){return Fn.exists(e)}};function XR(i,e){Fn=e;let t=new vS(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 Ose=i=>XR(i,zR),JR=Ose;var Lse="require is not supported by ESM",ZR="loading a directory of commands is not supported yet for ESM",Tu;try{Tu=Cse(import.meta.url)}catch{Tu=process.cwd()}var wse=Tu.substring(0,Tu.lastIndexOf("node_modules")),Use={assert:{notStrictEqual:xse,strictEqual:Pse},cliui:AS,findUp:KR,getEnv:i=>process.env[i],inspect:Rse,getCallerFile:()=>{throw new ns(ZR)},getProcessArgvBin:UR,mainFilename:wse||process.cwd(),Parser:Su,path:{basename:Dse,dirname:Mse,extname:Ise,relative:bse,resolve:QR},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:Nse,require:()=>{throw new ns(Lse)},requireDirectory:()=>{throw new ns(ZR)},stringWidth:i=>[...i].length,y18n:JR({directory:QR(Tu,"../../../locales"),updateFiles:!1})};var DC=$t(CC(),1),{applyExtends:Yae,cjsPlatformShim:qae,Parser:Wae,processArgv:$ae,Yargs:mf}=DC.default;mf.applyExtends=(i,e,t)=>Yae(i,e,t,qae);mf.hideBin=$ae.hideBin;mf.Parser=Wae;var MC=mf;var Bt=$t(Va(),1);var ku={name:"create-cedar-app",version:"5.0.1-next.0",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:"node ./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":"5.0.0","@cedarjs/tui":"5.0.0","@opentelemetry/api":"1.9.1","@opentelemetry/exporter-trace-otlp-http":"0.57.2","@opentelemetry/resources":"1.30.1","@opentelemetry/sdk-trace-node":"1.30.1","@opentelemetry/semantic-conventions":"1.41.1","@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.7","termi-link":"1.1.0",untildify:"4.0.0",uuid:"11.1.0",vitest:"3.2.6",yargs:"17.7.2"},engines:{node:">=24"},gitHead:"3905ed045508b861b495f8d5630d76c7a157d8f1"};var $ee=$t(m0(),1),Qs=$t(Va(),1);Ue();Ue();var Hee=$t(wY(),1),nO=$t(vh(),1),U_=$t(LQ(),1);var wQ="service.name";var UQ="service.version";var jee=$t(FQ(),1),Yee=$t(HQ(),1),iO=$t(Fee(),1);var Tr=[];for(let i=0;i<256;++i)Tr.push((i+256).toString(16).slice(1));function kee(i,e=0){return(Tr[i[e+0]]+Tr[i[e+1]]+Tr[i[e+2]]+Tr[i[e+3]]+"-"+Tr[i[e+4]]+Tr[i[e+5]]+"-"+Tr[i[e+6]]+Tr[i[e+7]]+"-"+Tr[i[e+8]]+Tr[i[e+9]]+"-"+Tr[i[e+10]]+Tr[i[e+11]]+Tr[i[e+12]]+Tr[i[e+13]]+Tr[i[e+14]]+Tr[i[e+15]]).toLowerCase()}import{randomFillSync as F9e}from"crypto";var w_=new Uint8Array(256),L_=w_.length;function eO(){return L_>w_.length-16&&(F9e(w_),L_=0),w_.slice(L_,L_+=16)}import{randomUUID as k9e}from"crypto";var tO={randomUUID:k9e};function H9e(i,e,t){if(tO.randomUUID&&!e&&!i)return tO.randomUUID();i=i||{};let o=i.random??i.rng?.()??eO();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 kee(o)}var rO=H9e;var{name:j9e,version:Y9e}=ku,q9e="os.type",W9e="os.version",oO,sO,aO,cO=rO();async function qee(){Kt.setLogger(new ta,Qt.ERROR);let i=JSON.parse(await Yee.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 iO.default.cpu(),o=await iO.default.mem(),a;Object.keys(process.env).some(n=>n.startsWith("GITPOD_"))&&(a="gitpod");let s=nO.Resource.default().merge(new nO.Resource({[wQ]:j9e,[UQ]:Y9e,[q9e]:i.System?.OS?.split(" ")[0],[W9e]: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.CEDAR_CI,"ci.isci":jee.default.isCI,"dev.environment":a,uid:cO}));aO=new Hee.OTLPTraceExporter({url:process.env.CEDAR_REDIRECT_TELEMETRY||process.env.REDWOOD_REDIRECT_TELEMETRY||"https://quark.quantumparticle.io/v1/traces"}),sO=new U_.BatchSpanProcessor(aO),oO=new U_.NodeTracerProvider({resource:s,spanProcessors:[sO]}),oO.register(),process.on("SIGTERM",async()=>{await yt()})}async function yt(){try{cu.trace.getActiveSpan()?.end(),await oO?.shutdown(),await sO?.shutdown(),await aO?.shutdown()}catch(i){(process.env.CEDAR_VERBOSE_TELEMETRY||process.env.REDWOOD_VERBOSE_TELEMETRY)&&console.error("Telemetry: shutdown error",i)}}function Lt(i){cu.trace.getActiveSpan()?.setStatus({code:Wi.ERROR,message:String(i).split(`
|
|
562
562
|
`)[0]}),cu.trace.getActiveSpan()?.recordException(i instanceof Error?i:new Error(String(i)))}var Wee=$t(Va(),1),Le=new Wee.RedwoodTUI;var uO="Initial commit";async function Kee(i){if(i){let e=i==="."?"the current directory":i;return Le.drawText(`${Qs.RedwoodStyling.green("\u2714")} Creating your Cedar app in ${e} based on command line argument`),i}try{let e=await Le.prompt({type:"input",name:"targetDir",message:"Where would you like to create your CedarJS app?",initial:"my-cedar-app"});return/^~\w/.test(e.targetDir)&&(Le.stopReactive(!0),Le.displayError("The `~username` syntax is not supported here","Please use the full path or specify the target directory on the command line."),Lt("Target dir prompt path syntax not supported"),await yt(),process.exit(1)),(0,$ee.default)(e.targetDir)}catch{Lt("User cancelled install at target dir prompt"),await yt(),process.exit(1)}}async function zee(i){if(i!==null)return Le.drawText(`${Qs.RedwoodStyling.green("\u2714")} Using ${i?"TypeScript":"JavaScript"} based on command line flag`),i;try{return(await Le.prompt({type:"Select",name:"language",choices:["TypeScript","JavaScript"],message:"Select your preferred language",initial:"TypeScript"})).language==="TypeScript"}catch{Lt("User cancelled install at language prompt"),await yt(),process.exit(1)}}async function Xee(i){return i!==null?(Le.drawText(`${Qs.RedwoodStyling.green("\u2714")} Setting up ${i?"an ESM":"a CJS"} project based on command line flag`),i):!1}async function Jee(i){if(i!==null)return Le.drawText(`${Qs.RedwoodStyling.green("\u2714")} ${i?"Will":"Will not"} initialize a git repo based on command line flag`),i;try{return(await Le.prompt({type:"Toggle",name:"git",message:"Do you want to initialize a git repo?",enabled:"Yes",disabled:"no",initial:"Yes"})).git}catch{Lt("User cancelled install at git prompt"),await yt(),process.exit(1)}}async function Qee(){try{return(await Le.prompt({type:"input",name:"targetDirectoryInput",message:"What directory would you like to create the app in?",initial:"my-cedar-app"})).targetDirectoryInput}catch{Lt("User cancelled install at specify a different directory prompt"),await yt(),process.exit(1)}}async function Zee(i){if(i!==null)return i;try{return(await Le.prompt({type:"input",name:"commitMessage",message:"Enter a commit message",initial:uO})).commitMessage}catch{Lt("User cancelled install at commit message prompt"),await yt(),process.exit(1)}}async function ete(i,e){if(i!==null)return Le.drawText(`${Qs.RedwoodStyling.green("\u2714")} ${i?"Will":"Will not"} run ${e} install based on command line flag`),i;try{return(await Le.prompt({type:"Toggle",name:"install",message:`Do you want to run ${e} install?`,enabled:"Yes",disabled:"no",initial:"Yes"})).install}catch{Lt("User cancelled install at install prompt"),await yt(),process.exit(1)}}function $9e(i){return["yarn","npm","pnpm"].includes(i??"")}function lO(){let e=process.env.npm_config_user_agent?.split(" ")[0]?.split("/")[0];if(e==="yarn"||e==="npm"||e==="pnpm")return e}async function tte(i){if($9e(i))return Le.drawText(`${Qs.RedwoodStyling.green("\u2714")} Using ${i} based on command line flag`),i;try{let e=lO();return(await Le.prompt({type:"Select",name:"packageManager",choices:["yarn","npm","pnpm"],message:"Select your preferred package manager",initial:e})).packageManager}catch{Lt("User cancelled install at package manager prompt"),await yt(),process.exit(1)}}async function rte(i,e){let t=["sqlite","pglite","neon-postgres"];return i&&!t.includes(i)&&(Le.stopReactive(!0),Le.displayError("Invalid database",`Unknown database "${i}". Supported values: `+t.join(", ")),Lt("Invalid database flag"),await yt(),process.exit(1)),i==="pglite"&&!e&&(Le.stopReactive(!0),Le.displayError("Invalid configuration",`The --db pglite flag requires --esm. Use:
|
|
563
563
|
create-cedar-app --esm --db pglite my-app`),Lt("pglite without esm"),await yt(),process.exit(1)),i==="neon-postgres"&&!e&&(Le.stopReactive(!0),Le.displayError("Invalid configuration",`The --db neon-postgres flag requires --esm. Use:
|
|
564
564
|
create-cedar-app --esm --db neon-postgres my-app`),Lt("neon-postgres without esm"),await yt(),process.exit(1)),i??"sqlite"}var J_=$t(qre(),1),np=$t(Xre(),1),Q_=$t(Va(),1);import eXe from"node:fs";import tXe from"node:path";async function Jre(i){let e=new Q_.ReactiveTUIContent({mode:"text",content:"Checking node compatibility",spinner:{enabled:!0}});Le.startReactive(e);let{isSatisfied:t,nodeRange:o}=rXe(i);if(t){e.update({spinner:{enabled:!1},content:`${Q_.RedwoodStyling.green("\u2714")} Compatibility checks passed`}),Le.stopReactive();return}let a=J_.default.minVersion(o);a&&J_.default.lt(process.version,a)&&(Le.stopReactive(!0),Le.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,np.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,np.terminalLink)("Tutorial - Prerequisites","https://cedarjs.com/docs/tutorial/chapter1/prerequisites",{fallback:()=>"Tutorial - Prerequisites https://cedarjs.com/docs/tutorial/chapter1/prerequisites"})}`].join(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cedar-app",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1-next.0",
|
|
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": "5.0.0
|
|
31
|
-
"@cedarjs/tui": "5.0.0
|
|
30
|
+
"@cedarjs/framework-tools": "5.0.0",
|
|
31
|
+
"@cedarjs/tui": "5.0.0",
|
|
32
32
|
"@opentelemetry/api": "1.9.1",
|
|
33
33
|
"@opentelemetry/exporter-trace-otlp-http": "0.57.2",
|
|
34
34
|
"@opentelemetry/resources": "1.30.1",
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@cedarjs/api": "5.0.
|
|
8
|
-
"@cedarjs/graphql-server": "5.0.
|
|
7
|
+
"@cedarjs/api": "5.0.1-next.0",
|
|
8
|
+
"@cedarjs/graphql-server": "5.0.1-next.0",
|
|
9
9
|
"@prisma/adapter-better-sqlite3": "7.8.0",
|
|
10
10
|
"@prisma/client": "7.8.0",
|
|
11
11
|
"better-sqlite3": "12.9.0"
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"web"
|
|
7
7
|
],
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@cedarjs/core": "5.0.
|
|
10
|
-
"@cedarjs/eslint-config": "5.0.
|
|
11
|
-
"@cedarjs/project-config": "5.0.
|
|
12
|
-
"@cedarjs/testing": "5.0.
|
|
9
|
+
"@cedarjs/core": "5.0.1-next.0",
|
|
10
|
+
"@cedarjs/eslint-config": "5.0.1-next.0",
|
|
11
|
+
"@cedarjs/project-config": "5.0.1-next.0",
|
|
12
|
+
"@cedarjs/testing": "5.0.1-next.0",
|
|
13
13
|
"vitest": "3.2.6"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@cedarjs/forms": "5.0.
|
|
16
|
-
"@cedarjs/router": "5.0.
|
|
17
|
-
"@cedarjs/web": "5.0.
|
|
15
|
+
"@cedarjs/forms": "5.0.1-next.0",
|
|
16
|
+
"@cedarjs/router": "5.0.1-next.0",
|
|
17
|
+
"@cedarjs/web": "5.0.1-next.0",
|
|
18
18
|
"react": "18.3.1",
|
|
19
19
|
"react-dom": "18.3.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@cedarjs/vite": "5.0.
|
|
22
|
+
"@cedarjs/vite": "5.0.1-next.0",
|
|
23
23
|
"@types/react": "^18.2.55",
|
|
24
24
|
"@types/react-dom": "^18.2.19"
|
|
25
25
|
}
|