@parel/channel-api 0.0.3
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.ts +5 -0
- package/dist/index.js +21 -0
- package/package.json +41 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { definePlugin } from "@parel/plugin-sdk";
|
|
3
|
+
var index_default = definePlugin({
|
|
4
|
+
name: "@parel/channel-api",
|
|
5
|
+
version: "0.0.1",
|
|
6
|
+
async setup(ctx) {
|
|
7
|
+
const port = ctx.config.port ?? 3e3;
|
|
8
|
+
ctx.provide("channel:api", {
|
|
9
|
+
type: "api",
|
|
10
|
+
port,
|
|
11
|
+
async start() {
|
|
12
|
+
},
|
|
13
|
+
async stop() {
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
ctx.log.info(`API channel configured on port ${port}`);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
index_default as default
|
|
21
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@parel/channel-api",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "PAREL plugin for API channel configuration.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/parall-hq/parel-opensource.git",
|
|
9
|
+
"directory": "js/plugins/channel-api"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/parall-hq/parel-opensource/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/parall-hq/parel-opensource#readme",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@parel/plugin-sdk": "0.1.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"tsup": "^8.0.0",
|
|
30
|
+
"typescript": "^5.8.0",
|
|
31
|
+
"vitest": "^3.0.0"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsup",
|
|
38
|
+
"test": "vitest run --passWithNoTests",
|
|
39
|
+
"lint": "biome check src/"
|
|
40
|
+
}
|
|
41
|
+
}
|