@gusto/create-baerly-storage 0.6.0 → 0.7.0

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.
Files changed (37) hide show
  1. package/dist/THIRD-PARTY-LICENSES.txt +204 -0
  2. package/dist/index.js +1537 -145
  3. package/dist/index.js.map +1 -1
  4. package/dist/templates/addons/docker/Dockerfile +13 -11
  5. package/dist/templates/minimal-cloudflare/AGENTS.md +77 -399
  6. package/dist/templates/minimal-cloudflare/README.md +33 -97
  7. package/dist/templates/minimal-cloudflare/package.json +12 -9
  8. package/dist/templates/minimal-cloudflare/pnpm-workspace.yaml +13 -7
  9. package/dist/templates/minimal-cloudflare/tsconfig.app.json +2 -3
  10. package/dist/templates/minimal-cloudflare/tsconfig.worker.json +2 -3
  11. package/dist/templates/minimal-cloudflare/vitest.config.ts +1 -1
  12. package/dist/templates/minimal-cloudflare/wrangler.jsonc +4 -2
  13. package/dist/templates/minimal-node/AGENTS.md +80 -380
  14. package/dist/templates/minimal-node/README.md +37 -135
  15. package/dist/templates/minimal-node/package.json +11 -9
  16. package/dist/templates/minimal-node/pnpm-workspace.yaml +14 -9
  17. package/dist/templates/minimal-node/tsconfig.app.json +2 -3
  18. package/dist/templates/minimal-node/tsconfig.server.json +2 -3
  19. package/dist/templates/react-cloudflare/AGENTS.md +101 -444
  20. package/dist/templates/react-cloudflare/README.md +14 -54
  21. package/dist/templates/react-cloudflare/package.json +18 -15
  22. package/dist/templates/react-cloudflare/pnpm-workspace.yaml +13 -7
  23. package/dist/templates/react-cloudflare/tsconfig.app.json +2 -3
  24. package/dist/templates/react-cloudflare/tsconfig.worker.json +2 -3
  25. package/dist/templates/react-cloudflare/vitest.config.ts +1 -1
  26. package/dist/templates/react-cloudflare/wrangler.jsonc +4 -2
  27. package/dist/templates/react-node/AGENTS.md +108 -474
  28. package/dist/templates/react-node/README.md +35 -125
  29. package/dist/templates/react-node/package.json +16 -14
  30. package/dist/templates/react-node/pnpm-workspace.yaml +14 -9
  31. package/dist/templates/react-node/tsconfig.app.json +2 -3
  32. package/dist/templates/react-node/tsconfig.server.json +2 -3
  33. package/package.json +7 -7
  34. package/dist/templates/minimal-cloudflare/uint8array-base64.d.ts +0 -16
  35. package/dist/templates/minimal-node/uint8array-base64.d.ts +0 -16
  36. package/dist/templates/react-cloudflare/uint8array-base64.d.ts +0 -16
  37. package/dist/templates/react-node/uint8array-base64.d.ts +0 -16
@@ -1,32 +1,14 @@
1
1
  # react-node
2
2
 
