@powerlines/plugin-env 0.16.240 → 0.16.250

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.
Files changed (50) hide show
  1. package/dist/babel/plugin.cjs +8 -10
  2. package/dist/babel/plugin.d.cts.map +1 -1
  3. package/dist/babel/plugin.d.mts.map +1 -1
  4. package/dist/babel/plugin.mjs +9 -10
  5. package/dist/babel/plugin.mjs.map +1 -1
  6. package/dist/components/docs.cjs +14 -11
  7. package/dist/components/docs.d.cts.map +1 -1
  8. package/dist/components/docs.d.mts.map +1 -1
  9. package/dist/components/docs.mjs +15 -11
  10. package/dist/components/docs.mjs.map +1 -1
  11. package/dist/components/env-builtin.cjs +19 -22
  12. package/dist/components/env-builtin.d.cts.map +1 -1
  13. package/dist/components/env-builtin.d.mts.map +1 -1
  14. package/dist/components/env-builtin.mjs +19 -21
  15. package/dist/components/env-builtin.mjs.map +1 -1
  16. package/dist/helpers/automd-generator.cjs +0 -1
  17. package/dist/helpers/index.cjs +2 -4
  18. package/dist/helpers/index.d.cts +2 -2
  19. package/dist/helpers/index.d.mts +2 -2
  20. package/dist/helpers/index.mjs +2 -2
  21. package/dist/helpers/load.cjs +1 -1
  22. package/dist/helpers/load.d.cts +3 -3
  23. package/dist/helpers/load.d.mts +3 -3
  24. package/dist/helpers/load.mjs +1 -1
  25. package/dist/helpers/load.mjs.map +1 -1
  26. package/dist/helpers/schema.cjs +24 -75
  27. package/dist/helpers/schema.d.cts +2 -16
  28. package/dist/helpers/schema.d.cts.map +1 -1
  29. package/dist/helpers/schema.d.mts +2 -16
  30. package/dist/helpers/schema.d.mts.map +1 -1
  31. package/dist/helpers/schema.mjs +25 -74
  32. package/dist/helpers/schema.mjs.map +1 -1
  33. package/dist/helpers/source-file-env.cjs +0 -1
  34. package/dist/index.cjs +3 -3
  35. package/dist/index.d.cts +2 -2
  36. package/dist/index.d.mts +2 -2
  37. package/dist/index.mjs +5 -5
  38. package/dist/index.mjs.map +1 -1
  39. package/dist/types/index.cjs +1 -1
  40. package/dist/types/index.d.cts +2 -2
  41. package/dist/types/index.d.mts +2 -2
  42. package/dist/types/index.mjs +2 -2
  43. package/dist/types/plugin.cjs +12 -14
  44. package/dist/types/plugin.d.cts +14 -8
  45. package/dist/types/plugin.d.cts.map +1 -1
  46. package/dist/types/plugin.d.mts +14 -8
  47. package/dist/types/plugin.d.mts.map +1 -1
  48. package/dist/types/plugin.mjs +12 -14
  49. package/dist/types/plugin.mjs.map +1 -1
  50. package/package.json +11 -11
@@ -1,6 +1,6 @@
1
1
  import { DotenvParseOutput } from "@stryke/env/types";
2
- import { ObjectSchema, SchemaInput, SchemaMetadata } from "@powerlines/schema";
3
2
  import { Children } from "@alloy-js/core";
3
+ import { JsonSchema, Schema, SchemaInput } from "@powerlines/schema";
4
4
  import { AutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
5
5
  import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types";
6
6
  import { RequiredKeys } from "@stryke/types";
@@ -87,14 +87,20 @@ type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {
87
87
  };
88
88
  };
89
89
  /**
90
- * The schema for the environment variables or secrets used by the project and expected to be injected into the source code (if {@link EnvPluginOptions.inject} is true). This schema extends the base {@link ObjectSchema} with additional metadata specific to environment variables, including an `active` property that lists the environment variables or secrets that are currently active and should be injected during the build process.
90
+ * The schema for environment variables and secrets used by the plugin.
91
+ *
92
+ * @remarks
93
+ * This schema is the result of parsing the type definitions provided in the {@link EnvPluginOptions.vars} 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.
91
94
  */
