@kontur.candy/generator 5.21.0-ss-metrics.0 → 5.21.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/dist/index.js +9 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -60272,11 +60272,17 @@ const getRngSchemaFilename = (formSchemasDirPath, gfv) => {
|
|
|
60272
60272
|
if (!Boolean(Number(gfv))) {
|
|
60273
60273
|
return ".rng.xml";
|
|
60274
60274
|
}
|
|
60275
|
-
|
|
60276
|
-
|
|
60275
|
+
try {
|
|
60276
|
+
const maxSubversion = (0,fs__WEBPACK_IMPORTED_MODULE_0__.readdirSync)(formSchemasDirPath).map(fileName => fileName.includes(".rng.xml") && !fileName.includes("схема.rng.xml")).filter(i => i === true).length - 1;
|
|
60277
|
+
if (maxSubversion === undefined || !(0,fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSchemasDirPath, `${gfv}.${maxSubversion}.rng.xml`))) {
|
|
60278
|
+
return ".rng.xml";
|
|
60279
|
+
}
|
|
60280
|
+
return `.${maxSubversion}.rng.xml`;
|
|
60281
|
+
} catch (e) {
|
|
60282
|
+
// eslint-disable-next-line no-console
|
|
60283
|
+
console.log(`Folder not exist. ${formSchemasDirPath}`);
|
|
60277
60284
|
return ".rng.xml";
|
|
60278
60285
|
}
|
|
60279
|
-
return `.${maxSubversion}.rng.xml`;
|
|
60280
60286
|
};
|
|
60281
60287
|
|
|
60282
60288
|
/***/ }),
|