@tutao/licc 3.98.2
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/README.md +137 -0
- package/cli.js +0 -0
- package/dist/Accumulator.js +23 -0
- package/dist/KotlinGenerator.js +224 -0
- package/dist/Parser.js +49 -0
- package/dist/SwiftGenerator.js +232 -0
- package/dist/TypescriptGenerator.js +199 -0
- package/dist/cli.js +83 -0
- package/dist/common.js +18 -0
- package/dist/index.js +118 -0
- package/dist/tsbuildinfo +1 -0
- package/lib/Accumulator.ts +30 -0
- package/lib/KotlinGenerator.ts +241 -0
- package/lib/Parser.ts +68 -0
- package/lib/SwiftGenerator.ts +248 -0
- package/lib/TypescriptGenerator.ts +222 -0
- package/lib/cli.ts +94 -0
- package/lib/common.ts +91 -0
- package/lib/index.ts +126 -0
- package/package.json +25 -0
- package/test/ParserTest.ts +124 -0
- package/test/Suite.ts +6 -0
- package/test/tsconfig.json +19 -0
- package/tsconfig.json +111 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { Accumulator } from "./Accumulator.js";
|
|
2
|
+
import { getArgs, minusculize } from "./common.js";
|
|
3
|
+
import { parseType } from "./Parser.js";
|
|
4
|
+
import path from "path";
|
|
5
|
+
export class TypescriptGenerator {
|
|
6
|
+
generateGlobalDispatcher(name, facadeNames) {
|
|
7
|
+
const acc = new Accumulator();
|
|
8
|
+
for (let facadeName of facadeNames) {
|
|
9
|
+
acc.line(`import {${facadeName}} from "./${facadeName}.js"`);
|
|
10
|
+
acc.line(`import {${facadeName}ReceiveDispatcher} from "./${facadeName}ReceiveDispatcher.js"`);
|
|
11
|
+
}
|
|
12
|
+
acc.line();
|
|
13
|
+
acc.line(`export class ${name} {`);
|
|
14
|
+
const methodAcc = acc.indent();
|
|
15
|
+
for (let facadeName of facadeNames) {
|
|
16
|
+
methodAcc.line(`private readonly ${minusculize(facadeName)} : ${facadeName}ReceiveDispatcher`);
|
|
17
|
+
}
|
|
18
|
+
methodAcc.line(`constructor(`);
|
|
19
|
+
for (let facadeName of facadeNames) {
|
|
20
|
+
methodAcc.indent().line(`${minusculize(facadeName)} : ${facadeName},`);
|
|
21
|
+
}
|
|
22
|
+
methodAcc.line(`) {`);
|
|
23
|
+
for (let facadeName of facadeNames) {
|
|
24
|
+
methodAcc.indent().line(`this.${minusculize(facadeName)} = new ${facadeName}ReceiveDispatcher(${minusculize(facadeName)})`);
|
|
25
|
+
}
|
|
26
|
+
methodAcc.line("}");
|
|
27
|
+
methodAcc.line();
|
|
28
|
+
methodAcc.line(`async dispatch(facadeName: string, methodName: string, args: Array<any>) {`);
|
|
29
|
+
const switchAcc = methodAcc.indent();
|
|
30
|
+
switchAcc.line(`switch (facadeName) {`);
|
|
31
|
+
const caseAcc = switchAcc.indent();
|
|
32
|
+
for (let facadeName of facadeNames) {
|
|
33
|
+
caseAcc.line(`case "${facadeName}":`);
|
|
34
|
+
caseAcc.indent().line(`return this.${minusculize(facadeName)}.dispatch(methodName, args)`);
|
|
35
|
+
}
|
|
36
|
+
caseAcc.line(`default:`);
|
|
37
|
+
caseAcc.indent().line(`throw new Error("licc messed up! " + facadeName)`);
|
|
38
|
+
switchAcc.line(`}`);
|
|
39
|
+
methodAcc.line(`}`);
|
|
40
|
+
acc.line(`}`);
|
|
41
|
+
return acc.finish();
|
|
42
|
+
}
|
|
43
|
+
handleStructDefinition(definition) {
|
|
44
|
+
let acc = new Accumulator();
|
|
45
|
+
this.generateDocComment(acc, definition.doc);
|
|
46
|
+
acc.line(`export interface ${definition.name} {`);
|
|
47
|
+
let bodyGenerator = acc.indent();
|
|
48
|
+
for (const [fieldName, fieldType] of Object.entries(definition.fields)) {
|
|
49
|
+
const { name, externals } = typeNameTypescript(fieldType);
|
|
50
|
+
for (const external of externals) {
|
|
51
|
+
acc.addImport(`import {${external}} from "./${external}.js"`);
|
|
52
|
+
}
|
|
53
|
+
bodyGenerator.line(`readonly ${fieldName}: ${name}`);
|
|
54
|
+
}
|
|
55
|
+
acc.line("}");
|
|
56
|
+
return acc.finish();
|
|
57
|
+
}
|
|
58
|
+
generateDocComment(acc, comment) {
|
|
59
|
+
if (!comment)
|
|
60
|
+
return;
|
|
61
|
+
acc.line("/**");
|
|
62
|
+
acc.line(` * ${comment}`);
|
|
63
|
+
acc.line(" */");
|
|
64
|
+
}
|
|
65
|
+
static generateNativeInterface(accumulator) {
|
|
66
|
+
// Duplicate interface to not import it
|
|
67
|
+
accumulator.line("interface NativeInterface {");
|
|
68
|
+
accumulator.indent().line("invokeNative(requestType: string, args: unknown[]): Promise<any>");
|
|
69
|
+
accumulator.line("}");
|
|
70
|
+
}
|
|
71
|
+
generateFacade(definition) {
|
|
72
|
+
const acc = new Accumulator();
|
|
73
|
+
this.generateDocComment(acc, definition.doc);
|
|
74
|
+
acc.line(`export interface ${definition.name} {\n`);
|
|
75
|
+
let methodAcc = acc.indent();
|
|
76
|
+
for (const [name, method] of Object.entries(definition.methods)) {
|
|
77
|
+
this.generateDocComment(methodAcc, method.doc);
|
|
78
|
+
methodAcc.line(`${name}(`);
|
|
79
|
+
let argAccumulator = methodAcc.indent();
|
|
80
|
+
for (const arg of getArgs(name, method)) {
|
|
81
|
+
const name = renderTypeAndAddImports(arg.type, acc);
|
|
82
|
+
argAccumulator.line(`${arg.name}: ${name},`);
|
|
83
|
+
}
|
|
84
|
+
const resolvedReturnType = renderTypeAndAddImports(method.ret, acc);
|
|
85
|
+
methodAcc.line(`): Promise<${resolvedReturnType}>`);
|
|
86
|
+
methodAcc.line();
|
|
87
|
+
}
|
|
88
|
+
acc.line("}");
|
|
89
|
+
return acc.finish();
|
|
90
|
+
}
|
|
91
|
+
generateReceiveDispatcher(definition) {
|
|
92
|
+
const acc = new Accumulator();
|
|
93
|
+
acc.line(`import {${definition.name}} from "./${definition.name}.js"`);
|
|
94
|
+
acc.line();
|
|
95
|
+
acc.line(`export class ${definition.name}ReceiveDispatcher {`);
|
|
96
|
+
acc.indent().line(`constructor(private readonly facade: ${definition.name}) {}`);
|
|
97
|
+
acc.indent().line(`async dispatch(method: string, arg: Array<any>) : Promise<any> {`);
|
|
98
|
+
acc.indent().indent().line(`switch(method) {`);
|
|
99
|
+
const switchAccumulator = acc.indent().indent().indent();
|
|
100
|
+
for (const [methodName, methodDef] of Object.entries(definition.methods)) {
|
|
101
|
+
switchAccumulator.line(`case "${methodName}": {`);
|
|
102
|
+
const arg = getArgs(methodName, methodDef);
|
|
103
|
+
const decodedArgs = [];
|
|
104
|
+
for (let i = 0; i < arg.length; i++) {
|
|
105
|
+
const { name: argName, type } = arg[i];
|
|
106
|
+
const renderedArgType = renderTypeAndAddImports(type, acc);
|
|
107
|
+
decodedArgs.push([argName, renderedArgType]);
|
|
108
|
+
}
|
|
109
|
+
for (let i = 0; i < arg.length; i++) {
|
|
110
|
+
const [argName, renderedType] = decodedArgs[i];
|
|
111
|
+
switchAccumulator.indent().line(`const ${argName}: ${renderedType} = arg[${i}]`);
|
|
112
|
+
}
|
|
113
|
+
switchAccumulator.indent().line(`return this.facade.${methodName}(`);
|
|
114
|
+
for (let i = 0; i < arg.length; i++) {
|
|
115
|
+
const [argName] = decodedArgs[i];
|
|
116
|
+
switchAccumulator.indent().indent().line(`${argName},`);
|
|
117
|
+
}
|
|
118
|
+
switchAccumulator.indent().line(`)`);
|
|
119
|
+
switchAccumulator.line(`}`);
|
|
120
|
+
}
|
|
121
|
+
acc.indent().indent().line(`}`);
|
|
122
|
+
acc.indent().line(`}`);
|
|
123
|
+
acc.line(`}`);
|
|
124
|
+
return acc.finish();
|
|
125
|
+
}
|
|
126
|
+
generateSendDispatcher(definition) {
|
|
127
|
+
const acc = new Accumulator();
|
|
128
|
+
acc.line(`import {${definition.name}} from "./${definition.name}.js"`);
|
|
129
|
+
acc.line();
|
|
130
|
+
TypescriptGenerator.generateNativeInterface(acc);
|
|
131
|
+
acc.line(`export class ${definition.name}SendDispatcher implements ${definition.name} {`);
|
|
132
|
+
acc.indent().line(`constructor(private readonly transport: NativeInterface) {}`);
|
|
133
|
+
for (const [methodName, _] of Object.entries(definition.methods)) {
|
|
134
|
+
const methodAccumulator = acc.indent();
|
|
135
|
+
methodAccumulator.line(`async ${methodName}(...args: Parameters<${definition.name}["${methodName}"]>) {`);
|
|
136
|
+
methodAccumulator.indent().line(`return this.transport.invokeNative("ipc", ["${definition.name}", "${methodName}", ...args])`);
|
|
137
|
+
methodAccumulator.line(`}`);
|
|
138
|
+
}
|
|
139
|
+
acc.line(`}`);
|
|
140
|
+
return acc.finish();
|
|
141
|
+
}
|
|
142
|
+
generateExtraFiles() {
|
|
143
|
+
return {};
|
|
144
|
+
}
|
|
145
|
+
generateTypeRef(outDir, definitionPath, definition) {
|
|
146
|
+
const acc = new Accumulator();
|
|
147
|
+
let tsPath = definition.location.typescript;
|
|
148
|
+
const isRelative = tsPath.startsWith(".");
|
|
149
|
+
const actualPath = (isRelative)
|
|
150
|
+
? path.relative(path.resolve(outDir), path.resolve(definitionPath, tsPath))
|
|
151
|
+
: tsPath;
|
|
152
|
+
acc.line(`export {${definition.name}} from "${actualPath}"`);
|
|
153
|
+
return acc.finish();
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function renderTypescriptType(parsed) {
|
|
157
|
+
const { baseName, nullable, external } = parsed;
|
|
158
|
+
switch (baseName) {
|
|
159
|
+
case "List":
|
|
160
|
+
const renderedListInner = renderTypescriptType(parsed.generics[0]);
|
|
161
|
+
return {
|
|
162
|
+
externals: renderedListInner.externals,
|
|
163
|
+
name: maybeNullable(`ReadonlyArray<${renderedListInner.name}>`, nullable)
|
|
164
|
+
};
|
|
165
|
+
case "Map":
|
|
166
|
+
const renderedKey = renderTypescriptType(parsed.generics[0]);
|
|
167
|
+
const renderedValue = renderTypescriptType(parsed.generics[1]);
|
|
168
|
+
return {
|
|
169
|
+
externals: [...renderedKey.externals, ...renderedValue.externals],
|
|
170
|
+
name: maybeNullable(`Record<${renderedKey.name}, ${renderedValue.name}>`, nullable)
|
|
171
|
+
};
|
|
172
|
+
case "string":
|
|
173
|
+
return { externals: [], name: maybeNullable("string", nullable) };
|
|
174
|
+
case "boolean":
|
|
175
|
+
return { externals: [], name: maybeNullable("boolean", nullable) };
|
|
176
|
+
case "number":
|
|
177
|
+
return { externals: [], name: maybeNullable("number", nullable) };
|
|
178
|
+
case "bytes":
|
|
179
|
+
return { externals: [], name: maybeNullable("Uint8Array", nullable) };
|
|
180
|
+
case "void":
|
|
181
|
+
return { externals: [], name: maybeNullable("void", nullable) };
|
|
182
|
+
default:
|
|
183
|
+
return { externals: [baseName], name: maybeNullable(baseName, nullable) };
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
function maybeNullable(name, nullable) {
|
|
187
|
+
return nullable ? name + " | null" : name;
|
|
188
|
+
}
|
|
189
|
+
function typeNameTypescript(name) {
|
|
190
|
+
const parsed = parseType(name);
|
|
191
|
+
return renderTypescriptType(parsed);
|
|
192
|
+
}
|
|
193
|
+
function renderTypeAndAddImports(name, acc) {
|
|
194
|
+
const rendered = typeNameTypescript(name);
|
|
195
|
+
for (const external of rendered.externals) {
|
|
196
|
+
acc.addImport(`import {${external}} from "./${external}.js"`);
|
|
197
|
+
}
|
|
198
|
+
return rendered.name;
|
|
199
|
+
}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { generate } from "./index.js";
|
|
3
|
+
import * as fs from "fs";
|
|
4
|
+
import * as path from "path";
|
|
5
|
+
import { globby } from "zx";
|
|
6
|
+
import { Argument, Option, program } from "commander";
|
|
7
|
+
const PLATFORMS = ["ios", "web", "android", "desktop"];
|
|
8
|
+
const USAGE = `licc [options] from_dir to_dir
|
|
9
|
+
|
|
10
|
+
will recursively take all JSON files from \`from-dir\` and compile them.
|
|
11
|
+
output files are written into \`to-dir\`, without preserving subdirectory structure.`;
|
|
12
|
+
await program
|
|
13
|
+
.usage(USAGE)
|
|
14
|
+
.addArgument(new Argument("from_dir").argRequired())
|
|
15
|
+
.addArgument(new Argument("to_dir").argOptional())
|
|
16
|
+
.addOption(new Option('-p, --platform <platform>', 'platform to generate code for. if not specified, from_dir must be omitted as well. In this case, licc will read <from_dir>/.liccc as a json map from platform to output dir. if -p is set, from_dir must be set as well.')
|
|
17
|
+
.makeOptionMandatory(false)
|
|
18
|
+
.choices(PLATFORMS))
|
|
19
|
+
.action(async (from_dir, to_dir, { platform }) => {
|
|
20
|
+
assert(!(platform == null && to_dir != null), "can't omit platform and use an explicit output dir. specify both -p <platform> and to_dir or none of them.");
|
|
21
|
+
assert(!(platform != null && to_dir == null), "can't use an explicit platform but no output dir. specify both -p <platform> and to_dir or none of them.");
|
|
22
|
+
let conf = {};
|
|
23
|
+
if (platform != null) {
|
|
24
|
+
conf[platform] = path.resolve(process.cwd(), to_dir);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
// check if there's a .liccc file that states the desired platforms and output dirs
|
|
28
|
+
const confPath = path.join(from_dir, ".liccc");
|
|
29
|
+
try {
|
|
30
|
+
const relConf = JSON.parse(await fs.promises.readFile(confPath, { encoding: "utf-8" }));
|
|
31
|
+
for (let [relPlatform, relPath] of Object.entries(relConf)) {
|
|
32
|
+
if (relPlatform === "__comment")
|
|
33
|
+
continue;
|
|
34
|
+
assert(PLATFORMS.includes(relPlatform), `invalid platform in .liccc: ${relPlatform}`);
|
|
35
|
+
conf[relPlatform] = path.resolve(process.cwd(), from_dir, relPath);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
console.log(`unable to read ${confPath} as JSON: ${e}`);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
await run(from_dir, conf);
|
|
44
|
+
})
|
|
45
|
+
.parseAsync(process.argv);
|
|
46
|
+
async function run(from_dir, conf) {
|
|
47
|
+
const inputFiles = await globby(path.join(process.cwd(), from_dir, "*/**/*.json"));
|
|
48
|
+
const inputMap = new Map(inputFiles.map((n) => ([path.basename(n, ".json"), fs.readFileSync(n, "utf8")])));
|
|
49
|
+
// doing it here because some platforms generate into the same dir.
|
|
50
|
+
for (let outDir of Object.values(conf)) {
|
|
51
|
+
clearDir(outDir);
|
|
52
|
+
}
|
|
53
|
+
for (let [confPlatform, confOutDir] of Object.entries(conf)) {
|
|
54
|
+
console.log("generating for", confPlatform, "into", confOutDir);
|
|
55
|
+
try {
|
|
56
|
+
await generate(confPlatform, inputMap, confOutDir);
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
assert(false, `compilation failed with ${e}`);
|
|
60
|
+
}
|
|
61
|
+
console.log("done; no errors\n");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function assert(proposition, text) {
|
|
65
|
+
if (proposition)
|
|
66
|
+
return;
|
|
67
|
+
console.log("\nFatal Error:\n", text);
|
|
68
|
+
console.log("");
|
|
69
|
+
console.log(program.helpInformation());
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
function clearDir(dir) {
|
|
73
|
+
console.log("clearing dir:", dir);
|
|
74
|
+
try {
|
|
75
|
+
const files = fs.readdirSync(dir);
|
|
76
|
+
for (const file of files) {
|
|
77
|
+
fs.unlinkSync(path.join(dir, file));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch (e) {
|
|
81
|
+
console.log("could not clear dir:", e);
|
|
82
|
+
}
|
|
83
|
+
}
|
package/dist/common.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function getArgs(methName, methodDef) {
|
|
2
|
+
return methodDef.arg.map((a, i) => {
|
|
3
|
+
const entries = Object.entries(a);
|
|
4
|
+
if (entries.length === 0) {
|
|
5
|
+
throw new Error(`Syntax Error: method ${methName} argument ${i} is empty`);
|
|
6
|
+
}
|
|
7
|
+
else if (entries.length > 1) {
|
|
8
|
+
throw new Error(`Syntax Error: method ${methName} argument ${i} has too many entries`);
|
|
9
|
+
}
|
|
10
|
+
return { "name": entries[0][0], "type": entries[0][1] };
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export function capitalize(input) {
|
|
14
|
+
return input.replace(/^\w/, c => c.toUpperCase());
|
|
15
|
+
}
|
|
16
|
+
export function minusculize(input) {
|
|
17
|
+
return input.replace(/^\w/, c => c.toLowerCase());
|
|
18
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { TypescriptGenerator } from "./TypescriptGenerator.js";
|
|
2
|
+
import { capitalize } from "./common.js";
|
|
3
|
+
import { SwiftGenerator } from "./SwiftGenerator.js";
|
|
4
|
+
import { KotlinGenerator } from "./KotlinGenerator.js";
|
|
5
|
+
import * as path from "path";
|
|
6
|
+
import * as fs from "fs";
|
|
7
|
+
function generatorForLang(lang) {
|
|
8
|
+
switch (lang) {
|
|
9
|
+
case "typescript":
|
|
10
|
+
return new TypescriptGenerator();
|
|
11
|
+
case "swift":
|
|
12
|
+
return new SwiftGenerator();
|
|
13
|
+
case "kotlin":
|
|
14
|
+
return new KotlinGenerator();
|
|
15
|
+
default:
|
|
16
|
+
throw new Error("Unknown output language:" + lang);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function mapPlatformToLang(platform) {
|
|
20
|
+
switch (platform) {
|
|
21
|
+
case "ios":
|
|
22
|
+
return "swift";
|
|
23
|
+
case "android":
|
|
24
|
+
return "kotlin";
|
|
25
|
+
case "web":
|
|
26
|
+
case "desktop":
|
|
27
|
+
return "typescript";
|
|
28
|
+
default:
|
|
29
|
+
throw new Error("unknown platform " + platform);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* generate and write all target language source files.
|
|
34
|
+
*
|
|
35
|
+
* @param platform one of the supported platform names
|
|
36
|
+
* @param sources a map from the definition file name to the definition json string
|
|
37
|
+
* @param outDir the directory the output files should be written to
|
|
38
|
+
*/
|
|
39
|
+
export function generate(platform, sources, outDir) {
|
|
40
|
+
const lang = mapPlatformToLang(platform);
|
|
41
|
+
const ext = getFileExtensionForLang(lang);
|
|
42
|
+
const generator = generatorForLang(lang);
|
|
43
|
+
const facadesToImplement = [];
|
|
44
|
+
for (const [inputPath, source] of Array.from(sources.entries())) {
|
|
45
|
+
console.log("handling ipc schema file", inputPath);
|
|
46
|
+
const definition = JSON.parse(source);
|
|
47
|
+
if (!("name" in definition)) {
|
|
48
|
+
throw new Error(`malformed definition: ${inputPath} doesn't have name field`);
|
|
49
|
+
}
|
|
50
|
+
if (!("type" in definition)) {
|
|
51
|
+
throw new Error(`missing type declaration: ${inputPath}`);
|
|
52
|
+
}
|
|
53
|
+
switch (definition.type) {
|
|
54
|
+
case "facade":
|
|
55
|
+
assertReturnTypesPresent(definition);
|
|
56
|
+
const isReceiving = definition.receivers.includes(platform);
|
|
57
|
+
const isSending = definition.senders.includes(platform);
|
|
58
|
+
if (!isReceiving && !isSending) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const facadeOutput = generator.generateFacade(definition);
|
|
62
|
+
write(facadeOutput, outDir, definition.name + ext);
|
|
63
|
+
if (isReceiving) {
|
|
64
|
+
const receiveOutput = generator.generateReceiveDispatcher(definition);
|
|
65
|
+
write(receiveOutput, outDir, definition.name + "ReceiveDispatcher" + ext);
|
|
66
|
+
facadesToImplement.push(definition.name);
|
|
67
|
+
}
|
|
68
|
+
if (isSending) {
|
|
69
|
+
const sendOutput = generator.generateSendDispatcher(definition);
|
|
70
|
+
write(sendOutput, outDir, definition.name + "SendDispatcher" + ext);
|
|
71
|
+
}
|
|
72
|
+
break;
|
|
73
|
+
case "struct":
|
|
74
|
+
const structOutput = generator.handleStructDefinition(definition);
|
|
75
|
+
write(structOutput, outDir, definition.name + ext);
|
|
76
|
+
break;
|
|
77
|
+
case "typeref":
|
|
78
|
+
const refOutput = generator.generateTypeRef(outDir, inputPath, definition);
|
|
79
|
+
if (refOutput != null) {
|
|
80
|
+
write(refOutput, outDir, definition.name + ext);
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
default:
|
|
84
|
+
throw new Error(`unknown definition type in ${inputPath}: ` + definition.type);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
const extraFiles = generator.generateExtraFiles();
|
|
88
|
+
for (let extraFilesKey in extraFiles) {
|
|
89
|
+
write(extraFiles[extraFilesKey], outDir, extraFilesKey + ext);
|
|
90
|
+
}
|
|
91
|
+
const dispatcherName = `${capitalize(platform)}GlobalDispatcher`;
|
|
92
|
+
const dispatcherCode = generator.generateGlobalDispatcher(dispatcherName, facadesToImplement);
|
|
93
|
+
write(dispatcherCode, outDir, dispatcherName + ext);
|
|
94
|
+
}
|
|
95
|
+
function getFileExtensionForLang(lang) {
|
|
96
|
+
switch (lang) {
|
|
97
|
+
case "typescript":
|
|
98
|
+
return ".ts";
|
|
99
|
+
case "swift":
|
|
100
|
+
return ".swift";
|
|
101
|
+
case "kotlin":
|
|
102
|
+
return ".kt";
|
|
103
|
+
default:
|
|
104
|
+
throw new Error("unknown output lang: " + lang);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function write(code, outDir, target) {
|
|
108
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
109
|
+
const filePath = path.join(outDir, target);
|
|
110
|
+
fs.writeFileSync(filePath, code);
|
|
111
|
+
console.log("written:", filePath);
|
|
112
|
+
}
|
|
113
|
+
function assertReturnTypesPresent(definition) {
|
|
114
|
+
const methNoRet = Object.entries(definition.methods).find(([_, { ret }]) => ret == null);
|
|
115
|
+
if (methNoRet) {
|
|
116
|
+
throw new Error(`missing return type on method ${methNoRet[0]} in ${definition.name}`);
|
|
117
|
+
}
|
|
118
|
+
}
|
package/dist/tsbuildinfo
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.full.d.ts","../lib/Accumulator.ts","../lib/common.ts","../lib/Parser.ts","../lib/KotlinGenerator.ts","../lib/SwiftGenerator.ts","../lib/TypescriptGenerator.ts","../lib/index.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/fs-extra/index.d.ts","../../../node_modules/@nodelib/fs.stat/out/types/index.d.ts","../../../node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts","../../../node_modules/@nodelib/fs.stat/out/settings.d.ts","../../../node_modules/@nodelib/fs.stat/out/providers/async.d.ts","../../../node_modules/@nodelib/fs.stat/out/index.d.ts","../../../node_modules/@nodelib/fs.scandir/out/types/index.d.ts","../../../node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts","../../../node_modules/@nodelib/fs.scandir/out/settings.d.ts","../../../node_modules/@nodelib/fs.scandir/out/providers/async.d.ts","../../../node_modules/@nodelib/fs.scandir/out/index.d.ts","../../../node_modules/@nodelib/fs.walk/out/types/index.d.ts","../../../node_modules/@nodelib/fs.walk/out/settings.d.ts","../../../node_modules/@nodelib/fs.walk/out/readers/reader.d.ts","../../../node_modules/@nodelib/fs.walk/out/readers/async.d.ts","../../../node_modules/@nodelib/fs.walk/out/providers/async.d.ts","../../../node_modules/@nodelib/fs.walk/out/index.d.ts","../../../node_modules/fast-glob/out/types/index.d.ts","../../../node_modules/fast-glob/out/settings.d.ts","../../../node_modules/fast-glob/out/managers/tasks.d.ts","../../../node_modules/fast-glob/out/index.d.ts","../../../node_modules/globby/index.d.ts","../node_modules/chalk/source/vendor/supports-color/index.d.ts","../node_modules/chalk/source/index.d.ts","../node_modules/yaml/dist/parse/line-counter.d.ts","../node_modules/yaml/dist/errors.d.ts","../node_modules/yaml/dist/doc/applyReviver.d.ts","../node_modules/yaml/dist/log.d.ts","../node_modules/yaml/dist/nodes/toJS.d.ts","../node_modules/yaml/dist/nodes/Scalar.d.ts","../node_modules/yaml/dist/nodes/Collection.d.ts","../node_modules/yaml/dist/nodes/YAMLMap.d.ts","../node_modules/yaml/dist/nodes/YAMLSeq.d.ts","../node_modules/yaml/dist/schema/types.d.ts","../node_modules/yaml/dist/schema/Schema.d.ts","../node_modules/yaml/dist/doc/createNode.d.ts","../node_modules/yaml/dist/nodes/addPairToJSMap.d.ts","../node_modules/yaml/dist/nodes/Pair.d.ts","../node_modules/yaml/dist/schema/tags.d.ts","../node_modules/yaml/dist/options.d.ts","../node_modules/yaml/dist/stringify/stringify.d.ts","../node_modules/yaml/dist/nodes/Node.d.ts","../node_modules/yaml/dist/parse/cst-scalar.d.ts","../node_modules/yaml/dist/parse/cst-stringify.d.ts","../node_modules/yaml/dist/parse/cst-visit.d.ts","../node_modules/yaml/dist/parse/cst.d.ts","../node_modules/yaml/dist/nodes/Alias.d.ts","../node_modules/yaml/dist/doc/Document.d.ts","../node_modules/yaml/dist/doc/directives.d.ts","../node_modules/yaml/dist/compose/composer.d.ts","../node_modules/yaml/dist/parse/lexer.d.ts","../node_modules/yaml/dist/parse/parser.d.ts","../node_modules/yaml/dist/public-api.d.ts","../node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts","../node_modules/yaml/dist/schema/yaml-1.1/set.d.ts","../node_modules/yaml/dist/visit.d.ts","../node_modules/yaml/dist/index.d.ts","../../../node_modules/formdata-polyfill/esm.min.d.ts","../../../node_modules/fetch-blob/file.d.ts","../../../node_modules/fetch-blob/index.d.ts","../../../node_modules/fetch-blob/from.d.ts","../node_modules/node-fetch/@types/index.d.ts","../../../node_modules/@types/minimist/index.d.ts","../../../node_modules/@types/which/index.d.ts","../node_modules/zx/src/index.d.ts","../node_modules/commander/typings/index.d.ts","../lib/cli.ts","../../../node_modules/@types/better-sqlite3/index.d.ts","../../../node_modules/@types/btoa-lite/index.d.ts","../../../node_modules/@types/ms/index.d.ts","../../../node_modules/@types/debug/index.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/@types/trusted-types/index.d.ts","../../../node_modules/@types/dompurify/index.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/glob/index.d.ts","../../../node_modules/@types/jsonwebtoken/index.d.ts","../../../node_modules/@types/linkifyjs/index.d.ts","../../../node_modules/@types/lru-cache/index.d.ts","../../../node_modules/@types/luxon/src/zone.d.ts","../../../node_modules/@types/luxon/src/misc.d.ts","../../../node_modules/@types/luxon/src/duration.d.ts","../../../node_modules/@types/luxon/src/interval.d.ts","../../../node_modules/@types/luxon/src/datetime.d.ts","../../../node_modules/@types/luxon/src/info.d.ts","../../../node_modules/@types/luxon/src/settings.d.ts","../../../node_modules/@types/luxon/src/luxon.d.ts","../../../node_modules/@types/luxon/index.d.ts","../../../node_modules/@types/mithril/index.d.ts","../../../node_modules/@types/node-forge/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/qrcode-svg/index.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/scheduler/tracing.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/resolve/index.d.ts","../../../node_modules/@types/scheduler/index.d.ts","../../../node_modules/@types/semver/classes/semver.d.ts","../../../node_modules/@types/semver/functions/parse.d.ts","../../../node_modules/@types/semver/functions/valid.d.ts","../../../node_modules/@types/semver/functions/clean.d.ts","../../../node_modules/@types/semver/functions/inc.d.ts","../../../node_modules/@types/semver/functions/diff.d.ts","../../../node_modules/@types/semver/functions/major.d.ts","../../../node_modules/@types/semver/functions/minor.d.ts","../../../node_modules/@types/semver/functions/patch.d.ts","../../../node_modules/@types/semver/functions/prerelease.d.ts","../../../node_modules/@types/semver/functions/compare.d.ts","../../../node_modules/@types/semver/functions/rcompare.d.ts","../../../node_modules/@types/semver/functions/compare-loose.d.ts","../../../node_modules/@types/semver/functions/compare-build.d.ts","../../../node_modules/@types/semver/functions/sort.d.ts","../../../node_modules/@types/semver/functions/rsort.d.ts","../../../node_modules/@types/semver/functions/gt.d.ts","../../../node_modules/@types/semver/functions/lt.d.ts","../../../node_modules/@types/semver/functions/eq.d.ts","../../../node_modules/@types/semver/functions/neq.d.ts","../../../node_modules/@types/semver/functions/gte.d.ts","../../../node_modules/@types/semver/functions/lte.d.ts","../../../node_modules/@types/semver/functions/cmp.d.ts","../../../node_modules/@types/semver/functions/coerce.d.ts","../../../node_modules/@types/semver/classes/comparator.d.ts","../../../node_modules/@types/semver/classes/range.d.ts","../../../node_modules/@types/semver/functions/satisfies.d.ts","../../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../../node_modules/@types/semver/ranges/min-version.d.ts","../../../node_modules/@types/semver/ranges/valid.d.ts","../../../node_modules/@types/semver/ranges/outside.d.ts","../../../node_modules/@types/semver/ranges/gtr.d.ts","../../../node_modules/@types/semver/ranges/ltr.d.ts","../../../node_modules/@types/semver/ranges/intersects.d.ts","../../../node_modules/@types/semver/ranges/simplify.d.ts","../../../node_modules/@types/semver/ranges/subset.d.ts","../../../node_modules/@types/semver/internals/identifiers.d.ts","../../../node_modules/@types/semver/index.d.ts","../../../node_modules/@types/systemjs/index.d.ts","../../../node_modules/@types/winreg/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts","../../../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","3eb679a56cab01203a1ba7edeade937f6a2a4c718513b2cd930b579807fa9359","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3f149f903dd20dfeb7c80e228b659f0e436532de772469980dbd00702cc05cc1","affectsGlobalScope":true},{"version":"1272277fe7daa738e555eb6cc45ded42cc2d0f76c07294142283145d49e96186","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"6ea9ab679ea030cf46c16a711a316078e9e02619ebaf07a7fcd16964aba88f2d","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"d96fa8a56871904776165ceb8e00bd56127e1a017bb2664cae76223b5f815141","c38a5e8fccf0bb75c3907024f4aed4eee5c90f20183656ba2dabc4bd1f2edacc","6de17894c397a22f5eae27c2376e585cbed27fdc5080461dc07dcd977d3920aa","a4e9a87aceba4ba2adcbf87a0df8d512499a9cf39f49ca15182c31b0103f6c03",{"version":"69160bfe5bf51b57840eaeb119ccda29aafeeab453feafd22fde5077d908e5cd","signature":"044a5abad1a3b7ef7ad96fc9c4804b4f45a4db85aa6abf2bb8ec01167e652588"},"868b29b288e7992480c8fe91571dcbc814f95f2941c2bf4513380386e0112885","d1b1d7f4a29887151af76a3328e30710bcd70be77d44032154fb8e3929af3f8e",{"version":"f04b51735a82d459da69155a2cf561d8b59dc2426f65fcc7514878ac2caed2c1","signature":"3119f0430e1ac195e0b6099809c5d862e75a07dbd2eb2c560a60e448a36965ce"},"0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"c2ab70bbc7a24c42a790890739dd8a0ba9d2e15038b40dff8163a97a5d148c00","affectsGlobalScope":true},"422dbb183fdced59425ca072c8bd09efaa77ce4e2ab928ec0d8a1ce062d2a45a",{"version":"712ba0d43b44d144dfd01593f61af6e2e21cfae83e834d297643e7973e55ed61","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","98a3ebfa494b46265634a73459050befba5da8fdc6ca0ef9b7269421780f4ff3","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","cc0b61316c4f37393f1f9595e93b673f4184e9d07f4c127165a490ec4a928668","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"bfea28e6162ed21a0aeed181b623dcf250aa79abf49e24a6b7e012655af36d81","affectsGlobalScope":true},"7a5459efa09ea82088234e6533a203d528c594b01787fb90fba148885a36e8b6","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","10d4796a130577d57003a77b95d8723530bbec84718e364aa2129fa8ffba0378","ad41bb744149e92adb06eb953da195115620a3f2ad48e7d3ae04d10762dae197","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"5d0a9ea09d990b5788f867f1c79d4878f86f7384cb7dab38eecbf22f9efd063d","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","00fa7ce8bc8acc560dc341bbfdf37840a8c59e6a67c9bfa3fa5f36254df35db2","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"cfe724f7c694aab65a9bdd1acb05997848c504548c9d4c71645c187a091cfa2a","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"3345c276cab0e76dda86c0fb79104ff915a4580ba0f3e440870e183b1baec476","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","e383ff72aabf294913f8c346f5da1445ae6ad525836d28efd52cbadc01a361a6","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7",{"version":"3a2da34079a2567161c1359316a32e712404b56566c45332ac9dcee015ecce9f","affectsGlobalScope":true},"28a2e7383fd898c386ffdcacedf0ec0845e5d1a86b5a43f25b86bc315f556b79","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"9cafe917bf667f1027b2bb62e2de454ecd2119c80873ad76fc41d941089753b8","ed19da84b7dbf00952ad0b98ce5c194f1903bcf7c94d8103e8e0d63b271543ae","46324183533e34fad2461b51174132e8e0e4b3ac1ceb5032e4952992739d1eab","d3fa0530dfb1df408f0abd76486de39def69ca47683d4a3529b2d22fce27c693","d9be977c415df16e4defe4995caeca96e637eeef9d216d0d90cdba6fc617e97e","98e0c2b48d855a844099123e8ec20fe383ecd1c5877f3895b048656befe268d0","ff53802a97b7d11ab3c4395aa052baa14cd12d2b1ed236b520a833fdd2a15003","fce9262f840a74118112caf685b725e1cc86cd2b0927311511113d90d87cc61e","d7a7cac49af2a3bfc208fe68831fbfa569864f74a7f31cc3a607f641e6c583fd","9a80e3322d08274f0e41b77923c91fe67b2c8a5134a5278c2cb60a330441554e","2460af41191009298d931c592fb6d4151beea320f1f25b73605e2211e53e4e88","2f87ea988d84d1c617afdeba9d151435473ab24cd5fc456510c8db26d8bd1581","b7336c1c536e3deaedbda956739c6250ac2d0dd171730c42cb57b10368f38a14","6fb67d664aaab2f1d1ad4613b58548aecb4b4703b9e4c5dba6b865b31bd14722","4414644199b1a047b4234965e07d189781a92b578707c79c3933918d67cd9d85","04a4b38c6a1682059eac00e7d0948d99c46642b57003d61d0fe9ccc9df442887","f12ea658b060da1752c65ae4f1e4c248587f6cd4cb4acabbf79a110b6b02ff75","011b2857871a878d5eae463bedc4b3dd14755dc3a67d5d10f8fbb7823d119294","e175549fe57dbff5cd68c1a5ccf33717584d7db9afb8ec216fd2c0daa3b06931","ea68c312e1eb9b48f7064a8dda348594769ba8f9c8596315827c559734a60205","6ddb5fb4476ca702ecff9e5ff0295cde6ce138d71f817da65e118a2a3c534106","6dfff2e65f10158f5a868e642a2e74d2d1bd76f15291552f389f2b8c829a9a86","d10870b52d5b4f5683007f352ce9cd52555dfe0f36ce45ca1c0ea57c0dbe9bff","46d2f1f89f283e9dcba0526080efb84c1cfb4aac779e41cdef07ced9d75a2e39","c1fffa8e392fc4e56ac745b741f22c048037cc14e7be64339539a10ce9a0c12f","3dfcd0a3bfa70b53135db3cf2e4ddcb7eccc3e4418ce833ae24eecd06928328f","ed05b0475f45612ba60ec24d8d7ce267b1f430cc7d29803b34c59c50682ac39a","e110d49f8da0887aaf35aa39da8381d98c01d08ca59802851c4663be5e1a68d0","4abaa0c56f377b000a6258395bf5ddfaace4632ecc15c1fddb2ed2d630d01c25","2bb86e343b4109c784b11070735fa881af5c870a409a3b87b13800ca2afef421","fc9d4e784c9e7569911d8a6a01e1de90617942639c7c260beffdef1548b1ce06","37c1aeea4ec8df37bbe5d96bda46831acab3f70b2001ec9f51cb3146a101de89","dabffec26f82ad1fd038d0a50229f8039464f33f6662cf2c89d42ae9467a1681","df486e591f21d229d75df323fb9cf34f4b5cdbccee6a9b42227be738a13755d6","dcba47d8aae2966859192252382e76793104c16c615f2445bd3b9e1191082ae0","ae8189514ed306971ac9aa7d917487ee51dc3590aa5735f23c1d71811c373ea6","6de9d8858034d3197c1525e1c29c942cf7912f807d4d7f14dea247b7c05b59b0","1cb6887dfc7f376bc89e97f4cfd546255ed4f0fbe9274394fabd6457606d59d0","1adcc285d2d477ec6c51d0282d891fdf9d04a5fa8dfa479eab153ae17376f1b4","198f902c2fde1b362cb300f6fdbddc41613016352515c513e3b72810c06d0af8","fa42fa946bb5743076ef0b586281e2be5c282f5a102264c8f9a83996ff389cc0","2e19ef4f8860aecc4ca8dded229119910618f6615628da668ee1d730ca71a853","ebdafee23f4e1cec975aade893b7b68714c0e26cf6a3bbf98e7479b366432833","960923ce078ecfef6e5c34468cdba5c552b064c0db7cb0fdd3eafd1bb9d3d7e9","42f034630b3a866d4a88b37cf0f8357b36af2f7298b319d536b7413ba99f979b","defc90cd8bd3948b6584baad669b67528b8bf8374de012524ecc10fb290de00f","ea1b9887cd95358de9134117114674515cae5fd371fd7013a8ba4ccf19e1f570","f6189fb94671fc00350c3852bb9d4a9e3b1880c34cde30b45799d1e122b6e22b","293f78a187f91b0b9713e9aacce90e9fda4a88cea9fe6a8aa190ff45d9b48f28","325994b6f6c7598c73bbd0294bf1e3f1e229772669b3c8a08fe3170442f600b8","42003247f4b72318ce5dbe1929d59bc22717f435343ba49b91b5a021ca67ea31","843563f951d16e850a0be806010f630a4a71f0a55810bb9aced67c6d7774bf2f","9af1c478e5403b39b922df9132d779bc6e1ef88cafec17fcecf26356d90ecbd6","a95a6135f2d195c93d930ba01049c33579328e55612477c0ae5652429d3974ad","24ead5861f4400218aeaafa477082022f244e3df46d18831411f3a47fc3ff515","65ce9342063fcf793e7baea7526a5a9a2f6ce05dea0cf4ae726d02eae2b98fa3","927f1e5782f00bae2cf8bcb0d7fae24e161e56f6469c5b5c83844be0d38eadc0","5a1755f317ac2c0d708fbf7c1dbf076ba3a31f624c534b44275c9c43033fdc2e","d782e571cb7d6ec0f0645957ed843d00e3f8577e08cc2940f400c931bc47a8df","9167246623f181441e6116605221268d94e33a1ebd88075e2dc80133c928ae7e","dc1a838d8a514b6de9fbce3bd5e6feb9ccfe56311e9338bb908eb4d0d966ecaf","186f09ed4b1bc1d5a5af5b1d9f42e2d798f776418e82599b3de16423a349d184","0ed942d92e01f47ef6708afbc178c59726440d78a9e5b5c1f07c68374a5a3c49","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","4a17452616730089378f7018860f0a8db04cb5f2efc6884bebd966da8b0002ab","748c6cb7465055b72fd19750f54fa23f8d5c0d7ccddcd8d0357912ec128fd3a1","75a4b72ed8023a1afe1fd0040f311ca69d9a6e67a24bd98bbc4bf9eb477637fa",{"version":"7037b3299d5f87dff0136d7a58b119fbd74101f231e21f3f11db6553d53e1111","signature":"43e818adf60173644896298637f47b01d5819b17eda46eaa32d0c7d64724d012"},"741f7e2e98ea15b8ac788fba0ad97531b802eccd4f3c4c7786287350bbf5f732","acbb182621c18e2bb48d82c5a4ee3a7d47b4f5db5c6986f8594fdd1432c88dd4","6a9c5127096b35264eb7cd21b2417bfc1d42cceca9ba4ce2bb0c3410b7816042","78828b06c0d3b586954015e9ebde5480b009e166c71244763bda328ec0920f41","2fcd2d22b1f30555e785105597cd8f57ed50300e213c4f1bbca6ae149f782c38",{"version":"bb4248c7f953233ac52332088fac897d62b82be07244e551d87c5049600b6cf7","affectsGlobalScope":true},"76199e426dfc8715c141da8e32ed6b5076d7c17d8b6afe29afed6c9d980fe6e8","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","fd326577c62145816fe1acc306c734c2396487f76719d3785d4e825b34540b33","7aa2c4361d1f3243c262813fec18366e89578c527f44b1ec60fdc8fc7977d551","75c89ac70b003cc63123b21c47102fef2d4288d609c26f3c701bf4cc51a868f4","6d727c1f6a7122c04e4f7c164c5e6f460c21ada618856894cdaa6ac25e95f38c","66e5482abdb7e53ca43f318a2026bafb0c929150cad010f4e49d471427f00fb6","d8d9418c2f135ba5bb288315b3faa75378c91e3843dc1a38a3d49d115a00b4ea","e90737e3bdce1ebbcf6e6ea60201862b90d0049d761c5e6aa2f57d9417ff0bf2","b943b23878566250590468463a58148da3954e3966980b6b253c69bb9a516171","2133ed00702dbd13b9b8d217643ba14b7d87b4ba3b544f5e3032035abc04cb44","fde03cd648107d90946d134fcbcefab3c122cccf4062c5573b5ffaeefcedadca","54c9b1f75000ac077282e56d9b36148af47ff234760a31a58abdfb97f9f780c3","c5641bb951da5d5252e7d8a806ec3c84f42555b5bd6a0879dbf1c7df1b8bd850","f90b39139baa2e001535db93f4d0d6c4a87ae6e62705a458f9140ee0ec396018",{"version":"53fc1d57e24995b9f108a93ebdff6a2d860c4cea0f03241c70aa2825fc480890","affectsGlobalScope":true},"56da7aaa11467d3d38454029fc243b90a743dce8344eb063263bf038a3a7c3a6","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","84063cb4682d54b1b83b6cf88430e33e647d57afe29237c4c414196b7ae33ea8",{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1bc82f5b3bb93df76d19730c84467b0b346187198537135d63a672956f323720","affectsGlobalScope":true},"8a19491eba2108d5c333c249699f40aff05ad312c04a17504573b27d91f0aede","74b0245c42990ed8a849df955db3f4362c81b13f799ebc981b7bec2d5b414a57","d9e55d93aa33fad61bd5c63800972d00ba8879ec5d29f6f3bce67d16d86abc33","2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","77c1d91a129ba60b8c405f9f539e42df834afb174fe0785f89d92a2c7c16b77a","c544d81603149987796b24cca297c965db427b84b2580fb27e52fb37ddc1f470","906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","9eb2875a1e4c583066af7d6194ea8162191b2756e5d87ccb3c562fdf74d06869","c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","6eef5113135a0f2bbac8259909a5bbb7666bcde022c28f4ab95145623cbe1f72","058b8dd97b7c67b6bf33e7bda7b1e247b019b675d4b6449d14ac002091a8b4f8","89c8a7b88c378663a8124664f2d9b8c2887e186b55aa066edf6d67177ca1aa04","5a30ba65ad753eb2ef65355dbb3011b28b192cb9df2ef0b5f595b51ca7faf353","5192f9a6469f849e0863616b668fde54bcd6704394b4bfbd115691865f66d761","f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","86d425f7fcd8d100dafa6286cc289af88cbb639ecbdbd25c3018a8f0f7b09fe5","9795e0a3a45d5b6f1a791ee54b7c8b58bc931e8900966cea2dff9c5bae56073b","5890be29879d02424b7654f40592915189034948f7a18c5ad121c006d4e92811","0ab49086f10c75a1cb3b18bffe799dae021774146d8a2d5a4bb42dda67b64f9b","81c77839e152b8f715ec67b0a8b910bcc2d6cf916794c3519f8798c40efd12ac","a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","464843c00fb3dd4735b28255c5c9fe713f16b8e47a3db09ba1647687440f7aef","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","d0f6d36b2d86f934560c48d8bfdc7ab60c67cfb2ab6dc1916706aa68e83d6dc2",{"version":"ccfb041f2f384c73f64b08c9cb99d49cbdcc00ff0c25b7f186abe866638e48da","affectsGlobalScope":true},{"version":"ee2e7495a6e4820c7317ab889a61e868425f65d1c3f9de0cc91ab5bd1657de90","affectsGlobalScope":true},"70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","105b9a2234dcb06ae922f2cd8297201136d416503ff7d16c72bfc8791e9895c1","b2d70a269840a9528db473ac7565442434333a05c1f66801a7a672e82beb903e"],"options":{"esModuleInterop":true,"module":99,"outDir":"./","rootDir":"../lib","skipLibCheck":true,"strict":true,"target":99,"tsBuildInfoFile":"./tsbuildinfo"},"fileIdsList":[[108,121,122],[108,122,123,124,125],[108,115,122,124],[108,121,123],[81,108,115],[81,108,115,117],[108,117,118,119,120],[108,117,119],[108,118],[97,108,115,126,127,128,131],[108,127,128,130],[80,108,115,126,127,128,129],[108,128],[108,126,127],[108,115,126],[108,115],[108],[108,185],[108,188],[80,81,108,115,191],[108,203],[108,196,198,199,204],[108,197,200],[108,196,197],[108,198,200],[108,196,197,198,199,200,201,202],[108,196],[65,108],[68,108],[69,74,108],[70,80,81,88,97,107,108],[70,71,80,88,108],[72,108],[73,74,81,89,108],[74,97,104,108],[75,77,80,88,108],[76,108],[77,78,108],[79,80,108],[80,108],[80,81,82,97,107,108],[80,81,82,97,108],[83,88,97,107,108],[80,81,83,84,88,97,104,107,108],[83,85,97,104,107,108],[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114],[80,86,108],[87,107,108],[77,80,88,97,108],[89,108],[90,108],[68,91,108],[92,106,108,112],[93,108],[94,108],[80,95,108],[95,96,108,110],[80,97,98,99,108],[97,99,108],[97,98,108],[100,108],[101,108],[80,102,103,108],[102,103,108],[74,88,97,104,108],[105,108],[88,106,108],[69,83,94,107,108],[74,108],[97,108,109],[108,110],[108,111],[69,74,80,82,91,97,107,108,110,112],[97,108,113],[108,207,209,210,211],[108,215,254],[108,215,239,254],[108,254],[108,215],[108,215,240,254],[108,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253],[108,240,254],[108,187],[108,257],[80,97,108,115],[108,115,133,134,135],[108,133,134],[108,133],[108,115,132],[108,174,175],[107,108,136],[58,59,60,108],[58,59,60,90,108],[59,64,81,90,108,180,181],[59,61,62,63,81,90,108],[108,138],[106,108],[83,108,115,173,176],[108,141,155,157,161,163,164],[108,141,145,147,148,150,153,155,157,162,164],[108,149,150,157,163],[108,163],[108,140],[108,140,141,145,147,148,149,150,153,154,155,157,161,162,163,165,166,167,168,169,170,171],[108,144,145,147,148,156,157,161,163],[108,150,157],[108,145,147,148,153,156,161,162,163],[108,144,145,147,148,150,151,152,156,157,161,162],[108,144,157,161],[108,144,145,146,150,153,156,157,161],[108,144,153],[108,156,157,163],[108,140,142,143,145,149,150,153,154,157,164],[108,141,145,157,161],[108,161],[108,158,159,160],[108,142,155,157,163,165],[108,149,153,155,157],[108,149,155],[108,145,147,148,150,151,155,156,157],[108,144,148,149,172],[108,144,145,147,149,150,153,156],[108,155,162,163],[108,145,147,148,153,157,162,163],[70,89,90,97,108,116,137,139,172,177,178,179],[59]],"referencedMap":[[123,1],[126,2],[125,3],[124,4],[122,5],[118,6],[121,7],[120,8],[119,9],[117,5],[132,10],[131,11],[130,12],[129,13],[128,14],[127,15],[183,16],[184,17],[186,18],[189,19],[190,17],[116,5],[192,20],[193,16],[194,17],[195,17],[204,21],[200,22],[198,23],[201,24],[199,25],[203,26],[197,17],[202,27],[196,17],[191,17],[178,17],[205,17],[185,17],[206,16],[65,28],[66,28],[68,29],[69,30],[70,31],[71,32],[72,33],[73,34],[74,35],[75,36],[76,37],[77,38],[78,38],[79,39],[80,40],[81,41],[82,42],[67,17],[114,17],[83,43],[84,44],[85,45],[115,46],[86,47],[87,48],[88,49],[89,50],[90,51],[91,52],[92,53],[93,54],[94,55],[95,56],[96,57],[97,58],[99,59],[98,60],[100,61],[101,62],[102,63],[103,64],[104,65],[105,66],[106,67],[107,68],[108,69],[109,70],[110,71],[111,72],[112,73],[113,74],[207,17],[208,17],[209,17],[212,75],[213,16],[214,17],[211,17],[239,76],[240,77],[215,78],[218,78],[237,76],[238,76],[228,79],[227,79],[225,76],[220,76],[233,76],[231,76],[235,76],[219,76],[232,76],[236,76],[221,76],[222,76],[234,76],[216,76],[223,76],[224,76],[226,76],[230,76],[241,80],[229,76],[217,76],[254,81],[253,17],[248,80],[250,82],[249,80],[242,80],[243,80],[245,80],[247,80],[251,82],[252,82],[244,82],[246,82],[255,17],[188,83],[187,17],[179,17],[256,17],[257,17],[258,84],[259,85],[210,17],[136,86],[135,87],[134,88],[133,89],[174,17],[176,90],[175,17],[173,17],[137,91],[11,17],[12,17],[16,17],[15,17],[2,17],[17,17],[18,17],[19,17],[20,17],[21,17],[22,17],[23,17],[24,17],[3,17],[4,17],[28,17],[25,17],[26,17],[27,17],[29,17],[30,17],[31,17],[5,17],[32,17],[33,17],[34,17],[35,17],[6,17],[36,17],[37,17],[38,17],[39,17],[7,17],[40,17],[45,17],[46,17],[41,17],[42,17],[43,17],[44,17],[8,17],[50,17],[47,17],[48,17],[49,17],[51,17],[9,17],[52,17],[53,17],[54,17],[55,17],[1,17],[10,17],[57,17],[56,17],[14,17],[13,17],[58,17],[61,92],[60,17],[62,92],[63,93],[182,94],[59,17],[64,95],[139,96],[138,97],[181,17],[177,98],[165,99],[163,100],[142,17],[151,101],[164,102],[141,103],[172,104],[143,17],[162,105],[146,106],[157,107],[153,108],[145,109],[147,110],[148,110],[152,111],[144,112],[155,113],[158,114],[159,115],[160,115],[161,116],[166,17],[140,17],[167,115],[168,117],[150,118],[154,119],[149,120],[169,121],[170,122],[156,123],[171,124],[180,125]],"exportedModulesMap":[[123,1],[126,2],[125,3],[124,4],[122,5],[118,6],[121,7],[120,8],[119,9],[117,5],[132,10],[131,11],[130,12],[129,13],[128,14],[127,15],[183,16],[184,17],[186,18],[189,19],[190,17],[116,5],[192,20],[193,16],[194,17],[195,17],[204,21],[200,22],[198,23],[201,24],[199,25],[203,26],[197,17],[202,27],[196,17],[191,17],[178,17],[205,17],[185,17],[206,16],[65,28],[66,28],[68,29],[69,30],[70,31],[71,32],[72,33],[73,34],[74,35],[75,36],[76,37],[77,38],[78,38],[79,39],[80,40],[81,41],[82,42],[67,17],[114,17],[83,43],[84,44],[85,45],[115,46],[86,47],[87,48],[88,49],[89,50],[90,51],[91,52],[92,53],[93,54],[94,55],[95,56],[96,57],[97,58],[99,59],[98,60],[100,61],[101,62],[102,63],[103,64],[104,65],[105,66],[106,67],[107,68],[108,69],[109,70],[110,71],[111,72],[112,73],[113,74],[207,17],[208,17],[209,17],[212,75],[213,16],[214,17],[211,17],[239,76],[240,77],[215,78],[218,78],[237,76],[238,76],[228,79],[227,79],[225,76],[220,76],[233,76],[231,76],[235,76],[219,76],[232,76],[236,76],[221,76],[222,76],[234,76],[216,76],[223,76],[224,76],[226,76],[230,76],[241,80],[229,76],[217,76],[254,81],[253,17],[248,80],[250,82],[249,80],[242,80],[243,80],[245,80],[247,80],[251,82],[252,82],[244,82],[246,82],[255,17],[188,83],[187,17],[179,17],[256,17],[257,17],[258,84],[259,85],[210,17],[136,86],[135,87],[134,88],[133,89],[174,17],[176,90],[175,17],[173,17],[137,91],[11,17],[12,17],[16,17],[15,17],[2,17],[17,17],[18,17],[19,17],[20,17],[21,17],[22,17],[23,17],[24,17],[3,17],[4,17],[28,17],[25,17],[26,17],[27,17],[29,17],[30,17],[31,17],[5,17],[32,17],[33,17],[34,17],[35,17],[6,17],[36,17],[37,17],[38,17],[39,17],[7,17],[40,17],[45,17],[46,17],[41,17],[42,17],[43,17],[44,17],[8,17],[50,17],[47,17],[48,17],[49,17],[51,17],[9,17],[52,17],[53,17],[54,17],[55,17],[1,17],[10,17],[57,17],[56,17],[14,17],[13,17],[58,17],[61,126],[60,17],[62,92],[63,93],[59,17],[64,126],[139,96],[138,97],[181,17],[177,98],[165,99],[163,100],[142,17],[151,101],[164,102],[141,103],[172,104],[143,17],[162,105],[146,106],[157,107],[153,108],[145,109],[147,110],[148,110],[152,111],[144,112],[155,113],[158,114],[159,115],[160,115],[161,116],[166,17],[140,17],[167,115],[168,117],[150,118],[154,119],[149,120],[169,121],[170,122],[156,123],[171,124],[180,125]],"semanticDiagnosticsPerFile":[123,126,125,124,122,118,121,120,119,117,132,131,130,129,128,127,183,184,186,189,190,116,192,193,194,195,204,200,198,201,199,203,197,202,196,191,178,205,185,206,65,66,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,67,114,83,84,85,115,86,87,88,89,90,91,92,93,94,95,96,97,99,98,100,101,102,103,104,105,106,107,108,109,110,111,112,113,207,208,209,212,213,214,211,239,240,215,218,237,238,228,227,225,220,233,231,235,219,232,236,221,222,234,216,223,224,226,230,241,229,217,254,253,248,250,249,242,243,245,247,251,252,244,246,255,188,187,179,256,257,258,259,210,136,135,134,133,174,176,175,173,137,11,12,16,15,2,17,18,19,20,21,22,23,24,3,4,28,25,26,27,29,30,31,5,32,33,34,35,6,36,37,38,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,53,54,55,1,10,57,56,14,13,58,61,60,62,63,182,59,64,139,138,181,177,165,163,142,151,164,141,172,143,162,146,157,153,145,147,148,152,144,155,158,159,160,161,166,140,167,168,150,154,149,169,170,156,171,180]},"version":"4.7.2"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const HEADER = "/* generated file, don't edit. */\n"
|
|
2
|
+
|
|
3
|
+
export class Accumulator {
|
|
4
|
+
private code: string = ""
|
|
5
|
+
private imports: Set<string> = new Set()
|
|
6
|
+
|
|
7
|
+
constructor(
|
|
8
|
+
private readonly appender: (code: string) => void = (code) => this.code += code,
|
|
9
|
+
) {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
line(code: string = "") {
|
|
13
|
+
this.appender(code + "\n")
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
indent(indent: string = "\t"): Accumulator {
|
|
17
|
+
return new Accumulator((code) => {
|
|
18
|
+
this.appender(indent + code)
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
addImport(imp: string) {
|
|
23
|
+
this.imports.add(imp)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
finish(): string {
|
|
27
|
+
return HEADER + "\n" + Array.from(this.imports).join("\n") + "\n" + this.code
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
}
|