92
- interface EnvSchema<TMetadata extends Partial<SchemaMetadata> = Partial<SchemaMetadata>> extends ObjectSchema<TMetadata> {
95
+ type Env<T extends Record<string, any> = Record<string, any>> = JsonSchema<T> & {
93
96
  /**
94
- * The active environment variables or secrets that are used by the project and are expected to be injected into the source code (if {@link EnvPluginOptions.inject} is true).
97
+ * An indicator specifying whether or not this environment variable or secret is active and should be injected during the build process.
98
+ *
99
+ * @remarks
100
+ * This value is determined during the build process based on the loaded environment variables and secrets, and is used to filter which variables are actually injected into the source code when the {@link EnvPluginOptions.inject} option is enabled.
95
101
  */
96
102
  active: string[];
97
- }
103
+ };
98
104
  interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig> {
99
105
  env: {
100
106
  /**
@@ -103,14 +109,14 @@ interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = Env
103
109
  * @remarks
104
110
  * This value is parsed from the {@link EnvPluginOptions.vars} option.
105
111
  */
106
- vars: EnvSchema;
112
+ vars: Schema<Env>;
107
113
  /**
108
114
  * The type definition for the expected env secret parameters
109
115
  *
110
116
  * @remarks
111
117
  * This value is parsed from the {@link EnvPluginOptions.secrets} option.
112
118
  */
113
- secrets: EnvSchema;
119
+ secrets: Schema<Env>;
114
120
  /**
115
121
  * The parsed .env configuration object
116
122
  *
@@ -128,5 +134,5 @@ interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = Env
128
134
  };
129
135
  }
130
136
  //#endregion
131
- export { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvSchema, EnvType };
137
+ export { Env, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType };
132
138
  //# sourceMappingURL=plugin.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;KAmCY,OAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA;EAFxB;;;EAMV,IAAA,GAAO,WAAA;EANU;AAEnB;;EASE,OAAA,GAAU,WAAA;EATwB;;;;;;EAiBlC,MAAA;EAsC4B;;;;;EA/B5B,MAAA;EAfA;;;;;EAsBA,QAAA;EAQgB;;;;;;EAAhB,aAAA,GAAgB,QAAA;EAmBN;;;;;;EAXV,KAAA,GAAQ,kBAAA;EAYa;AAAA;AAGvB;;;;EAPE,MAAA,GAAS,mBAAA;AAAA;AAAA,KAGC,mBAAA,GAAsB,qBAAA;EAChC,GAAA,EAAK,gBAAgB;AAAA;AAAA,KAGX,uBAAA,GAA0B,yBAAA;EACpC,GAAA,EAAK,QAAA,CAAS,IAAA,CAAK,mBAAA,wBACjB,YAAA,CAAa,gBAAA;IAFqB;;;;;;IAShC,MAAA;IAAA;;;;AAgBM;AAOZ;IAfM,QAAA;IAeoB;;;;;;IAPpB,MAAA;EAAA;AAAA;;;;UAOW,SAAA,mBACG,OAAA,CAAQ,cAAA,IAAkB,OAAA,CAAQ,cAAA,WAC5C,YAAA,CAAa,SAAA;EAD+B;;;EAKpD,MAAA;AAAA;AAAA,UAGe,gBAAA,yBACS,uBAAA,GAA0B,uBAAA,UAC1C,kBAAA,CAAmB,eAAA;EAC3B,GAAA;IAH+B;;;;;;IAU7B,IAAA,EAAM,SAAA;IAgBE;;;;;;IARR,OAAA,EAAS,SAAA;IAhBH;;;;;;IAwBN,MAAA,EAAQ,iBAAA;IAAR;;;;AAQQ;;IAAR,QAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;;;KA+BY,OAAA;AAAA,KAEA,gBAAA,GAAmB,IAAA,CAAK,mBAAA;EAFxB;;;EAMV,IAAA,GAAO,WAAA;EANU;AAEnB;;EASE,OAAA,GAAU,WAAA;EATwB;;;;;;EAiBlC,MAAA;EAsC4B;;;;;EA/B5B,MAAA;EAfA;;;;;EAsBA,QAAA;EAQgB;;;;;;EAAhB,aAAA,GAAgB,QAAA;EAmBN;;;;;;EAXV,KAAA,GAAQ,kBAAA;EAYa;AAAA;AAGvB;;;;EAPE,MAAA,GAAS,mBAAA;AAAA;AAAA,KAGC,mBAAA,GAAsB,qBAAA;EAChC,GAAA,EAAK,gBAAgB;AAAA;AAAA,KAGX,uBAAA,GAA0B,yBAAA;EACpC,GAAA,EAAK,QAAA,CAAS,IAAA,CAAK,mBAAA,wBACjB,YAAA,CAAa,gBAAA;IAFqB;;;;;;IAShC,MAAA;IAAA;;;;AAgBM;AAUZ;IAlBM,QAAA;IAkBS;;;;;;IAVT,MAAA;EAAA;AAAA;;;;;;AAkBI;KARE,GAAA,WAAc,MAAA,gBAAsB,MAAA,iBAC9C,UAAA,CAAW,CAAA;EAUoB;;;;;;EAH7B,MAAA;AAAA;AAAA,UAGa,gBAAA,yBACS,uBAAA,GAA0B,uBAAA,UAC1C,kBAAA,CAAmB,eAAA;EAC3B,GAAA;IADQ;;;;;;IAQN,IAAA,EAAM,MAAA,CAAO,GAAA;IARY;;;;;;IAgBzB,OAAA,EAAS,MAAA,CAAO,GAAA;IAAA;;;;;AAgBR;IARR,MAAA,EAAQ,iBAAA;;;;;;;IAQR,QAAA;EAAA;AAAA"}
@@ -18,10 +18,11 @@ const __ΩPick = [
18
18
  "Pick",
19
19
  "l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
20
20
  ];
21
- const __ΩPartial = [
21
+ const __ΩRecord = [
22
+ "K",
22
23
  "T",
23
- "Partial",
24
- "l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
24
+ "Record",
25
+ "l'e#\"Rb!b\"Pde\"!N#!w#y"
25
26
  ];
26
27
  const __ΩExclude = [
27
28
  "T",
@@ -79,22 +80,19 @@ const __ΩEnvPluginResolvedConfig = [
79
80
  "EnvPluginResolvedConfig",
80
81
  "P!PP!.#o\"#o!\"!P)4$?%)4&?'&F4(?)MK4*MKw+y"
81
82
  ];
82
- const __ΩEnvSchema = [
83
- () => __ΩPartial,
84
- "TMetadata",
83
+ const __ΩEnv = [
84
+ () => __ΩRecord,
85
+ "T",
85
86
  "active",
86
- "The active environment variables or secrets that are used by the project and are expected to be injected into the source code (if {@link EnvPluginOptions.inject} is true).",
87
- "The schema for the environment variables or secrets used by the project and expected to be injected into the source code (if {@link EnvPluginOptions.inject} is true). This schema extends the base {@link ObjectSchema} with additional metadata specific to environment variables, including an `active` property that lists the environment variables or secrets that are currently active and should be injected during the build process.",
88
- "EnvSchema",
89
- "!o!\"c\"P!&F4#?$M?%w&y"
87
+ "An indicator specifying whether or not this environment variable or secret is active and should be injected during the build process.",
88
+ "Env",
89
+ "&\"o!#c\"P!P&F4#?$MKw%y"
90
90
  ];
91
91
  const __ΩEnvPluginContext = [
92
92
  () => __ΩEnvPluginResolvedConfig,
93
93
  "TResolvedConfig",
94
- () => __ΩEnvSchema,
95
94
  "vars",
96
95
  "The type definition for the expected env variable parameters",
97
- () => __ΩEnvSchema,
98
96
  "secrets",
99
97
  "The type definition for the expected env secret parameters",
100
98
  "parsed",
@@ -103,9 +101,9 @@ const __ΩEnvPluginContext = [
103
101
  "The injected environment variables and secrets reflection",
104
102
  "env",
105
103
  "EnvPluginContext",
106
- "n!c\"P!Pn#4$?%n&4'?(!4)?*&F4+?,M4-Mw.y"
104
+ "n!c\"P!P!4#?$!4%?&!4'?(&F4)?*M4+Mw,y"
107
105
  ];
108
106
 
109
107
  //#endregion
110
- export { __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvSchema, __ΩEnvType };
108
+ export { __ΩEnv, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType };
111
109
  //# sourceMappingURL=plugin.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Children } from \"@alloy-js/core\";\nimport { AutoMDPluginOptions } from \"@powerlines/plugin-automd/types/plugin\";\nimport {\n BabelPluginContext,\n BabelPluginOptions,\n BabelPluginResolvedConfig,\n BabelPluginUserConfig\n} from \"@powerlines/plugin-babel/types\";\nimport type {\n ObjectSchema,\n SchemaInput,\n SchemaMetadata\n} from \"@powerlines/schema\";\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport { RequiredKeys } from \"@stryke/types\";\nimport { DotenvConfiguration } from \"@stryke/types/configuration\";\n\nexport type EnvType = \"env\" | \"secrets\";\n\nexport type EnvPluginOptions = Omit<DotenvConfiguration, \"types\"> & {\n /**\n * A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigConfiguration\"`.\n */\n vars?: SchemaInput;\n\n /**\n * A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigSecrets\"`.\n */\n secrets?: SchemaInput;\n\n /**\n * An additional prefix (or list of additional prefixes) to apply to the environment variables\n *\n * @remarks\n * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.\n */\n prefix?: string | string[];\n\n /**\n * Should the plugin inject the env variables in the source code with their values?\n *\n * @defaultValue false\n */\n inject?: boolean;\n\n /**\n * Should the plugin validate the loaded environment variables against the provided type definitions?\n *\n * @defaultValue false\n */\n validate?: boolean;\n\n /**\n * The default configuration to use when loading environment variables.\n *\n * @remarks\n * 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.\n */\n defaultConfig?: Children;\n\n /**\n * Babel configuration options to use when injecting environment variables into the source code.\n *\n * @remarks\n * 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.\n */\n babel?: BabelPluginOptions;\n\n /**\n * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.\n *\n * @remarks\n * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.\n */\n automd?: AutoMDPluginOptions;\n};\n\nexport type EnvPluginUserConfig = BabelPluginUserConfig & {\n env: EnvPluginOptions;\n};\n\nexport type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {\n env: Required<Pick<DotenvConfiguration, \"additionalFiles\">> &\n RequiredKeys<EnvPluginOptions, \"vars\" | \"secrets\" | \"defaultConfig\"> & {\n /**\n * Should the plugin inject the env variables in the source code with their values?\n *\n * @remarks\n * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.\n */\n inject: boolean;\n\n /**\n * Should the plugin validate the loaded environment variables against the provided type definitions?\n *\n * @remarks\n * This value is the result of reflecting the {@link EnvPluginOptions.validate} option.\n */\n validate: boolean;\n\n /**\n * The prefix used for environment variables\n *\n * @remarks\n * This value is used to filter environment variables that are loaded from the .env file and the process environment.\n */\n prefix: string[];\n };\n};\n\n/**\n * The schema for the environment variables or secrets used by the project and expected to be injected into the source code (if {@link EnvPluginOptions.inject} is true). This schema extends the base {@link ObjectSchema} with additional metadata specific to environment variables, including an `active` property that lists the environment variables or secrets that are currently active and should be injected during the build process.\n */\nexport interface EnvSchema<\n TMetadata extends Partial<SchemaMetadata> = Partial<SchemaMetadata>\n> extends ObjectSchema<TMetadata> {\n /**\n * The active environment variables or secrets that are used by the project and are expected to be injected into the source code (if {@link EnvPluginOptions.inject} is true).\n */\n active: string[];\n}\n\nexport interface EnvPluginContext<\n TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig\n> extends BabelPluginContext<TResolvedConfig> {\n env: {\n /**\n * The type definition for the expected env variable parameters\n *\n * @remarks\n * This value is parsed from the {@link EnvPluginOptions.vars} option.\n */\n vars: EnvSchema;\n\n /**\n * The type definition for the expected env secret parameters\n *\n * @remarks\n * This value is parsed from the {@link EnvPluginOptions.secrets} option.\n */\n secrets: EnvSchema;\n\n /**\n * The parsed .env configuration object\n *\n * @remarks\n * 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}\n */\n parsed: DotenvParseOutput;\n\n /**\n * The injected environment variables and secrets reflection\n *\n * @remarks\n * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.\n */\n injected: string[];\n };\n}\n"],"mappings":";AAAA,MAAM,UAAU;CAAC;CAAK;OAAW;OAAe;CAAY;CAAQ;AAAC;;;;;;AAErE,MAAM,UAAU;CAAC;CAAI;CAAM;CAAQ;AAAG;;;;;;AAEtC,MAAM,aAAS;CAAA;CAAS;CAAG;CAAY;AAAoB;AAC3D,MAAI,aAAc;CAAA;CAAM;CAAc;CAAW;AAAK;AAEtD,MAAK,sBAAuB;OAAG;CAAa;CAAK;CAAS;CAAmB;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAAA;AAE7E,MAAC,yBAA0B;OAAQ;CAAc;CAAA;CAAA;AAAA;AAEjD,MAAC,6BAAkC;OAAK;OAAkB;CAAS;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAAA"}
