@tinacms/graphql 0.58.0 → 0.59.2
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/CHANGELOG.md +34 -0
- package/dist/build.d.ts +2 -1
- package/dist/index.js +342 -177
- package/dist/schema/index.d.ts +23 -3
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# tina-graphql
|
|
2
2
|
|
|
3
|
+
## 0.59.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 212685fc3: Allow indexDB to skip building the query and fragment generation files
|
|
8
|
+
|
|
9
|
+
## 0.59.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- f46c6f987: Fix type definitions for schema metadata so they're optional
|
|
14
|
+
|
|
15
|
+
## 0.59.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 62bea7019: #2323: fix saving bold and italic text in rich-text editor
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- bd4e1f802: Pin version number from @tinacms/graphql during schema compilation. This can be used to ensure the proper version is provided when working with Tina Cloud
|
|
24
|
+
|
|
25
|
+
## 0.58.2
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- fffce3af8: Don't cache graphql schema during resolution, this was causing the schema to go stale, while updating the schema.gql, so GraphQL tooling thought the value was updated, but the server was still holding on to the cached version
|
|
30
|
+
|
|
31
|
+
## 0.58.1
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- 4700d7ae4: Patch fix to ensure builds include latest dependencies
|
|
36
|
+
|
|
3
37
|
## 0.58.0
|
|
4
38
|
|
|
5
39
|
### Minor Changes
|
package/dist/build.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ limitations under the License.
|
|
|
12
12
|
*/
|
|
13
13
|
import type { TinaSchema } from './schema';
|
|
14
14
|
import { Database } from './database';
|
|
15
|
-
export declare const indexDB: ({ database, config, }: {
|
|
15
|
+
export declare const indexDB: ({ database, config, buildSDK, }: {
|
|
16
16
|
database: Database;
|
|
17
17
|
config: TinaSchema['config'];
|
|
18
|
+
buildSDK?: boolean;
|
|
18
19
|
}) => Promise<void>;
|
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
|
|
43
|
-
__defProp(target,
|
|
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,
|
|
177
|
-
if (
|
|
178
|
-
if (!hasOwn.call(obj,
|
|
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,
|
|
181
|
+
return gOPD(obj, name2).value;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
return obj[
|
|
184
|
+
return obj[name2];
|
|
185
185
|
};
|
|
186
186
|
module2.exports = function extend2() {
|
|
187
|
-
var options,
|
|
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 (
|
|
204
|
-
src = getProperty(target,
|
|
205
|
-
copy = getProperty(options,
|
|
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 =
|
|
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
|
|
872
|
+
function name2(name3) {
|
|
873
873
|
var index2 = -1;
|
|
874
|
-
while (++index2 <
|
|
875
|
-
if (!(index2 ? cont : start)(
|
|
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(
|
|
1486
|
-
return new TokenType(
|
|
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(
|
|
1490
|
+
function kw(name2, options) {
|
|
1491
1491
|
if (options === void 0)
|
|
1492
1492
|
options = {};
|
|
1493
|
-
options.keyword =
|
|
1494
|
-
return keywords$1[
|
|
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(
|
|
1844
|
-
return this.type === types.name && this.value ===
|
|
1843
|
+
pp.isContextual = function(name2) {
|
|
1844
|
+
return this.type === types.name && this.value === name2 && !this.containsEsc;
|
|
1845
1845
|
};
|
|
1846
|
-
pp.eatContextual = function(
|
|
1847
|
-
if (!this.isContextual(
|
|
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(
|
|
1854
|
-
if (!this.eatContextual(
|
|
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
|
|
1949
|
-
this.raiseRecoverable(this.undefinedExports[
|
|
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
|
|
2672
|
-
var curr = privateNameMap[
|
|
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[
|
|
2678
|
+
privateNameMap[name2] = "true";
|
|
2679
2679
|
return false;
|
|
2680
2680
|
} else if (!curr) {
|
|
2681
|
-
privateNameMap[
|
|
2681
|
+
privateNameMap[name2] = next;
|
|
2682
2682
|
return false;
|
|
2683
2683
|
} else {
|
|
2684
2684
|
return true;
|
|
2685
2685
|
}
|
|
2686
2686
|
}
|
|
2687
|
-
function checkKeyName(node,
|
|
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 ===
|
|
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,
|
|
2759
|
+
pp$1.checkExport = function(exports3, name2, pos) {
|
|
2760
2760
|
if (!exports3) {
|
|
2761
2761
|
return;
|
|
2762
2762
|
}
|
|
2763
|
-
if (has(exports3,
|
|
2764
|
-
this.raiseRecoverable(pos, "Duplicate export '" +
|
|
2763
|
+
if (has(exports3, name2)) {
|
|
2764
|
+
this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'");
|
|
2765
2765
|
}
|
|
2766
|
-
exports3[
|
|
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
|
|
3275
|
+
var name2;
|
|
3276
3276
|
switch (key2.type) {
|
|
3277
3277
|
case "Identifier":
|
|
3278
|
-
|
|
3278
|
+
name2 = key2.name;
|
|
3279
3279
|
break;
|
|
3280
3280
|
case "Literal":
|
|
3281
|
-
|
|
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 (
|
|
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
|
-
|
|
3303
|
-
var other = propHash[
|
|
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[
|
|
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
|
|
4170
|
-
if (this.inGenerator &&
|
|
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 &&
|
|
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 &&
|
|
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 && (
|
|
4180
|
-
this.raise(start, "Cannot use " +
|
|
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(
|
|
4183
|
-
this.raise(start, "Unexpected keyword '" +
|
|
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(
|
|
4190
|
-
if (!this.inAsync &&
|
|
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 '" +
|
|
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(
|
|
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(
|
|
4296
|
-
scope.lexical.push(
|
|
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[
|
|
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(
|
|
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(
|
|
4306
|
+
redeclared = scope$2.lexical.indexOf(name2) > -1;
|
|
4307
4307
|
} else {
|
|
4308
|
-
redeclared = scope$2.lexical.indexOf(
|
|
4308
|
+
redeclared = scope$2.lexical.indexOf(name2) > -1 || scope$2.var.indexOf(name2) > -1;
|
|
4309
4309
|
}
|
|
4310
|
-
scope$2.functions.push(
|
|
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(
|
|
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(
|
|
4318
|
+
scope$3.var.push(name2);
|
|
4319
4319
|
if (this.inModule && scope$3.flags & SCOPE_TOP) {
|
|
4320
|
-
delete this.undefinedExports[
|
|
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 '" +
|
|
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
|
|
4572
|
-
if (state.groupNames.indexOf(
|
|
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
|
|
5011
|
+
var name2 = state.lastStringValue;
|
|
5012
5012
|
if (this.regexp_eatUnicodePropertyValue(state)) {
|
|
5013
5013
|
var value = state.lastStringValue;
|
|
5014
|
-
this.regexp_validateUnicodePropertyNameAndValue(state,
|
|
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,
|
|
5027
|
-
if (!has(state.unicodeProperties.nonBinary,
|
|
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[
|
|
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
|
|
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 =
|
|
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
|
|
6568
|
+
let name2 = this.jsx_parseIdentifier();
|
|
6569
6569
|
if (!options.allowNamespaces || !this.eat(tt.colon))
|
|
6570
|
-
return
|
|
6570
|
+
return name2;
|
|
6571
6571
|
var node = this.startNodeAt(startPos, startLoc);
|
|
6572
|
-
node.namespace =
|
|
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
|
|
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[
|
|
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 =
|
|
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 ===
|
|
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 ===
|
|
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 !==
|
|
9641
|
+
if (type !== name2) {
|
|
9642
9642
|
warning(numericEmpty, diff);
|
|
9643
9643
|
}
|
|
9644
|
-
} else if (type ===
|
|
9644
|
+
} else if (type === name2) {
|
|
9645
9645
|
if (terminated && !entity) {
|
|
9646
9646
|
warning(namedUnknown, 1);
|
|
9647
9647
|
} else {
|
|
@@ -10478,11 +10478,11 @@ var SysFieldDefinition = {
|
|
|
10478
10478
|
};
|
|
10479
10479
|
var astBuilder = {
|
|
10480
10480
|
FormFieldBuilder: ({
|
|
10481
|
-
name,
|
|
10481
|
+
name: name2,
|
|
10482
10482
|
additionalFields
|
|
10483
10483
|
}) => {
|
|
10484
10484
|
return astBuilder.ObjectTypeDefinition({
|
|
10485
|
-
name,
|
|
10485
|
+
name: name2,
|
|
10486
10486
|
interfaces: [astBuilder.NamedType({ name: "FormField" })],
|
|
10487
10487
|
fields: [
|
|
10488
10488
|
astBuilder.FieldDefinition({
|
|
@@ -10505,14 +10505,14 @@ var astBuilder = {
|
|
|
10505
10505
|
});
|
|
10506
10506
|
},
|
|
10507
10507
|
ScalarTypeDefinition: ({
|
|
10508
|
-
name,
|
|
10508
|
+
name: name2,
|
|
10509
10509
|
description
|
|
10510
10510
|
}) => {
|
|
10511
10511
|
return {
|
|
10512
10512
|
kind: "ScalarTypeDefinition",
|
|
10513
10513
|
name: {
|
|
10514
10514
|
kind: "Name",
|
|
10515
|
-
value:
|
|
10515
|
+
value: name2
|
|
10516
10516
|
},
|
|
10517
10517
|
description: {
|
|
10518
10518
|
kind: "StringValue",
|
|
@@ -10522,7 +10522,7 @@ var astBuilder = {
|
|
|
10522
10522
|
};
|
|
10523
10523
|
},
|
|
10524
10524
|
InputValueDefinition: ({
|
|
10525
|
-
name,
|
|
10525
|
+
name: name2,
|
|
10526
10526
|
type,
|
|
10527
10527
|
list: list3,
|
|
10528
10528
|
required
|
|
@@ -10539,7 +10539,7 @@ var astBuilder = {
|
|
|
10539
10539
|
kind: "InputValueDefinition",
|
|
10540
10540
|
name: {
|
|
10541
10541
|
kind: "Name",
|
|
10542
|
-
value:
|
|
10542
|
+
value: name2
|
|
10543
10543
|
}
|
|
10544
10544
|
};
|
|
10545
10545
|
if (list3) {
|
|
@@ -10596,17 +10596,17 @@ var astBuilder = {
|
|
|
10596
10596
|
};
|
|
10597
10597
|
},
|
|
10598
10598
|
FieldNodeDefinition: ({
|
|
10599
|
-
name,
|
|
10599
|
+
name: name2,
|
|
10600
10600
|
type,
|
|
10601
10601
|
args = [],
|
|
10602
10602
|
list: list3,
|
|
10603
10603
|
required
|
|
10604
10604
|
}) => ({
|
|
10605
|
-
name: { kind: "Name", value:
|
|
10605
|
+
name: { kind: "Name", value: name2 },
|
|
10606
10606
|
kind: "Field"
|
|
10607
10607
|
}),
|
|
10608
10608
|
FieldDefinition: ({
|
|
10609
|
-
name,
|
|
10609
|
+
name: name2,
|
|
10610
10610
|
type,
|
|
10611
10611
|
args = [],
|
|
10612
10612
|
list: list3,
|
|
@@ -10624,7 +10624,7 @@ var astBuilder = {
|
|
|
10624
10624
|
kind: "FieldDefinition",
|
|
10625
10625
|
name: {
|
|
10626
10626
|
kind: "Name",
|
|
10627
|
-
value:
|
|
10627
|
+
value: name2
|
|
10628
10628
|
},
|
|
10629
10629
|
arguments: args
|
|
10630
10630
|
};
|
|
@@ -10667,7 +10667,7 @@ var astBuilder = {
|
|
|
10667
10667
|
return res;
|
|
10668
10668
|
},
|
|
10669
10669
|
InterfaceTypeDefinition: ({
|
|
10670
|
-
name,
|
|
10670
|
+
name: name2,
|
|
10671
10671
|
fields,
|
|
10672
10672
|
description = ""
|
|
10673
10673
|
}) => {
|
|
@@ -10676,7 +10676,7 @@ var astBuilder = {
|
|
|
10676
10676
|
description: { kind: "StringValue", value: description },
|
|
10677
10677
|
name: {
|
|
10678
10678
|
kind: "Name",
|
|
10679
|
-
value:
|
|
10679
|
+
value: name2
|
|
10680
10680
|
},
|
|
10681
10681
|
interfaces: [],
|
|
10682
10682
|
directives: [],
|
|
@@ -10684,45 +10684,45 @@ var astBuilder = {
|
|
|
10684
10684
|
};
|
|
10685
10685
|
},
|
|
10686
10686
|
InputObjectTypeDefinition: ({
|
|
10687
|
-
name,
|
|
10687
|
+
name: name2,
|
|
10688
10688
|
fields
|
|
10689
10689
|
}) => ({
|
|
10690
10690
|
kind: "InputObjectTypeDefinition",
|
|
10691
10691
|
name: {
|
|
10692
10692
|
kind: "Name",
|
|
10693
|
-
value:
|
|
10693
|
+
value: name2
|
|
10694
10694
|
},
|
|
10695
10695
|
fields
|
|
10696
10696
|
}),
|
|
10697
10697
|
UnionTypeDefinition: ({
|
|
10698
|
-
name,
|
|
10698
|
+
name: name2,
|
|
10699
10699
|
types
|
|
10700
10700
|
}) => ({
|
|
10701
10701
|
kind: "UnionTypeDefinition",
|
|
10702
10702
|
name: {
|
|
10703
10703
|
kind: "Name",
|
|
10704
|
-
value:
|
|
10704
|
+
value: name2
|
|
10705
10705
|
},
|
|
10706
10706
|
directives: [],
|
|
10707
|
-
types: types.map((
|
|
10707
|
+
types: types.map((name3) => ({
|
|
10708
10708
|
kind: "NamedType",
|
|
10709
10709
|
name: {
|
|
10710
10710
|
kind: "Name",
|
|
10711
|
-
value:
|
|
10711
|
+
value: name3
|
|
10712
10712
|
}
|
|
10713
10713
|
}))
|
|
10714
10714
|
}),
|
|
10715
|
-
NamedType: ({ name }) => {
|
|
10715
|
+
NamedType: ({ name: name2 }) => {
|
|
10716
10716
|
return {
|
|
10717
10717
|
kind: "NamedType",
|
|
10718
10718
|
name: {
|
|
10719
10719
|
kind: "Name",
|
|
10720
|
-
value:
|
|
10720
|
+
value: name2
|
|
10721
10721
|
}
|
|
10722
10722
|
};
|
|
10723
10723
|
},
|
|
10724
10724
|
ObjectTypeDefinition: ({
|
|
10725
|
-
name,
|
|
10725
|
+
name: name2,
|
|
10726
10726
|
fields,
|
|
10727
10727
|
interfaces = [],
|
|
10728
10728
|
directives = [],
|
|
@@ -10733,16 +10733,16 @@ var astBuilder = {
|
|
|
10733
10733
|
directives,
|
|
10734
10734
|
name: {
|
|
10735
10735
|
kind: "Name",
|
|
10736
|
-
value:
|
|
10736
|
+
value: name2
|
|
10737
10737
|
},
|
|
10738
10738
|
fields
|
|
10739
10739
|
}),
|
|
10740
10740
|
FieldWithSelectionSetDefinition: ({
|
|
10741
|
-
name,
|
|
10741
|
+
name: name2,
|
|
10742
10742
|
selections
|
|
10743
10743
|
}) => {
|
|
10744
10744
|
return {
|
|
10745
|
-
name: { kind: "Name", value:
|
|
10745
|
+
name: { kind: "Name", value: name2 },
|
|
10746
10746
|
kind: "Field",
|
|
10747
10747
|
selectionSet: {
|
|
10748
10748
|
kind: "SelectionSet",
|
|
@@ -10751,7 +10751,7 @@ var astBuilder = {
|
|
|
10751
10751
|
};
|
|
10752
10752
|
},
|
|
10753
10753
|
InlineFragmentDefinition: ({
|
|
10754
|
-
name,
|
|
10754
|
+
name: name2,
|
|
10755
10755
|
selections
|
|
10756
10756
|
}) => {
|
|
10757
10757
|
return {
|
|
@@ -10764,13 +10764,13 @@ var astBuilder = {
|
|
|
10764
10764
|
kind: "NamedType",
|
|
10765
10765
|
name: {
|
|
10766
10766
|
kind: "Name",
|
|
10767
|
-
value:
|
|
10767
|
+
value: name2
|
|
10768
10768
|
}
|
|
10769
10769
|
}
|
|
10770
10770
|
};
|
|
10771
10771
|
},
|
|
10772
10772
|
FragmentDefinition: ({
|
|
10773
|
-
name,
|
|
10773
|
+
name: name2,
|
|
10774
10774
|
fragmentName,
|
|
10775
10775
|
selections
|
|
10776
10776
|
}) => {
|
|
@@ -10784,7 +10784,7 @@ var astBuilder = {
|
|
|
10784
10784
|
kind: "NamedType",
|
|
10785
10785
|
name: {
|
|
10786
10786
|
kind: "Name",
|
|
10787
|
-
value:
|
|
10787
|
+
value: name2
|
|
10788
10788
|
}
|
|
10789
10789
|
},
|
|
10790
10790
|
directives: [],
|
|
@@ -11341,7 +11341,7 @@ var Builder = class {
|
|
|
11341
11341
|
constructor(config) {
|
|
11342
11342
|
this.config = config;
|
|
11343
11343
|
this.buildCollectionDefinition = async (collections) => {
|
|
11344
|
-
const
|
|
11344
|
+
const name2 = "getCollection";
|
|
11345
11345
|
const typeName = "Collection";
|
|
11346
11346
|
const args = [
|
|
11347
11347
|
astBuilder.InputValueDefinition({
|
|
@@ -11402,20 +11402,20 @@ var Builder = class {
|
|
|
11402
11402
|
documentsType
|
|
11403
11403
|
]
|
|
11404
11404
|
});
|
|
11405
|
-
return astBuilder.FieldDefinition({ type, name, args, required: true });
|
|
11405
|
+
return astBuilder.FieldDefinition({ type, name: name2, args, required: true });
|
|
11406
11406
|
};
|
|
11407
11407
|
this.buildMultiCollectionDefinition = async (collections) => {
|
|
11408
|
-
const
|
|
11408
|
+
const name2 = "getCollections";
|
|
11409
11409
|
const typeName = "Collection";
|
|
11410
11410
|
return astBuilder.FieldDefinition({
|
|
11411
11411
|
type: typeName,
|
|
11412
|
-
name,
|
|
11412
|
+
name: name2,
|
|
11413
11413
|
list: true,
|
|
11414
11414
|
required: true
|
|
11415
11415
|
});
|
|
11416
11416
|
};
|
|
11417
11417
|
this.multiNodeDocument = async () => {
|
|
11418
|
-
const
|
|
11418
|
+
const name2 = "node";
|
|
11419
11419
|
const args = [
|
|
11420
11420
|
astBuilder.InputValueDefinition({
|
|
11421
11421
|
name: "id",
|
|
@@ -11427,7 +11427,7 @@ var Builder = class {
|
|
|
11427
11427
|
resolveType: "nodeDocument"
|
|
11428
11428
|
});
|
|
11429
11429
|
return astBuilder.FieldDefinition({
|
|
11430
|
-
name,
|
|
11430
|
+
name: name2,
|
|
11431
11431
|
args,
|
|
11432
11432
|
list: false,
|
|
11433
11433
|
type: astBuilder.TYPES.Node,
|
|
@@ -11435,7 +11435,7 @@ var Builder = class {
|
|
|
11435
11435
|
});
|
|
11436
11436
|
};
|
|
11437
11437
|
this.multiCollectionDocument = async (collections) => {
|
|
11438
|
-
const
|
|
11438
|
+
const name2 = "getDocument";
|
|
11439
11439
|
const args = [
|
|
11440
11440
|
astBuilder.InputValueDefinition({
|
|
11441
11441
|
name: "collection",
|
|
@@ -11451,7 +11451,7 @@ var Builder = class {
|
|
|
11451
11451
|
collections
|
|
11452
11452
|
});
|
|
11453
11453
|
return astBuilder.FieldDefinition({
|
|
11454
|
-
name,
|
|
11454
|
+
name: name2,
|
|
11455
11455
|
args,
|
|
11456
11456
|
list: false,
|
|
11457
11457
|
type,
|
|
@@ -11553,7 +11553,7 @@ var Builder = class {
|
|
|
11553
11553
|
});
|
|
11554
11554
|
};
|
|
11555
11555
|
this.collectionDocument = async (collection) => {
|
|
11556
|
-
const
|
|
11556
|
+
const name2 = NAMER.queryName([collection.name]);
|
|
11557
11557
|
const type = await this._buildCollectionDocumentType(collection);
|
|
11558
11558
|
const args = [
|
|
11559
11559
|
astBuilder.InputValueDefinition({
|
|
@@ -11568,10 +11568,10 @@ var Builder = class {
|
|
|
11568
11568
|
[NAMER.createName([collection.name])]: "create",
|
|
11569
11569
|
[NAMER.updateName([collection.name])]: "update"
|
|
11570
11570
|
});
|
|
11571
|
-
return astBuilder.FieldDefinition({ type, name, args, required: true });
|
|
11571
|
+
return astBuilder.FieldDefinition({ type, name: name2, args, required: true });
|
|
11572
11572
|
};
|
|
11573
11573
|
this.collectionFragment = async (collection) => {
|
|
11574
|
-
const
|
|
11574
|
+
const name2 = NAMER.dataTypeName(collection.namespace);
|
|
11575
11575
|
const fragmentName = NAMER.fragmentName(collection.namespace);
|
|
11576
11576
|
if (typeof collection.fields === "object") {
|
|
11577
11577
|
const selections = [];
|
|
@@ -11580,7 +11580,7 @@ var Builder = class {
|
|
|
11580
11580
|
selections.push(field);
|
|
11581
11581
|
});
|
|
11582
11582
|
return astBuilder.FragmentDefinition({
|
|
11583
|
-
name,
|
|
11583
|
+
name: name2,
|
|
11584
11584
|
fragmentName,
|
|
11585
11585
|
selections: filterSelections(selections)
|
|
11586
11586
|
});
|
|
@@ -11592,7 +11592,7 @@ var Builder = class {
|
|
|
11592
11592
|
}
|
|
11593
11593
|
});
|
|
11594
11594
|
return astBuilder.FragmentDefinition({
|
|
11595
|
-
name,
|
|
11595
|
+
name: name2,
|
|
11596
11596
|
fragmentName,
|
|
11597
11597
|
selections: filterSelections(selections)
|
|
11598
11598
|
});
|
|
@@ -12059,7 +12059,7 @@ var Builder = class {
|
|
|
12059
12059
|
};
|
|
12060
12060
|
this._buildObjectOrUnionData = async (collectableTemplate) => {
|
|
12061
12061
|
if (collectableTemplate.type === "union") {
|
|
12062
|
-
const
|
|
12062
|
+
const name2 = NAMER.dataTypeName(collectableTemplate.namespace);
|
|
12063
12063
|
const typeMap = {};
|
|
12064
12064
|
const types = await sequential(collectableTemplate.templates, async (template) => {
|
|
12065
12065
|
const type = await this._buildTemplateData(template);
|
|
@@ -12067,11 +12067,11 @@ var Builder = class {
|
|
|
12067
12067
|
return type;
|
|
12068
12068
|
});
|
|
12069
12069
|
await this.database.addToLookupMap({
|
|
12070
|
-
type:
|
|
12070
|
+
type: name2,
|
|
12071
12071
|
resolveType: "unionData",
|
|
12072
12072
|
typeMap
|
|
12073
12073
|
});
|
|
12074
|
-
return astBuilder.UnionTypeDefinition({ name, types });
|
|
12074
|
+
return astBuilder.UnionTypeDefinition({ name: name2, types });
|
|
12075
12075
|
}
|
|
12076
12076
|
return this._buildTemplateData(collectableTemplate.template);
|
|
12077
12077
|
};
|
|
@@ -12194,14 +12194,14 @@ Visit https://tina.io/docs/errors/ui-not-supported/ for more information
|
|
|
12194
12194
|
type: astBuilder.TYPES.JSON
|
|
12195
12195
|
});
|
|
12196
12196
|
case "reference":
|
|
12197
|
-
const
|
|
12197
|
+
const name2 = NAMER.documentTypeName(field.namespace);
|
|
12198
12198
|
if (field.list) {
|
|
12199
12199
|
console.warn(listWarningMsg);
|
|
12200
12200
|
return this._buildMultiCollectionDocumentListDefinition({
|
|
12201
12201
|
fieldName: field.name,
|
|
12202
12202
|
namespace: field.namespace,
|
|
12203
12203
|
nodeType: astBuilder.UnionTypeDefinition({
|
|
12204
|
-
name,
|
|
12204
|
+
name: name2,
|
|
12205
12205
|
types: field.collections.map((collectionName) => NAMER.documentTypeName([collectionName]))
|
|
12206
12206
|
}),
|
|
12207
12207
|
collections: this.tinaSchema.getCollectionsByName(field.collections),
|
|
@@ -12209,7 +12209,7 @@ Visit https://tina.io/docs/errors/ui-not-supported/ for more information
|
|
|
12209
12209
|
});
|
|
12210
12210
|
} else {
|
|
12211
12211
|
const type = await this._buildMultiCollectionDocumentDefinition({
|
|
12212
|
-
fieldName:
|
|
12212
|
+
fieldName: name2,
|
|
12213
12213
|
collections: this.tinaSchema.getCollectionsByName(field.collections)
|
|
12214
12214
|
});
|
|
12215
12215
|
return astBuilder.FieldDefinition({
|
|
@@ -12338,6 +12338,147 @@ var validateField = async (field) => {
|
|
|
12338
12338
|
return field;
|
|
12339
12339
|
};
|
|
12340
12340
|
|
|
12341
|
+
// pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/package.json
|
|
12342
|
+
var name = "@tinacms/graphql";
|
|
12343
|
+
var version = "0.59.2";
|
|
12344
|
+
var main = "dist/index.js";
|
|
12345
|
+
var typings = "dist/index.d.ts";
|
|
12346
|
+
var files = [
|
|
12347
|
+
"package.json",
|
|
12348
|
+
"dist"
|
|
12349
|
+
];
|
|
12350
|
+
var license = "Apache-2.0";
|
|
12351
|
+
var buildConfig = {
|
|
12352
|
+
entryPoints: [
|
|
12353
|
+
{
|
|
12354
|
+
name: "src/index.ts",
|
|
12355
|
+
target: "node",
|
|
12356
|
+
bundle: [
|
|
12357
|
+
"mdast",
|
|
12358
|
+
"mdast-util-from-markdown",
|
|
12359
|
+
"mdast-util-mdx",
|
|
12360
|
+
"mdast-util-mdx-expression",
|
|
12361
|
+
"mdast-util-to-markdown",
|
|
12362
|
+
"micromark-extension-mdxjs",
|
|
12363
|
+
"rehype-format",
|
|
12364
|
+
"rehype-stringify",
|
|
12365
|
+
"remark",
|
|
12366
|
+
"remark-frontmatter",
|
|
12367
|
+
"remark-mdx",
|
|
12368
|
+
"remark-parse",
|
|
12369
|
+
"remark-rehype",
|
|
12370
|
+
"remark-slate",
|
|
12371
|
+
"remark-stringify",
|
|
12372
|
+
"unified",
|
|
12373
|
+
"unist-util-remove-position",
|
|
12374
|
+
"unist-util-visit",
|
|
12375
|
+
"vfile"
|
|
12376
|
+
]
|
|
12377
|
+
}
|
|
12378
|
+
]
|
|
12379
|
+
};
|
|
12380
|
+
var scripts = {
|
|
12381
|
+
types: "yarn tsc",
|
|
12382
|
+
build: 'echo "Run `yarn build` from the root of the repository instead"',
|
|
12383
|
+
docs: "yarn typedoc",
|
|
12384
|
+
serve: "yarn nodemon dist/server.js",
|
|
12385
|
+
test: "jest"
|
|
12386
|
+
};
|
|
12387
|
+
var dependencies = {
|
|
12388
|
+
"@octokit/auth-app": "^2.6.0",
|
|
12389
|
+
"@octokit/graphql": "^4.5.6",
|
|
12390
|
+
"@octokit/rest": "18.0.6",
|
|
12391
|
+
"body-parser": "^1.19.0",
|
|
12392
|
+
cors: "^2.8.5",
|
|
12393
|
+
dataloader: "^2.0.0",
|
|
12394
|
+
"date-fns": "^2.21.1",
|
|
12395
|
+
"encoding-down": "^7.1.0",
|
|
12396
|
+
esbuild: "^0.12.25",
|
|
12397
|
+
"esbuild-jest": "^0.5.0",
|
|
12398
|
+
"estree-walker": "^3.0.0",
|
|
12399
|
+
"fast-glob": "^3.2.5",
|
|
12400
|
+
flat: "^5.0.2",
|
|
12401
|
+
"fs-extra": "^9.0.1",
|
|
12402
|
+
graphql: "^15.3.0",
|
|
12403
|
+
"graphql-type-json": "^0.3.2",
|
|
12404
|
+
"gray-matter": "^4.0.2",
|
|
12405
|
+
"js-yaml": "^3.14.0",
|
|
12406
|
+
level: "^7.0.1",
|
|
12407
|
+
levelup: "^5.1.1",
|
|
12408
|
+
lodash: "^4.17.20",
|
|
12409
|
+
mdast: "^3.0.0",
|
|
12410
|
+
"mdast-util-from-markdown": "^1.0.0",
|
|
12411
|
+
"mdast-util-mdx": "^1.1.0",
|
|
12412
|
+
"mdast-util-mdx-expression": "^1.1.0",
|
|
12413
|
+
"mdast-util-to-markdown": "^1.2.1",
|
|
12414
|
+
memdown: "^6.1.1",
|
|
12415
|
+
"micromark-extension-mdxjs": "^1.0.0",
|
|
12416
|
+
mocha: "^9.1.1",
|
|
12417
|
+
"normalize-path": "^3.0.0",
|
|
12418
|
+
prettier: "^2.2.1",
|
|
12419
|
+
"rehype-format": "^3.1.0",
|
|
12420
|
+
"rehype-stringify": "^8.0.0",
|
|
12421
|
+
remark: "^13.0.0",
|
|
12422
|
+
"remark-frontmatter": "^3.0.0",
|
|
12423
|
+
"remark-mdx": "next",
|
|
12424
|
+
"remark-parse": "^10.0.0",
|
|
12425
|
+
"remark-rehype": "^8.0.0",
|
|
12426
|
+
"remark-slate": "^1.8.0",
|
|
12427
|
+
"remark-stringify": "^8.1.1",
|
|
12428
|
+
unified: "^10.1.0",
|
|
12429
|
+
"unist-util-remove-position": "^3.0.0",
|
|
12430
|
+
"unist-util-visit": "^4.0.0",
|
|
12431
|
+
vfile: "^4.2.0",
|
|
12432
|
+
ws: "^7.3.1",
|
|
12433
|
+
yup: "^0.32.9"
|
|
12434
|
+
};
|
|
12435
|
+
var publishConfig = {
|
|
12436
|
+
registry: "https://registry.npmjs.org"
|
|
12437
|
+
};
|
|
12438
|
+
var repository = {
|
|
12439
|
+
url: "https://github.com/tinacms/tinacms.git",
|
|
12440
|
+
directory: "packages/tina-graphql"
|
|
12441
|
+
};
|
|
12442
|
+
var devDependencies = {
|
|
12443
|
+
"@tinacms/scripts": "workspace:*",
|
|
12444
|
+
"@types/cors": "^2.8.7",
|
|
12445
|
+
"@types/estree": "^0.0.50",
|
|
12446
|
+
"@types/express": "^4.17.8",
|
|
12447
|
+
"@types/fs-extra": "^9.0.2",
|
|
12448
|
+
"@types/jest": "^26.0.4",
|
|
12449
|
+
"@types/js-yaml": "^3.12.5",
|
|
12450
|
+
"@types/level": "^6.0.0",
|
|
12451
|
+
"@types/lodash": "^4.14.161",
|
|
12452
|
+
"@types/lodash.camelcase": "^4.3.6",
|
|
12453
|
+
"@types/lodash.upperfirst": "^4.3.6",
|
|
12454
|
+
"@types/lru-cache": "^5.1.0",
|
|
12455
|
+
"@types/mdast": "^3.0.10",
|
|
12456
|
+
"@types/node": "^14.17.34",
|
|
12457
|
+
"@types/normalize-path": "^3.0.0",
|
|
12458
|
+
"@types/ws": "^7.2.6",
|
|
12459
|
+
"@types/yup": "^0.29.7",
|
|
12460
|
+
jest: "27.0.6",
|
|
12461
|
+
"jest-diff": "27.0.6",
|
|
12462
|
+
"jest-file-snapshot": "^0.5.0",
|
|
12463
|
+
"jest-matcher-utils": "27.0.6",
|
|
12464
|
+
nodemon: "^2.0.4",
|
|
12465
|
+
typescript: "^4.3.5"
|
|
12466
|
+
};
|
|
12467
|
+
var package_default = {
|
|
12468
|
+
name,
|
|
12469
|
+
version,
|
|
12470
|
+
main,
|
|
12471
|
+
typings,
|
|
12472
|
+
files,
|
|
12473
|
+
license,
|
|
12474
|
+
buildConfig,
|
|
12475
|
+
scripts,
|
|
12476
|
+
dependencies,
|
|
12477
|
+
publishConfig,
|
|
12478
|
+
repository,
|
|
12479
|
+
devDependencies
|
|
12480
|
+
};
|
|
12481
|
+
|
|
12341
12482
|
// pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/resolver/error.ts
|
|
12342
12483
|
var TinaError = class extends Error {
|
|
12343
12484
|
constructor(message, extensions) {
|
|
@@ -12351,10 +12492,24 @@ var TinaError = class extends Error {
|
|
|
12351
12492
|
|
|
12352
12493
|
// pnp:/Users/jeffsee/code/tinacms/packages/@tinacms/graphql/src/schema/index.ts
|
|
12353
12494
|
var createSchema = async ({
|
|
12354
|
-
schema
|
|
12495
|
+
schema,
|
|
12496
|
+
flags = []
|
|
12355
12497
|
}) => {
|
|
12356
12498
|
const validSchema = await validateSchema(schema);
|
|
12357
|
-
|
|
12499
|
+
const [major, minor, patch] = package_default.version.split(".");
|
|
12500
|
+
const meta = {};
|
|
12501
|
+
if (flags && flags.length > 0) {
|
|
12502
|
+
meta["flags"] = flags;
|
|
12503
|
+
}
|
|
12504
|
+
return new TinaSchema(__spreadValues({
|
|
12505
|
+
version: {
|
|
12506
|
+
fullVersion: package_default.version,
|
|
12507
|
+
major,
|
|
12508
|
+
minor,
|
|
12509
|
+
patch
|
|
12510
|
+
},
|
|
12511
|
+
meta
|
|
12512
|
+
}, validSchema));
|
|
12358
12513
|
};
|
|
12359
12514
|
var TinaSchema = class {
|
|
12360
12515
|
constructor(config) {
|
|
@@ -12508,17 +12663,24 @@ var TinaSchema = class {
|
|
|
12508
12663
|
var import_path = __toModule(require("path"));
|
|
12509
12664
|
var indexDB = async ({
|
|
12510
12665
|
database,
|
|
12511
|
-
config
|
|
12666
|
+
config,
|
|
12667
|
+
buildSDK = true
|
|
12512
12668
|
}) => {
|
|
12513
|
-
const
|
|
12669
|
+
const flags = [];
|
|
12670
|
+
if (database.store.supportsIndexing()) {
|
|
12671
|
+
flags.push("experimentalData");
|
|
12672
|
+
}
|
|
12673
|
+
const tinaSchema = await createSchema({ schema: config, flags });
|
|
12514
12674
|
const builder = await createBuilder({
|
|
12515
12675
|
database,
|
|
12516
12676
|
tinaSchema
|
|
12517
12677
|
});
|
|
12518
12678
|
const graphQLSchema = await _buildSchema(builder, tinaSchema);
|
|
12519
12679
|
await database.indexData({ graphQLSchema, tinaSchema });
|
|
12520
|
-
|
|
12521
|
-
|
|
12680
|
+
if (buildSDK) {
|
|
12681
|
+
await _buildFragments(builder, tinaSchema, database.bridge.rootPath);
|
|
12682
|
+
await _buildQueries(builder, tinaSchema, database.bridge.rootPath);
|
|
12683
|
+
}
|
|
12522
12684
|
};
|
|
12523
12685
|
var _buildFragments = async (builder, tinaSchema, rootPath) => {
|
|
12524
12686
|
const fragmentDefinitionsFields = [];
|
|
@@ -12914,19 +13076,19 @@ var VFile = class {
|
|
|
12914
13076
|
throw message;
|
|
12915
13077
|
}
|
|
12916
13078
|
};
|
|
12917
|
-
function assertPart(part,
|
|
13079
|
+
function assertPart(part, name2) {
|
|
12918
13080
|
if (part && part.includes(import_path2.default.sep)) {
|
|
12919
|
-
throw new Error("`" +
|
|
13081
|
+
throw new Error("`" + name2 + "` cannot be a path: did not expect `" + import_path2.default.sep + "`");
|
|
12920
13082
|
}
|
|
12921
13083
|
}
|
|
12922
|
-
function assertNonEmpty(part,
|
|
13084
|
+
function assertNonEmpty(part, name2) {
|
|
12923
13085
|
if (!part) {
|
|
12924
|
-
throw new Error("`" +
|
|
13086
|
+
throw new Error("`" + name2 + "` cannot be empty");
|
|
12925
13087
|
}
|
|
12926
13088
|
}
|
|
12927
|
-
function assertPath(path11,
|
|
13089
|
+
function assertPath(path11, name2) {
|
|
12928
13090
|
if (!path11) {
|
|
12929
|
-
throw new Error("Setting `" +
|
|
13091
|
+
throw new Error("Setting `" + name2 + "` requires `path` to be set too");
|
|
12930
13092
|
}
|
|
12931
13093
|
}
|
|
12932
13094
|
|
|
@@ -13176,8 +13338,8 @@ function base() {
|
|
|
13176
13338
|
}
|
|
13177
13339
|
}
|
|
13178
13340
|
}
|
|
13179
|
-
function newable(value,
|
|
13180
|
-
return typeof value === "function" && value.prototype && (keys(value.prototype) ||
|
|
13341
|
+
function newable(value, name2) {
|
|
13342
|
+
return typeof value === "function" && value.prototype && (keys(value.prototype) || name2 in value.prototype);
|
|
13181
13343
|
}
|
|
13182
13344
|
function keys(value) {
|
|
13183
13345
|
let key2;
|
|
@@ -13188,19 +13350,19 @@ function keys(value) {
|
|
|
13188
13350
|
}
|
|
13189
13351
|
return false;
|
|
13190
13352
|
}
|
|
13191
|
-
function assertParser(
|
|
13353
|
+
function assertParser(name2, value) {
|
|
13192
13354
|
if (typeof value !== "function") {
|
|
13193
|
-
throw new TypeError("Cannot `" +
|
|
13355
|
+
throw new TypeError("Cannot `" + name2 + "` without `Parser`");
|
|
13194
13356
|
}
|
|
13195
13357
|
}
|
|
13196
|
-
function assertCompiler(
|
|
13358
|
+
function assertCompiler(name2, value) {
|
|
13197
13359
|
if (typeof value !== "function") {
|
|
13198
|
-
throw new TypeError("Cannot `" +
|
|
13360
|
+
throw new TypeError("Cannot `" + name2 + "` without `Compiler`");
|
|
13199
13361
|
}
|
|
13200
13362
|
}
|
|
13201
|
-
function assertUnfrozen(
|
|
13363
|
+
function assertUnfrozen(name2, frozen) {
|
|
13202
13364
|
if (frozen) {
|
|
13203
|
-
throw new Error("Cannot call `" +
|
|
13365
|
+
throw new Error("Cannot call `" + name2 + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.");
|
|
13204
13366
|
}
|
|
13205
13367
|
}
|
|
13206
13368
|
function assertNode(node) {
|
|
@@ -13208,9 +13370,9 @@ function assertNode(node) {
|
|
|
13208
13370
|
throw new TypeError("Expected node, got `" + node + "`");
|
|
13209
13371
|
}
|
|
13210
13372
|
}
|
|
13211
|
-
function assertDone(
|
|
13373
|
+
function assertDone(name2, asyncName, complete) {
|
|
13212
13374
|
if (!complete) {
|
|
13213
|
-
throw new Error("`" +
|
|
13375
|
+
throw new Error("`" + name2 + "` finished async. Use `" + asyncName + "` instead");
|
|
13214
13376
|
}
|
|
13215
13377
|
}
|
|
13216
13378
|
function vfile(value) {
|
|
@@ -18620,7 +18782,7 @@ function createTokenizer(parser, initialize, from) {
|
|
|
18620
18782
|
return context;
|
|
18621
18783
|
function write(slice) {
|
|
18622
18784
|
chunks = push(chunks, slice);
|
|
18623
|
-
|
|
18785
|
+
main2();
|
|
18624
18786
|
if (chunks[chunks.length - 1] !== null) {
|
|
18625
18787
|
return [];
|
|
18626
18788
|
}
|
|
@@ -18641,7 +18803,7 @@ function createTokenizer(parser, initialize, from) {
|
|
|
18641
18803
|
columnStart[value.line] = value.column;
|
|
18642
18804
|
accountForPotentialSkip();
|
|
18643
18805
|
}
|
|
18644
|
-
function
|
|
18806
|
+
function main2() {
|
|
18645
18807
|
let chunkIndex;
|
|
18646
18808
|
while (point2._index < chunks.length) {
|
|
18647
18809
|
const chunk = chunks[point2._index];
|
|
@@ -19842,11 +20004,11 @@ var visitParents = function(tree, test, visitor, reverse) {
|
|
|
19842
20004
|
factory(tree, null, [])();
|
|
19843
20005
|
function factory(node, index2, parents) {
|
|
19844
20006
|
const value = typeof node === "object" && node !== null ? node : {};
|
|
19845
|
-
let
|
|
20007
|
+
let name2;
|
|
19846
20008
|
if (typeof value.type === "string") {
|
|
19847
|
-
|
|
20009
|
+
name2 = typeof value.tagName === "string" ? value.tagName : typeof value.name === "string" ? value.name : void 0;
|
|
19848
20010
|
Object.defineProperty(visit3, "name", {
|
|
19849
|
-
value: "node (" + color(value.type + (
|
|
20011
|
+
value: "node (" + color(value.type + (name2 ? "<" + name2 + ">" : "")) + ")"
|
|
19850
20012
|
});
|
|
19851
20013
|
}
|
|
19852
20014
|
return visit3;
|
|
@@ -21259,8 +21421,8 @@ function toMarkdown(tree, options = {}) {
|
|
|
21259
21421
|
result += "\n";
|
|
21260
21422
|
}
|
|
21261
21423
|
return result;
|
|
21262
|
-
function enter(
|
|
21263
|
-
context.stack.push(
|
|
21424
|
+
function enter(name2) {
|
|
21425
|
+
context.stack.push(name2);
|
|
21264
21426
|
return exit2;
|
|
21265
21427
|
function exit2() {
|
|
21266
21428
|
context.stack.pop();
|
|
@@ -22033,10 +22195,17 @@ ${out}
|
|
|
22033
22195
|
console.log(e);
|
|
22034
22196
|
}
|
|
22035
22197
|
case "text":
|
|
22036
|
-
|
|
22037
|
-
|
|
22038
|
-
|
|
22039
|
-
}
|
|
22198
|
+
let returnNode = { type: "text", value: node.text || "" };
|
|
22199
|
+
if (node == null ? void 0 : node.bold) {
|
|
22200
|
+
returnNode = { type: "strong", children: [returnNode] };
|
|
22201
|
+
}
|
|
22202
|
+
if (node == null ? void 0 : node.italic) {
|
|
22203
|
+
returnNode = {
|
|
22204
|
+
type: "emphasis",
|
|
22205
|
+
children: [returnNode]
|
|
22206
|
+
};
|
|
22207
|
+
}
|
|
22208
|
+
return returnNode;
|
|
22040
22209
|
default:
|
|
22041
22210
|
console.log(`Unrecognized field type: ${node.type}`);
|
|
22042
22211
|
break;
|
|
@@ -23262,11 +23431,7 @@ var Database = class {
|
|
|
23262
23431
|
};
|
|
23263
23432
|
this.getGraphQLSchema = async () => {
|
|
23264
23433
|
const graphqlPath = import_path4.default.join(GENERATED_FOLDER, `_graphql.json`);
|
|
23265
|
-
|
|
23266
|
-
const _graphql = await this.store.get(graphqlPath);
|
|
23267
|
-
this._graphql = _graphql;
|
|
23268
|
-
}
|
|
23269
|
-
return this._graphql;
|
|
23434
|
+
return this.store.get(graphqlPath);
|
|
23270
23435
|
};
|
|
23271
23436
|
this.getGraphQLSchemaFromBridge = async () => {
|
|
23272
23437
|
const graphqlPath = import_path4.default.join(GENERATED_FOLDER, `_graphql.json`);
|
|
@@ -23918,7 +24083,7 @@ var listBranches = async ({ auth, owner, repo }) => {
|
|
|
23918
24083
|
});
|
|
23919
24084
|
return branchList;
|
|
23920
24085
|
};
|
|
23921
|
-
var createBranch = async ({ auth, owner, repo, name, baseBranch }) => {
|
|
24086
|
+
var createBranch = async ({ auth, owner, repo, name: name2, baseBranch }) => {
|
|
23922
24087
|
const appOctoKit = new import_rest3.Octokit({ auth });
|
|
23923
24088
|
const currentBranch = await appOctoKit.repos.getBranch({
|
|
23924
24089
|
owner,
|
|
@@ -23928,7 +24093,7 @@ var createBranch = async ({ auth, owner, repo, name, baseBranch }) => {
|
|
|
23928
24093
|
const newBranch = await appOctoKit.git.createRef({
|
|
23929
24094
|
owner,
|
|
23930
24095
|
repo,
|
|
23931
|
-
ref: `refs/heads/${
|
|
24096
|
+
ref: `refs/heads/${name2}`,
|
|
23932
24097
|
sha: currentBranch.data.commit.sha
|
|
23933
24098
|
});
|
|
23934
24099
|
return newBranch;
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -11,17 +11,36 @@ See the License for the specific language governing permissions and
|
|
|
11
11
|
limitations under the License.
|
|
12
12
|
*/
|
|
13
13
|
import type { CollectionTemplateable, Collectable, TinaCloudSchemaEnriched, TinaCloudSchemaBase, Templateable, TinaCloudCollection } from '../types';
|
|
14
|
-
export declare const createSchema: ({ schema, }: {
|
|
14
|
+
export declare const createSchema: ({ schema, flags, }: {
|
|
15
15
|
schema: TinaCloudSchemaBase;
|
|
16
|
+
flags?: string[];
|
|
16
17
|
}) => Promise<TinaSchema>;
|
|
18
|
+
declare type Version = {
|
|
19
|
+
fullVersion: string;
|
|
20
|
+
major: string;
|
|
21
|
+
minor: string;
|
|
22
|
+
patch: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Metadata about how the schema was built
|
|
26
|
+
*/
|
|
27
|
+
declare type Meta = {
|
|
28
|
+
flags?: string[];
|
|
29
|
+
};
|
|
17
30
|
/**
|
|
18
31
|
* TinaSchema is responsible for allowing you to look up certain
|
|
19
32
|
* properties of the user-provided schema with ease.
|
|
20
33
|
*/
|
|
21
34
|
export declare class TinaSchema {
|
|
22
|
-
config:
|
|
35
|
+
config: {
|
|
36
|
+
version?: Version;
|
|
37
|
+
meta?: Meta;
|
|
38
|
+
} & TinaCloudSchemaBase;
|
|
23
39
|
schema: TinaCloudSchemaEnriched;
|
|
24
|
-
constructor(config:
|
|
40
|
+
constructor(config: {
|
|
41
|
+
version?: Version;
|
|
42
|
+
meta?: Meta;
|
|
43
|
+
} & TinaCloudSchemaBase);
|
|
25
44
|
getCollectionsByName: (collectionNames: string[]) => TinaCloudCollection<true>[];
|
|
26
45
|
getAllCollectionPaths: () => string[];
|
|
27
46
|
getCollection: (collectionName: string) => TinaCloudCollection<true>;
|
|
@@ -56,3 +75,4 @@ export declare class TinaSchema {
|
|
|
56
75
|
*/
|
|
57
76
|
getTemplatesForCollectable: (collection: Collectable) => CollectionTemplateable;
|
|
58
77
|
}
|
|
78
|
+
export {};
|