sunpeak 0.20.11 → 0.20.16

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.
Files changed (70) hide show
  1. package/bin/commands/dev.mjs +3 -3
  2. package/bin/sunpeak.js +13 -8
  3. package/dist/chatgpt/index.cjs +1 -1
  4. package/dist/chatgpt/index.js +2 -2
  5. package/dist/claude/index.cjs +1 -1
  6. package/dist/claude/index.js +1 -1
  7. package/dist/host/chatgpt/index.cjs +1 -1
  8. package/dist/host/chatgpt/index.js +1 -1
  9. package/dist/index.cjs +5 -5
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.js +5 -5
  12. package/dist/index.js.map +1 -1
  13. package/dist/inspector/index.cjs +1 -1
  14. package/dist/inspector/index.js +2 -2
  15. package/dist/{inspector-JirXykqh.js → inspector-BVYIkjfw.js} +110 -16
  16. package/dist/inspector-BVYIkjfw.js.map +1 -0
  17. package/dist/{inspector-CjEFyXqc.cjs → inspector-mL_Ysqj6.cjs} +110 -16
  18. package/dist/inspector-mL_Ysqj6.cjs.map +1 -0
  19. package/dist/mcp/index.cjs +13 -13
  20. package/dist/mcp/index.cjs.map +1 -1
  21. package/dist/mcp/index.js +13 -13
  22. package/dist/mcp/index.js.map +1 -1
  23. package/dist/{protocol-VbxlTDik.js → protocol-C58brCtf.js} +51 -51
  24. package/dist/protocol-C58brCtf.js.map +1 -0
  25. package/dist/{protocol-WZSAhsV8.cjs → protocol-CFifOG2U.cjs} +51 -51
  26. package/dist/protocol-CFifOG2U.cjs.map +1 -0
  27. package/dist/{use-app-BEelk4Pj.cjs → use-app-BXVq24n8.cjs} +5 -5
  28. package/dist/{use-app-BEelk4Pj.cjs.map → use-app-BXVq24n8.cjs.map} +1 -1
  29. package/dist/{use-app-imsRg_Sq.js → use-app-L0OZBROc.js} +5 -5
  30. package/dist/{use-app-imsRg_Sq.js.map → use-app-L0OZBROc.js.map} +1 -1
  31. package/dist/{v4-81B3d_AO.cjs → v4-BtFbnniV.cjs} +1133 -403
  32. package/dist/v4-BtFbnniV.cjs.map +1 -0
  33. package/dist/{v4-zo4hA9Qs.js → v4-DfWETn4d.js} +1133 -403
  34. package/dist/v4-DfWETn4d.js.map +1 -0
  35. package/package.json +12 -12
  36. package/template/dist/albums/albums.html +42 -17
  37. package/template/dist/albums/albums.json +1 -1
  38. package/template/dist/carousel/carousel.html +42 -17
  39. package/template/dist/carousel/carousel.json +1 -1
  40. package/template/dist/map/map.html +337 -296
  41. package/template/dist/map/map.json +1 -1
  42. package/template/dist/review/review.html +42 -17
  43. package/template/dist/review/review.json +1 -1
  44. package/template/node_modules/.vite/deps/_metadata.json +3 -3
  45. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js +4 -4
  46. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js.map +1 -1
  47. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js +3 -3
  48. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js.map +1 -1
  49. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js +4 -4
  50. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js.map +1 -1
  51. package/template/node_modules/.vite-mcp/deps/_metadata.json +30 -30
  52. package/template/node_modules/.vite-mcp/deps/{external-B0TEY49X.js → external-BzlnL8_g.js} +1132 -403
  53. package/template/node_modules/.vite-mcp/deps/external-BzlnL8_g.js.map +1 -0
  54. package/template/node_modules/.vite-mcp/deps/mapbox-gl.js +9470 -9295
  55. package/template/node_modules/.vite-mcp/deps/mapbox-gl.js.map +1 -1
  56. package/template/node_modules/.vite-mcp/deps/{protocol-C6_cc6NO.js → protocol-Depaaj0Z.js} +6 -6
  57. package/template/node_modules/.vite-mcp/deps/{protocol-C6_cc6NO.js.map → protocol-Depaaj0Z.js.map} +1 -1
  58. package/template/node_modules/.vite-mcp/deps/{v4-Dqc4MOHZ.js → v4-3k5wOzJw.js} +4 -3
  59. package/template/node_modules/.vite-mcp/deps/v4-3k5wOzJw.js.map +1 -0
  60. package/template/node_modules/.vite-mcp/deps/zod.js +3 -3
  61. package/template/node_modules/.vite-mcp/deps/zod.js.map +1 -1
  62. package/template/package.json +2 -2
  63. package/dist/inspector-CjEFyXqc.cjs.map +0 -1
  64. package/dist/inspector-JirXykqh.js.map +0 -1
  65. package/dist/protocol-VbxlTDik.js.map +0 -1
  66. package/dist/protocol-WZSAhsV8.cjs.map +0 -1
  67. package/dist/v4-81B3d_AO.cjs.map +0 -1
  68. package/dist/v4-zo4hA9Qs.js.map +0 -1
  69. package/template/node_modules/.vite-mcp/deps/external-B0TEY49X.js.map +0 -1
  70. package/template/node_modules/.vite-mcp/deps/v4-Dqc4MOHZ.js.map +0 -1
