sunpeak 0.9.2 → 0.9.3
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/discovery-a4WId9PC.cjs +125 -0
- package/dist/discovery-a4WId9PC.cjs.map +1 -0
- package/dist/discovery-ft3cd2dW.js +126 -0
- package/dist/discovery-ft3cd2dW.js.map +1 -0
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -16
- package/dist/index.js.map +1 -1
- package/dist/lib/discovery.d.ts +110 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/mcp/entry.cjs +2 -10
- package/dist/mcp/entry.cjs.map +1 -1
- package/dist/mcp/entry.js +1 -9
- package/dist/mcp/entry.js.map +1 -1
- package/package.json +1 -1
- package/template/.sunpeak/dev.tsx +6 -91
- package/template/dist/albums.json +1 -1
- package/template/dist/carousel.json +1 -1
- package/template/dist/map.json +1 -1
- package/template/dist/review.json +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +4 -4
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +6 -6
- package/template/node_modules/.vite/deps/_metadata.json +25 -25
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/src/resources/index.ts +3 -25
- package/template/src/simulations/index.ts +3 -10
|
@@ -7,17 +7,10 @@
|
|
|
7
7
|
* This file can be safely imported in Node.js contexts (like MCP servers)
|
|
8
8
|
* without causing issues with CSS imports or React components.
|
|
9
9
|
*/
|
|
10
|
+
import { createSimulationIndex } from 'sunpeak';
|
|
10
11
|
|
|
11
12
|
// Auto-discover all simulation JSON files
|
|
12
13
|
const simulationModules = import.meta.glob('./*-simulation.json', { eager: true });
|
|
13
14
|
|
|
14
|
-
// Build SIMULATIONS object from discovered files
|
|
15
|
-
|
|
16
|
-
export const SIMULATIONS = Object.fromEntries(
|
|
17
|
-
Object.entries(simulationModules).map(([path, module]) => {
|
|
18
|
-
// Extract simulation key from path: './albums-show-simulation.json' -> 'albums-show'
|
|
19
|
-
const match = path.match(/\.\/(.+)-simulation\.json$/);
|
|
20
|
-
const key = match?.[1] ?? path;
|
|
21
|
-
return [key, (module as { default: unknown }).default];
|
|
22
|
-
})
|
|
23
|
-
) as Record<string, unknown>;
|
|
15
|
+
// Build SIMULATIONS object from discovered files using library helper
|
|
16
|
+
export const SIMULATIONS = createSimulationIndex(simulationModules);
|