Skip to content

Latest commit

 

History

History
236 lines (155 loc) · 18.9 KB

File metadata and controls

236 lines (155 loc) · 18.9 KB

@forinda/kickjs-devtools

7.1.1

Patch Changes

  • #436 5ebb82e Thanks @forinda! - docs: point package metadata and doc links at the canonical docs host (https://kickjs.app)

    The homepage field, README documentation links, CLI generator templates, and error-message doc URLs now reference https://kickjs.app instead of the retired GitHub Pages URL. No API or runtime behavior changes.

  • Updated dependencies [5ebb82e]:

    • @forinda/kickjs-devtools-kit@7.0.1

7.1.0

Minor Changes

  • #419 8bbf484 Thanks @forinda! - Live kick/db query telemetry in DevTools.

    • @forinda/kickjs-db now republishes every successful query to the DevTools event bus as db:query ({ sql, parameters, durationMs, dialect }), alongside the existing db:slow-query / db:query-error. Zero-overhead when no bus is wired (unchanged). The db:query event is added to the KickDevtoolsEventRegistry augmentation (@forinda/kickjs-db/devtools-events).
    • @forinda/kickjs-devtools gains a Database tab: a live recent-query table (time, dialect, duration with slow-query highlight, rows, SQL/error) with SQL filter and headline counters (queries / errors / slow / avg duration). It subscribes to db:query (successes) and db:query-error (failures) on the shared bus.
  • #420 02fc80e Thanks @forinda! - DevTools dashboard: lean, space-efficient redesign

    • Grouped resizable sidebar replaces the horizontal tab strip. Tabs are organised into collapsible sections (Overview · Runtime · Architecture · Data & Jobs · Activity). Drag the divider to resize; width and collapsed groups persist across reloads.
    • Density control (Small / Medium / Large) scales the whole dashboard's spacing and font size from one lever. Defaults to Small to maximise data on screen.
    • Settings gear menu in the header — a discoverable home for the density control (and future preferences), with an outside-click / Esc dismiss.
  • #415 7864609 Thanks @forinda! - DevTools now surfaces the active HTTP runtime and reports uptime correctly.

    • Application.getActiveRuntime() (new) — returns { name, capabilities } for the active engine (express / fastify / h3), so tooling can show which runtime an app runs on.
    • DevTools /health includes runtime; /runtime includes a process block (nodeVersion, pid, platform, arch, runtime) — the Runtime tab now shows a strip making explicit that the memory / CPU / event-loop stats are for this Node process (the one running your app), with the engine, Node version, platform, and pid.
    • Uptime fix — uptime was derived from a timestamp reset in beforeMount, which re-runs on every HMR rebuild / dev re-bootstrap and pinned it near 0s. It now reads process.uptime(), which is monotonic from process start and survives reloads.

Patch Changes

  • #415 5ba703f Thanks @forinda! - Upgrade the DevTools dashboard SPA to Tailwind CSS 4.3.1 and rebuild the shipped public/spa assets so consumers get the current build.

  • Updated dependencies []:

    • @forinda/kickjs-devtools-kit@7.0.0

7.0.0

Patch Changes

  • #379 7528356 Thanks @forinda! - Migrate the devtools adapter off the raw Express app / Router onto the engine-agnostic ctx.http facade (final M2 adapter). A thin local router shim forwards .get / .post / .use to ctx.http.route / ctx.http.use, so every dashboard handler — the ~20 JSON routes, the SSE streams, the heap-snapshot download, the static dashboard, and the token guard — is kept verbatim. Registration order is preserved and the guard still sees router-relative req.path (the facade scopes it to basePath, and Express strips the prefix), so behavior is unchanged under the default Express runtime. ctx.app is still used only as the documented escape hatch for __kickApp (topology needs the live Application instance).

  • Updated dependencies []:

    • @forinda/kickjs-devtools-kit@7.0.0

7.0.0-alpha.0

Patch Changes

  • #379 7528356 Thanks @forinda! - Migrate the devtools adapter off the raw Express app / Router onto the engine-agnostic ctx.http facade (final M2 adapter). A thin local router shim forwards .get / .post / .use to ctx.http.route / ctx.http.use, so every dashboard handler — the ~20 JSON routes, the SSE streams, the heap-snapshot download, the static dashboard, and the token guard — is kept verbatim. Registration order is preserved and the guard still sees router-relative req.path (the facade scopes it to basePath, and Express strips the prefix), so behavior is unchanged under the default Express runtime. ctx.app is still used only as the documented escape hatch for __kickApp (topology needs the live Application instance).

  • Updated dependencies [d6622d5, fe1b578, 79f2989, 3e5d03e, d049c48, 335c247, c6e4d73, 8fc8c1a, 0e18440, d0bc46d, 07a3a15, d66dc5b, 841637e, 6c59776, d500c8a]:

    • @forinda/kickjs@5.18.0-alpha.0
    • @forinda/kickjs-devtools-kit@7.0.0-alpha.0

