@kubb/ast 5.22.0 → 5.23.1
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.
- package/dist/base-IpYuh3ZP.d.cts +173 -0
- package/dist/base-IpYuh3ZP.d.ts +173 -0
- package/dist/constants-Ckeonm-D.js +141 -0
- package/dist/constants-Ckeonm-D.js.map +1 -0
- package/dist/constants-CquR083U.cjs +152 -0
- package/dist/constants-CquR083U.cjs.map +1 -0
- package/dist/factory.cjs +23 -0
- package/dist/factory.d.cts +4 -0
- package/dist/factory.d.ts +4 -0
- package/dist/factory.js +4 -0
- package/dist/file-BVqSiSvV.d.cts +624 -0
- package/dist/file-Cg0T6cgz.cjs +319 -0
- package/dist/file-Cg0T6cgz.cjs.map +1 -0
- package/dist/file-CnuL8oUj.js +283 -0
- package/dist/file-CnuL8oUj.js.map +1 -0
- package/dist/file-CvlMAp_d.js +131 -0
- package/dist/file-CvlMAp_d.js.map +1 -0
- package/dist/file-Dd50jPkH.cjs +142 -0
- package/dist/file-Dd50jPkH.cjs.map +1 -0
- package/dist/file-xJnBQPGq.d.ts +624 -0
- package/dist/file.cjs +3 -0
- package/dist/file.d.cts +2 -0
- package/dist/file.d.ts +2 -0
- package/dist/file.js +1 -0
- package/dist/graph-BcwFCvei.js +144 -0
- package/dist/graph-BcwFCvei.js.map +1 -0
- package/dist/graph-DcIY6tQb.cjs +173 -0
- package/dist/graph-DcIY6tQb.cjs.map +1 -0
- package/dist/graph.cjs +6 -0
- package/dist/graph.d.cts +2 -0
- package/dist/graph.d.ts +2 -0
- package/dist/graph.js +1 -0
- package/dist/guards-B8qDgSaT.d.cts +23 -0
- package/dist/guards-COVJE6TU.cjs +41 -0
- package/dist/guards-COVJE6TU.cjs.map +1 -0
- package/dist/guards-D-h9R_sV.d.ts +23 -0
- package/dist/guards-DlJkKsT1.js +30 -0
- package/dist/guards-DlJkKsT1.js.map +1 -0
- package/dist/http-Bm5lhVK4.cjs +12 -0
- package/dist/http-Bm5lhVK4.cjs.map +1 -0
- package/dist/http-DwboM6pK.js +7 -0
- package/dist/http-DwboM6pK.js.map +1 -0
- package/dist/http.cjs +4 -0
- package/dist/http.d.cts +3 -0
- package/dist/http.d.ts +3 -0
- package/dist/http.js +2 -0
- package/dist/index-BWd95onW.d.cts +5 -0
- package/dist/index-Bb1kqq8H.d.cts +20 -0
- package/dist/index-BngGJux5.d.cts +12 -0
- package/dist/index-BwnMIoLl.d.ts +24 -0
- package/dist/index-C-vhkzwR.d.cts +79 -0
- package/dist/index-CAGuKv6t.d.ts +74 -0
- package/dist/index-CFH4ZC7q.d.ts +44 -0
- package/dist/index-CIqwy4EE.d.cts +74 -0
- package/dist/index-Cc2K3OzU.d.cts +11 -0
- package/dist/index-Cc2K3OzU.d.ts +11 -0
- package/dist/index-Csf8xsCc.d.cts +46 -0
- package/dist/index-D3M2spDR.d.ts +12 -0
- package/dist/index-DNiIem0x.d.ts +79 -0
- package/dist/index-DSVef1pp.d.cts +24 -0
- package/dist/index-DU_jYpBt.d.cts +44 -0
- package/dist/index-DYDha-3I.d.cts +67 -0
- package/dist/index-DaHsMJ_S.d.ts +5 -0
- package/dist/index-Dp50LM3a.d.ts +67 -0
- package/dist/index-cpjUxIik.d.ts +46 -0
- package/dist/index-eGkM4FE9.d.ts +20 -0
- package/dist/index.cjs +87 -2131
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -2745
- package/dist/index.d.ts +25 -2745
- package/dist/index.js +40 -2052
- package/dist/index.js.map +1 -1
- package/dist/json-DH7_lcWm.js +74 -0
- package/dist/json-DH7_lcWm.js.map +1 -0
- package/dist/json-DURdtz9A.cjs +91 -0
- package/dist/json-DURdtz9A.cjs.map +1 -0
- package/dist/json.cjs +4 -0
- package/dist/json.d.cts +2 -0
- package/dist/json.d.ts +2 -0
- package/dist/json.js +1 -0
- package/dist/macro-D0KfNtff.js +104 -0
- package/dist/macro-D0KfNtff.js.map +1 -0
- package/dist/macro-DrTBT7fh.cjs +127 -0
- package/dist/macro-DrTBT7fh.cjs.map +1 -0
- package/dist/macro.cjs +4 -0
- package/dist/macro.d.cts +2 -0
- package/dist/macro.d.ts +2 -0
- package/dist/macro.js +1 -0
- package/dist/mediaType-CRjggmoG.js +19 -0
- package/dist/mediaType-CRjggmoG.js.map +1 -0
- package/dist/mediaType-D8uIO8sG.cjs +35 -0
- package/dist/mediaType-D8uIO8sG.cjs.map +1 -0
- package/dist/mediaType.cjs +4 -0
- package/dist/mediaType.d.cts +2 -0
- package/dist/mediaType.d.ts +2 -0
- package/dist/mediaType.js +1 -0
- package/dist/node-DjcETnc8.cjs +19 -0
- package/dist/node-DjcETnc8.cjs.map +1 -0
- package/dist/node-Djh-mZB2.js +14 -0
- package/dist/node-Djh-mZB2.js.map +1 -0
- package/dist/node.cjs +9 -0
- package/dist/node.d.cts +4 -0
- package/dist/node.d.ts +4 -0
- package/dist/node.js +5 -0
- package/dist/nodeText-DRb_rVd1.cjs +58 -0
- package/dist/nodeText-DRb_rVd1.cjs.map +1 -0
- package/dist/nodeText-DVVDZQjF.js +47 -0
- package/dist/nodeText-DVVDZQjF.js.map +1 -0
- package/dist/nodes-BB60Bq2H.cjs +320 -0
- package/dist/nodes-BB60Bq2H.cjs.map +1 -0
- package/dist/nodes-CWMa9xhW.js +231 -0
- package/dist/nodes-CWMa9xhW.js.map +1 -0
- package/dist/operation-BgRyVS7z.d.ts +1272 -0
- package/dist/operation-X7chCdL2.d.cts +1272 -0
- package/dist/optionality-D-zqzVMH.cjs +22 -0
- package/dist/optionality-D-zqzVMH.cjs.map +1 -0
- package/dist/optionality-DISn8ytP.js +17 -0
- package/dist/optionality-DISn8ytP.js.map +1 -0
- package/dist/promise-BOdlgT0N.cjs +50 -0
- package/dist/promise-BOdlgT0N.cjs.map +1 -0
- package/dist/promise-RpnEev9D.js +45 -0
- package/dist/promise-RpnEev9D.js.map +1 -0
- package/dist/ref-Bu7PoHar.js +22 -0
- package/dist/ref-Bu7PoHar.js.map +1 -0
- package/dist/ref-P0ZLT1Bg.cjs +39 -0
- package/dist/ref-P0ZLT1Bg.cjs.map +1 -0
- package/dist/ref.cjs +7 -0
- package/dist/ref.d.cts +2 -0
- package/dist/ref.d.ts +2 -0
- package/dist/ref.js +3 -0
- package/dist/refs-CYHpRlQo.cjs +131 -0
- package/dist/refs-CYHpRlQo.cjs.map +1 -0
- package/dist/refs-YCV3CznS.js +102 -0
- package/dist/refs-YCV3CznS.js.map +1 -0
- package/dist/rolldown-runtime-BV8xUvPy.cjs +52 -0
- package/dist/rolldown-runtime-BYyVTPww.js +16 -0
- package/dist/schema-2ZAQk7qE.js +44 -0
- package/dist/schema-2ZAQk7qE.js.map +1 -0
- package/dist/schema-BIErWqgc.cjs +214 -0
- package/dist/schema-BIErWqgc.cjs.map +1 -0
- package/dist/schema-DloctnMm.js +179 -0
- package/dist/schema-DloctnMm.js.map +1 -0
- package/dist/schema-hxMlgCrV.cjs +49 -0
- package/dist/schema-hxMlgCrV.cjs.map +1 -0
- package/dist/schema.cjs +16 -0
- package/dist/schema.d.cts +5 -0
- package/dist/schema.d.ts +5 -0
- package/dist/schema.js +6 -0
- package/dist/visitor-BZozlXBF.d.ts +179 -0
- package/dist/visitor-Bw_opzjF.d.cts +179 -0
- package/dist/visitor-DTrzvA3R.cjs +382 -0
- package/dist/visitor-DTrzvA3R.cjs.map +1 -0
- package/dist/visitor-NoQSUQTu.js +347 -0
- package/dist/visitor-NoQSUQTu.js.map +1 -0
- package/package.json +101 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { n as FileNode } from "./file-xJnBQPGq.js";
|
|
2
|
+
type InlineFilesResult = {
|
|
3
|
+
/**
|
|
4
|
+
* Files that imported an inline name, rewritten to hold its definition.
|
|
5
|
+
*/
|
|
6
|
+
files: Array<FileNode>;
|
|
7
|
+
/**
|
|
8
|
+
* Paths of the virtual files, which are not written.
|
|
9
|
+
*/
|
|
10
|
+
virtualPaths: Array<string>;
|
|
11
|
+
/**
|
|
12
|
+
* One message per name that could not be inlined.
|
|
13
|
+
*/
|
|
14
|
+
problems: Array<{
|
|
15
|
+
path: string;
|
|
16
|
+
message: string;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The language-specific half of {@link inlineFiles}, supplied by the parser that prints the file.
|
|
21
|
+
*/
|
|
22
|
+
type InlineLanguage = {
|
|
23
|
+
/**
|
|
24
|
+
* Swaps in what `replace` returns for every identifier in `text` that references a name, skipping strings and comments.
|
|
25
|
+
*/
|
|
26
|
+
replaceIdentifiers(text: string, replace: (name: string) => string | undefined): string;
|
|
27
|
+
/**
|
|
28
|
+
* Makes `expression` safe to put where a name was, such as `(A | B)` in TypeScript.
|
|
29
|
+
*/
|
|
30
|
+
wrap(expression: string): string;
|
|
31
|
+
};
|
|
32
|
+
type InlineFilesOptions = {
|
|
33
|
+
/**
|
|
34
|
+
* The inline support for a file's language, or `undefined` when it has none.
|
|
35
|
+
*/
|
|
36
|
+
language: (file: FileNode) => InlineLanguage | undefined;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Replaces every name a file imports from a virtual file (one whose sources are all inline, so it is never written) with that name's
|
|
40
|
+
* `inline.expression`, until no inline names are left. The definitions' own imports move to the importing file.
|
|
41
|
+
*/
|
|
42
|
+
declare function inlineFiles(files: ReadonlyArray<FileNode>, { language }: InlineFilesOptions): InlineFilesResult;
|
|
43
|
+
declare namespace index_d_exports {
|
|
44
|
+
export { inlineFiles as inline };
|
|
45
|
+
}
|
|
46
|
+
export { InlineLanguage as n, inlineFiles as r, index_d_exports as t };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { T as InputNode } from "./operation-BgRyVS7z.js";
|
|
2
|
+
declare namespace index_d_exports {
|
|
3
|
+
export { parse, stringify };
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Turns an `InputNode` into JSON text that `parse` reads back. Every schema a ref points at is written once,
|
|
7
|
+
* where a plain `JSON.stringify(input)` writes it again at every ref.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* await writeFile('input.json', ast.json.stringify(input))
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
declare function stringify(input: InputNode): string;
|
|
15
|
+
/**
|
|
16
|
+
* Reads the text `stringify` wrote back into an `InputNode`. Refs to one schema share one object again.
|
|
17
|
+
* Throws on another format version, or on a ref whose target is missing.
|
|
18
|
+
*/
|
|
19
|
+
declare function parse(text: string): InputNode;
|
|
20
|
+
export { parse as n, stringify as r, index_d_exports as t };
|