3
- A baerly-storage app scaffolded with `@gusto/create-baerly-storage` for
4
- the **Node** target — any host that runs `node server.js` (Railway,
5
- Render, Fly without Docker, Heroku, a VM, a container scheduler, your
6
- laptop). Runs zero-config on local filesystem storage out of the box;
7
- promote to an S3-compatible bucket via `@gusto/baerly-storage/node` for
8
- production. AWS S3 and Cloudflare R2 are the production-supported
9
- targets; MinIO is the local conformance target, and other endpoints
10
- require `baerly doctor --bucket` plus owner validation. Ships
11
- `auth: "none"` so the day-1 happy path works with zero env vars, plus a
12
- React + Vite SPA and a one-collection `notes` schema you extend; flip
13
- to a shared secret or wire `bearerJwt` against your OIDC IdP before
14
- deploy — see "Production auth" below.
15
-
16
- **In production, the S3-compatible bucket is the durable state**
17
- (locally, a `./.baerly-data` directory stands in). The Node process is
18
- trusted app code with bucket credentials; it applies the
19
- baerly-storage protocol, but it is not a database server. No daemon,
20
- lock table, scheduler, or idle database bill; maintenance is automatic
21
- and write-triggered.
22
-
23
- To ship a production Dockerfile alongside, scaffold with
24
- `--with=docker` — the add-on writes a multi-stage distroless Dockerfile,
25
- `.dockerignore`, and `healthcheck.js` into this same shape.
3
+ A baerly-storage app scaffolded with `@gusto/create-baerly-storage` for the **Node** target — any host that runs `node server.js` (Railway, Render, Fly without Docker, Heroku, a VM, a container scheduler, your laptop). Runs zero-config on local filesystem storage out of the box; promote to an S3-compatible bucket via `@gusto/baerly-storage/node` for production. AWS S3 and Cloudflare R2 are the production-supported targets; MinIO is the local conformance target, and other endpoints require `baerly doctor --bucket` plus owner validation. Ships `auth: "none"` so the day-1 happy path works with zero env vars, plus a React + Vite SPA and a one-collection `notes` schema you extend; flip to a shared secret or wire `bearerJwt` against your OIDC IdP before deploy — see "Production auth" below.
4
+
5
+ **In production, the S3-compatible bucket is the durable state** (locally, a `./.baerly-data` directory stands in). The Node process is trusted app code with bucket credentials; it applies the baerly-storage protocol, but it is not a database server. No daemon, lock table, scheduler, or idle database bill; maintenance is automatic and write-triggered.
6
+
7
+ To ship a production Dockerfile alongside, scaffold with `--with=docker` — the add-on writes a multi-stage distroless Dockerfile, `.dockerignore`, and `healthcheck.js` into this same shape.
26
8
 
27
9
  ## What you got
28
10
 
29
- ```
11
+ ```text
30
12
  react-node/
31
13
  ├── package.json # one package, all deps
32
14
  ├── tsconfig.json # project-references stub
@@ -56,30 +38,18 @@ pnpm install
56
38
  pnpm dev
57
39
  ```
58
40
 
59
- `pnpm dev` runs `vite`. `baerlyDev()` from `@gusto/baerly-storage/dev/vite`
60
- mounts the Node HTTP listener as Connect middleware on the same Vite
61
- process that serves the SPA, so `GET /` hits the SPA on
62
- `http://localhost:5173/` and anything baerly-storage handles (e.g.
63
- `GET /v1/healthz`, `POST /v1/c/notes`) is served on the same origin —
64
- one process, one port, SPA + HMR + `/v1/*` in one command. Storage is
65
- `LocalFsStorage` rooted at `.baerly-data/`, so first-touch needs no
66
- S3 creds, no JWKS, and no second process.
41
+ `pnpm dev` runs `vite`. `baerlyDev()` from `@gusto/baerly-storage/dev/vite` mounts the Node HTTP listener as Connect middleware on the same Vite process that serves the SPA, so `GET /` hits the SPA on `http://localhost:5173/` and anything baerly-storage handles (e.g. `GET /v1/healthz`, `POST /v1/c/notes`) is served on the same origin — one process, one port, SPA + HMR + `/v1/*` in one command. Storage is `LocalFsStorage` rooted at `.baerly-data/`, so first-touch needs no S3 creds, no JWKS, and no second process.
67
42
 
68
- Open <http://localhost:5173>. Type a note, hit "Add note." Open a
69
- second tab — inserts, edits, and deletes in one tab appear in the
70
- other over the `/v1/since?collection=notes&cursor=...` long-poll.
43
+ Open <http://localhost:5173>. Type a note, hit "Add note." Open a second tab — inserts, edits, and deletes in one tab appear in the other over the `/v1/since?collection=notes&cursor=...` long-poll.
71
44
 
72
- For production-shaped local runs (the bundled SPA served from
73
- `dist/client/`):
45
+ For production-shaped local runs (the bundled SPA served from `dist/client/`):
74
46
 
75
47
  ```sh
76
48
  pnpm build
77
49
  pnpm start
78
50
  ```
79
51
 
80
- `pnpm start` defaults to `localFsStorage()` (persists to
81
- `./.baerly-data`, zero credentials, single-node only). To opt into
82
- S3 or R2:
52
+ `pnpm start` defaults to `localFsStorage()` (persists to `./.baerly-data`, zero credentials, single-node only). To opt into S3 or R2:
83
53
 
