pacc 4.37.4 → 4.37.6
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/package.json +5 -5
- package/src/attributes.mjs +1 -3
- package/src/types.mjs +7 -3
- package/types/types.d.mts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pacc",
|
|
3
|
-
"version": "4.37.
|
|
3
|
+
"version": "4.37.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"description": "property path utils",
|
|
17
17
|
"keywords": [
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"property path",
|
|
19
|
+
"xpath"
|
|
20
20
|
],
|
|
21
21
|
"contributors": [
|
|
22
22
|
{
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"ava": "^6.4.1",
|
|
42
|
-
"browser-ava": "^2.3.
|
|
42
|
+
"browser-ava": "^2.3.34",
|
|
43
43
|
"c8": "^10.1.3",
|
|
44
44
|
"documentation": "^14.0.3",
|
|
45
45
|
"semantic-release": "^24.2.9",
|
|
46
46
|
"typescript": "^5.9.2"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
|
-
"node": ">=22.
|
|
49
|
+
"node": ">=22.20.0"
|
|
50
50
|
},
|
|
51
51
|
"repository": {
|
|
52
52
|
"type": "git",
|
package/src/attributes.mjs
CHANGED
|
@@ -59,9 +59,7 @@ export function* attributeIterator(definition, filter, path = []) {
|
|
|
59
59
|
yield [path2, def];
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
yield* attributeIterator(def.attributes, filter, path2);
|
|
64
|
-
}
|
|
62
|
+
yield* attributeIterator(def.attributes, filter, path2);
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
65
|
}
|
package/src/types.mjs
CHANGED
|
@@ -27,7 +27,7 @@ export const types = {
|
|
|
27
27
|
prepareValue: value => (typeof value === "string" ? parseInt(value) : value)
|
|
28
28
|
},
|
|
29
29
|
url: { name: "url", primitive: true },
|
|
30
|
-
object: { name: "object"
|
|
30
|
+
object: { name: "object" }
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
function error(message) {
|
|
@@ -41,12 +41,16 @@ export function addType(type) {
|
|
|
41
41
|
|
|
42
42
|
types[type.name] = type;
|
|
43
43
|
|
|
44
|
+
if (typeof type.extends === "string") {
|
|
45
|
+
type.extends = types[type.extends];
|
|
46
|
+
}
|
|
47
|
+
|
|
44
48
|
for (const [path, attribute] of attributeIterator(type.attributes)) {
|
|
45
49
|
if (typeof attribute.type === "string") {
|
|
46
50
|
attribute.type = oneOfType(attribute.type);
|
|
47
51
|
}
|
|
48
|
-
if(attribute.isKey && !type.key) {
|
|
49
|
-
type.key = path.join(
|
|
52
|
+
if (attribute.isKey && !type.key) {
|
|
53
|
+
type.key = path.join(".");
|
|
50
54
|
}
|
|
51
55
|
}
|
|
52
56
|
|