create-nextly-app 0.0.2-alpha.24 → 0.0.2-alpha.25
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/{chunk-6HFD2Q2U.mjs → chunk-XMNVVIVZ.mjs} +33 -10
- package/dist/chunk-XMNVVIVZ.mjs.map +1 -0
- package/dist/cli.cjs +32 -9
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +31 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-6HFD2Q2U.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -21094,10 +21094,6 @@ async function generatePackageJson(projectName, database, useYalc = false, proje
|
|
|
21094
21094
|
// don't ship a /search page simply won't invoke it.
|
|
21095
21095
|
pagefind: "^1.1.0"
|
|
21096
21096
|
};
|
|
21097
|
-
const onlyBuiltDependencies = ["sharp", "esbuild", "unrs-resolver"];
|
|
21098
|
-
if (database.type === "sqlite") {
|
|
21099
|
-
onlyBuiltDependencies.push("better-sqlite3");
|
|
21100
|
-
}
|
|
21101
21097
|
const pkg = {
|
|
21102
21098
|
name: projectName,
|
|
21103
21099
|
version: "0.1.0",
|
|
@@ -21128,13 +21124,35 @@ async function generatePackageJson(projectName, database, useYalc = false, proje
|
|
|
21128
21124
|
"types:generate": "nextly generate:types"
|
|
21129
21125
|
},
|
|
21130
21126
|
dependencies,
|
|
21131
|
-
devDependencies
|
|
21132
|
-
pnpm: {
|
|
21133
|
-
onlyBuiltDependencies
|
|
21134
|
-
}
|
|
21127
|
+
devDependencies
|
|
21135
21128
|
};
|
|
21136
21129
|
return JSON.stringify(pkg, null, 2) + "\n";
|
|
21137
21130
|
}
|
|
21131
|
+
var NATIVE_BUILD_DEPENDENCIES = [
|
|
21132
|
+
"better-sqlite3",
|
|
21133
|
+
"esbuild",
|
|
21134
|
+
"sharp",
|
|
21135
|
+
"unrs-resolver"
|
|
21136
|
+
];
|
|
21137
|
+
function generatePnpmWorkspaceYaml() {
|
|
21138
|
+
const allowBuilds = NATIVE_BUILD_DEPENDENCIES.map(
|
|
21139
|
+
(dep) => ` ${dep}: true`
|
|
21140
|
+
).join("\n");
|
|
21141
|
+
const onlyBuilt = NATIVE_BUILD_DEPENDENCIES.map((dep) => ` - ${dep}`).join(
|
|
21142
|
+
"\n"
|
|
21143
|
+
);
|
|
21144
|
+
return `# Allow native dependencies to run their build scripts. pnpm 10+ blocks
|
|
21145
|
+
# dependency build scripts by default; without this better-sqlite3 has no
|
|
21146
|
+
# compiled binding (sqlite apps crash at boot) and sharp/esbuild degrade.
|
|
21147
|
+
#
|
|
21148
|
+
# pnpm 11+ reads \`allowBuilds\`; pnpm 10.6+ reads \`onlyBuiltDependencies\`.
|
|
21149
|
+
# npm, yarn, and pnpm 9 ignore this file (they run build scripts by default).
|
|
21150
|
+
allowBuilds:
|
|
21151
|
+
${allowBuilds}
|
|
21152
|
+
onlyBuiltDependencies:
|
|
21153
|
+
${onlyBuilt}
|
|
21154
|
+
`;
|
|
21155
|
+
}
|
|
21138
21156
|
async function copyTemplate(options) {
|
|
21139
21157
|
const {
|
|
21140
21158
|
projectName,
|
|
@@ -21234,6 +21252,11 @@ async function copyTemplate(options) {
|
|
|
21234
21252
|
packageJsonContent,
|
|
21235
21253
|
"utf-8"
|
|
21236
21254
|
);
|
|
21255
|
+
await import_fs_extra8.default.writeFile(
|
|
21256
|
+
path14__default.default.join(targetDir, "pnpm-workspace.yaml"),
|
|
21257
|
+
generatePnpmWorkspaceYaml(),
|
|
21258
|
+
"utf-8"
|
|
21259
|
+
);
|
|
21237
21260
|
if (database.type === "sqlite") {
|
|
21238
21261
|
await import_fs_extra8.default.ensureDir(path14__default.default.join(targetDir, "data"));
|
|
21239
21262
|
}
|