6.0.0

Patch Changes

  • Updated dependencies []:
    • @forinda/kickjs-devtools-kit@6.0.0

6.0.0-alpha.0

Patch Changes

  • Updated dependencies [f04da5b, 0d9a895, a4fc68c]:
    • @forinda/kickjs@5.14.0-alpha.0
    • @forinda/kickjs-devtools-kit@6.0.0-alpha.0

5.3.2

Patch Changes

  • #271 860b366 Thanks @forinda! - chore(meta): focus npm keywords per-package, drop sibling self-references

    Every published package's keywords array used to list the entire @forinda/kickjs-* family — @forinda/kickjs-auth had @forinda/kickjs-drizzle, @forinda/kickjs-prisma, @forinda/kickjs-vite etc. in its keywords, none of which describe what the auth package does. That's classic keyword stuffing: npm's search algorithm doesn't reward it, some implementations actively demote noisy packages, and it diluted the genuine signal for each package.

    Rewrote the keywords on all 19 published packages so each array describes that specific package — what a developer would actually type into npm search to find it. A shared 4-keyword header (kickjs, nodejs, typescript, decorator-driven) stays on each package so the family is still discoverable as a family. Removed: every @forinda/kickjs-* sibling self-reference, irrelevant vite from non-vite packages, irrelevant framework / backend / api from leaf adapters, and generic database / query-builder from packages where it doesn't add signal.

    No code change, no test impact. Metadata-only — npm search ranking will refresh on next publish.

  • Updated dependencies [860b366]:

    • @forinda/kickjs-devtools-kit@5.4.1

5.3.1

