@warlock.js/devtools 5.25.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 (68) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +35 -0
  4. package/cjs/index.cjs +694 -0
  5. package/cjs/index.cjs.map +1 -0
  6. package/cjs/server-DHYSVive.cjs +286 -0
  7. package/cjs/server-DHYSVive.cjs.map +1 -0
  8. package/esm/caller-location.mjs +33 -0
  9. package/esm/caller-location.mjs.map +1 -0
  10. package/esm/collector.mjs +185 -0
  11. package/esm/collector.mjs.map +1 -0
  12. package/esm/current-request-id.mjs +24 -0
  13. package/esm/current-request-id.mjs.map +1 -0
  14. package/esm/devtools-connector.d.mts +26 -0
  15. package/esm/devtools-connector.d.mts.map +1 -0
  16. package/esm/devtools-connector.mjs +112 -0
  17. package/esm/devtools-connector.mjs.map +1 -0
  18. package/esm/index.d.mts +3 -0
  19. package/esm/index.mjs +3 -0
  20. package/esm/n-plus-one.mjs +36 -0
  21. package/esm/n-plus-one.mjs.map +1 -0
  22. package/esm/options.mjs +19 -0
  23. package/esm/options.mjs.map +1 -0
  24. package/esm/query-shape.mjs +27 -0
  25. package/esm/query-shape.mjs.map +1 -0
  26. package/esm/safe-value.mjs +63 -0
  27. package/esm/safe-value.mjs.map +1 -0
  28. package/esm/server/background-routes.mjs +9 -0
  29. package/esm/server/background-routes.mjs.map +1 -0
  30. package/esm/server/explain-route.mjs +37 -0
  31. package/esm/server/explain-route.mjs.map +1 -0
  32. package/esm/server/guard.mjs +30 -0
  33. package/esm/server/guard.mjs.map +1 -0
  34. package/esm/server/index.mjs +37 -0
  35. package/esm/server/index.mjs.map +1 -0
  36. package/esm/server/log-routes.mjs +12 -0
  37. package/esm/server/log-routes.mjs.map +1 -0
  38. package/esm/server/mail-routes.mjs +27 -0
  39. package/esm/server/mail-routes.mjs.map +1 -0
  40. package/esm/server/requests-routes.mjs +21 -0
  41. package/esm/server/requests-routes.mjs.map +1 -0
  42. package/esm/server/route-routes.mjs +9 -0
  43. package/esm/server/route-routes.mjs.map +1 -0
  44. package/esm/server/stream-route.mjs +32 -0
  45. package/esm/server/stream-route.mjs.map +1 -0
  46. package/esm/server/ui-assets.mjs +38 -0
  47. package/esm/server/ui-assets.mjs.map +1 -0
  48. package/esm/sources/cache-source.mjs +51 -0
  49. package/esm/sources/cache-source.mjs.map +1 -0
  50. package/esm/sources/log-source.mjs +46 -0
  51. package/esm/sources/log-source.mjs.map +1 -0
  52. package/esm/sources/mail-source.mjs +48 -0
  53. package/esm/sources/mail-source.mjs.map +1 -0
  54. package/esm/sources/query-source.mjs +52 -0
  55. package/esm/sources/query-source.mjs.map +1 -0
  56. package/esm/sources/tracing-source.mjs +47 -0
  57. package/esm/sources/tracing-source.mjs.map +1 -0
  58. package/esm/types.d.mts +213 -0
  59. package/esm/types.d.mts.map +1 -0
  60. package/esm/ui-root.mjs +40 -0
  61. package/esm/ui-root.mjs.map +1 -0
  62. package/llms-full.txt +78 -0
  63. package/llms.txt +9 -0
  64. package/package.json +52 -0
  65. package/skills/devtools-overview/SKILL.md +68 -0
  66. package/ui/app.css +354 -0
  67. package/ui/app.js +520 -0
  68. package/ui/index.html +24 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Changelog — @warlock.js/devtools
2
+
3
+ All notable changes to `@warlock.js/devtools` are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
6
+
7
+ ## 5.25.0 - 2026-09-28
8
+
9
+ ### Added
10
+
11
+ - New package. A development-only dashboard served at `/__warlock`: request timeline, queries with EXPLAIN, N+1 detection, dev mailbox, logs, cache operations and the route map. It refuses to run outside development and answers only loopback clients.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Hassan Zohdy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # @warlock.js/devtools
2
+
3
+ A development-only dashboard for Warlock.js apps, served at `/__warlock`:
4
+
5
+ - a **request timeline**: router and page middleware, loaders, page cache, render and deferred values;
6
+ - every **SQL and Mongo query**, with `EXPLAIN` for Postgres;
7
+ - **N+1 warnings** that name the file and line;
8
+ - a **dev mailbox** with every mail your app sent;
9
+ - **logs**, **cache operations** and the **route map**.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ warlock add devtools
15
+ warlock dev
16
+ # open http://localhost:<port>/__warlock
17
+ ```
18
+
19
+ That's all: `warlock dev` loads it automatically. Don't add it to
20
+ `warlock.config.ts`; it's a dev dependency, so a production install doesn't
21
+ have it.
22
+
23
+ ## Safe by construction
24
+
25
+ - It isn't installed in production (it's a dev dependency).
26
+ - If it is present anyway, it refuses to run outside development.
27
+ - It answers loopback clients only. Anything else gets a 404, and
28
+ `X-Forwarded-For` can't unlock it.
29
+ - Everything lives in memory, and nothing is written to disk.
30
+
31
+ Full guide: [`skills/devtools-overview/SKILL.md`](skills/devtools-overview/SKILL.md).
32
+
33
+ ## License
34
+
35
+ MIT