@onecx/nx-migration-utils 6.0.0-rc.9 → 6.1.0

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 (127) hide show
  1. package/package.json +4 -2
  2. package/src/index.d.ts +20 -2
  3. package/src/index.js +20 -2
  4. package/src/index.js.map +1 -1
  5. package/src/lib/angular/html-templates.utils.d.ts +48 -0
  6. package/src/lib/angular/html-templates.utils.js +108 -0
  7. package/src/lib/angular/html-templates.utils.js.map +1 -0
  8. package/src/lib/angular/index.d.ts +16 -0
  9. package/src/lib/angular/index.js +20 -0
  10. package/src/lib/angular/index.js.map +1 -1
  11. package/src/lib/angular/model/matching-module.model.d.ts +4 -0
  12. package/src/lib/angular/model/matching-module.model.js +3 -0
  13. package/src/lib/angular/model/matching-module.model.js.map +1 -0
  14. package/src/lib/angular/model/module.model.d.ts +3 -0
  15. package/src/lib/angular/model/module.model.js +3 -0
  16. package/src/lib/angular/model/module.model.js.map +1 -0
  17. package/src/lib/angular/model/provider.model.d.ts +4 -0
  18. package/src/lib/angular/model/provider.model.js +3 -0
  19. package/src/lib/angular/model/provider.model.js.map +1 -0
  20. package/src/lib/angular/parameters.utils.d.ts +11 -0
  21. package/src/lib/angular/parameters.utils.js +49 -0
  22. package/src/lib/angular/parameters.utils.js.map +1 -0
  23. package/src/lib/angular/replacement-in-files.utils.d.ts +17 -0
  24. package/src/lib/angular/replacement-in-files.utils.js +52 -0
  25. package/src/lib/angular/replacement-in-files.utils.js.map +1 -0
  26. package/src/lib/angular/utils/detection/detect-modules-importing-module.utils.d.ts +12 -0
  27. package/src/lib/angular/utils/detection/detect-modules-importing-module.utils.js +40 -0
  28. package/src/lib/angular/utils/detection/detect-modules-importing-module.utils.js.map +1 -0
  29. package/src/lib/angular/utils/detection/detect-variables-with-module.utils.d.ts +10 -0
  30. package/src/lib/angular/utils/detection/detect-variables-with-module.utils.js +15 -0
  31. package/src/lib/angular/utils/detection/detect-variables-with-module.utils.js.map +1 -0
  32. package/src/lib/angular/utils/detection/detect-variables-with-provider.utils.d.ts +10 -0
  33. package/src/lib/angular/utils/detection/detect-variables-with-provider.utils.js +15 -0
  34. package/src/lib/angular/utils/detection/detect-variables-with-provider.utils.js.map +1 -0
  35. package/src/lib/angular/utils/modification/add-provider-import-if-does-not-exist.utils.d.ts +9 -0
  36. package/src/lib/angular/utils/modification/add-provider-import-if-does-not-exist.utils.js +24 -0
  37. package/src/lib/angular/utils/modification/add-provider-import-if-does-not-exist.utils.js.map +1 -0
  38. package/src/lib/angular/utils/modification/add-provider-import-in-file.utils.d.ts +8 -0
  39. package/src/lib/angular/utils/modification/add-provider-import-in-file.utils.js +25 -0
  40. package/src/lib/angular/utils/modification/add-provider-import-in-file.utils.js.map +1 -0
  41. package/src/lib/angular/utils/modification/add-provider-in-module-if-does-not-exist.utils.d.ts +11 -0
  42. package/src/lib/angular/utils/modification/add-provider-in-module-if-does-not-exist.utils.js +25 -0
  43. package/src/lib/angular/utils/modification/add-provider-in-module-if-does-not-exist.utils.js.map +1 -0
  44. package/src/lib/angular/utils/modification/add-provider-in-module.utils.d.ts +10 -0
  45. package/src/lib/angular/utils/modification/add-provider-in-module.utils.js +29 -0
  46. package/src/lib/angular/utils/modification/add-provider-in-module.utils.js.map +1 -0
  47. package/src/lib/angular/utils/patterns.utils.d.ts +26 -0
  48. package/src/lib/angular/utils/patterns.utils.js +42 -0
  49. package/src/lib/angular/utils/patterns.utils.js.map +1 -0
  50. package/src/lib/angular/utils/validation/is-provider-import-in-file.utils.d.ts +8 -0
  51. package/src/lib/angular/utils/validation/is-provider-import-in-file.utils.js +19 -0
  52. package/src/lib/angular/utils/validation/is-provider-import-in-file.utils.js.map +1 -0
  53. package/src/lib/angular/utils/validation/is-provider-in-module.utils.d.ts +11 -0
  54. package/src/lib/angular/utils/validation/is-provider-in-module.utils.js +22 -0
  55. package/src/lib/angular/utils/validation/is-provider-in-module.utils.js.map +1 -0
  56. package/src/lib/common-migrations/common-migrate-onecx-to-v6.utils.d.ts +2 -0
  57. package/src/lib/common-migrations/common-migrate-onecx-to-v6.utils.js +278 -0
  58. package/src/lib/common-migrations/common-migrate-onecx-to-v6.utils.js.map +1 -0
  59. package/src/lib/utils/detect-method-calls-in-files.d.ts +0 -8
  60. package/src/lib/utils/detect-method-calls-in-files.js +0 -28
  61. package/src/lib/utils/detect-method-calls-in-files.js.map +1 -1
  62. package/src/lib/utils/detect-method-calls-in-files.utils.d.ts +20 -0
  63. package/src/lib/utils/detect-method-calls-in-files.utils.js +138 -0
  64. package/src/lib/utils/detect-method-calls-in-files.utils.js.map +1 -0
  65. package/src/lib/utils/detection/detect-variables-with-identifier.utils.d.ts +9 -0
  66. package/src/lib/utils/detection/detect-variables-with-identifier.utils.js +27 -0
  67. package/src/lib/utils/detection/detect-variables-with-identifier.utils.js.map +1 -0
  68. package/src/lib/utils/import-statements.utils.d.ts +137 -0
  69. package/src/lib/utils/import-statements.utils.js +319 -0
  70. package/src/lib/utils/import-statements.utils.js.map +1 -0
  71. package/src/lib/utils/modification/add-new-import.utils.d.ts +8 -0
  72. package/src/lib/utils/modification/add-new-import.utils.js +14 -0
  73. package/src/lib/utils/modification/add-new-import.utils.js.map +1 -0
  74. package/src/lib/utils/modification/add-to-first-import.utils.d.ts +8 -0
  75. package/src/lib/utils/modification/add-to-first-import.utils.js +21 -0
  76. package/src/lib/utils/modification/add-to-first-import.utils.js.map +1 -0
  77. package/src/lib/utils/modification/remove-import-specifier.utils.d.ts +9 -0
  78. package/src/lib/utils/modification/remove-import-specifier.utils.js +33 -0
  79. package/src/lib/utils/modification/remove-import-specifier.utils.js.map +1 -0
  80. package/src/lib/utils/modification/remove-json-references.utils.d.ts +11 -0
  81. package/src/lib/utils/modification/remove-json-references.utils.js +34 -0
  82. package/src/lib/utils/modification/remove-json-references.utils.js.map +1 -0
  83. package/src/lib/utils/modification/replace-tag-in-html.utils.d.ts +9 -0
  84. package/src/lib/utils/modification/replace-tag-in-html.utils.js +29 -0
  85. package/src/lib/utils/modification/replace-tag-in-html.utils.js.map +1 -0
  86. package/src/lib/utils/modification/update-json-files.utils.d.ts +18 -0
  87. package/src/lib/utils/modification/update-json-files.utils.js +28 -0
  88. package/src/lib/utils/modification/update-json-files.utils.js.map +1 -0
  89. package/src/lib/utils/modification/update-style-sheet.utils.d.ts +11 -0
  90. package/src/lib/utils/modification/update-style-sheet.utils.js +23 -0
  91. package/src/lib/utils/modification/update-style-sheet.utils.js.map +1 -0
  92. package/src/lib/utils/modification/update-style-sheets.utils.d.ts +20 -0
  93. package/src/lib/utils/modification/update-style-sheets.utils.js +31 -0
  94. package/src/lib/utils/modification/update-style-sheets.utils.js.map +1 -0
  95. package/src/lib/utils/patterns.utils.d.ts +31 -0
  96. package/src/lib/utils/patterns.utils.js +51 -0
  97. package/src/lib/utils/patterns.utils.js.map +1 -0
  98. package/src/lib/utils/print-warnings.d.ts +0 -5
  99. package/src/lib/utils/print-warnings.js +0 -5
  100. package/src/lib/utils/print-warnings.js.map +1 -1
  101. package/src/lib/utils/print-warnings.utils.d.ts +6 -0
  102. package/src/lib/utils/print-warnings.utils.js +15 -0
  103. package/src/lib/utils/print-warnings.utils.js.map +1 -0
  104. package/src/lib/utils/typescript-files.utils.d.ts +20 -0
  105. package/src/lib/utils/typescript-files.utils.js +57 -0
  106. package/src/lib/utils/typescript-files.utils.js.map +1 -0
  107. package/src/lib/utils/update-gitignore.utils.d.ts +9 -0
  108. package/src/lib/utils/update-gitignore.utils.js +42 -0
  109. package/src/lib/utils/update-gitignore.utils.js.map +1 -0
  110. package/src/lib/utils/validation/has-html-tag.utils.d.ts +10 -0
  111. package/src/lib/utils/validation/has-html-tag.utils.js +29 -0
  112. package/src/lib/utils/validation/has-html-tag.utils.js.map +1 -0
  113. package/src/lib/utils/validation/is-file-style-sheet.utils.d.ts +8 -0
  114. package/src/lib/utils/validation/is-file-style-sheet.utils.js +14 -0
  115. package/src/lib/utils/validation/is-file-style-sheet.utils.js.map +1 -0
  116. package/src/lib/utils/validation/is-import-in-content.utils.d.ts +7 -0
  117. package/src/lib/utils/validation/is-import-in-content.utils.js +17 -0
  118. package/src/lib/utils/validation/is-import-in-content.utils.js.map +1 -0
  119. package/src/lib/utils/validation/is-import-in-file-content.utils.d.ts +8 -0
  120. package/src/lib/utils/validation/is-import-in-file-content.utils.js +18 -0
  121. package/src/lib/utils/validation/is-import-in-file-content.utils.js.map +1 -0
  122. package/src/lib/utils/validation/is-namespace-import-in-content.utils.d.ts +7 -0
  123. package/src/lib/utils/validation/is-namespace-import-in-content.utils.js +17 -0
  124. package/src/lib/utils/validation/is-namespace-import-in-content.utils.js.map +1 -0
  125. package/src/test-setup.d.ts +1 -0
  126. package/src/test-setup.js +6 -0
  127. package/src/test-setup.js.map +1 -0
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addProviderImportIfDoesNotExist = addProviderImportIfDoesNotExist;
4
+ const is_provider_import_in_file_utils_1 = require("../validation/is-provider-import-in-file.utils");
5
+ const add_provider_import_in_file_utils_1 = require("./add-provider-import-in-file.utils");
6
+ /**
7
+ * Modify the file content so the import for Angular provider exists if it was not present already.
8
+ * @param tree - the file tree used for file content reading
9
+ * @param filePath - the path to a file to validate and update
10
+ * @param provider - angular provider to import
11
+ */
12
+ function addProviderImportIfDoesNotExist(tree, filePath, provider) {
13
+ const fileContent = tree.read(filePath, 'utf-8');
14
+ if (!fileContent)
15
+ return;
16
+ let updatedFileContent = fileContent;
17
+ if (!(0, is_provider_import_in_file_utils_1.isProviderImportInFile)(updatedFileContent, provider)) {
18
+ updatedFileContent = (0, add_provider_import_in_file_utils_1.addProviderImportInFile)(updatedFileContent, provider);
19
+ }
20
+ if (fileContent !== updatedFileContent) {
21
+ tree.write(filePath, updatedFileContent);
22
+ }
23
+ }
24
+ //# sourceMappingURL=add-provider-import-if-does-not-exist.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-provider-import-if-does-not-exist.utils.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-migration-utils/src/lib/angular/utils/modification/add-provider-import-if-does-not-exist.utils.ts"],"names":[],"mappings":";;AAWA,0EAaC;AAtBD,qGAAuF;AACvF,2FAA6E;AAE7E;;;;;GAKG;AACH,SAAgB,+BAA+B,CAAC,IAAU,EAAE,QAAgB,EAAE,QAAkB;IAC9F,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;IAChD,IAAI,CAAC,WAAW;QAAE,OAAM;IAExB,IAAI,kBAAkB,GAAG,WAAW,CAAA;IAEpC,IAAI,CAAC,IAAA,yDAAsB,EAAC,kBAAkB,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC1D,kBAAkB,GAAG,IAAA,2DAAuB,EAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAA;IAC5E,CAAC;IAED,IAAI,WAAW,KAAK,kBAAkB,EAAE,CAAC;QACvC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAA;IAC1C,CAAC;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Provider } from '../../model/provider.model';
2
+ /**
3
+ * Add the import for Angular provider in the file.
4
+ * @param fileContent - the path to a file to modify
5
+ * @param provider - angular provider to add
6
+ * @returns {string} modified content of the file with provider imported
7
+ */
8
+ export declare function addProviderImportInFile(fileContent: string, provider: Provider): string;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addProviderImportInFile = addProviderImportInFile;
4
+ const add_new_import_utils_1 = require("../../../utils/modification/add-new-import.utils");
5
+ const add_to_first_import_utils_1 = require("../../../utils/modification/add-to-first-import.utils");
6
+ const is_import_in_content_utils_1 = require("../../../utils/validation/is-import-in-content.utils");
7
+ const is_namespace_import_in_content_utils_1 = require("../../../utils/validation/is-namespace-import-in-content.utils");
8
+ /**
9
+ * Add the import for Angular provider in the file.
10
+ * @param fileContent - the path to a file to modify
11
+ * @param provider - angular provider to add
12
+ * @returns {string} modified content of the file with provider imported
13
+ */
14
+ function addProviderImportInFile(fileContent, provider) {
15
+ if ((0, is_namespace_import_in_content_utils_1.isNamespaceImportInContent)(fileContent, provider.importPath)) {
16
+ return fileContent;
17
+ }
18
+ else if ((0, is_import_in_content_utils_1.isImportInContent)(fileContent, provider.importPath)) {
19
+ return (0, add_to_first_import_utils_1.addToFirstImport)(fileContent, provider.importPath, provider.name);
20
+ }
21
+ else {
22
+ return (0, add_new_import_utils_1.addNewImport)(fileContent, provider.importPath, [provider.name]);
23
+ }
24
+ }
25
+ //# sourceMappingURL=add-provider-import-in-file.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-provider-import-in-file.utils.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-migration-utils/src/lib/angular/utils/modification/add-provider-import-in-file.utils.ts"],"names":[],"mappings":";;AAYA,0DAQC;AApBD,2FAA+E;AAC/E,qGAAwF;AACxF,qGAAwF;AACxF,yHAA2G;AAG3G;;;;;GAKG;AACH,SAAgB,uBAAuB,CAAC,WAAmB,EAAE,QAAkB;IAC7E,IAAI,IAAA,iEAA0B,EAAC,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QACjE,OAAO,WAAW,CAAA;IACpB,CAAC;SAAM,IAAI,IAAA,8CAAiB,EAAC,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/D,OAAO,IAAA,4CAAgB,EAAC,WAAW,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC1E,CAAC;SAAM,CAAC;QACN,OAAO,IAAA,mCAAY,EAAC,WAAW,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAA;IACxE,CAAC;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { MatchingModule } from '../../model/matching-module.model';
3
+ import { Provider } from '../../model/provider.model';
4
+ /**
5
+ * Modify content of the file with the given module so the import of Angular provider exists if it was not present already.
6
+ * @param tree - the file tree used for file content reading
7
+ * @param module - the module to modify
8
+ * @param provider - the provider to include
9
+ * @param variablesWithProvider - the list of variable names containing the provider to include
10
+ */
11
+ export declare function addProviderInModuleIfDoesNotExist(tree: Tree, module: MatchingModule, provider: Provider, variablesWithProvider: string[]): void;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addProviderInModuleIfDoesNotExist = addProviderInModuleIfDoesNotExist;
4
+ const is_provider_in_module_utils_1 = require("../validation/is-provider-in-module.utils");
5
+ const add_provider_in_module_utils_1 = require("./add-provider-in-module.utils");
6
+ /**
7
+ * Modify content of the file with the given module so the import of Angular provider exists if it was not present already.
8
+ * @param tree - the file tree used for file content reading
9
+ * @param module - the module to modify
10
+ * @param provider - the provider to include
11
+ * @param variablesWithProvider - the list of variable names containing the provider to include
12
+ */
13
+ function addProviderInModuleIfDoesNotExist(tree, module, provider, variablesWithProvider) {
14
+ const moduleFileConent = tree.read(module.filePath, 'utf-8');
15
+ if (!moduleFileConent)
16
+ return;
17
+ let updatedModuleFileContent = moduleFileConent;
18
+ if (!(0, is_provider_in_module_utils_1.isProviderInModule)(updatedModuleFileContent, module, provider, variablesWithProvider)) {
19
+ updatedModuleFileContent = (0, add_provider_in_module_utils_1.addProviderInModule)(updatedModuleFileContent, module, provider);
20
+ }
21
+ if (moduleFileConent !== updatedModuleFileContent) {
22
+ tree.write(module.filePath, updatedModuleFileContent);
23
+ }
24
+ }
25
+ //# sourceMappingURL=add-provider-in-module-if-does-not-exist.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-provider-in-module-if-does-not-exist.utils.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-migration-utils/src/lib/angular/utils/modification/add-provider-in-module-if-does-not-exist.utils.ts"],"names":[],"mappings":";;AAaA,8EAkBC;AA5BD,2FAA8E;AAC9E,iFAAoE;AAEpE;;;;;;GAMG;AACH,SAAgB,iCAAiC,CAC/C,IAAU,EACV,MAAsB,EACtB,QAAkB,EAClB,qBAA+B;IAE/B,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;IAC5D,IAAI,CAAC,gBAAgB;QAAE,OAAM;IAE7B,IAAI,wBAAwB,GAAG,gBAAgB,CAAA;IAE/C,IAAI,CAAC,IAAA,gDAAkB,EAAC,wBAAwB,EAAE,MAAM,EAAE,QAAQ,EAAE,qBAAqB,CAAC,EAAE,CAAC;QAC3F,wBAAwB,GAAG,IAAA,kDAAmB,EAAC,wBAAwB,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC5F,CAAC;IAED,IAAI,gBAAgB,KAAK,wBAAwB,EAAE,CAAC;QAClD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAAA;IACvD,CAAC;AACH,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { MatchingModule } from '../../model/matching-module.model';
2
+ import { Provider } from '../../model/provider.model';
3
+ /**
4
+ * Add the provider to the providers list of the module.
5
+ * @param fileContent - the content of the file the module is used in
6
+ * @param module - the module to modify
7
+ * @param provider - the provider to add
8
+ * @returns {string} modified content of the file with provider included in the module
9
+ */
10
+ export declare function addProviderInModule(fileContent: string, module: MatchingModule, provider: Provider): string;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addProviderInModule = addProviderInModule;
4
+ const tsquery_1 = require("@phenomnomnominal/tsquery");
5
+ const typescript_1 = require("typescript");
6
+ const patterns_utils_1 = require("../patterns.utils");
7
+ /**
8
+ * Add the provider to the providers list of the module.
9
+ * @param fileContent - the content of the file the module is used in
10
+ * @param module - the module to modify
11
+ * @param provider - the provider to add
12
+ * @returns {string} modified content of the file with provider included in the module
13
+ */
14
+ function addProviderInModule(fileContent, module, provider) {
15
+ const newContent = (0, tsquery_1.replace)(fileContent, (0, patterns_utils_1.moduleProvidersArrayPattern)(module.name), (node) => {
16
+ // Prepare provider call expression
17
+ const providerExpressionString = `${provider.name}()`;
18
+ // Prepare new providers array
19
+ const aleNode = node;
20
+ const newExpressionArray = [
21
+ ...aleNode.elements.map((expresion) => expresion.getText()),
22
+ providerExpressionString,
23
+ ];
24
+ // Return text for new providers array
25
+ return `[${newExpressionArray.join(',')}]`;
26
+ }, typescript_1.ScriptKind.TS);
27
+ return newContent;
28
+ }
29
+ //# sourceMappingURL=add-provider-in-module.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-provider-in-module.utils.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-migration-utils/src/lib/angular/utils/modification/add-provider-in-module.utils.ts"],"names":[],"mappings":";;AAaA,kDAqBC;AAlCD,uDAAmD;AACnD,2CAA+D;AAG/D,sDAA+D;AAE/D;;;;;;GAMG;AACH,SAAgB,mBAAmB,CAAC,WAAmB,EAAE,MAAsB,EAAE,QAAkB;IACjG,MAAM,UAAU,GAAG,IAAA,iBAAO,EACxB,WAAW,EACX,IAAA,4CAA2B,EAAC,MAAM,CAAC,IAAI,CAAC,EACxC,CAAC,IAAI,EAAE,EAAE;QACP,mCAAmC;QACnC,MAAM,wBAAwB,GAAG,GAAG,QAAQ,CAAC,IAAI,IAAI,CAAA;QAErD,8BAA8B;QAC9B,MAAM,OAAO,GAAG,IAA8B,CAAA;QAC9C,MAAM,kBAAkB,GAAa;YACnC,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;YAC3D,wBAAwB;SACzB,CAAA;QACD,sCAAsC;QACtC,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAA;IAC5C,CAAC,EACD,uBAAU,CAAC,EAAE,CACd,CAAA;IAED,OAAO,UAAU,CAAA;AACnB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { Provider } from '../model/provider.model';
2
+ /**
3
+ * Creates a pattern to look for Angular provider import declaration
4
+ * @param provider - provider to look for
5
+ * @returns {string} ast query pattern
6
+ */
7
+ export declare function providerImportPattern(provider: Provider): string;
8
+ /**
9
+ * Creates a pattern to look for an identifier in the imports list of the Angular module
10
+ * @param identifierName
11
+ * @returns {string} ast query pattern
12
+ */
13
+ export declare function moduleImportIdentifierPattern(identifierName: string): string;
14
+ /**
15
+ * Creates a pattern to look for an identifier in the providers list of the Angular module
16
+ * @param moduleName
17
+ * @param identifierName
18
+ * @returns {string} ast query pattern
19
+ */
20
+ export declare function moduleProviderIdentifierPattern(moduleName: string, identifierName: string): string;
21
+ /**
22
+ * Creates a pattern to look for the providers list of the Angular module
23
+ * @param moduleName
24
+ * @returns {string} ast query pattern
25
+ */
26
+ export declare function moduleProvidersArrayPattern(moduleName: string): string;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.providerImportPattern = providerImportPattern;
4
+ exports.moduleImportIdentifierPattern = moduleImportIdentifierPattern;
5
+ exports.moduleProviderIdentifierPattern = moduleProviderIdentifierPattern;
6
+ exports.moduleProvidersArrayPattern = moduleProvidersArrayPattern;
7
+ // Provider patterns
8
+ /**
9
+ * Creates a pattern to look for Angular provider import declaration
10
+ * @param provider - provider to look for
11
+ * @returns {string} ast query pattern
12
+ */
13
+ function providerImportPattern(provider) {
14
+ return `ImportDeclaration:has(StringLiteral[value=${provider.importPath}]):has(ImportSpecifier:has(Identifier[name=${provider.name}]))`;
15
+ }
16
+ // Module patterns
17
+ /**
18
+ * Creates a pattern to look for an identifier in the imports list of the Angular module
19
+ * @param identifierName
20
+ * @returns {string} ast query pattern
21
+ */
22
+ function moduleImportIdentifierPattern(identifierName) {
23
+ return `ClassDeclaration:has(Decorator > CallExpression:has(Identifier[name=NgModule]) PropertyAssignment:has(Identifier[name=imports]) Identifier[name=${identifierName}])`;
24
+ }
25
+ /**
26
+ * Creates a pattern to look for an identifier in the providers list of the Angular module
27
+ * @param moduleName
28
+ * @param identifierName
29
+ * @returns {string} ast query pattern
30
+ */
31
+ function moduleProviderIdentifierPattern(moduleName, identifierName) {
32
+ return `ClassDeclaration:has(Identifier[name=${moduleName}]):has(Decorator > CallExpression:has(Identifier[name=NgModule]) PropertyAssignment:has(Identifier[name=providers]) Identifier[name=${identifierName}])`;
33
+ }
34
+ /**
35
+ * Creates a pattern to look for the providers list of the Angular module
36
+ * @param moduleName
37
+ * @returns {string} ast query pattern
38
+ */
39
+ function moduleProvidersArrayPattern(moduleName) {
40
+ return `ClassDeclaration:has(Identifier[name=${moduleName}]) Decorator > CallExpression:has(Identifier[name=NgModule]) PropertyAssignment:has(Identifier[name=providers]) > ArrayLiteralExpression`;
41
+ }
42
+ //# sourceMappingURL=patterns.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns.utils.js","sourceRoot":"","sources":["../../../../../../../libs/nx-migration-utils/src/lib/angular/utils/patterns.utils.ts"],"names":[],"mappings":";;AASA,sDAEC;AASD,sEAEC;AAQD,0EAEC;AAOD,kEAEC;AAvCD,oBAAoB;AAEpB;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,QAAkB;IACtD,OAAO,6CAA6C,QAAQ,CAAC,UAAU,8CAA8C,QAAQ,CAAC,IAAI,KAAK,CAAA;AACzI,CAAC;AAED,kBAAkB;AAElB;;;;GAIG;AACH,SAAgB,6BAA6B,CAAC,cAAsB;IAClE,OAAO,oJAAoJ,cAAc,IAAI,CAAA;AAC/K,CAAC;AAED;;;;;GAKG;AACH,SAAgB,+BAA+B,CAAC,UAAkB,EAAE,cAAsB;IACxF,OAAO,wCAAwC,UAAU,uIAAuI,cAAc,IAAI,CAAA;AACpN,CAAC;AAED;;;;GAIG;AACH,SAAgB,2BAA2B,CAAC,UAAkB;IAC5D,OAAO,wCAAwC,UAAU,0IAA0I,CAAA;AACrM,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Provider } from '../../model/provider.model';
2
+ /**
3
+ * Checks if file imports the Angular provider
4
+ * @param fileContent - the path to a file to check
5
+ * @param provider - angular provider to check
6
+ * @returns {boolean} if the Angular provider is imported in file
7
+ */
8
+ export declare function isProviderImportInFile(fileContent: string, provider: Provider): boolean;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isProviderImportInFile = isProviderImportInFile;
4
+ const tsquery_1 = require("@phenomnomnominal/tsquery");
5
+ const patterns_utils_1 = require("../patterns.utils");
6
+ const patterns_utils_2 = require("../../../utils/patterns.utils");
7
+ /**
8
+ * Checks if file imports the Angular provider
9
+ * @param fileContent - the path to a file to check
10
+ * @param provider - angular provider to check
11
+ * @returns {boolean} if the Angular provider is imported in file
12
+ */
13
+ function isProviderImportInFile(fileContent, provider) {
14
+ const contentAst = (0, tsquery_1.ast)(fileContent);
15
+ const allPatterns = [(0, patterns_utils_1.providerImportPattern)(provider), (0, patterns_utils_2.importNamespacePattern)(provider.importPath)].join(', ');
16
+ const providerImports = (0, tsquery_1.query)(contentAst, allPatterns);
17
+ return providerImports.length > 0;
18
+ }
19
+ //# sourceMappingURL=is-provider-import-in-file.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-provider-import-in-file.utils.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-migration-utils/src/lib/angular/utils/validation/is-provider-import-in-file.utils.ts"],"names":[],"mappings":";;AAYA,wDAOC;AAnBD,uDAAsD;AAEtD,sDAAyD;AACzD,kEAAsE;AAGtE;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,WAAmB,EAAE,QAAkB;IAC5E,MAAM,UAAU,GAAG,IAAA,aAAG,EAAC,WAAW,CAAC,CAAA;IAEnC,MAAM,WAAW,GAAG,CAAC,IAAA,sCAAqB,EAAC,QAAQ,CAAC,EAAE,IAAA,uCAAsB,EAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC7G,MAAM,eAAe,GAAG,IAAA,eAAK,EAAoB,UAAU,EAAE,WAAW,CAAC,CAAA;IAEzE,OAAO,eAAe,CAAC,MAAM,GAAG,CAAC,CAAA;AACnC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { MatchingModule } from '../../model/matching-module.model';
2
+ import { Provider } from '../../model/provider.model';
3
+ /**
4
+ * Checks if the Angular module include the provider in the providers list.
5
+ * @param fileContent - the content of the file the module is used in
6
+ * @param module - the module to check
7
+ * @param provider - the provider to check
8
+ * @param variablesWithProvider - the list of variable names containing the provider to check
9
+ * @returns {boolean} if the module includes the provider
10
+ */
11
+ export declare function isProviderInModule(fileContent: string, module: MatchingModule, provider: Provider, variablesWithProvider: string[]): boolean;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isProviderInModule = isProviderInModule;
4
+ const tsquery_1 = require("@phenomnomnominal/tsquery");
5
+ const patterns_utils_1 = require("../patterns.utils");
6
+ /**
7
+ * Checks if the Angular module include the provider in the providers list.
8
+ * @param fileContent - the content of the file the module is used in
9
+ * @param module - the module to check
10
+ * @param provider - the provider to check
11
+ * @param variablesWithProvider - the list of variable names containing the provider to check
12
+ * @returns {boolean} if the module includes the provider
13
+ */
14
+ function isProviderInModule(fileContent, module, provider, variablesWithProvider) {
15
+ const contentAst = (0, tsquery_1.ast)(fileContent);
16
+ const directProviderPattern = (0, patterns_utils_1.moduleProviderIdentifierPattern)(module.name, provider.name);
17
+ const provideViaVariablePatterns = variablesWithProvider.map((name) => (0, patterns_utils_1.moduleProviderIdentifierPattern)(module.name, name));
18
+ const allPatterns = [...provideViaVariablePatterns, directProviderPattern].join(', ');
19
+ const modulesWithProvider = (0, tsquery_1.query)(contentAst, allPatterns);
20
+ return modulesWithProvider.length > 0;
21
+ }
22
+ //# sourceMappingURL=is-provider-in-module.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-provider-in-module.utils.js","sourceRoot":"","sources":["../../../../../../../../libs/nx-migration-utils/src/lib/angular/utils/validation/is-provider-in-module.utils.ts"],"names":[],"mappings":";;AAcA,gDAgBC;AA9BD,uDAAsD;AAItD,sDAAmE;AAEnE;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAChC,WAAmB,EACnB,MAAsB,EACtB,QAAkB,EAClB,qBAA+B;IAE/B,MAAM,UAAU,GAAG,IAAA,aAAG,EAAC,WAAW,CAAC,CAAA;IAEnC,MAAM,qBAAqB,GAAG,IAAA,gDAA+B,EAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;IACzF,MAAM,0BAA0B,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACpE,IAAA,gDAA+B,EAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CACnD,CAAA;IACD,MAAM,WAAW,GAAG,CAAC,GAAG,0BAA0B,EAAE,qBAAqB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrF,MAAM,mBAAmB,GAAG,IAAA,eAAK,EAAmB,UAAU,EAAE,WAAW,CAAC,CAAA;IAE5E,OAAO,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAA;AACvC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export declare function commonMigrateOnecxToV6(tree: Tree): Promise<void>;
@@ -0,0 +1,278 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commonMigrateOnecxToV6 = commonMigrateOnecxToV6;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const child_process_1 = require("child_process");
6
+ const detect_method_calls_in_files_utils_1 = require("../utils/detect-method-calls-in-files.utils");
7
+ const html_templates_utils_1 = require("../angular/html-templates.utils");
8
+ const parameters_utils_1 = require("../angular/parameters.utils");
9
+ const replacement_in_files_utils_1 = require("../angular/replacement-in-files.utils");
10
+ const import_statements_utils_1 = require("../utils/import-statements.utils");
11
+ const print_warnings_utils_1 = require("../utils/print-warnings.utils");
12
+ const update_gitignore_utils_1 = require("../utils/update-gitignore.utils");
13
+ const detect_variables_with_module_utils_1 = require("../angular/utils/detection/detect-variables-with-module.utils");
14
+ const detect_modules_importing_module_utils_1 = require("../angular/utils/detection/detect-modules-importing-module.utils");
15
+ const detect_variables_with_provider_utils_1 = require("../angular/utils/detection/detect-variables-with-provider.utils");
16
+ const add_provider_in_module_if_does_not_exist_utils_1 = require("../angular/utils/modification/add-provider-in-module-if-does-not-exist.utils");
17
+ const add_provider_import_if_does_not_exist_utils_1 = require("../angular/utils/modification/add-provider-import-if-does-not-exist.utils");
18
+ const has_html_tag_utils_1 = require("../utils/validation/has-html-tag.utils");
19
+ const update_json_files_utils_1 = require("../utils/modification/update-json-files.utils");
20
+ const remove_json_references_utils_1 = require("../utils/modification/remove-json-references.utils");
21
+ const update_style_sheets_utils_1 = require("../utils/modification/update-style-sheets.utils");
22
+ const PORTAL_LAYOUT_STYLES = '@onecx/portal-layout-styles';
23
+ async function commonMigrateOnecxToV6(tree) {
24
+ const rootPath = tree.root;
25
+ const srcDirectoryPath = 'src';
26
+ (0, devkit_1.removeDependenciesFromPackageJson)(tree, ['@nx/angular', '@nx/devkit', '@nx/plugin'], ['eslint-plugin-deprecation']);
27
+ (0, devkit_1.addDependenciesToPackageJson)(tree, { '@primeng/themes': '^19.0.6' }, { '@nx/angular': '~20.3.4', '@nx/devkit': '~20.3.4', '@nx/plugin': '~20.3.4' });
28
+ replaceStandaloneShellInPackage(tree);
29
+ (0, devkit_1.updateJson)(tree, `package.json`, (json) => {
30
+ const angularDependencies = Object.keys(json.dependencies).filter((dep) => dep.startsWith('@angular/'));
31
+ const onecxDependencies = Object.keys(json.dependencies).filter((dep) => dep.startsWith('@onecx/'));
32
+ const ngrxDependencies = Object.keys(json.dependencies).filter((dep) => dep.startsWith('@ngrx/'));
33
+ const angularDevDependencies = Object.keys(json.devDependencies).filter((dep) => dep.startsWith('@angular/'));
34
+ const nxDevDependencies = Object.keys(json.devDependencies).filter((dep) => dep.startsWith('@nx/'));
35
+ const dependenciesToUpdate = {
36
+ '@angular/cdk': '^19.0.5',
37
+ '@onecx/nx-plugin': '^1.10.0',
38
+ '@ngx-translate/core': '^16.0.4',
39
+ 'keycloak-angular': '^19.0.2',
40
+ 'ngrx-store-localstorage': '^19.0.0',
41
+ primeng: '^19.1.0',
42
+ rxjs: '~7.8.2',
43
+ zod: '^3.24.2',
44
+ 'zone.js': '~0.15.0',
45
+ };
46
+ const devDependenciesToUpdate = {
47
+ '@angular-devkit/core': '^19.0.0',
48
+ '@angular-devkit/schematics': '^19.0.0',
49
+ '@angular/cli': '~19.0.0',
50
+ '@angular-eslint/eslint-plugin': '^19.2.0',
51
+ '@angular-eslint/eslint-plugin-template': '^19.2.0',
52
+ '@angular-eslint/template-parser': '^19.2.0',
53
+ '@angular/compiler-cli': '^19.0.0',
54
+ '@angular/language-service': '^19.0.0',
55
+ '@eslint/js': '^9.9.1',
56
+ '@openapitools/openapi-generator-cli': '^2.16.3',
57
+ '@schematics/angular': '~19.0.0',
58
+ '@swc-node/register': '~1.10.9',
59
+ '@swc/core': '~1.10.18',
60
+ '@swc/helpers': '~0.5.15',
61
+ '@types/jest': '^29.5.14',
62
+ '@types/node': '^22.13.4',
63
+ '@typescript-eslint/eslint-plugin': '^8.25.0',
64
+ '@typescript-eslint/parser': '^8.25.0',
65
+ '@typescript-eslint/utils': '^8.13.0',
66
+ 'angular-eslint': '^19.2.0',
67
+ eslint: '^9.9.1',
68
+ 'eslint-config-prettier': '^9.1.0',
69
+ 'eslint-plugin-import': '^2.31.0',
70
+ jest: '^29.7.0',
71
+ 'jest-environment-jsdom': '^29.7.0',
72
+ 'jest-preset-angular': '~14.5.1',
73
+ nx: '~20.3.4',
74
+ prettier: '^3.5.1',
75
+ 'ts-jest': '^29.2.5',
76
+ 'ts-node': '^10.9.2',
77
+ tslib: '^2.8.1',
78
+ 'typescript-eslint': '^8.13.0',
79
+ };
80
+ angularDependencies.forEach((dep) => {
81
+ json.dependencies[dep] = '^19.0.7';
82
+ });
83
+ onecxDependencies.forEach((dep) => {
84
+ json.dependencies[dep] = '^6.0.0';
85
+ });
86
+ ngrxDependencies.forEach((dep) => {
87
+ json.dependencies[dep] = '^19.0.1';
88
+ });
89
+ angularDevDependencies.forEach((dep) => {
90
+ json.devDependencies[dep] = '~19.0.0';
91
+ });
92
+ nxDevDependencies.forEach((dep) => {
93
+ json.devDependencies[dep] = '~20.3.4';
94
+ });
95
+ Object.keys(dependenciesToUpdate).forEach((dep) => {
96
+ if (json.dependencies[dep]) {
97
+ json.dependencies[dep] = dependenciesToUpdate[dep];
98
+ }
99
+ });
100
+ Object.keys(devDependenciesToUpdate).forEach((dep) => {
101
+ if (json.devDependencies[dep]) {
102
+ json.devDependencies[dep] = devDependenciesToUpdate[dep];
103
+ }
104
+ });
105
+ return json;
106
+ });
107
+ (0, update_gitignore_utils_1.addGitignoreEntry)(tree, '/src/app/shared/generated');
108
+ (0, child_process_1.execSync)('npm run apigen', {
109
+ cwd: rootPath,
110
+ stdio: 'inherit',
111
+ });
112
+ removeOnecxKeycloakAuth(tree, srcDirectoryPath);
113
+ removeOnecxPortalLayoutStyles(tree);
114
+ migrateApiConfigProviderUtils(tree, srcDirectoryPath);
115
+ migrateFilterTypes(tree, srcDirectoryPath);
116
+ migrateFastDeepEqualImport(tree, srcDirectoryPath);
117
+ migratePrimeng(tree);
118
+ migratePrimeNgCalendar(tree, srcDirectoryPath);
119
+ migrateStandaloneShell(tree, srcDirectoryPath);
120
+ warnUserServiceHasPermission(tree, srcDirectoryPath);
121
+ warnOcxPortalViewport(tree, srcDirectoryPath);
122
+ await (0, devkit_1.formatFiles)(tree);
123
+ (0, update_gitignore_utils_1.removeGitignoreEntry)(tree, '/src/app/shared/generated');
124
+ }
125
+ function removeOnecxKeycloakAuth(tree, directoryPath) {
126
+ (0, devkit_1.removeDependenciesFromPackageJson)(tree, ['@onecx/keycloak-auth'], []);
127
+ (0, import_statements_utils_1.removeImportsByModuleSpecifier)(tree, directoryPath, '@onecx/keycloak-auth');
128
+ const webpackConfigJsPath = 'webpack.config.js';
129
+ const webpackConfigJsContent = tree.read(webpackConfigJsPath, 'utf-8');
130
+ if (webpackConfigJsContent) {
131
+ const updatedContent = webpackConfigJsContent.replace(/'@onecx\/keycloak-auth':\s*{\s*requiredVersion:\s*'auto',\s*includeSecondaries:\s*true\s*,?\s*},?/g, '');
132
+ tree.write(webpackConfigJsPath, updatedContent);
133
+ }
134
+ else {
135
+ console.error('Cannot find webpack.config.js');
136
+ }
137
+ const keycloakModuleQuery = `Identifier[name="KeycloakAuthModule"]`;
138
+ (0, replacement_in_files_utils_1.replaceInFiles)(tree, directoryPath, keycloakModuleQuery, '');
139
+ }
140
+ function removeOnecxPortalLayoutStyles(tree) {
141
+ const warning = '⚠️ @onecx/portal-layout-styles library was removed. Please make sure that all references are removed and the application is not relying on @onecx/portal-layout-styles style sheets.';
142
+ const warnOptions = {
143
+ warn: true,
144
+ warning,
145
+ contentCondition: PORTAL_LAYOUT_STYLES,
146
+ };
147
+ const rootPath = '.';
148
+ (0, devkit_1.removeDependenciesFromPackageJson)(tree, [PORTAL_LAYOUT_STYLES], []);
149
+ removeOnecxPortalLayoutStylesImportsFromStyleSheets(tree, rootPath, warnOptions);
150
+ removeOnecxPortalLayoutStylesFromJsonFiles(tree, rootPath, warnOptions);
151
+ removeOnecxPortalLayoutStylesFromWebpack(tree);
152
+ }
153
+ function migratePrimeng(tree) {
154
+ const projectJsonPath = 'project.json';
155
+ const projectJson = (0, devkit_1.readJson)(tree, projectJsonPath);
156
+ if (projectJson.targets.build.options.styles) {
157
+ projectJson.targets.build.options.styles = projectJson.targets.build.options.styles.filter((style) => style !== 'node_modules/primeng/resources/primeng.min.css');
158
+ }
159
+ else {
160
+ console.error('Cannot find styles array in project.json or project.json itself');
161
+ }
162
+ (0, devkit_1.writeJson)(tree, projectJsonPath, projectJson);
163
+ (0, import_statements_utils_1.replaceImportValuesAndModule)(tree, 'src', [
164
+ {
165
+ oldModuleSpecifier: 'primeng/api',
166
+ newModuleSpecifier: 'primeng/config',
167
+ valueReplacements: [{ oldValue: 'PrimeNGConfig', newValue: 'PrimeNG' }],
168
+ },
169
+ ]);
170
+ const primengConfigClassQuery = `Identifier[name="PrimeNGConfig"]`;
171
+ (0, replacement_in_files_utils_1.replaceInFiles)(tree, 'src', primengConfigClassQuery, 'PrimeNG');
172
+ }
173
+ function migrateApiConfigProviderUtils(tree, directoryPath) {
174
+ const searchQuery = `NewExpression:has(Identifier[name="PortalApiConfiguration"])`;
175
+ (0, import_statements_utils_1.removeImportValuesFromModule)(tree, directoryPath, '@onecx/portal-integration-angular', ['AppStateService', 'ConfigurationService'], searchQuery);
176
+ (0, parameters_utils_1.removeParameters)(tree, directoryPath, ['ConfigurationService', 'AppStateService'], searchQuery);
177
+ }
178
+ function migrateFilterTypes(tree, directoryPath) {
179
+ const queryFiltertypeTruthy = 'PropertyAccessExpression:has(Identifier[name="FilterType"]) Identifier[name="TRUTHY"]';
180
+ (0, replacement_in_files_utils_1.replaceInFiles)(tree, directoryPath, queryFiltertypeTruthy, 'IS_NOT_EMPTY');
181
+ }
182
+ function migrateFastDeepEqualImport(tree, directoryPath) {
183
+ (0, import_statements_utils_1.replaceImportValues)(tree, directoryPath, 'fast-deep-equal', ['equal'], 'equal');
184
+ (0, devkit_1.removeDependenciesFromPackageJson)(tree, ['fast-deep-equal'], []);
185
+ }
186
+ function migratePrimeNgCalendar(tree, directoryPath) {
187
+ (0, import_statements_utils_1.replaceImportValuesAndModule)(tree, directoryPath, [
188
+ {
189
+ oldModuleSpecifier: 'primeng/calendar',
190
+ newModuleSpecifier: 'primeng/datepicker',
191
+ valueReplacements: [
192
+ { oldValue: 'Calendar', newValue: 'DatePicker' },
193
+ { oldValue: 'CalendarModule', newValue: 'DatePickerModule' },
194
+ ],
195
+ },
196
+ ]);
197
+ const calendarQuery = `PropertyDeclaration > Decorator > CallExpression:has(Identifier[name="ViewChildren"]) Identifier[name="Calendar"], TypeReference > Identifier[name="Calendar"]`;
198
+ (0, replacement_in_files_utils_1.replaceInFiles)(tree, directoryPath, calendarQuery, 'DatePicker');
199
+ const calendarModuleQuery = `Identifier[name="CalendarModule"]`;
200
+ (0, replacement_in_files_utils_1.replaceInFiles)(tree, directoryPath, calendarModuleQuery, 'DatePickerModule');
201
+ (0, html_templates_utils_1.replaceTagInAngularTemplates)(tree, directoryPath, 'p-calendar', 'p-datepicker');
202
+ }
203
+ function warnUserServiceHasPermission(tree, srcDirectoryPath) {
204
+ const warningHasPermissionCalls = '⚠️ UserService hasPermission is now asynchronous. Please adapt the usages accordingly, so that they are handled asynchronously.';
205
+ const detectedMethodCalls = (0, detect_method_calls_in_files_utils_1.detectMethodCallsInFiles)(tree, srcDirectoryPath, 'hasPermission', 'UserService');
206
+ if (detectedMethodCalls.size > 0) {
207
+ (0, print_warnings_utils_1.printWarnings)(warningHasPermissionCalls, Array.from(detectedMethodCalls.keys()));
208
+ }
209
+ }
210
+ function warnOcxPortalViewport(tree, directoryPath) {
211
+ const foundInFiles = [];
212
+ const warning = '⚠️ ocx-portal-viewport was removed. Please refer to the standalone guide for adaptations: https://onecx.github.io/docs/guides/current/angular/cookbook/migrations/enable-standalone/index.html';
213
+ (0, devkit_1.visitNotIgnoredFiles)(tree, directoryPath, (filePath) => {
214
+ if ((0, has_html_tag_utils_1.hasHtmlTag)(tree, filePath, 'ocx-portal-viewport')) {
215
+ foundInFiles.push(filePath);
216
+ (0, print_warnings_utils_1.printWarnings)(warning, foundInFiles);
217
+ }
218
+ });
219
+ }
220
+ function removeOnecxPortalLayoutStylesFromJsonFiles(tree, dirPath, options) {
221
+ (0, update_json_files_utils_1.updateJsonFiles)(tree, dirPath, (json) => (0, remove_json_references_utils_1.removeReferences)(json, PORTAL_LAYOUT_STYLES), options);
222
+ }
223
+ function removeOnecxPortalLayoutStylesImportsFromStyleSheets(tree, dirPath, options) {
224
+ (0, update_style_sheets_utils_1.updateStyleSheets)(tree, dirPath, (root) => {
225
+ root.walkAtRules('import', (atRule) => {
226
+ if (atRule.params.includes(PORTAL_LAYOUT_STYLES)) {
227
+ atRule.remove();
228
+ }
229
+ });
230
+ return root.toString();
231
+ }, options);
232
+ }
233
+ function removeOnecxPortalLayoutStylesFromWebpack(tree) {
234
+ const webpackConfigJsPath = 'webpack.config.js';
235
+ const webpackConfigJsContent = tree.read(webpackConfigJsPath, 'utf-8');
236
+ if (webpackConfigJsContent) {
237
+ const updatedContent = webpackConfigJsContent.replace(/'@onecx\/portal-layout-styles':\s*{\s*requiredVersion:\s*'auto',\s*includeSecondaries:\s*true\s*,?\s*},?/g, '');
238
+ tree.write(webpackConfigJsPath, updatedContent);
239
+ }
240
+ }
241
+ function replaceStandaloneShellInPackage(tree) {
242
+ (0, devkit_1.removeDependenciesFromPackageJson)(tree, ['@onecx/standalone-shell'], []);
243
+ (0, devkit_1.addDependenciesToPackageJson)(tree, { '@onecx/angular-standalone-shell': '^6.0.0' }, {});
244
+ }
245
+ function migrateStandaloneShell(tree, dirPath) {
246
+ replaceStandaloneShellImport(tree, dirPath);
247
+ provideStandaloneProvidersIfModuleUsed(tree, dirPath);
248
+ }
249
+ function replaceStandaloneShellImport(tree, dirPath) {
250
+ const standaloneShell = '@onecx/standalone-shell';
251
+ const angularStandaloneShell = '@onecx/angular-standalone-shell';
252
+ (0, import_statements_utils_1.replaceImportModuleSpecifier)(tree, dirPath, standaloneShell, angularStandaloneShell);
253
+ const webpackConfigJsContent = tree.read('webpack.config.js', 'utf-8');
254
+ if (webpackConfigJsContent) {
255
+ const updatedContent = webpackConfigJsContent.replace(standaloneShell, angularStandaloneShell);
256
+ tree.write('webpack.config.js', updatedContent);
257
+ }
258
+ else {
259
+ console.error('Cannot find webpack.config.js');
260
+ }
261
+ }
262
+ function provideStandaloneProvidersIfModuleUsed(tree, dirPath) {
263
+ const module = {
264
+ name: 'StandaloneShellModule',
265
+ };
266
+ const provider = {
267
+ name: 'provideStandaloneProviders',
268
+ importPath: '@onecx/angular-standalone-shell',
269
+ };
270
+ const variablesWithModule = (0, detect_variables_with_module_utils_1.detectVariablesWithModule)(tree, dirPath, module);
271
+ const modules = (0, detect_modules_importing_module_utils_1.detectModulesImportingModule)(tree, dirPath, module, variablesWithModule);
272
+ const variablesWithProvider = (0, detect_variables_with_provider_utils_1.detectVariablesWithProvider)(tree, dirPath, provider);
273
+ modules.forEach((moduleName) => {
274
+ (0, add_provider_in_module_if_does_not_exist_utils_1.addProviderInModuleIfDoesNotExist)(tree, moduleName, provider, variablesWithProvider);
275
+ (0, add_provider_import_if_does_not_exist_utils_1.addProviderImportIfDoesNotExist)(tree, moduleName.filePath, provider);
276
+ });
277
+ }
278
+ //# sourceMappingURL=common-migrate-onecx-to-v6.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common-migrate-onecx-to-v6.utils.js","sourceRoot":"","sources":["../../../../../../libs/nx-migration-utils/src/lib/common-migrations/common-migrate-onecx-to-v6.utils.ts"],"names":[],"mappings":";;AAsCA,wDAsHC;AA5JD,uCASmB;AACnB,iDAAwC;AACxC,oGAAsF;AAEtF,0EAA8E;AAC9E,kEAA8D;AAC9D,sFAAsE;AACtE,8EAMyC;AACzC,wEAA6D;AAC7D,4EAAyF;AAEzF,sHAAyG;AACzG,4HAA+G;AAC/G,0HAA6G;AAC7G,iJAAgI;AAChI,2IAA2H;AAC3H,+EAAmE;AACnE,2FAA+E;AAC/E,qGAAqF;AACrF,+FAAmF;AAEnF,MAAM,oBAAoB,GAAG,6BAA6B,CAAA;AAEnD,KAAK,UAAU,sBAAsB,CAAC,IAAU;IACrD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;IAC1B,MAAM,gBAAgB,GAAG,KAAK,CAAA;IAC9B,IAAA,0CAAiC,EAAC,IAAI,EAAE,CAAC,a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