pmcf 2.48.5 → 2.48.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 +3 -3
- package/src/base.mjs +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "2.48.
|
|
3
|
+
"version": "2.48.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule --target esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"ip-utilties": "^1.3.
|
|
48
|
+
"ip-utilties": "^1.3.3",
|
|
49
49
|
"npm-pkgbuild": "^18.1.2",
|
|
50
50
|
"pacc": "^3.4.1",
|
|
51
51
|
"pkg-dir": "^8.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@types/node": "^22.15.
|
|
54
|
+
"@types/node": "^22.15.17",
|
|
55
55
|
"ava": "^6.3.0",
|
|
56
56
|
"c8": "^10.1.3",
|
|
57
57
|
"documentation": "^14.0.3",
|
package/src/base.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { join } from "node:path";
|
|
|
2
2
|
import { allOutputs } from "npm-pkgbuild";
|
|
3
3
|
import { getAttribute } from "pacc";
|
|
4
4
|
import { addType, primitives, typeFactory } from "./types.mjs";
|
|
5
|
+
import { asArray } from "./utils.mjs";
|
|
5
6
|
|
|
6
7
|
const BaseTypeDefinition = {
|
|
7
8
|
name: "base",
|
|
@@ -104,13 +105,17 @@ export class Base {
|
|
|
104
105
|
|
|
105
106
|
switch (typeof current) {
|
|
106
107
|
case "undefined":
|
|
107
|
-
this[property.name] = value;
|
|
108
|
+
this[property.name] = asArray(value);
|
|
108
109
|
break;
|
|
109
110
|
case "object":
|
|
110
111
|
if (Array.isArray(current)) {
|
|
111
112
|
current.push(value);
|
|
112
113
|
} else {
|
|
113
|
-
if
|
|
114
|
+
if(current instanceof Set) {
|
|
115
|
+
// TODO
|
|
116
|
+
this[property.name] = value;
|
|
117
|
+
}
|
|
118
|
+
else if (current instanceof Map) {
|
|
114
119
|
// TODO
|
|
115
120
|
this[property.name] = value;
|
|
116
121
|
} else {
|