@contember/graphql-builder 1.3.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/development/GraphQlQueryPrinter.cjs +139 -0
  2. package/dist/development/GraphQlQueryPrinter.cjs.map +1 -0
  3. package/dist/development/GraphQlQueryPrinter.js +139 -0
  4. package/dist/development/GraphQlQueryPrinter.js.map +1 -0
  5. package/dist/development/index.cjs +13 -0
  6. package/dist/development/index.cjs.map +1 -0
  7. package/dist/development/index.js +13 -0
  8. package/dist/development/index.js.map +1 -0
  9. package/dist/development/nodes/GraphQlField.cjs +12 -0
  10. package/dist/development/nodes/GraphQlField.cjs.map +1 -0
  11. package/dist/development/nodes/GraphQlField.js +12 -0
  12. package/dist/development/nodes/GraphQlField.js.map +1 -0
  13. package/dist/development/nodes/GraphQlFragment.cjs +11 -0
  14. package/dist/development/nodes/GraphQlFragment.cjs.map +1 -0
  15. package/dist/development/nodes/GraphQlFragment.js +11 -0
  16. package/dist/development/nodes/GraphQlFragment.js.map +1 -0
  17. package/dist/development/nodes/GraphQlFragmentSpread.cjs +9 -0
  18. package/dist/development/nodes/GraphQlFragmentSpread.cjs.map +1 -0
  19. package/dist/development/nodes/GraphQlFragmentSpread.js +9 -0
  20. package/dist/development/nodes/GraphQlFragmentSpread.js.map +1 -0
  21. package/dist/development/nodes/GraphQlInlineFragment.cjs +10 -0
  22. package/dist/development/nodes/GraphQlInlineFragment.cjs.map +1 -0
  23. package/dist/development/nodes/GraphQlInlineFragment.js +10 -0
  24. package/dist/development/nodes/GraphQlInlineFragment.js.map +1 -0
  25. package/dist/production/GraphQlQueryPrinter.cjs +139 -0
  26. package/dist/production/GraphQlQueryPrinter.cjs.map +1 -0
  27. package/dist/production/GraphQlQueryPrinter.js +139 -0
  28. package/dist/production/GraphQlQueryPrinter.js.map +1 -0
  29. package/dist/production/index.cjs +13 -0
  30. package/dist/production/index.cjs.map +1 -0
  31. package/dist/production/index.js +13 -0
  32. package/dist/production/index.js.map +1 -0
  33. package/dist/production/nodes/GraphQlField.cjs +12 -0
  34. package/dist/production/nodes/GraphQlField.cjs.map +1 -0
  35. package/dist/production/nodes/GraphQlField.js +12 -0
  36. package/dist/production/nodes/GraphQlField.js.map +1 -0
  37. package/dist/production/nodes/GraphQlFragment.cjs +11 -0
  38. package/dist/production/nodes/GraphQlFragment.cjs.map +1 -0
  39. package/dist/production/nodes/GraphQlFragment.js +11 -0
  40. package/dist/production/nodes/GraphQlFragment.js.map +1 -0
  41. package/dist/production/nodes/GraphQlFragmentSpread.cjs +9 -0
  42. package/dist/production/nodes/GraphQlFragmentSpread.cjs.map +1 -0
  43. package/dist/production/nodes/GraphQlFragmentSpread.js +9 -0
  44. package/dist/production/nodes/GraphQlFragmentSpread.js.map +1 -0
  45. package/dist/production/nodes/GraphQlInlineFragment.cjs +10 -0
  46. package/dist/production/nodes/GraphQlInlineFragment.cjs.map +1 -0
  47. package/dist/production/nodes/GraphQlInlineFragment.js +10 -0
  48. package/dist/production/nodes/GraphQlInlineFragment.js.map +1 -0
  49. package/dist/types/GraphQlQueryPrinter.d.ts +23 -0
  50. package/dist/types/GraphQlQueryPrinter.d.ts.map +1 -0
  51. package/dist/types/index.d.ts +3 -0
  52. package/dist/types/index.d.ts.map +1 -0
  53. package/dist/types/nodes/GraphQlField.d.ts +17 -0
  54. package/dist/types/nodes/GraphQlField.d.ts.map +1 -0
  55. package/dist/types/nodes/GraphQlFragment.d.ts +8 -0
  56. package/dist/types/nodes/GraphQlFragment.d.ts.map +1 -0
  57. package/dist/types/nodes/GraphQlFragmentSpread.d.ts +5 -0
  58. package/dist/types/nodes/GraphQlFragmentSpread.d.ts.map +1 -0
  59. package/dist/types/nodes/GraphQlInlineFragment.d.ts +7 -0
  60. package/dist/types/nodes/GraphQlInlineFragment.d.ts.map +1 -0
  61. package/dist/types/nodes/index.d.ts +5 -0
  62. package/dist/types/nodes/index.d.ts.map +1 -0
  63. package/dist/types/tsconfig.tsbuildinfo +1 -0
  64. package/package.json +46 -0
  65. package/src/GraphQlQueryPrinter.ts +146 -0
  66. package/src/index.ts +2 -0
  67. package/src/nodes/GraphQlField.ts +22 -0
  68. package/src/nodes/GraphQlFragment.ts +10 -0
  69. package/src/nodes/GraphQlFragmentSpread.ts +6 -0
  70. package/src/nodes/GraphQlInlineFragment.ts +9 -0
  71. package/src/nodes/index.ts +4 -0
  72. package/src/tsconfig.json +6 -0
