@powerlines/plugin-id 0.9.326 → 0.9.328

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.d.cts CHANGED
@@ -5,8 +5,8 @@ import "./types/index.cjs";
5
5
  import { Plugin } from "powerlines";
6
6
 
7
7
  //#region src/index.d.ts
8
- declare module "@powerlines/core" {
9
- interface BaseConfig {
8
+ declare module "powerlines" {
9
+ interface Config {
10
10
  id?: IdPluginOptions;
11
11
  }
12
12
  }
package/dist/index.d.mts CHANGED
@@ -5,8 +5,8 @@ import "./types/index.mjs";
5
5
  import { Plugin } from "powerlines";
6
6
 
7
7
  //#region src/index.d.ts
8
- declare module "@powerlines/core" {
9
- interface BaseConfig {
8
+ declare module "powerlines" {
9
+ interface Config {
10
10
  id?: IdPluginOptions;
11
11
  }
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["idModule!: (context: IdPluginContext) => string"],"sources":["../src/index.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 defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { nanoidModule } from \"./components/nanoid\";\nimport {\n IdPluginContext,\n IdPluginOptions,\n IdPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./components\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface BaseConfig {\n id?: IdPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport function plugin(options: IdPluginOptions = {}): Plugin<IdPluginContext> {\n return {\n name: \"id\",\n async config() {\n this.debug(\n \"Providing default configuration for the Powerlines `id` build plugin.\"\n );\n\n const config = {\n id: defu(options, {\n type: \"nanoid\"\n })\n } as Partial<IdPluginUserConfig>;\n\n if (!config.id!.type || ![\"nanoid\"].includes(config.id!.type)) {\n if (config.id!.type) {\n this.warn(\n `Invalid ID generation type \"${config.id!.type}\" specified. Defaulting to \"nanoid\".`\n );\n }\n\n config.id!.type = \"nanoid\";\n }\n\n this.debug(`Using ID generation library: ${config.id!.type}`);\n\n return config;\n },\n async prepare() {\n this.debug(\n \"Preparing the ID runtime artifacts for the Powerlines project.\"\n );\n\n let idModule!: (context: IdPluginContext) => string;\n switch (this.config.id.type) {\n case \"nanoid\":\n default:\n // Default to nanoid if no type is specified or if the type is not recognized\n idModule = nanoidModule;\n break;\n }\n\n await this.emitBuiltin(await Promise.resolve(idModule(this)), \"id\");\n }\n };\n}\n\nexport default plugin;\n"],"mappings":";;;;;;;;AAuCA,SAAgB,OAAO,UAA2B,EAAE,EAA2B;AAC7E,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,QAAK,MACH,wEACD;GAED,MAAM,SAAS,EACb,IAAI,KAAK,SAAS,EAChB,MAAM,UACP,CAAC,EACH;AAED,OAAI,CAAC,OAAO,GAAI,QAAQ,CAAC,CAAC,SAAS,CAAC,SAAS,OAAO,GAAI,KAAK,EAAE;AAC7D,QAAI,OAAO,GAAI,KACb,MAAK,KACH,+BAA+B,OAAO,GAAI,KAAK,sCAChD;AAGH,WAAO,GAAI,OAAO;;AAGpB,QAAK,MAAM,gCAAgC,OAAO,GAAI,OAAO;AAE7D,UAAO;;EAET,MAAM,UAAU;AACd,QAAK,MACH,iEACD;GAED,IAAIA;AACJ,WAAQ,KAAK,OAAO,GAAG,MAAvB;IACE,KAAK;IACL;AAEE,gBAAW;AACX;;AAGJ,SAAM,KAAK,YAAY,MAAM,QAAQ,QAAQ,SAAS,KAAK,CAAC,EAAE,KAAK;;EAEtE;;AAGH,kBAAe"}
1
+ {"version":3,"file":"index.mjs","names":["idModule!: (context: IdPluginContext) => string"],"sources":["../src/index.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 defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { nanoidModule } from \"./components/nanoid\";\nimport {\n IdPluginContext,\n IdPluginOptions,\n IdPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./components\";\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n id?: IdPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport function plugin(options: IdPluginOptions = {}): Plugin<IdPluginContext> {\n return {\n name: \"id\",\n async config() {\n this.debug(\n \"Providing default configuration for the Powerlines `id` build plugin.\"\n );\n\n const config = {\n id: defu(options, {\n type: \"nanoid\"\n })\n } as Partial<IdPluginUserConfig>;\n\n if (!config.id!.type || ![\"nanoid\"].includes(config.id!.type)) {\n if (config.id!.type) {\n this.warn(\n `Invalid ID generation type \"${config.id!.type}\" specified. Defaulting to \"nanoid\".`\n );\n }\n\n config.id!.type = \"nanoid\";\n }\n\n this.debug(`Using ID generation library: ${config.id!.type}`);\n\n return config;\n },\n async prepare() {\n this.debug(\n \"Preparing the ID runtime artifacts for the Powerlines project.\"\n );\n\n let idModule!: (context: IdPluginContext) => string;\n switch (this.config.id.type) {\n case \"nanoid\":\n default:\n // Default to nanoid if no type is specified or if the type is not recognized\n idModule = nanoidModule;\n break;\n }\n\n await this.emitBuiltin(await Promise.resolve(idModule(this)), \"id\");\n }\n };\n}\n\nexport default plugin;\n"],"mappings":";;;;;;;;AAuCA,SAAgB,OAAO,UAA2B,EAAE,EAA2B;AAC7E,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,QAAK,MACH,wEACD;GAED,MAAM,SAAS,EACb,IAAI,KAAK,SAAS,EAChB,MAAM,UACP,CAAC,EACH;AAED,OAAI,CAAC,OAAO,GAAI,QAAQ,CAAC,CAAC,SAAS,CAAC,SAAS,OAAO,GAAI,KAAK,EAAE;AAC7D,QAAI,OAAO,GAAI,KACb,MAAK,KACH,+BAA+B,OAAO,GAAI,KAAK,sCAChD;AAGH,WAAO,GAAI,OAAO;;AAGpB,QAAK,MAAM,gCAAgC,OAAO,GAAI,OAAO;AAE7D,UAAO;;EAET,MAAM,UAAU;AACd,QAAK,MACH,iEACD;GAED,IAAIA;AACJ,WAAQ,KAAK,OAAO,GAAG,MAAvB;IACE,KAAK;IACL;AAEE,gBAAW;AACX;;AAGJ,SAAM,KAAK,YAAY,MAAM,QAAQ,QAAQ,SAAS,KAAK,CAAC,EAAE,KAAK;;EAEtE;;AAGH,kBAAe"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-id",
3
- "version": "0.9.326",
3
+ "version": "0.9.328",
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": {
@@ -117,15 +117,15 @@
117
117
  "@storm-software/config-tools": "^1.189.17",
118
118
  "@stryke/path": "^0.26.15",
119
119
  "defu": "^6.1.4",
120
- "powerlines": "^0.40.4"
120
+ "powerlines": "^0.40.6"
121
121
  },
122
122
  "devDependencies": {
123
- "@powerlines/plugin-plugin": "^0.12.268",
123
+ "@powerlines/plugin-plugin": "^0.12.270",
124
124
  "@types/node": "^25.3.5"
125
125
  },
126
126
  "publishConfig": { "access": "public" },
127
127
  "main": "./dist/index.cjs",
128
128
  "module": "./dist/index.mjs",
129
129
  "types": "./dist/index.d.cts",
130
- "gitHead": "81fe04ecdb367e905a2d89b30beebd28cfd8a470"
130
+ "gitHead": "8952a4d271f29b7b174297aaa4c0d3ebb002140f"
131
131
  }