@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
package/dist/scan/emit.js DELETED
@@ -1,144 +0,0 @@
1
- /** The scan, written down as a module — what `createApp` is handed where there is no disk. */
2
- import { dirname, relative } from 'node:path';
3
- import { nameOf } from '../descriptor/frond.js';
4
- import { lit, operationsOf, schemaRef } from './contract.js';
5
- /** Is a TypeScript compiler going to read this module? Its name is the only thing that says. */
6
- const isTypeScript = (outFile) => /\.tsx?$/.test(outFile);
7
- /** A source file becomes a specifier its reader can follow — and the two readers differ. */
8
- function specifierOf(filePath, outFile) {
9
- const path = relative(dirname(outFile), filePath);
10
- const rel = isTypeScript(outFile) ? path.replace(/\.tsx?$/, '.js') : path;
11
- return rel.startsWith('.') ? rel : `./${rel}`;
12
- }
13
- class Imports {
14
- outFile;
15
- byValue = new Map();
16
- lines = [];
17
- /** Entity classes by their class name — what a `Partial<X>` names as its source. */
18
- byClassName = new Map();
19
- constructor(outFile) {
20
- this.outFile = outFile;
21
- }
22
- /** Register `value` as the default export of `filePath`, and answer its alias. */
23
- default(value, filePath) {
24
- const known = this.byValue.get(value);
25
- if (known)
26
- return known;
27
- const alias = `_${this.lines.length}`;
28
- this.lines.push(`import ${alias} from '${specifierOf(filePath, this.outFile)}';`);
29
- this.byValue.set(value, alias);
30
- return alias;
31
- }
32
- /** Register `value` as a NAMED export of `filePath` — its class name is the export. */
33
- named(value, filePath, name) {
34
- const known = this.byValue.get(value);
35
- if (known)
36
- return known;
37
- const alias = `_${this.lines.length}`;
38
- this.lines.push(`import { ${name} as ${alias} } from '${specifierOf(filePath, this.outFile)}';`);
39
- this.byValue.set(value, alias);
40
- return alias;
41
- }
42
- has(value) { return this.byValue.has(value); }
43
- aliasOf(value) { return this.byValue.get(value); }
44
- classNamed(name) { return this.byClassName.get(name); }
45
- render() { return this.lines.join('\n'); }
46
- }
47
- function entityOf(e, imports) {
48
- return `{ name: ${lit(e.name)}, entityClass: ${imports.aliasOf(e.entityClass)}, `
49
- + `filePath: ${lit(e.filePath)}, exposed: ${lit(e.exposed)} }`;
50
- }
51
- function handlerOf(h, imports) {
52
- const ops = operationsOf(h.operations, h.filePath, imports, ' ');
53
- const override = schemaRef(h.outputOverride, h.filePath, imports);
54
- return `{ name: ${lit(h.name)}, address: ${lit(h.address)}, ctor: ${imports.aliasOf(h.ctor)}, `
55
- + `deps: ${lit(h.deps)}, filePath: ${lit(h.filePath)}, exposed: ${lit(h.exposed)}, `
56
- + (h.surface ? `surface: ${lit(h.surface)}, ` : '')
57
- + (override ? `outputOverride: ${override}, ` : '')
58
- + `operations: ${ops} }`;
59
- }
60
- function presenterOf(p, imports) {
61
- // `views` is not written: it is read back off the constructor (`__views`), so emitting
62
- // it would be a second copy of a statement the imported class already carries.
63
- return `{ entityName: ${lit(p.entityName)}, ctor: ${imports.aliasOf(p.ctor)}, `
64
- + `fields: ${lit(p.fields)}, fieldMeta: ${lit(p.fieldMeta)}, deps: ${lit(p.deps)}, `
65
- + `filePath: ${lit(p.filePath)} }`;
66
- }
67
- function collectorOf(c, imports) {
68
- return `{ typeName: ${lit(c.typeName)}, ctor: ${imports.aliasOf(c.ctor)}, `
69
- + `deps: ${lit(c.deps)}, filePath: ${lit(c.filePath)} }`;
70
- }
71
- function providerOf(p, imports) {
72
- return `{ name: ${lit(nameOf(p))}, ctor: ${imports.aliasOf(p.ctor)}, `
73
- + `deps: ${lit(p.deps)}, filePath: ${lit(p.filePath)} }`;
74
- }
75
- function seedOf(s, imports) {
76
- const data = typeof s.data === 'function' ? imports.aliasOf(s.data) : lit(s.data);
77
- return `{ entityName: ${lit(s.entityName)}, data: ${data}, filePath: ${lit(s.filePath)} }`;
78
- }
79
- function frondOf(f, imports) {
80
- const list = (label, items) => ` ${label}: [${items.length ? `\n ${items.join(',\n ')},\n ` : ''}],`;
81
- return [
82
- ' {',
83
- ` name: ${lit(f.name)},`,
84
- ` source: ${lit(f.source)},`,
85
- list('providers', f.providers.map((p) => providerOf(p, imports))),
86
- list('entities', f.entities.map((e) => entityOf(e, imports))),
87
- list('handlers', f.handlers.map((h) => handlerOf(h, imports))),
88
- list('presenters', f.presenters.map((p) => presenterOf(p, imports))),
89
- list('collectors', f.collectors.map((c) => collectorOf(c, imports))),
90
- list('seeds', f.seeds.map((s) => seedOf(s, imports))),
91
- f.surfaces ? ` surfaces: ${lit(f.surfaces)},` : '',
92
- f.reads ? ` reads: ${lit(f.reads)},` : '',
93
- ' }',
94
- ].filter(Boolean).join('\n');
95
- }
96
- /** Write a scan down. */
97
- export function emitScan(result, options) {
98
- const imports = new Imports(options.outFile);
99
- const core = options.core ?? '@fougere/core';
100
- // Every class the descriptor names by a file comes first: a schema slot holding one of
101
- // them then finds it in the table instead of being imported a second time.
102
- for (const f of result.fronds) {
103
- for (const e of f.entities) {
104
- imports.default(e.entityClass, e.filePath);
105
- const name = e.entityClass.name;
106
- if (name)
107
- imports.byClassName.set(name, e.entityClass);
108
- }
109
- for (const p of f.providers)
110
- imports.default(p.ctor, p.filePath);
111
- for (const h of f.handlers)
112
- imports.default(h.ctor, h.filePath);
113
- for (const p of f.presenters)
114
- imports.default(p.ctor, p.filePath);
115
- for (const c of f.collectors)
116
- imports.default(c.ctor, c.filePath);
117
- for (const s of f.seeds)
118
- if (typeof s.data === 'function')
119
- imports.default(s.data, s.filePath);
120
- }
121
- const fronds = result.fronds.map((f) => frondOf(f, imports)).join(',\n');
122
- // `cause` is dropped: it is an Error, and the build that produced this already reported
123
- // it. What a boot logs is the message, and that travels.
124
- const diagnostics = result.diagnostics.map(({ cause: _cause, ...rest }) => lit(rest));
125
- // The annotation is a convenience for a file a human's tsc will read; it is never what
126
- // makes the value correct. A bundler parses a `.mjs` as JavaScript and `import type`
127
- // stops it dead — measured, Nitro's rollup refused the Nuxt template at that line.
128
- const typed = isTypeScript(options.outFile);
129
- return `// Generated by \`fougere build\` — the scan, written down. Do not edit.
130
- //
131
- // \`createApp\` reads this instead of a disk. Everything here was decided by the scan that
132
- // produced it; nothing is resolved a second time.
133
- import { Fronds } from '${core}';
134
- ${typed ? `import type { ScanResult } from '${core}';\n` : ''}${imports.render()}
135
-
136
- export const scan${typed ? ': ScanResult' : ''} = {
137
- fronds: Fronds.hosting([
138
- ${fronds}
139
- ]),
140
- diagnostics: [${diagnostics.join(', ')}],
141
- };
142
- `;
143
- }
144
- //# sourceMappingURL=emit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emit.js","sourceRoot":"","sources":["../../src/scan/emit.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhD,OAAO,EAA2B,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAStF,gGAAgG;AAChG,MAAM,YAAY,GAAG,CAAC,OAAe,EAAW,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAE3E,4FAA4F;AAC5F,SAAS,WAAW,CAAC,QAAgB,EAAE,OAAe;IACpD,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC;IAClD,MAAM,GAAG,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1E,OAAO,GAAG,CAAC,UAAU,CAAC,GAAG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CAAC,IAAI,CAAC,CAAC,CAAC;IAEtF,uFAAuF;IACvF,qFAAqF;IACrF,mFAAmF;IACnF,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5C,OAAO;;;;0BAIiB,IAAI;EAC5B,KAAK,CAAC,CAAC,CAAC,oCAAoC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE;;mBAE7D,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;;EAE5C,MAAM;;kBAEU,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;;CAEvC,CAAC;AACF,CAAC"}
@@ -1,26 +0,0 @@
1
- /** Handler signature parser — extracts method signatures from handler source files. */
2
- import type { Param, Signature } from '../wire/signature.js';
3
- export declare function resetTypePrograms(): void;
4
- /** Drop what runs share. For a test that must prove a cold read. */
5
- export declare function forgetParsedSources(): void;
6
- /** Declare every file a run will read, so one program covers it. */
7
- export declare function seedTypeProgram(filePaths: readonly string[], projectRoot?: string): Promise<void>;
8
- /** What a handler file yielded — its methods, AND what the pass could not open. */
9
- export interface HandlerParse {
10
- methods: Signature[];
11
- /** Base classes whose source this pass could not open. Empty is a claim. */
12
- unresolvedHeritage: string[];
13
- }
14
- /**
15
- * Every method a handler declares, its inherited ones included — the raw material of a
16
- * binding plan. With a `projectRoot`, the heritage clause is followed too.
17
- */
18
- export declare function parseAllHandlerMethods(filePath: string, projectRoot?: string): Promise<HandlerParse>;
19
- /** Parse a presenter source file and extract all method signatures. */
20
- export declare function parsePresenterMethods(filePath: string, projectRoot?: string): Promise<Signature[]>;
21
- /**
22
- * Parse constructor parameter types from a source file's default class.
23
- * Returns type names (e.g. ['PostStorage', 'Logger']) for DI resolution.
24
- */
25
- export declare function parseConstructorParams(filePath: string, projectRoot?: string): Promise<Param[]>;
26
- //# sourceMappingURL=handler-parser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handler-parser.d.ts","sourceRoot":"","sources":["../../src/scan/handler-parser.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,OAAO,KAAK,EAAW,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AA8BtE,wBAAgB,iBAAiB,IAAI,IAAI,CAGxC;AAED,oEAAoE;AACpE,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C;AAgFD,oEAAoE;AACpE,wBAAsB,eAAe,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBvG;AA2eD,mFAAmF;AACnF,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,4EAA4E;IAC5E,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAG1G;AAED,uEAAuE;AACvE,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAKxG;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAQrG"}