create-cedar-app 8.0.0-canary.3421 → 8.0.0-canary.3422
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 -4
- package/templates/js/api/package.json +4 -4
- package/templates/js/package.json +5 -5
- package/templates/js/web/package.json +5 -5
- package/templates/overlays/npm/package.json +5 -5
- package/templates/overlays/pnpm/package.json +5 -5
- package/templates/overlays/yarn/package.json +5 -5
- package/templates/ts/api/package.json +4 -4
- package/templates/ts/package.json +5 -5
- package/templates/ts/web/package.json +5 -5
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@cedarjs/api": "8.0.0-canary.
|
|
8
|
-
"@cedarjs/graphql-server": "8.0.0-canary.
|
|
7
|
+
"@cedarjs/api": "8.0.0-canary.3422",
|
|
8
|
+
"@cedarjs/graphql-server": "8.0.0-canary.3422",
|
|
9
9
|
"@prisma/adapter-pg": "7.10.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": "8.0.0-canary.
|
|
8
|
-
"@cedarjs/graphql-server": "8.0.0-canary.
|
|
7
|
+
"@cedarjs/api": "8.0.0-canary.3422",
|
|
8
|
+
"@cedarjs/graphql-server": "8.0.0-canary.3422",
|
|
9
9
|
"@electric-sql/pglite": "^0.5.0",
|
|
10
10
|
"@electric-sql/pglite-socket": "^0.2.0",
|
|
11
11
|
"@prisma/adapter-pg": "7.10.0",
|
package/dist/create-cedar-app.js
CHANGED
|
@@ -532,7 +532,7 @@ ${a}
|
|
|
532
532
|
${n}
|
|
533
533
|
|
|
534
534
|
${a}
|
|
535
|
-
`)}displayError(e,t){let n=`\u26A0 Error: ${e}`;this.drawFencedText("red",n,t)}displayWarning(e,t){let n=`\u26A0 Warning: ${e}`;this.drawFencedText("yellow",n,t)}};var Yc={name:"create-cedar-app",version:"8.0.0-canary.
|
|
535
|
+
`)}displayError(e,t){let n=`\u26A0 Error: ${e}`;this.drawFencedText("red",n,t)}displayWarning(e,t){let n=`\u26A0 Warning: ${e}`;this.drawFencedText("yellow",n,t)}};var Yc={name:"create-cedar-app",version:"8.0.0-canary.3422",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 generateLockfile","test:e2e":"vitest --pool=forks run e2e","ts-to-js":"yarn node ./scripts/tsToJS.js"},devDependencies:{"@cedarjs/cli-helpers":"8.0.0-canary.3422","@cedarjs/framework-tools":"8.0.0-canary.3422","@cedarjs/tui":"8.0.0-canary.3422","@opentelemetry/api":"1.9.1","@opentelemetry/exporter-trace-otlp-http":"0.223.0","@opentelemetry/resources":"2.12.0","@opentelemetry/sdk-trace-node":"2.12.0","@opentelemetry/semantic-conventions":"1.43.0","@types/klaw-sync":"6.0.5",ansis:"4.4.0","ci-info":"4.4.0",envinfo:"7.21.0",execa:"5.1.1","gradient-string":"3.0.0","klaw-sync":"7.0.0",systeminformation:"5.33.15","termi-link":"1.1.0",untildify:"4.0.0",uuid:"11.1.1",verkit:"0.5.0",vitest:"4.1.11",yargs:"17.7.3"},engines:{node:">=24"},gitHead:"3905ed045508b861b495f8d5630d76c7a157d8f1"};var hk=dt(EE(),1);xe();xe();var lk=dt(hV(),1),Xm=dt(Rd(),1),Jm=dt(r4(),1);ki();var pk=dt(o4(),1),fk=dt(c4(),1),bA=dt(ck(),1);var er=[];for(let r=0;r<256;++r)er.push((r+256).toString(16).slice(1));function uk(r,e=0){return(er[r[e+0]]+er[r[e+1]]+er[r[e+2]]+er[r[e+3]]+"-"+er[r[e+4]]+er[r[e+5]]+"-"+er[r[e+6]]+er[r[e+7]]+"-"+er[r[e+8]]+er[r[e+9]]+"-"+er[r[e+10]]+er[r[e+11]]+er[r[e+12]]+er[r[e+13]]+er[r[e+14]]+er[r[e+15]]).toLowerCase()}import{randomFillSync as dhe}from"crypto";var Km=new Uint8Array(256),Ym=Km.length;function yA(){return Ym>Km.length-16&&(dhe(Km),Ym=0),Km.slice(Ym,Ym+=16)}import{randomUUID as hhe}from"crypto";var AA={randomUUID:hhe};function mhe(r,e,t){if(AA.randomUUID&&!e&&!r)return AA.randomUUID();r=r||{};let n=r.random??r.rng?.()??yA();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[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 i=0;i<16;++i)e[t+i]=n[i];return e}return uk(n)}var xA=mhe;var{name:ghe,version:_he}=Yc,Ehe="os.type",She="os.version",OA,CA,DA,PA=xA();async function dk(){ct.setLogger(new yo,Ft.ERROR);let r=JSON.parse(await fk.default.run({System:["OS","Shell"],Binaries:["Node","Yarn","npm"],npmPackages:"@cedarjs/*",IDEs:["VSCode"]},{json:!0})),e=r.System?.Shell;e?.path?.match("/")?r.System.Shell.name=r.System.Shell.path.split("/").pop():e?.path.match("\\")&&(r.System.Shell.name=r.System.Shell.path.split("\\").pop());let t=await bA.default.cpu(),n=await bA.default.mem(),i;Object.keys(process.env).some(o=>o.startsWith("GITPOD_"))&&(i="gitpod");let s=(0,Xm.defaultResource)().merge((0,Xm.resourceFromAttributes)({[ME]:ghe,[wE]:_he,[Ehe]:r.System?.OS?.split(" ")[0],[She]:r.System?.OS?.split(" ")[1],"shell.name":r.System?.Shell?.name,"node.version":r.Binaries?.Node?.version,"yarn.version":r.Binaries?.Yarn?.version,"npm.version":r.Binaries?.npm?.version,"vscode.version":r.IDEs?.VSCode?.version,"cpu.count":t.physicalCores,"memory.gb":Math.round(n.total/1073741824),"env.node_env":process.env.NODE_ENV||void 0,"ci.redwood":!!process.env.CEDAR_CI,"ci.isci":pk.default.isCI,"dev.environment":i,uid:PA}));DA=new lk.OTLPTraceExporter({url:process.env.CEDAR_REDIRECT_TELEMETRY||process.env.REDWOOD_REDIRECT_TELEMETRY||"https://quark.quantumparticle.io/v1/traces"}),CA=new Jm.BatchSpanProcessor(DA),OA=new Jm.NodeTracerProvider({resource:s,spanProcessors:[CA]}),OA.register(),process.on("SIGTERM",async()=>{await Tt()})}async function Tt(){try{mc.trace.getActiveSpan()?.end(),await OA?.shutdown(),await CA?.shutdown(),await DA?.shutdown()}catch(r){(process.env.CEDAR_VERBOSE_TELEMETRY||process.env.REDWOOD_VERBOSE_TELEMETRY)&&console.error("Telemetry: shutdown error",r)}}function wt(r){mc.trace.getActiveSpan()?.setStatus({code:_s.ERROR,message:String(r).split(`
|
|
536
536
|
`)[0]}),mc.trace.getActiveSpan()?.recordException(r instanceof Error?r:new Error(String(r)))}var we=new vp;var vA="Initial commit";async function mk(r){if(r){let e=r==="."?"the current directory":r;return we.drawText(`${et.green("\u2714")} Creating your Cedar app in ${e} based on command line argument`),r}try{let e=await we.prompt({type:"input",name:"targetDir",message:"Where would you like to create your CedarJS app?",initial:"my-cedar-app"});return/^~\w/.test(e.targetDir)&&(we.stopReactive(!0),we.displayError("The `~username` syntax is not supported here","Please use the full path or specify the target directory on the command line."),wt("Target dir prompt path syntax not supported"),await Tt(),process.exit(1)),(0,hk.default)(e.targetDir)}catch{wt("User cancelled install at target dir prompt"),await Tt(),process.exit(1)}}async function gk(r){if(r!==null)return we.drawText(`${et.green("\u2714")} Using ${r?"TypeScript":"JavaScript"} based on command line flag`),r;try{return(await we.prompt({type:"Select",name:"language",choices:["TypeScript","JavaScript"],message:"Select your preferred language",initial:"TypeScript"})).language==="TypeScript"}catch{wt("User cancelled install at language prompt"),await Tt(),process.exit(1)}}async function _k(r){if(r!==null)return we.drawText(`${et.green("\u2714")} ${r?"Will":"Will not"} initialize a git repo based on command line flag`),r;try{return(await we.prompt({type:"Toggle",name:"git",message:"Do you want to initialize a git repo?",enabled:"Yes",disabled:"no",initial:"Yes"})).git}catch{wt("User cancelled install at git prompt"),await Tt(),process.exit(1)}}async function Ek(){try{return(await we.prompt({type:"input",name:"targetDirectoryInput",message:"What directory would you like to create the app in?",initial:"my-cedar-app"})).targetDirectoryInput}catch{wt("User cancelled install at specify a different directory prompt"),await Tt(),process.exit(1)}}async function Sk(r){if(r!==null)return r;try{return(await we.prompt({type:"input",name:"commitMessage",message:"Enter a commit message",initial:vA})).commitMessage}catch{wt("User cancelled install at commit message prompt"),await Tt(),process.exit(1)}}async function Tk(r,e){if(r!==null)return we.drawText(`${et.green("\u2714")} ${r?"Will":"Will not"} run ${e} install based on command line flag`),r;try{return(await we.prompt({type:"Toggle",name:"install",message:`Do you want to run ${e} install?`,enabled:"Yes",disabled:"no",initial:"Yes"})).install}catch{wt("User cancelled install at install prompt"),await Tt(),process.exit(1)}}function The(r){return["yarn","npm","pnpm"].includes(r??"")}function MA(){let e=process.env.npm_config_user_agent?.split(" ")[0]?.split("/")[0];if(e==="yarn"||e==="npm"||e==="pnpm")return e}async function yk(r){if(The(r))return we.drawText(`${et.green("\u2714")} Using ${r} based on command line flag`),r;try{let e=MA();return(await we.prompt({type:"Select",name:"packageManager",choices:["yarn","npm","pnpm"],message:"Select your preferred package manager",initial:e})).packageManager}catch{wt("User cancelled install at package manager prompt"),await Tt(),process.exit(1)}}async function Ak(r){let e=["sqlite","pglite","neon-postgres"];return r&&!e.includes(r)&&(we.stopReactive(!0),we.displayError("Invalid database",`Unknown database "${r}". Supported values: `+e.join(", ")),wt("Invalid database flag"),await Tt(),process.exit(1)),r??"sqlite"}var el=dt(Dk(),1);import Eme from"node:fs";import Sme from"node:path";var NA="[a-zA-Z0-9-]",Qu=String.raw`0|[1-9]\d*`,Zu=String.raw`\d+`,Ik=String.raw`\d*[a-zA-Z-]${NA}*`,Ihe=String.raw`(${Qu})\.(${Qu})\.(${Qu})`,Rhe=String.raw`(${Zu})\.(${Zu})\.(${Zu})`,Pk=`(?:${Ik}|${Qu})`,vk=`(?:${Ik}|${Zu})`,BA=String.raw`(?:-(${Pk}(?:\.${Pk})*))`,Rk=String.raw`(?:-?(${vk}(?:\.${vk})*))`,Mk=`${NA}+`,gi=String.raw`(?:\+(${Mk}(?:\.${Mk})*))`,FA=`v?${Ihe}${BA}?${gi}?`,Za=String.raw`[v=\s]*${Rhe}${Rk}?${gi}?`,_i="((?:<|>)?=?)",RA=String.raw`${Qu}|x|X|\*`,LA=String.raw`${Zu}|x|X|\*`,So=String.raw`[v=\s]*(${RA})(?:\.(${RA})(?:\.(${RA})(?:${BA})?${gi}?)?)?`,ec=String.raw`[v=\s]*(${LA})(?:\.(${LA})(?:\.(${LA})(?:${Rk})?${gi}?)?)?`,e0="(?:~>?)",t0=String.raw`(?:\^)`,Lk=String.raw`(^|[^\d])(\d{1,${16}})(?:\.(\d{1,${16}}))?(?:\.(\d{1,${16}}))?`,OCe=String.raw`${Lk}(?:$|[^\d])`,CCe=String.raw`${Lk}(?:${BA})?(?:${gi})?(?:$|[^\d])`;function Lhe(r){let e=[[String.raw`\s`,1],[String.raw`\d`,256],[NA,250]];for(let[t,n]of e)r=r.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return r}function Bt(r,e){return new RegExp(Lhe(r),e)}var Nhe=Bt(`^${FA}$`),Bhe=Bt(`^${Za}$`),Fhe=/^\d+$/;function UA(r){let e=`${r.major}.${r.minor}.${r.patch}`;return r.prerelease?.length?`${e}-${r.prerelease.join(".")}`:e}function Eo(r,e={}){if(typeof r!="string")return r;if(r.length>256)throw new TypeError("Version exceeds the maximum length of 256 characters");let t=r.trim().match(e.loose?Bhe:Nhe);if(!t)throw new TypeError(`Invalid version syntax: ${r}`);let n=Number(t[1]),i=Number(t[2]),s=Number(t[3]);if(n>Number.MAX_SAFE_INTEGER||n<0)throw new TypeError(`Invalid major version: ${t[1]}`);if(i>Number.MAX_SAFE_INTEGER||i<0)throw new TypeError(`Invalid minor version: ${t[2]}`);if(s>Number.MAX_SAFE_INTEGER||s<0)throw new TypeError(`Invalid patch version: ${t[3]}`);let o=t[4]?t[4].split(".").map(a=>{if(Fhe.test(a)){let c=Number(a);if(c>=0&&c<Number.MAX_SAFE_INTEGER)return c}return a}):void 0;return{build:t[5]?.split("."),major:n,minor:i,patch:s,prerelease:o}}function r0(r,e={}){try{return Eo(r,e)}catch{return null}}var wk=/^\d+$/;function Nk(r,e){if(typeof r=="number"&&typeof e=="number")return r===e?0:r<e?-1:1;let t=wk.test(String(r)),n=wk.test(String(e)),i=t?Number(r):r,s=n?Number(e):e;return i===s?0:t&&!n?-1:n&&!t?1:i<s?-1:1}function Uhe(r,e){return r.major===e.major?r.minor===e.minor?r.patch===e.patch?0:r.patch<e.patch?-1:1:r.minor<e.minor?-1:1:r.major<e.major?-1:1}function Vhe(r,e){let t=r.prerelease,n=e.prerelease;if(t?.length&&!n?.length)return-1;if(!t?.length&&n?.length)return 1;if(!t?.length&&!n?.length)return 0;for(let i=0;;i++){let s=t?.[i],o=n?.[i];if(s===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(s===void 0)return-1;if(s!==o)return Nk(s,o)}}function tc(r,e){return Uhe(r,e)||Vhe(r,e)}function Bk(r,e,t={}){return tc(Eo(r,t),Eo(e,t))}function VA(r,e,t={}){return Bk(r,e,t)<0}var khe=Bt(String.raw`^${_i}\s*(${FA})$|^$`),Ghe=Bt(String.raw`^${_i}\s*(${Za})$|^$`);function Fk(r,e={}){if(typeof r!="string")return r;let t=r.trim().replaceAll(/\s+/g," "),n=t.match(e.loose?Ghe:khe);if(!n)throw new TypeError(`Invalid comparator: ${t}`);let i=n[1]==="="?"":n[1]||"",s=n[2]?Eo(n[2],e):null;return{operator:i,options:e,value:s?`${i}${UA(s)}`:"",version:s}}function Uk(r,e){if(!r.version)return!0;let t=tc(e,r.version);switch(r.operator){case"":return t===0;case">":return t>0;case">=":return t>=0;case"<":return t<0;case"<=":return t<=0}}function Vk(r,e){let t=r.version;return t!==null&&!!t.prerelease?.length&&t.major===e.major&&t.minor===e.minor&&t.patch===e.patch}function kk(r,e,t){return r.some(n=>!Uk(n,e))?!1:!e.prerelease?.length||!!t.includePrerelease||r.some(n=>Vk(n,e))}var Hhe=new RegExp(gi,"g"),$he=Bt(gi),qhe=Bt(String.raw`^\s*(${So})\s+-\s+(${So})\s*$`),Whe=Bt(String.raw`^\s*(${ec})\s+-\s+(${ec})\s*$`),zhe=Bt(String.raw`(\s*)${_i}\s*(${Za}|${So})`,"g"),Yhe=Bt(String.raw`(\s*)${e0}\s+`,"g"),Khe=Bt(String.raw`(\s*)${t0}\s+`,"g"),Xhe=Bt(`^${e0}${So}$`),Jhe=Bt(`^${e0}${ec}$`),Qhe=Bt(`^${t0}${So}$`),Zhe=Bt(`^${t0}${ec}$`),eme=Bt(String.raw`^${_i}\s*${So}$`),tme=Bt(String.raw`^${_i}\s*${ec}$`),rme=Bt(String.raw`(<|>)?=?\s*\*`),nme=/^\s*>=\s*0\.0\.0\s*$/,sme=/^\s*>=\s*0\.0\.0-0\s*$/,ime=Bt(String.raw`^${_i}\s*(${Za})$|^$`);function Gt(r){return!r||String(r).toLowerCase()==="x"||String(r)==="*"}function ome(r,e,t){return Gt(r)&&!Gt(e)||Gt(e)&&!!t&&!Gt(t)}function ame(r,e){let t=e.loose?Jhe:Xhe,n=e.includePrerelease?"-0":"";return r.replace(t,(i,s,o,a,c)=>Gt(s)?"":Gt(o)?`>=${s}.0.0${n} <${Number(s)+1}.0.0-0`:Gt(a)?`>=${s}.${o}.0${n} <${s}.${Number(o)+1}.0-0`:c?`>=${s}.${o}.${a}-${c} <${s}.${Number(o)+1}.0-0`:`>=${s}.${o}.${a} <${s}.${Number(o)+1}.0-0`)}function cme(r,e){return r.trim().split(/\s+/).map(t=>ame(t,e)).join(" ")}function ume(r,e){let t=e.loose?Zhe:Qhe,n=e.includePrerelease?"-0":"";return r.replace(t,(i,s,o,a,c)=>Gt(s)?"":Gt(o)?`>=${s}.0.0${n} <${Number(s)+1}.0.0-0`:Gt(a)?s==="0"?`>=${s}.${o}.0${n} <${s}.${Number(o)+1}.0-0`:`>=${s}.${o}.0${n} <${Number(s)+1}.0.0-0`:c?s==="0"?o==="0"?`>=${s}.${o}.${a}-${c} <${s}.${o}.${Number(a)+1}-0`:`>=${s}.${o}.${a}-${c} <${s}.${Number(o)+1}.0-0`:`>=${s}.${o}.${a}-${c} <${Number(s)+1}.0.0-0`:s==="0"?o==="0"?`>=${s}.${o}.${a} <${s}.${o}.${Number(a)+1}-0`:`>=${s}.${o}.${a} <${s}.${Number(o)+1}.0-0`:`>=${s}.${o}.${a} <${Number(s)+1}.0.0-0`)}function lme(r,e){return r.trim().split(/\s+/).map(t=>ume(t,e)).join(" ")}function pme(r,e){let t=e.loose?tme:eme;return r.trim().replace(t,(n,i,s,o,a)=>{let c=i,u=s,l=o,p=a;if(ome(String(u),l===void 0?void 0:String(l),p===void 0?void 0:String(p)))return r;let f=Gt(u),h=f||Gt(l),m=h||Gt(p);if(c==="="&&m&&(c=""),f)return c===">"||c==="<"?"<0.0.0-0":"*";let g=e.includePrerelease?"-0":"";return c&&m?(h&&(l=0),p=0,c===">"?(c=">=",h?(u=Number(u)+1,l=0):l=Number(l)+1):c==="<="&&(c="<",h?u=Number(u)+1:l=Number(l)+1),c==="<"&&(g="-0"),`${c}${u}.${l}.${p}${g}`):h?`>=${u}.0.0${g} <${Number(u)+1}.0.0-0`:m?`>=${u}.${l}.0${g} <${u}.${Number(l)+1}.0-0`:n})}function fme(r,e){return r.split(/\s+/).map(t=>pme(t,e)).join(" ")}function dme(r,e){let t=e.loose?Whe:qhe;return r.replace(t,(n,i,s,o,a,c,u,l,p,f,h,m)=>{let g=i,d=l;return Gt(s)?g="":Gt(o)?g=`>=${s}.0.0${e.includePrerelease?"-0":""}`:Gt(a)?g=`>=${s}.${o}.0${e.includePrerelease?"-0":""}`:c?g=`>=${g}`:g=`>=${g}${e.includePrerelease?"-0":""}`,Gt(p)?d="":Gt(f)?d=`<${Number(p)+1}.0.0-0`:Gt(h)?d=`<${p}.${Number(f)+1}.0-0`:m?d=`<=${p}.${f}.${h}-${m}`:e.includePrerelease?d=`<${p}.${f}.${Number(h)+1}-0`:d=`<=${d}`,`${g} ${d}`.trim()})}function hme(r,e){return fme(cme(lme(r.replace($he,""),e),e),e).trim().replace(rme,"")}function mme(r,e){let t=dme(r.replace(Hhe,""),e).replace(zhe,"$1$2$3").replace(Yhe,"$1~").replace(Khe,"$1^").split(" ").map(i=>hme(i,e)).join(" ").split(/\s+/).map(i=>i.trim().replace(e.includePrerelease?sme:nme,""));e.loose&&(t=t.filter(i=>ime.test(i)));let n=new Map;for(let i of t.map(s=>Fk(s,e))){if(i.value==="<0.0.0-0")return[i];n.set(i.value,i)}return n.size>1&&n.delete(""),[...n.values()]}function kA(r,e={}){if(typeof r!="string")return r;let t={...e},n=r.trim().replaceAll(/\s+/g," "),i=n.split("||").map(s=>mme(s.trim(),t)).filter(s=>s.length);if(!i.length)throw new TypeError(`Range contains no valid comparator sets: ${n}`);if(i.length>1){let s=i[0];if(i=i.filter(o=>o[0]?.value!=="<0.0.0-0"),!i.length)i=[s];else if(i.length>1){let o=i.find(a=>a.length===1&&a[0]?.value==="");o&&(i=[o])}}return{options:t,sets:i}}function Gk(r,e={}){try{return kA(r,e)}catch{return null}}function n0(r,e){return r.sets.some(t=>kk(t,e,r.options))}function gme(r,e){let t=r0(e,r.options);return t?n0(r,t):!1}function GA(r,e,t={}){let n=Gk(e,t);return n?gme(n,r):!1}function _me(r){let{prerelease:e}=r;return e?.length?{major:r.major,minor:r.minor,patch:r.patch,prerelease:[...e,0]}:{major:r.major,minor:r.minor,patch:r.patch+1}}function jA(r,e={}){let t=kA(r,e),n={major:0,minor:0,patch:0};if(n0(t,n))return n;let i={...n,prerelease:[0]};if(n0(t,i))return i;let s=null;for(let o of t.sets){let a=null;for(let c of o){if(!c.version)continue;let u=c.operator===">"?_me(c.version):c.operator===""||c.operator===">="?structuredClone(c.version):null;u&&(!a||tc(u,a)>0)&&(a=u)}a&&(!s||tc(s,a)>0)&&(s=a)}return s&&n0(t,s)?s:null}async function jk(r){let e=new In({mode:"text",content:"Checking node compatibility",spinner:{enabled:!0}});we.startReactive(e);let{isSatisfied:t,nodeRange:n}=Tme(r);if(t){e.update({spinner:{enabled:!1},content:`${et.green("\u2714")} Compatibility checks passed`}),we.stopReactive();return}let i=jA(n);i&&VA(process.version,i)&&(we.stopReactive(!0),we.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 ${n}.`,""," Please use tools like nvm or corepack to change to a compatible version.",` See: ${(0,el.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,el.terminalLink)("Tutorial - Prerequisites","https://cedarjs.com/docs/tutorial/chapter1/prerequisites",{fallback:()=>"Tutorial - Prerequisites https://cedarjs.com/docs/tutorial/chapter1/prerequisites"})}`].join(`
|
|
537
537
|
`)),wt("Compatibility checks failed"),await Tt(),process.exit(1)),we.stopReactive(!0),we.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 ${n}.`,""," 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,el.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,el.terminalLink)("Tutorial - Prerequisites","https://cedarjs.com/docs/tutorial/chapter1/prerequisites",{fallback:()=>"Tutorial - Prerequisites https://cedarjs.com/docs/tutorial/chapter1/prerequisites"})}`].join(`
|
|
538
538
|
`));try{(await we.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"&&(wt("User quit after engine check error"),await Tt(),process.exit(0))}catch{wt("User cancelled install at engine check error"),await Tt(),process.exit(1)}}function Tme(r){let t=JSON.parse(Eme.readFileSync(Sme.join(r,"package.json"),"utf-8"))?.engines?.node;if(typeof t!="string")throw new Error("Invalid node engine version range in package.json");return{isSatisfied:GA(process.version,t),nodeRange:t}}function tl(r){return`${r} install`}function HA(r){return r==="npm"?"npx":r}function $A(r){return r==="npm"?"npx":r+" dlx"}function s0(r){return`${HA(r)} cedar`}var $k=dt(EE(),1);import yn from"node:fs";import es from"node:path";import qA from"node:fs";import yme from"node:path";async function Hk(r,e){let t=tl(e.packageManager),n=s0(e.packageManager),i={"{{PM}}":e.packageManager,"{{PM_INSTALL}}":t,"{{CEDAR_CLI}}":n,"{{DATABASE_URL}}":e.databaseUrl,"{{DIRECT_DATABASE_URL}}":e.directDatabaseUrl,"{{NEON_CLAIM_EXPIRY}}":e.neonClaimExpiry,"{{NEON_CLAIM_URL}}":e.neonClaimUrl},s=["**/*.{json,md,js,ts,mjs,cjs,yml,yaml}","**/.*/**/*.{json,md,js,ts,mjs,cjs,yml,yaml}","**/.env*"];for(let o of s)for await(let a of qA.promises.glob(o,{cwd:r})){let c=yme.join(r,a),u=await qA.promises.readFile(c,"utf-8");for(let[l,p]of Object.entries(i))p!==void 0&&(u=u.replaceAll(l,p));await qA.promises.writeFile(c,u,"utf-8")}}async function qk(r,{templateDir:e,templatesDir:t,overwrite:n,packageManager:i,database:s}){let o=r,a=es.join(t,"overlays",i),c=new In({mode:"text",content:"Creating project files",spinner:{enabled:!0}});we.startReactive(c),o=await WA(o,{overwrite:n}),yn.mkdirSync(es.dirname(o),{recursive:!0}),await yn.promises.cp(e,o,{recursive:!0,force:!0}),await yn.promises.cp(a,o,{recursive:!0,force:!0});let u="",l="",p="",f="";if(s==="pglite"){let m=es.join(o,"api","prisma.config.cjs");try{await yn.promises.unlink(m)}catch{}let g=es.join(t,"..","database-overlays","pglite");await yn.promises.cp(g,o,{recursive:!0,force:!0})}else if(s==="neon-postgres"){let m=es.join(t,"..","database-overlays","neon-postgres");await yn.promises.cp(m,o,{recursive:!0,force:!0});try{let g=await fetch("https://neon.new/api/v1/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ref:"cedarjs"})});if(!g.ok)throw new Error(`Neon API returned ${g.status} ${g.statusText}`);let d=await g.json();if(!d.connection_string||!d.expires_at||!d.claim_url)throw new Error(`Neon API returned an invalid response
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cedar-app",
|
|
3
|
-
"version": "8.0.0-canary.
|
|
3
|
+
"version": "8.0.0-canary.3422",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"ts-to-js": "yarn node ./scripts/tsToJS.js"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@cedarjs/cli-helpers": "8.0.0-canary.
|
|
29
|
-
"@cedarjs/framework-tools": "8.0.0-canary.
|
|
30
|
-
"@cedarjs/tui": "8.0.0-canary.
|
|
28
|
+
"@cedarjs/cli-helpers": "8.0.0-canary.3422",
|
|
29
|
+
"@cedarjs/framework-tools": "8.0.0-canary.3422",
|
|
30
|
+
"@cedarjs/tui": "8.0.0-canary.3422",
|
|
31
31
|
"@opentelemetry/api": "1.9.1",
|
|
32
32
|
"@opentelemetry/exporter-trace-otlp-http": "0.223.0",
|
|
33
33
|
"@opentelemetry/resources": "2.12.0",
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@cedarjs/api": "8.0.0-canary.
|
|
8
|
-
"@cedarjs/graphql-server": "8.0.0-canary.
|
|
7
|
+
"@cedarjs/api": "8.0.0-canary.3422",
|
|
8
|
+
"@cedarjs/graphql-server": "8.0.0-canary.3422",
|
|
9
9
|
"@prisma/adapter-better-sqlite3": "7.10.0",
|
|
10
10
|
"@prisma/client": "7.10.0",
|
|
11
11
|
"better-sqlite3": "12.11.1",
|
|
12
|
-
"@cedarjs/context": "8.0.0-canary.
|
|
12
|
+
"@cedarjs/context": "8.0.0-canary.3422",
|
|
13
13
|
"graphql-tag": "2.12.7"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@cedarjs/vite": "8.0.0-canary.
|
|
16
|
+
"@cedarjs/vite": "8.0.0-canary.3422",
|
|
17
17
|
"vitest": "4.1.11"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"start:web": "cedarjs-server web"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@cedarjs/api-server": "8.0.0-canary.
|
|
16
|
+
"@cedarjs/api-server": "8.0.0-canary.3422"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@cedarjs/core": "8.0.0-canary.
|
|
20
|
-
"@cedarjs/eslint-config": "8.0.0-canary.
|
|
21
|
-
"@cedarjs/project-config": "8.0.0-canary.
|
|
22
|
-
"@cedarjs/testing": "8.0.0-canary.
|
|
19
|
+
"@cedarjs/core": "8.0.0-canary.3422",
|
|
20
|
+
"@cedarjs/eslint-config": "8.0.0-canary.3422",
|
|
21
|
+
"@cedarjs/project-config": "8.0.0-canary.3422",
|
|
22
|
+
"@cedarjs/testing": "8.0.0-canary.3422",
|
|
23
23
|
"vitest": "4.1.11"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@cedarjs/forms": "8.0.0-canary.
|
|
16
|
-
"@cedarjs/router": "8.0.0-canary.
|
|
17
|
-
"@cedarjs/web": "8.0.0-canary.
|
|
15
|
+
"@cedarjs/forms": "8.0.0-canary.3422",
|
|
16
|
+
"@cedarjs/router": "8.0.0-canary.3422",
|
|
17
|
+
"@cedarjs/web": "8.0.0-canary.3422",
|
|
18
18
|
"react": "19.3.0",
|
|
19
19
|
"react-dom": "19.3.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@cedarjs/vite": "8.0.0-canary.
|
|
22
|
+
"@cedarjs/vite": "8.0.0-canary.3422",
|
|
23
23
|
"@types/react": "^19.2.0",
|
|
24
24
|
"@types/react-dom": "^19.2.0",
|
|
25
|
-
"@cedarjs/testing": "8.0.0-canary.
|
|
25
|
+
"@cedarjs/testing": "8.0.0-canary.3422",
|
|
26
26
|
"@testing-library/jest-dom": "6.9.1",
|
|
27
27
|
"@testing-library/react": "16.3.3",
|
|
28
28
|
"vite": "7.3.7"
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"start:web": "cedarjs-server web"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@cedarjs/api-server": "8.0.0-canary.
|
|
16
|
+
"@cedarjs/api-server": "8.0.0-canary.3422"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@cedarjs/core": "8.0.0-canary.
|
|
20
|
-
"@cedarjs/eslint-config": "8.0.0-canary.
|
|
21
|
-
"@cedarjs/project-config": "8.0.0-canary.
|
|
22
|
-
"@cedarjs/testing": "8.0.0-canary.
|
|
19
|
+
"@cedarjs/core": "8.0.0-canary.3422",
|
|
20
|
+
"@cedarjs/eslint-config": "8.0.0-canary.3422",
|
|
21
|
+
"@cedarjs/project-config": "8.0.0-canary.3422",
|
|
22
|
+
"@cedarjs/testing": "8.0.0-canary.3422",
|
|
23
23
|
"prisma": "7.10.0",
|
|
24
24
|
"vitest": "4.1.11"
|
|
25
25
|
},
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"start:web": "cedarjs-server web"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@cedarjs/api-server": "8.0.0-canary.
|
|
12
|
+
"@cedarjs/api-server": "8.0.0-canary.3422"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@cedarjs/core": "8.0.0-canary.
|
|
16
|
-
"@cedarjs/eslint-config": "8.0.0-canary.
|
|
17
|
-
"@cedarjs/project-config": "8.0.0-canary.
|
|
18
|
-
"@cedarjs/testing": "8.0.0-canary.
|
|
15
|
+
"@cedarjs/core": "8.0.0-canary.3422",
|
|
16
|
+
"@cedarjs/eslint-config": "8.0.0-canary.3422",
|
|
17
|
+
"@cedarjs/project-config": "8.0.0-canary.3422",
|
|
18
|
+
"@cedarjs/testing": "8.0.0-canary.3422",
|
|
19
19
|
"prisma": "7.10.0",
|
|
20
20
|
"vitest": "4.1.11"
|
|
21
21
|
},
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"start:web": "cedarjs-server web"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@cedarjs/api-server": "8.0.0-canary.
|
|
16
|
+
"@cedarjs/api-server": "8.0.0-canary.3422"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@cedarjs/core": "8.0.0-canary.
|
|
20
|
-
"@cedarjs/eslint-config": "8.0.0-canary.
|
|
21
|
-
"@cedarjs/project-config": "8.0.0-canary.
|
|
22
|
-
"@cedarjs/testing": "8.0.0-canary.
|
|
19
|
+
"@cedarjs/core": "8.0.0-canary.3422",
|
|
20
|
+
"@cedarjs/eslint-config": "8.0.0-canary.3422",
|
|
21
|
+
"@cedarjs/project-config": "8.0.0-canary.3422",
|
|
22
|
+
"@cedarjs/testing": "8.0.0-canary.3422",
|
|
23
23
|
"prisma": "7.10.0",
|
|
24
24
|
"vitest": "4.1.11"
|
|
25
25
|
},
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@cedarjs/api": "8.0.0-canary.
|
|
8
|
-
"@cedarjs/graphql-server": "8.0.0-canary.
|
|
7
|
+
"@cedarjs/api": "8.0.0-canary.3422",
|
|
8
|
+
"@cedarjs/graphql-server": "8.0.0-canary.3422",
|
|
9
9
|
"@prisma/adapter-better-sqlite3": "7.10.0",
|
|
10
10
|
"@prisma/client": "7.10.0",
|
|
11
11
|
"better-sqlite3": "12.11.1",
|
|
12
|
-
"@cedarjs/context": "8.0.0-canary.
|
|
12
|
+
"@cedarjs/context": "8.0.0-canary.3422",
|
|
13
13
|
"graphql-tag": "2.12.7"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@cedarjs/vite": "8.0.0-canary.
|
|
16
|
+
"@cedarjs/vite": "8.0.0-canary.3422",
|
|
17
17
|
"vitest": "4.1.11"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"start:web": "cedarjs-server web"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@cedarjs/api-server": "8.0.0-canary.
|
|
16
|
+
"@cedarjs/api-server": "8.0.0-canary.3422"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@cedarjs/core": "8.0.0-canary.
|
|
20
|
-
"@cedarjs/eslint-config": "8.0.0-canary.
|
|
21
|
-
"@cedarjs/project-config": "8.0.0-canary.
|
|
22
|
-
"@cedarjs/testing": "8.0.0-canary.
|
|
19
|
+
"@cedarjs/core": "8.0.0-canary.3422",
|
|
20
|
+
"@cedarjs/eslint-config": "8.0.0-canary.3422",
|
|
21
|
+
"@cedarjs/project-config": "8.0.0-canary.3422",
|
|
22
|
+
"@cedarjs/testing": "8.0.0-canary.3422",
|
|
23
23
|
"vitest": "4.1.11"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@cedarjs/forms": "8.0.0-canary.
|
|
16
|
-
"@cedarjs/router": "8.0.0-canary.
|
|
17
|
-
"@cedarjs/web": "8.0.0-canary.
|
|
15
|
+
"@cedarjs/forms": "8.0.0-canary.3422",
|
|
16
|
+
"@cedarjs/router": "8.0.0-canary.3422",
|
|
17
|
+
"@cedarjs/web": "8.0.0-canary.3422",
|
|
18
18
|
"react": "19.3.0",
|
|
19
19
|
"react-dom": "19.3.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@cedarjs/vite": "8.0.0-canary.
|
|
22
|
+
"@cedarjs/vite": "8.0.0-canary.3422",
|
|
23
23
|
"@types/react": "^19.2.0",
|
|
24
24
|
"@types/react-dom": "^19.2.0",
|
|
25
|
-
"@cedarjs/testing": "8.0.0-canary.
|
|
25
|
+
"@cedarjs/testing": "8.0.0-canary.3422",
|
|
26
26
|
"@testing-library/jest-dom": "6.9.1",
|
|
27
27
|
"@testing-library/react": "16.3.3",
|
|
28
28
|
"vite": "7.3.7"
|