@powerlines/plugin-id 0.9.349 → 0.9.351
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/README.md +14 -16
- package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -1
- package/dist/_virtual/_rolldown/runtime.mjs +3 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/nanoid.cjs +2 -1
- package/dist/components/nanoid.d.cts +0 -1
- package/dist/components/nanoid.d.cts.map +1 -1
- package/dist/components/nanoid.d.mts +0 -1
- package/dist/components/nanoid.d.mts.map +1 -1
- package/dist/index.cjs +6 -8
- package/dist/index.d.cts +0 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -3
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/powerlines) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -58,21 +58,19 @@ A Powerlines plugin that provides unique identifier generation capabilities at r
|
|
|
58
58
|
|
|
59
59
|
## Table of Contents
|
|
60
60
|
|
|
61
|
-
- [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- [Contributing](#contributing)
|
|
75
|
-
- [Contributors](#contributors)
|
|
61
|
+
- [Installing](#installing)
|
|
62
|
+
- [Reduced Package Size](#reduced-package-size)
|
|
63
|
+
- [Development](#development)
|
|
64
|
+
- [Building](#building)
|
|
65
|
+
- [Running unit tests](#running-unit-tests)
|
|
66
|
+
- [Linting](#linting)
|
|
67
|
+
- [Storm Workspaces](#storm-workspaces)
|
|
68
|
+
- [Roadmap](#roadmap)
|
|
69
|
+
- [Support](#support)
|
|
70
|
+
- [License](#license)
|
|
71
|
+
- [Changelog](#changelog)
|
|
72
|
+
- [Contributing](#contributing)
|
|
73
|
+
- [Contributors](#contributors)
|
|
76
74
|
|
|
77
75
|
<!-- END doctoc -->
|
|
78
76
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
3
|
let powerlines_lib_utilities_file_header = require("powerlines/lib/utilities/file-header");
|
|
3
4
|
|
|
4
5
|
//#region src/components/nanoid.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nanoid.d.cts","names":[],"sources":["../../src/components/nanoid.ts"],"
|
|
1
|
+
{"version":3,"file":"nanoid.d.cts","names":[],"sources":["../../src/components/nanoid.ts"],"mappings":";;;;;AA2BA;;;;iBAAgB,YAAA,CAAa,OAAA,EAAS,eAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nanoid.d.mts","names":[],"sources":["../../src/components/nanoid.ts"],"
|
|
1
|
+
{"version":3,"file":"nanoid.d.mts","names":[],"sources":["../../src/components/nanoid.ts"],"mappings":";;;;;AA2BA;;;;iBAAgB,YAAA,CAAa,OAAA,EAAS,eAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_components_nanoid = require('./components/nanoid.cjs');
|
|
4
4
|
require('./components/index.cjs');
|
|
5
5
|
let defu = require("defu");
|
|
6
|
-
defu =
|
|
6
|
+
defu = require_runtime.__toESM(defu);
|
|
7
7
|
|
|
8
8
|
//#region src/index.ts
|
|
9
9
|
/**
|
|
@@ -26,7 +26,6 @@ function plugin(options = {}) {
|
|
|
26
26
|
this.debug("Preparing the ID runtime artifacts for the Powerlines project.");
|
|
27
27
|
let idModule;
|
|
28
28
|
switch (this.config.id.type) {
|
|
29
|
-
case "nanoid":
|
|
30
29
|
default:
|
|
31
30
|
idModule = require_components_nanoid.nanoidModule;
|
|
32
31
|
break;
|
|
@@ -35,9 +34,8 @@ function plugin(options = {}) {
|
|
|
35
34
|
}
|
|
36
35
|
};
|
|
37
36
|
}
|
|
38
|
-
var src_default = plugin;
|
|
39
37
|
|
|
40
38
|
//#endregion
|
|
41
|
-
exports.default =
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
39
|
+
exports.default = plugin;
|
|
40
|
+
exports.plugin = plugin;
|
|
41
|
+
exports.nanoidModule = require_components_nanoid.nanoidModule;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { IdPluginContext, IdPluginOptions, IdPluginResolvedConfig, IdPluginUserConfig, UniqueIdFormatType, __ΩIdPluginContext, __ΩIdPluginOptions, __ΩIdPluginResolvedConfig, __ΩIdPluginUserConfig, __ΩUniqueIdFormatType } from "./types/plugin.cjs";
|
|
2
2
|
import { nanoidModule } from "./components/nanoid.cjs";
|
|
3
|
-
import "./components/index.cjs";
|
|
4
|
-
import "./types/index.cjs";
|
|
5
3
|
import { Plugin } from "powerlines";
|
|
6
4
|
|
|
7
5
|
//#region src/index.d.ts
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;YA+BY,MAAA;IACR,EAAA,GAAK,eAAA;EAAA;AAAA;;;;iBAOO,MAAA,CAAO,OAAA,GAAS,eAAA,GAAuB,MAAA,CAAO,eAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { IdPluginContext, IdPluginOptions, IdPluginResolvedConfig, IdPluginUserConfig, UniqueIdFormatType, __ΩIdPluginContext, __ΩIdPluginOptions, __ΩIdPluginResolvedConfig, __ΩIdPluginUserConfig, __ΩUniqueIdFormatType } from "./types/plugin.mjs";
|
|
2
2
|
import { nanoidModule } from "./components/nanoid.mjs";
|
|
3
|
-
import "./components/index.mjs";
|
|
4
|
-
import "./types/index.mjs";
|
|
5
3
|
import { Plugin } from "powerlines";
|
|
6
4
|
|
|
7
5
|
//#region src/index.d.ts
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;YA+BY,MAAA;IACR,EAAA,GAAK,eAAA;EAAA;AAAA;;;;iBAOO,MAAA,CAAO,OAAA,GAAS,eAAA,GAAuB,MAAA,CAAO,eAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -23,7 +23,6 @@ function plugin(options = {}) {
|
|
|
23
23
|
this.debug("Preparing the ID runtime artifacts for the Powerlines project.");
|
|
24
24
|
let idModule;
|
|
25
25
|
switch (this.config.id.type) {
|
|
26
|
-
case "nanoid":
|
|
27
26
|
default:
|
|
28
27
|
idModule = nanoidModule;
|
|
29
28
|
break;
|
|
@@ -32,8 +31,7 @@ function plugin(options = {}) {
|
|
|
32
31
|
}
|
|
33
32
|
};
|
|
34
33
|
}
|
|
35
|
-
var src_default = plugin;
|
|
36
34
|
|
|
37
35
|
//#endregion
|
|
38
|
-
export {
|
|
36
|
+
export { plugin as default, plugin, nanoidModule };
|
|
39
37
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"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,IAAI;AACJ,WAAQ,KAAK,OAAO,GAAG,MAAvB;IAEE;AAEE,gBAAW;AACX;;AAGJ,SAAM,KAAK,YAAY,MAAM,QAAQ,QAAQ,SAAS,KAAK,CAAC,EAAE,KAAK;;EAEtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;KAoBY,kBAAA;AAAA,UAEK,eAAA;EAFL;;;;;AAEZ;;;;EAUE,IAAA,GAAO,kBAAA;AAAA;AAAA,UAGQ,kBAAA,SAA2B,UAAA;;;;EAI1C,EAAA,GAAK,eAAA;AAAA;AAAA,UAGU,sBAAA,SAA+B,cAAA;EAH1B;AAGtB;;EAIE,EAAA,EAAI,QAAA,CAAS,eAAA;AAAA;AAAA,KAGH,eAAA,yBACc,sBAAA,GAAyB,sBAAA,IAC/C,aAAA,CAAc,eAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;KAoBY,kBAAA;AAAA,UAEK,eAAA;EAFL;;;;;AAEZ;;;;EAUE,IAAA,GAAO,kBAAA;AAAA;AAAA,UAGQ,kBAAA,SAA2B,UAAA;;;;EAI1C,EAAA,GAAK,eAAA;AAAA;AAAA,UAGU,sBAAA,SAA+B,cAAA;EAH1B;AAGtB;;EAIE,EAAA,EAAI,QAAA,CAAS,eAAA;AAAA;AAAA,KAGH,eAAA,yBACc,sBAAA,GAAyB,sBAAA,IAC/C,aAAA,CAAc,eAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-id",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.351",
|
|
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,7 +53,6 @@
|
|
|
53
53
|
"default": "./dist/index.mjs"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"./*": "./*",
|
|
57
56
|
"./components": {
|
|
58
57
|
"require": {
|
|
59
58
|
"types": "./dist/components/index.d.cts",
|
|
@@ -82,6 +81,7 @@
|
|
|
82
81
|
"default": "./dist/components/nanoid.mjs"
|
|
83
82
|
}
|
|
84
83
|
},
|
|
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": "
|
|
117
|
+
"@storm-software/config-tools": "1.189.28",
|
|
118
118
|
"@stryke/path": "^0.26.19",
|
|
119
119
|
"defu": "^6.1.4",
|
|
120
|
-
"powerlines": "^0.41.
|
|
120
|
+
"powerlines": "^0.41.7"
|
|
121
121
|
},
|
|
122
122
|
"devDependencies": {
|
|
123
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
123
|
+
"@powerlines/plugin-plugin": "^0.12.293",
|
|
124
124
|
"@types/node": "^25.4.0"
|
|
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": "2fb48143904805988bac9bdbc04cdc4a35ff398b"
|
|
131
131
|
}
|