@powerlines/deepkit 0.4.89 → 0.4.90
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.cjs +187 -0
- package/dist/capnp.d.cts +169 -0
- package/dist/capnp.d.ts +169 -0
- package/dist/capnp.js +2 -0
- package/dist/chunk-2V4ET57D.js +6954 -0
- package/dist/chunk-4WJJKR53.js +3731 -0
- package/dist/chunk-55HOZO7D.cjs +33 -0
- package/dist/chunk-6ETLMANX.js +3472 -0
- package/dist/chunk-6OXPIOZY.cjs +43 -0
- package/dist/chunk-7WAH4JD3.js +115 -0
- package/dist/chunk-B4PTD5KQ.js +4 -0
- package/dist/chunk-BTXPY3B4.js +27 -0
- package/dist/chunk-DGXATHAN.js +5185 -0
- package/dist/chunk-FEBG7WWO.js +11 -0
- package/dist/chunk-FX2P4HL7.cjs +14 -0
- package/dist/chunk-ITQKPDCW.cjs +3859 -0
- package/dist/chunk-JHEBLHYK.cjs +13 -0
- package/dist/chunk-LBHO5BRF.js +2251 -0
- package/dist/chunk-MERFAWZE.js +12 -0
- package/dist/chunk-OYRIJX67.cjs +3487 -0
- package/dist/chunk-PANPZ6S6.cjs +6 -0
- package/dist/chunk-QPSZUUB6.cjs +2259 -0
- package/dist/chunk-QQ7GKXIS.js +43 -0
- package/dist/chunk-SA3DCC4M.cjs +6968 -0
- package/dist/chunk-SKYW5GV2.cjs +5251 -0
- package/dist/chunk-U4JSDAXK.js +36 -0
- package/dist/chunk-WVKPC33H.cjs +49 -0
- package/dist/{vendor/chunk-KC74I2LN.cjs → chunk-YKFG2BZQ.cjs} +3 -5
- package/dist/index.cjs +242 -0
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +11 -0
- package/dist/reflect-type.cjs +11 -0
- package/dist/reflect-type.d.cts +16 -0
- package/dist/reflect-type.d.ts +16 -0
- package/dist/reflect-type.js +2 -0
- package/dist/reflection-DTM1oT21.d.cts +1559 -0
- package/dist/reflection-DTM1oT21.d.ts +1559 -0
- package/dist/resolve-reflections.cjs +11 -0
- package/dist/resolve-reflections.d.cts +11 -0
- package/dist/resolve-reflections.d.ts +11 -0
- package/dist/resolve-reflections.js +2 -0
- package/dist/transformer.cjs +15 -0
- package/dist/transformer.d.cts +22 -0
- package/dist/transformer.d.ts +22 -0
- package/dist/transformer.js +2 -0
- package/dist/transpile.cjs +12 -0
- package/dist/transpile.d.cts +14 -0
- package/dist/transpile.d.ts +14 -0
- package/dist/transpile.js +3 -0
- package/dist/types.cjs +5 -0
- package/dist/types.d.cts +16 -0
- package/dist/types.d.ts +16 -0
- package/dist/types.js +2 -0
- package/dist/utilities.cjs +35 -0
- package/dist/utilities.d.cts +49 -0
- package/dist/utilities.d.ts +49 -0
- package/dist/utilities.js +2 -0
- package/dist/vendor/{chunk-6PEHRAEP.js → chunk-5BKT4CS5.js} +0 -2
- package/dist/vendor/{chunk-W6QNYN5U.cjs → chunk-BDXVTHBY.cjs} +176 -178
- package/dist/vendor/{chunk-AXYJRGEC.js → chunk-BLN7QVCP.js} +1 -3
- package/dist/vendor/{chunk-ORGCWC7F.js → chunk-BR2FK5K7.js} +0 -2
- package/dist/vendor/chunk-EQXMWOHO.cjs +115 -0
- package/dist/vendor/{chunk-6ARUMLA5.js → chunk-MCNMRQDT.js} +0 -2
- package/dist/vendor/{chunk-3QJYIKMR.cjs → chunk-MO4O4UYI.cjs} +0 -2
- package/dist/vendor/{chunk-M6ZTTT3A.js → chunk-RH4YMONA.js} +1 -3
- package/dist/vendor/{chunk-VUVWVXGY.cjs → chunk-RZKB5IQZ.cjs} +0 -2
- package/dist/vendor/{chunk-WZXSRPYO.cjs → chunk-WOXMCJJU.cjs} +505 -507
- package/dist/vendor/compiler.cjs +12 -14
- package/dist/vendor/compiler.js +2 -4
- package/dist/vendor/config.cjs +9 -11
- package/dist/vendor/config.js +2 -4
- package/dist/vendor/core.cjs +130 -132
- package/dist/vendor/core.d.cts +0 -2
- package/dist/vendor/core.d.ts +0 -2
- package/dist/vendor/core.js +5 -4
- package/dist/vendor/index.cjs +17 -19
- package/dist/vendor/index.js +3 -5
- package/dist/vendor/type-compiler/compiler.cjs +46 -0
- package/dist/vendor/type-compiler/compiler.d.cts +1 -0
- package/dist/vendor/type-compiler/compiler.d.ts +1 -0
- package/dist/vendor/type-compiler/compiler.js +7 -0
- package/dist/vendor/type-compiler/config.cjs +36 -0
- package/dist/vendor/type-compiler/config.d.cts +6 -0
- package/dist/vendor/type-compiler/config.d.ts +6 -0
- package/dist/vendor/type-compiler/config.js +5 -0
- package/dist/vendor/type-compiler/index.cjs +108 -0
- package/dist/vendor/type-compiler/index.d.cts +1 -0
- package/dist/vendor/type-compiler/index.d.ts +1 -0
- package/dist/vendor/type-compiler/index.js +67 -0
- package/dist/vendor/type-spec.cjs +5 -7
- package/dist/vendor/type-spec.js +5 -4
- package/dist/vendor/type.cjs +691 -2271
- package/dist/vendor/type.js +92 -1609
- package/package.json +4 -4
- package/dist/vendor/chunk-3QJYIKMR.cjs.map +0 -1
- package/dist/vendor/chunk-6ARUMLA5.js.map +0 -1
- package/dist/vendor/chunk-6PEHRAEP.js.map +0 -1
- package/dist/vendor/chunk-AXYJRGEC.js.map +0 -1
- package/dist/vendor/chunk-KC74I2LN.cjs.map +0 -1
- package/dist/vendor/chunk-M6ZTTT3A.js.map +0 -1
- package/dist/vendor/chunk-ORGCWC7F.js.map +0 -1
- package/dist/vendor/chunk-VUVWVXGY.cjs.map +0 -1
- package/dist/vendor/chunk-W6QNYN5U.cjs.map +0 -1
- package/dist/vendor/chunk-WZXSRPYO.cjs.map +0 -1
- package/dist/vendor/compiler.cjs.map +0 -1
- package/dist/vendor/compiler.js.map +0 -1
- package/dist/vendor/config.cjs.map +0 -1
- package/dist/vendor/config.js.map +0 -1
- package/dist/vendor/core.cjs.map +0 -1
- package/dist/vendor/core.js.map +0 -1
- package/dist/vendor/index.cjs.map +0 -1
- package/dist/vendor/index.js.map +0 -1
- package/dist/vendor/type-spec.cjs.map +0 -1
- package/dist/vendor/type-spec.js.map +0 -1
- package/dist/vendor/type.cjs.map +0 -1
- package/dist/vendor/type.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/vendor/type-compiler/compiler.ts"],"names":["init_cjs_shims"],"mappings":";;;;;;AAAAA,gCAAA,EAAA","file":"compiler.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/compiler\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/vendor/type-compiler/compiler.ts"],"names":[],"mappings":";;;;AAAA,cAAA,EAAA","file":"compiler.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/compiler\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/vendor/type-compiler/config.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAAAA,gCAAA,EAAA","file":"config.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/config\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/vendor/type-compiler/config.ts"],"names":[],"mappings":";;;;AAAA,cAAA,EAAA","file":"config.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/config\";\n"]}
|
package/dist/vendor/core.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/vendor/core.ts"],"names":["init_cjs_shims"],"mappings":";;;;;;AAAAA,gCAAA,EAAA","file":"core.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 - Core module\n\nexport * from \"@deepkit/core\";\n"]}
|
package/dist/vendor/core.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"core.js"}
|
|
@@ -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_ef8b874d406bec4900e1fddc1ea375be/node_modules/@deepkit/type-compiler/index.ts","../../../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_ef8b874d406bec4900e1fddc1ea375be/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,IAAA,IAAA,CAAA,IAAA,GAAOC,mBAAA,CAAG,kBAAA,CAAmB,IAAA,CAAK,OAAO,CAAA;AAEzC,IAAA,IAAA,CAAA,OAAA,GAAUA,oBAAG,aAAA,CAAc,IAAI,IAAA,CAAK,OAAA,EAAS,KAAK,IAAI,CAAA;AAEtD,IAAA,IAAA,CAAA,OAAA,GAAUA,oBAAG,aAAA,CAAc;AAAE,MAAA,OAAA,EAASA,oBAAG,WAAA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AAA,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.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_ef8b874d406bec4900e1fddc1ea375be/node_modules/@deepkit/type-compiler/index.ts","../../../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_ef8b874d406bec4900e1fddc1ea375be/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;AAAE,MAAA,OAAA,EAAS,GAAG,WAAA,CAAY;KAAU,CAAA;AAC/D,IAAA,IAAA,CAAA,KAAA,GAAQ,IAAI,KAAA,EAAK;AAEjB,IAAA,IAAA,CAAA,aAAyC,EAAA;AACzC,IAAA,IAAA,CAAA,cAA8C,EAAA;AAGtD,IAAA,MAAM,cAAA,GAAiB,KAAK,IAAA,CAAK,QAAA;AACjC,IAAA,IAAA,CAAK,IAAA,CAAK,QAA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AA;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 +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
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"type-spec.js"}
|