84
54
  ```sh
85
55
  # AWS S3
@@ -89,67 +59,29 @@ BUCKET=... AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... pnpm start
89
59
  R2_ACCOUNT_ID=... BUCKET=... AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... pnpm start
90
60
  ```
91
61
 
92
- The server reads `BUCKET`, `AWS_ACCESS_KEY_ID`,
93
- `AWS_SECRET_ACCESS_KEY` at startup; when those are absent it falls
94
- back to `localFsStorage()` for local runs. **In a detected deployment
95
- (`NODE_ENV=production` or a known PaaS) it refuses to start and requires
96
- a bucket** — local-fs is local-dev only (single-process, no
97
- cross-process CAS or crash durability). The default `auth: "none"`
98
- posture needs no auth env vars; if you adopt Pattern B / C from
99
- "Production auth" below, also set `SHARED_SECRET` (Pattern B) or
100
- `JWKS_URL` + `JWT_ISSUER` + `JWT_AUDIENCE` (Pattern C). Optional:
101
- `AWS_REGION`, `PORT`.
102
-
103
- Maintenance (compaction + GC) is automatic and in-band: it runs
104
- inline on the rare write that crosses a maintenance trigger — no env
105
- var, no tick, no `setInterval`, no operator scheduler. Two ops-plane
106
- env vars tune it: `BAERLY_MAINTENANCE_MAX_FOLD_BYTES` raises the
107
- snapshot ceiling and `BAERLY_MAINTENANCE_DISABLE=1` is a kill switch.
108
- For an explicit out-of-band sweep, call `runScheduledMaintenance`
109
- from `@gusto/baerly-storage`.
110
-
111
- After `pnpm build`, `http://localhost:8080/` serves the built SPA
112
- out of `dist/client/` and `http://localhost:8080/v1/*` is the
113
- baerly-storage HTTP surface — single origin, no CORS.
114
-
115
- `pnpm typecheck` runs `tsc -b --noEmit` across both project
116
- references.
62
+ The server reads `BUCKET`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` at startup; when those are absent it falls back to `localFsStorage()` for local runs. **In a detected deployment (`NODE_ENV=production` or a known PaaS) it refuses to start and requires a bucket** — local-fs is local-dev only (single-process, no cross-process CAS or crash durability). The default `auth: "none"` posture needs no auth env vars; if you adopt Pattern B / C from "Production auth" below, also set `SHARED_SECRET` (Pattern B) or `JWKS_URL` + `JWT_ISSUER` + `JWT_AUDIENCE` (Pattern C). Optional: `AWS_REGION`, `PORT`.
63
+
64
+ Maintenance (compaction + GC) is automatic and in-band: it runs inline on the rare write that crosses a maintenance trigger — no env var, no tick, no `setInterval`, no operator scheduler. Two ops-plane env vars tune it: `BAERLY_MAINTENANCE_MAX_FOLD_BYTES` raises the snapshot ceiling and `BAERLY_MAINTENANCE_DISABLE=1` is a kill switch. For an explicit out-of-band sweep, call `runScheduledMaintenance` from `@gusto/baerly-storage/maintenance`.
65
+
66
+ After `pnpm build`, `http://localhost:8080/` serves the built SPA out of `dist/client/` and `http://localhost:8080/v1/*` is the baerly-storage HTTP surface — single origin, no CORS.
67
+
68
+ `pnpm typecheck` runs `tsc -b --noEmit` across both project references.
117
69
 
118
70
  ## Deploy
119
71
 
120
- This scaffold runs anywhere `node server.js` runs. The `package.json`
121
- exposes `build` (Vite SPA + TS check) and `start`
122
- (`node --experimental-strip-types src/server/index.ts`); arrange your
123
- host to run `pnpm install && pnpm build`, then `pnpm start` with the
124
- storage/auth env vars exported or configured in the process manager.
125
- A deployment must set a durable bucket (`BUCKET` + `AWS_*`, or
126
- `R2_ACCOUNT_ID` + creds); the server fails loud rather than running on
127
- local-fs, which is local-dev only. Self-hosting without a cloud bucket,
128
- run MinIO on the box or use SQLite + Litestream.
72
+ This scaffold runs anywhere `node server.js` runs. The `package.json` exposes `build` (Vite SPA + TS check) and `start` (`node src/server/index.ts`); arrange your host to run `pnpm install && pnpm build`, then `pnpm start` with the storage/auth env vars exported or configured in the process manager. A deployment must set a durable bucket (`BUCKET` + `AWS_*`, or `R2_ACCOUNT_ID` + creds); the server fails loud rather than running on local-fs, which is local-dev only. Self-hosting without a cloud bucket, run MinIO on the box or use SQLite + Litestream.
129
73
 
