@powerlines/plugin-env 0.15.2 → 0.15.4
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/components/docs.cjs +3 -70
- package/dist/components/docs.d.cts +1 -8
- package/dist/components/docs.d.mts +1 -8
- package/dist/components/docs.mjs +2 -68
- package/dist/components/env.cjs +4 -574
- package/dist/components/env.d.cts +2 -19
- package/dist/components/env.d.mts +3 -19
- package/dist/components/env.mjs +2 -570
- package/dist/components/index.cjs +7 -5
- package/dist/components/index.d.cts +4 -2
- package/dist/components/index.d.mts +5 -2
- package/dist/components/index.mjs +4 -2
- package/dist/{plugin-alloy/src/types/components.d.cts → components-8W0Zgj0y.d.mts} +2 -1
- package/dist/components-C9bYrQVK.cjs +0 -0
- package/dist/components-CNIQFfeK.mjs +1 -0
- package/dist/create-reflection-resource-BNYxBgW2.mjs +9846 -0
- package/dist/create-reflection-resource-BWYhmX7O.cjs +10085 -0
- package/dist/docs-5r844zC1.d.mts +9 -0
- package/dist/docs-B66b9li3.mjs +219 -0
- package/dist/docs-_MmTNBQX.d.cts +9 -0
- package/dist/docs-hBlKCRWK.cjs +224 -0
- package/dist/env-BPodCdD1.d.cts +116 -0
- package/dist/env-IQvgnabX.mjs +1578 -0
- package/dist/env-cO4BUDn1.cjs +1596 -0
- package/dist/env-zhzvpUI5.d.mts +98 -0
- package/dist/index-BXxhKmeA.d.mts +1 -0
- package/dist/index-Cc7fCJU9.d.mts +1 -0
- package/dist/index-CqdNToYT.d.cts +1 -0
- package/dist/index-DWPDThxu.d.cts +1 -0
- package/dist/index.cjs +702 -77
- package/dist/index.d.cts +185 -12
- package/dist/index.d.mts +190 -17
- package/dist/index.mjs +648 -28
- package/dist/{deepkit/schemas/reflection.d.mts → plugin-BaInAuAh.d.mts} +326 -59
- package/dist/{deepkit/schemas/reflection.d.cts → plugin-BwuEBScL.d.cts} +268 -1
- package/dist/plugin-D3B5E_Hg.mjs +1 -0
- package/dist/plugin-D5qyQPqC.cjs +0 -0
- package/dist/resolved-BZG2cwRG.d.cts +1789 -0
- package/dist/resolved-V5COsfDu.d.mts +1791 -0
- package/dist/runtime-Bisl_1Ja.cjs +0 -0
- package/dist/runtime-Q8Ni8SeN.d.cts +794 -0
- package/dist/runtime-azNoeKr-.mjs +1 -0
- package/dist/runtime-qZ0Z2kEd.d.mts +794 -0
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +4 -2
- package/dist/types/index.d.mts +5 -2
- package/dist/types/index.mjs +4 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +3 -156
- package/dist/types/plugin.d.mts +4 -158
- package/dist/types/plugin.mjs +2 -0
- package/dist/types/runtime.cjs +1 -0
- package/dist/types/runtime.d.cts +2 -793
- package/dist/types/runtime.d.mts +2 -793
- package/dist/types/runtime.mjs +2 -0
- package/dist/types-DwElXV6q.mjs +1 -0
- package/dist/types-MYBaygjr.cjs +0 -0
- package/package.json +7 -7
- package/dist/_virtual/rolldown_runtime.cjs +0 -37
- package/dist/_virtual/rolldown_runtime.mjs +0 -29
- package/dist/babel/index.cjs +0 -1
- package/dist/babel/index.d.mts +0 -1
- package/dist/babel/index.mjs +0 -3
- package/dist/babel/plugin.cjs +0 -121
- package/dist/babel/plugin.d.cts +0 -7
- package/dist/babel/plugin.d.mts +0 -9
- package/dist/babel/plugin.mjs +0 -119
- package/dist/deepkit/schemas/reflection.cjs +0 -3940
- package/dist/deepkit/schemas/reflection.mjs +0 -3938
- package/dist/deepkit/schemas/reflection2.cjs +0 -4112
- package/dist/deepkit/schemas/reflection2.mjs +0 -4110
- package/dist/deepkit/src/capnp.cjs +0 -913
- package/dist/deepkit/src/capnp.mjs +0 -911
- package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
- package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
- package/dist/deepkit/src/reflect-type.cjs +0 -22
- package/dist/deepkit/src/reflect-type.mjs +0 -20
- package/dist/deepkit/src/resolve-reflections.cjs +0 -16
- package/dist/deepkit/src/resolve-reflections.mjs +0 -15
- package/dist/deepkit/src/transformer.cjs +0 -52
- package/dist/deepkit/src/transformer.mjs +0 -49
- package/dist/deepkit/src/transpile.cjs +0 -29
- package/dist/deepkit/src/transpile.mjs +0 -27
- package/dist/deepkit/src/types.d.cts +0 -10
- package/dist/deepkit/src/types.d.mts +0 -10
- package/dist/deepkit/src/utilities.cjs +0 -66
- package/dist/deepkit/src/utilities.mjs +0 -65
- package/dist/deepkit/src/vendor/type-compiler/index.cjs +0 -38
- package/dist/deepkit/src/vendor/type-compiler/index.mjs +0 -19
- package/dist/deepkit/src/vendor/type.cjs +0 -20
- package/dist/deepkit/src/vendor/type.d.cts +0 -7
- package/dist/deepkit/src/vendor/type.d.mts +0 -7
- package/dist/deepkit/src/vendor/type.mjs +0 -11
- package/dist/helpers/automd-generator.cjs +0 -22
- package/dist/helpers/automd-generator.mjs +0 -21
- package/dist/helpers/create-reflection-resource.cjs +0 -55
- package/dist/helpers/create-reflection-resource.d.cts +0 -15
- package/dist/helpers/create-reflection-resource.d.mts +0 -15
- package/dist/helpers/create-reflection-resource.mjs +0 -54
- package/dist/helpers/index.cjs +0 -6
- package/dist/helpers/index.d.mts +0 -6
- package/dist/helpers/index.mjs +0 -8
- package/dist/helpers/load.cjs +0 -83
- package/dist/helpers/load.d.cts +0 -35
- package/dist/helpers/load.d.mts +0 -36
- package/dist/helpers/load.mjs +0 -80
- package/dist/helpers/persistence.cjs +0 -214
- package/dist/helpers/persistence.d.cts +0 -84
- package/dist/helpers/persistence.d.mts +0 -84
- package/dist/helpers/persistence.mjs +0 -202
- package/dist/helpers/reflect.cjs +0 -111
- package/dist/helpers/reflect.d.cts +0 -46
- package/dist/helpers/reflect.d.mts +0 -46
- package/dist/helpers/reflect.mjs +0 -103
- package/dist/helpers/source-file-env.cjs +0 -28
- package/dist/helpers/source-file-env.d.cts +0 -8
- package/dist/helpers/source-file-env.d.mts +0 -8
- package/dist/helpers/source-file-env.mjs +0 -26
- package/dist/helpers/template-helpers.cjs +0 -42
- package/dist/helpers/template-helpers.d.cts +0 -15
- package/dist/helpers/template-helpers.d.mts +0 -15
- package/dist/helpers/template-helpers.mjs +0 -41
- package/dist/plugin-alloy/src/core/components/output.cjs +0 -45
- package/dist/plugin-alloy/src/core/components/output.mjs +0 -44
- package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -22
- package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -21
- package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -64
- package/dist/plugin-alloy/src/core/components/source-file.d.cts +0 -23
- package/dist/plugin-alloy/src/core/components/source-file.d.mts +0 -23
- package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -62
- package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -60
- package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -54
- package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
- package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
- package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
- package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
- package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
- package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
- package/dist/plugin-alloy/src/index.cjs +0 -93
- package/dist/plugin-alloy/src/index.mjs +0 -91
- package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -115
- package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -114
- package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -39
- package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -38
- package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -18
- package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
- package/dist/plugin-alloy/src/types/components.d.mts +0 -25
- package/dist/plugin-alloy/src/types/index.d.mts +0 -2
- package/dist/plugin-alloy/src/types/plugin.d.cts +0 -37
- package/dist/plugin-alloy/src/types/plugin.d.mts +0 -37
- package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -57
- package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +0 -25
- package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +0 -26
- package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -56
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -126
- package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -124
- package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -442
- package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +0 -27
- package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +0 -28
- package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -433
- package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -194
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +0 -14
- package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +0 -15
- package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -191
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -68
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +0 -11
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +0 -12
- package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -67
- package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -124
- package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -123
- package/dist/plugin-automd/src/index.cjs +0 -101
- package/dist/plugin-automd/src/index.mjs +0 -98
- package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
- package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
- package/dist/plugin-automd/src/types/toc.d.cts +0 -33
- package/dist/plugin-automd/src/types/toc.d.mts +0 -33
- package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
- package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
- package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
- package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
- package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
- package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
- package/dist/plugin-babel/src/helpers/index.cjs +0 -5
- package/dist/plugin-babel/src/helpers/index.mjs +0 -7
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
- package/dist/plugin-babel/src/helpers/options.cjs +0 -50
- package/dist/plugin-babel/src/helpers/options.mjs +0 -47
- package/dist/plugin-babel/src/index.cjs +0 -91
- package/dist/plugin-babel/src/index.mjs +0 -89
- package/dist/plugin-babel/src/types/index.d.mts +0 -1
- package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
- package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
- package/dist/powerlines/schemas/fs.d.mts +0 -1
- package/dist/powerlines/src/api.d.mts +0 -7
- package/dist/powerlines/src/index.d.mts +0 -12
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -5
- package/dist/powerlines/src/lib/build/esbuild.cjs +0 -102
- package/dist/powerlines/src/lib/build/esbuild.mjs +0 -100
- package/dist/powerlines/src/lib/entry.cjs +0 -12
- package/dist/powerlines/src/lib/entry.mjs +0 -14
- package/dist/powerlines/src/lib/logger.cjs +0 -41
- package/dist/powerlines/src/lib/logger.mjs +0 -39
- package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -35
- package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -34
- package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -30
- package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -29
- package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
- package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
- package/dist/powerlines/src/types/api.d.mts +0 -5
- package/dist/powerlines/src/types/babel.d.cts +0 -23
- package/dist/powerlines/src/types/babel.d.mts +0 -23
- package/dist/powerlines/src/types/build.d.cts +0 -145
- package/dist/powerlines/src/types/build.d.mts +0 -147
- package/dist/powerlines/src/types/commands.d.cts +0 -8
- package/dist/powerlines/src/types/commands.d.mts +0 -9
- package/dist/powerlines/src/types/config.d.cts +0 -380
- package/dist/powerlines/src/types/config.d.mts +0 -381
- package/dist/powerlines/src/types/context.d.cts +0 -414
- package/dist/powerlines/src/types/context.d.mts +0 -416
- package/dist/powerlines/src/types/fs.d.cts +0 -486
- package/dist/powerlines/src/types/fs.d.mts +0 -486
- package/dist/powerlines/src/types/hooks.d.mts +0 -2
- package/dist/powerlines/src/types/index.d.mts +0 -12
- package/dist/powerlines/src/types/plugin.d.cts +0 -231
- package/dist/powerlines/src/types/plugin.d.mts +0 -231
- package/dist/powerlines/src/types/resolved.d.cts +0 -82
- package/dist/powerlines/src/types/resolved.d.mts +0 -83
- package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
- package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
- package/dist/powerlines/src/types/unplugin.d.mts +0 -7
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Context, UnresolvedContext } from "../powerlines/src/types/context.cjs";
|
|
2
|
-
import { type_d_exports } from "../deepkit/src/vendor/type.cjs";
|
|
3
|
-
import { EnvPluginContext, EnvPluginResolvedConfig, EnvType } from "../types/plugin.cjs";
|
|
4
|
-
import { TypeDefinition } from "@stryke/types/configuration";
|
|
5
|
-
|
|
6
|
-
//#region src/helpers/persistence.d.ts
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Resolves the runtime type definition file for the environment variables.
|
|
10
|
-
*
|
|
11
|
-
* @param context - The plugin context.
|
|
12
|
-
* @returns The runtime type definition file for the environment variables.
|
|
13
|
-
*/
|
|
14
|
-
declare function resolveRuntimeTypeFile(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<string>;
|
|
15
|
-
/**
|
|
16
|
-
* Gets the default type definition for the environment variables.
|
|
17
|
-
*
|
|
18
|
-
* @param context - The plugin context.
|
|
19
|
-
* @returns The default type definition for the environment variables.
|
|
20
|
-
*/
|
|
21
|
-
declare function getEnvDefaultTypeDefinition(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<TypeDefinition>;
|
|
22
|
-
/** Gets the default type definition for the environment secrets.
|
|
23
|
-
*
|
|
24
|
-
* @param context - The plugin context.
|
|
25
|
-
* @returns The default type definition for the environment secrets.
|
|
26
|
-
*/
|
|
27
|
-
declare function getSecretsDefaultTypeDefinition(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<TypeDefinition>;
|
|
28
|
-
/**
|
|
29
|
-
* Gets the path to the environment type reflections.
|
|
30
|
-
*
|
|
31
|
-
* @param context - The plugin context.
|
|
32
|
-
* @param name - The name of the type reflections.
|
|
33
|
-
* @returns The path to the environment type reflections.
|
|
34
|
-
*/
|
|
35
|
-
declare function getEnvTypeReflectionsPath(context: Context<EnvPluginResolvedConfig>, name?: EnvType): string;
|
|
36
|
-
/**
|
|
37
|
-
* Reads the environment type reflection from the file system.
|
|
38
|
-
*
|
|
39
|
-
* @param context - The plugin context.
|
|
40
|
-
* @param name - The name of the type reflections.
|
|
41
|
-
* @returns The environment type reflection.
|
|
42
|
-
*/
|
|
43
|
-
declare function readEnvTypeReflection(context: EnvPluginContext, name?: EnvType): Promise<type_d_exports.ReflectionClass<any>>;
|
|
44
|
-
/**
|
|
45
|
-
* Writes the environment type reflection to the file system.
|
|
46
|
-
*
|
|
47
|
-
* @param context - The plugin context.
|
|
48
|
-
* @param reflection - The environment type reflection to write.
|
|
49
|
-
* @param name - The name of the type reflections.
|
|
50
|
-
*/
|
|
51
|
-
declare function writeEnvTypeReflection(context: EnvPluginContext, reflection: type_d_exports.ReflectionClass<any>, name?: EnvType): Promise<void>;
|
|
52
|
-
declare function getEnvReflectionsPath(context: EnvPluginContext, name: EnvType): string;
|
|
53
|
-
/**
|
|
54
|
-
* Reads the environment reflection data from the file system.
|
|
55
|
-
*
|
|
56
|
-
* @param context - The plugin context.
|
|
57
|
-
* @returns The environment reflection data.
|
|
58
|
-
*/
|
|
59
|
-
declare function readEnvReflection(context: EnvPluginContext): Promise<type_d_exports.ReflectionClass<any>>;
|
|
60
|
-
/**
|
|
61
|
-
* Reads the secret environment reflection data from the file system.
|
|
62
|
-
*
|
|
63
|
-
* @param context - The plugin context.
|
|
64
|
-
* @returns The environment reflection data.
|
|
65
|
-
*/
|
|
66
|
-
declare function readSecretsReflection(context: EnvPluginContext): Promise<type_d_exports.ReflectionClass<any>>;
|
|
67
|
-
/**
|
|
68
|
-
* Writes the environment reflection data to the file system.
|
|
69
|
-
*
|
|
70
|
-
* @param context - The plugin context.
|
|
71
|
-
* @param reflection - The reflection data to write.
|
|
72
|
-
* @param name - The name of the reflection (either "env" or "secrets").
|
|
73
|
-
*/
|
|
74
|
-
declare function writeEnvReflection(context: EnvPluginContext, reflection: type_d_exports.ReflectionClass<any>, name?: EnvType): Promise<void>;
|
|
75
|
-
/**
|
|
76
|
-
* Writes the environment reflection data to the file system.
|
|
77
|
-
*
|
|
78
|
-
* @param context - The plugin context.
|
|
79
|
-
* @param reflection - The reflection data to write.
|
|
80
|
-
* @param name - The name of the reflection (either "env" or "secrets").
|
|
81
|
-
*/
|
|
82
|
-
declare function writeEnvReflectionSync(context: EnvPluginContext, reflection: type_d_exports.ReflectionClass<any>, name?: EnvType): void;
|
|
83
|
-
//#endregion
|
|
84
|
-
export { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Context, UnresolvedContext } from "../powerlines/src/types/context.mjs";
|
|
2
|
-
import { type_d_exports } from "../deepkit/src/vendor/type.mjs";
|
|
3
|
-
import { EnvPluginContext, EnvPluginResolvedConfig, EnvType } from "../types/plugin.mjs";
|
|
4
|
-
import { TypeDefinition } from "@stryke/types/configuration";
|
|
5
|
-
|
|
6
|
-
//#region src/helpers/persistence.d.ts
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Resolves the runtime type definition file for the environment variables.
|
|
10
|
-
*
|
|
11
|
-
* @param context - The plugin context.
|
|
12
|
-
* @returns The runtime type definition file for the environment variables.
|
|
13
|
-
*/
|
|
14
|
-
declare function resolveRuntimeTypeFile(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<string>;
|
|
15
|
-
/**
|
|
16
|
-
* Gets the default type definition for the environment variables.
|
|
17
|
-
*
|
|
18
|
-
* @param context - The plugin context.
|
|
19
|
-
* @returns The default type definition for the environment variables.
|
|
20
|
-
*/
|
|
21
|
-
declare function getEnvDefaultTypeDefinition(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<TypeDefinition>;
|
|
22
|
-
/** Gets the default type definition for the environment secrets.
|
|
23
|
-
*
|
|
24
|
-
* @param context - The plugin context.
|
|
25
|
-
* @returns The default type definition for the environment secrets.
|
|
26
|
-
*/
|
|
27
|
-
declare function getSecretsDefaultTypeDefinition(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<TypeDefinition>;
|
|
28
|
-
/**
|
|
29
|
-
* Gets the path to the environment type reflections.
|
|
30
|
-
*
|
|
31
|
-
* @param context - The plugin context.
|
|
32
|
-
* @param name - The name of the type reflections.
|
|
33
|
-
* @returns The path to the environment type reflections.
|
|
34
|
-
*/
|
|
35
|
-
declare function getEnvTypeReflectionsPath(context: Context<EnvPluginResolvedConfig>, name?: EnvType): string;
|
|
36
|
-
/**
|
|
37
|
-
* Reads the environment type reflection from the file system.
|
|
38
|
-
*
|
|
39
|
-
* @param context - The plugin context.
|
|
40
|
-
* @param name - The name of the type reflections.
|
|
41
|
-
* @returns The environment type reflection.
|
|
42
|
-
*/
|
|
43
|
-
declare function readEnvTypeReflection(context: EnvPluginContext, name?: EnvType): Promise<type_d_exports.ReflectionClass<any>>;
|
|
44
|
-
/**
|
|
45
|
-
* Writes the environment type reflection to the file system.
|
|
46
|
-
*
|
|
47
|
-
* @param context - The plugin context.
|
|
48
|
-
* @param reflection - The environment type reflection to write.
|
|
49
|
-
* @param name - The name of the type reflections.
|
|
50
|
-
*/
|
|
51
|
-
declare function writeEnvTypeReflection(context: EnvPluginContext, reflection: type_d_exports.ReflectionClass<any>, name?: EnvType): Promise<void>;
|
|
52
|
-
declare function getEnvReflectionsPath(context: EnvPluginContext, name: EnvType): string;
|
|
53
|
-
/**
|
|
54
|
-
* Reads the environment reflection data from the file system.
|
|
55
|
-
*
|
|
56
|
-
* @param context - The plugin context.
|
|
57
|
-
* @returns The environment reflection data.
|
|
58
|
-
*/
|
|
59
|
-
declare function readEnvReflection(context: EnvPluginContext): Promise<type_d_exports.ReflectionClass<any>>;
|
|
60
|
-
/**
|
|
61
|
-
* Reads the secret environment reflection data from the file system.
|
|
62
|
-
*
|
|
63
|
-
* @param context - The plugin context.
|
|
64
|
-
* @returns The environment reflection data.
|
|
65
|
-
*/
|
|
66
|
-
declare function readSecretsReflection(context: EnvPluginContext): Promise<type_d_exports.ReflectionClass<any>>;
|
|
67
|
-
/**
|
|
68
|
-
* Writes the environment reflection data to the file system.
|
|
69
|
-
*
|
|
70
|
-
* @param context - The plugin context.
|
|
71
|
-
* @param reflection - The reflection data to write.
|
|
72
|
-
* @param name - The name of the reflection (either "env" or "secrets").
|
|
73
|
-
*/
|
|
74
|
-
declare function writeEnvReflection(context: EnvPluginContext, reflection: type_d_exports.ReflectionClass<any>, name?: EnvType): Promise<void>;
|
|
75
|
-
/**
|
|
76
|
-
* Writes the environment reflection data to the file system.
|
|
77
|
-
*
|
|
78
|
-
* @param context - The plugin context.
|
|
79
|
-
* @param reflection - The reflection data to write.
|
|
80
|
-
* @param name - The name of the reflection (either "env" or "secrets").
|
|
81
|
-
*/
|
|
82
|
-
declare function writeEnvReflectionSync(context: EnvPluginContext, reflection: type_d_exports.ReflectionClass<any>, name?: EnvType): void;
|
|
83
|
-
//#endregion
|
|
84
|
-
export { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { type_exports } from "../deepkit/src/vendor/type.mjs";
|
|
2
|
-
import { convertFromCapnp, convertToCapnp } from "../deepkit/src/capnp.mjs";
|
|
3
|
-
import { SerializedTypes } from "../deepkit/schemas/reflection2.mjs";
|
|
4
|
-
import { getReflectionsPath } from "../deepkit/src/resolve-reflections.mjs";
|
|
5
|
-
import { createEnvReflection } from "./reflect.mjs";
|
|
6
|
-
import { joinPaths } from "@stryke/path/join-paths";
|
|
7
|
-
import * as capnp from "@stryke/capnp";
|
|
8
|
-
import { readFileBuffer, writeFileBuffer, writeFileBufferSync } from "@stryke/fs/buffer";
|
|
9
|
-
import { existsSync } from "node:fs";
|
|
10
|
-
import { resolvePackage } from "@stryke/fs/resolve";
|
|
11
|
-
import { isEmptyObject } from "@stryke/type-checks/is-empty-object";
|
|
12
|
-
|
|
13
|
-
//#region src/helpers/persistence.ts
|
|
14
|
-
/**
|
|
15
|
-
* Resolves the runtime type definition file for the environment variables.
|
|
16
|
-
*
|
|
17
|
-
* @param context - The plugin context.
|
|
18
|
-
* @returns The runtime type definition file for the environment variables.
|
|
19
|
-
*/
|
|
20
|
-
async function resolveRuntimeTypeFile(context) {
|
|
21
|
-
return resolvePackage("@powerlines/plugin-env/types/runtime", { paths: [context.workspaceConfig.workspaceRoot, joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot)] });
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Gets the default type definition for the environment variables.
|
|
25
|
-
*
|
|
26
|
-
* @param context - The plugin context.
|
|
27
|
-
* @returns The default type definition for the environment variables.
|
|
28
|
-
*/
|
|
29
|
-
async function getEnvDefaultTypeDefinition(context) {
|
|
30
|
-
return {
|
|
31
|
-
file: await resolveRuntimeTypeFile(context),
|
|
32
|
-
name: "EnvInterface"
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
/** Gets the default type definition for the environment secrets.
|
|
36
|
-
*
|
|
37
|
-
* @param context - The plugin context.
|
|
38
|
-
* @returns The default type definition for the environment secrets.
|
|
39
|
-
*/
|
|
40
|
-
async function getSecretsDefaultTypeDefinition(context) {
|
|
41
|
-
return {
|
|
42
|
-
file: await resolveRuntimeTypeFile(context),
|
|
43
|
-
name: "SecretsInterface"
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Gets the path to the environment type reflections.
|
|
48
|
-
*
|
|
49
|
-
* @param context - The plugin context.
|
|
50
|
-
* @param name - The name of the type reflections.
|
|
51
|
-
* @returns The path to the environment type reflections.
|
|
52
|
-
*/
|
|
53
|
-
function getEnvTypeReflectionsPath(context, name = "env") {
|
|
54
|
-
return joinPaths(getReflectionsPath(context), "env", `${name}-types.bin`);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Reads the environment type reflection from the file system.
|
|
58
|
-
*
|
|
59
|
-
* @param context - The plugin context.
|
|
60
|
-
* @param name - The name of the type reflections.
|
|
61
|
-
* @returns The environment type reflection.
|
|
62
|
-
*/
|
|
63
|
-
async function readEnvTypeReflection(context, name = "env") {
|
|
64
|
-
const filePath = getEnvTypeReflectionsPath(context, name);
|
|
65
|
-
if (!existsSync(filePath)) {
|
|
66
|
-
if (!context.env.types.env || isEmptyObject(context.env.types.env)) {
|
|
67
|
-
const reflection$1 = createEnvReflection(context);
|
|
68
|
-
const message = new capnp.Message();
|
|
69
|
-
reflection$1.messageRoot = message.initRoot(SerializedTypes);
|
|
70
|
-
reflection$1.dataBuffer = message.toArrayBuffer();
|
|
71
|
-
context.env.types.env = reflection$1;
|
|
72
|
-
await writeEnvTypeReflection(context, context.env.types.env, name);
|
|
73
|
-
}
|
|
74
|
-
return context.env.types.env;
|
|
75
|
-
}
|
|
76
|
-
const buffer = await readFileBuffer(filePath);
|
|
77
|
-
const messageRoot = new capnp.Message(buffer, false).getRoot(SerializedTypes);
|
|
78
|
-
const reflection = (0, type_exports.resolveClassType)((0, type_exports.deserializeType)(convertFromCapnp(messageRoot.types)));
|
|
79
|
-
context.env.types[name] = reflection;
|
|
80
|
-
context.env.types[name].messageRoot = messageRoot;
|
|
81
|
-
context.env.types[name].dataBuffer = buffer;
|
|
82
|
-
return reflection;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Writes the environment type reflection to the file system.
|
|
86
|
-
*
|
|
87
|
-
* @param context - The plugin context.
|
|
88
|
-
* @param reflection - The environment type reflection to write.
|
|
89
|
-
* @param name - The name of the type reflections.
|
|
90
|
-
*/
|
|
91
|
-
async function writeEnvTypeReflection(context, reflection, name = "env") {
|
|
92
|
-
const serialized = reflection.serializeType();
|
|
93
|
-
const message = new capnp.Message();
|
|
94
|
-
convertToCapnp(serialized, message.initRoot(SerializedTypes)._initTypes(serialized.length));
|
|
95
|
-
await writeFileBuffer(getEnvTypeReflectionsPath(context, name), message.toArrayBuffer());
|
|
96
|
-
}
|
|
97
|
-
function getEnvReflectionsPath(context, name) {
|
|
98
|
-
return joinPaths(getReflectionsPath(context), "env", `${name}.bin`);
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Reads the environment reflection data from the file system.
|
|
102
|
-
*
|
|
103
|
-
* @param context - The plugin context.
|
|
104
|
-
* @returns The environment reflection data.
|
|
105
|
-
*/
|
|
106
|
-
async function readEnvReflection(context) {
|
|
107
|
-
const filePath = getEnvReflectionsPath(context, "env");
|
|
108
|
-
if (!existsSync(filePath)) {
|
|
109
|
-
if (!context.env.types.env) context.env.types.env = await readEnvTypeReflection(context, "env");
|
|
110
|
-
if (!context.env.used.env || isEmptyObject(context.env.used.env)) {
|
|
111
|
-
const reflection$1 = createEnvReflection(context, {
|
|
112
|
-
type: {
|
|
113
|
-
kind: type_exports.ReflectionKind.objectLiteral,
|
|
114
|
-
typeName: "Env",
|
|
115
|
-
description: `An object containing the environment configuration parameters that are used (at least once) by the ${context.config.name ? `${context.config.name} application` : "application"}.`,
|
|
116
|
-
types: []
|
|
117
|
-
},
|
|
118
|
-
superReflection: context.env.types.env
|
|
119
|
-
});
|
|
120
|
-
reflection$1.name = "Env";
|
|
121
|
-
const message = new capnp.Message();
|
|
122
|
-
reflection$1.messageRoot = message.initRoot(SerializedTypes);
|
|
123
|
-
reflection$1.dataBuffer = message.toArrayBuffer();
|
|
124
|
-
context.env.used.env = reflection$1;
|
|
125
|
-
await writeEnvReflection(context, context.env.used.env, "env");
|
|
126
|
-
}
|
|
127
|
-
return context.env.used.env;
|
|
128
|
-
}
|
|
129
|
-
const buffer = await readFileBuffer(filePath);
|
|
130
|
-
const messageRoot = new capnp.Message(buffer, false).getRoot(SerializedTypes);
|
|
131
|
-
const reflection = (0, type_exports.resolveClassType)((0, type_exports.deserializeType)(convertFromCapnp(messageRoot.types)));
|
|
132
|
-
context.env.used.env = reflection;
|
|
133
|
-
context.env.used.env.messageRoot = messageRoot;
|
|
134
|
-
context.env.used.env.dataBuffer = buffer;
|
|
135
|
-
return reflection;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Reads the secret environment reflection data from the file system.
|
|
139
|
-
*
|
|
140
|
-
* @param context - The plugin context.
|
|
141
|
-
* @returns The environment reflection data.
|
|
142
|
-
*/
|
|
143
|
-
async function readSecretsReflection(context) {
|
|
144
|
-
const filePath = getEnvReflectionsPath(context, "secrets");
|
|
145
|
-
if (!existsSync(filePath)) {
|
|
146
|
-
if (!context.env.types.secrets) context.env.types.secrets = await readEnvTypeReflection(context, "secrets");
|
|
147
|
-
if (!context.env.used.secrets || isEmptyObject(context.env.used.secrets)) {
|
|
148
|
-
const reflection$1 = createEnvReflection(context, {
|
|
149
|
-
type: {
|
|
150
|
-
kind: type_exports.ReflectionKind.objectLiteral,
|
|
151
|
-
typeName: "Secrets",
|
|
152
|
-
description: `An object containing the secret configuration parameters that are used (at least once) by the ${context.config.name ? `${context.config.name} application` : "application"}.`,
|
|
153
|
-
types: []
|
|
154
|
-
},
|
|
155
|
-
superReflection: context.env.types.secrets
|
|
156
|
-
});
|
|
157
|
-
reflection$1.name = "Secrets";
|
|
158
|
-
const message = new capnp.Message();
|
|
159
|
-
reflection$1.messageRoot = message.initRoot(SerializedTypes);
|
|
160
|
-
reflection$1.dataBuffer = message.toArrayBuffer();
|
|
161
|
-
context.env.used.secrets = reflection$1;
|
|
162
|
-
await writeEnvReflection(context, context.env.used.secrets, "secrets");
|
|
163
|
-
}
|
|
164
|
-
return context.env.used.secrets;
|
|
165
|
-
}
|
|
166
|
-
const buffer = await readFileBuffer(filePath);
|
|
167
|
-
const messageRoot = new capnp.Message(buffer, false).getRoot(SerializedTypes);
|
|
168
|
-
const reflection = (0, type_exports.resolveClassType)((0, type_exports.deserializeType)(convertFromCapnp(messageRoot.types)));
|
|
169
|
-
context.env.used.secrets = reflection;
|
|
170
|
-
context.env.used.secrets.messageRoot = messageRoot;
|
|
171
|
-
context.env.used.secrets.dataBuffer = buffer;
|
|
172
|
-
return reflection;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Writes the environment reflection data to the file system.
|
|
176
|
-
*
|
|
177
|
-
* @param context - The plugin context.
|
|
178
|
-
* @param reflection - The reflection data to write.
|
|
179
|
-
* @param name - The name of the reflection (either "env" or "secrets").
|
|
180
|
-
*/
|
|
181
|
-
async function writeEnvReflection(context, reflection, name = "env") {
|
|
182
|
-
const serialized = reflection.serializeType();
|
|
183
|
-
const message = new capnp.Message();
|
|
184
|
-
convertToCapnp(serialized, message.initRoot(SerializedTypes)._initTypes(serialized.length));
|
|
185
|
-
await writeFileBuffer(getEnvReflectionsPath(context, name), message.toArrayBuffer());
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Writes the environment reflection data to the file system.
|
|
189
|
-
*
|
|
190
|
-
* @param context - The plugin context.
|
|
191
|
-
* @param reflection - The reflection data to write.
|
|
192
|
-
* @param name - The name of the reflection (either "env" or "secrets").
|
|
193
|
-
*/
|
|
194
|
-
function writeEnvReflectionSync(context, reflection, name = "env") {
|
|
195
|
-
const serialized = reflection.serializeType();
|
|
196
|
-
const message = new capnp.Message();
|
|
197
|
-
convertToCapnp(serialized, message.initRoot(SerializedTypes)._initTypes(serialized.length));
|
|
198
|
-
writeFileBufferSync(getEnvReflectionsPath(context, name), message.toArrayBuffer());
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
//#endregion
|
|
202
|
-
export { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
package/dist/helpers/reflect.cjs
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_type = require('../deepkit/src/vendor/type.cjs');
|
|
3
|
-
const require_reflect_type = require('../deepkit/src/reflect-type.cjs');
|
|
4
|
-
const require_persistence = require('./persistence.cjs');
|
|
5
|
-
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
6
|
-
let __stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
|
|
7
|
-
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
8
|
-
|
|
9
|
-
//#region src/helpers/reflect.ts
|
|
10
|
-
function mergeEnvReflections(context, reflections) {
|
|
11
|
-
return createEnvReflection(context, { type: (0, require_type.type_exports.merge)(reflections.map((reflection) => reflection.type)) });
|
|
12
|
-
}
|
|
13
|
-
function mergeSecretsReflections(context, reflections) {
|
|
14
|
-
return createSecretsReflection(context, { type: (0, require_type.type_exports.merge)(reflections.map((reflection) => reflection.type)) });
|
|
15
|
-
}
|
|
16
|
-
var BaseEnv = class {
|
|
17
|
-
PLATFORM = "neutral";
|
|
18
|
-
MODE = "production";
|
|
19
|
-
DEBUG = false;
|
|
20
|
-
TEST = false;
|
|
21
|
-
MINIMAL = false;
|
|
22
|
-
NO_COLOR = false;
|
|
23
|
-
FORCE_COLOR = false;
|
|
24
|
-
FORCE_HYPERLINK = false;
|
|
25
|
-
STACKTRACE = false;
|
|
26
|
-
INCLUDE_ERROR_DATA = false;
|
|
27
|
-
CI = false;
|
|
28
|
-
};
|
|
29
|
-
var BaseSecrets = class {};
|
|
30
|
-
function createEnvReflection(context, options = {}) {
|
|
31
|
-
const parent = options.superReflection ?? new require_type.type_exports.ReflectionClass({
|
|
32
|
-
kind: require_type.type_exports.ReflectionKind.class,
|
|
33
|
-
description: `The base environment configuration definition for the ${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
|
|
34
|
-
classType: BaseEnv,
|
|
35
|
-
types: [],
|
|
36
|
-
implements: [{
|
|
37
|
-
kind: require_type.type_exports.ReflectionKind.objectLiteral,
|
|
38
|
-
typeName: "EnvInterface",
|
|
39
|
-
description: `The environment configuration interface definition for the ${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
|
|
40
|
-
types: []
|
|
41
|
-
}]
|
|
42
|
-
});
|
|
43
|
-
parent.name = "Env";
|
|
44
|
-
const result = new require_type.type_exports.ReflectionClass(options.type ?? {
|
|
45
|
-
kind: require_type.type_exports.ReflectionKind.objectLiteral,
|
|
46
|
-
typeName: "Env",
|
|
47
|
-
description: `A schema describing the list of available environment variables that can be used by the ${context.config.name ? `${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} application` : "application"}.`,
|
|
48
|
-
types: []
|
|
49
|
-
}, parent);
|
|
50
|
-
result.name = "Env";
|
|
51
|
-
return result;
|
|
52
|
-
}
|
|
53
|
-
function createSecretsReflection(context, options = {}) {
|
|
54
|
-
const parent = options.superReflection ?? new require_type.type_exports.ReflectionClass({
|
|
55
|
-
kind: require_type.type_exports.ReflectionKind.class,
|
|
56
|
-
description: `The base secrets configuration definition for the ${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
|
|
57
|
-
classType: BaseSecrets,
|
|
58
|
-
types: [],
|
|
59
|
-
implements: [{
|
|
60
|
-
kind: require_type.type_exports.ReflectionKind.objectLiteral,
|
|
61
|
-
typeName: "SecretsInterface",
|
|
62
|
-
description: `The secrets configuration interface definition for the ${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
|
|
63
|
-
types: []
|
|
64
|
-
}]
|
|
65
|
-
});
|
|
66
|
-
parent.name = "Secrets";
|
|
67
|
-
const result = new require_type.type_exports.ReflectionClass(options.type ?? {
|
|
68
|
-
kind: require_type.type_exports.ReflectionKind.objectLiteral,
|
|
69
|
-
typeName: "Secrets",
|
|
70
|
-
description: `A schema describing the list of available environment secrets that can be used by the ${context.config.name ? `${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} application` : "application"}.`,
|
|
71
|
-
types: []
|
|
72
|
-
}, parent);
|
|
73
|
-
result.name = "Secrets";
|
|
74
|
-
return result;
|
|
75
|
-
}
|
|
76
|
-
async function reflectEnv(context, file, name) {
|
|
77
|
-
let config;
|
|
78
|
-
if (file) config = (0, require_type.type_exports.resolveClassType)(await require_reflect_type.reflectType(context, {
|
|
79
|
-
file: !(0, __stryke_path_is_parent_path.isParentPath)(file, context.workspaceConfig.workspaceRoot) ? (0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, file) : file,
|
|
80
|
-
name
|
|
81
|
-
}, { skipNodeModulesBundle: true }));
|
|
82
|
-
const defaultConfigType = await require_reflect_type.reflectType(context, await require_persistence.getEnvDefaultTypeDefinition(context));
|
|
83
|
-
return mergeEnvReflections(context, [
|
|
84
|
-
await require_persistence.readEnvTypeReflection(context, "env"),
|
|
85
|
-
config,
|
|
86
|
-
(0, require_type.type_exports.resolveClassType)(defaultConfigType)
|
|
87
|
-
].filter(Boolean));
|
|
88
|
-
}
|
|
89
|
-
async function reflectSecrets(context, file, name) {
|
|
90
|
-
let config;
|
|
91
|
-
if (file) config = (0, require_type.type_exports.resolveClassType)(await require_reflect_type.reflectType(context, {
|
|
92
|
-
file: !(0, __stryke_path_is_parent_path.isParentPath)(file, context.workspaceConfig.workspaceRoot) ? (0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, file) : file,
|
|
93
|
-
name
|
|
94
|
-
}, { skipNodeModulesBundle: true }));
|
|
95
|
-
const defaultSecretsType = await require_reflect_type.reflectType(context, await require_persistence.getSecretsDefaultTypeDefinition(context));
|
|
96
|
-
return mergeSecretsReflections(context, [
|
|
97
|
-
await require_persistence.readSecretsReflection(context),
|
|
98
|
-
config,
|
|
99
|
-
(0, require_type.type_exports.resolveClassType)(defaultSecretsType)
|
|
100
|
-
].filter(Boolean));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
//#endregion
|
|
104
|
-
exports.BaseEnv = BaseEnv;
|
|
105
|
-
exports.BaseSecrets = BaseSecrets;
|
|
106
|
-
exports.createEnvReflection = createEnvReflection;
|
|
107
|
-
exports.createSecretsReflection = createSecretsReflection;
|
|
108
|
-
exports.mergeEnvReflections = mergeEnvReflections;
|
|
109
|
-
exports.mergeSecretsReflections = mergeSecretsReflections;
|
|
110
|
-
exports.reflectEnv = reflectEnv;
|
|
111
|
-
exports.reflectSecrets = reflectSecrets;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { type_d_exports } from "../deepkit/src/vendor/type.cjs";
|
|
2
|
-
import { EnvInterface, SecretsInterface } from "../types/runtime.cjs";
|
|
3
|
-
import { EnvPluginContext } from "../types/plugin.cjs";
|
|
4
|
-
|
|
5
|
-
//#region src/helpers/reflect.d.ts
|
|
6
|
-
declare function mergeEnvReflections(context: EnvPluginContext, reflections: type_d_exports.ReflectionClass<any>[]): type_d_exports.ReflectionClass<any>;
|
|
7
|
-
declare function mergeSecretsReflections(context: EnvPluginContext, reflections: type_d_exports.ReflectionClass<any>[]): type_d_exports.ReflectionClass<any>;
|
|
8
|
-
interface CreateEnvReflectionOptions {
|
|
9
|
-
type?: type_d_exports.TypeObjectLiteral | type_d_exports.TypeClass;
|
|
10
|
-
superReflection?: type_d_exports.ReflectionClass<any>;
|
|
11
|
-
}
|
|
12
|
-
declare class BaseEnv implements EnvInterface {
|
|
13
|
-
APP_NAME: string;
|
|
14
|
-
APP_VERSION: string;
|
|
15
|
-
BUILD_ID: string;
|
|
16
|
-
BUILD_TIMESTAMP: string;
|
|
17
|
-
BUILD_CHECKSUM: string;
|
|
18
|
-
RELEASE_ID: string;
|
|
19
|
-
RELEASE_TAG: string;
|
|
20
|
-
ORGANIZATION: string;
|
|
21
|
-
PLATFORM: "node" | "browser" | "neutral";
|
|
22
|
-
MODE: "development" | "test" | "production";
|
|
23
|
-
ENVIRONMENT: string;
|
|
24
|
-
DEBUG: boolean;
|
|
25
|
-
TEST: boolean;
|
|
26
|
-
MINIMAL: boolean;
|
|
27
|
-
NO_COLOR: boolean;
|
|
28
|
-
FORCE_COLOR: number | boolean;
|
|
29
|
-
FORCE_HYPERLINK: number | boolean;
|
|
30
|
-
STACKTRACE: boolean;
|
|
31
|
-
INCLUDE_ERROR_DATA: boolean;
|
|
32
|
-
ERROR_URL: string;
|
|
33
|
-
DEFAULT_TIMEZONE: string;
|
|
34
|
-
DEFAULT_LOCALE: string;
|
|
35
|
-
CI: boolean;
|
|
36
|
-
}
|
|
37
|
-
declare class BaseSecrets implements SecretsInterface {
|
|
38
|
-
ENCRYPTION_KEY: string;
|
|
39
|
-
}
|
|
40
|
-
declare function createEnvReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): type_d_exports.ReflectionClass<any>;
|
|
41
|
-
declare function createSecretsReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): type_d_exports.ReflectionClass<any>;
|
|
42
|
-
declare function reflectEnv(context: EnvPluginContext, file?: string, name?: string): Promise<type_d_exports.ReflectionClass<any>>;
|
|
43
|
-
declare function reflectSecrets(context: EnvPluginContext, file?: string, name?: string): Promise<type_d_exports.ReflectionClass<any>>;
|
|
44
|
-
declare type __ΩCreateEnvReflectionOptions = any[];
|
|
45
|
-
//#endregion
|
|
46
|
-
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { type_d_exports } from "../deepkit/src/vendor/type.mjs";
|
|
2
|
-
import { EnvInterface, SecretsInterface } from "../types/runtime.mjs";
|
|
3
|
-
import { EnvPluginContext } from "../types/plugin.mjs";
|
|
4
|
-
|
|
5
|
-
//#region src/helpers/reflect.d.ts
|
|
6
|
-
declare function mergeEnvReflections(context: EnvPluginContext, reflections: type_d_exports.ReflectionClass<any>[]): type_d_exports.ReflectionClass<any>;
|
|
7
|
-
declare function mergeSecretsReflections(context: EnvPluginContext, reflections: type_d_exports.ReflectionClass<any>[]): type_d_exports.ReflectionClass<any>;
|
|
8
|
-
interface CreateEnvReflectionOptions {
|
|
9
|
-
type?: type_d_exports.TypeObjectLiteral | type_d_exports.TypeClass;
|
|
10
|
-
superReflection?: type_d_exports.ReflectionClass<any>;
|
|
11
|
-
}
|
|
12
|
-
declare class BaseEnv implements EnvInterface {
|
|
13
|
-
APP_NAME: string;
|
|
14
|
-
APP_VERSION: string;
|
|
15
|
-
BUILD_ID: string;
|
|
16
|
-
BUILD_TIMESTAMP: string;
|
|
17
|
-
BUILD_CHECKSUM: string;
|
|
18
|
-
RELEASE_ID: string;
|
|
19
|
-
RELEASE_TAG: string;
|
|
20
|
-
ORGANIZATION: string;
|
|
21
|
-
PLATFORM: "node" | "browser" | "neutral";
|
|
22
|
-
MODE: "development" | "test" | "production";
|
|
23
|
-
ENVIRONMENT: string;
|
|
24
|
-
DEBUG: boolean;
|
|
25
|
-
TEST: boolean;
|
|
26
|
-
MINIMAL: boolean;
|
|
27
|
-
NO_COLOR: boolean;
|
|
28
|
-
FORCE_COLOR: number | boolean;
|
|
29
|
-
FORCE_HYPERLINK: number | boolean;
|
|
30
|
-
STACKTRACE: boolean;
|
|
31
|
-
INCLUDE_ERROR_DATA: boolean;
|
|
32
|
-
ERROR_URL: string;
|
|
33
|
-
DEFAULT_TIMEZONE: string;
|
|
34
|
-
DEFAULT_LOCALE: string;
|
|
35
|
-
CI: boolean;
|
|
36
|
-
}
|
|
37
|
-
declare class BaseSecrets implements SecretsInterface {
|
|
38
|
-
ENCRYPTION_KEY: string;
|
|
39
|
-
}
|
|
40
|
-
declare function createEnvReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): type_d_exports.ReflectionClass<any>;
|
|
41
|
-
declare function createSecretsReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): type_d_exports.ReflectionClass<any>;
|
|
42
|
-
declare function reflectEnv(context: EnvPluginContext, file?: string, name?: string): Promise<type_d_exports.ReflectionClass<any>>;
|
|
43
|
-
declare function reflectSecrets(context: EnvPluginContext, file?: string, name?: string): Promise<type_d_exports.ReflectionClass<any>>;
|
|
44
|
-
declare type __ΩCreateEnvReflectionOptions = any[];
|
|
45
|
-
//#endregion
|
|
46
|
-
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets };
|