@tsed/schema 6.102.7 → 6.102.8-rc.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.
Files changed (115) hide show
  1. package/lib/cjs/package.json +3 -0
  2. package/lib/esm/components/anyMapper.js +4 -4
  3. package/lib/esm/components/classMapper.js +4 -4
  4. package/lib/esm/components/genericsMapper.js +4 -4
  5. package/lib/esm/components/index.js +11 -11
  6. package/lib/esm/components/inheritedClassMapper.js +2 -2
  7. package/lib/esm/components/itemMapper.js +1 -1
  8. package/lib/esm/components/lazyRefMapper.js +3 -3
  9. package/lib/esm/components/mapMapper.js +2 -2
  10. package/lib/esm/components/objectMapper.js +3 -3
  11. package/lib/esm/components/ofMapper.js +1 -1
  12. package/lib/esm/components/propertiesMapper.js +1 -1
  13. package/lib/esm/components/schemaMapper.js +6 -6
  14. package/lib/esm/decorators/class/children.js +1 -1
  15. package/lib/esm/decorators/collections/collectionContains.js +1 -1
  16. package/lib/esm/decorators/collections/collectionOf.js +1 -1
  17. package/lib/esm/decorators/collections/maxItems.js +1 -1
  18. package/lib/esm/decorators/collections/maxProperties.js +1 -1
  19. package/lib/esm/decorators/collections/minItems.js +1 -1
  20. package/lib/esm/decorators/collections/minProperties.js +1 -1
  21. package/lib/esm/decorators/collections/uniqueItems.js +1 -1
  22. package/lib/esm/decorators/common/additionalProperties.js +1 -1
  23. package/lib/esm/decorators/common/allOf.js +1 -1
  24. package/lib/esm/decorators/common/allow.js +2 -2
  25. package/lib/esm/decorators/common/any.js +1 -1
  26. package/lib/esm/decorators/common/anyOf.js +1 -1
  27. package/lib/esm/decorators/common/const.js +1 -1
  28. package/lib/esm/decorators/common/customKey.js +1 -1
  29. package/lib/esm/decorators/common/default.js +1 -1
  30. package/lib/esm/decorators/common/description.js +1 -1
  31. package/lib/esm/decorators/common/enum.js +1 -1
  32. package/lib/esm/decorators/common/example.js +1 -1
  33. package/lib/esm/decorators/common/examples.js +1 -1
  34. package/lib/esm/decorators/common/exclusiveMaximum.js +1 -1
  35. package/lib/esm/decorators/common/exclusiveMinimum.js +1 -1
  36. package/lib/esm/decorators/common/format.js +2 -2
  37. package/lib/esm/decorators/common/forwardGroups.js +1 -1
  38. package/lib/esm/decorators/common/groups.js +2 -2
  39. package/lib/esm/decorators/common/ignore.js +1 -1
  40. package/lib/esm/decorators/common/integer.js +1 -1
  41. package/lib/esm/decorators/common/jsonEntityFn.js +1 -1
  42. package/lib/esm/decorators/common/maxLength.js +1 -1
  43. package/lib/esm/decorators/common/maximum.js +1 -1
  44. package/lib/esm/decorators/common/minLength.js +1 -1
  45. package/lib/esm/decorators/common/minimum.js +1 -1
  46. package/lib/esm/decorators/common/multipleOf.js +1 -1
  47. package/lib/esm/decorators/common/name.js +1 -1
  48. package/lib/esm/decorators/common/nullable.js +2 -2
  49. package/lib/esm/decorators/common/oneOf.js +1 -1
  50. package/lib/esm/decorators/common/optional.js +1 -1
  51. package/lib/esm/decorators/common/pattern.js +1 -1
  52. package/lib/esm/decorators/common/property.js +1 -1
  53. package/lib/esm/decorators/common/readOnly.js +1 -1
  54. package/lib/esm/decorators/common/required.js +2 -2
  55. package/lib/esm/decorators/common/requiredGroups.js +2 -2
  56. package/lib/esm/decorators/common/schema.js +1 -1
  57. package/lib/esm/decorators/common/title.js +1 -1
  58. package/lib/esm/decorators/common/writeOnly.js +1 -1
  59. package/lib/esm/decorators/config/jsonEntityComponent.js +1 -1
  60. package/lib/esm/decorators/generics/genericOf.js +2 -2
  61. package/lib/esm/decorators/generics/generics.js +1 -1
  62. package/lib/esm/decorators/index.js +70 -70
  63. package/lib/esm/decorators/operations/acceptMime.js +1 -1
  64. package/lib/esm/decorators/operations/consumes.js +1 -1
  65. package/lib/esm/decorators/operations/contentType.js +1 -1
  66. package/lib/esm/decorators/operations/deprecated.js +1 -1
  67. package/lib/esm/decorators/operations/header.js +1 -1
  68. package/lib/esm/decorators/operations/in.js +1 -1
  69. package/lib/esm/decorators/operations/inFile.js +5 -5
  70. package/lib/esm/decorators/operations/location.js +1 -1
  71. package/lib/esm/decorators/operations/operationId.js +1 -1
  72. package/lib/esm/decorators/operations/operationPath.js +1 -1
  73. package/lib/esm/decorators/operations/partial.js +1 -1
  74. package/lib/esm/decorators/operations/path.js +1 -1
  75. package/lib/esm/decorators/operations/produces.js +1 -1
  76. package/lib/esm/decorators/operations/redirect.js +2 -2
  77. package/lib/esm/decorators/operations/returns.js +8 -8
  78. package/lib/esm/decorators/operations/route.js +3 -3
  79. package/lib/esm/decorators/operations/security.js +1 -1
  80. package/lib/esm/decorators/operations/status.js +1 -1
  81. package/lib/esm/decorators/operations/summary.js +1 -1
  82. package/lib/esm/decorators/operations/tags.js +1 -1
  83. package/lib/esm/domain/DecoratorContext.js +1 -1
  84. package/lib/esm/domain/JsonClassStore.js +3 -3
  85. package/lib/esm/domain/JsonLazyRef.js +2 -2
  86. package/lib/esm/domain/JsonMap.js +1 -1
  87. package/lib/esm/domain/JsonMethodStore.js +4 -4
  88. package/lib/esm/domain/JsonOperation.js +8 -8
  89. package/lib/esm/domain/JsonOperationPathsMap.js +1 -1
  90. package/lib/esm/domain/JsonOperationRoute.js +1 -1
  91. package/lib/esm/domain/JsonParameter.js +6 -6
  92. package/lib/esm/domain/JsonParameterStore.js +4 -4
  93. package/lib/esm/domain/JsonPropertyStore.js +3 -3
  94. package/lib/esm/domain/JsonRequestBody.js +2 -2
  95. package/lib/esm/domain/JsonResponse.js +4 -4
  96. package/lib/esm/domain/JsonSchema.js +6 -6
  97. package/lib/esm/domain/index.js +16 -16
  98. package/lib/esm/index.js +20 -20
  99. package/lib/esm/interfaces/index.js +4 -4
  100. package/lib/esm/package.json +3 -0
  101. package/lib/esm/utils/from.js +4 -4
  102. package/lib/esm/utils/getInheritedStores.js +1 -1
  103. package/lib/esm/utils/getJsonEntityStore.js +5 -5
  104. package/lib/esm/utils/getJsonSchema.js +4 -4
  105. package/lib/esm/utils/getOperationsRoutes.js +3 -3
  106. package/lib/esm/utils/getOperationsStores.js +4 -4
  107. package/lib/esm/utils/getPropertiesStores.js +3 -3
  108. package/lib/esm/utils/getRequiredProperties.js +1 -1
  109. package/lib/esm/utils/getSpec.js +6 -6
  110. package/lib/esm/utils/mapNullableType.js +1 -1
  111. package/lib/esm/utils/mapRouteOptions.js +1 -1
  112. package/lib/esm/utils/mergeOperation.js +3 -3
  113. package/lib/esm/utils/ref.js +1 -1
  114. package/lib/esm/utils/toJsonMapCollection.js +1 -1
  115. package/package.json +12 -6
