appflare 0.2.34 → 0.2.35
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/cli/generate.ts +1 -2
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.mjs +2 -2
- package/package.json +1 -1
package/cli/generate.ts
CHANGED
|
@@ -181,7 +181,7 @@ export async function generateArtifacts(
|
|
|
181
181
|
return {
|
|
182
182
|
compilerOptions: {
|
|
183
183
|
lib: ["es2024"],
|
|
184
|
-
types: ["@types/node", "
|
|
184
|
+
types: ["@types/node", "@cloudflare/workers-types/2023-07-01"],
|
|
185
185
|
module: "es2022",
|
|
186
186
|
target: "es2024",
|
|
187
187
|
moduleResolution: "bundler",
|
|
@@ -217,7 +217,6 @@ export async function generateArtifacts(
|
|
|
217
217
|
stdout: "inherit",
|
|
218
218
|
stderr: "inherit",
|
|
219
219
|
});
|
|
220
|
-
console.log(process.execPath, tscBin, "-p", configPath, { cwd: outDirAbs });
|
|
221
220
|
const code = await p.exited;
|
|
222
221
|
if (code !== 0) throw new Error(`tsc ${label} failed with exit code ${code}`);
|
|
223
222
|
}
|
package/dist/cli/index.js
CHANGED
|
@@ -8972,10 +8972,10 @@ ${s.join(`
|
|
|
8972
8972
|
`),...zn,...Hn,Bun.write(y,En),Bun.write(m,""),Bun.write(v,jn),Bun.write(N,`${JSON.stringify(Bn,null,2)}
|
|
8973
8973
|
`),Bun.write(Wn,Vn)]),process.stdout.write(`\u{1F4DD} Source artifacts (${(performance.now()-c).toFixed(0)}ms)
|
|
8974
8974
|
`);let H=path.relative(o,y).replace(/\\/g,"/"),Ln=H.startsWith(".")?H:`./${H}`,z=path.relative(o,m).replace(/\\/g,"/"),Un=z.startsWith(".")?z:`./${z}`,le=await Bun.spawn([process.execPath,d,"generate","--config",Ln,"--output",Un,"--yes"],{cwd:o,stdout:"inherit",stderr:"inherit"}).exited;if(le!==0)throw new Error(`better-auth generation failed with exit code ${le}`);process.stdout.write(`\u{1F510} Auth schema (${(performance.now()-c).toFixed(0)}ms)
|
|
8975
|
-
`);function Qn(w={}){return {compilerOptions:{lib:["es2024"],types:["@types/node","
|
|
8975
|
+
`);function Qn(w={}){return {compilerOptions:{lib:["es2024"],types:["@types/node","@cloudflare/workers-types/2023-07-01"],module:"es2022",target:"es2024",moduleResolution:"bundler",strictNullChecks:true,skipLibCheck:true,declaration:true,emitDeclarationOnly:true,noCheck:true,jsx:"react-jsx",paths:{"_generated/*":["./*"]},...w},include:["./*.ts","./client/*.ts"]}}let ce=path.resolve(t,"tsconfig.js.json");await Promise.all([Bun.write(ce,`${JSON.stringify(Qn({declaration:true,emitDeclarationOnly:false}),null,2)}
|
|
8976
8976
|
`)]),process.stdout.write(`\u{1F4C4} TS configs (${(performance.now()-c).toFixed(0)}ms)
|
|
8977
8977
|
`);async function _n(w,A){process.stdout.write(`\u2699\uFE0F ${A}... (${(performance.now()-c).toFixed(0)}ms)
|
|
8978
|
-
`);let
|
|
8978
|
+
`);let S=await Bun.spawn([process.execPath,f,"-p",w],{cwd:t,stdout:"inherit",stderr:"inherit"}).exited;if(S!==0)throw new Error(`tsc ${A} failed with exit code ${S}`)}await _n(ce,"JS files"),process.stdout.write(`\u2705 JS + declarations (${(performance.now()-c).toFixed(0)}ms)
|
|
8979
8979
|
`);async function ue(w){let A=await promises.readdir(w,{withFileTypes:true});for(let T of A){let S=path.join(w,T.name);if(T.isDirectory()){if(T.name==="node_modules"||T.name.startsWith("."))continue;await ue(S);}else T.name.endsWith(".ts")&&!T.name.endsWith(".d.ts")&&await promises.rm(S);}}await ue(t),process.stdout.write(`\u{1F4E6} Cleaned .ts files (${(performance.now()-c).toFixed(0)}ms)
|
|
8980
8980
|
`);let Kn=t+"/";async function de(w){let A=await promises.readdir(w,{withFileTypes:true});for(let T of A){let S=path.join(w,T.name);if(T.isDirectory()){if(T.name==="node_modules"||T.name.startsWith(".")||S===t)continue;await de(S);}else !S.startsWith(Kn)&&(T.name.endsWith(".d.ts")||T.name.endsWith(".js"))&&await promises.rm(S);}}await de(o),process.stdout.write(`\u{1F9F9} Cleanup (${(performance.now()-c).toFixed(0)}ms)
|
|
8981
8981
|
`);let Gn=path.resolve(o,"tsconfig.json");if(e.config.build&&fs.existsSync(Gn)){process.stdout.write(`\u2699\uFE0F Building project... (${(performance.now()-c).toFixed(0)}ms)
|
package/dist/cli/index.mjs
CHANGED
|
@@ -8972,10 +8972,10 @@ ${s.join(`
|
|
|
8972
8972
|
`),...zn,...Hn,Bun.write(y,En),Bun.write(m,""),Bun.write(v,jn),Bun.write(N,`${JSON.stringify(Bn,null,2)}
|
|
8973
8973
|
`),Bun.write(Wn,Vn)]),process.stdout.write(`\u{1F4DD} Source artifacts (${(performance.now()-c).toFixed(0)}ms)
|
|
8974
8974
|
`);let H=relative(o,y).replace(/\\/g,"/"),Ln=H.startsWith(".")?H:`./${H}`,z=relative(o,m).replace(/\\/g,"/"),Un=z.startsWith(".")?z:`./${z}`,le=await Bun.spawn([process.execPath,d,"generate","--config",Ln,"--output",Un,"--yes"],{cwd:o,stdout:"inherit",stderr:"inherit"}).exited;if(le!==0)throw new Error(`better-auth generation failed with exit code ${le}`);process.stdout.write(`\u{1F510} Auth schema (${(performance.now()-c).toFixed(0)}ms)
|
|
8975
|
-
`);function Qn(w={}){return {compilerOptions:{lib:["es2024"],types:["@types/node","
|
|
8975
|
+
`);function Qn(w={}){return {compilerOptions:{lib:["es2024"],types:["@types/node","@cloudflare/workers-types/2023-07-01"],module:"es2022",target:"es2024",moduleResolution:"bundler",strictNullChecks:true,skipLibCheck:true,declaration:true,emitDeclarationOnly:true,noCheck:true,jsx:"react-jsx",paths:{"_generated/*":["./*"]},...w},include:["./*.ts","./client/*.ts"]}}let ce=resolve(t,"tsconfig.js.json");await Promise.all([Bun.write(ce,`${JSON.stringify(Qn({declaration:true,emitDeclarationOnly:false}),null,2)}
|
|
8976
8976
|
`)]),process.stdout.write(`\u{1F4C4} TS configs (${(performance.now()-c).toFixed(0)}ms)
|
|
8977
8977
|
`);async function _n(w,A){process.stdout.write(`\u2699\uFE0F ${A}... (${(performance.now()-c).toFixed(0)}ms)
|
|
8978
|
-
`);let
|
|
8978
|
+
`);let S=await Bun.spawn([process.execPath,f,"-p",w],{cwd:t,stdout:"inherit",stderr:"inherit"}).exited;if(S!==0)throw new Error(`tsc ${A} failed with exit code ${S}`)}await _n(ce,"JS files"),process.stdout.write(`\u2705 JS + declarations (${(performance.now()-c).toFixed(0)}ms)
|
|
8979
8979
|
`);async function ue(w){let A=await readdir(w,{withFileTypes:true});for(let T of A){let S=join(w,T.name);if(T.isDirectory()){if(T.name==="node_modules"||T.name.startsWith("."))continue;await ue(S);}else T.name.endsWith(".ts")&&!T.name.endsWith(".d.ts")&&await rm(S);}}await ue(t),process.stdout.write(`\u{1F4E6} Cleaned .ts files (${(performance.now()-c).toFixed(0)}ms)
|
|
8980
8980
|
`);let Kn=t+"/";async function de(w){let A=await readdir(w,{withFileTypes:true});for(let T of A){let S=join(w,T.name);if(T.isDirectory()){if(T.name==="node_modules"||T.name.startsWith(".")||S===t)continue;await de(S);}else !S.startsWith(Kn)&&(T.name.endsWith(".d.ts")||T.name.endsWith(".js"))&&await rm(S);}}await de(o),process.stdout.write(`\u{1F9F9} Cleanup (${(performance.now()-c).toFixed(0)}ms)
|
|
8981
8981
|
`);let Gn=resolve(o,"tsconfig.json");if(e.config.build&&existsSync(Gn)){process.stdout.write(`\u2699\uFE0F Building project... (${(performance.now()-c).toFixed(0)}ms)
|