sunpeak 0.8.4 → 0.8.6
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 +2 -1
- package/bin/sunpeak.js +11 -15
- package/package.json +1 -1
- package/template/dist/albums.json +1 -1
- package/template/dist/carousel.json +1 -1
- package/template/dist/counter.json +1 -1
- package/template/dist/map.json +1 -1
- package/template/dist/{confirmation.js → review.js} +2 -2
- package/template/dist/{confirmation.json → review.json} +4 -4
- 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 +4 -4
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +20 -20
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +3 -3
- package/template/node_modules/.vite/deps/_metadata.json +35 -35
- package/template/node_modules/.vite/deps/{chunk-N6DVYEXK.js → chunk-SPYXUHEY.js} +8 -8
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/src/resources/{confirmation-resource.json → review-resource.json} +3 -3
- package/template/src/resources/{confirmation-resource.tsx → review-resource.tsx} +20 -20
- package/template/src/simulations/{confirmation-diff-simulation.json → review-diff-simulation.json} +4 -4
- package/template/src/simulations/{confirmation-post-simulation.json → review-post-simulation.json} +4 -4
- package/template/src/simulations/{confirmation-purchase-simulation.json → review-purchase-simulation.json} +4 -4
- /package/template/node_modules/.vite/deps/{chunk-N6DVYEXK.js.map → chunk-SPYXUHEY.js.map} +0 -0
package/README.md
CHANGED
|
@@ -40,7 +40,8 @@ Quickstart, build, test, and ship your ChatGPT App locally!
|
|
|
40
40
|
Requirements: Node (20+), pnpm (10+)
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
pnpm
|
|
43
|
+
pnpm add -g sunpeak
|
|
44
|
+
sunpeak new
|
|
44
45
|
```
|
|
45
46
|
|
|
46
47
|
To add sunpeak to an existing project, refer to the [documentation](https://docs.sunpeak.ai/add-to-existing-project).
|
package/bin/sunpeak.js
CHANGED
|
@@ -28,7 +28,7 @@ function checkPackageJson() {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
function parseResourcesInput(input) {
|
|
31
|
-
const VALID_RESOURCES = ['albums', 'carousel', '
|
|
31
|
+
const VALID_RESOURCES = ['albums', 'carousel', 'counter', 'map', 'review'];
|
|
32
32
|
|
|
33
33
|
// If no input, return all resources
|
|
34
34
|
if (!input || input.trim() === '') {
|
|
@@ -59,9 +59,9 @@ function updateIndexFiles(targetDir, selectedResources) {
|
|
|
59
59
|
const resourceMap = {
|
|
60
60
|
albums: { component: 'album', resourceClass: 'AlbumsResource' },
|
|
61
61
|
carousel: { component: 'carousel', resourceClass: 'CarouselResource' },
|
|
62
|
-
confirmation: { component: null, resourceClass: 'ConfirmationResource' },
|
|
63
62
|
counter: { component: null, resourceClass: 'CounterResource' },
|
|
64
63
|
map: { component: 'map', resourceClass: 'MapResource' },
|
|
64
|
+
review: { component: null, resourceClass: 'ReviewResource' },
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
// Update components/index.ts
|
|
@@ -139,7 +139,7 @@ async function init(projectName, resourcesArg) {
|
|
|
139
139
|
console.log(`☀️ 🏔️ Resources: ${resourcesArg}`);
|
|
140
140
|
} else {
|
|
141
141
|
resourcesInput = await prompt(
|
|
142
|
-
'☀️ 🏔️ Resources (UIs) to include [albums, carousel,
|
|
142
|
+
'☀️ 🏔️ Resources (UIs) to include [albums, carousel, counter, map, review]: '
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
145
|
const selectedResources = parseResourcesInput(resourcesInput);
|
|
@@ -161,9 +161,9 @@ async function init(projectName, resourcesArg) {
|
|
|
161
161
|
const resourceComponentMap = {
|
|
162
162
|
albums: 'album',
|
|
163
163
|
carousel: 'carousel',
|
|
164
|
-
confirmation: null, // Confirmation doesn't have a component directory
|
|
165
164
|
counter: null, // Counter doesn't have a component directory
|
|
166
165
|
map: 'map',
|
|
166
|
+
review: null, // Review doesn't have a component directory
|
|
167
167
|
};
|
|
168
168
|
|
|
169
169
|
cpSync(templateDir, targetDir, {
|
|
@@ -177,7 +177,7 @@ async function init(projectName, resourcesArg) {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
// Filter resource files based on selection
|
|
180
|
-
const VALID_RESOURCES = ['albums', 'carousel', '
|
|
180
|
+
const VALID_RESOURCES = ['albums', 'carousel', 'counter', 'map', 'review'];
|
|
181
181
|
const excludedResources = VALID_RESOURCES.filter((r) => !selectedResources.includes(r));
|
|
182
182
|
|
|
183
183
|
for (const resource of excludedResources) {
|
|
@@ -400,17 +400,10 @@ function parseResourceArgs(args) {
|
|
|
400
400
|
console.log(`
|
|
401
401
|
☀️ 🏔️ sunpeak - The ChatGPT App framework
|
|
402
402
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
pnpm dlx sunpeak new Alternative with pnpm
|
|
406
|
-
|
|
407
|
-
Resources: albums, carousel, confirmation, counter, map (comma/space separated)
|
|
408
|
-
Example: npx sunpeak new my-app "albums,carousel"
|
|
409
|
-
|
|
410
|
-
Inside your project, use npm scripts:
|
|
411
|
-
pnpm test Run tests
|
|
403
|
+
Install:
|
|
404
|
+
pnpm add -g sunpeak
|
|
412
405
|
|
|
413
|
-
|
|
406
|
+
Usage:
|
|
414
407
|
sunpeak new [name] [resources] Create a new project
|
|
415
408
|
sunpeak dev Start dev server
|
|
416
409
|
sunpeak build Build resources
|
|
@@ -423,6 +416,9 @@ Direct CLI commands (when sunpeak is installed):
|
|
|
423
416
|
sunpeak upgrade Upgrade sunpeak to latest version
|
|
424
417
|
sunpeak --version Show version number
|
|
425
418
|
|
|
419
|
+
Resources: albums, carousel, counter, map, review (comma/space separated)
|
|
420
|
+
Example: sunpeak new my-app "albums,carousel"
|
|
421
|
+
|
|
426
422
|
For more information, visit: https://sunpeak.ai/
|
|
427
423
|
`);
|
|
428
424
|
break;
|
package/package.json
CHANGED
package/template/dist/map.json
CHANGED