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/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/{create-nextly-BbKGDrEC.cjs → create-nextly-BGu1tXYs.cjs} +139 -31
- package/dist/create-nextly-BGu1tXYs.cjs.map +1 -0
- package/dist/{create-nextly-5wiGMVI6.mjs → create-nextly-CyI8XgVc.mjs} +139 -31
- package/dist/create-nextly-CyI8XgVc.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
- package/skills/nextly-authentication/SKILL.md +5 -5
- package/skills/nextly-collections/SKILL.md +1 -1
- package/skills/nextly-deploy/SKILL.md +1 -1
- package/skills/nextly-install/SKILL.md +1 -1
- package/templates/base/src/app/uploads/[...path]/route.ts +21 -0
- package/dist/create-nextly-5wiGMVI6.mjs.map +0 -1
- package/dist/create-nextly-BbKGDrEC.cjs.map +0 -1
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-
|
|
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-
|
|
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.
|
|
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.
|
|
41
|
-
"@nextlyhq/module-specifiers": "0.0.2-alpha.
|
|
42
|
-
"@nextlyhq/telemetry": "0.0.2-alpha.
|
|
43
|
-
"@nextlyhq/tsconfig": "0.0.2-alpha.
|
|
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.
|
|
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,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
|
|
@@ -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.
|
|
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;
|