@flash-debug/silkworm 0.0.0 → 0.4.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.
Files changed (60) hide show
  1. package/.output/nitro.json +18 -0
  2. package/.output/public/assets/index-Bw-GBuTw.css +1 -0
  3. package/.output/public/assets/index-CHthEL3v.js +6 -0
  4. package/.output/public/icons/silkworm/favicon-16.png +0 -0
  5. package/.output/public/icons/silkworm/favicon-32.png +0 -0
  6. package/.output/public/icons/silkworm/icon-128.png +0 -0
  7. package/.output/public/icons/silkworm/icon-512.png +0 -0
  8. package/.output/public/index.html +14 -0
  9. package/.output/server/_chunks/renderer-template.mjs +8 -0
  10. package/.output/server/_chunks/state.mjs +568 -0
  11. package/.output/server/_libs/h3+rou3+srvx.mjs +1597 -0
  12. package/.output/server/_libs/h3.mjs +139 -0
  13. package/.output/server/_libs/h32.mjs +48 -0
  14. package/.output/server/_routes/api/silkworm/auto/pause.mjs +8 -0
  15. package/.output/server/_routes/api/silkworm/auto/start.mjs +17 -0
  16. package/.output/server/_routes/api/silkworm/auto/stop.mjs +8 -0
  17. package/.output/server/_routes/api/silkworm/connect.mjs +21 -0
  18. package/.output/server/_routes/api/silkworm/history/clear.mjs +8 -0
  19. package/.output/server/_routes/api/silkworm/manual/send.mjs +23 -0
  20. package/.output/server/_routes/api/silkworm/state.mjs +5 -0
  21. package/.output/server/_routes/api/silkworm/stream.mjs +41 -0
  22. package/.output/server/_routes/api/silkworm/test.mjs +18 -0
  23. package/.output/server/index.mjs +542 -0
  24. package/dist/assets/index-Bw-GBuTw.css +1 -0
  25. package/dist/assets/index-CHthEL3v.js +6 -0
  26. package/dist/icons/silkworm/favicon-16.png +0 -0
  27. package/dist/icons/silkworm/favicon-32.png +0 -0
  28. package/dist/icons/silkworm/icon-128.png +0 -0
  29. package/dist/icons/silkworm/icon-512.png +0 -0
  30. package/dist/index.html +14 -0
  31. package/index.html +13 -0
  32. package/nitro.config.ts +12 -0
  33. package/package.json +42 -8
  34. package/public/icons/silkworm/favicon-16.png +0 -0
  35. package/public/icons/silkworm/favicon-32.png +0 -0
  36. package/public/icons/silkworm/icon-128.png +0 -0
  37. package/public/icons/silkworm/icon-512.png +0 -0
  38. package/scripts/dev.ts +56 -0
  39. package/server/routes/api/silkworm/auto/pause.post.ts +7 -0
  40. package/server/routes/api/silkworm/auto/start.post.ts +18 -0
  41. package/server/routes/api/silkworm/auto/stop.post.ts +7 -0
  42. package/server/routes/api/silkworm/connect.post.ts +28 -0
  43. package/server/routes/api/silkworm/history/clear.post.ts +7 -0
  44. package/server/routes/api/silkworm/manual/send.post.ts +38 -0
  45. package/server/routes/api/silkworm/state.get.ts +4 -0
  46. package/server/routes/api/silkworm/stream.get.ts +59 -0
  47. package/server/routes/api/silkworm/test.post.ts +18 -0
  48. package/server/state.ts +3 -0
  49. package/src/App.vue +418 -0
  50. package/src/IconGlyph.vue +33 -0
  51. package/src/main.ts +5 -0
  52. package/src/runner/random.ts +29 -0
  53. package/src/runner/runtime.ts +396 -0
  54. package/src/runner/transport.ts +109 -0
  55. package/src/runner/types.ts +118 -0
  56. package/src/scenarios/index.ts +187 -0
  57. package/src/styles.css +172 -0
  58. package/tsconfig.json +9 -0
  59. package/vite.config.ts +17 -0
  60. package/index.js +0 -1
