@scalar/cli 1.9.2 → 1.9.4

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 (3) hide show
  1. package/docs.html +102 -74
  2. package/index.js +989 -261
  3. package/package.json +11 -11
package/index.js CHANGED
@@ -114,17 +114,17 @@ var require_visit = __commonJS({
114
114
  visit.BREAK = BREAK;
115
115
  visit.SKIP = SKIP;
116
116
  visit.REMOVE = REMOVE;
117
- function visit_(key, node, visitor, path12) {
118
- const ctrl = callVisitor(key, node, visitor, path12);
117
+ function visit_(key, node, visitor, path13) {
118
+ const ctrl = callVisitor(key, node, visitor, path13);
119
119
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
120
- replaceNode(key, path12, ctrl);
121
- return visit_(key, ctrl, visitor, path12);
120
+ replaceNode(key, path13, ctrl);
121
+ return visit_(key, ctrl, visitor, path13);
122
122
  }
123
123
  if (typeof ctrl !== "symbol") {
124
124
  if (identity.isCollection(node)) {
125
- path12 = Object.freeze(path12.concat(node));
125
+ path13 = Object.freeze(path13.concat(node));
126
126
  for (let i = 0; i < node.items.length; ++i) {
127
- const ci = visit_(i, node.items[i], visitor, path12);
127
+ const ci = visit_(i, node.items[i], visitor, path13);
128
128
  if (typeof ci === "number")
129
129
  i = ci - 1;
130
130
  else if (ci === BREAK)
@@ -135,13 +135,13 @@ var require_visit = __commonJS({
135
135
  }
136
136
  }
137
137
  } else if (identity.isPair(node)) {
138
- path12 = Object.freeze(path12.concat(node));
139
- const ck = visit_("key", node.key, visitor, path12);
138
+ path13 = Object.freeze(path13.concat(node));
139
+ const ck = visit_("key", node.key, visitor, path13);
140
140
  if (ck === BREAK)
141
141
  return BREAK;
142
142
  else if (ck === REMOVE)
143
143
  node.key = null;
144
- const cv = visit_("value", node.value, visitor, path12);
144
+ const cv = visit_("value", node.value, visitor, path13);
145
145
  if (cv === BREAK)
146
146
  return BREAK;
147
147
  else if (cv === REMOVE)
@@ -162,17 +162,17 @@ var require_visit = __commonJS({
162
162
  visitAsync.BREAK = BREAK;
163
163
  visitAsync.SKIP = SKIP;
164
164
  visitAsync.REMOVE = REMOVE;
165
- async function visitAsync_(key, node, visitor, path12) {
166
- const ctrl = await callVisitor(key, node, visitor, path12);
165
+ async function visitAsync_(key, node, visitor, path13) {
166
+ const ctrl = await callVisitor(key, node, visitor, path13);
167
167
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
168
- replaceNode(key, path12, ctrl);
169
- return visitAsync_(key, ctrl, visitor, path12);
168
+ replaceNode(key, path13, ctrl);
169
+ return visitAsync_(key, ctrl, visitor, path13);
170
170
  }
171
171
  if (typeof ctrl !== "symbol") {
172
172
  if (identity.isCollection(node)) {
173
- path12 = Object.freeze(path12.concat(node));
173
+ path13 = Object.freeze(path13.concat(node));
174
174
  for (let i = 0; i < node.items.length; ++i) {
175
- const ci = await visitAsync_(i, node.items[i], visitor, path12);
175
+ const ci = await visitAsync_(i, node.items[i], visitor, path13);
176
176
  if (typeof ci === "number")
177
177
  i = ci - 1;
178
178
  else if (ci === BREAK)
@@ -183,13 +183,13 @@ var require_visit = __commonJS({
183
183
  }
184
184
  }
185
185
  } else if (identity.isPair(node)) {
186
- path12 = Object.freeze(path12.concat(node));
187
- const ck = await visitAsync_("key", node.key, visitor, path12);
186
+ path13 = Object.freeze(path13.concat(node));
187
+ const ck = await visitAsync_("key", node.key, visitor, path13);
188
188
  if (ck === BREAK)
189
189
  return BREAK;
190
190
  else if (ck === REMOVE)
191
191
  node.key = null;
192
- const cv = await visitAsync_("value", node.value, visitor, path12);
192
+ const cv = await visitAsync_("value", node.value, visitor, path13);
193
193
  if (cv === BREAK)
194
194
  return BREAK;
195
195
  else if (cv === REMOVE)
@@ -216,23 +216,23 @@ var require_visit = __commonJS({
216
216
  }
217
217
  return visitor;
218
218
  }
219
- function callVisitor(key, node, visitor, path12) {
219
+ function callVisitor(key, node, visitor, path13) {
220
220
  if (typeof visitor === "function")
221
- return visitor(key, node, path12);
221
+ return visitor(key, node, path13);
222
222
  if (identity.isMap(node))
223
- return visitor.Map?.(key, node, path12);
223
+ return visitor.Map?.(key, node, path13);
224
224
  if (identity.isSeq(node))
225
- return visitor.Seq?.(key, node, path12);
225
+ return visitor.Seq?.(key, node, path13);
226
226
  if (identity.isPair(node))
227
- return visitor.Pair?.(key, node, path12);
227
+ return visitor.Pair?.(key, node, path13);
228
228
  if (identity.isScalar(node))
229
- return visitor.Scalar?.(key, node, path12);
229
+ return visitor.Scalar?.(key, node, path13);
230
230
  if (identity.isAlias(node))
231
- return visitor.Alias?.(key, node, path12);
231
+ return visitor.Alias?.(key, node, path13);
232
232
  return void 0;
233
233
  }
234
- function replaceNode(key, path12, node) {
235
- const parent = path12[path12.length - 1];
234
+ function replaceNode(key, path13, node) {
235
+ const parent = path13[path13.length - 1];
236
236
  if (identity.isCollection(parent)) {
237
237
  parent.items[key] = node;
238
238
  } else if (identity.isPair(parent)) {
@@ -840,10 +840,10 @@ var require_Collection = __commonJS({
840
840
  var createNode = require_createNode();
841
841
  var identity = require_identity();
842
842
  var Node = require_Node();
843
- function collectionFromPath(schema, path12, value) {
843
+ function collectionFromPath(schema, path13, value) {
844
844
  let v = value;
845
- for (let i = path12.length - 1; i >= 0; --i) {
846
- const k = path12[i];
845
+ for (let i = path13.length - 1; i >= 0; --i) {
846
+ const k = path13[i];
847
847
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
848
848
  const a = [];
849
849
  a[k] = v;
@@ -862,7 +862,7 @@ var require_Collection = __commonJS({
862
862
  sourceObjects: /* @__PURE__ */ new Map()
863
863
  });
864
864
  }
865
- var isEmptyPath = (path12) => path12 == null || typeof path12 === "object" && !!path12[Symbol.iterator]().next().done;
865
+ var isEmptyPath = (path13) => path13 == null || typeof path13 === "object" && !!path13[Symbol.iterator]().next().done;
866
866
  var Collection = class extends Node.NodeBase {
867
867
  constructor(type, schema) {
868
868
  super(type);
@@ -892,11 +892,11 @@ var require_Collection = __commonJS({
892
892
  * be a Pair instance or a `{ key, value }` object, which may not have a key
893
893
  * that already exists in the map.
894
894
  */
895
- addIn(path12, value) {
896
- if (isEmptyPath(path12))
895
+ addIn(path13, value) {
896
+ if (isEmptyPath(path13))
897
897
  this.add(value);
898
898
  else {
899
- const [key, ...rest] = path12;
899
+ const [key, ...rest] = path13;
900
900
  const node = this.get(key, true);
901
901
  if (identity.isCollection(node))
902
902
  node.addIn(rest, value);
@@ -910,8 +910,8 @@ var require_Collection = __commonJS({
910
910
  * Removes a value from the collection.
911
911
  * @returns `true` if the item was found and removed.
912
912
  */
913
- deleteIn(path12) {
914
- const [key, ...rest] = path12;
913
+ deleteIn(path13) {
914
+ const [key, ...rest] = path13;
915
915
  if (rest.length === 0)
916
916
  return this.delete(key);
917
917
  const node = this.get(key, true);
@@ -925,8 +925,8 @@ var require_Collection = __commonJS({
925
925
  * scalar values from their surrounding node; to disable set `keepScalar` to
926
926
  * `true` (collections are always returned intact).
927
927
  */
928
- getIn(path12, keepScalar) {
929
- const [key, ...rest] = path12;
928
+ getIn(path13, keepScalar) {
929
+ const [key, ...rest] = path13;
930
930
  const node = this.get(key, true);
931
931
  if (rest.length === 0)
932
932
  return !keepScalar && identity.isScalar(node) ? node.value : node;
@@ -944,8 +944,8 @@ var require_Collection = __commonJS({
944
944
  /**
945
945
  * Checks if the collection includes a value with the key `key`.
946
946
  */
947
- hasIn(path12) {
948
- const [key, ...rest] = path12;
947
+ hasIn(path13) {
948
+ const [key, ...rest] = path13;
949
949
  if (rest.length === 0)
950
950
  return this.has(key);
951
951
  const node = this.get(key, true);
@@ -955,8 +955,8 @@ var require_Collection = __commonJS({
955
955
  * Sets a value in this collection. For `!!set`, `value` needs to be a
956
956
  * boolean to add/remove the item from the set.
957
957
  */
958
- setIn(path12, value) {
959
- const [key, ...rest] = path12;
958
+ setIn(path13, value) {
959
+ const [key, ...rest] = path13;
960
960
  if (rest.length === 0) {
961
961
  this.set(key, value);
962
962
  } else {
@@ -3468,9 +3468,9 @@ var require_Document = __commonJS({
3468
3468
  this.contents.add(value);
3469
3469
  }
3470
3470
  /** Adds a value to the document. */
3471
- addIn(path12, value) {
3471
+ addIn(path13, value) {
3472
3472
  if (assertCollection(this.contents))
3473
- this.contents.addIn(path12, value);
3473
+ this.contents.addIn(path13, value);
3474
3474
  }
3475
3475
  /**
3476
3476
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -3545,14 +3545,14 @@ var require_Document = __commonJS({
3545
3545
  * Removes a value from the document.
3546
3546
  * @returns `true` if the item was found and removed.
3547
3547
  */
3548
- deleteIn(path12) {
3549
- if (Collection.isEmptyPath(path12)) {
3548
+ deleteIn(path13) {
3549
+ if (Collection.isEmptyPath(path13)) {
3550
3550
  if (this.contents == null)
3551
3551
  return false;
3552
3552
  this.contents = null;
3553
3553
  return true;
3554
3554
  }
3555
- return assertCollection(this.contents) ? this.contents.deleteIn(path12) : false;
3555
+ return assertCollection(this.contents) ? this.contents.deleteIn(path13) : false;
3556
3556
  }
3557
3557
  /**
3558
3558
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -3567,10 +3567,10 @@ var require_Document = __commonJS({
3567
3567
  * scalar values from their surrounding node; to disable set `keepScalar` to
3568
3568
  * `true` (collections are always returned intact).
3569
3569
  */
3570
- getIn(path12, keepScalar) {
3571
- if (Collection.isEmptyPath(path12))
3570
+ getIn(path13, keepScalar) {
3571
+ if (Collection.isEmptyPath(path13))
3572
3572
  return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents;
3573
- return identity.isCollection(this.contents) ? this.contents.getIn(path12, keepScalar) : void 0;
3573
+ return identity.isCollection(this.contents) ? this.contents.getIn(path13, keepScalar) : void 0;
3574
3574
  }
3575
3575
  /**
3576
3576
  * Checks if the document includes a value with the key `key`.
@@ -3581,10 +3581,10 @@ var require_Document = __commonJS({
3581
3581
  /**
3582
3582
  * Checks if the document includes a value at `path`.
3583
3583
  */
3584
- hasIn(path12) {
3585
- if (Collection.isEmptyPath(path12))
3584
+ hasIn(path13) {
3585
+ if (Collection.isEmptyPath(path13))
3586
3586
  return this.contents !== void 0;
3587
- return identity.isCollection(this.contents) ? this.contents.hasIn(path12) : false;
3587
+ return identity.isCollection(this.contents) ? this.contents.hasIn(path13) : false;
3588
3588
  }
3589
3589
  /**
3590
3590
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -3601,13 +3601,13 @@ var require_Document = __commonJS({
3601
3601
  * Sets a value in this document. For `!!set`, `value` needs to be a
3602
3602
  * boolean to add/remove the item from the set.
3603
3603
  */
3604
- setIn(path12, value) {
3605
- if (Collection.isEmptyPath(path12)) {
3604
+ setIn(path13, value) {
3605
+ if (Collection.isEmptyPath(path13)) {
3606
3606
  this.contents = value;
3607
3607
  } else if (this.contents == null) {
3608
- this.contents = Collection.collectionFromPath(this.schema, Array.from(path12), value);
3608
+ this.contents = Collection.collectionFromPath(this.schema, Array.from(path13), value);
3609
3609
  } else if (assertCollection(this.contents)) {
3610
- this.contents.setIn(path12, value);
3610
+ this.contents.setIn(path13, value);
3611
3611
  }
3612
3612
  }
3613
3613
  /**
@@ -5564,9 +5564,9 @@ var require_cst_visit = __commonJS({
5564
5564
  visit.BREAK = BREAK;
5565
5565
  visit.SKIP = SKIP;
5566
5566
  visit.REMOVE = REMOVE;
5567
- visit.itemAtPath = (cst, path12) => {
5567
+ visit.itemAtPath = (cst, path13) => {
5568
5568
  let item = cst;
5569
- for (const [field, index] of path12) {
5569
+ for (const [field, index] of path13) {
5570
5570
  const tok = item?.[field];
5571
5571
  if (tok && "items" in tok) {
5572
5572
  item = tok.items[index];
@@ -5575,23 +5575,23 @@ var require_cst_visit = __commonJS({
5575
5575
  }
5576
5576
  return item;
5577
5577
  };
5578
- visit.parentCollection = (cst, path12) => {
5579
- const parent = visit.itemAtPath(cst, path12.slice(0, -1));
5580
- const field = path12[path12.length - 1][0];
5578
+ visit.parentCollection = (cst, path13) => {
5579
+ const parent = visit.itemAtPath(cst, path13.slice(0, -1));
5580
+ const field = path13[path13.length - 1][0];
5581
5581
  const coll = parent?.[field];
5582
5582
  if (coll && "items" in coll)
5583
5583
  return coll;
5584
5584
  throw new Error("Parent collection not found");
5585
5585
  };
5586
- function _visit(path12, item, visitor) {
5587
- let ctrl = visitor(item, path12);
5586
+ function _visit(path13, item, visitor) {
5587
+ let ctrl = visitor(item, path13);
5588
5588
  if (typeof ctrl === "symbol")
5589
5589
  return ctrl;
5590
5590
  for (const field of ["key", "value"]) {
5591
5591
  const token = item[field];
5592
5592
  if (token && "items" in token) {
5593
5593
  for (let i = 0; i < token.items.length; ++i) {
5594
- const ci = _visit(Object.freeze(path12.concat([[field, i]])), token.items[i], visitor);
5594
+ const ci = _visit(Object.freeze(path13.concat([[field, i]])), token.items[i], visitor);
5595
5595
  if (typeof ci === "number")
5596
5596
  i = ci - 1;
5597
5597
  else if (ci === BREAK)
@@ -5602,10 +5602,10 @@ var require_cst_visit = __commonJS({
5602
5602
  }
5603
5603
  }
5604
5604
  if (typeof ctrl === "function" && field === "key")
5605
- ctrl = ctrl(item, path12);
5605
+ ctrl = ctrl(item, path13);
5606
5606
  }
5607
5607
  }
5608
- return typeof ctrl === "function" ? ctrl(item, path12) : ctrl;
5608
+ return typeof ctrl === "function" ? ctrl(item, path13) : ctrl;
5609
5609
  }
5610
5610
  exports2.visit = visit;
5611
5611
  }
@@ -28667,27 +28667,27 @@ var require_util2 = __commonJS({
28667
28667
  };
28668
28668
  }
28669
28669
  var normalize6 = lruMemoize(function normalize7(aPath) {
28670
- var path12 = aPath;
28670
+ var path13 = aPath;
28671
28671
  var url2 = urlParse(aPath);
28672
28672
  if (url2) {
28673
28673
  if (!url2.path) {
28674
28674
  return aPath;
28675
28675
  }
28676
- path12 = url2.path;
28676
+ path13 = url2.path;
28677
28677
  }
28678
- var isAbsolute = exports2.isAbsolute(path12);
28678
+ var isAbsolute = exports2.isAbsolute(path13);
28679
28679
  var parts = [];
28680
28680
  var start = 0;
28681
28681
  var i = 0;
28682
28682
  while (true) {
28683
28683
  start = i;
28684
- i = path12.indexOf("/", start);
28684
+ i = path13.indexOf("/", start);
28685
28685
  if (i === -1) {
28686
- parts.push(path12.slice(start));
28686
+ parts.push(path13.slice(start));
28687
28687
  break;
28688
28688
  } else {
28689
- parts.push(path12.slice(start, i));
28690
- while (i < path12.length && path12[i] === "/") {
28689
+ parts.push(path13.slice(start, i));
28690
+ while (i < path13.length && path13[i] === "/") {
28691
28691
  i++;
28692
28692
  }
28693
28693
  }
@@ -28708,15 +28708,15 @@ var require_util2 = __commonJS({
28708
28708
  }
28709
28709
  }
28710
28710
  }
28711
- path12 = parts.join("/");
28712
- if (path12 === "") {
28713
- path12 = isAbsolute ? "/" : ".";
28711
+ path13 = parts.join("/");
28712
+ if (path13 === "") {
28713
+ path13 = isAbsolute ? "/" : ".";
28714
28714
  }
28715
28715
  if (url2) {
28716
- url2.path = path12;
28716
+ url2.path = path13;
28717
28717
  return urlGenerate(url2);
28718
28718
  }
28719
- return path12;
28719
+ return path13;
28720
28720
  });
28721
28721
  exports2.normalize = normalize6;
28722
28722
  function join2(aRoot, aPath) {
@@ -32355,14 +32355,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
32355
32355
  var whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
32356
32356
  var getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
32357
32357
  var isMemberExpressionBrowser = (exp) => {
32358
- const path12 = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
32358
+ const path13 = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
32359
32359
  let state = 0;
32360
32360
  let stateStack = [];
32361
32361
  let currentOpenBracketCount = 0;
32362
32362
  let currentOpenParensCount = 0;
32363
32363
  let currentStringType = null;
32364
- for (let i = 0; i < path12.length; i++) {
32365
- const char = path12.charAt(i);
32364
+ for (let i = 0; i < path13.length; i++) {
32365
+ const char = path13.charAt(i);
32366
32366
  switch (state) {
32367
32367
  case 0:
32368
32368
  if (char === "[") {
@@ -32398,7 +32398,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
32398
32398
  } else if (char === `(`) {
32399
32399
  currentOpenParensCount++;
32400
32400
  } else if (char === `)`) {
32401
- if (i === path12.length - 1) {
32401
+ if (i === path13.length - 1) {
32402
32402
  return false;
32403
32403
  }
32404
32404
  if (!--currentOpenParensCount) {
@@ -39126,14 +39126,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
39126
39126
  var whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
39127
39127
  var getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
39128
39128
  var isMemberExpressionBrowser = (exp) => {
39129
- const path12 = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
39129
+ const path13 = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
39130
39130
  let state = 0;
39131
39131
  let stateStack = [];
39132
39132
  let currentOpenBracketCount = 0;
39133
39133
  let currentOpenParensCount = 0;
39134
39134
  let currentStringType = null;
39135
- for (let i = 0; i < path12.length; i++) {
39136
- const char = path12.charAt(i);
39135
+ for (let i = 0; i < path13.length; i++) {
39136
+ const char = path13.charAt(i);
39137
39137
  switch (state) {
39138
39138
  case 0:
39139
39139
  if (char === "[") {
@@ -39169,7 +39169,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
39169
39169
  } else if (char === `(`) {
39170
39170
  currentOpenParensCount++;
39171
39171
  } else if (char === `)`) {
39172
- if (i === path12.length - 1) {
39172
+ if (i === path13.length - 1) {
39173
39173
  return false;
39174
39174
  }
39175
39175
  if (!--currentOpenParensCount) {
@@ -49946,8 +49946,8 @@ var require_runtime_core_cjs_prod = __commonJS({
49946
49946
  reset();
49947
49947
  return res;
49948
49948
  }
49949
- function createPathGetter(ctx, path12) {
49950
- const segments = path12.split(".");
49949
+ function createPathGetter(ctx, path13) {
49950
+ const segments = path13.split(".");
49951
49951
  return () => {
49952
49952
  let cur = ctx;
49953
49953
  for (let i = 0; i < segments.length && cur; i++) {
@@ -57250,8 +57250,8 @@ var require_runtime_core_cjs = __commonJS({
57250
57250
  reset();
57251
57251
  return res;
57252
57252
  }
57253
- function createPathGetter(ctx, path12) {
57254
- const segments = path12.split(".");
57253
+ function createPathGetter(ctx, path13) {
57254
+ const segments = path13.split(".");
57255
57255
  return () => {
57256
57256
  let cur = ctx;
57257
57257
  for (let i = 0; i < segments.length && cur; i++) {
@@ -69160,11 +69160,11 @@ Visit https://nodejs.org to download the latest version.`
69160
69160
  }
69161
69161
 
69162
69162
  // src/program.ts
69163
- import { Command as Command49 } from "commander";
69163
+ import { Command as Command50 } from "commander";
69164
69164
 
69165
69165
  // package.json
69166
69166
  var name = "@scalar/cli";
69167
- var version = "1.9.2";
69167
+ var version = "1.9.4";
69168
69168
  var bin = {
69169
69169
  scalar: "./dist/index.js",
69170
69170
  "scalar-cli": "./dist/index.js"
@@ -69944,10 +69944,10 @@ function mergeDefs(...defs) {
69944
69944
  function cloneDef(schema) {
69945
69945
  return mergeDefs(schema._zod.def);
69946
69946
  }
69947
- function getElementAtPath(obj, path12) {
69948
- if (!path12)
69947
+ function getElementAtPath(obj, path13) {
69948
+ if (!path13)
69949
69949
  return obj;
69950
- return path12.reduce((acc, key) => acc?.[key], obj);
69950
+ return path13.reduce((acc, key) => acc?.[key], obj);
69951
69951
  }
69952
69952
  function promiseAllObject(promisesObj) {
69953
69953
  const keys = Object.keys(promisesObj);
@@ -70330,11 +70330,11 @@ function aborted(x, startIndex = 0) {
70330
70330
  }
70331
70331
  return false;
70332
70332
  }
70333
- function prefixIssues(path12, issues) {
70333
+ function prefixIssues(path13, issues) {
70334
70334
  return issues.map((iss) => {
70335
70335
  var _a2;
70336
70336
  (_a2 = iss).path ?? (_a2.path = []);
70337
- iss.path.unshift(path12);
70337
+ iss.path.unshift(path13);
70338
70338
  return iss;
70339
70339
  });
70340
70340
  }
@@ -70517,7 +70517,7 @@ function formatError(error48, mapper = (issue2) => issue2.message) {
70517
70517
  }
70518
70518
  function treeifyError(error48, mapper = (issue2) => issue2.message) {
70519
70519
  const result = { errors: [] };
70520
- const processError = (error49, path12 = []) => {
70520
+ const processError = (error49, path13 = []) => {
70521
70521
  var _a2, _b;
70522
70522
  for (const issue2 of error49.issues) {
70523
70523
  if (issue2.code === "invalid_union" && issue2.errors.length) {
@@ -70527,7 +70527,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
70527
70527
  } else if (issue2.code === "invalid_element") {
70528
70528
  processError({ issues: issue2.issues }, issue2.path);
70529
70529
  } else {
70530
- const fullpath = [...path12, ...issue2.path];
70530
+ const fullpath = [...path13, ...issue2.path];
70531
70531
  if (fullpath.length === 0) {
70532
70532
  result.errors.push(mapper(issue2));
70533
70533
  continue;
@@ -70559,8 +70559,8 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
70559
70559
  }
70560
70560
  function toDotPath(_path) {
70561
70561
  const segs = [];
70562
- const path12 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
70563
- for (const seg of path12) {
70562
+ const path13 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
70563
+ for (const seg of path13) {
70564
70564
  if (typeof seg === "number")
70565
70565
  segs.push(`[${seg}]`);
70566
70566
  else if (typeof seg === "symbol")
@@ -82537,13 +82537,13 @@ function resolveRef(ref, ctx) {
82537
82537
  if (!ref.startsWith("#")) {
82538
82538
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
82539
82539
  }
82540
- const path12 = ref.slice(1).split("/").filter(Boolean);
82541
- if (path12.length === 0) {
82540
+ const path13 = ref.slice(1).split("/").filter(Boolean);
82541
+ if (path13.length === 0) {
82542
82542
  return ctx.rootSchema;
82543
82543
  }
82544
82544
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
82545
- if (path12[0] === defsKey) {
82546
- const key = path12[1];
82545
+ if (path13[0] === defsKey) {
82546
+ const key = path13[1];
82547
82547
  if (!key || !ctx.defs[key]) {
82548
82548
  throw new Error(`Reference not found: ${ref}`);
82549
82549
  }
@@ -86458,6 +86458,10 @@ var regexSlug = /^[a-z](?:[a-z0-9-]*[a-z0-9])?$/;
86458
86458
  var slugSchema = external_exports.string().min(1, "Slug is required").min(3, "Slug must be at least 3 characters").max(60, "Slug must be less than 60 characters").regex(regexSlug, {
86459
86459
  message: "Slug can have lowercase letters, digits, or hyphens. It must start with a lowercase letter and end with a letter or number."
86460
86460
  }).meta({ id: "slug" });
86461
+ var toRegistrySlug = (title) => {
86462
+ const candidate = title.normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase().trim().replace(/[^a-z0-9\s-]/g, "").replace(/[\s-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60).replace(/-+$/, "").replace(/^[^a-z]+/, "");
86463
+ return slugSchema.safeParse(candidate).success ? candidate : randomManagedDocSlug();
86464
+ };
86461
86465
  var setPreprocess = (input) => input instanceof Set ? input : Array.isArray(input) ? new Set(input) : input;
86462
86466
  var setTransform = (set2) => Array.from(set2);
86463
86467
  var scalarSet = (zodSetType) => external_exports.preprocess(setPreprocess, zodSetType).transform(setTransform);
@@ -86635,7 +86639,7 @@ var samlStateSchema = external_exports.object({
86635
86639
  // Expiry
86636
86640
  expiresAt: external_exports.number()
86637
86641
  }).meta({ id: "saml-state" });
86638
- var ssoResourceSchema = external_exports.enum([...RegistryResourceTypes, "sync-project", "project", "publish"]).meta({ id: "sso-resource" });
86642
+ var ssoResourceSchema = external_exports.enum([...RegistryResourceTypes, "sync-project", "project", "publish", "mcp"]).meta({ id: "sso-resource" });
86639
86643
  var relayStateSchema = external_exports.object({
86640
86644
  /** Uniquely identifies a relay state */
86641
86645
  uid: nanoidSchema.default(nanoid3).meta({ default: "nanoid()" }),
@@ -86747,7 +86751,16 @@ var scalarRuleset = `extends: spectral:oas
86747
86751
  rules: {}`;
86748
86752
 
86749
86753
  // ../../packages/entities/dist/rule/schema.js
86750
- var ruleSchema = baseRegistrySchema.extend({}).meta({ id: "rule" });
86754
+ var blockPublishOnSchema = external_exports.enum([
86755
+ "error",
86756
+ "warning",
86757
+ "info",
86758
+ "hint",
86759
+ "none"
86760
+ ]);
86761
+ var ruleSchema = baseRegistrySchema.extend({
86762
+ blockPublishOn: blockPublishOnSchema.default("none")
86763
+ }).meta({ id: "rule" });
86751
86764
 
86752
86765
  // ../../packages/entities/dist/managed-doc/helpers.js
86753
86766
  function getLegacyWysiwygVersion(versions) {
@@ -86762,8 +86775,8 @@ function getLegacyWysiwygVersion(versions) {
86762
86775
  var embedStatuses = ["pending", "success", "failed"];
86763
86776
 
86764
86777
  // ../../packages/entities/dist/agent/docs.js
86765
- var docsProjectTypes = ["sync", "wysiwyg"];
86766
- var docsProjectSchema = zod_default.object({
86778
+ var docsProjectTypes = ["sync", "wysiwyg", "docs"];
86779
+ var agentDocsProjectSchema = zod_default.object({
86767
86780
  id: zod_default.string(),
86768
86781
  uid: zod_default.string(),
86769
86782
  name: zod_default.string(),
@@ -86776,7 +86789,7 @@ var docsProjectSchema = zod_default.object({
86776
86789
  agentEnabled: zod_default.boolean(),
86777
86790
  createdAt: zod_default.string(),
86778
86791
  updatedAt: zod_default.string()
86779
- }).meta({ id: "docs-project" });
86792
+ }).meta({ id: "agent-docs-project" });
86780
86793
  var docsPublishSchema = zod_default.object({
86781
86794
  id: zod_default.string(),
86782
86795
  uid: zod_default.string(),
@@ -86851,19 +86864,58 @@ var keyDocumentSchema = zod_default.object({
86851
86864
  }).meta({ id: "key-documents" });
86852
86865
 
86853
86866
  // ../../packages/entities/dist/agent/mcp.js
86867
+ var mcpServerVersionChangeSources = [
86868
+ "created",
86869
+ "migration",
86870
+ "user",
86871
+ "docs-publish",
86872
+ "track-latest",
86873
+ "track-current",
86874
+ "linked-resource-change"
86875
+ ];
86876
+ var mcpServerVersionStatuses = ["draft", "approved"];
86877
+ var mcpDocumentTrackModes = [
86878
+ "pinned",
86879
+ "track-latest",
86880
+ "track-current"
86881
+ ];
86882
+ var mcpDocsProjectTrackModes = [
86883
+ "pinned",
86884
+ "track-active-publish"
86885
+ ];
86886
+ var mcpServerToolModes = ["generic", "curated", "both"];
86854
86887
  var mcpServerSchema = external_exports.object({
86855
86888
  id: external_exports.string(),
86856
86889
  teamUid: external_exports.string(),
86857
86890
  name: external_exports.string(),
86891
+ slug: slugSchema,
86858
86892
  createdAt: external_exports.string(),
86859
86893
  updatedAt: external_exports.string()
86860
86894
  }).meta({ id: "mcp-server" });
86895
+ var mcpServerVersionSchema = external_exports.object({
86896
+ id: external_exports.string(),
86897
+ mcpServerId: external_exports.string(),
86898
+ semver: external_exports.string(),
86899
+ parentVersionId: external_exports.string().nullable(),
86900
+ changeSource: external_exports.enum(mcpServerVersionChangeSources),
86901
+ changeNote: external_exports.string().nullable(),
86902
+ newToolsSuggestionDismissed: external_exports.boolean(),
86903
+ createdByUserId: external_exports.string().nullable(),
86904
+ status: external_exports.enum(mcpServerVersionStatuses),
86905
+ approvedByUserId: external_exports.string().nullable(),
86906
+ approvedAt: external_exports.string().nullable(),
86907
+ createdAt: external_exports.string()
86908
+ }).meta({ id: "mcp-server-version" });
86861
86909
  var mcpServerOperationToolSchema = external_exports.object({
86862
86910
  id: external_exports.string(),
86863
86911
  mcpServerId: external_exports.string(),
86912
+ mcpServerVersionId: external_exports.string(),
86864
86913
  operationId: external_exports.string(),
86865
86914
  searchToolEnabled: external_exports.boolean(),
86866
86915
  executeRequestToolEnabled: external_exports.boolean(),
86916
+ curatedToolEnabled: external_exports.boolean(),
86917
+ name: external_exports.string().nullable(),
86918
+ description: external_exports.string().nullable(),
86867
86919
  createdAt: external_exports.string(),
86868
86920
  updatedAt: external_exports.string()
86869
86921
  }).meta({
@@ -86872,6 +86924,7 @@ var mcpServerOperationToolSchema = external_exports.object({
86872
86924
  var mcpServerDocsPageToolSchema = external_exports.object({
86873
86925
  id: external_exports.string(),
86874
86926
  mcpServerId: external_exports.string(),
86927
+ mcpServerVersionId: external_exports.string(),
86875
86928
  docsPageId: external_exports.string(),
86876
86929
  searchToolEnabled: external_exports.boolean(),
86877
86930
  executeRequestToolEnabled: external_exports.boolean(),
@@ -86883,7 +86936,10 @@ var mcpServerDocsPageToolSchema = external_exports.object({
86883
86936
  var mcpServerDocumentVersionSchema = external_exports.object({
86884
86937
  id: external_exports.string(),
86885
86938
  mcpServerId: external_exports.string(),
86939
+ mcpServerVersionId: external_exports.string(),
86886
86940
  versionId: external_exports.string(),
86941
+ trackMode: external_exports.enum(mcpDocumentTrackModes),
86942
+ toolMode: external_exports.enum(mcpServerToolModes),
86887
86943
  createdAt: external_exports.string()
86888
86944
  }).meta({
86889
86945
  id: "mcp-server-document-version"
@@ -86891,7 +86947,9 @@ var mcpServerDocumentVersionSchema = external_exports.object({
86891
86947
  var mcpServerDocsPublishSchema = external_exports.object({
86892
86948
  id: external_exports.string(),
86893
86949
  mcpServerId: external_exports.string(),
86950
+ mcpServerVersionId: external_exports.string(),
86894
86951
  docsPublishId: external_exports.string(),
86952
+ trackMode: external_exports.enum(mcpDocsProjectTrackModes),
86895
86953
  createdAt: external_exports.string()
86896
86954
  }).meta({
86897
86955
  id: "mcp-server-docs-publish"
@@ -86900,8 +86958,11 @@ var mcpInstallationSchema = external_exports.object({
86900
86958
  id: external_exports.string(),
86901
86959
  mcpServerId: external_exports.string(),
86902
86960
  name: external_exports.string(),
86961
+ slug: slugSchema,
86903
86962
  documentAuth: external_exports.record(external_exports.string(), external_exports.unknown()),
86904
- isPrivate: external_exports.boolean()
86963
+ isPrivate: external_exports.boolean(),
86964
+ accessGroups: external_exports.array(external_exports.string()).default([]),
86965
+ loginPortalUid: external_exports.string().nullable().default(null)
86905
86966
  }).meta({ id: "mcp-installation" });
86906
86967
 
86907
86968
  // ../../packages/entities/dist/agent/monthly-usage.js
@@ -86915,7 +86976,7 @@ var monthlyUsageSchema = zod_default.object({
86915
86976
  messages: zod_default.number()
86916
86977
  }).meta({ id: "monthly-usage" });
86917
86978
 
86918
- // ../../node_modules/.pnpm/@scalar+helpers@0.5.5/node_modules/@scalar/helpers/dist/http/http-methods.js
86979
+ // ../../node_modules/.pnpm/@scalar+helpers@0.6.0/node_modules/@scalar/helpers/dist/http/http-methods.js
86919
86980
  var HTTP_METHODS = ["delete", "get", "head", "options", "patch", "post", "put", "trace"];
86920
86981
  var httpMethods = Object.freeze(new Set(HTTP_METHODS));
86921
86982
 
@@ -86928,7 +86989,10 @@ var operationSchema = zod_default.object({
86928
86989
  versionId: zod_default.uuid(),
86929
86990
  embedding: zod_default.number().array(),
86930
86991
  searchToolEnabled: zod_default.boolean(),
86931
- executeRequestToolEnabled: zod_default.boolean()
86992
+ executeRequestToolEnabled: zod_default.boolean(),
86993
+ operationId: zod_default.string().nullable(),
86994
+ summary: zod_default.string().nullable(),
86995
+ description: zod_default.string().nullable()
86932
86996
  }).meta({ id: "operation" });
86933
86997
 
86934
86998
  // ../../packages/entities/dist/agent/version.js
@@ -87549,6 +87613,8 @@ var sharedProjectSchema = entitySchema.extend({
87549
87613
  isPrivate: external_exports.boolean().default(false),
87550
87614
  /** Toggle AI agent features for the docs project */
87551
87615
  agentEnabled: external_exports.boolean().default(false),
87616
+ /** Toggle analytics tracking for the docs project */
87617
+ analyticsEnabled: external_exports.boolean().default(true),
87552
87618
  /** Set of allowed access groups */
87553
87619
  accessGroups: scalarSet(external_exports.set(nanoidSchema).max(50)).default([])
87554
87620
  }).meta({ id: "shared-project" });
@@ -87609,6 +87675,59 @@ var githubProjectSchema = sharedProjectSchema.extend({
87609
87675
  */
87610
87676
  repository: githubProjectRepositorySchema.nullable().optional()
87611
87677
  }).meta({ id: "github-project" });
87678
+ var forgejoRepositorySchema = external_exports.object({
87679
+ provider: external_exports.literal("forgejo"),
87680
+ forgejoOwner: external_exports.string(),
87681
+ forgejoRepo: external_exports.string(),
87682
+ branch: external_exports.string().default("main"),
87683
+ configPath: external_exports.string().default("scalar.config.json")
87684
+ }).meta({ id: "docs-project-repository-forgejo" });
87685
+ var githubRepositorySchema = external_exports.object({
87686
+ provider: external_exports.literal("github"),
87687
+ linkedBy: external_exports.string(),
87688
+ installationId: external_exports.number().int(),
87689
+ id: external_exports.number().int(),
87690
+ /** `owner/repo` form from the GitHub API */
87691
+ name: external_exports.string().min(2),
87692
+ branch: external_exports.string().default("main"),
87693
+ configPath: external_exports.string().default(""),
87694
+ publishOnMerge: external_exports.boolean().default(true),
87695
+ publishPreviews: external_exports.boolean().default(false),
87696
+ prComments: external_exports.boolean().default(false),
87697
+ expired: external_exports.boolean().default(false)
87698
+ }).meta({ id: "docs-project-repository-github" });
87699
+ var bitbucketRepositorySchema = external_exports.object({
87700
+ provider: external_exports.literal("bitbucket"),
87701
+ linkedBy: external_exports.string(),
87702
+ workspaceUuid: external_exports.string(),
87703
+ workspaceSlug: external_exports.string(),
87704
+ repoUuid: external_exports.string(),
87705
+ repoSlug: external_exports.string(),
87706
+ /** `workspaceSlug/repoSlug` for display, mirrored from GitHub for symmetry */
87707
+ name: external_exports.string().min(2),
87708
+ branch: external_exports.string().default("main"),
87709
+ configPath: external_exports.string().default(""),
87710
+ publishOnMerge: external_exports.boolean().default(true),
87711
+ publishPreviews: external_exports.boolean().default(false),
87712
+ prComments: external_exports.boolean().default(false),
87713
+ expired: external_exports.boolean().default(false),
87714
+ /** UUID returned by Bitbucket on hook create. Stored so we can delete the webhook on unlink. */
87715
+ webhookUuid: external_exports.string().default("")
87716
+ }).meta({ id: "docs-project-repository-bitbucket" });
87717
+ var docsProjectRepositorySchema = external_exports.discriminatedUnion("provider", [
87718
+ forgejoRepositorySchema,
87719
+ githubRepositorySchema,
87720
+ bitbucketRepositorySchema
87721
+ ]);
87722
+ var docsProjectSchema = sharedProjectSchema.extend({
87723
+ slug: slugSchema,
87724
+ publishStatus: external_exports.string().default(""),
87725
+ publishMessage: external_exports.string().default(""),
87726
+ repository: docsProjectRepositorySchema
87727
+ }).meta({ id: "docs-project" });
87728
+ function isGithubBackedDocsProject(project) {
87729
+ return project.repository.provider === "github";
87730
+ }
87612
87731
 
87613
87732
  // ../../packages/entities/dist/project/publish.js
87614
87733
  var ConfigVersion;
@@ -87624,7 +87743,8 @@ var publishRecordSchema = entitySchema.extend({
87624
87743
  external_exports.literal("deployed"),
87625
87744
  external_exports.literal("inactive"),
87626
87745
  external_exports.literal("error"),
87627
- external_exports.literal("deleted")
87746
+ external_exports.literal("deleted"),
87747
+ external_exports.literal("cancelled")
87628
87748
  ]),
87629
87749
  deployedAt: external_exports.number().nullable().default(null),
87630
87750
  message: external_exports.string().default(""),
@@ -88241,6 +88361,9 @@ var FeatureFlag;
88241
88361
  FeatureFlag2["Export"] = "export";
88242
88362
  FeatureFlag2["DocsMCP"] = "docsMcp";
88243
88363
  FeatureFlag2["DisableApiSSR"] = "disableApiSSR";
88364
+ FeatureFlag2["UnifiedDocs"] = "unifiedDocs";
88365
+ FeatureFlag2["DocsAnalytics"] = "docsAnalytics";
88366
+ FeatureFlag2["McpAnalytics"] = "mcpAnalytics";
88244
88367
  })(FeatureFlag || (FeatureFlag = {}));
88245
88368
  var featureSchema = external_exports.boolean().optional().meta({ id: "feature" });
88246
88369
  var featureFlagSchema = external_exports.object({
@@ -88254,7 +88377,10 @@ var featureFlagSchema = external_exports.object({
88254
88377
  [FeatureFlag.MCP]: featureSchema,
88255
88378
  [FeatureFlag.Export]: featureSchema,
88256
88379
  [FeatureFlag.DocsMCP]: featureSchema,
88257
- [FeatureFlag.DisableApiSSR]: featureSchema
88380
+ [FeatureFlag.DisableApiSSR]: featureSchema,
88381
+ [FeatureFlag.UnifiedDocs]: featureSchema,
88382
+ [FeatureFlag.DocsAnalytics]: featureSchema,
88383
+ [FeatureFlag.McpAnalytics]: featureSchema
88258
88384
  }).meta({ id: "feature-flag" });
88259
88385
 
88260
88386
  // ../../packages/entities/dist/team/schema.js
@@ -88556,6 +88682,14 @@ var docsAgentTokenSchema = external_exports.object({
88556
88682
  exp: external_exports.number()
88557
88683
  }).meta({ id: "docs-agent-token" });
88558
88684
 
88685
+ // ../../packages/entities/dist/user/bitbucket.js
88686
+ var userBitbucketSchema = entitySchema.extend({
88687
+ token: zod_default.string(),
88688
+ refreshToken: zod_default.string(),
88689
+ expiry: timestampSchema,
88690
+ refreshExpiry: timestampSchema
88691
+ }).meta({ id: "user-bitbucket" });
88692
+
88559
88693
  // ../../packages/entities/dist/user/github.js
88560
88694
  var userGithubSchema = entitySchema.extend({
88561
88695
  token: zod_default.string(),
@@ -88609,7 +88743,10 @@ var userSchema = entitySchema.extend({
88609
88743
  email: emailSchema,
88610
88744
  teams: teamRefSchema.array(),
88611
88745
  activeTeamId: zod_default.string().nullable(),
88612
- hasGithub: zod_default.boolean().optional().default(false)
88746
+ hasGithub: zod_default.boolean().optional().default(false),
88747
+ hasBitbucket: zod_default.boolean().optional().default(false),
88748
+ /** Forgejo personal access token for git operations */
88749
+ forgejoToken: zod_default.string().optional()
88613
88750
  }).meta({ id: "user" });
88614
88751
 
88615
88752
  // ../../packages/entities/dist/user/ban.js
@@ -88811,6 +88948,7 @@ var BaseCollections = {
88811
88948
  Passwords: "passwords",
88812
88949
  SignupOtp: "signup-otp",
88813
88950
  GithubUsers: "github-users",
88951
+ BitbucketUsers: "bitbucket-users",
88814
88952
  RefreshTokens: "refresh-tokens",
88815
88953
  Teams: "team",
88816
88954
  Deploys: "deploys",
@@ -88818,6 +88956,7 @@ var BaseCollections = {
88818
88956
  SignupData: "signup-data",
88819
88957
  Projects: (teamUid) => `team/${teamUid}/projects`,
88820
88958
  GithubProjects: (teamUid) => `team/${teamUid}/projects-github`,
88959
+ DocsProjects: (teamUid) => `team/${teamUid}/docs`,
88821
88960
  Themes: (teamUid) => `team/${teamUid}/themes`,
88822
88961
  PublishRecords: (teamUid) => `team/${teamUid}/publish`,
88823
88962
  ManagedDocs: (teamUid) => `team/${teamUid}/managed-docs`,
@@ -88917,6 +89056,214 @@ function accessGroupsApiFactory(requestService) {
88917
89056
  };
88918
89057
  }
88919
89058
 
89059
+ // ../../packages/bigquery/dist/schemas.js
89060
+ var analyticsRangeSchema = external_exports.enum(["24h", "7d", "30d", "90d"]);
89061
+ var analyticsGranularitySchema = external_exports.enum(["hour", "day"]);
89062
+ var consumerTypeSchema = external_exports.enum(["human", "bot", "llm", "mcp"]);
89063
+ var timeseriesPointSchema = external_exports.object({
89064
+ bucket: external_exports.string(),
89065
+ human: external_exports.number().int().nonnegative(),
89066
+ bot: external_exports.number().int().nonnegative(),
89067
+ llm: external_exports.number().int().nonnegative(),
89068
+ mcp: external_exports.number().int().nonnegative(),
89069
+ unique: external_exports.number().int().nonnegative()
89070
+ });
89071
+ var overviewResultSchema = external_exports.object({
89072
+ totals: external_exports.object({
89073
+ views: external_exports.number().int().nonnegative(),
89074
+ unique: external_exports.number().int().nonnegative(),
89075
+ human: external_exports.number().int().nonnegative(),
89076
+ bot: external_exports.number().int().nonnegative(),
89077
+ llm: external_exports.number().int().nonnegative(),
89078
+ mcp: external_exports.number().int().nonnegative()
89079
+ }),
89080
+ timeseries: external_exports.array(timeseriesPointSchema)
89081
+ });
89082
+ var topPageSchema = external_exports.object({
89083
+ path: external_exports.string(),
89084
+ views: external_exports.number().int().nonnegative(),
89085
+ unique: external_exports.number().int().nonnegative()
89086
+ });
89087
+ var topPagesResultSchema = external_exports.object({
89088
+ pages: external_exports.array(topPageSchema)
89089
+ });
89090
+ var topReferrerSchema = external_exports.object({
89091
+ referrer: external_exports.string(),
89092
+ views: external_exports.number().int().nonnegative()
89093
+ });
89094
+ var topReferrersResultSchema = external_exports.object({
89095
+ referrers: external_exports.array(topReferrerSchema)
89096
+ });
89097
+ var consumersResultSchema = external_exports.object({
89098
+ totals: external_exports.object({
89099
+ human: external_exports.number().int().nonnegative(),
89100
+ bot: external_exports.number().int().nonnegative(),
89101
+ llm: external_exports.number().int().nonnegative(),
89102
+ mcp: external_exports.number().int().nonnegative()
89103
+ }),
89104
+ timeseries: external_exports.array(timeseriesPointSchema)
89105
+ });
89106
+ var mcpEventKindSchema = external_exports.enum([
89107
+ "session-start",
89108
+ "tool-called",
89109
+ "tools-list"
89110
+ ]);
89111
+ var mcpConsumerKindSchema = external_exports.enum([
89112
+ "oauth",
89113
+ "personal_token",
89114
+ "docs_agent_token",
89115
+ "anonymous"
89116
+ ]);
89117
+ var mcpToolKindSchema = external_exports.enum(["generic", "curated"]);
89118
+ var mcpToolCategorySchema = external_exports.enum(["openapi", "docs"]);
89119
+ var mcpExportDatasetSchema = external_exports.enum([
89120
+ "tools",
89121
+ "consumers",
89122
+ "timeseries"
89123
+ ]);
89124
+ var mcpAnalyticsParamsSchema = external_exports.object({
89125
+ range: analyticsRangeSchema.default("7d"),
89126
+ granularity: analyticsGranularitySchema.optional(),
89127
+ installationId: external_exports.string().optional(),
89128
+ clientName: external_exports.string().optional(),
89129
+ subjectId: external_exports.string().optional()
89130
+ });
89131
+ var mcpTimeseriesPointSchema = external_exports.object({
89132
+ bucket: external_exports.string(),
89133
+ calls: external_exports.number().int().nonnegative(),
89134
+ errors: external_exports.number().int().nonnegative(),
89135
+ p50_ms: external_exports.number().nonnegative(),
89136
+ p95_ms: external_exports.number().nonnegative(),
89137
+ unique_consumers: external_exports.number().int().nonnegative()
89138
+ });
89139
+ var mcpCategoryTotalsSchema = external_exports.object({
89140
+ openapi: external_exports.number().int().nonnegative(),
89141
+ docs: external_exports.number().int().nonnegative()
89142
+ });
89143
+ var mcpOverviewTotalsSchema = external_exports.object({
89144
+ calls: external_exports.number().int().nonnegative(),
89145
+ errors: external_exports.number().int().nonnegative(),
89146
+ unique_consumers: external_exports.number().int().nonnegative(),
89147
+ p50_ms: external_exports.number().nonnegative(),
89148
+ p95_ms: external_exports.number().nonnegative(),
89149
+ error_rate: external_exports.number().min(0).max(1)
89150
+ });
89151
+ var mcpOverviewResultSchema = external_exports.object({
89152
+ totals: mcpOverviewTotalsSchema,
89153
+ timeseries: external_exports.array(mcpTimeseriesPointSchema),
89154
+ byCategory: mcpCategoryTotalsSchema
89155
+ });
89156
+ var mcpToolStatSchema = external_exports.object({
89157
+ tool_name: external_exports.string(),
89158
+ tool_kind: mcpToolKindSchema,
89159
+ tool_category: mcpToolCategorySchema.nullable(),
89160
+ operation_id: external_exports.string().nullable(),
89161
+ calls: external_exports.number().int().nonnegative(),
89162
+ errors: external_exports.number().int().nonnegative(),
89163
+ p50_ms: external_exports.number().nonnegative(),
89164
+ p95_ms: external_exports.number().nonnegative(),
89165
+ error_rate: external_exports.number().min(0).max(1),
89166
+ unique_consumers: external_exports.number().int().nonnegative()
89167
+ });
89168
+ var mcpToolsResultSchema = external_exports.object({
89169
+ tools: external_exports.array(mcpToolStatSchema)
89170
+ });
89171
+ var mcpConsumerStatSchema = external_exports.object({
89172
+ subject_id: external_exports.string(),
89173
+ subject_label: external_exports.string(),
89174
+ client_name: external_exports.string(),
89175
+ consumer_kind: mcpConsumerKindSchema,
89176
+ calls: external_exports.number().int().nonnegative(),
89177
+ errors: external_exports.number().int().nonnegative(),
89178
+ first_seen: external_exports.string(),
89179
+ last_seen: external_exports.string(),
89180
+ top_tool: external_exports.string().nullable()
89181
+ });
89182
+ var mcpConsumersResultSchema = external_exports.object({
89183
+ consumers: external_exports.array(mcpConsumerStatSchema)
89184
+ });
89185
+ var mcpLatencyByToolEntrySchema = external_exports.object({
89186
+ tool_name: external_exports.string(),
89187
+ calls: external_exports.number().int().nonnegative(),
89188
+ p50_ms: external_exports.number().nonnegative(),
89189
+ p95_ms: external_exports.number().nonnegative()
89190
+ });
89191
+ var mcpLatencyResultSchema = external_exports.object({
89192
+ tools: external_exports.array(mcpLatencyByToolEntrySchema)
89193
+ });
89194
+ var mcpErrorEntrySchema = external_exports.object({
89195
+ error_code: external_exports.string(),
89196
+ count: external_exports.number().int().nonnegative()
89197
+ });
89198
+ var mcpErrorsResultSchema = external_exports.object({
89199
+ totals: external_exports.object({
89200
+ calls: external_exports.number().int().nonnegative(),
89201
+ errors: external_exports.number().int().nonnegative(),
89202
+ error_rate: external_exports.number().min(0).max(1)
89203
+ }),
89204
+ byCode: external_exports.array(mcpErrorEntrySchema)
89205
+ });
89206
+
89207
+ // ../../packages/service-api/dist/apis/analytics.js
89208
+ function buildQuery(params) {
89209
+ const search = new URLSearchParams();
89210
+ for (const [k, v] of Object.entries(params)) {
89211
+ if (v === void 0)
89212
+ continue;
89213
+ search.set(k, String(v));
89214
+ }
89215
+ const qs = search.toString();
89216
+ return qs ? `?${qs}` : "";
89217
+ }
89218
+ function analyticsApiFactory(requestService) {
89219
+ async function getOverview(projectUid, args = {}) {
89220
+ return requestService.request({
89221
+ url: `core/analytics/projects/${projectUid}/overview${buildQuery({
89222
+ range: args.range,
89223
+ granularity: args.granularity
89224
+ })}`,
89225
+ method: "get",
89226
+ schema: overviewResultSchema
89227
+ });
89228
+ }
89229
+ async function getPages(projectUid, args = {}) {
89230
+ return requestService.request({
89231
+ url: `core/analytics/projects/${projectUid}/pages${buildQuery({
89232
+ range: args.range,
89233
+ limit: args.limit
89234
+ })}`,
89235
+ method: "get",
89236
+ schema: topPagesResultSchema
89237
+ });
89238
+ }
89239
+ async function getReferrers(projectUid, args = {}) {
89240
+ return requestService.request({
89241
+ url: `core/analytics/projects/${projectUid}/referrers${buildQuery({
89242
+ range: args.range,
89243
+ limit: args.limit
89244
+ })}`,
89245
+ method: "get",
89246
+ schema: topReferrersResultSchema
89247
+ });
89248
+ }
89249
+ async function getConsumers(projectUid, args = {}) {
89250
+ return requestService.request({
89251
+ url: `core/analytics/projects/${projectUid}/consumers${buildQuery({
89252
+ range: args.range,
89253
+ granularity: args.granularity
89254
+ })}`,
89255
+ method: "get",
89256
+ schema: consumersResultSchema
89257
+ });
89258
+ }
89259
+ return {
89260
+ getOverview,
89261
+ getPages,
89262
+ getReferrers,
89263
+ getConsumers
89264
+ };
89265
+ }
89266
+
88920
89267
  // ../../packages/service-api/dist/apis/login-portals.js
88921
89268
  function loginPortalsApiFactory(requestService) {
88922
89269
  async function get(slug) {
@@ -89313,7 +89660,8 @@ function rulesApiFactory(requestService) {
89313
89660
  description: true,
89314
89661
  slug: true,
89315
89662
  namespace: true,
89316
- isPrivate: true
89663
+ isPrivate: true,
89664
+ blockPublishOn: true
89317
89665
  }).array()
89318
89666
  });
89319
89667
  }
@@ -89916,6 +90264,190 @@ function authApiFactory(requestService) {
89916
90264
  };
89917
90265
  }
89918
90266
 
90267
+ // ../../packages/service-api/dist/apis/bitbucket.js
90268
+ var bitbucketRepoSummarySchema = external_exports.object({
90269
+ uuid: external_exports.string(),
90270
+ slug: external_exports.string(),
90271
+ fullName: external_exports.string(),
90272
+ defaultBranch: external_exports.string(),
90273
+ isPrivate: external_exports.boolean(),
90274
+ workspaceUuid: external_exports.string(),
90275
+ workspaceSlug: external_exports.string()
90276
+ });
90277
+ var bitbucketWorkspaceSchema = external_exports.object({
90278
+ uuid: external_exports.string(),
90279
+ slug: external_exports.string(),
90280
+ name: external_exports.string(),
90281
+ iconUrl: external_exports.string().optional(),
90282
+ repos: bitbucketRepoSummarySchema.array()
90283
+ });
90284
+ function bitbucketApiFactory(requestService) {
90285
+ async function initiateLink(opts = {}) {
90286
+ const params = new URLSearchParams();
90287
+ if (opts.redirect)
90288
+ params.set("redirect", opts.redirect);
90289
+ const qs = params.toString() ? `?${params.toString()}` : "";
90290
+ return await requestService.request({
90291
+ url: `core/vcs/bitbucket/link/initiate${qs}`,
90292
+ method: "get",
90293
+ schema: external_exports.object({ url: external_exports.string() })
90294
+ });
90295
+ }
90296
+ async function getWorkspaces() {
90297
+ return await requestService.request({
90298
+ url: "core/vcs/bitbucket/workspaces",
90299
+ method: "get",
90300
+ schema: bitbucketWorkspaceSchema.array()
90301
+ });
90302
+ }
90303
+ async function listDocsProjectBitbucketBranches(uid, opts = {}) {
90304
+ const params = new URLSearchParams();
90305
+ if (opts.query)
90306
+ params.set("query", opts.query);
90307
+ if (opts.page !== void 0)
90308
+ params.set("page", String(opts.page));
90309
+ if (opts.perPage !== void 0)
90310
+ params.set("perPage", String(opts.perPage));
90311
+ const qs = params.toString() ? `?${params.toString()}` : "";
90312
+ return await requestService.request({
90313
+ url: `core/vcs/bitbucket/docs-project/${uid}/branches${qs}`,
90314
+ method: "get",
90315
+ schema: external_exports.object({
90316
+ branches: external_exports.object({
90317
+ name: external_exports.string(),
90318
+ isDefault: external_exports.boolean()
90319
+ }).array(),
90320
+ hasMore: external_exports.boolean()
90321
+ })
90322
+ });
90323
+ }
90324
+ async function disconnectAccount() {
90325
+ return await requestService.request({
90326
+ url: "core/vcs/bitbucket/disconnect-account",
90327
+ method: "post",
90328
+ schema: external_exports.object({ success: external_exports.literal(true) })
90329
+ });
90330
+ }
90331
+ return {
90332
+ initiateLink,
90333
+ getWorkspaces,
90334
+ listDocsProjectBitbucketBranches,
90335
+ disconnectAccount
90336
+ };
90337
+ }
90338
+
90339
+ // ../../packages/service-api/dist/apis/docs-project.js
90340
+ function docsProjectApiFactory(requestService) {
90341
+ async function createProject(data) {
90342
+ return await requestService.request({
90343
+ url: "core/docs-projects/create",
90344
+ method: "post",
90345
+ data,
90346
+ schema: docsProjectSchema
90347
+ });
90348
+ }
90349
+ async function deleteProject(projectUid) {
90350
+ return await requestService.request({
90351
+ url: "core/docs-projects/delete",
90352
+ method: "delete",
90353
+ data: { projectUid },
90354
+ schema: external_exports.null()
90355
+ });
90356
+ }
90357
+ async function getProject(slug) {
90358
+ return await requestService.request({
90359
+ url: `core/docs-projects/${slug}`,
90360
+ method: "get",
90361
+ schema: docsProjectSchema
90362
+ });
90363
+ }
90364
+ async function getGitCredentials() {
90365
+ return await requestService.request({
90366
+ url: "core/forgejo/git-credentials",
90367
+ method: "get",
90368
+ schema: external_exports.object({
90369
+ forgejoBaseUrl: external_exports.string(),
90370
+ forgejoToken: external_exports.string(),
90371
+ forgejoUsername: external_exports.string()
90372
+ })
90373
+ });
90374
+ }
90375
+ async function updateConfigPath(projectUid, configPath) {
90376
+ return await requestService.request({
90377
+ url: "core/docs-projects/update-config-path",
90378
+ method: "post",
90379
+ data: { projectUid, configPath },
90380
+ schema: external_exports.null()
90381
+ });
90382
+ }
90383
+ async function linkGithub(data) {
90384
+ return await requestService.request({
90385
+ url: `core/docs-projects/${data.projectUid}/link-github`,
90386
+ method: "post",
90387
+ data: { installationId: data.installationId, repoId: data.repoId },
90388
+ schema: external_exports.object({
90389
+ pullRequest: external_exports.object({
90390
+ url: external_exports.string(),
90391
+ number: external_exports.number().int(),
90392
+ branch: external_exports.string()
90393
+ }),
90394
+ project: docsProjectSchema
90395
+ })
90396
+ });
90397
+ }
90398
+ async function unlinkGithub(projectUid) {
90399
+ return await requestService.request({
90400
+ url: `core/docs-projects/${projectUid}/unlink-github`,
90401
+ method: "post",
90402
+ schema: external_exports.object({ project: docsProjectSchema })
90403
+ });
90404
+ }
90405
+ async function linkBitbucket(data) {
90406
+ return await requestService.request({
90407
+ url: `core/docs-projects/${data.projectUid}/link-bitbucket`,
90408
+ method: "post",
90409
+ data: {
90410
+ workspaceUuid: data.workspaceUuid,
90411
+ repoUuid: data.repoUuid
90412
+ },
90413
+ schema: external_exports.object({
90414
+ pullRequest: external_exports.object({
90415
+ url: external_exports.string(),
90416
+ number: external_exports.number().int(),
90417
+ branch: external_exports.string()
90418
+ }),
90419
+ project: docsProjectSchema
90420
+ })
90421
+ });
90422
+ }
90423
+ async function unlinkBitbucket(projectUid) {
90424
+ return await requestService.request({
90425
+ url: `core/docs-projects/${projectUid}/unlink-bitbucket`,
90426
+ method: "post",
90427
+ schema: external_exports.object({ project: docsProjectSchema })
90428
+ });
90429
+ }
90430
+ async function refreshBitbucketWebhook(projectUid) {
90431
+ return await requestService.request({
90432
+ url: `core/docs-projects/${projectUid}/bitbucket/refresh-webhook`,
90433
+ method: "post",
90434
+ schema: external_exports.object({ project: docsProjectSchema })
90435
+ });
90436
+ }
90437
+ return {
90438
+ createProject,
90439
+ deleteProject,
90440
+ getProject,
90441
+ getGitCredentials,
90442
+ updateConfigPath,
90443
+ linkGithub,
90444
+ unlinkGithub,
90445
+ linkBitbucket,
90446
+ unlinkBitbucket,
90447
+ refreshBitbucketWebhook
90448
+ };
90449
+ }
90450
+
89919
90451
  // ../../packages/service-api/dist/apis/feedback.js
89920
90452
  function feedbackApiFactory(requestService) {
89921
90453
  async function submit(email3, feedback) {
@@ -89936,9 +90468,13 @@ function feedbackApiFactory(requestService) {
89936
90468
 
89937
90469
  // ../../packages/service-api/dist/apis/github.js
89938
90470
  function githubApiFactory(requestService) {
89939
- async function initiateLink() {
90471
+ async function initiateLink(opts = {}) {
90472
+ const params = new URLSearchParams();
90473
+ if (opts.redirect)
90474
+ params.set("redirect", opts.redirect);
90475
+ const qs = params.toString() ? `?${params.toString()}` : "";
89940
90476
  return await requestService.request({
89941
- url: "core/github/link/initiate",
90477
+ url: `core/github/link/initiate${qs}`,
89942
90478
  method: "get",
89943
90479
  schema: external_exports.object({
89944
90480
  url: external_exports.string()
@@ -89981,6 +90517,60 @@ function githubApiFactory(requestService) {
89981
90517
  schema: external_exports.null()
89982
90518
  });
89983
90519
  }
90520
+ async function getDocsProjectGithubCommits(uid, opts = {}) {
90521
+ const params = new URLSearchParams();
90522
+ if (opts.branch)
90523
+ params.set("branch", opts.branch);
90524
+ if (opts.page !== void 0)
90525
+ params.set("page", String(opts.page));
90526
+ if (opts.perPage !== void 0)
90527
+ params.set("perPage", String(opts.perPage));
90528
+ const qs = params.toString() ? `?${params.toString()}` : "";
90529
+ return await requestService.request({
90530
+ url: `core/github/docs-project/${uid}/commits${qs}`,
90531
+ method: "get",
90532
+ schema: external_exports.object({
90533
+ sha: external_exports.string(),
90534
+ message: external_exports.string(),
90535
+ authorName: external_exports.string(),
90536
+ authorEmail: external_exports.string(),
90537
+ timestamp: external_exports.number()
90538
+ }).array()
90539
+ });
90540
+ }
90541
+ async function listDocsProjectGithubBranches(uid, opts = {}) {
90542
+ const params = new URLSearchParams();
90543
+ if (opts.query)
90544
+ params.set("query", opts.query);
90545
+ if (opts.page !== void 0)
90546
+ params.set("page", String(opts.page));
90547
+ if (opts.perPage !== void 0)
90548
+ params.set("perPage", String(opts.perPage));
90549
+ const qs = params.toString() ? `?${params.toString()}` : "";
90550
+ return await requestService.request({
90551
+ url: `core/github/docs-project/${uid}/branches${qs}`,
90552
+ method: "get",
90553
+ schema: external_exports.object({
90554
+ branches: external_exports.object({
90555
+ name: external_exports.string(),
90556
+ isDefault: external_exports.boolean()
90557
+ }).array(),
90558
+ hasMore: external_exports.boolean()
90559
+ })
90560
+ });
90561
+ }
90562
+ async function createDocsProjectGithubPullRequest(uid, data) {
90563
+ return await requestService.request({
90564
+ url: `core/github/docs-project/${uid}/pull-request`,
90565
+ method: "post",
90566
+ data,
90567
+ schema: external_exports.object({
90568
+ url: external_exports.string(),
90569
+ number: external_exports.number(),
90570
+ alreadyExists: external_exports.boolean()
90571
+ })
90572
+ });
90573
+ }
89984
90574
  async function publishRepo(githubProjectId) {
89985
90575
  return await requestService.request({
89986
90576
  url: "core/publish/github",
@@ -90050,6 +90640,13 @@ function githubApiFactory(requestService) {
90050
90640
  })
90051
90641
  });
90052
90642
  }
90643
+ async function disconnectAccount() {
90644
+ return await requestService.request({
90645
+ url: "core/vcs/github/disconnect-account",
90646
+ method: "post",
90647
+ schema: external_exports.object({ success: external_exports.literal(true) })
90648
+ });
90649
+ }
90053
90650
  async function validateConfigFile(uid, configPath) {
90054
90651
  return await requestService.request({
90055
90652
  url: "core/github/config/validate",
@@ -90077,6 +90674,9 @@ function githubApiFactory(requestService) {
90077
90674
  getRepos,
90078
90675
  linkRepo,
90079
90676
  unlinkRepo,
90677
+ getDocsProjectGithubCommits,
90678
+ listDocsProjectGithubBranches,
90679
+ createDocsProjectGithubPullRequest,
90080
90680
  publishRepo,
90081
90681
  getRepoInfo,
90082
90682
  checkSlug,
@@ -90085,7 +90685,8 @@ function githubApiFactory(requestService) {
90085
90685
  deleteProject,
90086
90686
  validateConfigFile,
90087
90687
  getProject,
90088
- getProjects
90688
+ getProjects,
90689
+ disconnectAccount
90089
90690
  };
90090
90691
  }
90091
90692
 
@@ -90265,6 +90866,19 @@ function publishApiFactory(requestService) {
90265
90866
  schema: external_exports.object({ publishUid: nanoidSchema })
90266
90867
  });
90267
90868
  }
90869
+ async function publishDocsProject({ slug, configPath, preview, commitSha }) {
90870
+ return await requestService.request({
90871
+ url: "publish-deploy/publish/docs-project",
90872
+ method: "post",
90873
+ data: {
90874
+ slug,
90875
+ configPath,
90876
+ preview,
90877
+ commitSha
90878
+ },
90879
+ schema: external_exports.object({ publishUid: nanoidSchema })
90880
+ });
90881
+ }
90268
90882
  async function publishWysiwyg(uid) {
90269
90883
  return await requestService.request({
90270
90884
  url: "publish-deploy/publish/wysiwyg",
@@ -90323,6 +90937,16 @@ function publishApiFactory(requestService) {
90323
90937
  schema: external_exports.null()
90324
90938
  });
90325
90939
  }
90940
+ async function cancelPublish(publishUid) {
90941
+ return await requestService.request({
90942
+ url: "core/publish/cancel",
90943
+ method: "post",
90944
+ data: {
90945
+ publishUid
90946
+ },
90947
+ schema: external_exports.null()
90948
+ });
90949
+ }
90326
90950
  async function deleteRecord(publishUid) {
90327
90951
  return await requestService.request({
90328
90952
  url: "core/publish",
@@ -90404,6 +91028,7 @@ function publishApiFactory(requestService) {
90404
91028
  }
90405
91029
  return {
90406
91030
  publishCli,
91031
+ publishDocsProject,
90407
91032
  publishGithub: publishGithub2,
90408
91033
  publishTemplate,
90409
91034
  publishWysiwyg,
@@ -90412,6 +91037,7 @@ function publishApiFactory(requestService) {
90412
91037
  unpublish,
90413
91038
  deleteRecord,
90414
91039
  redeploy,
91040
+ cancelPublish,
90415
91041
  bulkDelete,
90416
91042
  getPublishLogs,
90417
91043
  getDomainAvailability,
@@ -90780,8 +91406,10 @@ var apiServiceFactory = (baseUrl, getAuthToken, getNewTokens) => {
90780
91406
  hocuspocus: hocuspocusApiFactory(requestService),
90781
91407
  publish: publishApiFactory(requestService),
90782
91408
  github: githubApiFactory(requestService),
91409
+ bitbucket: bitbucketApiFactory(requestService),
90783
91410
  signup: signupApiFactory(requestService),
90784
91411
  project: projectApiFactory(requestService),
91412
+ docsProject: docsProjectApiFactory(requestService),
90785
91413
  managedDocs: managedDocsApiFactory(requestService),
90786
91414
  managedSchemas: managedSchemasApiFactory(requestService),
90787
91415
  rules: rulesApiFactory(requestService),
@@ -90790,7 +91418,8 @@ var apiServiceFactory = (baseUrl, getAuthToken, getNewTokens) => {
90790
91418
  loginPortals: loginPortalsApiFactory(requestService),
90791
91419
  sdks: sdksApiFactory(requestService),
90792
91420
  waitlist: waitlistApiFactory(requestService),
90793
- workspace: workspaceApiFactory(requestService)
91421
+ workspace: workspaceApiFactory(requestService),
91422
+ analytics: analyticsApiFactory(requestService)
90794
91423
  };
90795
91424
  };
90796
91425
 
@@ -90811,7 +91440,7 @@ var config2 = {
90811
91440
  }
90812
91441
  },
90813
91442
  cdnUrl: process.env.CDN_URL ?? "https://cdn.scalar.com",
90814
- ssgDocsIsolateVersion: process.env.SSG_DOCS_ISOLATE_VERSION ?? "1.4.0"
91443
+ ssgDocsIsolateVersion: process.env.SSG_DOCS_ISOLATE_VERSION ?? "1.4.1"
90815
91444
  };
90816
91445
 
90817
91446
  // src/domains/auth/login/helpers/personal-token-generate-access.ts
@@ -90975,7 +91604,7 @@ var setMetadata = async (metadata) => {
90975
91604
  JSON.stringify({ ...currentMetadata, ...metadata })
90976
91605
  );
90977
91606
  };
90978
- var fileExists = async (path12) => !!await fs.stat(path12).catch(() => false);
91607
+ var fileExists = async (path13) => !!await fs.stat(path13).catch(() => false);
90979
91608
  var getMetadata = async () => {
90980
91609
  const metadata = await fileExists(METADATA_FILE_PATH) ? await fs.readFile(METADATA_FILE_PATH, { encoding: "utf-8" }) : "{}";
90981
91610
  try {
@@ -91615,7 +92244,7 @@ var printSpecificationBanner = (result) => {
91615
92244
  }
91616
92245
  const pathsCount = Object.keys(schema.paths ?? {}).length;
91617
92246
  const operationsCount = Object.values(schema.paths ?? {}).reduce(
91618
- (acc, path12) => acc + Object.keys(path12).length,
92247
+ (acc, path13) => acc + Object.keys(path13).length,
91619
92248
  0
91620
92249
  );
91621
92250
  output.info().title(
@@ -91754,8 +92383,8 @@ function BundleCommand() {
91754
92383
  }
91755
92384
 
91756
92385
  // src/domains/registry/helpers/links.ts
91757
- function registryUrl(path12) {
91758
- return `${config2.projects.registry}/${path12}`;
92386
+ function registryUrl(path13) {
92387
+ return `${config2.projects.registry}/${path13}`;
91759
92388
  }
91760
92389
 
91761
92390
  // src/domains/schema/helpers/links.ts
@@ -92605,16 +93234,16 @@ import { Command as Command17 } from "commander";
92605
93234
  import { join, normalize as normalize2 } from "@scalar/openapi-parser";
92606
93235
 
92607
93236
  // src/domains/document/join/helpers.ts
92608
- var getValueByPath = (input, path12) => {
92609
- return path12.reduce((acc, segment) => {
93237
+ var getValueByPath = (input, path13) => {
93238
+ return path13.reduce((acc, segment) => {
92610
93239
  if (acc && typeof acc === "object" && acc !== null && segment in acc) {
92611
93240
  return acc[segment];
92612
93241
  }
92613
93242
  return void 0;
92614
93243
  }, input);
92615
93244
  };
92616
- var getPrefixes = (documents, path12) => {
92617
- const segments = path12.split(".");
93245
+ var getPrefixes = (documents, path13) => {
93246
+ const segments = path13.split(".");
92618
93247
  return documents.map((doc) => {
92619
93248
  const value = getValueByPath(doc, segments);
92620
93249
  if (value === void 0) {
@@ -92925,16 +93554,16 @@ var printAvailablePaths = (specification) => {
92925
93554
  if (specification?.paths === void 0 || Object.keys(specification?.paths).length === 0) {
92926
93555
  output.warn().title(as17.grey("Could not find any paths in the OpenAPI file.")).print();
92927
93556
  }
92928
- for (const path12 in specification?.paths ?? []) {
92929
- if (specification?.paths?.[path12] === void 0) {
93557
+ for (const path13 in specification?.paths ?? []) {
93558
+ if (specification?.paths?.[path13] === void 0) {
92930
93559
  continue;
92931
93560
  }
92932
- for (const method in specification.paths[path12]) {
92933
- if (specification.paths[path12][method] === void 0) {
93561
+ for (const method in specification.paths[path13]) {
93562
+ if (specification.paths[path13][method] === void 0) {
92934
93563
  continue;
92935
93564
  }
92936
93565
  output.info().line(
92937
- `${as17[getMethodColor(method)].bold(method.toUpperCase().padEnd(6))} ${as17.grey(`${path12}`)}`
93566
+ `${as17[getMethodColor(method)].bold(method.toUpperCase().padEnd(6))} ${as17.grey(`${path13}`)}`
92938
93567
  ).print();
92939
93568
  }
92940
93569
  }
@@ -93425,12 +94054,12 @@ documentCommands.forEach((command) => documentDomain.addCommand(command()));
93425
94054
  var document_default = documentDomain;
93426
94055
 
93427
94056
  // src/domains/project/index.ts
93428
- import { Command as Command36 } from "commander";
94057
+ import { Command as Command37 } from "commander";
93429
94058
 
93430
94059
  // src/domains/project/preview/index.ts
93431
94060
  import { text as text4 } from "@clack/prompts";
93432
94061
  import as27 from "ansis";
93433
- import { Command as Command31 } from "commander";
94062
+ import { Command as Command32 } from "commander";
93434
94063
 
93435
94064
  // src/domains/project/check-config/index.ts
93436
94065
  import fs12 from "node:fs";
@@ -93794,7 +94423,7 @@ var internalLinkNavigationEntrySchema = linkNavigationEntrySchema.extend({
93794
94423
  uid: nanoidSchema
93795
94424
  });
93796
94425
 
93797
- // ../../node_modules/.pnpm/@scalar+types@0.9.5/node_modules/@scalar/types/dist/api-reference/api-client-plugin.js
94426
+ // ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/api-client-plugin.js
93798
94427
  var sectionViewSchema = external_exports.object({
93799
94428
  title: external_exports.string().optional(),
93800
94429
  // Since this is meant to be a Vue component, we'll use unknown
@@ -93826,7 +94455,7 @@ var apiClientPluginSchema = external_exports.function({
93826
94455
  })
93827
94456
  });
93828
94457
 
93829
- // ../../node_modules/.pnpm/@scalar+types@0.9.5/node_modules/@scalar/types/dist/api-reference/base-configuration.js
94458
+ // ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/base-configuration.js
93830
94459
  var externalUrlsSchema = zod_default.object({
93831
94460
  dashboardUrl: zod_default.string().prefault("https://dashboard.scalar.com"),
93832
94461
  registryUrl: zod_default.string().prefault("https://registry.scalar.com"),
@@ -93982,7 +94611,7 @@ var baseConfigurationSchema = zod_default.object({
93982
94611
  externalUrls: externalUrlsSchema.prefault({})
93983
94612
  });
93984
94613
 
93985
- // ../../node_modules/.pnpm/@scalar+types@0.9.5/node_modules/@scalar/types/dist/api-reference/source-configuration.js
94614
+ // ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/source-configuration.js
93986
94615
  var sourceConfigurationSchema = zod_default.object({
93987
94616
  default: zod_default.boolean().default(false).optional().catch(false),
93988
94617
  /**
@@ -94079,10 +94708,10 @@ var sourceConfigurationSchema = zod_default.object({
94079
94708
  }).optional()
94080
94709
  });
94081
94710
 
94082
- // ../../node_modules/.pnpm/@scalar+types@0.9.5/node_modules/@scalar/types/dist/api-reference/api-client-configuration.js
94711
+ // ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/api-client-configuration.js
94083
94712
  var apiClientConfigurationSchema = baseConfigurationSchema.extend(sourceConfigurationSchema.shape);
94084
94713
 
94085
- // ../../node_modules/.pnpm/@scalar+types@0.9.5/node_modules/@scalar/types/dist/api-reference/api-reference-plugin.js
94714
+ // ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/api-reference-plugin.js
94086
94715
  var openApiExtensionSchema = external_exports.object({
94087
94716
  /**
94088
94717
  * Name of specification extension property. Has to start with `x-`.
@@ -94155,7 +94784,7 @@ var apiReferencePluginSchema = external_exports.function({
94155
94784
  })
94156
94785
  });
94157
94786
 
94158
- // ../../node_modules/.pnpm/@scalar+types@0.9.5/node_modules/@scalar/types/dist/api-reference/api-reference-configuration.js
94787
+ // ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/api-reference-configuration.js
94159
94788
  var fetchLikeSchema = external_exports.custom();
94160
94789
  var apiReferenceConfigurationSchema = baseConfigurationSchema.extend({
94161
94790
  /**
@@ -94509,7 +95138,7 @@ var apiReferenceConfigurationWithSourceSchema = apiReferenceConfigurationSchema.
94509
95138
  return configuration;
94510
95139
  });
94511
95140
 
94512
- // ../../node_modules/.pnpm/@scalar+types@0.9.5/node_modules/@scalar/types/dist/api-reference/html-rendering-configuration.js
95141
+ // ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/api-reference/html-rendering-configuration.js
94513
95142
  var htmlRenderingConfigurationSchema = external_exports.object({
94514
95143
  /**
94515
95144
  * The URL to the Scalar API Reference JS CDN.
@@ -94527,7 +95156,7 @@ var htmlRenderingConfigurationSchema = external_exports.object({
94527
95156
  pageTitle: external_exports.string().optional().default("Scalar API Reference")
94528
95157
  });
94529
95158
 
94530
- // ../../node_modules/.pnpm/@scalar+types@0.9.5/node_modules/@scalar/types/dist/legacy/reference-config.js
95159
+ // ../../node_modules/.pnpm/@scalar+types@0.9.6/node_modules/@scalar/types/dist/legacy/reference-config.js
94531
95160
  var XScalarStability;
94532
95161
  (function(XScalarStability2) {
94533
95162
  XScalarStability2["Deprecated"] = "deprecated";
@@ -94535,6 +95164,17 @@ var XScalarStability;
94535
95164
  XScalarStability2["Stable"] = "stable";
94536
95165
  })(XScalarStability || (XScalarStability = {}));
94537
95166
 
95167
+ // ../../packages/scalar-config/dist/schema/ruleset.js
95168
+ var blockPublishOnSchema2 = external_exports.enum(["error", "warning", "info", "hint", "none"]).describe("Severity threshold at or above which ruleset findings block publishing.");
95169
+ var rulesetConfigSchema = external_exports.object({
95170
+ filepath: external_exports.string().optional().describe("Relative path to the Spectral ruleset file with respect to the configuration root."),
95171
+ slug: external_exports.string().optional().describe("Slug of the ruleset in the team registry."),
95172
+ namespace: external_exports.string().optional().describe("Namespace of the ruleset in the team registry."),
95173
+ version: external_exports.string().optional().describe("Version of the ruleset in the team registry."),
95174
+ disableSync: external_exports.boolean().optional().describe("When `filepath` is set alongside registry coordinates, skip auto-publishing the ruleset to the team registry on docs publish."),
95175
+ blockPublishOn: blockPublishOnSchema2.optional().describe("Override the registry ruleset policy for this scope. Falls back to the registry ruleset record when omitted.")
95176
+ });
95177
+
94538
95178
  // ../../packages/scalar-config/dist/schema/navigation/openapi.js
94539
95179
  var scopedApiConfigSchema = apiReferenceConfigurationSchema.pick({
94540
95180
  authentication: true,
@@ -94567,26 +95207,27 @@ var openapiNavigationEntryBase = external_exports.object({
94567
95207
  /** Optional Scalar API reference configuration for the OpenAPI file. */
94568
95208
  config: scopedApiConfigSchema.optional().describe("Optional Scalar API reference configuration for the OpenAPI file."),
94569
95209
  singlePage: external_exports.boolean().default(false).describe("Render Scalar references in a single scrollable page. Navigation uses # fragments."),
94570
- showInSidebar: external_exports.boolean().default(true)
95210
+ showInSidebar: external_exports.boolean().default(true),
95211
+ /** Optional initial open state of the group in the sidebar. Note: This only applies if the mode is `folder`. */
95212
+ open: external_exports.boolean().optional().describe("Optional initial open state of the group in the sidebar. Note: This only applies if the mode is `folder`.")
94571
95213
  });
94572
- var openapiNavigationEntryPathSchema = openapiNavigationEntryBase.extend({
94573
- /** Relative path to the OpenAPI file with respect to the configuration root. */
94574
- filepath: external_exports.string().describe("Relative path to the OpenAPI file with respect to the configuration root.")
94575
- }).describe("Local OpenAPI file.");
94576
- var openapiNavigationEntryRegistrySchema = openapiNavigationEntryBase.extend({
94577
- /** The slug of the OpenAPI file in the registry. */
94578
- slug: external_exports.string(),
94579
- /** The namespace of the OpenAPI file in the registry. */
94580
- namespace: external_exports.string(),
94581
- /** The version of the OpenAPI file in the registry. */
94582
- version: external_exports.string()
94583
- }).describe("OpenAPI file from a registry.");
95214
+ var openapiNavigationEntryPathBase = openapiNavigationEntryBase.extend({
95215
+ filepath: external_exports.string().optional().describe("Relative path to the OpenAPI file with respect to the configuration root."),
95216
+ slug: external_exports.string().optional().describe("The slug of the OpenAPI file in the registry."),
95217
+ namespace: external_exports.string().optional().describe("The namespace of the OpenAPI file in the registry."),
95218
+ version: external_exports.string().optional().describe("The version of the OpenAPI file in the registry."),
95219
+ disableSync: external_exports.boolean().optional().describe("When `filepath` is set, skip auto-publishing the spec to the Registry on docs publish."),
95220
+ ruleset: rulesetConfigSchema.optional().describe("Spectral ruleset and publish policy for this route. Overrides the project-level ruleset on a per-key basis.")
95221
+ });
95222
+ var hasOpenapiSource = (data) => !!data.filepath || !!data.slug && !!data.namespace && !!data.version;
95223
+ var openapiNavigationEntryPathSchema = openapiNavigationEntryPathBase.refine(hasOpenapiSource, {
95224
+ message: "OpenAPI route must have either `filepath`, or all of `namespace`, `slug`, and `version`."
95225
+ }).describe("Local OpenAPI file with optional Registry coordinates for auto-publish.");
94584
95226
  var openapiNavigationEntryLiveLinkSchema = openapiNavigationEntryBase.extend({
94585
95227
  url: external_exports.string()
94586
95228
  }).describe("Live OpenAPI file from a URL. Fetched on each page load");
94587
95229
  var openapiNavigationEntrySchema = external_exports.union([
94588
95230
  openapiNavigationEntryPathSchema,
94589
- openapiNavigationEntryRegistrySchema,
94590
95231
  openapiNavigationEntryLiveLinkSchema
94591
95232
  ]);
94592
95233
  var baseInternalOpenapiSchema = external_exports.object({
@@ -94601,8 +95242,13 @@ var baseInternalOpenapiSchema = external_exports.object({
94601
95242
  title: external_exports.string(),
94602
95243
  description: external_exports.string()
94603
95244
  });
94604
- var internalOpenapiNavigationEntryPathSchema = openapiNavigationEntryPathSchema.extend(baseInternalOpenapiSchema.shape);
94605
- var internalOpenapiNavigationEntryRegistrySchema = openapiNavigationEntryRegistrySchema.extend({
95245
+ var internalOpenapiNavigationEntryPathSchema = openapiNavigationEntryPathBase.extend({
95246
+ filepath: external_exports.string()
95247
+ }).extend(baseInternalOpenapiSchema.shape);
95248
+ var internalOpenapiNavigationEntryRegistrySchema = openapiNavigationEntryBase.extend({
95249
+ slug: external_exports.string(),
95250
+ namespace: external_exports.string(),
95251
+ version: external_exports.string(),
94606
95252
  apiVersion: external_exports.string()
94607
95253
  }).extend(baseInternalOpenapiSchema.shape);
94608
95254
  var internalOpenapiNavigationEntryLiveLinkSchema = openapiNavigationEntryLiveLinkSchema.extend(baseInternalOpenapiSchema.shape);
@@ -94636,7 +95282,9 @@ var pageFrontmatterSchema = external_exports.object({
94636
95282
  }).optional().describe("Search bar configuration")
94637
95283
  }).optional().describe("Optional layout options for the page. This will override the global layout options."),
94638
95284
  /** Optional head options (meta, scripts, etc-). */
94639
- head: headSchema.optional()
95285
+ head: headSchema.optional(),
95286
+ /** Cover photo URL rendered as a banner above the page content. */
95287
+ backgroundImage: external_exports.string().optional().describe("Cover photo URL rendered as a banner above the page content.")
94640
95288
  });
94641
95289
  var basePageNavigationEntrySchema = pageFrontmatterSchema.extend({
94642
95290
  type: external_exports.literal("page"),
@@ -94877,6 +95525,10 @@ var siteConfigSchema = external_exports.object({
94877
95525
  /** The subdomain prefix of the site. Will be used to publish to <subdomain>.apidocumentation.com. This must be unique on the Scalar platform. */
94878
95526
  subdomain: external_exports.string().optional().describe("The subdomain prefix of the site. Will be used to publish to <subdomain>.apidocumentation.com. This must be unique on the Scalar platform."),
94879
95527
  subpath: pathSchema.optional().describe("The subpath of the site, e.g. /docs. All routes will be resolved against the subpath"),
95528
+ /** Whether the published site is private. Access is controlled via accessGroups and loginPortal. */
95529
+ isPrivate: external_exports.boolean().optional().describe("Whether the published site is private. Access is controlled via accessGroups and loginPortal."),
95530
+ /** Slugs of access groups (defined in the dashboard) permitted to view the site when isPrivate is true. */
95531
+ accessGroups: slugSchema.array().max(50).optional().describe("Slugs of access groups permitted to view the site when isPrivate is true."),
94880
95532
  /** The login portal slug for the site. References a created login portal from dashboard.scalar.com */
94881
95533
  loginPortal: slugSchema.optional(),
94882
95534
  /** Global layout options to hide/show select elements */
@@ -94890,16 +95542,16 @@ var siteConfigSchema = external_exports.object({
94890
95542
  enabled: external_exports.boolean().optional().describe("Enable or disable search globally")
94891
95543
  }).optional().describe("Search bar configuration"),
94892
95544
  sidebar: external_exports.object({
95545
+ enabled: external_exports.boolean().optional().describe("Show or hide the sidebar globally"),
94893
95546
  navPosition: external_exports.enum(["top", "bottom"]).optional().describe("Top level sidebar nav item positioning")
94894
95547
  }).optional()
94895
95548
  }).optional().describe("Global layout options to hide/show select elements"),
94896
- /** Slug for a platform defined theme */
94897
- theme: external_exports.string().optional().describe("Slug for a platform defined theme"),
95549
+ /** Slug for a platform defined theme, or a relative path to a local .css file (must end with .css). */
95550
+ theme: external_exports.string().optional().describe("Slug for a platform-defined theme, or a relative path to a local .css file (must end with .css)."),
94898
95551
  /** Site logo shown in the header. Can be single URL or an object with a URL for dark and light mode */
94899
95552
  logo: logoSchema2.optional().describe("Site logo shown in the header. Can be single URL or an object with a URL for dark and light mode"),
94900
95553
  /** Footer content. Can be a filepath to an HTML file, or raw HTML and CSS. */
94901
95554
  footer: external_exports.object({
94902
- belowSidebar: external_exports.boolean().optional().describe("Layout option to control if the footer pushes under the sidebar"),
94903
95555
  filepath: external_exports.string().endsWith(".html", 'The footer filepath must point to a ".html" file.').describe("File path to the footer HTML file")
94904
95556
  }).optional(),
94905
95557
  /** Routing options for the site */
@@ -94913,9 +95565,18 @@ var siteConfigSchema = external_exports.object({
94913
95565
  }).optional().describe("Customize light/dark mode color scheme and toggle preferences."),
94914
95566
  /** Ask AI agent configuration */
94915
95567
  agent: external_exports.object({
95568
+ enabled: external_exports.boolean().optional().describe("Whether the Ask AI button is shown on the site."),
94916
95569
  buttonText: external_exports.string().optional().describe('Label shown on the Ask AI button. Defaults to "Ask AI".'),
94917
- sidebarPosition: external_exports.enum(["below-search", "default"]).optional().describe('Placement of the Ask AI button in the sidebar. "default" renders it next to the search bar; "below-search" renders it on its own row beneath the search bar.')
94918
- }).optional().describe("Ask AI agent configuration")
95570
+ sidebarPosition: external_exports.enum(["below-search", "default"]).optional().describe('Placement of the Ask AI button in the sidebar. "default" renders it next to the search bar; "below-search" renders it on its own row beneath the search bar.'),
95571
+ mcp: external_exports.object({
95572
+ serverSlug: slugSchema.optional().describe("Slug of the MCP server (scoped to the team)."),
95573
+ installationSlug: slugSchema.optional().describe("Slug of the MCP installation (scoped to the MCP server).")
95574
+ }).optional().describe("References an MCP server + installation by slug. Resolved on publish to bind the docs project to a configured MCP.")
95575
+ }).optional().describe("Ask AI agent configuration"),
95576
+ /** Analytics tracking preferences for the site */
95577
+ analytics: external_exports.object({
95578
+ cookieBanner: external_exports.boolean().optional().describe("Show an opt-in cookie consent banner before tracking. Required for GDPR-compliant deployments.")
95579
+ }).optional().describe("Analytics tracking preferences for the site")
94919
95580
  }).default({});
94920
95581
 
94921
95582
  // ../../packages/scalar-config/dist/schema/schema.js
@@ -94941,6 +95602,7 @@ var baseScalarConfigSchema = external_exports.object({
94941
95602
  /** Whether to insert an H1 with Title and Description at top of each guide page, or not. Deprecated. */
94942
95603
  insertPageTitles: external_exports.boolean().optional().describe("Whether to insert an H1 with Title and Description at top of each guide page, or not. Deprecated. Write the title and description in the markdown instead."),
94943
95604
  assetsDir: external_exports.string().optional().describe("Specify an assets folder to serve custom assets such as media files. These are served globally from the root path, e.g. /picture.png"),
95605
+ ruleset: rulesetConfigSchema.optional().describe("Default Spectral ruleset and publish policy applied to every OpenAPI route. Per-route ruleset config overrides individual keys."),
94944
95606
  siteConfig: siteConfigSchema
94945
95607
  });
94946
95608
  var externalScalarConfigSchema = baseScalarConfigSchema.extend({
@@ -95003,7 +95665,8 @@ function createError(code, detail) {
95003
95665
  }
95004
95666
 
95005
95667
  // ../../packages/scalar-config/dist/resolvers/resolve-config.js
95006
- import { nanoid as nanoid5 } from "nanoid";
95668
+ import { customAlphabet as customAlphabet2 } from "nanoid";
95669
+ var slugSafeNanoid = customAlphabet2("0123456789abcdefghijklmnopqrstuvwxyz", 40);
95007
95670
 
95008
95671
  // ../../node_modules/.pnpm/vue@3.5.33_typescript@6.0.2/node_modules/vue/index.mjs
95009
95672
  var vue_exports = {};
@@ -95011,11 +95674,11 @@ __reExport(vue_exports, __toESM(require_vue(), 1));
95011
95674
 
95012
95675
  // ../../packages/scalar-config/dist/transformers/helpers.js
95013
95676
  import { parse as parse4 } from "node:path";
95014
- function createUrlSlug({ name: name2, path: path12 }) {
95677
+ function createUrlSlug({ name: name2, path: path13 }) {
95015
95678
  if (name2)
95016
95679
  return `/${slugify3(name2)}`;
95017
- if (path12)
95018
- return `/${slugify3(parse4(path12).name)}`;
95680
+ if (path13)
95681
+ return `/${slugify3(parse4(path13).name)}`;
95019
95682
  return `/${slugify3(randomSlug({ words: 2 }))}`;
95020
95683
  }
95021
95684
 
@@ -95171,8 +95834,8 @@ var legacyTo2_0_0 = (config3) => {
95171
95834
  });
95172
95835
  }
95173
95836
  }
95174
- const cssStyles = config3.siteConfig.cssFiles?.map((path12) => ({
95175
- path: path12
95837
+ const cssStyles = config3.siteConfig.cssFiles?.map((path13) => ({
95838
+ path: path13
95176
95839
  })) ?? [];
95177
95840
  const legacyThemePath = "theme.css";
95178
95841
  if (config3.siteConfig.cssString) {
@@ -95225,11 +95888,12 @@ var legacyTo2_0_0 = (config3) => {
95225
95888
  siteConfig: {
95226
95889
  customDomain: config3.customDomain,
95227
95890
  subdomain: config3.subdomain,
95891
+ isPrivate: config3.isPrivate,
95892
+ accessGroups: config3.accessGroups,
95228
95893
  loginPortal: config3.loginPortal,
95229
95894
  ...config3.siteConfig.footer && {
95230
95895
  footer: {
95231
- filepath: legacyFooterPath,
95232
- belowSidebar: config3.siteConfig.footerBelowSidebar
95896
+ filepath: legacyFooterPath
95233
95897
  }
95234
95898
  },
95235
95899
  routing: config3.siteConfig.routing,
@@ -95352,7 +96016,8 @@ function generateGuideItems({ children, items }) {
95352
96016
  title: item.title,
95353
96017
  description: item.description,
95354
96018
  icon: item.icon?.src,
95355
- filepath: `${item.yjsReference}.yjs`
96019
+ filepath: `${item.yjsReference}.yjs`,
96020
+ ...item.backgroundImage && { backgroundImage: item.backgroundImage }
95356
96021
  };
95357
96022
  routes[slug] = item.children.length ? {
95358
96023
  type: "group",
@@ -95607,8 +96272,7 @@ var wysiwygProjectToV2 = n.safeFn(({ project, invalidRefs, theme }) => {
95607
96272
  subdomain: project.website.subdomainPrefix,
95608
96273
  subpath: project.website.subPath,
95609
96274
  footer: {
95610
- filepath: legacyFooterPath,
95611
- belowSidebar: activeVersion.footerBelowSidebar
96275
+ filepath: legacyFooterPath
95612
96276
  },
95613
96277
  ...(project.logo.darkMode || project.logo.lightMode) && {
95614
96278
  logo: {
@@ -95786,12 +96450,17 @@ function CheckConfigCommand() {
95786
96450
  }
95787
96451
 
95788
96452
  // src/domains/project/preview/v2.ts
95789
- import { execFile, spawn } from "node:child_process";
96453
+ import { spawn } from "node:child_process";
96454
+ import path7 from "node:path";
96455
+
96456
+ // src/domains/project/download-isolate/index.ts
96457
+ import { execFile } from "node:child_process";
95790
96458
  import fs13 from "node:fs/promises";
95791
96459
  import os2 from "node:os";
95792
96460
  import path6 from "node:path";
95793
96461
  import { Readable } from "node:stream";
95794
96462
  import zlib from "node:zlib";
96463
+ import { Command as Command31 } from "commander";
95795
96464
  import tar from "tar-fs";
95796
96465
 
95797
96466
  // src/helpers/run-command.ts
@@ -95810,7 +96479,7 @@ async function runCommand(command, cwd2) {
95810
96479
  });
95811
96480
  }
95812
96481
 
95813
- // src/domains/project/preview/v2.ts
96482
+ // src/domains/project/download-isolate/index.ts
95814
96483
  var ISOLATE_EXTRACTION_DIR = path6.join(os2.homedir(), ".scalar");
95815
96484
  var ISOLATE_DIR = path6.join(ISOLATE_EXTRACTION_DIR, "isolate");
95816
96485
  async function getExistingIsolateVersion() {
@@ -95886,6 +96555,16 @@ async function downloadIsolate() {
95886
96555
  logger.update("loader", 0, { content: "Download complete." });
95887
96556
  logger.finish();
95888
96557
  }
96558
+ var DownloadIsolateCommand = () => {
96559
+ const cmd2 = new Command31("download-isolate");
96560
+ cmd2.description("Download the docs isolate");
96561
+ cmd2.action(async () => {
96562
+ await downloadIsolate();
96563
+ });
96564
+ return cmd2;
96565
+ };
96566
+
96567
+ // src/domains/project/preview/v2.ts
95889
96568
  async function runIsolate(isolateOptions) {
95890
96569
  const child = spawn("node", ["dist/isolate-entry.js"], { cwd: ISOLATE_DIR });
95891
96570
  child.stdin.write(JSON.stringify(isolateOptions));
@@ -95914,8 +96593,8 @@ async function previewV2Project({
95914
96593
  config: config3,
95915
96594
  host
95916
96595
  }) {
95917
- const root = path6.resolve(path6.dirname(configPath), config3.root ?? "./");
95918
- const relativeConfigPath = path6.relative(root, configPath);
96596
+ const root = path7.resolve(path7.dirname(configPath), config3.root ?? "./");
96597
+ const relativeConfigPath = path7.relative(root, configPath);
95919
96598
  const accessToken = await getAccessToken();
95920
96599
  await downloadIsolate();
95921
96600
  output.info().message("Starting preview...").print();
@@ -95935,7 +96614,7 @@ async function previewV2Project({
95935
96614
 
95936
96615
  // src/domains/project/preview/index.ts
95937
96616
  var PreviewCommand = () => {
95938
- const cmd2 = new Command31("preview");
96617
+ const cmd2 = new Command32("preview");
95939
96618
  cmd2.description("Preview scalar guides");
95940
96619
  cmd2.argument(
95941
96620
  "[config]",
@@ -96028,9 +96707,9 @@ var PreviewCommand = () => {
96028
96707
  // src/domains/project/create/index.ts
96029
96708
  import { text as text5 } from "@clack/prompts";
96030
96709
  import as28 from "ansis";
96031
- import { Command as Command32 } from "commander";
96710
+ import { Command as Command33 } from "commander";
96032
96711
  var CreateCommand = () => {
96033
- const cmd2 = new Command32("create");
96712
+ const cmd2 = new Command33("create");
96034
96713
  cmd2.description(
96035
96714
  "Create a new project that is not linked to a github project."
96036
96715
  );
@@ -96076,10 +96755,10 @@ Project slug: ${as28.cyan(response.data.slug)}`
96076
96755
 
96077
96756
  // src/domains/project/init/index.ts
96078
96757
  import fs14 from "node:fs/promises";
96079
- import path7 from "node:path";
96758
+ import path8 from "node:path";
96080
96759
  import { cancel, confirm as confirm3, isCancel, text as text6 } from "@clack/prompts";
96081
96760
  import as29 from "ansis";
96082
- import { Command as Command33 } from "commander";
96761
+ import { Command as Command34 } from "commander";
96083
96762
 
96084
96763
  // ../../node_modules/.pnpm/@scalar+galaxy@0.6.4/node_modules/@scalar/galaxy/dist/3.1.json
96085
96764
  var __default = {
@@ -98034,16 +98713,16 @@ We're here to help:
98034
98713
  `;
98035
98714
 
98036
98715
  // src/domains/project/init/index.ts
98037
- async function fileExists2(path12) {
98716
+ async function fileExists2(path13) {
98038
98717
  try {
98039
- await fs14.access(path12, fs14.constants.F_OK);
98718
+ await fs14.access(path13, fs14.constants.F_OK);
98040
98719
  return true;
98041
98720
  } catch {
98042
98721
  return false;
98043
98722
  }
98044
98723
  }
98045
98724
  var InitCommand = () => {
98046
- const cmd2 = new Command33("init");
98725
+ const cmd2 = new Command34("init");
98047
98726
  cmd2.description("Create a new Scalar Docs project.");
98048
98727
  cmd2.option("-s, --subdomain [url]", "subdomain to publish on");
98049
98728
  cmd2.option("--force", "override existing configuration");
@@ -98086,7 +98765,7 @@ var InitCommand = () => {
98086
98765
  handleCancel();
98087
98766
  }
98088
98767
  }
98089
- const currentDir = path7.resolve(path7.dirname(configFile));
98768
+ const currentDir = path8.resolve(path8.dirname(configFile));
98090
98769
  const configuration = scalarConfigSchema.parse({
98091
98770
  info: {},
98092
98771
  navigation: {
@@ -98134,11 +98813,11 @@ var InitCommand = () => {
98134
98813
  const content = JSON.stringify(configuration, null, 2);
98135
98814
  await fs14.writeFile(configFile, content);
98136
98815
  await fs14.writeFile(
98137
- path7.join(currentDir, DEFAULT_MARKDOWN_FILE_NAME),
98816
+ path8.join(currentDir, DEFAULT_MARKDOWN_FILE_NAME),
98138
98817
  quickstartMarkdown
98139
98818
  );
98140
98819
  await fs14.writeFile(
98141
- path7.join(currentDir, DEFAULT_OPENAPI_FILE_NAME),
98820
+ path8.join(currentDir, DEFAULT_OPENAPI_FILE_NAME),
98142
98821
  JSON.stringify(__default, null, 2)
98143
98822
  );
98144
98823
  output.info().line(`${as29.green("\u2714")} Configuration stored.
@@ -98156,11 +98835,11 @@ var InitCommand = () => {
98156
98835
  // src/domains/project/publish/index.ts
98157
98836
  import fs16 from "node:fs";
98158
98837
  import { dirname } from "node:path";
98159
- import { Command as Command34 } from "commander";
98838
+ import { Command as Command35 } from "commander";
98160
98839
 
98161
98840
  // src/domains/project/publish/publish.ts
98162
98841
  import fs15 from "node:fs";
98163
- import path8 from "node:path";
98842
+ import path9 from "node:path";
98164
98843
  import { Readable as Readable2 } from "node:stream";
98165
98844
  import ignore from "ignore";
98166
98845
  import tar2 from "tar-fs";
@@ -98171,7 +98850,7 @@ function isErrnoException(error48) {
98171
98850
  async function readGitIgnore(configDir) {
98172
98851
  try {
98173
98852
  const gitignore = await fs15.promises.readFile(
98174
- path8.resolve(configDir, ".gitignore"),
98853
+ path9.resolve(configDir, ".gitignore"),
98175
98854
  "utf8"
98176
98855
  );
98177
98856
  return gitignore;
@@ -98216,17 +98895,17 @@ async function publishProject({
98216
98895
  configDir,
98217
98896
  configPath,
98218
98897
  config: config3,
98219
- gitProject,
98898
+ slug,
98220
98899
  mode
98221
98900
  }) {
98222
98901
  try {
98223
- const root = path8.join(configDir, config3.root ?? "./");
98224
- const relativeConfigPath = path8.relative(root, configPath);
98902
+ const root = path9.join(configDir, config3.root ?? "./");
98903
+ const relativeConfigPath = path9.relative(root, configPath);
98225
98904
  const apiClient = await apiService();
98226
98905
  const projectTar = await createProjectTar(root);
98227
98906
  const result = await apiClient.publish.publishCli({
98228
98907
  tarStream: Readable2.toWeb(projectTar),
98229
- slug: gitProject.slug,
98908
+ slug,
98230
98909
  configPath: relativeConfigPath,
98231
98910
  mode
98232
98911
  });
@@ -98240,6 +98919,26 @@ async function publishProject({
98240
98919
  return { success: false, error: e };
98241
98920
  }
98242
98921
  }
98922
+ async function publishUnifiedDocsProjectFromGithub({
98923
+ slug,
98924
+ preview,
98925
+ apiClient
98926
+ }) {
98927
+ const result = await apiClient.publish.publishDocsProject({
98928
+ slug,
98929
+ preview
98930
+ });
98931
+ if (result.error) {
98932
+ return {
98933
+ success: false,
98934
+ error: result.message
98935
+ };
98936
+ }
98937
+ return {
98938
+ success: true,
98939
+ publishUid: result.data.publishUid
98940
+ };
98941
+ }
98243
98942
 
98244
98943
  // src/domains/project/publish/url.ts
98245
98944
  function getPublishDeploymentUrl(publish) {
@@ -98262,7 +98961,7 @@ var sleep = (ms) => {
98262
98961
 
98263
98962
  // src/domains/project/publish/index.ts
98264
98963
  var PublishCommand = () => {
98265
- const cmd2 = new Command34("publish");
98964
+ const cmd2 = new Command35("publish");
98266
98965
  cmd2.description(
98267
98966
  "Publish new build for a github sync project that is not linked."
98268
98967
  );
@@ -98294,19 +98993,46 @@ var PublishCommand = () => {
98294
98993
  if (!slug) {
98295
98994
  return output.error().title("Invalid argument").message("Slug is required. Try passing --slug flag.").exit("error");
98296
98995
  }
98297
- const gitProject = await getGithubProject(slug, apiClient);
98298
98996
  if (github) {
98299
- if (!gitProject.repository) {
98997
+ const resolved = await resolveProject(slug, apiClient);
98998
+ if (resolved.kind === "not-found") {
98999
+ return output.error().title("Project not found").message(`No project with slug "${slug}" was found for your team.`).exit("error");
99000
+ }
99001
+ if (resolved.kind === "github") {
99002
+ if (!resolved.project.repository) {
99003
+ return output.error().title("Your project is not linked to a GitHub repository").message(
99004
+ "For a sync publish, please configure your GitHub connection through the dashboard."
99005
+ ).exit("error");
99006
+ }
99007
+ if (resolved.project.repository.expired) {
99008
+ return output.error().title("Your GitHub repository access is expired.").message(
99009
+ "Please reconnect your project through the Scalar Dashboard to publish via sync."
99010
+ ).exit("error");
99011
+ }
99012
+ const publishResult3 = await publishGithub({ apiClient, slug, preview });
99013
+ if (!publishResult3.success) {
99014
+ return output.error().title("Could not publish sync project.").message(publishResult3.error).exit("error");
99015
+ }
99016
+ return await waitForPublish({
99017
+ teamUid: auth.teamUid,
99018
+ publishUid: publishResult3.publishUid
99019
+ });
99020
+ }
99021
+ if (!isGithubBackedDocsProject(resolved.project)) {
98300
99022
  return output.error().title("Your project is not linked to a GitHub repository").message(
98301
99023
  "For a sync publish, please configure your GitHub connection through the dashboard."
98302
99024
  ).exit("error");
98303
99025
  }
98304
- if (gitProject.repository.expired) {
99026
+ if (resolved.project.repository.expired) {
98305
99027
  return output.error().title("Your GitHub repository access is expired.").message(
98306
99028
  "Please reconnect your project through the Scalar Dashboard to publish via sync."
98307
99029
  ).exit("error");
98308
99030
  }
98309
- const publishResult2 = await publishGithub({ apiClient, slug, preview });
99031
+ const publishResult2 = await publishUnifiedDocsProjectFromGithub({
99032
+ apiClient,
99033
+ slug,
99034
+ preview
99035
+ });
98310
99036
  if (!publishResult2.success) {
98311
99037
  return output.error().title("Could not publish sync project.").message(publishResult2.error).exit("error");
98312
99038
  }
@@ -98328,7 +99054,7 @@ var PublishCommand = () => {
98328
99054
  }
98329
99055
  const publishResult = await publishProject({
98330
99056
  config: configParseResult.config,
98331
- gitProject,
99057
+ slug,
98332
99058
  configDir: dirname(configPath),
98333
99059
  configPath,
98334
99060
  ...preview && { mode: "preview" }
@@ -98379,12 +99105,16 @@ async function waitForPublish({
98379
99105
  await sleep(3e3);
98380
99106
  }
98381
99107
  }
98382
- async function getGithubProject(slug, apiClient) {
98383
- const project = await apiClient.github.getProject(slug);
98384
- if (project.error) {
98385
- return output.error().title("Error fetching github project").message(project.message).exit("error");
99108
+ async function resolveProject(slug, apiClient) {
99109
+ const githubResult = await apiClient.github.getProject(slug);
99110
+ if (!githubResult.error) {
99111
+ return { kind: "github", project: githubResult.data };
99112
+ }
99113
+ const docsResult = await apiClient.docsProject.getProject(slug);
99114
+ if (!docsResult.error) {
99115
+ return { kind: "docs", project: docsResult.data };
98386
99116
  }
98387
- return project.data;
99117
+ return { kind: "not-found" };
98388
99118
  }
98389
99119
  async function getDeployStatus({
98390
99120
  client,
@@ -98400,10 +99130,10 @@ async function getDeployStatus({
98400
99130
 
98401
99131
  // src/domains/project/upgrade/index.ts
98402
99132
  import fs17 from "node:fs/promises";
98403
- import path9 from "node:path";
99133
+ import path10 from "node:path";
98404
99134
  import { text as text7 } from "@clack/prompts";
98405
99135
  import as30 from "ansis";
98406
- import { Command as Command35 } from "commander";
99136
+ import { Command as Command36 } from "commander";
98407
99137
  import { n as n2 } from "neverpanic";
98408
99138
 
98409
99139
  // src/errors.ts
@@ -98432,7 +99162,7 @@ function displayError(error48, fallback = "Unknown error occurred. Please contac
98432
99162
 
98433
99163
  // src/domains/project/upgrade/index.ts
98434
99164
  var UpgradeCommand2 = () => {
98435
- const cmd2 = new Command35("upgrade");
99165
+ const cmd2 = new Command36("upgrade");
98436
99166
  cmd2.description("Upgrade scalar project");
98437
99167
  cmd2.argument(
98438
99168
  "[config]",
@@ -98489,8 +99219,8 @@ var UpgradeCommand2 = () => {
98489
99219
  if (legacyTheme) {
98490
99220
  const writeUpgradedThemeResult = await n2.fromUnsafe(
98491
99221
  () => fs17.writeFile(
98492
- path9.resolve(
98493
- path9.dirname(parseConfigResult.filePath),
99222
+ path10.resolve(
99223
+ path10.dirname(parseConfigResult.filePath),
98494
99224
  config3.root ?? "./",
98495
99225
  legacyTheme.path
98496
99226
  ),
@@ -98505,8 +99235,8 @@ var UpgradeCommand2 = () => {
98505
99235
  if (legacyFooter) {
98506
99236
  const writeUpgradedFooterResult = await n2.fromUnsafe(
98507
99237
  () => fs17.writeFile(
98508
- path9.resolve(
98509
- path9.dirname(parseConfigResult.filePath),
99238
+ path10.resolve(
99239
+ path10.dirname(parseConfigResult.filePath),
98510
99240
  config3.root ?? "./",
98511
99241
  legacyFooter.path
98512
99242
  ),
@@ -98521,8 +99251,8 @@ var UpgradeCommand2 = () => {
98521
99251
  if (legacyScript) {
98522
99252
  const writeUpgradedScriptResult = await n2.fromUnsafe(
98523
99253
  () => fs17.writeFile(
98524
- path9.resolve(
98525
- path9.dirname(parseConfigResult.filePath),
99254
+ path10.resolve(
99255
+ path10.dirname(parseConfigResult.filePath),
98526
99256
  config3.root ?? "./",
98527
99257
  legacyScript.path
98528
99258
  ),
@@ -98558,23 +99288,25 @@ var projectCommands = [
98558
99288
  PublishCommand,
98559
99289
  UpgradeCommand2
98560
99290
  ];
98561
- var projectDomain = new Command36("project");
99291
+ var projectDomain = new Command37("project");
98562
99292
  projectDomain.description("Manage scalar project");
98563
99293
  projectCommands.forEach((command) => projectDomain.addCommand(command()));
99294
+ projectDomain.addCommand(DownloadIsolateCommand(), { hidden: true });
98564
99295
  var project_default = projectDomain;
98565
99296
 
98566
99297
  // src/domains/readme/index.ts
98567
- import { Command as Command38 } from "commander";
99298
+ import { Command as Command39 } from "commander";
98568
99299
 
98569
99300
  // src/domains/readme/generate.ts
98570
99301
  import { text as text8 } from "@clack/prompts";
98571
99302
  import as31 from "ansis";
98572
- import { Command as Command37 } from "commander";
99303
+ import { Command as Command38 } from "commander";
98573
99304
 
98574
99305
  // src/helpers/documentation/index.ts
98575
99306
  import fs18 from "node:fs/promises";
98576
- import path10 from "node:path";
99307
+ import path11 from "node:path";
98577
99308
  var generateDocs = (command, depth = 0) => {
99309
+ if (command._hidden) return [];
98578
99310
  const documentation = [];
98579
99311
  documentation.push({
98580
99312
  title: command.name(),
@@ -98602,7 +99334,7 @@ ${docs.content}${codeBlock}`);
98602
99334
  var generateDocumentationFile = async (outputPath) => {
98603
99335
  const commandDocumentation = generateCommandDocumentation(getProgram());
98604
99336
  const template = await fs18.readFile(
98605
- path10.join(import.meta.dirname, "template.md"),
99337
+ path11.join(import.meta.dirname, "template.md"),
98606
99338
  {
98607
99339
  encoding: "utf-8"
98608
99340
  }
@@ -98615,7 +99347,7 @@ var generateDocumentationFile = async (outputPath) => {
98615
99347
 
98616
99348
  // src/domains/readme/generate.ts
98617
99349
  function GenerateReadmeCommand() {
98618
- const cmd2 = new Command37("generate");
99350
+ const cmd2 = new Command38("generate");
98619
99351
  cmd2.description("Self generate documentation for the cli");
98620
99352
  cmd2.option(
98621
99353
  "-o, --output [file]",
@@ -98649,7 +99381,7 @@ function GenerateReadmeCommand() {
98649
99381
 
98650
99382
  // src/domains/readme/serve.ts
98651
99383
  import fs19 from "node:fs/promises";
98652
- import path11 from "node:path";
99384
+ import path12 from "node:path";
98653
99385
  import as32 from "ansis";
98654
99386
  var fileExists3 = async (filePath) => {
98655
99387
  try {
@@ -98662,13 +99394,13 @@ var fileExists3 = async (filePath) => {
98662
99394
  function ServeReadmeCommand(cmd2) {
98663
99395
  cmd2.description("Open documentation for the CLI");
98664
99396
  cmd2.action(async () => {
98665
- const docsPath = path11.join(import.meta.dirname, "docs.html");
99397
+ const docsPath = path12.join(import.meta.dirname, "docs.html");
98666
99398
  if (await fileExists3(docsPath) === false) {
98667
99399
  return output.error().title("Documentation not found").message(
98668
99400
  "You can access documentation only by running the bundled version of the CLI."
98669
99401
  ).exit("error");
98670
99402
  }
98671
- const docsUrl = `file://${path11.join(import.meta.dirname, "docs.html")}`;
99403
+ const docsUrl = `file://${path12.join(import.meta.dirname, "docs.html")}`;
98672
99404
  openBrowser(docsUrl);
98673
99405
  output.info().message(
98674
99406
  "Documentation is being opened in your default browser. If it does not open automatically, please visit the following URL:"
@@ -98678,22 +99410,21 @@ function ServeReadmeCommand(cmd2) {
98678
99410
  }
98679
99411
 
98680
99412
  // src/domains/readme/index.ts
98681
- var readmeDomain = new Command38("readme");
99413
+ var readmeDomain = new Command39("readme");
98682
99414
  readmeDomain.addCommand(GenerateReadmeCommand());
98683
99415
  ServeReadmeCommand(readmeDomain);
98684
99416
  var readme_default = readmeDomain;
98685
99417
 
98686
99418
  // src/domains/registry/index.ts
98687
- import { Command as Command44 } from "commander";
99419
+ import { Command as Command45 } from "commander";
98688
99420
 
98689
99421
  // src/domains/registry/publish/index.ts
98690
99422
  import { text as text9 } from "@clack/prompts";
98691
99423
  import as33 from "ansis";
98692
- import { Command as Command39 } from "commander";
99424
+ import { Command as Command40 } from "commander";
98693
99425
  import { bundle as bundle4 } from "@scalar/json-magic/bundle";
98694
99426
  import { fetchUrls as fetchUrls4, readFiles as readFiles4 } from "@scalar/json-magic/bundle/plugins/node";
98695
99427
  import { parseJsonOrYaml as parseJsonOrYaml2 } from "@scalar/oas-utils/helpers";
98696
- import { validate as validate3 } from "@scalar/openapi-parser";
98697
99428
 
98698
99429
  // src/domains/registry/publish/helpers/links.ts
98699
99430
  function apiDashboardUrl(uid) {
@@ -98702,7 +99433,7 @@ function apiDashboardUrl(uid) {
98702
99433
 
98703
99434
  // src/domains/registry/publish/index.ts
98704
99435
  var PublishCommand2 = () => {
98705
- const cmd2 = new Command39("publish");
99436
+ const cmd2 = new Command40("publish");
98706
99437
  cmd2.description("Publish an OpenAPI document to the Scalar registry");
98707
99438
  cmd2.argument("[file]", "OpenAPI file to upload");
98708
99439
  cmd2.option(
@@ -98798,13 +99529,10 @@ var PublishCommand2 = () => {
98798
99529
  treeShake: data.treeShake,
98799
99530
  urlMap: data.urlMap
98800
99531
  });
98801
- const result = await validate3(bundledDocument);
98802
- if (!result.valid || !result.specification) {
98803
- return output.error().title("Invalid API document").message("File does not match the OpenAPI specification.").table([result.errors?.map((err) => err.message) || []]).exit("error");
98804
- }
98805
- const apiSlug = data.slug || (result.specification.info?.title ? slugify3(result.specification.info.title) : randomSlug({ words: 3 }));
99532
+ const specification = bundledDocument;
99533
+ const apiSlug = data.slug || toRegistrySlug(specification.info?.title ?? "");
98806
99534
  const parsedVersion = docVersionSchema.safeParse(
98807
- data.version || result.specification.info?.version
99535
+ data.version || specification.info?.version
98808
99536
  );
98809
99537
  const version3 = parsedVersion.data || (await text9({
98810
99538
  message: "What is the version of your document (e.g. 0.1.0)?",
@@ -98825,8 +99553,8 @@ var PublishCommand2 = () => {
98825
99553
  force: data.force,
98826
99554
  isCurrent: data.current
98827
99555
  }) : await client.managedDocs.create(namespace, {
98828
- title: result.specification.info?.title || "My API",
98829
- description: result.specification.info?.description,
99556
+ title: specification.info?.title || "My API",
99557
+ description: specification.info?.description,
98830
99558
  version: version3,
98831
99559
  slug: apiSlug,
98832
99560
  isPrivate: data.private,
@@ -98847,9 +99575,9 @@ var PublishCommand2 = () => {
98847
99575
  };
98848
99576
 
98849
99577
  // src/domains/registry/delete/index.ts
98850
- import { Command as Command40 } from "commander";
99578
+ import { Command as Command41 } from "commander";
98851
99579
  var DeleteCommand = () => {
98852
- const cmd2 = new Command40("delete");
99580
+ const cmd2 = new Command41("delete");
98853
99581
  cmd2.description("Delete a document from scalar registry");
98854
99582
  cmd2.argument("[namespace]", "Team namespace");
98855
99583
  cmd2.argument("[slug]", "Managed doc slug");
@@ -98867,10 +99595,10 @@ var DeleteCommand = () => {
98867
99595
 
98868
99596
  // src/domains/registry/get/index.ts
98869
99597
  import fs20 from "node:fs";
98870
- import { Command as Command41 } from "commander";
99598
+ import { Command as Command42 } from "commander";
98871
99599
  var versionSchema3 = external_exports.union([docVersionSchema, external_exports.literal("latest")]);
98872
99600
  var GetCommand = () => {
98873
- const cmd2 = new Command41("get");
99601
+ const cmd2 = new Command42("get");
98874
99602
  cmd2.description("Get a document version from scalar registry");
98875
99603
  cmd2.argument("[namespace]", "Team namespace");
98876
99604
  cmd2.argument("[slug]", "Managed doc slug");
@@ -98945,9 +99673,9 @@ var GetCommand = () => {
98945
99673
 
98946
99674
  // src/domains/registry/list/index.ts
98947
99675
  import as34 from "ansis";
98948
- import { Command as Command42 } from "commander";
99676
+ import { Command as Command43 } from "commander";
98949
99677
  var ListCommand = () => {
98950
- const cmd2 = new Command42("list");
99678
+ const cmd2 = new Command43("list");
98951
99679
  cmd2.description("List all registry APIs for a team namespace");
98952
99680
  cmd2.option("--namespace <namespace>", "Team namespace");
98953
99681
  cmd2.action(async (args) => {
@@ -99006,9 +99734,9 @@ var ListCommand = () => {
99006
99734
  // src/domains/registry/update/index.ts
99007
99735
  import { text as text10 } from "@clack/prompts";
99008
99736
  import as35 from "ansis";
99009
- import { Command as Command43 } from "commander";
99737
+ import { Command as Command44 } from "commander";
99010
99738
  var UpdateCommand = () => {
99011
- const cmd2 = new Command43("update");
99739
+ const cmd2 = new Command44("update");
99012
99740
  cmd2.description("Update document metadata on scalar registry");
99013
99741
  cmd2.argument("[namespace]", "namespace of document you want to update");
99014
99742
  cmd2.argument("[slug]", "slug of document you want to update");
@@ -99062,17 +99790,17 @@ var registryCommands = [
99062
99790
  ListCommand,
99063
99791
  GetCommand
99064
99792
  ];
99065
- var registryDomain = new Command44("registry");
99793
+ var registryDomain = new Command45("registry");
99066
99794
  registryDomain.description("Manage your scalar registry");
99067
99795
  registryCommands.forEach((command) => registryDomain.addCommand(command()));
99068
99796
  var registry_default = registryDomain;
99069
99797
 
99070
99798
  // src/domains/team/index.ts
99071
- import { Command as Command47 } from "commander";
99799
+ import { Command as Command48 } from "commander";
99072
99800
 
99073
99801
  // src/domains/team/list/index.ts
99074
99802
  import as36 from "ansis";
99075
- import { Command as Command45 } from "commander";
99803
+ import { Command as Command46 } from "commander";
99076
99804
 
99077
99805
  // src/domains/team/helpers.ts
99078
99806
  var getUserTeams = async (client, email3) => {
@@ -99087,7 +99815,7 @@ var getUserTeams = async (client, email3) => {
99087
99815
 
99088
99816
  // src/domains/team/list/index.ts
99089
99817
  var ListCommand2 = () => {
99090
- const cmd2 = new Command45("list");
99818
+ const cmd2 = new Command46("list");
99091
99819
  cmd2.description("List all teams current user is part of");
99092
99820
  cmd2.action(async () => {
99093
99821
  const auth = await getAuthData();
@@ -99113,9 +99841,9 @@ var ListCommand2 = () => {
99113
99841
  // src/domains/team/set/index.ts
99114
99842
  import { select as select7 } from "@clack/prompts";
99115
99843
  import as37 from "ansis";
99116
- import { Command as Command46 } from "commander";
99844
+ import { Command as Command47 } from "commander";
99117
99845
  var SetCommand = () => {
99118
- const cmd2 = new Command46("set");
99846
+ const cmd2 = new Command47("set");
99119
99847
  cmd2.description("Set current active team for the user");
99120
99848
  cmd2.option("--team <team>", "Team uid");
99121
99849
  cmd2.action(async ({ team }) => {
@@ -99155,7 +99883,7 @@ var SetCommand = () => {
99155
99883
 
99156
99884
  // src/domains/team/index.ts
99157
99885
  var teamCommands = [ListCommand2, SetCommand];
99158
- var teamDomain = new Command47("team");
99886
+ var teamDomain = new Command48("team");
99159
99887
  teamDomain.description("Manage user teams");
99160
99888
  teamCommands.forEach((command) => teamDomain.addCommand(command()));
99161
99889
  var team_default = teamDomain;
@@ -99163,7 +99891,7 @@ var team_default = teamDomain;
99163
99891
  // src/domains/upgrade/index.ts
99164
99892
  import { execSync } from "node:child_process";
99165
99893
  import as39 from "ansis";
99166
- import { Command as Command48 } from "commander";
99894
+ import { Command as Command49 } from "commander";
99167
99895
 
99168
99896
  // src/helpers/upgrade.ts
99169
99897
  import as38 from "ansis";
@@ -99219,7 +99947,7 @@ async function checkUpgrade() {
99219
99947
  }
99220
99948
 
99221
99949
  // src/domains/upgrade/index.ts
99222
- var cmd = new Command48("upgrade");
99950
+ var cmd = new Command49("upgrade");
99223
99951
  cmd.description("Upgrade current version of your cli");
99224
99952
  cmd.action(async () => {
99225
99953
  const upgradeStatus = await getUpgradeInformation();
@@ -99257,7 +99985,7 @@ var domains_default = domains;
99257
99985
 
99258
99986
  // src/program.ts
99259
99987
  var getProgram = () => {
99260
- const program2 = new Command49();
99988
+ const program2 = new Command50();
99261
99989
  program2.enablePositionalOptions().name(Object.keys(bin)[0]).description("CLI to work with your OpenAPI files").version(version, "-v, --version");
99262
99990
  program2.showHelpAfterError();
99263
99991
  domains_default.forEach((domain2) => program2.addCommand(domain2));