@powerlines/plugin-env 0.13.63 → 0.13.65
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/{chunk-DT2f8AgL.cjs → _virtual/rolldown_runtime.cjs} +1 -1
- package/dist/{chunk-CbqXBSoN.mjs → _virtual/rolldown_runtime.mjs} +1 -1
- package/dist/alloy/src/core/components/output.cjs +1 -0
- package/dist/alloy/src/core/components/output.mjs +1 -0
- package/dist/alloy/src/core/components/single-line-comment.cjs +1 -0
- package/dist/alloy/src/core/components/single-line-comment.mjs +1 -0
- package/dist/alloy/src/core/components/source-file.cjs +1 -0
- package/dist/alloy/src/core/components/source-file.d.cts +22 -0
- package/dist/alloy/src/core/components/source-file.d.mts +22 -0
- package/dist/alloy/src/core/components/source-file.mjs +1 -0
- package/dist/alloy/src/core/contexts/context.cjs +1 -0
- package/dist/alloy/src/core/contexts/context.mjs +1 -0
- package/dist/alloy/src/core/contexts/reflection.cjs +1 -0
- package/dist/alloy/src/core/contexts/reflection.mjs +1 -0
- package/dist/alloy/src/create-plugin.cjs +2 -0
- package/dist/alloy/src/create-plugin.mjs +2 -0
- package/dist/alloy/src/helpers/refkey.cjs +1 -0
- package/dist/alloy/src/helpers/refkey.mjs +1 -0
- package/dist/alloy/src/markdown/components/markdown-file.cjs +1 -0
- package/dist/alloy/src/markdown/components/markdown-file.mjs +1 -0
- package/dist/alloy/src/markdown/components/markdown-table.cjs +1 -0
- package/dist/alloy/src/markdown/components/markdown-table.mjs +1 -0
- package/dist/alloy/src/markdown/contexts/markdown-table.cjs +1 -0
- package/dist/alloy/src/markdown/contexts/markdown-table.mjs +1 -0
- package/dist/alloy/src/types/components.d.cts +19 -0
- package/dist/alloy/src/types/components.d.mts +23 -0
- package/dist/alloy/src/types/plugin.d.cts +15 -0
- package/dist/alloy/src/types/plugin.d.mts +15 -0
- package/dist/alloy/src/typescript/components/builtin-file.cjs +1 -0
- package/dist/alloy/src/typescript/components/builtin-file.d.cts +25 -0
- package/dist/alloy/src/typescript/components/builtin-file.d.mts +26 -0
- package/dist/alloy/src/typescript/components/builtin-file.mjs +1 -0
- package/dist/alloy/src/typescript/components/tsdoc-reflection.cjs +1 -0
- package/dist/alloy/src/typescript/components/tsdoc-reflection.mjs +1 -0
- package/dist/alloy/src/typescript/components/tsdoc.cjs +1 -0
- package/dist/alloy/src/typescript/components/tsdoc.d.cts +27 -0
- package/dist/alloy/src/typescript/components/tsdoc.d.mts +28 -0
- package/dist/alloy/src/typescript/components/tsdoc.mjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-file.cjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-file.d.cts +13 -0
- package/dist/alloy/src/typescript/components/typescript-file.d.mts +14 -0
- package/dist/alloy/src/typescript/components/typescript-file.mjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-interface.cjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-interface.d.cts +11 -0
- package/dist/alloy/src/typescript/components/typescript-interface.d.mts +12 -0
- package/dist/alloy/src/typescript/components/typescript-interface.mjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-object.cjs +1 -0
- package/dist/alloy/src/typescript/components/typescript-object.mjs +1 -0
- package/dist/babel/index.cjs +1 -1
- package/dist/babel/index.d.cts +1 -16
- package/dist/babel/index.d.mts +1 -16
- package/dist/babel/index.mjs +1 -1
- package/dist/babel/plugin.cjs +5 -1
- package/dist/babel/plugin.d.cts +6 -16
- package/dist/babel/plugin.d.mts +8 -16
- package/dist/babel/plugin.mjs +5 -1
- package/dist/components/docs.cjs +1 -1
- package/dist/components/docs.d.cts +8 -1
- package/dist/components/docs.d.mts +8 -1
- package/dist/components/docs.mjs +1 -1
- package/dist/components/env.cjs +34 -1
- package/dist/components/env.d.cts +19 -3
- package/dist/components/env.d.mts +19 -3
- package/dist/components/env.mjs +31 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.cts +2 -5
- package/dist/components/index.d.mts +2 -5
- package/dist/components/index.mjs +1 -1
- package/dist/deepkit/schemas/reflection.cjs +1 -0
- package/dist/{plugin-CO-g42T8.d.mts → deepkit/schemas/reflection.d.cts} +1 -156
- package/dist/{plugin-COCJiK-0.d.cts → deepkit/schemas/reflection.d.mts} +1 -156
- package/dist/deepkit/schemas/reflection.mjs +1 -0
- package/dist/deepkit/schemas/reflection2.cjs +1 -0
- package/dist/deepkit/schemas/reflection2.mjs +1 -0
- package/dist/deepkit/src/capnp.cjs +1 -0
- package/dist/deepkit/src/capnp.mjs +1 -0
- package/dist/deepkit/src/reflect-type.cjs +1 -0
- package/dist/deepkit/src/reflect-type.mjs +1 -0
- package/dist/deepkit/src/resolve-reflections.cjs +1 -0
- package/dist/deepkit/src/resolve-reflections.mjs +1 -0
- package/dist/deepkit/src/types.d.cts +10 -0
- package/dist/deepkit/src/types.d.mts +10 -0
- package/dist/deepkit/src/utilities.cjs +1 -0
- package/dist/deepkit/src/utilities.mjs +1 -0
- package/dist/deepkit/src/vendor/type.cjs +1 -0
- package/dist/deepkit/src/vendor/type.d.cts +7 -0
- package/dist/deepkit/src/vendor/type.d.mts +7 -0
- package/dist/deepkit/src/vendor/type.mjs +1 -0
- package/dist/helpers/create-reflection-resource.cjs +1 -1
- package/dist/helpers/create-reflection-resource.d.cts +14 -5
- package/dist/helpers/create-reflection-resource.d.mts +14 -5
- package/dist/helpers/create-reflection-resource.mjs +1 -1
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.d.cts +6 -11
- package/dist/helpers/index.d.mts +6 -11
- package/dist/helpers/index.mjs +1 -1
- package/dist/helpers/load.cjs +1 -1
- package/dist/helpers/load.d.cts +34 -5
- package/dist/helpers/load.d.mts +35 -5
- package/dist/helpers/load.mjs +1 -1
- package/dist/helpers/persistence.cjs +1 -1
- package/dist/helpers/persistence.d.cts +83 -5
- package/dist/helpers/persistence.d.mts +83 -5
- package/dist/helpers/persistence.mjs +1 -1
- package/dist/helpers/reflect.cjs +1 -1
- package/dist/helpers/reflect.d.cts +45 -5
- package/dist/helpers/reflect.d.mts +45 -5
- package/dist/helpers/reflect.mjs +1 -1
- package/dist/helpers/source-file-env.cjs +1 -1
- package/dist/helpers/source-file-env.d.cts +7 -1
- package/dist/helpers/source-file-env.d.mts +7 -1
- package/dist/helpers/source-file-env.mjs +1 -1
- package/dist/helpers/template-helpers.cjs +1 -1
- package/dist/helpers/template-helpers.d.cts +14 -5
- package/dist/helpers/template-helpers.d.mts +14 -5
- package/dist/helpers/template-helpers.mjs +1 -1
- package/dist/index.cjs +3 -4
- package/dist/index.d.cts +20 -16
- package/dist/index.d.mts +25 -16
- package/dist/index.mjs +2 -3
- package/dist/plugin-babel/src/helpers/ast-utils.cjs +1 -0
- package/dist/plugin-babel/src/helpers/ast-utils.mjs +1 -0
- package/dist/plugin-babel/src/helpers/create-plugin.cjs +1 -0
- package/dist/plugin-babel/src/helpers/create-plugin.mjs +1 -0
- package/dist/plugin-babel/src/helpers/filters.cjs +1 -0
- package/dist/plugin-babel/src/helpers/filters.mjs +1 -0
- package/dist/plugin-babel/src/helpers/index.cjs +1 -0
- package/dist/plugin-babel/src/helpers/index.mjs +1 -0
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +1 -0
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +1 -0
- package/dist/plugin-babel/src/helpers/options.cjs +1 -0
- package/dist/plugin-babel/src/helpers/options.mjs +1 -0
- package/dist/plugin-babel/src/index.cjs +1 -0
- package/dist/plugin-babel/src/index.mjs +1 -0
- package/dist/plugin-babel/src/types/index.d.mts +1 -0
- package/dist/plugin-babel/src/types/plugin.d.cts +15 -0
- package/dist/plugin-babel/src/types/plugin.d.mts +15 -0
- package/dist/plugin-plugin/src/types/plugin.d.cts +21 -0
- package/dist/plugin-plugin/src/types/plugin.d.mts +24 -0
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +5 -0
- package/dist/powerlines/src/lib/build/esbuild.cjs +14 -0
- package/dist/powerlines/src/lib/build/esbuild.mjs +14 -0
- package/dist/powerlines/src/lib/entry.cjs +1 -0
- package/dist/powerlines/src/lib/entry.mjs +1 -0
- package/dist/powerlines/src/lib/logger.cjs +1 -0
- package/dist/powerlines/src/lib/logger.mjs +1 -0
- package/dist/powerlines/src/lib/utilities/bundle.cjs +1 -0
- package/dist/powerlines/src/lib/utilities/bundle.mjs +1 -0
- package/dist/powerlines/src/lib/utilities/resolve.cjs +1 -0
- package/dist/powerlines/src/lib/utilities/resolve.mjs +1 -0
- package/dist/powerlines/src/plugin-utils/helpers.cjs +1 -0
- package/dist/powerlines/src/plugin-utils/helpers.mjs +1 -0
- package/dist/powerlines/src/plugin-utils/paths.cjs +1 -0
- package/dist/powerlines/src/plugin-utils/paths.mjs +1 -0
- package/dist/powerlines/src/types/api.d.mts +5 -0
- package/dist/powerlines/src/types/babel.d.cts +23 -0
- package/dist/powerlines/src/types/babel.d.mts +23 -0
- package/dist/powerlines/src/types/build.d.cts +139 -0
- package/dist/powerlines/src/types/build.d.mts +141 -0
- package/dist/powerlines/src/types/commands.d.cts +8 -0
- package/dist/powerlines/src/types/commands.d.mts +9 -0
- package/dist/powerlines/src/types/config.d.cts +356 -0
- package/dist/powerlines/src/types/config.d.mts +357 -0
- package/dist/powerlines/src/types/context.d.cts +358 -0
- package/dist/powerlines/src/types/context.d.mts +360 -0
- package/dist/powerlines/src/types/fs.d.cts +458 -0
- package/dist/powerlines/src/types/fs.d.mts +458 -0
- package/dist/powerlines/src/types/hooks.d.mts +2 -0
- package/dist/powerlines/src/types/index.d.mts +12 -0
- package/dist/powerlines/src/types/plugin.d.cts +232 -0
- package/dist/powerlines/src/types/plugin.d.mts +232 -0
- package/dist/powerlines/src/types/resolved.d.cts +82 -0
- package/dist/powerlines/src/types/resolved.d.mts +83 -0
- package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
- package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
- package/dist/powerlines/src/types/unplugin.d.mts +7 -0
- package/dist/types/index.cjs +0 -1
- package/dist/types/index.d.cts +2 -5
- package/dist/types/index.d.mts +2 -5
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +140 -4
- package/dist/types/plugin.d.mts +141 -4
- package/dist/types/plugin.mjs +1 -1
- package/dist/types/runtime.cjs +0 -1
- package/dist/types/runtime.d.cts +793 -2
- package/dist/types/runtime.d.mts +793 -2
- package/dist/types/runtime.mjs +1 -1
- package/package.json +16 -16
- package/dist/babel-Bmzkjy1p.cjs +0 -0
- package/dist/babel-CE47sTzg.mjs +0 -1
- package/dist/components-BWruXLSx.cjs +0 -0
- package/dist/components-LyHNrcZE.mjs +0 -1
- package/dist/config-B6yMOlZT.d.mts +0 -1681
- package/dist/config-CROY1-l7.d.cts +0 -1679
- package/dist/create-reflection-resource-CDu8E8gy.d.mts +0 -15
- package/dist/create-reflection-resource-CQHJrkQi.cjs +0 -1
- package/dist/create-reflection-resource-JeWoqMUl.d.cts +0 -15
- package/dist/create-reflection-resource-UtOwX4Ml.mjs +0 -1
- package/dist/docs-BDiEhcDa.mjs +0 -1
- package/dist/docs-Bhi9smBO.cjs +0 -1
- package/dist/docs-BoZkRBO4.d.cts +0 -9
- package/dist/docs-BwK6pC_c.d.mts +0 -9
- package/dist/env-0C9Vc_CF.cjs +0 -34
- package/dist/env-D4MK9BWK.mjs +0 -31
- package/dist/env-DmwP_i6i.d.cts +0 -112
- package/dist/env-aTFI4okB.d.mts +0 -112
- package/dist/helpers-DfMThUgD.mjs +0 -1
- package/dist/helpers-YGhXHw5G.cjs +0 -0
- package/dist/index-BJKE_VGb.d.cts +0 -41
- package/dist/index-BRBK9zG-.d.cts +0 -1
- package/dist/index-Bt4QNofW.d.mts +0 -1
- package/dist/index-CRo77wc3.d.mts +0 -1
- package/dist/index-CspKFJM1.d.cts +0 -1
- package/dist/index-DmOJrPah.d.mts +0 -41
- package/dist/index-Dpmi5zcN.d.cts +0 -1
- package/dist/index-Wc1llEvP.d.mts +0 -1
- package/dist/load-BBU7vb0J.d.mts +0 -38
- package/dist/load-BZTlThWg.mjs +0 -1
- package/dist/load-BsKAoTvl.d.cts +0 -35
- package/dist/load-nUlit5lR.cjs +0 -1
- package/dist/persistence-2A9ruTmd.d.cts +0 -84
- package/dist/persistence-Br-YMVb1.mjs +0 -14
- package/dist/persistence-DzVrJHWz.d.mts +0 -84
- package/dist/persistence-KaP3-ka1.cjs +0 -14
- package/dist/plugin-CRYQ682C.cjs +0 -0
- package/dist/plugin-Cx61c9gw.mjs +0 -5
- package/dist/plugin-DrnPbdzR.mjs +0 -1
- package/dist/plugin-v-FJGggy.cjs +0 -5
- package/dist/reflect-C_H160xV.d.mts +0 -46
- package/dist/reflect-DBJcecMD.d.cts +0 -46
- package/dist/runtime-B5r9vNRi.d.cts +0 -794
- package/dist/runtime-BaZivi6m.cjs +0 -0
- package/dist/runtime-DqCYc37d.mjs +0 -1
- package/dist/runtime-mCXb10Zi.d.mts +0 -794
- package/dist/source-file-CLCTB4C7.cjs +0 -1
- package/dist/source-file-CjFSCK1w.mjs +0 -1
- package/dist/source-file-env-BDFTs5WJ.mjs +0 -1
- package/dist/source-file-env-C6uYyxww.cjs +0 -1
- package/dist/source-file-env-DonDJDV1.d.cts +0 -8
- package/dist/source-file-env-DzpWKluw.d.mts +0 -8
- package/dist/template-helpers-BSbamu0U.cjs +0 -1
- package/dist/template-helpers-BW7Ws5s0.d.cts +0 -15
- package/dist/template-helpers-CLrM_TtO.mjs +0 -1
- package/dist/template-helpers-jUbL9h-F.d.mts +0 -15
- package/dist/type-CnPIyotQ.d.mts +0 -3
- package/dist/type-D6dRgWJT.d.cts +0 -3
- package/dist/types-BCto_Rzj.mjs +0 -1
- package/dist/types-DS7T32tb.cjs +0 -0
- package/dist/utilities-4S--uN0L.mjs +0 -1
- package/dist/utilities-CxyT2chk.cjs +0 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
|
|
2
|
+
import ts from "typescript";
|
|
3
|
+
|
|
4
|
+
//#region ../powerlines/src/types/tsconfig.d.ts
|
|
5
|
+
type ReflectionMode = "default" | "explicit" | "never";
|
|
6
|
+
type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
12
|
+
* - `minimal` - Only the essential type information is captured.
|
|
13
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
14
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
15
|
+
*/
|
|
16
|
+
type ReflectionLevel = "minimal" | "normal" | "verbose";
|
|
17
|
+
interface DeepkitOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
20
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
21
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
22
|
+
*/
|
|
23
|
+
reflection?: RawReflectionMode;
|
|
24
|
+
/**
|
|
25
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
29
|
+
* - `minimal` - Only the essential type information is captured.
|
|
30
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
31
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
32
|
+
*/
|
|
33
|
+
reflectionLevel?: ReflectionLevel;
|
|
34
|
+
}
|
|
35
|
+
type TSCompilerOptions = CompilerOptions & DeepkitOptions;
|
|
36
|
+
/**
|
|
37
|
+
* The TypeScript compiler configuration.
|
|
38
|
+
*
|
|
39
|
+
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
|
40
|
+
*/
|
|
41
|
+
interface TSConfig extends Omit<TsConfigJson, "reflection"> {
|
|
42
|
+
/**
|
|
43
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
44
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
45
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
46
|
+
*/
|
|
47
|
+
reflection?: RawReflectionMode;
|
|
48
|
+
/**
|
|
49
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
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:
|
|
53
|
+
* - `minimal` - Only the essential type information is captured.
|
|
54
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
55
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
56
|
+
*/
|
|
57
|
+
reflectionLevel?: ReflectionLevel;
|
|
58
|
+
/**
|
|
59
|
+
* Instructs the TypeScript compiler how to compile `.ts` files.
|
|
60
|
+
*/
|
|
61
|
+
compilerOptions?: TSCompilerOptions;
|
|
62
|
+
}
|
|
63
|
+
type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
64
|
+
originalTsconfigJson: TsConfigJson;
|
|
65
|
+
tsconfigJson: TSConfig;
|
|
66
|
+
tsconfigFilePath: string;
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { ParsedTypeScriptConfig, TSConfig };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
|
|
2
|
+
import ts from "typescript";
|
|
3
|
+
|
|
4
|
+
//#region ../powerlines/src/types/tsconfig.d.ts
|
|
5
|
+
type ReflectionMode = "default" | "explicit" | "never";
|
|
6
|
+
type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
12
|
+
* - `minimal` - Only the essential type information is captured.
|
|
13
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
14
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
15
|
+
*/
|
|
16
|
+
type ReflectionLevel = "minimal" | "normal" | "verbose";
|
|
17
|
+
interface DeepkitOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
20
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
21
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
22
|
+
*/
|
|
23
|
+
reflection?: RawReflectionMode;
|
|
24
|
+
/**
|
|
25
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
29
|
+
* - `minimal` - Only the essential type information is captured.
|
|
30
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
31
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
32
|
+
*/
|
|
33
|
+
reflectionLevel?: ReflectionLevel;
|
|
34
|
+
}
|
|
35
|
+
type TSCompilerOptions = CompilerOptions & DeepkitOptions;
|
|
36
|
+
/**
|
|
37
|
+
* The TypeScript compiler configuration.
|
|
38
|
+
*
|
|
39
|
+
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
|
40
|
+
*/
|
|
41
|
+
interface TSConfig extends Omit<TsConfigJson, "reflection"> {
|
|
42
|
+
/**
|
|
43
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
44
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
45
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
46
|
+
*/
|
|
47
|
+
reflection?: RawReflectionMode;
|
|
48
|
+
/**
|
|
49
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
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:
|
|
53
|
+
* - `minimal` - Only the essential type information is captured.
|
|
54
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
55
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
56
|
+
*/
|
|
57
|
+
reflectionLevel?: ReflectionLevel;
|
|
58
|
+
/**
|
|
59
|
+
* Instructs the TypeScript compiler how to compile `.ts` files.
|
|
60
|
+
*/
|
|
61
|
+
compilerOptions?: TSCompilerOptions;
|
|
62
|
+
}
|
|
63
|
+
type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
64
|
+
originalTsconfigJson: TsConfigJson;
|
|
65
|
+
tsconfigJson: TSConfig;
|
|
66
|
+
tsconfigFilePath: string;
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { DeepkitOptions, ParsedTypeScriptConfig, RawReflectionMode, ReflectionLevel, ReflectionMode, TSCompilerOptions, TSConfig };
|
package/dist/types/index.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`../plugin-CRYQ682C.cjs`),require(`../runtime-BaZivi6m.cjs`),require(`../types-DS7T32tb.cjs`);
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import "../config-CROY1-l7.cjs";
|
|
4
|
-
import { i as __ΩSecretsInterface, n as SecretsInterface, r as __ΩEnvInterface, t as EnvInterface } from "../runtime-B5r9vNRi.cjs";
|
|
5
|
-
import "../index-CspKFJM1.cjs";
|
|
1
|
+
import { EnvInterface, SecretsInterface, __ΩEnvInterface, __ΩSecretsInterface } from "./runtime.cjs";
|
|
2
|
+
import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from "./plugin.cjs";
|
|
6
3
|
export { EnvInterface, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, SecretsInterface, __ΩEnvInterface, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType, __ΩSecretsInterface };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import {
|
|
3
|
-
import "../config-B6yMOlZT.mjs";
|
|
4
|
-
import { i as __ΩSecretsInterface, n as SecretsInterface, r as __ΩEnvInterface, t as EnvInterface } from "../runtime-mCXb10Zi.mjs";
|
|
5
|
-
import "../index-CRo77wc3.mjs";
|
|
1
|
+
import { EnvInterface, SecretsInterface, __ΩEnvInterface, __ΩSecretsInterface } from "./runtime.mjs";
|
|
2
|
+
import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from "./plugin.mjs";
|
|
6
3
|
export { EnvInterface, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, SecretsInterface, __ΩEnvInterface, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType, __ΩSecretsInterface };
|
package/dist/types/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{};
|
package/dist/types/plugin.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`../plugin-CRYQ682C.cjs`);
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,5 +1,141 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
1
|
+
import { Reflection } from "../deepkit/src/types.cjs";
|
|
2
|
+
import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "../plugin-babel/src/types/plugin.cjs";
|
|
3
|
+
import { EnvInterface, SecretsInterface } from "./runtime.cjs";
|
|
4
|
+
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
5
|
+
import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
6
|
+
import { DotenvParseOutput } from "@stryke/env/types";
|
|
7
|
+
|
|
8
|
+
//#region src/types/plugin.d.ts
|
|
9
|
+
type EnvType = "env" | "secrets";
|
|
10
|
+
type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
|
|
11
|
+
/**
|
|
12
|
+
* A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigConfiguration"`.
|
|
13
|
+
*/
|
|
14
|
+
types?: TypeDefinitionParameter;
|
|
15
|
+
/**
|
|
16
|
+
* A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigSecrets"`.
|
|
17
|
+
*/
|
|
18
|
+
secrets?: TypeDefinitionParameter;
|
|
19
|
+
/**
|
|
20
|
+
* An additional prefix (or list of additional prefixes) to apply to the environment variables
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
|
|
24
|
+
*/
|
|
25
|
+
prefix?: string | string[];
|
|
26
|
+
/**
|
|
27
|
+
* Should the plugin inject the env variables in the source code with their values?
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* This option is set to `true` when building an application project.
|
|
31
|
+
*
|
|
32
|
+
* @defaultValue false
|
|
33
|
+
*/
|
|
34
|
+
inject?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The default configuration to use when loading environment variables.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* This configuration is used as the base configuration when loading environment variables, and will be overridden by any values found in the `.env` file or the process environment.
|
|
40
|
+
*/
|
|
41
|
+
defaultConfig?: Children;
|
|
42
|
+
/**
|
|
43
|
+
* Babel configuration options to use when injecting environment variables into the source code.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* This option allows you to customize the Babel transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Babel settings.
|
|
47
|
+
*/
|
|
48
|
+
babel?: BabelPluginOptions;
|
|
49
|
+
};
|
|
50
|
+
type EnvPluginUserConfig = BabelPluginUserConfig & {
|
|
51
|
+
env: EnvPluginOptions;
|
|
52
|
+
};
|
|
53
|
+
type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {
|
|
54
|
+
env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
|
|
55
|
+
/**
|
|
56
|
+
* The type definition for the expected env variable parameters
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* This value is parsed from the {@link EnvPluginOptions.types} option.
|
|
60
|
+
*/
|
|
61
|
+
types: TypeDefinition;
|
|
62
|
+
/**
|
|
63
|
+
* The type definition for the expected env secret parameters
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* This value is parsed from the {@link EnvPluginOptions.secrets} option.
|
|
67
|
+
*/
|
|
68
|
+
secrets: TypeDefinition;
|
|
69
|
+
/**
|
|
70
|
+
* Should the plugin inject the env variables in the source code with their values?
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
|
|
74
|
+
*/
|
|
75
|
+
inject: EnvPluginOptions["inject"];
|
|
76
|
+
/**
|
|
77
|
+
* The prefix used for environment variables
|
|
78
|
+
*
|
|
79
|
+
* @remarks
|
|
80
|
+
* This value is used to filter environment variables that are loaded from the .env file and the process environment.
|
|
81
|
+
*/
|
|
82
|
+
prefix: string[];
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig> {
|
|
86
|
+
env: {
|
|
87
|
+
/**
|
|
88
|
+
* The type definitions reflection for the env variables and secrets
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
|
|
92
|
+
*/
|
|
93
|
+
types: {
|
|
94
|
+
/**
|
|
95
|
+
* The type definitions for the expected env variables
|
|
96
|
+
*/
|
|
97
|
+
env: Reflection;
|
|
98
|
+
/**
|
|
99
|
+
* The type definitions for the expected env secrets
|
|
100
|
+
*/
|
|
101
|
+
secrets: Reflection;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* The current **used** environment variables and secrets reflection
|
|
105
|
+
*
|
|
106
|
+
* @remarks
|
|
107
|
+
* This reflection contains the structure of the current environment variables and secrets as defined during the plugin initialization by extracting the values from the source code.
|
|
108
|
+
*/
|
|
109
|
+
used: {
|
|
110
|
+
/**
|
|
111
|
+
* The current env variables reflection
|
|
112
|
+
*/
|
|
113
|
+
env: Reflection<EnvInterface>;
|
|
114
|
+
/**
|
|
115
|
+
* The current env secrets reflection
|
|
116
|
+
*/
|
|
117
|
+
secrets: Reflection<SecretsInterface>;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* The parsed .env configuration object
|
|
121
|
+
*
|
|
122
|
+
* @remarks
|
|
123
|
+
* This value is the result of loading the .env configuration file found in the project root directory and merging it with the values provided at {@link EnvPluginOptions.values}
|
|
124
|
+
*/
|
|
125
|
+
parsed: DotenvParseOutput;
|
|
126
|
+
/**
|
|
127
|
+
* The injected environment variables and secrets reflection
|
|
128
|
+
*
|
|
129
|
+
* @remarks
|
|
130
|
+
* This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
|
|
131
|
+
*/
|
|
132
|
+
injected: Reflection;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
declare type __ΩEnvType = any[];
|
|
136
|
+
declare type __ΩEnvPluginOptions = any[];
|
|
137
|
+
declare type __ΩEnvPluginUserConfig = any[];
|
|
138
|
+
declare type __ΩEnvPluginResolvedConfig = any[];
|
|
139
|
+
declare type __ΩEnvPluginContext = any[];
|
|
140
|
+
//#endregion
|
|
5
141
|
export { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,5 +1,142 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import {
|
|
3
|
-
import "../
|
|
4
|
-
import "
|
|
1
|
+
import { Reflection } from "../deepkit/src/types.mjs";
|
|
2
|
+
import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "../plugin-babel/src/types/plugin.mjs";
|
|
3
|
+
import "../plugin-babel/src/types/index.mjs";
|
|
4
|
+
import { EnvInterface, SecretsInterface } from "./runtime.mjs";
|
|
5
|
+
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
6
|
+
import { DotenvParseOutput } from "@stryke/env/types";
|
|
7
|
+
import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
8
|
+
|
|
9
|
+
//#region src/types/plugin.d.ts
|
|
10
|
+
type EnvType = "env" | "secrets";
|
|
11
|
+
type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
|
|
12
|
+
/**
|
|
13
|
+
* A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigConfiguration"`.
|
|
14
|
+
*/
|
|
15
|
+
types?: TypeDefinitionParameter;
|
|
16
|
+
/**
|
|
17
|
+
* A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigSecrets"`.
|
|
18
|
+
*/
|
|
19
|
+
secrets?: TypeDefinitionParameter;
|
|
20
|
+
/**
|
|
21
|
+
* An additional prefix (or list of additional prefixes) to apply to the environment variables
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
|
|
25
|
+
*/
|
|
26
|
+
prefix?: string | string[];
|
|
27
|
+
/**
|
|
28
|
+
* Should the plugin inject the env variables in the source code with their values?
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* This option is set to `true` when building an application project.
|
|
32
|
+
*
|
|
33
|
+
* @defaultValue false
|
|
34
|
+
*/
|
|
35
|
+
inject?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The default configuration to use when loading environment variables.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* This configuration is used as the base configuration when loading environment variables, and will be overridden by any values found in the `.env` file or the process environment.
|
|
41
|
+
*/
|
|
42
|
+
defaultConfig?: Children;
|
|
43
|
+
/**
|
|
44
|
+
* Babel configuration options to use when injecting environment variables into the source code.
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* This option allows you to customize the Babel transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Babel settings.
|
|
48
|
+
*/
|
|
49
|
+
babel?: BabelPluginOptions;
|
|
50
|
+
};
|
|
51
|
+
type EnvPluginUserConfig = BabelPluginUserConfig & {
|
|
52
|
+
env: EnvPluginOptions;
|
|
53
|
+
};
|
|
54
|
+
type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {
|
|
55
|
+
env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
|
|
56
|
+
/**
|
|
57
|
+
* The type definition for the expected env variable parameters
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* This value is parsed from the {@link EnvPluginOptions.types} option.
|
|
61
|
+
*/
|
|
62
|
+
types: TypeDefinition;
|
|
63
|
+
/**
|
|
64
|
+
* The type definition for the expected env secret parameters
|
|
65
|
+
*
|
|
66
|
+
* @remarks
|
|
67
|
+
* This value is parsed from the {@link EnvPluginOptions.secrets} option.
|
|
68
|
+
*/
|
|
69
|
+
secrets: TypeDefinition;
|
|
70
|
+
/**
|
|
71
|
+
* Should the plugin inject the env variables in the source code with their values?
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
|
|
75
|
+
*/
|
|
76
|
+
inject: EnvPluginOptions["inject"];
|
|
77
|
+
/**
|
|
78
|
+
* The prefix used for environment variables
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* This value is used to filter environment variables that are loaded from the .env file and the process environment.
|
|
82
|
+
*/
|
|
83
|
+
prefix: string[];
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig> {
|
|
87
|
+
env: {
|
|
88
|
+
/**
|
|
89
|
+
* The type definitions reflection for the env variables and secrets
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
|
|
93
|
+
*/
|
|
94
|
+
types: {
|
|
95
|
+
/**
|
|
96
|
+
* The type definitions for the expected env variables
|
|
97
|
+
*/
|
|
98
|
+
env: Reflection;
|
|
99
|
+
/**
|
|
100
|
+
* The type definitions for the expected env secrets
|
|
101
|
+
*/
|
|
102
|
+
secrets: Reflection;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* The current **used** environment variables and secrets reflection
|
|
106
|
+
*
|
|
107
|
+
* @remarks
|
|
108
|
+
* This reflection contains the structure of the current environment variables and secrets as defined during the plugin initialization by extracting the values from the source code.
|
|
109
|
+
*/
|
|
110
|
+
used: {
|
|
111
|
+
/**
|
|
112
|
+
* The current env variables reflection
|
|
113
|
+
*/
|
|
114
|
+
env: Reflection<EnvInterface>;
|
|
115
|
+
/**
|
|
116
|
+
* The current env secrets reflection
|
|
117
|
+
*/
|
|
118
|
+
secrets: Reflection<SecretsInterface>;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* The parsed .env configuration object
|
|
122
|
+
*
|
|
123
|
+
* @remarks
|
|
124
|
+
* This value is the result of loading the .env configuration file found in the project root directory and merging it with the values provided at {@link EnvPluginOptions.values}
|
|
125
|
+
*/
|
|
126
|
+
parsed: DotenvParseOutput;
|
|
127
|
+
/**
|
|
128
|
+
* The injected environment variables and secrets reflection
|
|
129
|
+
*
|
|
130
|
+
* @remarks
|
|
131
|
+
* This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
|
|
132
|
+
*/
|
|
133
|
+
injected: Reflection;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
declare type __ΩEnvType = any[];
|
|
137
|
+
declare type __ΩEnvPluginOptions = any[];
|
|
138
|
+
declare type __ΩEnvPluginUserConfig = any[];
|
|
139
|
+
declare type __ΩEnvPluginResolvedConfig = any[];
|
|
140
|
+
declare type __ΩEnvPluginContext = any[];
|
|
141
|
+
//#endregion
|
|
5
142
|
export { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType };
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{};
|
package/dist/types/runtime.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`../runtime-BaZivi6m.cjs`);
|