@kontur.candy/generator 5.3.0 → 5.4.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 +31 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -60205,6 +60205,33 @@ function assertIs(value) {
|
|
|
60205
60205
|
|
|
60206
60206
|
/***/ }),
|
|
60207
60207
|
|
|
60208
|
+
/***/ "./Common/getRngSchemaFilename.ts":
|
|
60209
|
+
/*!****************************************!*\
|
|
60210
|
+
!*** ./Common/getRngSchemaFilename.ts ***!
|
|
60211
|
+
\****************************************/
|
|
60212
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
60213
|
+
|
|
60214
|
+
"use strict";
|
|
60215
|
+
__webpack_require__.r(__webpack_exports__);
|
|
60216
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
60217
|
+
/* harmony export */ "getRngSchemaFilename": () => (/* binding */ getRngSchemaFilename)
|
|
60218
|
+
/* harmony export */ });
|
|
60219
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fs */ "fs");
|
|
60220
|
+
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
60221
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ "path");
|
|
60222
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
|
|
60223
|
+
|
|
60224
|
+
|
|
60225
|
+
const getRngSchemaFilename = (formSchemasDirPath, gfv) => {
|
|
60226
|
+
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;
|
|
60227
|
+
if (maxSubversion === undefined || !(0,fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSchemasDirPath, `${gfv}.${maxSubversion}.rng.xml`))) {
|
|
60228
|
+
return ".rng.xml";
|
|
60229
|
+
}
|
|
60230
|
+
return `.${maxSubversion}.rng.xml`;
|
|
60231
|
+
};
|
|
60232
|
+
|
|
60233
|
+
/***/ }),
|
|
60234
|
+
|
|
60208
60235
|
/***/ "./Common/hashUtils.ts":
|
|
60209
60236
|
/*!*****************************!*\
|
|
60210
60237
|
!*** ./Common/hashUtils.ts ***!
|
|
@@ -78899,6 +78926,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
78899
78926
|
/* harmony import */ var recursive_readdir__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! recursive-readdir */ "./node_modules/recursive-readdir/index.js");
|
|
78900
78927
|
/* harmony import */ var recursive_readdir__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(recursive_readdir__WEBPACK_IMPORTED_MODULE_7__);
|
|
78901
78928
|
/* harmony import */ var _common_ExtractSugarReferences__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/ExtractSugarReferences */ "./Generator/src/common/ExtractSugarReferences.ts");
|
|
78929
|
+
/* harmony import */ var _Common_getRngSchemaFilename__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../Common/getRngSchemaFilename */ "./Common/getRngSchemaFilename.ts");
|
|
78930
|
+
|
|
78902
78931
|
|
|
78903
78932
|
|
|
78904
78933
|
|
|
@@ -79137,7 +79166,7 @@ async function connectJSFilesWithNames(formJavaScriptFilesPath) {
|
|
|
79137
79166
|
}
|
|
79138
79167
|
}
|
|
79139
79168
|
function readSchemaRngFile(formSchemasPath, gfv) {
|
|
79140
|
-
return readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSchemasPath, `${gfv}.
|
|
79169
|
+
return readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSchemasPath, `${gfv}${(0,_Common_getRngSchemaFilename__WEBPACK_IMPORTED_MODULE_9__.getRngSchemaFilename)(formSchemasPath, gfv)}`), "utf-8");
|
|
79141
79170
|
}
|
|
79142
79171
|
function readHooksFile(formDirectoryPath) {
|
|
79143
79172
|
return readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(formDirectoryPath, "hooks.js"), "utf-8").catch(() => "");
|
|
@@ -79145,7 +79174,7 @@ function readHooksFile(formDirectoryPath) {
|
|
|
79145
79174
|
async function readFileSource(filePath, filename, defaultValue) {
|
|
79146
79175
|
try {
|
|
79147
79176
|
return await readFileAsync(path__WEBPACK_IMPORTED_MODULE_1___default().join(filePath, filename), "utf-8");
|
|
79148
|
-
} catch (
|
|
79177
|
+
} catch (ignoreError) {
|
|
79149
79178
|
return defaultValue;
|
|
79150
79179
|
}
|
|
79151
79180
|
}
|