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.
Files changed (31) hide show
  1. package/bin/commands/build.mjs +13 -13
  2. package/bin/commands/push.mjs +3 -4
  3. package/dist/chatgpt/index.cjs +1 -1
  4. package/dist/chatgpt/index.js +1 -1
  5. package/dist/index.cjs +3 -3
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.js +4 -4
  8. package/dist/index.js.map +1 -1
  9. package/dist/mcp/entry.cjs +1 -1
  10. package/dist/mcp/entry.js +1 -1
  11. package/dist/mcp/index.cjs +1 -1
  12. package/dist/mcp/index.js +1 -1
  13. package/dist/{server-CSybLAYo.cjs → server-B-T6Y3-J.cjs} +35 -47
  14. package/dist/{server-CSybLAYo.cjs.map → server-B-T6Y3-J.cjs.map} +1 -1
  15. package/dist/{server-310A1k9o.js → server-CnRhUNGQ.js} +35 -47
  16. package/dist/{server-310A1k9o.js.map → server-CnRhUNGQ.js.map} +1 -1
  17. package/dist/{simulator-url-BZBcq5tc.js → simulator-url-BUKX-wRa.js} +344 -270
  18. package/dist/{simulator-url-BZBcq5tc.js.map → simulator-url-BUKX-wRa.js.map} +1 -1
  19. package/dist/{simulator-url-D4tFBjeu.cjs → simulator-url-pSDp_VWO.cjs} +345 -271
  20. package/dist/{simulator-url-D4tFBjeu.cjs.map → simulator-url-pSDp_VWO.cjs.map} +1 -1
  21. package/package.json +2 -2
  22. package/template/dist/albums/albums.js +7 -47
  23. package/template/dist/albums/albums.json +1 -1
  24. package/template/dist/carousel/carousel.js +7 -47
  25. package/template/dist/carousel/carousel.json +1 -1
  26. package/template/dist/map/map.js +140 -187
  27. package/template/dist/map/map.json +1 -1
  28. package/template/dist/review/review.js +7 -47
  29. package/template/dist/review/review.json +1 -1
  30. package/template/node_modules/.vite/deps/_metadata.json +22 -22
  31. package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
@@ -22,13 +22,13 @@ function $constructor(name, initializer2, params) {
22
22
  inst._zod.constr = _;
23
23
  inst._zod.def = def;
24
24
  }
25
- const Parent = (params == null ? void 0 : params.Parent) ?? Object;
25
+ const Parent = params?.Parent ?? Object;
26
26
  class Definition extends Parent {
27
27
  }
28
28
  Object.defineProperty(Definition, "name", { value: name });
