create-nextly-app 0.0.2-alpha.65 → 0.0.2-alpha.67
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/README.md +29 -8
- package/dist/{chunk-I2U7KBH6.mjs → chunk-XCYSH46I.mjs} +36805 -10917
- package/dist/chunk-XCYSH46I.mjs.map +1 -0
- package/dist/cli.cjs +27693 -1892
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +17 -106
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +36591 -10708
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.mjs +1 -1
- package/package.json +18 -7
- package/skills/nextly-authentication/SKILL.md +177 -0
- package/skills/nextly-collections/SKILL.md +215 -0
- package/skills/nextly-deploy/SKILL.md +246 -0
- package/skills/nextly-install/SKILL.md +122 -0
- package/templates/base/.env.example +3 -5
- package/templates/base/AGENTS.md.template +83 -15
- package/templates/base/src/types/generated/nextly-types.ts +6 -4
- package/templates/blank/src/app/(frontend)/components/ThemeToggle.tsx +55 -24
- package/templates/blank/src/instrumentation.ts +27 -0
- package/templates/plugin/AGENTS.md.template +33 -4
- package/templates/plugin/README.md +4 -0
- package/templates/plugin/dev/.env.example +5 -2
- package/templates/plugin/dev/src/app/admin/[[...params]]/page.tsx +14 -2
- package/templates/plugin/dev/src/instrumentation.ts +20 -0
- package/templates/plugin/dev/src/seed-dev-user.ts +51 -0
- package/templates/plugin/gitignore +5 -2
- package/templates/plugin/src/plugin.test.ts +9 -2
- package/templates/plugin/vitest.config.ts +19 -0
- package/dist/chunk-I2U7KBH6.mjs.map +0 -1
- package/templates/plugin/dev/instrumentation.ts +0 -10
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ bun create nextly-app@alpha my-app
|
|
|
30
30
|
The CLI walks you through:
|
|
31
31
|
|
|
32
32
|
1. Project name (or `.` to install in the current directory)
|
|
33
|
-
2. Template (`blank` or `
|
|
33
|
+
2. Template (`blank`, `blog` or `plugin`)
|
|
34
34
|
3. Schema approach (`code-first` or `visual`), only for templates that support both
|
|
35
35
|
4. Database (`sqlite`, `postgresql`, or `mysql`)
|
|
36
36
|
5. Database connection string (skipped for SQLite)
|
|
@@ -39,13 +39,31 @@ After scaffolding, `pnpm dev` runs the project. Visit [http://localhost:3000/adm
|
|
|
39
39
|
|
|
40
40
|
## Templates
|
|
41
41
|
|
|
42
|
-
| Template
|
|
43
|
-
|
|
|
44
|
-
| **blank**
|
|
45
|
-
| **blog**
|
|
42
|
+
| Template | Description |
|
|
43
|
+
| ---------- | ----------------------------------------------------------------------------------- |
|
|
44
|
+
| **blank** | Empty config. Define your own collections from scratch. |
|
|
45
|
+
| **blog** | Posts, categories, tags, frontend pages, RSS, sitemap, and admin-editable homepage. |
|
|
46
|
+
| **plugin** | A publishable Nextly plugin package, with a playground app to try it in. |
|
|
46
47
|
|
|
47
48
|
More templates (portfolio, e-commerce, SaaS admin) are planned.
|
|
48
49
|
|
|
50
|
+
### Plugin template
|
|
51
|
+
|
|
52
|
+
`--template plugin` creates a library to publish on npm rather than an app, so
|
|
53
|
+
it skips the schema-approach and database questions. Run from inside a
|
|
54
|
+
Next.js app, it still creates the plugin in its own directory.
|
|
55
|
+
|
|
56
|
+
- `src/` holds the plugin. Only the built `dist/` is published.
|
|
57
|
+
- `dev/` is a small Nextly app on SQLite that registers the plugin. `pnpm dev`
|
|
58
|
+
runs it, and `/admin` opens signed in as `dev@nextly.local`, a user created
|
|
59
|
+
on first start under `next dev` only.
|
|
60
|
+
- `pnpm test` boots the plugin in an in-memory Nextly; `pnpm build` builds it.
|
|
61
|
+
|
|
62
|
+
By default the plugin is copied from the template bundled in the CLI, and its
|
|
63
|
+
Nextly packages are pinned to that CLI's release, so its files and its
|
|
64
|
+
packages come from the same release. A `--branch` other than `main`,
|
|
65
|
+
`--local-template` or `--use-yalc` uses the live template instead.
|
|
66
|
+
|
|
49
67
|
## Schema approaches
|
|
50
68
|
|
|
51
69
|
| Approach | Description |
|
|
@@ -64,6 +82,9 @@ pnpm create nextly-app@alpha my-blog --template blog --approach code-first
|
|
|
64
82
|
# Blank project with PostgreSQL
|
|
65
83
|
pnpm create nextly-app@alpha my-app --template blank --database postgresql
|
|
66
84
|
|
|
85
|
+
# A plugin package with its playground app
|
|
86
|
+
pnpm create nextly-app@alpha my-plugin --template plugin
|
|
87
|
+
|
|
67
88
|
# Skip prompts entirely (defaults: blank, SQLite, local storage)
|
|
68
89
|
pnpm create nextly-app@alpha my-app -y
|
|
69
90
|
```
|
|
@@ -73,7 +94,7 @@ pnpm create nextly-app@alpha my-app -y
|
|
|
73
94
|
| Flag | Short | Description | Default |
|
|
74
95
|
| ------------------- | ----- | ------------------------------------------------------------ | ------------------ |
|
|
75
96
|
| `--yes` | `-y` | Skip prompts and use defaults (blank, SQLite, local storage) | `false` |
|
|
76
|
-
| `--template <name>` | `-t` | Project template: `blank`, `blog`
|
|
97
|
+
| `--template <name>` | `-t` | Project template: `blank`, `blog`, `plugin` | Interactive prompt |
|
|
77
98
|
| `--approach <type>` | `-a` | Schema approach: `code-first`, `visual` | Interactive prompt |
|
|
78
99
|
| `--database <db>` | `-d` | Database: `sqlite`, `postgresql`, `mysql` | Interactive prompt |
|
|
79
100
|
| `--branch <branch>` | `-b` | Git branch for template download | `main` |
|
|
@@ -122,9 +143,9 @@ Contributions of every size are welcome. Start with the [Contributing guide](htt
|
|
|
122
143
|
|
|
123
144
|
## Telemetry
|
|
124
145
|
|
|
125
|
-
The Nextly CLI (`create-nextly-app` and `nextly`) collects
|
|
146
|
+
The Nextly CLI (`create-nextly-app` and `nextly`) collects usage data under a random ID, to help us improve the tool: never your name, project contents, file paths or secrets. It is off in CI, Docker, production and non-interactive shells, and `nextly telemetry disable` turns it off.
|
|
126
147
|
|
|
127
|
-
See [nextlyhq.com/docs/telemetry](https://nextlyhq.com/docs/telemetry) for the full list of what is and is not collected, and for
|
|
148
|
+
See [nextlyhq.com/docs/telemetry](https://nextlyhq.com/docs/telemetry) for the full list of what is and is not collected, and for the environment variable that also turns it off (`NEXTLY_TELEMETRY_DISABLED=1`).
|
|
128
149
|
|
|
129
150
|
## License
|
|
130
151
|
|