@powerlines/plugin-id 0.9.207 → 0.9.209

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
@@ -2,7 +2,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
2
2
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
3
  const require_components_nanoid = require('./components/nanoid.cjs');
4
4
  require('./components/index.cjs');
5
- let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
6
5
  let defu = require("defu");
7
6
  defu = require_rolldown_runtime.__toESM(defu);
8
7
 
@@ -14,17 +13,17 @@ function plugin(options = {}) {
14
13
  return {
15
14
  name: "id",
16
15
  async config() {
17
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `id` build plugin.");
16
+ this.debug("Providing default configuration for the Powerlines `id` build plugin.");
18
17
  const config = { id: (0, defu.default)(options, { type: "nanoid" }) };
19
18
  if (!config.id.type || !["nanoid"].includes(config.id.type)) {
20
- if (config.id.type) this.log(__storm_software_config_tools_types.LogLevelLabel.WARN, `Invalid ID generation type "${config.id.type}" specified. Defaulting to "nanoid".`);
19
+ if (config.id.type) this.warn(`Invalid ID generation type "${config.id.type}" specified. Defaulting to "nanoid".`);
21
20
  config.id.type = "nanoid";
22
21
  }
23
- this.log(__storm_software_config_tools_types.LogLevelLabel.DEBUG, `Using ID generation library: ${config.id.type}`);
22
+ this.debug(`Using ID generation library: ${config.id.type}`);
24
23
  return config;
25
24
  },
26
25
  async prepare() {
27
- this.log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Preparing the ID runtime artifacts for the Powerlines project.`);
26
+ this.debug("Preparing the ID runtime artifacts for the Powerlines project.");
28
27
  let idModule;
29
28
  switch (this.config.id.type) {
30
29
  case "nanoid":
package/dist/index.d.mts CHANGED
@@ -1,10 +1,9 @@
1
1
  import { Plugin } from "./powerlines/src/types/plugin.mjs";
2
2
  import { IdPluginContext, IdPluginOptions, IdPluginResolvedConfig, IdPluginUserConfig, UniqueIdFormatType, __ΩIdPluginContext, __ΩIdPluginOptions, __ΩIdPluginResolvedConfig, __ΩIdPluginUserConfig, __ΩUniqueIdFormatType } from "./types/plugin.mjs";
3
3
  import { nanoidModule } from "./components/nanoid.mjs";
4
- import "./components/index.mjs";
5
- import "./types/index.mjs";
6
4
 
7
5
  //#region src/index.d.ts
6
+
8
7
  /**
9
8
  * A Powerlines plugin to assist in developing other Powerlines plugins.
10
9
  */
package/dist/index.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  import { nanoidModule } from "./components/nanoid.mjs";
2
2
  import "./components/index.mjs";
3
- import { LogLevelLabel } from "@storm-software/config-tools/types";
4
3
  import defu from "defu";
5
4
 
6
5
  //#region src/index.ts
@@ -11,17 +10,17 @@ function plugin(options = {}) {
11
10
  return {
12
11
  name: "id",
13
12
  async config() {
14
- this.log(LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `id` build plugin.");
13
+ this.debug("Providing default configuration for the Powerlines `id` build plugin.");
15
14
  const config = { id: defu(options, { type: "nanoid" }) };
16
15
  if (!config.id.type || !["nanoid"].includes(config.id.type)) {
17
- if (config.id.type) this.log(LogLevelLabel.WARN, `Invalid ID generation type "${config.id.type}" specified. Defaulting to "nanoid".`);
16
+ if (config.id.type) this.warn(`Invalid ID generation type "${config.id.type}" specified. Defaulting to "nanoid".`);
18
17
  config.id.type = "nanoid";
19
18
  }
20
- this.log(LogLevelLabel.DEBUG, `Using ID generation library: ${config.id.type}`);
19
+ this.debug(`Using ID generation library: ${config.id.type}`);
21
20
  return config;
22
21
  },
23
22
  async prepare() {
24
- this.log(LogLevelLabel.TRACE, `Preparing the ID runtime artifacts for the Powerlines project.`);
23
+ this.debug("Preparing the ID runtime artifacts for the Powerlines project.");
25
24
  let idModule;
26
25
  switch (this.config.id.type) {
27
26
  case "nanoid":
@@ -1,5 +1,3 @@
1
- import "../../types/resolved.mjs";
2
- import "../../types/hooks.mjs";
3
1
  import { SelectHooksOptions } from "../../types/context.mjs";
4
2
  import { MaybePromise } from "@stryke/types/base";
5
3
 
@@ -1,4 +1,3 @@
1
- import "./context.mjs";
2
1
  import { MaybePromise } from "@stryke/types/base";
3
2
  import { ArrayValues } from "@stryke/types/array";
4
3
 
@@ -14,6 +14,7 @@ import { PreviewOptions } from "vite";
14
14
 
15
15
  //#region ../powerlines/src/types/config.d.ts
16
16
 
17
+ type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
17
18
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
18
19
  /**
19
20
  * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
@@ -253,7 +254,7 @@ interface CommonUserConfig extends BaseConfig {
253
254
  *
254
255
  * @defaultValue "info"
255
256
  */
256
- logLevel?: LogLevelLabel | null;
257
+ logLevel?: LogLevel | null;
257
258
  /**
258
259
  * A custom logger function to use for logging messages
259
260
  */
@@ -420,4 +421,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Inlin
420
421
  command: "deploy";
421
422
  };
422
423
  //#endregion
423
- export { 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 };
424
+ export { 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 };
@@ -3,9 +3,8 @@ import { BuildConfig, BuildResolvedConfig, ESBuildBuildConfig, ESBuildResolvedBu
3
3
  import { Plugin } from "./plugin.mjs";
4
4
  import { TSConfig } from "./tsconfig.mjs";
5
5
  import { PluginContext } from "./context.mjs";
6
- import "./babel.mjs";
7
- import { LogLevelLabel } from "@storm-software/config-tools/types";
8
6
  import { Format } from "@storm-software/build-tools/types";
7
+ import { LogLevelLabel } from "@storm-software/config-tools/types";
9
8
  import { StormWorkspaceConfig } from "@storm-software/config/types";
10
9
  import { MaybePromise } from "@stryke/types/base";
11
10
  import { TypeDefinitionParameter } from "@stryke/types/configuration";
@@ -14,6 +13,8 @@ import { DateString } from "compatx";
14
13
  import { PreviewOptions } from "vite";
15
14
 
16
15
  //#region ../powerlines/src/types/config.d.ts
16
+
17
+ type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
17
18
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
18
19
  /**
19
20
  * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
@@ -253,7 +254,7 @@ interface CommonUserConfig extends BaseConfig {
253
254
  *
254
255
  * @defaultValue "info"
255
256
  */
256
- logLevel?: LogLevelLabel | null;
257
+ logLevel?: LogLevel | null;
257
258
  /**
258
259
  * A custom logger function to use for logging messages
259
260
  */
@@ -420,4 +421,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Inlin
420
421
  command: "deploy";
421
422
  };
422
423
  //#endregion
423
- export { 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 };
424
+ export { 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 };
@@ -1,5 +1,5 @@
1
1
  import { BuilderVariant } from "./build.cjs";
2
- import { ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.cjs";
2
+ import { 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 { TypeDefinition } from "@stryke/types/configuration";
5
5
  import { AssetGlob } from "@stryke/types/file";
@@ -76,7 +76,7 @@ type ResolvedConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Omit<TUse
76
76
  *
77
77
  * @defaultValue "info"
78
78
  */
79
- logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
79
+ logLevel: LogLevel | null;
80
80
  };
81
81
  type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
82
82
  type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
@@ -1,5 +1,5 @@
1
1
  import { BuilderVariant } from "./build.mjs";
2
- import { ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.mjs";
2
+ import { 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 { TypeDefinition } from "@stryke/types/configuration";
5
5
  import { AssetGlob } from "@stryke/types/file";
@@ -76,7 +76,7 @@ type ResolvedConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Omit<TUse
76
76
  *
77
77
  * @defaultValue "info"
78
78
  */
79
- logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
79
+ logLevel: LogLevel | null;
80
80
  };
81
81
  type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
82
82
  type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
@@ -3,7 +3,6 @@ import { InferResolvedConfig } from "./resolved.mjs";
3
3
  import { API } from "./api.mjs";
4
4
  import { PluginHook } from "./plugin.mjs";
5
5
  import { Context } from "./context.mjs";
6
- import "./config.mjs";
7
6
  import { MaybePromise } from "@stryke/types/base";
8
7
  import { HookFilter, UnpluginOptions } from "unplugin";
9
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-id",
3
- "version": "0.9.207",
3
+ "version": "0.9.209",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin that provides unique identifier generation capabilities at runtime by adding the `id` builtin module.",
6
6
  "repository": {
@@ -131,12 +131,12 @@
131
131
  "@storm-software/config-tools": "^1.188.80",
132
132
  "@stryke/path": "^0.26.0",
133
133
  "defu": "^6.1.4",
134
- "powerlines": "^0.37.72"
134
+ "powerlines": "^0.37.73"
135
135
  },
136
136
  "devDependencies": {
137
- "@powerlines/plugin-plugin": "^0.12.150",
137
+ "@powerlines/plugin-plugin": "^0.12.151",
138
138
  "@types/node": "^24.10.9"
139
139
  },
140
140
  "publishConfig": { "access": "public" },
141
- "gitHead": "458556ca7def9536d1c1fbd770e005a004d0a513"
141
+ "gitHead": "5f79353f37604b647e86ae803b1d60ca51eaf2d1"
142
142
  }
@@ -1,2 +0,0 @@
1
- import "./context.mjs";
2
- import "./config.mjs";