@tsed/swagger 8.6.0-beta.1 → 8.6.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.
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { basename
|
|
1
|
+
import { basename } from "node:path";
|
|
2
|
+
import { join } from "node:path";
|
|
2
3
|
import { context } from "@tsed/di";
|
|
3
4
|
/**
|
|
4
5
|
* @ignore
|
|
@@ -9,7 +10,7 @@ export function indexMiddleware(viewPath, conf) {
|
|
|
9
10
|
return async () => {
|
|
10
11
|
const ctx = context();
|
|
11
12
|
const { path, options = {}, fileName, showExplorer, cssPath, jsPath, urls } = conf;
|
|
12
|
-
ctx.response.
|
|
13
|
+
ctx.response.body(await ctx.response.render(viewPath, {
|
|
13
14
|
spec: {},
|
|
14
15
|
url: `${path}/${fileName}`,
|
|
15
16
|
urls,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/indexMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"indexMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/indexMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAE/B,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAKjC;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB,EAAE,IAAwC;IACxF,OAAO,KAAK,IAAI,EAAE;QAChB,MAAM,GAAG,GAAG,OAAO,EAAE,CAAC;QACtB,MAAM,EAAC,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC;QAEjF,GAAG,CAAC,QAAQ,CAAC,IAAI,CACf,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE;YAClC,IAAI,EAAE,EAAE;YACR,GAAG,EAAE,GAAG,IAAI,IAAI,QAAQ,EAAE;YAC1B,IAAI;YACJ,YAAY;YACZ,OAAO,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;YACjD,MAAM,EAAE,MAAM,IAAI,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC9C,cAAc,EAAE,OAAO;SACxB,CAAC,CACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/swagger",
|
|
3
3
|
"description": "Swagger package for Ts.ED framework",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.6.
|
|
5
|
+
"version": "8.6.1",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -26,29 +26,29 @@
|
|
|
26
26
|
"test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@tsed/normalize-path": "8.6.
|
|
30
|
-
"@tsed/openapi-utils": "8.6.
|
|
31
|
-
"@tsed/openspec": "8.6.
|
|
29
|
+
"@tsed/normalize-path": "8.6.1",
|
|
30
|
+
"@tsed/openapi-utils": "8.6.1",
|
|
31
|
+
"@tsed/openspec": "8.6.1",
|
|
32
32
|
"swagger-ui-dist": ">=5.17.14",
|
|
33
33
|
"tslib": "2.7.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@tsed/barrels": "8.6.
|
|
37
|
-
"@tsed/core": "8.6.
|
|
38
|
-
"@tsed/di": "8.6.
|
|
39
|
-
"@tsed/json-mapper": "8.6.
|
|
40
|
-
"@tsed/openapi-utils": "8.6.
|
|
41
|
-
"@tsed/openspec": "8.6.
|
|
42
|
-
"@tsed/platform-http": "8.6.
|
|
43
|
-
"@tsed/schema": "8.6.
|
|
44
|
-
"@tsed/typescript": "8.6.
|
|
36
|
+
"@tsed/barrels": "8.6.1",
|
|
37
|
+
"@tsed/core": "8.6.1",
|
|
38
|
+
"@tsed/di": "8.6.1",
|
|
39
|
+
"@tsed/json-mapper": "8.6.1",
|
|
40
|
+
"@tsed/openapi-utils": "8.6.1",
|
|
41
|
+
"@tsed/openspec": "8.6.1",
|
|
42
|
+
"@tsed/platform-http": "8.6.1",
|
|
43
|
+
"@tsed/schema": "8.6.1",
|
|
44
|
+
"@tsed/typescript": "8.6.1",
|
|
45
45
|
"@types/swagger-ui-dist": "3.30.5",
|
|
46
46
|
"eslint": "9.12.0",
|
|
47
47
|
"typescript": "5.4.5",
|
|
48
48
|
"vitest": "2.1.2"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@tsed/platform-http": ">=8.6.
|
|
51
|
+
"@tsed/platform-http": ">=8.6.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependenciesMeta": {
|
|
54
54
|
"@tsed/platform-http": {
|
|
@@ -61,8 +61,5 @@
|
|
|
61
61
|
},
|
|
62
62
|
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/specs/swagger",
|
|
63
63
|
"author": "Romain Lenzotti",
|
|
64
|
-
"license": "MIT"
|
|
65
|
-
"publishConfig": {
|
|
66
|
-
"tag": "beta"
|
|
67
|
-
}
|
|
64
|
+
"license": "MIT"
|
|
68
65
|
}
|
package/readme.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<span> • </span>
|
|
21
21
|
<a href="https://tsed.dev/getting-started/">Getting started</a>
|
|
22
22
|
<span> • </span>
|
|
23
|
-
<a href="https://slack.tsed.
|
|
23
|
+
<a href="https://slack.tsed.dev">Slack</a>
|
|
24
24
|
<span> • </span>
|
|
25
25
|
<a href="https://twitter.com/TsED_io">Twitter</a>
|
|
26
26
|
</div>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {basename
|
|
1
|
+
import {basename} from "node:path";
|
|
2
|
+
import {join} from "node:path";
|
|
2
3
|
|
|
3
4
|
import {context} from "@tsed/di";
|
|
5
|
+
import {PlatformContext} from "@tsed/platform-http";
|
|
4
6
|
|
|
5
7
|
import {SwaggerSettings} from "../interfaces/SwaggerSettings.js";
|
|
6
8
|
|
|
@@ -14,7 +16,7 @@ export function indexMiddleware(viewPath: string, conf: SwaggerSettings & {urls:
|
|
|
14
16
|
const ctx = context();
|
|
15
17
|
const {path, options = {}, fileName, showExplorer, cssPath, jsPath, urls} = conf;
|
|
16
18
|
|
|
17
|
-
ctx.response.
|
|
19
|
+
ctx.response.body(
|
|
18
20
|
await ctx.response.render(viewPath, {
|
|
19
21
|
spec: {},
|
|
20
22
|
url: `${path}/${fileName}`,
|