1 | (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, (function(modules) {
|
2 |
|
3 | var installedModules = {};
|
4 |
|
5 |
|
6 | function __webpack_require__(moduleId) {
|
7 |
|
8 |
|
9 | if(installedModules[moduleId]) {
|
10 | return installedModules[moduleId].exports;
|
11 | }
|
12 |
|
13 | var module = installedModules[moduleId] = {
|
14 | i: moduleId,
|
15 | l: false,
|
16 | exports: {}
|
17 | };
|
18 |
|
19 |
|
20 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
|
22 |
|
23 | module.l = true;
|
24 |
|
25 |
|
26 | return module.exports;
|
27 | }
|
28 |
|
29 |
|
30 |
|
31 | __webpack_require__.m = modules;
|
32 |
|
33 |
|
34 | __webpack_require__.c = installedModules;
|
35 |
|
36 |
|
37 | __webpack_require__.d = function(exports, name, getter) {
|
38 | if(!__webpack_require__.o(exports, name)) {
|
39 | Object.defineProperty(exports, name, {
|
40 | configurable: false,
|
41 | enumerable: true,
|
42 | get: getter
|
43 | /******/ });
|
44 | /******/ }
|
45 | /******/ };
|
46 | /******/
|
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
48 | /******/ __webpack_require__.n = function(module) {
|
49 | var getter = module && module.__esModule ?
|
50 | function getDefault() { return module['default']; } :
|
51 | function getModuleExports() { return module; };
|
52 | __webpack_require__.d(getter, 'a', getter);
|
53 | return getter;
|
54 | };
|
55 |
|
56 |
|
57 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
58 |
|
59 |
|
60 | __webpack_require__.p = "";
|
61 |
|
62 |
|
63 | return __webpack_require__(__webpack_require__.s = 4);
|
64 | })
|
65 |
|
66 | ([
|
67 |
|
68 | (function(module, exports, __webpack_require__) {
|
69 |
|
70 | "use strict";
|
71 |
|
72 | Object.defineProperty(exports, "__esModule", { value: true });
|
73 | exports.EInputType = {
|
74 | SINGLE_FILE: 'SINGLE_FILE',
|
75 | MULTIPLE_FILES: 'MULTIPLE_FILES',
|
76 | PROJECT: 'PROJECT',
|
77 | };
|
78 |
|
79 |
|
80 | }),
|
81 |
|
82 | (function(module, exports, __webpack_require__) {
|
83 |
|
84 | "use strict";
|
85 |
|
86 | Object.defineProperty(exports, "__esModule", { value: true });
|
87 | var index = __webpack_require__(5);
|
88 | var type = __webpack_require__(6);
|
89 | var schema = __webpack_require__(7);
|
90 | var documents = __webpack_require__(8);
|
91 | var selectionSet = __webpack_require__(2);
|
92 | var types_1 = __webpack_require__(0);
|
93 | var config = {
|
94 | inputType: types_1.EInputType.SINGLE_FILE,
|
95 | templates: {
|
96 | index: index,
|
97 | type: type,
|
98 | schema: schema,
|
99 | documents: documents,
|
100 | selectionSet: selectionSet,
|
101 | },
|
102 | flattenTypes: true,
|
103 | primitives: {
|
104 | String: 'string',
|
105 | Int: 'number',
|
106 | Float: 'number',
|
107 | Boolean: 'boolean',
|
108 | ID: 'string'
|
109 | },
|
110 | outFile: 'types.d.ts',
|
111 | };
|
112 | exports.default = config;
|
113 |
|
114 |
|
115 | }),
|
116 |
|
117 | (function(module, exports) {
|
118 |
|
119 | module.exports = "{{#each this}}\n{{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{#if description }} // {{description}}{{/if}}\n{{/each}}"
|
120 |
|
121 | }),
|
122 |
|
123 | (function(module, exports, __webpack_require__) {
|
124 |
|
125 | "use strict";
|
126 |
|
127 | Object.defineProperty(exports, "__esModule", { value: true });
|
128 | var type = __webpack_require__(9);
|
129 | var enumTemplate = __webpack_require__(10);
|
130 | var scalar = __webpack_require__(11);
|
131 | var union = __webpack_require__(12);
|
132 | var operation = __webpack_require__(13);
|
133 | var fragment = __webpack_require__(14);
|
134 | var selectionSet = __webpack_require__(2);
|
135 | var types_1 = __webpack_require__(0);
|
136 | var config = {
|
137 | inputType: types_1.EInputType.MULTIPLE_FILES,
|
138 | templates: {
|
139 | type: type,
|
140 | inputType: type,
|
141 | 'enum': enumTemplate,
|
142 | 'interface': type,
|
143 | scalar: scalar,
|
144 | union: union,
|
145 | operation: operation,
|
146 | fragment: fragment,
|
147 | selectionSet: selectionSet,
|
148 | },
|
149 | flattenTypes: true,
|
150 | primitives: {
|
151 | String: 'string',
|
152 | Int: 'number',
|
153 | Float: 'number',
|
154 | Boolean: 'boolean',
|
155 | ID: 'string'
|
156 | },
|
157 | filesExtension: 'd.ts',
|
158 | };
|
159 | exports.default = config;
|
160 |
|
161 |
|
162 | }),
|
163 |
|
164 | (function(module, exports, __webpack_require__) {
|
165 |
|
166 | "use strict";
|
167 |
|
168 | Object.defineProperty(exports, "__esModule", { value: true });
|
169 | var config_1 = __webpack_require__(1);
|
170 | exports.TypescriptSingleFile = config_1.default;
|
171 | var config_2 = __webpack_require__(3);
|
172 | exports.TypescriptMultiFile = config_2.default;
|
173 | var types_1 = __webpack_require__(0);
|
174 | exports.EInputType = types_1.EInputType;
|
175 | var get_generator_1 = __webpack_require__(15);
|
176 | exports.getGeneratorConfig = get_generator_1.getGeneratorConfig;
|
177 | exports.definitions = get_generator_1.definitions;
|
178 |
|
179 |
|
180 | }),
|
181 |
|
182 | (function(module, exports) {
|
183 |
|
184 | module.exports = "/* tslint:disable */\n{{> schema }}\n{{> documents }}\n"
|
185 |
|
186 | }),
|
187 |
|
188 | (function(module, exports) {
|
189 |
|
190 | module.exports = "{{ toComment description }}\nexport interface {{ name }}{{#if hasInterfaces}} extends {{#each interfaces}}{{this}}{{#unless @last}},{{/unless}}{{/each}}{{/if}} {\n{{#each fields}}\n {{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{ toComment description }}\n{{/each}}\n}\n"
|
191 |
|
192 | }),
|
193 |
|
194 | (function(module, exports) {
|
195 |
|
196 | module.exports = "{{#each scalars}}\n\n{{ toComment description }}\nexport type {{ name }} = any;\n{{/each}}\n{{#each interfaces}}\n {{~> type }}\n{{/each}}\n{{#each types}}\n {{~> type }}\n{{/each}}\n{{#each inputTypes}}\n {{~> type }}\n{{/each}}\n{{~#each types}}\n {{~#each fields}}\n {{~# if hasArguments }}\nexport interface {{ toPascalCase name }}{{ toPascalCase ../name }}Args {\n{{#each arguments}}\n {{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{ toComment description }}\n{{/each}}\n}\n {{/if}}\n {{/each}}\n{{/each}}\n{{#each enums}}\n{{ toComment description }}\nexport type {{ name }} = {{#each values }}\"{{ value }}\"{{#unless @last}} | {{/unless}}{{/each}};\n\n{{/each}}\n{{#each unions}}\n{{ toComment description }}\nexport type {{ name }} = {{#each possibleTypes}}{{this}}{{#unless @last}} | {{/unless}}{{/each}};\n\n{{/each}}\n"
|
197 |
|
198 | }),
|
199 |
|
200 | (function(module, exports) {
|
201 |
|
202 | module.exports = "{{#each operations }}\nexport namespace {{ toPascalCase name }} {\n export type Variables = {\n {{#each variables}}\n {{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}};\n {{/each}}\n }\n\n export type {{ toPascalCase operationType }} = {\n {{> selectionSet fields }}\n }{{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n {{#each innerModels }}\n\n export type {{ modelType }} = {\n {{> selectionSet fields }}\n }{{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n {{/each}}\n}\n{{/each}}\n{{#each fragments }}\n\nexport namespace {{name}} {\n export type Fragment = {\n {{> selectionSet fields }}\n }{{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n {{#each innerModels }}\n\n export type {{ modelType }} = {\n {{> selectionSet fields }}\n }{{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n {{/each}}\n}\n{{/each}}"
|
203 |
|
204 | }),
|
205 |
|
206 | (function(module, exports) {
|
207 |
|
208 | module.exports = "{{#eachImport this }}\nimport { {{ name }} } from './{{ file }}';\n{{/eachImport}}\n{{ toComment description }}\nexport interface {{ name }}{{#if hasInterfaces}} extends {{#each interfaces}}{{this}}{{#unless @last}},{{/unless}}{{/each}}{{/if}} {\n{{#each fields}}\n {{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{ toComment description }}\n{{/each}}\n}\n\n{{#each fields}}\n {{~# if hasArguments }}\nexport interface {{ toPascalCase name }}{{ toPascalCase ../name }}Args {\n{{#each arguments}}\n {{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{ toComment description }}\n{{/each}}\n}\n {{/if}}\n{{/each}}"
|
209 |
|
210 | }),
|
211 |
|
212 | (function(module, exports) {
|
213 |
|
214 | module.exports = "{{ toComment description }}\nexport type {{ name }} = {{#each values }}\"{{ value }}\"{{#unless @last}} | {{/unless}}{{/each}};"
|
215 |
|
216 | }),
|
217 |
|
218 | (function(module, exports) {
|
219 |
|
220 | module.exports = "{{#eachImport this }}\nimport { {{ name }} } from './{{ file }}';\n{{/eachImport}}\n{{ toComment description }}\nexport type {{ name }} = any;\n"
|
221 |
|
222 | }),
|
223 |
|
224 | (function(module, exports) {
|
225 |
|
226 | module.exports = "{{#eachImport this }}\nimport { {{ name }} } from './{{ file }}';\n{{/eachImport}}\n{{ toComment description }}\nexport type {{ name }} = {{#each possibleTypes}}{{this}}{{#unless @last}} | {{/unless}}{{/each}};\n"
|
227 |
|
228 | }),
|
229 |
|
230 | (function(module, exports) {
|
231 |
|
232 | module.exports = "{{#eachImport this }}\nimport { {{ name }} } from './{{ file }}';\n{{/eachImport}}\nexport namespace {{ toPascalCase name }} {\n export type Variables = {\n{{#each variables}}\n {{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}};\n{{/each}}\n }\n\n export type {{ toPascalCase operationType }} = {\n {{> selectionSet fields }}\n } {{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n{{#each innerModels }}\n\n export type {{ modelType }} = {\n {{> selectionSet fields }}\n }{{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n{{/each}}\n}\n"
|
233 |
|
234 | }),
|
235 |
|
236 | (function(module, exports) {
|
237 |
|
238 | module.exports = "{{#eachImport this }}\nimport { {{ name }} } from './{{ file }}';\n{{/eachImport}}\nexport namespace {{name}} {\n export type Fragment = {\n {{> selectionSet fields }}\n } {{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n {{#each innerModels }}\n export type {{ modelType }} = {\n {{> selectionSet fields }}\n } {{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n {{/each}}\n}"
|
239 |
|
240 | }),
|
241 |
|
242 | (function(module, exports, __webpack_require__) {
|
243 |
|
244 | "use strict";
|
245 |
|
246 | Object.defineProperty(exports, "__esModule", { value: true });
|
247 | var config_1 = __webpack_require__(1);
|
248 | var config_2 = __webpack_require__(3);
|
249 | exports.definitions = {
|
250 |
|
251 | ts: config_1.default,
|
252 | typescript: config_1.default,
|
253 | 'ts-single': config_1.default,
|
254 | 'typescript-single': config_1.default,
|
255 |
|
256 | 'ts-multiple': config_2.default,
|
257 | 'typescript-multiple': config_2.default,
|
258 | };
|
259 | function getGeneratorConfig(name) {
|
260 | return exports.definitions[name];
|
261 | }
|
262 | exports.getGeneratorConfig = getGeneratorConfig;
|
263 |
|
264 |
|
265 | })
|
266 | ])));
|
267 |
|
\ | No newline at end of file |