skybridge 0.0.0-dev.f431826 → 0.1.0

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.
@@ -2,3 +2,4 @@ export { useOpenAiGlobal } from "./use-openai-global.js";
2
2
  export { useToolOutput } from "./use-tool-output.js";
3
3
  export * from "./types.js";
4
4
  export { mountWidget } from "./mount-widget.js";
5
+ export { skybridge } from "./plugin.js";
@@ -2,4 +2,5 @@ export { useOpenAiGlobal } from "./use-openai-global.js";
2
2
  export { useToolOutput } from "./use-tool-output.js";
3
3
  export * from "./types.js";
4
4
  export { mountWidget } from "./mount-widget.js";
5
+ export { skybridge } from "./plugin.js";
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/web/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/web/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Plugin } from "vite";
2
+ export declare function skybridge(): Plugin;
@@ -0,0 +1,30 @@
1
+ export function skybridge() {
2
+ return {
3
+ name: "skybridge",
4
+ async config(config) {
5
+ // Dynamic imports to ensure Node modules are only loaded in Node.js context
6
+ const { globSync } = await import("node:fs");
7
+ const { resolve } = await import("node:path");
8
+ const projectRoot = config.root || process.cwd();
9
+ const widgetsPattern = resolve(projectRoot, "src/widgets/*.{js,ts,jsx,tsx,html}");
10
+ const input = Object.fromEntries(globSync(widgetsPattern).map((file) => [
11
+ file.match(/src\/widgets\/(.+)\.tsx$/)?.[1],
12
+ file,
13
+ ]));
14
+ return {
15
+ build: {
16
+ minify: true,
17
+ cssCodeSplit: false,
18
+ rollupOptions: {
19
+ input,
20
+ output: {
21
+ entryFileNames: "[name].js",
22
+ assetFileNames: "[name][extname]",
23
+ },
24
+ },
25
+ },
26
+ };
27
+ },
28
+ };
29
+ }
30
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/web/plugin.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,SAAS;IACvB,OAAO;QACL,IAAI,EAAE,WAAW;QAEjB,KAAK,CAAC,MAAM,CAAC,MAAM;YACjB,4EAA4E;YAC5E,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC;YAC7C,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC;YAE9C,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;YACjD,MAAM,cAAc,GAAG,OAAO,CAC5B,WAAW,EACX,oCAAoC,CACrC,CAAC;YAEF,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAC9B,QAAQ,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;gBACrC,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC3C,IAAI;aACL,CAAC,CACH,CAAC;YAEF,OAAO;gBACL,KAAK,EAAE;oBACL,MAAM,EAAE,IAAI;oBACZ,YAAY,EAAE,KAAK;oBACnB,aAAa,EAAE;wBACb,KAAK;wBACL,MAAM,EAAE;4BACN,cAAc,EAAE,WAAW;4BAC3B,cAAc,EAAE,iBAAiB;yBAClC;qBACF;iBACF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skybridge",
3
- "version": "0.0.0-dev.f431826",
3
+ "version": "0.1.0",
4
4
  "description": "Skybridge is a framework for building ChatGPT apps",
5
5
  "type": "module",
6
6
  "files": [
@@ -45,10 +45,10 @@
45
45
  "@total-typescript/tsconfig": "^1.0.4",
46
46
  "@types/cors": "^2.8.19",
47
47
  "@types/express": "^5.0.3",
48
+ "@types/jsdom": "^21.1.6",
48
49
  "@types/node": "^22.15.30",
49
50
  "@types/react": "^19.2.2",
50
51
  "@types/react-dom": "^19.2.2",
51
- "@types/jsdom": "^21.1.6",
52
52
  "@vitest/ui": "^2.1.8",
53
53
  "jsdom": "^25.0.1",
54
54
  "typescript": "^5.9.3",