@@ -1,8 +1,8 @@
1
1
  import { isClass } from "@tsed/core";
2
- import { JsonEntityStore, JsonFormatTypes } from "../domain";
3
- import { JsonLazyRef } from "../domain/JsonLazyRef";
4
- import { JsonSchema } from "../domain/JsonSchema";
5
- import { getJsonEntityStore } from "./getJsonEntityStore";
2
+ import { JsonEntityStore, JsonFormatTypes } from "../domain.js";
3
+ import { JsonLazyRef } from "../domain/JsonLazyRef.js";
4
+ import { JsonSchema } from "../domain/JsonSchema.js";
5
+ import { getJsonEntityStore } from "./getJsonEntityStore.js";
6
6
  /**
7
7
  * Create a new model from the given type.
8
8
  *
@@ -1,5 +1,5 @@
1
1
  import { ancestorsOf } from "@tsed/core";
2
- import { getJsonEntityStore } from "./getJsonEntityStore";
2
+ import { getJsonEntityStore } from "./getJsonEntityStore.js";
3
3
  /**
4
4
  * Return store and his inherited stores
5
5
  * @param target
@@ -1,9 +1,9 @@
1
1
  import { DecoratorTypes } from "@tsed/core";
2
- import { JsonEntitiesContainer, JsonEntityStore } from "../domain/JsonEntityStore";
3
- import { JsonClassStore } from "../domain/JsonClassStore";
4
- import { JsonPropertyStore } from "../domain/JsonPropertyStore";
5
- import { JsonParameterStore } from "../domain/JsonParameterStore";
6
- import { JsonMethodStore } from "../domain/JsonMethodStore";
2
+ import { JsonEntitiesContainer, JsonEntityStore } from "../domain/JsonEntityStore.js";
3
+ import { JsonClassStore } from "../domain/JsonClassStore.js";
4
+ import { JsonPropertyStore } from "../domain/JsonPropertyStore.js";
5
+ import { JsonParameterStore } from "../domain/JsonParameterStore.js";
6
+ import { JsonMethodStore } from "../domain/JsonMethodStore.js";
7
7
  JsonEntitiesContainer.set(DecoratorTypes.CLASS, JsonClassStore);
8
8
  JsonEntitiesContainer.set(DecoratorTypes.PROP, JsonPropertyStore);
9
9
  JsonEntitiesContainer.set(DecoratorTypes.PARAM, JsonParameterStore);
@@ -1,7 +1,7 @@
1
- import "../components";
2
- import { SpecTypes } from "../domain/SpecTypes";
3
- import { execMapper } from "../registries/JsonSchemaMapperContainer";
4
- import { getJsonEntityStore } from "./getJsonEntityStore";
1
+ import "../components.js";
2
+ import { SpecTypes } from "../domain/SpecTypes.js";
3
+ import { execMapper } from "../registries/JsonSchemaMapperContainer.js";
4
+ import { getJsonEntityStore } from "./getJsonEntityStore.js";
5
5
  /**
6
6
  * @ignore
7
7
  */
