create-skybridge 0.0.0-dev.1fc2094 → 0.0.0-dev.1fd0170
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 +24 -46
- package/package.json +2 -2
- package/templates/blank/node_modules/.bin/alpic +2 -2
- package/templates/blank/node_modules/.bin/tsx +2 -2
- package/templates/blank/node_modules/.bin/vite +2 -2
- package/templates/blank/package.json +6 -6
- package/templates/blank/vite.config.ts +6 -0
- package/templates/demo/node_modules/.bin/alpic +2 -2
- package/templates/demo/node_modules/.bin/tsx +2 -2
- package/templates/demo/node_modules/.bin/vite +2 -2
- package/templates/demo/package.json +10 -10
- package/templates/demo/vite.config.ts +6 -0
- package/templates/ecom/.dockerignore +0 -4
- package/templates/ecom/.env.template +0 -2
- package/templates/ecom/.ladle/components.tsx +0 -26
- package/templates/ecom/.ladle/config.mjs +0 -11
- package/templates/ecom/.ladle/vite.config.ts +0 -11
- package/templates/ecom/AGENTS.md +0 -2
- package/templates/ecom/Dockerfile +0 -53
- package/templates/ecom/README.md +0 -92
- package/templates/ecom/_gitignore +0 -9
- package/templates/ecom/alpic.json +0 -3
- package/templates/ecom/node_modules/.bin/alpic +0 -21
- package/templates/ecom/node_modules/.bin/ladle +0 -21
- package/templates/ecom/node_modules/.bin/sb +0 -21
- package/templates/ecom/node_modules/.bin/skybridge +0 -21
- package/templates/ecom/node_modules/.bin/tsc +0 -21
- package/templates/ecom/node_modules/.bin/tsserver +0 -21
- package/templates/ecom/node_modules/.bin/tsx +0 -21
- package/templates/ecom/node_modules/.bin/vite +0 -21
- package/templates/ecom/package.json +0 -41
- package/templates/ecom/src/components/chip.css.ts +0 -56
- package/templates/ecom/src/components/chip.stories.tsx +0 -26
- package/templates/ecom/src/components/chip.tsx +0 -41
- package/templates/ecom/src/components/empty-state.stories.tsx +0 -3
- package/templates/ecom/src/components/empty-state.tsx +0 -12
- package/templates/ecom/src/components/expandable-text.css.ts +0 -49
- package/templates/ecom/src/components/expandable-text.stories.tsx +0 -20
- package/templates/ecom/src/components/expandable-text.tsx +0 -53
- package/templates/ecom/src/components/image-gallery.css.ts +0 -172
- package/templates/ecom/src/components/image-gallery.stories.tsx +0 -30
- package/templates/ecom/src/components/image-gallery.tsx +0 -163
- package/templates/ecom/src/components/product-card.css.ts +0 -159
- package/templates/ecom/src/components/product-card.stories.tsx +0 -58
- package/templates/ecom/src/components/product-card.tsx +0 -102
- package/templates/ecom/src/components/product-carousel.css.ts +0 -134
- package/templates/ecom/src/components/product-carousel.stories.tsx +0 -64
- package/templates/ecom/src/components/product-carousel.tsx +0 -202
- package/templates/ecom/src/components/variant-picker.css.ts +0 -27
- package/templates/ecom/src/components/variant-picker.stories.tsx +0 -64
- package/templates/ecom/src/components/variant-picker.tsx +0 -82
- package/templates/ecom/src/components/view-frame.css.ts +0 -22
- package/templates/ecom/src/components/view-frame.tsx +0 -27
- package/templates/ecom/src/config.ts +0 -12
- package/templates/ecom/src/design/contract.css.ts +0 -39
- package/templates/ecom/src/design/fonts.css +0 -15
- package/templates/ecom/src/design/primitives.css.ts +0 -101
- package/templates/ecom/src/design/recipes/typography.css.ts +0 -75
- package/templates/ecom/src/design/sprinkles.css.ts +0 -128
- package/templates/ecom/src/design/themes/dark.css.ts +0 -36
- package/templates/ecom/src/design/themes/light.css.ts +0 -36
- package/templates/ecom/src/design/tokens.ts +0 -8
- package/templates/ecom/src/helpers.ts +0 -4
- package/templates/ecom/src/i18n.ts +0 -35
- package/templates/ecom/src/index.css +0 -9
- package/templates/ecom/src/lib/cx.ts +0 -9
- package/templates/ecom/src/lib/format.ts +0 -9
- package/templates/ecom/src/lib/variants.ts +0 -79
- package/templates/ecom/src/server.ts +0 -43
- package/templates/ecom/src/tools/render-carousel.ts +0 -241
- package/templates/ecom/src/tools/search-products.ts +0 -185
- package/templates/ecom/src/types.ts +0 -15
- package/templates/ecom/src/views/carousel/detail/detail.css.ts +0 -115
- package/templates/ecom/src/views/carousel/detail/detail.stories.tsx +0 -115
- package/templates/ecom/src/views/carousel/detail/index.tsx +0 -240
- package/templates/ecom/src/views/carousel/index.tsx +0 -234
- package/templates/ecom/tsconfig.json +0 -11
- package/templates/ecom/vite.config.ts +0 -8
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import mri from "mri";
|
|
|
7
7
|
const OUTPUT_TAIL_LINES = 10;
|
|
8
8
|
const DEFAULT_PROJECT_NAME = "skybridge-project";
|
|
9
9
|
const PACKAGE_MANAGERS = ["bun", "deno", "npm", "pnpm", "yarn"];
|
|
10
|
-
const TEMPLATES = ["demo", "blank"
|
|
10
|
+
const TEMPLATES = ["demo", "blank"];
|
|
11
11
|
const pkg = JSON.parse(fs.readFileSync(fileURLToPath(new URL("../package.json", import.meta.url)), "utf-8"));
|
|
12
12
|
const version = pkg.version;
|
|
13
13
|
const HELP_MESSAGE = `Usage: skybridge create [path] [options]
|
|
@@ -19,7 +19,6 @@ Arguments:
|
|
|
19
19
|
|
|
20
20
|
Options:
|
|
21
21
|
--blank scaffold a minimal project without demo tools and views
|
|
22
|
-
--ecom scaffold the ecommerce template (search products, render carousel)
|
|
23
22
|
--overwrite remove existing files if target directory is not empty
|
|
24
23
|
--pm <choice> package manager to use (choices: ${PACKAGE_MANAGERS.join(", ")}. default to npm when none is provided or infered)
|
|
25
24
|
--skip-skills skip installing coding agent skills
|
|
@@ -61,15 +60,7 @@ const Spinner = {
|
|
|
61
60
|
};
|
|
62
61
|
export async function init(args = process.argv.slice(2)) {
|
|
63
62
|
const argv = mri(args, {
|
|
64
|
-
boolean: [
|
|
65
|
-
"help",
|
|
66
|
-
"blank",
|
|
67
|
-
"ecom",
|
|
68
|
-
"overwrite",
|
|
69
|
-
"skip-skills",
|
|
70
|
-
"start",
|
|
71
|
-
"yes",
|
|
72
|
-
],
|
|
63
|
+
boolean: ["help", "blank", "overwrite", "skip-skills", "start", "yes"],
|
|
73
64
|
string: ["pm"],
|
|
74
65
|
alias: { h: "help" },
|
|
75
66
|
});
|
|
@@ -130,43 +121,30 @@ export async function init(args = process.argv.slice(2)) {
|
|
|
130
121
|
if (argv.blank) {
|
|
131
122
|
template = "blank";
|
|
132
123
|
}
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
abort("Cannot specify both --blank and --ecom.");
|
|
136
|
-
}
|
|
137
|
-
template = "ecom";
|
|
124
|
+
else if (yes) {
|
|
125
|
+
template = "demo";
|
|
138
126
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
value: "ecom",
|
|
159
|
-
label: "ecom",
|
|
160
|
-
hint: "ecommerce template with product search tool and carousel view",
|
|
161
|
-
},
|
|
162
|
-
],
|
|
163
|
-
initialValue: "demo",
|
|
164
|
-
});
|
|
165
|
-
if (prompts.isCancel(choice)) {
|
|
166
|
-
return cancel();
|
|
167
|
-
}
|
|
168
|
-
template = choice;
|
|
127
|
+
else {
|
|
128
|
+
const choice = await prompts.select({
|
|
129
|
+
message: "Choose a template:",
|
|
130
|
+
options: [
|
|
131
|
+
{
|
|
132
|
+
value: "demo",
|
|
133
|
+
label: "demo",
|
|
134
|
+
hint: "starter code with tools and UI",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
value: "blank",
|
|
138
|
+
label: "blank",
|
|
139
|
+
hint: "minimal boilerplate without tools",
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
initialValue: "demo",
|
|
143
|
+
});
|
|
144
|
+
if (prompts.isCancel(choice)) {
|
|
145
|
+
return cancel();
|
|
169
146
|
}
|
|
147
|
+
template = choice;
|
|
170
148
|
}
|
|
171
149
|
// 4. Copy template
|
|
172
150
|
const root = path.resolve(targetDir);
|
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.1fd0170",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Alpic",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/cross-spawn": "^6.0.6",
|
|
26
26
|
"typescript": "^6.0.3",
|
|
27
|
-
"vitest": "^4.1.
|
|
27
|
+
"vitest": "^4.1.10"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "tsc",
|
|
@@ -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/alpic@1.
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.156.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_1e4d6b8f8010991ae8bdea8fb1777fd0/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.156.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_1e4d6b8f8010991ae8bdea8fb1777fd0/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/alpic@1.
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.156.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_1e4d6b8f8010991ae8bdea8fb1777fd0/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.156.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_1e4d6b8f8010991ae8bdea8fb1777fd0/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/../alpic/bin/run.js" "$@"
|
|
@@ -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/tsx@4.23.
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.23.1/node_modules/tsx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.23.1/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/tsx@4.23.
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.23.1/node_modules/tsx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.23.1/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/../tsx/dist/cli.mjs" "$@"
|
|
@@ -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@8.1.
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.1.5_@types+node@24.13.3_esbuild@0.28.1_jiti@2.7.0_terser@5.44.1_tsx@4.23.1_yaml@2.9.0/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.1.5_@types+node@24.13.3_esbuild@0.28.1_jiti@2.7.0_terser@5.44.1_tsx@4.23.1_yaml@2.9.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@8.1.
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.1.5_@types+node@24.13.3_esbuild@0.28.1_jiti@2.7.0_terser@5.44.1_tsx@4.23.1_yaml@2.9.0/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.1.5_@types+node@24.13.3_esbuild@0.28.1_jiti@2.7.0_terser@5.44.1_tsx@4.23.1_yaml@2.9.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" "$@"
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
16
|
-
"skybridge": "^0.0.0-dev.
|
|
17
|
-
"vite": "^8.1.
|
|
16
|
+
"skybridge": "^0.0.0-dev.1fd0170",
|
|
17
|
+
"vite": "^8.1.5"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@skybridge/devtools": "^1.2.
|
|
21
|
-
"@types/node": "^24.13.
|
|
22
|
-
"alpic": "^1.
|
|
23
|
-
"tsx": "^4.23.
|
|
20
|
+
"@skybridge/devtools": "^1.2.7",
|
|
21
|
+
"@types/node": "^24.13.3",
|
|
22
|
+
"alpic": "^1.155.0",
|
|
23
|
+
"tsx": "^4.23.1",
|
|
24
24
|
"typescript": "^6.0.3"
|
|
25
25
|
},
|
|
26
26
|
"engines": {
|
|
@@ -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/alpic@1.
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.156.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_1e4d6b8f8010991ae8bdea8fb1777fd0/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.156.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_1e4d6b8f8010991ae8bdea8fb1777fd0/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/alpic@1.
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.156.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_1e4d6b8f8010991ae8bdea8fb1777fd0/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.156.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.9.0_@opentelemetry+api@1.9_1e4d6b8f8010991ae8bdea8fb1777fd0/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/../alpic/bin/run.js" "$@"
|
|
@@ -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/tsx@4.23.
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.23.1/node_modules/tsx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.23.1/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/tsx@4.23.
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.23.1/node_modules/tsx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.23.1/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/../tsx/dist/cli.mjs" "$@"
|
|
@@ -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@8.1.
|
|
13
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.1.5_@types+node@24.13.3_esbuild@0.28.1_jiti@2.7.0_terser@5.44.1_tsx@4.23.1_yaml@2.9.0/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.1.5_@types+node@24.13.3_esbuild@0.28.1_jiti@2.7.0_terser@5.44.1_tsx@4.23.1_yaml@2.9.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@8.1.
|
|
15
|
+
export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.1.5_@types+node@24.13.3_esbuild@0.28.1_jiti@2.7.0_terser@5.44.1_tsx@4.23.1_yaml@2.9.0/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@8.1.5_@types+node@24.13.3_esbuild@0.28.1_jiti@2.7.0_terser@5.44.1_tsx@4.23.1_yaml@2.9.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" "$@"
|
|
@@ -12,27 +12,27 @@
|
|
|
12
12
|
"deploy": "alpic deploy"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@alpic-ai/ui": "^1.
|
|
15
|
+
"@alpic-ai/ui": "^1.155.0",
|
|
16
16
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
17
|
-
"lucide-react": "^1.
|
|
17
|
+
"lucide-react": "^1.25.0",
|
|
18
18
|
"react": "^19.2.7",
|
|
19
19
|
"react-dom": "^19.2.7",
|
|
20
|
-
"skybridge": "^0.0.0-dev.
|
|
20
|
+
"skybridge": "^0.0.0-dev.1fd0170",
|
|
21
21
|
"sonner": "^2.0.7",
|
|
22
22
|
"tw-animate-css": "^1.4.0",
|
|
23
|
-
"vite": "^8.1.
|
|
23
|
+
"vite": "^8.1.5",
|
|
24
24
|
"zod": "^4.4.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@skybridge/devtools": "^1.2.
|
|
28
|
-
"@tailwindcss/vite": "^4.3.
|
|
29
|
-
"@types/node": "^24.13.
|
|
27
|
+
"@skybridge/devtools": "^1.2.7",
|
|
28
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
29
|
+
"@types/node": "^24.13.3",
|
|
30
30
|
"@types/react": "^19.2.17",
|
|
31
31
|
"@types/react-dom": "^19.2.3",
|
|
32
32
|
"@vitejs/plugin-react": "^6.0.3",
|
|
33
|
-
"alpic": "^1.
|
|
34
|
-
"tailwindcss": "^4.3.
|
|
35
|
-
"tsx": "^4.23.
|
|
33
|
+
"alpic": "^1.155.0",
|
|
34
|
+
"tailwindcss": "^4.3.3",
|
|
35
|
+
"tsx": "^4.23.1",
|
|
36
36
|
"typescript": "^6.0.3"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
@@ -6,6 +6,12 @@ import { defineConfig } from "vite";
|
|
|
6
6
|
|
|
7
7
|
export default defineConfig({
|
|
8
8
|
plugins: [skybridge(), react(), tailwindcss()],
|
|
9
|
+
server: {
|
|
10
|
+
forwardConsole: {
|
|
11
|
+
unhandledErrors: true,
|
|
12
|
+
logLevels: ["error"],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
9
15
|
resolve: {
|
|
10
16
|
alias: {
|
|
11
17
|
"@": path.resolve(__dirname, "./src"),
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { GlobalProvider } from "@ladle/react";
|
|
2
|
-
import "../src/index.css";
|
|
3
|
-
import { viewFrame } from "../src/components/view-frame.css";
|
|
4
|
-
import { darkTheme, lightTheme } from "../src/design/tokens";
|
|
5
|
-
import { cx } from "../src/lib/cx";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Ladle's built-in theme toggle (sun/moon in the toolbar) drives
|
|
9
|
-
* globalState.theme. We reuse it to flip the widget's own palette, so the
|
|
10
|
-
* preview theme and the widget theme always match. The Provider applies the
|
|
11
|
-
* real ViewFrame surface (viewFrame + theme class), and index.css loads the
|
|
12
|
-
* brand @font-face rules, so stories preview against the actual frame.
|
|
13
|
-
*/
|
|
14
|
-
export const Provider: GlobalProvider = ({ children, globalState }) => {
|
|
15
|
-
const themeClass = globalState.theme === "dark" ? darkTheme : lightTheme;
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<div
|
|
19
|
-
className={cx(viewFrame, themeClass)}
|
|
20
|
-
data-theme={globalState.theme}
|
|
21
|
-
style={{ minHeight: "100vh", padding: 32 }}
|
|
22
|
-
>
|
|
23
|
-
{children}
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Ladle-only vite config. Intentionally omits the Skybridge plugin (which
|
|
6
|
-
* transforms MCP view boilerplate and crashes Ladle's bundler) and the
|
|
7
|
-
* @vitejs/plugin-react call (Ladle provides its own).
|
|
8
|
-
*/
|
|
9
|
-
export default defineConfig({
|
|
10
|
-
plugins: [vanillaExtractPlugin()],
|
|
11
|
-
});
|
package/templates/ecom/AGENTS.md
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
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.18.0-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.18.0-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/__entry.js"]
|
package/templates/ecom/README.md
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
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/)
|
|
@@ -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/alpic@1.148.1_@opentelemetry+api@1.9.1_@opentelemetry+core@2.8.0_@opentelemetry+api@1.9_dc7708ba103efafb508db02d69c9f925/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.148.1_@opentelemetry+api@1.9.1_@opentelemetry+core@2.8.0_@opentelemetry+api@1.9_dc7708ba103efafb508db02d69c9f925/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.148.1_@opentelemetry+api@1.9.1_@opentelemetry+core@2.8.0_@opentelemetry+api@1.9_dc7708ba103efafb508db02d69c9f925/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.148.1_@opentelemetry+api@1.9.1_@opentelemetry+core@2.8.0_@opentelemetry+api@1.9_dc7708ba103efafb508db02d69c9f925/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
|
|
@@ -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/@ladle+react@5.1.1_@types+node@24.13.2_@types+react@19.2.17_jiti@2.7.0_lightningcss@1.3_87a889c60e4b1fe9d02c5a43786e65ce/node_modules/@ladle/react/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@ladle+react@5.1.1_@types+node@24.13.2_@types+react@19.2.17_jiti@2.7.0_lightningcss@1.3_87a889c60e4b1fe9d02c5a43786e65ce/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/@ladle+react@5.1.1_@types+node@24.13.2_@types+react@19.2.17_jiti@2.7.0_lightningcss@1.3_87a889c60e4b1fe9d02c5a43786e65ce/node_modules/@ladle/react/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@ladle+react@5.1.1_@types+node@24.13.2_@types+react@19.2.17_jiti@2.7.0_lightningcss@1.3_87a889c60e4b1fe9d02c5a43786e65ce/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/../@ladle/react/lib/cli/cli.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../@ladle/react/lib/cli/cli.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/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
|
|
@@ -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/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
|