@tsed/schema 7.67.0 → 7.67.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,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Header = void 0;
4
+ const core_1 = require("@tsed/core");
4
5
  const returns_1 = require("./returns");
5
6
  /**
6
7
  * Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object as the parameter.
@@ -53,6 +54,9 @@ function Header(headers, value) {
53
54
  if (value !== undefined) {
54
55
  headers = { [headers]: value };
55
56
  }
57
+ if (value === undefined && (0, core_1.isString)(headers)) {
58
+ headers = { [headers]: { type: "string" } };
59
+ }
56
60
  return (0, returns_1.Returns)().Headers(headers);
57
61
  }
58
62
  exports.Header = Header;
@@ -1 +1 @@
1
- {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/decorators/operations/header.ts"],"names":[],"mappings":";;;AACA,uCAAkC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,SAAgB,MAAM,CAAC,OAAsC,EAAE,KAAoC;IACjG,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,GAAG,EAAC,CAAC,OAAiB,CAAC,EAAE,KAAK,EAAC,CAAC;KACxC;IAED,OAAO,IAAA,iBAAO,GAAE,CAAC,OAAO,CAAC,OAAsB,CAAC,CAAC;AACnD,CAAC;AAND,wBAMC"}
1
+ {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/decorators/operations/header.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAEpC,uCAAkC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,SAAgB,MAAM,CAAC,OAAsC,EAAE,KAAoC;IACjG,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,GAAG,EAAC,CAAC,OAAiB,CAAC,EAAE,KAAK,EAAC,CAAC;KACxC;IACD,IAAI,KAAK,KAAK,SAAS,IAAI,IAAA,eAAQ,EAAC,OAAO,CAAC,EAAE;QAC5C,OAAO,GAAG,EAAC,CAAC,OAAiB,CAAC,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,EAAC,CAAC;KACnD;IAED,OAAO,IAAA,iBAAO,GAAE,CAAC,OAAO,CAAC,OAAsB,CAAC,CAAC;AACnD,CAAC;AATD,wBASC"}
@@ -1,3 +1,4 @@
1
+ import { isString } from "@tsed/core";
1
2
  import { Returns } from "./returns.js";
2
3
  /**
3
4
  * Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object as the parameter.
@@ -50,6 +51,9 @@ export function Header(headers, value) {
50
51
  if (value !== undefined) {
51
52
  headers = { [headers]: value };
52
53
  }
54
+ if (value === undefined && isString(headers)) {
55
+ headers = { [headers]: { type: "string" } };
56
+ }
53
57
  return Returns().Headers(headers);
54
58
  }
55
59
  //# sourceMappingURL=header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/decorators/operations/header.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,UAAU,MAAM,CAAC,OAAsC,EAAE,KAAoC;IACjG,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,GAAG,EAAC,CAAC,OAAiB,CAAC,EAAE,KAAK,EAAC,CAAC;KACxC;IAED,OAAO,OAAO,EAAE,CAAC,OAAO,CAAC,OAAsB,CAAC,CAAC;AACnD,CAAC"}
1
+ {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/decorators/operations/header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,UAAU,MAAM,CAAC,OAAsC,EAAE,KAAoC;IACjG,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,GAAG,EAAC,CAAC,OAAiB,CAAC,EAAE,KAAK,EAAC,CAAC;KACxC;IACD,IAAI,KAAK,KAAK,SAAS,IAAI,QAAQ,CAAC,OAAO,CAAC,EAAE;QAC5C,OAAO,GAAG,EAAC,CAAC,OAAiB,CAAC,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,EAAC,CAAC;KACnD;IAED,OAAO,OAAO,EAAE,CAAC,OAAO,CAAC,OAAsB,CAAC,CAAC;AACnD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/schema",
3
- "version": "7.67.0",
3
+ "version": "7.67.1",
4
4
  "description": "JsonSchema module for Ts.ED Framework",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./lib/cjs/index.js",
@@ -33,31 +33,31 @@
33
33
  "tsed"
34
34
  ],
35
35
  "dependencies": {
36
- "@tsed/openspec": "7.67.0",
36
+ "@tsed/openspec": "7.67.1",
37
37
  "change-case": "^4.1.2",
38
- "fs-extra": "^11.1.1",
38
+ "fs-extra": "^11.2.0",
39
39
  "json-schema": "0.4.0",
40
40
  "picomatch": "2.3.1",
41
41
  "statuses": ">=2.0.1",
42
42
  "tslib": "2.6.1"
43
43
  },
44
44
  "devDependencies": {
45
- "@apidevtools/swagger-parser": "10.0.3",
46
- "@tsed/core": "7.67.0",
47
- "@tsed/openspec": "7.67.0",
48
- "@tsed/typescript": "7.67.0",
49
- "@types/fs-extra": "11.0.3",
50
- "@types/json-schema": "7.0.11",
51
- "@types/picomatch": "2.3.0",
52
- "@types/statuses": "2.0.0",
45
+ "@apidevtools/swagger-parser": "10.1.0",
46
+ "@tsed/core": "7.67.1",
47
+ "@tsed/openspec": "7.67.1",
48
+ "@tsed/typescript": "7.67.1",
49
+ "@types/fs-extra": "11.0.4",
50
+ "@types/json-schema": "7.0.15",
51
+ "@types/picomatch": "2.3.3",
52
+ "@types/statuses": "2.0.5",
53
53
  "barrelsby": "^2.8.1",
54
- "eslint": "^8.12.0",
55
- "jest": "^29.2.0",
54
+ "eslint": "^8.57.0",
55
+ "jest": "^29.7.0",
56
56
  "picomatch-browser": "^2.2.6"
57
57
  },
58
58
  "peerDependencies": {
59
- "@tsed/core": "7.67.0",
60
- "@tsed/openspec": "7.67.0"
59
+ "@tsed/core": "7.67.1",
60
+ "@tsed/openspec": "7.67.1"
61
61
  },
62
62
  "peerDependenciesMeta": {
63
63
  "@tsed/core": {