sunpeak 0.18.13 → 0.19.1

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 (45) hide show
  1. package/README.md +34 -134
  2. package/bin/commands/test-init.mjs +305 -0
  3. package/bin/commands/test.mjs +83 -0
  4. package/bin/lib/inspect/inspect-config.mjs +16 -24
  5. package/bin/lib/test/base-config.mjs +60 -0
  6. package/bin/lib/test/matchers.mjs +99 -0
  7. package/bin/lib/test/test-config.d.mts +44 -0
  8. package/bin/lib/test/test-config.mjs +123 -0
  9. package/bin/lib/test/test-fixtures.d.mts +96 -0
  10. package/bin/lib/test/test-fixtures.mjs +189 -0
  11. package/bin/sunpeak.js +18 -5
  12. package/dist/mcp/index.cjs +58 -16
  13. package/dist/mcp/index.cjs.map +1 -1
  14. package/dist/mcp/index.js +58 -16
  15. package/dist/mcp/index.js.map +1 -1
  16. package/package.json +22 -10
  17. package/template/README.md +15 -8
  18. package/template/dist/albums/albums.json +1 -1
  19. package/template/dist/carousel/carousel.json +1 -1
  20. package/template/dist/map/map.html +468 -280
  21. package/template/dist/map/map.json +1 -1
  22. package/template/dist/review/review.json +1 -1
  23. package/template/node_modules/.bin/playwright +2 -2
  24. package/template/node_modules/.bin/vite +2 -2
  25. package/template/node_modules/.bin/vitest +2 -2
  26. package/template/node_modules/.vite/deps/_metadata.json +4 -4
  27. package/template/node_modules/.vite-mcp/deps/_metadata.json +22 -22
  28. package/template/node_modules/.vite-mcp/deps/mapbox-gl.js +15924 -14588
  29. package/template/node_modules/.vite-mcp/deps/mapbox-gl.js.map +1 -1
  30. package/template/node_modules/.vite-mcp/deps/vitest.js +8 -8
  31. package/template/node_modules/.vite-mcp/deps/vitest.js.map +1 -1
  32. package/template/package.json +4 -4
  33. package/template/playwright.config.ts +2 -40
  34. package/template/tests/e2e/albums.spec.ts +114 -245
  35. package/template/tests/e2e/carousel.spec.ts +189 -313
  36. package/template/tests/e2e/map.spec.ts +177 -300
  37. package/template/tests/e2e/review.spec.ts +232 -423
  38. package/template/tests/live/albums.spec.ts +1 -1
  39. package/template/tests/live/carousel.spec.ts +1 -1
  40. package/template/tests/live/map.spec.ts +1 -1
  41. package/template/tests/live/playwright.config.ts +1 -1
  42. package/template/tests/live/review.spec.ts +1 -1
  43. package/template/vitest.config.ts +1 -1
  44. package/template/tests/e2e/global-setup.ts +0 -10
  45. package/template/tests/e2e/helpers.ts +0 -13
@@ -1,4 +1,4 @@
1
- import { test, expect } from 'sunpeak/test';
1
+ import { test, expect } from 'sunpeak/test/live';
2
2
 
3
3
  test('carousel tool renders cards with correct styles', async ({ live }) => {
4
4
  const app = await live.invoke('show-carousel');
@@ -1,4 +1,4 @@
1
- import { test, expect } from 'sunpeak/test';
1
+ import { test, expect } from 'sunpeak/test/live';
2
2
 
3
3
  test('map tool renders interactive map with correct styles', async ({ live }) => {
4
4
  const app = await live.invoke('show-map');
@@ -1,3 +1,3 @@
1
- import { defineLiveConfig } from 'sunpeak/test/config';
1
+ import { defineLiveConfig } from 'sunpeak/test/live/config';
2
2
 
3
3
  export default defineLiveConfig({ devOverlay: false });
@@ -1,4 +1,4 @@
1
- import { test, expect } from 'sunpeak/test';
1
+ import { test, expect } from 'sunpeak/test/live';
2
2
 
3
3
  test('review tool renders review card with correct styles', async ({ live }) => {
4
4
  const app = await live.invoke('review-diff');
@@ -8,7 +8,7 @@ const parentSrc = path.resolve(__dirname, '../src');
8
8
  export default defineConfig({
9
9
  test: {
10
10
  globals: true,
11
- environment: 'jsdom',
11
+ environment: 'happy-dom',
12
12
  setupFiles: './tests/setup.ts',
13
13
  exclude: ['**/node_modules/**', '**/tests/e2e/**', '**/tests/live/**'],
14
14
  },
@@ -1,10 +0,0 @@
1
- /**
2
- * Playwright global setup.
3
- *
4
- * The webServer (pnpm dev) handles building resources via its build watcher.
5
- * No separate build step needed here — the dev server's initial build creates
6
- * dist/ files before serving the first request.
7
- */
8
- export default function globalSetup() {
9
- // Nothing to do — the webServer handles everything.
10
- }
@@ -1,13 +0,0 @@
1
- import {
2
- createInspectorUrl as _createInspectorUrl,
3
- type InspectorUrlParams,
4
- } from 'sunpeak/chatgpt';
5
-
6
- /**
7
- * Wrapper around createInspectorUrl that hides the dev overlay by default.
8
- * The overlay shows resource timestamps and tool timing, which can interfere
9
- * with element assertions in e2e tests.
10
- */
11
- export function createInspectorUrl(params: InspectorUrlParams, basePath?: string): string {
12
- return _createInspectorUrl({ devOverlay: false, ...params }, basePath);
13
- }