@powerlines/plugin-env 0.15.90 → 0.15.92

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/index.cjs CHANGED
@@ -25,7 +25,6 @@ let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type"
25
25
  let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
26
26
  let __stryke_env_types = require("@stryke/env/types");
27
27
  let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
28
- let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
29
28
  let __powerlines_plugin_alloy = require("@powerlines/plugin-alloy");
30
29
  __powerlines_plugin_alloy = require_rolldown_runtime.__toESM(__powerlines_plugin_alloy);
31
30
  let __powerlines_plugin_automd = require("@powerlines/plugin-automd");
@@ -47,7 +46,7 @@ const plugin = (options = {}) => {
47
46
  {
48
47
  name: "env",
49
48
  async config() {
50
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `env` build plugin.");
49
+ this.debug("Providing default configuration for the Powerlines `env` build plugin.");
51
50
  const config = {
52
51
  env: require_defu.defu(options, {
53
52
  types: {},
@@ -57,7 +56,7 @@ const plugin = (options = {}) => {
57
56
  };
58
57
  if (config.env.types) config.env.types = require_parse_type_definition.parseTypeDefinition(config.env.types);
59
58
  else {
60
- this.log(__storm_software_config_tools_types.LogLevelLabel.WARN, "The `env.types` configuration parameter was not provided. Please ensure this is expected.");
59
+ this.warn("The `env.types` configuration parameter was not provided. Please ensure this is expected.");
61
60
  const envDefaultTypeDefinition = await require_helpers_persistence.getEnvDefaultTypeDefinition(this);
62
61
  config.env.types = require_parse_type_definition.parseTypeDefinition(`${envDefaultTypeDefinition.file}#${envDefaultTypeDefinition.name}`);
63
62
  }
@@ -82,7 +81,7 @@ const plugin = (options = {}) => {
82
81
  return config;
83
82
  },
84
83
  async configResolved() {
85
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Environment plugin configuration has been resolved for the Powerlines project.`);
84
+ this.debug(`Environment plugin configuration has been resolved for the Powerlines project.`);
86
85
  this.env = require_defu.defu({ parsed: await require_helpers_load.loadEnv(this, this.config.env) }, this.env ?? {}, {
87
86
  types: { env: {} },
88
87
  used: {
@@ -93,7 +92,7 @@ const plugin = (options = {}) => {
93
92
  injected: {}
94
93
  });
95
94
  if (this.config.command !== "prepare" && this.persistedMeta?.checksum === this.meta.checksum && (0, __stryke_fs_exists.existsSync)(require_helpers_persistence.getEnvTypeReflectionsPath(this, "env"))) {
96
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Skipping reflection initialization as the meta checksum has not changed.`);
95
+ this.debug(`Skipping reflection initialization as the meta checksum has not changed.`);
97
96
  this.env.types.env = await require_helpers_persistence.readEnvTypeReflection(this, "env");
98
97
  if ((0, __stryke_fs_exists.existsSync)(require_helpers_persistence.getEnvReflectionsPath(this, "env"))) this.env.used.env = await require_helpers_persistence.readEnvReflection(this);
99
98
  if ((0, __stryke_fs_exists.existsSync)(require_helpers_persistence.getEnvTypeReflectionsPath(this, "secrets"))) this.env.types.secrets = await require_helpers_persistence.readEnvTypeReflection(this, "secrets");
@@ -105,7 +104,7 @@ const plugin = (options = {}) => {
105
104
  this.env.types.secrets = await require_helpers_reflect.reflectSecrets(this, this.config.env.secrets?.file ? require_is_parent_path.isParentPath(this.config.env.secrets?.file, this.workspaceConfig.workspaceRoot) ? this.config.env.secrets?.file : require_join_paths.joinPaths(this.config.projectRoot, this.config.env.secrets?.file) : void 0, this.config.env.secrets?.name);
106
105
  if (!this.env.types.secrets) throw new Error("Failed to find the secrets configuration type reflection in the context.");
107
106
  await require_helpers_persistence.writeEnvTypeReflection(this, this.env.types.secrets, "secrets");
108
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Resolved ${this.env.types.env.getProperties().length ?? 0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length ?? 0} secret configuration parameters`);
107
+ this.debug(`Resolved ${this.env.types.env.getProperties().length ?? 0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length ?? 0} secret configuration parameters`);
109
108
  const envWithAlias = this.env.types.env.getProperties().filter((prop) => prop.getAlias().length > 0);
110
109
  Object.entries(await require_helpers_load.loadEnv(this, this.config.env)).forEach(([key, value]) => {
111
110
  const unprefixedKey = this.config.env.prefix.reduce((ret, prefix) => {
@@ -136,18 +135,18 @@ const plugin = (options = {}) => {
136
135
  },
137
136
  async prepare() {
138
137
  const _self$ = this;
139
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Preparing the Environment runtime artifacts for the Powerlines project.`);
138
+ this.debug(`Preparing the Environment runtime artifacts for the Powerlines project.`);
140
139
  return this.render((0, __alloy_js_core_jsx_runtime.createComponent)(require_components_env.EnvBuiltin, { get defaultConfig() {
141
140
  return _self$.config.env.defaultConfig;
142
141
  } }));
143
142
  },
144
143
  async docs() {
145
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, "Writing Environment documentation for the Powerlines project artifacts.");
144
+ this.debug("Writing Environment documentation for the Powerlines project artifacts.");
146
145
  const outputPath = require_join_paths.joinPaths(this.config.projectRoot, "docs", "generated");
147
146
  if (!(0, __stryke_fs_exists.existsSync)(outputPath)) await (0, __stryke_fs_helpers.createDirectory)(outputPath);
148
147
  const reflection = await require_helpers_persistence.readEnvTypeReflection(this, "env");
149
148
  const envDocFile = require_join_paths.joinPaths(outputPath, "env.md");
150
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Documenting environment variables configuration in "${envDocFile}"`);
149
+ this.debug(`Documenting environment variables configuration in "${envDocFile}"`);
151
150
  await this.fs.write(envDocFile, `<!-- Generated by ${(0, __stryke_string_format_title_case.titleCase)(this.config.framework) || "Powerlines"} -->
152
151
 
153
152
  Below is a list of environment variables used by the [${this.packageJson.name}](https://www.npmjs.com/package/${this.packageJson.name}) package. These values can be updated in the \`.env\` file in the root of the project. The variables in the list below are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.
@@ -161,7 +160,7 @@ ${reflection.getProperties().filter((property) => property.getNameAsString() !==
161
160
  },
162
161
  async buildEnd() {
163
162
  const reflectionPath = require_helpers_persistence.getEnvReflectionsPath(this, "env");
164
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Writing env reflection types to ${reflectionPath}.`);
163
+ this.debug(`Writing env reflection types to ${reflectionPath}.`);
165
164
  await require_helpers_persistence.writeEnvReflection(this, this.env.used.env, "env");
166
165
  }
167
166
  },
package/dist/index.mjs CHANGED
@@ -23,7 +23,6 @@ import { ReflectionClass, ReflectionKind, stringifyType } from "@powerlines/deep
23
23
  import { titleCase } from "@stryke/string-format/title-case";
24
24
  import { ENV_PREFIXES } from "@stryke/env/types";
25
25
  import { createComponent } from "@alloy-js/core/jsx-runtime";
26
- import { LogLevelLabel } from "@storm-software/config-tools/types";
27
26
  import alloy from "@powerlines/plugin-alloy";
28
27
  import automd from "@powerlines/plugin-automd";
29
28
  import babel from "@powerlines/plugin-babel";
@@ -42,7 +41,7 @@ const plugin = (options = {}) => {
42
41
  {
43
42
  name: "env",
44
43
  async config() {
45
- this.log(LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `env` build plugin.");
44
+ this.debug("Providing default configuration for the Powerlines `env` build plugin.");
46
45
  const config = {
47
46
  env: defu(options, {
48
47
  types: {},
@@ -52,7 +51,7 @@ const plugin = (options = {}) => {
52
51
  };
53
52
  if (config.env.types) config.env.types = parseTypeDefinition(config.env.types);
54
53
  else {
55
- this.log(LogLevelLabel.WARN, "The `env.types` configuration parameter was not provided. Please ensure this is expected.");
54
+ this.warn("The `env.types` configuration parameter was not provided. Please ensure this is expected.");
56
55
  const envDefaultTypeDefinition = await getEnvDefaultTypeDefinition(this);
57
56
  config.env.types = parseTypeDefinition(`${envDefaultTypeDefinition.file}#${envDefaultTypeDefinition.name}`);
58
57
  }
@@ -77,7 +76,7 @@ const plugin = (options = {}) => {
77
76
  return config;
78
77
  },
79
78
  async configResolved() {
80
- this.log(LogLevelLabel.TRACE, `Environment plugin configuration has been resolved for the Powerlines project.`);
79
+ this.debug(`Environment plugin configuration has been resolved for the Powerlines project.`);
81
80
  this.env = defu({ parsed: await loadEnv(this, this.config.env) }, this.env ?? {}, {
82
81
  types: { env: {} },
83
82
  used: {
@@ -88,7 +87,7 @@ const plugin = (options = {}) => {
88
87
  injected: {}
89
88
  });
90
89
  if (this.config.command !== "prepare" && this.persistedMeta?.checksum === this.meta.checksum && existsSync(getEnvTypeReflectionsPath(this, "env"))) {
91
- this.log(LogLevelLabel.TRACE, `Skipping reflection initialization as the meta checksum has not changed.`);
90
+ this.debug(`Skipping reflection initialization as the meta checksum has not changed.`);
92
91
  this.env.types.env = await readEnvTypeReflection(this, "env");
93
92
  if (existsSync(getEnvReflectionsPath(this, "env"))) this.env.used.env = await readEnvReflection(this);
94
93
  if (existsSync(getEnvTypeReflectionsPath(this, "secrets"))) this.env.types.secrets = await readEnvTypeReflection(this, "secrets");
@@ -100,7 +99,7 @@ const plugin = (options = {}) => {
100
99
  this.env.types.secrets = await reflectSecrets(this, this.config.env.secrets?.file ? isParentPath(this.config.env.secrets?.file, this.workspaceConfig.workspaceRoot) ? this.config.env.secrets?.file : joinPaths(this.config.projectRoot, this.config.env.secrets?.file) : void 0, this.config.env.secrets?.name);
101
100
  if (!this.env.types.secrets) throw new Error("Failed to find the secrets configuration type reflection in the context.");
102
101
  await writeEnvTypeReflection(this, this.env.types.secrets, "secrets");
103
- this.log(LogLevelLabel.TRACE, `Resolved ${this.env.types.env.getProperties().length ?? 0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length ?? 0} secret configuration parameters`);
102
+ this.debug(`Resolved ${this.env.types.env.getProperties().length ?? 0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length ?? 0} secret configuration parameters`);
104
103
  const envWithAlias = this.env.types.env.getProperties().filter((prop) => prop.getAlias().length > 0);
105
104
  Object.entries(await loadEnv(this, this.config.env)).forEach(([key, value]) => {
106
105
  const unprefixedKey = this.config.env.prefix.reduce((ret, prefix) => {
@@ -131,18 +130,18 @@ const plugin = (options = {}) => {
131
130
  },
132
131
  async prepare() {
133
132
  const _self$ = this;
134
- this.log(LogLevelLabel.TRACE, `Preparing the Environment runtime artifacts for the Powerlines project.`);
133
+ this.debug(`Preparing the Environment runtime artifacts for the Powerlines project.`);
135
134
  return this.render(createComponent(EnvBuiltin, { get defaultConfig() {
136
135
  return _self$.config.env.defaultConfig;
137
136
  } }));
138
137
  },
139
138
  async docs() {
140
- this.log(LogLevelLabel.TRACE, "Writing Environment documentation for the Powerlines project artifacts.");
139
+ this.debug("Writing Environment documentation for the Powerlines project artifacts.");
141
140
  const outputPath = joinPaths(this.config.projectRoot, "docs", "generated");
142
141
  if (!existsSync(outputPath)) await createDirectory(outputPath);
143
142
  const reflection = await readEnvTypeReflection(this, "env");
144
143
  const envDocFile = joinPaths(outputPath, "env.md");
145
- this.log(LogLevelLabel.TRACE, `Documenting environment variables configuration in "${envDocFile}"`);
144
+ this.debug(`Documenting environment variables configuration in "${envDocFile}"`);
146
145
  await this.fs.write(envDocFile, `<!-- Generated by ${titleCase(this.config.framework) || "Powerlines"} -->
147
146
 
148
147
  Below is a list of environment variables used by the [${this.packageJson.name}](https://www.npmjs.com/package/${this.packageJson.name}) package. These values can be updated in the \`.env\` file in the root of the project. The variables in the list below are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.
@@ -156,7 +155,7 @@ ${reflection.getProperties().filter((property) => property.getNameAsString() !==
156
155
  },
157
156
  async buildEnd() {
158
157
  const reflectionPath = getEnvReflectionsPath(this, "env");
159
- this.log(LogLevelLabel.TRACE, `Writing env reflection types to ${reflectionPath}.`);
158
+ this.debug(`Writing env reflection types to ${reflectionPath}.`);
160
159
  await writeEnvReflection(this, this.env.used.env, "env");
161
160
  }
162
161
  },
@@ -15,6 +15,7 @@ import { AssetGlob } from "@stryke/types/file";
15
15
  import { DateString } from "compatx";
16
16
 
17
17
  //#region ../powerlines/src/types/config.d.ts
18
+ type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
18
19
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
19
20
  /**
20
21
  * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
@@ -102,15 +103,6 @@ interface OutputConfig {
102
103
  * @defaultValue "\{projectRoot\}/powerlines.d.ts"
103
104
  */
104
105
  dts?: string | false;
105
- /**
106
- * A prefix to use for identifying builtin modules
107
- *
108
- * @remarks
109
- * This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
110
- *
111
- * @defaultValue "powerlines"
112
- */
113
- builtinPrefix?: string;
114
106
  /**
115
107
  * The module format of the output files
116
108
  *
@@ -273,7 +265,7 @@ interface CommonUserConfig extends BaseConfig {
273
265
  *
274
266
  * @defaultValue "info"
275
267
  */
276
- logLevel?: LogLevelLabel | null;
268
+ logLevel?: LogLevel | null;
277
269
  /**
278
270
  * A custom logger function to use for logging messages
279
271
  */
@@ -346,7 +338,7 @@ interface CommonUserConfig extends BaseConfig {
346
338
  * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
347
339
  *
348
340
  * @remarks
349
- * If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
341
+ * If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
350
342
  *
351
343
  * @defaultValue "powerlines"
352
344
  */
@@ -440,4 +432,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Inlin
440
432
  command: "deploy";
441
433
  };
442
434
  //#endregion
443
- export { BabelUserConfig, BaseConfig, BuildInlineConfig, CleanInlineConfig, CommonUserConfig, DeployConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, NewInlineConfig, OutputConfig, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
435
+ export { BabelUserConfig, BaseConfig, BuildInlineConfig, CleanInlineConfig, CommonUserConfig, DeployConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
@@ -226,6 +226,13 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
226
226
  * The builtin module id that exist in the Powerlines virtual file system
227
227
  */
228
228
  builtins: string[];
229
+ /**
230
+ * The alias mappings for the project used during module resolution
231
+ *
232
+ * @remarks
233
+ * This includes both the built-in module aliases as well as any custom aliases defined in the build configuration.
234
+ */
235
+ alias: Record<string, string>;
229
236
  /**
230
237
  * The {@link Project} instance used for type reflection and module manipulation
231
238
  *
@@ -2,7 +2,7 @@ import { BuildConfig, BuildResolvedConfig, BuilderVariant, ESBuildBuildConfig, E
2
2
  import { BabelPluginPass, BabelTransformPlugin, BabelTransformPluginFilter, BabelTransformPluginOptions, DeclareBabelTransformPluginReturn } from "./babel.mjs";
3
3
  import { ResolveOptions, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileMetadata, VirtualFileSystemInterface, WriteOptions } from "./fs.mjs";
4
4
  import { DeepkitOptions, ParsedTypeScriptConfig, RawReflectionMode, ReflectionLevel, ReflectionMode, TSCompilerOptions, TSConfig } from "./tsconfig.mjs";
5
- import { BabelUserConfig, BaseConfig, BuildInlineConfig, CleanInlineConfig, CommonUserConfig, DeployConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, NewInlineConfig, OutputConfig, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig } from "./config.mjs";
5
+ import { BabelUserConfig, BaseConfig, BuildInlineConfig, CleanInlineConfig, CommonUserConfig, DeployConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig } from "./config.mjs";
6
6
  import { HookFields, HookListOrders, HooksList, InferHookFunction, InferHookParameters, InferHookReturnType, InferHooksListItem, PluginHooksList, PluginHooksListItem, UnpluginHookFunctions, UnpluginHookList, UnpluginHookVariant, UnpluginHookVariantField, UnpluginHooksListItem } from "./hooks.mjs";
7
7
  import { BabelResolvedConfig, ESBuildResolvedConfig, EnvironmentResolvedConfig, FarmResolvedConfig, InferResolvedConfig, OutputResolvedConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedEntryTypeDefinition, RolldownResolvedConfig, RollupResolvedConfig, RspackResolvedConfig, TsdownResolvedConfig, TsupResolvedConfig, UnbuildResolvedConfig, ViteResolvedConfig, WebpackResolvedConfig } from "./resolved.mjs";
8
8
  import { APIContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentContextPlugin, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, TransformResult, UnresolvedContext, WithUnpluginBuildContext } from "./context.mjs";
@@ -1,5 +1,5 @@
1
1
  import { BuilderVariant } from "./build.mjs";
2
- import { BabelUserConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.mjs";
2
+ import { BabelUserConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LogLevel, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.mjs";
3
3
  import { NonUndefined } from "@stryke/types/base";
4
4
  import { ResolvedPreviewOptions } from "vite";
5
5
  import { TypeDefinition } from "@stryke/types/configuration";
@@ -77,7 +77,7 @@ type ResolvedConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Omit<TUse
77
77
  *
78
78
  * @defaultValue "info"
79
79
  */
80
- logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
80
+ logLevel: LogLevel | null;
81
81
  };
82
82
  type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
83
83
  type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
@@ -15,6 +15,7 @@ import { AssetGlob } from "@stryke/types/file";
15
15
  import { DateString } from "compatx";
16
16
 
17
17
  //#region ../powerlines/src/types/config.d.ts
18
+ type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
18
19
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
19
20
  /**
20
21
  * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
@@ -102,15 +103,6 @@ interface OutputConfig {
102
103
  * @defaultValue "\{projectRoot\}/powerlines.d.ts"
103
104
  */
104
105
  dts?: string | false;
105
- /**
106
- * A prefix to use for identifying builtin modules
107
- *
108
- * @remarks
109
- * This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
110
- *
111
- * @defaultValue "powerlines"
112
- */
113
- builtinPrefix?: string;
114
106
  /**
115
107
  * The module format of the output files
116
108
  *
@@ -273,7 +265,7 @@ interface CommonUserConfig extends BaseConfig {
273
265
  *
274
266
  * @defaultValue "info"
275
267
  */
276
- logLevel?: LogLevelLabel | null;
268
+ logLevel?: LogLevel | null;
277
269
  /**
278
270
  * A custom logger function to use for logging messages
279
271
  */
@@ -346,7 +338,7 @@ interface CommonUserConfig extends BaseConfig {
346
338
  * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
347
339
  *
348
340
  * @remarks
349
- * If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
341
+ * If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
350
342
  *
351
343
  * @defaultValue "powerlines"
352
344
  */
@@ -440,4 +432,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Inlin
440
432
  command: "deploy";
441
433
  };
442
434
  //#endregion
443
- export { BabelUserConfig, BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
435
+ export { BabelUserConfig, BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
@@ -226,6 +226,13 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
226
226
  * The builtin module id that exist in the Powerlines virtual file system
227
227
  */
228
228
  builtins: string[];
229
+ /**
230
+ * The alias mappings for the project used during module resolution
231
+ *
232
+ * @remarks
233
+ * This includes both the built-in module aliases as well as any custom aliases defined in the build configuration.
234
+ */
235
+ alias: Record<string, string>;
229
236
  /**
230
237
  * The {@link Project} instance used for type reflection and module manipulation
231
238
  *
@@ -1,5 +1,5 @@
1
1
  import { BuilderVariant } from "./build.cjs";
2
- import { BabelUserConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.cjs";
2
+ import { BabelUserConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LogLevel, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.cjs";
3
3
  import { NonUndefined } from "@stryke/types/base";
4
4
  import { ResolvedPreviewOptions } from "vite";
5
5
  import { TypeDefinition } from "@stryke/types/configuration";
@@ -77,7 +77,7 @@ type ResolvedConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Omit<TUse
77
77
  *
78
78
  * @defaultValue "info"
79
79
  */
80
- logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
80
+ logLevel: LogLevel | null;
81
81
  };
82
82
  type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
83
83
  type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-env",
3
- "version": "0.15.90",
3
+ "version": "0.15.92",
4
4
  "type": "module",
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
  "repository": {
@@ -193,10 +193,10 @@
193
193
  "@alloy-js/typescript": "^0.22.0",
194
194
  "@babel/core": "^7.28.6",
195
195
  "@babel/types": "^7.28.6",
196
- "@powerlines/plugin-alloy": "^0.18.86",
197
- "@powerlines/plugin-automd": "^0.1.197",
198
- "@powerlines/plugin-babel": "^0.12.206",
199
- "@powerlines/plugin-plugin": "^0.12.149",
196
+ "@powerlines/plugin-alloy": "^0.18.88",
197
+ "@powerlines/plugin-automd": "^0.1.199",
198
+ "@powerlines/plugin-babel": "^0.12.208",
199
+ "@powerlines/plugin-plugin": "^0.12.151",
200
200
  "@storm-software/config-tools": "^1.188.80",
201
201
  "@stryke/capnp": "^0.12.61",
202
202
  "@stryke/env": "^0.20.53",
@@ -206,14 +206,14 @@
206
206
  "@stryke/type-checks": "^0.5.20",
207
207
  "@stryke/types": "^0.10.34",
208
208
  "automd": "^0.4.2",
209
- "powerlines": "^0.37.71"
209
+ "powerlines": "^0.37.73"
210
210
  },
211
211
  "devDependencies": {
212
- "@powerlines/deepkit": "^0.5.114",
213
- "@powerlines/plugin-deepkit": "^0.11.75",
212
+ "@powerlines/deepkit": "^0.5.116",
213
+ "@powerlines/plugin-deepkit": "^0.11.77",
214
214
  "@types/node": "^24.10.9",
215
215
  "vite": "8.0.0-beta.2"
216
216
  },
217
217
  "publishConfig": { "access": "public" },
218
- "gitHead": "6fd6de6c956acc53f73c34d8b19827d094e604af"
218
+ "gitHead": "df743ef7ebac849eb4ce90899884df4758b61172"
219
219
  }