@powerlines/deepkit 0.4.53 → 0.4.55
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 +8 -2
- package/package.json +5 -5
- package/dist/vendor/chunk-654BGLCL.cjs +0 -117
- package/dist/vendor/chunk-654BGLCL.cjs.map +0 -1
- package/dist/vendor/chunk-6PEHRAEP.js +0 -30
- package/dist/vendor/chunk-6PEHRAEP.js.map +0 -1
- package/dist/vendor/chunk-7J4ZAHXE.cjs +0 -3533
- package/dist/vendor/chunk-7J4ZAHXE.cjs.map +0 -1
- package/dist/vendor/chunk-AXYJRGEC.js +0 -3706
- package/dist/vendor/chunk-AXYJRGEC.js.map +0 -1
- package/dist/vendor/chunk-NPOFK5G4.cjs +0 -44
- package/dist/vendor/chunk-NPOFK5G4.cjs.map +0 -1
- package/dist/vendor/chunk-ORGCWC7F.js +0 -111
- package/dist/vendor/chunk-ORGCWC7F.js.map +0 -1
- package/dist/vendor/chunk-Q44VB7VW.js +0 -3515
- package/dist/vendor/chunk-Q44VB7VW.js.map +0 -1
- package/dist/vendor/chunk-QK7ZN2UX.js +0 -7066
- package/dist/vendor/chunk-QK7ZN2UX.js.map +0 -1
- package/dist/vendor/chunk-RESJFWVA.cjs +0 -3861
- package/dist/vendor/chunk-RESJFWVA.cjs.map +0 -1
- package/dist/vendor/chunk-Y4OQFPMH.cjs +0 -7080
- package/dist/vendor/chunk-Y4OQFPMH.cjs.map +0 -1
- package/dist/vendor/compiler.cjs +0 -46
- package/dist/vendor/compiler.cjs.map +0 -1
- package/dist/vendor/compiler.d.cts +0 -3
- package/dist/vendor/compiler.d.ts +0 -3
- package/dist/vendor/compiler.js +0 -7
- package/dist/vendor/compiler.js.map +0 -1
- package/dist/vendor/config.cjs +0 -37
- package/dist/vendor/config.cjs.map +0 -1
- package/dist/vendor/config.d.cts +0 -1
- package/dist/vendor/config.d.ts +0 -1
- package/dist/vendor/config.js +0 -7
- package/dist/vendor/config.js.map +0 -1
- package/dist/vendor/core.cjs +0 -518
- package/dist/vendor/core.cjs.map +0 -1
- package/dist/vendor/core.d.cts +0 -3
- package/dist/vendor/core.d.ts +0 -3
- package/dist/vendor/core.js +0 -4
- package/dist/vendor/core.js.map +0 -1
- package/dist/vendor/index.cjs +0 -108
- package/dist/vendor/index.cjs.map +0 -1
- package/dist/vendor/index.d.cts +0 -1
- package/dist/vendor/index.d.ts +0 -1
- package/dist/vendor/index.js +0 -67
- package/dist/vendor/index.js.map +0 -1
- package/dist/vendor/type-spec.cjs +0 -18
- package/dist/vendor/type-spec.cjs.map +0 -1
- package/dist/vendor/type-spec.d.cts +0 -1
- package/dist/vendor/type-spec.d.ts +0 -1
- package/dist/vendor/type-spec.js +0 -4
- package/dist/vendor/type-spec.js.map +0 -1
- package/dist/vendor/type.cjs +0 -18887
- package/dist/vendor/type.cjs.map +0 -1
- package/dist/vendor/type.d.cts +0 -1
- package/dist/vendor/type.d.ts +0 -1
- package/dist/vendor/type.js +0 -18361
- package/dist/vendor/type.js.map +0 -1
package/dist/vendor/index.cjs
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkY4OQFPMH_cjs = require('./chunk-Y4OQFPMH.cjs');
|
|
4
|
-
var chunk7J4ZAHXE_cjs = require('./chunk-7J4ZAHXE.cjs');
|
|
5
|
-
var ts = require('typescript');
|
|
6
|
-
|
|
7
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
-
|
|
9
|
-
var ts__default = /*#__PURE__*/_interopDefault(ts);
|
|
10
|
-
|
|
11
|
-
// src/vendor/type-compiler/index.ts
|
|
12
|
-
chunk7J4ZAHXE_cjs.init_cjs_shims();
|
|
13
|
-
|
|
14
|
-
// ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_a435fd598596ef57e87e4cc551b9d92d/node_modules/@deepkit/type-compiler/dist/esm/index.js
|
|
15
|
-
chunk7J4ZAHXE_cjs.init_cjs_shims();
|
|
16
|
-
|
|
17
|
-
// ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_a435fd598596ef57e87e4cc551b9d92d/node_modules/@deepkit/type-compiler/dist/esm/src/loader.js
|
|
18
|
-
chunk7J4ZAHXE_cjs.init_cjs_shims();
|
|
19
|
-
var DeepkitLoader = class {
|
|
20
|
-
static {
|
|
21
|
-
chunk7J4ZAHXE_cjs.__name(this, "DeepkitLoader");
|
|
22
|
-
}
|
|
23
|
-
constructor() {
|
|
24
|
-
this.options = {
|
|
25
|
-
allowJs: true,
|
|
26
|
-
declaration: false
|
|
27
|
-
};
|
|
28
|
-
this.host = ts__default.default.createCompilerHost(this.options);
|
|
29
|
-
this.program = ts__default.default.createProgram([], this.options, this.host);
|
|
30
|
-
this.printer = ts__default.default.createPrinter({
|
|
31
|
-
newLine: ts__default.default.NewLineKind.LineFeed
|
|
32
|
-
});
|
|
33
|
-
this.cache = new chunkY4OQFPMH_cjs.Cache();
|
|
34
|
-
this.knownFiles = {};
|
|
35
|
-
this.sourceFiles = {};
|
|
36
|
-
const originReadFile = this.host.readFile;
|
|
37
|
-
this.host.readFile = (fileName) => {
|
|
38
|
-
if (this.knownFiles[fileName]) return this.knownFiles[fileName];
|
|
39
|
-
return originReadFile.call(this.host, fileName);
|
|
40
|
-
};
|
|
41
|
-
this.host.writeFile = () => {
|
|
42
|
-
};
|
|
43
|
-
const originalGetSourceFile = this.host.getSourceFile;
|
|
44
|
-
this.host.getSourceFile = (fileName, languageVersion, onError, shouldCreateNewSourceFile) => {
|
|
45
|
-
if (this.sourceFiles[fileName]) return this.sourceFiles[fileName];
|
|
46
|
-
return originalGetSourceFile.call(this.host, fileName, languageVersion, onError, shouldCreateNewSourceFile);
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
transform(source, path) {
|
|
50
|
-
this.knownFiles[path] = source;
|
|
51
|
-
const sourceFile = ts__default.default.createSourceFile(path, source, ts__default.default.ScriptTarget.ESNext, true, path.endsWith(".tsx") ? ts__default.default.ScriptKind.TSX : ts__default.default.ScriptKind.TS);
|
|
52
|
-
let newSource = source;
|
|
53
|
-
ts__default.default.transform(sourceFile, [
|
|
54
|
-
(context) => {
|
|
55
|
-
const transformer2 = new chunkY4OQFPMH_cjs.ReflectionTransformer(context, this.cache).forHost(this.host).withReflection({
|
|
56
|
-
reflection: "default",
|
|
57
|
-
reflectionLevel: "normal"
|
|
58
|
-
});
|
|
59
|
-
return (node) => {
|
|
60
|
-
const sourceFile2 = transformer2.transformSourceFile(node);
|
|
61
|
-
newSource = this.printer.printNode(ts__default.default.EmitHint.SourceFile, sourceFile2, sourceFile2);
|
|
62
|
-
return sourceFile2;
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
], this.options);
|
|
66
|
-
return newSource;
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
Object.defineProperty(exports, "Cache", {
|
|
71
|
-
enumerable: true,
|
|
72
|
-
get: function () { return chunkY4OQFPMH_cjs.Cache; }
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(exports, "DeclarationTransformer", {
|
|
75
|
-
enumerable: true,
|
|
76
|
-
get: function () { return chunkY4OQFPMH_cjs.DeclarationTransformer; }
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "ReflectionTransformer", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () { return chunkY4OQFPMH_cjs.ReflectionTransformer; }
|
|
81
|
-
});
|
|
82
|
-
Object.defineProperty(exports, "debugPackStruct", {
|
|
83
|
-
enumerable: true,
|
|
84
|
-
get: function () { return chunkY4OQFPMH_cjs.debugPackStruct; }
|
|
85
|
-
});
|
|
86
|
-
Object.defineProperty(exports, "declarationTransformer", {
|
|
87
|
-
enumerable: true,
|
|
88
|
-
get: function () { return chunkY4OQFPMH_cjs.declarationTransformer; }
|
|
89
|
-
});
|
|
90
|
-
Object.defineProperty(exports, "encodeOps", {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () { return chunkY4OQFPMH_cjs.encodeOps; }
|
|
93
|
-
});
|
|
94
|
-
Object.defineProperty(exports, "packSize", {
|
|
95
|
-
enumerable: true,
|
|
96
|
-
get: function () { return chunkY4OQFPMH_cjs.packSize; }
|
|
97
|
-
});
|
|
98
|
-
Object.defineProperty(exports, "packSizeByte", {
|
|
99
|
-
enumerable: true,
|
|
100
|
-
get: function () { return chunkY4OQFPMH_cjs.packSizeByte; }
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(exports, "transformer", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function () { return chunkY4OQFPMH_cjs.transformer; }
|
|
105
|
-
});
|
|
106
|
-
exports.DeepkitLoader = DeepkitLoader;
|
|
107
|
-
//# sourceMappingURL=index.cjs.map
|
|
108
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/vendor/type-compiler/index.ts","../../../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_a435fd598596ef57e87e4cc551b9d92d/node_modules/@deepkit/type-compiler/index.ts","../../../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_a435fd598596ef57e87e4cc551b9d92d/node_modules/@deepkit/type-compiler/src/loader.ts"],"names":["init_cjs_shims","ts","Cache","transformer","ReflectionTransformer","sourceFile"],"mappings":";;;;;;;;;;;AAAAA,gCAAA,EAAA;;;ACAAA,gCAAA,EAAA;;;ACKAA,gCAAA,EAAA;AAGM,IAAO,gBAAP,MAAoB;EAH1B;;;EAmBE,WAAA,GAAA;AAfU,IAAA,IAAA,CAAA,OAAA,GAA2B;MACnC,OAAA,EAAS,IAAA;MACT,WAAA,EAAa;;AAGL,IA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CAAK,UAAA,CAAW,IAAI,CAAA,GAAI,MAAA;AACxB,IAAA,MAAM,aAAaD,mBAAA,CAAG,gBAAA,CACpB,MACA,MAAA,EACAA,mBAAA,CAAG,aAAa,MAAA,EAChB,IAAA,EACA,IAAA,CAAK,QAAA,CAAS,MAAM,CAAA,GAAIA,mBAAA,CAAG,WAAW,GAAA,GAAMA,mBAAA,CAAG,WAAW,EAAE,CAAA;AAE9D,IAAA,IAAI,SAAA,GAAY,MAAA;AAEhB,IAAAA,mBAAA,CAAG,UACD,UAAA,EACA;AACE,MAAA,CAAC,OAAA,KAAgC;AAC/B,QAAA,MAAME,YAAAA,GAAc,IAAIC,uCAAA,CAAsB,OAAA,EAAS,IAAA,CAAK,KAAK,CAAA,CAC9D,OAAA,CAAQ,IAAA,CAAK,IAAI,CAAA,CACjB,cAAA,CAAe;UACd,UAAA,EAAY,SAAA;UACZ,eAAA,EAAiB;AAClB,SAAA,CAAA;AACH,QAAA,OAAO,CAAC,IAAA,KAA8B;AACpC,UAAA,MAAMC,WAAAA,GAAaF,YAAAA,CAAY,mBAAA,CAAoB,IAAI,CAAA;AAEvD,UAAA,SAAA,GAAY,KAAK,OAAA,CAAQ,SAAA,CACvBF,oBAAG,QAAA,CAAS,UAAA,EACZI,aACAA,WAAU,CAAA;AAEZ,UAAA,OAAOA,WAAAA;AACT,QAAA,CAAA;AACF,MAAA;AAEF,KAAA,EAAA,IAAA,CAAK,OAAO,CAAA;AAGd,IAAA,OAAO,SAAA;AACT,EAAA","file":"index.cjs","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n// Re-exported Deepkit - Type Compiler module\n\nexport * from \"@deepkit/type-compiler\";\n","/*\n * Deepkit Framework\n * Copyright (C) 2021 Deepkit UG, Marc J. Schmidt\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the MIT License.\n *\n * You should have received a copy of the MIT License along with this program.\n */\n\nimport type { Program } from \"typescript\";\nimport { declarationTransformer, transformer } from \"./src/compiler.js\";\n\nexport * from \"./src/compiler.js\";\nexport * from \"./src/loader.js\";\n\nexport default function transformerPlugin(program: Program, opts: {}) {\n return {\n before: transformer,\n afterDeclarations: declarationTransformer\n };\n}\n","import type {\n CompilerOptions,\n SourceFile,\n TransformationContext\n} from \"typescript\";\nimport ts from \"typescript\";\nimport { Cache, ReflectionTransformer } from \"./compiler.js\";\n\nexport class DeepkitLoader {\n protected options: CompilerOptions = {\n allowJs: true,\n declaration: false\n };\n\n protected host = ts.createCompilerHost(this.options);\n\n protected program = ts.createProgram([], this.options, this.host);\n\n protected printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });\n protected cache = new Cache();\n\n protected knownFiles: { [path: string]: string } = {};\n protected sourceFiles: { [path: string]: SourceFile } = {};\n\n constructor() {\n const originReadFile = this.host.readFile;\n this.host.readFile = (fileName: string) => {\n if (this.knownFiles[fileName]) return this.knownFiles[fileName];\n return originReadFile.call(this.host, fileName);\n };\n\n //the program should not write any files\n this.host.writeFile = () => {};\n\n const originalGetSourceFile = this.host.getSourceFile;\n this.host.getSourceFile = (\n fileName: string,\n languageVersion: ts.ScriptTarget,\n onError?: (message: string) => void,\n shouldCreateNewSourceFile?: boolean\n ): SourceFile | undefined => {\n if (this.sourceFiles[fileName]) return this.sourceFiles[fileName];\n return originalGetSourceFile.call(\n this.host,\n fileName,\n languageVersion,\n onError,\n shouldCreateNewSourceFile\n );\n };\n }\n\n transform(source: string, path: string): string {\n this.knownFiles[path] = source;\n const sourceFile = ts.createSourceFile(\n path,\n source,\n ts.ScriptTarget.ESNext,\n true,\n path.endsWith(\".tsx\") ? ts.ScriptKind.TSX : ts.ScriptKind.TS\n );\n let newSource = source;\n\n ts.transform(\n sourceFile,\n [\n (context: TransformationContext) => {\n const transformer = new ReflectionTransformer(context, this.cache)\n .forHost(this.host)\n .withReflection({\n reflection: \"default\",\n reflectionLevel: \"normal\"\n });\n return (node: SourceFile): SourceFile => {\n const sourceFile = transformer.transformSourceFile(node);\n\n newSource = this.printer.printNode(\n ts.EmitHint.SourceFile,\n sourceFile,\n sourceFile\n );\n return sourceFile;\n };\n }\n ],\n this.options\n );\n\n return newSource;\n }\n}\n"]}
|
package/dist/vendor/index.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@deepkit/type-compiler';
|
package/dist/vendor/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@deepkit/type-compiler';
|
package/dist/vendor/index.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Cache, ReflectionTransformer } from './chunk-QK7ZN2UX.js';
|
|
2
|
-
export { Cache, DeclarationTransformer, ReflectionTransformer, debugPackStruct, declarationTransformer, encodeOps, packSize, packSizeByte, transformer } from './chunk-QK7ZN2UX.js';
|
|
3
|
-
import { init_esm_shims, __name } from './chunk-Q44VB7VW.js';
|
|
4
|
-
import ts from 'typescript';
|
|
5
|
-
|
|
6
|
-
// src/vendor/type-compiler/index.ts
|
|
7
|
-
init_esm_shims();
|
|
8
|
-
|
|
9
|
-
// ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_a435fd598596ef57e87e4cc551b9d92d/node_modules/@deepkit/type-compiler/dist/esm/index.js
|
|
10
|
-
init_esm_shims();
|
|
11
|
-
|
|
12
|
-
// ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_a435fd598596ef57e87e4cc551b9d92d/node_modules/@deepkit/type-compiler/dist/esm/src/loader.js
|
|
13
|
-
init_esm_shims();
|
|
14
|
-
var DeepkitLoader = class {
|
|
15
|
-
static {
|
|
16
|
-
__name(this, "DeepkitLoader");
|
|
17
|
-
}
|
|
18
|
-
constructor() {
|
|
19
|
-
this.options = {
|
|
20
|
-
allowJs: true,
|
|
21
|
-
declaration: false
|
|
22
|
-
};
|
|
23
|
-
this.host = ts.createCompilerHost(this.options);
|
|
24
|
-
this.program = ts.createProgram([], this.options, this.host);
|
|
25
|
-
this.printer = ts.createPrinter({
|
|
26
|
-
newLine: ts.NewLineKind.LineFeed
|
|
27
|
-
});
|
|
28
|
-
this.cache = new Cache();
|
|
29
|
-
this.knownFiles = {};
|
|
30
|
-
this.sourceFiles = {};
|
|
31
|
-
const originReadFile = this.host.readFile;
|
|
32
|
-
this.host.readFile = (fileName) => {
|
|
33
|
-
if (this.knownFiles[fileName]) return this.knownFiles[fileName];
|
|
34
|
-
return originReadFile.call(this.host, fileName);
|
|
35
|
-
};
|
|
36
|
-
this.host.writeFile = () => {
|
|
37
|
-
};
|
|
38
|
-
const originalGetSourceFile = this.host.getSourceFile;
|
|
39
|
-
this.host.getSourceFile = (fileName, languageVersion, onError, shouldCreateNewSourceFile) => {
|
|
40
|
-
if (this.sourceFiles[fileName]) return this.sourceFiles[fileName];
|
|
41
|
-
return originalGetSourceFile.call(this.host, fileName, languageVersion, onError, shouldCreateNewSourceFile);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
transform(source, path) {
|
|
45
|
-
this.knownFiles[path] = source;
|
|
46
|
-
const sourceFile = ts.createSourceFile(path, source, ts.ScriptTarget.ESNext, true, path.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS);
|
|
47
|
-
let newSource = source;
|
|
48
|
-
ts.transform(sourceFile, [
|
|
49
|
-
(context) => {
|
|
50
|
-
const transformer2 = new ReflectionTransformer(context, this.cache).forHost(this.host).withReflection({
|
|
51
|
-
reflection: "default",
|
|
52
|
-
reflectionLevel: "normal"
|
|
53
|
-
});
|
|
54
|
-
return (node) => {
|
|
55
|
-
const sourceFile2 = transformer2.transformSourceFile(node);
|
|
56
|
-
newSource = this.printer.printNode(ts.EmitHint.SourceFile, sourceFile2, sourceFile2);
|
|
57
|
-
return sourceFile2;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
], this.options);
|
|
61
|
-
return newSource;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export { DeepkitLoader };
|
|
66
|
-
//# sourceMappingURL=index.js.map
|
|
67
|
-
//# sourceMappingURL=index.js.map
|
package/dist/vendor/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/vendor/type-compiler/index.ts","../../../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_a435fd598596ef57e87e4cc551b9d92d/node_modules/@deepkit/type-compiler/index.ts","../../../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_a435fd598596ef57e87e4cc551b9d92d/node_modules/@deepkit/type-compiler/src/loader.ts"],"names":["transformer","sourceFile"],"mappings":";;;;;;AAAA,cAAA,EAAA;;;ACAA,cAAA,EAAA;;;ACKA,cAAA,EAAA;AAGM,IAAO,gBAAP,MAAoB;EAH1B;;;EAmBE,WAAA,GAAA;AAfU,IAAA,IAAA,CAAA,OAAA,GAA2B;MACnC,OAAA,EAAS,IAAA;MACT,WAAA,EAAa;;AAGL,IAAA,IAAA,CAAA,IAAA,GAAO,EAAA,CAAG,kBAAA,CAAmB,IAAA,CAAK,OAAO,CAAA;AAEzC,IAAA,IAAA,CAAA,OAAA,GAAU,GAAG,aAAA,CAAc,IAAI,IAAA,CAAK,OAAA,EAAS,KAAK,IAAI,CAAA;AAEtD,IAAA,IAAA,CAAA,OAAA,GAAU,GAAG,aAAA,CAAc;AAA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AE9D,IAAA,IAAI,SAAA,GAAY,MAAA;AAEhB,IAAA,EAAA,CAAG,UACD,UAAA,EACA;AACE,MAAA,CAAC,OAAA,KAAgC;AAC/B,QAAA,MAAMA,YAAAA,GAAc,IAAI,qBAAA,CAAsB,OAAA,EAAS,IAAA,CAAK,KAAK,CAAA,CAC9D,OAAA,CAAQ,IAAA,CAAK,IAAI,CAAA,CACjB,cAAA,CAAe;UACd,UAAA,EAAY,SAAA;UACZ,eAAA,EAAiB;AAClB,SAAA,CAAA;AACH,QAAA,OAAO,CAAC,IAAA,KAA8B;AACpC,UAAA,MAAMC,WAAAA,GAAaD,YAAAA,CAAY,mBAAA,CAAoB,IAAI,CAAA;AAEvD,UAAA,SAAA,GAAY,KAAK,OAAA,CAAQ,SAAA,CACvB,GAAG,QAAA,CAAS,UAAA,EACZC,aACAA,WAAU,CAAA;AAEZ,UAAA,OAAOA,WAAAA;AACT,QAAA,CAAA;AACF,MAAA;AAEF,KAAA,EAAA,IAAA,CAAK,OAAO,CAAA;AAGd,IAAA,OAAO,SAAA;AACT,EAAA","file":"index.js","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n// Re-exported Deepkit - Type Compiler module\n\nexport * from \"@deepkit/type-compiler\";\n","/*\n * Deepkit Framework\n * Copyright (C) 2021 Deepkit UG, Marc J. Schmidt\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the MIT License.\n *\n * You should have received a copy of the MIT License along with this program.\n */\n\nimport type { Program } from \"typescript\";\nimport { declarationTransformer, transformer } from \"./src/compiler.js\";\n\nexport * from \"./src/compiler.js\";\nexport * from \"./src/loader.js\";\n\nexport default function transformerPlugin(program: Program, opts: {}) {\n return {\n before: transformer,\n afterDeclarations: declarationTransformer\n };\n}\n","import type {\n CompilerOptions,\n SourceFile,\n TransformationContext\n} from \"typescript\";\nimport ts from \"typescript\";\nimport { Cache, ReflectionTransformer } from \"./compiler.js\";\n\nexport class DeepkitLoader {\n protected options: CompilerOptions = {\n allowJs: true,\n declaration: false\n };\n\n protected host = ts.createCompilerHost(this.options);\n\n protected program = ts.createProgram([], this.options, this.host);\n\n protected printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });\n protected cache = new Cache();\n\n protected knownFiles: { [path: string]: string } = {};\n protected sourceFiles: { [path: string]: SourceFile } = {};\n\n constructor() {\n const originReadFile = this.host.readFile;\n this.host.readFile = (fileName: string) => {\n if (this.knownFiles[fileName]) return this.knownFiles[fileName];\n return originReadFile.call(this.host, fileName);\n };\n\n //the program should not write any files\n this.host.writeFile = () => {};\n\n const originalGetSourceFile = this.host.getSourceFile;\n this.host.getSourceFile = (\n fileName: string,\n languageVersion: ts.ScriptTarget,\n onError?: (message: string) => void,\n shouldCreateNewSourceFile?: boolean\n ): SourceFile | undefined => {\n if (this.sourceFiles[fileName]) return this.sourceFiles[fileName];\n return originalGetSourceFile.call(\n this.host,\n fileName,\n languageVersion,\n onError,\n shouldCreateNewSourceFile\n );\n };\n }\n\n transform(source: string, path: string): string {\n this.knownFiles[path] = source;\n const sourceFile = ts.createSourceFile(\n path,\n source,\n ts.ScriptTarget.ESNext,\n true,\n path.endsWith(\".tsx\") ? ts.ScriptKind.TSX : ts.ScriptKind.TS\n );\n let newSource = source;\n\n ts.transform(\n sourceFile,\n [\n (context: TransformationContext) => {\n const transformer = new ReflectionTransformer(context, this.cache)\n .forHost(this.host)\n .withReflection({\n reflection: \"default\",\n reflectionLevel: \"normal\"\n });\n return (node: SourceFile): SourceFile => {\n const sourceFile = transformer.transformSourceFile(node);\n\n newSource = this.printer.printNode(\n ts.EmitHint.SourceFile,\n sourceFile,\n sourceFile\n );\n return sourceFile;\n };\n }\n ],\n this.options\n );\n\n return newSource;\n }\n}\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk654BGLCL_cjs = require('./chunk-654BGLCL.cjs');
|
|
4
|
-
var chunkNPOFK5G4_cjs = require('./chunk-NPOFK5G4.cjs');
|
|
5
|
-
|
|
6
|
-
// src/vendor/type-spec.ts
|
|
7
|
-
chunkNPOFK5G4_cjs.init_cjs_shims();
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, "ReflectionOp", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () { return chunk654BGLCL_cjs.ReflectionOp; }
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "TypeNumberBrand", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return chunk654BGLCL_cjs.TypeNumberBrand; }
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=type-spec.cjs.map
|
|
18
|
-
//# sourceMappingURL=type-spec.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/vendor/type-spec.ts"],"names":["init_cjs_shims"],"mappings":";;;;;;AAAAA,gCAAA,EAAA","file":"type-spec.cjs","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n// Re-exported Deepkit - Type Spec module\n\nexport * from \"@deepkit/type-spec\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@deepkit/type-spec';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@deepkit/type-spec';
|
package/dist/vendor/type-spec.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"type-spec.js"}
|