create-cedar-app 8.0.0-canary.3521 → 8.0.0-canary.3522
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.3522",
|
|
8
|
+
"@cedarjs/graphql-server": "8.0.0-canary.3522",
|
|
9
9
|
"@prisma/adapter-pg": "7.10.1",
|
|
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.3522",
|
|
8
|
+
"@cedarjs/graphql-server": "8.0.0-canary.3522",
|
|
9
9
|
"@electric-sql/pglite": "^0.5.0",
|
|
10
10
|
"@electric-sql/pglite-socket": "^0.2.0",
|
|
11
11
|
"@prisma/adapter-pg": "7.10.1",
|
package/dist/create-cedar-app.js
CHANGED
|
@@ -545,7 +545,7 @@ ${a}
|
|
|
545
545
|
${n}
|
|
546
546
|
|
|
547
547
|
${a}
|
|
548
|
-
`)}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 ku={name:"create-cedar-app",version:"8.0.0-canary.
|
|
548
|
+
`)}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 ku={name:"create-cedar-app",version:"8.0.0-canary.3522",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.3522","@cedarjs/framework-tools":"8.0.0-canary.3522","@cedarjs/tui":"8.0.0-canary.3522","@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.16","termi-link":"1.1.0",untildify:"4.0.0",uuid:"11.1.1",verkit:"0.5.0",vitest:"4.1.12",yargs:"18.2.0"},engines:{node:">=24"},gitHead:"3905ed045508b861b495f8d5630d76c7a157d8f1"};var vV=ot(J_(),1);xe();xe();var CV=ot(v8(),1),Gm=ot(xd(),1),jm=ot(_4(),1);$s();var OV=ot(T4(),1),bV=ot(y4(),1),nA=ot(yV(),1);var er=[];for(let r=0;r<256;++r)er.push((r+256).toString(16).slice(1));function xV(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 gde}from"crypto";var km=new Uint8Array(256),Vm=km.length;function eA(){return Vm>km.length-16&&(gde(km),Vm=0),km.slice(Vm,Vm+=16)}import{randomUUID as _de}from"crypto";var tA={randomUUID:_de};function Ede(r,e,t){if(tA.randomUUID&&!e&&!r)return tA.randomUUID();r=r||{};let n=r.random??r.rng?.()??eA();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 s=0;s<16;++s)e[t+s]=n[s];return e}return xV(n)}var rA=Ede;var{name:Sde,version:Dde}=ku,Tde="os.type",Ade="os.version",iA,sA,oA,aA=rA();async function PV(){st.setLogger(new Co,Ut.ERROR);let r=JSON.parse(await bV.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 nA.default.cpu(),n=await nA.default.mem(),s;Object.keys(process.env).some(o=>o.startsWith("GITPOD_"))&&(s="gitpod");let i=(0,Gm.defaultResource)().merge((0,Gm.resourceFromAttributes)({[cE]:Sde,[lE]:Dde,[Tde]:r.System?.OS?.split(" ")[0],[Ade]: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":OV.default.isCI,"dev.environment":s,uid:aA}));oA=new CV.OTLPTraceExporter({url:process.env.CEDAR_REDIRECT_TELEMETRY||process.env.REDWOOD_REDIRECT_TELEMETRY||"https://quark.quantumparticle.io/v1/traces"}),sA=new jm.BatchSpanProcessor(oA),iA=new jm.NodeTracerProvider({resource:i,spanProcessors:[sA]}),iA.register(),process.on("SIGTERM",async()=>{await St()})}async function St(){try{hu.trace.getActiveSpan()?.end(),await iA?.shutdown(),await sA?.shutdown(),await oA?.shutdown()}catch(r){(process.env.CEDAR_VERBOSE_TELEMETRY||process.env.REDWOOD_VERBOSE_TELEMETRY)&&console.error("Telemetry: shutdown error",r)}}function Mt(r){hu.trace.getActiveSpan()?.setStatus({code:mi.ERROR,message:String(r).split(`
|
|
549
549
|
`)[0]}),hu.trace.getActiveSpan()?.recordException(r instanceof Error?r:new Error(String(r)))}var Ie=new Dp;var uA="Initial commit";async function IV(r){if(r){let e=r==="."?"the current directory":r;return Ie.drawText(`${Xe.green("\u2714")} Creating your Cedar app in ${e} based on command line argument`),r}try{let e=await Ie.prompt({type:"input",name:"targetDir",message:"Where would you like to create your CedarJS app?",initial:"my-cedar-app"});return/^~\w/.test(e.targetDir)&&(Ie.stopReactive(!0),Ie.displayError("The `~username` syntax is not supported here","Please use the full path or specify the target directory on the command line."),Mt("Target dir prompt path syntax not supported"),await St(),process.exit(1)),(0,vV.default)(e.targetDir)}catch{Mt("User cancelled install at target dir prompt"),await St(),process.exit(1)}}async function MV(r){if(r!==null)return Ie.drawText(`${Xe.green("\u2714")} Using ${r?"TypeScript":"JavaScript"} based on command line flag`),r;try{return(await Ie.prompt({type:"Select",name:"language",choices:["TypeScript","JavaScript"],message:"Select your preferred language",initial:"TypeScript"})).language==="TypeScript"}catch{Mt("User cancelled install at language prompt"),await St(),process.exit(1)}}async function wV(r){if(r!==null)return Ie.drawText(`${Xe.green("\u2714")} ${r?"Will":"Will not"} initialize a git repo based on command line flag`),r;try{return(await Ie.prompt({type:"Toggle",name:"git",message:"Do you want to initialize a git repo?",enabled:"Yes",disabled:"no",initial:"Yes"})).git}catch{Mt("User cancelled install at git prompt"),await St(),process.exit(1)}}async function RV(){try{return(await Ie.prompt({type:"input",name:"targetDirectoryInput",message:"What directory would you like to create the app in?",initial:"my-cedar-app"})).targetDirectoryInput}catch{Mt("User cancelled install at specify a different directory prompt"),await St(),process.exit(1)}}async function LV(r){if(r!==null)return r;try{return(await Ie.prompt({type:"input",name:"commitMessage",message:"Enter a commit message",initial:uA})).commitMessage}catch{Mt("User cancelled install at commit message prompt"),await St(),process.exit(1)}}async function NV(r,e){if(r!==null)return Ie.drawText(`${Xe.green("\u2714")} ${r?"Will":"Will not"} run ${e} install based on command line flag`),r;try{return(await Ie.prompt({type:"Toggle",name:"install",message:`Do you want to run ${e} install?`,enabled:"Yes",disabled:"no",initial:"Yes"})).install}catch{Mt("User cancelled install at install prompt"),await St(),process.exit(1)}}function yde(r){return["yarn","npm","pnpm"].includes(r??"")}function cA(){let e=process.env.npm_config_user_agent?.split(" ")[0]?.split("/")[0];if(e==="yarn"||e==="npm"||e==="pnpm")return e}async function FV(r){if(yde(r))return Ie.drawText(`${Xe.green("\u2714")} Using ${r} based on command line flag`),r;try{let e=cA();return(await Ie.prompt({type:"Select",name:"packageManager",choices:["yarn","npm","pnpm"],message:"Select your preferred package manager",initial:e})).packageManager}catch{Mt("User cancelled install at package manager prompt"),await St(),process.exit(1)}}async function BV(r){let e=["sqlite","pglite","neon-postgres"];return r&&!e.includes(r)&&(Ie.stopReactive(!0),Ie.displayError("Invalid database",`Unknown database "${r}". Supported values: `+e.join(", ")),Mt("Invalid database flag"),await St(),process.exit(1)),r??"sqlite"}var Wc=ot(jV(),1);import The from"node:fs";import Ahe from"node:path";var hA="[a-zA-Z0-9-]",$c=String.raw`0|[1-9]\d*`,qc=String.raw`\d+`,zV=String.raw`\d*[a-zA-Z-]${hA}*`,Nde=String.raw`(${$c})\.(${$c})\.(${$c})`,Fde=String.raw`(${qc})\.(${qc})\.(${qc})`,HV=`(?:${zV}|${$c})`,$V=`(?:${zV}|${qc})`,mA=String.raw`(?:-(${HV}(?:\.${HV})*))`,YV=String.raw`(?:-?(${$V}(?:\.${$V})*))`,qV=`${hA}+`,_s=String.raw`(?:\+(${qV}(?:\.${qV})*))`,gA=`v?${Nde}${mA}?${_s}?`,Qa=String.raw`[v=\s]*${Fde}${YV}?${_s}?`,Es="((?:<|>)?=?)",fA=String.raw`${$c}|x|X|\*`,dA=String.raw`${qc}|x|X|\*`,yo=String.raw`[v=\s]*(${fA})(?:\.(${fA})(?:\.(${fA})(?:${mA})?${_s}?)?)?`,Za=String.raw`[v=\s]*(${dA})(?:\.(${dA})(?:\.(${dA})(?:${YV})?${_s}?)?)?`,qm="(?:~>?)",Wm=String.raw`(?:\^)`,KV=String.raw`(^|[^\d])(\d{1,${16}})(?:\.(\d{1,${16}}))?(?:\.(\d{1,${16}}))?`,$Oe=String.raw`${KV}(?:$|[^\d])`,qOe=String.raw`${KV}(?:${mA})?(?:${_s})?(?:$|[^\d])`;function Bde(r){let e=[[String.raw`\s`,1],[String.raw`\d`,256],[hA,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(Bde(r),e)}var Ude=Bt(`^${gA}$`),Vde=Bt(`^${Qa}$`),kde=/^\d+$/;function _A(r){let e=`${r.major}.${r.minor}.${r.patch}`;return r.prerelease?.length?`${e}-${r.prerelease.join(".")}`:e}function Ao(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?Vde:Ude);if(!t)throw new TypeError(`Invalid version syntax: ${r}`);let n=Number(t[1]),s=Number(t[2]),i=Number(t[3]);if(n>Number.MAX_SAFE_INTEGER||n<0)throw new TypeError(`Invalid major version: ${t[1]}`);if(s>Number.MAX_SAFE_INTEGER||s<0)throw new TypeError(`Invalid minor version: ${t[2]}`);if(i>Number.MAX_SAFE_INTEGER||i<0)throw new TypeError(`Invalid patch version: ${t[3]}`);let o=t[4]?t[4].split(".").map(a=>{if(kde.test(a)){let u=Number(a);if(u>=0&&u<Number.MAX_SAFE_INTEGER)return u}return a}):void 0;return{build:t[5]?.split("."),major:n,minor:s,patch:i,prerelease:o}}function zm(r,e={}){try{return Ao(r,e)}catch{return null}}var WV=/^\d+$/;function XV(r,e){if(typeof r=="number"&&typeof e=="number")return r===e?0:r<e?-1:1;let t=WV.test(String(r)),n=WV.test(String(e)),s=t?Number(r):r,i=n?Number(e):e;return s===i?0:t&&!n?-1:n&&!t?1:s<i?-1:1}function Gde(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 jde(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 s=0;;s++){let i=t?.[s],o=n?.[s];if(i===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(i===void 0)return-1;if(i!==o)return XV(i,o)}}function eu(r,e){return Gde(r,e)||jde(r,e)}function JV(r,e,t={}){return eu(Ao(r,t),Ao(e,t))}function EA(r,e,t={}){return JV(r,e,t)<0}var Hde=Bt(String.raw`^${Es}\s*(${gA})$|^$`),$de=Bt(String.raw`^${Es}\s*(${Qa})$|^$`);function QV(r,e={}){if(typeof r!="string")return r;let t=r.trim().replaceAll(/\s+/g," "),n=t.match(e.loose?$de:Hde);if(!n)throw new TypeError(`Invalid comparator: ${t}`);let s=n[1]==="="?"":n[1]||"",i=n[2]?Ao(n[2],e):null;return{operator:s,options:e,value:i?`${s}${_A(i)}`:"",version:i}}function ZV(r,e){if(!r.version)return!0;let t=eu(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 e6(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 t6(r,e,t){return r.some(n=>!ZV(n,e))?!1:!e.prerelease?.length||!!t.includePrerelease||r.some(n=>e6(n,e))}var Wde=new RegExp(_s,"g"),zde=Bt(_s),Yde=Bt(String.raw`^\s*(${yo})\s+-\s+(${yo})\s*$`),Kde=Bt(String.raw`^\s*(${Za})\s+-\s+(${Za})\s*$`),Xde=Bt(String.raw`(\s*)${Es}\s*(${Qa}|${yo})`,"g"),Jde=Bt(String.raw`(\s*)${qm}\s+`,"g"),Qde=Bt(String.raw`(\s*)${Wm}\s+`,"g"),Zde=Bt(`^${qm}${yo}$`),ehe=Bt(`^${qm}${Za}$`),the=Bt(`^${Wm}${yo}$`),rhe=Bt(`^${Wm}${Za}$`),nhe=Bt(String.raw`^${Es}\s*${yo}$`),ihe=Bt(String.raw`^${Es}\s*${Za}$`),she=Bt(String.raw`(<|>)?=?\s*\*`),ohe=/^\s*>=\s*0\.0\.0\s*$/,ahe=/^\s*>=\s*0\.0\.0-0\s*$/,uhe=Bt(String.raw`^${Es}\s*(${Qa})$|^$`);function jt(r){return!r||String(r).toLowerCase()==="x"||String(r)==="*"}function che(r,e,t){return jt(r)&&!jt(e)||jt(e)&&!!t&&!jt(t)}function lhe(r,e){let t=e.loose?ehe:Zde,n=e.includePrerelease?"-0":"";return r.replace(t,(s,i,o,a,u)=>jt(i)?"":jt(o)?`>=${i}.0.0${n} <${Number(i)+1}.0.0-0`:jt(a)?`>=${i}.${o}.0${n} <${i}.${Number(o)+1}.0-0`:u?`>=${i}.${o}.${a}-${u} <${i}.${Number(o)+1}.0-0`:`>=${i}.${o}.${a} <${i}.${Number(o)+1}.0-0`)}function phe(r,e){return r.trim().split(/\s+/).map(t=>lhe(t,e)).join(" ")}function fhe(r,e){let t=e.loose?rhe:the,n=e.includePrerelease?"-0":"";return r.replace(t,(s,i,o,a,u)=>jt(i)?"":jt(o)?`>=${i}.0.0${n} <${Number(i)+1}.0.0-0`:jt(a)?i==="0"?`>=${i}.${o}.0${n} <${i}.${Number(o)+1}.0-0`:`>=${i}.${o}.0${n} <${Number(i)+1}.0.0-0`:u?i==="0"?o==="0"?`>=${i}.${o}.${a}-${u} <${i}.${o}.${Number(a)+1}-0`:`>=${i}.${o}.${a}-${u} <${i}.${Number(o)+1}.0-0`:`>=${i}.${o}.${a}-${u} <${Number(i)+1}.0.0-0`:i==="0"?o==="0"?`>=${i}.${o}.${a} <${i}.${o}.${Number(a)+1}-0`:`>=${i}.${o}.${a} <${i}.${Number(o)+1}.0-0`:`>=${i}.${o}.${a} <${Number(i)+1}.0.0-0`)}function dhe(r,e){return r.trim().split(/\s+/).map(t=>fhe(t,e)).join(" ")}function hhe(r,e){let t=e.loose?ihe:nhe;return r.trim().replace(t,(n,s,i,o,a)=>{let u=s,c=i,l=o,p=a;if(che(String(c),l===void 0?void 0:String(l),p===void 0?void 0:String(p)))return r;let f=jt(c),d=f||jt(l),h=d||jt(p);if(u==="="&&h&&(u=""),f)return u===">"||u==="<"?"<0.0.0-0":"*";let g=e.includePrerelease?"-0":"";return u&&h?(d&&(l=0),p=0,u===">"?(u=">=",d?(c=Number(c)+1,l=0):l=Number(l)+1):u==="<="&&(u="<",d?c=Number(c)+1:l=Number(l)+1),u==="<"&&(g="-0"),`${u}${c}.${l}.${p}${g}`):d?`>=${c}.0.0${g} <${Number(c)+1}.0.0-0`:h?`>=${c}.${l}.0${g} <${c}.${Number(l)+1}.0-0`:n})}function mhe(r,e){return r.split(/\s+/).map(t=>hhe(t,e)).join(" ")}function ghe(r,e){let t=e.loose?Kde:Yde;return r.replace(t,(n,s,i,o,a,u,c,l,p,f,d,h)=>{let g=s,m=l;return jt(i)?g="":jt(o)?g=`>=${i}.0.0${e.includePrerelease?"-0":""}`:jt(a)?g=`>=${i}.${o}.0${e.includePrerelease?"-0":""}`:u?g=`>=${g}`:g=`>=${g}${e.includePrerelease?"-0":""}`,jt(p)?m="":jt(f)?m=`<${Number(p)+1}.0.0-0`:jt(d)?m=`<${p}.${Number(f)+1}.0-0`:h?m=`<=${p}.${f}.${d}-${h}`:e.includePrerelease?m=`<${p}.${f}.${Number(d)+1}-0`:m=`<=${m}`,`${g} ${m}`.trim()})}function _he(r,e){return mhe(phe(dhe(r.replace(zde,""),e),e),e).trim().replace(she,"")}function Ehe(r,e){let t=ghe(r.replace(Wde,""),e).replace(Xde,"$1$2$3").replace(Jde,"$1~").replace(Qde,"$1^").split(" ").map(s=>_he(s,e)).join(" ").split(/\s+/).map(s=>s.trim().replace(e.includePrerelease?ahe:ohe,""));e.loose&&(t=t.filter(s=>uhe.test(s)));let n=new Map;for(let s of t.map(i=>QV(i,e))){if(s.value==="<0.0.0-0")return[s];n.set(s.value,s)}return n.size>1&&n.delete(""),[...n.values()]}function SA(r,e={}){if(typeof r!="string")return r;let t={...e},n=r.trim().replaceAll(/\s+/g," "),s=n.split("||").map(i=>Ehe(i.trim(),t)).filter(i=>i.length);if(!s.length)throw new TypeError(`Range contains no valid comparator sets: ${n}`);if(s.length>1){let i=s[0];if(s=s.filter(o=>o[0]?.value!=="<0.0.0-0"),!s.length)s=[i];else if(s.length>1){let o=s.find(a=>a.length===1&&a[0]?.value==="");o&&(s=[o])}}return{options:t,sets:s}}function r6(r,e={}){try{return SA(r,e)}catch{return null}}function Ym(r,e){return r.sets.some(t=>t6(t,e,r.options))}function She(r,e){let t=zm(e,r.options);return t?Ym(r,t):!1}function DA(r,e,t={}){let n=r6(e,t);return n?She(n,r):!1}function Dhe(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 TA(r,e={}){let t=SA(r,e),n={major:0,minor:0,patch:0};if(Ym(t,n))return n;let s={...n,prerelease:[0]};if(Ym(t,s))return s;let i=null;for(let o of t.sets){let a=null;for(let u of o){if(!u.version)continue;let c=u.operator===">"?Dhe(u.version):u.operator===""||u.operator===">="?structuredClone(u.version):null;c&&(!a||eu(c,a)>0)&&(a=c)}a&&(!i||eu(i,a)>0)&&(i=a)}return i&&Ym(t,i)?i:null}async function n6(r){let e=new In({mode:"text",content:"Checking node compatibility",spinner:{enabled:!0}});Ie.startReactive(e);let{isSatisfied:t,nodeRange:n}=yhe(r);if(t){e.update({spinner:{enabled:!1},content:`${Xe.green("\u2714")} Compatibility checks passed`}),Ie.stopReactive();return}let s=TA(n);s&&EA(process.version,s)&&(Ie.stopReactive(!0),Ie.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,Wc.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,Wc.terminalLink)("Tutorial - Prerequisites","https://cedarjs.com/docs/tutorial/chapter1/prerequisites",{fallback:()=>"Tutorial - Prerequisites https://cedarjs.com/docs/tutorial/chapter1/prerequisites"})}`].join(`
|
|
550
550
|
`)),Mt("Compatibility checks failed"),await St(),process.exit(1)),Ie.stopReactive(!0),Ie.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,Wc.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,Wc.terminalLink)("Tutorial - Prerequisites","https://cedarjs.com/docs/tutorial/chapter1/prerequisites",{fallback:()=>"Tutorial - Prerequisites https://cedarjs.com/docs/tutorial/chapter1/prerequisites"})}`].join(`
|
|
551
551
|
`));try{(await Ie.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"&&(Mt("User quit after engine check error"),await St(),process.exit(0))}catch{Mt("User cancelled install at engine check error"),await St(),process.exit(1)}}function yhe(r){let t=JSON.parse(The.readFileSync(Ahe.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:DA(process.version,t),nodeRange:t}}function zc(r){return`${r} install`}function AA(r){return r==="npm"?"npx":r}function yA(r){return r==="npm"?"npx":r+" dlx"}function Km(r){return`${AA(r)} cedar`}var s6=ot(J_(),1);import En from"node:fs";import Qn from"node:path";import xA from"node:fs";import xhe from"node:path";async function i6(r,e){let t=zc(e.packageManager),n=Km(e.packageManager),s={"{{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},i=["**/*.{json,md,js,ts,mjs,cjs,yml,yaml}","**/.*/**/*.{json,md,js,ts,mjs,cjs,yml,yaml}","**/.env*"];for(let o of i)for await(let a of xA.promises.glob(o,{cwd:r})){let u=xhe.join(r,a),c=await xA.promises.readFile(u,"utf-8");for(let[l,p]of Object.entries(s))p!==void 0&&(c=c.replaceAll(l,p));await xA.promises.writeFile(u,c,"utf-8")}}async function o6(r,{templateDir:e,templatesDir:t,overwrite:n,packageManager:s,database:i}){let o=r,a=Qn.join(t,"overlays",s),u=new In({mode:"text",content:"Creating project files",spinner:{enabled:!0}});Ie.startReactive(u),o=await CA(o,{overwrite:n}),En.mkdirSync(Qn.dirname(o),{recursive:!0}),await En.promises.cp(e,o,{recursive:!0,force:!0}),await En.promises.cp(a,o,{recursive:!0,force:!0});let c="",l="",p="",f="";if(i==="pglite"){let h=Qn.join(o,"api","prisma.config.cjs");try{await En.promises.unlink(h)}catch{}let g=Qn.join(t,"..","database-overlays","pglite");await En.promises.cp(g,o,{recursive:!0,force:!0})}else if(i==="neon-postgres"){let h=Qn.join(t,"..","database-overlays","neon-postgres");await En.promises.cp(h,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 m=await g.json();if(!m.connection_string||!m.expires_at||!m.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.3522",
|
|
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.3522",
|
|
29
|
+
"@cedarjs/framework-tools": "8.0.0-canary.3522",
|
|
30
|
+
"@cedarjs/tui": "8.0.0-canary.3522",
|
|
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.3522",
|
|
8
|
+
"@cedarjs/graphql-server": "8.0.0-canary.3522",
|
|
9
9
|
"@prisma/adapter-better-sqlite3": "7.10.1",
|
|
10
10
|
"@prisma/client": "7.10.1",
|
|
11
11
|
"better-sqlite3": "12.11.1",
|
|
12
|
-
"@cedarjs/context": "8.0.0-canary.
|
|
12
|
+
"@cedarjs/context": "8.0.0-canary.3522",
|
|
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.3522",
|
|
17
17
|
"vitest": "4.1.12"
|
|
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.3522"
|
|
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.3522",
|
|
20
|
+
"@cedarjs/eslint-config": "8.0.0-canary.3522",
|
|
21
|
+
"@cedarjs/project-config": "8.0.0-canary.3522",
|
|
22
|
+
"@cedarjs/testing": "8.0.0-canary.3522",
|
|
23
23
|
"vitest": "4.1.12"
|
|
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.3522",
|
|
16
|
+
"@cedarjs/router": "8.0.0-canary.3522",
|
|
17
|
+
"@cedarjs/web": "8.0.0-canary.3522",
|
|
18
18
|
"react": "19.3.1",
|
|
19
19
|
"react-dom": "19.3.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@cedarjs/vite": "8.0.0-canary.
|
|
22
|
+
"@cedarjs/vite": "8.0.0-canary.3522",
|
|
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.3522",
|
|
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.3522"
|
|
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.3522",
|
|
20
|
+
"@cedarjs/eslint-config": "8.0.0-canary.3522",
|
|
21
|
+
"@cedarjs/project-config": "8.0.0-canary.3522",
|
|
22
|
+
"@cedarjs/testing": "8.0.0-canary.3522",
|
|
23
23
|
"prisma": "7.10.1",
|
|
24
24
|
"vitest": "4.1.12"
|
|
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.3522"
|
|
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.3522",
|
|
16
|
+
"@cedarjs/eslint-config": "8.0.0-canary.3522",
|
|
17
|
+
"@cedarjs/project-config": "8.0.0-canary.3522",
|
|
18
|
+
"@cedarjs/testing": "8.0.0-canary.3522",
|
|
19
19
|
"prisma": "7.10.1",
|
|
20
20
|
"vitest": "4.1.12"
|
|
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.3522"
|
|
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.3522",
|
|
20
|
+
"@cedarjs/eslint-config": "8.0.0-canary.3522",
|
|
21
|
+
"@cedarjs/project-config": "8.0.0-canary.3522",
|
|
22
|
+
"@cedarjs/testing": "8.0.0-canary.3522",
|
|
23
23
|
"prisma": "7.10.1",
|
|
24
24
|
"vitest": "4.1.12"
|
|
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.3522",
|
|
8
|
+
"@cedarjs/graphql-server": "8.0.0-canary.3522",
|
|
9
9
|
"@prisma/adapter-better-sqlite3": "7.10.1",
|
|
10
10
|
"@prisma/client": "7.10.1",
|
|
11
11
|
"better-sqlite3": "12.11.1",
|
|
12
|
-
"@cedarjs/context": "8.0.0-canary.
|
|
12
|
+
"@cedarjs/context": "8.0.0-canary.3522",
|
|
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.3522",
|
|
17
17
|
"vitest": "4.1.12"
|
|
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.3522"
|
|
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.3522",
|
|
20
|
+
"@cedarjs/eslint-config": "8.0.0-canary.3522",
|
|
21
|
+
"@cedarjs/project-config": "8.0.0-canary.3522",
|
|
22
|
+
"@cedarjs/testing": "8.0.0-canary.3522",
|
|
23
23
|
"vitest": "4.1.12"
|
|
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.3522",
|
|
16
|
+
"@cedarjs/router": "8.0.0-canary.3522",
|
|
17
|
+
"@cedarjs/web": "8.0.0-canary.3522",
|
|
18
18
|
"react": "19.3.1",
|
|
19
19
|
"react-dom": "19.3.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@cedarjs/vite": "8.0.0-canary.
|
|
22
|
+
"@cedarjs/vite": "8.0.0-canary.3522",
|
|
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.3522",
|
|
26
26
|
"@testing-library/jest-dom": "6.9.1",
|
|
27
27
|
"@testing-library/react": "16.3.3",
|
|
28
28
|
"vite": "7.3.7"
|