create-skybridge 0.0.0-dev.22b2690 → 0.0.0-dev.22f6c8d
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/index.js +18 -45
- package/dist/index.test.js +1 -11
- package/package.json +2 -3
- package/template/README.md +4 -4
- package/template/_gitignore +1 -2
- package/template/alpic.json +2 -1
- package/template/node_modules/.bin/mcp-inspector +2 -2
- package/template/node_modules/.bin/shx +21 -0
- package/template/node_modules/.bin/vite +2 -2
- package/template/package.json +13 -10
- package/template/server/src/index.ts +10 -12
- package/template/tsconfig.server.json +1 -1
- package/template/web/src/index.css +6 -129
- package/template/web/vite.config.ts +2 -2
- package/template/node_modules/.bin/sb +0 -21
- package/template/node_modules/.bin/skybridge +0 -21
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import fs from "node:fs";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import * as prompts from "@clack/prompts";
|
|
6
|
-
import { downloadTemplate } from "giget";
|
|
7
6
|
import mri from "mri";
|
|
8
7
|
const defaultProjectName = "skybridge-project";
|
|
9
8
|
// prettier-ignore
|
|
@@ -14,30 +13,21 @@ Create a new Skybridge project by copying the starter template.
|
|
|
14
13
|
|
|
15
14
|
Options:
|
|
16
15
|
-h, --help show this help message
|
|
17
|
-
--repo <uri> use a git repository instead of the built-in template
|
|
18
16
|
--overwrite remove existing files in target directory
|
|
19
17
|
--immediate install dependencies and start development server
|
|
20
18
|
|
|
21
|
-
Repository URI formats:
|
|
22
|
-
github:user/repo
|
|
23
|
-
gitlab:user/repo/subdirectory
|
|
24
|
-
bitbucket:user/repo#branch
|
|
25
|
-
|
|
26
19
|
Examples:
|
|
27
20
|
create-skybridge my-app
|
|
28
|
-
create-skybridge my-app --repo github:alpic-ai/skybridge/examples/ecom-carousel
|
|
29
21
|
create-skybridge . --overwrite --immediate
|
|
30
22
|
`;
|
|
31
23
|
export async function init(args = process.argv.slice(2)) {
|
|
32
24
|
const argv = mri(args, {
|
|
33
25
|
boolean: ["help", "overwrite", "immediate"],
|
|
34
|
-
string: ["repo"],
|
|
35
26
|
alias: { h: "help" },
|
|
36
27
|
});
|
|
37
28
|
const argTargetDir = argv._[0]
|
|
38
29
|
? sanitizeTargetDir(String(argv._[0]))
|
|
39
30
|
: undefined;
|
|
40
|
-
const argRepo = argv.repo;
|
|
41
31
|
const argOverwrite = argv.overwrite;
|
|
42
32
|
const argImmediate = argv.immediate;
|
|
43
33
|
const help = argv.help;
|
|
@@ -110,44 +100,27 @@ export async function init(args = process.argv.slice(2)) {
|
|
|
110
100
|
}
|
|
111
101
|
}
|
|
112
102
|
const root = path.join(process.cwd(), targetDir);
|
|
113
|
-
// 3.
|
|
114
|
-
|
|
115
|
-
if (argRepo) {
|
|
116
|
-
prompts.log.step(`Downloading ${argRepo}...`);
|
|
117
|
-
await downloadTemplate(argRepo, { dir: root });
|
|
118
|
-
prompts.log.success(`Project created in ${root}`);
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
prompts.log.step(`Copying template...`);
|
|
122
|
-
const templateDir = fileURLToPath(new URL("../template", import.meta.url));
|
|
123
|
-
// Copy template to target directory
|
|
124
|
-
fs.cpSync(templateDir, root, {
|
|
125
|
-
recursive: true,
|
|
126
|
-
filter: (src) => [".npmrc"].every((file) => !src.endsWith(file)),
|
|
127
|
-
});
|
|
128
|
-
// Rename _gitignore to .gitignore
|
|
129
|
-
fs.renameSync(path.join(root, "_gitignore"), path.join(root, ".gitignore"));
|
|
130
|
-
prompts.log.success(`Project created in ${root}`);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
catch (error) {
|
|
134
|
-
prompts.log.error("Failed to create project from template");
|
|
135
|
-
console.error(error);
|
|
136
|
-
process.exit(1);
|
|
137
|
-
}
|
|
138
|
-
// Update project name in package.json
|
|
139
|
-
const pkgPath = path.join(root, "package.json");
|
|
140
|
-
if (!fs.existsSync(pkgPath)) {
|
|
141
|
-
prompts.log.error("No package.json found in project");
|
|
142
|
-
process.exit(1);
|
|
143
|
-
}
|
|
103
|
+
// 3. Copy the repository
|
|
104
|
+
prompts.log.step(`Copying template...`);
|
|
144
105
|
try {
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
fs.
|
|
106
|
+
const templateDir = fileURLToPath(new URL("../template", import.meta.url));
|
|
107
|
+
// Copy template to target directory
|
|
108
|
+
fs.cpSync(templateDir, root, {
|
|
109
|
+
recursive: true,
|
|
110
|
+
filter: (src) => [".npmrc"].every((file) => !src.endsWith(file)),
|
|
111
|
+
});
|
|
112
|
+
// Rename _gitignore to .gitignore
|
|
113
|
+
fs.renameSync(path.join(root, "_gitignore"), path.join(root, ".gitignore"));
|
|
114
|
+
// Update project name in package.json
|
|
115
|
+
const name = path.basename(root);
|
|
116
|
+
const pkgPath = path.join(root, "package.json");
|
|
117
|
+
const pkg = fs.readFileSync(pkgPath, "utf-8");
|
|
118
|
+
const fixed = pkg.replace(/apps-sdk-template/g, name);
|
|
119
|
+
fs.writeFileSync(pkgPath, fixed);
|
|
120
|
+
prompts.log.success(`Project created in ${root}`);
|
|
148
121
|
}
|
|
149
122
|
catch (error) {
|
|
150
|
-
prompts.log.error("Failed to
|
|
123
|
+
prompts.log.error("Failed to copy repository");
|
|
151
124
|
console.error(error);
|
|
152
125
|
process.exit(1);
|
|
153
126
|
}
|
package/dist/index.test.js
CHANGED
|
@@ -14,20 +14,10 @@ describe("create-skybridge", () => {
|
|
|
14
14
|
force: true,
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
it("should
|
|
17
|
+
it("should scaffold a new project", async () => {
|
|
18
18
|
const name = `../../${tempDirName}//project$`;
|
|
19
19
|
await init([name]);
|
|
20
20
|
await fs.access(path.join(process.cwd(), tempDirName, "project", ".gitignore"));
|
|
21
21
|
expect(fs.access(path.join(process.cwd(), tempDirName, "project", ".npmrc"))).rejects.toThrowError();
|
|
22
22
|
});
|
|
23
|
-
it("should download template from repo", async () => {
|
|
24
|
-
const name = `../../${tempDirName}//project$`;
|
|
25
|
-
await init([
|
|
26
|
-
name,
|
|
27
|
-
"--repo",
|
|
28
|
-
"github:alpic-ai/skybridge/examples/ecom-carousel",
|
|
29
|
-
]);
|
|
30
|
-
await fs.access(path.join(process.cwd(), tempDirName, "project", ".gitignore"));
|
|
31
|
-
expect(fs.access(path.join(process.cwd(), tempDirName, "project", ".npmrc"))).rejects.toThrowError();
|
|
32
|
-
});
|
|
33
23
|
});
|
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.22f6c8d",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Alpic",
|
|
@@ -18,12 +18,11 @@
|
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@clack/prompts": "^0.11.0",
|
|
21
|
-
"giget": "^2.0.0",
|
|
22
21
|
"mri": "^1.2.0"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
25
24
|
"typescript": "^5.9.3",
|
|
26
|
-
"vitest": "^4.0.
|
|
25
|
+
"vitest": "^4.0.16"
|
|
27
26
|
},
|
|
28
27
|
"scripts": {
|
|
29
28
|
"build": "tsc",
|
package/template/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ChatGPT Apps SDK Alpic Starter
|
|
2
2
|
|
|
3
|
-
A minimal TypeScript template for building
|
|
3
|
+
A minimal TypeScript template for building OpenAI Apps SDK compatible MCP servers with widget rendering in ChatGPT.
|
|
4
4
|
|
|
5
5
|
## Getting Started
|
|
6
6
|
|
|
@@ -40,7 +40,7 @@ bun dev
|
|
|
40
40
|
This command starts an Express server on port 3000. This server packages:
|
|
41
41
|
|
|
42
42
|
- an MCP endpoint on `/mcp` (the app backend)
|
|
43
|
-
- a React application on Vite HMR dev server (the UI elements to be displayed in
|
|
43
|
+
- a React application on Vite HMR dev server (the UI elements to be displayed in ChatGPT)
|
|
44
44
|
|
|
45
45
|
#### 3. Connect to ChatGPT
|
|
46
46
|
|
|
@@ -59,7 +59,7 @@ ngrok http 3000
|
|
|
59
59
|
|
|
60
60
|
#### 2. Edit widgets with Hot Module Replacement (HMR)
|
|
61
61
|
|
|
62
|
-
Edit and save components in `web/src/widgets/` — changes appear instantly in
|
|
62
|
+
Edit and save components in `web/src/widgets/` — changes appear instantly in ChatGPT
|
|
63
63
|
|
|
64
64
|
#### 3. Edit server code
|
|
65
65
|
|
package/template/_gitignore
CHANGED
package/template/alpic.json
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.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@
|
|
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.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@
|
|
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" "$@"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
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
|
+
else
|
|
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
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../shx/lib/cli.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../shx/lib/cli.js" "$@"
|
|
21
|
+
fi
|
|
@@ -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.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.
|
|
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.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.
|
|
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
|
@@ -5,34 +5,37 @@
|
|
|
5
5
|
"description": "Alpic MCP Server Template",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"dev": "
|
|
9
|
-
"build": "
|
|
10
|
-
"start": "
|
|
11
|
-
"inspector": "mcp-inspector http://localhost:3000/mcp"
|
|
8
|
+
"dev": "nodemon",
|
|
9
|
+
"build": "vite build -c web/vite.config.ts && shx rm -rf server/dist && tsc -p tsconfig.server.json && shx cp -r web/dist server/dist/assets",
|
|
10
|
+
"start": "node server/dist/index.js",
|
|
11
|
+
"inspector": "mcp-inspector http://localhost:3000/mcp",
|
|
12
|
+
"server:build": "tsc -p tsconfig.server.json",
|
|
13
|
+
"server:start": "node server/dist/index.js",
|
|
14
|
+
"web:build": "tsc -b web && vite build -c web/vite.config.ts",
|
|
15
|
+
"web:preview": "vite preview -c web/vite.config.ts"
|
|
12
16
|
},
|
|
13
17
|
"dependencies": {
|
|
14
18
|
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
15
|
-
"cors": "^2.8.5",
|
|
16
19
|
"express": "^5.2.1",
|
|
17
20
|
"react": "^19.2.3",
|
|
18
21
|
"react-dom": "^19.2.3",
|
|
19
|
-
"skybridge": ">=0.
|
|
22
|
+
"skybridge": ">=0.17.1 <1.0.0",
|
|
20
23
|
"vite": "^7.3.1",
|
|
21
24
|
"zod": "^4.3.5"
|
|
22
25
|
},
|
|
23
26
|
"devDependencies": {
|
|
24
27
|
"@modelcontextprotocol/inspector": "^0.18.0",
|
|
25
|
-
"@skybridge/devtools": ">=0.
|
|
26
|
-
"@types/cors": "^2.8.19",
|
|
28
|
+
"@skybridge/devtools": ">=0.17.1 <1.0.0",
|
|
27
29
|
"@types/express": "^5.0.6",
|
|
28
|
-
"@types/react": "^19.2.
|
|
30
|
+
"@types/react": "^19.2.7",
|
|
29
31
|
"@types/react-dom": "^19.2.3",
|
|
30
32
|
"@vitejs/plugin-react": "^5.1.2",
|
|
31
33
|
"nodemon": "^3.1.11",
|
|
34
|
+
"shx": "^0.4.0",
|
|
32
35
|
"tsx": "^4.21.0",
|
|
33
36
|
"typescript": "^5.9.3"
|
|
34
37
|
},
|
|
35
38
|
"engines": {
|
|
36
|
-
"node": ">=24.
|
|
39
|
+
"node": ">=24.12.0"
|
|
37
40
|
}
|
|
38
41
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
import cors from "cors";
|
|
1
|
+
import { devtoolsStaticServer } from "@skybridge/devtools";
|
|
4
2
|
import express, { type Express } from "express";
|
|
5
3
|
import { widgetsDevServer } from "skybridge/server";
|
|
6
4
|
import type { ViteDevServer } from "vite";
|
|
@@ -16,24 +14,24 @@ app.use(mcp(server));
|
|
|
16
14
|
const env = process.env.NODE_ENV || "development";
|
|
17
15
|
|
|
18
16
|
if (env !== "production") {
|
|
19
|
-
const { devtoolsStaticServer } = await import("@skybridge/devtools");
|
|
20
17
|
app.use(await devtoolsStaticServer());
|
|
21
18
|
app.use(await widgetsDevServer());
|
|
22
19
|
}
|
|
23
20
|
|
|
24
|
-
if (env === "production") {
|
|
25
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
26
|
-
const __dirname = path.dirname(__filename);
|
|
27
|
-
|
|
28
|
-
app.use("/assets", cors());
|
|
29
|
-
app.use("/assets", express.static(path.join(__dirname, "assets")));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
21
|
app.listen(3000, (error) => {
|
|
33
22
|
if (error) {
|
|
34
23
|
console.error("Failed to start server:", error);
|
|
35
24
|
process.exit(1);
|
|
36
25
|
}
|
|
26
|
+
|
|
27
|
+
console.log(`Server listening on port 3000 - ${env}`);
|
|
28
|
+
console.log(
|
|
29
|
+
"Make your local server accessible with 'ngrok http 3000' and connect to ChatGPT with URL https://xxxxxx.ngrok-free.app/mcp",
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
if (env !== "production") {
|
|
33
|
+
console.log("Devtools available at http://localhost:3000");
|
|
34
|
+
}
|
|
37
35
|
});
|
|
38
36
|
|
|
39
37
|
process.on("SIGINT", async () => {
|
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,600&display=swap");
|
|
2
|
-
|
|
3
1
|
.container {
|
|
4
2
|
display: flex;
|
|
5
3
|
justify-content: center;
|
|
6
4
|
align-items: center;
|
|
7
|
-
|
|
8
|
-
max-height: 100%;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
padding: 1rem;
|
|
11
|
-
box-sizing: border-box;
|
|
5
|
+
height: 100%;
|
|
12
6
|
}
|
|
13
7
|
|
|
14
8
|
.ball {
|
|
15
|
-
background:
|
|
16
|
-
circle at 30% 30%,
|
|
17
|
-
#454565 0%,
|
|
18
|
-
#1c1c30 40%,
|
|
19
|
-
#0a0a10 100%
|
|
20
|
-
);
|
|
9
|
+
background-color: black;
|
|
21
10
|
border-radius: 50%;
|
|
22
11
|
width: 12rem;
|
|
23
12
|
height: 12rem;
|
|
@@ -27,128 +16,16 @@
|
|
|
27
16
|
justify-content: center;
|
|
28
17
|
font-family: monospace;
|
|
29
18
|
text-align: center;
|
|
30
|
-
position: relative;
|
|
31
|
-
box-shadow:
|
|
32
|
-
0 10px 30px rgba(0, 0, 0, 0.5),
|
|
33
|
-
0 5px 15px rgba(0, 0, 0, 0.3),
|
|
34
|
-
inset 0 -20px 40px rgba(0, 0, 0, 0.6);
|
|
35
|
-
animation:
|
|
36
|
-
float 3s ease-in-out infinite,
|
|
37
|
-
colorShift 15s ease-in-out infinite;
|
|
38
|
-
transition: transform 0.3s ease;
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
border: 1px solid rgba(30, 30, 50, 0.6);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.ball:hover {
|
|
44
|
-
transform: scale(1.05) translateY(-8px);
|
|
45
|
-
animation: colorShift 15s ease-in-out infinite;
|
|
46
|
-
box-shadow:
|
|
47
|
-
0 20px 50px rgba(0, 0, 0, 0.6),
|
|
48
|
-
0 10px 25px rgba(0, 0, 0, 0.4),
|
|
49
|
-
inset 0 -20px 40px rgba(0, 0, 0, 0.6);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@keyframes float {
|
|
53
|
-
0%,
|
|
54
|
-
100% {
|
|
55
|
-
transform: translateY(0);
|
|
56
|
-
}
|
|
57
|
-
50% {
|
|
58
|
-
transform: translateY(-8px);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@keyframes colorShift {
|
|
63
|
-
0%,
|
|
64
|
-
100% {
|
|
65
|
-
background: radial-gradient(
|
|
66
|
-
circle at 30% 30%,
|
|
67
|
-
#454565 0%,
|
|
68
|
-
#1c1c30 40%,
|
|
69
|
-
#0a0a10 100%
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
25% {
|
|
73
|
-
background: radial-gradient(
|
|
74
|
-
circle at 30% 30%,
|
|
75
|
-
#3f4a65 0%,
|
|
76
|
-
#181e30 40%,
|
|
77
|
-
#090a10 100%
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
50% {
|
|
81
|
-
background: radial-gradient(
|
|
82
|
-
circle at 30% 30%,
|
|
83
|
-
#3a5065 0%,
|
|
84
|
-
#152230 40%,
|
|
85
|
-
#080a10 100%
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
75% {
|
|
89
|
-
background: radial-gradient(
|
|
90
|
-
circle at 30% 30%,
|
|
91
|
-
#3f4a65 0%,
|
|
92
|
-
#181e30 40%,
|
|
93
|
-
#090a10 100%
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.ball::before {
|
|
99
|
-
content: "";
|
|
100
|
-
position: absolute;
|
|
101
|
-
top: 8%;
|
|
102
|
-
left: 20%;
|
|
103
|
-
width: 30%;
|
|
104
|
-
height: 20%;
|
|
105
|
-
background: radial-gradient(
|
|
106
|
-
ellipse,
|
|
107
|
-
rgba(255, 255, 255, 0.3) 0%,
|
|
108
|
-
transparent 70%
|
|
109
|
-
);
|
|
110
|
-
border-radius: 50%;
|
|
111
|
-
pointer-events: none;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.ball::after {
|
|
115
|
-
content: "";
|
|
116
|
-
position: absolute;
|
|
117
|
-
bottom: 8%;
|
|
118
|
-
right: 25%;
|
|
119
|
-
width: 25%;
|
|
120
|
-
height: 10%;
|
|
121
|
-
background: radial-gradient(
|
|
122
|
-
ellipse,
|
|
123
|
-
rgba(255, 255, 255, 0.1) 0%,
|
|
124
|
-
transparent 70%
|
|
125
|
-
);
|
|
126
|
-
border-radius: 50%;
|
|
127
|
-
pointer-events: none;
|
|
128
19
|
}
|
|
129
20
|
|
|
130
21
|
.question {
|
|
131
|
-
font-size:
|
|
22
|
+
font-size: 0.75rem;
|
|
132
23
|
color: lightgrey;
|
|
133
|
-
max-width: 90%;
|
|
134
|
-
word-wrap: break-word;
|
|
135
|
-
overflow-wrap: break-word;
|
|
136
|
-
text-align: center;
|
|
137
|
-
line-height: 1.3;
|
|
138
|
-
font-style: italic;
|
|
139
24
|
}
|
|
140
25
|
|
|
141
26
|
.answer {
|
|
142
|
-
font-
|
|
143
|
-
font-
|
|
144
|
-
font-size: 1.25rem;
|
|
145
|
-
font-weight: 600;
|
|
27
|
+
font-size: 1.125rem;
|
|
28
|
+
font-weight: bold;
|
|
146
29
|
margin-top: 0.5rem;
|
|
147
|
-
color:
|
|
148
|
-
text-shadow: 0 0 10px rgba(125, 211, 252, 0.5);
|
|
149
|
-
max-width: 90%;
|
|
150
|
-
word-wrap: break-word;
|
|
151
|
-
overflow-wrap: break-word;
|
|
152
|
-
text-align: center;
|
|
153
|
-
line-height: 1.3;
|
|
30
|
+
color: aqua;
|
|
154
31
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import react from "@vitejs/plugin-react";
|
|
3
3
|
import { skybridge } from "skybridge/web";
|
|
4
|
-
import { defineConfig
|
|
4
|
+
import { defineConfig } from "vite";
|
|
5
5
|
|
|
6
6
|
// https://vite.dev/config/
|
|
7
7
|
export default defineConfig({
|
|
8
|
-
plugins: [skybridge()
|
|
8
|
+
plugins: [skybridge(), react()],
|
|
9
9
|
root: __dirname,
|
|
10
10
|
resolve: {
|
|
11
11
|
alias: {
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../skybridge/bin/run.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../skybridge/bin/run.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../skybridge/bin/run.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../skybridge/bin/run.js" "$@"
|
|
21
|
-
fi
|