@skybridge/devtools 0.0.0-dev.e38035c → 0.0.0-dev.e523cea

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.
@@ -0,0 +1,16 @@
1
+ import { type Router } from "express";
2
+ /**
3
+ * Serve the built devtools React app
4
+ * This router serves static files from the devtools's dist directory.
5
+ *
6
+ * It should be installed at the application root, like so:
7
+ *
8
+ * const app = express();
9
+ *
10
+ * if (env.NODE_ENV !== "production") {
11
+ * app.use(await devtoolsStaticServer(server));
12
+ * app.use(await widgetsDevServer());
13
+ * ^^^^^^^^ Make sure to install the devtoolsStaticServer before the widgetsDevServer
14
+ * }
15
+ */
16
+ export declare const devtoolsStaticServer: () => Promise<Router>;
@@ -0,0 +1,34 @@
1
+ import path from "node:path";
2
+ import { fileURLToPath } from "node:url";
3
+ import cors from "cors";
4
+ import express, {} from "express";
5
+ /**
6
+ * Serve the built devtools React app
7
+ * This router serves static files from the devtools's dist directory.
8
+ *
9
+ * It should be installed at the application root, like so:
10
+ *
11
+ * const app = express();
12
+ *
13
+ * if (env.NODE_ENV !== "production") {
14
+ * app.use(await devtoolsStaticServer(server));
15
+ * app.use(await widgetsDevServer());
16
+ * ^^^^^^^^ Make sure to install the devtoolsStaticServer before the widgetsDevServer
17
+ * }
18
+ */
19
+ export const devtoolsStaticServer = async () => {
20
+ const router = express.Router();
21
+ const distDir = path.dirname(fileURLToPath(import.meta.url));
22
+ router.use(cors());
23
+ router.use(express.static(distDir));
24
+ router.get("/", (_req, res, next) => {
25
+ const indexHtmlPath = path.join(distDir, "index.html");
26
+ res.sendFile(indexHtmlPath, (error) => {
27
+ if (error) {
28
+ next(error);
29
+ }
30
+ });
31
+ });
32
+ return router;
33
+ };
34
+ //# sourceMappingURL=devtoolsStaticServer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtoolsStaticServer.js","sourceRoot":"","sources":["../src/devtoolsStaticServer.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAO,EAAE,EAAe,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,IAAqB,EAAE;IAC9D,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAEhC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAE7D,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IACnB,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACpC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAClC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QACvD,GAAG,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;YACpC,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,CAAC,KAAK,CAAC,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export { devtoolsStaticServer } from "./devtoolsStaticServer.js";
package/dist/index.html CHANGED
@@ -5,8 +5,8 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.ico" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Skybridge MCP devtools</title>
8
- <script type="module" crossorigin src="/assets/index-BBVfvbt6.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-Cy1bGKlJ.css">
8
+ <script type="module" crossorigin src="/assets/index-p4wgwLd2.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-cZnXOU1_.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { devtoolsStaticServer } from "./devtoolsStaticServer.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skybridge/devtools",
3
- "version": "0.0.0-dev.e38035c",
3
+ "version": "0.0.0-dev.e523cea",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -9,11 +9,17 @@
9
9
  "files": [
10
10
  "dist"
11
11
  ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ }
17
+ },
12
18
  "dependencies": {
13
19
  "@base-ui/react": "^1.0.0",
14
20
  "@fontsource-variable/jetbrains-mono": "^5.2.8",
15
21
  "@microlink/react-json-view": "^1.27.0",
16
- "@modelcontextprotocol/sdk": "^1.25.1",
22
+ "@modelcontextprotocol/sdk": "^1.25.2",
17
23
  "@rjsf/core": "^6.1.2",
18
24
  "@rjsf/shadcn": "^6.1.2",
19
25
  "@rjsf/utils": "^6.1.2",
@@ -22,31 +28,36 @@
22
28
  "ahooks": "^3.9.6",
23
29
  "class-variance-authority": "^0.7.1",
24
30
  "clsx": "^2.1.1",
25
- "framer-motion": "^12.24.5",
31
+ "cors": "^2.8.5",
32
+ "express": "^5.2.1",
33
+ "framer-motion": "^12.24.10",
26
34
  "lodash-es": "^4.17.22",
27
35
  "lucide-react": "^0.562.0",
28
- "motion": "^12.24.5",
36
+ "motion": "^12.24.10",
29
37
  "nuqs": "^2.8.6",
30
38
  "react": "^19.2.3",
31
39
  "react-dom": "^19.2.3",
32
- "react-resizable-panels": "^4.2.2",
40
+ "react-resizable-panels": "^4.3.0",
33
41
  "shadcn": "^3.6.3",
34
- "shiki": "^3.20.0",
42
+ "shiki": "^3.21.0",
35
43
  "tailwind-merge": "^3.4.0",
36
44
  "tailwindcss": "^4.1.18",
37
45
  "tailwindcss-animate": "^1.0.7",
38
46
  "tw-animate-css": "^1.4.0",
39
47
  "zustand": "^5.0.9",
40
- "skybridge": "0.0.0-dev.e38035c"
48
+ "skybridge": "0.0.0-dev.e523cea"
41
49
  },
42
50
  "devDependencies": {
43
51
  "@eslint/js": "^9.39.2",
44
52
  "@tailwindcss/vite": "^4.1.18",
53
+ "@total-typescript/tsconfig": "^1.0.4",
45
54
  "@types/lodash-es": "^4.17.12",
46
55
  "@types/react": "^19.2.7",
47
56
  "@types/react-dom": "^19.2.3",
48
57
  "@vitejs/plugin-react": "^5.1.2",
49
58
  "autoprefixer": "^10.4.23",
59
+ "@types/cors": "^2.8.19",
60
+ "@types/express": "^5.0.6",
50
61
  "eslint": "^9.39.2",
51
62
  "eslint-plugin-react-hooks": "^7.0.1",
52
63
  "eslint-plugin-react-refresh": "^0.4.26",
@@ -54,11 +65,12 @@
54
65
  "postcss": "^8.5.6",
55
66
  "typescript": "~5.9.3",
56
67
  "typescript-eslint": "^8.52.0",
57
- "vite": "^7.3.0"
68
+ "vite": "^7.3.1"
58
69
  },
59
70
  "scripts": {
60
71
  "dev": "vite",
61
- "build": "tsc -b && vite build",
72
+ "build": "tsc -b && vite build && pnpm run build:server",
73
+ "build:server": "tsc -p tsconfig.server.json",
62
74
  "test": "pnpm run test:type && pnpm run test:format",
63
75
  "test:type": "tsc --noEmit",
64
76
  "test:format": "biome ci",