create-hollware 1.0.0-rc.1 → 1.0.0-rc.2

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.mjs CHANGED
@@ -114,6 +114,7 @@ function writeProject(io, target, choices) {
114
114
  replaceIn(join(target, "wrangler.jsonc"), [
115
115
  ["\"name\": \"my-hollware\"", `"name": "${choices.name}"`],
116
116
  ["\"database_name\": \"my-hollware\"", `"database_name": "${choices.name}"`],
117
+ ["\"bucket_name\": \"my-hollware-media\"", `"bucket_name": "${choices.name}-media"`],
117
118
  ["hollware-events", `${choices.name}-events`]
118
119
  ]);
119
120
  for (const file of ["README.md"]) replaceIn(join(target, file), [["my-site", choices.site]]);
@@ -186,6 +187,7 @@ async function create(argv, io) {
186
187
  const next = [
187
188
  `cd ${choices.dir}`,
188
189
  `${choices.pm} install`,
190
+ `${choices.pm} exec vp fmt`,
189
191
  `${choices.pm} exec hollware migrate --local`,
190
192
  `${choices.pm} exec hollware ${initArgs.join(" ")} --local`
191
193
  ];
@@ -206,6 +208,7 @@ async function create(argv, io) {
206
208
  }
207
209
  say(`Installing with ${choices.pm} ...`);
208
210
  await step(io, "The install", choices.pm, ["install"], target);
211
+ await step(io, "The formatting", join(target, "node_modules", ".bin", "vp"), ["fmt"], target);
209
212
  const hollware = join(target, "node_modules", ".bin", "hollware");
210
213
  await step(io, "The migrations", hollware, ["migrate", "--local"], target);
211
214
  const init = await step(io, "Making the site", hollware, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-hollware",
3
- "version": "1.0.0-rc.1",
3
+ "version": "1.0.0-rc.2",
4
4
  "description": "Create a new Hollware project.",
5
5
  "homepage": "https://hollware.com",
6
6
  "bugs": {
@@ -11,5 +11,10 @@ of the sites live in D1; this repository holds only the Worker.
11
11
  - Content is never edited in files here. Write it through the MCP tools (`create_draft`,
12
12
  `update_draft`, `validate`, `publish`) of the Hollware at `HOLLWARE_PUBLIC_URL` + `/mcp`.
13
13
  - Run `pnpm test` and `pnpm exec wrangler types --check` after a change of `wrangler.jsonc`, and `pnpm exec hollware doctor` when something does not work.
14
+ - To update Hollware, move `hollware`, `@hollware/core`, `@hollware/server` and `@hollware/admin`
15
+ to one new version together, as exact versions
16
+ (`pnpm add -E hollware@X @hollware/core@X @hollware/server@X @hollware/admin@X`), read its
17
+ release notes, run `pnpm test`, then `pnpm exec hollware deploy`: it deploys the Worker and applies
18
+ the new migrations to the remote database. Migrations only move forward; content stays as it is.
14
19
  - Never commit a token. `hollware init` and `hollware token create` print one once.
15
20
  - Docs: https://hollware.com
@@ -7,6 +7,7 @@
7
7
  "dev": "vp dev",
8
8
  "build": "vp build",
9
9
  "test": "vp test",
10
+ "check": "vp check",
10
11
  "types": "wrangler types",
11
12
  "types:check": "wrangler types --check",
12
13
  "deploy": "hollware deploy",
@@ -79,6 +79,7 @@ describe('the database', () => {
79
79
 
80
80
  expect(results.map((row) => row.name)).toEqual([
81
81
  '_hollware_meta',
82
+ 'assets',
82
83
  'audit_log',
83
84
  'auth_challenges',
84
85
  'deliveries',
@@ -2,8 +2,20 @@ import { cloudflare } from '@cloudflare/vite-plugin'
2
2
  import { adminAssets } from '@hollware/admin'
3
3
  import { defineConfig } from 'vite-plus'
4
4
 
5
- export default defineConfig({
6
- plugins: [cloudflare()],
5
+ /** Where `vp dev` serves Hollware: the URL of HOLLWARE_PUBLIC_URL before the first deploy. */
6
+ const LOCAL_URL = 'http://localhost:5199'
7
+
8
+ export default defineConfig(({ command }) => ({
9
+ plugins: [
10
+ cloudflare({
11
+ // `hollware deploy` writes the public URL into wrangler.jsonc, and the Worker answers only
12
+ // the Host of HOLLWARE_PUBLIC_URL: in development it is this machine's, whatever is deployed.
13
+ config:
14
+ command === 'serve'
15
+ ? (config) => ({ vars: { ...config.vars, HOLLWARE_PUBLIC_URL: LOCAL_URL } })
16
+ : undefined,
17
+ }),
18
+ ],
7
19
  // The admin's built files: served at /admin/ in development, and copied into the build, where
8
20
  // the Worker's static assets hold them.
9
21
  publicDir: adminAssets(),
@@ -15,4 +27,14 @@ export default defineConfig({
15
27
  // What you deploy is what the size budget of Hollware measures: minified.
16
28
  minify: true,
17
29
  },
18
- })
30
+ // `vp check` formats and lints the project as Hollware writes it. wrangler writes
31
+ // worker-configuration.d.ts, so neither touches it.
32
+ fmt: {
33
+ semi: false,
34
+ singleQuote: true,
35
+ ignorePatterns: ['dist/**', '.wrangler/**', 'worker-configuration.d.ts'],
36
+ },
37
+ lint: {
38
+ ignorePatterns: ['dist/**', '.wrangler/**', 'worker-configuration.d.ts'],
39
+ },
40
+ }))
@@ -17,8 +17,11 @@ export default defineConfig({
17
17
  cloudflareTest(async () => ({
18
18
  wrangler: { configPath: './wrangler.jsonc' },
19
19
  miniflare: {
20
- // Read here in Node and applied inside workerd by the setup file.
21
20
  bindings: {
21
+ // The tests reach the Worker at localhost, whatever public URL `hollware deploy` wrote
22
+ // into wrangler.jsonc: it answers only the Host of HOLLWARE_PUBLIC_URL.
23
+ HOLLWARE_PUBLIC_URL: 'http://localhost:5199',
24
+ // Read here in Node and applied inside workerd by the setup file.
22
25
  TEST_MIGRATIONS: await readD1Migrations({
23
26
  projectPath: import.meta.dirname,
24
27
  migrationsDir,
@@ -1,11 +1,13 @@
1
1
  /* eslint-disable */
2
- // Generated by Wrangler by running `wrangler types` (hash: 8cce72e181db11068cbc639f31cd25a2)
2
+ // Generated by Wrangler by running `wrangler types` (hash: f943445b38678ab7934813fd9b1a910b)
3
3
  // Runtime types generated with workerd@1.20261012.1 2026-10-06 global_fetch_strictly_public,no_nodejs_compat,no_nodejs_compat_v2
4
4
  interface __BaseEnv_Env {
5
5
  OAUTH_KV: KVNamespace;
6
+ MEDIA: R2Bucket;
6
7
  DB: D1Database;
7
8
  EVENTS: Queue;
8
9
  HOLLWARE_RATE_LIMIT: RateLimit;
10
+ IMAGES: ImagesBinding;
9
11
  ASSETS: Fetcher;
10
12
  HOLLWARE_PUBLIC_URL: "http://localhost:5199";
11
13
  }
@@ -59,4 +59,9 @@
59
59
  "migrations_dir": "node_modules/@hollware/server/migrations",
60
60
  },
61
61
  ],
62
+ // The images of the sites (ADR-038): the bucket that keeps them, which the first deploy creates,
63
+ // and the Images binding that converts each once when it arrives (to WebP by default). Without
64
+ // the binding, images are kept as they come; without the bucket, upload_asset is unavailable.
65
+ "r2_buckets": [{ "binding": "MEDIA", "bucket_name": "my-hollware-media" }],
66
+ "images": { "binding": "IMAGES" },
62
67
  }