@powerlines/plugin-id 0.9.299 → 0.9.301
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 +6 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +6 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts +1 -3
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +1 -3
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -2,9 +2,14 @@ import { IdPluginContext, IdPluginOptions, IdPluginResolvedConfig, IdPluginUserC
|
|
|
2
2
|
import { nanoidModule } from "./components/nanoid.cjs";
|
|
3
3
|
import "./components/index.cjs";
|
|
4
4
|
import "./types/index.cjs";
|
|
5
|
-
import { Plugin } from "powerlines
|
|
5
|
+
import { Plugin } from "powerlines";
|
|
6
6
|
|
|
7
7
|
//#region src/index.d.ts
|
|
8
|
+
declare module "powerlines" {
|
|
9
|
+
interface UserConfig {
|
|
10
|
+
id?: IdPluginOptions;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
8
13
|
/**
|
|
9
14
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
10
15
|
*/
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;SAgCS;EAJe;;;;;AAWR,iBAAA,MAAA,CAAM,OAAA,CAAA,EAAU,eAAV,CAAA,EAAiC,MAAjC,CAAwC,eAAxC,CAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -2,9 +2,14 @@ import { IdPluginContext, IdPluginOptions, IdPluginResolvedConfig, IdPluginUserC
|
|
|
2
2
|
import { nanoidModule } from "./components/nanoid.mjs";
|
|
3
3
|
import "./components/index.mjs";
|
|
4
4
|
import "./types/index.mjs";
|
|
5
|
-
import { Plugin } from "powerlines
|
|
5
|
+
import { Plugin } from "powerlines";
|
|
6
6
|
|
|
7
7
|
//#region src/index.d.ts
|
|
8
|
+
declare module "powerlines" {
|
|
9
|
+
interface UserConfig {
|
|
10
|
+
id?: IdPluginOptions;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
8
13
|
/**
|
|
9
14
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
10
15
|
*/
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;SAgCS;EAJe;;;;;AAWR,iBAAA,MAAA,CAAM,OAAA,CAAA,EAAU,eAAV,CAAA,EAAiC,MAAjC,CAAwC,eAAxC,CAAA"}
|
package/dist/index.mjs.map
CHANGED
|
@@ -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
|
|
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 export interface UserConfig {\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/dist/types/plugin.d.cts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { UserConfig } from "powerlines
|
|
2
|
-
import { PluginContext } from "powerlines/types/context";
|
|
3
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
1
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
4
2
|
|
|
5
3
|
//#region src/types/plugin.d.ts
|
|
6
4
|
type UniqueIdFormatType = "nanoid";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;KAoBY,kBAAA;UAEK,eAAA;EAFL;AAEZ;AAaA;AAOA;;;;;AAOA;EAC0B,IAAA,CAAA,EAlBjB,kBAkBiB;;AACR,UAhBD,kBAAA,SAA2B,UAgB1B,CAAA;EAAd;;;OAZG;;UAGU,sBAAA,SAA+B;;;;MAI1C,SAAS;;KAGH,wCACc,yBAAyB,0BAC/C,cAAc"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { UserConfig } from "powerlines
|
|
2
|
-
import { PluginContext } from "powerlines/types/context";
|
|
3
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
1
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
4
2
|
|
|
5
3
|
//#region src/types/plugin.d.ts
|
|
6
4
|
type UniqueIdFormatType = "nanoid";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;KAoBY,kBAAA;UAEK,eAAA;EAFL;AAEZ;AAaA;AAOA;;;;;AAOA;EAC0B,IAAA,CAAA,EAlBjB,kBAkBiB;;AACR,UAhBD,kBAAA,SAA2B,UAgB1B,CAAA;EAAd;;;OAZG;;UAGU,sBAAA,SAA+B;;;;MAI1C,SAAS;;KAGH,wCACc,yBAAyB,0BAC/C,cAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-id",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.301",
|
|
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": {
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"default": "./dist/index.mjs"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
+
"./*": "./*",
|
|
56
57
|
"./components": {
|
|
57
58
|
"require": {
|
|
58
59
|
"types": "./dist/components/index.d.cts",
|
|
@@ -81,7 +82,6 @@
|
|
|
81
82
|
"default": "./dist/components/nanoid.mjs"
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
|
-
"./package.json": "./package.json",
|
|
85
85
|
"./types": {
|
|
86
86
|
"require": {
|
|
87
87
|
"types": "./dist/types/index.d.cts",
|
|
@@ -114,18 +114,18 @@
|
|
|
114
114
|
"files": ["dist/**/*"],
|
|
115
115
|
"keywords": ["powerlines", "storm-software", "powerlines-plugin"],
|
|
116
116
|
"dependencies": {
|
|
117
|
-
"@storm-software/config-tools": "^1.189.
|
|
117
|
+
"@storm-software/config-tools": "^1.189.10",
|
|
118
118
|
"@stryke/path": "^0.26.6",
|
|
119
119
|
"defu": "^6.1.4",
|
|
120
|
-
"powerlines": "^0.
|
|
120
|
+
"powerlines": "^0.39.1"
|
|
121
121
|
},
|
|
122
122
|
"devDependencies": {
|
|
123
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
124
|
-
"@types/node": "^25.3.
|
|
123
|
+
"@powerlines/plugin-plugin": "^0.12.243",
|
|
124
|
+
"@types/node": "^25.3.3"
|
|
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": "
|
|
130
|
+
"gitHead": "30a096fed42d3462dbc028b16145250c373f3d99"
|
|
131
131
|
}
|