node-pluginsmanager-plugin 6.4.3 → 6.4.5
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 +13 -13
- package/README.md +48 -48
- package/lib/cjs/components/Orchestrator.d.ts +5 -3
- package/lib/cjs/components/Server.d.ts +1 -1
- package/lib/cjs/components/Server.js +30 -20
- package/lib/cjs/main.d.cts +2 -2
- package/lib/cjs/utils/send.d.ts +3 -2
- package/package.json +97 -97
package/LICENSE
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
Copyright (c) 2024, Sébastien Vidal
|
|
2
|
-
|
|
3
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
4
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
5
|
-
copyright notice and this permission notice appear in all copies.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
8
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
9
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
10
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
11
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
12
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
13
|
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
1
|
+
Copyright (c) 2024, Sébastien Vidal
|
|
2
|
+
|
|
3
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
4
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
5
|
+
copyright notice and this permission notice appear in all copies.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
8
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
9
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
10
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
11
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
12
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
13
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
# node-pluginsmanager-plugin
|
|
2
|
-
An abstract parent plugin for node-pluginsmanager
|
|
3
|
-
|
|
4
|
-
[](https://travis-ci.org/Psychopoulet/node-pluginsmanager-plugin)
|
|
5
|
-
[](https://coveralls.io/github/Psychopoulet/node-pluginsmanager-plugin)
|
|
6
|
-
[](https://david-dm.org/Psychopoulet/node-pluginsmanager-plugin)
|
|
7
|
-
[](https://david-dm.org/Psychopoulet/node-pluginsmanager-plugin?type=dev)
|
|
8
|
-
[](https://github.com/Psychopoulet/node-pluginsmanager-plugin/issues)
|
|
9
|
-
[](https://github.com/Psychopoulet/node-pluginsmanager-plugin/pulls)
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
$ npm install node-pluginsmanager-plugin
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Features
|
|
18
|
-
|
|
19
|
-
* inheritable parent for node-pluginsmanager's plugins
|
|
20
|
-
* proper architecture for simple plugin creation
|
|
21
|
-
* heritable classes for each usage
|
|
22
|
-
* multi-files support
|
|
23
|
-
|
|
24
|
-
## Architecture
|
|
25
|
-
|
|
26
|
-

|
|
27
|
-
|
|
28
|
-
[=> See doc](https://github.com/Psychopoulet/node-pluginsmanager-plugin/tree/master/documentation/architecture.md)
|
|
29
|
-
|
|
30
|
-
### Resume
|
|
31
|
-
|
|
32
|
-
* [Descriptor](https://github.com/Psychopoulet/node-pluginsmanager-plugin/tree/master/documentation/Descriptor.md) : OpenAPI (v3) description for Server and Mediator endpoints (this is NOT a js file, but a json/xaml/whatever OpenAPI file)
|
|
33
|
-
* [Mediator](https://github.com/Psychopoulet/node-pluginsmanager-plugin/tree/master/documentation/Mediator.md) : contains the plugin's logic (communication with targeted device/api/whatever)
|
|
34
|
-
* [Server](https://github.com/Psychopoulet/node-pluginsmanager-plugin/tree/master/documentation/Server.md) : expose plugin's roots to external use (API)
|
|
35
|
-
* [Orchestrator](https://github.com/Psychopoulet/node-pluginsmanager-plugin/tree/master/documentation/Orchestrator.md) : plugin's data (extracted from plugin's package.json) and Descriptor, Mediator & Server initializer
|
|
36
|
-
|
|
37
|
-
## Tests
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
$ git clone git://github.com/Psychopoulet/node-pluginsmanager-plugin.git
|
|
41
|
-
$ cd ./node-pluginsmanager-plugin
|
|
42
|
-
$ npm install
|
|
43
|
-
$ npm run-script tests
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## License
|
|
47
|
-
|
|
48
|
-
[ISC](LICENSE)
|
|
1
|
+
# node-pluginsmanager-plugin
|
|
2
|
+
An abstract parent plugin for node-pluginsmanager
|
|
3
|
+
|
|
4
|
+
[](https://travis-ci.org/Psychopoulet/node-pluginsmanager-plugin)
|
|
5
|
+
[](https://coveralls.io/github/Psychopoulet/node-pluginsmanager-plugin)
|
|
6
|
+
[](https://david-dm.org/Psychopoulet/node-pluginsmanager-plugin)
|
|
7
|
+
[](https://david-dm.org/Psychopoulet/node-pluginsmanager-plugin?type=dev)
|
|
8
|
+
[](https://github.com/Psychopoulet/node-pluginsmanager-plugin/issues)
|
|
9
|
+
[](https://github.com/Psychopoulet/node-pluginsmanager-plugin/pulls)
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
$ npm install node-pluginsmanager-plugin
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
* inheritable parent for node-pluginsmanager's plugins
|
|
20
|
+
* proper architecture for simple plugin creation
|
|
21
|
+
* heritable classes for each usage
|
|
22
|
+
* multi-files support
|
|
23
|
+
|
|
24
|
+
## Architecture
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
[=> See doc](https://github.com/Psychopoulet/node-pluginsmanager-plugin/tree/master/documentation/architecture.md)
|
|
29
|
+
|
|
30
|
+
### Resume
|
|
31
|
+
|
|
32
|
+
* [Descriptor](https://github.com/Psychopoulet/node-pluginsmanager-plugin/tree/master/documentation/Descriptor.md) : OpenAPI (v3) description for Server and Mediator endpoints (this is NOT a js file, but a json/xaml/whatever OpenAPI file)
|
|
33
|
+
* [Mediator](https://github.com/Psychopoulet/node-pluginsmanager-plugin/tree/master/documentation/Mediator.md) : contains the plugin's logic (communication with targeted device/api/whatever)
|
|
34
|
+
* [Server](https://github.com/Psychopoulet/node-pluginsmanager-plugin/tree/master/documentation/Server.md) : expose plugin's roots to external use (API)
|
|
35
|
+
* [Orchestrator](https://github.com/Psychopoulet/node-pluginsmanager-plugin/tree/master/documentation/Orchestrator.md) : plugin's data (extracted from plugin's package.json) and Descriptor, Mediator & Server initializer
|
|
36
|
+
|
|
37
|
+
## Tests
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
$ git clone git://github.com/Psychopoulet/node-pluginsmanager-plugin.git
|
|
41
|
+
$ cd ./node-pluginsmanager-plugin
|
|
42
|
+
$ npm install
|
|
43
|
+
$ npm run-script tests
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
[ISC](LICENSE)
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import MediatorUser from "./MediatorUser";
|
|
2
|
-
import Server
|
|
3
|
-
import
|
|
2
|
+
import Server from "./Server";
|
|
3
|
+
import { IncomingMessage } from "node:http";
|
|
4
4
|
import type { Server as SocketIOServer } from "socket.io";
|
|
5
|
+
import type { Server as WebSocketServer } from "ws";
|
|
6
|
+
import type { iServerResponse } from "./Server";
|
|
5
7
|
import type { tLogger } from "./DescriptorUser";
|
|
6
8
|
export interface iOrchestratorOptions {
|
|
7
9
|
"externalRessourcesDirectory": string;
|
|
@@ -43,7 +45,7 @@ export default class Orchestrator extends MediatorUser {
|
|
|
43
45
|
enableCheckResponse(): this;
|
|
44
46
|
disableCors(): this;
|
|
45
47
|
enableCors(): this;
|
|
46
|
-
appMiddleware(req:
|
|
48
|
+
appMiddleware(req: IncomingMessage, res: iServerResponse, next: () => void): void;
|
|
47
49
|
socketMiddleware(server: WebSocketServer | SocketIOServer): void;
|
|
48
50
|
load(...data: any): Promise<void>;
|
|
49
51
|
destroy(...data: any): Promise<void>;
|
|
@@ -38,7 +38,7 @@ export default class Server extends MediatorUser {
|
|
|
38
38
|
enableCheckResponse(): this;
|
|
39
39
|
disableCors(): this;
|
|
40
40
|
enableCors(): this;
|
|
41
|
-
appMiddleware(
|
|
41
|
+
appMiddleware(_req: IncomingMessage, res: iServerResponse, next: (err?: Error) => void): void;
|
|
42
42
|
socketMiddleware(socketServer: WebSocketServer | SocketIOServer): void;
|
|
43
43
|
push(command: string, data?: any, log?: boolean): this;
|
|
44
44
|
getClients(): iClient[];
|
|
@@ -4,9 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
// natives
|
|
8
|
-
const node_url_1 = require("node:url");
|
|
9
7
|
const node_os_1 = require("node:os");
|
|
8
|
+
const node_url_1 = require("node:url");
|
|
10
9
|
// externals
|
|
11
10
|
const uniqid_1 = __importDefault(require("uniqid"));
|
|
12
11
|
// locals
|
|
@@ -102,7 +101,7 @@ class Server extends MediatorUser_1.default {
|
|
|
102
101
|
this._cors = true;
|
|
103
102
|
return this;
|
|
104
103
|
}
|
|
105
|
-
appMiddleware(
|
|
104
|
+
appMiddleware(_req, res, next) {
|
|
106
105
|
if (!this._Descriptor) {
|
|
107
106
|
return next();
|
|
108
107
|
}
|
|
@@ -111,31 +110,42 @@ class Server extends MediatorUser_1.default {
|
|
|
111
110
|
}
|
|
112
111
|
this.checkDescriptor().then(() => {
|
|
113
112
|
var _a, _b, _c;
|
|
113
|
+
const req = Object.assign(_req);
|
|
114
114
|
// parse
|
|
115
115
|
const { pathname, query } = (0, node_url_1.parse)(req.url, true);
|
|
116
116
|
req.method = req.method ? req.method.toLowerCase() : "get";
|
|
117
117
|
req.pattern = null === (0, checkNonEmptyString_1.checkNonEmptyStringSync)("pattern", req.pattern) ? req.pattern : (0, extractPattern_1.default)(this._Descriptor.paths, pathname, req.method);
|
|
118
|
-
if (
|
|
118
|
+
if (0 >= req.pattern.length) {
|
|
119
119
|
return next();
|
|
120
120
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
req.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
121
|
+
// extract specific data
|
|
122
|
+
try {
|
|
123
|
+
// workaround for express 5
|
|
124
|
+
if (Object.getPrototypeOf(req).app) {
|
|
125
|
+
Object.defineProperty(req, "query", Object.assign(Object.assign({}, Object.getOwnPropertyDescriptor(req, "query")), { "value": req.query, "writable": true }));
|
|
126
|
+
}
|
|
127
|
+
req.validatedIp = null === (0, checkNonEmptyString_1.checkNonEmptyStringSync)("ip", req.validatedIp) ? req.validatedIp : (0, extractIp_1.default)(req);
|
|
128
|
+
// url
|
|
129
|
+
req.params = null === (0, checkNonEmptyObject_1.checkNonEmptyObjectSync)("params", req.params) ? req.params : (0, extractParams_1.default)(req.pattern, pathname);
|
|
130
|
+
req.query = null === (0, checkNonEmptyObject_1.checkNonEmptyObjectSync)("query", req.query) ? req.query : query !== null && query !== void 0 ? query : {};
|
|
131
|
+
if (null !== (0, checkNonEmptyObject_1.checkNonEmptyObjectSync)("headers", req.headers)) {
|
|
132
|
+
req.headers = null === (0, checkNonEmptyObject_1.checkNonEmptyObjectSync)("header", req.header) ? req.header : {};
|
|
133
|
+
}
|
|
134
|
+
if (null !== (0, checkNonEmptyObject_1.checkNonEmptyObjectSync)("cookies", req.cookies)) {
|
|
135
|
+
req.cookies = null === (0, checkNonEmptyObject_1.checkNonEmptyObjectSync)("header", req.cookie) ? req.cookie : (0, extractCookies_1.default)(req);
|
|
136
|
+
}
|
|
137
|
+
// ensure content length formate
|
|
138
|
+
if ("undefined" === typeof req.headers["content-length"]) {
|
|
139
|
+
req.headers["content-length"] = 0;
|
|
140
|
+
}
|
|
141
|
+
else if ("string" === typeof req.headers["content-length"]) {
|
|
142
|
+
req.headers["content-length"] = parseInt(req.headers["content-length"], 10);
|
|
143
|
+
}
|
|
134
144
|
}
|
|
135
|
-
|
|
136
|
-
|
|
145
|
+
catch (e) {
|
|
146
|
+
return next(e);
|
|
137
147
|
}
|
|
138
|
-
if (!
|
|
148
|
+
if (!this._Descriptor.paths[req.pattern] || !this._Descriptor.paths[req.pattern][req.method]) {
|
|
139
149
|
return next();
|
|
140
150
|
}
|
|
141
151
|
const { operationId } = this._Descriptor.paths[req.pattern][req.method];
|
package/lib/cjs/main.d.cts
CHANGED
|
@@ -24,9 +24,9 @@ import DescriptorUser, { type iDescriptorUserOptions, type tLogType, type tLogge
|
|
|
24
24
|
import Mediator, { type iUrlAllowedParameters } from "./components/Mediator";
|
|
25
25
|
import MediatorUser, { type iMediatorUserOptions } from "./components/MediatorUser";
|
|
26
26
|
import Orchestrator, { type iOrchestratorOptions } from "./components/Orchestrator";
|
|
27
|
-
import Server, { type iClient, type
|
|
27
|
+
import Server, { type iClient, type iServerResponse } from "./components/Server";
|
|
28
28
|
import UnauthorizedError from "./components/errors/UnauthorizedError";
|
|
29
29
|
import NotFoundError from "./components/errors/NotFoundError";
|
|
30
30
|
import LockedError from "./components/errors/LockedError";
|
|
31
|
-
export type { tLogType, tLogger, iUrlAllowedParameters, iClient,
|
|
31
|
+
export type { tLogType, tLogger, iUrlAllowedParameters, iClient, iServerResponse };
|
|
32
32
|
export { DescriptorUser, type iDescriptorUserOptions, Mediator, MediatorUser, type iMediatorUserOptions, Orchestrator, type iOrchestratorOptions, Server, UnauthorizedError, NotFoundError, LockedError };
|
package/lib/cjs/utils/send.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { IncomingMessage } from "node:http";
|
|
2
|
+
import type { iServerResponse } from "../components/Server";
|
|
3
|
+
export default function send(req: IncomingMessage, res: iServerResponse, code: number, content: any, options: {
|
|
3
4
|
"apiVersion": string;
|
|
4
5
|
"cors": boolean;
|
|
5
6
|
"mime": string;
|
package/package.json
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
"name": "node-pluginsmanager-plugin",
|
|
4
|
-
"version": "6.4.
|
|
5
|
-
"description": "An abstract parent plugin for node-pluginsmanager",
|
|
6
|
-
|
|
7
|
-
"type": "commonjs",
|
|
8
|
-
"typings": "./lib/cjs/main.d.cts",
|
|
9
|
-
"main": "./lib/cjs/main.cjs",
|
|
10
|
-
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"require": {
|
|
14
|
-
"types": "./lib/cjs/main.d.cts",
|
|
15
|
-
"default": "./lib/cjs/main.cjs"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
"scripts": {
|
|
21
|
-
|
|
22
|
-
"prepare": "npx husky",
|
|
23
|
-
|
|
24
|
-
"clean": "npx rimraf lib/cjs",
|
|
25
|
-
"build": "npm run-script clean && npx tsc --project \"./tsconfig.json\"",
|
|
26
|
-
|
|
27
|
-
"lint": "npx eslint --config .eslintrc-src.js --ext .cts,.ts ./lib/src/**/* && npx eslint --config .eslintrc-tests.js ./bin/*.js ./test/**/*.js",
|
|
28
|
-
"check-requires": "npx used-deps-analyzer \"./package.json\" \"./lib/src\" --no-dev --overkill \"fs-extra\" \"node-promfs\"",
|
|
29
|
-
"check-updates": "npx check-version-modules",
|
|
30
|
-
"unit-tests": "npm run-script build && npx nyc --reporter=html --reporter=text mocha",
|
|
31
|
-
|
|
32
|
-
"tests": "npm run-script lint && npm run-script check-requires && npm run-script check-updates && npm run-script unit-tests"
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
"files": [
|
|
37
|
-
"/bin",
|
|
38
|
-
"/lib/cjs",
|
|
39
|
-
"/public"
|
|
40
|
-
],
|
|
41
|
-
"engines": {
|
|
42
|
-
"node": ">=16.0.0"
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"@apidevtools/swagger-parser": "
|
|
47
|
-
"express-openapi-validate": "0.6.1",
|
|
48
|
-
"uniqid": "5.4.0"
|
|
49
|
-
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@types/express": "
|
|
52
|
-
"@types/node": "
|
|
53
|
-
"@types/socket.io": "3.0.2",
|
|
54
|
-
"@types/uniqid": "5.3.4",
|
|
55
|
-
"@types/ws": "8.
|
|
56
|
-
"check-version-modules": "2.1.3",
|
|
57
|
-
"colors": "1.4.0",
|
|
58
|
-
"eslint-plugin-personnallinter": "git+ssh://git@github.com/Psychopoulet/eslint-plugin-personnallinter",
|
|
59
|
-
"express": "
|
|
60
|
-
"husky": "9.1.7",
|
|
61
|
-
"mocha": "11.1
|
|
62
|
-
"nyc": "17.1.0",
|
|
63
|
-
"openapi-types": "12.1.3",
|
|
64
|
-
"rimraf": "6.0.1",
|
|
65
|
-
"socket.io": "4.8.1",
|
|
66
|
-
"socket.io-client": "4.8.1",
|
|
67
|
-
"typescript": "5.
|
|
68
|
-
"used-deps-analyzer": "0.1.8",
|
|
69
|
-
"ws": "8.18.
|
|
70
|
-
},
|
|
71
|
-
"optionalDependencies": {},
|
|
72
|
-
|
|
73
|
-
"husky": {
|
|
74
|
-
"hooks": {
|
|
75
|
-
"pre-commit": "npm run-script lint",
|
|
76
|
-
"pre-push": "npm run-script unit-tests",
|
|
77
|
-
"pre-receive": "npm run-script tests"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
"keywords": [
|
|
81
|
-
"plugin",
|
|
82
|
-
"manage",
|
|
83
|
-
"gestion"
|
|
84
|
-
],
|
|
85
|
-
"author": "Sébastien VIDAL",
|
|
86
|
-
"license": "ISC",
|
|
87
|
-
|
|
88
|
-
"homepage": "https://github.com/Psychopoulet/node-pluginsmanager-plugin#readme",
|
|
89
|
-
"repository": {
|
|
90
|
-
"type": "git",
|
|
91
|
-
"url": "git://github.com/Psychopoulet/node-pluginsmanager-plugin"
|
|
92
|
-
},
|
|
93
|
-
"bugs": {
|
|
94
|
-
"url": "https://github.com/Psychopoulet/node-pluginsmanager-plugin/issues"
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
}
|
|
1
|
+
{
|
|
2
|
+
|
|
3
|
+
"name": "node-pluginsmanager-plugin",
|
|
4
|
+
"version": "6.4.5",
|
|
5
|
+
"description": "An abstract parent plugin for node-pluginsmanager",
|
|
6
|
+
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"typings": "./lib/cjs/main.d.cts",
|
|
9
|
+
"main": "./lib/cjs/main.cjs",
|
|
10
|
+
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"require": {
|
|
14
|
+
"types": "./lib/cjs/main.d.cts",
|
|
15
|
+
"default": "./lib/cjs/main.cjs"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
"scripts": {
|
|
21
|
+
|
|
22
|
+
"prepare": "npx husky",
|
|
23
|
+
|
|
24
|
+
"clean": "npx rimraf lib/cjs",
|
|
25
|
+
"build": "npm run-script clean && npx tsc --project \"./tsconfig.json\"",
|
|
26
|
+
|
|
27
|
+
"lint": "npx eslint --config .eslintrc-src.js --ext .cts,.ts ./lib/src/**/* && npx eslint --config .eslintrc-tests.js ./bin/*.js ./test/**/*.js",
|
|
28
|
+
"check-requires": "npx used-deps-analyzer \"./package.json\" \"./lib/src\" --no-dev --overkill \"fs-extra\" \"node-promfs\"",
|
|
29
|
+
"check-updates": "npx check-version-modules",
|
|
30
|
+
"unit-tests": "npm run-script build && npx nyc --reporter=html --reporter=text mocha",
|
|
31
|
+
|
|
32
|
+
"tests": "npm run-script lint && npm run-script check-requires && npm run-script check-updates && npm run-script unit-tests"
|
|
33
|
+
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
"files": [
|
|
37
|
+
"/bin",
|
|
38
|
+
"/lib/cjs",
|
|
39
|
+
"/public"
|
|
40
|
+
],
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=16.0.0"
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@apidevtools/swagger-parser": "12.0.0",
|
|
47
|
+
"express-openapi-validate": "0.6.1",
|
|
48
|
+
"uniqid": "5.4.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/express": "5.0.3",
|
|
52
|
+
"@types/node": "24.3.0",
|
|
53
|
+
"@types/socket.io": "3.0.2",
|
|
54
|
+
"@types/uniqid": "5.3.4",
|
|
55
|
+
"@types/ws": "8.18.1",
|
|
56
|
+
"check-version-modules": "2.1.3",
|
|
57
|
+
"colors": "1.4.0",
|
|
58
|
+
"eslint-plugin-personnallinter": "git+ssh://git@github.com/Psychopoulet/eslint-plugin-personnallinter",
|
|
59
|
+
"express": "5.1.0",
|
|
60
|
+
"husky": "9.1.7",
|
|
61
|
+
"mocha": "11.7.1",
|
|
62
|
+
"nyc": "17.1.0",
|
|
63
|
+
"openapi-types": "12.1.3",
|
|
64
|
+
"rimraf": "6.0.1",
|
|
65
|
+
"socket.io": "4.8.1",
|
|
66
|
+
"socket.io-client": "4.8.1",
|
|
67
|
+
"typescript": "5.9.2",
|
|
68
|
+
"used-deps-analyzer": "0.1.8",
|
|
69
|
+
"ws": "8.18.3"
|
|
70
|
+
},
|
|
71
|
+
"optionalDependencies": {},
|
|
72
|
+
|
|
73
|
+
"husky": {
|
|
74
|
+
"hooks": {
|
|
75
|
+
"pre-commit": "npm run-script lint",
|
|
76
|
+
"pre-push": "npm run-script unit-tests",
|
|
77
|
+
"pre-receive": "npm run-script tests"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"keywords": [
|
|
81
|
+
"plugin",
|
|
82
|
+
"manage",
|
|
83
|
+
"gestion"
|
|
84
|
+
],
|
|
85
|
+
"author": "Sébastien VIDAL",
|
|
86
|
+
"license": "ISC",
|
|
87
|
+
|
|
88
|
+
"homepage": "https://github.com/Psychopoulet/node-pluginsmanager-plugin#readme",
|
|
89
|
+
"repository": {
|
|
90
|
+
"type": "git",
|
|
91
|
+
"url": "git://github.com/Psychopoulet/node-pluginsmanager-plugin"
|
|
92
|
+
},
|
|
93
|
+
"bugs": {
|
|
94
|
+
"url": "https://github.com/Psychopoulet/node-pluginsmanager-plugin/issues"
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
}
|