@karmaniverous/jsonmap 2.0.6 → 2.1.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.
- package/README.md +227 -53
- package/dist/index.cjs +22052 -17299
- package/dist/index.d.cts +83 -41
- package/dist/index.d.mts +83 -41
- package/dist/index.d.ts +83 -41
- package/dist/index.mjs +22049 -17300
- package/jsonmap.schema.json +108 -0
- package/package.json +40 -46
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"anyOf": [
|
|
4
|
+
{
|
|
5
|
+
"anyOf": [
|
|
6
|
+
{
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"type": "number"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "boolean"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "null"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "object",
|
|
22
|
+
"propertyNames": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"additionalProperties": {
|
|
26
|
+
"anyOf": [
|
|
27
|
+
{
|
|
28
|
+
"$ref": "#"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"$": {
|
|
34
|
+
"anyOf": [
|
|
35
|
+
{
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"method": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"params": {
|
|
42
|
+
"anyOf": [
|
|
43
|
+
{
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"required": [
|
|
56
|
+
"method",
|
|
57
|
+
"params"
|
|
58
|
+
],
|
|
59
|
+
"additionalProperties": false
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {
|
|
66
|
+
"method": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"params": {
|
|
70
|
+
"anyOf": [
|
|
71
|
+
{
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "array",
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": [
|
|
84
|
+
"method",
|
|
85
|
+
"params"
|
|
86
|
+
],
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"required": [
|
|
94
|
+
"$"
|
|
95
|
+
],
|
|
96
|
+
"additionalProperties": false
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": {
|
|
104
|
+
"$ref": "#"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
package/package.json
CHANGED
|
@@ -4,51 +4,42 @@
|
|
|
4
4
|
"url": "https://github.com/karmaniverous/jsonmap/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"lodash": "^4.17.
|
|
8
|
-
"nanoid": "^5.
|
|
9
|
-
"zod": "^3.
|
|
7
|
+
"lodash": "^4.17.23",
|
|
8
|
+
"nanoid": "^5.1.6",
|
|
9
|
+
"zod": "^4.3.6"
|
|
10
10
|
},
|
|
11
11
|
"description": "A hyper-generic JSON mapping library.",
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@
|
|
14
|
-
"@
|
|
15
|
-
"@rollup/plugin-
|
|
13
|
+
"@dotenvx/dotenvx": "^1.52.0",
|
|
14
|
+
"@eslint/js": "^9.22.0",
|
|
15
|
+
"@rollup/plugin-alias": "^6.0.0",
|
|
16
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
16
17
|
"@rollup/plugin-json": "^6.1.0",
|
|
17
|
-
"@rollup/plugin-node-resolve": "^
|
|
18
|
-
"@rollup/plugin-
|
|
19
|
-
"@
|
|
20
|
-
"@types/chai": "^4.3.16",
|
|
21
|
-
"@types/eslint__js": "^8.42.3",
|
|
22
|
-
"@types/eslint-config-prettier": "^6.11.3",
|
|
23
|
-
"@types/eslint-plugin-mocha": "^10.4.0",
|
|
24
|
-
"@types/lodash": "^4.17.7",
|
|
25
|
-
"@types/mocha": "^10.0.7",
|
|
18
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
19
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
20
|
+
"@types/lodash": "^4.17.23",
|
|
26
21
|
"@types/numeral": "^2.0.5",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"eslint": "^
|
|
31
|
-
"eslint-
|
|
32
|
-
"eslint-plugin-mocha": "^10.4.3",
|
|
22
|
+
"@vitest/eslint-plugin": "^1.6.9",
|
|
23
|
+
"cross-env": "^10.1.0",
|
|
24
|
+
"eslint": "^9.22.0",
|
|
25
|
+
"eslint-config-prettier": "^10.1.8",
|
|
26
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
33
27
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
34
|
-
"eslint-plugin-tsdoc": "^0.
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"lefthook": "^1.7.2",
|
|
39
|
-
"mocha": "^10.6.0",
|
|
28
|
+
"eslint-plugin-tsdoc": "^0.5.0",
|
|
29
|
+
"jiti": "^2.6.1",
|
|
30
|
+
"knip": "^5.84.1",
|
|
31
|
+
"lefthook": "^2.1.1",
|
|
40
32
|
"numeral": "^2.0.6",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"rollup": "^
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"typescript-eslint": "^7.16.1"
|
|
33
|
+
"prettier": "^3.8.1",
|
|
34
|
+
"release-it": "^19.2.4",
|
|
35
|
+
"rimraf": "^6.1.3",
|
|
36
|
+
"rollup": "^4.58.0",
|
|
37
|
+
"rollup-plugin-dts": "^6.3.0",
|
|
38
|
+
"tslib": "^2.8.1",
|
|
39
|
+
"tsx": "^4.21.0",
|
|
40
|
+
"typescript": "^5.9.3",
|
|
41
|
+
"typescript-eslint": "^8.56.0",
|
|
42
|
+
"vitest": "^4.0.18"
|
|
52
43
|
},
|
|
53
44
|
"exports": {
|
|
54
45
|
".": {
|
|
@@ -63,7 +54,8 @@
|
|
|
63
54
|
}
|
|
64
55
|
},
|
|
65
56
|
"files": [
|
|
66
|
-
"dist"
|
|
57
|
+
"dist",
|
|
58
|
+
"jsonmap.schema.json"
|
|
67
59
|
],
|
|
68
60
|
"homepage": "https://github.com/karmaniverous/jsonmap#readme",
|
|
69
61
|
"keywords": [
|
|
@@ -108,15 +100,17 @@
|
|
|
108
100
|
"url": "https://github.com/karmaniverous/jsonmap"
|
|
109
101
|
},
|
|
110
102
|
"scripts": {
|
|
111
|
-
"build": "rimraf dist && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
|
|
103
|
+
"build": "rimraf dist && cross-env NO_COLOR=1 rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript && npm run generate:schema",
|
|
104
|
+
"generate:schema": "tsx scripts/generate-json-schema.ts",
|
|
112
105
|
"knip": "knip",
|
|
113
|
-
"lint": "eslint
|
|
114
|
-
"lint:fix": "eslint --fix
|
|
115
|
-
"release": "release-it",
|
|
116
|
-
"release:pre": "release-it --no-git.requireBranch --github.prerelease --preRelease",
|
|
117
|
-
"test": "
|
|
106
|
+
"lint": "eslint .",
|
|
107
|
+
"lint:fix": "eslint --fix .",
|
|
108
|
+
"release": "dotenvx run -f .env.local -- release-it",
|
|
109
|
+
"release:pre": "dotenvx run -f .env.local -- release-it --no-git.requireBranch --github.prerelease --preRelease",
|
|
110
|
+
"test": "vitest run",
|
|
111
|
+
"typecheck": "tsc"
|
|
118
112
|
},
|
|
119
113
|
"type": "module",
|
|
120
114
|
"types": "dist/index.d.ts",
|
|
121
|
-
"version": "2.0
|
|
115
|
+
"version": "2.1.0"
|
|
122
116
|
}
|