@piup/plugin-sdk 0.0.0-stage → 0.0.1-beta.1
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/LICENSE +21 -0
- package/README.md +25 -2
- package/dist/index.d.mts +8 -0
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +34 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 piup contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @piup/plugin-sdk
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p>
|
|
4
|
+
<a href="https://www.npmjs.com/package/@piup/plugin-sdk"><img alt="NPM version" src="https://img.shields.io/npm/v/@piup/plugin-sdk.svg?logo=npm"></a>
|
|
5
|
+
<a href="https://www.npmjs.com/package/@piup/plugin-sdk"><img alt="NPM downloads" src="https://img.shields.io/npm/dm/@piup/plugin-sdk.svg?logo=npm&color=blue"></a>
|
|
6
|
+
<a href="https://bundlephobia.com/package/@piup/plugin-sdk">
|
|
7
|
+
<img alt="bundle size" src="https://img.shields.io/bundlephobia/minzip/@piup/plugin-sdk.svg?style=flat-square&logo=typescript&label=size">
|
|
8
|
+
</a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/@piup/plugin-sdk"><img alt="Node Versions" src="https://img.shields.io/node/v/@piup/plugin-sdk.svg"></a>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://docs-piup.keylenn.online">
|
|
14
|
+
<img src="https://docs-piup.keylenn.online/piup-logo.svg" alt="piup logo" width="128" height="128">
|
|
15
|
+
</a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
piup 的插件开发 SDK,提供受限的插件描述与注册 API。当前不包含独立 Plugin Host,也不是安全沙箱。
|
|
19
|
+
|
|
20
|
+
## 快速开始
|
|
21
|
+
|
|
22
|
+
⚠️ 当前插件功能尚未可用,敬请期待~
|
|
23
|
+
|
|
24
|
+
💡 普通用户无需单独安装 SDK,使用 `@piup/cli` 即可。
|
|
25
|
+
|
|
26
|
+
完整使用指南与支持范围请查看 **[piup 文档](https://docs-piup.keylenn.online)**。
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PluginDescriptor } from "@piup/contracts";
|
|
2
|
+
//#region src/index.d.ts
|
|
3
|
+
export interface PluginRegistration {
|
|
4
|
+
readonly descriptor: PluginDescriptor;
|
|
5
|
+
}
|
|
6
|
+
export declare function definePlugin<const TPlugin extends PluginRegistration>(plugin: TPlugin): TPlugin;
|
|
7
|
+
//#endregion
|
|
8
|
+
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { PluginDescriptor } from \"@piup/contracts\";\n\nexport interface PluginRegistration {\n readonly descriptor: PluginDescriptor;\n}\n\nexport function definePlugin<const TPlugin extends PluginRegistration>(\n plugin: TPlugin,\n): TPlugin {\n return plugin;\n}\n"],"mappings":";AAMA,SAAgB,aACd,QACS;CACT,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@piup/plugin-sdk",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.1-beta.1",
|
|
4
|
+
"description": "Restricted plugin registration API for piup plugins.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.mts",
|
|
9
|
+
"import": "./dist/index.mjs"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE"
|
|
16
|
+
],
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=22.19.0"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/Keylenn/piup.git",
|
|
25
|
+
"directory": "packages/plugin-sdk"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/Keylenn/piup#readme",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/Keylenn/piup/issues"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@piup/contracts": "0.0.1-beta.1"
|
|
36
|
+
}
|
|
6
37
|
}
|