create-skybridge 0.0.0-dev.b99752e → 0.0.0-dev.b9ca1d8
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
CHANGED
|
@@ -127,8 +127,6 @@ export async function init(args = process.argv.slice(2)) {
|
|
|
127
127
|
});
|
|
128
128
|
// Rename _gitignore to .gitignore
|
|
129
129
|
fs.renameSync(path.join(root, "_gitignore"), path.join(root, ".gitignore"));
|
|
130
|
-
// Rename _dockerignore to .dockerignore
|
|
131
|
-
fs.renameSync(path.join(root, "_dockerignore"), path.join(root, ".dockerignore"));
|
|
132
130
|
prompts.log.success(`Project created in ${root}`);
|
|
133
131
|
}
|
|
134
132
|
}
|
package/package.json
CHANGED
package/template/Dockerfile
CHANGED
|
@@ -1,26 +1,43 @@
|
|
|
1
1
|
# syntax=docker/dockerfile:1
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Dockerfile for a Skybridge MCP server.
|
|
4
4
|
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
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
7
|
|
|
8
|
-
#
|
|
8
|
+
# Build stage: install deps, compile the app, then prune dev deps.
|
|
9
9
|
FROM node:24-slim AS build
|
|
10
10
|
WORKDIR /app
|
|
11
11
|
|
|
12
|
-
COPY package.json package-lock.json ./
|
|
13
|
-
RUN npm
|
|
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
|
|
14
25
|
|
|
15
|
-
|
|
16
|
-
RUN npm run build
|
|
17
|
-
RUN npm prune --omit=dev
|
|
26
|
+
ENV NODE_ENV=production
|
|
18
27
|
|
|
19
|
-
|
|
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.
|
|
20
38
|
FROM node:24-slim AS runtime
|
|
21
39
|
WORKDIR /app
|
|
22
40
|
ENV NODE_ENV=production
|
|
23
|
-
ENV PORT=3000
|
|
24
41
|
|
|
25
42
|
USER node
|
|
26
43
|
|
package/template/package.json
CHANGED
package/template/src/server.ts
CHANGED
|
@@ -56,6 +56,11 @@ const server = new McpServer(
|
|
|
56
56
|
},
|
|
57
57
|
);
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
if (process.env.NODE_ENV === "production") {
|
|
60
|
+
const { default: manifest } = await import("./vite-manifest.js");
|
|
61
|
+
server.setViteManifest(manifest);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export default await server.run();
|
|
60
65
|
|
|
61
66
|
export type AppType = typeof server;
|
|
File without changes
|