@@ -1,6 +1,6 @@
1
- import { getOperationsStores } from "./getOperationsStores";
2
- import { JsonOperationRoute } from "../domain/JsonOperationRoute";
3
- import { getJsonEntityStore } from "./getJsonEntityStore";
1
+ import { getOperationsStores } from "./getOperationsStores.js";
2
+ import { JsonOperationRoute } from "../domain/JsonOperationRoute.js";
3
+ import { getJsonEntityStore } from "./getJsonEntityStore.js";
4
4
  export function getOperationsRoutes(token, options = {}) {
5
5
  const store = token.isStore ? token : getJsonEntityStore(token);
6
6
  const basePath = ((options.basePath || "") + (store.path || "")).replace(/\/\//gi, "/");
@@ -1,7 +1,7 @@
1
- import { JsonMethodStore } from "../domain/JsonMethodStore";
2
- import { JsonOperationPathsMap } from "../domain/JsonOperationPathsMap";
3
- import { getInheritedStores } from "./getInheritedStores";
4
- import { getJsonEntityStore } from "./getJsonEntityStore";
1
+ import { JsonMethodStore } from "../domain/JsonMethodStore.js";
2
+ import { JsonOperationPathsMap } from "../domain/JsonOperationPathsMap.js";
3
+ import { getInheritedStores } from "./getInheritedStores.js";
4
+ import { getJsonEntityStore } from "./getJsonEntityStore.js";
5
5
  /**
6
6
  * @ignore
7
7
  */
@@ -1,6 +1,6 @@
1
- import { alterIgnore } from "../hooks/alterIgnore";
2
- import { getInheritedStores } from "./getInheritedStores";
3
- import { getJsonEntityStore } from "./getJsonEntityStore";
1
+ import { alterIgnore } from "../hooks/alterIgnore.js";
2
+ import { getInheritedStores } from "./getInheritedStores.js";
3
+ import { getJsonEntityStore } from "./getJsonEntityStore.js";
4
4
  /**
5
5
  * Return the list of properties including properties from inherited classes
6
6
  * @param target
@@ -1,5 +1,5 @@
1
1
  import { uniq } from "@tsed/core";
2
- import { alterRequiredGroups } from "../hooks/alterRequiredGroups";
2
+ import { alterRequiredGroups } from "../hooks/alterRequiredGroups.js";
3
3
  function applyStringRule(obj, propSchema) {
4
4
  if (!(propSchema === null || propSchema === void 0 ? void 0 : propSchema.$allow.includes(""))) {
5
5
  if ([].concat(propSchema === null || propSchema === void 0 ? void 0 : propSchema.get("type")).includes("string")) {
@@ -1,10 +1,10 @@
1
1
  import { cleanObject, uniqBy } from "@tsed/core";
2
- import { SpecTypes } from "../domain/SpecTypes";
3
- import { buildPath } from "./buildPath";
4
- import { getJsonEntityStore } from "./getJsonEntityStore";
5
- import { getOperationsStores } from "./getOperationsStores";
6
- import { mergeOperation } from "./mergeOperation";
7
- import { operationIdFormatter } from "./operationIdFormatter";
2
+ import { SpecTypes } from "../domain/SpecTypes.js";
3
+ import { buildPath } from "./buildPath.js";
4
+ import { getJsonEntityStore } from "./getJsonEntityStore.js";
5
+ import { getOperationsStores } from "./getOperationsStores.js";
6
+ import { mergeOperation } from "./mergeOperation.js";
7
+ import { operationIdFormatter } from "./operationIdFormatter.js";
8
8
  /**
9
9
  * @ignore
10
10
  */
@@ -1,5 +1,5 @@
1
1
  import { uniq } from "@tsed/core";
2
- import { SpecTypes } from "../domain/SpecTypes";
2
+ import { SpecTypes } from "../domain/SpecTypes.js";
3
3
  function hasNullable(obj) {
4
4
  return obj.oneOf.find((o) => o.type === "null");
5
5
  }
@@ -1,4 +1,4 @@
1
- import { HTTP_METHODS } from "../constants/httpMethods";
1
+ import { HTTP_METHODS } from "../constants/httpMethods.js";
2
2
  export function mapRouteOptions(args) {
3
3
  let method = undefined;
4
4
  let path = undefined;
@@ -1,6 +1,6 @@
1
- import { SpecTypes } from "../domain/SpecTypes";
2
- import { concatParameters } from "./concatParameters";
3
- import { getJsonPathParameters } from "./getJsonPathParameters";
1
+ import { SpecTypes } from "../domain/SpecTypes.js";
2
+ import { concatParameters } from "./concatParameters.js";
3
+ import { getJsonPathParameters } from "./getJsonPathParameters.js";
4
4
  /**
5
5
  * @ignore
6
6
  */
@@ -1,5 +1,5 @@
1
1
  import { pascalCase } from "pascal-case";
2
- import { SpecTypes } from "../domain/SpecTypes";
2
+ import { SpecTypes } from "../domain/SpecTypes.js";
3
3
  import { cleanObject } from "@tsed/core";
4
4
  /**
5
5
  * ignore
@@ -1,4 +1,4 @@
1
- import { JsonMap } from "../domain/JsonMap";
1
+ import { JsonMap } from "../domain/JsonMap.js";
2
2
  /**
3
3
  * @ignore
4
4
  */
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@tsed/schema",
3
- "version": "6.102.7",
3
+ "version": "6.102.8-rc.1",
4
4
  "description": "JsonSchema module for Ts.ED Framework",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
7
7
  "main": "./lib/cjs/index.js",
8
+ "module": "./lib/esm/index.js",
8
9
  "typings": "./lib/types/index.d.ts",
9
10
  "exports": {
10
11
  "types": "./lib/types/index.d.ts",
@@ -29,7 +30,7 @@
29
30
  "tsed"
30
31
  ],
31
32
  "dependencies": {
32
- "@tsed/openspec": "6.102.7",
33
+ "@tsed/openspec": "6.102.8-rc.1",
33
34
  "camel-case": "4.1.2",
34
35
  "json-schema": "0.4.0",
35
36
  "micromatch": "4.0.4",
@@ -39,8 +40,8 @@
39
40
  },
40
41
  "devDependencies": {
41
42
  "@apidevtools/swagger-parser": "10.0.2",
42
- "@tsed/core": "6.102.7",
43
- "@tsed/openspec": "6.102.7",
43
+ "@tsed/core": "6.102.8-rc.1",
44
+ "@tsed/openspec": "6.102.8-rc.1",
44
45
  "@types/fs-extra": "9.0.6",
45
46
  "@types/json-schema": "7.0.7",
46
47
  "@types/micromatch": "4.0.1",
@@ -48,13 +49,18 @@
48
49
  "fs-extra": "9.0.1"
49
50
  },
50
51
  "peerDependencies": {
51
- "@tsed/core": "^6.102.7"
52
+ "@tsed/core": "^6.102.8-rc.1"
53
+ },
54
+ "peerDependenciesMeta": {
55
+ "@tsed/code": {
56
+ "optional": false
57
+ }
52
58
  },
53
59
  "repository": "https://github.com/tsedio/tsed",
54
60
  "bugs": {
55
61
  "url": "https://github.com/tsedio/tsed/issues"
56
62
  },
57
- "homepage": "https://github.com/tsedio/tsed/tree/production/packages/specs/schema",
63
+ "homepage": "https://github.com/tsedio/tsed/tree/rc/packages/specs/schema",
58
64
  "author": "Romain Lenzotti",
59
65
  "license": "MIT"
60
66
  }