@tsed/scalar 8.4.7 → 8.5.0-beta.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,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
  export function indexMiddleware(viewPath, conf) {
5
4
  return async () => {
@@ -12,7 +11,7 @@ export function indexMiddleware(viewPath, conf) {
12
11
  },
13
12
  ...options
14
13
  };
15
- ctx.response.body(await ctx.response.render(viewPath, {
14
+ ctx.response.contentType("text/html").body(await ctx.response.render(viewPath, {
16
15
  cssPath: join(path, basename(cssPath)),
17
16
  cdn,
18
17
  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,EAAC,MAAM,WAAW,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAE/B,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,IAAI,CACf,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE;YAClC,OAAO,EAAE,I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AAC;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.4.7",
5
+ "version": "8.5.0-beta.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.4.7",
31
- "@tsed/openapi-utils": "8.4.7",
32
- "@tsed/openspec": "8.4.7",
30
+ "@tsed/normalize-path": "8.5.0-beta.1",
31
+ "@tsed/openapi-utils": "8.5.0-beta.1",
32
+ "@tsed/openspec": "8.5.0-beta.1",
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/openspec": "8.4.7",
41
- "@tsed/platform-http": "8.4.7",
42
- "@tsed/schema": "8.4.7",
43
- "@tsed/swagger": "8.4.7",
44
- "@tsed/typescript": "8.4.7",
36
+ "@tsed/barrels": "8.5.0-beta.1",
37
+ "@tsed/core": "8.5.0-beta.1",
38
+ "@tsed/di": "8.5.0-beta.1",
39
+ "@tsed/json-mapper": "8.5.0-beta.1",
40
+ "@tsed/openspec": "8.5.0-beta.1",
41
+ "@tsed/platform-http": "8.5.0-beta.1",
42
+ "@tsed/schema": "8.5.0-beta.1",
43
+ "@tsed/swagger": "8.5.0-beta.1",
44
+ "@tsed/typescript": "8.5.0-beta.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.4.7"
50
+ "@tsed/platform-http": ">=8.5.0-beta.1"
51
51
  },
52
52
  "peerDependenciesMeta": {
53
53
  "@tsed/platform-http": {
@@ -60,5 +60,8 @@
60
60
  },
61
61
  "homepage": "https://github.com/tsedio/tsed/tree/production/packages/specs/scalar",
62
62
  "author": "Romain Lenzotti",
63
- "license": "MIT"
63
+ "license": "MIT",
64
+ "publishConfig": {
65
+ "tag": "beta"
66
+ }
64
67
  }
@@ -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
 
4
3
  import {context} from "@tsed/di";
5
4
 
@@ -18,7 +17,7 @@ export function indexMiddleware(viewPath: string, conf: ScalarSettings) {
18
17
  ...options
19
18
  };
20
19
 
21
- ctx.response.body(
20
+ ctx.response.contentType("text/html").body(
22
21
  await ctx.response.render(viewPath, {
23
22
  cssPath: join(path, basename(cssPath)),
24
23
  cdn,