1
+ {"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Children } from \"@alloy-js/core\";\nimport { AutoMDPluginOptions } from \"@powerlines/plugin-automd/types/plugin\";\nimport {\n BabelPluginContext,\n BabelPluginOptions,\n BabelPluginResolvedConfig,\n BabelPluginUserConfig\n} from \"@powerlines/plugin-babel/types\";\nimport type { JsonSchema, Schema, SchemaInput } from \"@powerlines/schema\";\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport { RequiredKeys } from \"@stryke/types\";\nimport { DotenvConfiguration } from \"@stryke/types/configuration\";\n\nexport type EnvType = \"env\" | \"secrets\";\n\nexport type EnvPluginOptions = Omit<DotenvConfiguration, \"types\"> & {\n /**\n * A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigConfiguration\"`.\n */\n vars?: SchemaInput;\n\n /**\n * A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigSecrets\"`.\n */\n secrets?: SchemaInput;\n\n /**\n * An additional prefix (or list of additional prefixes) to apply to the environment variables\n *\n * @remarks\n * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.\n */\n prefix?: string | string[];\n\n /**\n * Should the plugin inject the env variables in the source code with their values?\n *\n * @defaultValue false\n */\n inject?: boolean;\n\n /**\n * Should the plugin validate the loaded environment variables against the provided type definitions?\n *\n * @defaultValue false\n */\n validate?: boolean;\n\n /**\n * The default configuration to use when loading environment variables.\n *\n * @remarks\n * 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.\n */\n defaultConfig?: Children;\n\n /**\n * Babel configuration options to use when injecting environment variables into the source code.\n *\n * @remarks\n * 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.\n */\n babel?: BabelPluginOptions;\n\n /**\n * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.\n *\n * @remarks\n * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.\n */\n automd?: AutoMDPluginOptions;\n};\n\nexport type EnvPluginUserConfig = BabelPluginUserConfig & {\n env: EnvPluginOptions;\n};\n\nexport type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {\n env: Required<Pick<DotenvConfiguration, \"additionalFiles\">> &\n RequiredKeys<EnvPluginOptions, \"vars\" | \"secrets\" | \"defaultConfig\"> & {\n /**\n * Should the plugin inject the env variables in the source code with their values?\n *\n * @remarks\n * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.\n */\n inject: boolean;\n\n /**\n * Should the plugin validate the loaded environment variables against the provided type definitions?\n *\n * @remarks\n * This value is the result of reflecting the {@link EnvPluginOptions.validate} option.\n */\n validate: boolean;\n\n /**\n * The prefix used for environment variables\n *\n * @remarks\n * This value is used to filter environment variables that are loaded from the .env file and the process environment.\n */\n prefix: string[];\n };\n};\n\n/**\n * The schema for environment variables and secrets used by the plugin.\n *\n * @remarks\n * This schema is the result of parsing the type definitions provided in the {@link EnvPluginOptions.vars} 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.\n */\nexport type Env<T extends Record<string, any> = Record<string, any>> =\n JsonSchema<T> & {\n /**\n * An indicator specifying whether or not this environment variable or secret is active and should be injected during the build process.\n *\n * @remarks\n * This value is determined during the build process based on the loaded environment variables and secrets, and is used to filter which variables are actually injected into the source code when the {@link EnvPluginOptions.inject} option is enabled.\n */\n active: string[];\n };\n\nexport interface EnvPluginContext<\n TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig\n> extends BabelPluginContext<TResolvedConfig> {\n env: {\n /**\n * The type definition for the expected env variable parameters\n *\n * @remarks\n * This value is parsed from the {@link EnvPluginOptions.vars} option.\n */\n vars: Schema<Env>;\n\n /**\n * The type definition for the expected env secret parameters\n *\n * @remarks\n * This value is parsed from the {@link EnvPluginOptions.secrets} option.\n */\n secrets: Schema<Env>;\n\n /**\n * The parsed .env configuration object\n *\n * @remarks\n * 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}\n */\n parsed: DotenvParseOutput;\n\n /**\n * The injected environment variables and secrets reflection\n *\n * @remarks\n * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.\n */\n injected: string[];\n };\n}\n"],"mappings":";AAAA,MAAM,UAAU;CAAC;CAAK;OAAW;OAAe;CAAY;CAAQ;AAAC;;;;;;AAErE,MAAM,UAAU;CAAC;CAAI;CAAM;CAAQ;AAAG;;;;;;;AAEtC,MAAM,aAAS;CAAA;CAAS;CAAG;CAAY;AAAoB;AAC3D,MAAI,aAAc;CAAA;CAAM;CAAc;CAAW;AAAK;AAEtD,MAAK,sBAAuB;OAAG;CAAa;CAAK;CAAS;CAAmB;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAAA;AAE7E,MAAC,yBAA0B;OAAQ;CAAc;CAAA;CAAA;AAAA;AAEjD,MAAC,6BAAkC;OAAK;OAAkB;CAAS;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-env",
3
- "version": "0.16.240",
3
+ "version": "0.16.250",
4
4
  "private": false,
