@webstir-io/webstir 0.1.1 → 0.1.3
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 +13 -0
- package/assets/deployment/docker/.dockerignore +7 -0
- package/assets/deployment/docker/Dockerfile +17 -0
- package/assets/deployment/docker/README.md +44 -0
- package/assets/deployment/docker/example.env +3 -0
- package/assets/features/client_nav/client_nav.ts +369 -264
- package/assets/features/client_nav/document_navigation.ts +344 -0
- package/assets/features/client_nav/form_enhancement.ts +275 -0
- package/assets/templates/api/src/backend/index.ts +71 -10
- package/assets/templates/api/src/backend/tsconfig.json +6 -1
- package/assets/templates/full/src/backend/index.ts +71 -10
- package/assets/templates/full/src/backend/module.ts +515 -0
- package/assets/templates/full/src/backend/tests/progressive-enhancement.test.ts +180 -0
- package/assets/templates/full/src/backend/tsconfig.json +6 -1
- package/assets/templates/full/src/frontend/app/scripts/features/client-nav.ts +574 -0
- package/assets/templates/full/src/frontend/app/scripts/features/document-navigation.ts +344 -0
- package/assets/templates/full/src/frontend/app/scripts/features/form-enhancement.ts +275 -0
- package/assets/templates/full/src/frontend/pages/home/index.css +8 -0
- package/assets/templates/full/src/frontend/pages/home/index.html +6 -1
- package/assets/templates/full/src/frontend/pages/home/tests/home.test.ts +12 -2
- package/assets/templates/spa/src/frontend/pages/home/tests/home.test.ts +10 -2
- package/package.json +31 -13
- package/scripts/check-feature-projections.mjs +87 -0
- package/scripts/check-full-demo-sync.mjs +89 -0
- package/scripts/check-package-install.mjs +537 -0
- package/scripts/check-standalone-install.mjs +221 -0
- package/scripts/pack-standalone.mjs +52 -28
- package/scripts/publish.sh +9 -0
- package/scripts/run-tests.mjs +103 -0
- package/scripts/sync-assets.mjs +175 -17
- package/src/add-backend-compat.ts +628 -0
- package/src/add-backend.ts +155 -27
- package/src/add.ts +111 -4
- package/src/agent.ts +393 -0
- package/src/api-watch.ts +7 -4
- package/src/backend-inspect.ts +70 -2
- package/src/backend-runtime.ts +22 -14
- package/src/build.ts +1 -3
- package/src/bun-generated-frontend-watch.ts +209 -0
- package/src/bun-globals.d.ts +23 -0
- package/src/bun-spa-document.ts +310 -0
- package/src/bun-spa-routes.ts +159 -0
- package/src/bun-spa-watch.ts +29 -0
- package/src/bun-ssg-watch.ts +304 -0
- package/src/cli.ts +381 -50
- package/src/compile-tests.ts +37 -29
- package/src/dev-server.ts +215 -144
- package/src/doctor.ts +164 -0
- package/src/enable-assets.ts +18 -1
- package/src/enable.ts +133 -41
- package/src/execute.ts +30 -4
- package/src/external-workspace.ts +178 -0
- package/src/format.ts +296 -17
- package/src/frontend-inspect.ts +32 -0
- package/src/frontend-watch.ts +27 -102
- package/src/full-watch.ts +13 -18
- package/src/index.ts +7 -0
- package/src/init-assets.ts +41 -11
- package/src/init.ts +85 -71
- package/src/inspect.ts +112 -0
- package/src/mcp/run-cli-json.ts +46 -0
- package/src/mcp/server.ts +307 -0
- package/src/operations.ts +176 -0
- package/src/providers.ts +20 -18
- package/src/refresh.ts +29 -3
- package/src/repair.ts +110 -43
- package/src/runtime-filter.ts +41 -0
- package/src/runtime.ts +1 -1
- package/src/smoke.ts +48 -16
- package/src/test.ts +54 -16
- package/src/testing-runtime.ts +273 -0
- package/src/types.ts +1 -4
- package/src/watch-events.ts +46 -17
- package/src/watch.ts +25 -14
- package/src/workspace-lock.ts +207 -0
- package/src/workspace-watcher.ts +10 -6
- package/src/workspace.ts +4 -2
- package/src/watch-daemon-client.ts +0 -171
package/README.md
CHANGED
|
@@ -8,7 +8,13 @@ Current command surface:
|
|
|
8
8
|
|
|
9
9
|
- `init`
|
|
10
10
|
- `refresh`
|
|
11
|
+
- `inspect`
|
|
12
|
+
- `frontend-inspect`
|
|
13
|
+
- `doctor`
|
|
11
14
|
- `repair`
|
|
15
|
+
- `operations`
|
|
16
|
+
- `mcp`
|
|
17
|
+
- `agent`
|
|
12
18
|
- `enable`
|
|
13
19
|
- `add-page`
|
|
14
20
|
- `add-test`
|
|
@@ -67,3 +73,10 @@ cd site
|
|
|
67
73
|
bun install
|
|
68
74
|
../node_modules/.bin/webstir build --workspace "$PWD"
|
|
69
75
|
```
|
|
76
|
+
|
|
77
|
+
Contributor notes:
|
|
78
|
+
|
|
79
|
+
- Edit Bun-owned scaffolds, reusable features, and deployment helper sources under `orchestrators/bun/resources/**`.
|
|
80
|
+
- `orchestrators/bun/assets/**` is generated package content used for packing and local repo flows.
|
|
81
|
+
- Run `bun run check:assets` here to verify `assets/**` still matches `resources/**`.
|
|
82
|
+
- Run `bun run check:feature-projections` here to verify the built-in `client-nav` copies inside `resources/templates/full/**` still match `resources/features/client_nav/**`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
FROM oven/bun:1.3.11-alpine
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
|
|
5
|
+
COPY package.json bun.lock ./
|
|
6
|
+
RUN bun install --frozen-lockfile --production
|
|
7
|
+
|
|
8
|
+
COPY . .
|
|
9
|
+
|
|
10
|
+
RUN mkdir -p /app/data
|
|
11
|
+
|
|
12
|
+
ENV NODE_ENV=production
|
|
13
|
+
ENV PORT=8080
|
|
14
|
+
|
|
15
|
+
EXPOSE 8080
|
|
16
|
+
|
|
17
|
+
CMD ["bun", "./node_modules/.bin/webstir-backend-deploy", "--workspace", "/app", "--port", "8080"]
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Webstir Docker Deployment
|
|
2
|
+
|
|
3
|
+
Canonical Bun deployment contract for published `api` and `full` workspaces.
|
|
4
|
+
|
|
5
|
+
## Workspace Prerequisites
|
|
6
|
+
|
|
7
|
+
Run from the workspace root after a publish:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
webstir publish --workspace "$PWD"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Required inputs in the workspace root:
|
|
14
|
+
|
|
15
|
+
- `package.json`
|
|
16
|
+
- `bun.lock`
|
|
17
|
+
- `build/backend/**`
|
|
18
|
+
- `dist/frontend/**` for `full` workspaces
|
|
19
|
+
- The canonical `.dockerignore`
|
|
20
|
+
|
|
21
|
+
## Build
|
|
22
|
+
|
|
23
|
+
Copy the canonical `Dockerfile` and `.dockerignore` into your workspace root, then build:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
docker build -t my-webstir-app .
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Run
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
docker run --rm \
|
|
33
|
+
-p 8080:8080 \
|
|
34
|
+
--env-file ./.env.production \
|
|
35
|
+
my-webstir-app
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The container starts `webstir-backend-deploy`, which:
|
|
39
|
+
|
|
40
|
+
- runs the published backend under Bun
|
|
41
|
+
- serves `dist/frontend/**` for `full` workspaces
|
|
42
|
+
- proxies `/api/*` to the backend runtime for `full` workspaces
|
|
43
|
+
- proxies all requests to the backend for `api` workspaces
|
|
44
|
+
- keeps `/readyz`, `/healthz`, and `/metrics` available from the single public port
|