@@ -4,7 +4,7 @@ import * as path from 'path';
4
4
  const { existsSync, readFileSync, watch: fsWatch } = fs;
5
5
  const { join, resolve, basename, dirname } = path;
6
6
  import { createRequire } from 'module';
7
- import { pathToFileURL } from 'url';
7
+ import { fileURLToPath, pathToFileURL } from 'url';
8
8
  import { spawn } from 'child_process';
9
9
  import { getPort } from '../lib/get-port.mjs';
10
10
  import { startSandboxServer } from '../lib/sandbox-server.mjs';
@@ -68,7 +68,7 @@ async function importFromProject(require, moduleName) {
68
68
  */
69
69
  function startBuildWatcher(projectRoot, resourcesDir, mcpHandle, { skipInitialBuild = false } = {}) {
70
70
  let activeChild = null;
71
- const sunpeakBin = join(dirname(new URL(import.meta.url).pathname), '..', 'sunpeak.js');
71
+ const sunpeakBin = join(dirname(fileURLToPath(import.meta.url)), '..', 'sunpeak.js');
72
72
 
73
73
  const runBuild = () => {
74
74
  // Kill any in-progress build and start fresh
@@ -205,7 +205,7 @@ export async function dev(projectRoot = process.cwd(), args = []) {
205
205
  // --prod-resources: Run initial production build so dist/ is ready before server starts
206
206
  if (isProdResources) {
207
207
  console.log('Building production resources...');
208
- const sunpeakBin = join(dirname(new URL(import.meta.url).pathname), '..', 'sunpeak.js');
208
+ const sunpeakBin = join(dirname(fileURLToPath(import.meta.url)), '..', 'sunpeak.js');
209
209
  const { execSync } = await import('child_process');
210
210
  try {
211
211
  execSync(`${process.execPath} ${sunpeakBin} build`, {
package/bin/sunpeak.js CHANGED
@@ -2,12 +2,17 @@
2
2
 
3
3
  import { existsSync, readFileSync } from 'fs';
4
4
  import { join, dirname } from 'path';
5
- import { fileURLToPath } from 'url';
5
+ import { fileURLToPath, pathToFileURL } from 'url';
6
6
  import { discoverResources } from './lib/patterns.mjs';
7
7
 
8
8
  const __dirname = dirname(fileURLToPath(import.meta.url));
9
9
  const COMMANDS_DIR = join(__dirname, 'commands');
10
10
 
11
+ // On Windows, absolute paths like "C:\..." can't be passed directly to dynamic
12
+ // import() — Node's ESM loader parses "C:" as a URL scheme and rejects it.
13
+ // Wrap with pathToFileURL().href to produce a valid file:// URL.
14
+ const commandUrl = (file) => pathToFileURL(join(COMMANDS_DIR, file)).href;
15
+
11
16
  function checkPackageJson() {
12
17
  const pkgPath = join(process.cwd(), 'package.json');
13
18
  if (!existsSync(pkgPath)) {
@@ -46,49 +51,49 @@ function getVersion() {
46
51
  switch (command) {
47
52
  case 'new':
48
53
  {
49
- const { init } = await import(join(COMMANDS_DIR, 'new.mjs'));
54
+ const { init } = await import(commandUrl('new.mjs'));
50
55
  await init(args[0], args[1]);
51
56
  }
52
57
  break;
53
58
 
54
59
  case 'dev':
55
60
  {
56
- const { dev } = await import(join(COMMANDS_DIR, 'dev.mjs'));
61
+ const { dev } = await import(commandUrl('dev.mjs'));
57
62
  await dev(process.cwd(), args);
58
63
  }
59
64
  break;
60
65
 
61
66
  case 'build':
62
67
  {
63
- const { build } = await import(join(COMMANDS_DIR, 'build.mjs'));
68
+ const { build } = await import(commandUrl('build.mjs'));
64
69
  await build(process.cwd());
65
70
  }
66
71
  break;
67
72
 
68
73
  case 'start':
69
74
  {
70
- const { start } = await import(join(COMMANDS_DIR, 'start.mjs'));
75
+ const { start } = await import(commandUrl('start.mjs'));
71
76
  await start(process.cwd(), args);
72
77
  }
73
78
  break;
74
79
 
75
80
  case 'inspect':
76
81
  {
77
- const { inspect } = await import(join(COMMANDS_DIR, 'inspect.mjs'));
82
+ const { inspect } = await import(commandUrl('inspect.mjs'));
78
83
  await inspect(args);
79
84
  }
80
85
  break;
81
86
 
82
87
  case 'test':
83
88
  {
84
- const { runTest } = await import(join(COMMANDS_DIR, 'test.mjs'));
89
+ const { runTest } = await import(commandUrl('test.mjs'));
85
90
  await runTest(args);
86
91
  }
87
92
  break;
88
93
 
89
94
  case 'upgrade':
90
95
  {
91
- const { upgrade } = await import(join(COMMANDS_DIR, 'upgrade.mjs'));
96
+ const { upgrade } = await import(commandUrl('upgrade.mjs'));
92
97
  const options = {
93
98
  check: args.includes('--check') || args.includes('-c'),
94
99
  help: args.includes('--help') || args.includes('-h'),
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../chunk-CoPdw6nB.cjs");
3
- const require_inspector = require("../inspector-CjEFyXqc.cjs");
3
+ const require_inspector = require("../inspector-mL_Ysqj6.cjs");
4
4
  const require_inspector_url = require("../inspector-url-CCgv8H74.cjs");
5
5
  const require_discovery = require("../discovery-C9fQVb1u.cjs");
6
6
  //#region src/chatgpt/index.ts
@@ -1,5 +1,5 @@
1
- import { I as __exportAll } from "../v4-zo4hA9Qs.js";
2
- import { _ as McpAppHost, d as ThemeProvider, f as useThemeContext, g as extractResourceCSP, h as IframeResource, n as resolveServerToolResult, t as Inspector, v as SCREEN_WIDTHS } from "../inspector-JirXykqh.js";
1
+ import { I as __exportAll } from "../v4-DfWETn4d.js";
2
+ import { _ as McpAppHost, d as ThemeProvider, f as useThemeContext, g as extractResourceCSP, h as IframeResource, n as resolveServerToolResult, t as Inspector, v as SCREEN_WIDTHS } from "../inspector-BVYIkjfw.js";
3
3
  import { t as createInspectorUrl } from "../inspector-url-CyQcuBI9.js";
4
4
  import { c as toPascalCase, i as findResourceKey, n as extractSimulationKey, r as findResourceDirs, s as getComponentName, t as extractResourceKey } from "../discovery-Cgoegt62.js";
5
5
  //#region src/chatgpt/index.ts
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../chunk-CoPdw6nB.cjs");
3
- const require_inspector = require("../inspector-CjEFyXqc.cjs");
3
+ const require_inspector = require("../inspector-mL_Ysqj6.cjs");
4
4
  exports.Inspector = require_inspector.Inspector;
@@ -1,2 +1,2 @@
1
- import { t as Inspector } from "../inspector-JirXykqh.js";
1
+ import { t as Inspector } from "../inspector-BVYIkjfw.js";
2
2
  export { Inspector };
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../chunk-CoPdw6nB.cjs");
3
- const require_use_app = require("../../use-app-BEelk4Pj.cjs");
3
+ const require_use_app = require("../../use-app-BXVq24n8.cjs");
4
4
  let react = require("react");
5
5
  //#region src/host/chatgpt/openai-types.ts
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { t as useApp } from "../../use-app-imsRg_Sq.js";
1
+ import { t as useApp } from "../../use-app-L0OZBROc.js";
2
2
  import { useCallback } from "react";
3
3
  //#region src/host/chatgpt/openai-types.ts
4
4
  /**
package/dist/index.cjs CHANGED
@@ -1,16 +1,16 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-CoPdw6nB.cjs");
3
- const require_protocol = require("./protocol-WZSAhsV8.cjs");
4
- const require_v4 = require("./v4-81B3d_AO.cjs");
5
- const require_use_app = require("./use-app-BEelk4Pj.cjs");
6
- const require_inspector = require("./inspector-CjEFyXqc.cjs");
3
+ const require_protocol = require("./protocol-CFifOG2U.cjs");
4
+ const require_v4 = require("./v4-BtFbnniV.cjs");
5
+ const require_use_app = require("./use-app-BXVq24n8.cjs");
6
+ const require_inspector = require("./inspector-mL_Ysqj6.cjs");
7
7
  const require_host_index = require("./host/index.cjs");
8
8
  const require_inspector_index = require("./inspector/index.cjs");
9
9
  const require_chatgpt_index = require("./chatgpt/index.cjs");
10
10
  let react = require("react");
11
11
  react = require_chunk.__toESM(react, 1);
12
12
  let react_jsx_runtime = require("react/jsx-runtime");
13
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.7.0_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__react-_68ee6585f5c29b7de065f869051c80dc/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/index.js
13
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.7.1_@modelcontextprotocol+sdk@1.29.0_zod@4.4.1__react-_92433c7acac2d73b76b395fab111ea67/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/index.js
14
14
  ((K) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(K, { get: (Q, X) => (typeof require < "u" ? require : Q)[X] }) : K)(function(K) {
15
15
  if (typeof require < "u") return require.apply(this, arguments);
16
16
  throw Error("Dynamic require of \"" + K + "\" is not supported");