@endora-commerce/cli 0.100.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 (356) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +37 -0
  3. package/dist/bin/endora.d.ts +28 -0
  4. package/dist/bin/endora.d.ts.map +1 -0
  5. package/dist/bin/endora.js +926 -0
  6. package/dist/bin/endora.js.map +1 -0
  7. package/dist/check/estate.d.ts +189 -0
  8. package/dist/check/estate.d.ts.map +1 -0
  9. package/dist/check/estate.js +1037 -0
  10. package/dist/check/estate.js.map +1 -0
  11. package/dist/check/hosts.d.ts +25 -0
  12. package/dist/check/hosts.d.ts.map +1 -0
  13. package/dist/check/hosts.js +1347 -0
  14. package/dist/check/hosts.js.map +1 -0
  15. package/dist/check/index.d.ts +60 -0
  16. package/dist/check/index.d.ts.map +1 -0
  17. package/dist/check/index.js +111 -0
  18. package/dist/check/index.js.map +1 -0
  19. package/dist/check/layout.d.ts +136 -0
  20. package/dist/check/layout.d.ts.map +1 -0
  21. package/dist/check/layout.js +262 -0
  22. package/dist/check/layout.js.map +1 -0
  23. package/dist/check/ledger.d.ts +98 -0
  24. package/dist/check/ledger.d.ts.map +1 -0
  25. package/dist/check/ledger.js +173 -0
  26. package/dist/check/ledger.js.map +1 -0
  27. package/dist/check/peer-owners.d.ts +116 -0
  28. package/dist/check/peer-owners.d.ts.map +1 -0
  29. package/dist/check/peer-owners.js +225 -0
  30. package/dist/check/peer-owners.js.map +1 -0
  31. package/dist/check/report.d.ts +33 -0
  32. package/dist/check/report.d.ts.map +1 -0
  33. package/dist/check/report.js +107 -0
  34. package/dist/check/report.js.map +1 -0
  35. package/dist/check/run.d.ts +147 -0
  36. package/dist/check/run.d.ts.map +1 -0
  37. package/dist/check/run.js +111 -0
  38. package/dist/check/run.js.map +1 -0
  39. package/dist/checks.d.ts +17 -0
  40. package/dist/checks.d.ts.map +1 -0
  41. package/dist/checks.js +17 -0
  42. package/dist/checks.js.map +1 -0
  43. package/dist/dev/index.d.ts +83 -0
  44. package/dist/dev/index.d.ts.map +1 -0
  45. package/dist/dev/index.js +298 -0
  46. package/dist/dev/index.js.map +1 -0
  47. package/dist/generate/divergence.d.ts +38 -0
  48. package/dist/generate/divergence.d.ts.map +1 -0
  49. package/dist/generate/divergence.js +237 -0
  50. package/dist/generate/divergence.js.map +1 -0
  51. package/dist/generate/index.d.ts +90 -0
  52. package/dist/generate/index.d.ts.map +1 -0
  53. package/dist/generate/index.js +369 -0
  54. package/dist/generate/index.js.map +1 -0
  55. package/dist/index.d.ts +23 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +35 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/inputs/declaration.d.ts +18 -0
  60. package/dist/inputs/declaration.d.ts.map +1 -0
  61. package/dist/inputs/declaration.js +64 -0
  62. package/dist/inputs/declaration.js.map +1 -0
  63. package/dist/inputs/env-file.d.ts +73 -0
  64. package/dist/inputs/env-file.d.ts.map +1 -0
  65. package/dist/inputs/env-file.js +134 -0
  66. package/dist/inputs/env-file.js.map +1 -0
  67. package/dist/inputs/prompt.d.ts +21 -0
  68. package/dist/inputs/prompt.d.ts.map +1 -0
  69. package/dist/inputs/prompt.js +59 -0
  70. package/dist/inputs/prompt.js.map +1 -0
  71. package/dist/inputs/resolve.d.ts +163 -0
  72. package/dist/inputs/resolve.d.ts.map +1 -0
  73. package/dist/inputs/resolve.js +290 -0
  74. package/dist/inputs/resolve.js.map +1 -0
  75. package/dist/install/host.d.ts +27 -0
  76. package/dist/install/host.d.ts.map +1 -0
  77. package/dist/install/host.js +90 -0
  78. package/dist/install/host.js.map +1 -0
  79. package/dist/install/index.d.ts +173 -0
  80. package/dist/install/index.d.ts.map +1 -0
  81. package/dist/install/index.js +793 -0
  82. package/dist/install/index.js.map +1 -0
  83. package/dist/install/wizard.d.ts +144 -0
  84. package/dist/install/wizard.d.ts.map +1 -0
  85. package/dist/install/wizard.js +362 -0
  86. package/dist/install/wizard.js.map +1 -0
  87. package/dist/lib/admin-artefacts.d.ts +70 -0
  88. package/dist/lib/admin-artefacts.d.ts.map +1 -0
  89. package/dist/lib/admin-artefacts.js +354 -0
  90. package/dist/lib/admin-artefacts.js.map +1 -0
  91. package/dist/lib/admin-surfaces.d.ts +298 -0
  92. package/dist/lib/admin-surfaces.d.ts.map +1 -0
  93. package/dist/lib/admin-surfaces.js +669 -0
  94. package/dist/lib/admin-surfaces.js.map +1 -0
  95. package/dist/lib/delegated-composer.d.ts +85 -0
  96. package/dist/lib/delegated-composer.d.ts.map +1 -0
  97. package/dist/lib/delegated-composer.js +241 -0
  98. package/dist/lib/delegated-composer.js.map +1 -0
  99. package/dist/lib/divergence-artefacts.d.ts +305 -0
  100. package/dist/lib/divergence-artefacts.d.ts.map +1 -0
  101. package/dist/lib/divergence-artefacts.js +828 -0
  102. package/dist/lib/divergence-artefacts.js.map +1 -0
  103. package/dist/lib/divergence.d.ts +337 -0
  104. package/dist/lib/divergence.d.ts.map +1 -0
  105. package/dist/lib/divergence.js +1005 -0
  106. package/dist/lib/divergence.js.map +1 -0
  107. package/dist/lib/docs-artefacts.d.ts +395 -0
  108. package/dist/lib/docs-artefacts.d.ts.map +1 -0
  109. package/dist/lib/docs-artefacts.js +781 -0
  110. package/dist/lib/docs-artefacts.js.map +1 -0
  111. package/dist/lib/emitted-exports.d.ts +21 -0
  112. package/dist/lib/emitted-exports.d.ts.map +1 -0
  113. package/dist/lib/emitted-exports.js +96 -0
  114. package/dist/lib/emitted-exports.js.map +1 -0
  115. package/dist/lib/emitted-freshness.d.ts +112 -0
  116. package/dist/lib/emitted-freshness.d.ts.map +1 -0
  117. package/dist/lib/emitted-freshness.js +288 -0
  118. package/dist/lib/emitted-freshness.js.map +1 -0
  119. package/dist/lib/entity-index-artefact.d.ts +95 -0
  120. package/dist/lib/entity-index-artefact.d.ts.map +1 -0
  121. package/dist/lib/entity-index-artefact.js +210 -0
  122. package/dist/lib/entity-index-artefact.js.map +1 -0
  123. package/dist/lib/instance-build-inputs.d.ts +108 -0
  124. package/dist/lib/instance-build-inputs.d.ts.map +1 -0
  125. package/dist/lib/instance-build-inputs.js +165 -0
  126. package/dist/lib/instance-build-inputs.js.map +1 -0
  127. package/dist/lib/module-docs.d.ts +473 -0
  128. package/dist/lib/module-docs.d.ts.map +1 -0
  129. package/dist/lib/module-docs.js +711 -0
  130. package/dist/lib/module-docs.js.map +1 -0
  131. package/dist/lib/module-package-subpaths.d.ts +56 -0
  132. package/dist/lib/module-package-subpaths.d.ts.map +1 -0
  133. package/dist/lib/module-package-subpaths.js +223 -0
  134. package/dist/lib/module-package-subpaths.js.map +1 -0
  135. package/dist/lib/module-packages.d.ts +200 -0
  136. package/dist/lib/module-packages.d.ts.map +1 -0
  137. package/dist/lib/module-packages.js +580 -0
  138. package/dist/lib/module-packages.js.map +1 -0
  139. package/dist/lib/module-population.d.ts +129 -0
  140. package/dist/lib/module-population.d.ts.map +1 -0
  141. package/dist/lib/module-population.js +172 -0
  142. package/dist/lib/module-population.js.map +1 -0
  143. package/dist/lib/module-roots.d.ts +337 -0
  144. package/dist/lib/module-roots.d.ts.map +1 -0
  145. package/dist/lib/module-roots.js +586 -0
  146. package/dist/lib/module-roots.js.map +1 -0
  147. package/dist/lib/nested-checkouts.d.ts +33 -0
  148. package/dist/lib/nested-checkouts.d.ts.map +1 -0
  149. package/dist/lib/nested-checkouts.js +160 -0
  150. package/dist/lib/nested-checkouts.js.map +1 -0
  151. package/dist/lib/platform-root.d.ts +43 -0
  152. package/dist/lib/platform-root.d.ts.map +1 -0
  153. package/dist/lib/platform-root.js +134 -0
  154. package/dist/lib/platform-root.js.map +1 -0
  155. package/dist/lib/platform-surface.d.ts +235 -0
  156. package/dist/lib/platform-surface.d.ts.map +1 -0
  157. package/dist/lib/platform-surface.js +393 -0
  158. package/dist/lib/platform-surface.js.map +1 -0
  159. package/dist/lib/port-registrations.d.ts +223 -0
  160. package/dist/lib/port-registrations.d.ts.map +1 -0
  161. package/dist/lib/port-registrations.js +532 -0
  162. package/dist/lib/port-registrations.js.map +1 -0
  163. package/dist/lib/read-size.d.ts +154 -0
  164. package/dist/lib/read-size.d.ts.map +1 -0
  165. package/dist/lib/read-size.js +182 -0
  166. package/dist/lib/read-size.js.map +1 -0
  167. package/dist/lib/registration-owners.d.ts +79 -0
  168. package/dist/lib/registration-owners.d.ts.map +1 -0
  169. package/dist/lib/registration-owners.js +77 -0
  170. package/dist/lib/registration-owners.js.map +1 -0
  171. package/dist/lib/release-index.d.ts +53 -0
  172. package/dist/lib/release-index.d.ts.map +1 -0
  173. package/dist/lib/release-index.js +162 -0
  174. package/dist/lib/release-index.js.map +1 -0
  175. package/dist/lib/repeating-timers.d.ts +79 -0
  176. package/dist/lib/repeating-timers.d.ts.map +1 -0
  177. package/dist/lib/repeating-timers.js +189 -0
  178. package/dist/lib/repeating-timers.js.map +1 -0
  179. package/dist/lib/source-text.d.ts +34 -0
  180. package/dist/lib/source-text.d.ts.map +1 -0
  181. package/dist/lib/source-text.js +80 -0
  182. package/dist/lib/source-text.js.map +1 -0
  183. package/dist/lib/specifiers.d.ts +20 -0
  184. package/dist/lib/specifiers.d.ts.map +1 -0
  185. package/dist/lib/specifiers.js +130 -0
  186. package/dist/lib/specifiers.js.map +1 -0
  187. package/dist/lib/sql-tables.d.ts +166 -0
  188. package/dist/lib/sql-tables.d.ts.map +1 -0
  189. package/dist/lib/sql-tables.js +464 -0
  190. package/dist/lib/sql-tables.js.map +1 -0
  191. package/dist/lib/switchable-modules.d.ts +54 -0
  192. package/dist/lib/switchable-modules.d.ts.map +1 -0
  193. package/dist/lib/switchable-modules.js +104 -0
  194. package/dist/lib/switchable-modules.js.map +1 -0
  195. package/dist/lib/tailwind-sources.d.ts +136 -0
  196. package/dist/lib/tailwind-sources.d.ts.map +1 -0
  197. package/dist/lib/tailwind-sources.js +307 -0
  198. package/dist/lib/tailwind-sources.js.map +1 -0
  199. package/dist/lib/ui-layer.d.ts +54 -0
  200. package/dist/lib/ui-layer.d.ts.map +1 -0
  201. package/dist/lib/ui-layer.js +57 -0
  202. package/dist/lib/ui-layer.js.map +1 -0
  203. package/dist/lib/workspace-packages.d.ts +186 -0
  204. package/dist/lib/workspace-packages.d.ts.map +1 -0
  205. package/dist/lib/workspace-packages.js +351 -0
  206. package/dist/lib/workspace-packages.js.map +1 -0
  207. package/dist/new-instance/deploy.d.ts +211 -0
  208. package/dist/new-instance/deploy.d.ts.map +1 -0
  209. package/dist/new-instance/deploy.js +1381 -0
  210. package/dist/new-instance/deploy.js.map +1 -0
  211. package/dist/new-instance/docs-toolchain.d.ts +66 -0
  212. package/dist/new-instance/docs-toolchain.d.ts.map +1 -0
  213. package/dist/new-instance/docs-toolchain.js +69 -0
  214. package/dist/new-instance/docs-toolchain.js.map +1 -0
  215. package/dist/new-instance/host.d.ts +124 -0
  216. package/dist/new-instance/host.d.ts.map +1 -0
  217. package/dist/new-instance/host.js +276 -0
  218. package/dist/new-instance/host.js.map +1 -0
  219. package/dist/new-instance/index.d.ts +118 -0
  220. package/dist/new-instance/index.d.ts.map +1 -0
  221. package/dist/new-instance/index.js +567 -0
  222. package/dist/new-instance/index.js.map +1 -0
  223. package/dist/new-instance/modules.d.ts +188 -0
  224. package/dist/new-instance/modules.d.ts.map +1 -0
  225. package/dist/new-instance/modules.js +392 -0
  226. package/dist/new-instance/modules.js.map +1 -0
  227. package/dist/new-instance/template.d.ts +505 -0
  228. package/dist/new-instance/template.d.ts.map +1 -0
  229. package/dist/new-instance/template.js +1886 -0
  230. package/dist/new-instance/template.js.map +1 -0
  231. package/dist/new-module/emit.d.ts +67 -0
  232. package/dist/new-module/emit.d.ts.map +1 -0
  233. package/dist/new-module/emit.js +1393 -0
  234. package/dist/new-module/emit.js.map +1 -0
  235. package/dist/new-module/host.d.ts +67 -0
  236. package/dist/new-module/host.d.ts.map +1 -0
  237. package/dist/new-module/host.js +224 -0
  238. package/dist/new-module/host.js.map +1 -0
  239. package/dist/new-module/index.d.ts +32 -0
  240. package/dist/new-module/index.d.ts.map +1 -0
  241. package/dist/new-module/index.js +193 -0
  242. package/dist/new-module/index.js.map +1 -0
  243. package/dist/new-module/spec.d.ts +188 -0
  244. package/dist/new-module/spec.d.ts.map +1 -0
  245. package/dist/new-module/spec.js +404 -0
  246. package/dist/new-module/spec.js.map +1 -0
  247. package/dist/new-module/text.d.ts +15 -0
  248. package/dist/new-module/text.d.ts.map +1 -0
  249. package/dist/new-module/text.js +22 -0
  250. package/dist/new-module/text.js.map +1 -0
  251. package/dist/new-storefront/dockerfile.d.ts +20 -0
  252. package/dist/new-storefront/dockerfile.d.ts.map +1 -0
  253. package/dist/new-storefront/dockerfile.js +131 -0
  254. package/dist/new-storefront/dockerfile.js.map +1 -0
  255. package/dist/new-storefront/gitignore.d.ts +23 -0
  256. package/dist/new-storefront/gitignore.d.ts.map +1 -0
  257. package/dist/new-storefront/gitignore.js +39 -0
  258. package/dist/new-storefront/gitignore.js.map +1 -0
  259. package/dist/new-storefront/index.d.ts +93 -0
  260. package/dist/new-storefront/index.d.ts.map +1 -0
  261. package/dist/new-storefront/index.js +329 -0
  262. package/dist/new-storefront/index.js.map +1 -0
  263. package/dist/new-storefront/npmrc.d.ts +98 -0
  264. package/dist/new-storefront/npmrc.d.ts.map +1 -0
  265. package/dist/new-storefront/npmrc.js +217 -0
  266. package/dist/new-storefront/npmrc.js.map +1 -0
  267. package/dist/new-storefront/reference.d.ts +189 -0
  268. package/dist/new-storefront/reference.d.ts.map +1 -0
  269. package/dist/new-storefront/reference.js +430 -0
  270. package/dist/new-storefront/reference.js.map +1 -0
  271. package/dist/new-storefront/rewrite.d.ts +171 -0
  272. package/dist/new-storefront/rewrite.d.ts.map +1 -0
  273. package/dist/new-storefront/rewrite.js +701 -0
  274. package/dist/new-storefront/rewrite.js.map +1 -0
  275. package/dist/release-index.json +284 -0
  276. package/dist/rules/action-route-permissions.d.ts +141 -0
  277. package/dist/rules/action-route-permissions.d.ts.map +1 -0
  278. package/dist/rules/action-route-permissions.js +556 -0
  279. package/dist/rules/action-route-permissions.js.map +1 -0
  280. package/dist/rules/bundle-pairing.d.ts +74 -0
  281. package/dist/rules/bundle-pairing.d.ts.map +1 -0
  282. package/dist/rules/bundle-pairing.js +281 -0
  283. package/dist/rules/bundle-pairing.js.map +1 -0
  284. package/dist/rules/channel-resolution.d.ts +17 -0
  285. package/dist/rules/channel-resolution.d.ts.map +1 -0
  286. package/dist/rules/channel-resolution.js +382 -0
  287. package/dist/rules/channel-resolution.js.map +1 -0
  288. package/dist/rules/command-coverage.d.ts +210 -0
  289. package/dist/rules/command-coverage.d.ts.map +1 -0
  290. package/dist/rules/command-coverage.js +714 -0
  291. package/dist/rules/command-coverage.js.map +1 -0
  292. package/dist/rules/container-imports.d.ts +60 -0
  293. package/dist/rules/container-imports.d.ts.map +1 -0
  294. package/dist/rules/container-imports.js +158 -0
  295. package/dist/rules/container-imports.js.map +1 -0
  296. package/dist/rules/default-language-prose.d.ts +212 -0
  297. package/dist/rules/default-language-prose.d.ts.map +1 -0
  298. package/dist/rules/default-language-prose.js +710 -0
  299. package/dist/rules/default-language-prose.js.map +1 -0
  300. package/dist/rules/diacritic-folds.d.ts +238 -0
  301. package/dist/rules/diacritic-folds.d.ts.map +1 -0
  302. package/dist/rules/diacritic-folds.js +681 -0
  303. package/dist/rules/diacritic-folds.js.map +1 -0
  304. package/dist/rules/entity-tenant-classification.d.ts +171 -0
  305. package/dist/rules/entity-tenant-classification.d.ts.map +1 -0
  306. package/dist/rules/entity-tenant-classification.js +323 -0
  307. package/dist/rules/entity-tenant-classification.js.map +1 -0
  308. package/dist/rules/entry-presence.d.ts +142 -0
  309. package/dist/rules/entry-presence.d.ts.map +1 -0
  310. package/dist/rules/entry-presence.js +339 -0
  311. package/dist/rules/entry-presence.js.map +1 -0
  312. package/dist/rules/entry-scope.d.ts +91 -0
  313. package/dist/rules/entry-scope.d.ts.map +1 -0
  314. package/dist/rules/entry-scope.js +404 -0
  315. package/dist/rules/entry-scope.js.map +1 -0
  316. package/dist/rules/env-inputs.d.ts +222 -0
  317. package/dist/rules/env-inputs.d.ts.map +1 -0
  318. package/dist/rules/env-inputs.js +951 -0
  319. package/dist/rules/env-inputs.js.map +1 -0
  320. package/dist/rules/kernel-boundary.d.ts +37 -0
  321. package/dist/rules/kernel-boundary.d.ts.map +1 -0
  322. package/dist/rules/kernel-boundary.js +195 -0
  323. package/dist/rules/kernel-boundary.js.map +1 -0
  324. package/dist/rules/nul-bytes.d.ts +233 -0
  325. package/dist/rules/nul-bytes.d.ts.map +1 -0
  326. package/dist/rules/nul-bytes.js +332 -0
  327. package/dist/rules/nul-bytes.js.map +1 -0
  328. package/dist/rules/platform-surface.d.ts +479 -0
  329. package/dist/rules/platform-surface.d.ts.map +1 -0
  330. package/dist/rules/platform-surface.js +749 -0
  331. package/dist/rules/platform-surface.js.map +1 -0
  332. package/dist/rules/port-catches.d.ts +225 -0
  333. package/dist/rules/port-catches.d.ts.map +1 -0
  334. package/dist/rules/port-catches.js +1374 -0
  335. package/dist/rules/port-catches.js.map +1 -0
  336. package/dist/rules/port-shape.d.ts +213 -0
  337. package/dist/rules/port-shape.d.ts.map +1 -0
  338. package/dist/rules/port-shape.js +670 -0
  339. package/dist/rules/port-shape.js.map +1 -0
  340. package/dist/rules/queue-names.d.ts +108 -0
  341. package/dist/rules/queue-names.d.ts.map +1 -0
  342. package/dist/rules/queue-names.js +395 -0
  343. package/dist/rules/queue-names.js.map +1 -0
  344. package/dist/rules/singleton-identity.d.ts +205 -0
  345. package/dist/rules/singleton-identity.d.ts.map +1 -0
  346. package/dist/rules/singleton-identity.js +830 -0
  347. package/dist/rules/singleton-identity.js.map +1 -0
  348. package/dist/rules/subscribe-seam.d.ts +121 -0
  349. package/dist/rules/subscribe-seam.d.ts.map +1 -0
  350. package/dist/rules/subscribe-seam.js +594 -0
  351. package/dist/rules/subscribe-seam.js.map +1 -0
  352. package/dist/rules/transaction-context.d.ts +40 -0
  353. package/dist/rules/transaction-context.d.ts.map +1 -0
  354. package/dist/rules/transaction-context.js +294 -0
  355. package/dist/rules/transaction-context.js.map +1 -0
  356. package/package.json +59 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-inputs.js","sourceRoot":"","sources":["../../src/rules/env-inputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsGG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EACL,qBAAqB,GAItB,MAAM,4BAA4B,CAAC;AAEpC,yEAAyE;AACzE,MAAM,CAAC,MAAM,MAAM,GAAG,cAAc,CAAC;AAcrC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,QAAQ,GAAkD;IACrE,kBAAkB,EAChB,oFAAoF;QACpF,qFAAqF;QACrF,wFAAwF;QACxF,kFAAkF;QAClF,0DAA0D;IAC5D,yBAAyB,EACvB,wFAAwF;QACxF,iFAAiF;QACjF,uFAAuF;QACvF,wFAAwF;QACxF,oFAAoF;QACpF,qFAAqF;QACrF,wFAAwF;QACxF,0FAA0F;QAC1F,8CAA8C;IAChD,cAAc,EACZ,wFAAwF;QACxF,yFAAyF;QACzF,qFAAqF;QACrF,6CAA6C;IAC/C,kCAAkC,EAChC,wFAAwF;QACxF,sFAAsF;QACtF,oFAAoF;QACpF,yFAAyF;QACzF,yFAAyF;QACzF,yFAAyF;QACzF,uDAAuD;IACzD,eAAe,EACb,mFAAmF;QACnF,yFAAyF;QACzF,wFAAwF;QACxF,wFAAwF;IAC1F,yCAAyC,EACvC,0FAA0F;QAC1F,qFAAqF;QACrF,6EAA6E;QAC7E,uFA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AAC;AAChB,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { type HostResidentModules } from '../lib/module-population.js';
