ddd-ts-kit 0.83.4 → 0.84.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 (301) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.fr.md +28 -25
  3. package/README.md +27 -24
  4. package/dist/check/authz/is-in-project.d.ts +4 -0
  5. package/dist/check/authz/is-in-project.d.ts.map +1 -0
  6. package/dist/check/authz/is-in-project.js +5 -0
  7. package/dist/check/authz/is-in-project.js.map +1 -0
  8. package/dist/check/authz/signed-in-grants.d.ts +1 -1
  9. package/dist/check/authz/signed-in-grants.d.ts.map +1 -1
  10. package/dist/check/authz/signed-in-grants.js +4 -2
  11. package/dist/check/authz/signed-in-grants.js.map +1 -1
  12. package/dist/check/explain/authz-docs.js +5 -5
  13. package/dist/check/explain/authz-docs.js.map +1 -1
  14. package/dist/check/explain/events-docs.js +1 -1
  15. package/dist/check/explain/standard-docs.js +1 -1
  16. package/dist/check/fixtures/authz-granted-fixtures.js +4 -4
  17. package/dist/check/fixtures/authz-granted-fixtures.js.map +1 -1
  18. package/dist/check/fixtures/authz-scope-narrows-fixtures.js +2 -2
  19. package/dist/check/fixtures/authz-scope-narrows-fixtures.js.map +1 -1
  20. package/dist/check/fixtures/paths.d.ts +1 -1
  21. package/dist/check/fixtures/paths.d.ts.map +1 -1
  22. package/dist/check/fixtures/paths.js +1 -1
  23. package/dist/check/fixtures/paths.js.map +1 -1
  24. package/dist/check/fixtures/tracing-fixtures.js +3 -3
  25. package/dist/check/fixtures/tracing-fixtures.js.map +1 -1
  26. package/dist/check/fixtures/tree-fixtures.js +1 -1
  27. package/dist/check/fixtures/tree-fixtures.js.map +1 -1
  28. package/dist/check/fixtures/vocabulary-fixtures.js +2 -2
  29. package/dist/check/fixtures/vocabulary-fixtures.js.map +1 -1
  30. package/dist/check/rules/authz-granted.d.ts.map +1 -1
  31. package/dist/check/rules/authz-granted.js +4 -1
  32. package/dist/check/rules/authz-granted.js.map +1 -1
  33. package/dist/check/rules/authz-scope-narrows.d.ts.map +1 -1
  34. package/dist/check/rules/authz-scope-narrows.js +3 -1
  35. package/dist/check/rules/authz-scope-narrows.js.map +1 -1
  36. package/dist/check/rules/events-outbox-required.d.ts.map +1 -1
  37. package/dist/check/rules/events-outbox-required.js +4 -2
  38. package/dist/check/rules/events-outbox-required.js.map +1 -1
  39. package/dist/commands/doctor.d.ts.map +1 -1
  40. package/dist/commands/doctor.js +3 -1
  41. package/dist/commands/doctor.js.map +1 -1
  42. package/dist/commands/generate.d.ts.map +1 -1
  43. package/dist/commands/generate.js +2 -0
  44. package/dist/commands/generate.js.map +1 -1
  45. package/dist/commands/platform-folders.d.ts +4 -0
  46. package/dist/commands/platform-folders.d.ts.map +1 -0
  47. package/dist/commands/platform-folders.js +43 -0
  48. package/dist/commands/platform-folders.js.map +1 -0
  49. package/dist/controllers/finish-migration.d.ts.map +1 -1
  50. package/dist/controllers/finish-migration.js +7 -3
  51. package/dist/controllers/finish-migration.js.map +1 -1
  52. package/dist/depcruise/hygiene-rules.js +1 -1
  53. package/dist/depcruise/hygiene-rules.js.map +1 -1
  54. package/dist/doctor/diagnose.d.ts +2 -1
  55. package/dist/doctor/diagnose.d.ts.map +1 -1
  56. package/dist/doctor/diagnose.js +10 -2
  57. package/dist/doctor/diagnose.js.map +1 -1
  58. package/dist/doctor/doctor-finding.d.ts +3 -3
  59. package/dist/doctor/doctor-finding.d.ts.map +1 -1
  60. package/dist/doctor/folder-findings.d.ts +5 -0
  61. package/dist/doctor/folder-findings.d.ts.map +1 -0
  62. package/dist/doctor/folder-findings.js +19 -0
  63. package/dist/doctor/folder-findings.js.map +1 -0
  64. package/dist/doctor/format-diagnosis.js +9 -1
  65. package/dist/doctor/format-diagnosis.js.map +1 -1
  66. package/dist/doctor/script-findings.d.ts +2 -2
  67. package/dist/doctor/script-findings.d.ts.map +1 -1
  68. package/dist/doctor/script-findings.js +3 -3
  69. package/dist/doctor/script-findings.js.map +1 -1
  70. package/dist/generate/grant-permission.d.ts.map +1 -1
  71. package/dist/generate/grant-permission.js +3 -2
  72. package/dist/generate/grant-permission.js.map +1 -1
  73. package/dist/generate/kinds/gateway-kind.d.ts.map +1 -1
  74. package/dist/generate/kinds/gateway-kind.js +2 -1
  75. package/dist/generate/kinds/gateway-kind.js.map +1 -1
  76. package/dist/generate/kinds/job/grant-system-actor.d.ts.map +1 -1
  77. package/dist/generate/kinds/job/grant-system-actor.js +5 -6
  78. package/dist/generate/kinds/job/grant-system-actor.js.map +1 -1
  79. package/dist/generate/kinds/job-kind.d.ts.map +1 -1
  80. package/dist/generate/kinds/job-kind.js +2 -1
  81. package/dist/generate/kinds/job-kind.js.map +1 -1
  82. package/dist/generate/kinds/plan-vars.d.ts +6 -2
  83. package/dist/generate/kinds/plan-vars.d.ts.map +1 -1
  84. package/dist/generate/kinds/plan-vars.js +7 -3
  85. package/dist/generate/kinds/plan-vars.js.map +1 -1
  86. package/dist/generate/kinds/policy-kind.d.ts.map +1 -1
  87. package/dist/generate/kinds/policy-kind.js +2 -1
  88. package/dist/generate/kinds/policy-kind.js.map +1 -1
  89. package/dist/generate/kinds/wire-context.d.ts.map +1 -1
  90. package/dist/generate/kinds/wire-context.js +6 -4
  91. package/dist/generate/kinds/wire-context.js.map +1 -1
  92. package/dist/generate/kinds/write-context-files.d.ts.map +1 -1
  93. package/dist/generate/kinds/write-context-files.js +2 -1
  94. package/dist/generate/kinds/write-context-files.js.map +1 -1
  95. package/dist/generate/platform-path.d.ts +5 -0
  96. package/dist/generate/platform-path.d.ts.map +1 -0
  97. package/dist/generate/platform-path.js +6 -0
  98. package/dist/generate/platform-path.js.map +1 -0
  99. package/dist/generate/shared-writes.js +8 -8
  100. package/dist/generate/shared-writes.js.map +1 -1
  101. package/dist/generate/vocabulary/declare-role.d.ts +1 -1
  102. package/dist/generate/vocabulary/declare-role.d.ts.map +1 -1
  103. package/dist/generate/vocabulary/declare-role.js +3 -2
  104. package/dist/generate/vocabulary/declare-role.js.map +1 -1
  105. package/dist/generate/wirings.d.ts.map +1 -1
  106. package/dist/generate/wirings.js +4 -3
  107. package/dist/generate/wirings.js.map +1 -1
  108. package/dist/help/notes.d.ts +1 -1
  109. package/dist/help/notes.d.ts.map +1 -1
  110. package/dist/help/notes.js +9 -0
  111. package/dist/help/notes.js.map +1 -1
  112. package/dist/help/usage.d.ts +1 -1
  113. package/dist/help/usage.d.ts.map +1 -1
  114. package/dist/help/usage.js +1 -0
  115. package/dist/help/usage.js.map +1 -1
  116. package/dist/init/files/audit-files.d.ts.map +1 -1
  117. package/dist/init/files/audit-files.js +9 -2
  118. package/dist/init/files/audit-files.js.map +1 -1
  119. package/dist/init/files/auth-files.d.ts.map +1 -1
  120. package/dist/init/files/auth-files.js +31 -22
  121. package/dist/init/files/auth-files.js.map +1 -1
  122. package/dist/init/files/platform-files.js +10 -6
  123. package/dist/init/files/platform-files.js.map +1 -1
  124. package/dist/init/manifest/scripts-for.d.ts +2 -2
  125. package/dist/init/manifest/scripts-for.d.ts.map +1 -1
  126. package/dist/init/manifest/scripts-for.js +7 -7
  127. package/dist/init/manifest/scripts-for.js.map +1 -1
  128. package/dist/init/manifest/versions.js +24 -24
  129. package/dist/init/manifest/write-manifest.d.ts.map +1 -1
  130. package/dist/init/manifest/write-manifest.js +3 -1
  131. package/dist/init/manifest/write-manifest.js.map +1 -1
  132. package/dist/init/run-init.d.ts.map +1 -1
  133. package/dist/init/run-init.js +13 -4
  134. package/dist/init/run-init.js.map +1 -1
  135. package/dist/platform-folders/flat-files.d.ts +3 -0
  136. package/dist/platform-folders/flat-files.d.ts.map +1 -0
  137. package/dist/platform-folders/flat-files.js +4 -0
  138. package/dist/platform-folders/flat-files.js.map +1 -0
  139. package/dist/platform-folders/flat-relocation.d.ts +10 -0
  140. package/dist/platform-folders/flat-relocation.d.ts.map +1 -0
  141. package/dist/platform-folders/flat-relocation.js +18 -0
  142. package/dist/platform-folders/flat-relocation.js.map +1 -0
  143. package/dist/platform-folders/folder-move.d.ts +6 -0
  144. package/dist/platform-folders/folder-move.d.ts.map +1 -0
  145. package/dist/platform-folders/folder-move.js +2 -0
  146. package/dist/platform-folders/folder-move.js.map +1 -0
  147. package/dist/platform-folders/index.d.ts +6 -0
  148. package/dist/platform-folders/index.d.ts.map +1 -0
  149. package/dist/platform-folders/index.js +5 -0
  150. package/dist/platform-folders/index.js.map +1 -0
  151. package/dist/platform-folders/keep-flat-platform.d.ts +9 -0
  152. package/dist/platform-folders/keep-flat-platform.d.ts.map +1 -0
  153. package/dist/platform-folders/keep-flat-platform.js +14 -0
  154. package/dist/platform-folders/keep-flat-platform.js.map +1 -0
  155. package/dist/platform-folders/moved-specifier.d.ts +14 -0
  156. package/dist/platform-folders/moved-specifier.d.ts.map +1 -0
  157. package/dist/platform-folders/moved-specifier.js +38 -0
  158. package/dist/platform-folders/moved-specifier.js.map +1 -0
  159. package/dist/platform-folders/placements.d.ts +8 -0
  160. package/dist/platform-folders/placements.d.ts.map +1 -0
  161. package/dist/platform-folders/placements.js +25 -0
  162. package/dist/platform-folders/placements.js.map +1 -0
  163. package/dist/platform-folders/platform-folder-names.d.ts +3 -0
  164. package/dist/platform-folders/platform-folder-names.d.ts.map +1 -0
  165. package/dist/platform-folders/platform-folder-names.js +7 -0
  166. package/dist/platform-folders/platform-folder-names.js.map +1 -0
  167. package/dist/platform-folders/platform-folders.d.ts +27 -0
  168. package/dist/platform-folders/platform-folders.d.ts.map +1 -0
  169. package/dist/platform-folders/platform-folders.js +53 -0
  170. package/dist/platform-folders/platform-folders.js.map +1 -0
  171. package/dist/platform-folders/platform-moves.d.ts +9 -0
  172. package/dist/platform-folders/platform-moves.d.ts.map +1 -0
  173. package/dist/platform-folders/platform-moves.js +16 -0
  174. package/dist/platform-folders/platform-moves.js.map +1 -0
  175. package/dist/platform-folders/unknown-flat-files.d.ts +5 -0
  176. package/dist/platform-folders/unknown-flat-files.d.ts.map +1 -0
  177. package/dist/platform-folders/unknown-flat-files.js +14 -0
  178. package/dist/platform-folders/unknown-flat-files.js.map +1 -0
  179. package/dist/platform-folders/with-moved-imports.d.ts +7 -0
  180. package/dist/platform-folders/with-moved-imports.d.ts.map +1 -0
  181. package/dist/platform-folders/with-moved-imports.js +14 -0
  182. package/dist/platform-folders/with-moved-imports.js.map +1 -0
  183. package/dist/platform-layout/index.d.ts +5 -0
  184. package/dist/platform-layout/index.d.ts.map +1 -0
  185. package/dist/platform-layout/index.js +4 -0
  186. package/dist/platform-layout/index.js.map +1 -0
  187. package/dist/platform-layout/platform-file-in.d.ts +9 -0
  188. package/dist/platform-layout/platform-file-in.d.ts.map +1 -0
  189. package/dist/platform-layout/platform-file-in.js +18 -0
  190. package/dist/platform-layout/platform-file-in.js.map +1 -0
  191. package/dist/platform-layout/platform-file-paths.d.ts +5 -0
  192. package/dist/platform-layout/platform-file-paths.d.ts.map +1 -0
  193. package/dist/platform-layout/platform-file-paths.js +9 -0
  194. package/dist/platform-layout/platform-file-paths.js.map +1 -0
  195. package/dist/platform-layout/platform-file.d.ts +6 -0
  196. package/dist/platform-layout/platform-file.d.ts.map +1 -0
  197. package/dist/platform-layout/platform-file.js +2 -0
  198. package/dist/platform-layout/platform-file.js.map +1 -0
  199. package/dist/platform-layout/platform-layout.d.ts +57 -0
  200. package/dist/platform-layout/platform-layout.d.ts.map +1 -0
  201. package/dist/platform-layout/platform-layout.js +61 -0
  202. package/dist/platform-layout/platform-layout.js.map +1 -0
  203. package/dist/presets/grant-to-signed-in.d.ts.map +1 -1
  204. package/dist/presets/grant-to-signed-in.js +3 -3
  205. package/dist/presets/grant-to-signed-in.js.map +1 -1
  206. package/dist/presets/organisations-as-tenants.d.ts.map +1 -1
  207. package/dist/presets/organisations-as-tenants.js +2 -1
  208. package/dist/presets/organisations-as-tenants.js.map +1 -1
  209. package/dist/refusals/project-sources.d.ts +2 -2
  210. package/dist/refusals/project-sources.d.ts.map +1 -1
  211. package/dist/refusals/project-sources.js +3 -3
  212. package/dist/refusals/project-sources.js.map +1 -1
  213. package/dist/run.d.ts.map +1 -1
  214. package/dist/run.js +2 -0
  215. package/dist/run.js.map +1 -1
  216. package/dist/version.d.ts +1 -1
  217. package/dist/version.js +1 -1
  218. package/dist/workspace/workspace.d.ts +7 -0
  219. package/dist/workspace/workspace.d.ts.map +1 -1
  220. package/dist/workspace/workspace.js +13 -2
  221. package/dist/workspace/workspace.js.map +1 -1
  222. package/package.json +2 -2
  223. package/templates/architecture/extractable.declared.spec.ts.tpl +1 -1
  224. package/templates/architecture/extractable.manual.spec.ts.tpl +2 -2
  225. package/templates/architecture/extractable.tsyringe.spec.ts.tpl +1 -1
  226. package/templates/background-job/background-job.spec.ts.tpl +1 -1
  227. package/templates/command/handler.spec.tsyringe.ts.tpl +1 -1
  228. package/templates/context/module.manual.ts.tpl +1 -1
  229. package/templates/init/README.md.tpl +9 -9
  230. package/templates/init/docker/env.example.tpl +1 -1
  231. package/templates/init/e2e/create-credentials.none.ts.tpl +2 -2
  232. package/templates/init/e2e/start-application.database.ts.tpl +2 -2
  233. package/templates/init/e2e/start-application.memory.ts.tpl +2 -2
  234. package/templates/init/main.ts.tpl +5 -5
  235. package/templates/init/platform/audit/audit.module.manual.ts.tpl +6 -6
  236. package/templates/init/platform/audit/audit.module.tsyringe.ts.tpl +2 -2
  237. package/templates/init/platform/audit/create-audit.ts.tpl +1 -1
  238. package/templates/init/platform/audit/{search-audit-entries.controller.ts.tpl → search-audit-entries/search-audit-entries.controller.ts.tpl} +1 -1
  239. package/templates/init/platform/audit/{search-audit-entries.handler.ts.tpl → search-audit-entries/search-audit-entries.handler.ts.tpl} +1 -1
  240. package/templates/init/platform/audit/{search-audit-entries.route.ts.tpl → search-audit-entries/search-audit-entries.route.ts.tpl} +1 -1
  241. package/templates/init/platform/auth/{attribute-policies.ts.tpl → attributes/attribute-policies.ts.tpl} +1 -1
  242. package/templates/init/platform/auth/{create-authenticator.none.ts.tpl → authentication/create-authenticator.none.ts.tpl} +1 -1
  243. package/templates/init/platform/auth/{http-boundary.ts.tpl → authentication/http-boundary.ts.tpl} +1 -1
  244. package/templates/init/platform/auth/{principal-of.none.ts.tpl → authentication/principal-of.none.ts.tpl} +1 -1
  245. package/templates/init/platform/auth/{security-schemes.none.ts.tpl → authentication/security-schemes.none.ts.tpl} +1 -1
  246. package/templates/init/platform/auth/{authorization.tsyringe.ts.tpl → authorization/authorization.tsyringe.ts.tpl} +2 -2
  247. package/templates/init/platform/auth/{create-authorizer.abac.ts.tpl → authorization/create-authorizer.abac.ts.tpl} +1 -1
  248. package/templates/init/platform/auth/{create-authorizer.custom.ts.tpl → authorization/create-authorizer.custom.ts.tpl} +2 -2
  249. package/templates/init/platform/auth/{create-authorizer.rbac.ts.tpl → authorization/create-authorizer.rbac.ts.tpl} +2 -2
  250. package/templates/init/platform/auth/{create-authorizer.rebac.ts.tpl → authorization/create-authorizer.rebac.ts.tpl} +3 -3
  251. package/templates/init/platform/auth/{custom-authorizer.contract.spec.ts.tpl → custom/custom-authorizer.contract.spec.ts.tpl} +1 -1
  252. package/templates/init/platform/auth/{create-tuple-store.contract.spec.ts.tpl → relationships/create-tuple-store.contract.spec.ts.tpl} +1 -1
  253. package/templates/init/platform/auth/{permission-mapping.ts.tpl → relationships/permission-mapping.ts.tpl} +1 -1
  254. package/templates/init/platform/auth/{relate-system-actors.ts.tpl → relationships/relate-system-actors.ts.tpl} +1 -1
  255. package/templates/init/platform/auth/{relation-tuples.ts.tpl → relationships/relation-tuples.ts.tpl} +2 -2
  256. package/templates/init/platform/auth/{roles.ts.tpl → roles/roles.ts.tpl} +1 -1
  257. package/templates/init/platform/buses/create-command-bus.ts.tpl +1 -1
  258. package/templates/init/platform/buses/create-query-bus.ts.tpl +1 -1
  259. package/templates/init/platform/{compose-application.manual.ts.tpl → composition/compose-application.manual.ts.tpl} +4 -4
  260. package/templates/init/platform/{compose-application.tsyringe.ts.tpl → composition/compose-application.tsyringe.ts.tpl} +8 -8
  261. package/templates/init/platform/{create-platform.manual.ts.tpl → composition/create-platform.manual.ts.tpl} +5 -5
  262. package/templates/init/platform/{lay-foundations.tsyringe.ts.tpl → composition/lay-foundations.tsyringe.ts.tpl} +1 -1
  263. package/templates/init/platform/{platform.manual.ts.tpl → composition/platform.manual.ts.tpl} +1 -1
  264. package/templates/init/platform/http/create-app-module.ts.tpl +1 -1
  265. package/templates/init/platform/http/start-http-server.express.ts.tpl +1 -1
  266. package/templates/init/platform/http/start-http-server.fastify.ts.tpl +1 -1
  267. package/templates/init/platform/http/start-http-server.hono.ts.tpl +1 -1
  268. package/templates/init/platform/http/start-http-server.nest.ts.tpl +1 -1
  269. package/templates/init/platform/http/with-documentation.ts.tpl +1 -1
  270. package/templates/init/rules/platform.md.tpl +7 -6
  271. package/templates/init/scripts/openapi.ts.tpl +3 -3
  272. package/templates/job/job.spec.tsyringe.ts.tpl +1 -1
  273. package/templates/pipeline/package-scripts.json +1 -1
  274. package/templates/presets/identity/context/test/worlds/__context__.world.ts.tpl +1 -1
  275. package/templates/process/timeout-job.spec.ts.tpl +1 -1
  276. package/templates/query/handler.spec.tsyringe.ts.tpl +1 -1
  277. package/templates/query/search.handler.spec.tsyringe.ts.tpl +1 -1
  278. package/templates/service/main.ts.tpl +5 -5
  279. package/templates/test-world/world.tsyringe.ts.tpl +1 -1
  280. package/templates/worker/main.ts.tpl +5 -5
  281. /package/templates/init/platform/audit/{search-audit-entries.query.ts.tpl → search-audit-entries/search-audit-entries.query.ts.tpl} +0 -0
  282. /package/templates/init/platform/auth/{create-authenticator.jwt.ts.tpl → authentication/create-authenticator.jwt.ts.tpl} +0 -0
  283. /package/templates/init/platform/auth/{create-authenticator.keycloak.ts.tpl → authentication/create-authenticator.keycloak.ts.tpl} +0 -0
  284. /package/templates/init/platform/auth/{development-actor-header.ts.tpl → authentication/development-actor-header.ts.tpl} +0 -0
  285. /package/templates/init/platform/auth/{development-header-authenticator.ts.tpl → authentication/development-header-authenticator.ts.tpl} +0 -0
  286. /package/templates/init/platform/auth/{offline-authenticator.ts.tpl → authentication/offline-authenticator.ts.tpl} +0 -0
  287. /package/templates/init/platform/auth/{principal-of.tokens.ts.tpl → authentication/principal-of.tokens.ts.tpl} +0 -0
  288. /package/templates/init/platform/auth/{security-schemes.tokens.ts.tpl → authentication/security-schemes.tokens.ts.tpl} +0 -0
  289. /package/templates/init/platform/auth/{access-policies.ts.tpl → authorization/access-policies.ts.tpl} +0 -0
  290. /package/templates/init/platform/auth/{log-decisions.ts.tpl → authorization/log-decisions.ts.tpl} +0 -0
  291. /package/templates/init/platform/auth/{permissions.ts.tpl → authorization/permissions.ts.tpl} +0 -0
  292. /package/templates/init/platform/auth/{role.ts.tpl → authorization/role.ts.tpl} +0 -0
  293. /package/templates/init/platform/auth/{use-case-protection.ts.tpl → authorization/use-case-protection.ts.tpl} +0 -0
  294. /package/templates/init/platform/auth/{custom-authorizer.ts.tpl → custom/custom-authorizer.ts.tpl} +0 -0
  295. /package/templates/init/platform/auth/{create-tuple-store.ts.tpl → relationships/create-tuple-store.ts.tpl} +0 -0
  296. /package/templates/init/platform/auth/{relationship-schema.ts.tpl → relationships/relationship-schema.ts.tpl} +0 -0
  297. /package/templates/init/platform/{platform-test.module.tsyringe.ts.tpl → composition/platform-test.module.tsyringe.ts.tpl} +0 -0
  298. /package/templates/init/platform/{platform.module.tsyringe.ts.tpl → composition/platform.module.tsyringe.ts.tpl} +0 -0
  299. /package/templates/init/platform/{job-settings.ts.tpl → jobs/job-settings.ts.tpl} +0 -0
  300. /package/templates/init/platform/{errors.ts.tpl → observability/errors.ts.tpl} +0 -0
  301. /package/templates/init/platform/{tracing.ts.tpl → observability/tracing.ts.tpl} +0 -0
