@tsed/json-mapper 6.102.4 → 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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { JsonMapper } from "../decorators/jsonMapper";
2
+ import { JsonMapper } from "../decorators/jsonMapper.js";
3
3
  /**
4
4
  * Mapper for `Array` type.
5
5
  * @jsonmapper
@@ -1,6 +1,6 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { isBoolean } from "@tsed/core";
3
- import { JsonMapper } from "../decorators/jsonMapper";
3
+ import { JsonMapper } from "../decorators/jsonMapper.js";
4
4
  /**
5
5
  * Mapper for `Date` type.
6
6
  * @jsonmapper
@@ -1,6 +1,6 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { objectKeys } from "@tsed/core";
3
- import { JsonMapper } from "../decorators/jsonMapper";
3
+ import { JsonMapper } from "../decorators/jsonMapper.js";
4
4
  /**
5
5
  * Mapper for `Map` type.
6
6
  * @jsonmapper
@@ -1,6 +1,6 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { BadRequest } from "@tsed/exceptions";
3
- import { JsonMapper } from "../decorators/jsonMapper";
3
+ import { JsonMapper } from "../decorators/jsonMapper.js";
4
4
  /**
5
5
  * Mapper for the `String`, `Number` and `Boolean` types.
6
6
  * @jsonmapper
@@ -1,6 +1,6 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { objectKeys } from "@tsed/core";
3
- import { JsonMapper } from "../decorators/jsonMapper";
3
+ import { JsonMapper } from "../decorators/jsonMapper.js";
4
4
  /**
5
5
  * Mapper for the `Set` Type.
6
6
  * @jsonmapper
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { JsonMapper } from "../decorators/jsonMapper";
2
+ import { JsonMapper } from "../decorators/jsonMapper.js";
3
3
  /**
4
4
  * Mapper for the `Symbol` type.
5
5
  *
@@ -1,7 +1,7 @@
1
- export * from "./ArrayMapper";
2
- export * from "./DateMapper";
3
- export * from "./MapMapper";
4
- export * from "./PrimitiveMapper";
5
- export * from "./SetMapper";
6
- export * from "./SymbolMapper";
1
+ export * from "./ArrayMapper.js";
2
+ export * from "./DateMapper.js";
3
+ export * from "./MapMapper.js";
4
+ export * from "./PrimitiveMapper.js";
5
+ export * from "./SetMapper.js";
6
+ export * from "./SymbolMapper.js";
7
7
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { registerJsonTypeMapper } from "../domain/JsonMapperTypesContainer";
1
+ import { registerJsonTypeMapper } from "../domain/JsonMapperTypesContainer.js";
2
2
  /**
3
3
  * Register a new JsonMapper Type
4
4
  * @param types
package/lib/esm/index.js CHANGED
@@ -1,12 +1,12 @@
1
- export * from "./components";
2
- export * from "./decorators/jsonMapper";
3
- export * from "./decorators/onDeserialize";
4
- export * from "./decorators/onSerialize";
5
- export * from "./decorators/afterDeserialize";
6
- export * from "./decorators/beforeDeserialize";
7
- export * from "./domain/JsonMapperContext";
8
- export * from "./domain/JsonMapperTypesContainer";
9
- export * from "./interfaces/JsonMapperMethods";
10
- export * from "./utils/deserialize";
11
- export * from "./utils/serialize";
1
+ export * from "./components.js";
2
+ export * from "./decorators/jsonMapper.js";
3
+ export * from "./decorators/onDeserialize.js";
4
+ export * from "./decorators/onSerialize.js";
5
+ export * from "./decorators/afterDeserialize.js";
6
+ export * from "./decorators/beforeDeserialize.js";
7
+ export * from "./domain/JsonMapperContext.js";
8
+ export * from "./domain/JsonMapperTypesContainer.js";
9
+ export * from "./interfaces/JsonMapperMethods.js";
10
+ export * from "./utils/deserialize.js";
11
+ export * from "./utils/serialize.js";
12
12
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -1,10 +1,10 @@
1
1
  import { isArray, isEmpty, isNil, nameOf, objectKeys } from "@tsed/core";
2
2
  import { alterIgnore, getProperties, JsonEntityStore, JsonSchema } from "@tsed/schema";
3
- import "../components";
4
- import { JsonMapperContext } from "../domain/JsonMapperContext";
5
- import { getJsonMapperTypes } from "../domain/JsonMapperTypesContainer";
6
- import { alterAfterDeserialize } from "../hooks/alterAfterDeserialize";
7
- import { alterBeforeDeserialize } from "../hooks/alterBeforeDeserialize";
3
+ import "../components.js";
4
+ import { JsonMapperContext } from "../domain/JsonMapperContext.js";
5
+ import { getJsonMapperTypes } from "../domain/JsonMapperTypesContainer.js";
6
+ import { alterAfterDeserialize } from "../hooks/alterAfterDeserialize.js";
7
+ import { alterBeforeDeserialize } from "../hooks/alterBeforeDeserialize.js";
8
8
  function isDeserializable(obj, options) {
9
9
  if ((!!options.collectionType && isNil(obj)) || obj === undefined) {
10
10
  return false;
@@ -1,8 +1,8 @@
1
1
  import { classOf, isArray, isClassObject, isCollection, isEmpty, isFunction, isNil, nameOf, objectKeys } from "@tsed/core";
2
2
  import { alterIgnore, getPropertiesStores, JsonEntityStore } from "@tsed/schema";
3
- import "../components";
4
- import { JsonMapperContext } from "../domain/JsonMapperContext";
5
- import { getJsonMapperTypes } from "../domain/JsonMapperTypesContainer";
3
+ import "../components.js";
4
+ import { JsonMapperContext } from "../domain/JsonMapperContext.js";
5
+ import { getJsonMapperTypes } from "../domain/JsonMapperTypesContainer.js";
6
6
  function alterValue(schema, value, options) {
7
7
  return schema.$hooks.alter("onSerialize", value, [options]);
8
8
  }
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@tsed/json-mapper",
3
- "version": "6.102.4",
3
+ "version": "6.102.8-rc.1",
4
4
  "description": "Json mapper 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",
@@ -33,16 +34,20 @@
33
34
  "tslib": "2.2.0"
34
35
  },
35
36
  "devDependencies": {
36
- "@tsed/core": "6.102.4",
37
- "@tsed/exceptions": "6.102.4",
38
- "@tsed/schema": "6.102.4"
37
+ "@tsed/core": "6.102.8-rc.1",
38
+ "@tsed/exceptions": "6.102.8-rc.1",
39
+ "@tsed/schema": "6.102.8-rc.1"
40
+ },
41
+ "peerDependencies": {
42
+ "@tsed/core": "^6.102.8-rc.1",
43
+ "@tsed/exceptions": "^6.102.8-rc.1",
44
+ "@tsed/schema": "^6.102.8-rc.1"
39
45
  },
40
- "peerDependencies": {},
41
46
  "repository": "https://github.com/tsedio/tsed",
42
47
  "bugs": {
43
48
  "url": "https://github.com/tsedio/tsed/issues"
44
49
  },
45
- "homepage": "https://github.com/tsedio/tsed/tree/production/packages/specs/json-mapper",
50
+ "homepage": "https://github.com/tsedio/tsed/tree/rc/packages/specs/json-mapper",
46
51
  "author": "Romain Lenzotti",
47
52
  "license": "MIT"
48
53
  }