130
74
  Concrete shapes:
131
75
 
132
- - **Managed PaaS** (Railway, Render, DO App Platform, Fly Machines
133
- without a Dockerfile, Heroku): push the repo to a connected GitHub
134
- repo, set env vars from `.env.example` in the dashboard, deploy.
135
- The platform's buildpack detects Node and runs the root scripts.
136
- - **VM / bare-metal**: clone, install Node 24+, copy `.env.example`
137
- to `.env` as a template, then export those values or configure them
138
- in your process manager (Node does not load `.env` automatically).
139
- Run `pnpm install && pnpm build && pnpm start` under systemd, pm2,
140
- or your process manager of choice.
141
- - **Container** (Docker, k8s, ECS, Fly Machines with a Dockerfile):
142
- scaffold with `pnpm create @gusto/baerly-storage@latest my-app --target=node --with=docker` to add
143
- a production Dockerfile, `.dockerignore`, and `healthcheck.js`
144
- alongside this shape, then `docker build .`.
76
+ - **Managed PaaS** (Railway, Render, DO App Platform, Fly Machines without a Dockerfile, Heroku): push the repo to a connected GitHub repo, set env vars from `.env.example` in the dashboard, deploy. The platform's buildpack detects Node and runs the root scripts.
77
+ - **VM / bare-metal**: clone, install Node 26+, copy `.env.example` to `.env` as a template, then export those values or configure them in your process manager (Node does not load `.env` automatically). Run `pnpm install && pnpm build && pnpm start` under systemd, pm2, or your process manager of choice.
78
+ - **Container** (Docker, k8s, ECS, Fly Machines with a Dockerfile): scaffold with `pnpm create @gusto/baerly-storage@latest my-app --target=node --with=docker` to add a production Dockerfile, `.dockerignore`, and `healthcheck.js` alongside this shape, then `docker build .`.
145
79
 
146
80
  Verify: `curl https://<your-service>/v1/healthz`.
147
81
 
148
82
  ## Extend the schema
149
83
 
150
- Edit `baerly.config.ts`. The `Note` row type is inferred from
151
- `NoteSchema` in the same file — adding a field to the schema
152
- propagates to the UI through `import type { Note }`.
84
+ Edit `baerly.config.ts`. The `Note` row type is inferred from `NoteSchema` in the same file — adding a field to the schema propagates to the UI through `import type { Note }`.
153
85
 
154
86
  ```typescript
155
87
  export const NoteSchema = z.object({
@@ -162,43 +94,24 @@ export const NoteSchema = z.object({
162
94
 
163
95
  ## Production auth
164
96
 
165
- The scaffold ships `auth: "none"` so the day-1 happy path works
166
- with zero env vars; every request resolves to `config.tenant` and
167
- the `NoteSchema` still validates writes server-side. Before deploy,
168
- follow `AGENTS.md` → "Going to production":
169
-
170
- - **Pattern B — `auth: "shared-secret"`.** Single-tenant
171
- server-to-server callers (CI and internal services). Flip
172
- `auth` in `baerly.config.ts` and put `SHARED_SECRET` in
173
- `process.env` (your PaaS / secret manager).
174
- - **Pattern C — JWKS-backed JWT (recommended for multi-tenant).**
175
- Same artifact in dev and prod; the factory `verifier:` override
176
- engages when `JWKS_URL` is set. `bearerJwt()` (re-exported from
177
- `@gusto/baerly-storage/auth`) validates against your IdP's JWKS endpoint
178
- (`https://<issuer>/.well-known/jwks.json`) with `JWT_ISSUER` +
179
- `JWT_AUDIENCE` and pins the tenant from a claim.
97
+ The scaffold ships `auth: "none"` so the day-1 happy path works with zero env vars; every request resolves to `config.tenant` and the `NoteSchema` still validates writes server-side. Before deploy, follow `AGENTS.md` → "Going to production":
98
+
99
+ - **Pattern B — `auth: "shared-secret"`.** Single-tenant server-to-server callers (CI and internal services). Flip `auth` in `baerly.config.ts` and put `SHARED_SECRET` in `process.env` (your PaaS / secret manager).
100
+ - **Pattern C — JWKS-backed JWT (recommended for multi-tenant).** Same artifact in dev and prod; the factory `verifier:` override engages when `JWKS_URL` is set. `bearerJwt()` (re-exported from `@gusto/baerly-storage/auth`) validates against your IdP's JWKS endpoint (`https://<issuer>/.well-known/jwks.json`) with `JWT_ISSUER` + `JWT_AUDIENCE` and pins the tenant from a claim.
180
101
 