@@ -0,0 +1,38 @@
1
+ import path from 'node:path';
2
+ const SUFFIX = /\.(?:js|ts)$/;
3
+ /**
4
+ * The specifier written in `file` once the files moved, or nothing when it names the same file
5
+ * as before: an alias names the new path of a moved file, a relative path is recomputed from
6
+ * where the importing file is now. The extension, or its absence, stays as it was written.
7
+ */
8
+ export function movedSpecifier(specifier, file, relocation) {
9
+ const suffix = SUFFIX.exec(specifier)?.[0] ?? '';
10
+ const bare = specifier.slice(0, specifier.length - suffix.length);
11
+ if (bare.startsWith('.')) {
12
+ const relative = relativeSpecifier(bare, file, relocation.moved);
13
+ return relative === undefined ? undefined : `${relative}${suffix}`;
14
+ }
15
+ const root = relocation.roots.find(({ prefix }) => bare.startsWith(prefix));
16
+ const target = root === undefined ? undefined : `${root.directory}/${bare.slice(root.prefix.length)}`;
17
+ const moved = target === undefined ? undefined : relocation.moved.get(target);
18
+ return root === undefined || moved === undefined
19
+ ? undefined
20
+ : `${root.prefix}${moved.slice(root.directory.length + 1)}${suffix}`;
21
+ }
22
+ /** A directory written with its slash keeps it; `.`, the directory of the file itself, moves with it. */
23
+ function relativeSpecifier(bare, file, moved) {
24
+ if (bare === '.' || bare === './') {
25
+ return undefined;
26
+ }
27
+ const importing = file.replace(SUFFIX, '');
28
+ const target = path.posix.join(path.posix.dirname(importing), bare);
29
+ const from = moved.get(importing) ?? importing;
30
+ const to = moved.get(target) ?? target;
31
+ if (from === importing && to === target) {
32
+ return undefined;
33
+ }
34
+ const relative = path.posix.relative(path.posix.dirname(from), to);
35
+ const slash = bare.endsWith('/') ? '/' : '';
36
+ return `${relative.startsWith('.') ? relative : `./${relative}`}${slash}`;
37
+ }
38
+ //# sourceMappingURL=moved-specifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moved-specifier.js","sourceRoot":"","sources":["../../src/platform-folders/moved-specifier.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,MAAM,MAAM,GAAG,cAAc,CAAC;AAS9B;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB,EAAE,IAAY,EAAE,UAAsB;IACpF,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACjD,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,SAA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AAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC;IAC/C,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC;IAEvC,IAAI,IAAI,KAAK,SAAS,IAAI,EAAE,KAAK,MAAM,EAAE,CAAC;QACxC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IACnE,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAE5C,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,GAAG,KAAK,EAAE,CAAC;AAC5E,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Config } from '../config/index.js';
2
+ import type { Workspace } from '../workspace/index.js';
3
+ /**
4
+ * The folder of each file of the team, from `--place <file>=<folder>`, both by their path from the
5
+ * platform: a file the kit did not write, and a folder the kit gives files or one the platform has.
6
+ */
7
+ export declare function placements(values: readonly string[], ws: Workspace, config: Config): Map<string, string>;
8
+ //# sourceMappingURL=placements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placements.d.ts","sourceRoot":"","sources":["../../src/platform-folders/placements.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIvD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAExG"}
@@ -0,0 +1,25 @@
1
+ import { CliError } from '../cli-error.js';
2
+ import { FLAT_FILES } from './flat-files.js';
3
+ import { PLATFORM_FOLDER_NAMES } from './platform-folder-names.js';
4
+ /**
5
+ * The folder of each file of the team, from `--place <file>=<folder>`, both by their path from the
6
+ * platform: a file the kit did not write, and a folder the kit gives files or one the platform has.
7
+ */
8
+ export function placements(values, ws, config) {
9
+ return new Map(values.map((value) => placement(value, ws, config)));
10
+ }
11
+ function placement(value, ws, config) {
12
+ const [file = '', folder = '', ...rest] = value.split('=');
13
+ const folders = [...PLATFORM_FOLDER_NAMES, ...ws.directories(config.platformDir)];
14
+ if (rest.length > 0 || file === '' || !folders.includes(folder)) {
15
+ throw new CliError(`--place ${value} names no folder of the platform.`, `Write --place <file>=<folder>, both from ${config.platformDir}/ and the folder one of ${[...new Set(folders)].join(', ')}: --place auth/role-grants.ts=auth/roles.`);
16
+ }
17
+ if (FLAT_FILES.has(file)) {
18
+ throw new CliError(`--place ${value} names a file the kit writes, which has its folder already.`, 'Leave it out: the command takes it to its folder on its own.');
19
+ }
20
+ if (!ws.exists(`${config.platformDir}/${file}`)) {
21
+ throw new CliError(`--place ${value} names ${config.platformDir}/${file}, which does not exist.`, `Name the file by its path from ${config.platformDir}/, as the command listed it.`);
22
+ }
23
+ return [file, folder];
24
+ }
25
+ //# sourceMappingURL=placements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placements.js","sourceRoot":"","sources":["../../src/platform-folders/placements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAA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AE,CAAC;QAChD,MAAM,IAAI,QAAQ,CAChB,WAAW,KAAK,UAAU,MAAM,CAAC,WAAW,IAAI,IAAI,yBAAyB,EAC7E,kCAAkC,MAAM,CAAC,WAAW,8BAA8B,CACnF,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACxB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** The folders of the platform the kit gives a file, by their path from the platform. */
2
+ export declare const PLATFORM_FOLDER_NAMES: readonly string[];
3
+ //# sourceMappingURL=platform-folder-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-folder-names.d.ts","sourceRoot":"","sources":["../../src/platform-folders/platform-folder-names.ts"],"names":[],"mappings":"AAGA,yFAAyF;AACzF,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAElD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import path from 'node:path';
2
+ import { PLATFORM_LAYOUT } from '../platform-layout/index.js';
3
+ /** The folders of the platform the kit gives a file, by their path from the platform. */
4
+ export const PLATFORM_FOLDER_NAMES = [
5
+ ...new Set(PLATFORM_LAYOUT.flatMap(({ files }) => Object.values(files).map((file) => path.posix.dirname(file)))),
6
+ ];
7
+ //# sourceMappingURL=platform-folder-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-folder-names.js","sourceRoot":"","sources":["../../src/platform-folders/platform-folder-names.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,yFAAyF;AACzF,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACjH,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { Config } from '../config/index.js';
2
+ import type { MigrationDraft } from '../refusals/migration-draft.js';
3
+ import type { Workspace } from '../workspace/index.js';
4
+ import type { FolderMove } from './folder-move.js';
5
+ /** What taking the files of the platform to their folders changed. */
6
+ export interface PlatformFolders {
7
+ readonly moved: readonly FolderMove[];
8
+ /** The files whose imports now name the new paths, moved ones included. */
9
+ readonly rewritten: readonly string[];
10
+ }
11
+ interface Tree {
12
+ readonly ws: Workspace;
13
+ readonly config: Config;
14
+ /** The folder of each file of the team, both by their path from the platform. */
15
+ readonly placed?: ReadonlyMap<string, string>;
16
+ }
17
+ /**
18
+ * Takes the files a project generated before the folders of the platform to the folder of what
19
+ * each answers (`composition/`, `observability/`, `jobs/`, `auth/authentication/`,
20
+ * `auth/authorization/`, the folder of the model, `audit/search-audit-entries/`), rewrites every
21
+ * import of them under the source root, `test/` and `scripts/`, and the paths the scripts of
22
+ * package.json name. A file the kit did not write in a directory that holds folders only stays
23
+ * where it is, said in `draft.manual`, unless `placed` gives it a folder.
24
+ */
25
+ export declare function platformFolders(tree: Tree, draft: MigrationDraft): PlatformFolders;
26
+ export {};
27
+ //# sourceMappingURL=platform-folders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-folders.d.ts","sourceRoot":"","sources":["../../src/platform-folders/platform-folders.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAOnD,sEAAsE;AACtE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IACtC,2EAA2E;IAC3E,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED,UAAU,IAAI;IACZ,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,iFAAiF;IACjF,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/C;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,GAAG,eAAe,CAoClF"}
@@ -0,0 +1,53 @@
1
+ import { aliasRoots } from '../alias/index.js';
2
+ import { projectSources } from '../refusals/project-sources.js';
3
+ import { platformMoves } from './platform-moves.js';
4
+ import { unknownFlatFiles } from './unknown-flat-files.js';
5
+ import { withMovedImports } from './with-moved-imports.js';
6
+ const EXTENSION = /\.(?:ts|js)$/;
7
+ /**
8
+ * Takes the files a project generated before the folders of the platform to the folder of what
9
+ * each answers (`composition/`, `observability/`, `jobs/`, `auth/authentication/`,
10
+ * `auth/authorization/`, the folder of the model, `audit/search-audit-entries/`), rewrites every
11
+ * import of them under the source root, `test/` and `scripts/`, and the paths the scripts of
12
+ * package.json name. A file the kit did not write in a directory that holds folders only stays
13
+ * where it is, said in `draft.manual`, unless `placed` gives it a folder.
14
+ */
15
+ export function platformFolders(tree, draft) {
16
+ const moves = platformMoves(tree.ws, tree.config, tree.placed);
17
+ const moved = new Map(moves.map(({ from, to }) => [from.replace(EXTENSION, ''), to.replace(EXTENSION, '')]));
18
+ const relocation = { roots: aliasRoots(tree.config), moved };
19
+ const rewritten = [];
20
+ for (const file of projectSources(tree.ws, tree.config, ['scripts'])) {
21
+ const source = draft.read(file) ?? '';
22
+ const next = withMovedImports(source, file, relocation);
23
+ const target = moves.find(({ from }) => from === file)?.to ?? file;
24
+ if (target !== file) {
25
+ draft.remove(file);
26
+ draft.write(target, next);
27
+ }
28
+ else if (next !== source) {
29
+ draft.write(file, next);
30
+ }
31
+ if (next !== source) {
32
+ rewritten.push(target);
33
+ }
34
+ }
35
+ rewriteScripts(draft, moves);
36
+ const platform = `${tree.config.platformDir}/`;
37
+ const left = unknownFlatFiles(tree.ws, tree.config).filter((file) => !moves.some(({ from }) => from === `${platform}${file}`));
38
+ if (left.length > 0) {
39
+ draft.manual.push(leftFlat(left));
40
+ }
41
+ return { moved: moves, rewritten };
42
+ }
43
+ /** `dev` preloads the tracing module by its path: the scripts name it where it is now. */
44
+ function rewriteScripts(draft, moves) {
45
+ const manifest = draft.read('package.json');
46
+ if (manifest !== undefined) {
47
+ draft.write('package.json', moves.reduce((text, { from, to }) => text.replaceAll(`./${from}`, `./${to}`), manifest));
48
+ }
49
+ }
50
+ function leftFlat(files) {
51
+ return `Not written by the kit, left where folders only belong: ${files.join(', ')}. Give each the folder of what it answers, \`--place <file>=<folder>\` once per file, both from the platform (\`--place auth/role-grants.ts=auth/roles\`), in this run or the next: its imports follow.`;
52
+ }
53
+ //# sourceMappingURL=platform-folders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-folders.js","sourceRoot":"","sources":["../../src/platform-folders/platform-folders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAGhE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,SAAS,GAAG,cAAc,CAAC;AAgBjC;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,IAAU,EAAE,KAAqB;IAC/D,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI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index.js';
3
+ import type { FolderMove } from './folder-move.js';
4
+ /**
5
+ * The files the kit wrote flat, each with its folder, and the files of the team placed by their
6
+ * path from the platform (`auth/role-grants.ts` in `auth/roles`), unless that folder already holds one.
7
+ */
8
+ export declare function platformMoves(ws: Workspace, config: Config, placed?: ReadonlyMap<string, string>): FolderMove[];
9
+ //# sourceMappingURL=platform-moves.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-moves.d.ts","sourceRoot":"","sources":["../../src/platform-folders/platform-moves.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAa,GAC9C,UAAU,EAAE,CAUd"}
@@ -0,0 +1,16 @@
1
+ import path from 'node:path';
2
+ import { FLAT_FILES } from './flat-files.js';
3
+ /**
4
+ * The files the kit wrote flat, each with its folder, and the files of the team placed by their
5
+ * path from the platform (`auth/role-grants.ts` in `auth/roles`), unless that folder already holds one.
6
+ */
7
+ export function platformMoves(ws, config, placed = new Map()) {
8
+ const platform = config.platformDir;
9
+ const known = [...FLAT_FILES].map(([from, to]) => ({ from: `${platform}/${from}`, to: `${platform}/${to}` }));
10
+ const ours = [...placed].map(([file, folder]) => ({
11
+ from: `${platform}/${file}`,
12
+ to: `${platform}/${folder}/${path.posix.basename(file)}`,
13
+ }));
14
+ return [...known, ...ours].filter(({ from, to }) => ws.exists(from) && !ws.exists(to));
15
+ }
16
+ //# sourceMappingURL=platform-moves.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-moves.js","sourceRoot":"","sources":["../../src/platform-folders/platform-moves.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC3B,EAAa,EACb,MAAc,EACd,MAAM,GAAgC,IAAI,GAAG,EAAE;IAE/C,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC;IACpC,MAAM,KAAK,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,QAAQ,IAAI,IAAI,EAAE,EAAE,EAAE,EAAE,GAAG,QAAQ,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAE9G,MAAM,IAAI,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QAChD,IAAI,EAAE,GAAG,QAAQ,IAAI,IAAI,EAAE;QAC3B,EAAE,EAAE,GAAG,QAAQ,IAAI,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;KACzD,CAAC,CAAC,CAAC;IAEJ,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;AACzF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Config } from '../config/index.js';
2
+ import type { Workspace } from '../workspace/index.js';
3
+ /** The files left in a directory of the platform that holds folders only, which the kit did not write: the team knows their folder. */
4
+ export declare function unknownFlatFiles(ws: Workspace, config: Config): string[];
5
+ //# sourceMappingURL=unknown-flat-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unknown-flat-files.d.ts","sourceRoot":"","sources":["../../src/platform-folders/unknown-flat-files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAMvD,uIAAuI;AACvI,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CASxE"}
@@ -0,0 +1,14 @@
1
+ import { FLAT_FILES } from './flat-files.js';
2
+ /** The directories of the platform that hold folders only, once the files the kit writes are in them. */
3
+ const TIDIED = ['', 'auth'];
4
+ /** The files left in a directory of the platform that holds folders only, which the kit did not write: the team knows their folder. */
5
+ export function unknownFlatFiles(ws, config) {
6
+ return TIDIED.flatMap((directory) => {
7
+ const prefix = directory === '' ? '' : `${directory}/`;
8
+ return ws
9
+ .list(directory === '' ? config.platformDir : `${config.platformDir}/${directory}`)
10
+ .map((name) => `${prefix}${name}`)
11
+ .filter((file) => !FLAT_FILES.has(file));
12
+ });
13
+ }
14
+ //# sourceMappingURL=unknown-flat-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unknown-flat-files.js","sourceRoot":"","sources":["../../src/platform-folders/unknown-flat-files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,yGAAyG;AACzG,MAAM,MAAM,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;AAE5B,uIAAuI;AACvI,MAAM,UAAU,gBAAgB,CAAC,EAAa,EAAE,MAAc;IAC5D,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;QAClC,MAAM,MAAM,GAAG,SAAS,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,CAAC;QAEvD,OAAO,EAAE;aACN,IAAI,CAAC,SAAS,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,WAAW,IAAI,SAAS,EAAE,CAAC;aAClF,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,IAAI,EAAE,CAAC;aACjC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type Relocation } from './moved-specifier.js';
2
+ /**
3
+ * The source of `file` with every import of a moved file naming it where it is now, and every
4
+ * `new URL(<relative>, import.meta.url)` of a moved file reaching what it reached before.
5
+ */
6
+ export declare function withMovedImports(source: string, file: string, relocation: Relocation): string;
7
+ //# sourceMappingURL=with-moved-imports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-moved-imports.d.ts","sourceRoot":"","sources":["../../src/platform-folders/with-moved-imports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKvE;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,MAAM,CAO7F"}
@@ -0,0 +1,14 @@
1
+ import { movedSpecifier } from './moved-specifier.js';
2
+ const SPECIFIER = /(\bfrom\s*|\bimport\s*\(\s*|\bimport\s+|\brequire\s*\(\s*|\bvi\.mock\s*\(\s*|\bnew URL\(\s*)(['"])([^'"\n]+)\2/g;
3
+ /**
4
+ * The source of `file` with every import of a moved file naming it where it is now, and every
5
+ * `new URL(<relative>, import.meta.url)` of a moved file reaching what it reached before.
6
+ */
7
+ export function withMovedImports(source, file, relocation) {
8
+ return source.replace(SPECIFIER, (whole, ...groups) => {
9
+ const [before = '', quote = '', specifier = ''] = groups;
10
+ const moved = movedSpecifier(specifier, file, relocation);
11
+ return moved === undefined ? whole : `${before}${quote}${moved}${quote}`;
12
+ });
13
+ }
14
+ //# sourceMappingURL=with-moved-imports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-moved-imports.js","sourceRoot":"","sources":["../../src/platform-folders/with-moved-imports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAmB,MAAM,sBAAsB,CAAC;AAEvE,MAAM,SAAS,GACb,iHAAiH,CAAC;AAEpH;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAc,EAAE,IAAY,EAAE,UAAsB;IACnF,OAAO,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,KAAa,EAAE,GAAG,MAAgB,EAAE,EAAE;QACtE,MAAM,CAAC,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC;QACzD,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QAE1D,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ export type { PlatformFile } from './platform-file.js';
2
+ export { platformFileIn } from './platform-file-in.js';
3
+ export { PLATFORM_LAYOUT } from './platform-layout.js';
4
+ export { platformFilePaths } from './platform-file-paths.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform-layout/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { platformFileIn } from './platform-file-in.js';
2
+ export { PLATFORM_LAYOUT } from './platform-layout.js';
3
+ export { platformFilePaths } from './platform-file-paths.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/platform-layout/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Config } from '../config/index.js';
2
+ import type { PlatformFile } from './platform-file.js';
3
+ /**
4
+ * The path of a file of the platform in this project. A project generated before the folders
5
+ * keeps the files of a group flat, its anchor among them: there, a file that is not in its folder
6
+ * is read and written flat, until the team moves them.
7
+ */
8
+ export declare function platformFileIn(config: Config, file: PlatformFile, exists: (path: string) => boolean): string;
9
+ //# sourceMappingURL=platform-file-in.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-file-in.d.ts","sourceRoot":"","sources":["../../src/platform-layout/platform-file-in.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,CAY5G"}
@@ -0,0 +1,18 @@
1
+ import { PLATFORM_LAYOUT } from './platform-layout.js';
2
+ /**
3
+ * The path of a file of the platform in this project. A project generated before the folders
4
+ * keeps the files of a group flat, its anchor among them: there, a file that is not in its folder
5
+ * is read and written flat, until the team moves them.
6
+ */
7
+ export function platformFileIn(config, file, exists) {
8
+ const placed = `${config.platformDir}/${file}`;
9
+ const group = PLATFORM_LAYOUT.find(({ files }) => Object.values(files).some((path) => path === file));
10
+ const flat = Object.entries(group?.files ?? {}).find(([, path]) => path === file)?.[0];
11
+ if (exists(placed) || group === undefined || flat === undefined) {
12
+ return placed;
13
+ }
14
+ return exists(`${config.platformDir}/${flat}`) || exists(`${config.platformDir}/${group.anchor}`)
15
+ ? `${config.platformDir}/${flat}`
16
+ : placed;
17
+ }
18
+ //# sourceMappingURL=platform-file-in.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-file-in.js","sourceRoot":"","sources":["../../src/platform-layout/platform-file-in.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,IAAkB,EAAE,MAAiC;IAClG,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;IAC/C,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;IACtG,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAEvF,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QAChE,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM,CAAC,WAAW,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QAC/F,CAAC,CAAC,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,EAAE;QACjC,CAAC,CAAC,MAAM,CAAC;AACb,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Config } from '../config/index.js';
2
+ import type { PlatformFile } from './platform-file.js';
3
+ /** Both paths a file of the platform may have, in its folder and flat: a rule reads it at either. */
4
+ export declare function platformFilePaths(config: Config, file: PlatformFile): string[];
5
+ //# sourceMappingURL=platform-file-paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-file-paths.d.ts","sourceRoot":"","sources":["../../src/platform-layout/platform-file-paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,qGAAqG;AACrG,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,MAAM,EAAE,CAM9E"}
@@ -0,0 +1,9 @@
1
+ import { PLATFORM_LAYOUT } from './platform-layout.js';
2
+ /** Both paths a file of the platform may have, in its folder and flat: a rule reads it at either. */
3
+ export function platformFilePaths(config, file) {
4
+ const flat = PLATFORM_LAYOUT.flatMap(({ files }) => Object.entries(files))
5
+ .filter(([, placed]) => placed === file)
6
+ .map(([path]) => `${config.platformDir}/${path}`);
7
+ return [`${config.platformDir}/${file}`, ...flat];
8
+ }
9
+ //# sourceMappingURL=platform-file-paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-file-paths.js","sourceRoot":"","sources":["../../src/platform-layout/platform-file-paths.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,qGAAqG;AACrG,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,IAAkB;IAClE,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;SACvE,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,MAAM,KAAK,IAAI,CAAC;SACvC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC,CAAC;IAEpD,OAAO,CAAC,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { PLATFORM_LAYOUT } from './platform-layout.js';
2
+ type Placed<Files> = Files extends Readonly<Record<string, infer Path>> ? Path : never;
3
+ /** A file of the platform the kit gives a folder, by its path from the platform in that folder. */
4
+ export type PlatformFile = Placed<(typeof PLATFORM_LAYOUT)[number]['files']>;
5
+ export {};
6
+ //# sourceMappingURL=platform-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-file.d.ts","sourceRoot":"","sources":["../../src/platform-layout/platform-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,KAAK,MAAM,CAAC,KAAK,IAAI,KAAK,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AAEvF,mGAAmG;AACnG,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=platform-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-file.js","sourceRoot":"","sources":["../../src/platform-layout/platform-file.ts"],"names":[],"mappings":""}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Where each file of the platform that a version before the folders wrote flat lives now, both
3
+ * relative to the platform, in groups: a project still holding the anchor of a group flat keeps
4
+ * every file of that group flat, the ones it writes later included.
5
+ */
6
+ export declare const PLATFORM_LAYOUT: readonly [{
7
+ readonly anchor: 'auth/create-authorizer.ts';
8
+ readonly files: {
9
+ readonly 'auth/create-authenticator.ts': 'auth/authentication/create-authenticator.ts';
10
+ readonly 'auth/principal-of.ts': 'auth/authentication/principal-of.ts';
11
+ readonly 'auth/security-schemes.ts': 'auth/authentication/security-schemes.ts';
12
+ readonly 'auth/http-boundary.ts': 'auth/authentication/http-boundary.ts';
13
+ readonly 'auth/offline-authenticator.ts': 'auth/authentication/offline-authenticator.ts';
14
+ readonly 'auth/development-actor-header.ts': 'auth/authentication/development-actor-header.ts';
15
+ readonly 'auth/development-header-authenticator.ts': 'auth/authentication/development-header-authenticator.ts';
16
+ readonly 'auth/authorization.ts': 'auth/authorization/authorization.ts';
17
+ readonly 'auth/use-case-protection.ts': 'auth/authorization/use-case-protection.ts';
18
+ readonly 'auth/create-authorizer.ts': 'auth/authorization/create-authorizer.ts';
19
+ readonly 'auth/access-policies.ts': 'auth/authorization/access-policies.ts';
20
+ readonly 'auth/permissions.ts': 'auth/authorization/permissions.ts';
21
+ readonly 'auth/signed-in-grants.ts': 'auth/authorization/signed-in-grants.ts';
22
+ readonly 'auth/log-decisions.ts': 'auth/authorization/log-decisions.ts';
23
+ readonly 'auth/role.ts': 'auth/authorization/role.ts';
24
+ readonly 'auth/roles.ts': 'auth/roles/roles.ts';
25
+ readonly 'auth/attribute-policies.ts': 'auth/attributes/attribute-policies.ts';
26
+ readonly 'auth/relationship-schema.ts': 'auth/relationships/relationship-schema.ts';
27
+ readonly 'auth/relation-tuples.ts': 'auth/relationships/relation-tuples.ts';
28
+ readonly 'auth/create-tuple-store.ts': 'auth/relationships/create-tuple-store.ts';
29
+ readonly 'auth/create-tuple-store.contract.spec.ts': 'auth/relationships/create-tuple-store.contract.spec.ts';
30
+ readonly 'auth/relate-system-actors.ts': 'auth/relationships/relate-system-actors.ts';
31
+ readonly 'auth/permission-mapping.ts': 'auth/relationships/permission-mapping.ts';
32
+ readonly 'auth/custom-authorizer.ts': 'auth/custom/custom-authorizer.ts';
33
+ readonly 'auth/custom-authorizer.contract.spec.ts': 'auth/custom/custom-authorizer.contract.spec.ts';
34
+ };
35
+ }, {
36
+ readonly anchor: 'compose-application.ts';
37
+ readonly files: {
38
+ readonly 'compose-application.ts': 'composition/compose-application.ts';
39
+ readonly 'platform.module.ts': 'composition/platform.module.ts';
40
+ readonly 'platform-test.module.ts': 'composition/platform-test.module.ts';
41
+ readonly 'lay-foundations.ts': 'composition/lay-foundations.ts';
42
+ readonly 'platform.ts': 'composition/platform.ts';
43
+ readonly 'create-platform.ts': 'composition/create-platform.ts';
44
+ readonly 'tracing.ts': 'observability/tracing.ts';
45
+ readonly 'errors.ts': 'observability/errors.ts';
46
+ readonly 'job-settings.ts': 'jobs/job-settings.ts';
47
+ };
48
+ }, {
49
+ readonly anchor: 'audit/search-audit-entries.handler.ts';
50
+ readonly files: {
51
+ readonly 'audit/search-audit-entries.query.ts': 'audit/search-audit-entries/search-audit-entries.query.ts';
52
+ readonly 'audit/search-audit-entries.handler.ts': 'audit/search-audit-entries/search-audit-entries.handler.ts';
53
+ readonly 'audit/search-audit-entries.controller.ts': 'audit/search-audit-entries/search-audit-entries.controller.ts';
54
+ readonly 'audit/search-audit-entries.route.ts': 'audit/search-audit-entries/search-audit-entries.route.ts';
55
+ };
56
+ }];
57
+ //# sourceMappingURL=platform-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-layout.d.ts","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,KAAK;iBACH,qCAAqC,EAAE,0DAA0D;iBACjG,uCAAuC,EAAE,4DAA4D;iBACrG,0CAA0C,EAAE,+DAA+D;iBAC3G,qCAAqC,EAAE,0DAA0D;;EAG7F,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Where each file of the platform that a version before the folders wrote flat lives now, both
3
+ * relative to the platform, in groups: a project still holding the anchor of a group flat keeps
4
+ * every file of that group flat, the ones it writes later included.
5
+ */
6
+ export const PLATFORM_LAYOUT = [
7
+ {
8
+ anchor: 'auth/create-authorizer.ts',
9
+ files: {
10
+ 'auth/create-authenticator.ts': 'auth/authentication/create-authenticator.ts',
11
+ 'auth/principal-of.ts': 'auth/authentication/principal-of.ts',
12
+ 'auth/security-schemes.ts': 'auth/authentication/security-schemes.ts',
13
+ 'auth/http-boundary.ts': 'auth/authentication/http-boundary.ts',
14
+ 'auth/offline-authenticator.ts': 'auth/authentication/offline-authenticator.ts',
15
+ 'auth/development-actor-header.ts': 'auth/authentication/development-actor-header.ts',
16
+ 'auth/development-header-authenticator.ts': 'auth/authentication/development-header-authenticator.ts',
17
+ 'auth/authorization.ts': 'auth/authorization/authorization.ts',
18
+ 'auth/use-case-protection.ts': 'auth/authorization/use-case-protection.ts',
19
+ 'auth/create-authorizer.ts': 'auth/authorization/create-authorizer.ts',
20
+ 'auth/access-policies.ts': 'auth/authorization/access-policies.ts',
21
+ 'auth/permissions.ts': 'auth/authorization/permissions.ts',
22
+ 'auth/signed-in-grants.ts': 'auth/authorization/signed-in-grants.ts',
23
+ 'auth/log-decisions.ts': 'auth/authorization/log-decisions.ts',
24
+ 'auth/role.ts': 'auth/authorization/role.ts',
25
+ 'auth/roles.ts': 'auth/roles/roles.ts',
26
+ 'auth/attribute-policies.ts': 'auth/attributes/attribute-policies.ts',
27
+ 'auth/relationship-schema.ts': 'auth/relationships/relationship-schema.ts',
28
+ 'auth/relation-tuples.ts': 'auth/relationships/relation-tuples.ts',
29
+ 'auth/create-tuple-store.ts': 'auth/relationships/create-tuple-store.ts',
30
+ 'auth/create-tuple-store.contract.spec.ts': 'auth/relationships/create-tuple-store.contract.spec.ts',
31
+ 'auth/relate-system-actors.ts': 'auth/relationships/relate-system-actors.ts',
32
+ 'auth/permission-mapping.ts': 'auth/relationships/permission-mapping.ts',
33
+ 'auth/custom-authorizer.ts': 'auth/custom/custom-authorizer.ts',
34
+ 'auth/custom-authorizer.contract.spec.ts': 'auth/custom/custom-authorizer.contract.spec.ts',
35
+ },
36
+ },
37
+ {
38
+ anchor: 'compose-application.ts',
39
+ files: {
40
+ 'compose-application.ts': 'composition/compose-application.ts',
41
+ 'platform.module.ts': 'composition/platform.module.ts',
42
+ 'platform-test.module.ts': 'composition/platform-test.module.ts',
43
+ 'lay-foundations.ts': 'composition/lay-foundations.ts',
44
+ 'platform.ts': 'composition/platform.ts',
45
+ 'create-platform.ts': 'composition/create-platform.ts',
46
+ 'tracing.ts': 'observability/tracing.ts',
47
+ 'errors.ts': 'observability/errors.ts',
48
+ 'job-settings.ts': 'jobs/job-settings.ts',
49
+ },
50
+ },
51
+ {
52
+ anchor: 'audit/search-audit-entries.handler.ts',
53
+ files: {
54
+ 'audit/search-audit-entries.query.ts': 'audit/search-audit-entries/search-audit-entries.query.ts',
55
+ 'audit/search-audit-entries.handler.ts': 'audit/search-audit-entries/search-audit-entries.handler.ts',
56
+ 'audit/search-audit-entries.controller.ts': 'audit/search-audit-entries/search-audit-entries.controller.ts',
57
+ 'audit/search-audit-entries.route.ts': 'audit/search-audit-entries/search-audit-entries.route.ts',
58
+ },
59
+ },
60
+ ];
61
+ //# sourceMappingURL=platform-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-layout.js","sourceRoot":"","sources":["../../src/platform-layout/platform-layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;QACE,MAAM,EAAE,2BAA2B;QACnC,KAAK,EAAE;YACL,8BAA8B,EAAE,6CAA6C;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
- {"version":3,"file":"grant-to-signed-in.d.ts","sourceRoot":"","sources":["../../src/presets/grant-to-signed-in.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AASlD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAclD"}
1
+ {"version":3,"file":"grant-to-signed-in.d.ts","sourceRoot":"","sources":["../../src/presets/grant-to-signed-in.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAUlD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAgBlD"}
@@ -3,6 +3,7 @@ import { insertInRegion } from '../markers/index.js';
3
3
  import { withImport } from '../generate/with-import.js';
4
4
  import { renderTemplate } from '../templating/index.js';
5
5
  import { withAuthorizerImport } from './with-authorizer-import.js';
6
+ import { platformPath } from '../generate/platform-path.js';
6
7
  const REGION = 'signed-in-grants';
7
8
  const WRAPPED = 'SignedInGrantsAuthorizer';
8
9
  const AUTHORIZER = /(export function createAuthorizer\(\): Authorizer \{\n) {2}return ([\s\S]*?);\n\}/;
@@ -13,8 +14,7 @@ const AUTHORIZER = /(export function createAuthorizer\(\): Authorizer \{\n) {2}r
13
14
  * read is left to the team, with a step saying how.
14
15
  */
15
16
  export function grantToSignedIn(scope) {
16
- const auth = `${scope.config.platformDir}/auth`;
17
- const grants = `${auth}/signed-in-grants.ts`;
17
+ const grants = platformPath(scope, 'auth/authorization/signed-in-grants.ts');
18
18
  const line = `'${scope.context.kebab}:*',`;
19
19
  const current = scope.ws.read(grants) ?? renderTemplate('presets/signed-in-grants.ts.tpl', {});
20
20
  const next = insertInRegion(current, REGION, line) ?? current;
@@ -22,7 +22,7 @@ export function grantToSignedIn(scope) {
22
22
  scope.ws.step({
23
23
  file: grants,
24
24
  anchor: line,
25
- text: grantStep(scope, wrapAuthorizer(scope, `${auth}/create-authorizer.ts`, grants)),
25
+ text: grantStep(scope, wrapAuthorizer(scope, platformPath(scope, 'auth/authorization/create-authorizer.ts'), grants)),
26
26
  });
27
27
  }
28
28
  function grantStep(scope, isWrapped) {
@@ -1 +1 @@
1
- {"version":3,"file":"grant-to-signed-in.js","sourceRoot":"","sources":["../../src/presets/grant-to-signed-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,MAAM,MAAM,GAAG,kBAAkB,CAAC;AAClC,MAAM,OAAO,GAAG,0BAA0B,CAAC;AAC3C,MAAM,UAAU,GAAG,mFAAmF,CAAC;AAEvG;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,MAAM,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW,OAAO,CAAC;IAChD,MAAM,MAAM,GAAG,GAAG,IAAI,sBAAsB,CAAC;IAC7C,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,MAAM,CAAC;IAC3C,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,cAAc,CAAC,iCAAiC,EAAE,EAAE,CAAC,CAAC;IAC/F,MAAM,IAAI,GAAG,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,OAAO,CAAC;IAE9D,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAE/B,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC;QACZ,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,IAAI;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