@tsed/scalar 8.6.0-beta.1 → 8.6.0

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.
@@ -15,7 +15,6 @@ export class ScalarModule extends OpenAPIBaseModule {
15
15
  return settings.map((conf) => {
16
16
  return Object.assign({
17
17
  disableSpec: false,
18
- _integration: "tsed",
19
18
  cdn: "https://cdn.jsdelivr.net/npm/@scalar/api-reference",
20
19
  path: "/",
21
20
  fileName: "openapi.json",
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarModule.js","sourceRoot":"","sources":["../../src/ScalarModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAE/B,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAC,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAC;AAEjE,MAAM,OAAO,YAAa,SAAQ,iBAAiB;IAAnD;;QACW,SAAI,GAAG,QAAQ,CAAC;QAChB,YAAO,GAAG,QAAQ,CAAC;IA+B9B,CAAC;IA7BC,IAAI,QAAQ;QACV,MAAM,QAAQ,GAAG,QAAQ,CAAmB,QAAQ,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAE7E,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAC3B,OAAO,MAAM,CAAC,MAAM,CAClB;gBACE,WAAW,EAAE,KAAK;gBAClB,YAAY,EAAE,MAAM;gBACpB,GAAG,EAAE,oDAAoD;gBACzD,IAAI,EAAE,GAAG;gBACT,QAA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,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAE7E,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAC3B,OAAO,MAAM,CAAC,MAAM,CAClB;gBACE,WAAW,EAAE,KAAK;gBAClB,GAAG,EAAE,oDAAoD;gBACzD,IAAI,EAAE,GAAG;gBACT,QAAQ,EAAE,cAAc;gBACxB,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,yBAAyB,CAAC;gBAClD,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,kBAAkB,CAAC;aAC7C,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAES,YAAY,CAAC,IAAoB;QACzC,MAAM,EAAC,QAAQ,EAAC,GAAG,IAAI,CAAC;QACxB,MAAM,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAExC,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,iBAAiB,CAAC,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QACtE,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAED,UAAU,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC"}
@@ -1,17 +1,17 @@
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 () => {
5
6
  const ctx = context();
6
7
  const { path, options = {}, cssPath, cdn, fileName } = conf;
7
8
  const opts = {
8
- _integration: "tsed",
9
9
  spec: {
10
10
  url: `${path}/${fileName}`
11
11
  },
12
12
  ...options
13
13
  };
14
- ctx.response.contentType("text/html").body(await ctx.response.render(viewPath, {
14
+ ctx.response.body(await ctx.response.render(viewPath, {
15
15
  cssPath: join(path, basename(cssPath)),
16
16
  cdn,
17
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,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,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;YACtC,GAAG;YACH,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;YACjE,OAAO,EAAE,IAAI;SACd,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;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,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,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;YACtC,GAAG;YACH,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;YACjE,OAAO,EAAE,IAAI;SACd,CAAC,CACH,CAAC;IACJ,CAAC,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.6.0-beta.1",
5
+ "version": "8.6.0",
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.6.0-beta.1",
31
- "@tsed/openapi-utils": "8.6.0-beta.1",
32
- "@tsed/openspec": "8.6.0-beta.1",
30
+ "@tsed/normalize-path": "8.6.0",
31
+ "@tsed/openapi-utils": "8.6.0",
32
+ "@tsed/openspec": "8.6.0",
33
33
  "tslib": "2.7.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@tsed/barrels": "8.6.0-beta.1",
37
- "@tsed/core": "8.6.0-beta.1",
38
- "@tsed/di": "8.6.0-beta.1",
39
- "@tsed/json-mapper": "8.6.0-beta.1",
40
- "@tsed/openspec": "8.6.0-beta.1",
41
- "@tsed/platform-http": "8.6.0-beta.1",
42
- "@tsed/schema": "8.6.0-beta.1",
43
- "@tsed/swagger": "8.6.0-beta.1",
44
- "@tsed/typescript": "8.6.0-beta.1",
36
+ "@tsed/barrels": "8.6.0",
37
+ "@tsed/core": "8.6.0",
38
+ "@tsed/di": "8.6.0",
39
+ "@tsed/json-mapper": "8.6.0",
40
+ "@tsed/openspec": "8.6.0",
41
+ "@tsed/platform-http": "8.6.0",
42
+ "@tsed/schema": "8.6.0",
43
+ "@tsed/swagger": "8.6.0",
44
+ "@tsed/typescript": "8.6.0",
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.6.0-beta.1"
50
+ "@tsed/platform-http": ">=8.6.0"
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
  }
@@ -19,7 +19,6 @@ export class ScalarModule extends OpenAPIBaseModule {
19
19
  return Object.assign(
20
20
  {
21
21
  disableSpec: false,
22
- _integration: "tsed",
23
22
  cdn: "https://cdn.jsdelivr.net/npm/@scalar/api-reference",
24
23
  path: "/",
25
24
  fileName: "openapi.json",
@@ -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
 
@@ -10,14 +11,13 @@ export function indexMiddleware(viewPath: string, conf: ScalarSettings) {
10
11
  const {path, options = {}, cssPath, cdn, fileName} = conf;
11
12
 
12
13
  const opts = {
13
- _integration: "tsed",
14
14
  spec: {
15
15
  url: `${path}/${fileName}`
16
16
  },
17
17
  ...options
18
18
  };
19
19
 
20
- ctx.response.contentType("text/html").body(
20
+ ctx.response.body(
21
21
  await ctx.response.render(viewPath, {
22
22
  cssPath: join(path, basename(cssPath)),
23
23
  cdn,