sunpeak 0.10.4 → 0.10.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/bin/commands/build.mjs +13 -13
- package/bin/commands/push.mjs +3 -4
- package/dist/chatgpt/index.cjs +1 -1
- package/dist/chatgpt/index.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp/entry.cjs +1 -1
- package/dist/mcp/entry.js +1 -1
- package/dist/mcp/index.cjs +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/{server-CSybLAYo.cjs → server-B-T6Y3-J.cjs} +35 -47
- package/dist/{server-CSybLAYo.cjs.map → server-B-T6Y3-J.cjs.map} +1 -1
- package/dist/{server-310A1k9o.js → server-CnRhUNGQ.js} +35 -47
- package/dist/{server-310A1k9o.js.map → server-CnRhUNGQ.js.map} +1 -1
- package/dist/{simulator-url-BZBcq5tc.js → simulator-url-BUKX-wRa.js} +344 -270
- package/dist/{simulator-url-BZBcq5tc.js.map → simulator-url-BUKX-wRa.js.map} +1 -1
- package/dist/{simulator-url-D4tFBjeu.cjs → simulator-url-pSDp_VWO.cjs} +345 -271
- package/dist/{simulator-url-D4tFBjeu.cjs.map → simulator-url-pSDp_VWO.cjs.map} +1 -1
- package/package.json +2 -2
- package/template/dist/albums/albums.js +7 -47
- package/template/dist/albums/albums.json +1 -1
- package/template/dist/carousel/carousel.js +7 -47
- package/template/dist/carousel/carousel.json +1 -1
- package/template/dist/map/map.js +140 -187
- package/template/dist/map/map.json +1 -1
- package/template/dist/review/review.js +7 -47
- package/template/dist/review/review.json +1 -1
- package/template/node_modules/.vite/deps/_metadata.json +22 -22
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
package/bin/commands/build.mjs
CHANGED
|
@@ -212,6 +212,18 @@ export async function build(projectRoot = process.cwd()) {
|
|
|
212
212
|
mkdirSync(distOutDir, { recursive: true });
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
+
// Copy and process resource metadata JSON file
|
|
216
|
+
const srcJson = path.join(resourceDir, `${componentFile}.json`);
|
|
217
|
+
const destJson = path.join(distOutDir, `${kebabName}.json`);
|
|
218
|
+
|
|
219
|
+
if (existsSync(srcJson)) {
|
|
220
|
+
const meta = JSON.parse(readFileSync(srcJson, 'utf-8'));
|
|
221
|
+
// Generate URI using resource name and build timestamp
|
|
222
|
+
meta.uri = `ui://${meta.name}-${timestamp}`;
|
|
223
|
+
writeFileSync(destJson, JSON.stringify(meta, null, 2));
|
|
224
|
+
console.log(`✓ Generated ${kebabName}/${kebabName}.json (uri: ${meta.uri})`);
|
|
225
|
+
}
|
|
226
|
+
|
|
215
227
|
// Copy built JS file
|
|
216
228
|
const builtFile = path.join(buildOutDir, output);
|
|
217
229
|
const destFile = path.join(distOutDir, output);
|
|
@@ -229,18 +241,6 @@ export async function build(projectRoot = process.cwd()) {
|
|
|
229
241
|
process.exit(1);
|
|
230
242
|
}
|
|
231
243
|
|
|
232
|
-
// Copy and process resource metadata JSON file
|
|
233
|
-
const srcJson = path.join(resourceDir, `${componentFile}.json`);
|
|
234
|
-
const destJson = path.join(distOutDir, `${kebabName}.json`);
|
|
235
|
-
|
|
236
|
-
if (existsSync(srcJson)) {
|
|
237
|
-
const meta = JSON.parse(readFileSync(srcJson, 'utf-8'));
|
|
238
|
-
// Generate URI using resource name and build timestamp
|
|
239
|
-
meta.uri = `ui://${meta.name}-${timestamp}`;
|
|
240
|
-
writeFileSync(destJson, JSON.stringify(meta, null, 2));
|
|
241
|
-
console.log(`✓ Generated ${kebabName}/${kebabName}.json (uri: ${meta.uri})`);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
244
|
// Copy affiliated simulation files (matching {resource}-*-simulation.json pattern)
|
|
245
245
|
const simulationFiles = readdirSync(resourceDir)
|
|
246
246
|
.filter(file => isSimulationFile(file, kebabName));
|
|
@@ -265,7 +265,7 @@ export async function build(projectRoot = process.cwd()) {
|
|
|
265
265
|
console.log('\nBuilt resources:');
|
|
266
266
|
for (const { kebabName, distOutDir } of resourceFiles) {
|
|
267
267
|
const files = readdirSync(distOutDir);
|
|
268
|
-
console.log(` ${kebabName}
|
|
268
|
+
console.log(` ${kebabName}`);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
|
package/bin/commands/push.mjs
CHANGED
|
@@ -348,10 +348,9 @@ Examples:
|
|
|
348
348
|
const result = await pushResource(resource, repository, options.tags, credentials.access_token, d);
|
|
349
349
|
const simCount = resource.simulations?.length || 0;
|
|
350
350
|
const simInfo = simCount > 0 ? `, ${simCount} simulation(s)` : '';
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}
|
|
351
|
+
const tagInfo = result.tags?.length > 0 ? `, tag(s): ${result.tags.join(', ')}` : '';
|
|
352
|
+
d.console.log(`✓ Pushed ${resource.name}${simInfo}${tagInfo}`);
|
|
353
|
+
d.console.log(` ${d.apiUrl}/resources/${result.id}`);
|
|
355
354
|
successCount++;
|
|
356
355
|
} catch (error) {
|
|
357
356
|
d.console.error(`✗ Failed to push ${resource.name}: ${error.message}`);
|
package/dist/chatgpt/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const simulatorUrl = require("../simulator-url-
|
|
3
|
+
const simulatorUrl = require("../simulator-url-pSDp_VWO.cjs");
|
|
4
4
|
exports.ChatGPTSimulator = simulatorUrl.ChatGPTSimulator;
|
|
5
5
|
exports.IframeResource = simulatorUrl.IframeResource;
|
|
6
6
|
exports.ThemeProvider = simulatorUrl.ThemeProvider;
|
package/dist/chatgpt/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const simulatorUrl = require("./simulator-url-
|
|
3
|
+
const simulatorUrl = require("./simulator-url-pSDp_VWO.cjs");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
function _interopNamespaceDefault(e) {
|
|
6
6
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -3057,11 +3057,11 @@ function toPascalCase(str) {
|
|
|
3057
3057
|
}
|
|
3058
3058
|
function extractResourceKey(path) {
|
|
3059
3059
|
const match = path.match(/([^/]+)-resource\.(tsx|json)$/);
|
|
3060
|
-
return match
|
|
3060
|
+
return match?.[1];
|
|
3061
3061
|
}
|
|
3062
3062
|
function extractSimulationKey(path) {
|
|
3063
3063
|
const match = path.match(/([^/]+)-simulation\.json$/);
|
|
3064
|
-
return match
|
|
3064
|
+
return match?.[1];
|
|
3065
3065
|
}
|
|
3066
3066
|
function findResourceKey(simulationKey, resourceKeys) {
|
|
3067
3067
|
const sorted = [...resourceKeys].sort((a, b) => b.length - a.length);
|