@pplethai/cli 0.2.0 → 0.2.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/package.json
CHANGED
|
@@ -44,7 +44,9 @@ which attach the PPLE ID bearer token. Same origin, so paths are relative
|
|
|
44
44
|
- **Mobile-first.** The app runs in a phone-sized WebView. Use the design
|
|
45
45
|
system's components and the layout classes in `web/app.css`.
|
|
46
46
|
- **Add a DB table** by writing a new `migrations/000N_*.sql` (never edit an
|
|
47
|
-
applied migration) and running `npm run db:migrate:local`.
|
|
47
|
+
applied migration) and running `npm run db:migrate:local`. The platform
|
|
48
|
+
applies `migrations/` to the live database on every deploy, so shipping the
|
|
49
|
+
file is all a deploy needs — there is no remote migrate command to run.
|
|
48
50
|
|
|
49
51
|
## Before you finish
|
|
50
52
|
|
|
@@ -51,7 +51,8 @@ PPLE Today, it signs the real user in via the mini-app SDK.
|
|
|
51
51
|
## Making it yours
|
|
52
52
|
|
|
53
53
|
- **Add a table:** create `migrations/0002_*.sql`, run `npm run db:migrate:local`,
|
|
54
|
-
add queries in `src/db.ts`.
|
|
54
|
+
add queries in `src/db.ts`. Deploying applies it to the live database for you
|
|
55
|
+
— never edit a migration that has already shipped, add another one.
|
|
55
56
|
- **Add an API route:** add it under `/api` in `src/index.ts`.
|
|
56
57
|
- **Change the UI:** edit `web/App.tsx` using `@pplethai/components`.
|
|
57
58
|
- **Send notifications:** the platform provisions `NOTIFY_API_KEY`; the helper
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
-- The example table behind the D1 read/write demo. Replace it with your own
|
|
2
|
-
-- schema: add a new file (0002_add_something.sql, …) and apply it with
|
|
3
|
-
-- `npm run db:migrate:local
|
|
2
|
+
-- schema: add a new file (0002_add_something.sql, …) and apply it locally with
|
|
3
|
+
-- `npm run db:migrate:local`. Deployed databases migrate themselves — the
|
|
4
|
+
-- platform applies everything in this directory on each deploy.
|
|
4
5
|
CREATE TABLE notes (
|
|
5
6
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
6
7
|
body TEXT NOT NULL,
|