@flaredev/cli 0.5.1 → 0.6.1
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 +59 -47
- package/dist/index.js +368 -146
- package/package.json +2 -2
- package/templates/app/app/dashboard/actions.ts +1 -1
- package/templates/app/app/dashboard/error.tsx +37 -0
- package/templates/app/app/dashboard/import-actions.ts +1 -1
- package/templates/app/app/dashboard/loading.tsx +18 -0
- package/templates/app/app/dashboard/not-found.tsx +30 -0
- package/templates/app/app/error.tsx +55 -0
- package/templates/app/app/loading.tsx +22 -0
- package/templates/app/app/not-found.tsx +48 -0
- package/templates/app/components/dashboard/fields/file-cell.tsx +68 -0
- package/templates/app/components/dashboard/record-detail.tsx +4 -0
- package/templates/app/components/dashboard/resource-table.tsx +6 -1
- package/templates/app/components/dashboard/skeletons.tsx +146 -0
- package/templates/app/lib/api.ts +1 -1
- package/templates/app/lib/cache.ts +83 -83
- package/templates/app/lib/dashboard.ts +2 -2
- package/templates/app/lib/resource/drizzle-rows.ts +134 -0
- package/templates/app/lib/resource/handlers.ts +157 -0
- package/templates/app/lib/resource/index.ts +14 -0
- package/templates/app/lib/resource/query.ts +149 -0
- package/templates/app/lib/resource/rows.ts +66 -0
- package/templates/app/lib/resource/store.ts +342 -0
- package/templates/next/app/dashboard/actions.ts +1 -1
- package/templates/next/lib/dashboard.ts +1 -1
- package/templates/next/lib/resource/index.ts +14 -0
- package/templates/next/lib/resource/prisma-rows.ts +169 -0
package/README.md
CHANGED
|
@@ -1,47 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Or
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
flare
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://flare-docs.codetotech.com/banner.png" alt="Flare — the full-stack framework for Cloudflare and Next.js" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# @flaredev/cli
|
|
6
|
+
|
|
7
|
+
The `flare` command for [Flare](https://flare-docs.codetotech.com), a
|
|
8
|
+
batteries-included fullstack framework. It scaffolds apps, generates resources
|
|
9
|
+
with an admin dashboard and REST API, runs migrations and deploys.
|
|
10
|
+
|
|
11
|
+
Apps run on one of two stacks, chosen once at `flare create`:
|
|
12
|
+
|
|
13
|
+
- **Cloudflare** — vinext on Workers, D1 and Drizzle, Better Auth, R2.
|
|
14
|
+
- **Next.js** — Next.js 16 on Vercel, Postgres and Prisma, Better Auth, R2.
|
|
15
|
+
|
|
16
|
+
The descriptors, validators, policies, REST API and dashboard are the same on
|
|
17
|
+
both. [Choosing a stack](https://flare-docs.codetotech.com/start/stacks/) is the
|
|
18
|
+
comparison, including what each one can't do.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install -g @flaredev/cli # or: pnpm add -g @flaredev/cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or with the install scripts (they check for Node.js 22+ and use npm or pnpm):
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
# macOS / Linux
|
|
30
|
+
curl -fsSL https://flare-docs.codetotech.com/install.sh | bash
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```powershell
|
|
34
|
+
# Windows PowerShell
|
|
35
|
+
irm https://flare-docs.codetotech.com/install.ps1 | iex
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or skip the install entirely:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
npm create flare-framework@latest my-app
|
|
42
|
+
npx @flaredev/cli create my-app
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Use
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
flare create shop
|
|
49
|
+
cd shop
|
|
50
|
+
flare gen resource Product --fields 'name:string, price:int, sku:string!'
|
|
51
|
+
flare migrate
|
|
52
|
+
flare dev
|
|
53
|
+
flare deploy
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Run `flare --help` for every command, or read the
|
|
57
|
+
[CLI reference](https://flare-docs.codetotech.com/reference/cli/).
|
|
58
|
+
|
|
59
|
+
Requires Node.js 22 or later.
|