@dusted/anqst 0.1.0 → 0.1.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/README.md +147 -123
- package/dist/src/app.js +328 -79
- package/dist/src/backend/ast/emit.js +5 -0
- package/dist/src/backend/ast/index.js +13 -0
- package/dist/src/backend/ast/parser.js +5 -0
- package/dist/src/backend/ast/verify.js +5 -0
- package/dist/src/backend/index.js +16 -0
- package/dist/src/backend/tsc/debug-dump.js +39 -0
- package/dist/src/backend/tsc/emit-cpp.js +13 -0
- package/dist/src/backend/tsc/emit-node.js +13 -0
- package/dist/src/backend/tsc/index.js +41 -0
- package/dist/src/backend/tsc/parser.js +19 -0
- package/dist/src/backend/tsc/program.js +120 -0
- package/dist/src/backend/tsc/typegraph.js +172 -0
- package/dist/src/backend/tsc/verify.js +13 -0
- package/dist/src/backend/types.js +2 -0
- package/dist/src/bin/anqst.js +0 -0
- package/dist/src/emit.js +456 -8
- package/dist/src/project.js +110 -40
- package/package.json +7 -4
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tscBackend = void 0;
|
|
4
|
+
const emit_cpp_1 = require("./emit-cpp");
|
|
5
|
+
const emit_node_1 = require("./emit-node");
|
|
6
|
+
const parser_1 = require("./parser");
|
|
7
|
+
const verify_1 = require("./verify");
|
|
8
|
+
function mergeGeneratedFiles(...parts) {
|
|
9
|
+
const out = {};
|
|
10
|
+
for (const part of parts) {
|
|
11
|
+
for (const [key, value] of Object.entries(part)) {
|
|
12
|
+
out[key] = value;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return out;
|
|
16
|
+
}
|
|
17
|
+
function formatTargets(options) {
|
|
18
|
+
const enabled = [];
|
|
19
|
+
if (options.emitQWidget)
|
|
20
|
+
enabled.push("QWidget");
|
|
21
|
+
if (options.emitNodeExpressWs)
|
|
22
|
+
enabled.push("node_express_ws");
|
|
23
|
+
if (enabled.length === 0)
|
|
24
|
+
return "none";
|
|
25
|
+
return enabled.join(", ");
|
|
26
|
+
}
|
|
27
|
+
function logBackendInput(spec, options) {
|
|
28
|
+
console.log(`[AnQst][backend=tsc] parsed widget=${spec.widgetName}, services=${spec.services.length}, targets=${formatTargets(options)}`);
|
|
29
|
+
}
|
|
30
|
+
exports.tscBackend = {
|
|
31
|
+
id: "tsc",
|
|
32
|
+
parseSpecFile: parser_1.parseSpecFile,
|
|
33
|
+
verifySpec: verify_1.verifySpec,
|
|
34
|
+
generateOutputs(spec, options) {
|
|
35
|
+
logBackendInput(spec, options);
|
|
36
|
+
const cpp = (0, emit_cpp_1.emitCppQWidget)(spec, options);
|
|
37
|
+
const node = (0, emit_node_1.emitNodeExpressWs)(spec, options);
|
|
38
|
+
return mergeGeneratedFiles(cpp, node);
|
|
39
|
+
},
|
|
40
|
+
emitsArtifacts: true
|
|
41
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseSpecFile = parseSpecFile;
|
|
4
|
+
const parser_1 = require("../ast/parser");
|
|
5
|
+
const debug_dump_1 = require("./debug-dump");
|
|
6
|
+
const program_1 = require("./program");
|
|
7
|
+
const typegraph_1 = require("./typegraph");
|
|
8
|
+
function parseSpecFile(specPath) {
|
|
9
|
+
(0, program_1.createTscProgramContext)(specPath);
|
|
10
|
+
const parsed = (0, parser_1.parseSpecFile)(specPath);
|
|
11
|
+
if ((0, debug_dump_1.isDebugEnabled)()) {
|
|
12
|
+
(0, debug_dump_1.writeDebugFile)(process.cwd(), "anqstmodel/parsed-before-typegraph.txt", `${(0, debug_dump_1.inspectText)(parsed)}\n`);
|
|
13
|
+
}
|
|
14
|
+
const normalized = (0, typegraph_1.applyResolvedTypeGraph)(parsed);
|
|
15
|
+
if ((0, debug_dump_1.isDebugEnabled)()) {
|
|
16
|
+
(0, debug_dump_1.writeDebugFile)(process.cwd(), "anqstmodel/parsed-after-typegraph.txt", `${(0, debug_dump_1.inspectText)(normalized)}\n`);
|
|
17
|
+
}
|
|
18
|
+
return normalized;
|
|
19
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createTscProgramContext = createTscProgramContext;
|
|
7
|
+
exports.getTscProgramContext = getTscProgramContext;
|
|
8
|
+
exports.getProgramDiagnostics = getProgramDiagnostics;
|
|
9
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
10
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
11
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
12
|
+
const errors_1 = require("../../errors");
|
|
13
|
+
const debug_dump_1 = require("./debug-dump");
|
|
14
|
+
const contextBySpecPath = new Map();
|
|
15
|
+
function diagnosticText(diagnostic) {
|
|
16
|
+
return typescript_1.default.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
17
|
+
}
|
|
18
|
+
function formatDiagnostic(diagnostic) {
|
|
19
|
+
if (!diagnostic.file || diagnostic.start === undefined) {
|
|
20
|
+
return diagnosticText(diagnostic);
|
|
21
|
+
}
|
|
22
|
+
const pos = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
|
|
23
|
+
return `${diagnostic.file.fileName}:${pos.line + 1}:${pos.character + 1}: ${diagnosticText(diagnostic)}`;
|
|
24
|
+
}
|
|
25
|
+
function dumpSourceFileAst(sourceFile) {
|
|
26
|
+
const lines = [];
|
|
27
|
+
lines.push(`== SOURCE FILE ==`);
|
|
28
|
+
lines.push(sourceFile.fileName);
|
|
29
|
+
lines.push("");
|
|
30
|
+
lines.push("== FULL TEXT ==");
|
|
31
|
+
lines.push(sourceFile.getFullText());
|
|
32
|
+
lines.push("");
|
|
33
|
+
lines.push("== AST NODES ==");
|
|
34
|
+
const walk = (node, depth) => {
|
|
35
|
+
const indent = " ".repeat(depth);
|
|
36
|
+
const kind = typescript_1.default.SyntaxKind[node.kind];
|
|
37
|
+
const start = node.getStart(sourceFile, false);
|
|
38
|
+
const end = node.getEnd();
|
|
39
|
+
const text = node.getText(sourceFile).replace(/\s+/g, " ").slice(0, 160);
|
|
40
|
+
lines.push(`${indent}${kind} [${start}, ${end}] ${text}`);
|
|
41
|
+
typescript_1.default.forEachChild(node, (child) => walk(child, depth + 1));
|
|
42
|
+
};
|
|
43
|
+
walk(sourceFile, 0);
|
|
44
|
+
return `${lines.join("\n")}\n`;
|
|
45
|
+
}
|
|
46
|
+
function dumpProgramArtifacts(specPath, rootNames, options, program, sourceFile) {
|
|
47
|
+
if (!(0, debug_dump_1.isDebugEnabled)())
|
|
48
|
+
return;
|
|
49
|
+
const cwd = process.cwd();
|
|
50
|
+
const diagnostics = typescript_1.default.getPreEmitDiagnostics(program, sourceFile).map(formatDiagnostic);
|
|
51
|
+
const sourceFiles = program.getSourceFiles().map((sf) => sf.fileName);
|
|
52
|
+
const contextLines = [
|
|
53
|
+
`specPath: ${specPath}`,
|
|
54
|
+
"",
|
|
55
|
+
"compilerOptions:",
|
|
56
|
+
(0, debug_dump_1.inspectText)(options),
|
|
57
|
+
"",
|
|
58
|
+
"rootNames:",
|
|
59
|
+
rootNames.join("\n"),
|
|
60
|
+
"",
|
|
61
|
+
"diagnostics:",
|
|
62
|
+
diagnostics.length > 0 ? diagnostics.join("\n") : "(none)"
|
|
63
|
+
];
|
|
64
|
+
(0, debug_dump_1.writeDebugFile)(cwd, node_path_1.default.join("tsc", "program-context.txt"), `${contextLines.join("\n")}\n`);
|
|
65
|
+
(0, debug_dump_1.writeDebugFile)(cwd, node_path_1.default.join("tsc", "program-files.txt"), `${sourceFiles.join("\n")}\n`);
|
|
66
|
+
(0, debug_dump_1.writeDebugFile)(cwd, node_path_1.default.join("tsc", "sourcefile-ast.txt"), dumpSourceFileAst(sourceFile));
|
|
67
|
+
}
|
|
68
|
+
function readTsConfigFrom(specPath) {
|
|
69
|
+
const specDir = node_path_1.default.dirname(specPath);
|
|
70
|
+
const configPath = typescript_1.default.findConfigFile(specDir, typescript_1.default.sys.fileExists, "tsconfig.json");
|
|
71
|
+
if (!configPath || !node_fs_1.default.existsSync(configPath)) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
const config = typescript_1.default.readConfigFile(configPath, typescript_1.default.sys.readFile);
|
|
75
|
+
if (config.error) {
|
|
76
|
+
throw new errors_1.VerifyError(`Unable to parse tsconfig.json: ${diagnosticText(config.error)}`);
|
|
77
|
+
}
|
|
78
|
+
const parsed = typescript_1.default.parseJsonConfigFileContent(config.config, typescript_1.default.sys, node_path_1.default.dirname(configPath), {}, configPath);
|
|
79
|
+
return { rootNames: parsed.fileNames, options: parsed.options };
|
|
80
|
+
}
|
|
81
|
+
function createTscProgramContext(specPath) {
|
|
82
|
+
const absoluteSpecPath = node_path_1.default.resolve(specPath);
|
|
83
|
+
const tsConfig = readTsConfigFrom(absoluteSpecPath);
|
|
84
|
+
const rootNames = tsConfig ? [...new Set([...tsConfig.rootNames, absoluteSpecPath])] : [absoluteSpecPath];
|
|
85
|
+
const options = tsConfig?.options ?? {
|
|
86
|
+
target: typescript_1.default.ScriptTarget.ES2022,
|
|
87
|
+
module: typescript_1.default.ModuleKind.CommonJS,
|
|
88
|
+
moduleResolution: typescript_1.default.ModuleResolutionKind.NodeJs,
|
|
89
|
+
skipLibCheck: true,
|
|
90
|
+
esModuleInterop: true,
|
|
91
|
+
strict: false,
|
|
92
|
+
allowJs: false
|
|
93
|
+
};
|
|
94
|
+
const program = typescript_1.default.createProgram({ rootNames, options });
|
|
95
|
+
const sourceFile = program.getSourceFile(absoluteSpecPath);
|
|
96
|
+
if (!sourceFile) {
|
|
97
|
+
throw new errors_1.VerifyError(`Unable to load spec source file into TypeScript program: ${absoluteSpecPath}`);
|
|
98
|
+
}
|
|
99
|
+
const context = {
|
|
100
|
+
specPath: absoluteSpecPath,
|
|
101
|
+
program,
|
|
102
|
+
checker: program.getTypeChecker(),
|
|
103
|
+
sourceFile
|
|
104
|
+
};
|
|
105
|
+
dumpProgramArtifacts(absoluteSpecPath, rootNames, options, program, sourceFile);
|
|
106
|
+
contextBySpecPath.set(absoluteSpecPath, context);
|
|
107
|
+
return context;
|
|
108
|
+
}
|
|
109
|
+
function getTscProgramContext(specPath) {
|
|
110
|
+
const absoluteSpecPath = node_path_1.default.resolve(specPath);
|
|
111
|
+
const existing = contextBySpecPath.get(absoluteSpecPath);
|
|
112
|
+
if (existing)
|
|
113
|
+
return existing;
|
|
114
|
+
return createTscProgramContext(absoluteSpecPath);
|
|
115
|
+
}
|
|
116
|
+
function getProgramDiagnostics(specPath) {
|
|
117
|
+
const context = getTscProgramContext(specPath);
|
|
118
|
+
const diagnostics = typescript_1.default.getPreEmitDiagnostics(context.program, context.sourceFile);
|
|
119
|
+
return diagnostics.map(formatDiagnostic);
|
|
120
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.applyResolvedTypeGraph = applyResolvedTypeGraph;
|
|
7
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
8
|
+
const debug_dump_1 = require("./debug-dump");
|
|
9
|
+
const program_1 = require("./program");
|
|
10
|
+
function qNameText(name) {
|
|
11
|
+
if (typescript_1.default.isIdentifier(name))
|
|
12
|
+
return name.text;
|
|
13
|
+
return `${qNameText(name.left)}.${name.right.text}`;
|
|
14
|
+
}
|
|
15
|
+
function serviceBaseType(iface) {
|
|
16
|
+
if (!iface.heritageClauses)
|
|
17
|
+
return null;
|
|
18
|
+
for (const clause of iface.heritageClauses) {
|
|
19
|
+
if (clause.token !== typescript_1.default.SyntaxKind.ExtendsKeyword)
|
|
20
|
+
continue;
|
|
21
|
+
for (const t of clause.types) {
|
|
22
|
+
const text = t.expression.getText();
|
|
23
|
+
if (text === "AnQst.Service")
|
|
24
|
+
return "Service";
|
|
25
|
+
if (text === "AnQst.AngularHTTPBaseServerClass")
|
|
26
|
+
return "AngularHTTPBaseServerClass";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
function parseMemberKind(typeNode) {
|
|
32
|
+
if (!typescript_1.default.isTypeReferenceNode(typeNode))
|
|
33
|
+
return null;
|
|
34
|
+
const name = qNameText(typeNode.typeName);
|
|
35
|
+
if (!name.startsWith("AnQst."))
|
|
36
|
+
return null;
|
|
37
|
+
const kind = name.slice("AnQst.".length);
|
|
38
|
+
if (!["Call", "Slot", "Emitter", "Output", "Input"].includes(kind))
|
|
39
|
+
return null;
|
|
40
|
+
if (kind === "Emitter")
|
|
41
|
+
return { kind, payloadNode: null };
|
|
42
|
+
return { kind, payloadNode: typeNode.typeArguments?.[0] ?? null };
|
|
43
|
+
}
|
|
44
|
+
function typeToString(checker, node) {
|
|
45
|
+
const type = checker.getTypeFromTypeNode(node);
|
|
46
|
+
const flags = typescript_1.default.TypeFormatFlags.NoTruncation;
|
|
47
|
+
if (typescript_1.default.isTypeReferenceNode(node) && qNameText(node.typeName).endsWith(".infer") && node.typeArguments?.[0]) {
|
|
48
|
+
const schemaType = checker.getTypeFromTypeNode(node.typeArguments[0]);
|
|
49
|
+
const outputSymbol = schemaType.getProperty("_output") ?? schemaType.getProperty("_type");
|
|
50
|
+
if (outputSymbol) {
|
|
51
|
+
const outputType = checker.getTypeOfSymbolAtLocation(outputSymbol, node);
|
|
52
|
+
const outputText = checker.typeToString(outputType, node, flags);
|
|
53
|
+
if (outputText.trim().length > 0 && outputText !== "any" && outputText !== "unknown") {
|
|
54
|
+
return outputText;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const direct = checker.typeToString(type, node, flags);
|
|
59
|
+
if (!/(?:\bz\.infer<|typeof\s+)/.test(direct)) {
|
|
60
|
+
return direct;
|
|
61
|
+
}
|
|
62
|
+
const apparent = checker.getApparentType(type);
|
|
63
|
+
const apparentText = checker.typeToString(apparent, node, flags);
|
|
64
|
+
if (!/(?:\bz\.infer<|typeof\s+)/.test(apparentText)) {
|
|
65
|
+
return apparentText;
|
|
66
|
+
}
|
|
67
|
+
const structuralNode = checker.typeToTypeNode(apparent, node, typescript_1.default.NodeBuilderFlags.NoTruncation |
|
|
68
|
+
typescript_1.default.NodeBuilderFlags.UseStructuralFallback |
|
|
69
|
+
typescript_1.default.NodeBuilderFlags.IgnoreErrors);
|
|
70
|
+
if (structuralNode) {
|
|
71
|
+
const structuralText = structuralNode.getText();
|
|
72
|
+
if (structuralText.trim().length > 0) {
|
|
73
|
+
return structuralText;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return direct;
|
|
77
|
+
}
|
|
78
|
+
function collectServiceTypes(specPath) {
|
|
79
|
+
const { checker, sourceFile } = (0, program_1.getTscProgramContext)(specPath);
|
|
80
|
+
const services = new Map();
|
|
81
|
+
for (const stmt of sourceFile.statements) {
|
|
82
|
+
if (!typescript_1.default.isModuleDeclaration(stmt) || !stmt.body || !typescript_1.default.isModuleBlock(stmt.body))
|
|
83
|
+
continue;
|
|
84
|
+
for (const member of stmt.body.statements) {
|
|
85
|
+
if (!typescript_1.default.isInterfaceDeclaration(member))
|
|
86
|
+
continue;
|
|
87
|
+
if (serviceBaseType(member) === null)
|
|
88
|
+
continue;
|
|
89
|
+
const memberMap = new Map();
|
|
90
|
+
for (const typeMember of member.members) {
|
|
91
|
+
if (typescript_1.default.isMethodSignature(typeMember) && typeMember.name && typescript_1.default.isIdentifier(typeMember.name) && typeMember.type) {
|
|
92
|
+
const parsed = parseMemberKind(typeMember.type);
|
|
93
|
+
if (!parsed)
|
|
94
|
+
continue;
|
|
95
|
+
const payloadTypeText = parsed.payloadNode ? typeToString(checker, parsed.payloadNode) : null;
|
|
96
|
+
const parameters = typeMember.parameters
|
|
97
|
+
.filter((p) => !!p.type && typescript_1.default.isIdentifier(p.name))
|
|
98
|
+
.map((p) => ({
|
|
99
|
+
name: p.name.text,
|
|
100
|
+
typeText: typeToString(checker, p.type)
|
|
101
|
+
}));
|
|
102
|
+
memberMap.set(typeMember.name.text, {
|
|
103
|
+
payloadTypeText,
|
|
104
|
+
parameters
|
|
105
|
+
});
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
if (typescript_1.default.isPropertySignature(typeMember) && typeMember.name && typescript_1.default.isIdentifier(typeMember.name) && typeMember.type) {
|
|
109
|
+
const parsed = parseMemberKind(typeMember.type);
|
|
110
|
+
if (!parsed)
|
|
111
|
+
continue;
|
|
112
|
+
const payloadTypeText = parsed.payloadNode ? typeToString(checker, parsed.payloadNode) : null;
|
|
113
|
+
memberMap.set(typeMember.name.text, {
|
|
114
|
+
payloadTypeText,
|
|
115
|
+
parameters: []
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
services.set(member.name.text, memberMap);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return services;
|
|
123
|
+
}
|
|
124
|
+
function renderServiceTypeMap(services) {
|
|
125
|
+
const lines = [];
|
|
126
|
+
for (const [serviceName, memberMap] of services.entries()) {
|
|
127
|
+
lines.push(`service ${serviceName}`);
|
|
128
|
+
for (const [memberName, memberTypes] of memberMap.entries()) {
|
|
129
|
+
lines.push(` member ${memberName}`);
|
|
130
|
+
lines.push(` payloadTypeText: ${memberTypes.payloadTypeText ?? "(none)"}`);
|
|
131
|
+
if (memberTypes.parameters.length === 0) {
|
|
132
|
+
lines.push(" parameters: (none)");
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
lines.push(" parameters:");
|
|
136
|
+
for (const parameter of memberTypes.parameters) {
|
|
137
|
+
lines.push(` - ${parameter.name}: ${parameter.typeText}`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
lines.push("");
|
|
142
|
+
}
|
|
143
|
+
return `${lines.join("\n")}\n`;
|
|
144
|
+
}
|
|
145
|
+
function applyServiceMemberTypes(member, memberTypes) {
|
|
146
|
+
if (!memberTypes)
|
|
147
|
+
return member;
|
|
148
|
+
return {
|
|
149
|
+
...member,
|
|
150
|
+
payloadTypeText: memberTypes.payloadTypeText,
|
|
151
|
+
parameters: member.parameters.map((param) => {
|
|
152
|
+
const next = memberTypes.parameters.find((p) => p.name === param.name);
|
|
153
|
+
return next ? { ...param, typeText: next.typeText } : param;
|
|
154
|
+
})
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function applyServiceTypes(service, memberMap) {
|
|
158
|
+
if (!memberMap)
|
|
159
|
+
return service;
|
|
160
|
+
return {
|
|
161
|
+
...service,
|
|
162
|
+
members: service.members.map((m) => applyServiceMemberTypes(m, memberMap.get(m.name)))
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function applyResolvedTypeGraph(spec) {
|
|
166
|
+
const serviceTypes = collectServiceTypes(spec.filePath);
|
|
167
|
+
(0, debug_dump_1.writeDebugFile)(process.cwd(), "anqstmodel/typegraph-service-map.txt", renderServiceTypeMap(serviceTypes));
|
|
168
|
+
return {
|
|
169
|
+
...spec,
|
|
170
|
+
services: spec.services.map((service) => applyServiceTypes(service, serviceTypes.get(service.name)))
|
|
171
|
+
};
|
|
172
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.verifySpec = verifySpec;
|
|
4
|
+
const errors_1 = require("../../errors");
|
|
5
|
+
const verify_1 = require("../ast/verify");
|
|
6
|
+
const program_1 = require("./program");
|
|
7
|
+
function verifySpec(spec) {
|
|
8
|
+
const diagnostics = (0, program_1.getProgramDiagnostics)(spec.filePath);
|
|
9
|
+
if (diagnostics.length > 0) {
|
|
10
|
+
throw new errors_1.VerifyError(`TypeScript diagnostics in spec:\n ${diagnostics.join("\n ")}`);
|
|
11
|
+
}
|
|
12
|
+
return (0, verify_1.verifySpec)(spec);
|
|
13
|
+
}
|
package/dist/src/bin/anqst.js
CHANGED
|
File without changes
|