silgi 0.36.10 → 0.36.11
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/dist/cli/build.mjs +2 -2
- package/dist/cli/index.mjs +1 -1
- package/dist/presets/next/preset.mjs +4 -4
- package/package.json +1 -1
package/dist/cli/build.mjs
CHANGED
|
@@ -267,7 +267,7 @@ async function nextJS(silgi, skip = false) {
|
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
for (const prefix of routerPrefixs) {
|
|
270
|
-
const file =
|
|
270
|
+
const file = resolve(silgi.options.srcDir, "app", prefix, "[...all]", "route.ts");
|
|
271
271
|
const fileExists = existsSync(file);
|
|
272
272
|
if (!fileExists) {
|
|
273
273
|
const serverDirName = `@/${silgi.options.silgi.serverDir.split("/src/")[1]}/core`;
|
|
@@ -278,7 +278,7 @@ import { buildSilgi } from '${serverDirName}'
|
|
|
278
278
|
const silgi = await buildSilgi()
|
|
279
279
|
|
|
280
280
|
export const { GET, POST, PUT, DELETE, PATCH } = toNextJsHandler()`;
|
|
281
|
-
writeFile(file, template2, true);
|
|
281
|
+
await writeFile(file, template2, true);
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
}
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { addNPMPackage, defineSilgiPreset } from "silgi/kit";
|
|
2
2
|
const next = defineSilgiPreset(
|
|
3
3
|
{
|
|
4
|
-
// output: {
|
|
5
|
-
// dir: '{{ rootDir }}/.output',
|
|
6
|
-
// publicDir: '{{ output.dir }}/public',
|
|
7
|
-
// },
|
|
8
4
|
serverDir: "{{ rootDir }}/src/server",
|
|
5
|
+
srcDir: "{{ rootDir }}/src",
|
|
6
|
+
build: {
|
|
7
|
+
dir: "{{ rootDir }}/.next"
|
|
8
|
+
},
|
|
9
9
|
envOptions: {
|
|
10
10
|
prefix: "NEXT_",
|
|
11
11
|
altPrefix: "SILGI_"
|