181
102
  ## When to graduate
182
103
 
183
- baerly-storage is designed for the small-to-medium operating point.
184
- Past these thresholds, S3 list-prefix latency and per-class operation
185
- pricing starts to dominate, and you've outgrown the workload envelope — move to a database service:
104
+ baerly-storage is designed for the small-to-medium operating point. Past these thresholds, S3 list-prefix latency and per-class operation pricing starts to dominate, and you've outgrown the workload envelope — move to a database service:
105
+
106
+ - **Writes per collection** — per-collection throughput estimate (CAS-livelock model)
107
+ - **Stored bytes per tenant** — R2 free-tier storage cost line (a billing signal, not a protocol ceiling)
108
+ - **Collections per tenant** — soft fan-out guideline (linear cost, bench-grounded; nothing enforces it)
186
109
 
187
- - **~30 writes / minute / collection** — per-collection throughput estimate (CAS-livelock model)
188
- - **>10 GB / tenant** — R2 free-tier storage cost line (a billing signal, not a protocol ceiling)
189
- - **~100 collections / tenant** — soft fan-out guideline (linear cost, bench-grounded; nothing enforces it)
110
+ The figures for each line live in docs/spec/scale-ceilings.md § "The published envelope" in the baerly-storage repo.
190
111
 
191
- When you cross these signals, graduation is mechanical:
192
- `baerly export --target=postgres` walks your log entries (already Debezium-style CDC change events) into a database service. If your
193
- deploy target is Cloudflare Workers and you'll accept Cloudflare
194
- lock-in, [D1](https://developers.cloudflare.com/d1/) is cheaper
195
- per-write at M-size and is a natural next step. If you're on
196
- AWS, on-prem, or want your data portable, managed Postgres is
197
- the typical destination. Either way — graduation is a Baerly win,
198
- not a churn event.
112
+ When you cross these signals, graduation is mechanical: `baerly export --target=postgres` walks your log entries (already Debezium-style CDC change events) into a database service. If your deploy target is Cloudflare Workers and you'll accept Cloudflare lock-in, [D1](https://developers.cloudflare.com/d1/) is cheaper per-write at M-size and is a natural next step. If you're on AWS, on-prem, or want your data portable, managed Postgres is the typical destination. Either way — graduation is a Baerly win, not a churn event.
199
113
 
200
- **Export to a database service** (swap `--target=` for `sqlite`,
201
- `postgres`, or `d1`):
114
+ **Export to a database service** (swap `--target=` for `sqlite`, `postgres`, or `d1`):
202
115
 
203
116
  ```sh
204
117
  baerly export --target=postgres \
@@ -206,10 +119,7 @@ baerly export --target=postgres \
206
119
  --collection=<collection-name> --output=./out.sql
207
120
  ```
208
121
 
209
- The export is a **point-in-time** snapshot and honors any active
210
- schema on the collection. Your data was already in your bucket and
211
- your code is a portable HTTP server, so the graduation doesn't
212
- require vendor cooperation.
122
+ The export is a **point-in-time** snapshot and honors any active schema on the collection. Your data was already in your bucket and your code is a portable HTTP server, so the graduation doesn't require vendor cooperation.
213
123
 
214
124
  ## Pointers
215
125
 
@@ -6,27 +6,29 @@
6
6
  "scripts": {
7
7
  "dev": "vite",
8
8
  "build": "tsc -b && vite build",
9
- "start": "node --experimental-strip-types src/server/index.ts",
9
+ "start": "node src/server/index.ts",
10
10
  "test": "vitest run",
11
11
  "typecheck": "tsc -b --noEmit",
12
12
  "verify": "pnpm run typecheck && pnpm run test"
13
13
  },
14
14
  "dependencies": {
15
15
  "@gusto/baerly-storage": "workspace:*",
16
- "aws4fetch": "1.0.20",
17
- "react": "^19.2.7",
18
- "react-dom": "^19.2.7",
19
- "zod": "^4.4.3"
16
+ "react": "^19.3.1",
17
+ "react-dom": "^19.3.1",
18
+ "zod": "^4.6.7"
20
19
  },
21
20
  "devDependencies": {
22
- "@types/node": "^26.0.1",
23
- "@types/react": "^19.2.17",
24
- "@types/react-dom": "^19.2.3",
25
- "@vitejs/plugin-react": "^6.0.3",
26
- "happy-dom": "^20.10.6",
27
- "typescript": "^6.0.3",
28
- "vite": "^8.1.2",
29
- "vitest": "^4.1.9"
21
+ "@types/node": "^26.6.6",
22
+ "@types/react": "^19.3.0",
23
+ "@types/react-dom": "^19.3.0",
24
+ "@vitejs/plugin-react": "^6.3.0",
25
+ "happy-dom": "^21.0.4",
26
+ "typescript": "^7.0.2",
27
+ "vite": "^8.3.8",
28
+ "vitest": "^5.1.0"
30
29
  },
31
- "packageManager": "pnpm@11.1.2"
30
+ "engines": {
31
+ "node": ">=26"
32
+ },
33
+ "packageManager": "pnpm@12.22.0"
32
34
  }
