@tsed/swagger 8.5.0-beta.2 → 8.5.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, join } from "node:path";
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.contentType("text/html").body(await ctx.response.render(viewPath, {
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,EAAE,IAAI,EAAC,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAIjC;;;;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,WAAW,CAAC,WAAW,CAAC,CAAC,IAAI,CACxC,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"}
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.5.0-beta.2",
5
+ "version": "8.5.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.5.0-beta.2",
30
- "@tsed/openapi-utils": "8.5.0-beta.2",
31
- "@tsed/openspec": "8.5.0-beta.2",
29
+ "@tsed/normalize-path": "8.5.1",
30
+ "@tsed/openapi-utils": "8.5.1",
31
+ "@tsed/openspec": "8.5.1",
32
32
  "swagger-ui-dist": ">=5.17.14",
33
33
  "tslib": "2.7.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@tsed/barrels": "8.5.0-beta.2",
37
- "@tsed/core": "8.5.0-beta.2",
38
- "@tsed/di": "8.5.0-beta.2",
39
- "@tsed/json-mapper": "8.5.0-beta.2",
40
- "@tsed/openapi-utils": "8.5.0-beta.2",
41
- "@tsed/openspec": "8.5.0-beta.2",
42
- "@tsed/platform-http": "8.5.0-beta.2",
43
- "@tsed/schema": "8.5.0-beta.2",
44
- "@tsed/typescript": "8.5.0-beta.2",
36
+ "@tsed/barrels": "8.5.1",
37
+ "@tsed/core": "8.5.1",
38
+ "@tsed/di": "8.5.1",
39
+ "@tsed/json-mapper": "8.5.1",
40
+ "@tsed/openapi-utils": "8.5.1",
41
+ "@tsed/openspec": "8.5.1",
42
+ "@tsed/platform-http": "8.5.1",
43
+ "@tsed/schema": "8.5.1",
44
+ "@tsed/typescript": "8.5.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.5.0-beta.2"
51
+ "@tsed/platform-http": ">=8.5.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
  }
@@ -1,6 +1,8 @@
1
- import {basename, join} from "node:path";
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.contentType("text/html").body(
19
+ ctx.response.body(
18
20
  await ctx.response.render(viewPath, {
19
21
  spec: {},
20
22
  url: `${path}/${fileName}`,