@warlock.js/devtools 5.54.0 → 5.56.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/CHANGELOG.md +36 -0
- package/README.md +26 -13
- package/cjs/{ai-source-CSPh1HqJ.cjs → ai-source-DTpxumMA.cjs} +54 -3
- package/cjs/{ai-source-CSPh1HqJ.cjs.map → ai-source-DTpxumMA.cjs.map} +1 -1
- package/cjs/auth-DzU0gHDG.cjs +1655 -0
- package/cjs/auth-DzU0gHDG.cjs.map +1 -0
- package/cjs/boot-BQi0Etor.cjs +138 -0
- package/cjs/boot-BQi0Etor.cjs.map +1 -0
- package/cjs/capture-CqIiaznN.cjs +1342 -0
- package/cjs/capture-CqIiaznN.cjs.map +1 -0
- package/cjs/cascade-store-pHjKeSFm.cjs +863 -0
- package/cjs/cascade-store-pHjKeSFm.cjs.map +1 -0
- package/cjs/collector-CJbQbzzK.cjs +271 -0
- package/cjs/collector-CJbQbzzK.cjs.map +1 -0
- package/cjs/contracts-CVmplkNb.cjs +112 -0
- package/cjs/contracts-CVmplkNb.cjs.map +1 -0
- package/cjs/current-request-id-BoJJb3y7.cjs +37 -0
- package/cjs/current-request-id-BoJJb3y7.cjs.map +1 -0
- package/cjs/errors-CyZp5yS-.cjs +177 -0
- package/cjs/errors-CyZp5yS-.cjs.map +1 -0
- package/cjs/histogram-BaI-PnCv.cjs +102 -0
- package/cjs/histogram-BaI-PnCv.cjs.map +1 -0
- package/cjs/http-CabcUwBx.cjs +870 -0
- package/cjs/http-CabcUwBx.cjs.map +1 -0
- package/cjs/index.cjs +1 -1
- package/cjs/insights-BKtqxdnP.cjs +811 -0
- package/cjs/insights-BKtqxdnP.cjs.map +1 -0
- package/cjs/ip-DbNhPOzi.cjs +153 -0
- package/cjs/ip-DbNhPOzi.cjs.map +1 -0
- package/cjs/migrations-w7GMsrQw.cjs +297 -0
- package/cjs/migrations-w7GMsrQw.cjs.map +1 -0
- package/cjs/openapi-CC7OAUc6.cjs +52 -0
- package/cjs/openapi-CC7OAUc6.cjs.map +1 -0
- package/cjs/options-CWqFC5__.cjs +181 -0
- package/cjs/options-CWqFC5__.cjs.map +1 -0
- package/cjs/panels-B0dAfGbJ.cjs +298 -0
- package/cjs/panels-B0dAfGbJ.cjs.map +1 -0
- package/cjs/process-panel-DEOnLxoT.cjs +48 -0
- package/cjs/process-panel-DEOnLxoT.cjs.map +1 -0
- package/cjs/production/index.cjs +238 -0
- package/cjs/production/index.cjs.map +1 -0
- package/cjs/rolldown-runtime-Zuuoy_Rh.cjs +52 -0
- package/cjs/server-B6xdeKS8.cjs +184 -0
- package/cjs/server-B6xdeKS8.cjs.map +1 -0
- package/cjs/{src-BzuntLcd.cjs → src-Ce-3Lniv.cjs} +171 -308
- package/cjs/src-Ce-3Lniv.cjs.map +1 -0
- package/cjs/store-aq207T8v.cjs +9 -0
- package/cjs/stream-route-BGJa-zQu.cjs +875 -0
- package/cjs/stream-route-BGJa-zQu.cjs.map +1 -0
- package/esm/devtools-connector.d.mts +16 -12
- package/esm/devtools-connector.d.mts.map +1 -1
- package/esm/devtools-connector.mjs +137 -18
- package/esm/devtools-connector.mjs.map +1 -1
- package/esm/index.d.mts +3 -2
- package/esm/options.mjs +3 -1
- package/esm/options.mjs.map +1 -1
- package/esm/panels.mjs +267 -0
- package/esm/panels.mjs.map +1 -0
- package/esm/process-panel.mjs +20 -1
- package/esm/process-panel.mjs.map +1 -1
- package/esm/production/auth/common-passwords.mjs +303 -0
- package/esm/production/auth/common-passwords.mjs.map +1 -0
- package/esm/production/auth/default-crypto.mjs +19 -0
- package/esm/production/auth/default-crypto.mjs.map +1 -0
- package/esm/production/auth/helpers.mjs +77 -0
- package/esm/production/auth/helpers.mjs.map +1 -0
- package/esm/production/auth/index.mjs +6 -0
- package/esm/production/auth/passkeys.mjs +96 -0
- package/esm/production/auth/passkeys.mjs.map +1 -0
- package/esm/production/auth/service.mjs +1166 -0
- package/esm/production/auth/service.mjs.map +1 -0
- package/esm/production/boot.mjs +138 -0
- package/esm/production/boot.mjs.map +1 -0
- package/esm/production/capture/dev-stats.mjs +83 -0
- package/esm/production/capture/dev-stats.mjs.map +1 -0
- package/esm/production/capture/engine.mjs +442 -0
- package/esm/production/capture/engine.mjs.map +1 -0
- package/esm/production/capture/explain.mjs +271 -0
- package/esm/production/capture/explain.mjs.map +1 -0
- package/esm/production/capture/filter.mjs +24 -0
- package/esm/production/capture/filter.mjs.map +1 -0
- package/esm/production/capture/index.mjs +7 -0
- package/esm/production/capture/production-capture.mjs +134 -0
- package/esm/production/capture/production-capture.mjs.map +1 -0
- package/esm/production/capture/redact.mjs +109 -0
- package/esm/production/capture/redact.mjs.map +1 -0
- package/esm/production/capture/stats-stores.mjs +300 -0
- package/esm/production/capture/stats-stores.mjs.map +1 -0
- package/esm/production/cli/actions.mjs +151 -0
- package/esm/production/cli/actions.mjs.map +1 -0
- package/esm/production/cli/index.d.mts +17 -0
- package/esm/production/cli/index.d.mts.map +1 -0
- package/esm/production/cli/index.mjs +86 -0
- package/esm/production/cli/index.mjs.map +1 -0
- package/esm/production/contracts.d.mts +592 -0
- package/esm/production/contracts.d.mts.map +1 -0
- package/esm/production/contracts.mjs +95 -0
- package/esm/production/contracts.mjs.map +1 -0
- package/esm/production/errors.d.mts +31 -0
- package/esm/production/errors.d.mts.map +1 -0
- package/esm/production/errors.mjs +142 -0
- package/esm/production/errors.mjs.map +1 -0
- package/esm/production/http/access.mjs +124 -0
- package/esm/production/http/access.mjs.map +1 -0
- package/esm/production/http/auth-routes.mjs +280 -0
- package/esm/production/http/auth-routes.mjs.map +1 -0
- package/esm/production/http/client.mjs +57 -0
- package/esm/production/http/client.mjs.map +1 -0
- package/esm/production/http/constants.mjs +11 -0
- package/esm/production/http/constants.mjs.map +1 -0
- package/esm/production/http/context.mjs +14 -0
- package/esm/production/http/context.mjs.map +1 -0
- package/esm/production/http/cookie.mjs +39 -0
- package/esm/production/http/cookie.mjs.map +1 -0
- package/esm/production/http/headers.mjs +25 -0
- package/esm/production/http/headers.mjs.map +1 -0
- package/esm/production/http/index.mjs +10 -0
- package/esm/production/http/ip.mjs +130 -0
- package/esm/production/http/ip.mjs.map +1 -0
- package/esm/production/http/mount.mjs +300 -0
- package/esm/production/http/mount.mjs.map +1 -0
- package/esm/production/http/state.mjs +54 -0
- package/esm/production/http/state.mjs.map +1 -0
- package/esm/production/index.d.mts +6 -0
- package/esm/production/index.mjs +5 -0
- package/esm/production/insights/cap-report.mjs +67 -0
- package/esm/production/insights/cap-report.mjs.map +1 -0
- package/esm/production/insights/health.mjs +88 -0
- package/esm/production/insights/health.mjs.map +1 -0
- package/esm/production/insights/index.mjs +10 -0
- package/esm/production/insights/insights.mjs +167 -0
- package/esm/production/insights/insights.mjs.map +1 -0
- package/esm/production/insights/instance.mjs +24 -0
- package/esm/production/insights/instance.mjs.map +1 -0
- package/esm/production/insights/jobs.mjs +100 -0
- package/esm/production/insights/jobs.mjs.map +1 -0
- package/esm/production/insights/reporter.mjs +59 -0
- package/esm/production/insights/reporter.mjs.map +1 -0
- package/esm/production/insights/resources.mjs +139 -0
- package/esm/production/insights/resources.mjs.map +1 -0
- package/esm/production/insights/writer.mjs +72 -0
- package/esm/production/insights/writer.mjs.map +1 -0
- package/esm/production/openapi.mjs +52 -0
- package/esm/production/openapi.mjs.map +1 -0
- package/esm/production/options.d.mts +60 -0
- package/esm/production/options.d.mts.map +1 -0
- package/esm/production/options.mjs +170 -0
- package/esm/production/options.mjs.map +1 -0
- package/esm/production/stats/histogram.mjs +67 -0
- package/esm/production/stats/histogram.mjs.map +1 -0
- package/esm/production/stats/merge.mjs +106 -0
- package/esm/production/stats/merge.mjs.map +1 -0
- package/esm/production/store/cascade-store.mjs +322 -0
- package/esm/production/store/cascade-store.mjs.map +1 -0
- package/esm/production/store/index.mjs +5 -0
- package/esm/production/store/mapping.mjs +258 -0
- package/esm/production/store/mapping.mjs.map +1 -0
- package/esm/production/store/memory-store.mjs +291 -0
- package/esm/production/store/memory-store.mjs.map +1 -0
- package/esm/production/store/migrations.d.mts +11 -0
- package/esm/production/store/migrations.d.mts.map +1 -0
- package/esm/production/store/migrations.mjs +29 -0
- package/esm/production/store/migrations.mjs.map +1 -0
- package/esm/production/store/models/account.migration.mjs +34 -0
- package/esm/production/store/models/account.migration.mjs.map +1 -0
- package/esm/production/store/models/account.model.mjs +13 -0
- package/esm/production/store/models/account.model.mjs.map +1 -0
- package/esm/production/store/models/audit.migration.mjs +30 -0
- package/esm/production/store/models/audit.migration.mjs.map +1 -0
- package/esm/production/store/models/audit.model.mjs +13 -0
- package/esm/production/store/models/audit.model.mjs.map +1 -0
- package/esm/production/store/models/base.mjs +27 -0
- package/esm/production/store/models/base.mjs.map +1 -0
- package/esm/production/store/models/index.mjs +17 -0
- package/esm/production/store/models/invite.migration.mjs +26 -0
- package/esm/production/store/models/invite.migration.mjs.map +1 -0
- package/esm/production/store/models/invite.model.mjs +13 -0
- package/esm/production/store/models/invite.model.mjs.map +1 -0
- package/esm/production/store/models/report.migration.mjs +20 -0
- package/esm/production/store/models/report.migration.mjs.map +1 -0
- package/esm/production/store/models/report.model.mjs +13 -0
- package/esm/production/store/models/report.model.mjs.map +1 -0
- package/esm/production/store/models/sample.migration.mjs +25 -0
- package/esm/production/store/models/sample.migration.mjs.map +1 -0
- package/esm/production/store/models/sample.model.mjs +13 -0
- package/esm/production/store/models/sample.model.mjs.map +1 -0
- package/esm/production/store/models/session.migration.mjs +31 -0
- package/esm/production/store/models/session.migration.mjs.map +1 -0
- package/esm/production/store/models/session.model.mjs +13 -0
- package/esm/production/store/models/session.model.mjs.map +1 -0
- package/esm/production/store/models/state.migration.mjs +26 -0
- package/esm/production/store/models/state.migration.mjs.map +1 -0
- package/esm/production/store/models/state.model.mjs +13 -0
- package/esm/production/store/models/state.model.mjs.map +1 -0
- package/esm/query-shape.mjs +14 -1
- package/esm/query-shape.mjs.map +1 -1
- package/esm/server/explain-route.mjs +26 -1
- package/esm/server/explain-route.mjs.map +1 -1
- package/esm/server/index.mjs +16 -6
- package/esm/server/index.mjs.map +1 -1
- package/esm/server/insights-routes.mjs +62 -0
- package/esm/server/insights-routes.mjs.map +1 -0
- package/esm/server/log-routes.mjs +32 -5
- package/esm/server/log-routes.mjs.map +1 -1
- package/esm/server/openapi-routes.mjs +3 -2
- package/esm/server/openapi-routes.mjs.map +1 -1
- package/esm/server/panel-routes.mjs +44 -0
- package/esm/server/panel-routes.mjs.map +1 -0
- package/esm/server/requests-routes.mjs +125 -0
- package/esm/server/requests-routes.mjs.map +1 -1
- package/esm/server/session-routes.mjs +42 -0
- package/esm/server/session-routes.mjs.map +1 -0
- package/esm/server/stream-route.mjs +81 -11
- package/esm/server/stream-route.mjs.map +1 -1
- package/esm/server/ui-assets.mjs +34 -12
- package/esm/server/ui-assets.mjs.map +1 -1
- package/esm/sources/log-source.mjs +14 -1
- package/esm/sources/log-source.mjs.map +1 -1
- package/esm/types.d.mts +271 -1
- package/esm/types.d.mts.map +1 -1
- package/esm/ui-root.mjs +11 -6
- package/esm/ui-root.mjs.map +1 -1
- package/llms-full.txt +208 -19
- package/llms.txt +2 -2
- package/package.json +32 -8
- package/skills/SKILL.md +208 -19
- package/ui/dashboard/assets/app.css +3 -0
- package/ui/dashboard/assets/app.js +50 -0
- package/ui/dashboard/build-info.json +21 -0
- package/ui/dashboard/index.html +15 -0
- package/ui/panels/processes.js +15 -0
- package/cjs/server-BlQshJLE.cjs +0 -658
- package/cjs/server-BlQshJLE.cjs.map +0 -1
- package/cjs/src-BzuntLcd.cjs.map +0 -1
- package/esm/server/process-routes.mjs +0 -11
- package/esm/server/process-routes.mjs.map +0 -1
- package/ui/app.css +0 -376
- package/ui/app.js +0 -1054
- package/ui/index.html +0 -28
package/esm/panels.mjs
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { DEVTOOLS_BUILT_IN_PANELS } from "./production/contracts.mjs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
|
+
|
|
7
|
+
//#region ../../packages/devtools/src/panels.ts
|
|
8
|
+
/**
|
|
9
|
+
* Ids the dashboard already uses for its own tabs, API segments and URLs. A
|
|
10
|
+
* panel's routes live under `<path>/api/<id>`, so these would collide.
|
|
11
|
+
*/
|
|
12
|
+
const RESERVED_PANEL_IDS = /* @__PURE__ */ new Set([
|
|
13
|
+
"account",
|
|
14
|
+
"admin",
|
|
15
|
+
"agents",
|
|
16
|
+
"ai",
|
|
17
|
+
"api",
|
|
18
|
+
"assets",
|
|
19
|
+
"auth",
|
|
20
|
+
"background",
|
|
21
|
+
"docs",
|
|
22
|
+
"errors",
|
|
23
|
+
"health",
|
|
24
|
+
"instances",
|
|
25
|
+
"jobs",
|
|
26
|
+
"logs",
|
|
27
|
+
"mail",
|
|
28
|
+
"mails",
|
|
29
|
+
"panels",
|
|
30
|
+
"queries",
|
|
31
|
+
"requests",
|
|
32
|
+
"resources",
|
|
33
|
+
"routes",
|
|
34
|
+
"stream"
|
|
35
|
+
]);
|
|
36
|
+
const PANEL_ID = /^[a-z][a-z0-9-]*$/;
|
|
37
|
+
const ASSET_NAME = /^[A-Za-z0-9_][A-Za-z0-9._-]*$/;
|
|
38
|
+
const METHODS = /* @__PURE__ */ new Set([
|
|
39
|
+
"GET",
|
|
40
|
+
"POST",
|
|
41
|
+
"PUT",
|
|
42
|
+
"PATCH",
|
|
43
|
+
"DELETE"
|
|
44
|
+
]);
|
|
45
|
+
/** Content types for the files a panel may serve; anything else is sent as bytes. */
|
|
46
|
+
const CONTENT_TYPES = {
|
|
47
|
+
".js": "text/javascript; charset=utf-8",
|
|
48
|
+
".mjs": "text/javascript; charset=utf-8",
|
|
49
|
+
".css": "text/css; charset=utf-8",
|
|
50
|
+
".json": "application/json; charset=utf-8",
|
|
51
|
+
".svg": "image/svg+xml",
|
|
52
|
+
".png": "image/png",
|
|
53
|
+
".woff2": "font/woff2"
|
|
54
|
+
};
|
|
55
|
+
/** The content type a panel file is served with, from its served name. */
|
|
56
|
+
function panelContentType(name) {
|
|
57
|
+
return CONTENT_TYPES[path.extname(name).toLowerCase()] ?? "application/octet-stream";
|
|
58
|
+
}
|
|
59
|
+
/** An absolute file path from a path or `file:` URL, or `undefined` for anything else. */
|
|
60
|
+
function toFilePath(value) {
|
|
61
|
+
if (value instanceof URL) return value.protocol === "file:" ? fileURLToPath(value) : void 0;
|
|
62
|
+
if (typeof value !== "string" || value === "") return void 0;
|
|
63
|
+
if (value.startsWith("file:")) return fileURLToPath(value);
|
|
64
|
+
return path.isAbsolute(value) ? value : void 0;
|
|
65
|
+
}
|
|
66
|
+
function isFile(file) {
|
|
67
|
+
return existsSync(file) && statSync(file).isFile();
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Validates `value` as a panel and returns it ready to mount. Throws an
|
|
71
|
+
* error that names the panel and what to change; `taken` maps the ids
|
|
72
|
+
* already registered to their titles and receives this panel's id.
|
|
73
|
+
*/
|
|
74
|
+
function checkDevtoolsPanel(value, taken) {
|
|
75
|
+
const panel = value ?? {};
|
|
76
|
+
const id = panel.id;
|
|
77
|
+
if (typeof id !== "string" || !PANEL_ID.test(id)) throw new Error(`A devtools panel needs an "id" of lower-case letters, digits and dashes that starts with a letter; got ${JSON.stringify(id)}.`);
|
|
78
|
+
if (RESERVED_PANEL_IDS.has(id)) throw new Error(`Devtools panel id "${id}" is used by the dashboard itself; give the panel another id.`);
|
|
79
|
+
const existing = taken.get(id);
|
|
80
|
+
if (existing !== void 0) throw new Error(`Devtools panel id "${id}" is already registered by the "${existing}" panel; each panel needs its own id.`);
|
|
81
|
+
if (typeof panel.title !== "string" || panel.title.trim() === "") throw new Error(`Devtools panel "${id}" needs a "title" for its tab.`);
|
|
82
|
+
const view = toFilePath(panel.view);
|
|
83
|
+
if (view === void 0) throw new Error(`Devtools panel "${id}" needs a "view": an absolute path or file: URL of its browser module.`);
|
|
84
|
+
if (!isFile(view)) throw new Error(`The view module of devtools panel "${id}" was not found at ${view}.`);
|
|
85
|
+
const seen = /* @__PURE__ */ new Set();
|
|
86
|
+
const routes = (panel.routes ?? []).map((route) => {
|
|
87
|
+
const method = route.method ?? "GET";
|
|
88
|
+
if (!METHODS.has(method)) throw new Error(`Devtools panel "${id}" has a route with method "${String(method)}"; use GET, POST, PUT, PATCH or DELETE.`);
|
|
89
|
+
if (typeof route.path !== "string" || route.path !== "" && !route.path.startsWith("/")) throw new Error(`Devtools panel "${id}" has a route path ${JSON.stringify(route.path)}; use "" or a path starting with "/".`);
|
|
90
|
+
if (typeof route.handler !== "function") throw new Error(`Devtools panel "${id}" route ${method} "${route.path}" has no handler.`);
|
|
91
|
+
if (seen.has(`${method} ${route.path}`)) throw new Error(`Devtools panel "${id}" lists route ${method} "${route.path}" twice; keep one.`);
|
|
92
|
+
seen.add(`${method} ${route.path}`);
|
|
93
|
+
return {
|
|
94
|
+
...route,
|
|
95
|
+
method
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
const assets = {};
|
|
99
|
+
for (const [name, source] of Object.entries(panel.assets ?? {})) {
|
|
100
|
+
if (!ASSET_NAME.test(name) || name === "view.js") throw new Error(`Devtools panel "${id}" has an asset named ${JSON.stringify(name)}; use a plain file name other than "view.js".`);
|
|
101
|
+
const file = toFilePath(source);
|
|
102
|
+
if (file === void 0 || !isFile(file)) throw new Error(`The asset "${name}" of devtools panel "${id}" was not found at ${String(source)}; give an absolute path or file: URL.`);
|
|
103
|
+
assets[name] = file;
|
|
104
|
+
}
|
|
105
|
+
taken.set(id, panel.title);
|
|
106
|
+
return {
|
|
107
|
+
id,
|
|
108
|
+
title: panel.title,
|
|
109
|
+
view,
|
|
110
|
+
routes,
|
|
111
|
+
assets,
|
|
112
|
+
production: panel.production === true
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/** Validates a list of panels; the first invalid or duplicate one throws. */
|
|
116
|
+
function checkDevtoolsPanels(panels) {
|
|
117
|
+
const taken = /* @__PURE__ */ new Map();
|
|
118
|
+
return panels.map((panel) => checkDevtoolsPanel(panel, taken));
|
|
119
|
+
}
|
|
120
|
+
/** The URL or specifier to import for a `panels` entry. */
|
|
121
|
+
function resolvePanelSpecifier(entry, root) {
|
|
122
|
+
if (entry.startsWith("./") || entry.startsWith("../") || path.isAbsolute(entry)) return pathToFileURL(path.resolve(root, entry)).href;
|
|
123
|
+
return resolveFromNodeModules(entry, root) ?? resolveWithRequire(entry, root) ?? entry;
|
|
124
|
+
}
|
|
125
|
+
/** Picks the file an `exports` target names: `import`, then `default`, then `node`. */
|
|
126
|
+
function exportTarget(target) {
|
|
127
|
+
if (typeof target === "string") return target;
|
|
128
|
+
if (Array.isArray(target)) {
|
|
129
|
+
for (const item of target) {
|
|
130
|
+
const found = exportTarget(item);
|
|
131
|
+
if (found !== void 0) return found;
|
|
132
|
+
}
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (target !== null && typeof target === "object") {
|
|
136
|
+
const conditions = target;
|
|
137
|
+
for (const condition of [
|
|
138
|
+
"import",
|
|
139
|
+
"node",
|
|
140
|
+
"default"
|
|
141
|
+
]) {
|
|
142
|
+
const found = exportTarget(conditions[condition]);
|
|
143
|
+
if (found !== void 0) return found;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Resolves a package specifier by looking it up in the `node_modules` folders
|
|
149
|
+
* above the app root and reading its `exports` map. `createRequire().resolve`
|
|
150
|
+
* cannot do this for a package that only has an `import` condition.
|
|
151
|
+
*/
|
|
152
|
+
function resolveFromNodeModules(entry, root) {
|
|
153
|
+
const parts = entry.split("/");
|
|
154
|
+
const nameLength = entry.startsWith("@") ? 2 : 1;
|
|
155
|
+
const name = parts.slice(0, nameLength).join("/");
|
|
156
|
+
const subpath = parts.length > nameLength ? `./${parts.slice(nameLength).join("/")}` : ".";
|
|
157
|
+
if (!name) return void 0;
|
|
158
|
+
let directory = path.resolve(root);
|
|
159
|
+
for (;;) {
|
|
160
|
+
const packageDirectory = path.join(directory, "node_modules", name);
|
|
161
|
+
const manifestFile = path.join(packageDirectory, "package.json");
|
|
162
|
+
if (existsSync(manifestFile)) try {
|
|
163
|
+
const manifest = JSON.parse(readFileSync(manifestFile, "utf8"));
|
|
164
|
+
const exported = manifest.exports;
|
|
165
|
+
const map = exported !== null && typeof exported === "object" && !Array.isArray(exported) ? exported : void 0;
|
|
166
|
+
const hasSubpaths = map !== void 0 && Object.keys(map).some((key) => key.startsWith("."));
|
|
167
|
+
const target = exported === void 0 ? subpath === "." ? manifest.main ?? "index.js" : subpath : hasSubpaths ? exportTarget(map?.[subpath]) : subpath === "." ? exportTarget(exported) : void 0;
|
|
168
|
+
if (target === void 0) return void 0;
|
|
169
|
+
const file = path.resolve(packageDirectory, target);
|
|
170
|
+
return isFile(file) ? pathToFileURL(file).href : void 0;
|
|
171
|
+
} catch {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const parent = path.dirname(directory);
|
|
175
|
+
if (parent === directory) return void 0;
|
|
176
|
+
directory = parent;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
/** The `require` resolution, for packages the `node_modules` lookup does not understand. */
|
|
180
|
+
function resolveWithRequire(entry, root) {
|
|
181
|
+
try {
|
|
182
|
+
return pathToFileURL(createRequire(path.join(root, "package.json")).resolve(entry)).href;
|
|
183
|
+
} catch {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/** The panels a module's default export describes. */
|
|
188
|
+
async function panelsOf(exported, root, mode) {
|
|
189
|
+
const value = typeof exported === "function" ? await exported({
|
|
190
|
+
root,
|
|
191
|
+
mode
|
|
192
|
+
}) : exported;
|
|
193
|
+
return Array.isArray(value) ? value : [value];
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Loads the devtools `panels` option: imports each module entry, reads its
|
|
197
|
+
* default export, and validates every panel. An entry that fails to load and
|
|
198
|
+
* a panel that is invalid or reuses an id are reported through `warn` and
|
|
199
|
+
* skipped, so one broken panel never stops the dashboard.
|
|
200
|
+
*/
|
|
201
|
+
async function loadDevtoolsPanels(entries, options) {
|
|
202
|
+
if (!Array.isArray(entries)) {
|
|
203
|
+
options.warn(`The devtools "panels" option must be a list, such as panels: ["@warlock.js/grimoire/devtools"]; got ${JSON.stringify(entries)}. No panel was added.`);
|
|
204
|
+
return [];
|
|
205
|
+
}
|
|
206
|
+
const importModule = options.importModule ?? ((specifier) => import(specifier));
|
|
207
|
+
const mode = options.mode ?? "development";
|
|
208
|
+
const taken = new Map(options.taken ?? []);
|
|
209
|
+
const panels = [];
|
|
210
|
+
for (const entry of entries) {
|
|
211
|
+
let candidates;
|
|
212
|
+
try {
|
|
213
|
+
if (typeof entry === "string") {
|
|
214
|
+
const module = await importModule(resolvePanelSpecifier(entry, options.root));
|
|
215
|
+
if (module.default === void 0) throw new Error("the module has no default export");
|
|
216
|
+
candidates = await panelsOf(module.default, options.root, mode);
|
|
217
|
+
} else candidates = [entry];
|
|
218
|
+
} catch (error) {
|
|
219
|
+
options.warn(`Devtools panel module "${String(entry)}" could not be loaded: ${describe(error)}. Check that it is installed and listed correctly in the devtools "panels" option.`);
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
for (const candidate of candidates) try {
|
|
223
|
+
panels.push(checkDevtoolsPanel(candidate, taken));
|
|
224
|
+
} catch (error) {
|
|
225
|
+
options.warn(`${describe(error)} The panel was not added.`);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return panels;
|
|
229
|
+
}
|
|
230
|
+
function describe(error) {
|
|
231
|
+
return error instanceof Error ? error.message : String(error);
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Which tabs the production monitor shows. A built-in tab follows
|
|
235
|
+
* `DEVTOOLS_BUILT_IN_PANELS` unless `overrides[id]` says otherwise. A package
|
|
236
|
+
* panel (the Processes panel included) shows when it declares
|
|
237
|
+
* `production: true` or `overrides[id]` is `true`; `overrides[id]: false` turns
|
|
238
|
+
* any tab off.
|
|
239
|
+
*/
|
|
240
|
+
function productionPanels(packagePanels, overrides = {}) {
|
|
241
|
+
return {
|
|
242
|
+
builtIn: DEVTOOLS_BUILT_IN_PANELS.filter((tab) => overrides[tab.id] ?? tab.production).map((tab) => tab.id),
|
|
243
|
+
panels: packagePanels.filter((panel) => overrides[panel.id] ?? panel.production)
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* The tab list `GET api/panels` answers with: the built-in tabs in
|
|
248
|
+
* `builtIn` (default: every one), in display order, then the package panels
|
|
249
|
+
* in registration order.
|
|
250
|
+
*/
|
|
251
|
+
function listPanelInfos(panels, builtIn) {
|
|
252
|
+
const tabs = DEVTOOLS_BUILT_IN_PANELS.filter((tab) => builtIn === void 0 || builtIn.includes(tab.id)).map((tab) => ({
|
|
253
|
+
id: tab.id,
|
|
254
|
+
title: tab.title,
|
|
255
|
+
type: "built-in"
|
|
256
|
+
}));
|
|
257
|
+
for (const panel of panels) tabs.push({
|
|
258
|
+
id: panel.id,
|
|
259
|
+
title: panel.title,
|
|
260
|
+
type: "package"
|
|
261
|
+
});
|
|
262
|
+
return tabs;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
//#endregion
|
|
266
|
+
export { checkDevtoolsPanel, checkDevtoolsPanels, listPanelInfos, loadDevtoolsPanels, panelContentType, productionPanels };
|
|
267
|
+
//# sourceMappingURL=panels.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panels.mjs","names":[],"sources":["../../../../../../../packages/devtools/src/panels.ts"],"sourcesContent":["import { existsSync, readFileSync, statSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport path from \"node:path\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport { DEVTOOLS_BUILT_IN_PANELS } from \"./production/contracts\";\nimport type { DevtoolsMode, DevtoolsPanelInfo } from \"./production/contracts\";\nimport type {\n DevtoolsPanel,\n DevtoolsPanelExport,\n DevtoolsPanelMethod,\n DevtoolsPanelRoute,\n} from \"./types\";\n\n/**\n * A validated panel: file paths are absolute strings and every list is\n * present, so the server never re-checks them per request.\n */\nexport type MountedDevtoolsPanel = {\n id: string;\n title: string;\n view: string;\n routes: readonly (DevtoolsPanelRoute & { method: DevtoolsPanelMethod })[];\n assets: Readonly<Record<string, string>>;\n /** Whether the panel declared itself safe for the production monitor. */\n production: boolean;\n};\n\n/**\n * Ids the dashboard already uses for its own tabs, API segments and URLs. A\n * panel's routes live under `<path>/api/<id>`, so these would collide.\n */\nconst RESERVED_PANEL_IDS = new Set([\n \"account\",\n \"admin\",\n \"agents\",\n \"ai\",\n \"api\",\n \"assets\",\n \"auth\",\n \"background\",\n \"docs\",\n \"errors\",\n \"health\",\n \"instances\",\n \"jobs\",\n \"logs\",\n \"mail\",\n \"mails\",\n \"panels\",\n \"queries\",\n \"requests\",\n \"resources\",\n \"routes\",\n \"stream\",\n]);\n\nconst PANEL_ID = /^[a-z][a-z0-9-]*$/;\nconst ASSET_NAME = /^[A-Za-z0-9_][A-Za-z0-9._-]*$/;\nconst METHODS = new Set<DevtoolsPanelMethod>([\"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\"]);\n\n/** Content types for the files a panel may serve; anything else is sent as bytes. */\nconst CONTENT_TYPES: Record<string, string> = {\n \".js\": \"text/javascript; charset=utf-8\",\n \".mjs\": \"text/javascript; charset=utf-8\",\n \".css\": \"text/css; charset=utf-8\",\n \".json\": \"application/json; charset=utf-8\",\n \".svg\": \"image/svg+xml\",\n \".png\": \"image/png\",\n \".woff2\": \"font/woff2\",\n};\n\n/** The content type a panel file is served with, from its served name. */\nexport function panelContentType(name: string): string {\n return CONTENT_TYPES[path.extname(name).toLowerCase()] ?? \"application/octet-stream\";\n}\n\n/** An absolute file path from a path or `file:` URL, or `undefined` for anything else. */\nfunction toFilePath(value: unknown): string | undefined {\n if (value instanceof URL) return value.protocol === \"file:\" ? fileURLToPath(value) : undefined;\n if (typeof value !== \"string\" || value === \"\") return undefined;\n if (value.startsWith(\"file:\")) return fileURLToPath(value);\n\n return path.isAbsolute(value) ? value : undefined;\n}\n\nfunction isFile(file: string): boolean {\n return existsSync(file) && statSync(file).isFile();\n}\n\n/**\n * Validates `value` as a panel and returns it ready to mount. Throws an\n * error that names the panel and what to change; `taken` maps the ids\n * already registered to their titles and receives this panel's id.\n */\nexport function checkDevtoolsPanel(\n value: unknown,\n taken: Map<string, string>,\n): MountedDevtoolsPanel {\n const panel = (value ?? {}) as Partial<DevtoolsPanel>;\n const id = panel.id;\n\n if (typeof id !== \"string\" || !PANEL_ID.test(id)) {\n throw new Error(\n `A devtools panel needs an \"id\" of lower-case letters, digits and dashes that starts with a letter; got ${JSON.stringify(id)}.`,\n );\n }\n\n if (RESERVED_PANEL_IDS.has(id)) {\n throw new Error(\n `Devtools panel id \"${id}\" is used by the dashboard itself; give the panel another id.`,\n );\n }\n\n const existing = taken.get(id);\n\n if (existing !== undefined) {\n throw new Error(\n `Devtools panel id \"${id}\" is already registered by the \"${existing}\" panel; each panel needs its own id.`,\n );\n }\n\n if (typeof panel.title !== \"string\" || panel.title.trim() === \"\") {\n throw new Error(`Devtools panel \"${id}\" needs a \"title\" for its tab.`);\n }\n\n const view = toFilePath(panel.view);\n\n if (view === undefined) {\n throw new Error(\n `Devtools panel \"${id}\" needs a \"view\": an absolute path or file: URL of its browser module.`,\n );\n }\n\n if (!isFile(view)) {\n throw new Error(`The view module of devtools panel \"${id}\" was not found at ${view}.`);\n }\n\n // Two routes on one method and path would make the server refuse to start.\n const seen = new Set<string>();\n const routes = (panel.routes ?? []).map((route) => {\n const method = route.method ?? \"GET\";\n\n if (!METHODS.has(method)) {\n throw new Error(\n `Devtools panel \"${id}\" has a route with method \"${String(method)}\"; use GET, POST, PUT, PATCH or DELETE.`,\n );\n }\n\n if (typeof route.path !== \"string\" || (route.path !== \"\" && !route.path.startsWith(\"/\"))) {\n throw new Error(\n `Devtools panel \"${id}\" has a route path ${JSON.stringify(route.path)}; use \"\" or a path starting with \"/\".`,\n );\n }\n\n if (typeof route.handler !== \"function\") {\n throw new Error(`Devtools panel \"${id}\" route ${method} \"${route.path}\" has no handler.`);\n }\n\n if (seen.has(`${method} ${route.path}`)) {\n throw new Error(\n `Devtools panel \"${id}\" lists route ${method} \"${route.path}\" twice; keep one.`,\n );\n }\n\n seen.add(`${method} ${route.path}`);\n\n return { ...route, method };\n });\n\n const assets: Record<string, string> = {};\n\n for (const [name, source] of Object.entries(panel.assets ?? {})) {\n if (!ASSET_NAME.test(name) || name === \"view.js\") {\n throw new Error(\n `Devtools panel \"${id}\" has an asset named ${JSON.stringify(name)}; use a plain file name other than \"view.js\".`,\n );\n }\n\n const file = toFilePath(source);\n\n if (file === undefined || !isFile(file)) {\n throw new Error(\n `The asset \"${name}\" of devtools panel \"${id}\" was not found at ${String(source)}; give an absolute path or file: URL.`,\n );\n }\n\n assets[name] = file;\n }\n\n taken.set(id, panel.title);\n\n return { id, title: panel.title, view, routes, assets, production: panel.production === true };\n}\n\n/** Validates a list of panels; the first invalid or duplicate one throws. */\nexport function checkDevtoolsPanels(panels: readonly unknown[]): MountedDevtoolsPanel[] {\n const taken = new Map<string, string>();\n\n return panels.map((panel) => checkDevtoolsPanel(panel, taken));\n}\n\n/** Hooks `loadDevtoolsPanels` uses; replaced in specs. */\nexport type LoadDevtoolsPanelsOptions = {\n /** The app's root directory: bare specifiers resolve from here, `./` paths are relative to it. */\n root: string;\n /** Receives one line per entry that could not be loaded or was rejected. */\n warn: (message: string) => void;\n /** Ids already taken (the built-in panels), mapped to their titles. */\n taken?: ReadonlyMap<string, string>;\n /** Imports a module URL or specifier; defaults to a dynamic `import()`. */\n importModule?: (specifier: string) => Promise<unknown>;\n /** Where the dashboard runs; panel factories receive it as `context.mode`. @default \"development\" */\n mode?: DevtoolsMode;\n};\n\n/** The URL or specifier to import for a `panels` entry. */\nfunction resolvePanelSpecifier(entry: string, root: string): string {\n if (entry.startsWith(\"./\") || entry.startsWith(\"../\") || path.isAbsolute(entry)) {\n return pathToFileURL(path.resolve(root, entry)).href;\n }\n\n return resolveFromNodeModules(entry, root) ?? resolveWithRequire(entry, root) ?? entry;\n}\n\n/** Picks the file an `exports` target names: `import`, then `default`, then `node`. */\nfunction exportTarget(target: unknown): string | undefined {\n if (typeof target === \"string\") return target;\n\n if (Array.isArray(target)) {\n for (const item of target) {\n const found = exportTarget(item);\n\n if (found !== undefined) return found;\n }\n\n return undefined;\n }\n\n if (target !== null && typeof target === \"object\") {\n const conditions = target as Record<string, unknown>;\n\n for (const condition of [\"import\", \"node\", \"default\"]) {\n const found = exportTarget(conditions[condition]);\n\n if (found !== undefined) return found;\n }\n }\n\n return undefined;\n}\n\n/**\n * Resolves a package specifier by looking it up in the `node_modules` folders\n * above the app root and reading its `exports` map. `createRequire().resolve`\n * cannot do this for a package that only has an `import` condition.\n */\nfunction resolveFromNodeModules(entry: string, root: string): string | undefined {\n const parts = entry.split(\"/\");\n const nameLength = entry.startsWith(\"@\") ? 2 : 1;\n const name = parts.slice(0, nameLength).join(\"/\");\n const subpath = parts.length > nameLength ? `./${parts.slice(nameLength).join(\"/\")}` : \".\";\n\n if (!name) return undefined;\n\n let directory = path.resolve(root);\n\n for (;;) {\n const packageDirectory = path.join(directory, \"node_modules\", name);\n const manifestFile = path.join(packageDirectory, \"package.json\");\n\n if (existsSync(manifestFile)) {\n try {\n const manifest = JSON.parse(readFileSync(manifestFile, \"utf8\")) as {\n exports?: unknown;\n main?: string;\n };\n const exported = manifest.exports;\n const map =\n exported !== null && typeof exported === \"object\" && !Array.isArray(exported)\n ? (exported as Record<string, unknown>)\n : undefined;\n const hasSubpaths =\n map !== undefined && Object.keys(map).some((key) => key.startsWith(\".\"));\n const target =\n exported === undefined\n ? subpath === \".\"\n ? (manifest.main ?? \"index.js\")\n : subpath\n : hasSubpaths\n ? exportTarget(map?.[subpath])\n : subpath === \".\"\n ? exportTarget(exported)\n : undefined;\n\n if (target === undefined) return undefined;\n\n const file = path.resolve(packageDirectory, target);\n\n return isFile(file) ? pathToFileURL(file).href : undefined;\n } catch {\n return undefined;\n }\n }\n\n const parent = path.dirname(directory);\n\n if (parent === directory) return undefined;\n\n directory = parent;\n }\n}\n\n/** The `require` resolution, for packages the `node_modules` lookup does not understand. */\nfunction resolveWithRequire(entry: string, root: string): string | undefined {\n try {\n return pathToFileURL(createRequire(path.join(root, \"package.json\")).resolve(entry)).href;\n } catch {\n return undefined;\n }\n}\n\n/** The panels a module's default export describes. */\nasync function panelsOf(\n exported: DevtoolsPanelExport,\n root: string,\n mode: DevtoolsMode,\n): Promise<readonly unknown[]> {\n const value = typeof exported === \"function\" ? await exported({ root, mode }) : exported;\n\n return Array.isArray(value) ? value : [value];\n}\n\n/**\n * Loads the devtools `panels` option: imports each module entry, reads its\n * default export, and validates every panel. An entry that fails to load and\n * a panel that is invalid or reuses an id are reported through `warn` and\n * skipped, so one broken panel never stops the dashboard.\n */\nexport async function loadDevtoolsPanels(\n entries: readonly (string | DevtoolsPanel)[],\n options: LoadDevtoolsPanelsOptions,\n): Promise<MountedDevtoolsPanel[]> {\n // `src/config/devtools.ts` is a plain object with no types: a single string would be read letter by letter.\n if (!Array.isArray(entries as unknown)) {\n options.warn(\n `The devtools \"panels\" option must be a list, such as panels: [\"@warlock.js/grimoire/devtools\"]; got ${JSON.stringify(entries)}. No panel was added.`,\n );\n\n return [];\n }\n\n const importModule = options.importModule ?? ((specifier: string) => import(specifier));\n const mode = options.mode ?? \"development\";\n const taken = new Map<string, string>(options.taken ?? []);\n const panels: MountedDevtoolsPanel[] = [];\n\n for (const entry of entries) {\n let candidates: readonly unknown[];\n\n try {\n if (typeof entry === \"string\") {\n const module = (await importModule(resolvePanelSpecifier(entry, options.root))) as {\n default?: DevtoolsPanelExport;\n };\n\n if (module.default === undefined) {\n throw new Error(\"the module has no default export\");\n }\n\n candidates = await panelsOf(module.default, options.root, mode);\n } else {\n candidates = [entry];\n }\n } catch (error) {\n options.warn(\n `Devtools panel module \"${String(entry)}\" could not be loaded: ${describe(error)}. Check that it is installed and listed correctly in the devtools \"panels\" option.`,\n );\n continue;\n }\n\n for (const candidate of candidates) {\n try {\n panels.push(checkDevtoolsPanel(candidate, taken));\n } catch (error) {\n options.warn(`${describe(error)} The panel was not added.`);\n }\n }\n }\n\n return panels;\n}\n\nfunction describe(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\n/** What `productionPanels` decides. */\nexport type DevtoolsProductionPanels = {\n /** Built-in tab ids shown, in display order. */\n builtIn: string[];\n /** Package panels shown. */\n panels: MountedDevtoolsPanel[];\n};\n\n/**\n * Which tabs the production monitor shows. A built-in tab follows\n * `DEVTOOLS_BUILT_IN_PANELS` unless `overrides[id]` says otherwise. A package\n * panel (the Processes panel included) shows when it declares\n * `production: true` or `overrides[id]` is `true`; `overrides[id]: false` turns\n * any tab off.\n */\nexport function productionPanels(\n packagePanels: readonly MountedDevtoolsPanel[],\n overrides: Readonly<Record<string, boolean>> = {},\n): DevtoolsProductionPanels {\n const builtIn = DEVTOOLS_BUILT_IN_PANELS.filter((tab) => overrides[tab.id] ?? tab.production).map(\n (tab) => tab.id,\n );\n const panels = packagePanels.filter((panel) => overrides[panel.id] ?? panel.production);\n\n return { builtIn, panels };\n}\n\n/**\n * The tab list `GET api/panels` answers with: the built-in tabs in\n * `builtIn` (default: every one), in display order, then the package panels\n * in registration order.\n */\nexport function listPanelInfos(\n panels: readonly Pick<MountedDevtoolsPanel, \"id\" | \"title\">[],\n builtIn?: readonly string[],\n): DevtoolsPanelInfo[] {\n const tabs: DevtoolsPanelInfo[] = DEVTOOLS_BUILT_IN_PANELS.filter(\n (tab) => builtIn === undefined || builtIn.includes(tab.id),\n ).map((tab) => ({ id: tab.id, title: tab.title, type: \"built-in\" as const }));\n\n for (const panel of panels)\n tabs.push({ id: panel.id, title: panel.title, type: \"package\" as const });\n\n return tabs;\n}\n"],"mappings":";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,yBAAyB,QAAQ,QAAQ,UAAU,IAAI,OAAO,IAAI,UAAU,CAAC,CAAC,KAC3F,QAAQ,IAAI,EAIA;EAAG,QAFH,cAAc,QAAQ,UAAU,UAAU,MAAM,OAAO,MAAM,UAErD;CAAE;AAC3B;;;;;;AAOA,SAAgB,eACd,QACA,SACqB;CACrB,MAAM,OAA4B,yBAAyB,QACxD,QAAQ,YAAY,UAAa,QAAQ,SAAS,IAAI,EAAE,CAC3D,CAAC,CAAC,KAAK,SAAS;EAAE,IAAI,IAAI;EAAI,OAAO,IAAI;EAAO,MAAM;CAAoB,EAAE;CAE5E,KAAK,MAAM,SAAS,QAClB,KAAK,KAAK;EAAE,IAAI,MAAM;EAAI,OAAO,MAAM;EAAO,MAAM;CAAmB,CAAC;CAE1E,OAAO;AACT"}
|
package/esm/process-panel.mjs
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { resolveUiRoot } from "./ui-root.mjs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
1
4
|
//#region ../../packages/devtools/src/process-panel.ts
|
|
2
5
|
/** Load app-owned generated registration only when devtools boots in development. */
|
|
3
6
|
async function loadProcessPanel() {
|
|
@@ -10,7 +13,23 @@ async function loadProcessPanel() {
|
|
|
10
13
|
if (!existsSync(file)) return void 0;
|
|
11
14
|
return (await import(pathToFileURL(file).href)).processPanel;
|
|
12
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* The built-in **Processes** tab, registered like any other panel:
|
|
18
|
+
* `GET <path>/api/processes` lists the app's supervised processes (an empty
|
|
19
|
+
* list without a registration) and `ui/panels/processes.js` renders them.
|
|
20
|
+
*/
|
|
21
|
+
function processesDevtoolsPanel(processPanel) {
|
|
22
|
+
return {
|
|
23
|
+
id: "processes",
|
|
24
|
+
title: "Processes",
|
|
25
|
+
view: path.join(resolveUiRoot(), "panels", "processes.js"),
|
|
26
|
+
routes: [{
|
|
27
|
+
path: "",
|
|
28
|
+
handler: async () => processPanel ? await processPanel.list() : []
|
|
29
|
+
}]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
13
32
|
|
|
14
33
|
//#endregion
|
|
15
|
-
export { loadProcessPanel };
|
|
34
|
+
export { loadProcessPanel, processesDevtoolsPanel };
|
|
16
35
|
//# sourceMappingURL=process-panel.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-panel.mjs","names":[],"sources":["../../../../../../../packages/devtools/src/process-panel.ts"],"sourcesContent":["/** Structural contract keeps process supervision an optional application feature. */\nexport type ProcessPanel = { list(): Promise<readonly unknown[]> };\n\n/** Load app-owned generated registration only when devtools boots in development. */\nexport async function loadProcessPanel(): Promise<ProcessPanel | undefined> {\n const core = await import(\"@warlock.js/core\");\n if (!(\"srcPath\" in core)) return undefined;\n const { srcPath } = core;\n const { existsSync } = await import(\"node:fs\");\n const { pathToFileURL } = await import(\"node:url\");\n const file = srcPath(\"app/processes/devtools.ts\");\n if (!existsSync(file)) return undefined;\n const module: { processPanel?: ProcessPanel } = await import(pathToFileURL(file).href);\n return module.processPanel;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"process-panel.mjs","names":[],"sources":["../../../../../../../packages/devtools/src/process-panel.ts"],"sourcesContent":["import path from \"node:path\";\nimport type { DevtoolsPanel } from \"./types\";\nimport { resolveUiRoot } from \"./ui-root\";\n\n/** Structural contract keeps process supervision an optional application feature. */\nexport type ProcessPanel = { list(): Promise<readonly unknown[]> };\n\n/** Load app-owned generated registration only when devtools boots in development. */\nexport async function loadProcessPanel(): Promise<ProcessPanel | undefined> {\n const core = await import(\"@warlock.js/core\");\n if (!(\"srcPath\" in core)) return undefined;\n const { srcPath } = core;\n const { existsSync } = await import(\"node:fs\");\n const { pathToFileURL } = await import(\"node:url\");\n const file = srcPath(\"app/processes/devtools.ts\");\n if (!existsSync(file)) return undefined;\n const module: { processPanel?: ProcessPanel } = await import(pathToFileURL(file).href);\n return module.processPanel;\n}\n\n/**\n * The built-in **Processes** tab, registered like any other panel:\n * `GET <path>/api/processes` lists the app's supervised processes (an empty\n * list without a registration) and `ui/panels/processes.js` renders them.\n */\nexport function processesDevtoolsPanel(processPanel?: ProcessPanel): DevtoolsPanel {\n return {\n id: \"processes\",\n title: \"Processes\",\n view: path.join(resolveUiRoot(), \"panels\", \"processes.js\"),\n routes: [{ path: \"\", handler: async () => (processPanel ? await processPanel.list() : []) }],\n };\n}\n"],"mappings":";;;;;AAQA,eAAsB,mBAAsD;CAC1E,MAAM,OAAO,MAAM,OAAO;CAC1B,IAAI,EAAE,aAAa,OAAO,OAAO;CACjC,MAAM,EAAE,YAAY;CACpB,MAAM,EAAE,eAAe,MAAM,OAAO;CACpC,MAAM,EAAE,kBAAkB,MAAM,OAAO;CACvC,MAAM,OAAO,QAAQ,2BAA2B;CAChD,IAAI,CAAC,WAAW,IAAI,GAAG,OAAO;CAE9B,QAAO,MAD+C,OAAO,cAAc,IAAI,CAAC,CAAC,MACpE,CAAC;AAChB;;;;;;AAOA,SAAgB,uBAAuB,cAA4C;CACjF,OAAO;EACL,IAAI;EACJ,OAAO;EACP,MAAM,KAAK,KAAK,cAAc,GAAG,UAAU,cAAc;EACzD,QAAQ,CAAC;GAAE,MAAM;GAAI,SAAS,YAAa,eAAe,MAAM,aAAa,KAAK,IAAI,CAAC;EAAG,CAAC;CAC7F;AACF"}
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
//#region ../../packages/devtools/src/production/auth/common-passwords.ts
|
|
2
|
+
/**
|
|
3
|
+
* Passwords the monitor refuses (compared lower-cased). Short entries are
|
|
4
|
+
* left out: the length rule already refuses them.
|
|
5
|
+
*/
|
|
6
|
+
const COMMON_PASSWORDS = /* @__PURE__ */ new Set([
|
|
7
|
+
"password",
|
|
8
|
+
"password1",
|
|
9
|
+
"password12",
|
|
10
|
+
"password123",
|
|
11
|
+
"password1234",
|
|
12
|
+
"passw0rd",
|
|
13
|
+
"p@ssw0rd",
|
|
14
|
+
"p@ssword",
|
|
15
|
+
"password!",
|
|
16
|
+
"password1!",
|
|
17
|
+
"password2",
|
|
18
|
+
"password3",
|
|
19
|
+
"password01",
|
|
20
|
+
"password11",
|
|
21
|
+
"password99",
|
|
22
|
+
"pa55word",
|
|
23
|
+
"pa$$word",
|
|
24
|
+
"12345678",
|
|
25
|
+
"123456789",
|
|
26
|
+
"1234567890",
|
|
27
|
+
"12345678910",
|
|
28
|
+
"123123123",
|
|
29
|
+
"1234qwer",
|
|
30
|
+
"1q2w3e4r",
|
|
31
|
+
"1q2w3e4r5t",
|
|
32
|
+
"1q2w3e4r5t6y",
|
|
33
|
+
"1qaz2wsx",
|
|
34
|
+
"1qaz2wsx3edc",
|
|
35
|
+
"1qazxsw2",
|
|
36
|
+
"qwertyui",
|
|
37
|
+
"qwertyuiop",
|
|
38
|
+
"qwerty123",
|
|
39
|
+
"qwerty1234",
|
|
40
|
+
"qwerty12",
|
|
41
|
+
"qwertyuio",
|
|
42
|
+
"qwerty123456",
|
|
43
|
+
"qwerty12345",
|
|
44
|
+
"asdfghjk",
|
|
45
|
+
"asdfghjkl",
|
|
46
|
+
"asdfgh123",
|
|
47
|
+
"zxcvbnm1",
|
|
48
|
+
"zxcvbnmasd",
|
|
49
|
+
"zxcvbnm123",
|
|
50
|
+
"abcd1234",
|
|
51
|
+
"abcd12345",
|
|
52
|
+
"abc12345",
|
|
53
|
+
"abc123456",
|
|
54
|
+
"abcdefgh",
|
|
55
|
+
"abcdefg1",
|
|
56
|
+
"abcdefgh1",
|
|
57
|
+
"abcdefghi",
|
|
58
|
+
"iloveyou",
|
|
59
|
+
"iloveyou1",
|
|
60
|
+
"iloveyou2",
|
|
61
|
+
"iloveyou123",
|
|
62
|
+
"letmein1",
|
|
63
|
+
"letmein123",
|
|
64
|
+
"letmein12",
|
|
65
|
+
"welcome1",
|
|
66
|
+
"welcome12",
|
|
67
|
+
"welcome123",
|
|
68
|
+
"welcome01",
|
|
69
|
+
"welcome2",
|
|
70
|
+
"monkey123",
|
|
71
|
+
"monkey12",
|
|
72
|
+
"dragon123",
|
|
73
|
+
"dragon12",
|
|
74
|
+
"master123",
|
|
75
|
+
"master12",
|
|
76
|
+
"shadow123",
|
|
77
|
+
"shadow12",
|
|
78
|
+
"sunshine",
|
|
79
|
+
"sunshine1",
|
|
80
|
+
"sunshine123",
|
|
81
|
+
"princess",
|
|
82
|
+
"princess1",
|
|
83
|
+
"princess123",
|
|
84
|
+
"football",
|
|
85
|
+
"football1",
|
|
86
|
+
"football123",
|
|
87
|
+
"baseball",
|
|
88
|
+
"baseball1",
|
|
89
|
+
"baseball123",
|
|
90
|
+
"basketball",
|
|
91
|
+
"soccer123",
|
|
92
|
+
"hockey123",
|
|
93
|
+
"superman",
|
|
94
|
+
"superman1",
|
|
95
|
+
"superman123",
|
|
96
|
+
"batman123",
|
|
97
|
+
"batman12",
|
|
98
|
+
"spiderman",
|
|
99
|
+
"spiderman1",
|
|
100
|
+
"trustno1",
|
|
101
|
+
"trustno123",
|
|
102
|
+
"trustnoone",
|
|
103
|
+
"whatever",
|
|
104
|
+
"whatever1",
|
|
105
|
+
"whatever123",
|
|
106
|
+
"freedom1",
|
|
107
|
+
"freedom123",
|
|
108
|
+
"starwars",
|
|
109
|
+
"starwars1",
|
|
110
|
+
"starwars123",
|
|
111
|
+
"pokemon1",
|
|
112
|
+
"pokemon123",
|
|
113
|
+
"charlie1",
|
|
114
|
+
"charlie123",
|
|
115
|
+
"michael1",
|
|
116
|
+
"michael123",
|
|
117
|
+
"jessica1",
|
|
118
|
+
"jessica123",
|
|
119
|
+
"jennifer",
|
|
120
|
+
"jennifer1",
|
|
121
|
+
"daniel123",
|
|
122
|
+
"daniel12",
|
|
123
|
+
"thomas123",
|
|
124
|
+
"hunter123",
|
|
125
|
+
"hunter12",
|
|
126
|
+
"hunter2hunter2",
|
|
127
|
+
"hello123",
|
|
128
|
+
"hello1234",
|
|
129
|
+
"hello12345",
|
|
130
|
+
"helloworld",
|
|
131
|
+
"helloworld1",
|
|
132
|
+
"hello@123",
|
|
133
|
+
"admin123",
|
|
134
|
+
"admin1234",
|
|
135
|
+
"admin12345",
|
|
136
|
+
"admin@123",
|
|
137
|
+
"admin@1234",
|
|
138
|
+
"administrator",
|
|
139
|
+
"administrator1",
|
|
140
|
+
"adminadmin",
|
|
141
|
+
"adminadmin1",
|
|
142
|
+
"admin2020",
|
|
143
|
+
"admin2021",
|
|
144
|
+
"admin2022",
|
|
145
|
+
"admin2023",
|
|
146
|
+
"admin2024",
|
|
147
|
+
"admin2025",
|
|
148
|
+
"admin2026",
|
|
149
|
+
"root1234",
|
|
150
|
+
"root12345",
|
|
151
|
+
"toor1234",
|
|
152
|
+
"test1234",
|
|
153
|
+
"test12345",
|
|
154
|
+
"test123456",
|
|
155
|
+
"testtest",
|
|
156
|
+
"testing123",
|
|
157
|
+
"testing1",
|
|
158
|
+
"guest123",
|
|
159
|
+
"guest1234",
|
|
160
|
+
"changeme",
|
|
161
|
+
"changeme1",
|
|
162
|
+
"changeme123",
|
|
163
|
+
"change123",
|
|
164
|
+
"default1",
|
|
165
|
+
"default123",
|
|
166
|
+
"secret123",
|
|
167
|
+
"secret1234",
|
|
168
|
+
"secretpassword",
|
|
169
|
+
"mypassword",
|
|
170
|
+
"mypassword1",
|
|
171
|
+
"mypassword123",
|
|
172
|
+
"mypass123",
|
|
173
|
+
"mysecret1",
|
|
174
|
+
"login123",
|
|
175
|
+
"login1234",
|
|
176
|
+
"access123",
|
|
177
|
+
"access14",
|
|
178
|
+
"qazwsxedc",
|
|
179
|
+
"qazwsx123",
|
|
180
|
+
"qazxswedc",
|
|
181
|
+
"qweasdzxc",
|
|
182
|
+
"qweasd123",
|
|
183
|
+
"qweqweqwe",
|
|
184
|
+
"asdasdasd",
|
|
185
|
+
"asdasd123",
|
|
186
|
+
"zaq12wsx",
|
|
187
|
+
"zaq1zaq1",
|
|
188
|
+
"zaq1xsw2",
|
|
189
|
+
"aaaaaaaa",
|
|
190
|
+
"aaaaaaa1",
|
|
191
|
+
"11111111",
|
|
192
|
+
"111111111",
|
|
193
|
+
"1111111111",
|
|
194
|
+
"00000000",
|
|
195
|
+
"000000000",
|
|
196
|
+
"0000000000",
|
|
197
|
+
"12341234",
|
|
198
|
+
"12121212",
|
|
199
|
+
"11223344",
|
|
200
|
+
"1122334455",
|
|
201
|
+
"123321123",
|
|
202
|
+
"12344321",
|
|
203
|
+
"123456789a",
|
|
204
|
+
"123456abc",
|
|
205
|
+
"1234567a",
|
|
206
|
+
"1234abcd",
|
|
207
|
+
"987654321",
|
|
208
|
+
"9876543210",
|
|
209
|
+
"98765432",
|
|
210
|
+
"88888888",
|
|
211
|
+
"66666666",
|
|
212
|
+
"55555555",
|
|
213
|
+
"77777777",
|
|
214
|
+
"99999999",
|
|
215
|
+
"22222222",
|
|
216
|
+
"33333333",
|
|
217
|
+
"44444444",
|
|
218
|
+
"pass1234",
|
|
219
|
+
"pass12345",
|
|
220
|
+
"pass123456",
|
|
221
|
+
"passpass",
|
|
222
|
+
"passpass1",
|
|
223
|
+
"pass@123",
|
|
224
|
+
"pass@1234",
|
|
225
|
+
"mustang1",
|
|
226
|
+
"mustang123",
|
|
227
|
+
"ranger123",
|
|
228
|
+
"harley123",
|
|
229
|
+
"ferrari1",
|
|
230
|
+
"porsche1",
|
|
231
|
+
"computer",
|
|
232
|
+
"computer1",
|
|
233
|
+
"computer123",
|
|
234
|
+
"internet",
|
|
235
|
+
"internet1",
|
|
236
|
+
"internet123",
|
|
237
|
+
"windows1",
|
|
238
|
+
"windows123",
|
|
239
|
+
"microsoft",
|
|
240
|
+
"linux123",
|
|
241
|
+
"ubuntu123",
|
|
242
|
+
"google123",
|
|
243
|
+
"google12",
|
|
244
|
+
"facebook",
|
|
245
|
+
"facebook1",
|
|
246
|
+
"facebook123",
|
|
247
|
+
"twitter1",
|
|
248
|
+
"youtube1",
|
|
249
|
+
"instagram",
|
|
250
|
+
"samsung1",
|
|
251
|
+
"samsung123",
|
|
252
|
+
"iphone123",
|
|
253
|
+
"android1",
|
|
254
|
+
"android123",
|
|
255
|
+
"liverpool",
|
|
256
|
+
"liverpool1",
|
|
257
|
+
"manchester",
|
|
258
|
+
"chelsea1",
|
|
259
|
+
"arsenal1",
|
|
260
|
+
"barcelona",
|
|
261
|
+
"realmadrid1",
|
|
262
|
+
"cheese123",
|
|
263
|
+
"chocolate",
|
|
264
|
+
"chocolate1",
|
|
265
|
+
"cookie123",
|
|
266
|
+
"banana123",
|
|
267
|
+
"butterfly",
|
|
268
|
+
"butterfly1",
|
|
269
|
+
"flower123",
|
|
270
|
+
"rainbow1",
|
|
271
|
+
"rainbow123",
|
|
272
|
+
"summer123",
|
|
273
|
+
"summer2024",
|
|
274
|
+
"summer2025",
|
|
275
|
+
"winter123",
|
|
276
|
+
"winter2024",
|
|
277
|
+
"winter2025",
|
|
278
|
+
"spring123",
|
|
279
|
+
"autumn123",
|
|
280
|
+
"january1",
|
|
281
|
+
"february1",
|
|
282
|
+
"december1",
|
|
283
|
+
"qwerty@123",
|
|
284
|
+
"abc@12345",
|
|
285
|
+
"p@55w0rd",
|
|
286
|
+
"p@$$w0rd",
|
|
287
|
+
"passw0rd1",
|
|
288
|
+
"passw0rd!",
|
|
289
|
+
"warlock123",
|
|
290
|
+
"warlock1",
|
|
291
|
+
"devtools",
|
|
292
|
+
"devtools1",
|
|
293
|
+
"devtools123",
|
|
294
|
+
"monitor123",
|
|
295
|
+
"monitor1",
|
|
296
|
+
"dashboard",
|
|
297
|
+
"dashboard1",
|
|
298
|
+
"dashboard123"
|
|
299
|
+
]);
|
|
300
|
+
|
|
301
|
+
//#endregion
|
|
302
|
+
export { COMMON_PASSWORDS };
|
|
303
|
+
//# sourceMappingURL=common-passwords.mjs.map
|