@tsed/scalar 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
  export function indexMiddleware(viewPath, conf) {
4
5
  return async () => {
@@ -11,7 +12,7 @@ export function indexMiddleware(viewPath, conf) {
11
12
  },
12
13
  ...options
13
14
  };
14
- ctx.response.contentType("text/html").body(await ctx.response.render(viewPath, {
15
+ ctx.response.body(await ctx.response.render(viewPath, {
15
16
  cssPath: join(path, basename(cssPath)),
16
17
  cdn,
17
18
  serializedOptions: JSON.stringify(opts).split('"').join("""),
@@ -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,MAAM,UAAU,eAAe,CAAC,QAAgB,EAAE,IAAoB;IACpE,OAAO,KAAK,IAAI,EAAE;QAChB,MAAM,GAAG,GAAG,OAAO,EAAE,CAAC;QACtB,MAAM,EAAC,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAC,GAAG,IAAI,CAAC;QAE1D,MAAM,IAAI,GAAG;YACX,YAAY,EAAE,MAAM;YACpB,IAAI,EAAE;gBACJ,GAAG,EAAE,GAAG,IAAI,IAAI,QAAQ,EAAE;aAC3B;YACD,GAAG,OAAO;SACX,CAAC;QAEF,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,IAAI,CACxC,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE;YAClC,OAAO,EAAE,IAAI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CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tsed/scalar",
3
3
  "description": "Scalar 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",
@@ -27,27 +27,27 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@scalar/types": "^0.0.23",
30
- "@tsed/normalize-path": "8.5.0-beta.2",
31
- "@tsed/openapi-utils": "8.5.0-beta.2",
32
- "@tsed/openspec": "8.5.0-beta.2",
30
+ "@tsed/normalize-path": "8.5.1",
31
+ "@tsed/openapi-utils": "8.5.1",
32
+ "@tsed/openspec": "8.5.1",
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/openspec": "8.5.0-beta.2",
41
- "@tsed/platform-http": "8.5.0-beta.2",
42
- "@tsed/schema": "8.5.0-beta.2",
43
- "@tsed/swagger": "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/openspec": "8.5.1",
41
+ "@tsed/platform-http": "8.5.1",
42
+ "@tsed/schema": "8.5.1",
43
+ "@tsed/swagger": "8.5.1",
44
+ "@tsed/typescript": "8.5.1",
45
45
  "eslint": "9.12.0",
46
46
  "typescript": "5.4.5",
47
47
  "vitest": "2.1.2"
48
48
  },
49
49
  "peerDependencies": {
50
- "@tsed/platform-http": ">=8.5.0-beta.2"
50
+ "@tsed/platform-http": ">=8.5.1"
51
51
  },
52
52
  "peerDependenciesMeta": {
53
53
  "@tsed/platform-http": {
@@ -60,8 +60,5 @@
60
60
  },
61
61
  "homepage": "https://github.com/tsedio/tsed/tree/production/packages/specs/scalar",
62
62
  "author": "Romain Lenzotti",
63
- "license": "MIT",
64
- "publishConfig": {
65
- "tag": "beta"
66
- }
63
+ "license": "MIT"
67
64
  }
@@ -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
 
3
4
  import {context} from "@tsed/di";
4
5
 
@@ -17,7 +18,7 @@ export function indexMiddleware(viewPath: string, conf: ScalarSettings) {
17
18
  ...options
18
19
  };
19
20
 
20
- ctx.response.contentType("text/html").body(
21
+ ctx.response.body(
21
22
  await ctx.response.render(viewPath, {
22
23
  cssPath: join(path, basename(cssPath)),
23
24
  cdn,