1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.addRouteDeclarationToModule = exports.getRouterModuleDeclaration = exports.getEnvironmentExportName = exports.isImported = exports.addEntryComponentToModule = exports.addBootstrapToModule = exports.addExportToModule = exports.addProviderToModule = exports.addImportToModule = exports.addDeclarationToModule = exports.addSymbolToNgModuleMetadata = exports.getMetadataField = exports.getFirstNgModuleName = exports.getDecoratorMetadata = exports.getContentOfKeyLiteral = exports.insertAfterLastOccurrence = exports.findNode = exports.getSourceNodes = exports.findNodes = exports.insertImport = void 0;
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | const ts = require("../third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
12 | const change_1 = require("./change");
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | function insertImport(source, fileToEdit, symbolName, fileName, isDefault = false) {
|
23 | const rootNode = source;
|
24 | const allImports = findNodes(rootNode, ts.SyntaxKind.ImportDeclaration);
|
25 |
|
26 | const relevantImports = allImports.filter(node => {
|
27 |
|
28 | const importFiles = node.getChildren()
|
29 | .filter(child => child.kind === ts.SyntaxKind.StringLiteral)
|
30 | .map(n => n.text);
|
31 | return importFiles.filter(file => file === fileName).length === 1;
|
32 | });
|
33 | if (relevantImports.length > 0) {
|
34 | let importsAsterisk = false;
|
35 |
|
36 | const imports = [];
|
37 | relevantImports.forEach(n => {
|
38 | Array.prototype.push.apply(imports, findNodes(n, ts.SyntaxKind.Identifier));
|
39 | if (findNodes(n, ts.SyntaxKind.AsteriskToken).length > 0) {
|
40 | importsAsterisk = true;
|
41 | }
|
42 | });
|
43 |
|
44 | if (importsAsterisk) {
|
45 | return new change_1.NoopChange();
|
46 | }
|
47 | const importTextNodes = imports.filter(n => n.text === symbolName);
|
48 |
|
49 | if (importTextNodes.length === 0) {
|
50 | const fallbackPos = findNodes(relevantImports[0], ts.SyntaxKind.CloseBraceToken)[0].getStart() ||
|
51 | findNodes(relevantImports[0], ts.SyntaxKind.FromKeyword)[0].getStart();
|
52 | return insertAfterLastOccurrence(imports, `, ${symbolName}`, fileToEdit, fallbackPos);
|
53 | }
|
54 | return new change_1.NoopChange();
|
55 | }
|
56 |
|
57 | const useStrict = findNodes(rootNode, ts.SyntaxKind.StringLiteral)
|
58 | .filter((n) => n.text === 'use strict');
|
59 | let fallbackPos = 0;
|
60 | if (useStrict.length > 0) {
|
61 | fallbackPos = useStrict[0].end;
|
62 | }
|
63 | const open = isDefault ? '' : '{ ';
|
64 | const close = isDefault ? '' : ' }';
|
65 |
|
66 | const insertAtBeginning = allImports.length === 0 && useStrict.length === 0;
|
67 | const separator = insertAtBeginning ? '' : ';\n';
|
68 | const toInsert = `${separator}import ${open}${symbolName}${close}` +
|
69 | ` from '${fileName}'${insertAtBeginning ? ';\n' : ''}`;
|
70 | return insertAfterLastOccurrence(allImports, toInsert, fileToEdit, fallbackPos, ts.SyntaxKind.StringLiteral);
|
71 | }
|
72 | exports.insertImport = insertImport;
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 | function findNodes(node, kind, max = Infinity, recursive = false) {
|
83 | if (!node || max == 0) {
|
84 | return [];
|
85 | }
|
86 | const arr = [];
|
87 | if (node.kind === kind) {
|
88 | arr.push(node);
|
89 | max--;
|
90 | }
|
91 | if (max > 0 && (recursive || node.kind !== kind)) {
|
92 | for (const child of node.getChildren()) {
|
93 | findNodes(child, kind, max).forEach(node => {
|
94 | if (max > 0) {
|
95 | arr.push(node);
|
96 | }
|
97 | max--;
|
98 | });
|
99 | if (max <= 0) {
|
100 | break;
|
101 | }
|
102 | }
|
103 | }
|
104 | return arr;
|
105 | }
|
106 | exports.findNodes = findNodes;
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 | function getSourceNodes(sourceFile) {
|
113 | const nodes = [sourceFile];
|
114 | const result = [];
|
115 | while (nodes.length > 0) {
|
116 | const node = nodes.shift();
|
117 | if (node) {
|
118 | result.push(node);
|
119 | if (node.getChildCount(sourceFile) >= 0) {
|
120 | nodes.unshift(...node.getChildren());
|
121 | }
|
122 | }
|
123 | }
|
124 | return result;
|
125 | }
|
126 | exports.getSourceNodes = getSourceNodes;
|
127 | function findNode(node, kind, text) {
|
128 | if (node.kind === kind && node.getText() === text) {
|
129 |
|
130 | return node;
|
131 | }
|
132 | let foundNode = null;
|
133 | ts.forEachChild(node, childNode => {
|
134 | foundNode = foundNode || findNode(childNode, kind, text);
|
135 | });
|
136 | return foundNode;
|
137 | }
|
138 | exports.findNode = findNode;
|
139 |
|
140 |
|
141 |
|
142 |
|
143 | function nodesByPosition(first, second) {
|
144 | return first.getStart() - second.getStart();
|
145 | }
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 |
|
159 | function insertAfterLastOccurrence(nodes, toInsert, file, fallbackPos, syntaxKind) {
|
160 | let lastItem;
|
161 | for (const node of nodes) {
|
162 | if (!lastItem || lastItem.getStart() < node.getStart()) {
|
163 | lastItem = node;
|
164 | }
|
165 | }
|
166 | if (syntaxKind && lastItem) {
|
167 | lastItem = findNodes(lastItem, syntaxKind).sort(nodesByPosition).pop();
|
168 | }
|
169 | if (!lastItem && fallbackPos == undefined) {
|
170 | throw new Error(`tried to insert ${toInsert} as first occurence with no fallback position`);
|
171 | }
|
172 | const lastItemPosition = lastItem ? lastItem.getEnd() : fallbackPos;
|
173 | return new change_1.InsertChange(file, lastItemPosition, toInsert);
|
174 | }
|
175 | exports.insertAfterLastOccurrence = insertAfterLastOccurrence;
|
176 | function getContentOfKeyLiteral(_source, node) {
|
177 | if (node.kind == ts.SyntaxKind.Identifier) {
|
178 | return node.text;
|
179 | }
|
180 | else if (node.kind == ts.SyntaxKind.StringLiteral) {
|
181 | return node.text;
|
182 | }
|
183 | else {
|
184 | return null;
|
185 | }
|
186 | }
|
187 | exports.getContentOfKeyLiteral = getContentOfKeyLiteral;
|
188 | function _angularImportsFromNode(node, _sourceFile) {
|
189 | const ms = node.moduleSpecifier;
|
190 | let modulePath;
|
191 | switch (ms.kind) {
|
192 | case ts.SyntaxKind.StringLiteral:
|
193 | modulePath = ms.text;
|
194 | break;
|
195 | default:
|
196 | return {};
|
197 | }
|
198 | if (!modulePath.startsWith('@angular/')) {
|
199 | return {};
|
200 | }
|
201 | if (node.importClause) {
|
202 | if (node.importClause.name) {
|
203 |
|
204 | return {};
|
205 | }
|
206 | else if (node.importClause.namedBindings) {
|
207 | const nb = node.importClause.namedBindings;
|
208 | if (nb.kind == ts.SyntaxKind.NamespaceImport) {
|
209 |
|
210 | return {
|
211 | [nb.name.text + '.']: modulePath,
|
212 | };
|
213 | }
|
214 | else {
|
215 |
|
216 | const namedImports = nb;
|
217 | return namedImports.elements
|
218 | .map((is) => is.propertyName ? is.propertyName.text : is.name.text)
|
219 | .reduce((acc, curr) => {
|
220 | acc[curr] = modulePath;
|
221 | return acc;
|
222 | }, {});
|
223 | }
|
224 | }
|
225 | return {};
|
226 | }
|
227 | else {
|
228 |
|
229 | return {};
|
230 | }
|
231 | }
|
232 | function getDecoratorMetadata(source, identifier, module) {
|
233 | const angularImports = findNodes(source, ts.SyntaxKind.ImportDeclaration)
|
234 | .map((node) => _angularImportsFromNode(node, source))
|
235 | .reduce((acc, current) => {
|
236 | for (const key of Object.keys(current)) {
|
237 | acc[key] = current[key];
|
238 | }
|
239 | return acc;
|
240 | }, {});
|
241 | return getSourceNodes(source)
|
242 | .filter(node => {
|
243 | return node.kind == ts.SyntaxKind.Decorator
|
244 | && node.expression.kind == ts.SyntaxKind.CallExpression;
|
245 | })
|
246 | .map(node => node.expression)
|
247 | .filter(expr => {
|
248 | if (expr.expression.kind == ts.SyntaxKind.Identifier) {
|
249 | const id = expr.expression;
|
250 | return id.text == identifier && angularImports[id.text] === module;
|
251 | }
|
252 | else if (expr.expression.kind == ts.SyntaxKind.PropertyAccessExpression) {
|
253 |
|
254 | const paExpr = expr.expression;
|
255 |
|
256 | if (paExpr.expression.kind !== ts.SyntaxKind.Identifier) {
|
257 | return false;
|
258 | }
|
259 | const id = paExpr.name.text;
|
260 | const moduleId = paExpr.expression.text;
|
261 | return id === identifier && (angularImports[moduleId + '.'] === module);
|
262 | }
|
263 | return false;
|
264 | })
|
265 | .filter(expr => expr.arguments[0]
|
266 | && expr.arguments[0].kind == ts.SyntaxKind.ObjectLiteralExpression)
|
267 | .map(expr => expr.arguments[0]);
|
268 | }
|
269 | exports.getDecoratorMetadata = getDecoratorMetadata;
|
270 | function findClassDeclarationParent(node) {
|
271 | if (ts.isClassDeclaration(node)) {
|
272 | return node;
|
273 | }
|
274 | return node.parent && findClassDeclarationParent(node.parent);
|
275 | }
|
276 |
|
277 |
|
278 |
|
279 |
|
280 |
|
281 |
|
282 | function getFirstNgModuleName(source) {
|
283 |
|
284 | const ngModulesMetadata = getDecoratorMetadata(source, 'NgModule', '@angular/core');
|
285 | if (ngModulesMetadata.length === 0) {
|
286 | return undefined;
|
287 | }
|
288 |
|
289 |
|
290 | const moduleClass = findClassDeclarationParent(ngModulesMetadata[0]);
|
291 | if (!moduleClass || !moduleClass.name) {
|
292 | return undefined;
|
293 | }
|
294 |
|
295 | return moduleClass.name.text;
|
296 | }
|
297 | exports.getFirstNgModuleName = getFirstNgModuleName;
|
298 | function getMetadataField(node, metadataField) {
|
299 | return node.properties
|
300 | .filter(prop => ts.isPropertyAssignment(prop))
|
301 |
|
302 |
|
303 | .filter(({ name }) => {
|
304 | return (ts.isIdentifier(name) || ts.isStringLiteral(name))
|
305 | && name.getText() === metadataField;
|
306 | });
|
307 | }
|
308 | exports.getMetadataField = getMetadataField;
|
309 | function addSymbolToNgModuleMetadata(source, ngModulePath, metadataField, symbolName, importPath = null) {
|
310 | const nodes = getDecoratorMetadata(source, 'NgModule', '@angular/core');
|
311 | let node = nodes[0];
|
312 |
|
313 | if (!node) {
|
314 | return [];
|
315 | }
|
316 |
|
317 | const matchingProperties = getMetadataField(node, metadataField);
|
318 |
|
319 | if (!matchingProperties) {
|
320 | return [];
|
321 | }
|
322 | if (matchingProperties.length == 0) {
|
323 |
|
324 | const expr = node;
|
325 | let position;
|
326 | let toInsert;
|
327 | if (expr.properties.length == 0) {
|
328 | position = expr.getEnd() - 1;
|
329 | toInsert = ` ${metadataField}: [${symbolName}]\n`;
|
330 | }
|
331 | else {
|
332 | node = expr.properties[expr.properties.length - 1];
|
333 | position = node.getEnd();
|
334 |
|
335 | const text = node.getFullText(source);
|
336 | const matches = text.match(/^\r?\n\s*/);
|
337 | if (matches && matches.length > 0) {
|
338 | toInsert = `,${matches[0]}${metadataField}: [${symbolName}]`;
|
339 | }
|
340 | else {
|
341 | toInsert = `, ${metadataField}: [${symbolName}]`;
|
342 | }
|
343 | }
|
344 | if (importPath !== null) {
|
345 | return [
|
346 | new change_1.InsertChange(ngModulePath, position, toInsert),
|
347 | insertImport(source, ngModulePath, symbolName.replace(/\..*$/, ''), importPath),
|
348 | ];
|
349 | }
|
350 | else {
|
351 | return [new change_1.InsertChange(ngModulePath, position, toInsert)];
|
352 | }
|
353 | }
|
354 | const assignment = matchingProperties[0];
|
355 |
|
356 | if (assignment.initializer.kind !== ts.SyntaxKind.ArrayLiteralExpression) {
|
357 | return [];
|
358 | }
|
359 | const arrLiteral = assignment.initializer;
|
360 | if (arrLiteral.elements.length == 0) {
|
361 |
|
362 | node = arrLiteral;
|
363 | }
|
364 | else {
|
365 | node = arrLiteral.elements;
|
366 | }
|
367 | if (!node) {
|
368 |
|
369 | console.error('No app module found. Please add your new class to your component.');
|
370 | return [];
|
371 | }
|
372 | if (Array.isArray(node)) {
|
373 | const nodeArray = node;
|
374 | const symbolsArray = nodeArray.map(node => node.getText());
|
375 | if (symbolsArray.includes(symbolName)) {
|
376 | return [];
|
377 | }
|
378 | node = node[node.length - 1];
|
379 | }
|
380 | let toInsert;
|
381 | let position = node.getEnd();
|
382 | if (node.kind == ts.SyntaxKind.ObjectLiteralExpression) {
|
383 |
|
384 |
|
385 | const expr = node;
|
386 | if (expr.properties.length == 0) {
|
387 | position = expr.getEnd() - 1;
|
388 | toInsert = ` ${symbolName}\n`;
|
389 | }
|
390 | else {
|
391 |
|
392 | const text = node.getFullText(source);
|
393 | if (text.match(/^\r?\r?\n/)) {
|
394 | toInsert = `,${text.match(/^\r?\n\s*/)[0]}${symbolName}`;
|
395 | }
|
396 | else {
|
397 | toInsert = `, ${symbolName}`;
|
398 | }
|
399 | }
|
400 | }
|
401 | else if (node.kind == ts.SyntaxKind.ArrayLiteralExpression) {
|
402 |
|
403 | position--;
|
404 | toInsert = `${symbolName}`;
|
405 | }
|
406 | else {
|
407 |
|
408 | const text = node.getFullText(source);
|
409 | if (text.match(/^\r?\n/)) {
|
410 | toInsert = `,${text.match(/^\r?\n(\r?)\s*/)[0]}${symbolName}`;
|
411 | }
|
412 | else {
|
413 | toInsert = `, ${symbolName}`;
|
414 | }
|
415 | }
|
416 | if (importPath !== null) {
|
417 | return [
|
418 | new change_1.InsertChange(ngModulePath, position, toInsert),
|
419 | insertImport(source, ngModulePath, symbolName.replace(/\..*$/, ''), importPath),
|
420 | ];
|
421 | }
|
422 | return [new change_1.InsertChange(ngModulePath, position, toInsert)];
|
423 | }
|
424 | exports.addSymbolToNgModuleMetadata = addSymbolToNgModuleMetadata;
|
425 |
|
426 |
|
427 |
|
428 |
|
429 | function addDeclarationToModule(source, modulePath, classifiedName, importPath) {
|
430 | return addSymbolToNgModuleMetadata(source, modulePath, 'declarations', classifiedName, importPath);
|
431 | }
|
432 | exports.addDeclarationToModule = addDeclarationToModule;
|
433 |
|
434 |
|
435 |
|
436 | function addImportToModule(source, modulePath, classifiedName, importPath) {
|
437 | return addSymbolToNgModuleMetadata(source, modulePath, 'imports', classifiedName, importPath);
|
438 | }
|
439 | exports.addImportToModule = addImportToModule;
|
440 |
|
441 |
|
442 |
|
443 | function addProviderToModule(source, modulePath, classifiedName, importPath) {
|
444 | return addSymbolToNgModuleMetadata(source, modulePath, 'providers', classifiedName, importPath);
|
445 | }
|
446 | exports.addProviderToModule = addProviderToModule;
|
447 |
|
448 |
|
449 |
|
450 | function addExportToModule(source, modulePath, classifiedName, importPath) {
|
451 | return addSymbolToNgModuleMetadata(source, modulePath, 'exports', classifiedName, importPath);
|
452 | }
|
453 | exports.addExportToModule = addExportToModule;
|
454 |
|
455 |
|
456 |
|
457 | function addBootstrapToModule(source, modulePath, classifiedName, importPath) {
|
458 | return addSymbolToNgModuleMetadata(source, modulePath, 'bootstrap', classifiedName, importPath);
|
459 | }
|
460 | exports.addBootstrapToModule = addBootstrapToModule;
|
461 |
|
462 |
|
463 |
|
464 |
|
465 | function addEntryComponentToModule(source, modulePath, classifiedName, importPath) {
|
466 | return addSymbolToNgModuleMetadata(source, modulePath, 'entryComponents', classifiedName, importPath);
|
467 | }
|
468 | exports.addEntryComponentToModule = addEntryComponentToModule;
|
469 |
|
470 |
|
471 |
|
472 | function isImported(source, classifiedName, importPath) {
|
473 | const allNodes = getSourceNodes(source);
|
474 | const matchingNodes = allNodes
|
475 | .filter(node => node.kind === ts.SyntaxKind.ImportDeclaration)
|
476 | .filter((imp) => imp.moduleSpecifier.kind === ts.SyntaxKind.StringLiteral)
|
477 | .filter((imp) => {
|
478 | return imp.moduleSpecifier.text === importPath;
|
479 | })
|
480 | .filter((imp) => {
|
481 | if (!imp.importClause) {
|
482 | return false;
|
483 | }
|
484 | const nodes = findNodes(imp.importClause, ts.SyntaxKind.ImportSpecifier)
|
485 | .filter(n => n.getText() === classifiedName);
|
486 | return nodes.length > 0;
|
487 | });
|
488 | return matchingNodes.length > 0;
|
489 | }
|
490 | exports.isImported = isImported;
|
491 |
|
492 |
|
493 |
|
494 |
|
495 |
|
496 | function getEnvironmentExportName(source) {
|
497 |
|
498 |
|
499 | let environmentExportName = null;
|
500 | const allNodes = getSourceNodes(source);
|
501 | allNodes
|
502 | .filter(node => node.kind === ts.SyntaxKind.ImportDeclaration)
|
503 | .filter((declaration) => declaration.moduleSpecifier.kind === ts.SyntaxKind.StringLiteral &&
|
504 | declaration.importClause !== undefined)
|
505 | .map((declaration) =>
|
506 |
|
507 |
|
508 | declaration.importClause.getChildAt(0))
|
509 |
|
510 |
|
511 | .filter((namedImports) => namedImports.getText().includes('environment'))
|
512 | .forEach((namedImports) => {
|
513 | for (const specifier of namedImports.elements) {
|
514 |
|
515 |
|
516 | const name = specifier.propertyName || specifier.name;
|
517 |
|
518 |
|
519 | if (name.text.includes('environment')) {
|
520 | environmentExportName = specifier.name.text;
|
521 | }
|
522 | }
|
523 | });
|
524 | return environmentExportName;
|
525 | }
|
526 | exports.getEnvironmentExportName = getEnvironmentExportName;
|
527 |
|
528 |
|
529 |
|
530 | function getRouterModuleDeclaration(source) {
|
531 | const result = getDecoratorMetadata(source, 'NgModule', '@angular/core');
|
532 | const node = result[0];
|
533 | const matchingProperties = getMetadataField(node, 'imports');
|
534 | if (!matchingProperties) {
|
535 | return;
|
536 | }
|
537 | const assignment = matchingProperties[0];
|
538 | if (assignment.initializer.kind !== ts.SyntaxKind.ArrayLiteralExpression) {
|
539 | return;
|
540 | }
|
541 | const arrLiteral = assignment.initializer;
|
542 | return arrLiteral.elements
|
543 | .filter(el => el.kind === ts.SyntaxKind.CallExpression)
|
544 | .find(el => el.getText().startsWith('RouterModule'));
|
545 | }
|
546 | exports.getRouterModuleDeclaration = getRouterModuleDeclaration;
|
547 |
|
548 |
|
549 |
|
550 | function addRouteDeclarationToModule(source, fileToAdd, routeLiteral) {
|
551 | const routerModuleExpr = getRouterModuleDeclaration(source);
|
552 | if (!routerModuleExpr) {
|
553 | throw new Error(`Couldn't find a route declaration in ${fileToAdd}.`);
|
554 | }
|
555 | const scopeConfigMethodArgs = routerModuleExpr.arguments;
|
556 | if (!scopeConfigMethodArgs.length) {
|
557 | const { line } = source.getLineAndCharacterOfPosition(routerModuleExpr.getStart());
|
558 | throw new Error(`The router module method doesn't have arguments ` +
|
559 | `at line ${line} in ${fileToAdd}`);
|
560 | }
|
561 | let routesArr;
|
562 | const routesArg = scopeConfigMethodArgs[0];
|
563 |
|
564 |
|
565 | if (ts.isArrayLiteralExpression(routesArg)) {
|
566 | routesArr = routesArg;
|
567 | }
|
568 | else {
|
569 | const routesVarName = routesArg.getText();
|
570 | let routesVar;
|
571 | if (routesArg.kind === ts.SyntaxKind.Identifier) {
|
572 | routesVar = source.statements
|
573 | .filter((s) => s.kind === ts.SyntaxKind.VariableStatement)
|
574 | .find((v) => {
|
575 | return v.declarationList.declarations[0].name.getText() === routesVarName;
|
576 | });
|
577 | }
|
578 | if (!routesVar) {
|
579 | const { line } = source.getLineAndCharacterOfPosition(routesArg.getStart());
|
580 | throw new Error(`No route declaration array was found that corresponds ` +
|
581 | `to router module at line ${line} in ${fileToAdd}`);
|
582 | }
|
583 | routesArr = findNodes(routesVar, ts.SyntaxKind.ArrayLiteralExpression, 1)[0];
|
584 | }
|
585 | const occurrencesCount = routesArr.elements.length;
|
586 | const text = routesArr.getFullText(source);
|
587 | let route = routeLiteral;
|
588 | let insertPos = routesArr.elements.pos;
|
589 | if (occurrencesCount > 0) {
|
590 | const lastRouteLiteral = [...routesArr.elements].pop();
|
591 | const lastRouteIsWildcard = ts.isObjectLiteralExpression(lastRouteLiteral)
|
592 | && lastRouteLiteral
|
593 | .properties
|
594 | .some(n => (ts.isPropertyAssignment(n)
|
595 | && ts.isIdentifier(n.name)
|
596 | && n.name.text === 'path'
|
597 | && ts.isStringLiteral(n.initializer)
|
598 | && n.initializer.text === '**'));
|
599 | const indentation = text.match(/\r?\n(\r?)\s*/) || [];
|
600 | const routeText = `${indentation[0] || ' '}${routeLiteral}`;
|
601 |
|
602 |
|
603 | if (lastRouteIsWildcard) {
|
604 | insertPos = lastRouteLiteral.pos;
|
605 | route = `${routeText},`;
|
606 | }
|
607 | else {
|
608 | insertPos = lastRouteLiteral.end;
|
609 | route = `,${routeText}`;
|
610 | }
|
611 | }
|
612 | return new change_1.InsertChange(fileToAdd, insertPos, route);
|
613 | }
|
614 | exports.addRouteDeclarationToModule = addRouteDeclarationToModule;
|