@@ -1,9 +1,14 @@
1
- # pnpm 11 reads the postinstall-script allowlist only from this
2
- # file: `package.json#pnpm.*` is no longer honoured. Without this
3
- # map, `pnpm install` exits with `ERR_PNPM_IGNORED_BUILDS` for the
4
- # bundler chain below.
5
- #
6
- # `esbuild` ships a working install script we want to run (it
7
- # arrives via vite).
8
- allowBuilds:
9
- esbuild: true
1
+ # No `allowBuilds`: nothing in this dependency tree needs an install
2
+ # script (vite 8 only lists esbuild as an optional peer). pnpm fails the
3
+ # install on any unlisted package that gains one, so a new script is
4
+ # reviewed before it runs, not skipped silently.
5
+
6
+ # Supply-chain guardrails, strict by default — loosen one deliberately:
7
+ # - minimumReleaseAge: don't resolve a version until it has been on
8
+ # the registry a day, closing the publish-then-yank window.
9
+ # - trustPolicy: fail if a package's publishing trust (provenance,
10
+ # trusted publisher) drops below what earlier versions had.
11
+ # - blockExoticSubdeps: only direct deps may come from git or tarballs.
12
+ minimumReleaseAge: 1440
13
+ trustPolicy: no-downgrade
14
+ blockExoticSubdeps: true
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES2024",
4
- "lib": ["ES2024", "DOM", "DOM.Iterable"],
4
+ "lib": ["ES2024", "ESNext.TypedArrays", "ESNext.Collection", "DOM"],
5
5
  "module": "ESNext",
6
6
  "moduleResolution": "bundler",
7
7
  "allowImportingTsExtensions": true,
@@ -19,11 +19,10 @@
19
19
  "isolatedModules": true,
20
20
  "erasableSyntaxOnly": true,
21
21
 
22
- "esModuleInterop": true,
23
22
  "skipLibCheck": true,
24
23
  "jsx": "react-jsx",
25
24
  "types": ["vite/client"],
26
25
  "composite": true
27
26
  },
28
- "include": ["src/web/**/*", "uint8array-base64.d.ts", "baerly.config.ts"]
27
+ "include": ["src/web/**/*", "baerly.config.ts"]
29
28
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES2024",
4
- "lib": ["ES2024", "DOM", "DOM.Iterable"],
4
+ "lib": ["ES2024", "ESNext.TypedArrays", "ESNext.Collection", "DOM"],
5
5
  "module": "ESNext",
