create-cedar-app 5.0.0-rc.261 → 5.0.0-rc.273
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 +4 -5
- package/templates/esm-js/api/package.json +3 -2
- package/templates/esm-js/package.json +4 -4
- package/templates/esm-js/web/package.json +4 -4
- package/templates/esm-js/yarn.lock +260 -275
- package/templates/esm-ts/api/package.json +3 -2
- package/templates/esm-ts/package.json +4 -4
- package/templates/esm-ts/web/package.json +4 -4
- package/templates/esm-ts/yarn.lock +260 -275
- package/templates/js/api/package.json +3 -2
- package/templates/js/package.json +4 -4
- package/templates/js/web/package.json +4 -4
- package/templates/js/yarn.lock +260 -275
- 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 +3 -2
- package/templates/ts/package.json +4 -4
- package/templates/ts/web/package.json +4 -4
- package/templates/ts/yarn.lock +260 -275
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@cedarjs/api": "5.0.0-rc.
|
|
8
|
-
"@cedarjs/graphql-server": "5.0.0-rc.
|
|
7
|
+
"@cedarjs/api": "5.0.0-rc.273",
|
|
8
|
+
"@cedarjs/graphql-server": "5.0.0-rc.273",
|
|
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.0-rc.
|
|
8
|
-
"@cedarjs/graphql-server": "5.0.0-rc.
|
|
7
|
+
"@cedarjs/api": "5.0.0-rc.273",
|
|
8
|
+
"@cedarjs/graphql-server": "5.0.0-rc.273",
|
|
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=JWe(n[r]);t.push(c)}}i&&i(t),e(t)}),YWe
|
|
|
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=use[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[lse]||0).fill("")),a.push(...new Array(s.padding[pse]||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,fse(e[r])):n)}};function HR(i,e,t){return i.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?t:" ":""}function fse(i){let e=i.padding||[],t=1+(e[Qp]||0)+(e[Jp]||0);return i.border?t+4:t}function dse(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function hse(i,e){i=i.trim();let t=Zr.stringWidth(i);return t<e?" ".repeat(e-t)+i:i}function Ese(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||dse(),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 _se,statSync as mse}from"fs";function KR(i,e){let t=$R(".",i),o;for(mse(t).isDirectory()||(t=WR(t));;){if(o=e(t,_se(t)),o)return $R(t,o);if(t=WR(o=t),o===t)break}}import{inspect as Pse}from"util";import{readFileSync as Rse}from"fs";import{fileURLToPath as Nse}from"url";import{basename as Cse,dirname as Dse,extname as Mse,relative as Ise,resolve as QR}from"path";import{readFileSync as Sse,statSync as Tse,writeFile as gse}from"fs";import{format as Ase}from"util";import{resolve as vse}from"path";var zR={fs:{readFileSync:Sse,writeFile:gse},format:Ase,resolve:vse,exists:i=>{try{return Tse(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 yse=i=>XR(i,zR),JR=yse;var bse="require is not supported by ESM",ZR="loading a directory of commands is not supported yet for ESM",Tu;try{Tu=Nse(import.meta.url)}catch{Tu=process.cwd()}var Lse=Tu.substring(0,Tu.lastIndexOf("node_modules")),wse={assert:{notStrictEqual:Ose,strictEqual:xse},cliui:AS,findUp:KR,getEnv:i=>process.env[i],inspect:Pse,getCallerFile:()=>{throw new ns(ZR)},getProcessArgvBin:UR,mainFilename:Lse||process.cwd(),Parser:Su,path:{basename:Cse,dirname:Dse,extname:Mse,relative:Ise,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:Rse,require:()=>{throw new ns(bse)},requireDirectory:()=>{throw new ns(ZR)},stringWidth:i=>[...i].length,y18n:JR({directory:QR(Tu,"../../../locales"),updateFiles:!1})};var DC=$t(CC(),1),{applyExtends:jae,cjsPlatformShim:Yae,Parser:qae,processArgv:Wae,Yargs:mf}=DC.default;mf.applyExtends=(i,e,t)=>jae(i,e,t,Yae);mf.hideBin=Wae.hideBin;mf.Parser=qae;var MC=mf;var Bt=$t(Va(),1);var ku={name:"create-cedar-app",version:"5.0.0-rc.
|
|
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 _se,statSync as mse}from"fs";function KR(i,e){let t=$R(".",i),o;for(mse(t).isDirectory()||(t=WR(t));;){if(o=e(t,_se(t)),o)return $R(t,o);if(t=WR(o=t),o===t)break}}import{inspect as Pse}from"util";import{readFileSync as Rse}from"fs";import{fileURLToPath as Nse}from"url";import{basename as Cse,dirname as Dse,extname as Mse,relative as Ise,resolve as QR}from"path";import{readFileSync as Sse,statSync as Tse,writeFile as gse}from"fs";import{format as Ase}from"util";import{resolve as vse}from"path";var zR={fs:{readFileSync:Sse,writeFile:gse},format:Ase,resolve:vse,exists:i=>{try{return Tse(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 yse=i=>XR(i,zR),JR=yse;var bse="require is not supported by ESM",ZR="loading a directory of commands is not supported yet for ESM",Tu;try{Tu=Nse(import.meta.url)}catch{Tu=process.cwd()}var Lse=Tu.substring(0,Tu.lastIndexOf("node_modules")),wse={assert:{notStrictEqual:Ose,strictEqual:xse},cliui:AS,findUp:KR,getEnv:i=>process.env[i],inspect:Pse,getCallerFile:()=>{throw new ns(ZR)},getProcessArgvBin:UR,mainFilename:Lse||process.cwd(),Parser:Su,path:{basename:Cse,dirname:Dse,extname:Mse,relative:Ise,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:Rse,require:()=>{throw new ns(bse)},requireDirectory:()=>{throw new ns(ZR)},stringWidth:i=>[...i].length,y18n:JR({directory:QR(Tu,"../../../locales"),updateFiles:!1})};var DC=$t(CC(),1),{applyExtends:jae,cjsPlatformShim:Yae,Parser:qae,processArgv:Wae,Yargs:mf}=DC.default;mf.applyExtends=(i,e,t)=>jae(i,e,t,Yae);mf.hideBin=Wae.hideBin;mf.Parser=qae;var MC=mf;var Bt=$t(Va(),1);var ku={name:"create-cedar-app",version:"5.0.0-rc.273",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-rc.273","@cedarjs/tui":"5.0.0-rc.273","@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 G9e}from"crypto";var w_=new Uint8Array(256),L_=w_.length;function eO(){return L_>w_.length-16&&(G9e(w_),L_=0),w_.slice(L_,L_+=16)}import{randomUUID as F9e}from"crypto";var tO={randomUUID:F9e};function k9e(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=k9e;var{name:H9e,version:j9e}=ku,Y9e="os.type",q9e="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]:H9e,[UQ]:j9e,[Y9e]:i.System?.OS?.split(" ")[0],[q9e]: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 W9e(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(W9e(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 Zze from"node:fs";import eXe 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}=tXe(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.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.273",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"database-overlays"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "
|
|
18
|
+
"build": "node ./scripts/build.ts",
|
|
19
19
|
"build:pack": "node ./scripts/buildPack.js",
|
|
20
20
|
"build:watch": "nodemon --watch src --ignore dist,template --exec \"yarn build\"",
|
|
21
21
|
"prepublishOnly": "NODE_ENV=production yarn build",
|
|
@@ -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-rc.
|
|
31
|
-
"@cedarjs/tui": "5.0.0-rc.
|
|
30
|
+
"@cedarjs/framework-tools": "5.0.0-rc.273",
|
|
31
|
+
"@cedarjs/tui": "5.0.0-rc.273",
|
|
32
32
|
"@opentelemetry/api": "1.9.1",
|
|
33
33
|
"@opentelemetry/exporter-trace-otlp-http": "0.57.2",
|
|
34
34
|
"@opentelemetry/resources": "1.30.1",
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"semver": "7.7.4",
|
|
46
46
|
"systeminformation": "5.31.7",
|
|
47
47
|
"termi-link": "1.1.0",
|
|
48
|
-
"tsx": "4.22.4",
|
|
49
48
|
"untildify": "4.0.0",
|
|
50
49
|
"uuid": "11.1.0",
|
|
51
50
|
"vitest": "3.2.6",
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@cedarjs/api": "5.0.0-rc.
|
|
8
|
-
"@cedarjs/graphql-server": "5.0.0-rc.
|
|
7
|
+
"@cedarjs/api": "5.0.0-rc.273",
|
|
8
|
+
"@cedarjs/graphql-server": "5.0.0-rc.273",
|
|
9
9
|
"@prisma/adapter-better-sqlite3": "7.8.0",
|
|
10
|
+
"@prisma/client": "7.8.0",
|
|
10
11
|
"better-sqlite3": "12.9.0"
|
|
11
12
|
}
|
|
12
13
|
}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"web"
|
|
7
7
|
],
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@cedarjs/core": "5.0.0-rc.
|
|
10
|
-
"@cedarjs/eslint-config": "5.0.0-rc.
|
|
11
|
-
"@cedarjs/project-config": "5.0.0-rc.
|
|
12
|
-
"@cedarjs/testing": "5.0.0-rc.
|
|
9
|
+
"@cedarjs/core": "5.0.0-rc.273",
|
|
10
|
+
"@cedarjs/eslint-config": "5.0.0-rc.273",
|
|
11
|
+
"@cedarjs/project-config": "5.0.0-rc.273",
|
|
12
|
+
"@cedarjs/testing": "5.0.0-rc.273",
|
|
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.0-rc.
|
|
16
|
-
"@cedarjs/router": "5.0.0-rc.
|
|
17
|
-
"@cedarjs/web": "5.0.0-rc.
|
|
15
|
+
"@cedarjs/forms": "5.0.0-rc.273",
|
|
16
|
+
"@cedarjs/router": "5.0.0-rc.273",
|
|
17
|
+
"@cedarjs/web": "5.0.0-rc.273",
|
|
18
18
|
"react": "18.3.1",
|
|
19
19
|
"react-dom": "18.3.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@cedarjs/vite": "5.0.0-rc.
|
|
22
|
+
"@cedarjs/vite": "5.0.0-rc.273",
|
|
23
23
|
"@types/react": "^18.2.55",
|
|
24
24
|
"@types/react-dom": "^18.2.19"
|
|
25
25
|
}
|