@@ -0,0 +1,542 @@
1
+ globalThis.__nitro_main__ = import.meta.url;
2
+ import { HTTPError, NodeResponse, serve } from "./_libs/h3+rou3+srvx.mjs";
3
+ import { H3Core, defineHandler, defineLazyEventHandler, toEventHandler } from "./_libs/h3.mjs";
4
+ import { promises } from "node:fs";
5
+ import { fileURLToPath } from "node:url";
6
+ import { dirname, resolve } from "node:path";
7
+ // ../../node_modules/.pnpm/nitro@3.0.261103-rc/node_modules/nitro/dist/runtime/internal/polyfills/fast-response.mjs
8
+ if (globalThis.Response !== NodeResponse) globalThis.Response = NodeResponse;
9
+ // ../../node_modules/.pnpm/nitro@3.0.261103-rc/node_modules/nitro/dist/runtime/_libs/hookable.mjs
10
+ function e$1(t, n, r, i) {
11
+ for (let a = r; a < t.length; a += 1) try {
12
+ let r = i ? i.run(() => t[a](...n)) : t[a](...n);
13
+ if (r && typeof r.then == `function`) return Promise.resolve(r).then(() => e$1(t, n, a + 1, i));
14
+ } catch (e) {
15
+ return Promise.reject(e);
16
+ }
17
+ }
18
+ var t$1 = class {
19
+ _hooks;
20
+ constructor() {
21
+ this._hooks = {};
22
+ }
23
+ hook(e, t) {
24
+ return !e || typeof t != `function` ? () => {} : (this._hooks[e] = this._hooks[e] || [], this._hooks[e].push(t), () => {
25
+ t &&= (this.removeHook(e, t), void 0);
26
+ });
27
+ }
28
+ removeHook(e, t) {
29
+ let n = this._hooks[e];
30
+ if (n) {
31
+ let r = n.indexOf(t);
32
+ r !== -1 && n.splice(r, 1), n.length === 0 && (this._hooks[e] = void 0);
33
+ }
34
+ }
35
+ callHook(t, ...n) {
36
+ let r = this._hooks[t];
37
+ if (r && r.length !== 0) return e$1(r.slice(), n, 0);
38
+ }
39
+ };
40
+ // ../../node_modules/.pnpm/nitro@3.0.261103-rc/node_modules/nitro/dist/runtime/_libs/ufo.mjs
41
+ String.fromCharCode;
42
+ const e = /%2f/gi;
43
+ function t(e = ``) {
44
+ try {
45
+ return decodeURIComponent(`` + e);
46
+ } catch {
47
+ return `` + e;
48
+ }
49
+ }
50
+ function n(n) {
51
+ return t(n.replace(e, `%252F`));
52
+ }
53
+ const r = /\/$|\/\?|\/#/;
54
+ const i = /^\.?\//;
55
+ function a(e = ``, t) {
56
+ return t ? r.test(e) : e.endsWith(`/`);
57
+ }
58
+ function o(e = ``, t) {
59
+ if (!t) return (a(e) ? e.slice(0, -1) : e) || `/`;
60
+ if (!a(e, !0)) return e || `/`;
61
+ let n = e, r = ``, i = e.indexOf(`#`);
62
+ i !== -1 && (n = e.slice(0, i), r = e.slice(i));
63
+ let [o, ...s] = n.split(`?`);
64
+ return ((o.endsWith(`/`) ? o.slice(0, -1) : o) || `/`) + (s.length > 0 ? `?${s.join(`?`)}` : ``) + r;
65
+ }
66
+ function s(e = ``, t) {
67
+ if (!t) return e.endsWith(`/`) ? e : e + `/`;
68
+ if (a(e, !0)) return e || `/`;
69
+ let n = e, r = ``, i = e.indexOf(`#`);
70
+ if (i !== -1 && (n = e.slice(0, i), r = e.slice(i), !n)) return r;
71
+ let [o, ...s] = n.split(`?`);
72
+ return o + `/` + (s.length > 0 ? `?${s.join(`?`)}` : ``) + r;
73
+ }
74
+ function c(e = ``) {
75
+ return e.startsWith(`/`);
76
+ }
77
+ function l(e = ``) {
78
+ return c(e) ? e : `/` + e;
79
+ }
80
+ function u(e) {
81
+ return e && e !== `/`;
82
+ }
83
+ function d(e, ...t) {
84
+ let n = e || ``;
85
+ for (let e of t.filter((e) => u(e))) if (n) {
86
+ let t = e.replace(i, ``);
87
+ n = s(n) + t;
88
+ } else n = e;
89
+ return n;
90
+ }
91
+ // #nitro/virtual/public-assets-data
92
+ var public_assets_data_default = {
93
+ "/assets/index-Bw-GBuTw.css": {
94
+ "type": "text/css; charset=utf-8",
95
+ "etag": "\"2a0f-/h349hCRc2lItor3EXEnCwnhbK4\"",
96
+ "mtime": "2026-11-18T12:42:43.469Z",
97
+ "size": 10767,
98
+ "path": "../public/assets/index-Bw-GBuTw.css"
99
+ },
100
+ "/assets/index-CHthEL3v.js": {
101
+ "type": "text/javascript; charset=utf-8",
102
+ "etag": "\"16ac6-FHxhE6XwS5o9fgb3PiJBm1FxD5o\"",
103
+ "mtime": "2026-11-18T12:42:43.472Z",
104
+ "size": 92870,
105
+ "path": "../public/assets/index-CHthEL3v.js"
106
+ },
107
+ "/icons/silkworm/favicon-16.png": {
108
+ "type": "image/png",
109
+ "etag": "\"17e-GP8lSK3nRl9q8Y1NWM9zmTVjgoI\"",
110
+ "mtime": "2026-11-18T12:42:43.473Z",
111
+ "size": 382,
112
+ "path": "../public/icons/silkworm/favicon-16.png"
113
+ },
114
+ "/icons/silkworm/favicon-32.png": {
115
+ "type": "image/png",
116
+ "etag": "\"312-hVJlgRiOKPHo7MHyW2Cq8CZ4dEc\"",
117
+ "mtime": "2026-11-18T12:42:43.473Z",
118
+ "size": 786,
119
+ "path": "../public/icons/silkworm/favicon-32.png"
120
+ },
121
+ "/icons/silkworm/icon-128.png": {
122
+ "type": "image/png",
123
+ "etag": "\"1069-4X4C+EXakXd9u0uF+LBFMWfC26g\"",
124
+ "mtime": "2026-11-18T12:42:43.473Z",
125
+ "size": 4201,
126
+ "path": "../public/icons/silkworm/icon-128.png"
127
+ },
128
+ "/icons/silkworm/icon-512.png": {
129
+ "type": "image/png",
130
+ "etag": "\"8c56-3NY5j4+8zy1nZz9kkNMO64PXaac\"",
131
+ "mtime": "2026-11-18T12:42:43.473Z",
132
+ "size": 35926,
133
+ "path": "../public/icons/silkworm/icon-512.png"
134
+ },
135
+ "/index.html": {
136
+ "type": "text/html; charset=utf-8",
137
+ "etag": "\"1f4-KnWNjq3yLB81L0Zn5t3eRpYHEz4\"",
138
+ "mtime": "2026-11-18T12:42:43.474Z",
139
+ "size": 500,
140
+ "path": "../public/index.html"
141
+ }
142
+ };
143
+ // #nitro/virtual/public-assets-node
144
+ function readAsset(id) {
145
+ const serverDir = dirname(fileURLToPath(globalThis.__nitro_main__));
146
+ return promises.readFile(resolve(serverDir, public_assets_data_default[id].path)).catch((error) => {
147
+ if (error?.code !== "ENOENT") throw error;
148
+ });
149
+ }
150
+ // #nitro/virtual/public-assets
151
+ const publicAssetBases = {};
152
+ function isPublicAssetURL(id = "") {
153
+ if (public_assets_data_default[id]) return true;
154
+ for (const base in publicAssetBases) if (id.startsWith(base)) return true;
155
+ return false;
156
+ }
157
+ function getAsset(id) {
158
+ return public_assets_data_default[id];
159
+ }
160
+ function hasAsset(id = "") {
161
+ return !!(public_assets_data_default[id] || public_assets_data_default[id + ".gz"] || public_assets_data_default[id + ".br"] || public_assets_data_default[id + ".zst"]);
162
+ }
163
+ // ../../node_modules/.pnpm/nitro@3.0.261103-rc/node_modules/nitro/dist/runtime/internal/static.mjs
164
+ const METHODS = /* @__PURE__ */ new Set(["HEAD", "GET"]);
165
+ const EncodingMap = {
166
+ gzip: ".gz",
167
+ br: ".br",
168
+ zstd: ".zst"
169
+ };
170
+ const noCacheHeaders = { "cache-control": "no-store" };
171
+ var static_default = defineHandler((event) => {
172
+ if (event.req.method && !METHODS.has(event.req.method)) return;
173
+ const path = l(o(event.url.pathname));
174
+ let id = path.includes("%") ? n(path) : path;
175
+ if (!hasAsset(id) && !hasAsset(d(id, "index.html")) && !isPublicAssetURL(id)) return;
176
+ let asset;
177
+ const encodings = [...(event.req.headers.get("accept-encoding") || "").split(",").map((entry) => {
178
+ const [name, ...parameters] = entry.split(";");
179
+ const quality = parameters.map((parameter) => parameter.trim().split("=")).find(([key]) => key.toLowerCase() === "q")?.[1];
180
+ const weight = quality === void 0 ? 1 : Number.parseFloat(quality);
181
+ return {
182
+ ext: EncodingMap[name.trim().toLowerCase()],
183
+ weight: Number.isNaN(weight) ? 1 : weight
184
+ };
185
+ }).filter((entry) => entry.ext && entry.weight > 0).sort((a, b) => b.weight - a.weight || (a.ext < b.ext ? -1 : a.ext > b.ext ? 1 : 0)).map((entry) => entry.ext), ""];
186
+ for (const encoding of encodings) for (const _id of [id + encoding, d(id, "index.html" + encoding)]) {
187
+ const _asset = getAsset(_id);
188
+ if (_asset) {
189
+ asset = _asset;
190
+ id = _id;
191
+ break;
192
+ }
193
+ }
194
+ if (!asset) {
195
+ if (isPublicAssetURL(id)) throw new HTTPError({
196
+ status: 404,
197
+ headers: noCacheHeaders
198
+ });
199
+ return;
200
+ }
201
+ if (encodings.length > 1) event.res.headers.append("Vary", "Accept-Encoding");
202
+ if (event.req.headers.get("if-none-match") === asset.etag) {
203
+ event.res.status = 304;
204
+ event.res.statusText = "Not Modified";
205
+ return "";
206
+ }
207
+ const ifModifiedSinceH = event.req.headers.get("if-modified-since");
208
+ const mtimeDate = new Date(asset.mtime);
209
+ if (ifModifiedSinceH && asset.mtime && new Date(ifModifiedSinceH) >= mtimeDate) {
210
+ event.res.status = 304;
211
+ event.res.statusText = "Not Modified";
212
+ return "";
213
+ }
214
+ if (asset.type) event.res.headers.set("Content-Type", asset.type);
215
+ if (asset.etag && !event.res.headers.has("ETag")) event.res.headers.set("ETag", asset.etag);
216
+ if (asset.mtime && !event.res.headers.has("Last-Modified")) event.res.headers.set("Last-Modified", mtimeDate.toUTCString());
217
+ if (asset.encoding && !event.res.headers.has("Content-Encoding")) event.res.headers.set("Content-Encoding", asset.encoding);
218
+ if (asset.size > 0 && !event.res.headers.has("Content-Length")) event.res.headers.set("Content-Length", asset.size.toString());
219
+ const data = readAsset(id);
220
+ return typeof data?.then === "function" ? data.then((resolved) => assertAssetData(resolved)) : assertAssetData(data);
221
+ });
222
+ function assertAssetData(data) {
223
+ if (data === null || data === void 0) throw new HTTPError({
224
+ status: 404,
225
+ headers: noCacheHeaders
226
+ });
227
+ return data;
228
+ }
229
+ // #nitro/virtual/routing
230
+ const _lazy_a09e92c55cf25e5f = defineLazyEventHandler(() => import("./_routes/api/silkworm/auto/pause.mjs"));
231
+ const _lazy_e45cf683eaab1e2c = defineLazyEventHandler(() => import("./_routes/api/silkworm/auto/start.mjs"));
232
+ const _lazy_7abbbfcb4a6efda8 = defineLazyEventHandler(() => import("./_routes/api/silkworm/auto/stop.mjs"));
233
+ const _lazy_dac4be002badd9ac = defineLazyEventHandler(() => import("./_routes/api/silkworm/connect.mjs"));
234
+ const _lazy_2404d78cec8d41f0 = defineLazyEventHandler(() => import("./_routes/api/silkworm/history/clear.mjs"));
235
+ const _lazy_e60bec232d59bd7a = defineLazyEventHandler(() => import("./_routes/api/silkworm/manual/send.mjs"));
236
+ const _lazy_fe40dec4ff20d2e0 = defineLazyEventHandler(() => import("./_routes/api/silkworm/state.mjs"));
237
+ const _lazy_746658bf128e26d0 = defineLazyEventHandler(() => import("./_routes/api/silkworm/stream.mjs"));
238
+ const _lazy_9471821ab8c264c2 = defineLazyEventHandler(() => import("./_routes/api/silkworm/test.mjs"));
239
+ const _lazy_2f85ea60d38b06b7 = defineLazyEventHandler(() => import("./_chunks/renderer-template.mjs"));
240
+ const findRoute = /* @__PURE__ */ (() => {
241
+ const $9 = {
242
+ __proto__: null,
243
+ "/api/silkworm/auto/pause": {
244
+ __proto__: null,
245
+ "POST": {
246
+ route: "/api/silkworm/auto/pause",
247
+ method: "post",
248
+ handler: _lazy_a09e92c55cf25e5f
249
+ }
250
+ },
251
+ "/api/silkworm/auto/start": {
252
+ __proto__: null,
253
+ "POST": {
254
+ route: "/api/silkworm/auto/start",
255
+ method: "post",
256
+ handler: _lazy_e45cf683eaab1e2c
257
+ }
258
+ },
259
+ "/api/silkworm/auto/stop": {
260
+ __proto__: null,
261
+ "POST": {
262
+ route: "/api/silkworm/auto/stop",
263
+ method: "post",
264
+ handler: _lazy_7abbbfcb4a6efda8
265
+ }
266
+ },
267
+ "/api/silkworm/connect": {
268
+ __proto__: null,
269
+ "POST": {
270
+ route: "/api/silkworm/connect",
271
+ method: "post",
272
+ handler: _lazy_dac4be002badd9ac
273
+ }
274
+ },
275
+ "/api/silkworm/history/clear": {
276
+ __proto__: null,
277
+ "POST": {
278
+ route: "/api/silkworm/history/clear",
279
+ method: "post",
280
+ handler: _lazy_2404d78cec8d41f0
281
+ }
282
+ },
283
+ "/api/silkworm/manual/send": {
284
+ __proto__: null,
285
+ "POST": {
286
+ route: "/api/silkworm/manual/send",
287
+ method: "post",
288
+ handler: _lazy_e60bec232d59bd7a
289
+ }
290
+ },
291
+ "/api/silkworm/state": {
292
+ __proto__: null,
293
+ "GET": {
294
+ route: "/api/silkworm/state",
295
+ method: "get",
296
+ handler: _lazy_fe40dec4ff20d2e0
297
+ }
298
+ },
299
+ "/api/silkworm/stream": {
300
+ __proto__: null,
301
+ "GET": {
302
+ route: "/api/silkworm/stream",
303
+ method: "get",
304
+ handler: _lazy_746658bf128e26d0
305
+ }
306
+ },
307
+ "/api/silkworm/test": {
308
+ __proto__: null,
309
+ "POST": {
310
+ route: "/api/silkworm/test",
311
+ method: "post",
312
+ handler: _lazy_9471821ab8c264c2
313
+ }
314
+ }
315
+ }, $10 = {
316
+ route: "/**",
317
+ handler: _lazy_2f85ea60d38b06b7
318
+ };
319
+ return (m, p) => {
320
+ if (p.charCodeAt(p.length - 1) === 47) p = p.slice(0, -1);
321
+ let _n = $9[p];
322
+ if (_n !== void 0) {
323
+ let _d = _n[m];
324
+ if (_d === void 0) _d = _n[""];
325
+ if (_d !== void 0) return { data: _d };
326
+ }
327
+ let l = p.split("/").length;
328
+ let _w;
329
+ return l > 1 ? {
330
+ data: $10,
331
+ params: {
332
+ "0": _w = p.slice(1),
333
+ _: _w
334
+ }
335
+ } : {
336
+ data: $10,
337
+ params: {}
338
+ };
339
+ };
340
+ })();
341
+ const globalMiddleware = [toEventHandler(static_default)].filter(Boolean);
342
+ // ../../node_modules/.pnpm/nitro@3.0.261103-rc/node_modules/nitro/dist/runtime/internal/error/utils.mjs
343
+ function createErrorHeaders(error, event, unhandled) {
344
+ const headers = new Headers(unhandled ? {} : error.headers);
345
+ const errHeaders = event.res?.errHeaders;
346
+ if (errHeaders) for (const [name, value] of errHeaders) if (name === "set-cookie") headers.append(name, value);
347
+ else headers.set(name, value);
348
+ return headers;
349
+ }
350
+ // ../../node_modules/.pnpm/nitro@3.0.261103-rc/node_modules/nitro/dist/runtime/internal/error/prod.mjs
351
+ const errorHandler = (error, event) => {
352
+ const res = defaultHandler(error, event);
353
+ return new NodeResponse(typeof res.body === "string" ? res.body : JSON.stringify(res.body, null, 2), res);
354
+ };
355
+ function defaultHandler(error, event) {
356
+ const unhandled = error.unhandled ?? !HTTPError.isError(error);
357
+ const { status = 500, statusText = "" } = unhandled ? {} : error;
358
+ if (status === 404) {
359
+ const url = event.url || new URL(event.req.url);
360
+ const baseURL = "/";
361
+ if (/^\/[^/]/.test(baseURL) && !url.pathname.startsWith(baseURL)) return {
362
+ status: 302,
363
+ headers: new Headers({ location: `${baseURL}${url.pathname.slice(1)}${url.search}` })
364
+ };
365
+ }
366
+ const headers = createErrorHeaders(error, event, unhandled);
367
+ headers.set("content-type", "application/json; charset=utf-8");
368
+ return {
369
+ status,
370
+ statusText,
371
+ headers,
372
+ body: {
373
+ error: true,
374
+ ...unhandled ? {
375
+ status,
376
+ unhandled: true
377
+ } : typeof error.toJSON === "function" ? error.toJSON() : {
378
+ status,
379
+ statusText,
380
+ message: error.message
381
+ }
382
+ }
383
+ };
384
+ }
385
+ // #nitro/virtual/error-handler
386
+ const errorHandlers = [errorHandler];
387
+ async function error_handler_default(error, event) {
388
+ for (const handler of errorHandlers) try {
389
+ const response = await handler(error, event, { defaultHandler });
390
+ if (response) return response;
391
+ } catch (error) {
392
+ console.error(error);
393
+ }
394
+ }
395
+ // #nitro/virtual/app
396
+ function createNitroApp() {
397
+ const captureError = (error, errorCtx) => {
398
+ if (errorCtx?.event) {
399
+ const errors = errorCtx.event.req.context?.nitro?.errors;
400
+ if (errors) errors.push({
401
+ error,
402
+ context: errorCtx
403
+ });
404
+ }
405
+ };
406
+ const h3App = createH3App({ onError(error, event) {
407
+ return error_handler_default(error, event);
408
+ } });
409
+ let appHandler = (req) => {
410
+ req.context ||= {};
411
+ req.context.nitro = req.context.nitro || { errors: [] };
412
+ return h3App.fetch(req);
413
+ };
414
+ return {
415
+ fetch: appHandler,
416
+ h3: h3App,
417
+ hooks: void 0,
418
+ captureError
419
+ };
420
+ }
421
+ function createH3App(config) {
422
+ const h3App = new H3Core(config);
423
+ h3App["~findRoute"] = (event) => {
424
+ if (event.req.method === "HEAD") {
425
+ const route = findRoute("HEAD", event.url.pathname);
426
+ return route?.data.method ? route : findRoute("GET", event.url.pathname);
427
+ }
428
+ return findRoute(event.req.method, event.url.pathname) ?? findMethodNotAllowed(event.req.method, event.url.pathname);
429
+ };
430
+ const findMethodNotAllowed = createMethodNotAllowedMatcher(findRoute, ["GET", "POST"]);
431
+ h3App["~middleware"].push(...globalMiddleware);
432
+ return h3App;
433
+ }
434
+ // ../../node_modules/.pnpm/nitro@3.0.261103-rc/node_modules/nitro/dist/runtime/internal/app.mjs
435
+ const APP_ID = "default";
436
+ function useNitroApp() {
437
+ let instance = useNitroApp._instance;
438
+ if (instance) return instance;
439
+ instance = useNitroApp._instance = createNitroApp();
440
+ globalThis.__nitro__ = globalThis.__nitro__ || {};
441
+ globalThis.__nitro__[APP_ID] = instance;
442
+ return instance;
443
+ }
444
+ function useNitroHooks() {
445
+ const nitroApp = useNitroApp();
446
+ const hooks = nitroApp.hooks;
447
+ if (hooks) return hooks;
448
+ return nitroApp.hooks = new t$1();
449
+ }
450
+ function createMethodNotAllowedMatcher(findRoute, methods) {
451
+ return (method, pathname) => {
452
+ let allow;
453
+ for (const m of methods) if (m !== method && findRoute(m, pathname)) allow = allow ? `${allow}, ${m}` : m;
454
+ if (!allow) return;
455
+ return { data: { handler: () => new HTTPError({
456
+ status: 405,
457
+ statusText: "Method Not Allowed",
458
+ message: `Method ${method} is not allowed for ${pathname} (allowed: ${allow})`,
459
+ headers: { allow }
460
+ }) } };
461
+ };
462
+ }
463
+ // ../../node_modules/.pnpm/nitro@3.0.261103-rc/node_modules/nitro/dist/runtime/internal/error/hooks.mjs
464
+ function _captureError(error, type) {
465
+ console.error(`[${type}]`, error);
466
+ useNitroApp().captureError?.(error, { tags: [type] });
467
+ }
468
+ function trapUnhandledErrors() {
469
+ process.on("unhandledRejection", (error) => _captureError(error, "unhandledRejection"));
470
+ process.on("uncaughtException", (error) => _captureError(error, "uncaughtException"));
471
+ }
472
+ // #nitro/virtual/server-entry
473
+ const serverEntryOptions = {};
474
+ // #nitro/virtual/tracing
475
+ const tracingSrvxPlugins = [];
476
+ // ../../node_modules/.pnpm/nitro@3.0.261103-rc/node_modules/nitro/dist/runtime/internal/serve.mjs
477
+ function resolveServeOptions(opts) {
478
+ const { port, hostname, tls, ...entryOptions } = serverEntryOptions;
479
+ const env = globalThis.process?.env || {};
480
+ const _parsedPort = Number.parseInt(env.NITRO_PORT ?? env.PORT ?? "");
481
+ const cert = env.NITRO_SSL_CERT;
482
+ const key = env.NITRO_SSL_KEY;
483
+ const socketPath = env.NITRO_UNIX_SOCKET;
484
+ const resolved = {
485
+ ...entryOptions,
486
+ port: Number.isNaN(_parsedPort) ? port ?? 3e3 : _parsedPort,
487
+ hostname: env.NITRO_HOST || env.HOST || hostname,
488
+ tls: cert && key ? {
489
+ cert,
490
+ key
491
+ } : tls,
492
+ ...opts,
493
+ plugins: [...tracingSrvxPlugins, ...opts.plugins || []]
494
+ };
495
+ for (const runtime of [
496
+ "node",
497
+ "bun",
498
+ "deno"
499
+ ]) if (entryOptions[runtime] && opts[runtime]) resolved[runtime] = {
500
+ ...entryOptions[runtime],
501
+ ...opts[runtime]
502
+ };
503
+ if (socketPath) {
504
+ resolved.node = {
505
+ ...resolved.node,
506
+ path: socketPath
507
+ };
508
+ resolved.bun = {
509
+ ...resolved.bun,
510
+ unix: socketPath
511
+ };
512
+ resolved.deno = {
513
+ ...resolved.deno,
514
+ path: socketPath
515
+ };
516
+ }
517
+ return resolved;
518
+ }
519
+ // ../../node_modules/.pnpm/nitro@3.0.261103-rc/node_modules/nitro/dist/runtime/internal/shutdown.mjs
520
+ function setupCloseHooks(server) {
521
+ const closeServer = server.close.bind(server);
522
+ let closeHooks;
523
+ server.close = (closeActiveConnections) => closeServer(closeActiveConnections).finally(() => closeHooks ??= callCloseHooks());
524
+ }
525
+ async function callCloseHooks() {
526
+ try {
527
+ await useNitroHooks().callHook("close");
528
+ } catch (error) {
529
+ console.error("[nitro] Error while calling `close` hooks:", error);
530
+ }
531
+ }
532
+ // ../../node_modules/.pnpm/nitro@3.0.261103-rc/node_modules/nitro/dist/presets/node/runtime/node-server.mjs
533
+ const nitroApp = useNitroApp();
534
+ const server = serve(resolveServeOptions({ fetch: nitroApp.fetch }));
535
+ server.ready().catch((error) => {
536
+ console.error("[nitro] Failed to start server:", error);
537
+ process.exit(1);
538
+ });
539
+ setupCloseHooks(server);
540
+ trapUnhandledErrors();
541
+ var node_server_default = {};
542
+ export { node_server_default as default };
@@ -0,0 +1 @@
1
+ :root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;color:#ececf2;--bg:#111319;--panel:#1a1b25eb;--panel-strong:#202130;--border:#ffffff1a;--muted:#a2a4ae;--faint:#6d7080;--primary:#c4b5fd;--primary-soft:#c4b5fd24;--green:#79d6a0;--red:#f47d91;--amber:#e4b95e;background:#111319;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}html,body,#app{width:100%;height:100%;margin:0}body{background:var(--bg);min-width:1040px;overflow:hidden}button,input,select,textarea{font:inherit}button{color:inherit}.icon-glyph{display:block}.app-shell{background-color:var(--bg);background-image:radial-gradient(var(--border) 1px, transparent 1px);background-size:18px 18px;flex-direction:column;gap:14px;height:100%;padding:16px;display:flex;overflow:auto}.panel{border:1px solid var(--border);background:var(--panel);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-radius:16px;box-shadow:0 18px 55px #0000003d}.topbar{grid-template-columns:240px minmax(0,1fr) auto;align-items:center;gap:20px;min-height:64px;padding:10px 14px;display:grid}.brand,.brand>div,.section-title,.top-actions,.button-row,.manual-options,.history-actions,.target-status{align-items:center;display:flex}.brand{gap:10px}.brand-mark{object-fit:contain;flex:none;width:34px;height:34px}.brand>div{align-items:baseline;gap:7px}.brand strong{letter-spacing:-.02em;font-size:15px}.brand span,.section-title span,.target-status small,.hint{color:var(--muted);font-size:11px}.target-status{min-width:0;color:var(--muted);gap:8px;font-size:12px}.target-status small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.status-dot{background:var(--faint);border-radius:50%;width:8px;height:8px;box-shadow:0 0 0 3px #6d70801f}.target-status.online{color:var(--green)}.target-status.online .status-dot{background:var(--green);box-shadow:0 0 0 3px #79d6a01f}.top-actions{gap:8px}.notice{z-index:80;border:1px solid var(--border);max-width:min(560px,100vw - 32px);color:var(--muted);background:var(--panel-strong);pointer-events:none;border-radius:10px;padding:10px 14px;font-size:12px;position:fixed;top:24px;left:50%;transform:translate(-50%)}.notice-success{color:var(--green);border-color:#79d6a059}.notice-error{color:var(--red);border-color:#f47d9159}.silkworm-notice-enter-active,.silkworm-notice-leave-active{transition:opacity .2s,transform .22s cubic-bezier(.22,1,.36,1)}.silkworm-notice-enter-from,.silkworm-notice-leave-to{opacity:0;transform:translate(-50%,-14px)}.connection{flex:none;padding:16px}.connection-inline{grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:14px;display:grid}.connection-inline .field{grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:10px;display:grid}.connection-inline .field span{white-space:nowrap}.section-title{justify-content:space-between;gap:12px;margin-bottom:14px}.section-title>div{flex-direction:column;gap:3px;min-width:0;display:flex}.section-title strong{font-size:14px}.section-title span{font-size:11px}.hint{white-space:nowrap}.form-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;display:grid}.connection-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.field{flex-direction:column;gap:6px;min-width:0;display:flex}.field.wide{grid-column:span 2}.field span{color:var(--muted);letter-spacing:.07em;text-transform:uppercase;font-size:10px;font-weight:700}.field input,.field select,.field textarea{border:1px solid var(--border);width:100%;min-width:0;color:inherit;background:#7f7f7f12;border-radius:9px;outline:none;padding:8px 9px;font-size:12px}.field select{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}.field select option{color:#ececf2;background:var(--panel-strong)}.field select option:checked{color:#17131e;background:var(--primary)}.field textarea{resize:vertical;font-family:Geist Mono,SFMono-Regular,Consolas,monospace;line-height:1.5}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}.connection-feedback{color:var(--green);margin-top:12px;font-size:11px}.connection-feedback.failed{color:var(--red)}.control-grid{flex:auto;align-items:stretch;gap:14px;min-height:360px;display:flex}.mode-panel{flex-direction:column;min-width:0;min-height:0;padding:16px;display:flex}.control-grid>.mode-panel{flex:1 1 0}.quick-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.manual-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.manual-quick-grid .field.wide{grid-column:1/-1}.mode-state,.status-pill{text-transform:uppercase;background:#7f7f7f1a;border-radius:6px;padding:4px 7px;font-weight:700;color:var(--muted)!important;font-size:10px!important}.status-running,.status-accepted{background:#79d6a01f;color:var(--green)!important}.status-paused,.status-queued,.status-sent{background:#e4b95e1f;color:var(--amber)!important}.status-failed{background:#f47d911f;color:var(--red)!important}.status-duplicate{background:var(--primary-soft);color:var(--primary)!important}.check-row{color:var(--muted);align-items:center;gap:7px;margin-top:12px;font-size:11px;display:flex}.button-row{gap:8px;margin-top:14px}.control-hint{color:var(--faint);font-size:11px}.button,.link-button{cursor:pointer;border:0;border-radius:9px}.button{padding:8px 11px;font-size:12px;font-weight:700}.button:disabled{cursor:not-allowed;opacity:.4}.button.primary{color:#17131e;background:var(--primary)}.button.secondary{border:1px solid var(--border);color:var(--muted);background:#7f7f7f12}.button.danger{color:var(--red);background:#f47d911a}.link-button{color:var(--primary);background:0 0;padding:3px 0;font-size:11px}.manual-options{gap:16px;margin-top:12px}.field.compact{width:120px}.stats-row{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:14px;display:grid}.stat{justify-content:space-between;align-items:baseline;padding:12px 14px;display:flex}.stat span{color:var(--muted);font-size:11px}.stat strong{font-size:20px}.success-text{color:var(--green)}.error-text{color:var(--red)}.history-panel{min-height:210px;margin-top:14px;padding:16px}.history-actions{flex-direction:row;align-items:center;gap:6px;margin-left:auto;display:flex}.section-title>.history-actions{flex-direction:row}.icon-button{width:30px;height:30px;color:var(--muted);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:7px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.icon-button:hover{color:var(--primary);border-color:var(--border);background:#c4b5fd12}.message{color:var(--green)!important}.error-message{text-overflow:ellipsis;white-space:nowrap;max-width:420px;overflow:hidden;color:var(--red)!important}.empty-state{min-height:120px;color:var(--muted);flex-direction:column;justify-content:center;align-items:center;gap:7px;display:flex}.empty-state strong{color:#ececf2;font-size:13px}.empty-state span{font-size:11px}.history-list{max-height:310px;overflow:auto}.history-row{border-radius:8px;grid-template-columns:82px 58px minmax(120px,1fr) 70px 78px minmax(100px,1fr);align-items:center;gap:10px;min-height:34px;padding:4px 8px;font-family:Geist Mono,SFMono-Regular,Consolas,monospace;font-size:10px;display:grid}.history-row:hover{background:#c4b5fd0f}.history-row time,.history-summary,.attempt-count,.history-error{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mode-pill{width:fit-content;color:var(--primary);background:var(--primary-soft);text-transform:uppercase;border-radius:5px;padding:3px 5px;font-size:9px}.attempt-count{text-align:right}.history-error{color:var(--red)}.stats-strip{width:100%;min-height:48px;color:var(--muted);text-align:left;cursor:pointer;flex:none;align-items:center;gap:20px;padding:8px 14px;display:flex}.stats-strip>span{align-items:baseline;gap:7px;display:inline-flex}.stats-strip small{color:var(--faint);text-transform:uppercase;font-size:10px}.stats-strip strong{color:#ececf2;font-size:15px}.stats-strip .success-text{color:var(--green)}.stats-strip .error-text{color:var(--red)}.stats-strip-hint{color:var(--primary);margin-left:auto;font-size:11px}.history-drawer-backdrop{z-index:40;background:#000000ad;align-items:flex-end;padding:16px 16px 92px;display:flex;position:fixed;inset:0}.history-drawer{width:100%;max-height:min(70vh,680px);padding:16px;overflow:hidden}.history-drawer .section-title{flex-wrap:nowrap}.drawer-stats{margin-top:0;margin-bottom:14px}.history-drawer .history-list{max-height:300px}.silkworm-drawer-enter-active,.silkworm-drawer-leave-active{transition:opacity .22s}.silkworm-drawer-enter-active .history-drawer,.silkworm-drawer-leave-active .history-drawer{transition:transform .24s cubic-bezier(.22,1,.36,1),opacity .22s}.silkworm-drawer-enter-from,.silkworm-drawer-leave-to{opacity:0}.silkworm-drawer-enter-from .history-drawer,.silkworm-drawer-leave-to .history-drawer{opacity:0;transform:translateY(24px)}.modal-backdrop{z-index:30;background:#000000ad;place-items:center;padding:24px;display:grid;position:fixed;inset:0}.silkworm-modal-enter-active,.silkworm-modal-leave-active{transition:opacity .18s}.silkworm-modal-enter-active>*,.silkworm-modal-leave-active>*{transition:transform .2s cubic-bezier(.22,1,.36,1),opacity .18s}.silkworm-modal-enter-from,.silkworm-modal-leave-to{opacity:0}.silkworm-modal-enter-from>*,.silkworm-modal-leave-to>*{opacity:0;transform:scale(.96)}.modal-card{width:min(680px,100%);max-height:82vh;padding:16px;overflow:auto}.modal-card.modal-wide{width:min(860px,100%)}.modal-card .section-title{margin-bottom:16px}.preview-modal{width:min(760px,100%);max-height:80vh;padding:16px}.preview-modal pre{border:1px solid var(--border);color:#d9d1ff;white-space:pre-wrap;background:#11131b;border-radius:10px;max-height:62vh;margin:0;padding:14px;font:12px/1.6 Geist Mono,SFMono-Regular,Consolas,monospace;overflow:auto}@media (width<=1180px){body{min-width:0}.topbar{grid-template-columns:190px minmax(0,1fr)}.top-actions{grid-column:2;justify-content:flex-end}.control-grid{flex-direction:column}.manual-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=720px){.connection-inline,.manual-quick-grid,.connection-inline .field{grid-template-columns:1fr}.stats-strip{gap:10px}.stats-strip>span{gap:4px}.stats-strip small{display:none}}@media (prefers-reduced-motion:reduce){.silkworm-drawer-enter-active,.silkworm-drawer-leave-active,.silkworm-drawer-enter-active .history-drawer,.silkworm-drawer-leave-active .history-drawer,.silkworm-modal-enter-active,.silkworm-modal-leave-active,.silkworm-modal-enter-active>*,.silkworm-modal-leave-active>*,.silkworm-notice-enter-active,.silkworm-notice-leave-active{transition-duration:.01ms!important}}