mikser-io 9.26.0 → 9.27.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/favicon.ico +0 -0
- package/favicon.svg +12 -0
- package/mikser-mark.svg +10 -0
- package/package.json +1 -1
- package/src/plugins/api.js +14 -4
- package/src/server.js +27 -0
package/favicon.ico
ADDED
|
Binary file
|
package/favicon.svg
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="123.751 38.751 148.498 148.498" role="img" aria-label="mikser">
|
|
2
|
+
<title>mikser</title>
|
|
3
|
+
<!-- The mark with its blend flattened, so it survives a transparent
|
|
4
|
+
backdrop. mikser-mark.svg draws three circles under
|
|
5
|
+
mix-blend-mode: multiply, which needs something to multiply against:
|
|
6
|
+
rasterised onto transparency the orange circle knocks a hole through
|
|
7
|
+
itself instead of compositing. The colours below are sampled from the
|
|
8
|
+
canonical render, so this is the same image with nothing to blend. -->
|
|
9
|
+
<circle cx="198" cy="92" r="46" fill="#0A0907"/>
|
|
10
|
+
<circle cx="222.249" cy="134" r="46" fill="#2F2E2C"/>
|
|
11
|
+
<circle cx="173.751" cy="134" r="46" fill="#FF3F00"/>
|
|
12
|
+
</svg>
|
package/mikser-mark.svg
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="123.751 38.751 148.498 148.498" role="img" aria-label="mikser">
|
|
2
|
+
<title>mikser</title>
|
|
3
|
+
<g style="isolation:isolate">
|
|
4
|
+
<g style="mix-blend-mode:multiply">
|
|
5
|
+
<circle cx="198" cy="92" r="46" fill="#0A0907"></circle>
|
|
6
|
+
<circle cx="222.249" cy="134" r="46" fill="#0A0907" opacity="0.85"></circle>
|
|
7
|
+
<circle cx="173.751" cy="134" r="46" fill="#FF3F00"></circle>
|
|
8
|
+
</g>
|
|
9
|
+
</g>
|
|
10
|
+
</svg>
|
package/package.json
CHANGED
package/src/plugins/api.js
CHANGED
|
@@ -1062,10 +1062,20 @@ export function api(options = {}) {
|
|
|
1062
1062
|
// (allowRemote), so we keep the REMOTE OPEN warning in the
|
|
1063
1063
|
// log. streaming:true — the `subscribe` op holds an open SSE
|
|
1064
1064
|
// stream, so a facade must not buffer this route.
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1065
|
+
//
|
|
1066
|
+
// reachabilityOf rather than a local ternary: `auth` and `token`
|
|
1067
|
+
// both mean gated, and one helper decides for every plugin that
|
|
1068
|
+
// registers a route (ADR-0012) — webdav and mcp call it too. The
|
|
1069
|
+
// value is not just the log bracket: it lands on runtime.routes,
|
|
1070
|
+
// where 'loopback' tells a facade not to proxy, so reading it off
|
|
1071
|
+
// `token` alone hides an auth-gated endpoint from a generated
|
|
1072
|
+
// vhost while the boot log agrees that it is unreachable.
|
|
1073
|
+
const reachability = reachabilityOf(ep)
|
|
1074
|
+
const authLabel = ep.auth
|
|
1075
|
+
? (verifier?.name ?? 'auth')
|
|
1076
|
+
: ep.token
|
|
1077
|
+
? 'token'
|
|
1078
|
+
: (ep.allowRemote ? 'public, REMOTE OPEN' : 'loopback-only')
|
|
1069
1079
|
registerRoute({
|
|
1070
1080
|
path: `${base}/${name}`,
|
|
1071
1081
|
plugin: 'api',
|
package/src/server.js
CHANGED
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
// block — same Express app, all the substrate-level concerns in one
|
|
21
21
|
// place.
|
|
22
22
|
|
|
23
|
+
import path from 'node:path'
|
|
24
|
+
import { fileURLToPath } from 'node:url'
|
|
25
|
+
|
|
23
26
|
import runtime from './runtime.js'
|
|
24
27
|
import { useLogger } from './engine.js'
|
|
25
28
|
import { onInitialized, onLoad, onLoaded } from './lifecycle.js'
|
|
@@ -174,6 +177,30 @@ export function setupServer() {
|
|
|
174
177
|
|
|
175
178
|
runtime.options.app.use(express.static(runtime.options.outputFolder))
|
|
176
179
|
|
|
180
|
+
// A favicon, so the server has a mark instead of a browser's
|
|
181
|
+
// blank default. AFTER the static mount, which is the whole
|
|
182
|
+
// design: a project that puts favicon.ico in its output folder
|
|
183
|
+
// is served its own and never reaches this line. This is the
|
|
184
|
+
// fallback for everything else.
|
|
185
|
+
//
|
|
186
|
+
// Worth having because --server is not only a preview of the
|
|
187
|
+
// site. It is the surface WebDAV, the API and MCP mount on, and
|
|
188
|
+
// those pages sit above whatever the output folder contains —
|
|
189
|
+
// on a multi-language build the output root holds no page at
|
|
190
|
+
// all, so /favicon.ico there is a 404 by construction and every
|
|
191
|
+
// project would have to solve it the same way.
|
|
192
|
+
//
|
|
193
|
+
// Flattened artwork: the mark's mix-blend-mode has nothing to
|
|
194
|
+
// multiply against on a transparent backdrop and rasterises with
|
|
195
|
+
// a hole through it, so favicon.ico is the pre-composited copy.
|
|
196
|
+
const faviconFile = path.join(
|
|
197
|
+
path.dirname(fileURLToPath(import.meta.url)), '..', 'favicon.ico')
|
|
198
|
+
runtime.options.app.get('/favicon.ico', (req, res) => {
|
|
199
|
+
res.type('image/x-icon')
|
|
200
|
+
.set('Cache-Control', 'public, max-age=3600')
|
|
201
|
+
.sendFile(faviconFile)
|
|
202
|
+
})
|
|
203
|
+
|
|
177
204
|
await new Promise(resolve => {
|
|
178
205
|
const httpServer = runtime.options.app.listen(runtime.options.port, () => {
|
|
179
206
|
// Public URL wins for operator-clickable log lines —
|