create-runlot 0.1.0-rc.78 → 0.1.0-rc.80
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/index.js +33 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -135,6 +135,10 @@ function nextReadme(name) {
|
|
|
135
135
|
"The deploy reads the `database`, `auth` and `storage` declarations in `runlot.json`",
|
|
136
136
|
"and creates Postgres, authentication and object storage. The App Router itself runs",
|
|
137
137
|
"on workerd (OpenNext).",
|
|
138
|
+
"",
|
|
139
|
+
"`npm run dev` is `next dev` \u2014 the fast UI loop, without runlot's bindings.",
|
|
140
|
+
"`npm run preview` is `runlot dev`: it builds through OpenNext and serves the result",
|
|
141
|
+
"under workerd with the bindings wired up, which is where you check what will ship.",
|
|
138
142
|
""
|
|
139
143
|
].join("\n");
|
|
140
144
|
}
|
|
@@ -152,7 +156,11 @@ function nextTemplate(ctx) {
|
|
|
152
156
|
version: "0.0.0",
|
|
153
157
|
private: true,
|
|
154
158
|
scripts: {
|
|
159
|
+
// `dev` stays `next dev`: for a Next project the UI loop is the thing you
|
|
160
|
+
// run all day, and `runlot dev` has to rebuild through OpenNext on every
|
|
161
|
+
// change. `preview` is the one that runs what will actually ship.
|
|
155
162
|
dev: "next dev",
|
|
163
|
+
preview: "runlot dev",
|
|
156
164
|
build: "next build",
|
|
157
165
|
start: "next start"
|
|
158
166
|
},
|
|
@@ -162,8 +170,8 @@ function nextTemplate(ctx) {
|
|
|
162
170
|
"react-dom": "^19.2.8",
|
|
163
171
|
// The npm job in release.yml rewrites the version range with the same
|
|
164
172
|
// number as the tag — the value written here is the last published version.
|
|
165
|
-
"@runlot/next": "^0.1.0-rc.
|
|
166
|
-
"@runlot/pg": "^0.1.0-rc.
|
|
173
|
+
"@runlot/next": "^0.1.0-rc.80",
|
|
174
|
+
"@runlot/pg": "^0.1.0-rc.80"
|
|
167
175
|
},
|
|
168
176
|
devDependencies: {
|
|
169
177
|
typescript: "^5.7.2",
|
|
@@ -184,7 +192,7 @@ function nextTemplate(ctx) {
|
|
|
184
192
|
// runlot deploy writes the generated OpenNext configuration into
|
|
185
193
|
// `.runlot-next` (docs/nextjs.md §2) — it is not source, so it is not
|
|
186
194
|
// something to commit.
|
|
187
|
-
".gitignore": "node_modules\n.next\n.open-next\n.runlot-next\n",
|
|
195
|
+
".gitignore": "node_modules\n.next\n.open-next\n.runlot-next\n.runlot\n.env.runlot\n",
|
|
188
196
|
"README.md": nextReadme(name)
|
|
189
197
|
};
|
|
190
198
|
}
|
|
@@ -247,9 +255,14 @@ function honoReadme(name) {
|
|
|
247
255
|
"`/upload` (an object storage upload).",
|
|
248
256
|
"",
|
|
249
257
|
"```",
|
|
258
|
+
"runlot dev",
|
|
250
259
|
"runlot deploy",
|
|
251
260
|
"```",
|
|
252
261
|
"",
|
|
262
|
+
"`runlot dev` runs this worker on your own machine under workerd, with `env.storage`",
|
|
263
|
+
"and the static files real and `env.db` and `env.auth` as local stand-ins. It prints",
|
|
264
|
+
"which is which. Point `env.db` at a real database with `RUNLOT_DEV_DATABASE_URL`.",
|
|
265
|
+
"",
|
|
253
266
|
"The deploy reads the `database`, `auth` and `storage` declarations in `runlot.json`",
|
|
254
267
|
"and creates them, and `db`, `auth` and `storage` on `Env` receive the real bindings.",
|
|
255
268
|
""
|
|
@@ -269,10 +282,16 @@ function honoTemplate(ctx) {
|
|
|
269
282
|
version: "0.0.0",
|
|
270
283
|
private: true,
|
|
271
284
|
type: "module",
|
|
285
|
+
// `npm run dev` is the first thing a person types in a new directory, and
|
|
286
|
+
// for this template it should be the local run — not a deploy.
|
|
287
|
+
scripts: {
|
|
288
|
+
dev: "runlot dev",
|
|
289
|
+
deploy: "runlot deploy"
|
|
290
|
+
},
|
|
272
291
|
dependencies: {
|
|
273
292
|
hono: "^4.10.7",
|
|
274
|
-
"@runlot/pg": "^0.1.0-rc.
|
|
275
|
-
"@runlot/auth": "^0.1.0-rc.
|
|
293
|
+
"@runlot/pg": "^0.1.0-rc.80",
|
|
294
|
+
"@runlot/auth": "^0.1.0-rc.80"
|
|
276
295
|
},
|
|
277
296
|
devDependencies: {
|
|
278
297
|
typescript: "^5.7.2",
|
|
@@ -298,7 +317,9 @@ function honoTemplate(ctx) {
|
|
|
298
317
|
"src/index.ts": HONO_INDEX_TS,
|
|
299
318
|
"public/hello.txt": "Static assets ship in the same bundle.\n",
|
|
300
319
|
"migrations/0001_posts.sql": POSTS_MIGRATION,
|
|
301
|
-
|
|
320
|
+
// `.runlot` is where `runlot dev` keeps the unpacked bundle, the local
|
|
321
|
+
// object store and the mail it did not send.
|
|
322
|
+
".gitignore": "node_modules\n.runlot\n.env.runlot\n",
|
|
302
323
|
"README.md": honoReadme(name)
|
|
303
324
|
};
|
|
304
325
|
}
|
|
@@ -331,9 +352,13 @@ function staticReadme(name) {
|
|
|
331
352
|
"A static site template. It is a single `public/index.html` with no worker.",
|
|
332
353
|
"",
|
|
333
354
|
"```",
|
|
355
|
+
"runlot dev",
|
|
334
356
|
"runlot deploy",
|
|
335
357
|
"```",
|
|
336
358
|
"",
|
|
359
|
+
"`runlot dev` serves `public/` the way the deployment will, including the `notFound`",
|
|
360
|
+
"setting, and reloads when you save.",
|
|
361
|
+
"",
|
|
337
362
|
"Without a worker there is no database, authentication or storage. If you add a worker later,",
|
|
338
363
|
'add something like `"database": true` to `runlot.json` and deploy \u2014 the resources are created as part of the deploy.',
|
|
339
364
|
""
|
|
@@ -349,7 +374,7 @@ function staticTemplate(ctx) {
|
|
|
349
374
|
// `"notFound": "spa"` — extensionless paths then answer with index.html.
|
|
350
375
|
"runlot.json": pkgJson(runlotConfig),
|
|
351
376
|
"public/index.html": staticIndexHtml(name),
|
|
352
|
-
".gitignore": "node_modules\n",
|
|
377
|
+
".gitignore": "node_modules\n.runlot\n",
|
|
353
378
|
"README.md": staticReadme(name)
|
|
354
379
|
};
|
|
355
380
|
}
|
|
@@ -375,6 +400,7 @@ function scaffold(opts) {
|
|
|
375
400
|
}
|
|
376
401
|
console.log(`Created ${dir}.`);
|
|
377
402
|
console.log(` cd ${target}`);
|
|
403
|
+
if (template !== "next") console.log(" runlot dev");
|
|
378
404
|
console.log(org ? " runlot deploy" : " runlot deploy --org <slug>");
|
|
379
405
|
return { dir, files: relPaths };
|
|
380
406
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-runlot",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.80",
|
|
4
4
|
"description": "npm create runlot — Next.js, Hono, and static-site templates",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"esbuild": "^0.24.2",
|
|
22
22
|
"typescript": "^5.7.2",
|
|
23
23
|
"@types/node": "^22.10.2",
|
|
24
|
-
"@runlot/config": "0.1.0-rc.
|
|
24
|
+
"@runlot/config": "0.1.0-rc.80"
|
|
25
25
|
},
|
|
26
26
|
"engines": {
|
|
27
27
|
"node": ">=20"
|