5
5
  "description": "A package containing a Powerlines plugin for injecting static .env configuration values to the code so that they're accessible at runtime.",
6
6
  "keywords": ["dotenv", "powerlines", "storm-software", "powerlines-plugin"],
@@ -107,13 +107,13 @@
107
107
  "@alloy-js/typescript": "^0.23.0",
108
108
  "@babel/core": "8.0.0-rc.5",
109
109
  "@babel/types": "8.0.0-rc.5",
110
- "@powerlines/core": "^0.15.24",
111
- "@powerlines/plugin-alloy": "^0.26.132",
112
- "@powerlines/plugin-automd": "^0.1.508",
113
- "@powerlines/plugin-babel": "^0.13.43",
114
- "@powerlines/plugin-plugin": "^0.12.459",
115
- "@powerlines/schema": "^0.11.27",
116
- "@storm-software/config-tools": "^1.190.20",
110
+ "@powerlines/core": "0.48.1",
111
+ "@powerlines/plugin-alloy": "0.26.142",
112
+ "@powerlines/plugin-automd": "0.1.518",
113
+ "@powerlines/plugin-babel": "0.13.53",
114
+ "@powerlines/plugin-plugin": "0.12.469",
115
+ "@powerlines/schema": "0.11.37",
116
+ "@storm-software/config-tools": "^1.190.26",
117
117
  "@stryke/capnp": "^0.12.102",
118
118
  "@stryke/convert": "^0.7.7",
119
119
  "@stryke/env": "^0.20.93",
@@ -127,9 +127,9 @@
127
127
  "automd": "^0.4.3",
128
128
  "c12": "^3.3.4",
129
129
  "defu": "^6.1.7",
130
- "powerlines": "^0.47.47"
130
+ "powerlines": "0.47.57"
131
131
  },
132
- "devDependencies": { "@types/node": "^25.9.0", "vite": "^8.0.13" },
132
+ "devDependencies": { "@types/node": "^25.9.1", "vite": "^8.0.13" },
133
133
  "publishConfig": { "access": "public" },
134
- "gitHead": "fa8c4ae579471be5f678883ecb35d00ea17c29ba"
134
+ "gitHead": "75742ad041aeb54cee4e6f8d1f2daa413b4d9787"
135
135
  }