@o3r/core 10.0.0-next.9 → 11.0.0-next.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 (497) hide show
  1. package/README.md +38 -13
  2. package/builders/app-version/index.d.ts.map +1 -1
  3. package/builders/app-version/index.js +1 -1
  4. package/builders/app-version/index.js.map +1 -1
  5. package/builders/app-version/schema.json +1 -1
  6. package/builders/lib-build/schema.json +1 -1
  7. package/builders/multi-watcher/schema.json +1 -1
  8. package/builders/ngc/schema.json +1 -1
  9. package/builders/pattern-replacement/index.d.ts.map +1 -1
  10. package/builders/pattern-replacement/index.js +5 -5
  11. package/builders/pattern-replacement/index.js.map +1 -1
  12. package/builders/pattern-replacement/schema.json +1 -1
  13. package/builders/run-script/index.d.ts +4 -0
  14. package/builders/run-script/index.d.ts.map +1 -0
  15. package/builders/run-script/index.js +34 -0
  16. package/builders/run-script/index.js.map +1 -0
  17. package/builders/run-script/schema.d.ts +6 -0
  18. package/builders/run-script/schema.d.ts.map +1 -0
  19. package/{schematics/library → builders/run-script}/schema.js.map +1 -1
  20. package/builders/run-script/schema.json +15 -0
  21. package/builders.json +5 -0
  22. package/collection.json +0 -23
  23. package/core/application/dgp.interfaces.d.ts +6 -3
  24. package/core/application/dgp.interfaces.d.ts.map +1 -1
  25. package/core/devkit/devtools.interface.d.ts +16 -2
  26. package/core/devkit/devtools.interface.d.ts.map +1 -1
  27. package/core/index.d.ts +1 -0
  28. package/core/index.d.ts.map +1 -1
  29. package/core/index.js +1 -0
  30. package/core/index.js.map +1 -1
  31. package/core/interfaces/configuration.d.ts +39 -17
  32. package/core/interfaces/configuration.d.ts.map +1 -1
  33. package/core/interfaces/index.d.ts +0 -3
  34. package/core/interfaces/index.d.ts.map +1 -1
  35. package/core/interfaces/index.js +0 -3
  36. package/core/interfaces/index.js.map +1 -1
  37. package/core/metadata/component.decorator.d.ts +0 -1
  38. package/core/metadata/component.decorator.d.ts.map +1 -1
  39. package/core/metadata/component.decorator.js +0 -1
  40. package/core/metadata/component.decorator.js.map +1 -1
  41. package/core/metadata/component.identifier.d.ts +7 -0
  42. package/core/metadata/component.identifier.d.ts.map +1 -0
  43. package/core/metadata/component.identifier.js +9 -0
  44. package/core/metadata/component.identifier.js.map +1 -0
  45. package/core/metadata/index.d.ts +1 -0
  46. package/core/metadata/index.d.ts.map +1 -1
  47. package/core/metadata/index.js +1 -0
  48. package/core/metadata/index.js.map +1 -1
  49. package/core/rules-engine/index.d.ts +2 -0
  50. package/core/rules-engine/index.d.ts.map +1 -0
  51. package/core/rules-engine/index.js +2 -0
  52. package/core/rules-engine/index.js.map +1 -0
  53. package/core/rules-engine/rules-engine.interfaces.d.ts +24 -0
  54. package/core/rules-engine/rules-engine.interfaces.d.ts.map +1 -0
  55. package/core/rules-engine/rules-engine.interfaces.js +2 -0
  56. package/core/rules-engine/rules-engine.interfaces.js.map +1 -0
  57. package/esm2022/core/application/dgp.interfaces.mjs +1 -1
  58. package/esm2022/core/devkit/devtools.interface.mjs +1 -1
  59. package/esm2022/core/index.mjs +2 -1
  60. package/esm2022/core/interfaces/configuration.mjs +1 -1
  61. package/esm2022/core/interfaces/index.mjs +1 -4
  62. package/esm2022/core/metadata/component.decorator.mjs +1 -2
  63. package/esm2022/core/metadata/component.identifier.mjs +9 -0
  64. package/esm2022/core/metadata/index.mjs +2 -1
  65. package/esm2022/core/rules-engine/index.mjs +2 -0
  66. package/esm2022/core/rules-engine/rules-engine.interfaces.mjs +2 -0
  67. package/esm2022/log/logger.mjs +1 -1
  68. package/esm2022/messages/message.helpers.mjs +1 -5
  69. package/esm2022/store/async/async-entity.adapter.mjs +1 -2
  70. package/esm2022/store/async/async.adapter.mjs +1 -1
  71. package/esm2022/store/async/async.helpers.mjs +1 -4
  72. package/esm2022/store/async/async.operators.mjs +3 -4
  73. package/esm2022/store/async/async.serializer.mjs +1 -4
  74. package/esm2022/store/index.mjs +1 -2
  75. package/esm2022/utils/debug/debug.helper.mjs +1 -3
  76. package/esm2022/utils/deep-fill/deep-fill.mjs +23 -28
  77. package/esm2022/utils/rendering/rendering.helpers.mjs +1 -2
  78. package/fesm2022/o3r-core.mjs +47 -169
  79. package/fesm2022/o3r-core.mjs.map +1 -1
  80. package/log/logger.d.ts +0 -5
  81. package/log/logger.d.ts.map +1 -1
  82. package/messages/message.helpers.d.ts +0 -3
  83. package/messages/message.helpers.d.ts.map +1 -1
  84. package/messages/message.helpers.js +0 -4
  85. package/messages/message.helpers.js.map +1 -1
  86. package/migration.json +5 -0
  87. package/package.json +46 -39
  88. package/schematics/add-modules/index.d.ts +1 -2
  89. package/schematics/add-modules/index.d.ts.map +1 -1
  90. package/schematics/add-modules/index.js +16 -9
  91. package/schematics/add-modules/index.js.map +1 -1
  92. package/schematics/add-modules/schema.d.ts +5 -1
  93. package/schematics/add-modules/schema.d.ts.map +1 -1
  94. package/schematics/add-modules/schema.json +14 -4
  95. package/schematics/component/container/index.d.ts +0 -1
  96. package/schematics/component/container/index.d.ts.map +1 -1
  97. package/schematics/component/container/index.js +1 -3
  98. package/schematics/component/container/index.js.map +1 -1
  99. package/schematics/component/container/schema.json +1 -1
  100. package/schematics/component/index.d.ts.map +1 -1
  101. package/schematics/component/index.js +5 -2
  102. package/schematics/component/index.js.map +1 -1
  103. package/schematics/component/presenter/index.d.ts +0 -1
  104. package/schematics/component/presenter/index.d.ts.map +1 -1
  105. package/schematics/component/presenter/index.js +9 -9
  106. package/schematics/component/presenter/index.js.map +1 -1
  107. package/schematics/component/presenter/schema.json +4 -3
  108. package/schematics/component/schema.json +4 -4
  109. package/schematics/component/structures.types.d.ts +3 -2
  110. package/schematics/component/structures.types.d.ts.map +1 -1
  111. package/schematics/component/structures.types.js +1 -0
  112. package/schematics/component/structures.types.js.map +1 -1
  113. package/schematics/context-to-component/index.d.ts.map +1 -1
  114. package/schematics/context-to-component/index.js +1 -1
  115. package/schematics/context-to-component/index.js.map +1 -1
  116. package/schematics/context-to-component/schema.json +1 -1
  117. package/schematics/convert-component/index.js +2 -2
  118. package/schematics/convert-component/index.js.map +1 -1
  119. package/schematics/convert-component/schema.json +1 -1
  120. package/schematics/ng-add/index.d.ts.map +1 -1
  121. package/schematics/ng-add/index.js +30 -31
  122. package/schematics/ng-add/index.js.map +1 -1
  123. package/schematics/ng-add/project-setup/index.d.ts +0 -1
  124. package/schematics/ng-add/project-setup/index.d.ts.map +1 -1
  125. package/schematics/ng-add/project-setup/index.js +16 -65
  126. package/schematics/ng-add/project-setup/index.js.map +1 -1
  127. package/schematics/ng-add/schema.d.ts +7 -46
  128. package/schematics/ng-add/schema.d.ts.map +1 -1
  129. package/schematics/ng-add/schema.json +16 -86
  130. package/schematics/ng-add/updates-for-v8/cms-adapters/update-builders-names.d.ts.map +1 -1
  131. package/schematics/ng-add/updates-for-v8/cms-adapters/update-builders-names.js +7 -3
  132. package/schematics/ng-add/updates-for-v8/cms-adapters/update-builders-names.js.map +1 -1
  133. package/schematics/ng-add/updates-for-v8/generators/update-generators-names.d.ts.map +1 -1
  134. package/schematics/ng-add/updates-for-v8/generators/update-generators-names.js +7 -2
  135. package/schematics/ng-add/updates-for-v8/generators/update-generators-names.js.map +1 -1
  136. package/schematics/ng-add-create/schema.json +1 -1
  137. package/schematics/ng-add-create/templates/schematics/ng-add/schema.json.template +2 -2
  138. package/schematics/ng-update/index.d.ts +4 -0
  139. package/schematics/ng-update/index.d.ts.map +1 -1
  140. package/schematics/ng-update/index.js +14 -1
  141. package/schematics/ng-update/index.js.map +1 -1
  142. package/schematics/ng-update/v10.0/configuration.d.ts +9 -0
  143. package/schematics/ng-update/v10.0/configuration.d.ts.map +1 -0
  144. package/schematics/ng-update/v10.0/configuration.js +23 -0
  145. package/schematics/ng-update/v10.0/configuration.js.map +1 -0
  146. package/schematics/page/index.d.ts +0 -1
  147. package/schematics/page/index.d.ts.map +1 -1
  148. package/schematics/page/index.js +6 -11
  149. package/schematics/page/index.js.map +1 -1
  150. package/schematics/page/schema.json +1 -1
  151. package/schematics/renovate/schema.json +1 -1
  152. package/schematics/renovate/templates/azure-pipelines.ugrade.yml +1 -1
  153. package/schematics/rule-factories/additional-modules/index.d.ts +0 -1
  154. package/schematics/rule-factories/additional-modules/index.d.ts.map +1 -1
  155. package/schematics/rule-factories/additional-modules/index.js +14 -18
  156. package/schematics/rule-factories/additional-modules/index.js.map +1 -1
  157. package/schematics/rule-factories/component/common.js +2 -2
  158. package/schematics/rule-factories/component/common.js.map +1 -1
  159. package/schematics/rule-factories/customization-environment/index.d.ts +0 -1
  160. package/schematics/rule-factories/customization-environment/index.d.ts.map +1 -1
  161. package/schematics/rule-factories/customization-environment/index.js +9 -30
  162. package/schematics/rule-factories/customization-environment/index.js.map +1 -1
  163. package/schematics/rule-factories/index.d.ts +0 -3
  164. package/schematics/rule-factories/index.d.ts.map +1 -1
  165. package/schematics/rule-factories/index.js +0 -3
  166. package/schematics/rule-factories/index.js.map +1 -1
  167. package/schematics/rule-factories/o3r-basic-updates/index.d.ts +1 -2
  168. package/schematics/rule-factories/o3r-basic-updates/index.d.ts.map +1 -1
  169. package/schematics/rule-factories/o3r-basic-updates/index.js +7 -4
  170. package/schematics/rule-factories/o3r-basic-updates/index.js.map +1 -1
  171. package/schematics/rule-factories/otter-environment/index.d.ts +0 -1
  172. package/schematics/rule-factories/otter-environment/index.d.ts.map +1 -1
  173. package/schematics/rule-factories/otter-environment/index.js +8 -13
  174. package/schematics/rule-factories/otter-environment/index.js.map +1 -1
  175. package/schematics/rule-factories/store/index.d.ts.map +1 -1
  176. package/schematics/rule-factories/store/index.js +30 -13
  177. package/schematics/rule-factories/store/index.js.map +1 -1
  178. package/schematics/schematics-update/schema.json +1 -1
  179. package/schematics/service/index.d.ts +0 -1
  180. package/schematics/service/index.d.ts.map +1 -1
  181. package/schematics/service/index.js +1 -2
  182. package/schematics/service/index.js.map +1 -1
  183. package/schematics/service/schema.json +1 -1
  184. package/schematics/shared/presets/all.preset.d.ts +10 -0
  185. package/schematics/shared/presets/all.preset.d.ts.map +1 -0
  186. package/schematics/shared/presets/all.preset.js +40 -0
  187. package/schematics/shared/presets/all.preset.js.map +1 -0
  188. package/schematics/shared/presets/external.preset.d.ts +10 -0
  189. package/schematics/shared/presets/external.preset.d.ts.map +1 -0
  190. package/schematics/shared/presets/external.preset.js +25 -0
  191. package/schematics/shared/presets/external.preset.js.map +1 -0
  192. package/schematics/shared/presets/helpers.js +1 -1
  193. package/schematics/shared/presets/helpers.js.map +1 -1
  194. package/schematics/shared/presets/index.d.ts +1 -0
  195. package/schematics/shared/presets/index.d.ts.map +1 -1
  196. package/schematics/shared/presets/index.js +4 -1
  197. package/schematics/shared/presets/index.js.map +1 -1
  198. package/schematics/show-modules/index.d.ts +1 -2
  199. package/schematics/show-modules/index.d.ts.map +1 -1
  200. package/schematics/show-modules/index.js +3 -5
  201. package/schematics/show-modules/index.js.map +1 -1
  202. package/schematics/show-modules/schema.json +1 -1
  203. package/schematics/store/entity-async/index.d.ts.map +1 -1
  204. package/schematics/store/entity-async/index.js +4 -0
  205. package/schematics/store/entity-async/index.js.map +1 -1
  206. package/schematics/store/entity-async/schema.json +1 -1
  207. package/schematics/store/entity-async/templates/__storeName@dasherize__.state.ts +1 -1
  208. package/schematics/store/entity-sync/index.d.ts.map +1 -1
  209. package/schematics/store/entity-sync/index.js +4 -0
  210. package/schematics/store/entity-sync/index.js.map +1 -1
  211. package/schematics/store/entity-sync/schema.json +1 -1
  212. package/schematics/store/entity-sync/templates/__storeName@dasherize__.state.ts +1 -1
  213. package/schematics/store/schema.json +1 -1
  214. package/schematics/store/simple-async/index.d.ts.map +1 -1
  215. package/schematics/store/simple-async/index.js +2 -0
  216. package/schematics/store/simple-async/index.js.map +1 -1
  217. package/schematics/store/simple-async/schema.json +1 -1
  218. package/schematics/store/simple-sync/index.d.ts.map +1 -1
  219. package/schematics/store/simple-sync/index.js +1 -0
  220. package/schematics/store/simple-sync/index.js.map +1 -1
  221. package/schematics/store/simple-sync/schema.json +1 -1
  222. package/schematics/store-action/schema.json +1 -1
  223. package/store/async/async-entity.adapter.d.ts +0 -8
  224. package/store/async/async-entity.adapter.d.ts.map +1 -1
  225. package/store/async/async-entity.adapter.js +0 -1
  226. package/store/async/async-entity.adapter.js.map +1 -1
  227. package/store/async/async.adapter.d.ts +0 -13
  228. package/store/async/async.adapter.d.ts.map +1 -1
  229. package/store/async/async.adapter.js.map +1 -1
  230. package/store/async/async.helpers.d.ts +0 -3
  231. package/store/async/async.helpers.d.ts.map +1 -1
  232. package/store/async/async.helpers.js +0 -3
  233. package/store/async/async.helpers.js.map +1 -1
  234. package/store/async/async.operators.d.ts +2 -3
  235. package/store/async/async.operators.d.ts.map +1 -1
  236. package/store/async/async.operators.js +2 -3
  237. package/store/async/async.operators.js.map +1 -1
  238. package/store/async/async.serializer.d.ts +0 -3
  239. package/store/async/async.serializer.d.ts.map +1 -1
  240. package/store/async/async.serializer.js +0 -3
  241. package/store/async/async.serializer.js.map +1 -1
  242. package/store/index.d.ts +0 -1
  243. package/store/index.d.ts.map +1 -1
  244. package/store/index.js +0 -1
  245. package/store/index.js.map +1 -1
  246. package/utils/debug/debug.helper.d.ts +0 -2
  247. package/utils/debug/debug.helper.d.ts.map +1 -1
  248. package/utils/debug/debug.helper.js +0 -2
  249. package/utils/debug/debug.helper.js.map +1 -1
  250. package/utils/deep-fill/deep-fill.d.ts +17 -12
  251. package/utils/deep-fill/deep-fill.d.ts.map +1 -1
  252. package/utils/deep-fill/deep-fill.js +22 -27
  253. package/utils/deep-fill/deep-fill.js.map +1 -1
  254. package/utils/rendering/rendering.helpers.d.ts +0 -1
  255. package/utils/rendering/rendering.helpers.d.ts.map +1 -1
  256. package/utils/rendering/rendering.helpers.js +0 -1
  257. package/utils/rendering/rendering.helpers.js.map +1 -1
  258. package/builders/package.json +0 -3
  259. package/core/interfaces/block.d.ts +0 -9
  260. package/core/interfaces/block.d.ts.map +0 -1
  261. package/core/interfaces/block.js +0 -2
  262. package/core/interfaces/block.js.map +0 -1
  263. package/core/interfaces/exposed-component.d.ts +0 -10
  264. package/core/interfaces/exposed-component.d.ts.map +0 -1
  265. package/core/interfaces/exposed-component.js +0 -2
  266. package/core/interfaces/exposed-component.js.map +0 -1
  267. package/core/interfaces/page.d.ts +0 -9
  268. package/core/interfaces/page.d.ts.map +0 -1
  269. package/core/interfaces/page.js +0 -2
  270. package/core/interfaces/page.js.map +0 -1
  271. package/esm2022/core/interfaces/block.mjs +0 -2
  272. package/esm2022/core/interfaces/exposed-component.mjs +0 -2
  273. package/esm2022/core/interfaces/page.mjs +0 -2
  274. package/esm2022/store/storage/index.mjs +0 -2
  275. package/esm2022/store/storage/store-sync.mjs +0 -111
  276. package/schematics/application/index.d.ts +0 -9
  277. package/schematics/application/index.d.ts.map +0 -1
  278. package/schematics/application/index.js +0 -68
  279. package/schematics/application/index.js.map +0 -1
  280. package/schematics/application/schema.d.ts +0 -14
  281. package/schematics/application/schema.d.ts.map +0 -1
  282. package/schematics/application/schema.js.map +0 -1
  283. package/schematics/application/schema.json +0 -38
  284. package/schematics/application/templates/package.json.template +0 -29
  285. package/schematics/library/index.d.ts +0 -9
  286. package/schematics/library/index.d.ts.map +0 -1
  287. package/schematics/library/index.js +0 -41
  288. package/schematics/library/index.js.map +0 -1
  289. package/schematics/library/rules/rules.ng.d.ts +0 -11
  290. package/schematics/library/rules/rules.ng.d.ts.map +0 -1
  291. package/schematics/library/rules/rules.ng.js +0 -113
  292. package/schematics/library/rules/rules.ng.js.map +0 -1
  293. package/schematics/library/rules/rules.nx.d.ts +0 -10
  294. package/schematics/library/rules/rules.nx.d.ts.map +0 -1
  295. package/schematics/library/rules/rules.nx.js +0 -126
  296. package/schematics/library/rules/rules.nx.js.map +0 -1
  297. package/schematics/library/rules/shared.d.ts +0 -19
  298. package/schematics/library/rules/shared.d.ts.map +0 -1
  299. package/schematics/library/rules/shared.js +0 -84
  300. package/schematics/library/rules/shared.js.map +0 -1
  301. package/schematics/library/schema.d.ts +0 -18
  302. package/schematics/library/schema.d.ts.map +0 -1
  303. package/schematics/library/schema.js +0 -3
  304. package/schematics/library/schema.json +0 -51
  305. package/schematics/library/templates/ng/.eslintrc.js.template +0 -19
  306. package/schematics/library/templates/ng/.gitignore.template +0 -2
  307. package/schematics/library/templates/ng/.npmignore.template +0 -0
  308. package/schematics/library/templates/ng/jest.config.js.template +0 -37
  309. package/schematics/library/templates/ng/testing/setup-jest.ts.template +0 -2
  310. package/schematics/library/templates/ng/tsconfig.builders.json.template +0 -22
  311. package/schematics/library/templates/ng/tsconfig.eslint.json.template +0 -8
  312. package/schematics/library/templates/ng/tsconfig.json.template +0 -12
  313. package/schematics/library/templates/ng/tsconfig.spec.json.template +0 -17
  314. package/schematics/library/templates/nx/.eslintrc.js.template +0 -19
  315. package/schematics/library/templates/nx/.gitignore.template +0 -2
  316. package/schematics/library/templates/nx/.npmignore.template +0 -0
  317. package/schematics/library/templates/nx/jest.config.js.template +0 -37
  318. package/schematics/library/templates/nx/project.json.template +0 -66
  319. package/schematics/library/templates/nx/testing/setup-jest.ts.template +0 -2
  320. package/schematics/library/templates/nx/tsconfig.eslint.json.template +0 -8
  321. package/schematics/package.json +0 -3
  322. package/schematics/rule-factories/azure-pipeline/index.d.ts +0 -14
  323. package/schematics/rule-factories/azure-pipeline/index.d.ts.map +0 -1
  324. package/schematics/rule-factories/azure-pipeline/index.js +0 -64
  325. package/schematics/rule-factories/azure-pipeline/index.js.map +0 -1
  326. package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/attach-files-to-test-results.js.template +0 -147
  327. package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/compute-deployment-service-url.js.template +0 -20
  328. package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/gen-pckg-json-e2e.js.template +0 -15
  329. package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/get-app-version.js.template +0 -36
  330. package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/get-major-minor.js.template +0 -8
  331. package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/allure.yml.template +0 -24
  332. package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/cascading.yml.template +0 -8
  333. package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/publish.yml.template +0 -14
  334. package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/set-version-tag.yml.template +0 -13
  335. package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/setup.yml.template +0 -21
  336. package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/versioning.yml.template +0 -8
  337. package/schematics/rule-factories/azure-pipeline/templates/azure-pipelines.yml.template +0 -252
  338. package/schematics/rule-factories/module-list/index.d.ts +0 -11
  339. package/schematics/rule-factories/module-list/index.d.ts.map +0 -1
  340. package/schematics/rule-factories/module-list/index.js +0 -45
  341. package/schematics/rule-factories/module-list/index.js.map +0 -1
  342. package/schematics/rule-factories/monorepo/index.d.ts +0 -16
  343. package/schematics/rule-factories/monorepo/index.d.ts.map +0 -1
  344. package/schematics/rule-factories/monorepo/index.js +0 -65
  345. package/schematics/rule-factories/monorepo/index.js.map +0 -1
  346. package/schematics/rule-factories/renovate/index.d.ts +0 -8
  347. package/schematics/rule-factories/renovate/index.d.ts.map +0 -1
  348. package/schematics/rule-factories/renovate/index.js +0 -27
  349. package/schematics/rule-factories/renovate/index.js.map +0 -1
  350. package/schematics/rule-factories/renovate/templates/__dot__renovaterc.json.template +0 -61
  351. package/schematics/sdk/index.d.ts +0 -8
  352. package/schematics/sdk/index.d.ts.map +0 -1
  353. package/schematics/sdk/index.js +0 -62
  354. package/schematics/sdk/index.js.map +0 -1
  355. package/schematics/sdk/rules/clean-standalone.rule.d.ts +0 -7
  356. package/schematics/sdk/rules/clean-standalone.rule.d.ts.map +0 -1
  357. package/schematics/sdk/rules/clean-standalone.rule.js +0 -28
  358. package/schematics/sdk/rules/clean-standalone.rule.js.map +0 -1
  359. package/schematics/sdk/rules/rules.ng.d.ts +0 -11
  360. package/schematics/sdk/rules/rules.ng.d.ts.map +0 -1
  361. package/schematics/sdk/rules/rules.ng.js +0 -38
  362. package/schematics/sdk/rules/rules.ng.js.map +0 -1
  363. package/schematics/sdk/rules/rules.nx.d.ts +0 -11
  364. package/schematics/sdk/rules/rules.nx.d.ts.map +0 -1
  365. package/schematics/sdk/rules/rules.nx.js +0 -60
  366. package/schematics/sdk/rules/rules.nx.js.map +0 -1
  367. package/schematics/sdk/rules/update-ts-paths.rule.d.ts +0 -10
  368. package/schematics/sdk/rules/update-ts-paths.rule.d.ts.map +0 -1
  369. package/schematics/sdk/rules/update-ts-paths.rule.js +0 -41
  370. package/schematics/sdk/rules/update-ts-paths.rule.js.map +0 -1
  371. package/schematics/sdk/schema.d.ts +0 -19
  372. package/schematics/sdk/schema.d.ts.map +0 -1
  373. package/schematics/sdk/schema.js +0 -3
  374. package/schematics/sdk/schema.js.map +0 -1
  375. package/schematics/sdk/schema.json +0 -46
  376. package/schematics/sdk/templates/jest.config.js.template +0 -12
  377. package/schematics/store/common/mocks/example-module.d.ts +0 -2
  378. package/schematics/store/common/mocks/example-module.d.ts.map +0 -1
  379. package/schematics/store/common/mocks/example-module.js +0 -40
  380. package/schematics/store/common/mocks/example-module.js.map +0 -1
  381. package/schematics/store/common/mocks/index.d.ts +0 -2
  382. package/schematics/store/common/mocks/index.d.ts.map +0 -1
  383. package/schematics/store/common/mocks/index.js +0 -12
  384. package/schematics/store/common/mocks/index.js.map +0 -1
  385. package/schematics/store/entity-async/mocks/example-actions.d.ts +0 -2
  386. package/schematics/store/entity-async/mocks/example-actions.d.ts.map +0 -1
  387. package/schematics/store/entity-async/mocks/example-actions.js +0 -82
  388. package/schematics/store/entity-async/mocks/example-actions.js.map +0 -1
  389. package/schematics/store/entity-async/mocks/example-effect-spec.d.ts +0 -2
  390. package/schematics/store/entity-async/mocks/example-effect-spec.d.ts.map +0 -1
  391. package/schematics/store/entity-async/mocks/example-effect-spec.js +0 -45
  392. package/schematics/store/entity-async/mocks/example-effect-spec.js.map +0 -1
  393. package/schematics/store/entity-async/mocks/example-effect.d.ts +0 -2
  394. package/schematics/store/entity-async/mocks/example-effect.d.ts.map +0 -1
  395. package/schematics/store/entity-async/mocks/example-effect.js +0 -72
  396. package/schematics/store/entity-async/mocks/example-effect.js.map +0 -1
  397. package/schematics/store/entity-async/mocks/example-reducer-spec.d.ts +0 -2
  398. package/schematics/store/entity-async/mocks/example-reducer-spec.d.ts.map +0 -1
  399. package/schematics/store/entity-async/mocks/example-reducer-spec.js +0 -127
  400. package/schematics/store/entity-async/mocks/example-reducer-spec.js.map +0 -1
  401. package/schematics/store/entity-async/mocks/example-reducer.d.ts +0 -2
  402. package/schematics/store/entity-async/mocks/example-reducer.d.ts.map +0 -1
  403. package/schematics/store/entity-async/mocks/example-reducer.js +0 -69
  404. package/schematics/store/entity-async/mocks/example-reducer.js.map +0 -1
  405. package/schematics/store/entity-async/mocks/example-selectors-spec.d.ts +0 -2
  406. package/schematics/store/entity-async/mocks/example-selectors-spec.d.ts.map +0 -1
  407. package/schematics/store/entity-async/mocks/example-selectors-spec.js +0 -16
  408. package/schematics/store/entity-async/mocks/example-selectors-spec.js.map +0 -1
  409. package/schematics/store/entity-async/mocks/example-selectors.d.ts +0 -2
  410. package/schematics/store/entity-async/mocks/example-selectors.d.ts.map +0 -1
  411. package/schematics/store/entity-async/mocks/example-selectors.js +0 -28
  412. package/schematics/store/entity-async/mocks/example-selectors.js.map +0 -1
  413. package/schematics/store/entity-async/mocks/example-state.d.ts +0 -2
  414. package/schematics/store/entity-async/mocks/example-state.d.ts.map +0 -1
  415. package/schematics/store/entity-async/mocks/example-state.js +0 -39
  416. package/schematics/store/entity-async/mocks/example-state.js.map +0 -1
  417. package/schematics/store/entity-async/mocks/example-sync.d.ts +0 -2
  418. package/schematics/store/entity-async/mocks/example-sync.d.ts.map +0 -1
  419. package/schematics/store/entity-async/mocks/example-sync.js +0 -29
  420. package/schematics/store/entity-async/mocks/example-sync.js.map +0 -1
  421. package/schematics/store/entity-sync/mocks/example-actions.d.ts +0 -2
  422. package/schematics/store/entity-sync/mocks/example-actions.d.ts.map +0 -1
  423. package/schematics/store/entity-sync/mocks/example-actions.js +0 -56
  424. package/schematics/store/entity-sync/mocks/example-actions.js.map +0 -1
  425. package/schematics/store/entity-sync/mocks/example-reducer-spec.d.ts +0 -2
  426. package/schematics/store/entity-sync/mocks/example-reducer-spec.d.ts.map +0 -1
  427. package/schematics/store/entity-sync/mocks/example-reducer-spec.js +0 -85
  428. package/schematics/store/entity-sync/mocks/example-reducer-spec.js.map +0 -1
  429. package/schematics/store/entity-sync/mocks/example-reducer.d.ts +0 -2
  430. package/schematics/store/entity-sync/mocks/example-reducer.d.ts.map +0 -1
  431. package/schematics/store/entity-sync/mocks/example-reducer.js +0 -51
  432. package/schematics/store/entity-sync/mocks/example-reducer.js.map +0 -1
  433. package/schematics/store/entity-sync/mocks/example-selectors-spec.d.ts +0 -2
  434. package/schematics/store/entity-sync/mocks/example-selectors-spec.d.ts.map +0 -1
  435. package/schematics/store/entity-sync/mocks/example-selectors-spec.js +0 -10
  436. package/schematics/store/entity-sync/mocks/example-selectors-spec.js.map +0 -1
  437. package/schematics/store/entity-sync/mocks/example-selectors.d.ts +0 -2
  438. package/schematics/store/entity-sync/mocks/example-selectors.d.ts.map +0 -1
  439. package/schematics/store/entity-sync/mocks/example-selectors.js +0 -25
  440. package/schematics/store/entity-sync/mocks/example-selectors.js.map +0 -1
  441. package/schematics/store/entity-sync/mocks/example-state.d.ts +0 -2
  442. package/schematics/store/entity-sync/mocks/example-state.d.ts.map +0 -1
  443. package/schematics/store/entity-sync/mocks/example-state.js +0 -37
  444. package/schematics/store/entity-sync/mocks/example-state.js.map +0 -1
  445. package/schematics/store/simple-async/mocks/example-actions.d.ts +0 -2
  446. package/schematics/store/simple-async/mocks/example-actions.d.ts.map +0 -1
  447. package/schematics/store/simple-async/mocks/example-actions.js +0 -56
  448. package/schematics/store/simple-async/mocks/example-actions.js.map +0 -1
  449. package/schematics/store/simple-async/mocks/example-effect-spec.d.ts +0 -2
  450. package/schematics/store/simple-async/mocks/example-effect-spec.d.ts.map +0 -1
  451. package/schematics/store/simple-async/mocks/example-effect-spec.js +0 -45
  452. package/schematics/store/simple-async/mocks/example-effect-spec.js.map +0 -1
  453. package/schematics/store/simple-async/mocks/example-effect.d.ts +0 -2
  454. package/schematics/store/simple-async/mocks/example-effect.d.ts.map +0 -1
  455. package/schematics/store/simple-async/mocks/example-effect.js +0 -54
  456. package/schematics/store/simple-async/mocks/example-effect.js.map +0 -1
  457. package/schematics/store/simple-async/mocks/example-reducer-spec.d.ts +0 -2
  458. package/schematics/store/simple-async/mocks/example-reducer-spec.d.ts.map +0 -1
  459. package/schematics/store/simple-async/mocks/example-reducer-spec.js +0 -58
  460. package/schematics/store/simple-async/mocks/example-reducer-spec.js.map +0 -1
  461. package/schematics/store/simple-async/mocks/example-reducer.d.ts +0 -2
  462. package/schematics/store/simple-async/mocks/example-reducer.d.ts.map +0 -1
  463. package/schematics/store/simple-async/mocks/example-reducer.js +0 -46
  464. package/schematics/store/simple-async/mocks/example-reducer.js.map +0 -1
  465. package/schematics/store/simple-async/mocks/example-state.d.ts +0 -2
  466. package/schematics/store/simple-async/mocks/example-state.d.ts.map +0 -1
  467. package/schematics/store/simple-async/mocks/example-state.js +0 -39
  468. package/schematics/store/simple-async/mocks/example-state.js.map +0 -1
  469. package/schematics/store/simple-async/mocks/example-sync.d.ts +0 -2
  470. package/schematics/store/simple-async/mocks/example-sync.d.ts.map +0 -1
  471. package/schematics/store/simple-async/mocks/example-sync.js +0 -22
  472. package/schematics/store/simple-async/mocks/example-sync.js.map +0 -1
  473. package/schematics/store/simple-sync/mocks/example-actions.d.ts +0 -2
  474. package/schematics/store/simple-sync/mocks/example-actions.d.ts.map +0 -1
  475. package/schematics/store/simple-sync/mocks/example-actions.js +0 -28
  476. package/schematics/store/simple-sync/mocks/example-actions.js.map +0 -1
  477. package/schematics/store/simple-sync/mocks/example-reducer-spec.d.ts +0 -2
  478. package/schematics/store/simple-sync/mocks/example-reducer-spec.d.ts.map +0 -1
  479. package/schematics/store/simple-sync/mocks/example-reducer-spec.js +0 -38
  480. package/schematics/store/simple-sync/mocks/example-reducer-spec.js.map +0 -1
  481. package/schematics/store/simple-sync/mocks/example-reducer.d.ts +0 -2
  482. package/schematics/store/simple-sync/mocks/example-reducer.d.ts.map +0 -1
  483. package/schematics/store/simple-sync/mocks/example-reducer.js +0 -32
  484. package/schematics/store/simple-sync/mocks/example-reducer.js.map +0 -1
  485. package/schematics/store/simple-sync/mocks/example-state.d.ts +0 -2
  486. package/schematics/store/simple-sync/mocks/example-state.d.ts.map +0 -1
  487. package/schematics/store/simple-sync/mocks/example-state.js +0 -22
  488. package/schematics/store/simple-sync/mocks/example-state.js.map +0 -1
  489. package/store/storage/index.d.ts +0 -2
  490. package/store/storage/index.d.ts.map +0 -1
  491. package/store/storage/index.js +0 -2
  492. package/store/storage/index.js.map +0 -1
  493. package/store/storage/store-sync.d.ts +0 -113
  494. package/store/storage/store-sync.d.ts.map +0 -1
  495. package/store/storage/store-sync.js +0 -111
  496. package/store/storage/store-sync.js.map +0 -1
  497. /package/{schematics/application → builders/run-script}/schema.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/library/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAAsB,MAAM,4BAA4B,CAAC;AAGnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAKlD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI,CA2BpE"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateModule = void 0;
