@powerlines/plugin-env 0.16.416 → 0.16.418
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/babel/plugin.d.cts +2 -2
- package/dist/babel/plugin.d.mts +2 -2
- package/dist/env-C6HnpNy5.d.cts +230 -0
- package/dist/env-C6HnpNy5.d.cts.map +1 -0
- package/dist/env-C6HnpNy5.d.mts +230 -0
- package/dist/env-C6HnpNy5.d.mts.map +1 -0
- package/dist/helpers/load.cjs +2 -2
- package/dist/helpers/load.d.cts +1 -1
- package/dist/helpers/load.d.mts +1 -1
- package/dist/helpers/schema.d.cts +1 -1
- package/dist/helpers/schema.d.mts +1 -1
- package/dist/index-BTF5i_WR.d.cts +1 -0
- package/dist/index-CqmZxgBO.d.mts +17 -0
- package/dist/index-CqmZxgBO.d.mts.map +1 -0
- package/dist/index-N_SMJR7p.d.cts +17 -0
- package/dist/index-N_SMJR7p.d.cts.map +1 -0
- package/dist/index-hhwceVTM.d.mts +1 -0
- package/dist/index.cjs +5 -4
- package/dist/index.d.cts +4 -17
- package/dist/index.d.mts +4 -17
- package/dist/index.mjs +1 -0
- package/dist/plugin-BkPUgX5Z.d.cts +137 -0
- package/dist/plugin-BkPUgX5Z.d.cts.map +1 -0
- package/dist/plugin-DaVohK06.d.mts +137 -0
- package/dist/plugin-DaVohK06.d.mts.map +1 -0
- package/dist/{_virtual/_rolldown/runtime.cjs → rolldown-runtime-C24Yb2bl.cjs} +6 -1
- package/dist/schemas/env.cjs +2 -2
- package/dist/schemas/env.d.cts +2 -230
- package/dist/schemas/env.d.mts +2 -230
- package/dist/schemas/index.d.cts +1 -1
- package/dist/schemas/index.d.mts +1 -1
- package/dist/types/index.d.cts +2 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/plugin.d.cts +2 -137
- package/dist/types/plugin.d.mts +2 -137
- package/package.json +10 -10
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/schemas/env.d.cts.map +0 -1
- package/dist/schemas/env.d.mts.map +0 -1
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts.map +0 -1
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { Children } from "@alloy-js/core";
|
|
2
|
+
import { JsonSchemaObject, SchemaConfig, SchemaEnvelope } from "@power-plant/schema";
|
|
3
|
+
import { AutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
|
|
4
|
+
import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types";
|
|
5
|
+
import { DotenvParseOutput } from "@stryke/env/types";
|
|
6
|
+
import { RequiredKeys } from "@stryke/types";
|
|
7
|
+
import { DotenvConfiguration } from "@stryke/types/configuration";
|
|
8
|
+
//#region src/types/plugin.d.ts
|
|
9
|
+
type EnvType = "env" | "secrets";
|
|
10
|
+
type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
|
|
11
|
+
/**
|
|
12
|
+
* A path to the schema for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the schema export to use separated by a `":"` or `"#"` character. For example: `"./src/schemas/env.ts#envSchema"`.
|
|
13
|
+
*/
|
|
14
|
+
config?: SchemaConfig;
|
|
15
|
+
/**
|
|
16
|
+
* A path to the schema for the expected env secret parameters. This value can include both a path to the typescript file and the name of the schema export to use separated by a `":"` or `"#"` character. For example: `"./src/schemas/env.ts#secretsSchema"`.
|
|
17
|
+
*/
|
|
18
|
+
secrets?: SchemaConfig;
|
|
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
|
+
* @defaultValue false
|
|
30
|
+
*/
|
|
31
|
+
inject?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Should the plugin validate the loaded environment variables against the provided type definitions?
|
|
34
|
+
*
|
|
35
|
+
* @defaultValue false
|
|
36
|
+
*/
|
|
37
|
+
validate?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The default configuration to use when loading environment variables.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* 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.
|
|
43
|
+
*/
|
|
44
|
+
defaultConfig?: Children;
|
|
45
|
+
/**
|
|
46
|
+
* Babel configuration options to use when injecting environment variables into the source code.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* 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.
|
|
50
|
+
*/
|
|
51
|
+
babel?: BabelPluginOptions;
|
|
52
|
+
/**
|
|
53
|
+
* AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
|
|
57
|
+
*/
|
|
58
|
+
automd?: AutoMDPluginOptions;
|
|
59
|
+
};
|
|
60
|
+
type EnvPluginUserConfig = BabelPluginUserConfig & {
|
|
61
|
+
env: EnvPluginOptions;
|
|
62
|
+
};
|
|
63
|
+
type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {
|
|
64
|
+
env: Required<Pick<DotenvConfiguration, "additionalFiles">> & RequiredKeys<EnvPluginOptions, "config" | "secrets" | "defaultConfig"> & {
|
|
65
|
+
/**
|
|
66
|
+
* Should the plugin inject the env variables in the source code with their values?
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
|
|
70
|
+
*/
|
|
71
|
+
inject: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Should the plugin validate the loaded environment variables against the provided type definitions?
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
* This value is the result of reflecting the {@link EnvPluginOptions.validate} option.
|
|
77
|
+
*/
|
|
78
|
+
validate: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* The prefix used for environment variables
|
|
81
|
+
*
|
|
82
|
+
* @remarks
|
|
83
|
+
* This value is used to filter environment variables that are loaded from the .env file and the process environment.
|
|
84
|
+
*/
|
|
85
|
+
prefix: string[];
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* The schema for environment variables and secrets used by the plugin.
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* This schema is the result of parsing the type definitions provided in the {@link EnvPluginOptions.config} and {@link EnvPluginOptions.secrets} options, and is used to validate the loaded environment variables and secrets, as well as to determine which variables should be injected into the source code when the {@link EnvPluginOptions.inject} option is enabled.
|
|
93
|
+
*/
|
|
94
|
+
type EnvSchema = SchemaEnvelope<JsonSchemaObject> & {
|
|
95
|
+
/**
|
|
96
|
+
* The list of active environment variables or secrets that should be injected into the source code when the {@link EnvPluginOptions.inject} option is enabled. This list is determined by filtering the properties defined in the schema based on the provided prefix and any additional filtering criteria defined in the type definition, such as an `active` property.
|
|
97
|
+
*
|
|
98
|
+
* @remarks
|
|
99
|
+
* If the type definition includes an `active` property for each environment variable or secret, this list will be determined by including only the variables or secrets that have `active` set to `true`. If the type definition does not include an `active` property, all variables or secrets defined in the schema that match the provided prefix will be included in this list.
|
|
100
|
+
*/
|
|
101
|
+
active: string[];
|
|
102
|
+
};
|
|
103
|
+
interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig> {
|
|
104
|
+
env: {
|
|
105
|
+
/**
|
|
106
|
+
* The type definition for the expected env variable parameters
|
|
107
|
+
*
|
|
108
|
+
* @remarks
|
|
109
|
+
* This value is parsed from the {@link EnvPluginOptions.config} option.
|
|
110
|
+
*/
|
|
111
|
+
config: EnvSchema;
|
|
112
|
+
/**
|
|
113
|
+
* The type definition for the expected env secret parameters
|
|
114
|
+
*
|
|
115
|
+
* @remarks
|
|
116
|
+
* This value is parsed from the {@link EnvPluginOptions.secrets} option.
|
|
117
|
+
*/
|
|
118
|
+
secrets: EnvSchema;
|
|
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: string[];
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
136
|
+
export { EnvSchema as a, EnvPluginUserConfig as i, EnvPluginOptions as n, EnvType as o, EnvPluginResolvedConfig as r, EnvPluginContext as t };
|
|
137
|
+
//# sourceMappingURL=plugin-BkPUgX5Z.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-BkPUgX5Z.d.cts","names":[],"sources":["../src/types/plugin.ts"],"mappings":";;;;;;;;KAmCY;KAEA,mBAAmB,KAAK;;;;EAIlC,SAAS;;;;EAKT,UAAU;;;;;;;EAQV;;;;;;EAOA;;;;;;EAOA;;;;;;;EAQA,gBAAgB;;;;;;;EAQhB,QAAQ;;;;;;;EAQR,SAAS;;KAGC,sBAAsB;EAChC,KAAK;;KAGK,0BAA0B;EACpC,KAAK,SAAS,KAAK,2CACjB,aAAa;;;;;;;IAOX;;;;;;;IAQA;;;;;;;IAQA;;;;;;;;;KAUM,YAAY,eAAe;;;;;;;EAOrC;;UAGe,iBACf,wBAAwB,0BAA0B,iCAC1C,mBAAmB;EAC3B;;;;;;;IAOE,QAAQ;;;;;;;IAQR,SAAS;;;;;;;IAQT,QAAQ;;;;;;;IAQR"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { DotenvParseOutput } from "@stryke/env/types";
|
|
2
|
+
import { JsonSchemaObject, SchemaConfig, SchemaEnvelope } from "@power-plant/schema";
|
|
3
|
+
import { Children } from "@alloy-js/core";
|
|
4
|
+
import { AutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
|
|
5
|
+
import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types";
|
|
6
|
+
import { RequiredKeys } from "@stryke/types";
|
|
7
|
+
import { DotenvConfiguration } from "@stryke/types/configuration";
|
|
8
|
+
//#region src/types/plugin.d.ts
|
|
9
|
+
type EnvType = "env" | "secrets";
|
|
10
|
+
type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
|
|
11
|
+
/**
|
|
12
|
+
* A path to the schema for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the schema export to use separated by a `":"` or `"#"` character. For example: `"./src/schemas/env.ts#envSchema"`.
|
|
13
|
+
*/
|
|
14
|
+
config?: SchemaConfig;
|
|
15
|
+
/**
|
|
16
|
+
* A path to the schema for the expected env secret parameters. This value can include both a path to the typescript file and the name of the schema export to use separated by a `":"` or `"#"` character. For example: `"./src/schemas/env.ts#secretsSchema"`.
|
|
17
|
+
*/
|
|
18
|
+
secrets?: SchemaConfig;
|
|
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
|
+
* @defaultValue false
|
|
30
|
+
*/
|
|
31
|
+
inject?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Should the plugin validate the loaded environment variables against the provided type definitions?
|
|
34
|
+
*
|
|
35
|
+
* @defaultValue false
|
|
36
|
+
*/
|
|
37
|
+
validate?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The default configuration to use when loading environment variables.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* 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.
|
|
43
|
+
*/
|
|
44
|
+
defaultConfig?: Children;
|
|
45
|
+
/**
|
|
46
|
+
* Babel configuration options to use when injecting environment variables into the source code.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* 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.
|
|
50
|
+
*/
|
|
51
|
+
babel?: BabelPluginOptions;
|
|
52
|
+
/**
|
|
53
|
+
* AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
|
|
57
|
+
*/
|
|
58
|
+
automd?: AutoMDPluginOptions;
|
|
59
|
+
};
|
|
60
|
+
type EnvPluginUserConfig = BabelPluginUserConfig & {
|
|
61
|
+
env: EnvPluginOptions;
|
|
62
|
+
};
|
|
63
|
+
type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {
|
|
64
|
+
env: Required<Pick<DotenvConfiguration, "additionalFiles">> & RequiredKeys<EnvPluginOptions, "config" | "secrets" | "defaultConfig"> & {
|
|
65
|
+
/**
|
|
66
|
+
* Should the plugin inject the env variables in the source code with their values?
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
|
|
70
|
+
*/
|
|
71
|
+
inject: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Should the plugin validate the loaded environment variables against the provided type definitions?
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
* This value is the result of reflecting the {@link EnvPluginOptions.validate} option.
|
|
77
|
+
*/
|
|
78
|
+
validate: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* The prefix used for environment variables
|
|
81
|
+
*
|
|
82
|
+
* @remarks
|
|
83
|
+
* This value is used to filter environment variables that are loaded from the .env file and the process environment.
|
|
84
|
+
*/
|
|
85
|
+
prefix: string[];
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* The schema for environment variables and secrets used by the plugin.
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* This schema is the result of parsing the type definitions provided in the {@link EnvPluginOptions.config} and {@link EnvPluginOptions.secrets} options, and is used to validate the loaded environment variables and secrets, as well as to determine which variables should be injected into the source code when the {@link EnvPluginOptions.inject} option is enabled.
|
|
93
|
+
*/
|
|
94
|
+
type EnvSchema = SchemaEnvelope<JsonSchemaObject> & {
|
|
95
|
+
/**
|
|
96
|
+
* The list of active environment variables or secrets that should be injected into the source code when the {@link EnvPluginOptions.inject} option is enabled. This list is determined by filtering the properties defined in the schema based on the provided prefix and any additional filtering criteria defined in the type definition, such as an `active` property.
|
|
97
|
+
*
|
|
98
|
+
* @remarks
|
|
99
|
+
* If the type definition includes an `active` property for each environment variable or secret, this list will be determined by including only the variables or secrets that have `active` set to `true`. If the type definition does not include an `active` property, all variables or secrets defined in the schema that match the provided prefix will be included in this list.
|
|
100
|
+
*/
|
|
101
|
+
active: string[];
|
|
102
|
+
};
|
|
103
|
+
interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig> {
|
|
104
|
+
env: {
|
|
105
|
+
/**
|
|
106
|
+
* The type definition for the expected env variable parameters
|
|
107
|
+
*
|
|
108
|
+
* @remarks
|
|
109
|
+
* This value is parsed from the {@link EnvPluginOptions.config} option.
|
|
110
|
+
*/
|
|
111
|
+
config: EnvSchema;
|
|
112
|
+
/**
|
|
113
|
+
* The type definition for the expected env secret parameters
|
|
114
|
+
*
|
|
115
|
+
* @remarks
|
|
116
|
+
* This value is parsed from the {@link EnvPluginOptions.secrets} option.
|
|
117
|
+
*/
|
|
118
|
+
secrets: EnvSchema;
|
|
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: string[];
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
136
|
+
export { EnvSchema as a, EnvPluginUserConfig as i, EnvPluginOptions as n, EnvType as o, EnvPluginResolvedConfig as r, EnvPluginContext as t };
|
|
137
|
+
//# sourceMappingURL=plugin-DaVohK06.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-DaVohK06.d.mts","names":[],"sources":["../src/types/plugin.ts"],"mappings":""}
|
|
@@ -25,4 +25,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
|
-
exports
|
|
28
|
+
Object.defineProperty(exports, '__toESM', {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () {
|
|
31
|
+
return __toESM;
|
|
32
|
+
}
|
|
33
|
+
});
|
package/dist/schemas/env.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
2
|
+
const require_rolldown_runtime = require('../rolldown-runtime-C24Yb2bl.cjs');
|
|
3
3
|
let zod = require("zod");
|
|
4
|
-
zod =
|
|
4
|
+
zod = require_rolldown_runtime.__toESM(zod, 1);
|
|
5
5
|
|
|
6
6
|
//#region src/schemas/env.ts
|
|
7
7
|
/**
|
package/dist/schemas/env.d.cts
CHANGED
|
@@ -1,230 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
declare module "zod" {
|
|
4
|
-
interface GlobalMeta {
|
|
5
|
-
/**
|
|
6
|
-
* Alternate environment variable names that map to this field.
|
|
7
|
-
*/
|
|
8
|
-
alias?: string[];
|
|
9
|
-
/**
|
|
10
|
-
* Platform category this parameter targets (`neutral` or `node`).
|
|
11
|
-
*/
|
|
12
|
-
category?: "browser" | "neutral" | "node";
|
|
13
|
-
/**
|
|
14
|
-
* Documented default value for the environment variable.
|
|
15
|
-
*/
|
|
16
|
-
defaultValue?: string | number | boolean | null;
|
|
17
|
-
/**
|
|
18
|
-
* Whether the value is treated as read-only / build-time.
|
|
19
|
-
*/
|
|
20
|
-
readonly?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Whether the value is resolved at runtime rather than injected at build time.
|
|
23
|
-
*/
|
|
24
|
-
runtime?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Whether the field should be hidden from generated documentation.
|
|
27
|
-
*/
|
|
28
|
-
hidden?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Related reference URLs.
|
|
31
|
-
*/
|
|
32
|
-
see?: string[];
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Runtime environment the application may execute in.
|
|
37
|
-
*/
|
|
38
|
-
declare const RuntimeSchema: z.ZodEnum<{
|
|
39
|
-
deno: "deno";
|
|
40
|
-
browser: "browser";
|
|
41
|
-
nodejs: "nodejs";
|
|
42
|
-
workerd: "workerd";
|
|
43
|
-
}>;
|
|
44
|
-
type Runtime = z.infer<typeof RuntimeSchema>;
|
|
45
|
-
/**
|
|
46
|
-
* Platform the application was built for.
|
|
47
|
-
*/
|
|
48
|
-
declare const PlatformSchema: z.ZodEnum<{
|
|
49
|
-
node: "node";
|
|
50
|
-
browser: "browser";
|
|
51
|
-
neutral: "neutral";
|
|
52
|
-
}>;
|
|
53
|
-
type Platform = z.infer<typeof PlatformSchema>;
|
|
54
|
-
/**
|
|
55
|
-
* Application run mode.
|
|
56
|
-
*/
|
|
57
|
-
declare const ModeSchema: z.ZodEnum<{
|
|
58
|
-
test: "test";
|
|
59
|
-
development: "development";
|
|
60
|
-
production: "production";
|
|
61
|
-
}>;
|
|
62
|
-
type Mode = z.infer<typeof ModeSchema>;
|
|
63
|
-
/**
|
|
64
|
-
* Lowest log level the logger will accept.
|
|
65
|
-
*/
|
|
66
|
-
declare const LogLevelSchema: z.ZodEnum<{
|
|
67
|
-
error: "error";
|
|
68
|
-
warn: "warn";
|
|
69
|
-
info: "info";
|
|
70
|
-
debug: "debug";
|
|
71
|
-
}>;
|
|
72
|
-
type LogLevel = z.infer<typeof LogLevelSchema>;
|
|
73
|
-
/**
|
|
74
|
-
* Value that may be a boolean flag or a numeric color/hyperlink force level.
|
|
75
|
-
*/
|
|
76
|
-
declare const BooleanOrNumberSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber]>;
|
|
77
|
-
type BooleanOrNumber = z.infer<typeof BooleanOrNumberSchema>;
|
|
78
|
-
/**
|
|
79
|
-
* Zod schema for the base environment configuration used by Powerlines applications.
|
|
80
|
-
*
|
|
81
|
-
* @remarks
|
|
82
|
-
* Defaults match documented `@defaultValue` metadata on each field.
|
|
83
|
-
*/
|
|
84
|
-
declare const envSchema: z.ZodObject<{
|
|
85
|
-
APP_NAME: z.ZodString;
|
|
86
|
-
APP_VERSION: z.ZodDefault<z.ZodString>;
|
|
87
|
-
BUILD_ID: z.ZodString;
|
|
88
|
-
BUILD_TIMESTAMP: z.ZodString;
|
|
89
|
-
BUILD_CHECKSUM: z.ZodString;
|
|
90
|
-
RELEASE_ID: z.ZodString;
|
|
91
|
-
RELEASE_TAG: z.ZodString;
|
|
92
|
-
ORGANIZATION: z.ZodString;
|
|
93
|
-
RUNTIME: z.ZodOptional<z.ZodEnum<{
|
|
94
|
-
deno: "deno";
|
|
95
|
-
browser: "browser";
|
|
96
|
-
nodejs: "nodejs";
|
|
97
|
-
workerd: "workerd";
|
|
98
|
-
}>>;
|
|
99
|
-
PLATFORM: z.ZodDefault<z.ZodEnum<{
|
|
100
|
-
node: "node";
|
|
101
|
-
browser: "browser";
|
|
102
|
-
neutral: "neutral";
|
|
103
|
-
}>>;
|
|
104
|
-
MODE: z.ZodDefault<z.ZodEnum<{
|
|
105
|
-
test: "test";
|
|
106
|
-
development: "development";
|
|
107
|
-
production: "production";
|
|
108
|
-
}>>;
|
|
109
|
-
ENVIRONMENT: z.ZodDefault<z.ZodString>;
|
|
110
|
-
DEBUG: z.ZodBoolean;
|
|
111
|
-
TEST: z.ZodBoolean;
|
|
112
|
-
MINIMAL: z.ZodBoolean;
|
|
113
|
-
NO_COLOR: z.ZodBoolean;
|
|
114
|
-
FORCE_COLOR: z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber]>;
|
|
115
|
-
FORCE_HYPERLINK: z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber]>;
|
|
116
|
-
AGENT_NAME: z.ZodOptional<z.ZodString>;
|
|
117
|
-
COLORTERM: z.ZodOptional<z.ZodString>;
|
|
118
|
-
TERM: z.ZodOptional<z.ZodString>;
|
|
119
|
-
TERM_PROGRAM: z.ZodOptional<z.ZodString>;
|
|
120
|
-
TERM_PROGRAM_VERSION: z.ZodOptional<z.ZodString>;
|
|
121
|
-
TERMINAL_EMULATOR: z.ZodOptional<z.ZodString>;
|
|
122
|
-
WT_SESSION: z.ZodOptional<z.ZodString>;
|
|
123
|
-
TERMINUS_SUBLIME: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
-
ConEmuTask: z.ZodOptional<z.ZodString>;
|
|
125
|
-
CURSOR_TRACE_ID: z.ZodOptional<z.ZodString>;
|
|
126
|
-
VTE_VERSION: z.ZodOptional<z.ZodString>;
|
|
127
|
-
STACKTRACE: z.ZodBoolean;
|
|
128
|
-
INCLUDE_ERROR_DATA: z.ZodBoolean;
|
|
129
|
-
ERROR_URL: z.ZodOptional<z.ZodString>;
|
|
130
|
-
DEFAULT_TIMEZONE: z.ZodDefault<z.ZodString>;
|
|
131
|
-
DEFAULT_LOCALE: z.ZodDefault<z.ZodString>;
|
|
132
|
-
LOG_LEVEL: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
|
|
133
|
-
error: "error";
|
|
134
|
-
warn: "warn";
|
|
135
|
-
info: "info";
|
|
136
|
-
debug: "debug";
|
|
137
|
-
}>>>;
|
|
138
|
-
CI: z.ZodBoolean;
|
|
139
|
-
RUN_ID: z.ZodOptional<z.ZodString>;
|
|
140
|
-
AGOLA_GIT_REF: z.ZodOptional<z.ZodString>;
|
|
141
|
-
AC_APPCIRCLE: z.ZodOptional<z.ZodString>;
|
|
142
|
-
APPVEYOR: z.ZodOptional<z.ZodString>;
|
|
143
|
-
CODEBUILD: z.ZodOptional<z.ZodString>;
|
|
144
|
-
TF_BUILD: z.ZodOptional<z.ZodString>;
|
|
145
|
-
bamboo_planKey: z.ZodOptional<z.ZodString>;
|
|
146
|
-
BITBUCKET_COMMIT: z.ZodOptional<z.ZodString>;
|
|
147
|
-
BITRISE_IO: z.ZodOptional<z.ZodString>;
|
|
148
|
-
BUDDY_WORKSPACE_ID: z.ZodOptional<z.ZodString>;
|
|
149
|
-
BUILDKITE: z.ZodOptional<z.ZodString>;
|
|
150
|
-
CIRCLECI: z.ZodOptional<z.ZodString>;
|
|
151
|
-
CIRRUS_CI: z.ZodOptional<z.ZodString>;
|
|
152
|
-
CF_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
153
|
-
CM_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
154
|
-
CI_NAME: z.ZodOptional<z.ZodString>;
|
|
155
|
-
DRONE: z.ZodOptional<z.ZodString>;
|
|
156
|
-
DSARI: z.ZodOptional<z.ZodString>;
|
|
157
|
-
EARTHLY_CI: z.ZodOptional<z.ZodString>;
|
|
158
|
-
EAS_BUILD: z.ZodOptional<z.ZodString>;
|
|
159
|
-
GERRIT_PROJECT: z.ZodOptional<z.ZodString>;
|
|
160
|
-
GITEA_ACTIONS: z.ZodOptional<z.ZodString>;
|
|
161
|
-
GITHUB_ACTIONS: z.ZodOptional<z.ZodString>;
|
|
162
|
-
GITLAB_CI: z.ZodOptional<z.ZodString>;
|
|
163
|
-
GOCD: z.ZodOptional<z.ZodString>;
|
|
164
|
-
BUILDER_OUTPUT: z.ZodOptional<z.ZodString>;
|
|
165
|
-
HARNESS_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
166
|
-
JENKINS_URL: z.ZodOptional<z.ZodString>;
|
|
167
|
-
LAYERCI: z.ZodOptional<z.ZodString>;
|
|
168
|
-
MAGNUM: z.ZodOptional<z.ZodString>;
|
|
169
|
-
NETLIFY: z.ZodOptional<z.ZodString>;
|
|
170
|
-
NEVERCODE: z.ZodOptional<z.ZodString>;
|
|
171
|
-
PROW_JOB_ID: z.ZodOptional<z.ZodString>;
|
|
172
|
-
RELEASE_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
173
|
-
RENDER: z.ZodOptional<z.ZodString>;
|
|
174
|
-
SAILCI: z.ZodOptional<z.ZodString>;
|
|
175
|
-
HUDSON: z.ZodOptional<z.ZodString>;
|
|
176
|
-
SCREWDRIVER: z.ZodOptional<z.ZodString>;
|
|
177
|
-
SEMAPHORE: z.ZodOptional<z.ZodString>;
|
|
178
|
-
SOURCEHUT: z.ZodOptional<z.ZodString>;
|
|
179
|
-
SPACESHIP_CI: z.ZodOptional<z.ZodString>;
|
|
180
|
-
STRIDER: z.ZodOptional<z.ZodString>;
|
|
181
|
-
TASK_ID: z.ZodOptional<z.ZodString>;
|
|
182
|
-
TEAMCITY_VERSION: z.ZodOptional<z.ZodString>;
|
|
183
|
-
TRAVIS: z.ZodOptional<z.ZodString>;
|
|
184
|
-
VELA: z.ZodOptional<z.ZodString>;
|
|
185
|
-
NOW_BUILDER: z.ZodOptional<z.ZodString>;
|
|
186
|
-
APPCENTER_BUILD_ID: z.ZodOptional<z.ZodString>;
|
|
187
|
-
CI_XCODE_PROJECT: z.ZodOptional<z.ZodString>;
|
|
188
|
-
XCS: z.ZodOptional<z.ZodString>;
|
|
189
|
-
DATA_DIR: z.ZodOptional<z.ZodString>;
|
|
190
|
-
CONFIG_DIR: z.ZodOptional<z.ZodString>;
|
|
191
|
-
CACHE_DIR: z.ZodOptional<z.ZodString>;
|
|
192
|
-
LOG_DIR: z.ZodOptional<z.ZodString>;
|
|
193
|
-
TEMP_DIR: z.ZodOptional<z.ZodString>;
|
|
194
|
-
LOCALAPPDATA: z.ZodOptional<z.ZodString>;
|
|
195
|
-
APPDATA: z.ZodOptional<z.ZodString>;
|
|
196
|
-
XDG_DATA_HOME: z.ZodOptional<z.ZodString>;
|
|
197
|
-
XDG_CONFIG_HOME: z.ZodOptional<z.ZodString>;
|
|
198
|
-
XDG_CACHE_HOME: z.ZodOptional<z.ZodString>;
|
|
199
|
-
XDG_STATE_HOME: z.ZodOptional<z.ZodString>;
|
|
200
|
-
XDG_RUNTIME_DIR: z.ZodOptional<z.ZodString>;
|
|
201
|
-
DEVENV_RUNTIME: z.ZodOptional<z.ZodString>;
|
|
202
|
-
}, z.core.$strip>;
|
|
203
|
-
/**
|
|
204
|
-
* Inferred environment configuration type from {@link envSchema}.
|
|
205
|
-
*/
|
|
206
|
-
type Env = z.infer<typeof envSchema>;
|
|
207
|
-
/**
|
|
208
|
-
* Input type for {@link envSchema} before defaults applied.
|
|
209
|
-
*/
|
|
210
|
-
type EnvInput = z.input<typeof envSchema>;
|
|
211
|
-
/**
|
|
212
|
-
* Zod schema for the base secrets configuration used by Powerlines applications.
|
|
213
|
-
*
|
|
214
|
-
* @remarks
|
|
215
|
-
* Secrets have no defaults and must stay confidential (excluded from the client).
|
|
216
|
-
*/
|
|
217
|
-
declare const secretsSchema: z.ZodObject<{
|
|
218
|
-
ENCRYPTION_KEY: z.ZodString;
|
|
219
|
-
}, z.core.$strip>;
|
|
220
|
-
/**
|
|
221
|
-
* Inferred secrets configuration type from {@link secretsSchema}.
|
|
222
|
-
*/
|
|
223
|
-
type Secrets = z.infer<typeof secretsSchema>;
|
|
224
|
-
/**
|
|
225
|
-
* Input type for {@link secretsSchema}.
|
|
226
|
-
*/
|
|
227
|
-
type SecretsInput = z.input<typeof secretsSchema>;
|
|
228
|
-
//#endregion
|
|
229
|
-
export { BooleanOrNumber, BooleanOrNumberSchema, Env, EnvInput, LogLevel, LogLevelSchema, Mode, ModeSchema, Platform, PlatformSchema, Runtime, RuntimeSchema, Secrets, SecretsInput, envSchema, secretsSchema };
|
|
230
|
-
//# sourceMappingURL=env.d.cts.map
|
|
1
|
+
import { a as LogLevel, c as ModeSchema, d as Runtime, f as RuntimeSchema, g as secretsSchema, h as envSchema, i as EnvInput, l as Platform, m as SecretsInput, n as BooleanOrNumberSchema, o as LogLevelSchema, p as Secrets, r as Env, s as Mode, t as BooleanOrNumber, u as PlatformSchema } from "../env-C6HnpNy5.cjs";
|
|
2
|
+
export { BooleanOrNumber, BooleanOrNumberSchema, Env, EnvInput, LogLevel, LogLevelSchema, Mode, ModeSchema, Platform, PlatformSchema, Runtime, RuntimeSchema, Secrets, SecretsInput, envSchema, secretsSchema };
|