kanna-code 0.16.0 → 0.17.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.
- package/README.md +32 -0
- package/dist/client/assets/{index-DMxCijCf.js → index-CtKZIZdD.js} +113 -113
- package/dist/client/assets/index-Cwex1U8S.css +32 -0
- package/dist/client/index.html +2 -2
- package/package.json +4 -1
- package/src/server/cli-runtime.test.ts +130 -0
- package/src/server/cli-runtime.ts +43 -3
- package/src/server/event-store.ts +7 -31
- package/src/server/provider-catalog.test.ts +1 -1
- package/src/server/share.test.ts +108 -0
- package/src/server/share.ts +113 -0
- package/src/shared/dev-ports.test.ts +32 -0
- package/src/shared/dev-ports.ts +55 -0
- package/src/shared/types.ts +3 -3
- package/dist/client/assets/index-BET6YVYr.css +0 -32
package/README.md
CHANGED
|
@@ -115,6 +115,7 @@ bun run build
|
|
|
115
115
|
kanna # start with defaults (localhost only)
|
|
116
116
|
kanna --port 4000 # custom port
|
|
117
117
|
kanna --no-open # don't open browser
|
|
118
|
+
kanna --share # create a public share URL + terminal QR
|
|
118
119
|
```
|
|
119
120
|
|
|
120
121
|
Default URL: `http://localhost:3210`
|
|
@@ -132,6 +133,28 @@ kanna --host 100.64.x.x # bind to a specific Tailscale IP
|
|
|
132
133
|
|
|
133
134
|
When `--host <hostname>` is given, the browser opens `http://<hostname>:3210` automatically. Other machines on your network can connect to the same URL:
|
|
134
135
|
|
|
136
|
+
### Public share link
|
|
137
|
+
|
|
138
|
+
Use `--share` to create a temporary public `trycloudflare.com` URL and print a terminal QR code:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
kanna --share
|
|
142
|
+
kanna --share --port 4000
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
`--share` is incompatible with `--host` and `--remote`. It does not open a browser automatically; instead it prints:
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
QR Code:
|
|
149
|
+
...
|
|
150
|
+
|
|
151
|
+
Public URL:
|
|
152
|
+
https://<random>.trycloudflare.com
|
|
153
|
+
|
|
154
|
+
Local URL:
|
|
155
|
+
http://localhost:3210
|
|
156
|
+
```
|
|
157
|
+
|
|
135
158
|
## Development
|
|
136
159
|
|
|
137
160
|
```bash
|
|
@@ -139,6 +162,15 @@ bun run dev
|
|
|
139
162
|
```
|
|
140
163
|
|
|
141
164
|
The same `--remote` and `--host` flags can be used with `bun run dev` for remote development.
|
|
165
|
+
`--share` is also supported in dev mode and exposes the Vite client URL publicly:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
bun run dev --share
|
|
169
|
+
bun run dev --port 3333 --share
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
In dev, `--port` sets the Vite client port and the backend runs on `port + 1`, so `bun run dev --port 3333 --share` publishes `http://localhost:3333`.
|
|
173
|
+
`--share` remains incompatible with `--host` and `--remote`.
|
|
142
174
|
Use `bun run dev --port 4000` to run the Vite client on `4000` and the backend on `4001`.
|
|
143
175
|
|
|
144
176
|
Or run client and server separately:
|