create-nextly-app 0.0.2-alpha.41 → 0.0.2-alpha.42
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-DDQB5KOQ.mjs → chunk-OCMWPADZ.mjs} +22 -13
- package/dist/chunk-OCMWPADZ.mjs.map +1 -0
- package/dist/cli.cjs +21 -12
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +20 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
- package/dist/chunk-DDQB5KOQ.mjs.map +0 -1
- package/templates/base/.env.example +0 -16
- package/templates/base/README.md +0 -30
- package/templates/base/eslint.config.mjs +0 -18
- package/templates/base/next.config.ts +0 -15
- package/templates/base/postcss.config.mjs +0 -7
- package/templates/base/public/file.svg +0 -1
- package/templates/base/public/globe.svg +0 -1
- package/templates/base/public/next.svg +0 -1
- package/templates/base/public/vercel.svg +0 -1
- package/templates/base/public/window.svg +0 -1
- package/templates/base/src/app/admin/[[...params]]/layout.tsx +0 -20
- package/templates/base/src/app/admin/[[...params]]/page.tsx +0 -18
- package/templates/base/src/app/admin/api/[[...params]]/route.ts +0 -12
- package/templates/base/src/app/admin/api/media/[[...path]]/route.ts +0 -26
- package/templates/base/src/app/api/health/route.ts +0 -7
- package/templates/base/src/app/api/media/[[...path]]/route.ts +0 -34
- package/templates/base/src/app/favicon.ico +0 -0
- package/templates/base/src/app/globals.css +0 -55
- package/templates/base/src/app/layout.tsx +0 -43
- package/templates/base/src/app/page.tsx +0 -65
- package/templates/base/src/types/generated/.gitkeep +0 -0
- package/templates/base/src/types/generated/nextly-types.ts +0 -12
- package/templates/base/tsconfig.json +0 -36
- package/templates/blank/.env.example +0 -8
- package/templates/blank/README.md +0 -63
- package/templates/blank/nextly.config.ts +0 -14
- package/templates/blank/src/app/(frontend)/components/README.md +0 -10
- package/templates/blank/src/app/(frontend)/components/ThemeToggle.tsx +0 -113
- package/templates/blank/src/app/(frontend)/page.tsx +0 -176
- package/templates/blank/src/app/globals.css +0 -79
- package/templates/blank/src/app/layout.tsx +0 -46
- package/templates/blank/template.json +0 -14
- package/templates/plugin/README.md +0 -44
- package/templates/plugin/dev/.env.example +0 -8
- package/templates/plugin/dev/instrumentation.ts +0 -10
- package/templates/plugin/dev/next.config.ts +0 -30
- package/templates/plugin/dev/nextly.config.ts +0 -17
- package/templates/plugin/dev/src/app/admin/[[...params]]/page.tsx +0 -9
- package/templates/plugin/dev/src/app/admin/api/[[...params]]/route.ts +0 -19
- package/templates/plugin/dev/src/app/layout.tsx +0 -13
- package/templates/plugin/dev/tsconfig.json +0 -22
- package/templates/plugin/eslint.config.mjs +0 -8
- package/templates/plugin/src/admin/SettingsPage.tsx +0 -13
- package/templates/plugin/src/admin/index.ts +0 -21
- package/templates/plugin/src/collections/example.ts +0 -13
- package/templates/plugin/src/index.ts +0 -6
- package/templates/plugin/src/plugin.test.ts +0 -29
- package/templates/plugin/src/plugin.ts +0 -48
- package/templates/plugin/src/types.ts +0 -17
- package/templates/plugin/template.json +0 -14
- package/templates/plugin/tsconfig.json +0 -18
- package/templates/plugin/tsup.config.ts +0 -22
- package/templates/plugin/vitest.config.ts +0 -8
package/dist/index.cjs
CHANGED
|
@@ -21081,6 +21081,10 @@ var PROJECT_TYPES_WITH_FORM_BUILDER = /* @__PURE__ */ new Set([
|
|
|
21081
21081
|
function projectUsesFormBuilder(projectType) {
|
|
21082
21082
|
return PROJECT_TYPES_WITH_FORM_BUILDER.has(projectType);
|
|
21083
21083
|
}
|
|
21084
|
+
var CONTENT_TEMPLATE_TYPES = /* @__PURE__ */ new Set(["blog"]);
|
|
21085
|
+
function templateNextlyChannel(projectType) {
|
|
21086
|
+
return CONTENT_TEMPLATE_TYPES.has(projectType) ? "alpha" : "latest";
|
|
21087
|
+
}
|
|
21084
21088
|
var TEXT_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
21085
21089
|
".ts",
|
|
21086
21090
|
".tsx",
|
|
@@ -21175,29 +21179,32 @@ var NEXTLY_PACKAGES = [
|
|
|
21175
21179
|
"@nextlyhq/plugin-form-builder",
|
|
21176
21180
|
"@nextlyhq/plugin-sdk"
|
|
21177
21181
|
];
|
|
21178
|
-
var resolvedNextlyVersions =
|
|
21179
|
-
async function fetchLatestVersion(pkg) {
|
|
21182
|
+
var resolvedNextlyVersions = /* @__PURE__ */ new Map();
|
|
21183
|
+
async function fetchLatestVersion(pkg, channel = "latest") {
|
|
21180
21184
|
try {
|
|
21181
21185
|
const res = await fetch(
|
|
21182
21186
|
`https://registry.npmjs.org/-/package/${encodeURIComponent(pkg)}/dist-tags`,
|
|
21183
21187
|
{ signal: AbortSignal.timeout(5e3) }
|
|
21184
21188
|
);
|
|
21185
|
-
if (!res.ok) return
|
|
21189
|
+
if (!res.ok) return channel;
|
|
21186
21190
|
const data = await res.json();
|
|
21187
|
-
|
|
21191
|
+
const version = data[channel];
|
|
21192
|
+
return version ? `^${version}` : channel;
|
|
21188
21193
|
} catch {
|
|
21189
|
-
return
|
|
21194
|
+
return channel;
|
|
21190
21195
|
}
|
|
21191
21196
|
}
|
|
21192
|
-
async function resolveNextlyVersions() {
|
|
21193
|
-
|
|
21197
|
+
async function resolveNextlyVersions(channel = "latest") {
|
|
21198
|
+
const cached = resolvedNextlyVersions.get(channel);
|
|
21199
|
+
if (cached) return cached;
|
|
21194
21200
|
const entries = await Promise.all(
|
|
21195
21201
|
NEXTLY_PACKAGES.map(
|
|
21196
|
-
async (pkg) => [pkg, await fetchLatestVersion(pkg)]
|
|
21202
|
+
async (pkg) => [pkg, await fetchLatestVersion(pkg, channel)]
|
|
21197
21203
|
)
|
|
21198
21204
|
);
|
|
21199
|
-
|
|
21200
|
-
|
|
21205
|
+
const versions = Object.fromEntries(entries);
|
|
21206
|
+
resolvedNextlyVersions.set(channel, versions);
|
|
21207
|
+
return versions;
|
|
21201
21208
|
}
|
|
21202
21209
|
var resolvedRuntimeVersions = null;
|
|
21203
21210
|
async function resolveRuntimeVersions() {
|
|
@@ -21228,7 +21235,9 @@ async function generatePackageJson(projectName, database, useYalc = false, proje
|
|
|
21228
21235
|
dependencies["@tanstack/react-query"] = "^5.62.0";
|
|
21229
21236
|
dependencies["lucide-react"] = "^0.544.0";
|
|
21230
21237
|
if (!useYalc) {
|
|
21231
|
-
const versions = await resolveNextlyVersions(
|
|
21238
|
+
const versions = await resolveNextlyVersions(
|
|
21239
|
+
templateNextlyChannel(projectType)
|
|
21240
|
+
);
|
|
21232
21241
|
dependencies["nextly"] = versions["nextly"];
|
|
21233
21242
|
dependencies["@nextlyhq/admin"] = versions["@nextlyhq/admin"];
|
|
21234
21243
|
dependencies["@nextlyhq/ui"] = versions["@nextlyhq/ui"] || "latest";
|