Patch Changes

  • #267 04cd61d Thanks @forinda! - deps: move ws from dependencies to peerDependencies in both packages

    Both @forinda/kickjs-ws and @forinda/kickjs-devtools shipped ws@^8.20.1 as a hard dependency. Adopters who already had ws installed (very common — it's used directly, through socket.io, through undici, through tons of other libs) could end up with two copies in node_modules, which breaks instanceof WebSocket checks and confuses some bundlers.

    Both packages now declare ws as a peerDependencies entry at ^8.0.0. ws@^8.20.1 stays in devDependencies so the workspace install/build/test still resolves a copy. Modern package managers auto-install peers (pnpm 8+ with auto-install-peers=true, npm 7+), so most adopters need no action; pnpm strict-mode users add ws to their dependencies explicitly.

  • Updated dependencies []:

    • @forinda/kickjs-devtools-kit@5.4.0

5.3.0

Minor Changes

  • #252 9f1e90e Thanks @forinda! - feat(devtools): render full introspect snapshot + surface module-level contributors with intact dependsOn

    Three related fixes addressing two adopter reports: the DevTools dashboard wasn't surfacing data that introspect() and context-contributor dependsOn were already providing.

    1. PrimitiveRow renders all IntrospectionSnapshot fields

    The server side has been collecting introspect() snapshots correctly for every adapter / plugin in /_debug/topology. The SPA's PrimitiveRow in TopologyTab.tsx only rendered name, version, tokens.provides, and metrics — silently dropping state, tokens.requires, memoryBytes, and kind. Adopters whose introspect() returned (say) { state, memoryBytes, tokens: { requires } } saw a row with just the name.

    PrimitiveRow now renders all six fields, with memoryBytes formatted as B/KB/MB/GB and state rendered as key/value pairs (JSON-stringified for nested objects).

    2. Module-level contributors surface via Application.getContributors()

    The framework's getContributors() deliberately skipped module-level registrations because module instances aren't retained on the Application instance post-bootstrap. Adopters who declared AppModule.contributors?() returning a typed dependsOn saw the contributor missing entirely from the DevTools Contributors table, which read as "empty deps."

    Application.setup() now retains a snapshot of every module-level registration (just the frozen { key, dependsOn } view — no resolve closures kept), and getContributors() returns those entries with source: 'module'. The snapshot is cleared at the start of each setup() pass so test harnesses and dev-server restarts don't accumulate stale entries.

    Per-route (method/class decorator) contributors still aren't enumerated — they live on the route registry and warrant a separate RPC; flagged as a follow-up.

    3. TopologyContributorEntry.source widens to the full union

    The kit's source field was typed as bare string with a JSDoc-documented enum; the server collapsed 'plugin' | 'global''adapter' because of an earlier narrower mapping. Both are now removed: kit ships a proper TopologyContributorSource union ('method' | 'class' | 'module' | 'adapter' | 'plugin' | 'global'), and the server passes source through unchanged. Dashboards can now badge / filter by the real origin. Wire-format change is backward-compatible (new enum value added to an existing string field).

    4. IntrospectionSnapshot reachable from @forinda/kickjs directly

    AppAdapter.introspect?() and KickPlugin.introspect?() were typed as unknown — the JSDoc told adopters to import IntrospectionSnapshot from @forinda/kickjs-devtools-kit to satisfy the contract, taking on a dep just for the type. The snapshot type now lives canonically in @forinda/kickjs (core/introspect.ts); the kit's existing IntrospectionSnapshot stays structurally identical for back-compat. Adopters who don't already use the kit can write introspect() with full inference, no extra import:

    export const MyAdapter = defineAdapter({
      name: 'MyAdapter',
      build: () => ({
        introspect() {
          // Return-type fully inferred — no `import type` needed.
          return {
            protocolVersion: 1,
            name: 'MyAdapter',
            kind: 'adapter',
            state: { connectedAt: Date.now() },
            memoryBytes: 12_345,
            tokens: { provides: ['REDIS'], requires: [] },
            version: '1.0',
            metrics: { activeConnections: 3 },
          }
        },
      }),
    })

    Tests

    application-get-contributors.test.ts adds three cases: dependsOn survives getContributors() (regression guard); module-level contributors appear after setup() with source: 'module' and intact dependsOn; re-setup doesn't accumulate stale module entries.

Patch Changes

  • Updated dependencies [9f1e90e]:
    • @forinda/kickjs-devtools-kit@5.4.0

5.2.3

Patch Changes

  • #238 98f9ef0 Thanks @forinda! - fix(devtools): surface every peer adapter on /_debug/health + Overview

    Two related bugs caused the DevTools Overview > Health card to list only DevToolsAdapter even when the app booted with several adapters:

    • adapterStatuses was only ever written in beforeMount/shutdown for the DevTools adapter itself — peers were never added, so the /_debug/health JSON returned adapters: { DevToolsAdapter: 'running' } regardless of how many other adapters were registered.
    • The Overview > Health card's Adapters accordion defaulted to collapsed, hiding the list further.

    The fix seeds adapterStatuses from getPeerAdapters() in afterStart (every mounted peer appears as running), refreshes each entry from peer.onHealthCheck() when present at request time so the status is live rather than a frozen boot snapshot, and defaults the Overview accordion to open. No public-API change.

  • #240 4eebd43 Thanks @forinda! - fix(devtools): two audit-found correctness wins

    routeLatency map no longer grows unboundedly under 404 probing (@forinda/kickjs-devtools).

    The request-tracking middleware keyed routeLatency by ${req.method} ${req.route?.path ?? req.path} — when no route matched, the fallback used the raw URL, so every probed 404 path became its own entry. The samples ring buffer was capped at 1000, but the map itself had no cap; an attacker hammering random paths could inflate /_debug/metrics payloads and leak memory indefinitely. Unmatched requests now collapse into a single <unmatched> bucket per HTTP method.

    DEVTOOLS_BUS token doc drift (@forinda/kickjs-devtools-kit).

    The JSDoc claimed the adapter registered the bus in beforeStart, but it actually registers in beforeMount. Doc-only fix — no runtime change.

  • Updated dependencies [4eebd43]:

    • @forinda/kickjs-devtools-kit@5.3.2

5.2.2

Patch Changes

  • #166 a6d0dd6 Thanks @forinda! - Minify published build output via the tsdown / oxc minifier.

    • Library packages use minify: { compress: true, mangle: false }. Whitespace and comments are stripped and constants folded, but identifiers stay intact so adopter stack traces remain readable.
    • CLI uses minify: { compress: true, mangle: true }. The CLI is an operator tool, not a library — full mangle is fine and gives a smaller binary.

    Net effect: roughly 30–40% smaller dist/*.mjs per package on disk, no public-API or behavior change.

  • Updated dependencies [a6d0dd6]:

    • @forinda/kickjs-devtools-kit@5.3.1

5.2.1

Patch Changes

  • #161 5de61d9 Thanks @forinda! - Import DEVTOOLS_BUS from the new @forinda/kickjs-devtools-kit/bus/token subpath instead of /bus. The SPA bundle drops from 1025 kB to 92 kB now that the framework runtime is no longer transitively pulled through the bus re-export.

    Test fix: vitest aliases switched to anchored regex so longer subpaths match before shorter ones (the previous string-prefix alias rewrote /bus/token into bus.ts/token and threw ENOTDIR).

  • Updated dependencies [5de61d9]:

    • @forinda/kickjs-devtools-kit@5.3.0