xypriss-swagger 1.0.39 → 1.0.41
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/cjs/index.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +15 -18
- package/xypriss.config.jsonc +2 -2
- package/xypriss.plugin.xsig +6 -6
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/index.ts"],"sourcesContent":["import { logger, Logger } from \"./configs/Logger\";\nimport { meta, toPascalCase } from \"./configs/meta\";\nimport { SwaggerServer } from \"./server\";\nimport { SwaggerConfig } from \"./types\";\nimport { Plugin } from \"xypriss\"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/index.ts"],"sourcesContent":["import { logger, Logger } from \"./configs/Logger\";\nimport { meta, toPascalCase } from \"./configs/meta\";\nimport { SwaggerServer } from \"./server\";\nimport { SwaggerConfig } from \"./types\";\nimport { Plugin } from \"xypriss\"; \n\nconst pluginName = toPascalCase(meta.name);\nexport function SwaggerPlugin(config: SwaggerConfig) {\n return Plugin.create(\n {\n name: meta.name,\n version: meta.version,\n description: meta.description,\n onRegister(_error) {\n const log = Logger.for(\"Bootstrap\");\n log.info(\"Starting swagger plugin...\");\n if (_error) {\n log.error(pluginName + \" plugin failed to start:\", _error);\n }\n },\n onServerStart(server) {\n logger.success(pluginName + \" plugin has started\");\n\n server.app.get(\"/swagger\", (_req: any, res: any) => {\n res.redirect(`http://localhost:${config.port}`);\n });\n },\n onAuxiliaryServerDeploy(ops, server) {\n SwaggerServer(config, ops, server);\n },\n }, \n __sys__.__root__,\n );\n}"],"names":["pluginName","toPascalCase","meta","name","config","Plugin","create","version","description","onRegister","_error","log","Logger","for","info","error","onServerStart","server","logger","success","app","get","_req","res","redirect","port","onAuxiliaryServerDeploy","ops","SwaggerServer","__sys__","__root__"],"mappings":"+HAMA,MAAMA,EAAaC,EAAAA,aAAaC,EAAAA,KAAKC,4BAC/B,SAAwBC,GAC1B,OAAOC,EAAAA,OAAOC,OACV,CACIH,KAAMD,EAAAA,KAAKC,KACXI,QAASL,EAAAA,KAAKK,QACdC,YAAaN,EAAAA,KAAKM,YAClB,UAAAC,CAAWC,GACP,MAAMC,EAAMC,EAAAA,OAAOC,IAAI,aACvBF,EAAIG,KAAK,8BACLJ,GACAC,EAAII,MAAMf,EAAa,2BAA4BU,EAE3D,EACA,aAAAM,CAAcC,GACVC,SAAOC,QAAQnB,EAAa,uBAE5BiB,EAAOG,IAAIC,IAAI,WAAY,CAACC,EAAWC,KACnCA,EAAIC,SAAS,oBAAoBpB,EAAOqB,SAEhD,EACA,uBAAAC,CAAwBC,EAAKV,GACzBW,EAAAA,cAAcxB,EAAQuB,EAC1B,GAEJE,QAAQC,SAEhB"}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/index.ts"],"sourcesContent":["import { logger, Logger } from \"./configs/Logger\";\nimport { meta, toPascalCase } from \"./configs/meta\";\nimport { SwaggerServer } from \"./server\";\nimport { SwaggerConfig } from \"./types\";\nimport { Plugin } from \"xypriss\"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/index.ts"],"sourcesContent":["import { logger, Logger } from \"./configs/Logger\";\nimport { meta, toPascalCase } from \"./configs/meta\";\nimport { SwaggerServer } from \"./server\";\nimport { SwaggerConfig } from \"./types\";\nimport { Plugin } from \"xypriss\"; \n\nconst pluginName = toPascalCase(meta.name);\nexport function SwaggerPlugin(config: SwaggerConfig) {\n return Plugin.create(\n {\n name: meta.name,\n version: meta.version,\n description: meta.description,\n onRegister(_error) {\n const log = Logger.for(\"Bootstrap\");\n log.info(\"Starting swagger plugin...\");\n if (_error) {\n log.error(pluginName + \" plugin failed to start:\", _error);\n }\n },\n onServerStart(server) {\n logger.success(pluginName + \" plugin has started\");\n\n server.app.get(\"/swagger\", (_req: any, res: any) => {\n res.redirect(`http://localhost:${config.port}`);\n });\n },\n onAuxiliaryServerDeploy(ops, server) {\n SwaggerServer(config, ops, server);\n },\n }, \n __sys__.__root__,\n );\n}"],"names":["pluginName","toPascalCase","meta","name","SwaggerPlugin","config","Plugin","create","version","description","onRegister","_error","log","Logger","for","info","error","onServerStart","server","logger","success","app","get","_req","res","redirect","port","onAuxiliaryServerDeploy","ops","SwaggerServer","__sys__","__root__"],"mappings":"iMAMA,MAAMA,EAAaC,EAAaC,EAAKC,MAC/B,SAAUC,EAAcC,GAC1B,OAAOC,EAAOC,OACV,CACIJ,KAAMD,EAAKC,KACXK,QAASN,EAAKM,QACdC,YAAaP,EAAKO,YAClB,UAAAC,CAAWC,GACP,MAAMC,EAAMC,EAAOC,IAAI,aACvBF,EAAIG,KAAK,8BACLJ,GACAC,EAAII,MAAMhB,EAAa,2BAA4BW,EAE3D,EACA,aAAAM,CAAcC,GACVC,EAAOC,QAAQpB,EAAa,uBAE5BkB,EAAOG,IAAIC,IAAI,WAAY,CAACC,EAAWC,KACnCA,EAAIC,SAAS,oBAAoBpB,EAAOqB,SAEhD,EACA,uBAAAC,CAAwBC,EAAKV,GACzBW,EAAcxB,EAAQuB,EAC1B,GAEJE,QAAQC,SAEhB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xypriss-swagger",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.41",
|
|
4
4
|
"description": "Auto-documentation plugin for XyPriss Router V2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -13,25 +13,24 @@
|
|
|
13
13
|
"types": "./dist/index.d.ts"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "rm -rf dist && NODE_OPTIONS='--max-old-space-size=4096' npx rollup -c rollup.config.js",
|
|
18
|
-
"dev": "rollup -c -w",
|
|
19
|
-
"prepublishOnly": "xfpm run build && xfpm sign ./ --min-version 1.0.0 --fix"
|
|
20
|
-
},
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"nehoid": "^2.2.1",
|
|
23
|
-
"xypriss-security": "^2.1.16",
|
|
24
|
-
"xypriss": "^9.9.3"
|
|
25
|
-
},
|
|
26
16
|
"files": [
|
|
27
17
|
"dist/",
|
|
28
|
-
"template",
|
|
29
18
|
"LICENSE",
|
|
30
19
|
"README.md",
|
|
31
20
|
"package.json",
|
|
32
21
|
"xypriss.plugin.xsig",
|
|
33
22
|
"xypriss.config.jsonc"
|
|
34
23
|
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "rm -rf dist && NODE_OPTIONS='--max-old-space-size=4096' npx rollup -c rollup.config.js",
|
|
26
|
+
"dev": "rollup -c -w",
|
|
27
|
+
"inspect": "xfpm run src/inspect.ts",
|
|
28
|
+
"prepublishOnly": "xfpm run build && xfpm sign -m 1.0.40 --fix"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"nehoid": "^2.2.1",
|
|
32
|
+
"xypriss-security": "^2.1.16"
|
|
33
|
+
},
|
|
35
34
|
"devDependencies": {
|
|
36
35
|
"@rollup/plugin-commonjs": "^29.0.2",
|
|
37
36
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -44,16 +43,14 @@
|
|
|
44
43
|
"tslib": "^2.8.1",
|
|
45
44
|
"typescript": "^5.0.0"
|
|
46
45
|
},
|
|
47
|
-
"peerDependencies": {
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"xypriss": ">=9.9.4"
|
|
48
|
+
},
|
|
48
49
|
"xfpm": {
|
|
49
50
|
"permissions": [
|
|
50
|
-
"XHS.HOOK.HTTP.REQUEST",
|
|
51
|
-
"XHS.PERM.SECURITY.SENSITIVE_DATA",
|
|
52
51
|
"XHS.HOOK.LIFECYCLE.REGISTER",
|
|
53
52
|
"XHS.HOOK.LIFECYCLE.SERVER_START",
|
|
54
|
-
"XHS.PERM.OPS.AUXILIARY_SERVER"
|
|
55
|
-
"XHS.PERM.SECURITY.CONFIGS"
|
|
53
|
+
"XHS.PERM.OPS.AUXILIARY_SERVER"
|
|
56
54
|
]
|
|
57
55
|
}
|
|
58
56
|
}
|
|
59
|
-
|
package/xypriss.config.jsonc
CHANGED
package/xypriss.plugin.xsig
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- XYPRISS SIGNATURE (G3) ---
|
|
2
|
-
Manifest: xypriss-swagger@1.0.
|
|
3
|
-
Min-Engine: 1.0.
|
|
4
|
-
Fingerprint: sha256:
|
|
2
|
+
Manifest: xypriss-swagger@1.0.41
|
|
3
|
+
Min-Engine: 1.0.40
|
|
4
|
+
Fingerprint: sha256:07a33451bbc2a4cd1d34675e6a16614977a94f7f94ba34676f4a8035aae10273
|
|
5
5
|
Identity: ed25519:a58b17a3e46302dd3ae5538bc9b8b991c57f4c5fe2e7d8ac41803de818d947f4
|
|
6
|
-
Privileges: XHS.HOOK.
|
|
7
|
-
Expires: 2027-04-
|
|
6
|
+
Privileges: XHS.HOOK.LIFECYCLE.REGISTER,XHS.HOOK.LIFECYCLE.SERVER_START,XHS.PERM.OPS.AUXILIARY_SERVER
|
|
7
|
+
Expires: 2027-04-30T14:25:13Z
|
|
8
8
|
Revision: sha256:none
|
|
9
9
|
--- BEGIN CRYPTOGRAPHIC PROOF ---
|
|
10
|
-
base64:
|
|
10
|
+
base64:VtTwjcGesDgs+0hdxgsN99hTCPvW/DW5bT4ZoGClj1wvDiEIgPunZQTS+72AIPOnO1mrlQSQVa3L27bDThPiBw==
|
|
11
11
|
--- END XYPRISS SIGNATURE ---
|