6
6
  "moduleResolution": "bundler",
7
7
  "allowImportingTsExtensions": true,
@@ -19,10 +19,9 @@
19
19
  "isolatedModules": true,
20
20
  "erasableSyntaxOnly": true,
21
21
 
22
- "esModuleInterop": true,
23
22
  "skipLibCheck": true,
24
23
  "types": ["node"],
25
24
  "composite": true
26
25
  },
27
- "include": ["src/server/**/*", "uint8array-base64.d.ts", "baerly.config.ts"]
26
+ "include": ["src/server/**/*", "baerly.config.ts"]
28
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gusto/create-baerly-storage",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Create an app with a document database on S3 or Cloudflare R2 — TypeScript scaffold for Workers and Node",
5
5
  "keywords": [
6
6
  "boilerplate",
@@ -34,14 +34,14 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "dependencies": {
38
- "@clack/prompts": "^1.6.0",
39
- "citty": "^0.2.2",
40
- "picocolors": "^1.1.1"
41
- },
42
37
  "devDependencies": {
43
38
  "@baerly/cli": "0.1.0",
44
- "@baerly/server": "0.1.0"
39
+ "@baerly/server": "0.1.0",
40
+ "@clack/prompts": "^1.9.0",
41
+ "citty": "^0.2.2"
42
+ },
43
+ "engines": {
44
+ "node": ">=26"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "rolldown -c"
@@ -1,16 +0,0 @@
1
- /**
2
- * TC39 Stage-4 base64 codec methods — Node 22+, Bun, Workerd. Delete
3
- * when TypeScript accepts `esnext.typedarrays` in `--lib`.
4
- */
5
- interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
6
- toBase64(options?: { alphabet?: "base64" | "base64url"; omitPadding?: boolean }): string;
7
- }
8
- interface Uint8ArrayConstructor {
9
- fromBase64(
10
- input: string,
11
- options?: {
12
- alphabet?: "base64" | "base64url";
13
- lastChunkHandling?: "loose" | "strict" | "stop-before-partial";
14
- },
15
- ): Uint8Array;
16
- }
@@ -1,16 +0,0 @@
1
- /**
2
- * TC39 Stage-4 base64 codec methods — Node 22+, Bun, Workerd. Delete
3
- * when TypeScript accepts `esnext.typedarrays` in `--lib`.
4
- */
5
- interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
6
- toBase64(options?: { alphabet?: "base64" | "base64url"; omitPadding?: boolean }): string;
7
- }
8
- interface Uint8ArrayConstructor {
9
- fromBase64(
10
- input: string,
11
- options?: {
12
- alphabet?: "base64" | "base64url";
13
- lastChunkHandling?: "loose" | "strict" | "stop-before-partial";
14
- },
15
- ): Uint8Array;
16
- }
@@ -1,16 +0,0 @@
1
- /**
2
- * TC39 Stage-4 base64 codec methods — Node 22+, Bun, Workerd. Delete
3
- * when TypeScript accepts `esnext.typedarrays` in `--lib`.
4
- */
5
- interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
6
- toBase64(options?: { alphabet?: "base64" | "base64url"; omitPadding?: boolean }): string;
7
- }
8
- interface Uint8ArrayConstructor {
9
- fromBase64(
10
- input: string,
11
- options?: {
12
- alphabet?: "base64" | "base64url";
13
- lastChunkHandling?: "loose" | "strict" | "stop-before-partial";
14
- },
15
- ): Uint8Array;
16
- }
@@ -1,16 +0,0 @@
1
- /**
2
- * TC39 Stage-4 base64 codec methods — Node 22+, Bun, Workerd. Delete
3
- * when TypeScript accepts `esnext.typedarrays` in `--lib`.
4
- */
5
- interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
6
- toBase64(options?: { alphabet?: "base64" | "base64url"; omitPadding?: boolean }): string;
7
- }
8
- interface Uint8ArrayConstructor {
9
- fromBase64(
10
- input: string,
11
- options?: {
12
- alphabet?: "base64" | "base64url";
13
- lastChunkHandling?: "loose" | "strict" | "stop-before-partial";
14
- },
15
- ): Uint8Array;
16
- }