@oliasoft-open-source/node-json-migrator 3.0.0-beta-5 → 3.0.0-beta-7
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/dist/index.cjs +11 -75
- package/dist/index.mjs +11 -75
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -2078,11 +2078,7 @@ var xor = baseRest(function(arrays) {
|
|
|
2078
2078
|
});
|
|
2079
2079
|
|
|
2080
2080
|
const planSchemaValidator = validate14;
|
|
2081
|
-
const schema32 = {
|
|
2082
|
-
items: {
|
|
2083
|
-
properties: {
|
|
2084
|
-
fileHash: { type: ["string"] }}}
|
|
2085
|
-
};
|
|
2081
|
+
const schema32 = { "items": { "properties": { "fileHash": { "type": ["string"] }}} };
|
|
2086
2082
|
const pattern0 = new RegExp("^[1-9][0-9]*(.[1-9][0-9]*)*$", "u");
|
|
2087
2083
|
function validate14(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
2088
2084
|
let vErrors = null;
|
|
@@ -2093,13 +2089,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2093
2089
|
let data0 = data[i0];
|
|
2094
2090
|
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
2095
2091
|
if (data0.fileHash === void 0) {
|
|
2096
|
-
const err0 = {
|
|
2097
|
-
instancePath: instancePath + "/" + i0,
|
|
2098
|
-
schemaPath: "#/items/required",
|
|
2099
|
-
keyword: "required",
|
|
2100
|
-
params: { missingProperty: "fileHash" },
|
|
2101
|
-
message: "must have required property 'fileHash'"
|
|
2102
|
-
};
|
|
2092
|
+
const err0 = { instancePath: instancePath + "/" + i0, schemaPath: "#/items/required", keyword: "required", params: { missingProperty: "fileHash" }, message: "must have required property 'fileHash'" };
|
|
2103
2093
|
if (vErrors === null) {
|
|
2104
2094
|
vErrors = [err0];
|
|
2105
2095
|
} else {
|
|
@@ -2108,13 +2098,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2108
2098
|
errors++;
|
|
2109
2099
|
}
|
|
2110
2100
|
if (data0.fileName === void 0) {
|
|
2111
|
-
const err1 = {
|
|
2112
|
-
instancePath: instancePath + "/" + i0,
|
|
2113
|
-
schemaPath: "#/items/required",
|
|
2114
|
-
keyword: "required",
|
|
2115
|
-
params: { missingProperty: "fileName" },
|
|
2116
|
-
message: "must have required property 'fileName'"
|
|
2117
|
-
};
|
|
2101
|
+
const err1 = { instancePath: instancePath + "/" + i0, schemaPath: "#/items/required", keyword: "required", params: { missingProperty: "fileName" }, message: "must have required property 'fileName'" };
|
|
2118
2102
|
if (vErrors === null) {
|
|
2119
2103
|
vErrors = [err1];
|
|
2120
2104
|
} else {
|
|
@@ -2123,13 +2107,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2123
2107
|
errors++;
|
|
2124
2108
|
}
|
|
2125
2109
|
if (data0.sequence === void 0) {
|
|
2126
|
-
const err2 = {
|
|
2127
|
-
instancePath: instancePath + "/" + i0,
|
|
2128
|
-
schemaPath: "#/items/required",
|
|
2129
|
-
keyword: "required",
|
|
2130
|
-
params: { missingProperty: "sequence" },
|
|
2131
|
-
message: "must have required property 'sequence'"
|
|
2132
|
-
};
|
|
2110
|
+
const err2 = { instancePath: instancePath + "/" + i0, schemaPath: "#/items/required", keyword: "required", params: { missingProperty: "sequence" }, message: "must have required property 'sequence'" };
|
|
2133
2111
|
if (vErrors === null) {
|
|
2134
2112
|
vErrors = [err2];
|
|
2135
2113
|
} else {
|
|
@@ -2139,13 +2117,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2139
2117
|
}
|
|
2140
2118
|
for (const key0 in data0) {
|
|
2141
2119
|
if (!(key0 === "fileHash" || key0 === "fileName" || key0 === "sequence")) {
|
|
2142
|
-
const err3 = {
|
|
2143
|
-
instancePath: instancePath + "/" + i0,
|
|
2144
|
-
schemaPath: "#/items/additionalProperties",
|
|
2145
|
-
keyword: "additionalProperties",
|
|
2146
|
-
params: { additionalProperty: key0 },
|
|
2147
|
-
message: "must NOT have additional properties"
|
|
2148
|
-
};
|
|
2120
|
+
const err3 = { instancePath: instancePath + "/" + i0, schemaPath: "#/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
2149
2121
|
if (vErrors === null) {
|
|
2150
2122
|
vErrors = [err3];
|
|
2151
2123
|
} else {
|
|
@@ -2156,13 +2128,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2156
2128
|
}
|
|
2157
2129
|
if (data0.fileHash !== void 0) {
|
|
2158
2130
|
if (typeof data0.fileHash !== "string") {
|
|
2159
|
-
const err4 = {
|
|
2160
|
-
instancePath: instancePath + "/" + i0 + "/fileHash",
|
|
2161
|
-
schemaPath: "#/items/properties/fileHash/type",
|
|
2162
|
-
keyword: "type",
|
|
2163
|
-
params: { type: schema32.items.properties.fileHash.type },
|
|
2164
|
-
message: "must be string"
|
|
2165
|
-
};
|
|
2131
|
+
const err4 = { instancePath: instancePath + "/" + i0 + "/fileHash", schemaPath: "#/items/properties/fileHash/type", keyword: "type", params: { type: schema32.items.properties.fileHash.type }, message: "must be string" };
|
|
2166
2132
|
if (vErrors === null) {
|
|
2167
2133
|
vErrors = [err4];
|
|
2168
2134
|
} else {
|
|
@@ -2173,13 +2139,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2173
2139
|
}
|
|
2174
2140
|
if (data0.fileName !== void 0) {
|
|
2175
2141
|
if (typeof data0.fileName !== "string") {
|
|
2176
|
-
const err5 = {
|
|
2177
|
-
instancePath: instancePath + "/" + i0 + "/fileName",
|
|
2178
|
-
schemaPath: "#/items/properties/fileName/type",
|
|
2179
|
-
keyword: "type",
|
|
2180
|
-
params: { type: "string" },
|
|
2181
|
-
message: "must be string"
|
|
2182
|
-
};
|
|
2142
|
+
const err5 = { instancePath: instancePath + "/" + i0 + "/fileName", schemaPath: "#/items/properties/fileName/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
2183
2143
|
if (vErrors === null) {
|
|
2184
2144
|
vErrors = [err5];
|
|
2185
2145
|
} else {
|
|
@@ -2192,13 +2152,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2192
2152
|
let data3 = data0.sequence;
|
|
2193
2153
|
if (typeof data3 === "string") {
|
|
2194
2154
|
if (!pattern0.test(data3)) {
|
|
2195
|
-
const err6 = {
|
|
2196
|
-
instancePath: instancePath + "/" + i0 + "/sequence",
|
|
2197
|
-
schemaPath: "#/items/properties/sequence/pattern",
|
|
2198
|
-
keyword: "pattern",
|
|
2199
|
-
params: { pattern: "^[1-9][0-9]*(.[1-9][0-9]*)*$" },
|
|
2200
|
-
message: 'must match pattern "^[1-9][0-9]*(.[1-9][0-9]*)*$"'
|
|
2201
|
-
};
|
|
2155
|
+
const err6 = { instancePath: instancePath + "/" + i0 + "/sequence", schemaPath: "#/items/properties/sequence/pattern", keyword: "pattern", params: { pattern: "^[1-9][0-9]*(.[1-9][0-9]*)*$" }, message: 'must match pattern "^[1-9][0-9]*(.[1-9][0-9]*)*$"' };
|
|
2202
2156
|
if (vErrors === null) {
|
|
2203
2157
|
vErrors = [err6];
|
|
2204
2158
|
} else {
|
|
@@ -2207,13 +2161,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2207
2161
|
errors++;
|
|
2208
2162
|
}
|
|
2209
2163
|
} else {
|
|
2210
|
-
const err7 = {
|
|
2211
|
-
instancePath: instancePath + "/" + i0 + "/sequence",
|
|
2212
|
-
schemaPath: "#/items/properties/sequence/type",
|
|
2213
|
-
keyword: "type",
|
|
2214
|
-
params: { type: "string" },
|
|
2215
|
-
message: "must be string"
|
|
2216
|
-
};
|
|
2164
|
+
const err7 = { instancePath: instancePath + "/" + i0 + "/sequence", schemaPath: "#/items/properties/sequence/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
2217
2165
|
if (vErrors === null) {
|
|
2218
2166
|
vErrors = [err7];
|
|
2219
2167
|
} else {
|
|
@@ -2223,13 +2171,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2223
2171
|
}
|
|
2224
2172
|
}
|
|
2225
2173
|
} else {
|
|
2226
|
-
const err8 = {
|
|
2227
|
-
instancePath: instancePath + "/" + i0,
|
|
2228
|
-
schemaPath: "#/items/type",
|
|
2229
|
-
keyword: "type",
|
|
2230
|
-
params: { type: "object" },
|
|
2231
|
-
message: "must be object"
|
|
2232
|
-
};
|
|
2174
|
+
const err8 = { instancePath: instancePath + "/" + i0, schemaPath: "#/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2233
2175
|
if (vErrors === null) {
|
|
2234
2176
|
vErrors = [err8];
|
|
2235
2177
|
} else {
|
|
@@ -2239,13 +2181,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2239
2181
|
}
|
|
2240
2182
|
}
|
|
2241
2183
|
} else {
|
|
2242
|
-
const err9 = {
|
|
2243
|
-
instancePath,
|
|
2244
|
-
schemaPath: "#/type",
|
|
2245
|
-
keyword: "type",
|
|
2246
|
-
params: { type: "array" },
|
|
2247
|
-
message: "must be array"
|
|
2248
|
-
};
|
|
2184
|
+
const err9 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
2249
2185
|
if (vErrors === null) {
|
|
2250
2186
|
vErrors = [err9];
|
|
2251
2187
|
} else {
|
package/dist/index.mjs
CHANGED
|
@@ -2057,11 +2057,7 @@ var xor = baseRest(function(arrays) {
|
|
|
2057
2057
|
});
|
|
2058
2058
|
|
|
2059
2059
|
const planSchemaValidator = validate14;
|
|
2060
|
-
const schema32 = {
|
|
2061
|
-
items: {
|
|
2062
|
-
properties: {
|
|
2063
|
-
fileHash: { type: ["string"] }}}
|
|
2064
|
-
};
|
|
2060
|
+
const schema32 = { "items": { "properties": { "fileHash": { "type": ["string"] }}} };
|
|
2065
2061
|
const pattern0 = new RegExp("^[1-9][0-9]*(.[1-9][0-9]*)*$", "u");
|
|
2066
2062
|
function validate14(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
|
|
2067
2063
|
let vErrors = null;
|
|
@@ -2072,13 +2068,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2072
2068
|
let data0 = data[i0];
|
|
2073
2069
|
if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
|
|
2074
2070
|
if (data0.fileHash === void 0) {
|
|
2075
|
-
const err0 = {
|
|
2076
|
-
instancePath: instancePath + "/" + i0,
|
|
2077
|
-
schemaPath: "#/items/required",
|
|
2078
|
-
keyword: "required",
|
|
2079
|
-
params: { missingProperty: "fileHash" },
|
|
2080
|
-
message: "must have required property 'fileHash'"
|
|
2081
|
-
};
|
|
2071
|
+
const err0 = { instancePath: instancePath + "/" + i0, schemaPath: "#/items/required", keyword: "required", params: { missingProperty: "fileHash" }, message: "must have required property 'fileHash'" };
|
|
2082
2072
|
if (vErrors === null) {
|
|
2083
2073
|
vErrors = [err0];
|
|
2084
2074
|
} else {
|
|
@@ -2087,13 +2077,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2087
2077
|
errors++;
|
|
2088
2078
|
}
|
|
2089
2079
|
if (data0.fileName === void 0) {
|
|
2090
|
-
const err1 = {
|
|
2091
|
-
instancePath: instancePath + "/" + i0,
|
|
2092
|
-
schemaPath: "#/items/required",
|
|
2093
|
-
keyword: "required",
|
|
2094
|
-
params: { missingProperty: "fileName" },
|
|
2095
|
-
message: "must have required property 'fileName'"
|
|
2096
|
-
};
|
|
2080
|
+
const err1 = { instancePath: instancePath + "/" + i0, schemaPath: "#/items/required", keyword: "required", params: { missingProperty: "fileName" }, message: "must have required property 'fileName'" };
|
|
2097
2081
|
if (vErrors === null) {
|
|
2098
2082
|
vErrors = [err1];
|
|
2099
2083
|
} else {
|
|
@@ -2102,13 +2086,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2102
2086
|
errors++;
|
|
2103
2087
|
}
|
|
2104
2088
|
if (data0.sequence === void 0) {
|
|
2105
|
-
const err2 = {
|
|
2106
|
-
instancePath: instancePath + "/" + i0,
|
|
2107
|
-
schemaPath: "#/items/required",
|
|
2108
|
-
keyword: "required",
|
|
2109
|
-
params: { missingProperty: "sequence" },
|
|
2110
|
-
message: "must have required property 'sequence'"
|
|
2111
|
-
};
|
|
2089
|
+
const err2 = { instancePath: instancePath + "/" + i0, schemaPath: "#/items/required", keyword: "required", params: { missingProperty: "sequence" }, message: "must have required property 'sequence'" };
|
|
2112
2090
|
if (vErrors === null) {
|
|
2113
2091
|
vErrors = [err2];
|
|
2114
2092
|
} else {
|
|
@@ -2118,13 +2096,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2118
2096
|
}
|
|
2119
2097
|
for (const key0 in data0) {
|
|
2120
2098
|
if (!(key0 === "fileHash" || key0 === "fileName" || key0 === "sequence")) {
|
|
2121
|
-
const err3 = {
|
|
2122
|
-
instancePath: instancePath + "/" + i0,
|
|
2123
|
-
schemaPath: "#/items/additionalProperties",
|
|
2124
|
-
keyword: "additionalProperties",
|
|
2125
|
-
params: { additionalProperty: key0 },
|
|
2126
|
-
message: "must NOT have additional properties"
|
|
2127
|
-
};
|
|
2099
|
+
const err3 = { instancePath: instancePath + "/" + i0, schemaPath: "#/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
|
|
2128
2100
|
if (vErrors === null) {
|
|
2129
2101
|
vErrors = [err3];
|
|
2130
2102
|
} else {
|
|
@@ -2135,13 +2107,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2135
2107
|
}
|
|
2136
2108
|
if (data0.fileHash !== void 0) {
|
|
2137
2109
|
if (typeof data0.fileHash !== "string") {
|
|
2138
|
-
const err4 = {
|
|
2139
|
-
instancePath: instancePath + "/" + i0 + "/fileHash",
|
|
2140
|
-
schemaPath: "#/items/properties/fileHash/type",
|
|
2141
|
-
keyword: "type",
|
|
2142
|
-
params: { type: schema32.items.properties.fileHash.type },
|
|
2143
|
-
message: "must be string"
|
|
2144
|
-
};
|
|
2110
|
+
const err4 = { instancePath: instancePath + "/" + i0 + "/fileHash", schemaPath: "#/items/properties/fileHash/type", keyword: "type", params: { type: schema32.items.properties.fileHash.type }, message: "must be string" };
|
|
2145
2111
|
if (vErrors === null) {
|
|
2146
2112
|
vErrors = [err4];
|
|
2147
2113
|
} else {
|
|
@@ -2152,13 +2118,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2152
2118
|
}
|
|
2153
2119
|
if (data0.fileName !== void 0) {
|
|
2154
2120
|
if (typeof data0.fileName !== "string") {
|
|
2155
|
-
const err5 = {
|
|
2156
|
-
instancePath: instancePath + "/" + i0 + "/fileName",
|
|
2157
|
-
schemaPath: "#/items/properties/fileName/type",
|
|
2158
|
-
keyword: "type",
|
|
2159
|
-
params: { type: "string" },
|
|
2160
|
-
message: "must be string"
|
|
2161
|
-
};
|
|
2121
|
+
const err5 = { instancePath: instancePath + "/" + i0 + "/fileName", schemaPath: "#/items/properties/fileName/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
2162
2122
|
if (vErrors === null) {
|
|
2163
2123
|
vErrors = [err5];
|
|
2164
2124
|
} else {
|
|
@@ -2171,13 +2131,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2171
2131
|
let data3 = data0.sequence;
|
|
2172
2132
|
if (typeof data3 === "string") {
|
|
2173
2133
|
if (!pattern0.test(data3)) {
|
|
2174
|
-
const err6 = {
|
|
2175
|
-
instancePath: instancePath + "/" + i0 + "/sequence",
|
|
2176
|
-
schemaPath: "#/items/properties/sequence/pattern",
|
|
2177
|
-
keyword: "pattern",
|
|
2178
|
-
params: { pattern: "^[1-9][0-9]*(.[1-9][0-9]*)*$" },
|
|
2179
|
-
message: 'must match pattern "^[1-9][0-9]*(.[1-9][0-9]*)*$"'
|
|
2180
|
-
};
|
|
2134
|
+
const err6 = { instancePath: instancePath + "/" + i0 + "/sequence", schemaPath: "#/items/properties/sequence/pattern", keyword: "pattern", params: { pattern: "^[1-9][0-9]*(.[1-9][0-9]*)*$" }, message: 'must match pattern "^[1-9][0-9]*(.[1-9][0-9]*)*$"' };
|
|
2181
2135
|
if (vErrors === null) {
|
|
2182
2136
|
vErrors = [err6];
|
|
2183
2137
|
} else {
|
|
@@ -2186,13 +2140,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2186
2140
|
errors++;
|
|
2187
2141
|
}
|
|
2188
2142
|
} else {
|
|
2189
|
-
const err7 = {
|
|
2190
|
-
instancePath: instancePath + "/" + i0 + "/sequence",
|
|
2191
|
-
schemaPath: "#/items/properties/sequence/type",
|
|
2192
|
-
keyword: "type",
|
|
2193
|
-
params: { type: "string" },
|
|
2194
|
-
message: "must be string"
|
|
2195
|
-
};
|
|
2143
|
+
const err7 = { instancePath: instancePath + "/" + i0 + "/sequence", schemaPath: "#/items/properties/sequence/type", keyword: "type", params: { type: "string" }, message: "must be string" };
|
|
2196
2144
|
if (vErrors === null) {
|
|
2197
2145
|
vErrors = [err7];
|
|
2198
2146
|
} else {
|
|
@@ -2202,13 +2150,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2202
2150
|
}
|
|
2203
2151
|
}
|
|
2204
2152
|
} else {
|
|
2205
|
-
const err8 = {
|
|
2206
|
-
instancePath: instancePath + "/" + i0,
|
|
2207
|
-
schemaPath: "#/items/type",
|
|
2208
|
-
keyword: "type",
|
|
2209
|
-
params: { type: "object" },
|
|
2210
|
-
message: "must be object"
|
|
2211
|
-
};
|
|
2153
|
+
const err8 = { instancePath: instancePath + "/" + i0, schemaPath: "#/items/type", keyword: "type", params: { type: "object" }, message: "must be object" };
|
|
2212
2154
|
if (vErrors === null) {
|
|
2213
2155
|
vErrors = [err8];
|
|
2214
2156
|
} else {
|
|
@@ -2218,13 +2160,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2218
2160
|
}
|
|
2219
2161
|
}
|
|
2220
2162
|
} else {
|
|
2221
|
-
const err9 = {
|
|
2222
|
-
instancePath,
|
|
2223
|
-
schemaPath: "#/type",
|
|
2224
|
-
keyword: "type",
|
|
2225
|
-
params: { type: "array" },
|
|
2226
|
-
message: "must be array"
|
|
2227
|
-
};
|
|
2163
|
+
const err9 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" };
|
|
2228
2164
|
if (vErrors === null) {
|
|
2229
2165
|
vErrors = [err9];
|
|
2230
2166
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliasoft-open-source/node-json-migrator",
|
|
3
|
-
"version": "3.0.0-beta-
|
|
3
|
+
"version": "3.0.0-beta-7",
|
|
4
4
|
"description": "A library for JSON migrations",
|
|
5
5
|
"homepage": "https://oliasoft-open-source.gitlab.io/node-postgresql-migrator",
|
|
6
6
|
"bugs": {
|
|
@@ -56,9 +56,10 @@
|
|
|
56
56
|
"@types/lodash-es": "^4.17.12",
|
|
57
57
|
"@types/mock-fs": "^4.13.4",
|
|
58
58
|
"@types/node": "^22.13.10",
|
|
59
|
-
"ajv": "^8",
|
|
60
|
-
"ajv-errors": "^3",
|
|
59
|
+
"ajv": "^8.17.1",
|
|
60
|
+
"ajv-errors": "^3.0.0",
|
|
61
61
|
"chalk": "^5.4.1",
|
|
62
|
+
"esbuild": "^0.25.1",
|
|
62
63
|
"eslint": "^9.22.0",
|
|
63
64
|
"eslint-config-prettier": "^10.1.1",
|
|
64
65
|
"glob": "^11.0.1",
|