@@ -0,0 +1,139 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => {
4
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ return value;
6
+ };
7
+ import { GraphQlField } from "./nodes/GraphQlField.js";
8
+ import { GraphQlFragmentSpread } from "./nodes/GraphQlFragmentSpread.js";
9
+ import { GraphQlInlineFragment } from "./nodes/GraphQlInlineFragment.js";
10
+ class GraphQlQueryPrinter {
11
+ constructor() {
12
+ __publicField(this, "indentString", " ");
13
+ __publicField(this, "variableCounter", 0);
14
+ __publicField(this, "variables", {});
15
+ __publicField(this, "variableValueToName", {});
16
+ __publicField(this, "usedFragments", /* @__PURE__ */ new Set());
17
+ __publicField(this, "body", "");
18
+ }
19
+ printDocument(operation, select, fragments) {
20
+ this.cleanState();
21
+ this.processSelectionSet(select, 1);
22
+ const body = this.body;
23
+ this.body = "";
24
+ this.processUsedFragments(fragments);
25
+ const fragmentsStr = this.body;
26
+ const variablesString = this.printVariables();
27
+ const query = `${operation}${variablesString} {
28
+ ${body}}${fragmentsStr}
29
+ `;
30
+ return {
31
+ query,
32
+ variables: Object.fromEntries(Object.entries(this.variables).map(([key, value]) => [key, value.value]))
33
+ };
34
+ }
35
+ processUsedFragments(fragments) {
36
+ const printed = /* @__PURE__ */ new Set();
37
+ while (this.usedFragments.size > 0) {
38
+ const fragmentName = this.usedFragments.values().next().value;
39
+ this.usedFragments.delete(fragmentName);
40
+ if (printed.has(fragmentName)) {
41
+ continue;
42
+ }
43
+ printed.add(fragmentName);
44
+ if (!fragments[fragmentName]) {
45
+ throw new Error(`Unknown fragment ${fragmentName}`);
46
+ }
47
+ this.processFragment(fragments[fragmentName]);
48
+ }
49
+ }
50
+ processFragment(fragment) {
51
+ this.body += `
52
+ fragment ${fragment.name} on ${fragment.type} {
53
+ `;
54
+ this.processSelectionSet(fragment.selectionSet, 1);
55
+ this.body += "}";
56
+ }
57
+ printVariables() {
58
+ let variablesString = "";
59
+ let i = 0;
60
+ for (const [variableName, variable] of Object.entries(this.variables)) {
61
+ if (i++ === 0) {
62
+ variablesString += "(";
63
+ } else {
64
+ variablesString += ", ";
65
+ }
66
+ variablesString += `$${variableName}: ${variable.type}`;
67
+ }
68
+ if (i > 0) {
69
+ variablesString += ")";
70
+ }
71
+ return variablesString;
72
+ }
73
+ processSelectionSet(selectionSet, indent) {
74
+ for (const node of selectionSet) {
75
+ if (node instanceof GraphQlField) {
76
+ this.processField(node, indent);
77
+ } else if (node instanceof GraphQlFragmentSpread) {
78
+ this.body += this.indentString.repeat(indent) + "... " + node.name + "\n";
79
+ this.usedFragments.add(node.name);
80
+ } else if (node instanceof GraphQlInlineFragment) {
81
+ this.body += this.indentString.repeat(indent) + "... on " + node.type + " {\n";
82
+ this.processSelectionSet(node.selectionSet, indent + 1);
83
+ this.body += this.indentString.repeat(indent) + "}\n";
84
+ }
85
+ }
86
+ }
87
+ processField(field, indent) {
88
+ const indentString = this.indentString.repeat(indent);
89
+ this.body += indentString + (field.alias && field.alias !== field.name ? field.alias + ": " + field.name : field.name);
90
+ let i = 0;
91
+ for (const [argName, arg] of Object.entries(field.args)) {
92
+ if (arg.value === void 0) {
93
+ continue;
94
+ }
95
+ const variableName = this.resolveVariableName(arg.graphQlType, arg.value);
96
+ if (i++ === 0) {
97
+ this.body += "(";
98
+ } else {
99
+ this.body += ", ";
100
+ }
101
+ this.body += `${argName}: $${variableName}`;
102
+ }
103
+ if (i > 0) {
104
+ this.body += ")";
105
+ }
106
+ if (field.selectionSet) {
107
+ this.body += " {\n";
108
+ this.processSelectionSet(field.selectionSet, indent + 1);
109
+ this.body += this.indentString.repeat(indent) + "}";
110
+ }
111
+ this.body += "\n";
112
+ }
113
+ resolveVariableName(graphQlType, value) {
114
+ const variableName = this.variableValueToName[graphQlType]?.get(value);
115
+ if (variableName) {
116
+ return variableName;
117
+ }
118
+ const newVariableName = `${graphQlType.replace(/[\W]/g, "")}_${this.variableCounter++}`;
119
+ this.variables[newVariableName] = {
120
+ type: graphQlType,
121
+ value
122
+ };
123
+ if (!this.variableValueToName[graphQlType]) {
124
+ this.variableValueToName[graphQlType] = /* @__PURE__ */ new Map();
125
+ }
126
+ this.variableValueToName[graphQlType].set(value, newVariableName);
127
+ return newVariableName;
128
+ }
129
+ cleanState() {
130
+ this.body = "";
131
+ this.variableCounter = 0;
132
+ this.variables = {};
133
+ this.usedFragments = /* @__PURE__ */ new Set();
134
+ }
135
+ }
136
+ export {
137
+ GraphQlQueryPrinter
138
+ };
139
+ //# sourceMappingURL=GraphQlQueryPrinter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlQueryPrinter.js","sources":["../../src/GraphQlQueryPrinter.ts"],"sourcesContent":["import { JSONValue } from '@contember/schema'\nimport { GraphQlField, GraphQlFragment, GraphQlFragmentSpread, GraphQlInlineFragment, GraphQlSelectionSet } from './nodes'\n\nexport type GraphQlPrintResult = { query: string; variables: Record<string, JSONValue> }\n\nexport class GraphQlQueryPrinter {\n\tprivate indentString = '\\t'\n\n\tprivate variableCounter = 0\n\tprivate variables: Record<string, {\n\t\ttype: string\n\t\tvalue: JSONValue\n\t}> = {}\n\n\tprivate variableValueToName: Record<string, Map<JSONValue, string>> = {}\n\n\tprivate usedFragments = new Set<string>()\n\n\tprivate body = ''\n\n\n\tpublic printDocument(\n\t\toperation: 'query' | 'mutation',\n\t\tselect: GraphQlSelectionSet,\n\t\tfragments: Record<string, GraphQlFragment>,\n\t): GraphQlPrintResult {\n\t\tthis.cleanState()\n\t\tthis.processSelectionSet(select, 1)\n\t\tconst body = this.body\n\t\tthis.body = ''\n\t\tthis.processUsedFragments(fragments)\n\t\tconst fragmentsStr = this.body\n\t\tconst variablesString = this.printVariables()\n\t\tconst query = `${operation}${variablesString} {\\n${body}}${fragmentsStr}\\n`\n\t\treturn {\n\t\t\tquery: query,\n\t\t\tvariables: Object.fromEntries(Object.entries(this.variables).map(([key, value]) => [key, value.value])),\n\t\t}\n\t}\n\n\n\tprivate processUsedFragments(fragments: Record<string, GraphQlFragment>): void {\n\t\tconst printed = new Set()\n\t\twhile (this.usedFragments.size > 0) {\n\t\t\tconst fragmentName = this.usedFragments.values().next().value\n\t\t\tthis.usedFragments.delete(fragmentName)\n\t\t\tif (printed.has(fragmentName)) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tprinted.add(fragmentName)\n\t\t\tif (!fragments[fragmentName]) {\n\t\t\t\tthrow new Error(`Unknown fragment ${fragmentName}`)\n\t\t\t}\n\t\t\tthis.processFragment(fragments[fragmentName])\n\t\t}\n\t}\n\n\tprivate processFragment(fragment: GraphQlFragment): void {\n\t\tthis.body += `\\nfragment ${fragment.name} on ${fragment.type} {\\n`\n\t\tthis.processSelectionSet(fragment.selectionSet, 1)\n\t\tthis.body += '}'\n\t}\n\n\tprivate printVariables(): string {\n\t\tlet variablesString = ''\n\t\tlet i = 0\n\t\tfor (const [variableName, variable] of Object.entries(this.variables)) {\n\t\t\tif (i++ === 0) {\n\t\t\t\tvariablesString += '('\n\t\t\t} else {\n\t\t\t\tvariablesString += ', '\n\t\t\t}\n\t\t\tvariablesString += `$${variableName}: ${variable.type}`\n\t\t}\n\t\tif (i > 0) {\n\t\t\tvariablesString += ')'\n\t\t}\n\t\treturn variablesString\n\t}\n\n\tprivate processSelectionSet(selectionSet: GraphQlSelectionSet, indent: number): void {\n\t\tfor (const node of selectionSet) {\n\t\t\tif (node instanceof GraphQlField) {\n\t\t\t\tthis.processField(node, indent)\n\t\t\t} else if (node instanceof GraphQlFragmentSpread) {\n\t\t\t\tthis.body += this.indentString.repeat(indent) + '... ' + node.name + '\\n'\n\t\t\t\tthis.usedFragments.add(node.name)\n\t\t\t} else if (node instanceof GraphQlInlineFragment) {\n\t\t\t\tthis.body += this.indentString.repeat(indent) + '... on ' + node.type + ' {\\n'\n\t\t\t\tthis.processSelectionSet(node.selectionSet, indent + 1)\n\t\t\t\tthis.body += this.indentString.repeat(indent) + '}\\n'\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate processField(field: GraphQlField, indent: number): void {\n\t\tconst indentString = this.indentString.repeat(indent)\n\t\tthis.body += indentString + (field.alias && field.alias !== field.name ? (field.alias + ': ' + field.name) : field.name)\n\t\tlet i = 0\n\t\tfor (const [argName, arg] of Object.entries(field.args)) {\n\t\t\tif (arg.value === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst variableName = this.resolveVariableName(arg.graphQlType, arg.value)\n\t\t\tif (i++ === 0) {\n\t\t\t\tthis.body += '('\n\t\t\t} else {\n\t\t\t\tthis.body += ', '\n\t\t\t}\n\t\t\tthis.body += `${argName}: $${variableName}`\n\t\t}\n\t\tif (i > 0) {\n\t\t\tthis.body += ')'\n\t\t}\n\t\tif (field.selectionSet) {\n\t\t\tthis.body += ' {\\n'\n\t\t\tthis.processSelectionSet(field.selectionSet, indent + 1)\n\t\t\tthis.body += this.indentString.repeat(indent) + '}'\n\t\t}\n\t\tthis.body += '\\n'\n\t}\n\n\tprivate resolveVariableName(graphQlType: string, value: JSONValue): string {\n\t\tconst variableName = this.variableValueToName[graphQlType]?.get(value)\n\t\tif (variableName) {\n\t\t\treturn variableName\n\t\t}\n\t\tconst newVariableName = `${graphQlType.replace(/[\\W]/g, '')}_${this.variableCounter++}`\n\t\tthis.variables[newVariableName] = {\n\t\t\ttype: graphQlType,\n\t\t\tvalue: value,\n\t\t}\n\t\tif (!this.variableValueToName[graphQlType]) {\n\t\t\tthis.variableValueToName[graphQlType] = new Map()\n\t\t}\n\t\tthis.variableValueToName[graphQlType].set(value, newVariableName)\n\t\treturn newVariableName\n\t}\n\n\tprivate cleanState(): void {\n\t\tthis.body = ''\n\t\tthis.variableCounter = 0\n\t\tthis.variables = {}\n\t\tthis.usedFragments = new Set<string>()\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;AAKO,MAAM,oBAAoB;AAAA,EAA1B;AACE,wCAAe;AAEf,2CAAkB;AAClB,qCAGH,CAAA;AAEG,+CAA8D,CAAA;AAE9D,6DAAoB;AAEpB,gCAAO;AAAA;AAAA,EAGR,cACN,WACA,QACA,WACqB;AACrB,SAAK,WAAW;AACX,SAAA,oBAAoB,QAAQ,CAAC;AAClC,UAAM,OAAO,KAAK;AAClB,SAAK,OAAO;AACZ,SAAK,qBAAqB,SAAS;AACnC,UAAM,eAAe,KAAK;AACpB,UAAA,kBAAkB,KAAK;AAC7B,UAAM,QAAQ,GAAG,SAAS,GAAG,eAAe;AAAA,EAAO,IAAI,IAAI,YAAY;AAAA;AAChE,WAAA;AAAA,MACN;AAAA,MACA,WAAW,OAAO,YAAY,OAAO,QAAQ,KAAK,SAAS,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,MAAM,KAAK,CAAC,CAAC;AAAA,IAAA;AAAA,EAExG;AAAA,EAGQ,qBAAqB,WAAkD;AACxE,UAAA,8BAAc;AACb,WAAA,KAAK,cAAc,OAAO,GAAG;AACnC,YAAM,eAAe,KAAK,cAAc,OAAO,EAAE,KAAO,EAAA;AACnD,WAAA,cAAc,OAAO,YAAY;AAClC,UAAA,QAAQ,IAAI,YAAY,GAAG;AAC9B;AAAA,MACD;AACA,cAAQ,IAAI,YAAY;AACpB,UAAA,CAAC,UAAU,YAAY,GAAG;AAC7B,cAAM,IAAI,MAAM,oBAAoB,YAAY,EAAE;AAAA,MACnD;AACK,WAAA,gBAAgB,UAAU,YAAY,CAAC;AAAA,IAC7C;AAAA,EACD;AAAA,EAEQ,gBAAgB,UAAiC;AACxD,SAAK,QAAQ;AAAA,WAAc,SAAS,IAAI,OAAO,SAAS,IAAI;AAAA;AACvD,SAAA,oBAAoB,SAAS,cAAc,CAAC;AACjD,SAAK,QAAQ;AAAA,EACd;AAAA,EAEQ,iBAAyB;AAChC,QAAI,kBAAkB;AACtB,QAAI,IAAI;AACG,eAAA,CAAC,cAAc,QAAQ,KAAK,OAAO,QAAQ,KAAK,SAAS,GAAG;AACtE,UAAI,QAAQ,GAAG;AACK,2BAAA;AAAA,MAAA,OACb;AACa,2BAAA;AAAA,MACpB;AACA,yBAAmB,IAAI,YAAY,KAAK,SAAS,IAAI;AAAA,IACtD;AACA,QAAI,IAAI,GAAG;AACS,yBAAA;AAAA,IACpB;AACO,WAAA;AAAA,EACR;AAAA,EAEQ,oBAAoB,cAAmC,QAAsB;AACpF,eAAW,QAAQ,cAAc;AAChC,UAAI,gBAAgB,cAAc;AAC5B,aAAA,aAAa,MAAM,MAAM;AAAA,MAAA,WACpB,gBAAgB,uBAAuB;AAC5C,aAAA,QAAQ,KAAK,aAAa,OAAO,MAAM,IAAI,SAAS,KAAK,OAAO;AAChE,aAAA,cAAc,IAAI,KAAK,IAAI;AAAA,MAAA,WACtB,gBAAgB,uBAAuB;AAC5C,aAAA,QAAQ,KAAK,aAAa,OAAO,MAAM,IAAI,YAAY,KAAK,OAAO;AACxE,aAAK,oBAAoB,KAAK,cAAc,SAAS,CAAC;AACtD,aAAK,QAAQ,KAAK,aAAa,OAAO,MAAM,IAAI;AAAA,MACjD;AAAA,IACD;AAAA,EACD;AAAA,EAEQ,aAAa,OAAqB,QAAsB;AAC/D,UAAM,eAAe,KAAK,aAAa,OAAO,MAAM;AACpD,SAAK,QAAQ,gBAAgB,MAAM,SAAS,MAAM,UAAU,MAAM,OAAQ,MAAM,QAAQ,OAAO,MAAM,OAAQ,MAAM;AACnH,QAAI,IAAI;AACG,eAAA,CAAC,SAAS,GAAG,KAAK,OAAO,QAAQ,MAAM,IAAI,GAAG;AACpD,UAAA,IAAI,UAAU,QAAW;AAC5B;AAAA,MACD;AACA,YAAM,eAAe,KAAK,oBAAoB,IAAI,aAAa,IAAI,KAAK;AACxE,UAAI,QAAQ,GAAG;AACd,aAAK,QAAQ;AAAA,MAAA,OACP;AACN,aAAK,QAAQ;AAAA,MACd;AACA,WAAK,QAAQ,GAAG,OAAO,MAAM,YAAY;AAAA,IAC1C;AACA,QAAI,IAAI,GAAG;AACV,WAAK,QAAQ;AAAA,IACd;AACA,QAAI,MAAM,cAAc;AACvB,WAAK,QAAQ;AACb,WAAK,oBAAoB,MAAM,cAAc,SAAS,CAAC;AACvD,WAAK,QAAQ,KAAK,aAAa,OAAO,MAAM,IAAI;AAAA,IACjD;AACA,SAAK,QAAQ;AAAA,EACd;AAAA,EAEQ,oBAAoB,aAAqB,OAA0B;AAC1E,UAAM,eAAe,KAAK,oBAAoB,WAAW,GAAG,IAAI,KAAK;AACrE,QAAI,cAAc;AACV,aAAA;AAAA,IACR;AACM,UAAA,kBAAkB,GAAG,YAAY,QAAQ,SAAS,EAAE,CAAC,IAAI,KAAK,iBAAiB;AAChF,SAAA,UAAU,eAAe,IAAI;AAAA,MACjC,MAAM;AAAA,MACN;AAAA,IAAA;AAED,QAAI,CAAC,KAAK,oBAAoB,WAAW,GAAG;AAC3C,WAAK,oBAAoB,WAAW,IAAI,oBAAI,IAAI;AAAA,IACjD;AACA,SAAK,oBAAoB,WAAW,EAAE,IAAI,OAAO,eAAe;AACzD,WAAA;AAAA,EACR;AAAA,EAEQ,aAAmB;AAC1B,SAAK,OAAO;AACZ,SAAK,kBAAkB;AACvB,SAAK,YAAY;AACZ,SAAA,oCAAoB;EAC1B;AACD;"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const GraphQlQueryPrinter = require("./GraphQlQueryPrinter.cjs");
4
+ const GraphQlField = require("./nodes/GraphQlField.cjs");
5
+ const GraphQlFragmentSpread = require("./nodes/GraphQlFragmentSpread.cjs");
6
+ const GraphQlFragment = require("./nodes/GraphQlFragment.cjs");
7
+ const GraphQlInlineFragment = require("./nodes/GraphQlInlineFragment.cjs");
8
+ exports.GraphQlQueryPrinter = GraphQlQueryPrinter.GraphQlQueryPrinter;
9
+ exports.GraphQlField = GraphQlField.GraphQlField;
10
+ exports.GraphQlFragmentSpread = GraphQlFragmentSpread.GraphQlFragmentSpread;
11
+ exports.GraphQlFragment = GraphQlFragment.GraphQlFragment;
12
+ exports.GraphQlInlineFragment = GraphQlInlineFragment.GraphQlInlineFragment;
13
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -0,0 +1,13 @@
1
+ import { GraphQlQueryPrinter } from "./GraphQlQueryPrinter.js";
2
+ import { GraphQlField } from "./nodes/GraphQlField.js";
3
+ import { GraphQlFragmentSpread } from "./nodes/GraphQlFragmentSpread.js";
4
+ import { GraphQlFragment } from "./nodes/GraphQlFragment.js";
5
+ import { GraphQlInlineFragment } from "./nodes/GraphQlInlineFragment.js";
6
+ export {
7
+ GraphQlField,
8
+ GraphQlFragment,
9
+ GraphQlFragmentSpread,
10
+ GraphQlInlineFragment,
11
+ GraphQlQueryPrinter
12
+ };
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ class GraphQlField {
4
+ constructor(alias, name, args = {}, selectionSet) {
5
+ this.alias = alias;
6
+ this.name = name;
7
+ this.args = args;
8
+ this.selectionSet = selectionSet;
9
+ }
10
+ }
11
+ exports.GraphQlField = GraphQlField;
12
+ //# sourceMappingURL=GraphQlField.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlField.cjs","sources":["../../../src/nodes/GraphQlField.ts"],"sourcesContent":["import { GraphQlFragmentSpread } from './GraphQlFragmentSpread'\nimport { GraphQlInlineFragment } from './GraphQlInlineFragment'\nimport { JSONValue } from '@contember/schema'\n\nexport class GraphQlField {\n\tconstructor(\n\t\tpublic readonly alias: string | null,\n\t\tpublic readonly name: string,\n\t\tpublic readonly args: GraphQlFieldTypedArgs = {},\n\t\tpublic readonly selectionSet?: GraphQlSelectionSet,\n\t) {\n\t}\n}\n\nexport type GraphQlFieldTypedArgs = Record<string, {\n\tgraphQlType: string\n\tvalue?: JSONValue\n}>\n\nexport type GraphQlSelectionSetItem = GraphQlField | GraphQlFragmentSpread | GraphQlInlineFragment\n\nexport type GraphQlSelectionSet = GraphQlSelectionSetItem[]\n"],"names":[],"mappings":";;AAIO,MAAM,aAAa;AAAA,EACzB,YACiB,OACA,MACA,OAA8B,CAAA,GAC9B,cACf;AAJe,SAAA,QAAA;AACA,SAAA,OAAA;AACA,SAAA,OAAA;AACA,SAAA,eAAA;AAAA,EAEjB;AACD;;"}
@@ -0,0 +1,12 @@
1
+ class GraphQlField {
2
+ constructor(alias, name, args = {}, selectionSet) {
3
+ this.alias = alias;
4
+ this.name = name;
5
+ this.args = args;
6
+ this.selectionSet = selectionSet;
7
+ }
8
+ }
9
+ export {
10
+ GraphQlField
11
+ };
12
+ //# sourceMappingURL=GraphQlField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlField.js","sources":["../../../src/nodes/GraphQlField.ts"],"sourcesContent":["import { GraphQlFragmentSpread } from './GraphQlFragmentSpread'\nimport { GraphQlInlineFragment } from './GraphQlInlineFragment'\nimport { JSONValue } from '@contember/schema'\n\nexport class GraphQlField {\n\tconstructor(\n\t\tpublic readonly alias: string | null,\n\t\tpublic readonly name: string,\n\t\tpublic readonly args: GraphQlFieldTypedArgs = {},\n\t\tpublic readonly selectionSet?: GraphQlSelectionSet,\n\t) {\n\t}\n}\n\nexport type GraphQlFieldTypedArgs = Record<string, {\n\tgraphQlType: string\n\tvalue?: JSONValue\n}>\n\nexport type GraphQlSelectionSetItem = GraphQlField | GraphQlFragmentSpread | GraphQlInlineFragment\n\nexport type GraphQlSelectionSet = GraphQlSelectionSetItem[]\n"],"names":[],"mappings":"AAIO,MAAM,aAAa;AAAA,EACzB,YACiB,OACA,MACA,OAA8B,CAAA,GAC9B,cACf;AAJe,SAAA,QAAA;AACA,SAAA,OAAA;AACA,SAAA,OAAA;AACA,SAAA,eAAA;AAAA,EAEjB;AACD;"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ class GraphQlFragment {
4
+ constructor(name, type, selectionSet) {
5
+ this.name = name;
6
+ this.type = type;
7
+ this.selectionSet = selectionSet;
8
+ }
9
+ }
10
+ exports.GraphQlFragment = GraphQlFragment;
11
+ //# sourceMappingURL=GraphQlFragment.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlFragment.cjs","sources":["../../../src/nodes/GraphQlFragment.ts"],"sourcesContent":["import { GraphQlSelectionSet } from './GraphQlField'\n\nexport class GraphQlFragment {\n\tconstructor(\n\t\tpublic readonly name: string,\n\t\tpublic readonly type: string,\n\t\tpublic readonly selectionSet: GraphQlSelectionSet,\n\t) {\n\t}\n}\n"],"names":[],"mappings":";;AAEO,MAAM,gBAAgB;AAAA,EAC5B,YACiB,MACA,MACA,cACf;AAHe,SAAA,OAAA;AACA,SAAA,OAAA;AACA,SAAA,eAAA;AAAA,EAEjB;AACD;;"}
@@ -0,0 +1,11 @@
1
+ class GraphQlFragment {
2
+ constructor(name, type, selectionSet) {
3
+ this.name = name;
4
+ this.type = type;
5
+ this.selectionSet = selectionSet;
6
+ }
7
+ }
8
+ export {
9
+ GraphQlFragment
10
+ };
11
+ //# sourceMappingURL=GraphQlFragment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlFragment.js","sources":["../../../src/nodes/GraphQlFragment.ts"],"sourcesContent":["import { GraphQlSelectionSet } from './GraphQlField'\n\nexport class GraphQlFragment {\n\tconstructor(\n\t\tpublic readonly name: string,\n\t\tpublic readonly type: string,\n\t\tpublic readonly selectionSet: GraphQlSelectionSet,\n\t) {\n\t}\n}\n"],"names":[],"mappings":"AAEO,MAAM,gBAAgB;AAAA,EAC5B,YACiB,MACA,MACA,cACf;AAHe,SAAA,OAAA;AACA,SAAA,OAAA;AACA,SAAA,eAAA;AAAA,EAEjB;AACD;"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ class GraphQlFragmentSpread {
4
+ constructor(name) {
5
+ this.name = name;
6
+ }
7
+ }
8
+ exports.GraphQlFragmentSpread = GraphQlFragmentSpread;
9
+ //# sourceMappingURL=GraphQlFragmentSpread.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlFragmentSpread.cjs","sources":["../../../src/nodes/GraphQlFragmentSpread.ts"],"sourcesContent":["export class GraphQlFragmentSpread {\n\tconstructor(\n\t\tpublic readonly name: string,\n\t) {\n\t}\n}\n"],"names":[],"mappings":";;AAAO,MAAM,sBAAsB;AAAA,EAClC,YACiB,MACf;AADe,SAAA,OAAA;AAAA,EAEjB;AACD;;"}
@@ -0,0 +1,9 @@
1
+ class GraphQlFragmentSpread {
2
+ constructor(name) {
3
+ this.name = name;
4
+ }
5
+ }
6
+ export {
7
+ GraphQlFragmentSpread
8
+ };
9
+ //# sourceMappingURL=GraphQlFragmentSpread.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlFragmentSpread.js","sources":["../../../src/nodes/GraphQlFragmentSpread.ts"],"sourcesContent":["export class GraphQlFragmentSpread {\n\tconstructor(\n\t\tpublic readonly name: string,\n\t) {\n\t}\n}\n"],"names":[],"mappings":"AAAO,MAAM,sBAAsB;AAAA,EAClC,YACiB,MACf;AADe,SAAA,OAAA;AAAA,EAEjB;AACD;"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ class GraphQlInlineFragment {
4
+ constructor(type, selectionSet) {
5
+ this.type = type;
6
+ this.selectionSet = selectionSet;
7
+ }
8
+ }
9
+ exports.GraphQlInlineFragment = GraphQlInlineFragment;
10
+ //# sourceMappingURL=GraphQlInlineFragment.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlInlineFragment.cjs","sources":["../../../src/nodes/GraphQlInlineFragment.ts"],"sourcesContent":["import { GraphQlSelectionSet } from './GraphQlField'\n\nexport class GraphQlInlineFragment {\n\tconstructor(\n\t\tpublic readonly type: string,\n\t\tpublic readonly selectionSet: GraphQlSelectionSet,\n\t) {\n\t}\n}\n"],"names":[],"mappings":";;AAEO,MAAM,sBAAsB;AAAA,EAClC,YACiB,MACA,cACf;AAFe,SAAA,OAAA;AACA,SAAA,eAAA;AAAA,EAEjB;AACD;;"}
@@ -0,0 +1,10 @@
1
+ class GraphQlInlineFragment {
2
+ constructor(type, selectionSet) {
3
+ this.type = type;
4
+ this.selectionSet = selectionSet;
5
+ }
6
+ }
7
+ export {
8
+ GraphQlInlineFragment
9
+ };
10
+ //# sourceMappingURL=GraphQlInlineFragment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlInlineFragment.js","sources":["../../../src/nodes/GraphQlInlineFragment.ts"],"sourcesContent":["import { GraphQlSelectionSet } from './GraphQlField'\n\nexport class GraphQlInlineFragment {\n\tconstructor(\n\t\tpublic readonly type: string,\n\t\tpublic readonly selectionSet: GraphQlSelectionSet,\n\t) {\n\t}\n}\n"],"names":[],"mappings":"AAEO,MAAM,sBAAsB;AAAA,EAClC,YACiB,MACA,cACf;AAFe,SAAA,OAAA;AACA,SAAA,eAAA;AAAA,EAEjB;AACD;"}
@@ -0,0 +1,23 @@
1
+ import { JSONValue } from '@contember/schema';
2
+ import { GraphQlFragment, GraphQlSelectionSet } from './nodes';
3
+ export type GraphQlPrintResult = {
4
+ query: string;
5
+ variables: Record<string, JSONValue>;
6
+ };
7
+ export declare class GraphQlQueryPrinter {
8
+ private indentString;
9
+ private variableCounter;
10
+ private variables;
11
+ private variableValueToName;
12
+ private usedFragments;
13
+ private body;
14
+ printDocument(operation: 'query' | 'mutation', select: GraphQlSelectionSet, fragments: Record<string, GraphQlFragment>): GraphQlPrintResult;
15
+ private processUsedFragments;
16
+ private processFragment;
17
+ private printVariables;
18
+ private processSelectionSet;
19
+ private processField;
20
+ private resolveVariableName;
21
+ private cleanState;
22
+ }
23
+ //# sourceMappingURL=GraphQlQueryPrinter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlQueryPrinter.d.ts","sourceRoot":"","sources":["../../src/GraphQlQueryPrinter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAgB,eAAe,EAAgD,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAE1H,MAAM,MAAM,kBAAkB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;CAAE,CAAA;AAExF,qBAAa,mBAAmB;IAC/B,OAAO,CAAC,YAAY,CAAO;IAE3B,OAAO,CAAC,eAAe,CAAI;IAC3B,OAAO,CAAC,SAAS,CAGV;IAEP,OAAO,CAAC,mBAAmB,CAA6C;IAExE,OAAO,CAAC,aAAa,CAAoB;IAEzC,OAAO,CAAC,IAAI,CAAK;IAGV,aAAa,CACnB,SAAS,EAAE,OAAO,GAAG,UAAU,EAC/B,MAAM,EAAE,mBAAmB,EAC3B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GACxC,kBAAkB;IAgBrB,OAAO,CAAC,oBAAoB;IAgB5B,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,cAAc;IAiBtB,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,YAAY;IA2BpB,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,UAAU;CAMlB"}
@@ -0,0 +1,3 @@
1
+ export * from './nodes';
2
+ export * from './GraphQlQueryPrinter';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,uBAAuB,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { GraphQlFragmentSpread } from './GraphQlFragmentSpread';
2
+ import { GraphQlInlineFragment } from './GraphQlInlineFragment';
3
+ import { JSONValue } from '@contember/schema';
4
+ export declare class GraphQlField {
5
+ readonly alias: string | null;
6
+ readonly name: string;
7
+ readonly args: GraphQlFieldTypedArgs;
8
+ readonly selectionSet?: GraphQlSelectionSet | undefined;
9
+ constructor(alias: string | null, name: string, args?: GraphQlFieldTypedArgs, selectionSet?: GraphQlSelectionSet | undefined);
10
+ }
11
+ export type GraphQlFieldTypedArgs = Record<string, {
12
+ graphQlType: string;
13
+ value?: JSONValue;
14
+ }>;
15
+ export type GraphQlSelectionSetItem = GraphQlField | GraphQlFragmentSpread | GraphQlInlineFragment;
16
+ export type GraphQlSelectionSet = GraphQlSelectionSetItem[];
17
+ //# sourceMappingURL=GraphQlField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlField.d.ts","sourceRoot":"","sources":["../../../src/nodes/GraphQlField.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE7C,qBAAa,YAAY;aAEP,KAAK,EAAE,MAAM,GAAG,IAAI;aACpB,IAAI,EAAE,MAAM;aACZ,IAAI,EAAE,qBAAqB;aAC3B,YAAY,CAAC;gBAHb,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,qBAA0B,EAChC,YAAY,CAAC,iCAAqB;CAGnD;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE;IAClD,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAA;CACjB,CAAC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,YAAY,GAAG,qBAAqB,GAAG,qBAAqB,CAAA;AAElG,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,EAAE,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { GraphQlSelectionSet } from './GraphQlField';
2
+ export declare class GraphQlFragment {
3
+ readonly name: string;
4
+ readonly type: string;
5
+ readonly selectionSet: GraphQlSelectionSet;
6
+ constructor(name: string, type: string, selectionSet: GraphQlSelectionSet);
7
+ }
8
+ //# sourceMappingURL=GraphQlFragment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlFragment.d.ts","sourceRoot":"","sources":["../../../src/nodes/GraphQlFragment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEpD,qBAAa,eAAe;aAEV,IAAI,EAAE,MAAM;aACZ,IAAI,EAAE,MAAM;aACZ,YAAY,EAAE,mBAAmB;gBAFjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,mBAAmB;CAGlD"}
@@ -0,0 +1,5 @@
1
+ export declare class GraphQlFragmentSpread {
2
+ readonly name: string;
3
+ constructor(name: string);
4
+ }
5
+ //# sourceMappingURL=GraphQlFragmentSpread.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlFragmentSpread.d.ts","sourceRoot":"","sources":["../../../src/nodes/GraphQlFragmentSpread.ts"],"names":[],"mappings":"AAAA,qBAAa,qBAAqB;aAEhB,IAAI,EAAE,MAAM;gBAAZ,IAAI,EAAE,MAAM;CAG7B"}
@@ -0,0 +1,7 @@
1
+ import { GraphQlSelectionSet } from './GraphQlField';
2
+ export declare class GraphQlInlineFragment {
3
+ readonly type: string;
4
+ readonly selectionSet: GraphQlSelectionSet;
5
+ constructor(type: string, selectionSet: GraphQlSelectionSet);
6
+ }
7
+ //# sourceMappingURL=GraphQlInlineFragment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphQlInlineFragment.d.ts","sourceRoot":"","sources":["../../../src/nodes/GraphQlInlineFragment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEpD,qBAAa,qBAAqB;aAEhB,IAAI,EAAE,MAAM;aACZ,YAAY,EAAE,mBAAmB;gBADjC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,mBAAmB;CAGlD"}
@@ -0,0 +1,5 @@
1
+ export * from './GraphQlField';
2
+ export * from './GraphQlFragmentSpread';
3
+ export * from './GraphQlFragment';
4
+ export * from './GraphQlInlineFragment';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/nodes/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA"}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/@types/react/global.d.ts","../../../../node_modules/csstype/index.d.ts","../../../../node_modules/@types/prop-types/index.d.ts","../../../../node_modules/@types/scheduler/tracing.d.ts","../../../../node_modules/@types/react/index.d.ts","../../../../node_modules/@types/react/jsx-runtime.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/value.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/input.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/json.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/acl.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/actions.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/model.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/result.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/validation.d.ts","../../../../node_modules/@contember/schema/dist/src/schema/settings.d.ts","../../../../node_modules/@contember/schema/dist/src/ProjectRole.d.ts","../../../../node_modules/@contember/schema/dist/src/index.d.ts","../../src/nodes/GraphQlFragmentSpread.ts","../../src/nodes/GraphQlInlineFragment.ts","../../src/nodes/GraphQlField.ts","../../src/nodes/GraphQlFragment.ts","../../src/nodes/index.ts","../../src/GraphQlQueryPrinter.ts","../../src/index.ts","../../../../node_modules/vite/types/hmrPayload.d.ts","../../../../node_modules/vite/types/customEvent.d.ts","../../../../node_modules/vite/types/hot.d.ts","../../../../node_modules/vite/types/importGlob.d.ts","../../../../node_modules/vite/types/importMeta.d.ts","../../../../node_modules/vite/client.d.ts"],"fileInfos":[{"version":"f33e5332b24c3773e930e212cbb8b6867c8ba3ec4492064ea78e55a524d57450","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","26f2f787e82c4222710f3b676b4d83eb5ad0a72fa7b746f03449e7a026ce5073","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","bed7b7ba0eb5a160b69af72814b4dde371968e40b6c5e73d3a9f7bee407d158c",{"version":"21e41a76098aa7a191028256e52a726baafd45a925ea5cf0222eb430c96c1d83","affectsGlobalScope":true},{"version":"35299ae4a62086698444a5aaee27fc7aa377c68cbb90b441c9ace246ffd05c97","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"e0275cd0e42990dc3a16f0b7c8bca3efe87f1c8ad404f80c6db1c7c0b828c59f","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"acae90d417bee324b1372813b5a00829d31c7eb670d299cd7f8f9a648ac05688","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"62a4966981264d1f04c44eb0f4b5bdc3d81c1a54725608861e44755aa24ad6a5","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"86a34c7a13de9cabc43161348f663624b56871ed80986e41d214932ddd8d6719","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"4350e5922fecd4bedda2964d69c213a1436349d0b8d260dd902795f5b94dc74b","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"0bd5e7096c7bc02bf70b2cc017fc45ef489cb19bd2f32a71af39ff5787f1b56a","affectsGlobalScope":true},"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"369b91cb44fdb8a8fa15de2bd6c28a7abfe6cc16d483ea42291cc7b1efff88d4","affectsGlobalScope":true},"2879a055439b6c0c0132a1467120a0f85b56b5d735c973ad235acd958b1b5345","3ae62be455efcb1874e7fd1f30f2bb83144757d2f349ceb0c6523bb9f7f7a860","be0f711ade459d8e51739f8544a565bc7d2ea56a9dda7ef6d5edd9d864737276","b1296831e111197bd9ebd73f0d15ad0fe2e11fcc51a6302edb23ffd93794db36","5610e8177b34fa50394973f3faba06fd5268b1264a2f4f7daaa71fee1194a94d","4dc29833bfcaa8597097a99fd486d72a0de9c38bb7a6dcd1dadb70e1b9c17282","9869fe612661e4bb3a63b339b3a0d0cdbb6c9e85dd4a59209c86383179e3fbd9","f42116e2e8ad600dc90bdf8ceade9dcf593c35812d8aaba9c03a3f1dbb87330e","dff2fee737ebe5174f549c9f28e114c0cabac4b5fe4e364654465ba528979ba4","86c9954d4c0c270f2952a8695b90fbf4a58210deae10911be98b6c31b84cc8db","466df547af9cf3861658b08baf3ecbd41c0eaad2101378fadfa54ab24db103e6","66b37de2f4b108cf4467570730a30cac8aa7d9ec94a0e335825c9192c1188094",{"version":"1492704513322629439c269bb9a1daf672c9319bff4cb85fb3739a5a53afbbae","signature":"34e5c5b2be8aa1b3f75ccd21529ae8b9163f510dbdabae4caae3fec3010cc33b"},{"version":"17f850d81088adf2bbc979ed59102d9f67f57a4581d24b63886ae4c6b5f79e89","signature":"45fb3525f5c652416e54f91bd8378464d41e22b0ccc108de7db918cf8e92ffd3"},{"version":"75faa8444f3d7281d1ec337213720d738129ef55a9672c7176bf6a949217ed77","signature":"e2402a646d4471b0985495b6bfca6c9c731d335195bf206e8c982d8ca362692f"},{"version":"10b5677a98e54b81f2ebd2661cb5c6cd9df9f210082b50c4281a308ffedbe72f","signature":"08d34fcbf615950f6d3dd6858437159f0c0af08d5af645ec415ebfeaeacf3bd0"},{"version":"ee4207ce0cb680870df58a4f65bc63d22601f63c867a319bf94e1196b9a03c93","signature":"13ce162c8088b92a985e41a2ddf61cbb191101c280214a74dd9e8d2fd3c9c905"},{"version":"41d26b47fa23c6126b4407396799af8a4d5a63be15837f61204beb4d2692209d","signature":"d2689735d2498972d6f02fbaff989b1fa500b5a140af7e7c08a15fbc36c1d3d3"},{"version":"cd017864db761491dd1dca6cf01c70ee66313a662062664ceb01254b61ce64b1","signature":"4b47e095287cc1351b5fa9c5112d1d2d255bd8916ce76347225837b244e97ed5"},"bcb6ea18f23dae2c48459d7b86d3adccd6898f824fcbf9da08b935f559896580","1363ba7d52f2353d0c4306d0ecdaf171bf4509c0148842f9fd8d3986c098a2eb","cbe726263ae9a7bf32352380f7e8ab66ee25b3457137e316929269c19e18a2be","21092de52736dc30f478fe5f1e88ad1b545ce4b276062999302aa65b30a6787a",{"version":"4025a454b1ca489b179ee8c684bdd70ff8c1967e382076ade53e7e4653e1daec","affectsGlobalScope":true},{"version":"84d68135178bf014e5cdc27e88c9148fc22f82e1a733dc6e1869a5263e58d5db","affectsGlobalScope":true}],"root":[[83,89]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":4,"module":99,"noEmitOnError":true,"noImplicitOverride":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7,"useDefineForClassFields":true},"fileIdsList":[[72,73,74,75,76,77,78,79,80,81],[73,74],[74],[72],[73],[66,67,68,69],[70],[94],[90],[91],[92,93],[71,82,87],[71,87,88],[71,82,83,84],[71,85],[71],[71,83,84,85,86],[82,87],[87,88],[82,83,84],[85],[83,84,85,86]],"referencedMap":[[82,1],[75,2],[76,3],[73,4],[77,5],[78,4],[79,3],[70,6],[71,7],[95,8],[91,9],[92,10],[94,11],[88,12],[89,13],[85,14],[86,15],[83,16],[84,15],[87,17]],"exportedModulesMap":[[82,1],[75,2],[76,3],[73,4],[77,5],[78,4],[79,3],[70,6],[71,7],[95,8],[91,9],[92,10],[94,11],[88,18],[89,19],[85,20],[86,21],[84,21],[87,22]],"semanticDiagnosticsPerFile":[81,82,75,76,73,74,77,78,80,79,72,68,66,70,71,69,67,64,65,12,13,15,14,2,16,17,18,19,20,21,22,23,3,4,24,28,25,26,27,29,30,31,5,32,33,34,35,6,39,36,37,38,40,7,41,46,47,42,43,44,45,8,51,48,49,50,52,9,53,54,55,58,56,57,59,60,10,1,11,63,62,61,95,91,90,92,93,94,88,89,85,86,83,84,87],"latestChangedDtsFile":"./index.d.ts"},"version":"5.3.3"}
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@contember/graphql-builder",
3
+ "license": "Apache-2.0",
4
+ "version": "1.3.0-alpha.10",
5
+ "main": "./dist/production/index.js",
6
+ "exports": {
7
+ ".": {
8
+ "import": {
9
+ "types": "./dist/types/index.d.ts",
10
+ "development": "./dist/development/index.js",
11
+ "production": "./dist/production/index.js",
12
+ "default": "./dist/production/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./dist/types/index.d.ts",
16
+ "development": "./dist/development/index.cjs",
17
+ "production": "./dist/production/index.cjs",
18
+ "default": "./dist/production/index.cjs"
19
+ }
20
+ }
21
+ },
22
+ "files": [
23
+ "dist/",
24
+ "src/"
25
+ ],
26
+ "typings": "./dist/types/index.d.ts",
27
+ "type": "module",
28
+ "sideEffects": false,
29
+ "scripts": {
30
+ "build": "yarn build:js:dev && yarn build:js:prod",
31
+ "build:js:dev": "NODE_ENV=development vite build --mode development",
32
+ "build:js:prod": "vite build --mode production",
33
+ "ae:build": "api-extractor run --local",
34
+ "ae:test": "api-extractor run",
35
+ "test": "vitest"
36
+ },
37
+ "dependencies": {
38
+ "@contember/schema": "^1.3.6"
39
+ },
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "https://github.com/contember/interface.git",
43
+ "directory": "packages/graphql-builder"
44
+ },
45
+ "stableVersion": "0.0.0"
46
+ }