create-nextly-app 0.0.2-alpha.24 → 0.0.2-alpha.26
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/cli.cjs
CHANGED
|
@@ -6259,7 +6259,7 @@ var require_package = __commonJS({
|
|
|
6259
6259
|
"package.json"(exports$1, module) {
|
|
6260
6260
|
module.exports = {
|
|
6261
6261
|
name: "create-nextly-app",
|
|
6262
|
-
version: "0.0.2-alpha.
|
|
6262
|
+
version: "0.0.2-alpha.26",
|
|
6263
6263
|
description: "CLI to scaffold Nextly in your Next.js project",
|
|
6264
6264
|
license: "MIT",
|
|
6265
6265
|
type: "module",
|
|
@@ -28639,10 +28639,6 @@ async function generatePackageJson(projectName, database, useYalc = false, proje
|
|
|
28639
28639
|
// don't ship a /search page simply won't invoke it.
|
|
28640
28640
|
pagefind: "^1.1.0"
|
|
28641
28641
|
};
|
|
28642
|
-
const onlyBuiltDependencies = ["sharp", "esbuild", "unrs-resolver"];
|
|
28643
|
-
if (database.type === "sqlite") {
|
|
28644
|
-
onlyBuiltDependencies.push("better-sqlite3");
|
|
28645
|
-
}
|
|
28646
28642
|
const pkg2 = {
|
|
28647
28643
|
name: projectName,
|
|
28648
28644
|
version: "0.1.0",
|
|
@@ -28673,13 +28669,35 @@ async function generatePackageJson(projectName, database, useYalc = false, proje
|
|
|
28673
28669
|
"types:generate": "nextly generate:types"
|
|
28674
28670
|
},
|
|
28675
28671
|
dependencies,
|
|
28676
|
-
devDependencies
|
|
28677
|
-
pnpm: {
|
|
28678
|
-
onlyBuiltDependencies
|
|
28679
|
-
}
|
|
28672
|
+
devDependencies
|
|
28680
28673
|
};
|
|
28681
28674
|
return JSON.stringify(pkg2, null, 2) + "\n";
|
|
28682
28675
|
}
|
|
28676
|
+
var NATIVE_BUILD_DEPENDENCIES = [
|
|
28677
|
+
"better-sqlite3",
|
|
28678
|
+
"esbuild",
|
|
28679
|
+
"sharp",
|
|
28680
|
+
"unrs-resolver"
|
|
28681
|
+
];
|
|
28682
|
+
function generatePnpmWorkspaceYaml() {
|
|
28683
|
+
const allowBuilds = NATIVE_BUILD_DEPENDENCIES.map(
|
|
28684
|
+
(dep) => ` ${dep}: true`
|
|
28685
|
+
).join("\n");
|
|
28686
|
+
const onlyBuilt = NATIVE_BUILD_DEPENDENCIES.map((dep) => ` - ${dep}`).join(
|
|
28687
|
+
"\n"
|
|
28688
|
+
);
|
|
28689
|
+
return `# Allow native dependencies to run their build scripts. pnpm 10+ blocks
|
|
28690
|
+
# dependency build scripts by default; without this better-sqlite3 has no
|
|
28691
|
+
# compiled binding (sqlite apps crash at boot) and sharp/esbuild degrade.
|
|
28692
|
+
#
|
|
28693
|
+
# pnpm 11+ reads \`allowBuilds\`; pnpm 10.6+ reads \`onlyBuiltDependencies\`.
|
|
28694
|
+
# npm, yarn, and pnpm 9 ignore this file (they run build scripts by default).
|
|
28695
|
+
allowBuilds:
|
|
28696
|
+
${allowBuilds}
|
|
28697
|
+
onlyBuiltDependencies:
|
|
28698
|
+
${onlyBuilt}
|
|
28699
|
+
`;
|
|
28700
|
+
}
|
|
28683
28701
|
async function copyTemplate(options) {
|
|
28684
28702
|
const {
|
|
28685
28703
|
projectName,
|
|
@@ -28779,6 +28797,11 @@ async function copyTemplate(options) {
|
|
|
28779
28797
|
packageJsonContent,
|
|
28780
28798
|
"utf-8"
|
|
28781
28799
|
);
|
|
28800
|
+
await import_fs_extra8.default.writeFile(
|
|
28801
|
+
path__default.default.join(targetDir, "pnpm-workspace.yaml"),
|
|
28802
|
+
generatePnpmWorkspaceYaml(),
|
|
28803
|
+
"utf-8"
|
|
28804
|
+
);
|
|
28782
28805
|
if (database.type === "sqlite") {
|
|
28783
28806
|
await import_fs_extra8.default.ensureDir(path__default.default.join(targetDir, "data"));
|
|
28784
28807
|
}
|