4
- const schematics_1 = require("@angular-devkit/schematics");
5
- const path = require("node:path");
6
- const schematics_2 = require("@o3r/schematics");
7
- const tasks_1 = require("@angular-devkit/schematics/tasks");
8
- const rules_nx_1 = require("./rules/rules.nx");
9
- const rules_ng_1 = require("./rules/rules.ng");
10
- /**
11
- * Add an Otter compatible module to a monorepo
12
- *
13
- * @param options Schematic options
14
- */
15
- function generateModule(options) {
16
- return (tree, context) => {
17
- const cleanName = schematics_1.strings.dasherize(options.name);
18
- const isNx = (0, schematics_2.isNxContext)(tree);
19
- const config = (0, schematics_2.getWorkspaceConfig)(tree);
20
- if (!config) {
21
- throw new Error('No workspace configuration file found');
22
- }
23
- const defaultRoot = (0, schematics_2.getPackagesBaseRootFolder)(tree, context, config, 'library');
24
- /** Path to the folder where generate the new module */
25
- const targetPath = path.posix.resolve('/', options.path || defaultRoot, cleanName);
26
- const extendedOptions = { ...options, targetPath, name: cleanName };
27
- return (0, schematics_1.chain)([
28
- isNx ? (0, rules_nx_1.nxGenerateModule)(extendedOptions) : (0, rules_ng_1.ngGenerateModule)(extendedOptions),
29
- // TODO: Waiting for ng-add clean up to uncomment following line hand run ng-add @o3r/core to generated library
30
- // (t, c) => schematic('ng-add', { ...options, projectName })(t, c),
31
- (t, c) => (0, schematics_1.schematic)('ng-add-create', { name: options.name, path: targetPath })(t, c),
32
- options.skipLinter ? (0, schematics_1.noop)() : (0, schematics_2.applyEsLintFix)(),
33
- options.skipInstall ? (0, schematics_1.noop)() : (t, c) => {
34
- c.addTask(new tasks_1.NodePackageInstallTask());
35
- return t;
36
- }
37
- ])(tree, context);
38
- };
39
- }
40
- exports.generateModule = generateModule;
41
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/library/index.ts"],"names":[],"mappings":";;;AAAA,2DAAmF;AACnF,kCAAkC;AAClC,gDAA6G;AAE7G,4DAA0E;AAC1E,+CAAoD;AACpD,+CAAoD;AAEpD;;;;GAIG;AACH,SAAgB,cAAc,CAAC,OAA+B;IAE5D,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,SAAS,GAAG,oBAAO,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,C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AC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AA3BD,wCA2BC"}
@@ -1,11 +0,0 @@
1
- import type { NgGenerateModuleSchema } from '../schema';
2
- import { Rule } from '@angular-devkit/schematics';
3
- /**
4
- * generate the rules to adapt the library generated by ng cli
5
- * @param options.targetPath Path where the library has been generated
6
- * @param options Schematic options
7
- */
8
- export declare function ngGenerateModule(options: NgGenerateModuleSchema & {
9
- targetPath: string;
10
- }): Rule;
11
- //# sourceMappingURL=rules.ng.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rules.ng.d.ts","sourceRoot":"","sources":["../../../../schematics/library/rules/rules.ng.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAGxD,OAAO,EAAwF,IAAI,EAAiB,MAAM,4BAA4B,CAAC;AAKvJ;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,sBAAsB,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAuG/F"}
@@ -1,113 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ngGenerateModule = void 0;
4
- const schematics_1 = require("@o3r/schematics");
5
- const ts = require("typescript");
6
- const schematics_2 = require("@angular-devkit/schematics");
7
- const path = require("node:path");
8
- const node_fs_1 = require("node:fs");
9
- const shared_1 = require("./shared");
10
- /**
11
- * generate the rules to adapt the library generated by ng cli
12
- * @param options.targetPath Path where the library has been generated
13
- * @param options Schematic options
14
- */
15
- function ngGenerateModule(options) {
16
- /**
17
- * Update Ng templates
18
- * @param tree File tree
19
- * @param context Context of the schematics
20
- */
21
- const updateNgTemplate = (tree, context) => {
22
- const o3rCorePackageJsonPath = path.resolve(__dirname, '..', '..', '..', 'package.json');
23
- const o3rCorePackageJson = JSON.parse((0, node_fs_1.readFileSync)(o3rCorePackageJsonPath).toString());
24
- const otterVersion = o3rCorePackageJson.dependencies['@o3r/schematics'];
25
- const templateNg = (0, schematics_2.apply)((0, schematics_2.url)('./templates/ng'), [
26
- (0, schematics_2.template)({
27
- ...options,
28
- runner: process.env.npm_execpath && /[\\/][^\\/]yarn[^\\/]js$/.test(process.env.npm_execpath) ? 'yarn run' : 'npm run',
29
- tsconfigSpecPath: (0, schematics_1.findConfigFileRelativePath)(tree, ['tsconfig.test.json', 'tsconfig.spec.json', 'tsconfig.jest.json', 'tsconfig.jasmine.json', 'tsconfig.base.json', 'tsconfig.json'], options.targetPath),
30
- tsconfigBasePath: (0, schematics_1.findConfigFileRelativePath)(tree, ['tsconfig.base.json', 'tsconfig.json'], options.targetPath),
31
- tsconfigBuildPath: (0, schematics_1.findConfigFileRelativePath)(tree, ['tsconfig.build.json', 'tsconfig.base.json', 'tsconfig.json'], options.targetPath),
32
- eslintRcPath: (0, schematics_1.findConfigFileRelativePath)(tree, ['.eslintrc.json', '.eslintrc.js'], options.targetPath)
33
- }),
34
- (0, schematics_2.renameTemplateFiles)(),
35
- (0, schematics_2.move)(options.targetPath)
36
- ]);
37
- return (0, schematics_2.chain)([
38
- (0, schematics_2.mergeWith)(templateNg, schematics_2.MergeStrategy.Overwrite),
39
- (0, shared_1.updatePackageDependenciesFactory)(options.targetPath, otterVersion, o3rCorePackageJson, options),
40
- (0, shared_1.updateNgPackagrFactory)(options.targetPath)
41
- ])(tree, context);
42
- };
43
- /**
44
- * Update the tsconfig generated by the Angular library generator
45
- * @param tree File tree
46
- * @param context Context of the schematics
47
- */
48
- const updateLibTsconfig = (tree, context) => {
49
- const tsconfigPath = path.posix.join(options.path || '', options.name, 'tsconfig.lib.json');
50
- if (!tree.exists(tsconfigPath)) {
51
- context.logger.warn(`The file ${tsconfigPath} was not found, the update will not be applied`);
52
- return tree;
53
- }
54
- const tsconfig = ts.parseConfigFileTextToJson(tsconfigPath, tree.readText(tsconfigPath));
55
- if (!tsconfig || !tsconfig.config) {
56
- context.logger.error(`Error parsing ${tsconfigPath}, the update will not be applied`, tsconfig?.error);
57
- return tree;
58
- }
59
- tsconfig.config.extends = path.posix.resolve(path.relative(options.path || '.', '.'), 'tsconfig.base.json');
60
- tree.overwrite(tsconfigPath, JSON.stringify(tsconfig, null, 2));
61
- return tree;
62
- };
63
- /**
64
- * Update the root tsconfig files mappings
65
- * @param tree File tree
66
- * @param context Context of the schematics
67
- */
68
- const updateTsConfigFiles = (tree, context) => {
69
- const tsconfigBase = (0, schematics_1.findConfigFileRelativePath)(tree, ['tsconfig.base.json', 'tsconfig.json'], '/');
70
- const tsconfigBuild = (0, schematics_1.findConfigFileRelativePath)(tree, ['tsconfig.build.json'], '/');
71
- if (tsconfigBase) {
72
- const configFile = tree.readJson(tsconfigBase);
73
- if (configFile?.compilerOptions?.paths) {
74
- configFile.compilerOptions.paths[options.name] = [path.posix.join(options.path || '', options.name, 'src', 'public_api')];
75
- tree.overwrite(tsconfigBase, JSON.stringify(configFile, null, 2));
76
- }
77
- else {
78
- context.logger.warn(`${tsconfigBase} does not contain path mapping, the edition will be skipped`);
79
- }
80
- }
81
- else {
82
- context.logger.warn('No base TsConfig file found');
83
- }
84
- if (tsconfigBuild) {
85
- const configFile = tree.readJson(tsconfigBuild);
86
- if (configFile?.compilerOptions?.paths) {
87
- configFile.compilerOptions.paths[options.name] = [
88
- path.posix.join(options.path || '', options.name, 'dist'),
89
- path.posix.join(options.path || '', options.name, 'src', 'public_api')
90
- ];
91
- tree.overwrite(tsconfigBuild, JSON.stringify(configFile, null, 2));
92
- }
93
- else {
94
- context.logger.warn(`${tsconfigBuild} does not contain path mapping, the edition will be skipped`);
95
- }
96
- }
97
- };
98
- const ngCliUpdate = (tree, context) => {
99
- return (0, schematics_2.chain)([
100
- (t, c) => (0, schematics_2.externalSchematic)('@schematics/angular', 'library', {
101
- name: options.name,
102
- projectRoot: options.targetPath,
103
- prefix: options.prefix
104
- })(t, c),
105
- updateNgTemplate,
106
- updateLibTsconfig,
107
- updateTsConfigFiles
108
- ])(tree, context);
109
- };
110
- return ngCliUpdate;
111
- }
112
- exports.ngGenerateModule = ngGenerateModule;
113
- //# sourceMappingURL=rules.ng.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rules.ng.js","sourceRoot":"","sources":["../../../../schematics/library/rules/rules.ng.ts"],"names":[],"mappings":";;;AAEA,gDAA6D;AAC7D,iCAAiC;AACjC,2DAAuJ;AACvJ,kCAAkC;AAClC,qCAAuC;AACvC,qCAAoF;AAEpF;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,OAAwD;IACvF;;;;OAIG;IACH,MAAM,gBAAgB,GAAS,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QAC/C,MAAM,sBAAsB,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACzF,MAAM,kBAAkB,GAAqE,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,sBAAsB,CAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1J,MAAM,YAAY,GAAG,kBAAkB,CAAC,YAAa,CAAC,iBAAiB,CAAC,CAAC;QAEzE,MAAM,UAAU,GAAG,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,gBAAgB,CAAC,EAAE;YAC9C,IAAA,qBAAQ,EAAC;gBACP,GAAG,OAAO;gBACV,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,0BAA0B,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;gBACtH,gBAAgB,EAAE,IAAA,uCAA0B,EAAC,IAAI,EAC/C,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,eAAe,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC;gBACzJ,gBAAgB,EAAE,IAAA,uCAA0B,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ACvB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACR,gBAAgB;YAChB,iBAAiB;YACjB,mBAAmB;SACpB,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AAvGD,4CAuGC"}
@@ -1,10 +0,0 @@
1
- import type { NgGenerateModuleSchema } from '../schema';
2
- import { Rule } from '@angular-devkit/schematics';
3
- /**
4
- * generate the rules to adapt the library generated by nx cli
5
- *
6
- * @param options
7
- * @param rootPath
8
- */
9
- export declare function nxGenerateModule(options: NgGenerateModuleSchema): Rule;
10
- //# sourceMappingURL=rules.nx.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rules.nx.d.ts","sourceRoot":"","sources":["../../../../schematics/library/rules/rules.nx.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAwF,IAAI,EAAuB,MAAM,4BAA4B,CAAC;AAM7J;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAuHtE"}
@@ -1,126 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nxGenerateModule = void 0;
4
- const schematics_1 = require("@angular-devkit/schematics");
5
- const path = require("node:path");
6
- const node_fs_1 = require("node:fs");
7
- const shared_1 = require("./shared");
8
- const schematics_2 = require("@o3r/schematics");
9
- /**
10
- * generate the rules to adapt the library generated by nx cli
11
- *
12
- * @param options
13
- * @param rootPath
14
- */
15
- function nxGenerateModule(options) {
16
- /**
17
- * Determine the path where NX schematic will generate the package
18
- *
19
- * @param tree
20
- */
21
- const determineNxTargetFolder = (tree) => {
22
- const { workspaceLayout } = tree.readJson('/nx.json');
23
- return path.posix.join(workspaceLayout.libsDir, options.name);
24
- };
25
- /**
26
- * Save the content of files before the process of Nx generation
27
- *
28
- * @param tree
29
- */
30
- const savePreCommandContent = (tree) => {
31
- const files = [
32
- '/.vscode/extensions.json',
33
- '.gitignore',
34
- '.prettierignore',
35
- '.prettierrc',
36
- 'jest.preset.js',
37
- 'nx.json',
38
- 'package.json'
39
- ];
40
- return files.reduce((acc, file) => {
41
- if (!tree.exists(file)) {
42
- acc[file] = null;
43
- return acc;
44
- }
45
- acc[file] = tree.read(file);
46
- return acc;
47
- }, {});
48
- };
49
- /**
50
- * Restore the file saved
51
- *
52
- * @param mem
53
- */
54
- const restoreFiles = (mem) => (tree) => {
55
- Object.entries(mem)
56
- .forEach(([file, content]) => {
57
- if (content === null) {
58
- if (tree.exists(file)) {
59
- tree.delete(file);
60
- }
61
- }
62
- else {
63
- tree.overwrite(file, content);
64
- }
65
- });
66
- return tree;
67
- };
68
- /**
69
- * Update Nx templates
70
- *
71
- * @param tree File tree
72
- * @param context Context of the schematics
73
- */
74
- const updateNxTemplate = (tree, context) => {
75
- const rules = [];
76
- let targetPath = determineNxTargetFolder(tree);
77
- if (options.path) {
78
- rules.push((0, schematics_1.move)(targetPath, options.path));
79
- targetPath = options.path;
80
- }
81
- const o3rCorePackageJsonPath = path.resolve(__dirname, '..', '..', '..', 'package.json');
82
- const o3rCorePackageJson = JSON.parse((0, node_fs_1.readFileSync)(o3rCorePackageJsonPath).toString());
83
- const otterVersion = o3rCorePackageJson.dependencies['@o3r/schematics'];
84
- const templateNx = (0, schematics_1.apply)((0, schematics_1.url)('./templates/nx'), [
85
- (0, schematics_1.template)({
86
- ...options,
87
- path: targetPath,
88
- projectRoot: path.posix.resolve(targetPath, options.name),
89
- otterVersion,
90
- runner: (0, schematics_2.getPackageManagerRunner)((0, schematics_2.getWorkspaceConfig)(tree))
91
- }),
92
- (0, schematics_1.renameTemplateFiles)(),
93
- (0, schematics_1.move)(targetPath)
94
- ]);
95
- rules.push((0, schematics_1.mergeWith)(templateNx, schematics_1.MergeStrategy.Overwrite));
96
- return (0, schematics_1.chain)([
97
- ...rules,
98
- (0, shared_1.updatePackageDependenciesFactory)(targetPath, otterVersion, o3rCorePackageJson, options),
99
- (0, shared_1.updateNgPackagrFactory)(targetPath),
100
- (t) => {
101
- const packageJson = t.readJson(path.posix.join(targetPath, 'package.json'));
102
- packageJson.scripts ||= {};
103
- packageJson.scripts.ng = 'nx';
104
- t.overwrite(path.posix.join(targetPath, 'package.json'), JSON.stringify(packageJson, null, 2));
105
- return t;
106
- }
107
- ])(tree, context);
108
- };
109
- const nxCliUpdate = (tree, context) => {
110
- const mem = savePreCommandContent(tree);
111
- const config = {
112
- name: options.name.replace(/^@/, '').replace('/', '-'),
113
- importPath: options.name,
114
- buildable: true,
115
- publishable: true
116
- };
117
- return (0, schematics_1.chain)([
118
- (t, c) => (0, schematics_1.externalSchematic)('@nx/angular', 'library', config)(t, c),
119
- restoreFiles(mem),
120
- updateNxTemplate
121
- ])(tree, context);
122
- };
123
- return nxCliUpdate;
124
- }
125
- exports.nxGenerateModule = nxGenerateModule;
126
- //# sourceMappingURL=rules.nx.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rules.nx.js","sourceRoot":"","sources":["../../../../schematics/library/rules/rules.nx.ts"],"names":[],"mappings":";;;AAEA,2DAA6J;AAC7J,kCAAkC;AAClC,qCAAuC;AACvC,qCAAoF;AACpF,gDAA8E;AAE9E;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,OAA+B;IAE9D;;;;OAIG;IACH,MAAM,uBAAuB,GAAG,CAAC,IAAU,EAAE,EAAE;QAC7C,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAA6C,CAAC;QAClG,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,CAAC,CAAC;IAEF;;;;OAIG;IACH,MAAM,qBAAqB,GAAG,CAAC,IAAU,EAAE,EAAE;QAC3C,MAAM,KAAK,GAAG;YACZ,0BAA0B;YAC1B,Y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CAAC,OAAO,KAAK,EAAE,CAAC;gBAC3B,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC;gBAC9B,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;gBAC/F,OAAO,CAAC,CAAC;YACX,CAAC;SACF,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,MAAM,WAAW,GAAS,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QAC1C,MAAM,GAAG,GAAkC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACvE,MAAM,MAAM,GAAwB;YAClC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;YACtD,UAAU,EAAE,OAAO,CAAC,IAAI;YACxB,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,IAAI;SAClB,CAAC;QACF,OAAO,IAAA,kBAAK,EAAC;YACX,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAA,8BAAiB,EAAC,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACnE,YAAY,CAAC,GAAG,CAAC;YACjB,gBAAgB;SACjB,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AAvHD,4CAuHC"}
@@ -1,19 +0,0 @@
1
- import type { Rule } from '@angular-devkit/schematics';
2
- import type { PackageJson } from 'type-fest';
3
- import { NgGenerateModuleSchema } from '../schema';
4
- /**
5
- * Generate rule to update generated package.json file
6
- * @param targetPath Path of the generated files
7
- * @param otterVersion Current version of otter
8
- * @param o3rCorePackageJson Content of core's package.json
9
- * @param options Option of the schematic
10
- */
11
- export declare function updatePackageDependenciesFactory(targetPath: string, otterVersion: string, o3rCorePackageJson: PackageJson & {
12
- generatorDependencies?: Record<string, string>;
13
- }, options: NgGenerateModuleSchema): Rule;
14
- /**
15
- * Generate rule to update generated ng-packagr.json file
16
- * @param targetPath Path of the generated files
17
- */
18
- export declare function updateNgPackagrFactory(targetPath: string): Rule;
19
- //# sourceMappingURL=shared.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../schematics/library/rules/shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAGnD;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC5C,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,kBAAkB,EAAE,WAAW,GAAG;IAAE,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAC,EACnF,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAyDzC;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAO/D"}
@@ -1,84 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateNgPackagrFactory = exports.updatePackageDependenciesFactory = void 0;
4
- const path = require("node:path");
5
- const schematics_1 = require("@o3r/schematics");
6
- /**
7
- * Generate rule to update generated package.json file
8
- * @param targetPath Path of the generated files
9
- * @param otterVersion Current version of otter
10
- * @param o3rCorePackageJson Content of core's package.json
11
- * @param options Option of the schematic
12
- */
13
- function updatePackageDependenciesFactory(targetPath, otterVersion, o3rCorePackageJson, options) {
14
- return (tree) => {
15
- /* eslint-disable @typescript-eslint/naming-convention */
16
- const packageJson = tree.readJson(path.posix.join(targetPath, 'package.json'));
17
- const runner = (0, schematics_1.getPackageManagerRunner)((0, schematics_1.getWorkspaceConfig)(tree));
18
- packageJson.description = options.description || packageJson.description;
19
- packageJson.scripts ||= {};
20
- packageJson.scripts.build = `${runner} ng build ${options.name}`;
21
- packageJson.scripts['prepare:build:builders'] = `${runner} cpy 'collection.json' dist && ${runner} cpy 'schematics/**/*.json' dist/schematics`;
22
- packageJson.scripts['build:builders'] = 'tsc -b tsconfig.builders.json --pretty';
23
- packageJson.peerDependencies ||= {};
24
- packageJson.peerDependencies['@o3r/dev-tools'] = otterVersion;
25
- packageJson.peerDependencies['@o3r/core'] = otterVersion;
26
- packageJson.peerDependencies['@o3r/schematics'] = otterVersion;
27
- packageJson.devDependencies ||= {};
28
- packageJson.keywords ||= [];
29
- packageJson.keywords.push('otter-module');
30
- packageJson.version = '0.0.0-placeholder';
31
- packageJson.devDependencies = {
32
- ...packageJson.devDependencies,
33
- '@angular-devkit/build-angular': o3rCorePackageJson.peerDependencies['@angular-devkit/core'],
34
- '@angular-devkit/core': o3rCorePackageJson.peerDependencies['@angular-devkit/core'],
35
- '@angular-eslint/eslint-plugin': o3rCorePackageJson.generatorDependencies['@angular-eslint/eslint-plugin'],
36
- '@angular/cli': packageJson.peerDependencies['@angular/common'],
37
- '@angular/common': packageJson.peerDependencies['@angular/common'],
38
- '@angular/compiler': packageJson.peerDependencies['@angular/common'],
39
- '@angular/compiler-cli': packageJson.peerDependencies['@angular/common'],
40
- '@angular/core': packageJson.peerDependencies['@angular/common'],
41
- '@angular/platform-browser': packageJson.peerDependencies['@angular/common'],
42
- '@angular/platform-browser-dynamic': packageJson.peerDependencies['@angular/common'],
43
- '@o3r/core': otterVersion,
44
- '@o3r/dev-tools': otterVersion,
45
- '@o3r/eslint-plugin': otterVersion,
46
- '@schematics/angular': o3rCorePackageJson.peerDependencies['@schematics/angular'],
47
- '@types/jest': o3rCorePackageJson.generatorDependencies['@types/jest'],
48
- '@typescript-eslint/eslint-plugin': o3rCorePackageJson.generatorDependencies['@typescript-eslint/parser'],
49
- '@typescript-eslint/parser': o3rCorePackageJson.generatorDependencies['@typescript-eslint/parser'],
50
- 'cpy-cli': o3rCorePackageJson.generatorDependencies['cpy-cli'],
51
- 'eslint': o3rCorePackageJson.generatorDependencies.eslint,
52
- 'eslint-import-resolver-node': o3rCorePackageJson.generatorDependencies['eslint-import-resolver-node'],
53
- 'eslint-plugin-jest': o3rCorePackageJson.generatorDependencies['eslint-plugin-jest'],
54
- 'eslint-plugin-jsdoc': o3rCorePackageJson.generatorDependencies['eslint-plugin-jsdoc'],
55
- 'eslint-plugin-prefer-arrow': o3rCorePackageJson.generatorDependencies['eslint-plugin-prefer-arrow'],
56
- 'eslint-plugin-unicorn': o3rCorePackageJson.generatorDependencies['eslint-plugin-unicorn'],
57
- 'jest': o3rCorePackageJson.generatorDependencies.jest,
58
- 'jest-environment-jsdom': o3rCorePackageJson.generatorDependencies.jest,
59
- 'jest-junit': o3rCorePackageJson.generatorDependencies['jest-junit'],
60
- 'jest-preset-angular': o3rCorePackageJson.generatorDependencies['jest-preset-angular'],
61
- 'rxjs': o3rCorePackageJson.peerDependencies.rxjs,
62
- 'typescript': o3rCorePackageJson.peerDependencies.typescript,
63
- 'zone.js': o3rCorePackageJson.generatorDependencies['zone.js']
64
- };
65
- /* eslint-enable @typescript-eslint/naming-convention */
66
- tree.overwrite(path.posix.join(targetPath, 'package.json'), JSON.stringify(packageJson, null, 2));
67
- return tree;
68
- };
69
- }
70
- exports.updatePackageDependenciesFactory = updatePackageDependenciesFactory;
71
- /**
72
- * Generate rule to update generated ng-packagr.json file
73
- * @param targetPath Path of the generated files
74
- */
75
- function updateNgPackagrFactory(targetPath) {
76
- return (tree) => {
77
- const ngPackagr = tree.readJson(path.posix.join(targetPath, 'ng-package.json'));
78
- ngPackagr.$schema = 'https://raw.githubusercontent.com/ng-packagr/ng-packagr/master/src/ng-package.schema.json';
79
- tree.overwrite(path.posix.join(targetPath, 'ng-package.json'), JSON.stringify(ngPackagr, null, 2));
80
- return tree;
81
- };
82
- }
83
- exports.updateNgPackagrFactory = updateNgPackagrFactory;
84
- //# sourceMappingURL=shared.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../schematics/library/rules/shared.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAIlC,gDAA8E;AAE9E;;;;;;GAMG;AACH,SAAgB,gCAAgC,CAC5C,UAAkB,EAClB,YAAoB,EACpB,kBAAmF,EACnF,OAA+B;IACjC,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,yDAAyD;QACzD,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAgB,CAAC;QAC9F,MAAM,MAAM,GAAG,IAAA,oCAAuB,EAAC,IAAA,+BAAkB,EAAC,IAAI,CAAC,CAAC,CAAC;QACjE,WAAW,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,WAAW,CAAC,WAAW,CAAC;QACzE,WAAW,CAAC,OAAO,KAAK,EAAE,CAAC;QAC3B,WAAW,CAAC,OAAO,CAAC,KAAK,GAAG,GAAG,MAAM,aAAa,OAAO,CAAC,IAAI,EAAE,CAAC;QACjE,WAAW,CAAC,OAAO,CAAC,wBAAwB,CAAC,GAAG,GAAG,MAAM,kCAAkC,MAAM,6CAA6C,CAAC;QAC/I,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,GAAG,wCAAwC,CAAC;QACjF,WAAW,CAAC,gBAAgB,KAAK,EAAE,CAAC;QACpC,WAAW,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,GAAG,YAAY,CAAC;QAC9D,WAAW,CAAC,gBAAgB,CAAC,WAAW,CAAC,GAAG,YAAY,CAAC;QACzD,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,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,CAAC,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAQ,CAAC;QACvF,SAAS,CAAC,OAAO,GAAG,2FAA2F,CAAC;QAChH,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACnG,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAPD,wDAOC"}
@@ -1,18 +0,0 @@
1
- import type { SchematicOptionObject } from '@o3r/schematics';
2
- export interface NgGenerateModuleSchema extends SchematicOptionObject {
3
- /** Project name */
4
- name: string;
5
- /** Target directory to generate the module */
6
- path?: string | undefined;
7
- /** Description of the new module */
8
- description?: string | undefined;
9
- /** Prefix use to package future generation */
10
- prefix?: string | undefined;
11
- /** Name of the Nx Project (applied only in Nx Monorepo) */
12
- projectName?: string | undefined;
13
- /** Skip the linter process */
14
- skipLinter: boolean;
15
- /** Do not install dependency packages. */
16
- skipInstall: boolean;
17
- }
18
- //# sourceMappingURL=schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/library/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACnE,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IAEb,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,8BAA8B;IAC9B,UAAU,EAAE,OAAO,CAAC;IAEpB,0CAA0C;IAC1C,WAAW,EAAE,OAAO,CAAC;CACtB"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=schema.js.map
@@ -1,51 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "ngGenerateModuleSchematicsSchema",
4
- "title": "Generate a new Otter compatible module",
5
- "description": "Generate a new Otter module",
6
- "properties": {
7
- "name": {
8
- "type": "string",
9
- "description": "Package name",
10
- "x-prompt": "Name of the package of the new module?",
11
- "$default": {
12
- "$source": "argv",
13
- "index": 0
14
- }
15
- },
16
- "description": {
17
- "type": "string",
18
- "description": "Description of the new module",
19
- "default": ""
20
- },
21
- "prefix": {
22
- "type": "string",
23
- "description": "Prefix use to package future generation"
24
- },
25
- "path": {
26
- "type": "string",
27
- "description": "Target directory to generate the module"
28
- },
29
- "skipLinter": {
30
- "type": "boolean",
31
- "description": "Skip the linter process",
32
- "default": true
33
- },
34
- "skipInstall": {
35
- "description": "Do not install dependency packages.",
36
- "type": "boolean",
37
- "default": false
38
- },
39
- "preset": {
40
- "type": "string",
41
- "description": "Preset of module list to automatically install",
42
- "default": "basic",
43
- "enum": [
44
- "basic",
45
- "cms"
46
- ]
47
- }
48
- },
49
- "required": ["name"],
50
- "additionalProperties": true
51
- }
@@ -1,19 +0,0 @@
1
- /* eslint-disable @typescript-eslint/naming-convention */
2
- /* eslint-disable quote-props */
3
-
4
- module.exports = {
5
- 'root': true,
6
- 'parserOptions': {
7
- 'tsconfigRootDir': __dirname,
8
- 'project': [
9
- 'tsconfig.build.json',
10
- 'tsconfig.spec.json',
11
- 'tsconfig.builders.json',
12
- 'tsconfig.eslint.json'
13
- ],
14
- 'sourceType': 'module'
15
- },
16
- 'extends': [
17
- '<%= eslintRcPath %>'
18
- ]
19
- };
@@ -1,2 +0,0 @@
1
- /dist
2
- /build
@@ -1,37 +0,0 @@
1
- const { getJestModuleNameMapper } = require('@o3r/dev-tools');
2
-
3
- globalThis.ngJest = {
4
- skipNgcc: true
5
- };
6
-
7
- /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
8
- module.exports = {
9
- displayName: require('./package.json').name,
10
- preset: 'jest-preset-angular',
11
- setupFilesAfterEnv: ['<rootDir>/testing/setup-jest.ts'],
12
- rootDir: '.',
13
- moduleNameMapper: getJestModuleNameMapper(__dirname),
14
- testPathIgnorePatterns: [
15
- '<rootDir>/dist',
16
- ],
17
- reporters: [
18
- 'default',
19
- 'github-actions'
20
- ],
21
- globalSetup: 'jest-preset-angular/global-setup',
22
- transform: {
23
- // eslint-disable-next-line @typescript-eslint/naming-convention
24
- '^.+\\.tsx?$': [
25
- 'jest-preset-angular',
26
- {
27
- tsconfig: '<rootDir>/tsconfig.spec.json',
28
- stringifyContentPathRegex: '\\.html$'
29
- }
30
- ]
31
- },
32
- snapshotSerializers: [
33
- 'jest-preset-angular/build/serializers/no-ng-attributes',
34
- 'jest-preset-angular/build/serializers/ng-snapshot',
35
- 'jest-preset-angular/build/serializers/html-comment',
36
- ]
37
- };
@@ -1,2 +0,0 @@
1
- import 'jest-preset-angular/setup-jest';
2
-
@@ -1,22 +0,0 @@
1
- {
2
- "extends": "<%= tsconfigBuildPath %>",
3
- "compilerOptions": {
4
- "skipLibCheck": true,
5
- "incremental": true,
6
- "composite": true,
7
- "outDir": "./dist",
8
- "module": "CommonJS",
9
- "rootDir": ".",
10
- "declaration": true,
11
- "tsBuildInfoFile": "build/.tsbuildinfo.builders"
12
- },
13
- "include": [
14
- "builders/**/*.ts",
15
- "schematics/**/*.ts"
16
- ],
17
- "exclude": [
18
- "**/*.spec.ts",
19
- "builders/**/templates/**",
20
- "schematics/**/templates/**"
21
- ]
22
- }
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "./tsconfig.lib",
3
- "include": [
4
- ".eslintrc.js",
5
- "jest.config.js",
6
- "testing/*"
7
- ]
8
- }