@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
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,189 @@
|
|
|
1
|
-
import { EnvDocs } from "./
|
|
2
|
-
import { Plugin } from "./
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { createTemplateReflection } from "./helpers/template-helpers.cjs";
|
|
1
|
+
import { t as EnvDocs } from "./docs-_MmTNBQX.cjs";
|
|
2
|
+
import { d as Plugin, n as EnvironmentResolvedConfig, o as DeclareBabelTransformPluginReturn, s as Context, u as UnresolvedContext } from "./resolved-BZG2cwRG.cjs";
|
|
3
|
+
import { i as __ΩEnvBuiltinProps, n as EnvBuiltinProps, r as EnvTypeDefinition, t as EnvBuiltin } from "./env-BPodCdD1.cjs";
|
|
4
|
+
import "./index-DWPDThxu.cjs";
|
|
5
|
+
import { a as EnvType, c as __ΩEnvPluginResolvedConfig, i as EnvPluginUserConfig, l as __ΩEnvPluginUserConfig, n as EnvPluginOptions, o as __ΩEnvPluginContext, r as EnvPluginResolvedConfig, s as __ΩEnvPluginOptions, t as EnvPluginContext, u as __ΩEnvType } from "./plugin-BwuEBScL.cjs";
|
|
6
|
+
import { i as __ΩSecretsInterface, n as SecretsInterface, r as __ΩEnvInterface, t as EnvInterface } from "./runtime-Q8Ni8SeN.cjs";
|
|
7
|
+
import "./index-CqdNToYT.cjs";
|
|
8
|
+
import * as _alloy_js_core3 from "@alloy-js/core";
|
|
9
|
+
import { TypeDefinition } from "@stryke/types/configuration";
|
|
10
|
+
import { ReflectionClass, TypeClass, TypeObjectLiteral } from "@powerlines/deepkit/vendor/type";
|
|
11
|
+
import { DotenvParseOutput } from "@stryke/env/types";
|
|
13
12
|
|
|
13
|
+
//#region src/babel/plugin.d.ts
|
|
14
|
+
declare const envBabelPlugin: DeclareBabelTransformPluginReturn<EnvPluginContext<EnvPluginResolvedConfig>, Record<string, any>>;
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/helpers/create-reflection-resource.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Creates a reflection resource for the environment configuration.
|
|
19
|
+
*
|
|
20
|
+
* @param context - The environment plugin context.
|
|
21
|
+
* @returns A resource that provides the reflection of the environment configuration.
|
|
22
|
+
*/
|
|
23
|
+
declare function createReflectionResource(context?: EnvPluginContext): _alloy_js_core3.Resource<ReflectionClass<Record<string, any>>>;
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/helpers/load.d.ts
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves various dotenv configuration parameters from the context.
|
|
28
|
+
*
|
|
29
|
+
* @param context - The context to retrieve the dotenv configuration from.
|
|
30
|
+
* @param parsed - The parsed dotenv configuration.
|
|
31
|
+
* @returns An object containing the dotenv configuration.
|
|
32
|
+
*/
|
|
33
|
+
declare function loadEnvFromContext(context: EnvPluginContext, parsed: DotenvParseOutput): {
|
|
34
|
+
APP_NAME: string | undefined;
|
|
35
|
+
APP_VERSION: string | undefined;
|
|
36
|
+
BUILD_ID: string;
|
|
37
|
+
BUILD_TIMESTAMP: string;
|
|
38
|
+
BUILD_CHECKSUM: string;
|
|
39
|
+
RELEASE_ID: string;
|
|
40
|
+
RELEASE_TAG: string;
|
|
41
|
+
DEFAULT_LOCALE: string | undefined;
|
|
42
|
+
DEFAULT_TIMEZONE: string | undefined;
|
|
43
|
+
LOG_LEVEL: "error" | "warn" | "info" | "debug" | "trace" | null;
|
|
44
|
+
ERROR_URL: string | undefined;
|
|
45
|
+
ORGANIZATION: string | undefined;
|
|
46
|
+
PLATFORM: "node" | "browser" | "neutral" | undefined;
|
|
47
|
+
MODE: "test" | "development" | "production" | undefined;
|
|
48
|
+
DEBUG: boolean;
|
|
49
|
+
STACKTRACE: boolean;
|
|
50
|
+
ENVIRONMENT: EnvironmentResolvedConfig;
|
|
51
|
+
};
|
|
52
|
+
declare function loadEnv<TEnv extends DotenvParseOutput = DotenvParseOutput>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv>;
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/helpers/persistence.d.ts
|
|
55
|
+
/**
|
|
56
|
+
* Resolves the runtime type definition file for the environment variables.
|
|
57
|
+
*
|
|
58
|
+
* @param context - The plugin context.
|
|
59
|
+
* @returns The runtime type definition file for the environment variables.
|
|
60
|
+
*/
|
|
61
|
+
declare function resolveRuntimeTypeFile(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<string>;
|
|
62
|
+
/**
|
|
63
|
+
* Gets the default type definition for the environment variables.
|
|
64
|
+
*
|
|
65
|
+
* @param context - The plugin context.
|
|
66
|
+
* @returns The default type definition for the environment variables.
|
|
67
|
+
*/
|
|
68
|
+
declare function getEnvDefaultTypeDefinition(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<TypeDefinition>;
|
|
69
|
+
/** Gets the default type definition for the environment secrets.
|
|
70
|
+
*
|
|
71
|
+
* @param context - The plugin context.
|
|
72
|
+
* @returns The default type definition for the environment secrets.
|
|
73
|
+
*/
|
|
74
|
+
declare function getSecretsDefaultTypeDefinition(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<TypeDefinition>;
|
|
75
|
+
/**
|
|
76
|
+
* Gets the path to the environment type reflections.
|
|
77
|
+
*
|
|
78
|
+
* @param context - The plugin context.
|
|
79
|
+
* @param name - The name of the type reflections.
|
|
80
|
+
* @returns The path to the environment type reflections.
|
|
81
|
+
*/
|
|
82
|
+
declare function getEnvTypeReflectionsPath(context: Context<EnvPluginResolvedConfig>, name?: EnvType): string;
|
|
83
|
+
/**
|
|
84
|
+
* Reads the environment type reflection from the file system.
|
|
85
|
+
*
|
|
86
|
+
* @param context - The plugin context.
|
|
87
|
+
* @param name - The name of the type reflections.
|
|
88
|
+
* @returns The environment type reflection.
|
|
89
|
+
*/
|
|
90
|
+
declare function readEnvTypeReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
|
|
91
|
+
/**
|
|
92
|
+
* Writes the environment type reflection to the file system.
|
|
93
|
+
*
|
|
94
|
+
* @param context - The plugin context.
|
|
95
|
+
* @param reflection - The environment type reflection to write.
|
|
96
|
+
* @param name - The name of the type reflections.
|
|
97
|
+
*/
|
|
98
|
+
declare function writeEnvTypeReflection(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): Promise<void>;
|
|
99
|
+
declare function getEnvReflectionsPath(context: EnvPluginContext, name: EnvType): string;
|
|
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
|
+
declare function readEnvReflection(context: EnvPluginContext): Promise<ReflectionClass<any>>;
|
|
107
|
+
/**
|
|
108
|
+
* Reads the secret environment reflection data from the file system.
|
|
109
|
+
*
|
|
110
|
+
* @param context - The plugin context.
|
|
111
|
+
* @returns The environment reflection data.
|
|
112
|
+
*/
|
|
113
|
+
declare function readSecretsReflection(context: EnvPluginContext): Promise<ReflectionClass<any>>;
|
|
114
|
+
/**
|
|
115
|
+
* Writes the environment reflection data to the file system.
|
|
116
|
+
*
|
|
117
|
+
* @param context - The plugin context.
|
|
118
|
+
* @param reflection - The reflection data to write.
|
|
119
|
+
* @param name - The name of the reflection (either "env" or "secrets").
|
|
120
|
+
*/
|
|
121
|
+
declare function writeEnvReflection(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Writes the environment reflection data to the file system.
|
|
124
|
+
*
|
|
125
|
+
* @param context - The plugin context.
|
|
126
|
+
* @param reflection - The reflection data to write.
|
|
127
|
+
* @param name - The name of the reflection (either "env" or "secrets").
|
|
128
|
+
*/
|
|
129
|
+
declare function writeEnvReflectionSync(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): void;
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/helpers/reflect.d.ts
|
|
132
|
+
declare function mergeEnvReflections(context: EnvPluginContext, reflections: ReflectionClass<any>[]): ReflectionClass<any>;
|
|
133
|
+
declare function mergeSecretsReflections(context: EnvPluginContext, reflections: ReflectionClass<any>[]): ReflectionClass<any>;
|
|
134
|
+
interface CreateEnvReflectionOptions {
|
|
135
|
+
type?: TypeObjectLiteral | TypeClass;
|
|
136
|
+
superReflection?: ReflectionClass<any>;
|
|
137
|
+
}
|
|
138
|
+
declare class BaseEnv implements EnvInterface {
|
|
139
|
+
APP_NAME: string;
|
|
140
|
+
APP_VERSION: string;
|
|
141
|
+
BUILD_ID: string;
|
|
142
|
+
BUILD_TIMESTAMP: string;
|
|
143
|
+
BUILD_CHECKSUM: string;
|
|
144
|
+
RELEASE_ID: string;
|
|
145
|
+
RELEASE_TAG: string;
|
|
146
|
+
ORGANIZATION: string;
|
|
147
|
+
PLATFORM: "node" | "browser" | "neutral";
|
|
148
|
+
MODE: "development" | "test" | "production";
|
|
149
|
+
ENVIRONMENT: string;
|
|
150
|
+
DEBUG: boolean;
|
|
151
|
+
TEST: boolean;
|
|
152
|
+
MINIMAL: boolean;
|
|
153
|
+
NO_COLOR: boolean;
|
|
154
|
+
FORCE_COLOR: number | boolean;
|
|
155
|
+
FORCE_HYPERLINK: number | boolean;
|
|
156
|
+
STACKTRACE: boolean;
|
|
157
|
+
INCLUDE_ERROR_DATA: boolean;
|
|
158
|
+
ERROR_URL: string;
|
|
159
|
+
DEFAULT_TIMEZONE: string;
|
|
160
|
+
DEFAULT_LOCALE: string;
|
|
161
|
+
CI: boolean;
|
|
162
|
+
}
|
|
163
|
+
declare class BaseSecrets implements SecretsInterface {
|
|
164
|
+
ENCRYPTION_KEY: string;
|
|
165
|
+
}
|
|
166
|
+
declare function createEnvReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): ReflectionClass<any>;
|
|
167
|
+
declare function createSecretsReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): ReflectionClass<any>;
|
|
168
|
+
declare function reflectEnv(context: EnvPluginContext, file?: string, name?: string): Promise<ReflectionClass<any>>;
|
|
169
|
+
declare function reflectSecrets(context: EnvPluginContext, file?: string, name?: string): Promise<ReflectionClass<any>>;
|
|
170
|
+
declare type __ΩCreateEnvReflectionOptions = any[];
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region src/helpers/source-file-env.d.ts
|
|
173
|
+
type TReturned<TEnv> = TEnv extends string ? string : DotenvParseOutput;
|
|
174
|
+
declare function removeEnvPrefix<TEnv extends DotenvParseOutput | string>(env: TEnv): TReturned<TEnv>;
|
|
175
|
+
declare function formatEnvField(key: string): string;
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/helpers/template-helpers.d.ts
|
|
178
|
+
/**
|
|
179
|
+
* Creates the reflection data used when generating runtime template files.
|
|
180
|
+
*
|
|
181
|
+
* @param context - The context for the configuration plugin.
|
|
182
|
+
* @param name - The name of the configuration template.
|
|
183
|
+
* @returns The reflection for the specified configuration template.
|
|
184
|
+
*/
|
|
185
|
+
declare function createTemplateReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
|
|
186
|
+
//#endregion
|
|
14
187
|
//#region src/index.d.ts
|
|
15
188
|
/**
|
|
16
189
|
* A Powerlines plugin to inject environment variables into the source code.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,21 +1,194 @@
|
|
|
1
|
-
import { EnvDocs } from "./
|
|
2
|
-
import { Plugin } from "./
|
|
3
|
-
import
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import "
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import "
|
|
17
|
-
import "./types/index.mjs";
|
|
1
|
+
import { t as EnvDocs } from "./docs-5r844zC1.mjs";
|
|
2
|
+
import { d as Plugin, n as EnvironmentResolvedConfig, o as DeclareBabelTransformPluginReturn, s as Context, u as UnresolvedContext } from "./resolved-V5COsfDu.mjs";
|
|
3
|
+
import "./components-8W0Zgj0y.mjs";
|
|
4
|
+
import { i as __ΩEnvBuiltinProps, n as EnvBuiltinProps, r as EnvTypeDefinition, t as EnvBuiltin } from "./env-zhzvpUI5.mjs";
|
|
5
|
+
import "./index-Cc7fCJU9.mjs";
|
|
6
|
+
import { a as EnvType, c as __ΩEnvPluginResolvedConfig, i as EnvPluginUserConfig, l as __ΩEnvPluginUserConfig, n as EnvPluginOptions, o as __ΩEnvPluginContext, r as EnvPluginResolvedConfig, s as __ΩEnvPluginOptions, t as EnvPluginContext, u as __ΩEnvType } from "./plugin-BaInAuAh.mjs";
|
|
7
|
+
import { i as __ΩSecretsInterface, n as SecretsInterface, r as __ΩEnvInterface, t as EnvInterface } from "./runtime-qZ0Z2kEd.mjs";
|
|
8
|
+
import "./index-BXxhKmeA.mjs";
|
|
9
|
+
import { ReflectionClass, TypeClass, TypeObjectLiteral } from "@powerlines/deepkit/vendor/type";
|
|
10
|
+
import * as _alloy_js_core4 from "@alloy-js/core";
|
|
11
|
+
import { DotenvParseOutput } from "@stryke/env/types";
|
|
12
|
+
import "@stryke/capnp";
|
|
13
|
+
import { MaybePromise } from "@stryke/types/base";
|
|
14
|
+
import { TypeDefinition } from "@stryke/types/configuration";
|
|
15
|
+
import { UnpluginOptions } from "unplugin";
|
|
16
|
+
import { ArrayValues } from "@stryke/types/array";
|
|
18
17
|
|
|
18
|
+
//#region src/babel/plugin.d.ts
|
|
19
|
+
declare const envBabelPlugin: DeclareBabelTransformPluginReturn<EnvPluginContext<EnvPluginResolvedConfig>, Record<string, any>>;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/helpers/create-reflection-resource.d.ts
|
|
22
|
+
/**
|
|
23
|
+
* Creates a reflection resource for the environment configuration.
|
|
24
|
+
*
|
|
25
|
+
* @param context - The environment plugin context.
|
|
26
|
+
* @returns A resource that provides the reflection of the environment configuration.
|
|
27
|
+
*/
|
|
28
|
+
declare function createReflectionResource(context?: EnvPluginContext): _alloy_js_core4.Resource<ReflectionClass<Record<string, any>>>;
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/helpers/load.d.ts
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves various dotenv configuration parameters from the context.
|
|
33
|
+
*
|
|
34
|
+
* @param context - The context to retrieve the dotenv configuration from.
|
|
35
|
+
* @param parsed - The parsed dotenv configuration.
|
|
36
|
+
* @returns An object containing the dotenv configuration.
|
|
37
|
+
*/
|
|
38
|
+
declare function loadEnvFromContext(context: EnvPluginContext, parsed: DotenvParseOutput): {
|
|
39
|
+
APP_NAME: string | undefined;
|
|
40
|
+
APP_VERSION: string | undefined;
|
|
41
|
+
BUILD_ID: string;
|
|
42
|
+
BUILD_TIMESTAMP: string;
|
|
43
|
+
BUILD_CHECKSUM: string;
|
|
44
|
+
RELEASE_ID: string;
|
|
45
|
+
RELEASE_TAG: string;
|
|
46
|
+
DEFAULT_LOCALE: string | undefined;
|
|
47
|
+
DEFAULT_TIMEZONE: string | undefined;
|
|
48
|
+
LOG_LEVEL: "error" | "warn" | "info" | "debug" | "trace" | null;
|
|
49
|
+
ERROR_URL: string | undefined;
|
|
50
|
+
ORGANIZATION: string | undefined;
|
|
51
|
+
PLATFORM: "node" | "browser" | "neutral" | undefined;
|
|
52
|
+
MODE: "test" | "development" | "production" | undefined;
|
|
53
|
+
DEBUG: boolean;
|
|
54
|
+
STACKTRACE: boolean;
|
|
55
|
+
ENVIRONMENT: EnvironmentResolvedConfig;
|
|
56
|
+
};
|
|
57
|
+
declare function loadEnv<TEnv extends DotenvParseOutput = DotenvParseOutput>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv>;
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/helpers/persistence.d.ts
|
|
60
|
+
/**
|
|
61
|
+
* Resolves the runtime type definition file for the environment variables.
|
|
62
|
+
*
|
|
63
|
+
* @param context - The plugin context.
|
|
64
|
+
* @returns The runtime type definition file for the environment variables.
|
|
65
|
+
*/
|
|
66
|
+
declare function resolveRuntimeTypeFile(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<string>;
|
|
67
|
+
/**
|
|
68
|
+
* Gets the default type definition for the environment variables.
|
|
69
|
+
*
|
|
70
|
+
* @param context - The plugin context.
|
|
71
|
+
* @returns The default type definition for the environment variables.
|
|
72
|
+
*/
|
|
73
|
+
declare function getEnvDefaultTypeDefinition(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<TypeDefinition>;
|
|
74
|
+
/** Gets the default type definition for the environment secrets.
|
|
75
|
+
*
|
|
76
|
+
* @param context - The plugin context.
|
|
77
|
+
* @returns The default type definition for the environment secrets.
|
|
78
|
+
*/
|
|
79
|
+
declare function getSecretsDefaultTypeDefinition(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<TypeDefinition>;
|
|
80
|
+
/**
|
|
81
|
+
* Gets the path to the environment type reflections.
|
|
82
|
+
*
|
|
83
|
+
* @param context - The plugin context.
|
|
84
|
+
* @param name - The name of the type reflections.
|
|
85
|
+
* @returns The path to the environment type reflections.
|
|
86
|
+
*/
|
|
87
|
+
declare function getEnvTypeReflectionsPath(context: Context<EnvPluginResolvedConfig>, name?: EnvType): string;
|
|
88
|
+
/**
|
|
89
|
+
* Reads the environment type reflection from the file system.
|
|
90
|
+
*
|
|
91
|
+
* @param context - The plugin context.
|
|
92
|
+
* @param name - The name of the type reflections.
|
|
93
|
+
* @returns The environment type reflection.
|
|
94
|
+
*/
|
|
95
|
+
declare function readEnvTypeReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
|
|
96
|
+
/**
|
|
97
|
+
* Writes the environment type reflection to the file system.
|
|
98
|
+
*
|
|
99
|
+
* @param context - The plugin context.
|
|
100
|
+
* @param reflection - The environment type reflection to write.
|
|
101
|
+
* @param name - The name of the type reflections.
|
|
102
|
+
*/
|
|
103
|
+
declare function writeEnvTypeReflection(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): Promise<void>;
|
|
104
|
+
declare function getEnvReflectionsPath(context: EnvPluginContext, name: EnvType): string;
|
|
105
|
+
/**
|
|
106
|
+
* Reads the environment reflection data from the file system.
|
|
107
|
+
*
|
|
108
|
+
* @param context - The plugin context.
|
|
109
|
+
* @returns The environment reflection data.
|
|
110
|
+
*/
|
|
111
|
+
declare function readEnvReflection(context: EnvPluginContext): Promise<ReflectionClass<any>>;
|
|
112
|
+
/**
|
|
113
|
+
* Reads the secret environment reflection data from the file system.
|
|
114
|
+
*
|
|
115
|
+
* @param context - The plugin context.
|
|
116
|
+
* @returns The environment reflection data.
|
|
117
|
+
*/
|
|
118
|
+
declare function readSecretsReflection(context: EnvPluginContext): Promise<ReflectionClass<any>>;
|
|
119
|
+
/**
|
|
120
|
+
* Writes the environment reflection data to the file system.
|
|
121
|
+
*
|
|
122
|
+
* @param context - The plugin context.
|
|
123
|
+
* @param reflection - The reflection data to write.
|
|
124
|
+
* @param name - The name of the reflection (either "env" or "secrets").
|
|
125
|
+
*/
|
|
126
|
+
declare function writeEnvReflection(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): Promise<void>;
|
|
127
|
+
/**
|
|
128
|
+
* Writes the environment reflection data to the file system.
|
|
129
|
+
*
|
|
130
|
+
* @param context - The plugin context.
|
|
131
|
+
* @param reflection - The reflection data to write.
|
|
132
|
+
* @param name - The name of the reflection (either "env" or "secrets").
|
|
133
|
+
*/
|
|
134
|
+
declare function writeEnvReflectionSync(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): void;
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region src/helpers/reflect.d.ts
|
|
137
|
+
declare function mergeEnvReflections(context: EnvPluginContext, reflections: ReflectionClass<any>[]): ReflectionClass<any>;
|
|
138
|
+
declare function mergeSecretsReflections(context: EnvPluginContext, reflections: ReflectionClass<any>[]): ReflectionClass<any>;
|
|
139
|
+
interface CreateEnvReflectionOptions {
|
|
140
|
+
type?: TypeObjectLiteral | TypeClass;
|
|
141
|
+
superReflection?: ReflectionClass<any>;
|
|
142
|
+
}
|
|
143
|
+
declare class BaseEnv implements EnvInterface {
|
|
144
|
+
APP_NAME: string;
|
|
145
|
+
APP_VERSION: string;
|
|
146
|
+
BUILD_ID: string;
|
|
147
|
+
BUILD_TIMESTAMP: string;
|
|
148
|
+
BUILD_CHECKSUM: string;
|
|
149
|
+
RELEASE_ID: string;
|
|
150
|
+
RELEASE_TAG: string;
|
|
151
|
+
ORGANIZATION: string;
|
|
152
|
+
PLATFORM: "node" | "browser" | "neutral";
|
|
153
|
+
MODE: "development" | "test" | "production";
|
|
154
|
+
ENVIRONMENT: string;
|
|
155
|
+
DEBUG: boolean;
|
|
156
|
+
TEST: boolean;
|
|
157
|
+
MINIMAL: boolean;
|
|
158
|
+
NO_COLOR: boolean;
|
|
159
|
+
FORCE_COLOR: number | boolean;
|
|
160
|
+
FORCE_HYPERLINK: number | boolean;
|
|
161
|
+
STACKTRACE: boolean;
|
|
162
|
+
INCLUDE_ERROR_DATA: boolean;
|
|
163
|
+
ERROR_URL: string;
|
|
164
|
+
DEFAULT_TIMEZONE: string;
|
|
165
|
+
DEFAULT_LOCALE: string;
|
|
166
|
+
CI: boolean;
|
|
167
|
+
}
|
|
168
|
+
declare class BaseSecrets implements SecretsInterface {
|
|
169
|
+
ENCRYPTION_KEY: string;
|
|
170
|
+
}
|
|
171
|
+
declare function createEnvReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): ReflectionClass<any>;
|
|
172
|
+
declare function createSecretsReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): ReflectionClass<any>;
|
|
173
|
+
declare function reflectEnv(context: EnvPluginContext, file?: string, name?: string): Promise<ReflectionClass<any>>;
|
|
174
|
+
declare function reflectSecrets(context: EnvPluginContext, file?: string, name?: string): Promise<ReflectionClass<any>>;
|
|
175
|
+
declare type __ΩCreateEnvReflectionOptions = any[];
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/helpers/source-file-env.d.ts
|
|
178
|
+
type TReturned<TEnv> = TEnv extends string ? string : DotenvParseOutput;
|
|
179
|
+
declare function removeEnvPrefix<TEnv extends DotenvParseOutput | string>(env: TEnv): TReturned<TEnv>;
|
|
180
|
+
declare function formatEnvField(key: string): string;
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region src/helpers/template-helpers.d.ts
|
|
183
|
+
/**
|
|
184
|
+
* Creates the reflection data used when generating runtime template files.
|
|
185
|
+
*
|
|
186
|
+
* @param context - The context for the configuration plugin.
|
|
187
|
+
* @param name - The name of the configuration template.
|
|
188
|
+
* @returns The reflection for the specified configuration template.
|
|
189
|
+
*/
|
|
190
|
+
declare function createTemplateReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
|
|
191
|
+
//#endregion
|
|
19
192
|
//#region src/index.d.ts
|
|
20
193
|
/**
|
|
21
194
|
* A Powerlines plugin to inject environment variables into the source code.
|