create-skybridge 0.0.0-dev.9a2de58 → 0.0.0-dev.9aa1ccb
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/LICENSE +21 -0
- package/dist/index.js +14 -20
- package/package.json +10 -12
- package/template/README.md +1 -1
- package/template/node_modules/.bin/mcp-inspector +2 -2
- package/template/node_modules/.bin/nodemon +0 -0
- package/template/node_modules/.bin/shx +2 -2
- package/template/node_modules/.bin/tsc +0 -0
- package/template/node_modules/.bin/tsserver +0 -0
- package/template/node_modules/.bin/tsx +0 -0
- package/template/node_modules/.bin/vite +2 -2
- package/template/package.json +21 -18
- package/template/server/src/index.ts +6 -1
- package/template/server/src/server.ts +0 -5
- package/template/web/src/index.css +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Alpic
|
|
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/dist/index.js
CHANGED
|
@@ -142,8 +142,20 @@ export async function init(args = process.argv.slice(2)) {
|
|
|
142
142
|
immediate = false;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
const installCmd =
|
|
146
|
-
const runCmd =
|
|
145
|
+
const installCmd = [pkgManager, "install"];
|
|
146
|
+
const runCmd = [pkgManager];
|
|
147
|
+
switch (pkgManager) {
|
|
148
|
+
case "yarn":
|
|
149
|
+
case "pnpm":
|
|
150
|
+
case "bun":
|
|
151
|
+
break;
|
|
152
|
+
case "deno":
|
|
153
|
+
runCmd.push("task");
|
|
154
|
+
break;
|
|
155
|
+
default:
|
|
156
|
+
runCmd.push("run");
|
|
157
|
+
}
|
|
158
|
+
runCmd.push("dev");
|
|
147
159
|
if (!immediate) {
|
|
148
160
|
prompts.outro(`Done! Next steps:
|
|
149
161
|
cd ${targetDir}
|
|
@@ -174,24 +186,6 @@ function run([command, ...args], options) {
|
|
|
174
186
|
process.exit(1);
|
|
175
187
|
}
|
|
176
188
|
}
|
|
177
|
-
function getInstallCommand(pkgManager) {
|
|
178
|
-
if (pkgManager === "yarn") {
|
|
179
|
-
return [pkgManager];
|
|
180
|
-
}
|
|
181
|
-
return [pkgManager, "install"];
|
|
182
|
-
}
|
|
183
|
-
function getRunCommand(packageManager) {
|
|
184
|
-
switch (packageManager) {
|
|
185
|
-
case "yarn":
|
|
186
|
-
case "pnpm":
|
|
187
|
-
case "bun":
|
|
188
|
-
return [packageManager, "dev"];
|
|
189
|
-
case "deno":
|
|
190
|
-
return [packageManager, "task", "dev"];
|
|
191
|
-
default:
|
|
192
|
-
return [packageManager, "run", "dev"];
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
189
|
function sanitizeTargetDir(targetDir) {
|
|
196
190
|
return (targetDir
|
|
197
191
|
.trim()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-skybridge",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.9aa1ccb",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Alpic",
|
|
@@ -16,21 +16,19 @@
|
|
|
16
16
|
"dist",
|
|
17
17
|
"template"
|
|
18
18
|
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "tsc",
|
|
21
|
-
"test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
|
|
22
|
-
"test:unit": "vitest run",
|
|
23
|
-
"test:type": "tsc --noEmit",
|
|
24
|
-
"test:format": "biome ci",
|
|
25
|
-
"prepublishOnly": "pnpm run build"
|
|
26
|
-
},
|
|
27
19
|
"dependencies": {
|
|
28
20
|
"@clack/prompts": "^0.11.0",
|
|
29
21
|
"mri": "^1.2.0"
|
|
30
22
|
},
|
|
31
23
|
"devDependencies": {
|
|
32
|
-
"@types/node": "^25.0.3",
|
|
33
24
|
"typescript": "^5.9.3",
|
|
34
|
-
"vitest": "^
|
|
25
|
+
"vitest": "^4.0.16"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc",
|
|
29
|
+
"test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
|
|
30
|
+
"test:unit": "vitest run",
|
|
31
|
+
"test:type": "tsc --noEmit",
|
|
32
|
+
"test:format": "biome ci"
|
|
35
33
|
}
|
|
36
|
-
}
|
|
34
|
+
}
|
package/template/README.md
CHANGED
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/inspector/cli/build/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/inspector/cli/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/inspector/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/inspector/cli/build/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/inspector/cli/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/inspector/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules/@modelcontextprotocol/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_cfe96c348f18ba1e580ab58ea63930bf/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../@modelcontextprotocol/inspector/cli/build/cli.js" "$@"
|
|
File without changes
|
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.4.0/node_modules/shx/lib/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.4.0/node_modules/shx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.4.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.4.0/node_modules/shx/lib/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.4.0/node_modules/shx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/shx@0.4.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../shx/lib/cli.js" "$@"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0/node_modules/vite/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0/node_modules/vite/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
|
package/template/package.json
CHANGED
|
@@ -15,25 +15,28 @@
|
|
|
15
15
|
"web:preview": "vite preview -c web/vite.config.ts"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
19
|
-
"express": "^5.1
|
|
20
|
-
"react": "^19.
|
|
21
|
-
"react-dom": "^19.
|
|
22
|
-
"skybridge": "
|
|
23
|
-
"vite": "^7.1
|
|
24
|
-
"zod": "^4.
|
|
18
|
+
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
19
|
+
"express": "^5.2.1",
|
|
20
|
+
"react": "^19.2.3",
|
|
21
|
+
"react-dom": "^19.2.3",
|
|
22
|
+
"skybridge": ">=0.16.2 <1.0.0",
|
|
23
|
+
"vite": "^7.3.1",
|
|
24
|
+
"zod": "^4.3.5"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@modelcontextprotocol/inspector": "^0.
|
|
28
|
-
"@
|
|
29
|
-
"@types/
|
|
30
|
-
"@types/react": "^19.
|
|
31
|
-
"@types/react-dom": "^19.
|
|
32
|
-
"@vitejs/plugin-react": "^5.
|
|
33
|
-
"nodemon": "^3.1.
|
|
34
|
-
"shx": "^0.
|
|
35
|
-
"tsx": "^4.
|
|
36
|
-
"typescript": "^5.
|
|
27
|
+
"@modelcontextprotocol/inspector": "^0.18.0",
|
|
28
|
+
"@skybridge/devtools": ">=0.16.2 <1.0.0",
|
|
29
|
+
"@types/express": "^5.0.6",
|
|
30
|
+
"@types/react": "^19.2.7",
|
|
31
|
+
"@types/react-dom": "^19.2.3",
|
|
32
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
33
|
+
"nodemon": "^3.1.11",
|
|
34
|
+
"shx": "^0.4.0",
|
|
35
|
+
"tsx": "^4.21.0",
|
|
36
|
+
"typescript": "^5.9.3"
|
|
37
37
|
},
|
|
38
|
-
"workspaces": []
|
|
38
|
+
"workspaces": [],
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=24.12.0"
|
|
41
|
+
}
|
|
39
42
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { devtoolsStaticServer } from "@skybridge/devtools";
|
|
1
2
|
import express, { type Express } from "express";
|
|
2
|
-
|
|
3
3
|
import { widgetsDevServer } from "skybridge/server";
|
|
4
4
|
import type { ViteDevServer } from "vite";
|
|
5
5
|
import { mcp } from "./middleware.js";
|
|
@@ -14,6 +14,7 @@ app.use(mcp(server));
|
|
|
14
14
|
const env = process.env.NODE_ENV || "development";
|
|
15
15
|
|
|
16
16
|
if (env !== "production") {
|
|
17
|
+
app.use(await devtoolsStaticServer());
|
|
17
18
|
app.use(await widgetsDevServer());
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -27,6 +28,10 @@ app.listen(3000, (error) => {
|
|
|
27
28
|
console.log(
|
|
28
29
|
"Make your local server accessible with 'ngrok http 3000' and connect to ChatGPT with URL https://xxxxxx.ngrok-free.app/mcp",
|
|
29
30
|
);
|
|
31
|
+
|
|
32
|
+
if (env !== "production") {
|
|
33
|
+
console.log("Devtools available at http://localhost:3000");
|
|
34
|
+
}
|
|
30
35
|
});
|
|
31
36
|
|
|
32
37
|
process.on("SIGINT", async () => {
|
|
@@ -3,10 +3,6 @@ import { z } from "zod";
|
|
|
3
3
|
|
|
4
4
|
const Answers = [
|
|
5
5
|
"As I see it, yes",
|
|
6
|
-
"Ask again later",
|
|
7
|
-
"Better not tell you now",
|
|
8
|
-
"Cannot predict now",
|
|
9
|
-
"Concentrate and ask again",
|
|
10
6
|
"Don't count on it",
|
|
11
7
|
"It is certain",
|
|
12
8
|
"It is decidedly so",
|
|
@@ -15,7 +11,6 @@ const Answers = [
|
|
|
15
11
|
"My sources say no",
|
|
16
12
|
"Outlook good",
|
|
17
13
|
"Outlook not so good",
|
|
18
|
-
"Reply hazy, try again",
|
|
19
14
|
"Signs point to yes",
|
|
20
15
|
"Very doubtful",
|
|
21
16
|
"Without a doubt",
|