@supernova-studio/model 1.48.11 → 1.48.13

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/dist/index.js CHANGED
@@ -963,9 +963,11 @@ var SupernovaException = class _SupernovaException extends Error {
963
963
  function errorToString(error) {
964
964
  if (error instanceof Error) {
965
965
  const errorAny = error;
966
- const stderr = _nullishCoalesce(_nullishCoalesce(_optionalChain([errorAny, 'access', _2 => _2.result, 'optionalAccess', _3 => _3.stderr]), () => ( errorAny.stderr)), () => ( ""));
967
- return stderr ? `${error.message}
968
- ${stderr}` : error.message;
966
+ const stderr = (_nullishCoalesce(_nullishCoalesce(_optionalChain([errorAny, 'access', _2 => _2.result, 'optionalAccess', _3 => _3.stderr]), () => ( errorAny.stderr)), () => ( ""))).trim();
967
+ const stdout = (_nullishCoalesce(_nullishCoalesce(_optionalChain([errorAny, 'access', _4 => _4.result, 'optionalAccess', _5 => _5.stdout]), () => ( errorAny.stdout)), () => ( ""))).trim();
968
+ const output = [stderr, stdout].filter(Boolean).join("\n");
969
+ return output ? `${error.message}
970
+ ${output}` : error.message;
969
971
  }
970
972
  return String(error);
971
973
  }
@@ -1030,7 +1032,7 @@ function buildConstantEnum(values) {
1030
1032
  async function promiseWithTimeout(timeoutMs, promise, onTimeout) {
1031
1033
  let timeoutHandle;
1032
1034
  const timeoutPromise = new Promise((_, reject) => {
1033
- timeoutHandle = setTimeout(() => reject(_nullishCoalesce(_optionalChain([onTimeout, 'optionalCall', _4 => _4()]), () => ( SupernovaException.timeout()))), timeoutMs);
1035
+ timeoutHandle = setTimeout(() => reject(_nullishCoalesce(_optionalChain([onTimeout, 'optionalCall', _6 => _6()]), () => ( SupernovaException.timeout()))), timeoutMs);
1034
1036
  });
1035
1037
  const result = await Promise.race([promise(), timeoutPromise]);
1036
1038
  clearTimeout(timeoutHandle);
@@ -1212,7 +1214,7 @@ function generateAlphanumericId(length) {
1212
1214
  var _slugify = require('@sindresorhus/slugify'); var _slugify2 = _interopRequireDefault(_slugify);
1213
1215
  function slugify(str, options) {
1214
1216
  const slug = _slugify2.default.call(void 0, _nullishCoalesce(str, () => ( "")), options);
1215
- return _optionalChain([slug, 'optionalAccess', _5 => _5.length]) > 0 ? slug : "item";
1217
+ return _optionalChain([slug, 'optionalAccess', _7 => _7.length]) > 0 ? slug : "item";
1216
1218
  }
1217
1219
  var RESERVED_SLUGS = [
1218
1220
  "workspaces",
@@ -1835,7 +1837,7 @@ var RESERVED_SLUGS = [
1835
1837
  ];
1836
1838
  var RESERVED_SLUGS_SET = new Set(RESERVED_SLUGS);
1837
1839
  var RESERVED_SLUG_PREFIX = "x-sn-reserved-";
1838
- var isSlugReservedInternal = (slug) => _optionalChain([slug, 'optionalAccess', _6 => _6.startsWith, 'call', _7 => _7(RESERVED_SLUG_PREFIX)]);
1840
+ var isSlugReservedInternal = (slug) => _optionalChain([slug, 'optionalAccess', _8 => _8.startsWith, 'call', _9 => _9(RESERVED_SLUG_PREFIX)]);
1839
1841
  function isSlugReserved(slug) {
1840
1842
  return RESERVED_SLUGS_SET.has(slug) || isSlugReservedInternal(slug);
1841
1843
  }
@@ -1987,7 +1989,7 @@ function areTokenTypesCompatible(lhs, rhs, isNonCompatibleTypeChangesEnabled = f
1987
1989
  }
1988
1990
  function castStringToDimensionValue(lhs, rhs, value) {
1989
1991
  if (stringTokenTypes.has(lhs) && numberTokenTypes.has(rhs) && value) {
1990
- const newValue = Number.parseFloat(_nullishCoalesce(_optionalChain([value, 'optionalAccess', _8 => _8.toString, 'call', _9 => _9()]), () => ( "")));
1992
+ const newValue = Number.parseFloat(_nullishCoalesce(_optionalChain([value, 'optionalAccess', _10 => _10.toString, 'call', _11 => _11()]), () => ( "")));
1991
1993
  const measure = Number.isNaN(newValue) ? fallbackNumberValue : newValue;
1992
1994
  return { unit: "Pixels", measure };
1993
1995
  }
@@ -5543,7 +5545,7 @@ var HANDLE_MIN_LENGTH = 2;
5543
5545
  var HANDLE_MAX_LENGTH = 64;
5544
5546
  var CreateWorkspaceInput = _zod.z.object({
5545
5547
  name: _zod.z.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
5546
- handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess', _10 => _10.length]) > 0).optional()
5548
+ handle: _zod.z.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => _optionalChain([value, 'optionalAccess', _12 => _12.length]) > 0).optional()
5547
5549
  });
5548
5550
 
5549
5551
  // src/workspace/workspace-invitations.ts
@@ -5803,8 +5805,8 @@ var PublishedDocPageVisitsEntry = _zod.z.object({
5803
5805
  var SHORT_PERSISTENT_ID_LENGTH = 8;
5804
5806
  function tryParseShortPersistentId(url = "/") {
5805
5807
  const lastUrlPart = url.split("/").pop() || "";
5806
- const shortPersistentId = _optionalChain([lastUrlPart, 'access', _11 => _11.split, 'call', _12 => _12("-"), 'access', _13 => _13.pop, 'call', _14 => _14(), 'optionalAccess', _15 => _15.replaceAll, 'call', _16 => _16(".html", "")]) || null;
5807
- return _optionalChain([shortPersistentId, 'optionalAccess', _17 => _17.length]) === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
5808
+ const shortPersistentId = _optionalChain([lastUrlPart, 'access', _13 => _13.split, 'call', _14 => _14("-"), 'access', _15 => _15.pop, 'call', _16 => _16(), 'optionalAccess', _17 => _17.replaceAll, 'call', _18 => _18(".html", "")]) || null;
5809
+ return _optionalChain([shortPersistentId, 'optionalAccess', _19 => _19.length]) === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
5808
5810
  }
5809
5811
  var PublishedDocPage = _zod.z.object({
5810
5812
  id: _zod.z.string(),
@@ -6285,7 +6287,7 @@ var IntegrationToken = _zod.z.object({
6285
6287
  token_bitbucket_username: _zod.z.string().optional(),
6286
6288
  // Bitbucket only
6287
6289
  custom_url: _zod.z.string().optional().transform((value) => {
6288
- if (!_optionalChain([value, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()])) return void 0;
6290
+ if (!_optionalChain([value, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()])) return void 0;
6289
6291
  return formatCustomUrl(value);
6290
6292
  })
6291
6293
  }).refine((data) => {