create-skybridge 0.0.0-dev.7a01a6f → 0.0.0-dev.7be113b

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
@@ -102,7 +102,7 @@ export async function init(args = process.argv.slice(2)) {
102
102
  // Copy template to target directory
103
103
  fs.cpSync(templateDir, root, {
104
104
  recursive: true,
105
- filter: (src) => src !== ".npmrc",
105
+ filter: (src) => !src.endsWith(".npmrc"),
106
106
  });
107
107
  // Rename _gitignore to .gitignore
108
108
  fs.renameSync(path.join(root, "_gitignore"), path.join(root, ".gitignore"));
@@ -18,10 +18,6 @@ describe("create-skybridge", () => {
18
18
  const name = `../../${tempDirName}//project$`;
19
19
  await init([name]);
20
20
  await fs.access(path.join(process.cwd(), tempDirName, "project", ".gitignore"));
21
- try {
22
- await fs.access(path.join(process.cwd(), tempDirName, "project", ".npmrc"));
23
- expect.fail(".npmrc should not be copied");
24
- }
25
- catch { }
21
+ expect(fs.access(path.join(process.cwd(), tempDirName, "project", ".npmrc"))).rejects.toThrowError();
26
22
  });
27
23
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-skybridge",
3
- "version": "0.0.0-dev.7a01a6f",
3
+ "version": "0.0.0-dev.7be113b",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Alpic",
@@ -16,8 +16,6 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@modelcontextprotocol/sdk": "^1.24.3",
19
- "@t3-oss/env-core": "^0.13.8",
20
- "dotenv": "^17.2.3",
21
19
  "express": "^5.1.0",
22
20
  "skybridge": "catalog:",
23
21
  "vite": "^7.1.11",
@@ -2,7 +2,6 @@ import express, { type Express } from "express";
2
2
 
3
3
  import { widgetsDevServer } from "skybridge/server";
4
4
  import type { ViteDevServer } from "vite";
5
- import { env } from "./env.js";
6
5
  import { mcp } from "./middleware.js";
7
6
  import server from "./server.js";
8
7
 
@@ -12,7 +11,9 @@ app.use(express.json());
12
11
 
13
12
  app.use(mcp(server));
14
13
 
15
- if (env.NODE_ENV !== "production") {
14
+ const env = process.env.NODE_ENV || "development";
15
+
16
+ if (env !== "production") {
16
17
  app.use(await widgetsDevServer());
17
18
  }
18
19
 
@@ -22,7 +23,7 @@ app.listen(3000, (error) => {
22
23
  process.exit(1);
23
24
  }
24
25
 
25
- console.log(`Server listening on port 3000 - ${env.NODE_ENV}`);
26
+ console.log(`Server listening on port 3000 - ${env}`);
26
27
  console.log(
27
28
  "Make your local server accessible with 'ngrok http 3000' and connect to ChatGPT with URL https://xxxxxx.ngrok-free.app/mcp",
28
29
  );
@@ -49,20 +49,7 @@ const server = new McpServer(
49
49
  .reduce((acc, char) => acc + char.charCodeAt(0), 0);
50
50
  const answer = Answers[hash % Answers.length];
51
51
  return {
52
- /**
53
- * Arbitrary JSON passed only to the component.
54
- * Use it for data that should not influence the model’s reasoning, like the full set of locations that backs a dropdown.
55
- * _meta is never shown to the model.
56
- */
57
- _meta: {},
58
- /**
59
- * Structured data that is used to hydrate your component.
60
- * ChatGPT injects this object into your iframe as window.openai.toolOutput
61
- */
62
52
  structuredContent: { answer },
63
- /**
64
- * Optional free-form text that the model receives verbatim
65
- */
66
53
  content: [],
67
54
  isError: false,
68
55
  };
@@ -1,12 +0,0 @@
1
- import "dotenv/config";
2
-
3
- import { createEnv } from "@t3-oss/env-core";
4
- import { z } from "zod";
5
-
6
- export const env = createEnv({
7
- server: {
8
- NODE_ENV: z.enum(["development", "production"]).default("development"),
9
- },
10
- runtimeEnv: process.env,
11
- emptyStringAsUndefined: true,
12
- });