2
+ /**
3
+ * Who owns the entity declared in `file`: a module id, `kernel`, or `core` for
4
+ * the entities that predate the module split and live under `src/db`.
5
+ */
6
+ export declare function ownerOf(file: string, hostResident?: HostResidentModules): string | null;
7
+ /**
8
+ * Every `.ts` under `dir` except tests and declaration files.
9
+ *
10
+ * Rule A used to walk `*.entity.ts` only. Nothing enforces that naming — an
11
+ * entity declared in `entities/index.ts`, or a relation added to a class in an
12
+ * ordinary file, was simply not scanned, and a scan that does not look is
13
+ * indistinguishable from one that finds nothing. The file list is now the whole
14
+ * tree and {@link RELATION_DECORATOR_HINT} decides what is worth parsing, so the
15
+ * rule's scope is a property of the code rather than of a filename.
16
+ */
17
+ export declare function collectSources(dir: string, out?: string[]): string[];
18
+ /**
19
+ * A cheap pre-filter: only a file that spells one of the four relation
20
+ * decorators can produce a rule-A finding, and parsing 2 600 files to learn that
21
+ * is wasted work. It over-matches deliberately (a mention in a comment passes
22
+ * it) — {@link analyzeSource} is the parse that decides.
23
+ */
24
+ export declare const RELATION_DECORATOR_HINT: RegExp;
25
+ export interface RelationFinding {
26
+ readonly file: string;
27
+ readonly className: string;
28
+ readonly property: string;
29
+ readonly decorator: string;
30
+ readonly targetName: string;
31
+ readonly sourceOwner: string;
32
+ readonly targetOwner: string;
33
+ }
34
+ export declare function analyzeSource(source: string, file: string, hostResident?: HostResidentModules): RelationFinding[];
35
+ export declare function findingKey(finding: RelationFinding): string;
36
+ export declare function isViolation(finding: RelationFinding): boolean;
37
+ //# sourceMappingURL=kernel-boundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kernel-boundary.d.ts","sourceRoot":"","sources":["../../src/rules/kernel-boundary.ts"],"names":[],"mappings":"AA4CA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,6BAA6B,CAAC;AAIrC;;;GAGG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,MAAM,EACZ,YAAY,GAAE,mBAA8C,GAC3D,MAAM,GAAG,IAAI,CAWf;AAOD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,EAAO,GAAG,MAAM,EAAE,CAWxE;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,QAAwD,CAAC;AAsC7F,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,YAAY,GAAE,mBAA8C,GAC3D,eAAe,EAAE,CAoCnB;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAE3D;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAO7D"}
@@ -0,0 +1,195 @@
1
+ /**
2
+ * CI check — ORM relations respect the module boundary (feature 072, D-32).
3
+ *
4
+ * Rule A of `check:kernel-boundary`: a `@ManyToOne` / `@OneToMany` /
5
+ * `@OneToOne` / `@ManyToMany` relation may point **inside its own module** or
6
+ * **at the platform** (the kernel and the pre-split `core` entities), and
7
+ * nowhere else. A relation from one module's entity into another module's is a
8
+ * foreign key the ORM will create, in a schema neither module can be detached
9
+ * from — Principle I with a database constraint behind it.
10
+ *
11
+ * Static analysis through the TypeScript compiler API. A decorator's target is
12
+ * read as the capitalised identifiers inside the decorator's arguments, mapped
13
+ * back through the file's own relative imports, so a mention in a comment or a
14
+ * string is not a finding and a target declared in the same file is same-owner
15
+ * by construction.
16
+ *
17
+ * ## One analysis, two hosts, and why only rule A travels
18
+ *
19
+ * This file is rule A (`specs/101-endora-check/contracts/package-scope-layout.md`
20
+ * §6). `backend/scripts/check-kernel-boundary.ts` hosts it over this
21
+ * repository's module walk roots, alongside its own **rules B and C** — the
22
+ * specifiers a platform root names, and the kernel's transitive import closure.
23
+ * Those two stay with that host rather than travelling, and not as an omission:
24
+ * their subject is *the platform's own roots*, and a module package holds none,
25
+ * so there is nothing in a package for them to read. `endora check` declares
26
+ * them unevaluated on the rule's own line rather than counting them zero — a
27
+ * signal that reports nothing because it had no subject and a signal that
28
+ * reports nothing because the tree is clean are the two states this estate
29
+ * exists to keep apart.
30
+ *
31
+ * ## Attribution, and the one derivation that had to learn a second source
32
+ *
33
+ * `ownerOf` reads the owner off a `/src/modules/<id>/` path segment, which is
34
+ * this repository's convention (D-141) and a stranger's checkout has no reason
35
+ * to hold. It therefore takes the same `HostResidentModules` map every other
36
+ * relocated rule takes: a package-scope host hands it the one mapping its
37
+ * `endora.id` declares, and attribution keys on the declaration rather than on
38
+ * a directory name.
39
+ */
40
+ import { existsSync, readdirSync, statSync } from 'node:fs';
41
+ import { dirname, join, resolve } from 'node:path';
42
+ import ts from 'typescript';
43
+ import { moduleIdOf, NO_HOST_RESIDENT_MODULES, } from '../lib/module-population.js';
44
+ const RELATION_DECORATORS = new Set(['ManyToOne', 'OneToMany', 'OneToOne', 'ManyToMany']);
45
+ /**
46
+ * Who owns the entity declared in `file`: a module id, `kernel`, or `core` for
47
+ * the entities that predate the module split and live under `src/db`.
48
+ */
49
+ export function ownerOf(file, hostResident = NO_HOST_RESIDENT_MODULES) {
50
+ const moduleMatch = /\/src\/modules\/([^/]+)\//.exec(file);
51
+ if (moduleMatch)
52
+ return moduleMatch[1] ?? null;
53
+ if (file.includes('/src/kernel/'))
54
+ return 'kernel';
55
+ if (file.includes('/src/db/'))
56
+ return 'core';
57
+ // The package half of the derivation, and the reason it is here: without it a
58
+ // module package's entities are read by the walk, satisfy the floor, and are
59
+ // then attributed to nobody — which for `analyzeSource` means "not an entity
60
+ // this rule judges", so every relation in the package is skipped and the run
61
+ // reports clean. That is issue #215's failure one layer in.
62
+ return moduleIdOf(file, hostResident);
63
+ }
64
+ /** `kernel` and `core` are the parts every deployment has; a module may point at them. */
65
+ function isPlatformOwner(owner) {
66
+ return owner === 'kernel' || owner === 'core';
67
+ }
68
+ /**
69
+ * Every `.ts` under `dir` except tests and declaration files.
70
+ *
71
+ * Rule A used to walk `*.entity.ts` only. Nothing enforces that naming — an
72
+ * entity declared in `entities/index.ts`, or a relation added to a class in an
73
+ * ordinary file, was simply not scanned, and a scan that does not look is
74
+ * indistinguishable from one that finds nothing. The file list is now the whole
75
+ * tree and {@link RELATION_DECORATOR_HINT} decides what is worth parsing, so the
76
+ * rule's scope is a property of the code rather than of a filename.
77
+ */
78
+ export function collectSources(dir, out = []) {
79
+ for (const name of readdirSync(dir)) {
80
+ const full = join(dir, name);
81
+ if (statSync(full).isDirectory()) {
82
+ if (name === 'node_modules' || name === 'dist')
83
+ continue;
84
+ collectSources(full, out);
85
+ }
86
+ else if (name.endsWith('.ts') && !name.endsWith('.test.ts') && !name.endsWith('.d.ts')) {
87
+ out.push(full);
88
+ }
89
+ }
90
+ return out;
91
+ }
92
+ /**
93
+ * A cheap pre-filter: only a file that spells one of the four relation
94
+ * decorators can produce a rule-A finding, and parsing 2 600 files to learn that
95
+ * is wasted work. It over-matches deliberately (a mention in a comment passes
96
+ * it) — {@link analyzeSource} is the parse that decides.
97
+ */
98
+ export const RELATION_DECORATOR_HINT = /@(?:ManyToOne|OneToMany|OneToOne|ManyToMany)\s*[(<]/;
99
+ function decoratorName(decorator) {
100
+ const expr = decorator.expression;
101
+ const callee = ts.isCallExpression(expr) ? expr.expression : expr;
102
+ return ts.isIdentifier(callee) ? callee.text : undefined;
103
+ }
104
+ /** Every capitalised identifier appearing anywhere inside the decorator's arguments. */
105
+ function referencedTypeNames(decorator) {
106
+ const expr = decorator.expression;
107
+ if (!ts.isCallExpression(expr))
108
+ return [];
109
+ const names = [];
110
+ const visit = (node) => {
111
+ if (ts.isIdentifier(node) && /^[A-Z]/.test(node.text))
112
+ names.push(node.text);
113
+ node.forEachChild(visit);
114
+ };
115
+ for (const arg of expr.arguments)
116
+ visit(arg);
117
+ return names;
118
+ }
119
+ /** Map local import name → the file it was imported from, resolved to a `.ts` path. */
120
+ function importedFrom(sf, file) {
121
+ const map = new Map();
122
+ for (const statement of sf.statements) {
123
+ if (!ts.isImportDeclaration(statement))
124
+ continue;
125
+ const spec = statement.moduleSpecifier;
126
+ if (!ts.isStringLiteral(spec))
127
+ continue;
128
+ if (!spec.text.startsWith('.'))
129
+ continue;
130
+ const target = resolve(dirname(file), spec.text.replace(/\.js$/, '.ts'));
131
+ if (!existsSync(target))
132
+ continue;
133
+ const bindings = statement.importClause?.namedBindings;
134
+ if (!bindings || !ts.isNamedImports(bindings))
135
+ continue;
136
+ for (const element of bindings.elements)
137
+ map.set(element.name.text, target);
138
+ }
139
+ return map;
140
+ }
141
+ export function analyzeSource(source, file, hostResident = NO_HOST_RESIDENT_MODULES) {
142
+ const sf = ts.createSourceFile(file, source, ts.ScriptTarget.Latest, true);
143
+ const sourceOwner = ownerOf(file, hostResident);
144
+ if (!sourceOwner)
145
+ return [];
146
+ const imports = importedFrom(sf, file);
147
+ const findings = [];
148
+ sf.forEachChild((node) => {
149
+ if (!ts.isClassDeclaration(node))
150
+ return;
151
+ const className = node.name?.text ?? '<anonymous>';
152
+ for (const member of node.members) {
153
+ if (!ts.isPropertyDeclaration(member))
154
+ continue;
155
+ for (const decorator of ts.getDecorators(member) ?? []) {
156
+ const name = decoratorName(decorator);
157
+ if (!name || !RELATION_DECORATORS.has(name))
158
+ continue;
159
+ for (const targetName of referencedTypeNames(decorator)) {
160
+ // A target declared in this very file is same-owner by construction.
161
+ const targetFile = imports.get(targetName);
162
+ if (!targetFile)
163
+ continue;
164
+ const targetOwner = ownerOf(targetFile, hostResident);
165
+ if (!targetOwner)
166
+ continue;
167
+ findings.push({
168
+ file,
169
+ className,
170
+ property: member.name.getText(sf),
171
+ decorator: name,
172
+ targetName,
173
+ sourceOwner,
174
+ targetOwner,
175
+ });
176
+ }
177
+ }
178
+ }
179
+ });
180
+ return findings;
181
+ }
182
+ export function findingKey(finding) {
183
+ return `${finding.sourceOwner}.${finding.className}.${finding.property} -> ${finding.targetOwner}`;
184
+ }
185
+ export function isViolation(finding) {
186
+ const { sourceOwner, targetOwner } = finding;
187
+ if (sourceOwner === targetOwner)
188
+ return false;
189
+ // A module may point at the platform.
190
+ if (!isPlatformOwner(sourceOwner) && isPlatformOwner(targetOwner))
191
+ return false;
192
+ // Everything else — module → other module, and platform → module — is out.
193
+ return true;
194
+ }
195
+ //# sourceMappingURL=kernel-boundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kernel-boundary.js","sourceRoot":"","sources":["../../src/rules/kernel-boundary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EACL,UAAU,EACV,wBAAwB,GAEzB,MAAM,6BAA6B,CAAC;AAErC,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;AAE1F;;;GAGG;AACH,MAAM,UAAU,OAAO,CACrB,IAAY,EACZ,eAAoC,wBAAwB;IAE5D,MAAM,WAAW,GAAG,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,IAAI,WAAW;QAAE,OAAO,WA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OAAO,CAAC;IAC7C,IAAI,WAAW,KAAK,WAAW;QAAE,OAAO,KAAK,CAAC;IAC9C,sCAAsC;IACtC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,IAAI,eAAe,CAAC,WAAW,CAAC;QAAE,OAAO,KAAK,CAAC;IAChF,2EAA2E;IAC3E,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,233 @@
1
+ /**
2
+ * CI check — no source file in this repository carries a raw NUL byte (issue #190).
3
+ *
4
+ * ## Why a byte deserves its own check
5
+ *
6
+ * The artefact that would reveal this defect **is the diff itself**. Git's
7
+ * content filter classifies a blob as binary when it finds a NUL in it, and from
8
+ * that moment every diff of the file reads `Binary files a/… and b/… differ`.
9
+ * The file stops being reviewable: `git diff`, `git blame -L`, the MR widget and
10
+ * every review UI show nothing at all. So the one thing that would have caught
11
+ * the byte during review is the thing the byte switches off.
12
+ *
13
+ * That is not hypothetical. Six files in this tree spelled a NUL separator as a
14
+ * raw byte inside a template literal — `media-ingestor.ts` (issue #182) plus the
15
+ * five issue #190 names — and each survived every review of every commit that
16
+ * touched it, because none of those commits could be read.
17
+ *
18
+ * The separator itself is correct in all six: NUL is the one byte the joined
19
+ * fields cannot contain, which is exactly what a join separator has to be. The
20
+ * defect is never the byte's *value*, only how the **source** spells it. Write
21
+ * `\0` (or `\x00`) and the compiled string is identical to the last bit while
22
+ * the source stays text.
23
+ *
24
+ * ## Anywhere in the file, not just where git looks
25
+ *
26
+ * Git only reads the **first 8000 bytes** when it decides binary-or-not. The NUL
27
+ * in `admin_actions/services/admin-actions-service.ts` sat at byte 8032, so git
28
+ * kept diffing that file as text and only `file(1)` disagreed — the byte was
29
+ * still there, still one edit away from crossing the window, and still invisible
30
+ * to every tool that does not share git's heuristic. A rule that copied git's
31
+ * window would have declared that file clean. This check reads the whole file.
32
+ *
33
+ * ## Only NUL
34
+ *
35
+ * The other C0 control characters are not in scope, deliberately. A raw `\x1f`
36
+ * is unpleasant but it does not change how any tool classifies the file: the
37
+ * diff still renders, review still works, and the ratchet this check installs
38
+ * would be claiming more than the failure it was written for. NUL is the byte
39
+ * with the tooling consequence, so NUL is the byte with the rule.
40
+ *
41
+ * ## The population, and how it fails
42
+ *
43
+ * Every file under the repository root **except** the two exclusions declared
44
+ * below, each with its reason:
45
+ *
46
+ * - `SKIPPED_DIRECTORIES` — trees that are not this repository's source.
47
+ * - `GENERATED_FILE_EXTENSIONS` — tool output written beside the source it
48
+ * came from, so no directory prune reaches it.
49
+ * - `BINARY_EXTENSIONS` and `BINARY_FILENAMES` — file types whose content is
50
+ * bytes by definition. A PNG is not a source file with a NUL problem; it is
51
+ * not a source file.
52
+ *
53
+ * The exclusion is a **deny-list on purpose**. An allow-list of known-text
54
+ * extensions fails open: the next `.sql`, `.toml` or extension-less script to
55
+ * arrive would be silently unscanned, and nothing would report it. With a
56
+ * deny-list a new file type is scanned by default, and a genuinely binary one
57
+ * announces itself by failing this check once — at which point it is added here
58
+ * with a reason rather than to a silent skip.
59
+ *
60
+ * The cost of a *missing* exclusion is therefore work rather than correctness,
61
+ * and it is real work: `.docusaurus` and `backend/var/assets` were not declared,
62
+ * so a working tree that had built the docs site and served one upload scanned
63
+ * 8288 files where a clean checkout scans 5165 — three thousand reads of output
64
+ * nobody wrote, and a NUL among them would have been reported against a path no
65
+ * merge request can change (issue #248). The candidates come from `.gitignore`:
66
+ * a tree git is told not to track is a tree this repository does not author.
67
+ *
68
+ * **Which of the two tables an exclusion belongs in is decided by its name.**
69
+ * `SKIPPED_DIRECTORIES` prunes a *name* wherever it occurs, so a name earns a
70
+ * place there only when it names its own producer (`node_modules`, `.next`,
71
+ * `storybook-static`) or is a dot-prefixed tool directory (`.turbo`, `.vite`).
72
+ * A generic word is somebody's plausible source directory too, and pruning it
73
+ * everywhere would take a subtree out of the scan for a name rather than for a
74
+ * reason — so `backend/var` is anchored at the one path it occupies, in
75
+ * `SKIPPED_PATH_PREFIXES`.
76
+ *
77
+ * Three `.gitignore` entries from the same sweep are deliberately **not**
78
+ * declared: `out/`, `tmp/` and `uploads/`. Each is a bare generic word, none
79
+ * held a single file in the measured tree, and an exclusion that buys no reads
80
+ * buys only the chance of taking a future source directory out of the scan. The
81
+ * deny-list is what makes that the safe order to be wrong in: an undeclared
82
+ * tree costs reads, a wrongly declared one costs coverage, so a name arrives
83
+ * here when it has been measured to matter and not before.
84
+ *
85
+ * A text file that genuinely must keep a NUL — a fixture whose whole point is a
86
+ * real NUL arriving in real data — goes in `NUL_BYTES_ALLOWED` with a reason.
87
+ * That ledger is **two-way**: an unledgered NUL fails the build, and a ledger
88
+ * entry naming a file that no longer has one fails it too. It is empty; the five
89
+ * issue #190 files were all repaired rather than ledgered, because in every one
90
+ * of them the escape produces the same string at runtime and loses nothing.
91
+ *
92
+ * ## One analysis, two hosts
93
+ *
94
+ * This file is the analysis. `backend/scripts/check-nul-bytes.ts` hosts it over
95
+ * this repository, and `endora check` hosts it over one module package
96
+ * (`specs/101-endora-check/contracts/package-scope-layout.md` §6). Neither host
97
+ * re-derives the other's population, and the walk each performs is its own —
98
+ * what they share is {@link isScannablePath}, which is the rule.
99
+ */
100
+ /**
101
+ * Directory names pruned wherever they occur, and why each is not source.
102
+ *
103
+ * Declared rather than hard-coded into the walk so that the reason travels with
104
+ * the exclusion: a directory skipped here is a directory this check makes no
105
+ * claim about, and the next reader gets to see which claim was dropped.
106
+ */
107
+ export declare const SKIPPED_DIRECTORIES: Readonly<Record<string, string>>;
108
+ /**
109
+ * Repo-relative directory prefixes that are not this checkout, keyed by prefix
110
+ * with the reason as the value — the same discipline as `SKIPPED_DIRECTORIES`,
111
+ * but path-anchored rather than name-anchored.
112
+ *
113
+ * `SKIPPED_DIRECTORIES` matches a *name* anywhere in the tree, which is right
114
+ * for `node_modules` and wrong here: `.claude/` also holds `agents/` and
115
+ * `skills/`, which are tracked repository source and must stay scanned. Only
116
+ * the worktree root is excluded. The same reasoning puts every generic-word
117
+ * exclusion here rather than there — see the header.
118
+ */
119
+ export declare const SKIPPED_PATH_PREFIXES: Readonly<Record<string, string>>;
120
+ /**
121
+ * Extensions whose content is bytes by definition, and why.
122
+ *
123
+ * A file here is out of the population entirely — not exempted from the rule but
124
+ * outside it, because "a source file must not contain a NUL" says nothing about
125
+ * a PNG. Adding an entry is cheap and visible; the cost of getting it wrong is
126
+ * one file that stops being checked, which is why each carries a reason.
127
+ */
128
+ export declare const BINARY_EXTENSIONS: Readonly<Record<string, string>>;
129
+ /**
130
+ * Exact file names that are binary, for the files that carry no extension.
131
+ *
132
+ * Separate from `BINARY_EXTENSIONS` because a leading dot is a dotfile marker,
133
+ * not an extension: `.gitignore` is text and must stay in the population, so a
134
+ * dot-named file cannot be classified by the same rule. Matched on the basename
135
+ * anywhere in the tree.
136
+ */
137
+ export declare const BINARY_FILENAMES: Readonly<Record<string, string>>;
138
+ /**
139
+ * Extensions of **generated** files that a tool writes beside the source it was
140
+ * generated from, and why each is not this repository's source.
141
+ *
142
+ * A fourth category, and it exists because the other three cannot hold these
143
+ * honestly. `SKIPPED_DIRECTORIES` prunes a directory, and these files sit in a
144
+ * source directory rather than under a `dist/`. `BINARY_EXTENSIONS` says
145
+ * "bytes by definition", and a `.tsbuildinfo` is JSON — filing it there would
146
+ * put a false sentence in a reason field, which is the one thing this file's
147
+ * discipline cannot afford. `NUL_BYTES_ALLOWED` is for a file that *carries* a
148
+ * NUL and is right to.
149
+ *
150
+ * This is `.docusaurus`' case one granularity down. That entry exists because a
151
+ * tree that had built the docs site scanned it as source (issue #248); this one
152
+ * exists because a tree that has type-checked the storefront scans
153
+ * `tsconfig.tsbuildinfo` as source. Both are gitignored output a tool drops
154
+ * where it works.
155
+ *
156
+ * **The cost is not a false green** — a `.tsbuildinfo` holds no NUL, so nothing
157
+ * was being missed. It is that the file count moved on any tree where a
158
+ * type-check had run, and the estate's `read:` lines are what four Wave 4 merge
159
+ * requests used to prove a change touched nothing it should not. Two agents
160
+ * chased this `+1` to ground independently before it was written down. A
161
+ * verification tool whose baseline shifts under you is worth less than one that
162
+ * does not, which is the whole argument for the entry.
163
+ */
164
+ export declare const GENERATED_FILE_EXTENSIONS: Readonly<Record<string, string>>;
165
+ /**
166
+ * Text files allowed to keep a raw NUL, with the reason it is right.
167
+ *
168
+ * **Two-way**, in the idiom of `BARE_SUBSCRIPTIONS_TO_DRAIN`: an unledgered NUL
169
+ * fails the build, and an entry that no longer describes one fails it too.
170
+ *
171
+ * It is empty, and it should stay hard to add to. The obvious candidate — a
172
+ * hostile-input fixture — is not one: a fixture builds a JavaScript string, and
173
+ * `'\x00'` and a raw NUL byte produce the same string with the same code point,
174
+ * so escaping costs the fixture nothing and buys back the diff. An entry here
175
+ * has to name something the *file's bytes* do, not something its values do.
176
+ */
177
+ export declare const NUL_BYTES_ALLOWED: Readonly<Record<string, string>>;
178
+ /** A file handed to the analysis: repo-relative POSIX path plus its raw bytes. */
179
+ export interface ScannedFile {
180
+ readonly path: string;
181
+ readonly bytes: Uint8Array;
182
+ }
183
+ export interface NulByteFinding {
184
+ /** Repo-relative path, POSIX separators — also the ledger key. */
185
+ readonly path: string;
186
+ /** Byte offset of the first NUL. */
187
+ readonly byteOffset: number;
188
+ /** 1-based line, counting `\n`. */
189
+ readonly line: number;
190
+ /** 1-based **byte** column within that line. */
191
+ readonly column: number;
192
+ /** Total NUL bytes in the file, so a repair that fixes one of six is visible. */
193
+ readonly count: number;
194
+ /** True when git's own 8000-byte window would have missed it. */
195
+ readonly beyondGitBinaryWindow: boolean;
196
+ }
197
+ /** How many bytes of a blob git reads before deciding binary-or-text. */
198
+ export declare const GIT_BINARY_WINDOW = 8000;
199
+ /** The extension of a path, lower-cased, including the dot; `''` when there is none. */
200
+ export declare function extensionOf(path: string): string;
201
+ /**
202
+ * Whether a path is in the population.
203
+ *
204
+ * Path-based rather than walk-based so the two exclusions are provable from a
205
+ * synthetic path: the pruning a real run does for speed and the exclusion the
206
+ * rule makes are then the same decision, taken in one place.
207
+ */
208
+ /**
209
+ * Is this repo-relative path at, or under, a `SKIPPED_PATH_PREFIXES` entry?
210
+ *
211
+ * **One function, called from both places on purpose.** The walk prunes for
212
+ * speed and `isScannablePath` states the rule, and while those were two
213
+ * expressions of the same predicate the walk's copy kept the check reporting
214
+ * `violations=0` after the rule's copy went missing — so the red proof, which
215
+ * enters at `findNulBytes`, could not see its own exclusion disappear. A
216
+ * duplicated decision is one that can go half-missing without anything
217
+ * noticing.
218
+ */
219
+ export declare function isUnderSkippedPrefix(relativePath: string): boolean;
220
+ export declare function isScannablePath(path: string): boolean;
221
+ /** Every NUL-carrying file among the scannable ones, first occurrence located. */
222
+ export declare function findNulBytes(files: Iterable<ScannedFile>): NulByteFinding[];
223
+ export interface CheckResult {
224
+ /** Files the analysis actually inspected — the vacuous-pass guard reads this. */
225
+ readonly scanned: number;
226
+ readonly total: number;
227
+ readonly violations: readonly NulByteFinding[];
228
+ readonly ledgered: readonly NulByteFinding[];
229
+ /** Ledger keys that no longer describe a NUL-carrying file. */
230
+ readonly stale: readonly string[];
231
+ }
232
+ export declare function checkNulBytes(files: Iterable<ScannedFile>, ledger?: Readonly<Record<string, string>>): CheckResult;
233
+ //# sourceMappingURL=nul-bytes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nul-bytes.d.ts","sourceRoot":"","sources":["../../src/rules/nul-bytes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkGG;AACH;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAsBhE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAYlE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,C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