@fougere/core 0.8.2-alpha.0 → 0.8.4-alpha.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 (222) hide show
  1. package/dist/boot/Emissions.d.ts.map +1 -1
  2. package/dist/boot/Emissions.js +3 -3
  3. package/dist/boot/Emissions.js.map +1 -1
  4. package/dist/boot/auth.d.ts +1 -1
  5. package/dist/boot/auth.d.ts.map +1 -1
  6. package/dist/boot/bootstrap.d.ts.map +1 -1
  7. package/dist/boot/bootstrap.js +339 -595
  8. package/dist/boot/bootstrap.js.map +1 -1
  9. package/dist/boot/card.js +1 -1
  10. package/dist/boot/card.js.map +1 -1
  11. package/dist/boot/hosted.d.ts +1 -1
  12. package/dist/boot/hosted.d.ts.map +1 -1
  13. package/dist/boot/install.d.ts +40 -0
  14. package/dist/boot/install.d.ts.map +1 -0
  15. package/dist/boot/install.js +298 -0
  16. package/dist/boot/install.js.map +1 -0
  17. package/dist/boot/ownership.d.ts +1 -1
  18. package/dist/boot/ownership.d.ts.map +1 -1
  19. package/dist/boot/ownership.js +14 -1
  20. package/dist/boot/ownership.js.map +1 -1
  21. package/dist/boot/seed.d.ts +7 -1
  22. package/dist/boot/seed.d.ts.map +1 -1
  23. package/dist/boot/seed.js +7 -2
  24. package/dist/boot/seed.js.map +1 -1
  25. package/dist/boot/statement-drift.d.ts +1 -1
  26. package/dist/boot/statement-drift.d.ts.map +1 -1
  27. package/dist/boot/together.d.ts +1 -1
  28. package/dist/boot/together.d.ts.map +1 -1
  29. package/dist/boot/together.js +1 -1
  30. package/dist/boot/together.js.map +1 -1
  31. package/dist/boot/types.d.ts +2 -2
  32. package/dist/boot/types.d.ts.map +1 -1
  33. package/dist/config-loader.d.ts +1 -1
  34. package/dist/config-loader.d.ts.map +1 -1
  35. package/dist/contract.d.ts +2 -2
  36. package/dist/contract.d.ts.map +1 -1
  37. package/dist/contract.js +1 -1
  38. package/dist/contract.js.map +1 -1
  39. package/dist/conventions.d.ts.map +1 -0
  40. package/dist/conventions.js.map +1 -0
  41. package/dist/crypto/encoding.d.ts +0 -1
  42. package/dist/crypto/encoding.d.ts.map +1 -1
  43. package/dist/crypto/encoding.js +0 -7
  44. package/dist/crypto/encoding.js.map +1 -1
  45. package/dist/declare.js +1 -1
  46. package/dist/declare.js.map +1 -1
  47. package/dist/descriptor/index.d.ts +15 -0
  48. package/dist/descriptor/index.d.ts.map +1 -0
  49. package/dist/descriptor/index.js +14 -0
  50. package/dist/descriptor/index.js.map +1 -0
  51. package/dist/descriptor/surface.d.ts +8 -0
  52. package/dist/descriptor/surface.d.ts.map +1 -0
  53. package/dist/descriptor/surface.js +16 -0
  54. package/dist/descriptor/surface.js.map +1 -0
  55. package/dist/dispatch/HandlerFacade.d.ts +2 -0
  56. package/dist/dispatch/HandlerFacade.d.ts.map +1 -1
  57. package/dist/dispatch/HandlerFacade.js +7 -2
  58. package/dist/dispatch/HandlerFacade.js.map +1 -1
  59. package/dist/dispatch/StorageGuard.d.ts.map +1 -1
  60. package/dist/dispatch/StorageGuard.js +9 -23
  61. package/dist/dispatch/StorageGuard.js.map +1 -1
  62. package/dist/dispatch/presenterArguments.d.ts +7 -1
  63. package/dist/dispatch/presenterArguments.d.ts.map +1 -1
  64. package/dist/dispatch/presenterArguments.js +15 -4
  65. package/dist/dispatch/presenterArguments.js.map +1 -1
  66. package/dist/dispatch/validateInput.d.ts.map +1 -1
  67. package/dist/dispatch/validateInput.js +2 -2
  68. package/dist/dispatch/validateInput.js.map +1 -1
  69. package/dist/effective-operation.d.ts +1 -1
  70. package/dist/effective-operation.d.ts.map +1 -1
  71. package/dist/effective-operation.js +2 -12
  72. package/dist/effective-operation.js.map +1 -1
  73. package/dist/index.d.ts +7 -9
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +4 -2
  76. package/dist/index.js.map +1 -1
  77. package/dist/node.d.ts +2 -12
  78. package/dist/node.d.ts.map +1 -1
  79. package/dist/node.js +2 -12
  80. package/dist/node.js.map +1 -1
  81. package/dist/prefab/crud.d.ts +1 -1
  82. package/dist/prefab/crud.d.ts.map +1 -1
  83. package/dist/prefab/mirror.d.ts +10 -11
  84. package/dist/prefab/mirror.d.ts.map +1 -1
  85. package/dist/prefab/mirror.js +1 -27
  86. package/dist/prefab/mirror.js.map +1 -1
  87. package/dist/prefab/repository.d.ts +1 -1
  88. package/dist/prefab/repository.d.ts.map +1 -1
  89. package/dist/{scan/result.d.ts → scan.d.ts} +2 -2
  90. package/dist/scan.d.ts.map +1 -0
  91. package/dist/scan.js +2 -0
  92. package/dist/scan.js.map +1 -0
  93. package/dist/source.d.ts +1 -1
  94. package/dist/source.d.ts.map +1 -1
  95. package/dist/storage/criterion.d.ts.map +1 -0
  96. package/dist/{criterion.js → storage/criterion.js} +2 -2
  97. package/dist/storage/criterion.js.map +1 -0
  98. package/dist/{storage.d.ts → storage/port.d.ts} +6 -3
  99. package/dist/storage/port.d.ts.map +1 -0
  100. package/dist/{storage.js → storage/port.js} +13 -6
  101. package/dist/storage/port.js.map +1 -0
  102. package/dist/{store.d.ts → storage/store.d.ts} +1 -1
  103. package/dist/storage/store.d.ts.map +1 -0
  104. package/dist/{store.js → storage/store.js} +33 -17
  105. package/dist/storage/store.js.map +1 -0
  106. package/dist/verify.js +1 -1
  107. package/dist/verify.js.map +1 -1
  108. package/dist/wire/emit.d.ts.map +1 -0
  109. package/dist/wire/emit.js.map +1 -0
  110. package/dist/wire/errors.js +2 -2
  111. package/dist/wire/errors.js.map +1 -1
  112. package/package.json +10 -4
  113. package/src/boot/Emissions.ts +3 -3
  114. package/src/boot/auth.ts +1 -1
  115. package/src/boot/bootstrap.ts +386 -674
  116. package/src/boot/card.ts +1 -1
  117. package/src/boot/hosted.ts +1 -1
  118. package/src/boot/install.ts +390 -0
  119. package/src/boot/ownership.ts +17 -2
  120. package/src/boot/seed.ts +18 -3
  121. package/src/boot/statement-drift.ts +1 -1
  122. package/src/boot/together.ts +1 -1
  123. package/src/boot/types.ts +2 -2
  124. package/src/config-loader.ts +1 -1
  125. package/src/contract.ts +2 -2
  126. package/src/crypto/encoding.ts +0 -7
  127. package/src/declare.ts +1 -1
  128. package/src/descriptor/index.ts +15 -0
  129. package/src/descriptor/surface.ts +23 -0
  130. package/src/dispatch/HandlerFacade.ts +9 -2
  131. package/src/dispatch/StorageGuard.ts +8 -21
  132. package/src/dispatch/presenterArguments.ts +21 -9
  133. package/src/dispatch/validateInput.ts +2 -2
  134. package/src/effective-operation.ts +3 -14
  135. package/src/index.ts +10 -9
  136. package/src/node.ts +2 -16
  137. package/src/prefab/crud.ts +1 -1
  138. package/src/prefab/mirror.ts +12 -38
  139. package/src/prefab/repository.ts +1 -1
  140. package/src/{scan/result.ts → scan.ts} +1 -1
  141. package/src/source.ts +1 -1
  142. package/src/{criterion.ts → storage/criterion.ts} +2 -2
  143. package/src/{storage.ts → storage/port.ts} +20 -5
  144. package/src/{store.ts → storage/store.ts} +35 -16
  145. package/src/verify.ts +1 -1
  146. package/src/wire/call.ts +1 -1
  147. package/src/wire/errors.ts +2 -2
  148. package/dist/boot/boot.d.ts +0 -45
  149. package/dist/boot/boot.d.ts.map +0 -1
  150. package/dist/boot/boot.js +0 -63
  151. package/dist/boot/boot.js.map +0 -1
  152. package/dist/criterion.d.ts.map +0 -1
  153. package/dist/criterion.js.map +0 -1
  154. package/dist/declarations.d.ts +0 -29
  155. package/dist/declarations.d.ts.map +0 -1
  156. package/dist/declarations.js +0 -69
  157. package/dist/declarations.js.map +0 -1
  158. package/dist/emit.d.ts.map +0 -1
  159. package/dist/emit.js.map +0 -1
  160. package/dist/imports.d.ts +0 -16
  161. package/dist/imports.d.ts.map +0 -1
  162. package/dist/imports.js +0 -78
  163. package/dist/imports.js.map +0 -1
  164. package/dist/placement.d.ts +0 -25
  165. package/dist/placement.d.ts.map +0 -1
  166. package/dist/placement.js +0 -69
  167. package/dist/placement.js.map +0 -1
  168. package/dist/scan/adapters.d.ts +0 -3
  169. package/dist/scan/adapters.d.ts.map +0 -1
  170. package/dist/scan/adapters.js +0 -25
  171. package/dist/scan/adapters.js.map +0 -1
  172. package/dist/scan/bundling.d.ts +0 -3
  173. package/dist/scan/bundling.d.ts.map +0 -1
  174. package/dist/scan/bundling.js +0 -15
  175. package/dist/scan/bundling.js.map +0 -1
  176. package/dist/scan/contract.d.ts +0 -27
  177. package/dist/scan/contract.d.ts.map +0 -1
  178. package/dist/scan/contract.js +0 -46
  179. package/dist/scan/contract.js.map +0 -1
  180. package/dist/scan/conventions.d.ts.map +0 -1
  181. package/dist/scan/conventions.js.map +0 -1
  182. package/dist/scan/emit.d.ts +0 -10
  183. package/dist/scan/emit.d.ts.map +0 -1
  184. package/dist/scan/emit.js +0 -144
  185. package/dist/scan/emit.js.map +0 -1
  186. package/dist/scan/handler-parser.d.ts +0 -26
  187. package/dist/scan/handler-parser.d.ts.map +0 -1
  188. package/dist/scan/handler-parser.js +0 -607
  189. package/dist/scan/handler-parser.js.map +0 -1
  190. package/dist/scan/result.d.ts.map +0 -1
  191. package/dist/scan/result.js +0 -2
  192. package/dist/scan/result.js.map +0 -1
  193. package/dist/scan/scanner.d.ts +0 -12
  194. package/dist/scan/scanner.d.ts.map +0 -1
  195. package/dist/scan/scanner.js +0 -569
  196. package/dist/scan/scanner.js.map +0 -1
  197. package/dist/scan/statement.d.ts +0 -4
  198. package/dist/scan/statement.d.ts.map +0 -1
  199. package/dist/scan/statement.js +0 -135
  200. package/dist/scan/statement.js.map +0 -1
  201. package/dist/storage.d.ts.map +0 -1
  202. package/dist/storage.js.map +0 -1
  203. package/dist/store.d.ts.map +0 -1
  204. package/dist/store.js.map +0 -1
  205. package/src/boot/boot.ts +0 -110
  206. package/src/declarations.ts +0 -102
  207. package/src/imports.ts +0 -94
  208. package/src/placement.ts +0 -86
  209. package/src/scan/adapters.ts +0 -32
  210. package/src/scan/bundling.ts +0 -14
  211. package/src/scan/contract.ts +0 -80
  212. package/src/scan/emit.ts +0 -160
  213. package/src/scan/handler-parser.ts +0 -695
  214. package/src/scan/scanner.ts +0 -694
  215. package/src/scan/statement.ts +0 -159
  216. /package/dist/{scan/conventions.d.ts → conventions.d.ts} +0 -0
  217. /package/dist/{scan/conventions.js → conventions.js} +0 -0
  218. /package/dist/{criterion.d.ts → storage/criterion.d.ts} +0 -0
  219. /package/dist/{emit.d.ts → wire/emit.d.ts} +0 -0
  220. /package/dist/{emit.js → wire/emit.js} +0 -0
  221. /package/src/{scan/conventions.ts → conventions.ts} +0 -0
  222. /package/src/{emit.ts → wire/emit.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"criterion.js","sourceRoot":"","sources":["../src/criterion.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,OAAO,EAAc,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAsBrD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAI/G;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,KAAwB,EAAE,KAAc;IACnE,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC1F,uFAAuF;IACvF,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAE/E,OAAO,KAAmB,CAAC;AAC7B,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,aAAa,CAAC,UAAsB;IAClD,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,MAAM,CACtC,CAAC,KAAK,EAAsC,EAAE,CAAE,WAAiC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CACrG,CAAC;AACJ,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,SAAS,CAAC,UAAsB;IAC9C,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAE,WAAiC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AACtG,CAAC"}
@@ -1,29 +0,0 @@
1
- import type { HandlerEntry } from './descriptor/frond.js';
2
- export interface HandlerDeclaration {
3
- /** Stable rule name — the same vocabulary `verify()` uses. */
4
- rule: 'handler-declaration';
5
- frond: string;
6
- filePath: string;
7
- /** The handler that hosts it. */
8
- handler: string;
9
- /** What is declared — `AGREED_WITHIN`, `says`, `Assessment`. */
10
- subject: string;
11
- /** What it is in the source: a value, or a shape. */
12
- kind: 'value' | 'shape';
13
- message: string;
14
- }
15
- /**
16
- * Everything a handler file declares that is not the handler itself.
17
- *
18
- * A handler names gestures; what a gesture uses is declared where its nature says, and one
19
- * question settles which: does it arrive INJECTED or IMPORTED? A threshold, a formula, a word
20
- * list arrive imported and belong to the frond's own module, beside its entities. Anything
21
- * holding a client, a connection or a cursor arrives injected and belongs under `services/`.
22
- * Neither ever belongs in the file that calls it — nothing there can be reached by a second
23
- * caller, and the handler grows into the domain it was supposed to address.
24
- */
25
- export declare function handlerDeclarations(fronds: readonly {
26
- name: string;
27
- handlers: readonly Pick<HandlerEntry, 'name' | 'filePath'>[];
28
- }[]): Promise<HandlerDeclaration[]>;
29
- //# sourceMappingURL=declarations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"declarations.d.ts","sourceRoot":"","sources":["../src/declarations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAQ1D,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,IAAI,EAAE,qBAAqB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAuBD;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,SAAS;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,UAAU,CAAC,EAAE,CAAC;CAC9D,EAAE,GACF,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAwC/B"}
@@ -1,69 +0,0 @@
1
- import { readFile } from 'node:fs/promises';
2
- let _ts;
3
- async function loadTs() {
4
- if (!_ts)
5
- _ts = (await import('@typescript/typescript6')).default;
6
- return _ts;
7
- }
8
- function subjectsOf(typescript, source) {
9
- const found = [];
10
- for (const statement of source.statements) {
11
- if (typescript.isVariableStatement(statement)) {
12
- for (const declared of statement.declarationList.declarations)
13
- if (typescript.isIdentifier(declared.name))
14
- found.push([declared.name.text, 'value']);
15
- }
16
- else if (typescript.isFunctionDeclaration(statement) && statement.name) {
17
- found.push([statement.name.text, 'value']);
18
- }
19
- else if (typescript.isInterfaceDeclaration(statement) ||
20
- typescript.isTypeAliasDeclaration(statement) ||
21
- typescript.isEnumDeclaration(statement)) {
22
- found.push([statement.name.text, 'shape']);
23
- }
24
- }
25
- return found;
26
- }
27
- /**
28
- * Everything a handler file declares that is not the handler itself.
29
- *
30
- * A handler names gestures; what a gesture uses is declared where its nature says, and one
31
- * question settles which: does it arrive INJECTED or IMPORTED? A threshold, a formula, a word
32
- * list arrive imported and belong to the frond's own module, beside its entities. Anything
33
- * holding a client, a connection or a cursor arrives injected and belongs under `services/`.
34
- * Neither ever belongs in the file that calls it — nothing there can be reached by a second
35
- * caller, and the handler grows into the domain it was supposed to address.
36
- */
37
- export async function handlerDeclarations(fronds) {
38
- const typescript = await loadTs();
39
- const found = [];
40
- for (const frond of fronds) {
41
- for (const handler of frond.handlers) {
42
- const text = await readFile(handler.filePath, 'utf8').catch(() => undefined);
43
- if (text === undefined)
44
- continue;
45
- const source = typescript.createSourceFile(handler.filePath, text, typescript.ScriptTarget.Latest, false);
46
- for (const [subject, kind] of subjectsOf(typescript, source)) {
47
- found.push({
48
- rule: 'handler-declaration',
49
- frond: frond.name,
50
- filePath: handler.filePath,
51
- handler: handler.name,
52
- subject,
53
- kind,
54
- message: kind === 'value'
55
- ? `'${subject}' is declared in ${handler.name}, so only ${handler.name} can reach it. `
56
- + `If it needs nothing but its arguments, it is a word of '${frond.name}' and belongs `
57
- + `in a module beside its entities; if it holds a dependency, it is a service. Either `
58
- + `way it is stated once and imported, and the handler keeps only the gesture.`
59
- : `'${subject}' is declared in ${handler.name}, which makes the shape of what an `
60
- + `operation answers readable only from the file that answers it. A shape belongs `
61
- + `with the entity it describes, or in the frond's own module — where the caller, `
62
- + `the test and the other operations can all name it.`,
63
- });
64
- }
65
- }
66
- }
67
- return found;
68
- }
69
- //# sourceMappingURL=declarations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"declarations.js","sourceRoot":"","sources":["../src/declarations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,IAAI,GAA0B,CAAC;AAC/B,KAAK,UAAU,MAAM;IACnB,IAAI,CAAC,GAAG;QAAE,GAAG,GAAG,CAAC,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC,CAAC,OAAO,CAAC;IAClE,OAAO,GAAG,CAAC;AACb,CAAC;AAgBD,SAAS,UAAU,CAAC,UAAqB,EAAE,MAAqB;IAC9D,MAAM,KAAK,GAAkC,EAAE,CAAC;IAEhD,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QAC1C,IAAI,UAAU,CAAC,mBAAmB,CAAC,SAAS,C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,MAAM,GAAG,SAAS,CAI7D;AAED,wFAAwF;AACxF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,SAAS;IAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,EAAE,GAAG,MAAM,EAAE,CAO3F"}
package/dist/emit.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"emit.js","sourceRoot":"","sources":["../src/emit.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQ7C,+EAA+E;AAC/E,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC;AACnC,CAAC;AAED,MAAM,MAAM,GAAG,MAAM,CAAC;AAEtB,+EAA+E;AAC/E,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC;QACvD,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;QAC9B,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,gBAAgB,CAAC,QAAgD;IAC/E,OAAO,CAAC,GAAG,IAAI,GAAG,CAChB,QAAQ;aACL,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;aAClC,GAAG,CAAC,aAAa,CAAC;aAClB,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CACxD,CAAC,CAAC;AACL,CAAC"}
package/dist/imports.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import type { FrondDescriptor } from './descriptor/frond.js';
2
- export interface CrossFrondImport {
3
- /** Stable rule name — the same vocabulary `verify()` uses. */
4
- rule: 'cross-frond-import';
5
- /** The frond doing the reaching. */
6
- frond: string;
7
- filePath: string;
8
- /** The specifier as written. */
9
- specifier: string;
10
- /** The frond the path lands in — absent when it lands outside every frond. */
11
- target?: string;
12
- message: string;
13
- }
14
- /** Every relative import that resolves outside its own frond. */
15
- export declare function crossFrondImports(fronds: readonly Pick<FrondDescriptor, 'name' | 'source'>[]): Promise<CrossFrondImport[]>;
16
- //# sourceMappingURL=imports.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../src/imports.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAQ7D,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,IAAI,EAAE,oBAAoB,CAAC;IAC3B,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AA2BD,iEAAiE;AACjE,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,SAAS,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,QAAQ,CAAC,EAAE,GAC1D,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAwC7B"}
package/dist/imports.js DELETED
@@ -1,78 +0,0 @@
1
- import { readdir, readFile } from 'node:fs/promises';
2
- import { join, resolve, dirname, relative, isAbsolute } from 'node:path';
3
- let _ts;
4
- async function loadTs() {
5
- if (!_ts)
6
- _ts = (await import('@typescript/typescript6')).default;
7
- return _ts;
8
- }
9
- /** Is `child` inside `parent`? Path-based, so it says nothing about either existing. */
10
- function inside(parent, child) {
11
- const rel = relative(parent, child);
12
- return rel !== '' && !rel.startsWith('..') && !isAbsolute(rel);
13
- }
14
- async function sourcesUnder(dir) {
15
- const out = [];
16
- let entries;
17
- try {
18
- entries = await readdir(dir, { withFileTypes: true });
19
- }
20
- catch {
21
- // Unreadable is the scan's complaint, not this rule's — and an absent directory is
22
- // ordinary (a frond with no handlers).
23
- return out;
24
- }
25
- for (const entry of entries) {
26
- if (entry.name === 'node_modules' || entry.name.startsWith('.'))
27
- continue;
28
- const full = join(dir, entry.name);
29
- if (entry.isDirectory())
30
- out.push(...await sourcesUnder(full));
31
- else if (entry.name.endsWith('.ts') && !entry.name.endsWith('.d.ts'))
32
- out.push(full);
33
- }
34
- return out;
35
- }
36
- /** Every relative import that resolves outside its own frond. */
37
- export async function crossFrondImports(fronds) {
38
- const typescript = await loadTs();
39
- // `source.package` is the scoped name the scan already resolved — the remedy this rule
40
- // prints must be the name that actually resolves, not one rebuilt from a prefix here.
41
- const roots = fronds.map((frond) => ({
42
- name: frond.name, path: resolve(frond.source.path), package: frond.source.package,
43
- }));
44
- const found = [];
45
- for (const root of roots) {
46
- for (const filePath of await sourcesUnder(root.path)) {
47
- const text = await readFile(filePath, 'utf8').catch(() => undefined);
48
- if (text === undefined)
49
- continue;
50
- for (const { fileName: specifier } of typescript.preProcessFile(text, true, true).importedFiles) {
51
- if (!specifier.startsWith('.'))
52
- continue;
53
- const landed = resolve(dirname(filePath), specifier);
54
- if (inside(root.path, landed))
55
- continue;
56
- const target = roots.find((other) => other.name !== root.name && inside(other.path, landed));
57
- found.push({
58
- rule: 'cross-frond-import',
59
- frond: root.name,
60
- filePath,
61
- specifier,
62
- ...(target ? { target: target.name } : {}),
63
- message: target
64
- ? `'${specifier}' resolves into frond '${target.name}'. A relative path states that `
65
- + `these two fronds share a directory tree — a constraint nothing declares, and one `
66
- + `that nothing here can see. Write '${target.package}/…' instead: it says the `
67
- + `same dependency in terms the model reads, and it is the form \`fougere sync\` writes, `
68
- + `so it survives '${target.name}' moving out.`
69
- : `'${specifier}' resolves outside frond '${root.name}', into no frond at all. `
70
- + `Whatever it reaches is not part of any frond's contract, so nothing carries it `
71
- + `when this one is deployed on its own.`,
72
- });
73
- }
74
- }
75
- }
76
- return found;
77
- }
78
- //# sourceMappingURL=imports.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"imports.js","sourceRoot":"","sources":["../src/imports.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGzE,IAAI,GAA0B,CAAC;AAC/B,KAAK,UAAU,MAAM;IACnB,IAAI,CAAC,GAAG;QAAE,GAAG,GAAG,CAAC,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC,CAAC,OAAO,CAAC;IAClE,OAAO,GAAG,CAAC;AACb,CAAC;AAeD,wFAAwF;AACxF,SAAS,MAAM,CAAC,MAAc,EAAE,KAAa;IAC3C,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACpC,OAAO,GAAG,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AACjE,CAAC;AAED,KAAK,UAAU,YAAY,CAAC,GAAW;IACrC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,IAAI,OAAO,CAAC;IACZ,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC;IAAC,MAAM,CAAC;QACP,mFAAmF;QACnF,uCAAuC;QACvC,OAAO,GAAG,CAAC;IACb,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QAC1E,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG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AAa,EAAE,CAAC;gBAChG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC;oBAAE,SAAS;gBACzC,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,CAAC;gBACrD,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC;oBAAE,SAAS;gBAExC,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;gBAC7F,KAAK,CAAC,IAAI,CAAC;oBACT,IAAI,EAAE,oBAAoB;oBAC1B,KAAK,EAAE,IAAI,CAAC,IAAI;oBAChB,QAAQ;oBACR,SAAS;oBACT,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC1C,OAAO,EAAE,MAAM;wBACb,CAAC,CAAC,IAAI,SAAS,0BAA0B,MAAM,CAAC,IAAI,iCAAiC;8BACjF,mFAAmF;8BACnF,qCAAqC,MAAM,CAAC,OAAO,2BAA2B;8BAC9E,wFAAwF;8BACxF,mBAAmB,MAAM,CAAC,IAAI,eAAe;wBACjD,CAAC,CAAC,IAAI,SAAS,6BAA6B,IAAI,CAAC,IAAI,2BAA2B;8BAC5E,iFAAiF;8BACjF,uCAAuC;iBAC9C,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,25 +0,0 @@
1
- import { type Conventions } from './scan/conventions.js';
2
- import type { FrondDescriptor } from './descriptor/frond.js';
3
- export interface OutsideConvention {
4
- /** Stable rule name — the same vocabulary `verify()` uses. */
5
- rule: 'outside-convention';
6
- frond: string;
7
- filePath: string;
8
- kind: 'file' | 'directory';
9
- message: string;
10
- }
11
- /**
12
- * What sits in a frond and belongs to no convention — a directory somebody invented, or a
13
- * module dropped at the root.
14
- *
15
- * The eight names are the frond's whole vocabulary, and until now nothing said so: a scan
16
- * READS them and steps over everything else in silence, so a file outside them is not
17
- * refused, it is unseen. That silence is what lets a domain word settle wherever it was
18
- * first needed — most often in the handler that used it, which is a second rule
19
- * (`handler-declaration`) reporting the same drift one file lower.
20
- *
21
- * It names the addresses rather than describing them: a rule that says "put it somewhere
22
- * better" is advice, and advice is what everybody already had.
23
- */
24
- export declare function outsideConventions(fronds: readonly Pick<FrondDescriptor, 'name' | 'source'>[], conventions: Conventions): Promise<OutsideConvention[]>;
25
- //# sourceMappingURL=placement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"placement.d.ts","sourceRoot":"","sources":["../src/placement.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,IAAI,EAAE,oBAAoB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAaD;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,SAAS,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,QAAQ,CAAC,EAAE,EAC3D,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC,iBAAiB,EAAE,CAAC,CA2C9B"}
package/dist/placement.js DELETED
@@ -1,69 +0,0 @@
1
- /** A file inside a frond that no convention names. */
2
- import { readdir } from 'node:fs/promises';
3
- import { join } from 'node:path';
4
- import { frondDirsOf } from './scan/conventions.js';
5
- /**
6
- * `tests` is not a convention and is not an offence either: `@fougere/testing` reads the
7
- * LEVEL a case runs at from where its file sits, so a frond holding its own tests is a
8
- * supported shape (`demos/test-gradient`). The rest are outputs and installs, which are
9
- * not the project's source at all.
10
- */
11
- const NOT_SOURCE = new Set(['tests', 'node_modules', 'dist', 'build', 'coverage']);
12
- /** The one file a frond states about itself, at its root. */
13
- const FROND_FILES = new Set(['frond.config.ts', 'package.json', 'tsconfig.json', 'README.md']);
14
- /**
15
- * What sits in a frond and belongs to no convention — a directory somebody invented, or a
16
- * module dropped at the root.
17
- *
18
- * The eight names are the frond's whole vocabulary, and until now nothing said so: a scan
19
- * READS them and steps over everything else in silence, so a file outside them is not
20
- * refused, it is unseen. That silence is what lets a domain word settle wherever it was
21
- * first needed — most often in the handler that used it, which is a second rule
22
- * (`handler-declaration`) reporting the same drift one file lower.
23
- *
24
- * It names the addresses rather than describing them: a rule that says "put it somewhere
25
- * better" is advice, and advice is what everybody already had.
26
- */
27
- export async function outsideConventions(fronds, conventions) {
28
- const known = new Set(frondDirsOf(conventions));
29
- const addresses = [...known].sort().join(', ');
30
- const found = [];
31
- for (const frond of fronds) {
32
- const entries = await readdir(frond.source.path, { withFileTypes: true }).catch(() => []);
33
- for (const entry of entries) {
34
- if (entry.name.startsWith('.') || NOT_SOURCE.has(entry.name))
35
- continue;
36
- const filePath = join(frond.source.path, entry.name);
37
- if (entry.isDirectory()) {
38
- if (known.has(entry.name))
39
- continue;
40
- found.push({
41
- rule: 'outside-convention',
42
- frond: frond.name,
43
- filePath,
44
- kind: 'directory',
45
- message: `'${entry.name}/' is a directory no convention names, so nothing in it is read `
46
- + `as anything — it is a subject somebody filed under its own word. A frond's `
47
- + `directories are ${addresses}. If what it holds computes with nothing injected it `
48
- + `is \`${conventions.dirs.rules}/\`; if it holds a dependency it is `
49
- + `\`${conventions.dirs.services}/\`.`,
50
- });
51
- continue;
52
- }
53
- if (!entry.name.endsWith('.ts') || FROND_FILES.has(entry.name))
54
- continue;
55
- found.push({
56
- rule: 'outside-convention',
57
- frond: frond.name,
58
- filePath,
59
- kind: 'file',
60
- message: `'${entry.name}' sits at the root of '${frond.name}', where the frond states `
61
- + `itself and nothing else. A frond's directories are ${addresses} — this one belongs `
62
- + `in \`${conventions.dirs.rules}/\` if it computes with nothing injected, in `
63
- + `\`${conventions.dirs.services}/\` if it holds a dependency.`,
64
- });
65
- }
66
- }
67
- return found;
68
- }
69
- //# sourceMappingURL=placement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"placement.js","sourceRoot":"","sources":["../src/placement.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAoB,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAYtE;;;;;GAKG;AACH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AAEnF,6DAA6D;AAC7D,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC;AAE/F;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,MAA2D,EAC3D,WAAwB;IAExB,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAwB,EAAE,CAAC;IAEtC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,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D,SAAS,sBAAsB;sBACrF,QAAQ,WAAW,CAAC,IAAI,CAAC,KAAK,+CAA+C;sBAC7E,KAAK,WAAW,CAAC,IAAI,CAAC,QAAQ,+BAA+B;aAClE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,3 +0,0 @@
1
- /** The adapter names this project depends on — empty when it has no package.json to read. */
2
- export declare function adaptersOf(root: string): Promise<string[]>;
3
- //# sourceMappingURL=adapters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../src/scan/adapters.ts"],"names":[],"mappings":"AAMA,6FAA6F;AAC7F,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAShE"}
@@ -1,25 +0,0 @@
1
- import { readFile } from 'node:fs/promises';
2
- import { join } from 'node:path';
3
- /** Which adapters a PROJECT could load, read off its dependencies. */
4
- const ADAPTER_PACKAGE = /^@fougere\/adapter-(.+)$/;
5
- /** The adapter names this project depends on — empty when it has no package.json to read. */
6
- export async function adaptersOf(root) {
7
- const manifest = await read(join(root, 'package.json'));
8
- if (!manifest)
9
- return [];
10
- const declared = { ...manifest.dependencies, ...manifest.devDependencies };
11
- return Object.keys(declared)
12
- .map((name) => ADAPTER_PACKAGE.exec(name)?.[1])
13
- .filter((name) => name !== undefined);
14
- }
15
- async function read(path) {
16
- try {
17
- return JSON.parse(await readFile(path, 'utf8'));
18
- }
19
- catch {
20
- // No manifest, or one that is not JSON. Either way this cannot validate a name, and
21
- // reporting every `adapters:` key as unknown would be worse than saying nothing.
22
- return undefined;
23
- }
24
- }
25
- //# sourceMappingURL=adapters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapters.js","sourceRoot":"","sources":["../../src/scan/adapters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,sEAAsE;AACtE,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAEnD,6FAA6F;AAC7F,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAY;IAC3C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC;IACxD,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,QAAQ,GAAG,EAAE,GAAG,QAAQ,CAAC,YAAY,EAAE,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;IAE3E,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;SACzB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SAC9C,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;AAC1D,CAAC;AAED,KAAK,UAAU,IAAI,CAAC,IAAY;IAC9B,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAa,CAAC;IAC9D,CAAC;IAAC,MAAM,CAAC;QACP,oFAAoF;QACpF,iFAAiF;QACjF,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- /** What a Fougere boot loads at RUNTIME, so a bundler must leave it alone. */
2
- export declare const RUNTIME_PACKAGES: readonly string[];
3
- //# sourceMappingURL=bundling.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundling.d.ts","sourceRoot":"","sources":["../../src/scan/bundling.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAY7C,CAAC"}
@@ -1,15 +0,0 @@
1
- /** What a Fougere boot loads at RUNTIME, so a bundler must leave it alone. */
2
- export const RUNTIME_PACKAGES = [
3
- '@fougere/app',
4
- '@fougere/core',
5
- '@fougere/schema',
6
- '@fougere/defaults',
7
- '@fougere/transport-http',
8
- '@fougere/adapter-sql',
9
- '@fougere/adapter-graphql',
10
- '@fougere/auth-better',
11
- 'better-sqlite3',
12
- 'jiti',
13
- 'typescript',
14
- ];
15
- //# sourceMappingURL=bundling.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundling.js","sourceRoot":"","sources":["../../src/scan/bundling.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,yBAAyB;IACzB,sBAAsB;IACtB,0BAA0B;IAC1B,sBAAsB;IACtB,gBAAgB;IAChB,MAAM;IACN,YAAY;CACb,CAAC"}
@@ -1,27 +0,0 @@
1
- /** An operation contract, written down — the half two emitters say the same way. */
2
- import { type SchemaView } from '@fougere/schema';
3
- import type { OperationContract } from '../wire/operation.js';
4
- /** A value that ends up as an import in the module being written. */
5
- export type Live = object;
6
- /**
7
- * What the writer needs of an emitter's imports, and nothing more.
8
- *
9
- * The two emitters index theirs differently — one by value against a relative path, one
10
- * by file against the package specifier a project already uses — and neither is wrong for
11
- * the module it writes. What they agree on is this: a value already imported has an
12
- * alias, a class can be imported by name, and an entity can be found by its class name.
13
- */
14
- export interface Aliases {
15
- aliasOf(value: Live): string | undefined;
16
- named(value: Live, filePath: string, name: string): string;
17
- /** The entity class this name belongs to — what a `Partial<X>` names as its source. */
18
- classNamed(name: string): Live | undefined;
19
- }
20
- export declare const lit: (value: unknown) => string;
21
- /** What a schema slot becomes in the generated module. */
22
- export declare function schemaRef(schema: SchemaView | undefined, declaredIn: string, imports: Aliases): string | undefined;
23
- /** One entry of an operations Map, as its module spells it. */
24
- export declare function contractOf(op: string, contract: OperationContract, declaredIn: string, imports: Aliases): string;
25
- /** The operations of one handler, as the Map its reader builds. */
26
- export declare function operationsOf(operations: ReadonlyMap<string, OperationContract>, declaredIn: string, imports: Aliases, indent: string): string;
27
- //# sourceMappingURL=contract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/scan/contract.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO,EAA+B,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,qEAAqE;AACrE,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAE1B;;;;;;;GAOG;AACH,MAAM,WAAW,OAAO;IACtB,OAAO,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;IACzC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3D,uFAAuF;IACvF,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC5C;AAED,eAAO,MAAM,GAAG,GAAI,OAAO,OAAO,KAAG,MAAuC,CAAC;AAE7E,0DAA0D;AAC1D,wBAAgB,SAAS,CACvB,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,GACf,MAAM,GAAG,SAAS,CAiBpB;AAED,+DAA+D;AAC/D,wBAAgB,UAAU,CACxB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,iBAAiB,EAC3B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,GACf,MAAM,CAYR;AAED,mEAAmE;AACnE,wBAAgB,YAAY,CAC1B,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAClD,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,GACb,MAAM,CAIR"}
@@ -1,46 +0,0 @@
1
- /** An operation contract, written down — the half two emitters say the same way. */
2
- import { ANONYMOUS_SCHEMA_NAME, Card } from '@fougere/schema';
3
- export const lit = (value) => JSON.stringify(value ?? null);
4
- /** What a schema slot becomes in the generated module. */
5
- export function schemaRef(schema, declaredIn, imports) {
6
- if (!schema)
7
- return undefined;
8
- const known = imports.aliasOf(schema);
9
- if (known)
10
- return known;
11
- const name = schema.name;
12
- if (name && name !== ANONYMOUS_SCHEMA_NAME)
13
- return imports.named(schema, declaredIn, name);
14
- const card = Card.fromSchema(schema);
15
- const source = card.origin?.from ?? card.descriptor.title;
16
- const from = source ? imports.classNamed(source) : undefined;
17
- if (from)
18
- return `${imports.aliasOf(from)}.partial()`;
19
- throw new Error(`A scan cannot be written down: an anonymous schema in ${declaredIn} names no source. `
20
- + 'Only `Partial<X>` is derivable here, and it says which X it came from.');
21
- }
22
- /** One entry of an operations Map, as its module spells it. */
23
- export function contractOf(op, contract, declaredIn, imports) {
24
- const parts = [];
25
- const input = schemaRef(contract.input, declaredIn, imports);
26
- const output = schemaRef(contract.output, declaredIn, imports);
27
- if (input)
28
- parts.push(`input: ${input}`);
29
- if (output)
30
- parts.push(`output: ${output}`);
31
- if (contract.binding !== undefined)
32
- parts.push(`binding: ${lit(contract.binding)}`);
33
- if (contract.description !== undefined)
34
- parts.push(`description: ${lit(contract.description)}`);
35
- if (contract.cardinality !== undefined)
36
- parts.push(`cardinality: ${lit(contract.cardinality)}`);
37
- if (contract.signature !== undefined)
38
- parts.push(`signature: ${lit(contract.signature)}`);
39
- return `[${lit(op)}, { ${parts.join(', ')} }]`;
40
- }
41
- /** The operations of one handler, as the Map its reader builds. */
42
- export function operationsOf(operations, declaredIn, imports, indent) {
43
- const ops = [...operations].map((entry) => contractOf(entry[0], entry[1], declaredIn, imports));
44
- return `new Map([\n${indent} ${ops.join(`,\n${indent} `)}\n${indent}])`;
45
- }
46
- //# sourceMappingURL=contract.js.map
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AE,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAClF,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,WAAW,CAAC,WAAwB;IAClD,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC,IAAI,CAAC;IAChG,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC;YACjB,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ;YAClE,GAAG,cAAc,CAAC,WAAW,CAAC;SAC/B,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { ScanResult } from './result.js';
2
- export interface EmitOptions {
3
- /** Where the generated module will sit. Imports are written relative to it. */
4
- outFile: string;
5
- /** How `@fougere/core` is reached from there. Default: the package name. */
6
- core?: string;
7
- }
8
- /** Write a scan down. */
9
- export declare function emitScan(result: ScanResult, options: EmitOptions): string;
10
- //# sourceMappingURL=emit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../../src/scan/emit.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAuGD,yBAAyB;AACzB,wBAAgB,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CA2CzE"}