create-nextly-app 0.0.2-alpha.71 → 0.0.2-alpha.72

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/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_create_nextly = require("./create-nextly-BbKGDrEC.cjs");
2
+ const require_create_nextly = require("./create-nextly-BGu1tXYs.cjs");
3
3
  exports.createNextly = require_create_nextly.createNextly;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { t as createNextly } from "./create-nextly-5wiGMVI6.mjs";
1
+ export { t as createNextly } from "./create-nextly-CyI8XgVc.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nextly-app",
3
- "version": "0.0.2-alpha.71",
3
+ "version": "0.0.2-alpha.72",
4
4
  "description": "CLI to scaffold Nextly in your Next.js project",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -37,10 +37,10 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@babel/types": "^7.29.7",
40
- "@nextlyhq/eslint-plugin": "0.0.2-alpha.71",
41
- "@nextlyhq/module-specifiers": "0.0.2-alpha.71",
42
- "@nextlyhq/telemetry": "0.0.2-alpha.71",
43
- "@nextlyhq/tsconfig": "0.0.2-alpha.71",
40
+ "@nextlyhq/eslint-plugin": "0.0.2-alpha.72",
41
+ "@nextlyhq/module-specifiers": "0.0.2-alpha.72",
42
+ "@nextlyhq/telemetry": "0.0.2-alpha.72",
43
+ "@nextlyhq/tsconfig": "0.0.2-alpha.72",
44
44
  "@testing-library/react": "^16.3.0",
45
45
  "@types/fs-extra": "^11.0.4",
46
46
  "@types/node": "^22.20.5",
@@ -7,7 +7,7 @@ description: >-
7
7
  code, and extra fields on users. Also use when asked to add login or
8
8
  sign-up to a Nextly site, so the answer matches what Nextly provides.
9
9
  metadata:
10
- nextly-version: 0.0.2-alpha.71
10
+ nextly-version: 0.0.2-alpha.72
11
11
  ---
12
12
 
13
13
  # Authentication and access in Nextly
@@ -150,10 +150,10 @@ export async function GET(request: Request) {
150
150
 
151
151
  - The route must live under `/admin`, or the browser never sends the session
152
152
  cookie to it.
153
- - `session.user.roleIds` holds role **IDs**, not role slugs, so
154
- `hasRole(user, "editor")` from `nextly/auth` does not match by slug in this
155
- release. Use `isSuperAdmin(user.id)`, or put role decisions in collection
156
- access rules, where `roles` are slugs.
153
+ - `session.user.roleIds` holds role **IDs**, not role slugs, and `nextly/auth`
154
+ has no role checks. Use `isSuperAdmin(user.id)`, check a permission with
155
+ `nextly.access.check`, or put role decisions in collection access rules,
156
+ where `roles` are slugs.
157
157
 
158
158
  ## Extra fields on users
159
159
 
@@ -9,7 +9,7 @@ description: >-
9
9
  not appear in the admin, a field change does not reach the database, or a
10
10
  page reading content fails to build.
11
11
  metadata:
12
- nextly-version: 0.0.2-alpha.71
12
+ nextly-version: 0.0.2-alpha.72
13
13
  ---
14
14
 
15
15
  # Define a collection in Nextly
@@ -8,7 +8,7 @@ description: >-
8
8
  Also use when a deployed Nextly app has missing tables, refuses to start,
9
9
  or loses uploaded files.
10
10
  metadata:
11
- nextly-version: 0.0.2-alpha.71
11
+ nextly-version: 0.0.2-alpha.72
12
12
  ---
13
13
 
14
14
  # Deploy a Nextly project
@@ -8,7 +8,7 @@ description: >-
8
8
  Nextly install shows no collections, fails to load nextly.config.ts, or its
9
9
  admin panel misbehaves after setup.
10
10
  metadata:
11
- nextly-version: 0.0.2-alpha.71
11
+ nextly-version: 0.0.2-alpha.72
12
12
  ---
13
13
 
14
14
  # Install Nextly into an existing Next.js app
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Local uploads, served at the URLs Nextly gives them.
3
+ *
4
+ * Nextly's default storage writes uploads to `public/uploads` and links them
5
+ * as `/uploads/...`. `next start` serves only the files `public/` held when
6
+ * it started, so without this route a file uploaded since answers 404 until
7
+ * the server restarts. Next.js serves the files it has first; this answers
8
+ * the rest, at the same URLs, and answers 404 when media is kept in cloud
9
+ * storage instead.
10
+ *
11
+ * If you set `baseUrl` on local storage, move this folder to match it.
12
+ */
13
+
14
+ import { createUploadsHandlers } from "nextly/api/uploads";
15
+
16
+ import config from "@nextly-config";
17
+
18
+ const handlers = createUploadsHandlers({ config });
19
+
20
+ export const GET = handlers.GET;
21
+ export const HEAD = handlers.HEAD;