@tsed/swagger 8.4.7 → 8.5.0-beta.2

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,5 +1,4 @@
1
- import { basename } from "node:path";
2
- import { join } from "node:path";
1
+ import { basename, join } from "node:path";
3
2
  import { context } from "@tsed/di";
4
3
  /**
5
4
  * @ignore
@@ -10,7 +9,7 @@ export function indexMiddleware(viewPath, conf) {
10
9
  return async () => {
11
10
  const ctx = context();
12
11
  const { path, options = {}, fileName, showExplorer, cssPath, jsPath, urls } = conf;
13
- ctx.response.body(await ctx.response.render(viewPath, {
12
+ ctx.response.contentType("text/html").body(await ctx.response.render(viewPath, {
14
13
  spec: {},
15
14
  url: `${path}/${fileName}`,
16
15
  urls,
@@ -1 +1 @@
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"}
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"}
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.4.7",
5
+ "version": "8.5.0-beta.2",
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.4.7",
30
- "@tsed/openapi-utils": "8.4.7",
31
- "@tsed/openspec": "8.4.7",
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",
32
32
  "swagger-ui-dist": ">=5.17.14",
33
33
  "tslib": "2.7.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@tsed/barrels": "8.4.7",
37
- "@tsed/core": "8.4.7",
38
- "@tsed/di": "8.4.7",
39
- "@tsed/json-mapper": "8.4.7",
40
- "@tsed/openapi-utils": "8.4.7",
41
- "@tsed/openspec": "8.4.7",
42
- "@tsed/platform-http": "8.4.7",
43
- "@tsed/schema": "8.4.7",
44
- "@tsed/typescript": "8.4.7",
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",
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.4.7"
51
+ "@tsed/platform-http": ">=8.5.0-beta.2"
52
52
  },
53
53
  "peerDependenciesMeta": {
54
54
  "@tsed/platform-http": {
@@ -61,5 +61,8 @@
61
61
  },
62
62
  "homepage": "https://github.com/tsedio/tsed/tree/production/packages/specs/swagger",
63
63
  "author": "Romain Lenzotti",
64
- "license": "MIT"
64
+ "license": "MIT",
65
+ "publishConfig": {
66
+ "tag": "beta"
67
+ }
65
68
  }
@@ -1,8 +1,6 @@
1
- import {basename} from "node:path";
2
- import {join} from "node:path";
1
+ import {basename, join} from "node:path";
3
2
 
4
3
  import {context} from "@tsed/di";
5
- import {PlatformContext} from "@tsed/platform-http";
6
4
 
7
5
  import {SwaggerSettings} from "../interfaces/SwaggerSettings.js";
8
6
 
@@ -16,7 +14,7 @@ export function indexMiddleware(viewPath: string, conf: SwaggerSettings & {urls:
16
14
  const ctx = context();
17
15
  const {path, options = {}, fileName, showExplorer, cssPath, jsPath, urls} = conf;
18
16
 
19
- ctx.response.body(
17
+ ctx.response.contentType("text/html").body(
20
18
  await ctx.response.render(viewPath, {
21
19
  spec: {},
22
20
  url: `${path}/${fileName}`,