@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,11 +0,0 @@
1
- import type { Rule } from '@angular-devkit/schematics';
2
- import type { NgGenerateSdkSchema } from '../schema';
3
- /**
4
- * generate the rules to adapt the SDK generated by ng cli
5
- *
6
- * @param _options Schematic options
7
- * @param targetPath Path where the SDK has been generated
8
- * @param projectName Name of the project
9
- */
10
- export declare function ngRegisterProjectTasks(_options: NgGenerateSdkSchema, targetPath: string, projectName: string): Rule;
11
- //# sourceMappingURL=rules.ng.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rules.ng.d.ts","sourceRoot":"","sources":["../../../../schematics/sdk/rules/rules.ng.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAIrD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAwBnH"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ngRegisterProjectTasks = void 0;
4
- const path = require("node:path");
5
- const schematics_1 = require("@o3r/schematics");
6
- /**
7
- * generate the rules to adapt the SDK generated by ng cli
8
- *
9
- * @param _options Schematic options
10
- * @param targetPath Path where the SDK has been generated
11
- * @param projectName Name of the project
12
- */
13
- function ngRegisterProjectTasks(_options, targetPath, projectName) {
14
- const project = {
15
- projectType: 'library',
16
- root: targetPath,
17
- sourceRoot: path.posix.join(targetPath, 'src'),
18
- prefix: 'sdk',
19
- architect: {
20
- // TODO: find builder for build (running tsc) and test (running jest)
21
- }
22
- };
23
- return (tree, context) => {
24
- const angularJson = (0, schematics_1.getWorkspaceConfig)(tree);
25
- if (!angularJson) {
26
- context.logger.warn('No angular.json file detected, the update will be skipped.');
27
- return tree;
28
- }
29
- angularJson.projects[projectName] = {
30
- ...angularJson.projects[projectName],
31
- ...project
32
- };
33
- tree.overwrite('/angular.json', JSON.stringify(angularJson, null, 2));
34
- return tree;
35
- };
36
- }
37
- exports.ngRegisterProjectTasks = ngRegisterProjectTasks;
38
- //# sourceMappingURL=rules.ng.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rules.ng.js","sourceRoot":"","sources":["../../../../schematics/sdk/rules/rules.ng.ts"],"names":[],"mappings":";;;AAEA,kCAAkC;AAClC,gDAAuE;AAEvE;;;;;;GAMG;AACH,SAAgB,sBAAsB,CAAC,QAA6B,EAAE,UAAkB,EAAE,WAAmB;IAC3G,MAAM,OAAO,GAAqB;QAChC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC;QAC9C,MAAM,EAAE,KAAK;QACb,SAAS,EAAE;QACT,qEAAqE;SACtE;KACF,CAAC;IAEF,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,WAAW,GAAG,IAAA,+BAAkB,EAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,EAAE;YAChB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAC;YAClF,OAAO,IAAI,CAAC;SACb;QACD,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG;YAClC,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC;YACpC,GAAG,OAAO;SACX,CAAC;QACF,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAxBD,wDAwBC"}
@@ -1,11 +0,0 @@
1
- import type { Rule } from '@angular-devkit/schematics';
2
- import type { NgGenerateSdkSchema } from '../schema';
3
- /**
4
- * generate the rules to adapt the SDK generated by nx cli
5
- *
6
- * @param _options Schematic options
7
- * @param targetPath Path where the SDK has been generated
8
- * @param projectName Name of the project
9
- */
10
- export declare function nxRegisterProjectTasks(_options: NgGenerateSdkSchema, targetPath: string, projectName: string): Rule;
11
- //# sourceMappingURL=rules.nx.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rules.nx.d.ts","sourceRoot":"","sources":["../../../../schematics/sdk/rules/rules.nx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGrD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CA+CnH"}
@@ -1,60 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nxRegisterProjectTasks = void 0;
4
- const path = require("node:path");
5
- /**
6
- * generate the rules to adapt the SDK generated by nx cli
7
- *
8
- * @param _options Schematic options
9
- * @param targetPath Path where the SDK has been generated
10
- * @param projectName Name of the project
11
- */
12
- function nxRegisterProjectTasks(_options, targetPath, projectName) {
13
- const project = {
14
- $schema: 'https://raw.githubusercontent.com/nrwl/nx/master/packages/nx/schemas/project-schema.json',
15
- name: projectName,
16
- projectType: 'library',
17
- root: targetPath,
18
- sourceRoot: path.posix.join(targetPath, 'src'),
19
- prefix: 'sdk',
20
- targets: {
21
- build: {
22
- executor: 'nx:run-script',
23
- outputs: [
24
- '{projectRoot}/dist/'
25
- ],
26
- options: {
27
- script: 'build'
28
- }
29
- },
30
- lint: {
31
- executor: '@nx/linter:eslint',
32
- configurations: {
33
- ci: {
34
- quiet: true,
35
- cacheLocation: '.cache/eslint'
36
- }
37
- },
38
- options: {
39
- eslintConfig: path.posix.join(targetPath, '.eslintrc.js'),
40
- lintFilePatterns: [
41
- path.posix.join(targetPath, 'src', '**', '*.ts')
42
- ]
43
- }
44
- },
45
- test: {
46
- executor: '@nx/jest:jest',
47
- options: {
48
- jestConfig: path.posix.join(targetPath, 'jest.config.js'),
49
- silent: true
50
- }
51
- }
52
- }
53
- };
54
- return (tree) => {
55
- tree.create(path.posix.join(targetPath, 'project.json'), JSON.stringify(project, null, 2));
56
- return tree;
57
- };
58
- }
59
- exports.nxRegisterProjectTasks = nxRegisterProjectTasks;
60
- //# sourceMappingURL=rules.nx.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rules.nx.js","sourceRoot":"","sources":["../../../../schematics/sdk/rules/rules.nx.ts"],"names":[],"mappings":";;;AAEA,kCAAkC;AAElC;;;;;;GAMG;AACH,SAAgB,sBAAsB,CAAC,QAA6B,EAAE,UAAkB,EAAE,WAAmB;IAC3G,MAAM,OAAO,GAAG;QACd,OAAO,EAAE,0FAA0F;QACnG,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC;QAC9C,MAAM,EAAE,KAAK;QACb,OAAO,EAAE;YACP,KAAK,EAAE;gBACL,QAAQ,EAAE,eAAe;gBACzB,OAAO,EAAE;oBACP,qBAAqB;iBACtB;gBACD,OAAO,EAAE;oBACP,MAAM,EAAE,OAAO;iBAChB;aACF;YACD,IAAI,EAAE;gBACJ,QAAQ,EAAE,mBAAmB;gBAC7B,cAAc,EAAE;oBACd,EAAE,EAAE;wBACF,KAAK,EAAE,IAAI;wBACX,aAAa,EAAE,eAAe;qBAC/B;iBACF;gBACD,OAAO,EAAE;oBACP,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC;oBACzD,gBAAgB,EAAE;wBAChB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC;qBACjD;iBACF;aACF;YACD,IAAI,EAAE;gBACJ,QAAQ,EAAE,eAAe;gBACzB,OAAO,EAAE;oBACP,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC;oBACzD,MAAM,EAAE,IAAI;iBACb;aACF;SACF;KACF,CAAC;IAEF,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC3F,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AA/CD,wDA+CC"}
@@ -1,10 +0,0 @@
1
- import type { Rule } from '@angular-devkit/schematics';
2
- /**
3
- * Update workspace Tsconfig
4
- * @param options Schematic options
5
- * @param targetPath Path where the SDK has been generated
6
- * @param projectName Name of the project
7
- * @param scope scope of the package
8
- */
9
- export declare function updateTsConfig(targetPath: string, projectName: string, scope: string): Rule;
10
- //# sourceMappingURL=update-ts-paths.rule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-ts-paths.rule.d.ts","sourceRoot":"","sources":["../../../../schematics/sdk/rules/update-ts-paths.rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGvD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAgC3F"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateTsConfig = void 0;
4
- const ts = require("typescript");
5
- /**
6
- * Update workspace Tsconfig
7
- * @param options Schematic options
8
- * @param targetPath Path where the SDK has been generated
9
- * @param projectName Name of the project
10
- * @param scope scope of the package
11
- */
12
- function updateTsConfig(targetPath, projectName, scope) {
13
- const tsconfigs = ['tsconfig.base.json', 'tsconfig.build.json', 'tsconfig.json'];
14
- const relativeTargetPath = targetPath.replace(/^\//, '');
15
- return (tree, context) => {
16
- const configs = tsconfigs
17
- .filter((tsconfig) => tree.exists(tsconfig))
18
- .map((tsconfig) => ({
19
- tsconfig,
20
- content: ts.parseConfigFileTextToJson(tsconfig, tree.readText(tsconfig)).config
21
- }))
22
- .filter(({ content }) => !!content);
23
- const configWithPath = configs.find((config) => !!config.content?.compilerOptions?.paths) || configs[0];
24
- if (!configWithPath) {
25
- context.logger.warn('No tsconfig found, the path mapping will not be updated');
26
- return tree;
27
- }
28
- configWithPath.content.compilerOptions ||= {};
29
- configWithPath.content.compilerOptions.paths ||= {};
30
- configWithPath.content.compilerOptions.paths[`@${scope}/${projectName}`] = [
31
- `${relativeTargetPath}/src/index`
32
- ];
33
- configWithPath.content.compilerOptions.paths[`@${scope}/${projectName}/*`] = [
34
- `${relativeTargetPath}/src/*`
35
- ];
36
- tree.overwrite(configWithPath.tsconfig, JSON.stringify(configWithPath.content, null, 2));
37
- return tree;
38
- };
39
- }
40
- exports.updateTsConfig = updateTsConfig;
41
- //# sourceMappingURL=update-ts-paths.rule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-ts-paths.rule.js","sourceRoot":"","sources":["../../../../schematics/sdk/rules/update-ts-paths.rule.ts"],"names":[],"mappings":";;;AACA,iCAAiC;AAEjC;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,UAAkB,EAAE,WAAmB,EAAE,KAAa;IACnF,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,eAAe,CAAC,CAAC;IACjF,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAEzD,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,OAAO,GAAG,SAAS;aACtB,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;aAC3C,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YAClB,QAAQ;YACR,OAAO,EAAE,EAAE,CAAC,yBAAyB,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM;SAChF,CAAC,CAAC;aACF,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAEtC,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;QAExG,IAAI,CAAC,cAAc,EAAE;YACnB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,yDAAyD,CAAC,CAAC;YAC/E,OAAO,IAAI,CAAC;SACb;QAED,cAAc,CAAC,OAAO,CAAC,eAAe,KAAK,EAAE,CAAC;QAC9C,cAAc,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,KAAK,EAAE,CAAC;QACpD,cAAc,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,WAAW,EAAE,CAAC,GAAG;YACzE,GAAG,kBAAkB,YAAY;SAClC,CAAC;QACF,cAAc,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,WAAW,IAAI,CAAC,GAAG;YAC3E,GAAG,kBAAkB,QAAQ;SAC9B,CAAC;QAEF,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACzF,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAhCD,wCAgCC"}
@@ -1,19 +0,0 @@
1
- import type { SchematicOptionObject } from '@o3r/schematics';
2
- import type { PresetNames } from '../ng-add/schema';
3
- export interface NgGenerateSdkSchema extends SchematicOptionObject {
4
- /** Project name */
5
- name: string;
6
- /** Preset of module list to automatically install */
7
- preset: PresetNames;
8
- /** Target directory to generate the module */
9
- path?: string | undefined;
10
- /** Description of the new module */
11
- description?: string | undefined;
12
- /** Skip the linter process */
13
- skipLinter: boolean;
14
- /** Do not install dependency packages. */
15
- skipInstall: boolean;
16
- /** Path to the swagger specification used to generate the SDK; If not provided, sdk shell will be generated */
17
- specPath?: string | undefined;
18
- }
19
- //# sourceMappingURL=schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/sdk/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,WAAW,mBAAoB,SAAQ,qBAAqB;IAChE,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IAEb,qDAAqD;IACrD,MAAM,EAAE,WAAW,CAAC;IAEpB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,8BAA8B;IAC9B,UAAU,EAAE,OAAO,CAAC;IAEpB,0CAA0C;IAC1C,WAAW,EAAE,OAAO,CAAC;IAErB,+GAA+G;IAC/G,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../schematics/sdk/schema.ts"],"names":[],"mappings":""}
@@ -1,46 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "ngGenerateSdkSchematicsSchema",
4
- "title": "Generate an SDK in an Otter Project",
5
- "description": "Generate an SDK in an Otter Project",
6
- "properties": {
7
- "name": {
8
- "type": "string",
9
- "description": "Name of the SDK package",
10
- "x-prompt": "Name of the new SDK package?",
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
- "specPath": {
30
- "type": "string",
31
- "description": "Path to the swagger specification used to generate the SDK; If not provided, sdk shell will be generated"
32
- },
33
- "skipLinter": {
34
- "type": "boolean",
35
- "description": "Skip the linter process",
36
- "default": true
37
- },
38
- "skipInstall": {
39
- "description": "Do not install dependency packages.",
40
- "type": "boolean",
41
- "default": false
42
- }
43
- },
44
- "required": ["name"],
45
- "additionalProperties": true
46
- }
@@ -1,12 +0,0 @@
1
- const getJestConfig = require('<%= rootRelativePath %>/jest.config.ut').getJestConfig;
2
-
3
- /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
4
- module.exports = {
5
- ...getJestConfig(__dirname, false),
6
- displayName: require('./package.json').name,
7
- testPathIgnorePatterns: [
8
- '<rootDir>/dist',
9
- '<rootDir>/.*/templates/.*',
10
- '\\.it\\.spec\\.ts$'
11
- ]
12
- };
@@ -1,2 +0,0 @@
1
- export declare const commonModuleContent = "import { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core';\nimport { Action, ActionReducer, StoreModule } from '@ngrx/store';\n\nimport { EffectsModule } from '@ngrx/effects';\nimport { ExampleEffect } from './example.effect';\nimport { exampleReducer } from './example.reducer';\nimport { EXAMPLE_STORE_NAME, ExampleState } from './example.state';\n\n/** Token of the Example reducer */\nexport const EXAMPLE_REDUCER_TOKEN = new InjectionToken<ActionReducer<ExampleState, Action>>('Feature Example Reducer');\n\n/** Provide default reducer for Example store */\nexport function getDefaultExampleReducer() {\n return exampleReducer;\n}\n\n@NgModule({\n imports: [\n StoreModule.forFeature(EXAMPLE_STORE_NAME, EXAMPLE_REDUCER_TOKEN), EffectsModule.forFeature([ExampleEffect])\n],\nproviders: [\n { provide: EXAMPLE_REDUCER_TOKEN, useFactory: getDefaultExampleReducer }\n]\n})\nexport class ExampleStoreModule {\npublic static forRoot<T extends ExampleState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<ExampleStoreModule> {\n return {\n ngModule: ExampleStoreModule,\n providers: [\n { provide: EXAMPLE_REDUCER_TOKEN, useFactory: reducerFactory }\n ]\n };\n }\n}\n\n";
2
- //# sourceMappingURL=example-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"example-module.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/common/mocks/example-module.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,kuCAmC/B,CAAC"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.commonModuleContent = void 0;
4
- exports.commonModuleContent = `import { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core';
5
- import { Action, ActionReducer, StoreModule } from '@ngrx/store';
6
-
7
- import { EffectsModule } from '@ngrx/effects';
8
- import { ExampleEffect } from './example.effect';
9
- import { exampleReducer } from './example.reducer';
10
- import { EXAMPLE_STORE_NAME, ExampleState } from './example.state';
11
-
12
- /** Token of the Example reducer */
13
- export const EXAMPLE_REDUCER_TOKEN = new InjectionToken<ActionReducer<ExampleState, Action>>('Feature Example Reducer');
14
-
15
- /** Provide default reducer for Example store */
16
- export function getDefaultExampleReducer() {
17
- return exampleReducer;
18
- }
19
-
20
- @NgModule({
21
- imports: [
22
- StoreModule.forFeature(EXAMPLE_STORE_NAME, EXAMPLE_REDUCER_TOKEN), EffectsModule.forFeature([ExampleEffect])
23
- ],
24
- providers: [
25
- { provide: EXAMPLE_REDUCER_TOKEN, useFactory: getDefaultExampleReducer }
26
- ]
27
- })
28
- export class ExampleStoreModule {
29
- public static forRoot<T extends ExampleState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<ExampleStoreModule> {
30
- return {
31
- ngModule: ExampleStoreModule,
32
- providers: [
33
- { provide: EXAMPLE_REDUCER_TOKEN, useFactory: reducerFactory }
34
- ]
35
- };
36
- }
37
- }
38
-
39
- `;
40
- //# sourceMappingURL=example-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"example-module.js","sourceRoot":"","sources":["../../../../../schematics/store/common/mocks/example-module.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmClC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const commonIndexContent = "export * from './example.actions';\nexport * from './example.effect';\nexport * from './example.module';\nexport * from './example.reducer';\nexport * from './example.selectors';\nexport * from './example.state';\nexport * from './example.sync';\n";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/common/mocks/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,4PAO9B,CAAC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.commonIndexContent = void 0;
4
- exports.commonIndexContent = `export * from './example.actions';
5
- export * from './example.effect';
6
- export * from './example.module';
7
- export * from './example.reducer';
8
- export * from './example.selectors';
9
- export * from './example.state';
10
- export * from './example.sync';
11
- `;
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/store/common/mocks/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;;;;;;;CAOjC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const asyncEntityActionsContent = "import {\n asyncProps,\n AsyncRequest,\n FromApiActionPayload,\n SetAsyncStoreItemEntitiesActionPayload,\n UpdateAsyncStoreItemEntitiesActionPayloadWithId,\n FailAsyncStoreItemEntitiesActionPayload,\n SetActionPayload,\n UpdateActionPayload\n} from '@o3r/core';\nimport {Example} from '@api/sdk';\nimport { createAction, props } from '@ngrx/store';\nimport {ExampleStateDetails} from './example.state';\n\n/** StateDetailsActions */\nconst ACTION_SET = '[Example] set';\nconst ACTION_UPDATE = '[Example] update';\nconst ACTION_RESET = '[Example] reset';\nconst ACTION_CANCEL_REQUEST = '[Example] cancel request';\n\n/** Entity Actions */\nconst ACTION_CLEAR_ENTITIES = '[Example] clear entities';\nconst ACTION_UPDATE_ENTITIES = '[Example] update entities';\nconst ACTION_UPSERT_ENTITIES = '[Example] upsert entities';\nconst ACTION_SET_ENTITIES = '[Example] set entities';\nconst ACTION_FAIL_ENTITIES = '[Example] fail entities';\n\n/** Async Actions */\nconst ACTION_SET_ENTITIES_FROM_API = '[Example] set entities from api';\nconst ACTION_UPDATE_ENTITIES_FROM_API = '[Example] update entities from api';\nconst ACTION_UPSERT_ENTITIES_FROM_API = '[Example] upsert entities from api';\n\n/** Action to clear the StateDetails of the store and replace it */\nexport const setExample = createAction(ACTION_SET, props<SetActionPayload<ExampleStateDetails>>());\n\n/** Action to change a part or the whole object in the store. */\nexport const updateExample = createAction(ACTION_UPDATE, props<UpdateActionPayload<ExampleStateDetails>>());\n\n/** Action to reset the whole state, by returning it to initial state. */\nexport const resetExample = createAction(ACTION_RESET);\n\n/** Action to cancel a Request ID registered in the store. Can happen from effect based on a switchMap for instance */\nexport const cancelExampleRequest = createAction(ACTION_CANCEL_REQUEST, props<AsyncRequest>());\n\n/** Action to clear all example and fill the store with the payload */\nexport const setExampleEntities = createAction(ACTION_SET_ENTITIES, props<SetAsyncStoreItemEntitiesActionPayload<Example>>());\n\n/** Action to update example with known IDs, ignore the new ones */\nexport const updateExampleEntities = createAction(ACTION_UPDATE_ENTITIES, props<UpdateAsyncStoreItemEntitiesActionPayloadWithId<Example>>());\n\n/** Action to update example with known IDs, insert the new ones */\nexport const upsertExampleEntities = createAction(ACTION_UPSERT_ENTITIES, props<SetAsyncStoreItemEntitiesActionPayload<Example>>());\n\n/** Action to empty the list of entities, keeping the global state */\nexport const clearExampleEntities = createAction(ACTION_CLEAR_ENTITIES);\n\n/** Action to update failureStatus for every Example */\nexport const failExampleEntities = createAction(ACTION_FAIL_ENTITIES, props<FailAsyncStoreItemEntitiesActionPayload<any>>());\n\n/**\n * Action to put the global status of the store in a pending state. Call SET action with the list of Examples received, when this action resolves.\n * If the call fails, dispatch FAIL_ENTITIES action\n */\nexport const setExampleEntitiesFromApi = createAction(ACTION_SET_ENTITIES_FROM_API, asyncProps<FromApiActionPayload<Example[]>>());\n\n/**\n * Action to change isPending status of elements to be updated with a request. Call UPDATE action with the list of Examples received, when this action resolves.\n * If the call fails, dispatch FAIL_ENTITIES action\n */\nexport const updateExampleEntitiesFromApi = createAction(ACTION_UPDATE_ENTITIES_FROM_API, asyncProps<FromApiActionPayload<Example[]> & { ids: string[] }>());\n\n/**\n * Action to put global status of the store in a pending state. Call UPSERT action with the list of Examples received, when this action resolves.\n * If the call fails, dispatch FAIL_ENTITIES action\n */\nexport const upsertExampleEntitiesFromApi = createAction(ACTION_UPSERT_ENTITIES_FROM_API, asyncProps<FromApiActionPayload<Example[]>>());\n\n";
2
- //# sourceMappingURL=example-actions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"example-actions.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/entity-async/mocks/example-actions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,u2HA6ErC,CAAC"}
@@ -1,82 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.asyncEntityActionsContent = void 0;
4
- exports.asyncEntityActionsContent = `import {
5
- asyncProps,
6
- AsyncRequest,
7
- FromApiActionPayload,
8
- SetAsyncStoreItemEntitiesActionPayload,
9
- UpdateAsyncStoreItemEntitiesActionPayloadWithId,
10
- FailAsyncStoreItemEntitiesActionPayload,
11
- SetActionPayload,
12
- UpdateActionPayload
13
- } from '@o3r/core';
14
- import {Example} from '@api/sdk';
15
- import { createAction, props } from '@ngrx/store';
16
- import {ExampleStateDetails} from './example.state';
17
-
18
- /** StateDetailsActions */
19
- const ACTION_SET = '[Example] set';
20
- const ACTION_UPDATE = '[Example] update';
21
- const ACTION_RESET = '[Example] reset';
22
- const ACTION_CANCEL_REQUEST = '[Example] cancel request';
23
-
24
- /** Entity Actions */
25
- const ACTION_CLEAR_ENTITIES = '[Example] clear entities';
26
- const ACTION_UPDATE_ENTITIES = '[Example] update entities';
27
- const ACTION_UPSERT_ENTITIES = '[Example] upsert entities';
28
- const ACTION_SET_ENTITIES = '[Example] set entities';
29
- const ACTION_FAIL_ENTITIES = '[Example] fail entities';
30
-
31
- /** Async Actions */
32
- const ACTION_SET_ENTITIES_FROM_API = '[Example] set entities from api';
33
- const ACTION_UPDATE_ENTITIES_FROM_API = '[Example] update entities from api';
34
- const ACTION_UPSERT_ENTITIES_FROM_API = '[Example] upsert entities from api';
35
-
36
- /** Action to clear the StateDetails of the store and replace it */
37
- export const setExample = createAction(ACTION_SET, props<SetActionPayload<ExampleStateDetails>>());
38
-
39
- /** Action to change a part or the whole object in the store. */
40
- export const updateExample = createAction(ACTION_UPDATE, props<UpdateActionPayload<ExampleStateDetails>>());
41
-
42
- /** Action to reset the whole state, by returning it to initial state. */
43
- export const resetExample = createAction(ACTION_RESET);
44
-
45
- /** Action to cancel a Request ID registered in the store. Can happen from effect based on a switchMap for instance */
46
- export const cancelExampleRequest = createAction(ACTION_CANCEL_REQUEST, props<AsyncRequest>());
47
-
48
- /** Action to clear all example and fill the store with the payload */
49
- export const setExampleEntities = createAction(ACTION_SET_ENTITIES, props<SetAsyncStoreItemEntitiesActionPayload<Example>>());
50
-
51
- /** Action to update example with known IDs, ignore the new ones */
52
- export const updateExampleEntities = createAction(ACTION_UPDATE_ENTITIES, props<UpdateAsyncStoreItemEntitiesActionPayloadWithId<Example>>());
53
-
54
- /** Action to update example with known IDs, insert the new ones */
55
- export const upsertExampleEntities = createAction(ACTION_UPSERT_ENTITIES, props<SetAsyncStoreItemEntitiesActionPayload<Example>>());
56
-
57
- /** Action to empty the list of entities, keeping the global state */
58
- export const clearExampleEntities = createAction(ACTION_CLEAR_ENTITIES);
59
-
60
- /** Action to update failureStatus for every Example */
61
- export const failExampleEntities = createAction(ACTION_FAIL_ENTITIES, props<FailAsyncStoreItemEntitiesActionPayload<any>>());
62
-
63
- /**
64
- * Action to put the global status of the store in a pending state. Call SET action with the list of Examples received, when this action resolves.
65
- * If the call fails, dispatch FAIL_ENTITIES action
66
- */
67
- export const setExampleEntitiesFromApi = createAction(ACTION_SET_ENTITIES_FROM_API, asyncProps<FromApiActionPayload<Example[]>>());
68
-
69
- /**
70
- * Action to change isPending status of elements to be updated with a request. Call UPDATE action with the list of Examples received, when this action resolves.
71
- * If the call fails, dispatch FAIL_ENTITIES action
72
- */
73
- export const updateExampleEntitiesFromApi = createAction(ACTION_UPDATE_ENTITIES_FROM_API, asyncProps<FromApiActionPayload<Example[]> & { ids: string[] }>());
74
-
75
- /**
76
- * Action to put global status of the store in a pending state. Call UPSERT action with the list of Examples received, when this action resolves.
77
- * If the call fails, dispatch FAIL_ENTITIES action
78
- */
79
- export const upsertExampleEntitiesFromApi = createAction(ACTION_UPSERT_ENTITIES_FROM_API, asyncProps<FromApiActionPayload<Example[]>>());
80
-
81
- `;
82
- //# sourceMappingURL=example-actions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"example-actions.js","sourceRoot":"","sources":["../../../../../schematics/store/entity-async/mocks/example-actions.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6ExC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const asyncEntityEffectSpecContent = "import { getTestBed, TestBed } from '@angular/core/testing';\nimport { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';\nimport { provideMockActions } from '@ngrx/effects/testing';\nimport { Store } from '@ngrx/store';\nimport { ReplaySubject, Subject, Subscription } from 'rxjs';\nimport { ExampleEffect } from './example.effect';\n\ndescribe('Example Effects', () => {\n beforeAll(() => getTestBed().platform || TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {teardown:{destroyAfterEach:false}}));\n\n let effect: ExampleEffect;\n let actions: Subject<any>;\n const subscriptions: Subscription[] = [];\n\n const storeValue = new Subject<any>();\n const mockStore = {\n pipe: jasmine.createSpy('select').and.returnValue(storeValue),\n dispatch: jasmine.createSpy('dispatch')\n };\n\n afterEach(() => subscriptions.forEach((subscription) => subscription.unsubscribe()));\n\n beforeEach(async () => {\n actions = new ReplaySubject(1);\n await TestBed.configureTestingModule({\n providers: [\n provideMockActions(() => actions),\n ExampleEffect,\n {provide: Store, useValue: mockStore}\n ]\n }).compileComponents();\n\n effect = TestBed.inject(ExampleEffect);\n });\n\n it('Check if effect is correctly injected', () => {\n expect(effect).toBeDefined();\n });\n});\n\n";
2
- //# sourceMappingURL=example-effect-spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"example-effect-spec.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/entity-async/mocks/example-effect-spec.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,g6CAwCxC,CAAC"}
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.asyncEntityEffectSpecContent = void 0;
4
- exports.asyncEntityEffectSpecContent = `import { getTestBed, TestBed } from '@angular/core/testing';
5
- import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
6
- import { provideMockActions } from '@ngrx/effects/testing';
7
- import { Store } from '@ngrx/store';
8
- import { ReplaySubject, Subject, Subscription } from 'rxjs';
9
- import { ExampleEffect } from './example.effect';
10
-
11
- describe('Example Effects', () => {
12
- beforeAll(() => getTestBed().platform || TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {teardown:{destroyAfterEach:false}}));
13
-
14
- let effect: ExampleEffect;
15
- let actions: Subject<any>;
16
- const subscriptions: Subscription[] = [];
17
-
18
- const storeValue = new Subject<any>();
19
- const mockStore = {
20
- pipe: jasmine.createSpy('select').and.returnValue(storeValue),
21
- dispatch: jasmine.createSpy('dispatch')
22
- };
23
-
24
- afterEach(() => subscriptions.forEach((subscription) => subscription.unsubscribe()));
25
-
26
- beforeEach(async () => {
27
- actions = new ReplaySubject(1);
28
- await TestBed.configureTestingModule({
29
- providers: [
30
- provideMockActions(() => actions),
31
- ExampleEffect,
32
- {provide: Store, useValue: mockStore}
33
- ]
34
- }).compileComponents();
35
-
36
- effect = TestBed.inject(ExampleEffect);
37
- });
38
-
39
- it('Check if effect is correctly injected', () => {
40
- expect(effect).toBeDefined();
41
- });
42
- });
43
-
44
- `;
45
- //# sourceMappingURL=example-effect-spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"example-effect-spec.js","sourceRoot":"","sources":["../../../../../schematics/store/entity-async/mocks/example-effect-spec.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC3C,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const asyncEntityEffectContent = "import {Injectable} from '@angular/core';\nimport {Actions, createEffect, ofType} from '@ngrx/effects';\nimport {from, of} from 'rxjs';\nimport {catchError, map, mergeMap} from 'rxjs/operators';\nimport {fromApiEffectSwitchMap} from '@o3r/core';\nimport {\n cancelExampleRequest,\n failExampleEntities,\n setExampleEntities, setExampleEntitiesFromApi,\n updateExampleEntities, updateExampleEntitiesFromApi,\n upsertExampleEntities, upsertExampleEntitiesFromApi\n} from './example.actions';\n\n/**\n * Service to handle async Example actions\n */\n@Injectable()\nexport class ExampleEffect {\n\n /**\n * Set the entities with the reply content, dispatch failExampleEntities if it catches a failure\n */\n public setEntitiesFromApi$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setExampleEntitiesFromApi),\n fromApiEffectSwitchMap(\n (reply, action) => setExampleEntities({entities: reply, requestId: action.requestId}),\n (error, action) => of(failExampleEntities({error, requestId: action.requestId})),\n cancelExampleRequest\n )\n )\n );\n\n /**\n * Update the entities with the reply content, dispatch failExampleEntities if it catches a failure\n */\n public updateEntitiesFromApi$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateExampleEntitiesFromApi),\n mergeMap((payload) =>\n from(payload.call).pipe(\n map((reply) => updateExampleEntities({entities: reply, requestId: payload.requestId})),\n catchError((err) => of(failExampleEntities({ids: payload.ids, error: err, requestId: payload.requestId})))\n )\n )\n )\n );\n\n /**\n * Upsert the entities with the reply content, dispatch failExampleEntities if it catches a failure\n */\n public upsertEntitiesFromApi$ = createEffect(() =>\n this.actions$.pipe(\n ofType(upsertExampleEntitiesFromApi),\n mergeMap((payload) =>\n from(payload.call).pipe(\n map((reply) => upsertExampleEntities({entities: reply, requestId: payload.requestId})),\n catchError((err) => of(failExampleEntities({error: err, requestId: payload.requestId})))\n )\n )\n )\n );\n\n constructor(protected actions$: Actions) {\n }\n}\n\n";
2
- //# sourceMappingURL=example-effect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"example-effect.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/entity-async/mocks/example-effect.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,ktEAmEpC,CAAC"}
@@ -1,72 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.asyncEntityEffectContent = void 0;
4
- exports.asyncEntityEffectContent = `import {Injectable} from '@angular/core';
5
- import {Actions, createEffect, ofType} from '@ngrx/effects';
6
- import {from, of} from 'rxjs';
7
- import {catchError, map, mergeMap} from 'rxjs/operators';
8
- import {fromApiEffectSwitchMap} from '@o3r/core';
9
- import {
10
- cancelExampleRequest,
11
- failExampleEntities,
12
- setExampleEntities, setExampleEntitiesFromApi,
13
- updateExampleEntities, updateExampleEntitiesFromApi,
14
- upsertExampleEntities, upsertExampleEntitiesFromApi
15
- } from './example.actions';
16
-
17
- /**
18
- * Service to handle async Example actions
19
- */
20
- @Injectable()
21
- export class ExampleEffect {
22
-
23
- /**
24
- * Set the entities with the reply content, dispatch failExampleEntities if it catches a failure
25
- */
26
- public setEntitiesFromApi$ = createEffect(() =>
27
- this.actions$.pipe(
28
- ofType(setExampleEntitiesFromApi),
29
- fromApiEffectSwitchMap(
30
- (reply, action) => setExampleEntities({entities: reply, requestId: action.requestId}),
31
- (error, action) => of(failExampleEntities({error, requestId: action.requestId})),
32
- cancelExampleRequest
33
- )
34
- )
35
- );
36
-
37
- /**
38
- * Update the entities with the reply content, dispatch failExampleEntities if it catches a failure
39
- */
40
- public updateEntitiesFromApi$ = createEffect(() =>
41
- this.actions$.pipe(
42
- ofType(updateExampleEntitiesFromApi),
43
- mergeMap((payload) =>
44
- from(payload.call).pipe(
45
- map((reply) => updateExampleEntities({entities: reply, requestId: payload.requestId})),
46
- catchError((err) => of(failExampleEntities({ids: payload.ids, error: err, requestId: payload.requestId})))
47
- )
48
- )
49
- )
50
- );
51
-
52
- /**
53
- * Upsert the entities with the reply content, dispatch failExampleEntities if it catches a failure
54
- */
55
- public upsertEntitiesFromApi$ = createEffect(() =>
56
- this.actions$.pipe(
57
- ofType(upsertExampleEntitiesFromApi),
58
- mergeMap((payload) =>
59
- from(payload.call).pipe(
60
- map((reply) => upsertExampleEntities({entities: reply, requestId: payload.requestId})),
61
- catchError((err) => of(failExampleEntities({error: err, requestId: payload.requestId})))
62
- )
63
- )
64
- )
65
- );
66
-
67
- constructor(protected actions$: Actions) {
68
- }
69
- }
70
-
71
- `;
72
- //# sourceMappingURL=example-effect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"example-effect.js","sourceRoot":"","sources":["../../../../../schematics/store/entity-async/mocks/example-effect.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEvC,CAAC"}