29
29
  function _(def) {
30
30
  var _a;
31
- const inst = (params == null ? void 0 : params.Parent) ? new Definition() : this;
31
+ const inst = params?.Parent ? new Definition() : this;
32
32
  init(inst, def);
33
33
  (_a = inst._zod).deferred ?? (_a.deferred = []);
34
34
  for (const fn of inst._zod.deferred) {
@@ -39,10 +39,9 @@ function $constructor(name, initializer2, params) {
39
39
  Object.defineProperty(_, "init", { value: init });
40
40
  Object.defineProperty(_, Symbol.hasInstance, {
41
41
  value: (inst) => {
42
- var _a, _b;
43
- if ((params == null ? void 0 : params.Parent) && inst instanceof params.Parent)
42
+ if (params?.Parent && inst instanceof params.Parent)
44
43
  return true;
45
- return (_b = (_a = inst == null ? void 0 : inst._zod) == null ? void 0 : _a.traits) == null ? void 0 : _b.has(name);
44
+ return inst?._zod?.traits?.has(name);
46
45
  }
47
46
  });
48
47
  Object.defineProperty(_, "name", { value: name });
@@ -129,8 +128,7 @@ function isObject(data) {
129
128
  return typeof data === "object" && data !== null && !Array.isArray(data);
130
129
  }
131
130
  const allowsEval = cached(() => {
132
- var _a;
133
- if (typeof navigator !== "undefined" && ((_a = navigator == null ? void 0 : navigator.userAgent) == null ? void 0 : _a.includes("Cloudflare"))) {
131
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
134
132
  return false;
135
133
  }
136
134
  try {
@@ -161,7 +159,7 @@ function escapeRegex(str) {
161
159
  }
162
160
  function clone(inst, def, params) {
163
161
  const cl = new inst._zod.constr(def ?? inst._zod.def);
164
- if (!def || (params == null ? void 0 : params.parent))
162
+ if (!def || params?.parent)
165
163
  cl._zod.parent = inst;
166
164
  return cl;
167
165
  }
@@ -171,8 +169,8 @@ function normalizeParams(_params) {
171
169
  return {};
172
170
  if (typeof params === "string")
173
171
  return { error: () => params };
174
- if ((params == null ? void 0 : params.message) !== void 0) {
175
- if ((params == null ? void 0 : params.error) !== void 0)
172
+ if (params?.message !== void 0) {
173
+ if (params?.error !== void 0)
176
174
  throw new Error("Cannot specify both `message` and `error` params");
177
175
  params.error = params.message;
178
176
  }
@@ -316,9 +314,8 @@ function required(Class, schema, mask) {
316
314
  });
317
315
  }
318
316
  function aborted(x, startIndex = 0) {
319
- var _a;
320
317
  for (let i = startIndex; i < x.issues.length; i++) {
321
- if (((_a = x.issues[i]) == null ? void 0 : _a.continue) !== true)
318
+ if (x.issues[i]?.continue !== true)
322
319
  return true;
323
320
  }
324
321
  return false;
@@ -332,18 +329,17 @@ function prefixIssues(path2, issues) {
332
329
  });
333
330
  }
334
331
  function unwrapMessage(message) {
335
- return typeof message === "string" ? message : message == null ? void 0 : message.message;
332
+ return typeof message === "string" ? message : message?.message;
336
333
  }
337
334
  function finalizeIssue(iss, ctx, config2) {
338
- var _a, _b, _c, _d, _e, _f;
339
335
  const full = { ...iss, path: iss.path ?? [] };
340
336
  if (!iss.message) {
341
- const message = unwrapMessage((_c = (_b = (_a = iss.inst) == null ? void 0 : _a._zod.def) == null ? void 0 : _b.error) == null ? void 0 : _c.call(_b, iss)) ?? unwrapMessage((_d = ctx == null ? void 0 : ctx.error) == null ? void 0 : _d.call(ctx, iss)) ?? unwrapMessage((_e = config2.customError) == null ? void 0 : _e.call(config2, iss)) ?? unwrapMessage((_f = config2.localeError) == null ? void 0 : _f.call(config2, iss)) ?? "Invalid input";
337
+ const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
342
338
  full.message = message;
343
339
  }
344
340
  delete full.inst;
345
341
  delete full.continue;
346
- if (!(ctx == null ? void 0 : ctx.reportInput)) {
342
+ if (!ctx?.reportInput) {
347
343
  delete full.input;
348
344
  }
349
345
  return full;
@@ -447,8 +443,8 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
447
443
  throw new $ZodAsyncError();
448
444
  }
449
445
  if (result.issues.length) {
450
- const e = new ((_params == null ? void 0 : _params.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
451
- captureStackTrace(e, _params == null ? void 0 : _params.callee);
446
+ const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
447
+ captureStackTrace(e, _params?.callee);
452
448
  throw e;
453
449
  }
454
450
  return result.value;
@@ -459,8 +455,8 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
459
455
  if (result instanceof Promise)
460
456
  result = await result;
461
457
  if (result.issues.length) {
462
- const e = new ((params == null ? void 0 : params.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
463
- captureStackTrace(e, params == null ? void 0 : params.callee);
458
+ const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
459
+ captureStackTrace(e, params?.callee);
464
460
  throw e;
465
461
  }
466
462
  return result.value;
@@ -535,7 +531,7 @@ function datetime$1(args) {
535
531
  return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
536
532
  }
537
533
  const string$1 = (params) => {
538
- const regex = params ? `[\\s\\S]{${(params == null ? void 0 : params.minimum) ?? 0},${(params == null ? void 0 : params.maximum) ?? ""}}` : `[\\s\\S]*`;
534
+ const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
539
535
  return new RegExp(`^${regex}$`);
540
536
  };
541
537
  const integer = /^\d+$/;
@@ -634,10 +630,9 @@ const $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf",
634
630
  };
635
631
  });
636
632
  const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => {
637
- var _a;
638
633
  $ZodCheck.init(inst, def);
639
634
  def.format = def.format || "float64";
640
- const isInt = (_a = def.format) == null ? void 0 : _a.includes("int");
635
+ const isInt = def.format?.includes("int");
641
636
  const origin = isInt ? "int" : "number";
642
637
  const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
643
638
  inst._zod.onattach.push((inst2) => {
@@ -956,8 +951,8 @@ class Doc {
956
951
  }
957
952
  compile() {
958
953
  const F = Function;
959
- const args = this == null ? void 0 : this.args;
960
- const content = (this == null ? void 0 : this.content) ?? [``];
954
+ const args = this?.args;
955
+ const content = this?.content ?? [``];
961
956
  const lines = [...content.map((x) => ` ${x}`)];
962
957
  return new F(...args, lines.join("\n"));
963
958
  }
@@ -968,7 +963,6 @@ const version = {
968
963
  patch: 0
969
964
  };
970
965
  const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
971
- var _a2;
972
966
  var _a;
973
967
  inst ?? (inst = {});
974
968
  inst._zod.def = def;
@@ -985,7 +979,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
985
979
  }
986
980
  if (checks.length === 0) {
987
981
  (_a = inst._zod).deferred ?? (_a.deferred = []);
988
- (_a2 = inst._zod.deferred) == null ? void 0 : _a2.push(() => {
982
+ inst._zod.deferred?.push(() => {
989
983
  inst._zod.run = inst._zod.parse;
990
984
  });
991
985
  } else {
@@ -1002,7 +996,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1002
996
  }
1003
997
  const currLen = payload.issues.length;
1004
998
  const _ = ch._zod.check(payload);
1005
- if (_ instanceof Promise && (ctx == null ? void 0 : ctx.async) === false) {
999
+ if (_ instanceof Promise && ctx?.async === false) {
1006
1000
  throw new $ZodAsyncError();
1007
1001
  }
1008
1002
  if (asyncResult || _ instanceof Promise) {
@@ -1041,15 +1035,11 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1041
1035
  }
1042
1036
  inst["~standard"] = {
1043
1037
  validate: (value) => {
1044
- var _a3;
1045
1038
  try {
1046
1039
  const r = safeParse$1(inst, value);
1047
- return r.success ? { value: r.data } : { issues: (_a3 = r.error) == null ? void 0 : _a3.issues };
1040
+ return r.success ? { value: r.data } : { issues: r.error?.issues };
1048
1041
  } catch (_) {
1049
- return safeParseAsync$1(inst, value).then((r) => {
1050
- var _a4;
1051
- return r.success ? { value: r.data } : { issues: (_a4 = r.error) == null ? void 0 : _a4.issues };
1052
- });
1042
+ return safeParseAsync$1(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
1053
1043
  }
1054
1044
  },
1055
1045
  vendor: "zod",
@@ -1057,9 +1047,8 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1057
1047
  };
1058
1048
  });
1059
1049
  const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
1060
- var _a;
1061
1050
  $ZodType.init(inst, def);
1062
- inst._zod.pattern = [...((_a = inst == null ? void 0 : inst._zod.bag) == null ? void 0 : _a.patterns) ?? []].pop() ?? string$1(inst._zod.bag);
1051
+ inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);
1063
1052
  inst._zod.parse = (payload, _) => {
1064
1053
  if (def.coerce)
1065
1054
  try {
@@ -1331,7 +1320,7 @@ function isValidJWT(token, algorithm = null) {
1331
1320
  if (!header)
1332
1321
  return false;
1333
1322
  const parsedHeader = JSON.parse(atob(header));
1334
- if ("typ" in parsedHeader && (parsedHeader == null ? void 0 : parsedHeader.typ) !== "JWT")
1323
+ if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
1335
1324
  return false;
1336
1325
  if (!parsedHeader.alg)
1337
1326
  return false;
@@ -1607,7 +1596,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
1607
1596
  return payload;
1608
1597
  }
1609
1598
  const proms = [];
1610
- if (jit && fastEnabled && (ctx == null ? void 0 : ctx.async) === false && ctx.jitless !== true) {
1599
+ if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
1611
1600
  if (!fastpass)
1612
1601
  fastpass = generateFastpass(def.shape);
1613
1602
  payload = fastpass(payload, ctx);
@@ -1765,7 +1754,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
1765
1754
  });
1766
1755
  return payload;
1767
1756
  }
1768
- const opt = disc.value.get(input == null ? void 0 : input[def.discriminator]);
1757
+ const opt = disc.value.get(input?.[def.discriminator]);
1769
1758
  if (opt) {
1770
1759
  return opt._zod.run(payload, ctx);
1771
1760
  }
@@ -2773,10 +2762,10 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
2773
2762
  };
2774
2763
  inst.clone = (def2, params) => clone(inst, def2, params);
2775
2764
  inst.brand = () => inst;
2776
- inst.register = (reg, meta) => {
2765
+ inst.register = ((reg, meta) => {
2777
2766
  reg.add(inst, meta);
2778
2767
  return inst;
2779
- };
2768
+ });
2780
2769
  inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
2781
2770
  inst.safeParse = (data, params) => safeParse(inst, data, params);
2782
2771
  inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
@@ -2805,8 +2794,7 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
2805
2794
  };
2806
2795
  Object.defineProperty(inst, "description", {
2807
2796
  get() {
2808
- var _a;
2809
- return (_a = globalRegistry.get(inst)) == null ? void 0 : _a.description;
2797
+ return globalRegistry.get(inst)?.description;
2810
2798
  },
2811
2799
  configurable: true
2812
2800
  });
@@ -4942,7 +4930,7 @@ function createAppServer(config2) {
4942
4930
  }
4943
4931
  const toolCallData = toolCallDataMap.get(request.params.name);
4944
4932
  toolInputParser.parse(args);
4945
- const hasStructuredContent = (toolCallData == null ? void 0 : toolCallData.structuredContent) != null;
4933
+ const hasStructuredContent = toolCallData?.structuredContent != null;
4946
4934
  console.log(
4947
4935
  `[MCP] CallTool: ${request.params.name}${argsStr} → ${hasStructuredContent ? "structured" : "text"}`
4948
4936
  );
@@ -4953,8 +4941,8 @@ function createAppServer(config2) {
4953
4941
  text: `Rendered ${simulation.tool.description}!`
4954
4942
  }
4955
4943
  ],
4956
- structuredContent: (toolCallData == null ? void 0 : toolCallData.structuredContent) ?? void 0,
4957
- _meta: (toolCallData == null ? void 0 : toolCallData._meta) ?? {}
4944
+ structuredContent: toolCallData?.structuredContent ?? void 0,
4945
+ _meta: toolCallData?._meta ?? {}
4958
4946
  };
4959
4947
  });
4960
4948
  return server;
@@ -5065,4 +5053,4 @@ function runMCPServer(config2) {
5065
5053
  export {
5066
5054
  runMCPServer as r
5067
5055
  };
5068
- //# sourceMappingURL=server-310A1k9o.js.map
5056
+ //# sourceMappingURL=server-CnRhUNGQ.js.map