@powerlines/deepkit 0.7.8 → 0.8.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/{capnp-C8UENZHc.cjs → capnp-CkbeQ2uR.cjs} +10 -1
- package/dist/{capnp-BYEUkMpr.mjs → capnp-D0NNeu5y.mjs} +9 -1
- package/dist/capnp.cjs +1 -1
- package/dist/capnp.d.cts +3 -1
- package/dist/capnp.d.mts +3 -1
- package/dist/capnp.mjs +1 -1
- package/dist/config-WhZyw1PK.d.mts +40 -0
- package/dist/config-omER4_br.d.cts +40 -0
- package/dist/esbuild-plugin.cjs +2 -1
- package/dist/esbuild-plugin.d.cts +7 -8
- package/dist/esbuild-plugin.d.mts +7 -8
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/reflect-type.cjs +3 -2
- package/dist/reflect-type.mjs +1 -1
- package/dist/{reflection-DGOuMF8F.d.cts → reflection-8fgblw1P.d.cts} +3 -1
- package/dist/{reflection-DaLz4ZT5.d.mts → reflection-l3nKKCgX.d.mts} +3 -1
- package/dist/resolve-reflections.cjs +2 -1
- package/dist/rolldown-plugin.cjs +2 -1
- package/dist/{transformer-BiefehPu.mjs → transformer-CQR2M4x_.mjs} +6 -6
- package/dist/{transformer-DS0zKU7l.cjs → transformer-Cd4-nB11.cjs} +7 -6
- package/dist/transformer.cjs +1 -1
- package/dist/transformer.d.cts +1 -1
- package/dist/transformer.d.mts +1 -1
- package/dist/transformer.mjs +1 -1
- package/dist/transpile.cjs +4 -3
- package/dist/transpile.d.cts +1 -1
- package/dist/transpile.d.mts +1 -1
- package/dist/transpile.mjs +2 -2
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/utilities.cjs +2 -1
- package/dist/vendor/{compiler-Dz2b4nOM.d.cts → compiler-DZULKKdI.d.cts} +6 -6
- package/dist/vendor/{compiler-CqkzeoNX.mjs → compiler-EpGQgrx7.mjs} +17 -15
- package/dist/vendor/{compiler-Ci5aO9pY.cjs → compiler-LYoUBwrr.cjs} +18 -15
- package/dist/vendor/{compiler-BYhFaVxE.d.mts → compiler-tVqzhDgZ.d.mts} +6 -6
- package/dist/vendor/{config-BTErH18l.d.mts → config-B7x14BD7.d.cts} +32 -18
- package/dist/vendor/{config-Cc2qE8fH.d.cts → config-D6zsQbZD.d.mts} +32 -18
- package/dist/vendor/{config-eSNKiBGB.mjs → config-DH0_s6ur.mjs} +16 -15
- package/dist/vendor/{config-BbFVGRVh.cjs → config-kjucozD0.cjs} +20 -18
- package/dist/vendor/core.cjs +98 -120
- package/dist/vendor/core.mjs +1 -24
- package/dist/vendor/type-compiler/compiler.cjs +1 -1
- package/dist/vendor/type-compiler/compiler.d.cts +1 -1
- package/dist/vendor/type-compiler/compiler.d.mts +1 -1
- package/dist/vendor/type-compiler/compiler.mjs +1 -1
- package/dist/vendor/type-compiler/config.cjs +2 -2
- package/dist/vendor/type-compiler/config.d.cts +2 -2
- package/dist/vendor/type-compiler/config.d.mts +2 -2
- package/dist/vendor/type-compiler/config.mjs +2 -2
- package/dist/vendor/type-compiler/index.cjs +7 -6
- package/dist/vendor/type-compiler/index.d.cts +4 -4
- package/dist/vendor/type-compiler/index.d.mts +4 -4
- package/dist/vendor/type-compiler/index.mjs +5 -5
- package/dist/vendor/type-fEQrgtBF.cjs +2 -1
- package/dist/vendor/type.cjs +11472 -5376
- package/dist/vendor/type.d.cts +220 -24
- package/dist/vendor/type.d.mts +220 -24
- package/dist/vendor/type.mjs +11530 -5631
- package/dist/vendor/{string-DoT35ViA.mjs → types--t65boB8.mjs} +25 -2
- package/dist/vendor/{string-LTCnMzW_.cjs → types-BzOSMMf1.cjs} +43 -1
- package/package.json +4 -4
- package/schemas/reflection.capnp +3 -2
- package/schemas/reflection.cjs +6 -0
- package/schemas/reflection.d.cts +2 -0
- package/schemas/reflection.d.mts +2 -0
- package/schemas/reflection.mjs +6 -0
- package/dist/config-B6lMYoYG.d.mts +0 -32
- package/dist/config-C8svu6th.d.cts +0 -32
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as ReflectionOp } from "./type-2yMJb9Mw.cjs";
|
|
2
|
-
import { c as ReflectionConfig, i as MatchResult, l as ReflectionConfigCache, t as ConfigResolver } from "./config-
|
|
2
|
+
import { c as ReflectionConfig, i as MatchResult, l as ReflectionConfigCache, t as ConfigResolver } from "./config-B7x14BD7.cjs";
|
|
3
3
|
import ts, { ArrowFunction, Bundle, ClassDeclaration, ClassExpression, CompilerHost, CompilerOptions, ConstructorDeclaration, CustomTransformer, CustomTransformerFactory, Declaration, EntityName, ExportDeclaration, Expression, ExpressionWithTypeArguments, FunctionDeclaration, FunctionExpression, Identifier, ImportDeclaration, JSDocImportTag, MethodDeclaration, ModuleDeclaration, ModuleExportName, Node, NodeFactory, ParseConfigHost, PropertyAccessExpression, QualifiedName, ResolvedModule, ScriptKind, SourceFile, Statement, StringLiteral, Symbol as Symbol$1, SymbolTable, TransformationContext, TypeAliasDeclaration, TypeChecker, TypeParameterDeclaration, TypeReferenceNode } from "typescript";
|
|
4
4
|
|
|
5
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
5
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/cjs/src/ts-types.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Contains @internal properties that are not yet in the public API of TS.
|
|
8
8
|
*/
|
|
@@ -20,7 +20,7 @@ interface SourceFile$1 extends SourceFile {
|
|
|
20
20
|
symbol?: Symbol$1;
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
23
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/cjs/src/reflection-ast.d.ts
|
|
24
24
|
type PackExpression = Expression | string | number | boolean | bigint;
|
|
25
25
|
declare class NodeConverter {
|
|
26
26
|
protected f: NodeFactory;
|
|
@@ -28,7 +28,7 @@ declare class NodeConverter {
|
|
|
28
28
|
toExpression<T extends PackExpression | PackExpression[]>(node?: T): Expression;
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
31
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/cjs/src/resolver.d.ts
|
|
32
32
|
/**
|
|
33
33
|
* A utility to resolve a module path and its declaration.
|
|
34
34
|
*
|
|
@@ -55,7 +55,7 @@ declare class Resolver {
|
|
|
55
55
|
resolveSourceFile(sourceFile: SourceFile, modulePath: StringLiteral): SourceFile | undefined;
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
58
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/cjs/src/compiler.d.ts
|
|
59
59
|
declare function encodeOps(ops: ReflectionOp[]): string;
|
|
60
60
|
declare const packSizeByte: number;
|
|
61
61
|
/**
|
|
@@ -377,4 +377,4 @@ declare const transformer: CustomTransformerFactory;
|
|
|
377
377
|
declare const declarationTransformer: CustomTransformerFactory;
|
|
378
378
|
//#endregion
|
|
379
379
|
export { debugPackStruct as a, packSize as c, TagsReflectionStruct as i, packSizeByte as l, DeclarationTransformer as n, declarationTransformer as o, ReflectionTransformer as r, encodeOps as s, Cache as t, transformer as u };
|
|
380
|
-
//# sourceMappingURL=compiler-
|
|
380
|
+
//# sourceMappingURL=compiler-DZULKKdI.d.cts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __require, t as __commonJSMin } from "./chunk-CgI6uo-e.mjs";
|
|
2
2
|
import { n as TypeNumberBrand, t as ReflectionOp } from "./type-wscUl8NW.mjs";
|
|
3
|
-
import { c as Resolver, l as debug, n as getConfigResolver, o as reflectionModeMatcher, u as debug2 } from "./config-
|
|
3
|
+
import { c as Resolver, l as debug, n as getConfigResolver, o as reflectionModeMatcher, u as debug2 } from "./config-DH0_s6ur.mjs";
|
|
4
4
|
import ts, { isBigIntLiteral } from "typescript";
|
|
5
5
|
|
|
6
6
|
//#region ../../node_modules/.pnpm/@typescript+vfs@1.6.4_typescript@5.9.3/node_modules/@typescript/vfs/dist/vfs.cjs.production.min.js
|
|
@@ -4579,7 +4579,7 @@ function executeCloneNode(node, options) {
|
|
|
4579
4579
|
}
|
|
4580
4580
|
|
|
4581
4581
|
//#endregion
|
|
4582
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
4582
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/esm/src/reflection-ast.js
|
|
4583
4583
|
const { isArrowFunction: isArrowFunction$1, isComputedPropertyName, isIdentifier: isIdentifier$1, isNamedImports, isNumericLiteral, isPrivateIdentifier, isStringLiteral: isStringLiteral$1, isStringLiteralLike, setOriginalNode, getLeadingCommentRanges, isNoSubstitutionTemplateLiteral, NodeFlags: NodeFlags$1, SyntaxKind: SyntaxKind$1 } = ts;
|
|
4584
4584
|
function is__String(value) {
|
|
4585
4585
|
return typeof value === "string";
|
|
@@ -4639,7 +4639,7 @@ function parseJSDocAttributeFromText(comment, attribute) {
|
|
|
4639
4639
|
}).join("\n").replace(/\n*$/g, ""), end + 1];
|
|
4640
4640
|
}
|
|
4641
4641
|
function parseJSDocBooleanFromText(comment, attribute) {
|
|
4642
|
-
return new RegExp(
|
|
4642
|
+
return new RegExp(`^\\s*\\*?\\s*@${attribute?.trim()}\\s*(false|False|FALSE|0|n|N|no|No|NO)\\s*$`, "gm").test(comment?.trim()) ? false : new RegExp(`^\\s*\\*?\\s*@${attribute?.trim()}.*\\s*`, "gm").test(comment?.trim()) ? true : void 0;
|
|
4643
4643
|
}
|
|
4644
4644
|
function parseJSDocDescription(comment) {
|
|
4645
4645
|
let lines = comment.split("\n").filter((line) => line && !line.includes("/**") && !line.includes("*/")).map((line) => line.replace(/^\s*\*\s*/g, "").replace(/^\*\s*/g, "").trim());
|
|
@@ -4815,7 +4815,7 @@ function finish(oldNode, newNode) {
|
|
|
4815
4815
|
}
|
|
4816
4816
|
|
|
4817
4817
|
//#endregion
|
|
4818
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
4818
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/esm/src/compiler.js
|
|
4819
4819
|
var import_dist = require_dist();
|
|
4820
4820
|
const { visitEachChild, visitNode, isPropertyAssignment, isArrayTypeNode, isArrowFunction, isBlock, isCallExpression, isCallSignatureDeclaration, isClassDeclaration, isClassExpression, isConstructorDeclaration, isConstructorTypeNode, isConstructSignatureDeclaration, isEnumDeclaration, isExportDeclaration, isExpression, isExpressionWithTypeArguments, isFunctionDeclaration, isFunctionExpression, isFunctionLike, isIdentifier, isImportClause, isImportDeclaration, isImportSpecifier, isInferTypeNode, isInterfaceDeclaration, isMethodDeclaration, isMethodSignature, isModuleDeclaration, isNamedExports, isNamedTupleMember, isNewExpression, isObjectLiteralExpression, isOptionalTypeNode, isParameter, isParenthesizedExpression, isParenthesizedTypeNode, isPropertyAccessExpression, isQualifiedName, isSourceFile, isStringLiteral, isTypeAliasDeclaration, isTypeLiteralNode, isTypeParameterDeclaration, isTypeQueryNode, isTypeReferenceNode, isUnionTypeNode, isExpressionStatement, isVariableDeclaration, getEffectiveConstraintOfTypeParameter, addSyntheticLeadingComment, createCompilerHost, createPrinter, escapeLeadingUnderscores, EmitHint, NodeFlags, SyntaxKind, ScriptTarget, ModifierFlags, ScriptKind: ScriptKind$1 } = ts;
|
|
4821
4821
|
function encodeOps(ops) {
|
|
@@ -5124,7 +5124,7 @@ var ReflectionTransformer = class {
|
|
|
5124
5124
|
}
|
|
5125
5125
|
withReflection(config) {
|
|
5126
5126
|
const configResolver = {
|
|
5127
|
-
|
|
5127
|
+
level: "default",
|
|
5128
5128
|
...config,
|
|
5129
5129
|
path: "",
|
|
5130
5130
|
mergeStrategy: "replace",
|
|
@@ -5134,7 +5134,7 @@ var ReflectionTransformer = class {
|
|
|
5134
5134
|
return {
|
|
5135
5135
|
mode: reflectionModeMatcher(config, path),
|
|
5136
5136
|
tsConfigPath: "",
|
|
5137
|
-
level: configResolver.
|
|
5137
|
+
level: configResolver.level
|
|
5138
5138
|
};
|
|
5139
5139
|
};
|
|
5140
5140
|
this.overriddenConfigResolver = {
|
|
@@ -5482,20 +5482,22 @@ var ReflectionTransformer = class {
|
|
|
5482
5482
|
tags.hidden = extractJSDocBoolean(this.sourceFile, node, "hidden");
|
|
5483
5483
|
tags.ignore = extractJSDocBoolean(this.sourceFile, node, "ignore");
|
|
5484
5484
|
tags.internal = extractJSDocBoolean(this.sourceFile, node, "internal");
|
|
5485
|
-
|
|
5485
|
+
tags.runtime = extractJSDocBoolean(this.sourceFile, node, "runtime");
|
|
5486
|
+
if (this.getReflectionConfig(this.sourceFile).level === "default" || this.getReflectionConfig(this.sourceFile).level === "extended" || this.getReflectionConfig(this.sourceFile).level === "all") {
|
|
5486
5487
|
tags.alias = extractJSDocArray(this.sourceFile, node, "alias");
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5488
|
+
if (this.getReflectionConfig(this.sourceFile).level === "extended" || this.getReflectionConfig(this.sourceFile).level === "all") {
|
|
5489
|
+
tags.permission = extractJSDocArray(this.sourceFile, node, "permission");
|
|
5490
|
+
tags.domain = extractJSDocAttribute(this.sourceFile, node, "domain");
|
|
5491
|
+
if (this.getReflectionConfig(this.sourceFile).level === "all") tags.title = extractJSDocAttribute(this.sourceFile, node, "title");
|
|
5492
|
+
}
|
|
5493
|
+
}
|
|
5492
5494
|
return tags;
|
|
5493
5495
|
}
|
|
5494
5496
|
extractTagReflections(program, node) {
|
|
5495
5497
|
if (!node) return;
|
|
5496
5498
|
const tags = this.parseTagReflection(node);
|
|
5497
5499
|
if (Object.entries(tags).filter(([, value]) => value !== void 0 && (!Array.isArray(value) || value.length > 0) && (typeof value !== "string" || value?.trim().replace(/^"/gm, "").replace(/"$/gm, ""))).length > 0) program.pushOp(ReflectionOp.tags, program.findOrAddStackEntry(this.f.createObjectLiteralExpression(this.f.createNodeArray(Object.entries(tags).filter(([, value]) => value !== void 0 && (!Array.isArray(value) || value.length > 0) && (typeof value !== "string" || value.trim().replace(/^"/gm, "").replace(/"$/gm, ""))).map(([key, value]) => {
|
|
5498
|
-
return this.f.createPropertyAssignment(key, Array.isArray(value) ? this.f.createArrayLiteralExpression(value.map((item) => this.valueToExpression(item))) :
|
|
5500
|
+
return this.f.createPropertyAssignment(key, Array.isArray(value) ? this.f.createArrayLiteralExpression(value.map((item) => this.valueToExpression(item))) : this.valueToExpression(value));
|
|
5499
5501
|
})))));
|
|
5500
5502
|
}
|
|
5501
5503
|
extractDefaultValueReflection(program, node) {
|
|
@@ -5505,7 +5507,7 @@ var ReflectionTransformer = class {
|
|
|
5505
5507
|
if (defaultValue) program.pushOp(ReflectionOp.defaultValue, program.findOrAddStackEntry(this.parseDefaultValue((node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.ClassExpression ? node?.name?.parent?.kind : node.kind === SyntaxKind.PropertySignature || node.kind === SyntaxKind.PropertyDeclaration ? node.type?.kind : node.kind) || SyntaxKind.StringKeyword, defaultValue.trim().replace(/^"/gm, "").replace(/"$/gm, ""))));
|
|
5506
5508
|
}
|
|
5507
5509
|
extractDescriptionReflection(program, node) {
|
|
5508
|
-
if (!node || this.getReflectionConfig(this.sourceFile).level !== "
|
|
5510
|
+
if (!node || this.getReflectionConfig(this.sourceFile).level !== "all") return;
|
|
5509
5511
|
const description = extractJSDocAttribute(this.sourceFile, node, "description");
|
|
5510
5512
|
if (description) program.pushOp(ReflectionOp.description, program.findOrAddStackEntry(description.trim().replace(/^"/gm, "").replace(/"$/gm, "")));
|
|
5511
5513
|
}
|
|
@@ -6549,4 +6551,4 @@ const declarationTransformer = function deepkitDeclarationTransformer(context) {
|
|
|
6549
6551
|
|
|
6550
6552
|
//#endregion
|
|
6551
6553
|
export { declarationTransformer as a, packSizeByte as c, debugPackStruct as i, transformer as l, DeclarationTransformer as n, encodeOps as o, ReflectionTransformer as r, packSize as s, Cache as t };
|
|
6552
|
-
//# sourceMappingURL=compiler-
|
|
6554
|
+
//# sourceMappingURL=compiler-EpGQgrx7.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-BmvPcxpV.cjs');
|
|
2
2
|
const require_type = require('./type-fEQrgtBF.cjs');
|
|
3
|
-
const require_config = require('./config-
|
|
3
|
+
const require_config = require('./config-kjucozD0.cjs');
|
|
4
4
|
let typescript = require("typescript");
|
|
5
5
|
typescript = require_chunk.__toESM(typescript);
|
|
6
6
|
|
|
@@ -4580,7 +4580,7 @@ function executeCloneNode(node, options) {
|
|
|
4580
4580
|
}
|
|
4581
4581
|
|
|
4582
4582
|
//#endregion
|
|
4583
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
4583
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/esm/src/reflection-ast.js
|
|
4584
4584
|
const { isArrowFunction: isArrowFunction$1, isComputedPropertyName, isIdentifier: isIdentifier$1, isNamedImports, isNumericLiteral, isPrivateIdentifier, isStringLiteral: isStringLiteral$1, isStringLiteralLike, setOriginalNode, getLeadingCommentRanges, isNoSubstitutionTemplateLiteral, NodeFlags: NodeFlags$1, SyntaxKind: SyntaxKind$1 } = typescript.default;
|
|
4585
4585
|
function is__String(value) {
|
|
4586
4586
|
return typeof value === "string";
|
|
@@ -4640,7 +4640,7 @@ function parseJSDocAttributeFromText(comment, attribute) {
|
|
|
4640
4640
|
}).join("\n").replace(/\n*$/g, ""), end + 1];
|
|
4641
4641
|
}
|
|
4642
4642
|
function parseJSDocBooleanFromText(comment, attribute) {
|
|
4643
|
-
return new RegExp(
|
|
4643
|
+
return new RegExp(`^\\s*\\*?\\s*@${attribute?.trim()}\\s*(false|False|FALSE|0|n|N|no|No|NO)\\s*$`, "gm").test(comment?.trim()) ? false : new RegExp(`^\\s*\\*?\\s*@${attribute?.trim()}.*\\s*`, "gm").test(comment?.trim()) ? true : void 0;
|
|
4644
4644
|
}
|
|
4645
4645
|
function parseJSDocDescription(comment) {
|
|
4646
4646
|
let lines = comment.split("\n").filter((line) => line && !line.includes("/**") && !line.includes("*/")).map((line) => line.replace(/^\s*\*\s*/g, "").replace(/^\*\s*/g, "").trim());
|
|
@@ -4816,7 +4816,7 @@ function finish(oldNode, newNode) {
|
|
|
4816
4816
|
}
|
|
4817
4817
|
|
|
4818
4818
|
//#endregion
|
|
4819
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
4819
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/esm/src/compiler.js
|
|
4820
4820
|
var import_dist = require_dist();
|
|
4821
4821
|
const { visitEachChild, visitNode, isPropertyAssignment, isArrayTypeNode, isArrowFunction, isBlock, isCallExpression, isCallSignatureDeclaration, isClassDeclaration, isClassExpression, isConstructorDeclaration, isConstructorTypeNode, isConstructSignatureDeclaration, isEnumDeclaration, isExportDeclaration, isExpression, isExpressionWithTypeArguments, isFunctionDeclaration, isFunctionExpression, isFunctionLike, isIdentifier, isImportClause, isImportDeclaration, isImportSpecifier, isInferTypeNode, isInterfaceDeclaration, isMethodDeclaration, isMethodSignature, isModuleDeclaration, isNamedExports, isNamedTupleMember, isNewExpression, isObjectLiteralExpression, isOptionalTypeNode, isParameter, isParenthesizedExpression, isParenthesizedTypeNode, isPropertyAccessExpression, isQualifiedName, isSourceFile, isStringLiteral, isTypeAliasDeclaration, isTypeLiteralNode, isTypeParameterDeclaration, isTypeQueryNode, isTypeReferenceNode, isUnionTypeNode, isExpressionStatement, isVariableDeclaration, getEffectiveConstraintOfTypeParameter, addSyntheticLeadingComment, createCompilerHost, createPrinter, escapeLeadingUnderscores, EmitHint, NodeFlags, SyntaxKind, ScriptTarget, ModifierFlags, ScriptKind } = typescript.default;
|
|
4822
4822
|
function encodeOps(ops) {
|
|
@@ -5125,7 +5125,7 @@ var ReflectionTransformer = class {
|
|
|
5125
5125
|
}
|
|
5126
5126
|
withReflection(config) {
|
|
5127
5127
|
const configResolver = {
|
|
5128
|
-
|
|
5128
|
+
level: "default",
|
|
5129
5129
|
...config,
|
|
5130
5130
|
path: "",
|
|
5131
5131
|
mergeStrategy: "replace",
|
|
@@ -5135,7 +5135,7 @@ var ReflectionTransformer = class {
|
|
|
5135
5135
|
return {
|
|
5136
5136
|
mode: require_config.reflectionModeMatcher(config, path),
|
|
5137
5137
|
tsConfigPath: "",
|
|
5138
|
-
level: configResolver.
|
|
5138
|
+
level: configResolver.level
|
|
5139
5139
|
};
|
|
5140
5140
|
};
|
|
5141
5141
|
this.overriddenConfigResolver = {
|
|
@@ -5483,20 +5483,22 @@ var ReflectionTransformer = class {
|
|
|
5483
5483
|
tags.hidden = extractJSDocBoolean(this.sourceFile, node, "hidden");
|
|
5484
5484
|
tags.ignore = extractJSDocBoolean(this.sourceFile, node, "ignore");
|
|
5485
5485
|
tags.internal = extractJSDocBoolean(this.sourceFile, node, "internal");
|
|
5486
|
-
|
|
5486
|
+
tags.runtime = extractJSDocBoolean(this.sourceFile, node, "runtime");
|
|
5487
|
+
if (this.getReflectionConfig(this.sourceFile).level === "default" || this.getReflectionConfig(this.sourceFile).level === "extended" || this.getReflectionConfig(this.sourceFile).level === "all") {
|
|
5487
5488
|
tags.alias = extractJSDocArray(this.sourceFile, node, "alias");
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5489
|
+
if (this.getReflectionConfig(this.sourceFile).level === "extended" || this.getReflectionConfig(this.sourceFile).level === "all") {
|
|
5490
|
+
tags.permission = extractJSDocArray(this.sourceFile, node, "permission");
|
|
5491
|
+
tags.domain = extractJSDocAttribute(this.sourceFile, node, "domain");
|
|
5492
|
+
if (this.getReflectionConfig(this.sourceFile).level === "all") tags.title = extractJSDocAttribute(this.sourceFile, node, "title");
|
|
5493
|
+
}
|
|
5494
|
+
}
|
|
5493
5495
|
return tags;
|
|
5494
5496
|
}
|
|
5495
5497
|
extractTagReflections(program, node) {
|
|
5496
5498
|
if (!node) return;
|
|
5497
5499
|
const tags = this.parseTagReflection(node);
|
|
5498
5500
|
if (Object.entries(tags).filter(([, value]) => value !== void 0 && (!Array.isArray(value) || value.length > 0) && (typeof value !== "string" || value?.trim().replace(/^"/gm, "").replace(/"$/gm, ""))).length > 0) program.pushOp(require_type.ReflectionOp.tags, program.findOrAddStackEntry(this.f.createObjectLiteralExpression(this.f.createNodeArray(Object.entries(tags).filter(([, value]) => value !== void 0 && (!Array.isArray(value) || value.length > 0) && (typeof value !== "string" || value.trim().replace(/^"/gm, "").replace(/"$/gm, ""))).map(([key, value]) => {
|
|
5499
|
-
return this.f.createPropertyAssignment(key, Array.isArray(value) ? this.f.createArrayLiteralExpression(value.map((item) => this.valueToExpression(item))) :
|
|
5501
|
+
return this.f.createPropertyAssignment(key, Array.isArray(value) ? this.f.createArrayLiteralExpression(value.map((item) => this.valueToExpression(item))) : this.valueToExpression(value));
|
|
5500
5502
|
})))));
|
|
5501
5503
|
}
|
|
5502
5504
|
extractDefaultValueReflection(program, node) {
|
|
@@ -5506,7 +5508,7 @@ var ReflectionTransformer = class {
|
|
|
5506
5508
|
if (defaultValue) program.pushOp(require_type.ReflectionOp.defaultValue, program.findOrAddStackEntry(this.parseDefaultValue((node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.ClassExpression ? node?.name?.parent?.kind : node.kind === SyntaxKind.PropertySignature || node.kind === SyntaxKind.PropertyDeclaration ? node.type?.kind : node.kind) || SyntaxKind.StringKeyword, defaultValue.trim().replace(/^"/gm, "").replace(/"$/gm, ""))));
|
|
5507
5509
|
}
|
|
5508
5510
|
extractDescriptionReflection(program, node) {
|
|
5509
|
-
if (!node || this.getReflectionConfig(this.sourceFile).level !== "
|
|
5511
|
+
if (!node || this.getReflectionConfig(this.sourceFile).level !== "all") return;
|
|
5510
5512
|
const description = extractJSDocAttribute(this.sourceFile, node, "description");
|
|
5511
5513
|
if (description) program.pushOp(require_type.ReflectionOp.description, program.findOrAddStackEntry(description.trim().replace(/^"/gm, "").replace(/"$/gm, "")));
|
|
5512
5514
|
}
|
|
@@ -6602,4 +6604,5 @@ Object.defineProperty(exports, 'transformer', {
|
|
|
6602
6604
|
get: function () {
|
|
6603
6605
|
return transformer;
|
|
6604
6606
|
}
|
|
6605
|
-
});
|
|
6607
|
+
});
|
|
6608
|
+
//# sourceMappingURL=compiler-LYoUBwrr.cjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as ReflectionOp } from "./type-BoBEcrg7.mjs";
|
|
2
|
-
import { c as ReflectionConfig, i as MatchResult, l as ReflectionConfigCache, t as ConfigResolver } from "./config-
|
|
2
|
+
import { c as ReflectionConfig, i as MatchResult, l as ReflectionConfigCache, t as ConfigResolver } from "./config-D6zsQbZD.mjs";
|
|
3
3
|
import ts, { ArrowFunction, Bundle, ClassDeclaration, ClassExpression, CompilerHost, CompilerOptions, ConstructorDeclaration, CustomTransformer, CustomTransformerFactory, Declaration, EntityName, ExportDeclaration, Expression, ExpressionWithTypeArguments, FunctionDeclaration, FunctionExpression, Identifier, ImportDeclaration, JSDocImportTag, MethodDeclaration, ModuleDeclaration, ModuleExportName, Node, NodeFactory, ParseConfigHost, PropertyAccessExpression, QualifiedName, ResolvedModule, ScriptKind, SourceFile, Statement, StringLiteral, Symbol as Symbol$1, SymbolTable, TransformationContext, TypeAliasDeclaration, TypeChecker, TypeParameterDeclaration, TypeReferenceNode } from "typescript";
|
|
4
4
|
|
|
5
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
5
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/cjs/src/ts-types.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Contains @internal properties that are not yet in the public API of TS.
|
|
8
8
|
*/
|
|
@@ -20,7 +20,7 @@ interface SourceFile$1 extends SourceFile {
|
|
|
20
20
|
symbol?: Symbol$1;
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
23
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/cjs/src/reflection-ast.d.ts
|
|
24
24
|
type PackExpression = Expression | string | number | boolean | bigint;
|
|
25
25
|
declare class NodeConverter {
|
|
26
26
|
protected f: NodeFactory;
|
|
@@ -28,7 +28,7 @@ declare class NodeConverter {
|
|
|
28
28
|
toExpression<T extends PackExpression | PackExpression[]>(node?: T): Expression;
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
31
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/cjs/src/resolver.d.ts
|
|
32
32
|
/**
|
|
33
33
|
* A utility to resolve a module path and its declaration.
|
|
34
34
|
*
|
|
@@ -55,7 +55,7 @@ declare class Resolver {
|
|
|
55
55
|
resolveSourceFile(sourceFile: SourceFile, modulePath: StringLiteral): SourceFile | undefined;
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
58
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/cjs/src/compiler.d.ts
|
|
59
59
|
declare function encodeOps(ops: ReflectionOp[]): string;
|
|
60
60
|
declare const packSizeByte: number;
|
|
61
61
|
/**
|
|
@@ -377,4 +377,4 @@ declare const transformer: CustomTransformerFactory;
|
|
|
377
377
|
declare const declarationTransformer: CustomTransformerFactory;
|
|
378
378
|
//#endregion
|
|
379
379
|
export { debugPackStruct as a, packSize as c, TagsReflectionStruct as i, packSizeByte as l, DeclarationTransformer as n, declarationTransformer as o, ReflectionTransformer as r, encodeOps as s, Cache as t, transformer as u };
|
|
380
|
-
//# sourceMappingURL=compiler-
|
|
380
|
+
//# sourceMappingURL=compiler-tVqzhDgZ.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ts, { CompilerOptions, ParseConfigHost } from "typescript";
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
3
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/cjs/src/config.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Default means reflection is enabled for this file.
|
|
6
6
|
* Never means the whole reflection is disabled for this file.
|
|
@@ -13,14 +13,19 @@ type RawMode = Mode | "" | boolean | string | string[] | undefined;
|
|
|
13
13
|
declare function isObject(obj: any): obj is {
|
|
14
14
|
[key: string]: any;
|
|
15
15
|
};
|
|
16
|
-
declare const
|
|
17
|
-
type Level = (typeof
|
|
16
|
+
declare const level: string[];
|
|
17
|
+
type Level = (typeof level)[number];
|
|
18
18
|
/**
|
|
19
19
|
* These are the values that can be in the tsconfig.json file.
|
|
20
20
|
*/
|
|
21
21
|
interface TsConfigJson {
|
|
22
22
|
extends?: string;
|
|
23
23
|
compilerOptions?: any;
|
|
24
|
+
/**
|
|
25
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
26
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
27
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
28
|
+
*/
|
|
24
29
|
reflection?: RawMode;
|
|
25
30
|
/**
|
|
26
31
|
* Defines the level of reflection to be used during the transpilation process.
|
|
@@ -30,9 +35,9 @@ interface TsConfigJson {
|
|
|
30
35
|
* - `minimal` - Only the essential type information is captured. (only "hidden", "ignore" and "internal", "readonly")
|
|
31
36
|
* - `normal` - Additional type information is captured, including some contextual data. (adds "alias" and "runtime")
|
|
32
37
|
* - `extended` - Even more detailed type information is captured, including extended contextual data. (adds "permissions" and "domain")
|
|
33
|
-
* - `
|
|
38
|
+
* - `all` - All available type information is captured, including detailed contextual data. (adds "title" and "description")
|
|
34
39
|
*/
|
|
35
|
-
|
|
40
|
+
level?: Level;
|
|
36
41
|
deepkitCompilerOptions?: {
|
|
37
42
|
/**
|
|
38
43
|
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
@@ -45,11 +50,12 @@ interface TsConfigJson {
|
|
|
45
50
|
*
|
|
46
51
|
* @remarks
|
|
47
52
|
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
48
|
-
* - `minimal` - Only the essential type information is captured.
|
|
49
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
50
|
-
* - `
|
|
53
|
+
* - `minimal` - Only the essential type information is captured. (only "hidden", "ignore" and "internal", "readonly")
|
|
54
|
+
* - `normal` - Additional type information is captured, including some contextual data. (adds "alias" and "runtime")
|
|
55
|
+
* - `extended` - Even more detailed type information is captured, including extended contextual data. (adds "permissions" and "domain")
|
|
56
|
+
* - `all` - All available type information is captured, including detailed contextual data. (adds "title" and "description")
|
|
51
57
|
*/
|
|
52
|
-
|
|
58
|
+
level?: Level;
|
|
53
59
|
/**
|
|
54
60
|
* If a tsconfig extends another tsconfig, this option defines how the reflection/exclude
|
|
55
61
|
* options are merged. The default strategy is `merge`, which means that the reflection/exclude
|
|
@@ -72,14 +78,22 @@ interface ReflectionConfig {
|
|
|
72
78
|
*/
|
|
73
79
|
exclude?: string[];
|
|
74
80
|
/**
|
|
75
|
-
* Either
|
|
76
|
-
* or a list of globs to
|
|
81
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
82
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
83
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
77
84
|
*/
|
|
78
85
|
reflection?: string[] | Mode;
|
|
79
86
|
/**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
88
|
+
*
|
|
89
|
+
* @remarks
|
|
90
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
91
|
+
* - `minimal` - Only the essential type information is captured. (only "hidden", "ignore" and "internal", "readonly")
|
|
92
|
+
* - `normal` - Additional type information is captured, including some contextual data. (adds "alias" and "runtime")
|
|
93
|
+
* - `extended` - Even more detailed type information is captured, including extended contextual data. (adds "permissions" and "domain")
|
|
94
|
+
* - `all` - All available type information is captured, including detailed contextual data. (adds "title" and "description")
|
|
95
|
+
*/
|
|
96
|
+
level?: Level;
|
|
83
97
|
}
|
|
84
98
|
interface CurrentConfig extends ReflectionConfig {
|
|
85
99
|
compilerOptions: ts.CompilerOptions;
|
|
@@ -90,14 +104,14 @@ interface ResolvedConfig extends ReflectionConfig {
|
|
|
90
104
|
path: string;
|
|
91
105
|
compilerOptions: ts.CompilerOptions;
|
|
92
106
|
mergeStrategy: "merge" | "replace";
|
|
93
|
-
|
|
107
|
+
level: Level;
|
|
94
108
|
}
|
|
95
109
|
declare function reflectionModeMatcher(config: ReflectionConfig, filePath: string): Mode;
|
|
96
110
|
declare function parseRawMode(mode: RawMode): string[] | Mode;
|
|
97
111
|
interface MatchResult {
|
|
98
112
|
tsConfigPath: string;
|
|
99
113
|
mode: (typeof reflectionModes)[number];
|
|
100
|
-
level: (typeof
|
|
114
|
+
level: (typeof level)[number];
|
|
101
115
|
}
|
|
102
116
|
declare const defaultExcluded: string[];
|
|
103
117
|
type Matcher = (path: string) => MatchResult;
|
|
@@ -112,5 +126,5 @@ declare function getConfigResolver(cache: ReflectionConfigCache, host: ParseConf
|
|
|
112
126
|
fileName: string;
|
|
113
127
|
}, tsConfigPath?: string): ConfigResolver;
|
|
114
128
|
//#endregion
|
|
115
|
-
export { reflectionModeMatcher as _, Matcher as a, ReflectionConfig as c, TsConfigJson as d, defaultExcluded as f,
|
|
116
|
-
//# sourceMappingURL=config-
|
|
129
|
+
export { reflectionModeMatcher as _, Matcher as a, ReflectionConfig as c, TsConfigJson as d, defaultExcluded as f, parseRawMode as g, level as h, MatchResult as i, ReflectionConfigCache as l, isObject as m, CurrentConfig as n, Mode as o, getConfigResolver as p, Level as r, RawMode as s, ConfigResolver as t, ResolvedConfig as u, reflectionModes as v };
|
|
130
|
+
//# sourceMappingURL=config-B7x14BD7.d.cts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ts, { CompilerOptions, ParseConfigHost } from "typescript";
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
3
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/cjs/src/config.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Default means reflection is enabled for this file.
|
|
6
6
|
* Never means the whole reflection is disabled for this file.
|
|
@@ -13,14 +13,19 @@ type RawMode = Mode | "" | boolean | string | string[] | undefined;
|
|
|
13
13
|
declare function isObject(obj: any): obj is {
|
|
14
14
|
[key: string]: any;
|
|
15
15
|
};
|
|
16
|
-
declare const
|
|
17
|
-
type Level = (typeof
|
|
16
|
+
declare const level: string[];
|
|
17
|
+
type Level = (typeof level)[number];
|
|
18
18
|
/**
|
|
19
19
|
* These are the values that can be in the tsconfig.json file.
|
|
20
20
|
*/
|
|
21
21
|
interface TsConfigJson {
|
|
22
22
|
extends?: string;
|
|
23
23
|
compilerOptions?: any;
|
|
24
|
+
/**
|
|
25
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
26
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
27
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
28
|
+
*/
|
|
24
29
|
reflection?: RawMode;
|
|
25
30
|
/**
|
|
26
31
|
* Defines the level of reflection to be used during the transpilation process.
|
|
@@ -30,9 +35,9 @@ interface TsConfigJson {
|
|
|
30
35
|
* - `minimal` - Only the essential type information is captured. (only "hidden", "ignore" and "internal", "readonly")
|
|
31
36
|
* - `normal` - Additional type information is captured, including some contextual data. (adds "alias" and "runtime")
|
|
32
37
|
* - `extended` - Even more detailed type information is captured, including extended contextual data. (adds "permissions" and "domain")
|
|
33
|
-
* - `
|
|
38
|
+
* - `all` - All available type information is captured, including detailed contextual data. (adds "title" and "description")
|
|
34
39
|
*/
|
|
35
|
-
|
|
40
|
+
level?: Level;
|
|
36
41
|
deepkitCompilerOptions?: {
|
|
37
42
|
/**
|
|
38
43
|
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
@@ -45,11 +50,12 @@ interface TsConfigJson {
|
|
|
45
50
|
*
|
|
46
51
|
* @remarks
|
|
47
52
|
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
48
|
-
* - `minimal` - Only the essential type information is captured.
|
|
49
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
50
|
-
* - `
|
|
53
|
+
* - `minimal` - Only the essential type information is captured. (only "hidden", "ignore" and "internal", "readonly")
|
|
54
|
+
* - `normal` - Additional type information is captured, including some contextual data. (adds "alias" and "runtime")
|
|
55
|
+
* - `extended` - Even more detailed type information is captured, including extended contextual data. (adds "permissions" and "domain")
|
|
56
|
+
* - `all` - All available type information is captured, including detailed contextual data. (adds "title" and "description")
|
|
51
57
|
*/
|
|
52
|
-
|
|
58
|
+
level?: Level;
|
|
53
59
|
/**
|
|
54
60
|
* If a tsconfig extends another tsconfig, this option defines how the reflection/exclude
|
|
55
61
|
* options are merged. The default strategy is `merge`, which means that the reflection/exclude
|
|
@@ -72,14 +78,22 @@ interface ReflectionConfig {
|
|
|
72
78
|
*/
|
|
73
79
|
exclude?: string[];
|
|
74
80
|
/**
|
|
75
|
-
* Either
|
|
76
|
-
* or a list of globs to
|
|
81
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
82
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
83
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
77
84
|
*/
|
|
78
85
|
reflection?: string[] | Mode;
|
|
79
86
|
/**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
88
|
+
*
|
|
89
|
+
* @remarks
|
|
90
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
91
|
+
* - `minimal` - Only the essential type information is captured. (only "hidden", "ignore" and "internal", "readonly")
|
|
92
|
+
* - `normal` - Additional type information is captured, including some contextual data. (adds "alias" and "runtime")
|
|
93
|
+
* - `extended` - Even more detailed type information is captured, including extended contextual data. (adds "permissions" and "domain")
|
|
94
|
+
* - `all` - All available type information is captured, including detailed contextual data. (adds "title" and "description")
|
|
95
|
+
*/
|
|
96
|
+
level?: Level;
|
|
83
97
|
}
|
|
84
98
|
interface CurrentConfig extends ReflectionConfig {
|
|
85
99
|
compilerOptions: ts.CompilerOptions;
|
|
@@ -90,14 +104,14 @@ interface ResolvedConfig extends ReflectionConfig {
|
|
|
90
104
|
path: string;
|
|
91
105
|
compilerOptions: ts.CompilerOptions;
|
|
92
106
|
mergeStrategy: "merge" | "replace";
|
|
93
|
-
|
|
107
|
+
level: Level;
|
|
94
108
|
}
|
|
95
109
|
declare function reflectionModeMatcher(config: ReflectionConfig, filePath: string): Mode;
|
|
96
110
|
declare function parseRawMode(mode: RawMode): string[] | Mode;
|
|
97
111
|
interface MatchResult {
|
|
98
112
|
tsConfigPath: string;
|
|
99
113
|
mode: (typeof reflectionModes)[number];
|
|
100
|
-
level: (typeof
|
|
114
|
+
level: (typeof level)[number];
|
|
101
115
|
}
|
|
102
116
|
declare const defaultExcluded: string[];
|
|
103
117
|
type Matcher = (path: string) => MatchResult;
|
|
@@ -112,5 +126,5 @@ declare function getConfigResolver(cache: ReflectionConfigCache, host: ParseConf
|
|
|
112
126
|
fileName: string;
|
|
113
127
|
}, tsConfigPath?: string): ConfigResolver;
|
|
114
128
|
//#endregion
|
|
115
|
-
export { reflectionModeMatcher as _, Matcher as a, ReflectionConfig as c, TsConfigJson as d, defaultExcluded as f,
|
|
116
|
-
//# sourceMappingURL=config-
|
|
129
|
+
export { reflectionModeMatcher as _, Matcher as a, ReflectionConfig as c, TsConfigJson as d, defaultExcluded as f, parseRawMode as g, level as h, MatchResult as i, ReflectionConfigCache as l, isObject as m, CurrentConfig as n, Mode as o, getConfigResolver as p, Level as r, RawMode as s, ConfigResolver as t, ResolvedConfig as u, reflectionModes as v };
|
|
130
|
+
//# sourceMappingURL=config-D6zsQbZD.d.mts.map
|
|
@@ -3,7 +3,7 @@ import ts from "typescript";
|
|
|
3
3
|
import { dirname, isAbsolute, join } from "node:path";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
|
|
6
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
6
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/esm/src/debug.js
|
|
7
7
|
function isDebug(level = 1) {
|
|
8
8
|
const expected = "deepkit" + (level > 1 ? "+".repeat(level - 1) : "");
|
|
9
9
|
return "undefined" !== typeof process && "string" === typeof process.env.DEBUG && process.env.DEBUG.includes(expected);
|
|
@@ -3364,7 +3364,7 @@ var require_micromatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3364
3364
|
}));
|
|
3365
3365
|
|
|
3366
3366
|
//#endregion
|
|
3367
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
3367
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/esm/src/resolver.js
|
|
3368
3368
|
var import_micromatch = /* @__PURE__ */ __toESM(require_micromatch(), 1);
|
|
3369
3369
|
const { createSourceFile, resolveModuleName, isStringLiteral, JSDocParsingMode, ScriptTarget } = ts;
|
|
3370
3370
|
function patternMatch(path, patterns, base) {
|
|
@@ -3424,7 +3424,7 @@ var Resolver = class {
|
|
|
3424
3424
|
};
|
|
3425
3425
|
|
|
3426
3426
|
//#endregion
|
|
3427
|
-
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=
|
|
3427
|
+
//#region ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=91a56c95b398f90e6f5e654820112642044b9b1e47990b7_dee3caf063df4f5ec81fe038695162cd/node_modules/@deepkit/type-compiler/dist/esm/src/config.js
|
|
3428
3428
|
/**
|
|
3429
3429
|
* Default means reflection is enabled for this file.
|
|
3430
3430
|
* Never means the whole reflection is disabled for this file.
|
|
@@ -3441,11 +3441,11 @@ function isObject(obj) {
|
|
|
3441
3441
|
return typeof obj === "object" && !Array.isArray(obj);
|
|
3442
3442
|
}
|
|
3443
3443
|
const defaultMergeStrategy = "merge";
|
|
3444
|
-
const
|
|
3444
|
+
const level = [
|
|
3445
3445
|
"minimal",
|
|
3446
|
-
"
|
|
3446
|
+
"default",
|
|
3447
3447
|
"extended",
|
|
3448
|
-
"
|
|
3448
|
+
"all"
|
|
3449
3449
|
];
|
|
3450
3450
|
/**
|
|
3451
3451
|
* Read config and parses under TypeScript specification.
|
|
@@ -3466,7 +3466,7 @@ function readTsConfig(parseConfigHost, path) {
|
|
|
3466
3466
|
const tsconfig = JSON.parse(json);
|
|
3467
3467
|
return Object.assign(configFile.config, {
|
|
3468
3468
|
compilerOptions: parsed.options,
|
|
3469
|
-
|
|
3469
|
+
level: tsconfig.level ? String(tsconfig.level) : void 0
|
|
3470
3470
|
});
|
|
3471
3471
|
}
|
|
3472
3472
|
function reflectionModeMatcher(config, filePath) {
|
|
@@ -3510,8 +3510,9 @@ function appendPaths(strategy = defaultMergeStrategy, parent, existing) {
|
|
|
3510
3510
|
return [...parent, ...existing];
|
|
3511
3511
|
}
|
|
3512
3512
|
function applyConfigValues(existing, parent, baseDir) {
|
|
3513
|
-
const
|
|
3514
|
-
|
|
3513
|
+
const parentLevel = parent.deepkitCompilerOptions?.level || parent.level || parent.compilerOptions?.level;
|
|
3514
|
+
let parentReflection = isObject(parent.deepkitCompilerOptions) ? parent.deepkitCompilerOptions?.reflection : parent.reflection;
|
|
3515
|
+
if (parentLevel && !parentReflection) parentReflection = "default";
|
|
3515
3516
|
if (isObject(parent.deepkitCompilerOptions) && "undefined" === typeof existing.mergeStrategy) existing.mergeStrategy = parent.deepkitCompilerOptions.mergeStrategy;
|
|
3516
3517
|
if ("undefined" !== typeof parentReflection) {
|
|
3517
3518
|
const next = parseRawMode(parentReflection);
|
|
@@ -3519,8 +3520,8 @@ function applyConfigValues(existing, parent, baseDir) {
|
|
|
3519
3520
|
else if ("string" === typeof existing.reflection) {} else if (Array.isArray(next) && Array.isArray(existing.reflection)) existing.reflection = appendPaths(existing.mergeStrategy, next, existing.reflection);
|
|
3520
3521
|
else if ("string" === typeof next && Array.isArray(existing.reflection)) {}
|
|
3521
3522
|
}
|
|
3522
|
-
if ("undefined" !== typeof
|
|
3523
|
-
if ("undefined" === typeof existing.
|
|
3523
|
+
if ("undefined" !== typeof parentLevel) {
|
|
3524
|
+
if ("undefined" === typeof existing.level) existing.level = parentLevel;
|
|
3524
3525
|
}
|
|
3525
3526
|
if (isObject(parent.deepkitCompilerOptions)) {
|
|
3526
3527
|
if (`undefined` !== typeof parent.deepkitCompilerOptions.exclude) {
|
|
@@ -3589,7 +3590,7 @@ function getConfigResolver(cache, host, compilerOptions, sourceFile, tsConfigPat
|
|
|
3589
3590
|
compilerOptions: Object.assign(config.compilerOptions, compilerOptions),
|
|
3590
3591
|
exclude: config.exclude,
|
|
3591
3592
|
reflection: config.reflection,
|
|
3592
|
-
|
|
3593
|
+
level: config.level || (config.compilerOptions?.level ? String(config.compilerOptions?.level) : void 0) || "default",
|
|
3593
3594
|
mergeStrategy: config.mergeStrategy || defaultMergeStrategy
|
|
3594
3595
|
};
|
|
3595
3596
|
if (isDebug()) debug(`Found config ${resolvedConfig.path}:\nreflection:`, resolvedConfig.reflection, `\nexclude:`, resolvedConfig.exclude, `\npaths:`, resolvedConfig.compilerOptions.paths);
|
|
@@ -3597,7 +3598,7 @@ function getConfigResolver(cache, host, compilerOptions, sourceFile, tsConfigPat
|
|
|
3597
3598
|
return {
|
|
3598
3599
|
mode: reflectionModeMatcher(config, path),
|
|
3599
3600
|
tsConfigPath,
|
|
3600
|
-
level: resolvedConfig.
|
|
3601
|
+
level: resolvedConfig.level
|
|
3601
3602
|
};
|
|
3602
3603
|
};
|
|
3603
3604
|
return cache[tsConfigPath] = {
|
|
@@ -3607,5 +3608,5 @@ function getConfigResolver(cache, host, compilerOptions, sourceFile, tsConfigPat
|
|
|
3607
3608
|
}
|
|
3608
3609
|
|
|
3609
3610
|
//#endregion
|
|
3610
|
-
export {
|
|
3611
|
-
//# sourceMappingURL=config-
|
|
3611
|
+
export { parseRawMode as a, Resolver as c, level as i, debug as l, getConfigResolver as n, reflectionModeMatcher as o, isObject as r, reflectionModes as s, defaultExcluded as t, debug2 as u };
|
|
3612
|
+
//# sourceMappingURL=config-DH0_s6ur.mjs.map
|