@tinacms/graphql 0.58.2 → 0.59.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.
package/dist/index.js CHANGED
@@ -39,8 +39,8 @@ var __commonJS = (cb, mod) => function __require() {
39
39
  };
40
40
  var __export = (target, all2) => {
41
41
  __markAsModule(target);
42
- for (var name in all2)
43
- __defProp(target, name, { get: all2[name], enumerable: true });
42
+ for (var name2 in all2)
43
+ __defProp(target, name2, { get: all2[name2], enumerable: true });
44
44
  };
45
45
  var __reExport = (target, module2, desc) => {
46
46
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
@@ -173,18 +173,18 @@ var require_extend = __commonJS({
173
173
  target[options.name] = options.newValue;
174
174
  }
175
175
  };
176
- var getProperty = function getProperty2(obj, name) {
177
- if (name === "__proto__") {
178
- if (!hasOwn.call(obj, name)) {
176
+ var getProperty = function getProperty2(obj, name2) {
177
+ if (name2 === "__proto__") {
178
+ if (!hasOwn.call(obj, name2)) {
179
179
  return void 0;
180
180
  } else if (gOPD) {
181
- return gOPD(obj, name).value;
181
+ return gOPD(obj, name2).value;
182
182
  }
183
183
  }
184
- return obj[name];
184
+ return obj[name2];
185
185
  };
186
186
  module2.exports = function extend2() {
187
- var options, name, src, copy, copyIsArray, clone;
187
+ var options, name2, src, copy, copyIsArray, clone;
188
188
  var target = arguments[0];
189
189
  var i = 1;
190
190
  var length = arguments.length;
@@ -200,9 +200,9 @@ var require_extend = __commonJS({
200
200
  for (; i < length; ++i) {
201
201
  options = arguments[i];
202
202
  if (options != null) {
203
- for (name in options) {
204
- src = getProperty(target, name);
205
- copy = getProperty(options, name);
203
+ for (name2 in options) {
204
+ src = getProperty(target, name2);
205
+ copy = getProperty(options, name2);
206
206
  if (target !== copy) {
207
207
  if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray(copy)))) {
208
208
  if (copyIsArray) {
@@ -211,9 +211,9 @@ var require_extend = __commonJS({
211
211
  } else {
212
212
  clone = src && isPlainObject2(src) ? src : {};
213
213
  }
214
- setProperty(target, { name, newValue: extend2(deep, clone, copy) });
214
+ setProperty(target, { name: name2, newValue: extend2(deep, clone, copy) });
215
215
  } else if (typeof copy !== "undefined") {
216
- setProperty(target, { name, newValue: copy });
216
+ setProperty(target, { name: name2, newValue: copy });
217
217
  }
218
218
  }
219
219
  }
@@ -860,7 +860,7 @@ var require_estree_util_is_identifier_name = __commonJS({
860
860
  "use strict";
861
861
  exports.start = start;
862
862
  exports.cont = cont;
863
- exports.name = name;
863
+ exports.name = name2;
864
864
  var id = require_regex();
865
865
  function start(code2) {
866
866
  return id.start.test(String.fromCharCode(code2));
@@ -869,10 +869,10 @@ var require_estree_util_is_identifier_name = __commonJS({
869
869
  var character = String.fromCharCode(code2);
870
870
  return id.start.test(character) || id.cont.test(character);
871
871
  }
872
- function name(name2) {
872
+ function name2(name3) {
873
873
  var index2 = -1;
874
- while (++index2 < name2.length) {
875
- if (!(index2 ? cont : start)(name2.charCodeAt(index2)))
874
+ while (++index2 < name3.length) {
875
+ if (!(index2 ? cont : start)(name3.charCodeAt(index2)))
876
876
  return false;
877
877
  }
878
878
  return index2 > 0;
@@ -1482,16 +1482,16 @@ var require_acorn = __commonJS({
1482
1482
  this.binop = conf.binop || null;
1483
1483
  this.updateContext = null;
1484
1484
  };
1485
- function binop(name, prec) {
1486
- return new TokenType(name, { beforeExpr: true, binop: prec });
1485
+ function binop(name2, prec) {
1486
+ return new TokenType(name2, { beforeExpr: true, binop: prec });
1487
1487
  }
1488
1488
  var beforeExpr = { beforeExpr: true }, startsExpr = { startsExpr: true };
1489
1489
  var keywords$1 = {};
1490
- function kw(name, options) {
1490
+ function kw(name2, options) {
1491
1491
  if (options === void 0)
1492
1492
  options = {};
1493
- options.keyword = name;
1494
- return keywords$1[name] = new TokenType(name, options);
1493
+ options.keyword = name2;
1494
+ return keywords$1[name2] = new TokenType(name2, options);
1495
1495
  }
1496
1496
  var types = {
1497
1497
  num: new TokenType("num", startsExpr),
@@ -1840,18 +1840,18 @@ var require_acorn = __commonJS({
1840
1840
  return false;
1841
1841
  }
1842
1842
  };
1843
- pp.isContextual = function(name) {
1844
- return this.type === types.name && this.value === name && !this.containsEsc;
1843
+ pp.isContextual = function(name2) {
1844
+ return this.type === types.name && this.value === name2 && !this.containsEsc;
1845
1845
  };
1846
- pp.eatContextual = function(name) {
1847
- if (!this.isContextual(name)) {
1846
+ pp.eatContextual = function(name2) {
1847
+ if (!this.isContextual(name2)) {
1848
1848
  return false;
1849
1849
  }
1850
1850
  this.next();
1851
1851
  return true;
1852
1852
  };
1853
- pp.expectContextual = function(name) {
1854
- if (!this.eatContextual(name)) {
1853
+ pp.expectContextual = function(name2) {
1854
+ if (!this.eatContextual(name2)) {
1855
1855
  this.unexpected();
1856
1856
  }
1857
1857
  };
@@ -1945,8 +1945,8 @@ var require_acorn = __commonJS({
1945
1945
  }
1946
1946
  if (this.inModule) {
1947
1947
  for (var i = 0, list3 = Object.keys(this.undefinedExports); i < list3.length; i += 1) {
1948
- var name = list3[i];
1949
- this.raiseRecoverable(this.undefinedExports[name].start, "Export '" + name + "' is not defined");
1948
+ var name2 = list3[i];
1949
+ this.raiseRecoverable(this.undefinedExports[name2].start, "Export '" + name2 + "' is not defined");
1950
1950
  }
1951
1951
  }
1952
1952
  this.adaptDirectivePrologue(node.body);
@@ -2668,26 +2668,26 @@ var require_acorn = __commonJS({
2668
2668
  }
2669
2669
  };
2670
2670
  function isPrivateNameConflicted(privateNameMap, element) {
2671
- var name = element.key.name;
2672
- var curr = privateNameMap[name];
2671
+ var name2 = element.key.name;
2672
+ var curr = privateNameMap[name2];
2673
2673
  var next = "true";
2674
2674
  if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) {
2675
2675
  next = (element.static ? "s" : "i") + element.kind;
2676
2676
  }
2677
2677
  if (curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget") {
2678
- privateNameMap[name] = "true";
2678
+ privateNameMap[name2] = "true";
2679
2679
  return false;
2680
2680
  } else if (!curr) {
2681
- privateNameMap[name] = next;
2681
+ privateNameMap[name2] = next;
2682
2682
  return false;
2683
2683
  } else {
2684
2684
  return true;
2685
2685
  }
2686
2686
  }
2687
- function checkKeyName(node, name) {
2687
+ function checkKeyName(node, name2) {
2688
2688
  var computed = node.computed;
2689
2689
  var key2 = node.key;
2690
- return !computed && (key2.type === "Identifier" && key2.name === name || key2.type === "Literal" && key2.value === name);
2690
+ return !computed && (key2.type === "Identifier" && key2.name === name2 || key2.type === "Literal" && key2.value === name2);
2691
2691
  }
2692
2692
  pp$1.parseExport = function(node, exports3) {
2693
2693
  this.next();
@@ -2756,14 +2756,14 @@ var require_acorn = __commonJS({
2756
2756
  }
2757
2757
  return this.finishNode(node, "ExportNamedDeclaration");
2758
2758
  };
2759
- pp$1.checkExport = function(exports3, name, pos) {
2759
+ pp$1.checkExport = function(exports3, name2, pos) {
2760
2760
  if (!exports3) {
2761
2761
  return;
2762
2762
  }
2763
- if (has(exports3, name)) {
2764
- this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
2763
+ if (has(exports3, name2)) {
2764
+ this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'");
2765
2765
  }
2766
- exports3[name] = true;
2766
+ exports3[name2] = true;
2767
2767
  };
2768
2768
  pp$1.checkPatternExport = function(exports3, pat) {
2769
2769
  var type = pat.type;
@@ -3272,20 +3272,20 @@ var require_acorn = __commonJS({
3272
3272
  return;
3273
3273
  }
3274
3274
  var key2 = prop.key;
3275
- var name;
3275
+ var name2;
3276
3276
  switch (key2.type) {
3277
3277
  case "Identifier":
3278
- name = key2.name;
3278
+ name2 = key2.name;
3279
3279
  break;
3280
3280
  case "Literal":
3281
- name = String(key2.value);
3281
+ name2 = String(key2.value);
3282
3282
  break;
3283
3283
  default:
3284
3284
  return;
3285
3285
  }
3286
3286
  var kind = prop.kind;
3287
3287
  if (this.options.ecmaVersion >= 6) {
3288
- if (name === "__proto__" && kind === "init") {
3288
+ if (name2 === "__proto__" && kind === "init") {
3289
3289
  if (propHash.proto) {
3290
3290
  if (refDestructuringErrors) {
3291
3291
  if (refDestructuringErrors.doubleProto < 0) {
@@ -3299,8 +3299,8 @@ var require_acorn = __commonJS({
3299
3299
  }
3300
3300
  return;
3301
3301
  }
3302
- name = "$" + name;
3303
- var other = propHash[name];
3302
+ name2 = "$" + name2;
3303
+ var other = propHash[name2];
3304
3304
  if (other) {
3305
3305
  var redefinition;
3306
3306
  if (kind === "init") {
@@ -3312,7 +3312,7 @@ var require_acorn = __commonJS({
3312
3312
  this.raiseRecoverable(key2.start, "Redefinition of property");
3313
3313
  }
3314
3314
  } else {
3315
- other = propHash[name] = {
3315
+ other = propHash[name2] = {
3316
3316
  init: false,
3317
3317
  get: false,
3318
3318
  set: false
@@ -4166,31 +4166,31 @@ var require_acorn = __commonJS({
4166
4166
  pp$4.checkUnreserved = function(ref2) {
4167
4167
  var start = ref2.start;
4168
4168
  var end = ref2.end;
4169
- var name = ref2.name;
4170
- if (this.inGenerator && name === "yield") {
4169
+ var name2 = ref2.name;
4170
+ if (this.inGenerator && name2 === "yield") {
4171
4171
  this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator");
4172
4172
  }
4173
- if (this.inAsync && name === "await") {
4173
+ if (this.inAsync && name2 === "await") {
4174
4174
  this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function");
4175
4175
  }
4176
- if (this.currentThisScope().inClassFieldInit && name === "arguments") {
4176
+ if (this.currentThisScope().inClassFieldInit && name2 === "arguments") {
4177
4177
  this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer");
4178
4178
  }
4179
- if (this.inClassStaticBlock && (name === "arguments" || name === "await")) {
4180
- this.raise(start, "Cannot use " + name + " in class static initialization block");
4179
+ if (this.inClassStaticBlock && (name2 === "arguments" || name2 === "await")) {
4180
+ this.raise(start, "Cannot use " + name2 + " in class static initialization block");
4181
4181
  }
4182
- if (this.keywords.test(name)) {
4183
- this.raise(start, "Unexpected keyword '" + name + "'");
4182
+ if (this.keywords.test(name2)) {
4183
+ this.raise(start, "Unexpected keyword '" + name2 + "'");
4184
4184
  }
4185
4185
  if (this.options.ecmaVersion < 6 && this.input.slice(start, end).indexOf("\\") !== -1) {
4186
4186
  return;
4187
4187
  }
4188
4188
  var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
4189
- if (re.test(name)) {
4190
- if (!this.inAsync && name === "await") {
4189
+ if (re.test(name2)) {
4190
+ if (!this.inAsync && name2 === "await") {
4191
4191
  this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function");
4192
4192
  }
4193
- this.raiseRecoverable(start, "The keyword '" + name + "' is reserved");
4193
+ this.raiseRecoverable(start, "The keyword '" + name2 + "' is reserved");
4194
4194
  }
4195
4195
  };
4196
4196
  pp$4.parseIdent = function(liberal, isBinding) {
@@ -4288,36 +4288,36 @@ var require_acorn = __commonJS({
4288
4288
  pp$6.treatFunctionsAsVarInScope = function(scope) {
4289
4289
  return scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_TOP;
4290
4290
  };
4291
- pp$6.declareName = function(name, bindingType, pos) {
4291
+ pp$6.declareName = function(name2, bindingType, pos) {
4292
4292
  var redeclared = false;
4293
4293
  if (bindingType === BIND_LEXICAL) {
4294
4294
  var scope = this.currentScope();
4295
- redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1;
4296
- scope.lexical.push(name);
4295
+ redeclared = scope.lexical.indexOf(name2) > -1 || scope.functions.indexOf(name2) > -1 || scope.var.indexOf(name2) > -1;
4296
+ scope.lexical.push(name2);
4297
4297
  if (this.inModule && scope.flags & SCOPE_TOP) {
4298
- delete this.undefinedExports[name];
4298
+ delete this.undefinedExports[name2];
4299
4299
  }
4300
4300
  } else if (bindingType === BIND_SIMPLE_CATCH) {
4301
4301
  var scope$1 = this.currentScope();
4302
- scope$1.lexical.push(name);
4302
+ scope$1.lexical.push(name2);
4303
4303
  } else if (bindingType === BIND_FUNCTION) {
4304
4304
  var scope$2 = this.currentScope();
4305
4305
  if (this.treatFunctionsAsVar) {
4306
- redeclared = scope$2.lexical.indexOf(name) > -1;
4306
+ redeclared = scope$2.lexical.indexOf(name2) > -1;
4307
4307
  } else {
4308
- redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1;
4308
+ redeclared = scope$2.lexical.indexOf(name2) > -1 || scope$2.var.indexOf(name2) > -1;
4309
4309
  }
4310
- scope$2.functions.push(name);
4310
+ scope$2.functions.push(name2);
4311
4311
  } else {
4312
4312
  for (var i = this.scopeStack.length - 1; i >= 0; --i) {
4313
4313
  var scope$3 = this.scopeStack[i];
4314
- if (scope$3.lexical.indexOf(name) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH && scope$3.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) {
4314
+ if (scope$3.lexical.indexOf(name2) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH && scope$3.lexical[0] === name2) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name2) > -1) {
4315
4315
  redeclared = true;
4316
4316
  break;
4317
4317
  }
4318
- scope$3.var.push(name);
4318
+ scope$3.var.push(name2);
4319
4319
  if (this.inModule && scope$3.flags & SCOPE_TOP) {
4320
- delete this.undefinedExports[name];
4320
+ delete this.undefinedExports[name2];
4321
4321
  }
4322
4322
  if (scope$3.flags & SCOPE_VAR) {
4323
4323
  break;
@@ -4325,7 +4325,7 @@ var require_acorn = __commonJS({
4325
4325
  }
4326
4326
  }
4327
4327
  if (redeclared) {
4328
- this.raiseRecoverable(pos, "Identifier '" + name + "' has already been declared");
4328
+ this.raiseRecoverable(pos, "Identifier '" + name2 + "' has already been declared");
4329
4329
  }
4330
4330
  };
4331
4331
  pp$6.checkLocalExport = function(id) {
@@ -4568,8 +4568,8 @@ var require_acorn = __commonJS({
4568
4568
  state.raise("Invalid escape");
4569
4569
  }
4570
4570
  for (var i = 0, list3 = state.backReferenceNames; i < list3.length; i += 1) {
4571
- var name = list3[i];
4572
- if (state.groupNames.indexOf(name) === -1) {
4571
+ var name2 = list3[i];
4572
+ if (state.groupNames.indexOf(name2) === -1) {
4573
4573
  state.raise("Invalid named capture referenced");
4574
4574
  }
4575
4575
  }
@@ -5008,10 +5008,10 @@ var require_acorn = __commonJS({
5008
5008
  pp$8.regexp_eatUnicodePropertyValueExpression = function(state) {
5009
5009
  var start = state.pos;
5010
5010
  if (this.regexp_eatUnicodePropertyName(state) && state.eat(61)) {
5011
- var name = state.lastStringValue;
5011
+ var name2 = state.lastStringValue;
5012
5012
  if (this.regexp_eatUnicodePropertyValue(state)) {
5013
5013
  var value = state.lastStringValue;
5014
- this.regexp_validateUnicodePropertyNameAndValue(state, name, value);
5014
+ this.regexp_validateUnicodePropertyNameAndValue(state, name2, value);
5015
5015
  return true;
5016
5016
  }
5017
5017
  }
@@ -5023,11 +5023,11 @@ var require_acorn = __commonJS({
5023
5023
  }
5024
5024
  return false;
5025
5025
  };
5026
- pp$8.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {
5027
- if (!has(state.unicodeProperties.nonBinary, name)) {
5026
+ pp$8.regexp_validateUnicodePropertyNameAndValue = function(state, name2, value) {
5027
+ if (!has(state.unicodeProperties.nonBinary, name2)) {
5028
5028
  state.raise("Invalid property name");
5029
5029
  }
5030
- if (!state.unicodeProperties.nonBinary[name].test(value)) {
5030
+ if (!state.unicodeProperties.nonBinary[name2].test(value)) {
5031
5031
  state.raise("Invalid property value");
5032
5032
  }
5033
5033
  };
@@ -6028,10 +6028,10 @@ var require_acorn = __commonJS({
6028
6028
  }
6029
6029
  return this.finishToken(type, word);
6030
6030
  };
6031
- var version = "8.5.0";
6031
+ var version2 = "8.5.0";
6032
6032
  Parser.acorn = {
6033
6033
  Parser,
6034
- version,
6034
+ version: version2,
6035
6035
  defaultOptions,
6036
6036
  Position,
6037
6037
  SourceLocation,
@@ -6080,7 +6080,7 @@ var require_acorn = __commonJS({
6080
6080
  exports2.tokContexts = types$1;
6081
6081
  exports2.tokTypes = types;
6082
6082
  exports2.tokenizer = tokenizer;
6083
- exports2.version = version;
6083
+ exports2.version = version2;
6084
6084
  Object.defineProperty(exports2, "__esModule", { value: true });
6085
6085
  });
6086
6086
  }
@@ -6565,11 +6565,11 @@ var require_acorn_jsx = __commonJS({
6565
6565
  }
6566
6566
  jsx_parseNamespacedName() {
6567
6567
  let startPos = this.start, startLoc = this.startLoc;
6568
- let name = this.jsx_parseIdentifier();
6568
+ let name2 = this.jsx_parseIdentifier();
6569
6569
  if (!options.allowNamespaces || !this.eat(tt.colon))
6570
- return name;
6570
+ return name2;
6571
6571
  var node = this.startNodeAt(startPos, startLoc);
6572
- node.namespace = name;
6572
+ node.namespace = name2;
6573
6573
  node.name = this.jsx_parseIdentifier();
6574
6574
  return this.finishNode(node, "JSXNamespacedName");
6575
6575
  }
@@ -9497,14 +9497,14 @@ var require_parse_entities = __commonJS({
9497
9497
  var uppercaseX = 88;
9498
9498
  var lowercaseX = 120;
9499
9499
  var replacementCharacter = 65533;
9500
- var name = "named";
9500
+ var name2 = "named";
9501
9501
  var hexa = "hexadecimal";
9502
9502
  var deci = "decimal";
9503
9503
  var bases = {};
9504
9504
  bases[hexa] = 16;
9505
9505
  bases[deci] = 10;
9506
9506
  var tests = {};
9507
- tests[name] = alphanumerical;
9507
+ tests[name2] = alphanumerical;
9508
9508
  tests[deci] = decimal;
9509
9509
  tests[hexa] = hexadecimal;
9510
9510
  var namedNotTerminated = 1;
@@ -9608,7 +9608,7 @@ var require_parse_entities = __commonJS({
9608
9608
  type = deci;
9609
9609
  }
9610
9610
  } else {
9611
- type = name;
9611
+ type = name2;
9612
9612
  }
9613
9613
  entityCharacters = "";
9614
9614
  entity = "";
@@ -9621,7 +9621,7 @@ var require_parse_entities = __commonJS({
9621
9621
  break;
9622
9622
  }
9623
9623
  characters2 += fromCharCode2(following);
9624
- if (type === name && own9.call(legacy, characters2)) {
9624
+ if (type === name2 && own9.call(legacy, characters2)) {
9625
9625
  entityCharacters = characters2;
9626
9626
  entity = legacy[characters2];
9627
9627
  }
@@ -9629,7 +9629,7 @@ var require_parse_entities = __commonJS({
9629
9629
  terminated = value.charCodeAt(end) === semicolon;
9630
9630
  if (terminated) {
9631
9631
  end++;
9632
- namedEntity = type === name ? decodeEntity2(characters2) : false;
9632
+ namedEntity = type === name2 ? decodeEntity2(characters2) : false;
9633
9633
  if (namedEntity) {
9634
9634
  entityCharacters = characters2;
9635
9635
  entity = namedEntity;
@@ -9638,10 +9638,10 @@ var require_parse_entities = __commonJS({
9638
9638
  diff = 1 + end - start;
9639
9639
  if (!terminated && !nonTerminated) {
9640
9640
  } else if (!characters2) {
9641
- if (type !== name) {
9641
+ if (type !== name2) {
9642
9642
  warning(numericEmpty, diff);
9643
9643
  }
9644
- } else if (type === name) {
9644
+ } else if (type === name2) {
9645
9645
  if (terminated && !entity) {
9646
9646
  warning(namedUnknown, 1);
9647
9647
  } else {
@@ -10032,8 +10032,8 @@ var require_to_markdown = __commonJS({
10032
10032
  var require_core = __commonJS({
10033
10033
  "pnp:/Users/jeffsee/code/tinacms/.yarn/cache/stringify-entities-npm-3.1.0-78dc656761-4d33442e56.zip/node_modules/stringify-entities/lib/core.js"(exports, module2) {
10034
10034
  "use strict";
10035
- module2.exports = encode2;
10036
- function encode2(value, options) {
10035
+ module2.exports = encode;
10036
+ function encode(value, options) {
10037
10037
  value = value.replace(options.subset ? charactersToExpression2(options.subset) : /["&'<>`]/g, basic);
10038
10038
  if (options.subset || options.escapeOnly) {
10039
10039
  return value;
@@ -10239,12 +10239,12 @@ var require_to_markdown2 = __commonJS({
10239
10239
  exports.fences = true;
10240
10240
  exports.resourceLink = true;
10241
10241
  mdxElement2.peek = peekElement2;
10242
- var encode2 = require_light();
10242
+ var encode = require_light();
10243
10243
  var flow3 = require_container_flow();
10244
10244
  var phrasing = require_container_phrasing();
10245
10245
  var checkQuote2 = require_check_quote();
10246
10246
  var eol2 = /\r?\n|\r/g;
10247
- function mdxElement2(node, _8, context) {
10247
+ function mdxElement2(node, _6, context) {
10248
10248
  var selfClosing = node.name && (!node.children || !node.children.length);
10249
10249
  var quote = checkQuote2(context);
10250
10250
  var exit2 = context.enter(node.type);
@@ -10265,7 +10265,7 @@ var require_to_markdown2 = __commonJS({
10265
10265
  if (!attribute.name) {
10266
10266
  throw new Error("Cannot serialize attribute w/o name");
10267
10267
  }
10268
- result = attribute.name + (attribute.value == null ? "" : "=" + (typeof attribute.value === "object" ? "{" + (attribute.value.value || "") + "}" : quote + encode2(attribute.value, { subset: [quote] }) + quote));
10268
+ result = attribute.name + (attribute.value == null ? "" : "=" + (typeof attribute.value === "object" ? "{" + (attribute.value.value || "") + "}" : quote + encode(attribute.value, { subset: [quote] }) + quote));
10269
10269
  }
10270
10270
  attributes.push(result);
10271
10271
  }
@@ -10384,22 +10384,18 @@ var require_remark_mdx = __commonJS({
10384
10384
 
10385
10385
  // pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/index.ts
10386
10386
  __export(exports, {
10387
- FilesystemBridge: () => FilesystemBridge,
10388
- FilesystemStore: () => FilesystemStore,
10389
- GithubBridge: () => GithubBridge,
10390
- GithubStore: () => GithubStore,
10391
- LevelStore: () => LevelStore,
10392
- MemoryStore: () => MemoryStore,
10387
+ assertShape: () => assertShape,
10393
10388
  buildSchema: () => buildSchema,
10394
- createBranch: () => createBranch,
10395
10389
  createDatabase: () => createDatabase,
10396
10390
  indexDB: () => indexDB,
10397
- listBranches: () => listBranches,
10398
- resolve: () => resolve
10391
+ parseFile: () => parseFile,
10392
+ resolve: () => resolve,
10393
+ sequential: () => sequential,
10394
+ stringifyFile: () => stringifyFile
10399
10395
  });
10400
- var import_fs_extra4 = __toModule(require("fs-extra"));
10401
- var import_path10 = __toModule(require("path"));
10402
- var import_graphql7 = __toModule(require("graphql"));
10396
+ var import_fs_extra2 = __toModule(require("fs-extra"));
10397
+ var import_path5 = __toModule(require("path"));
10398
+ var import_graphql5 = __toModule(require("graphql"));
10403
10399
 
10404
10400
  // pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/build.ts
10405
10401
  var import_lodash3 = __toModule(require("lodash"));
@@ -10478,11 +10474,11 @@ var SysFieldDefinition = {
10478
10474
  };
10479
10475
  var astBuilder = {
10480
10476
  FormFieldBuilder: ({
10481
- name,
10477
+ name: name2,
10482
10478
  additionalFields
10483
10479
  }) => {
10484
10480
  return astBuilder.ObjectTypeDefinition({
10485
- name,
10481
+ name: name2,
10486
10482
  interfaces: [astBuilder.NamedType({ name: "FormField" })],
10487
10483
  fields: [
10488
10484
  astBuilder.FieldDefinition({
@@ -10505,14 +10501,14 @@ var astBuilder = {
10505
10501
  });
10506
10502
  },
10507
10503
  ScalarTypeDefinition: ({
10508
- name,
10504
+ name: name2,
10509
10505
  description
10510
10506
  }) => {
10511
10507
  return {
10512
10508
  kind: "ScalarTypeDefinition",
10513
10509
  name: {
10514
10510
  kind: "Name",
10515
- value: name
10511
+ value: name2
10516
10512
  },
10517
10513
  description: {
10518
10514
  kind: "StringValue",
@@ -10522,7 +10518,7 @@ var astBuilder = {
10522
10518
  };
10523
10519
  },
10524
10520
  InputValueDefinition: ({
10525
- name,
10521
+ name: name2,
10526
10522
  type,
10527
10523
  list: list3,
10528
10524
  required
@@ -10539,7 +10535,7 @@ var astBuilder = {
10539
10535
  kind: "InputValueDefinition",
10540
10536
  name: {
10541
10537
  kind: "Name",
10542
- value: name
10538
+ value: name2
10543
10539
  }
10544
10540
  };
10545
10541
  if (list3) {
@@ -10596,17 +10592,17 @@ var astBuilder = {
10596
10592
  };
10597
10593
  },
10598
10594
  FieldNodeDefinition: ({
10599
- name,
10595
+ name: name2,
10600
10596
  type,
10601
10597
  args = [],
10602
10598
  list: list3,
10603
10599
  required
10604
10600
  }) => ({
10605
- name: { kind: "Name", value: name },
10601
+ name: { kind: "Name", value: name2 },
10606
10602
  kind: "Field"
10607
10603
  }),
10608
10604
  FieldDefinition: ({
10609
- name,
10605
+ name: name2,
10610
10606
  type,
10611
10607
  args = [],
10612
10608
  list: list3,
@@ -10624,7 +10620,7 @@ var astBuilder = {
10624
10620
  kind: "FieldDefinition",
10625
10621
  name: {
10626
10622
  kind: "Name",
10627
- value: name
10623
+ value: name2
10628
10624
  },
10629
10625
  arguments: args
10630
10626
  };
@@ -10667,7 +10663,7 @@ var astBuilder = {
10667
10663
  return res;
10668
10664
  },
10669
10665
  InterfaceTypeDefinition: ({
10670
- name,
10666
+ name: name2,
10671
10667
  fields,
10672
10668
  description = ""
10673
10669
  }) => {
@@ -10676,7 +10672,7 @@ var astBuilder = {
10676
10672
  description: { kind: "StringValue", value: description },
10677
10673
  name: {
10678
10674
  kind: "Name",
10679
- value: name
10675
+ value: name2
10680
10676
  },
10681
10677
  interfaces: [],
10682
10678
  directives: [],
@@ -10684,45 +10680,45 @@ var astBuilder = {
10684
10680
  };
10685
10681
  },
10686
10682
  InputObjectTypeDefinition: ({
10687
- name,
10683
+ name: name2,
10688
10684
  fields
10689
10685
  }) => ({
10690
10686
  kind: "InputObjectTypeDefinition",
10691
10687
  name: {
10692
10688
  kind: "Name",
10693
- value: name
10689
+ value: name2
10694
10690
  },
10695
10691
  fields
10696
10692
  }),
10697
10693
  UnionTypeDefinition: ({
10698
- name,
10694
+ name: name2,
10699
10695
  types
10700
10696
  }) => ({
10701
10697
  kind: "UnionTypeDefinition",
10702
10698
  name: {
10703
10699
  kind: "Name",
10704
- value: name
10700
+ value: name2
10705
10701
  },
10706
10702
  directives: [],
10707
- types: types.map((name2) => ({
10703
+ types: types.map((name3) => ({
10708
10704
  kind: "NamedType",
10709
10705
  name: {
10710
10706
  kind: "Name",
10711
- value: name2
10707
+ value: name3
10712
10708
  }
10713
10709
  }))
10714
10710
  }),
10715
- NamedType: ({ name }) => {
10711
+ NamedType: ({ name: name2 }) => {
10716
10712
  return {
10717
10713
  kind: "NamedType",
10718
10714
  name: {
10719
10715
  kind: "Name",
10720
- value: name
10716
+ value: name2
10721
10717
  }
10722
10718
  };
10723
10719
  },
10724
10720
  ObjectTypeDefinition: ({
10725
- name,
10721
+ name: name2,
10726
10722
  fields,
10727
10723
  interfaces = [],
10728
10724
  directives = [],
@@ -10733,16 +10729,16 @@ var astBuilder = {
10733
10729
  directives,
10734
10730
  name: {
10735
10731
  kind: "Name",
10736
- value: name
10732
+ value: name2
10737
10733
  },
10738
10734
  fields
10739
10735
  }),
10740
10736
  FieldWithSelectionSetDefinition: ({
10741
- name,
10737
+ name: name2,
10742
10738
  selections
10743
10739
  }) => {
10744
10740
  return {
10745
- name: { kind: "Name", value: name },
10741
+ name: { kind: "Name", value: name2 },
10746
10742
  kind: "Field",
10747
10743
  selectionSet: {
10748
10744
  kind: "SelectionSet",
@@ -10751,7 +10747,7 @@ var astBuilder = {
10751
10747
  };
10752
10748
  },
10753
10749
  InlineFragmentDefinition: ({
10754
- name,
10750
+ name: name2,
10755
10751
  selections
10756
10752
  }) => {
10757
10753
  return {
@@ -10764,13 +10760,13 @@ var astBuilder = {
10764
10760
  kind: "NamedType",
10765
10761
  name: {
10766
10762
  kind: "Name",
10767
- value: name
10763
+ value: name2
10768
10764
  }
10769
10765
  }
10770
10766
  };
10771
10767
  },
10772
10768
  FragmentDefinition: ({
10773
- name,
10769
+ name: name2,
10774
10770
  fragmentName,
10775
10771
  selections
10776
10772
  }) => {
@@ -10784,7 +10780,7 @@ var astBuilder = {
10784
10780
  kind: "NamedType",
10785
10781
  name: {
10786
10782
  kind: "Name",
10787
- value: name
10783
+ value: name2
10788
10784
  }
10789
10785
  },
10790
10786
  directives: [],
@@ -11341,7 +11337,7 @@ var Builder = class {
11341
11337
  constructor(config) {
11342
11338
  this.config = config;
11343
11339
  this.buildCollectionDefinition = async (collections) => {
11344
- const name = "getCollection";
11340
+ const name2 = "getCollection";
11345
11341
  const typeName = "Collection";
11346
11342
  const args = [
11347
11343
  astBuilder.InputValueDefinition({
@@ -11371,7 +11367,7 @@ var Builder = class {
11371
11367
  }),
11372
11368
  astBuilder.FieldDefinition({
11373
11369
  name: "label",
11374
- required: true,
11370
+ required: false,
11375
11371
  type: astBuilder.TYPES.String
11376
11372
  }),
11377
11373
  astBuilder.FieldDefinition({
@@ -11402,20 +11398,20 @@ var Builder = class {
11402
11398
  documentsType
11403
11399
  ]
11404
11400
  });
11405
- return astBuilder.FieldDefinition({ type, name, args, required: true });
11401
+ return astBuilder.FieldDefinition({ type, name: name2, args, required: true });
11406
11402
  };
11407
11403
  this.buildMultiCollectionDefinition = async (collections) => {
11408
- const name = "getCollections";
11404
+ const name2 = "getCollections";
11409
11405
  const typeName = "Collection";
11410
11406
  return astBuilder.FieldDefinition({
11411
11407
  type: typeName,
11412
- name,
11408
+ name: name2,
11413
11409
  list: true,
11414
11410
  required: true
11415
11411
  });
11416
11412
  };
11417
11413
  this.multiNodeDocument = async () => {
11418
- const name = "node";
11414
+ const name2 = "node";
11419
11415
  const args = [
11420
11416
  astBuilder.InputValueDefinition({
11421
11417
  name: "id",
@@ -11427,7 +11423,7 @@ var Builder = class {
11427
11423
  resolveType: "nodeDocument"
11428
11424
  });
11429
11425
  return astBuilder.FieldDefinition({
11430
- name,
11426
+ name: name2,
11431
11427
  args,
11432
11428
  list: false,
11433
11429
  type: astBuilder.TYPES.Node,
@@ -11435,7 +11431,7 @@ var Builder = class {
11435
11431
  });
11436
11432
  };
11437
11433
  this.multiCollectionDocument = async (collections) => {
11438
- const name = "getDocument";
11434
+ const name2 = "getDocument";
11439
11435
  const args = [
11440
11436
  astBuilder.InputValueDefinition({
11441
11437
  name: "collection",
@@ -11451,7 +11447,7 @@ var Builder = class {
11451
11447
  collections
11452
11448
  });
11453
11449
  return astBuilder.FieldDefinition({
11454
- name,
11450
+ name: name2,
11455
11451
  args,
11456
11452
  list: false,
11457
11453
  type,
@@ -11553,7 +11549,7 @@ var Builder = class {
11553
11549
  });
11554
11550
  };
11555
11551
  this.collectionDocument = async (collection) => {
11556
- const name = NAMER.queryName([collection.name]);
11552
+ const name2 = NAMER.queryName([collection.name]);
11557
11553
  const type = await this._buildCollectionDocumentType(collection);
11558
11554
  const args = [
11559
11555
  astBuilder.InputValueDefinition({
@@ -11568,10 +11564,10 @@ var Builder = class {
11568
11564
  [NAMER.createName([collection.name])]: "create",
11569
11565
  [NAMER.updateName([collection.name])]: "update"
11570
11566
  });
11571
- return astBuilder.FieldDefinition({ type, name, args, required: true });
11567
+ return astBuilder.FieldDefinition({ type, name: name2, args, required: true });
11572
11568
  };
11573
11569
  this.collectionFragment = async (collection) => {
11574
- const name = NAMER.dataTypeName(collection.namespace);
11570
+ const name2 = NAMER.dataTypeName(collection.namespace);
11575
11571
  const fragmentName = NAMER.fragmentName(collection.namespace);
11576
11572
  if (typeof collection.fields === "object") {
11577
11573
  const selections = [];
@@ -11580,7 +11576,7 @@ var Builder = class {
11580
11576
  selections.push(field);
11581
11577
  });
11582
11578
  return astBuilder.FragmentDefinition({
11583
- name,
11579
+ name: name2,
11584
11580
  fragmentName,
11585
11581
  selections: filterSelections(selections)
11586
11582
  });
@@ -11592,7 +11588,7 @@ var Builder = class {
11592
11588
  }
11593
11589
  });
11594
11590
  return astBuilder.FragmentDefinition({
11595
- name,
11591
+ name: name2,
11596
11592
  fragmentName,
11597
11593
  selections: filterSelections(selections)
11598
11594
  });
@@ -12059,7 +12055,7 @@ var Builder = class {
12059
12055
  };
12060
12056
  this._buildObjectOrUnionData = async (collectableTemplate) => {
12061
12057
  if (collectableTemplate.type === "union") {
12062
- const name = NAMER.dataTypeName(collectableTemplate.namespace);
12058
+ const name2 = NAMER.dataTypeName(collectableTemplate.namespace);
12063
12059
  const typeMap = {};
12064
12060
  const types = await sequential(collectableTemplate.templates, async (template) => {
12065
12061
  const type = await this._buildTemplateData(template);
@@ -12067,11 +12063,11 @@ var Builder = class {
12067
12063
  return type;
12068
12064
  });
12069
12065
  await this.database.addToLookupMap({
12070
- type: name,
12066
+ type: name2,
12071
12067
  resolveType: "unionData",
12072
12068
  typeMap
12073
12069
  });
12074
- return astBuilder.UnionTypeDefinition({ name, types });
12070
+ return astBuilder.UnionTypeDefinition({ name: name2, types });
12075
12071
  }
12076
12072
  return this._buildTemplateData(collectableTemplate.template);
12077
12073
  };
@@ -12194,14 +12190,14 @@ Visit https://tina.io/docs/errors/ui-not-supported/ for more information
12194
12190
  type: astBuilder.TYPES.JSON
12195
12191
  });
12196
12192
  case "reference":
12197
- const name = NAMER.documentTypeName(field.namespace);
12193
+ const name2 = NAMER.documentTypeName(field.namespace);
12198
12194
  if (field.list) {
12199
12195
  console.warn(listWarningMsg);
12200
12196
  return this._buildMultiCollectionDocumentListDefinition({
12201
12197
  fieldName: field.name,
12202
12198
  namespace: field.namespace,
12203
12199
  nodeType: astBuilder.UnionTypeDefinition({
12204
- name,
12200
+ name: name2,
12205
12201
  types: field.collections.map((collectionName) => NAMER.documentTypeName([collectionName]))
12206
12202
  }),
12207
12203
  collections: this.tinaSchema.getCollectionsByName(field.collections),
@@ -12209,7 +12205,7 @@ Visit https://tina.io/docs/errors/ui-not-supported/ for more information
12209
12205
  });
12210
12206
  } else {
12211
12207
  const type = await this._buildMultiCollectionDocumentDefinition({
12212
- fieldName: name,
12208
+ fieldName: name2,
12213
12209
  collections: this.tinaSchema.getCollectionsByName(field.collections)
12214
12210
  });
12215
12211
  return astBuilder.FieldDefinition({
@@ -12282,10 +12278,46 @@ var FIELD_TYPES = [
12282
12278
  var validateSchema = async (schema) => {
12283
12279
  const schema2 = addNamespaceToSchema(import_lodash2.default.cloneDeep(schema));
12284
12280
  const collections = await sequential(schema2.collections, async (collection) => validateCollection(collection));
12281
+ validationCollectionsPathAndMatch(collections);
12285
12282
  return {
12286
12283
  collections
12287
12284
  };
12288
12285
  };
12286
+ var validationCollectionsPathAndMatch = (collections) => {
12287
+ const paths = collections.map((x) => x.path);
12288
+ if (paths.length === new Set(paths).size) {
12289
+ return;
12290
+ }
12291
+ const noMatchCollections = collections.filter((x) => {
12292
+ return typeof (x == null ? void 0 : x.match) === "undefined";
12293
+ }).map((x) => x.path);
12294
+ if (noMatchCollections.length !== new Set(noMatchCollections).size) {
12295
+ throw new Error("path must be unique when no `match` is provided");
12296
+ }
12297
+ const hasMatchAndPath = collections.filter((x) => {
12298
+ return typeof x.path !== "undefined" && typeof x.match !== "undefined";
12299
+ }).map((x) => `${x.path}|${x.match}`);
12300
+ if (hasMatchAndPath.length !== new Set(hasMatchAndPath).size) {
12301
+ throw new Error("Both `match` and `path` can not be the same");
12302
+ }
12303
+ const groupbyPath = collections.reduce((r, a) => {
12304
+ r[a.path] = r[a.path] || [];
12305
+ r[a.path].push(a);
12306
+ return r;
12307
+ }, Object.create(null));
12308
+ Object.keys(groupbyPath).forEach((key2) => {
12309
+ const collectionsArr = groupbyPath[key2];
12310
+ if (collectionsArr.length === 1) {
12311
+ return;
12312
+ }
12313
+ const matches = collectionsArr.filter((x) => {
12314
+ return typeof x.match !== "undefined";
12315
+ });
12316
+ if (matches.length !== collections.length) {
12317
+ throw new Error("path must be unique when no `match` is provided");
12318
+ }
12319
+ });
12320
+ };
12289
12321
  var validateCollection = async (collection) => {
12290
12322
  let templates = [];
12291
12323
  let fields = [];
@@ -12294,7 +12326,6 @@ var validateCollection = async (collection) => {
12294
12326
  name: yup2.string().matches(/^[a-zA-Z0-9_]*$/, {
12295
12327
  message: (obj) => `Collection's "name" must match ${obj.regex} at ${messageName}`
12296
12328
  }).required(),
12297
- label: yup2.string().required(),
12298
12329
  path: yup2.string().required().transform((value) => {
12299
12330
  return value.replace(/^\/|\/$/g, "");
12300
12331
  })
@@ -12331,13 +12362,148 @@ var validateField = async (field) => {
12331
12362
  name: yup2.string().matches(/^[a-zA-Z0-9_]*$/, {
12332
12363
  message: (obj) => `Field's 'name' must match ${obj.regex} at ${messageName}`
12333
12364
  }).required(),
12334
- label: yup2.string().required(),
12335
12365
  type: yup2.string().oneOf(FIELD_TYPES, (obj) => `'type' must be one of: ${obj.values}, but got '${obj.value}' at ${messageName}`)
12336
12366
  });
12337
12367
  await schema.validate(field);
12338
12368
  return field;
12339
12369
  };
12340
12370
 
12371
+ // pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/package.json
12372
+ var name = "@tinacms/graphql";
12373
+ var version = "0.59.3";
12374
+ var main = "dist/index.js";
12375
+ var typings = "dist/index.d.ts";
12376
+ var files = [
12377
+ "package.json",
12378
+ "dist"
12379
+ ];
12380
+ var license = "Apache-2.0";
12381
+ var buildConfig = {
12382
+ entryPoints: [
12383
+ {
12384
+ name: "src/index.ts",
12385
+ target: "node",
12386
+ bundle: [
12387
+ "mdast",
12388
+ "mdast-util-from-markdown",
12389
+ "mdast-util-mdx",
12390
+ "mdast-util-mdx-expression",
12391
+ "mdast-util-to-markdown",
12392
+ "micromark-extension-mdxjs",
12393
+ "rehype-format",
12394
+ "rehype-stringify",
12395
+ "remark",
12396
+ "remark-frontmatter",
12397
+ "remark-mdx",
12398
+ "remark-parse",
12399
+ "remark-rehype",
12400
+ "remark-slate",
12401
+ "remark-stringify",
12402
+ "unified",
12403
+ "unist-util-remove-position",
12404
+ "unist-util-visit",
12405
+ "vfile"
12406
+ ]
12407
+ }
12408
+ ]
12409
+ };
12410
+ var scripts = {
12411
+ types: "yarn tsc",
12412
+ build: 'echo "Run `yarn build` from the root of the repository instead"',
12413
+ docs: "yarn typedoc",
12414
+ serve: "yarn nodemon dist/server.js",
12415
+ test: "jest"
12416
+ };
12417
+ var dependencies = {
12418
+ "body-parser": "^1.19.0",
12419
+ cors: "^2.8.5",
12420
+ dataloader: "^2.0.0",
12421
+ "date-fns": "^2.21.1",
12422
+ "encoding-down": "^7.1.0",
12423
+ esbuild: "^0.12.25",
12424
+ "esbuild-jest": "^0.5.0",
12425
+ "estree-walker": "^3.0.0",
12426
+ "fast-glob": "^3.2.5",
12427
+ flat: "^5.0.2",
12428
+ "fs-extra": "^9.0.1",
12429
+ graphql: "^15.3.0",
12430
+ "graphql-type-json": "^0.3.2",
12431
+ "gray-matter": "^4.0.2",
12432
+ "js-yaml": "^3.14.0",
12433
+ lodash: "^4.17.20",
12434
+ mdast: "^3.0.0",
12435
+ "mdast-util-from-markdown": "^1.0.0",
12436
+ "mdast-util-mdx": "^1.1.0",
12437
+ "mdast-util-mdx-expression": "^1.1.0",
12438
+ "mdast-util-to-markdown": "^1.2.1",
12439
+ "micromark-extension-mdxjs": "^1.0.0",
12440
+ mocha: "^9.1.1",
12441
+ "normalize-path": "^3.0.0",
12442
+ prettier: "^2.2.1",
12443
+ "rehype-format": "^3.1.0",
12444
+ "rehype-stringify": "^8.0.0",
12445
+ remark: "^13.0.0",
12446
+ "remark-frontmatter": "^3.0.0",
12447
+ "remark-mdx": "next",
12448
+ "remark-parse": "^10.0.0",
12449
+ "remark-rehype": "^8.0.0",
12450
+ "remark-slate": "^1.8.0",
12451
+ "remark-stringify": "^8.1.1",
12452
+ unified: "^10.1.0",
12453
+ "unist-util-remove-position": "^3.0.0",
12454
+ "unist-util-visit": "^4.0.0",
12455
+ vfile: "^4.2.0",
12456
+ ws: "^7.3.1",
12457
+ yup: "^0.32.9"
12458
+ };
12459
+ var publishConfig = {
12460
+ registry: "https://registry.npmjs.org"
12461
+ };
12462
+ var repository = {
12463
+ url: "https://github.com/tinacms/tinacms.git",
12464
+ directory: "packages/tina-graphql"
12465
+ };
12466
+ var devDependencies = {
12467
+ "@tinacms/datalayer": "workspace:*",
12468
+ "@tinacms/scripts": "workspace:*",
12469
+ "@types/cors": "^2.8.7",
12470
+ "@types/estree": "^0.0.50",
12471
+ "@types/express": "^4.17.8",
12472
+ "@types/fs-extra": "^9.0.2",
12473
+ "@types/jest": "^26.0.4",
12474
+ "@types/js-yaml": "^3.12.5",
12475
+ "@types/level": "^6.0.0",
12476
+ "@types/lodash": "^4.14.161",
12477
+ "@types/lodash.camelcase": "^4.3.6",
12478
+ "@types/lodash.upperfirst": "^4.3.6",
12479
+ "@types/lru-cache": "^5.1.0",
12480
+ "@types/mdast": "^3.0.10",
12481
+ "@types/node": "^14.17.34",
12482
+ "@types/normalize-path": "^3.0.0",
12483
+ "@types/ws": "^7.2.6",
12484
+ "@types/yup": "^0.29.7",
12485
+ jest: "27.0.6",
12486
+ "jest-diff": "27.0.6",
12487
+ "jest-file-snapshot": "^0.5.0",
12488
+ "jest-matcher-utils": "27.0.6",
12489
+ nodemon: "^2.0.4",
12490
+ typescript: "^4.3.5"
12491
+ };
12492
+ var package_default = {
12493
+ name,
12494
+ version,
12495
+ main,
12496
+ typings,
12497
+ files,
12498
+ license,
12499
+ buildConfig,
12500
+ scripts,
12501
+ dependencies,
12502
+ publishConfig,
12503
+ repository,
12504
+ devDependencies
12505
+ };
12506
+
12341
12507
  // pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/resolver/error.ts
12342
12508
  var TinaError = class extends Error {
12343
12509
  constructor(message, extensions) {
@@ -12351,10 +12517,24 @@ var TinaError = class extends Error {
12351
12517
 
12352
12518
  // pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/schema/index.ts
12353
12519
  var createSchema = async ({
12354
- schema
12520
+ schema,
12521
+ flags = []
12355
12522
  }) => {
12356
12523
  const validSchema = await validateSchema(schema);
12357
- return new TinaSchema(validSchema);
12524
+ const [major, minor, patch] = package_default.version.split(".");
12525
+ const meta = {};
12526
+ if (flags && flags.length > 0) {
12527
+ meta["flags"] = flags;
12528
+ }
12529
+ return new TinaSchema(__spreadValues({
12530
+ version: {
12531
+ fullVersion: package_default.version,
12532
+ major,
12533
+ minor,
12534
+ patch
12535
+ },
12536
+ meta
12537
+ }, validSchema));
12358
12538
  };
12359
12539
  var TinaSchema = class {
12360
12540
  constructor(config) {
@@ -12508,17 +12688,24 @@ var TinaSchema = class {
12508
12688
  var import_path = __toModule(require("path"));
12509
12689
  var indexDB = async ({
12510
12690
  database,
12511
- config
12691
+ config,
12692
+ buildSDK = true
12512
12693
  }) => {
12513
- const tinaSchema = await createSchema({ schema: config });
12694
+ const flags = [];
12695
+ if (database.store.supportsIndexing()) {
12696
+ flags.push("experimentalData");
12697
+ }
12698
+ const tinaSchema = await createSchema({ schema: config, flags });
12514
12699
  const builder = await createBuilder({
12515
12700
  database,
12516
12701
  tinaSchema
12517
12702
  });
12518
12703
  const graphQLSchema = await _buildSchema(builder, tinaSchema);
12519
12704
  await database.indexData({ graphQLSchema, tinaSchema });
12520
- await _buildFragments(builder, tinaSchema, database.bridge.rootPath);
12521
- await _buildQueries(builder, tinaSchema, database.bridge.rootPath);
12705
+ if (buildSDK) {
12706
+ await _buildFragments(builder, tinaSchema, database.bridge.rootPath);
12707
+ await _buildQueries(builder, tinaSchema, database.bridge.rootPath);
12708
+ }
12522
12709
  };
12523
12710
  var _buildFragments = async (builder, tinaSchema, rootPath) => {
12524
12711
  const fragmentDefinitionsFields = [];
@@ -12842,13 +13029,13 @@ var VFile = class {
12842
13029
  get path() {
12843
13030
  return this.history[this.history.length - 1];
12844
13031
  }
12845
- set path(path11) {
12846
- if (isUrl(path11)) {
12847
- path11 = (0, import_url.fileURLToPath)(path11);
13032
+ set path(path6) {
13033
+ if (isUrl(path6)) {
13034
+ path6 = (0, import_url.fileURLToPath)(path6);
12848
13035
  }
12849
- assertNonEmpty(path11, "path");
12850
- if (this.path !== path11) {
12851
- this.history.push(path11);
13036
+ assertNonEmpty(path6, "path");
13037
+ if (this.path !== path6) {
13038
+ this.history.push(path6);
12852
13039
  }
12853
13040
  }
12854
13041
  get dirname() {
@@ -12914,19 +13101,19 @@ var VFile = class {
12914
13101
  throw message;
12915
13102
  }
12916
13103
  };
12917
- function assertPart(part, name) {
13104
+ function assertPart(part, name2) {
12918
13105
  if (part && part.includes(import_path2.default.sep)) {
12919
- throw new Error("`" + name + "` cannot be a path: did not expect `" + import_path2.default.sep + "`");
13106
+ throw new Error("`" + name2 + "` cannot be a path: did not expect `" + import_path2.default.sep + "`");
12920
13107
  }
12921
13108
  }
12922
- function assertNonEmpty(part, name) {
13109
+ function assertNonEmpty(part, name2) {
12923
13110
  if (!part) {
12924
- throw new Error("`" + name + "` cannot be empty");
13111
+ throw new Error("`" + name2 + "` cannot be empty");
12925
13112
  }
12926
13113
  }
12927
- function assertPath(path11, name) {
12928
- if (!path11) {
12929
- throw new Error("Setting `" + name + "` requires `path` to be set too");
13114
+ function assertPath(path6, name2) {
13115
+ if (!path6) {
13116
+ throw new Error("Setting `" + name2 + "` requires `path` to be set too");
12930
13117
  }
12931
13118
  }
12932
13119
 
@@ -13176,8 +13363,8 @@ function base() {
13176
13363
  }
13177
13364
  }
13178
13365
  }
13179
- function newable(value, name) {
13180
- return typeof value === "function" && value.prototype && (keys(value.prototype) || name in value.prototype);
13366
+ function newable(value, name2) {
13367
+ return typeof value === "function" && value.prototype && (keys(value.prototype) || name2 in value.prototype);
13181
13368
  }
13182
13369
  function keys(value) {
13183
13370
  let key2;
@@ -13188,19 +13375,19 @@ function keys(value) {
13188
13375
  }
13189
13376
  return false;
13190
13377
  }
13191
- function assertParser(name, value) {
13378
+ function assertParser(name2, value) {
13192
13379
  if (typeof value !== "function") {
13193
- throw new TypeError("Cannot `" + name + "` without `Parser`");
13380
+ throw new TypeError("Cannot `" + name2 + "` without `Parser`");
13194
13381
  }
13195
13382
  }
13196
- function assertCompiler(name, value) {
13383
+ function assertCompiler(name2, value) {
13197
13384
  if (typeof value !== "function") {
13198
- throw new TypeError("Cannot `" + name + "` without `Compiler`");
13385
+ throw new TypeError("Cannot `" + name2 + "` without `Compiler`");
13199
13386
  }
13200
13387
  }
13201
- function assertUnfrozen(name, frozen) {
13388
+ function assertUnfrozen(name2, frozen) {
13202
13389
  if (frozen) {
13203
- throw new Error("Cannot call `" + name + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.");
13390
+ throw new Error("Cannot call `" + name2 + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.");
13204
13391
  }
13205
13392
  }
13206
13393
  function assertNode(node) {
@@ -13208,9 +13395,9 @@ function assertNode(node) {
13208
13395
  throw new TypeError("Expected node, got `" + node + "`");
13209
13396
  }
13210
13397
  }
13211
- function assertDone(name, asyncName, complete) {
13398
+ function assertDone(name2, asyncName, complete) {
13212
13399
  if (!complete) {
13213
- throw new Error("`" + name + "` finished async. Use `" + asyncName + "` instead");
13400
+ throw new Error("`" + name2 + "` finished async. Use `" + asyncName + "` instead");
13214
13401
  }
13215
13402
  }
13216
13403
  function vfile(value) {
@@ -18620,7 +18807,7 @@ function createTokenizer(parser, initialize, from) {
18620
18807
  return context;
18621
18808
  function write(slice) {
18622
18809
  chunks = push(chunks, slice);
18623
- main();
18810
+ main2();
18624
18811
  if (chunks[chunks.length - 1] !== null) {
18625
18812
  return [];
18626
18813
  }
@@ -18641,7 +18828,7 @@ function createTokenizer(parser, initialize, from) {
18641
18828
  columnStart[value.line] = value.column;
18642
18829
  accountForPotentialSkip();
18643
18830
  }
18644
- function main() {
18831
+ function main2() {
18645
18832
  let chunkIndex;
18646
18833
  while (point2._index < chunks.length) {
18647
18834
  const chunk = chunks[point2._index];
@@ -18702,7 +18889,7 @@ function createTokenizer(parser, initialize, from) {
18702
18889
  function onsuccessfulconstruct(construct, info) {
18703
18890
  addResult(construct, info.from);
18704
18891
  }
18705
- function onsuccessfulcheck(_8, info) {
18892
+ function onsuccessfulcheck(_6, info) {
18706
18893
  info.restore();
18707
18894
  }
18708
18895
  function constructFactory(onreturn, fields) {
@@ -19842,11 +20029,11 @@ var visitParents = function(tree, test, visitor, reverse) {
19842
20029
  factory(tree, null, [])();
19843
20030
  function factory(node, index2, parents) {
19844
20031
  const value = typeof node === "object" && node !== null ? node : {};
19845
- let name;
20032
+ let name2;
19846
20033
  if (typeof value.type === "string") {
19847
- name = typeof value.tagName === "string" ? value.tagName : typeof value.name === "string" ? value.name : void 0;
20034
+ name2 = typeof value.tagName === "string" ? value.tagName : typeof value.name === "string" ? value.name : void 0;
19848
20035
  Object.defineProperty(visit3, "name", {
19849
- value: "node (" + color(value.type + (name ? "<" + name + ">" : "")) + ")"
20036
+ value: "node (" + color(value.type + (name2 ? "<" + name2 + ">" : "")) + ")"
19850
20037
  });
19851
20038
  }
19852
20039
  return visit3;
@@ -20214,7 +20401,7 @@ function remarkToSlate(node) {
20214
20401
  case "code":
20215
20402
  return {
20216
20403
  type: types.code_block,
20217
- language: node.lang,
20404
+ lang: node.lang,
20218
20405
  children: node.value.split("\n").map((item) => ({
20219
20406
  type: "code_line",
20220
20407
  children: [{ type: "text", text: item }]
@@ -20259,11 +20446,11 @@ var forceLeafNode = (children) => {
20259
20446
  const text4 = [];
20260
20447
  children.forEach((k) => {
20261
20448
  switch (k.type) {
20449
+ case "inlineCode":
20262
20450
  case "text":
20263
20451
  return text4.push(k.value || "");
20264
20452
  case "strong":
20265
20453
  case "emphasis":
20266
- case "code":
20267
20454
  const format = { strong: "bold", em: "italic", code: "code" };
20268
20455
  extraProps[format[k.type]] = true;
20269
20456
  return k.children.forEach((item) => {
@@ -20390,13 +20577,13 @@ function indentLines(value, map3) {
20390
20577
  }
20391
20578
 
20392
20579
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js
20393
- function blockquote(node, _8, context) {
20580
+ function blockquote(node, _6, context) {
20394
20581
  const exit2 = context.enter("blockquote");
20395
20582
  const value = indentLines(containerFlow(node, context), map);
20396
20583
  exit2();
20397
20584
  return value;
20398
20585
  }
20399
- function map(line, _8, blank) {
20586
+ function map(line, _6, blank) {
20400
20587
  return ">" + (blank ? "" : " ") + line;
20401
20588
  }
20402
20589
 
@@ -20421,7 +20608,7 @@ function listInScope(stack, list3, none) {
20421
20608
  }
20422
20609
 
20423
20610
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/break.js
20424
- function hardBreak(_8, _1, context, safe2) {
20611
+ function hardBreak(_6, _1, context, safe2) {
20425
20612
  let index2 = -1;
20426
20613
  while (++index2 < context.unsafe.length) {
20427
20614
  if (context.unsafe[index2].character === "\n" && patternInScope(context.stack, context.unsafe[index2])) {
@@ -20561,7 +20748,7 @@ function escapeBackslashes(value, after) {
20561
20748
  }
20562
20749
 
20563
20750
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/code.js
20564
- function code(node, _8, context) {
20751
+ function code(node, _6, context) {
20565
20752
  const marker = checkFence(context);
20566
20753
  const raw = node.value || "";
20567
20754
  const suffix = marker === "`" ? "GraveAccent" : "Tilde";
@@ -20602,7 +20789,7 @@ function code(node, _8, context) {
20602
20789
  exit2();
20603
20790
  return value;
20604
20791
  }
20605
- function map2(line, _8, blank) {
20792
+ function map2(line, _6, blank) {
20606
20793
  return (blank ? "" : " ") + line;
20607
20794
  }
20608
20795
 
@@ -20624,7 +20811,7 @@ function checkQuote(context) {
20624
20811
  }
20625
20812
 
20626
20813
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/definition.js
20627
- function definition2(node, _8, context) {
20814
+ function definition2(node, _6, context) {
20628
20815
  const marker = checkQuote(context);
20629
20816
  const suffix = marker === '"' ? "Quote" : "Apostrophe";
20630
20817
  const exit2 = context.enter("definition");
@@ -20693,7 +20880,7 @@ function containerPhrasing(parent, context, safeOptions) {
20693
20880
 
20694
20881
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js
20695
20882
  emphasis.peek = emphasisPeek;
20696
- function emphasis(node, _8, context) {
20883
+ function emphasis(node, _6, context) {
20697
20884
  const marker = checkEmphasis(context);
20698
20885
  const exit2 = context.enter("emphasis");
20699
20886
  const value = containerPhrasing(node, context, {
@@ -20703,7 +20890,7 @@ function emphasis(node, _8, context) {
20703
20890
  exit2();
20704
20891
  return marker + value + marker;
20705
20892
  }
20706
- function emphasisPeek(_8, _1, context) {
20893
+ function emphasisPeek(_6, _1, context) {
20707
20894
  return context.options.emphasis || "*";
20708
20895
  }
20709
20896
 
@@ -20720,7 +20907,7 @@ function formatHeadingAsSetext(node, context) {
20720
20907
  }
20721
20908
 
20722
20909
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/heading.js
20723
- function heading(node, _8, context) {
20910
+ function heading(node, _6, context) {
20724
20911
  const rank = Math.max(Math.min(6, node.depth || 1), 1);
20725
20912
  if (formatHeadingAsSetext(node, context)) {
20726
20913
  const exit3 = context.enter("headingSetext");
@@ -20757,7 +20944,7 @@ function htmlPeek() {
20757
20944
 
20758
20945
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/image.js
20759
20946
  image.peek = imagePeek;
20760
- function image(node, _8, context) {
20947
+ function image(node, _6, context) {
20761
20948
  const quote = checkQuote(context);
20762
20949
  const suffix = quote === '"' ? "Quote" : "Apostrophe";
20763
20950
  const exit2 = context.enter("image");
@@ -20790,7 +20977,7 @@ function imagePeek() {
20790
20977
 
20791
20978
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js
20792
20979
  imageReference.peek = imageReferencePeek;
20793
- function imageReference(node, _8, context) {
20980
+ function imageReference(node, _6, context) {
20794
20981
  const type = node.referenceType;
20795
20982
  const exit2 = context.enter("imageReference");
20796
20983
  let subexit = context.enter("label");
@@ -20817,7 +21004,7 @@ function imageReferencePeek() {
20817
21004
 
20818
21005
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js
20819
21006
  inlineCode.peek = inlineCodePeek;
20820
- function inlineCode(node, _8, context) {
21007
+ function inlineCode(node, _6, context) {
20821
21008
  let value = node.value || "";
20822
21009
  let sequence = "`";
20823
21010
  let index2 = -1;
@@ -20855,7 +21042,7 @@ function formatLinkAsAutolink(node, context) {
20855
21042
 
20856
21043
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/link.js
20857
21044
  link.peek = linkPeek;
20858
- function link(node, _8, context) {
21045
+ function link(node, _6, context) {
20859
21046
  const quote = checkQuote(context);
20860
21047
  const suffix = quote === '"' ? "Quote" : "Apostrophe";
20861
21048
  let exit2;
@@ -20894,13 +21081,13 @@ function link(node, _8, context) {
20894
21081
  exit2();
20895
21082
  return value;
20896
21083
  }
20897
- function linkPeek(node, _8, context) {
21084
+ function linkPeek(node, _6, context) {
20898
21085
  return formatLinkAsAutolink(node, context) ? "<" : "[";
20899
21086
  }
20900
21087
 
20901
21088
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js
20902
21089
  linkReference.peek = linkReferencePeek;
20903
- function linkReference(node, _8, context) {
21090
+ function linkReference(node, _6, context) {
20904
21091
  const type = node.referenceType;
20905
21092
  const exit2 = context.enter("linkReference");
20906
21093
  let subexit = context.enter("label");
@@ -21058,7 +21245,7 @@ function listItem(node, parent, context) {
21058
21245
  }
21059
21246
 
21060
21247
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js
21061
- function paragraph(node, _8, context) {
21248
+ function paragraph(node, _6, context) {
21062
21249
  const exit2 = context.enter("paragraph");
21063
21250
  const subexit = context.enter("phrasing");
21064
21251
  const value = containerPhrasing(node, context, { before: "\n", after: "\n" });
@@ -21068,7 +21255,7 @@ function paragraph(node, _8, context) {
21068
21255
  }
21069
21256
 
21070
21257
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/root.js
21071
- function root(node, _8, context) {
21258
+ function root(node, _6, context) {
21072
21259
  return containerFlow(node, context);
21073
21260
  }
21074
21261
 
@@ -21083,7 +21270,7 @@ function checkStrong(context) {
21083
21270
 
21084
21271
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/strong.js
21085
21272
  strong.peek = strongPeek;
21086
- function strong(node, _8, context) {
21273
+ function strong(node, _6, context) {
21087
21274
  const marker = checkStrong(context);
21088
21275
  const exit2 = context.enter("strong");
21089
21276
  const value = containerPhrasing(node, context, {
@@ -21093,12 +21280,12 @@ function strong(node, _8, context) {
21093
21280
  exit2();
21094
21281
  return marker + marker + value + marker + marker;
21095
21282
  }
21096
- function strongPeek(_8, _1, context) {
21283
+ function strongPeek(_6, _1, context) {
21097
21284
  return context.options.strong || "*";
21098
21285
  }
21099
21286
 
21100
21287
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/text.js
21101
- function text3(node, _8, context, safeOptions) {
21288
+ function text3(node, _6, context, safeOptions) {
21102
21289
  return safe(context, node.value, safeOptions);
21103
21290
  }
21104
21291
 
@@ -21112,7 +21299,7 @@ function checkRuleRepetition(context) {
21112
21299
  }
21113
21300
 
21114
21301
  // pnp:/Users/jeffsee/code/tinacms/.yarn/cache/mdast-util-to-markdown-npm-1.2.3-e27fe7fcf9-d50b5c4a9f.zip/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js
21115
- function thematicBreak2(_8, _1, context) {
21302
+ function thematicBreak2(_6, _1, context) {
21116
21303
  const value = (checkRule(context) + (context.options.ruleSpaces ? " " : "")).repeat(checkRuleRepetition(context));
21117
21304
  return context.options.ruleSpaces ? value.slice(0, -1) : value;
21118
21305
  }
@@ -21259,8 +21446,8 @@ function toMarkdown(tree, options = {}) {
21259
21446
  result += "\n";
21260
21447
  }
21261
21448
  return result;
21262
- function enter(name) {
21263
- context.stack.push(name);
21449
+ function enter(name2) {
21450
+ context.stack.push(name2);
21264
21451
  return exit2;
21265
21452
  function exit2() {
21266
21453
  context.stack.pop();
@@ -21615,7 +21802,7 @@ var mdxJsxToMarkdown = {
21615
21802
  fences: true,
21616
21803
  resourceLink: true
21617
21804
  };
21618
- function mdxElement(node, _8, context) {
21805
+ function mdxElement(node, _6, context) {
21619
21806
  const selfClosing = node.name && (!node.children || node.children.length === 0);
21620
21807
  const quote = checkQuote(context);
21621
21808
  const exit2 = context.enter(node.type);
@@ -21651,7 +21838,7 @@ function peekElement() {
21651
21838
  }
21652
21839
  function indent(value) {
21653
21840
  return indentLines(value, map3);
21654
- function map3(line, _8, blank) {
21841
+ function map3(line, _6, blank) {
21655
21842
  return (blank ? "" : " ") + line;
21656
21843
  }
21657
21844
  }
@@ -21695,10 +21882,23 @@ var stringifyChildren = (children, field) => {
21695
21882
  var stringify = (node, field) => {
21696
21883
  var _a;
21697
21884
  if (!node.type) {
21698
- return {
21699
- type: "text",
21700
- value: node.text || ""
21701
- };
21885
+ if (node == null ? void 0 : node.code) {
21886
+ return {
21887
+ type: "inlineCode",
21888
+ value: node.text
21889
+ };
21890
+ }
21891
+ let returnNode = { type: "text", value: node.text || "" };
21892
+ if (node == null ? void 0 : node.bold) {
21893
+ returnNode = { type: "strong", children: [returnNode] };
21894
+ }
21895
+ if (node == null ? void 0 : node.italic) {
21896
+ returnNode = {
21897
+ type: "emphasis",
21898
+ children: [returnNode]
21899
+ };
21900
+ }
21901
+ return returnNode;
21702
21902
  }
21703
21903
  switch (node.type) {
21704
21904
  case plateElements.ELEMENT_H1:
@@ -21750,10 +21950,8 @@ var stringify = (node, field) => {
21750
21950
  return {
21751
21951
  type: "code",
21752
21952
  lang: node.lang,
21753
- value: stringifyChildren(node.children, field).join("\n")
21953
+ value: node.children.map((child) => child.children[0].text).join("\n")
21754
21954
  };
21755
- case "code_line":
21756
- return stringifyChildren(node.children, field).join("\n");
21757
21955
  case plateElements.ELEMENT_UL:
21758
21956
  return {
21759
21957
  type: "list",
@@ -22033,10 +22231,23 @@ ${out}
22033
22231
  console.log(e);
22034
22232
  }
22035
22233
  case "text":
22036
- return {
22037
- type: "text",
22038
- value: node.text || ""
22039
- };
22234
+ if (node == null ? void 0 : node.code) {
22235
+ return {
22236
+ type: "inlineCode",
22237
+ value: node.text
22238
+ };
22239
+ }
22240
+ let returnNode = { type: "text", value: node.text || "" };
22241
+ if (node == null ? void 0 : node.bold) {
22242
+ returnNode = { type: "strong", children: [returnNode] };
22243
+ }
22244
+ if (node == null ? void 0 : node.italic) {
22245
+ returnNode = {
22246
+ type: "emphasis",
22247
+ children: [returnNode]
22248
+ };
22249
+ }
22250
+ return returnNode;
22040
22251
  default:
22041
22252
  console.log(`Unrecognized field type: ${node.type}`);
22042
22253
  break;
@@ -22425,9 +22636,15 @@ var Resolver = class {
22425
22636
  assertShape(rawData, (yup3) => yup3.object());
22426
22637
  const value = rawData[field.name];
22427
22638
  switch (field.type) {
22639
+ case "datetime":
22640
+ if (value instanceof Date) {
22641
+ accumulator[field.name] = value.toISOString();
22642
+ } else {
22643
+ accumulator[field.name] = value;
22644
+ }
22645
+ break;
22428
22646
  case "string":
22429
22647
  case "boolean":
22430
- case "datetime":
22431
22648
  case "number":
22432
22649
  case "reference":
22433
22650
  case "image":
@@ -22520,7 +22737,8 @@ var Resolver = class {
22520
22737
  }, field), extraFields);
22521
22738
  case "image":
22522
22739
  return __spreadValues(__spreadValues({
22523
- component: "image"
22740
+ component: "image",
22741
+ clearable: true
22524
22742
  }, field), extraFields);
22525
22743
  case "string":
22526
22744
  if (field.options) {
@@ -22640,7 +22858,8 @@ var resolveDateInput = (value) => {
22640
22858
  var resolve = async ({
22641
22859
  query,
22642
22860
  variables,
22643
- database
22861
+ database,
22862
+ silenceErrors
22644
22863
  }) => {
22645
22864
  try {
22646
22865
  const graphQLSchemaAst = await database.getGraphQLSchema();
@@ -22655,7 +22874,7 @@ var resolve = async ({
22655
22874
  const referencePathVisitor = () => {
22656
22875
  return {
22657
22876
  leave: {
22658
- Field(node, key2, parent, path11, ancestors) {
22877
+ Field(node, key2, parent, path6, ancestors) {
22659
22878
  const type = typeInfo.getType();
22660
22879
  if (type) {
22661
22880
  const realType = (0, import_graphql3.getNamedType)(type);
@@ -22665,7 +22884,7 @@ var resolve = async ({
22665
22884
  const p = [];
22666
22885
  ancestors.forEach((item, index2) => {
22667
22886
  var _a;
22668
- const activePath = path11[index2];
22887
+ const activePath = path6[index2];
22669
22888
  const result = item[activePath];
22670
22889
  if ((_a = result == null ? void 0 : result.name) == null ? void 0 : _a.value) {
22671
22890
  if (result.kind === "Field") {
@@ -22823,11 +23042,15 @@ var resolve = async ({
22823
23042
  }
22824
23043
  });
22825
23044
  if (res.errors) {
22826
- console.error(res.errors);
23045
+ if (!silenceErrors) {
23046
+ console.error(res.errors);
23047
+ }
22827
23048
  }
22828
23049
  return res;
22829
23050
  } catch (e) {
22830
- console.error(e);
23051
+ if (!silenceErrors) {
23052
+ console.error(e);
23053
+ }
22831
23054
  if (e instanceof import_graphql3.GraphQLError) {
22832
23055
  return {
22833
23056
  errors: [e]
@@ -22837,17 +23060,17 @@ var resolve = async ({
22837
23060
  }
22838
23061
  }
22839
23062
  };
22840
- var buildPath = (path11, accum) => {
22841
- if (path11.prev) {
22842
- buildPath(path11.prev, accum);
23063
+ var buildPath = (path6, accum) => {
23064
+ if (path6.prev) {
23065
+ buildPath(path6.prev, accum);
22843
23066
  }
22844
- accum.push(path11.key);
23067
+ accum.push(path6.key);
22845
23068
  return accum;
22846
23069
  };
22847
- var buildReferenceQuery = (fieldNode, path11) => {
23070
+ var buildReferenceQuery = (fieldNode, path6) => {
22848
23071
  if (fieldNode) {
22849
- const p = path11.map((item) => item === "data" ? "form" : item);
22850
- const dataPath = path11;
23072
+ const p = path6.map((item) => item === "data" ? "form" : item);
23073
+ const dataPath = path6;
22851
23074
  const newNode = __spreadProps(__spreadValues({}, fieldNode), {
22852
23075
  name: { kind: "Name", value: "node" },
22853
23076
  arguments: [
@@ -23450,499 +23673,25 @@ var _indexAttribute = async ({
23450
23673
  return fieldName;
23451
23674
  };
23452
23675
 
23453
- // pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/database/bridge/github.ts
23454
- var import_lodash8 = __toModule(require("lodash"));
23455
- var import_path5 = __toModule(require("path"));
23456
- var import_rest = __toModule(require("@octokit/rest"));
23457
- var import_graphql5 = __toModule(require("graphql"));
23458
- var GithubBridge = class {
23459
- constructor({ rootPath, accessToken, owner, repo, ref }) {
23460
- this.rootPath = rootPath;
23461
- this.repoConfig = {
23462
- owner,
23463
- repo,
23464
- ref
23465
- };
23466
- this.appOctoKit = new import_rest.Octokit({
23467
- auth: accessToken
23468
- });
23469
- }
23470
- async readDir(filepath) {
23471
- const fullPath = import_path5.default.join(this.rootPath, filepath);
23472
- const repos = await this.appOctoKit.repos.getContent(__spreadProps(__spreadValues({}, this.repoConfig), {
23473
- path: fullPath
23474
- })).then(async (response) => {
23475
- if (Array.isArray(response.data)) {
23476
- return await Promise.all(await response.data.map(async (d) => {
23477
- if (d.type === "dir") {
23478
- const nestedItems = await this.readDir(d.path);
23479
- if (Array.isArray(nestedItems)) {
23480
- return nestedItems.map((nestedItem) => {
23481
- return import_path5.default.join(d.path, nestedItem);
23482
- });
23483
- } else {
23484
- throw new Error(`Expected items to be an array of strings for readDir at ${d.path}`);
23485
- }
23486
- }
23487
- return d.path;
23488
- }));
23489
- }
23490
- throw new Error(`Expected to return an array from Github directory ${import_path5.default}`);
23491
- });
23492
- return import_lodash8.default.flatten(repos);
23493
- }
23494
- supportsBuilding() {
23495
- return false;
23496
- }
23497
- async glob(pattern) {
23498
- const results = await this.readDir(pattern);
23499
- return results.map((item) => item.replace(this.rootPath, "").replace(/^\/|\/$/g, ""));
23500
- }
23501
- async get(filepath) {
23502
- const realpath = import_path5.default.join(this.rootPath, filepath);
23503
- return this.appOctoKit.repos.getContent(__spreadProps(__spreadValues({}, this.repoConfig), {
23504
- path: realpath
23505
- })).then((response) => {
23506
- return Buffer.from(response.data.content, "base64").toString();
23507
- }).catch((e) => {
23508
- if (e.status === 401) {
23509
- throw new import_graphql5.GraphQLError(`Unauthorized request to Github Repository: '${this.repoConfig.owner}/${this.repoConfig.repo}', please ensure your access token is valid.`, null, null, null, null, e, { status: e.status });
23510
- }
23511
- throw new import_graphql5.GraphQLError(`Unable to find record '${filepath}' in Github Repository: '${this.repoConfig.owner}/${this.repoConfig.repo}', Ref: '${this.repoConfig.ref}'`, null, null, null, null, e, { status: e.status });
23512
- });
23513
- }
23514
- async putConfig(filepath, data) {
23515
- throw new Error(`Config files cannot be changed by the Github bridge`);
23516
- }
23517
- async put(filepath, data) {
23518
- const realpath = import_path5.default.join(this.rootPath, filepath);
23519
- let fileSha = void 0;
23520
- try {
23521
- const fileContent = await this.appOctoKit.repos.getContent(__spreadProps(__spreadValues({}, this.repoConfig), {
23522
- path: realpath
23523
- }));
23524
- fileSha = fileContent.data.sha;
23525
- } catch (e) {
23526
- console.log("No file exists, creating new one");
23527
- }
23528
- await this.appOctoKit.repos.createOrUpdateFileContents(__spreadProps(__spreadValues({}, this.repoConfig), {
23529
- branch: this.repoConfig.ref,
23530
- path: realpath,
23531
- message: "Update from GraphQL client",
23532
- content: new Buffer(data).toString("base64"),
23533
- sha: fileSha
23534
- }));
23535
- }
23536
- };
23537
-
23538
- // pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/database/store/github.ts
23539
- var import_lodash9 = __toModule(require("lodash"));
23540
- var import_path6 = __toModule(require("path"));
23541
- var import_rest2 = __toModule(require("@octokit/rest"));
23542
- var import_graphql6 = __toModule(require("graphql"));
23543
- var GithubStore = class {
23544
- async clear() {
23545
- }
23546
- async print() {
23547
- }
23548
- constructor({ rootPath, accessToken, owner, repo, ref }) {
23549
- this.rootPath = rootPath;
23550
- this.repoConfig = {
23551
- owner,
23552
- repo,
23553
- ref
23554
- };
23555
- this.appOctoKit = new import_rest2.Octokit({
23556
- auth: accessToken
23557
- });
23558
- }
23559
- async query(queryStrings) {
23560
- throw new Error(`Unable to perform query for GithubStore`);
23561
- }
23562
- supportsSeeding() {
23563
- return false;
23564
- }
23565
- async seed() {
23566
- throw new Error(`Seeding data is not possible for Github data store`);
23567
- }
23568
- async readDir(filepath) {
23569
- const fullPath = import_path6.default.join(this.rootPath, filepath);
23570
- const repos = await this.appOctoKit.repos.getContent(__spreadProps(__spreadValues({}, this.repoConfig), {
23571
- path: fullPath
23572
- })).then(async (response) => {
23573
- if (Array.isArray(response.data)) {
23574
- return await Promise.all(await response.data.map(async (d) => {
23575
- if (d.type === "dir") {
23576
- const nestedItems = await this.readDir(d.path);
23577
- if (Array.isArray(nestedItems)) {
23578
- return nestedItems.map((nestedItem) => {
23579
- return import_path6.default.join(d.path, nestedItem);
23580
- });
23581
- } else {
23582
- throw new Error(`Expected items to be an array of strings for readDir at ${d.path}`);
23583
- }
23584
- }
23585
- return d.path;
23586
- }));
23587
- }
23588
- throw new Error(`Expected to return an array from Github directory ${import_path6.default}`);
23589
- });
23590
- return import_lodash9.default.flatten(repos);
23591
- }
23592
- async glob(pattern, callback) {
23593
- const results = await this.readDir(pattern);
23594
- const items = results.map((item) => item.replace(this.rootPath, "").replace(/^\/|\/$/g, ""));
23595
- if (callback) {
23596
- return sequential(items, async (item) => {
23597
- return callback(item);
23598
- });
23599
- } else {
23600
- return items;
23601
- }
23602
- }
23603
- async get(filepath) {
23604
- const realpath = import_path6.default.join(this.rootPath, filepath);
23605
- return this.appOctoKit.repos.getContent(__spreadProps(__spreadValues({}, this.repoConfig), {
23606
- path: realpath
23607
- })).then((response) => {
23608
- const responseString = Buffer.from(response.data.content, "base64").toString();
23609
- return parseFile(responseString, import_path6.default.extname(filepath), (yup3) => yup3.object());
23610
- }).catch((e) => {
23611
- if (e.status === 401) {
23612
- throw new import_graphql6.GraphQLError(`Unauthorized request to Github Repository: '${this.repoConfig.owner}/${this.repoConfig.repo}', please ensure your access token is valid.`, null, null, null, null, e, { status: e.status });
23613
- }
23614
- throw new import_graphql6.GraphQLError(`Unable to find record '${filepath}' in Github Repository: '${this.repoConfig.owner}/${this.repoConfig.repo}', Ref: '${this.repoConfig.ref}'`, null, null, null, null, e, { status: e.status });
23615
- });
23616
- }
23617
- supportsIndexing() {
23618
- return false;
23619
- }
23620
- async put(filepath, data) {
23621
- const realpath = import_path6.default.join(this.rootPath, filepath);
23622
- let fileSha = void 0;
23623
- try {
23624
- const fileContent = await this.appOctoKit.repos.getContent(__spreadProps(__spreadValues({}, this.repoConfig), {
23625
- path: realpath
23626
- }));
23627
- fileSha = fileContent.data.sha;
23628
- } catch (e) {
23629
- console.log("No file exists, creating new one");
23630
- }
23631
- await this.appOctoKit.repos.createOrUpdateFileContents(__spreadProps(__spreadValues({}, this.repoConfig), {
23632
- branch: this.repoConfig.ref,
23633
- path: realpath,
23634
- message: "Update from GraphQL client",
23635
- content: new Buffer(stringifyFile(data, import_path6.default.extname(filepath), false)).toString("base64"),
23636
- sha: fileSha
23637
- }));
23638
- }
23639
- };
23640
-
23641
- // pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/database/bridge/filesystem.ts
23642
- var import_fs_extra2 = __toModule(require("fs-extra"));
23643
- var import_fast_glob = __toModule(require("fast-glob"));
23644
- var import_path7 = __toModule(require("path"));
23645
- var import_normalize_path = __toModule(require("normalize-path"));
23646
- var FilesystemBridge = class {
23647
- constructor(rootPath) {
23648
- this.rootPath = rootPath || "";
23649
- }
23650
- async glob(pattern) {
23651
- const basePath = import_path7.default.join(this.rootPath, ...pattern.split("/"));
23652
- const items = await (0, import_fast_glob.default)(import_path7.default.join(basePath, "**", "/*").replace(/\\/g, "/"), {
23653
- dot: true
23654
- });
23655
- const posixRootPath = (0, import_normalize_path.default)(this.rootPath);
23656
- return items.map((item) => {
23657
- return item.replace(posixRootPath, "").replace(/^\/|\/$/g, "");
23658
- });
23659
- }
23660
- supportsBuilding() {
23661
- return true;
23662
- }
23663
- async get(filepath) {
23664
- return import_fs_extra2.default.readFileSync(import_path7.default.join(this.rootPath, filepath)).toString();
23665
- }
23666
- async putConfig(filepath, data) {
23667
- await this.put(filepath, data);
23668
- }
23669
- async put(filepath, data) {
23670
- await import_fs_extra2.default.outputFileSync(import_path7.default.join(this.rootPath, filepath), data);
23671
- }
23672
- };
23673
-
23674
- // pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/database/store/filesystem.ts
23675
- var import_fs_extra3 = __toModule(require("fs-extra"));
23676
- var import_fast_glob2 = __toModule(require("fast-glob"));
23677
- var import_path8 = __toModule(require("path"));
23678
- var import_normalize_path2 = __toModule(require("normalize-path"));
23679
- var FilesystemStore = class {
23680
- async clear() {
23681
- }
23682
- async print() {
23683
- }
23684
- constructor({ rootPath }) {
23685
- this.rootPath = rootPath || "";
23686
- }
23687
- async query(queryStrings) {
23688
- throw new Error(`Unable to perform query for Filesystem store`);
23689
- }
23690
- async seed() {
23691
- throw new Error(`Seeding data is not possible for Filesystem store`);
23692
- }
23693
- async get(filepath) {
23694
- return parseFile(await import_fs_extra3.default.readFileSync(import_path8.default.join(this.rootPath, filepath)).toString(), import_path8.default.extname(filepath), (yup3) => yup3.object());
23695
- }
23696
- supportsSeeding() {
23697
- return false;
23698
- }
23699
- supportsIndexing() {
23700
- return false;
23701
- }
23702
- async glob(pattern, callback) {
23703
- const basePath = import_path8.default.join(this.rootPath, ...pattern.split("/"));
23704
- const itemsRaw = await (0, import_fast_glob2.default)(import_path8.default.join(basePath, "**", "/*").replace(/\\/g, "/"), {
23705
- dot: true
23706
- });
23707
- const posixRootPath = (0, import_normalize_path2.default)(this.rootPath);
23708
- const items = itemsRaw.map((item) => {
23709
- return item.replace(posixRootPath, "").replace(/^\/|\/$/g, "");
23710
- });
23711
- if (callback) {
23712
- return sequential(items, async (item) => {
23713
- return callback(item);
23714
- });
23715
- } else {
23716
- return items;
23717
- }
23718
- }
23719
- async put(filepath, data) {
23720
- await import_fs_extra3.default.outputFileSync(import_path8.default.join(this.rootPath, filepath), stringifyFile(data, import_path8.default.extname(filepath), false));
23721
- }
23722
- };
23723
-
23724
- // pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/database/store/memory.ts
23725
- var MemoryStore = class {
23726
- constructor(rootPath, object2 = {}) {
23727
- this.map = object2;
23728
- this.rootPath = rootPath || "";
23729
- this.db = {
23730
- get: async (filepath) => {
23731
- return this.map[filepath];
23732
- },
23733
- put: async (filepath, content3) => {
23734
- this.map[filepath] = content3;
23735
- await this.print();
23736
- }
23737
- };
23738
- }
23739
- async query(queryStrings, hydrator) {
23740
- const resultSets = await sequential(queryStrings, async (queryString) => {
23741
- const res = await this.get(queryString);
23742
- return res || [];
23743
- });
23744
- let items = [];
23745
- if (resultSets.length > 0) {
23746
- items = resultSets.reduce((p, c) => p.filter((e) => c.includes(e)));
23747
- }
23748
- return sequential(items, async (documentString) => {
23749
- return hydrator(documentString);
23750
- });
23751
- }
23752
- async seed(filepath, data) {
23753
- await this.put(filepath, data);
23754
- }
23755
- supportsSeeding() {
23756
- return true;
23757
- }
23758
- supportsIndexing() {
23759
- return true;
23760
- }
23761
- async print() {
23762
- }
23763
- async clear() {
23764
- this.map = {};
23765
- }
23766
- async glob(pattern, callback) {
23767
- const strings = Object.keys(this.map).filter((key2) => {
23768
- if (key2.startsWith(pattern)) {
23769
- return true;
23770
- } else {
23771
- return false;
23772
- }
23773
- });
23774
- if (callback) {
23775
- return sequential(strings, async (item) => {
23776
- return callback(item);
23777
- });
23778
- } else {
23779
- return strings;
23780
- }
23781
- }
23782
- async get(filepath) {
23783
- const content3 = await this.db.get(filepath);
23784
- return content3;
23785
- }
23786
- async put(filepath, data) {
23787
- await this.db.put(filepath, data);
23788
- }
23789
- };
23790
-
23791
- // pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/database/store/level.ts
23792
- var import_path9 = __toModule(require("path"));
23793
- var import_level = __toModule(require("level"));
23794
- var import_levelup = __toModule(require("levelup"));
23795
- var import_memdown = __toModule(require("memdown"));
23796
- var import_encoding_down = __toModule(require("encoding-down"));
23797
- var LevelStore = class {
23798
- constructor(rootPath, useMemory = false) {
23799
- this.rootPath = rootPath || "";
23800
- if (useMemory) {
23801
- const db = (0, import_levelup.default)((0, import_encoding_down.default)((0, import_memdown.default)(), { valueEncoding: "json" }));
23802
- this.db = db;
23803
- } else {
23804
- const db = (0, import_level.default)(import_path9.default.join(rootPath, ".tina/__generated__/db"), {
23805
- valueEncoding: "json"
23806
- });
23807
- this.db = db;
23808
- }
23809
- }
23810
- async query(queryStrings, hydrator) {
23811
- const resultSets = await sequential(queryStrings, async (queryString) => {
23812
- let strings = [];
23813
- const p = new Promise((resolve2, reject) => {
23814
- this.db.createReadStream({
23815
- gte: queryString,
23816
- lte: queryString + "\xFF"
23817
- }).on("data", (data) => {
23818
- strings = [...strings, ...data.value];
23819
- }).on("error", (message) => {
23820
- reject(message);
23821
- }).on("end", function() {
23822
- resolve2();
23823
- });
23824
- });
23825
- await p;
23826
- return strings || [];
23827
- });
23828
- let items = [];
23829
- if (resultSets.length > 0) {
23830
- items = resultSets.reduce((p, c) => p.filter((e) => c.includes(e)));
23831
- }
23832
- return sequential(items, async (documentString) => {
23833
- return hydrator(documentString);
23834
- });
23835
- }
23836
- async seed(filepath, data) {
23837
- await this.put(filepath, data);
23838
- }
23839
- supportsSeeding() {
23840
- return true;
23841
- }
23842
- supportsIndexing() {
23843
- return true;
23844
- }
23845
- async print() {
23846
- this.db.createReadStream().on("data", function(data) {
23847
- console.log(data.key, "=", data.value);
23848
- }).on("error", function(err) {
23849
- console.log("Oh my!", err);
23850
- }).on("close", function() {
23851
- console.log("Stream closed");
23852
- }).on("end", function() {
23853
- console.log("Stream ended");
23854
- });
23855
- }
23856
- async open() {
23857
- await this.db.open();
23858
- }
23859
- async clear() {
23860
- await this.db.clear();
23861
- }
23862
- async glob(pattern, callback) {
23863
- const strings = [];
23864
- const p = new Promise((resolve2, reject) => {
23865
- this.db.createKeyStream({
23866
- gte: pattern,
23867
- lte: pattern + "\xFF"
23868
- }).on("data", (data) => {
23869
- strings.push(data);
23870
- }).on("error", (message) => {
23871
- reject(message);
23872
- }).on("end", function() {
23873
- resolve2();
23874
- });
23875
- });
23876
- await p;
23877
- if (callback) {
23878
- return sequential(strings, async (item) => {
23879
- return callback(item);
23880
- });
23881
- } else {
23882
- return strings;
23883
- }
23884
- }
23885
- async get(filepath) {
23886
- try {
23887
- const content3 = await this.db.get(filepath);
23888
- return content3;
23889
- } catch (e) {
23890
- return void 0;
23891
- }
23892
- }
23893
- async put(filepath, data) {
23894
- await this.db.put(filepath, data);
23895
- }
23896
- };
23897
-
23898
23676
  // pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/index.ts
23899
- var import_rest3 = __toModule(require("@octokit/rest"));
23900
23677
  var buildSchema = async (rootPath, database) => {
23901
- const tempConfig = import_path10.default.join(rootPath, ".tina", "__generated__", "config");
23902
- const config = await import_fs_extra4.default.readFileSync(import_path10.default.join(tempConfig, "schema.json")).toString();
23903
- await import_fs_extra4.default.rmdir(tempConfig, { recursive: true });
23678
+ const tempConfig = import_path5.default.join(rootPath, ".tina", "__generated__", "config");
23679
+ const config = await import_fs_extra2.default.readFileSync(import_path5.default.join(tempConfig, "schema.json")).toString();
23680
+ await import_fs_extra2.default.rmdir(tempConfig, { recursive: true });
23904
23681
  await indexDB({ database, config: JSON.parse(config) });
23905
23682
  const gqlAst = await database.getGraphQLSchemaFromBridge();
23906
- return (0, import_graphql7.buildASTSchema)(gqlAst);
23907
- };
23908
- var listBranches = async ({ auth, owner, repo }) => {
23909
- const appOctoKit = new import_rest3.Octokit({ auth });
23910
- const branchList = await appOctoKit.repos.listBranches({
23911
- owner,
23912
- repo,
23913
- per_page: 100
23914
- });
23915
- return branchList;
23916
- };
23917
- var createBranch = async ({ auth, owner, repo, name, baseBranch }) => {
23918
- const appOctoKit = new import_rest3.Octokit({ auth });
23919
- const currentBranch = await appOctoKit.repos.getBranch({
23920
- owner,
23921
- repo,
23922
- branch: baseBranch
23923
- });
23924
- const newBranch = await appOctoKit.git.createRef({
23925
- owner,
23926
- repo,
23927
- ref: `refs/heads/${name}`,
23928
- sha: currentBranch.data.commit.sha
23929
- });
23930
- return newBranch;
23683
+ return (0, import_graphql5.buildASTSchema)(gqlAst);
23931
23684
  };
23932
23685
  // Annotate the CommonJS export names for ESM import in node:
23933
23686
  0 && (module.exports = {
23934
- FilesystemBridge,
23935
- FilesystemStore,
23936
- GithubBridge,
23937
- GithubStore,
23938
- LevelStore,
23939
- MemoryStore,
23687
+ assertShape,
23940
23688
  buildSchema,
23941
- createBranch,
23942
23689
  createDatabase,
23943
23690
  indexDB,
23944
- listBranches,
23945
- resolve
23691
+ parseFile,
23692
+ resolve,
23693
+ sequential,
23694
+ stringifyFile
23946
23695
  });
23947
23696
  /*!
23948
23697
  * Determine if an object is a Buffer