@devframes/plugin-inspect 0.9.0-beta.1 → 0.9.0-beta.4

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/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as inspectDevframe } from "./src-8c9bwXlR.mjs";
1
+ import { n as inspectDevframe } from "./src-ED6O11wu.mjs";
2
2
  import { createCac } from "devframe/adapters/cac";
3
3
  //#region src/cli.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { a as RpcFunctionAgentInfo, i as InvokeResult, n as DevframeInspectCommandInfo, o as RpcFunctionInfo, r as DevframeInspectInstanceInfo, t as AgentManifest } from "../types-siIYgvIT.mjs";
1
+ import { a as RpcFunctionAgentInfo, i as InvokeResult, n as DevframeInspectCommandInfo, o as RpcFunctionInfo, r as DevframeInspectInstanceInfo, t as AgentManifest } from "../types-CiRcsiuh.mjs";
2
2
  import { DevframeConnectionStatus, DevframeRpcClient, DevframeRpcClientOptions } from "devframe/client";
3
3
  //#region src/client/index.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import "./types-siIYgvIT.mjs";
1
+ import "./types-CiRcsiuh.mjs";
2
2
  import { DevframeDefinition } from "devframe";
3
3
  //#region src/index.d.ts
4
4
  interface InspectDevframeOptions {
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { i as InvokeResult, o as RpcFunctionInfo } from "./types-siIYgvIT.mjs";
2
- import { n as createInspectDevframe, r as inspectDevframe, t as InspectDevframeOptions } from "./index-Bz_x-Yms.mjs";
1
+ import { i as InvokeResult, o as RpcFunctionInfo } from "./types-CiRcsiuh.mjs";
2
+ import { n as createInspectDevframe, r as inspectDevframe, t as InspectDevframeOptions } from "./index-DEz0yTau.mjs";
3
3
  export { InspectDevframeOptions, type InvokeResult, type RpcFunctionInfo, createInspectDevframe, inspectDevframe as default };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as inspectDevframe, t as createInspectDevframe } from "./src-8c9bwXlR.mjs";
1
+ import { n as inspectDevframe, t as createInspectDevframe } from "./src-ED6O11wu.mjs";
2
2
  export { createInspectDevframe, inspectDevframe as default };
@@ -1,4 +1,4 @@
1
- import { t as serverFunctions } from "../rpc-C0plCoVC.mjs";
1
+ import { t as serverFunctions } from "../rpc-YAeJURfa.mjs";
2
2
  //#region src/node/index.ts
3
3
  /**
4
4
  * Register the inspector's introspection RPC functions on a devframe
@@ -1,5 +1,5 @@
1
- import { i as InvokeResult, n as DevframeInspectCommandInfo, o as RpcFunctionInfo, r as DevframeInspectInstanceInfo } from "../types-siIYgvIT.mjs";
2
- import "../index-Bz_x-Yms.mjs";
1
+ import { i as InvokeResult, n as DevframeInspectCommandInfo, o as RpcFunctionInfo, r as DevframeInspectInstanceInfo } from "../types-CiRcsiuh.mjs";
2
+ import "../index-DEz0yTau.mjs";
3
3
  import { RpcDefinitionsToFunctions } from "devframe/rpc";
4
4
  //#region src/rpc/index.d.ts
5
5
  /**
@@ -1,2 +1,2 @@
1
- import { t as serverFunctions } from "../rpc-C0plCoVC.mjs";
1
+ import { t as serverFunctions } from "../rpc-YAeJURfa.mjs";
2
2
  export { serverFunctions };
@@ -1,6 +1,5 @@
1
1
  import { createDefineWrapperWithContext } from "devframe/rpc";
2
2
  import { defineDiagnostics } from "nostics";
3
- import { toJsonSchema } from "@valibot/to-json-schema";
4
3
  import process from "node:process";
5
4
  import { listLiveDevframeInstances } from "devframe/internal";
6
5
  //#region src/rpc/functions/_define.ts
@@ -240,16 +239,18 @@ const FALLBACK_SCHEMA = Object.freeze({
240
239
  /**
241
240
  * Convert a schema to JSON Schema for the inspector, vendor-neutrally.
242
241
  *
243
- * Prefers the schema's own Standard JSON Schema converter
244
- * (`~standard.jsonSchema`, implemented by e.g. zod 4), then falls back to
245
- * valibot's converter, then to a permissive object — so introspection never
246
- * throws regardless of which validator produced the schema.
242
+ * Uses the schema's own [Standard JSON Schema](https://standardschema.dev/)
243
+ * converter (`~standard.jsonSchema`, implemented by e.g. zod 4) when the
244
+ * validator provides one, and degrades to a permissive object schema
245
+ * otherwise (e.g. valibot, which has no native converter) — so introspection
246
+ * never throws and never pulls in a converter library for a validator devframe
247
+ * doesn't otherwise depend on.
247
248
  */
