sunpeak 0.5.20 → 0.5.23
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/README.md +9 -4
- package/{cli → bin/commands}/build.mjs +1 -10
- package/bin/commands/dev.mjs +79 -0
- package/bin/commands/mcp.mjs +75 -0
- package/bin/sunpeak.js +28 -71
- package/bin/utils.mjs +12 -0
- package/dist/dev/entry.d.ts +0 -0
- package/dist/mcp/entry.cjs +29 -0
- package/dist/mcp/entry.cjs.map +1 -0
- package/dist/mcp/entry.d.ts +2 -0
- package/dist/mcp/entry.js +28 -0
- package/dist/mcp/entry.js.map +1 -0
- package/dist/mcp/index.cjs +2 -920
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.js +2 -920
- package/dist/mcp/index.js.map +1 -1
- package/dist/server-DpriZ4jT.cjs +922 -0
- package/dist/server-DpriZ4jT.cjs.map +1 -0
- package/dist/server-SBlanUcf.js +923 -0
- package/dist/server-SBlanUcf.js.map +1 -0
- package/package.json +5 -2
- package/{template/dev/main.tsx → src/dev/entry.tsx} +20 -8
- package/src/vite-env.d.ts +10 -0
- package/template/.sunpeak/dev.tsx +5 -0
- package/template/README.md +17 -35
- package/template/index.html +2 -2
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +3 -3
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +11 -11
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +3 -3
- package/template/node_modules/.vite/deps/_metadata.json +34 -34
- package/template/node_modules/.vite/deps/{chunk-EVJ3DVH5.js → chunk-LR7NKCX5.js} +7 -7
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/nodemon.json +1 -1
- package/template/package.json +3 -16
- package/template/src/components/album/albums.tsx +2 -2
- package/template/src/dev/entry.tsx +0 -0
- package/template/src/mcp/entry.ts +0 -0
- package/template/src/simulations/index.ts +3 -3
- package/cli/validate.mjs +0 -245
- package/template/_prettierignore +0 -4
- package/template/_prettierrc +0 -9
- package/template/eslint.config.cjs +0 -49
- package/template/mcp/server.ts +0 -19
- package/template/node_modules/.bin/eslint +0 -21
- package/template/node_modules/.bin/eslint-config-prettier +0 -21
- package/template/node_modules/.bin/prettier +0 -21
- package/template/node_modules/.bin/ts-node +0 -21
- package/template/node_modules/.bin/ts-node-cwd +0 -21
- package/template/node_modules/.bin/ts-node-esm +0 -21
- package/template/node_modules/.bin/ts-node-script +0 -21
- package/template/node_modules/.bin/ts-node-transpile-only +0 -21
- package/template/node_modules/.bin/ts-script +0 -21
- /package/template/node_modules/.vite/deps/{chunk-EVJ3DVH5.js.map → chunk-LR7NKCX5.js.map} +0 -0
- /package/template/{assets → public}/favicon.ico +0 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useTimeout
|
|
3
3
|
} from "./chunk-YOJ6QPGS.js";
|
|
4
|
+
import {
|
|
5
|
+
o
|
|
6
|
+
} from "./chunk-QPJAV452.js";
|
|
4
7
|
import {
|
|
5
8
|
handlePressableMouseEnter,
|
|
6
9
|
isDev,
|
|
@@ -12,16 +15,13 @@ import {
|
|
|
12
15
|
toTransformProperty,
|
|
13
16
|
waitForAnimationFrame
|
|
14
17
|
} from "./chunk-BAG6OO6S.js";
|
|
18
|
+
import {
|
|
19
|
+
clsx_default
|
|
20
|
+
} from "./chunk-CNYJBM5F.js";
|
|
15
21
|
import {
|
|
16
22
|
Check_default,
|
|
17
23
|
Copy_default
|
|
18
24
|
} from "./chunk-XB525PXG.js";
|
|
19
|
-
import {
|
|
20
|
-
o
|
|
21
|
-
} from "./chunk-QPJAV452.js";
|
|
22
|
-
import {
|
|
23
|
-
clsx_default
|
|
24
|
-
} from "./chunk-CNYJBM5F.js";
|
|
25
25
|
import {
|
|
26
26
|
require_jsx_runtime
|
|
27
27
|
} from "./chunk-PTVT3RFX.js";
|
|
@@ -625,4 +625,4 @@ export {
|
|
|
625
625
|
ButtonLink,
|
|
626
626
|
CopyButton
|
|
627
627
|
};
|
|
628
|
-
//# sourceMappingURL=chunk-
|
|
628
|
+
//# sourceMappingURL=chunk-LR7NKCX5.js.map
|
package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"4.0.13","results":[[":src/components/
|
|
1
|
+
{"version":"4.0.13","results":[[":src/components/resources/carousel-resource.test.tsx",{"duration":268.6208109999998,"failed":false}],[":src/components/album/albums.test.tsx",{"duration":349.67035999999985,"failed":false}],[":src/components/album/fullscreen-viewer.test.tsx",{"duration":288.14203799999996,"failed":false}],[":src/components/resources/counter-resource.test.tsx",{"duration":330.01838399999997,"failed":false}],[":src/components/carousel/carousel.test.tsx",{"duration":60.49365499999976,"failed":false}],[":src/components/resources/albums-resource.test.tsx",{"duration":284.34399200000007,"failed":false}],[":src/components/album/album-card.test.tsx",{"duration":338.0192069999998,"failed":false}],[":src/components/album/film-strip.test.tsx",{"duration":441.93048599999975,"failed":false}],[":src/components/card/card.test.tsx",{"duration":54.51466899999991,"failed":false}]]}
|
package/template/nodemon.json
CHANGED
package/template/package.json
CHANGED
|
@@ -4,15 +4,10 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
+
"dev": "sunpeak dev",
|
|
7
8
|
"build": "sunpeak build",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"mcp": "nodemon",
|
|
11
|
-
"mcp:serve": "tsx mcp/server.ts",
|
|
12
|
-
"lint": "eslint . --ext .ts,.tsx --fix",
|
|
13
|
-
"typecheck": "tsc --noEmit",
|
|
14
|
-
"test": "vitest run",
|
|
15
|
-
"validate": "sunpeak validate"
|
|
9
|
+
"mcp": "sunpeak mcp",
|
|
10
|
+
"test": "vitest run"
|
|
16
11
|
},
|
|
17
12
|
"dependencies": {
|
|
18
13
|
"@openai/apps-sdk-ui": "^0.2.0",
|
|
@@ -30,21 +25,13 @@
|
|
|
30
25
|
"@types/node": "^24.10.1",
|
|
31
26
|
"@types/react": "^19.0.0",
|
|
32
27
|
"@types/react-dom": "^19.0.0",
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
34
|
-
"@typescript-eslint/parser": "^8.47.0",
|
|
35
28
|
"@vitejs/plugin-react": "^4.3.4",
|
|
36
|
-
"eslint": "^9.39.1",
|
|
37
|
-
"eslint-config-prettier": "^10.1.8",
|
|
38
|
-
"eslint-plugin-react": "^7.37.5",
|
|
39
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
40
29
|
"jsdom": "^27.2.0",
|
|
41
30
|
"nodemon": "^3.1.11",
|
|
42
31
|
"postcss": "^8.4.49",
|
|
43
|
-
"prettier": "^3.6.2",
|
|
44
32
|
"react": "^19.0.0",
|
|
45
33
|
"react-dom": "^19.0.0",
|
|
46
34
|
"tailwindcss": "^4.1.17",
|
|
47
|
-
"ts-node": "^10.9.2",
|
|
48
35
|
"tsx": "^4.20.6",
|
|
49
36
|
"typescript": "^5.6.3",
|
|
50
37
|
"vite": "^5.4.21",
|
|
@@ -43,7 +43,7 @@ export const Albums = React.forwardRef<HTMLDivElement, AlbumsProps>(({ className
|
|
|
43
43
|
const userAgent = useUserAgent();
|
|
44
44
|
|
|
45
45
|
const albums = data.albums || [];
|
|
46
|
-
const selectedAlbum = albums.find((album) => album.id === widgetState?.selectedAlbumId);
|
|
46
|
+
const selectedAlbum = albums.find((album: Album) => album.id === widgetState?.selectedAlbumId);
|
|
47
47
|
const hasTouch = userAgent?.capabilities.touch ?? false;
|
|
48
48
|
|
|
49
49
|
const handleSelectAlbum = React.useCallback(
|
|
@@ -61,7 +61,7 @@ export const Albums = React.forwardRef<HTMLDivElement, AlbumsProps>(({ className
|
|
|
61
61
|
return (
|
|
62
62
|
<div ref={ref} className={className}>
|
|
63
63
|
<Carousel gap={20} showArrows={false} showEdgeGradients={false} cardWidth={272}>
|
|
64
|
-
{albums.map((album) => (
|
|
64
|
+
{albums.map((album: Album) => (
|
|
65
65
|
<AlbumCard
|
|
66
66
|
key={album.id}
|
|
67
67
|
album={album}
|
|
File without changes
|
|
File without changes
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* (like MCP servers) without causing issues with CSS imports or React components.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { counterSimulation } from './counter-simulation';
|
|
9
|
-
import { albumsSimulation } from './albums-simulation';
|
|
10
|
-
import { carouselSimulation } from './carousel-simulation';
|
|
8
|
+
import { counterSimulation } from './counter-simulation.js';
|
|
9
|
+
import { albumsSimulation } from './albums-simulation.js';
|
|
10
|
+
import { carouselSimulation } from './carousel-simulation.js';
|
|
11
11
|
|
|
12
12
|
export const SIMULATIONS = {
|
|
13
13
|
counter: counterSimulation,
|
package/cli/validate.mjs
DELETED
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { execSync, spawn } from 'child_process';
|
|
3
|
-
import { existsSync, readdirSync, readFileSync } from 'fs';
|
|
4
|
-
import { join } from 'path';
|
|
5
|
-
import http from 'http';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Validate a Sunpeak project by running all checks
|
|
9
|
-
* Runs in the context of a user's project directory
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
// Color codes for output
|
|
13
|
-
const colors = {
|
|
14
|
-
red: '\x1b[0;31m',
|
|
15
|
-
green: '\x1b[0;32m',
|
|
16
|
-
blue: '\x1b[0;34m',
|
|
17
|
-
yellow: '\x1b[1;33m',
|
|
18
|
-
reset: '\x1b[0m',
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
function printSuccess(text) {
|
|
22
|
-
console.log(`${colors.green}✓ ${text}${colors.reset}`);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function printError(text) {
|
|
26
|
-
console.log(`${colors.red}✗ ${text}${colors.reset}`);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function printWarning(text) {
|
|
30
|
-
console.log(`${colors.yellow}⚠ ${text}${colors.reset}`);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function detectPackageManager(projectRoot) {
|
|
34
|
-
if (existsSync(join(projectRoot, 'pnpm-lock.yaml'))) return 'pnpm';
|
|
35
|
-
if (existsSync(join(projectRoot, 'yarn.lock'))) return 'yarn';
|
|
36
|
-
if (existsSync(join(projectRoot, 'package-lock.json'))) return 'npm';
|
|
37
|
-
return 'pnpm'; // default
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function hasScript(projectRoot, scriptName) {
|
|
41
|
-
try {
|
|
42
|
-
const pkgJson = JSON.parse(readFileSync(join(projectRoot, 'package.json'), 'utf-8'));
|
|
43
|
-
return !!pkgJson.scripts?.[scriptName];
|
|
44
|
-
} catch (error) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function runCommand(command, cwd, pm = 'pnpm') {
|
|
50
|
-
try {
|
|
51
|
-
// Replace pnpm with detected package manager
|
|
52
|
-
const actualCommand = command.replace(/^pnpm/, pm);
|
|
53
|
-
execSync(actualCommand, {
|
|
54
|
-
cwd,
|
|
55
|
-
stdio: 'inherit',
|
|
56
|
-
env: { ...process.env, FORCE_COLOR: '1' },
|
|
57
|
-
});
|
|
58
|
-
return true;
|
|
59
|
-
} catch (error) {
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function waitForServer(port, timeout = 10000) {
|
|
65
|
-
return new Promise((resolve, reject) => {
|
|
66
|
-
const startTime = Date.now();
|
|
67
|
-
const checkServer = () => {
|
|
68
|
-
const req = http.get(`http://localhost:${port}`, () => {
|
|
69
|
-
resolve();
|
|
70
|
-
});
|
|
71
|
-
req.on('error', () => {
|
|
72
|
-
if (Date.now() - startTime > timeout) {
|
|
73
|
-
reject(new Error(`Server did not start within ${timeout}ms`));
|
|
74
|
-
} else {
|
|
75
|
-
setTimeout(checkServer, 500);
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
req.end();
|
|
79
|
-
};
|
|
80
|
-
checkServer();
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export async function validate(projectRoot = process.cwd()) {
|
|
85
|
-
const pm = detectPackageManager(projectRoot);
|
|
86
|
-
|
|
87
|
-
// Check package.json exists
|
|
88
|
-
if (!existsSync(join(projectRoot, 'package.json'))) {
|
|
89
|
-
console.error('Error: No package.json found in current directory');
|
|
90
|
-
console.error('Make sure you are in a Sunpeak project directory');
|
|
91
|
-
process.exit(1);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
console.log(`${colors.yellow}Starting validation for Sunpeak project...${colors.reset}`);
|
|
95
|
-
console.log(`Project root: ${projectRoot}`);
|
|
96
|
-
console.log(`Package manager: ${pm}\n`);
|
|
97
|
-
|
|
98
|
-
try {
|
|
99
|
-
console.log(`Running: ${pm} install`);
|
|
100
|
-
if (!runCommand(`${pm} install`, projectRoot, pm)) {
|
|
101
|
-
throw new Error(`${pm} install failed`);
|
|
102
|
-
}
|
|
103
|
-
console.log()
|
|
104
|
-
printSuccess(`${pm} install`);
|
|
105
|
-
|
|
106
|
-
// Format (optional)
|
|
107
|
-
if (hasScript(projectRoot, 'format')) {
|
|
108
|
-
console.log(`\nRunning: ${pm} format`);
|
|
109
|
-
if (!runCommand(`${pm} format`, projectRoot, pm)) {
|
|
110
|
-
throw new Error(`${pm} format failed`);
|
|
111
|
-
}
|
|
112
|
-
printSuccess(`${pm} format`);
|
|
113
|
-
} else {
|
|
114
|
-
printWarning('Skipping format: no "format" script in package.json');
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// Lint (optional)
|
|
118
|
-
if (hasScript(projectRoot, 'lint')) {
|
|
119
|
-
console.log(`\nRunning: ${pm} lint`);
|
|
120
|
-
if (!runCommand(`${pm} lint`, projectRoot, pm)) {
|
|
121
|
-
throw new Error(`${pm} lint failed`);
|
|
122
|
-
}
|
|
123
|
-
printSuccess(`${pm} lint`);
|
|
124
|
-
} else {
|
|
125
|
-
printWarning('Skipping lint: no "lint" script in package.json');
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// Typecheck (optional)
|
|
129
|
-
if (hasScript(projectRoot, 'typecheck')) {
|
|
130
|
-
console.log(`\nRunning: ${pm} typecheck`);
|
|
131
|
-
if (!runCommand(`${pm} typecheck`, projectRoot, pm)) {
|
|
132
|
-
throw new Error(`${pm} typecheck failed`);
|
|
133
|
-
}
|
|
134
|
-
printSuccess(`${pm} typecheck`);
|
|
135
|
-
} else {
|
|
136
|
-
printWarning('Skipping typecheck: no "typecheck" script in package.json');
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// Test (optional)
|
|
140
|
-
if (hasScript(projectRoot, 'test')) {
|
|
141
|
-
console.log(`\nRunning: ${pm} test`);
|
|
142
|
-
if (!runCommand(`${pm} test`, projectRoot, pm)) {
|
|
143
|
-
throw new Error(`${pm} test failed`);
|
|
144
|
-
}
|
|
145
|
-
printSuccess(`${pm} test`);
|
|
146
|
-
} else {
|
|
147
|
-
printWarning('Skipping test: no "test" script in package.json');
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
console.log(`\nRunning: sunpeak build`);
|
|
151
|
-
// Import and run build directly
|
|
152
|
-
const { build } = await import('./build.mjs');
|
|
153
|
-
await build(projectRoot);
|
|
154
|
-
|
|
155
|
-
const chatgptDir = join(projectRoot, 'dist', 'chatgpt');
|
|
156
|
-
|
|
157
|
-
if (!existsSync(chatgptDir)) {
|
|
158
|
-
printError('dist/chatgpt directory not found after build');
|
|
159
|
-
process.exit(1);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
const files = readdirSync(chatgptDir);
|
|
163
|
-
if (files.length === 0) {
|
|
164
|
-
printError('No files found in dist/chatgpt/');
|
|
165
|
-
process.exit(1);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Verify all files are .js files
|
|
169
|
-
const nonJsFiles = files.filter(f => !f.endsWith('.js'));
|
|
170
|
-
if (nonJsFiles.length > 0) {
|
|
171
|
-
printError(`Unexpected non-JS files in ./dist/chatgpt/: ${nonJsFiles.join(', ')}`);
|
|
172
|
-
process.exit(1);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
console.log()
|
|
176
|
-
printSuccess('sunpeak build');
|
|
177
|
-
|
|
178
|
-
// MCP Server Check (optional)
|
|
179
|
-
if (hasScript(projectRoot, 'mcp:serve')) {
|
|
180
|
-
console.log(`\nRunning: ${pm} mcp:serve`);
|
|
181
|
-
const mcpProcess = spawn(pm, ['mcp:serve'], {
|
|
182
|
-
cwd: projectRoot,
|
|
183
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
184
|
-
env: { ...process.env, FORCE_COLOR: '1' },
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
const mcpErrors = [];
|
|
188
|
-
|
|
189
|
-
mcpProcess.stderr.on('data', (data) => {
|
|
190
|
-
const message = data.toString();
|
|
191
|
-
if (message.includes('error') || message.includes('Error')) {
|
|
192
|
-
mcpErrors.push(message.trim());
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
// Store process for cleanup
|
|
197
|
-
process.on('exit', () => {
|
|
198
|
-
if (mcpProcess && !mcpProcess.killed) {
|
|
199
|
-
mcpProcess.kill();
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
try {
|
|
204
|
-
console.log('\nWaiting for MCP server to start on port 6766...');
|
|
205
|
-
await waitForServer(6766, 10000);
|
|
206
|
-
|
|
207
|
-
// Give it a moment to ensure no immediate errors
|
|
208
|
-
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
209
|
-
|
|
210
|
-
if (mcpErrors.length > 0) {
|
|
211
|
-
printError('MCP server started but reported errors:');
|
|
212
|
-
mcpErrors.forEach(err => console.log(` ${err}`));
|
|
213
|
-
throw new Error('MCP server has errors');
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
} catch (error) {
|
|
217
|
-
printError(`MCP server failed to start: ${error.message}`);
|
|
218
|
-
throw error;
|
|
219
|
-
} finally {
|
|
220
|
-
console.log('Stopping MCP server...');
|
|
221
|
-
mcpProcess.kill();
|
|
222
|
-
// Give it a moment to shut down
|
|
223
|
-
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
224
|
-
}
|
|
225
|
-
console.log()
|
|
226
|
-
printSuccess(`${pm} mcp\n`);
|
|
227
|
-
} else {
|
|
228
|
-
printWarning('Skipping MCP server check: no "mcp:serve" script in package.json\n');
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
printSuccess('All systems GO!\n\n');
|
|
232
|
-
process.exit(0);
|
|
233
|
-
} catch (error) {
|
|
234
|
-
console.error(`\n${colors.red}Error: ${error.message}${colors.reset}\n`);
|
|
235
|
-
process.exit(1);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// Allow running directly
|
|
240
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
241
|
-
validate().catch(error => {
|
|
242
|
-
console.error(error);
|
|
243
|
-
process.exit(1);
|
|
244
|
-
});
|
|
245
|
-
}
|
package/template/_prettierignore
DELETED
package/template/_prettierrc
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// eslint.config.cjs
|
|
2
|
-
const ts = require('@typescript-eslint/eslint-plugin');
|
|
3
|
-
const tsParser = require('@typescript-eslint/parser');
|
|
4
|
-
const react = require('eslint-plugin-react');
|
|
5
|
-
const reactHooks = require('eslint-plugin-react-hooks');
|
|
6
|
-
const prettier = require('eslint-config-prettier');
|
|
7
|
-
|
|
8
|
-
module.exports = [
|
|
9
|
-
{
|
|
10
|
-
ignores: ['**/dist', '**/node_modules', '*.cjs', '**/tmp',],
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
files: ['**/*.{ts,tsx,js,jsx}'],
|
|
14
|
-
|
|
15
|
-
languageOptions: {
|
|
16
|
-
parser: tsParser,
|
|
17
|
-
ecmaVersion: 'latest',
|
|
18
|
-
sourceType: 'module',
|
|
19
|
-
parserOptions: {
|
|
20
|
-
ecmaFeatures: { jsx: true },
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
plugins: {
|
|
25
|
-
'@typescript-eslint': ts,
|
|
26
|
-
react,
|
|
27
|
-
'react-hooks': reactHooks,
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
settings: {
|
|
31
|
-
react: { version: 'detect' },
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
rules: {
|
|
35
|
-
...ts.configs.recommended.rules,
|
|
36
|
-
...react.configs.recommended.rules,
|
|
37
|
-
...react.configs['jsx-runtime'].rules,
|
|
38
|
-
...reactHooks.configs.recommended.rules,
|
|
39
|
-
...prettier.rules,
|
|
40
|
-
|
|
41
|
-
'react/prop-types': 'off',
|
|
42
|
-
|
|
43
|
-
'@typescript-eslint/no-unused-vars': [
|
|
44
|
-
'error',
|
|
45
|
-
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
];
|
package/template/mcp/server.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { runMCPServer } from 'sunpeak/mcp';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
import { SIMULATIONS } from '../src/simulations';
|
|
5
|
-
|
|
6
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
|
|
8
|
-
// Add distPath to each simulation for the MCP server
|
|
9
|
-
const simulations = Object.entries(SIMULATIONS).map(([simulationKey, simulation]) => ({
|
|
10
|
-
...simulation,
|
|
11
|
-
distPath: path.resolve(__dirname, `../dist/chatgpt/${simulationKey}.js`),
|
|
12
|
-
}));
|
|
13
|
-
|
|
14
|
-
runMCPServer({
|
|
15
|
-
name: 'Sunpeak App',
|
|
16
|
-
version: '0.1.0',
|
|
17
|
-
simulations,
|
|
18
|
-
port: 6766,
|
|
19
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/eslint@9.39.1_jiti@2.6.1/node_modules/eslint/bin/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/eslint@9.39.1_jiti@2.6.1/node_modules/eslint/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/eslint@9.39.1_jiti@2.6.1/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/eslint@9.39.1_jiti@2.6.1/node_modules/eslint/bin/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/eslint@9.39.1_jiti@2.6.1/node_modules/eslint/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/eslint@9.39.1_jiti@2.6.1/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../eslint/bin/eslint.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/eslint-config-prettier@10.1.8_eslint@9.39.1_jiti@2.6.1_/node_modules/eslint-config-prettier/bin/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/eslint-config-prettier@10.1.8_eslint@9.39.1_jiti@2.6.1_/node_modules/eslint-config-prettier/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/eslint-config-prettier@10.1.8_eslint@9.39.1_jiti@2.6.1_/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/eslint-config-prettier@10.1.8_eslint@9.39.1_jiti@2.6.1_/node_modules/eslint-config-prettier/bin/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/eslint-config-prettier@10.1.8_eslint@9.39.1_jiti@2.6.1_/node_modules/eslint-config-prettier/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/eslint-config-prettier@10.1.8_eslint@9.39.1_jiti@2.6.1_/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../eslint-config-prettier/bin/cli.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../eslint-config-prettier/bin/cli.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/bin/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/prettier@3.6.2/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/bin/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/prettier@3.6.2/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../prettier/bin/prettier.cjs" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../prettier/bin/prettier.cjs" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/dist/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/dist/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../ts-node/dist/bin.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../ts-node/dist/bin.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/dist/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/dist/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../ts-node/dist/bin-cwd.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../ts-node/dist/bin-cwd.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/dist/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/dist/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../ts-node/dist/bin-esm.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../ts-node/dist/bin-esm.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/dist/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/dist/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../ts-node/dist/bin-script.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../ts-node/dist/bin-script.js" "$@"
|
|
21
|
-
fi
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/dist/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/dist/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules/ts-node/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/ts-node@10.9.2_@types+node@24.10.1_typescript@5.9.3/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../ts-node/dist/bin-transpile.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../ts-node/dist/bin-transpile.js" "$@"
|
|
21
|
-
fi
|