create-skybridge 0.36.3 → 1.0.2
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 +315 -214
- package/package.json +4 -3
- package/templates/blank/README.md +92 -0
- package/templates/blank/package.json +28 -0
- package/templates/blank/src/server.ts +21 -0
- package/templates/blank/tsconfig.json +5 -0
- package/templates/blank/vite.config.ts +6 -0
- package/templates/demo/.dockerignore +4 -0
- package/templates/demo/AGENTS.md +1 -0
- package/templates/demo/Dockerfile +53 -0
- package/{template → templates/demo}/README.md +16 -15
- package/templates/demo/_gitignore +6 -0
- package/templates/demo/alpic.json +3 -0
- package/templates/demo/node_modules/.bin/alpic +21 -0
- package/templates/demo/node_modules/.bin/sb +21 -0
- package/templates/demo/node_modules/.bin/skybridge +21 -0
- package/templates/demo/node_modules/.bin/tsc +21 -0
- package/templates/demo/node_modules/.bin/tsserver +21 -0
- package/templates/demo/node_modules/.bin/vite +21 -0
- package/{template → templates/demo}/package.json +2 -2
- package/templates/demo/src/helpers.ts +4 -0
- package/{template → templates/demo}/src/views/onboarding.tsx +1 -1
- package/templates/demo/src/vite-manifest.d.ts +4 -0
- package/dist/index.test.d.ts +0 -1
- package/dist/index.test.js +0 -35
- /package/{template → templates/blank}/.dockerignore +0 -0
- /package/{template → templates/blank}/AGENTS.md +0 -0
- /package/{template → templates/blank}/Dockerfile +0 -0
- /package/{template → templates/blank}/_gitignore +0 -0
- /package/{template → templates/blank}/alpic.json +0 -0
- /package/{template → templates/blank}/node_modules/.bin/alpic +0 -0
- /package/{template → templates/blank}/node_modules/.bin/sb +0 -0
- /package/{template → templates/blank}/node_modules/.bin/skybridge +0 -0
- /package/{template → templates/blank}/node_modules/.bin/tsc +0 -0
- /package/{template → templates/blank}/node_modules/.bin/tsserver +0 -0
- /package/{template → templates/blank}/node_modules/.bin/vite +0 -0
- /package/{template → templates/blank}/src/helpers.ts +0 -0
- /package/{template → templates/blank}/src/vite-manifest.d.ts +0 -0
- /package/{template → templates/demo}/node_modules/.bin/tsx +0 -0
- /package/{template → templates/demo}/src/index.css +0 -0
- /package/{template → templates/demo}/src/server.ts +0 -0
- /package/{template → templates/demo}/src/views/components/doc-link.tsx +0 -0
- /package/{template → templates/demo}/src/views/components/doc.tsx +0 -0
- /package/{template → templates/demo}/src/views/components/nav.tsx +0 -0
- /package/{template → templates/demo}/src/views/components/progress.tsx +0 -0
- /package/{template → templates/demo}/src/views/components/steps/outro.tsx +0 -0
- /package/{template → templates/demo}/src/views/components/steps/state.tsx +0 -0
- /package/{template → templates/demo}/src/views/components/steps/tool-call.tsx +0 -0
- /package/{template → templates/demo}/src/views/components/steps/tool-output.tsx +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/beret.png +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/chapka.png +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/cowboy-hat.png +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/fez.png +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/jester-hat.png +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/mitre.png +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/non-la.png +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/original.png +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/propeller-beanie.png +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/ski-mask.png +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/sombrero.png +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/top-hat.png +0 -0
- /package/{template → templates/demo}/src/views/images/mascot/viking-helmet.png +0 -0
- /package/{template → templates/demo}/src/views/use-mascot.ts +0 -0
- /package/{template → templates/demo}/tsconfig.json +0 -0
- /package/{template → templates/demo}/vite.config.ts +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Skybridge Boilerplate
|
|
2
|
+
|
|
3
|
+
A minimal TypeScript boilerplate for building MCP and ChatGPT Apps with the [Skybridge](https://docs.skybridge.tech) framework.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- Node.js 24+
|
|
10
|
+
|
|
11
|
+
### Local Development
|
|
12
|
+
|
|
13
|
+
#### 1. Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install
|
|
17
|
+
# or
|
|
18
|
+
pnpm install
|
|
19
|
+
# or
|
|
20
|
+
bun install
|
|
21
|
+
# or
|
|
22
|
+
deno install
|
|
23
|
+
# or
|
|
24
|
+
yarn install
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### 2. Start your local server
|
|
28
|
+
|
|
29
|
+
Run the development server from the root directory:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm run dev
|
|
33
|
+
# or
|
|
34
|
+
pnpm dev
|
|
35
|
+
# or
|
|
36
|
+
bun dev
|
|
37
|
+
# or
|
|
38
|
+
deno task dev
|
|
39
|
+
# or
|
|
40
|
+
yarn dev
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This command starts:
|
|
44
|
+
- Your MCP server at `http://localhost:3000/mcp`.
|
|
45
|
+
- Skybridge DevTools UI at `http://localhost:3000`.
|
|
46
|
+
|
|
47
|
+
#### 3. Project structure
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
├── src/
|
|
51
|
+
│ ├── server.ts # Server entry point
|
|
52
|
+
│ └── helpers.ts # Shared utilities
|
|
53
|
+
├── vite.config.ts
|
|
54
|
+
├── alpic.json # Deployment config
|
|
55
|
+
└── package.json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Create your first view
|
|
59
|
+
|
|
60
|
+
#### 1. Add a new view
|
|
61
|
+
|
|
62
|
+
- Register a tool in `src/server.ts` with a unique name (e.g., `my-view`) using [`registerTool`](https://docs.skybridge.tech/api-reference/register-tool) and a `view` config.
|
|
63
|
+
- Create a matching React component at `src/views/my-view.tsx`. **The file name must match the view name exactly**.
|
|
64
|
+
|
|
65
|
+
#### 2. Edit views with Hot Module Replacement (HMR)
|
|
66
|
+
|
|
67
|
+
Edit and save components in `src/views/` — changes will appear instantly inside your App.
|
|
68
|
+
|
|
69
|
+
#### 3. Edit server code
|
|
70
|
+
|
|
71
|
+
Modify files in `src/` and refresh the tool list with your MCP Client to see the changes.
|
|
72
|
+
|
|
73
|
+
### Testing your App
|
|
74
|
+
|
|
75
|
+
You can test your app locally by using our DevTools UI on `http://localhost:3000` while running the `dev` command.
|
|
76
|
+
|
|
77
|
+
To connect your app with web clients like ChatGPT or Claude, expose your server on the internet by adding the `--tunnel` flag.
|
|
78
|
+
By enabling the tunnel, you'll also be able to access a playground to chat with your app and a real LLM. Learn more by reading the [test guide](https://docs.skybridge.tech/quickstart/test-your-app).
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
## Deploy to Production
|
|
82
|
+
|
|
83
|
+
Skybridge is infrastructure vendor agnostic, and your app can be deployed on any cloud platform supporting MCP.
|
|
84
|
+
|
|
85
|
+
The simplest way to deploy your app is by running the `deploy` command, which will push your MCP server to the [Alpic](https://alpic.ai/) cloud for free.
|
|
86
|
+
|
|
87
|
+
## Resources
|
|
88
|
+
- [Skybridge Documentation](https://docs.skybridge.tech/)
|
|
89
|
+
- [Apps SDK Documentation](https://developers.openai.com/apps-sdk)
|
|
90
|
+
- [MCP Apps Documentation](https://github.com/modelcontextprotocol/ext-apps/tree/main)
|
|
91
|
+
- [Model Context Protocol Documentation](https://modelcontextprotocol.io/)
|
|
92
|
+
- [Alpic Documentation](https://docs.alpic.ai/)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "skybridge-blank",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "Blank Skybridge MCP server template",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "skybridge dev",
|
|
9
|
+
"dev:tunnel": "skybridge dev --tunnel",
|
|
10
|
+
"build": "skybridge build",
|
|
11
|
+
"start": "skybridge start",
|
|
12
|
+
"deploy": "alpic deploy"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
16
|
+
"skybridge": "^1.0.2",
|
|
17
|
+
"vite": "^8.0.3"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@skybridge/devtools": "^1.0.0",
|
|
21
|
+
"@types/node": "^24.12.0",
|
|
22
|
+
"alpic": "^1.104.1",
|
|
23
|
+
"typescript": "^6.0.2"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=24.14.1"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { McpServer } from "skybridge/server";
|
|
2
|
+
|
|
3
|
+
const server = new McpServer(
|
|
4
|
+
{
|
|
5
|
+
name: "skybridge-blank",
|
|
6
|
+
version: "0.0.1",
|
|
7
|
+
},
|
|
8
|
+
{ capabilities: {} },
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
// Register tools with `server.registerTool(...)`.
|
|
12
|
+
// Docs: https://docs.skybridge.tech/api-reference/register-tool
|
|
13
|
+
|
|
14
|
+
if (process.env.NODE_ENV === "production") {
|
|
15
|
+
const { default: manifest } = await import("./vite-manifest.js");
|
|
16
|
+
server.setViteManifest(manifest);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default await server.run();
|
|
20
|
+
|
|
21
|
+
export type AppType = typeof server;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This is a ChatGPT/MCP app built with Skybridge. ALWAYS use the `chatgpt-app-builder` skill when planning or updating the codebase.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# syntax=docker/dockerfile:1
|
|
2
|
+
|
|
3
|
+
# Dockerfile for a Skybridge MCP server.
|
|
4
|
+
#
|
|
5
|
+
# Detects npm, yarn, or pnpm from the lockfile in your project.
|
|
6
|
+
# (For bun or deno, adapt the install/build/prune commands below.)
|
|
7
|
+
|
|
8
|
+
# Build stage: install deps, compile the app, then prune dev deps.
|
|
9
|
+
FROM node:24-slim AS build
|
|
10
|
+
WORKDIR /app
|
|
11
|
+
|
|
12
|
+
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
|
|
13
|
+
RUN --mount=type=cache,target=/root/.npm \
|
|
14
|
+
--mount=type=cache,target=/usr/local/share/.cache/yarn \
|
|
15
|
+
--mount=type=cache,target=/root/.local/share/pnpm/store \
|
|
16
|
+
if [ -f package-lock.json ]; then \
|
|
17
|
+
npm ci; \
|
|
18
|
+
elif [ -f yarn.lock ]; then \
|
|
19
|
+
corepack enable yarn && yarn install --frozen-lockfile; \
|
|
20
|
+
elif [ -f pnpm-lock.yaml ]; then \
|
|
21
|
+
corepack enable pnpm && pnpm install --frozen-lockfile; \
|
|
22
|
+
else \
|
|
23
|
+
echo "No lockfile found." && exit 1; \
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
ENV NODE_ENV=production
|
|
27
|
+
|
|
28
|
+
COPY . .
|
|
29
|
+
RUN if [ -f package-lock.json ]; then \
|
|
30
|
+
npm run build && npm prune --omit=dev; \
|
|
31
|
+
elif [ -f yarn.lock ]; then \
|
|
32
|
+
corepack enable yarn && yarn build && yarn install --frozen-lockfile --production=true; \
|
|
33
|
+
elif [ -f pnpm-lock.yaml ]; then \
|
|
34
|
+
corepack enable pnpm && pnpm build && pnpm prune --prod; \
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
# Runtime stage: copy built artifacts and prod deps, run as non-root.
|
|
38
|
+
FROM node:24-slim AS runtime
|
|
39
|
+
WORKDIR /app
|
|
40
|
+
ENV NODE_ENV=production
|
|
41
|
+
|
|
42
|
+
USER node
|
|
43
|
+
|
|
44
|
+
COPY --from=build --chown=node:node /app/node_modules ./node_modules
|
|
45
|
+
COPY --from=build --chown=node:node /app/dist ./dist
|
|
46
|
+
COPY --from=build --chown=node:node /app/package.json ./package.json
|
|
47
|
+
|
|
48
|
+
EXPOSE 3000
|
|
49
|
+
|
|
50
|
+
# Run the built server directly rather than via `npm start` / `skybridge start`.
|
|
51
|
+
# Each wrapper adds a process layer that can swallow SIGTERM, which makes
|
|
52
|
+
# graceful shutdowns time out on platforms like Cloud Run, Fly, and k8s.
|
|
53
|
+
CMD ["node", "dist/server.js"]
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
# Skybridge
|
|
1
|
+
# Skybridge Template
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A starter TypeScript template for building MCP and ChatGPT Apps with the [Skybridge](https://docs.skybridge.tech) framework.
|
|
4
4
|
|
|
5
5
|
## Getting Started
|
|
6
6
|
|
|
7
7
|
### Prerequisites
|
|
8
8
|
|
|
9
9
|
- Node.js 24+
|
|
10
|
-
- HTTP tunnel such as [Alpic tunnel](https://docs.alpic.ai/cli/tunnel) if you want to test with remote MCP hosts like ChatGPT or Claude.ai.
|
|
11
10
|
|
|
12
11
|
### Local Development
|
|
13
12
|
|
|
@@ -16,11 +15,13 @@ A minimal TypeScript template for building MCP and ChatGPT Apps with the [Skybri
|
|
|
16
15
|
```bash
|
|
17
16
|
npm install
|
|
18
17
|
# or
|
|
19
|
-
yarn install
|
|
20
|
-
# or
|
|
21
18
|
pnpm install
|
|
22
19
|
# or
|
|
23
20
|
bun install
|
|
21
|
+
# or
|
|
22
|
+
deno install
|
|
23
|
+
# or
|
|
24
|
+
yarn install
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
#### 2. Start your local server
|
|
@@ -30,16 +31,18 @@ Run the development server from the root directory:
|
|
|
30
31
|
```bash
|
|
31
32
|
npm run dev
|
|
32
33
|
# or
|
|
33
|
-
yarn dev
|
|
34
|
-
# or
|
|
35
34
|
pnpm dev
|
|
36
35
|
# or
|
|
37
36
|
bun dev
|
|
37
|
+
# or
|
|
38
|
+
deno task dev
|
|
39
|
+
# or
|
|
40
|
+
yarn dev
|
|
38
41
|
```
|
|
39
42
|
|
|
40
43
|
This command starts:
|
|
41
44
|
- Your MCP server at `http://localhost:3000/mcp`.
|
|
42
|
-
- Skybridge DevTools UI at `http://localhost:3000
|
|
45
|
+
- Skybridge DevTools UI at `http://localhost:3000`.
|
|
43
46
|
|
|
44
47
|
#### 3. Project structure
|
|
45
48
|
|
|
@@ -68,23 +71,21 @@ Edit and save components in `src/views/` — changes will appear instantly insid
|
|
|
68
71
|
|
|
69
72
|
#### 3. Edit server code
|
|
70
73
|
|
|
71
|
-
Modify files in `src/` and refresh the
|
|
74
|
+
Modify files in `src/` and refresh the tool list with your MCP Client to see the changes.
|
|
72
75
|
|
|
73
76
|
### Testing your App
|
|
74
77
|
|
|
75
|
-
You can test your
|
|
78
|
+
You can test your app locally by using our DevTools UI on `http://localhost:3000` while running the `dev` command.
|
|
76
79
|
|
|
77
|
-
To
|
|
80
|
+
To connect your app with web clients like ChatGPT or Claude, expose your server on the internet by adding the `--tunnel` flag.
|
|
81
|
+
By enabling the tunnel, you'll also be able to access a playground to chat with your app and a real LLM. Learn more by reading the [test guide](https://docs.skybridge.tech/quickstart/test-your-app).
|
|
78
82
|
|
|
79
83
|
|
|
80
84
|
## Deploy to Production
|
|
81
85
|
|
|
82
86
|
Skybridge is infrastructure vendor agnostic, and your app can be deployed on any cloud platform supporting MCP.
|
|
83
87
|
|
|
84
|
-
The simplest way to deploy your
|
|
85
|
-
1. Create an account on [Alpic platform](https://app.alpic.ai/).
|
|
86
|
-
2. Connect your GitHub repository to automatically deploy at each commit.
|
|
87
|
-
3. Use your remote App URL to connect it to MCP Clients, or use the Alpic Playground to easily test your App.
|
|
88
|
+
The simplest way to deploy your app is by running the `deploy` command, which will push your MCP server to the [Alpic](https://alpic.ai/) cloud for free.
|
|
88
89
|
|
|
89
90
|
## Resources
|
|
90
91
|
- [Skybridge Documentation](https://docs.skybridge.tech/)
|
|
@@ -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/alpic@1.104.1_@opentelemetry+api@1.9.0_arktype@2.1.27_rxjs@7.8.2_typescript@6.0.2/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.104.1_@opentelemetry+api@1.9.0_arktype@2.1.27_rxjs@7.8.2_typescript@6.0.2/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/alpic@1.104.1_@opentelemetry+api@1.9.0_arktype@2.1.27_rxjs@7.8.2_typescript@6.0.2/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.104.1_@opentelemetry+api@1.9.0_arktype@2.1.27_rxjs@7.8.2_typescript@6.0.2/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/../alpic/bin/run.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../alpic/bin/run.js" "$@"
|
|
21
|
+
fi
|
|
@@ -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/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/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
|
|
@@ -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/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/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
|
|
@@ -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/typescript@6.0.2/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.2/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/typescript@6.0.2/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.2/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/../typescript/bin/tsc" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../typescript/bin/tsc" "$@"
|
|
21
|
+
fi
|
|
@@ -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/typescript@6.0.2/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.2/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/typescript@6.0.2/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@6.0.2/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/../typescript/bin/tsserver" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
|
21
|
+
fi
|
|
@@ -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/vite@8.0.3_@types+node@24.12.0_esbuild@0.27.2_jiti@2.6.1_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.0.3_@types+node@24.12.0_esbuild@0.27.2_jiti@2.6.1_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/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/vite@8.0.3_@types+node@24.12.0_esbuild@0.27.2_jiti@2.6.1_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.0.3_@types+node@24.12.0_esbuild@0.27.2_jiti@2.6.1_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/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/../vite/bin/vite.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../vite/bin/vite.js" "$@"
|
|
21
|
+
fi
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"lucide-react": "^1.14.0",
|
|
18
18
|
"react": "^19.2.4",
|
|
19
19
|
"react-dom": "^19.2.4",
|
|
20
|
-
"skybridge": "
|
|
20
|
+
"skybridge": "^1.0.2",
|
|
21
21
|
"sonner": "^2.0.7",
|
|
22
22
|
"tw-animate-css": "^1.4.0",
|
|
23
23
|
"vite": "^8.0.3",
|
|
24
24
|
"zod": "^4.3.6"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@skybridge/devtools": "
|
|
27
|
+
"@skybridge/devtools": "^1.0.0",
|
|
28
28
|
"@tailwindcss/vite": "^4.2.4",
|
|
29
29
|
"@types/node": "^24.12.0",
|
|
30
30
|
"@types/react": "^19.2.14",
|
|
@@ -26,7 +26,7 @@ export default function Onboarding() {
|
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
28
|
<div
|
|
29
|
-
className={`${theme === "dark" ? "dark" : ""} mx-auto w-full max-w-4xl
|
|
29
|
+
className={`${theme === "dark" ? "dark" : ""} mx-auto w-full max-w-4xl border border-border overflow-hidden bg-background text-foreground`}
|
|
30
30
|
>
|
|
31
31
|
<div className="min-h-136 md:min-h-95 flex flex-col items-center gap-6 p-6 bg-linear-to-br from-purple-50 via-white to-cyan-50 dark:from-purple-950/30 dark:via-zinc-950 dark:to-cyan-900/30 bg-size-[200%_200%] animate-aurora md:flex-row md:items-stretch">
|
|
32
32
|
<div className="shrink-0 self-center animate-float">
|
package/dist/index.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/index.test.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { randomBytes } from "node:crypto";
|
|
2
|
-
import fs from "node:fs/promises";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
5
|
-
import { init } from "./index.js";
|
|
6
|
-
describe("create-skybridge", () => {
|
|
7
|
-
let tempDirName;
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
tempDirName = `test-${randomBytes(2).toString("hex")}`;
|
|
10
|
-
});
|
|
11
|
-
afterEach(async () => {
|
|
12
|
-
await fs.rm(path.join(process.cwd(), tempDirName), {
|
|
13
|
-
recursive: true,
|
|
14
|
-
force: true,
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
it("should copy the template", { timeout: 10000 }, async () => {
|
|
18
|
-
const name = `../../${tempDirName}//project$`;
|
|
19
|
-
await init([name]);
|
|
20
|
-
await fs.access(path.join(process.cwd(), tempDirName, "project", ".gitignore"));
|
|
21
|
-
await fs.access(path.join(process.cwd(), tempDirName, "project", ".dockerignore"));
|
|
22
|
-
await fs.access(path.join(process.cwd(), tempDirName, "project", "Dockerfile"));
|
|
23
|
-
expect(fs.access(path.join(process.cwd(), tempDirName, "project", ".npmrc"))).rejects.toThrowError();
|
|
24
|
-
});
|
|
25
|
-
it("should download template from repo", { timeout: 10000 }, async () => {
|
|
26
|
-
const name = `../../${tempDirName}//project$`;
|
|
27
|
-
await init([
|
|
28
|
-
name,
|
|
29
|
-
"--repo",
|
|
30
|
-
"github:alpic-ai/skybridge/examples/ecom-carousel",
|
|
31
|
-
]);
|
|
32
|
-
await fs.access(path.join(process.cwd(), tempDirName, "project", ".gitignore"));
|
|
33
|
-
expect(fs.access(path.join(process.cwd(), tempDirName, "project", ".npmrc"))).rejects.toThrowError();
|
|
34
|
-
});
|
|
35
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|