248
249
  function convert(schema) {
249
250
  const standard = schema["~standard"];
251
+ if (!standard.jsonSchema) return FALLBACK_SCHEMA;
250
252
  try {
251
- if (standard.jsonSchema) return standard.jsonSchema.input({ target: "draft-2020-12" });
252
- return toJsonSchema(schema);
253
+ return standard.jsonSchema.input({ target: "draft-2020-12" });
253
254
  } catch {
254
255
  return FALLBACK_SCHEMA;
255
256
  }
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
4
4
  import { defineDevframe } from "devframe";
5
5
  //#region package.json
6
6
  var name = "@devframes/plugin-inspect";
7
- var version = "0.9.0-beta.1";
7
+ var version = "0.9.0-beta.4";
8
8
  var description = "Devframe plugin that inspects the RPC registry, shared state, and agent surface of a connection.";
9
9
  var homepage = "https://github.com/devframes/devframe#readme";
10
10
  //#endregion
@@ -15,8 +15,8 @@ interface RpcFunctionAgentInfo {
15
15
  /**
16
16
  * Serializable description of a single registered RPC function. Returned
17
17
  * by `devframes:plugin:inspect:list-functions`. JSON-safe by construction
18
- * — valibot schemas are projected to JSON Schema (best effort), never
19
- * sent as live objects.
18
+ * — Standard Schema args/return schemas are projected to JSON Schema (best
19
+ * effort), never sent as live objects.
20
20
  */
21
21
  interface RpcFunctionInfo {
22
22
  /** Full namespaced function name (e.g. `my-plugin:do-thing`). */
@@ -29,9 +29,9 @@ interface RpcFunctionInfo {
29
29
  snapshot: boolean;
30
30
  /** Whether results may be cached client-side. */
31
31
  cacheable: boolean;
32
- /** Whether an args valibot schema is declared. */
32
+ /** Whether an args schema is declared. */
33
33
  hasArgs: boolean;
34
- /** Whether a return valibot schema is declared. */
34
+ /** Whether a return schema is declared. */
35
35
  hasReturns: boolean;
36
36
  /** Whether an explicit dump definition is declared. */
37
37
  hasDump: boolean;
package/dist/vite.d.mts CHANGED
@@ -1,11 +1,11 @@
1
- import { DevframeVitePlugin, ViteDevBridgeOptions } from "devframe/helpers/vite";
1
+ import { DevframeViteOptions, DevframeVitePlugin } from "@devframes/vite/dev-spa";
2
2
  //#region src/vite.d.ts
3
3
  /**
4
4
  * Mount the inspector into an existing Vite dev server. In the default
5
5
  * static-mount mode it serves the built SPA at `/__devframes_plugin_inspect/`;
6
- * pass `{ devMiddleware: true }` for the bridge mode where the host owns
7
- * the SPA and devframe runs a side-car RPC + WS server.
6
+ * pass `{ bridge: true }` for the bridge mode where the host owns the SPA
7
+ * and devframe runs a side-car RPC + WS server.
8
8
  */
9
- declare function inspectVitePlugin(options?: ViteDevBridgeOptions): DevframeVitePlugin;
9
+ declare function inspectVitePlugin(options?: DevframeViteOptions): DevframeVitePlugin;
10
10
  //#endregion
11
- export { type ViteDevBridgeOptions, inspectVitePlugin };
11
+ export { type DevframeViteOptions, inspectVitePlugin };
package/dist/vite.mjs CHANGED
@@ -1,14 +1,14 @@
1
- import { n as inspectDevframe } from "./src-8c9bwXlR.mjs";
2
- import { viteDevBridge } from "devframe/helpers/vite";
1
+ import { n as inspectDevframe } from "./src-ED6O11wu.mjs";
2
+ import { devframeVite } from "@devframes/vite/dev-spa";
3
3
  //#region src/vite.ts
4
4
  /**
5
5
  * Mount the inspector into an existing Vite dev server. In the default
6
6
  * static-mount mode it serves the built SPA at `/__devframes_plugin_inspect/`;
7
- * pass `{ devMiddleware: true }` for the bridge mode where the host owns
8
- * the SPA and devframe runs a side-car RPC + WS server.
7
+ * pass `{ bridge: true }` for the bridge mode where the host owns the SPA
8
+ * and devframe runs a side-car RPC + WS server.
9
9
  */
10
10
  function inspectVitePlugin(options) {
11
- return viteDevBridge(inspectDevframe, options);
11
+ return devframeVite(inspectDevframe, options);
12
12
  }
13
13
  //#endregion
14
14
  export { inspectVitePlugin };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devframes/plugin-inspect",
3
3
  "type": "module",
4
- "version": "0.9.0-beta.1",
4
+ "version": "0.9.0-beta.4",
5
5
  "description": "Devframe plugin that inspects the RPC registry, shared state, and agent surface of a connection.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "peerDependencies": {
40
40
  "vite": "^7.0.0 || ^8.0.0",
41
- "devframe": "0.9.0-beta.1"
41
+ "devframe": "0.9.0-beta.4"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "vite": {
@@ -46,9 +46,9 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "@valibot/to-json-schema": "^1.7.1",
50
49
  "cac": "^7.0.0",
51
- "nostics": "^1.2.0"
50
+ "nostics": "^1.2.0",
51
+ "@devframes/vite": "0.9.0-beta.4"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@antfu/design": "^0.3.4",
@@ -70,8 +70,8 @@
70
70
  "vitest": "^4.1.10",
71
71
  "vue": "^3.5.41",
72
72
  "ws": "^8.21.3",
73
- "@devframes/hub": "0.9.0-beta.1",
74
- "devframe": "0.9.0-beta.1"
73
+ "@devframes/hub": "0.9.0-beta.4",
74
+ "devframe": "0.9.0-beta.4"
75
75
  },
76
76
  "scripts": {
77
77
  "build": "tsdown && vite build --config src/spa/vite.config.ts",