@kontur.candy/generator 5.46.0 → 5.46.1-tidtemplates.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 +11 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45028,15 +45028,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45028
45028
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45029
45029
|
/* harmony export */ extractGfvFromFormPath: () => (/* binding */ extractGfvFromFormPath)
|
|
45030
45030
|
/* harmony export */ });
|
|
45031
|
-
/* harmony import */ var
|
|
45032
|
-
/* harmony import */ var _WellKnownDirectories__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WellKnownDirectories */ "./Common/WellKnownDirectories.ts");
|
|
45033
|
-
|
|
45031
|
+
/* harmony import */ var _WellKnownDirectories__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./WellKnownDirectories */ "./Common/WellKnownDirectories.ts");
|
|
45034
45032
|
|
|
45035
45033
|
function extractGfvFromFormPath(formPath) {
|
|
45036
|
-
var
|
|
45037
|
-
const regexp = new RegExp(`([\\/\\\\](?<gfv1>\\d{6,})[\\/\\\\]${
|
|
45034
|
+
var _match$groups$gfv, _match$groups, _match$groups2;
|
|
45035
|
+
const regexp = new RegExp(`([\\/\\\\](?<gfv1>\\d{6,})[\\/\\\\]${_WellKnownDirectories__WEBPACK_IMPORTED_MODULE_0__.WellKnownDirectories.CandySubdirectoryName})|(((\\.farm)|(${_WellKnownDirectories__WEBPACK_IMPORTED_MODULE_0__.WellKnownDirectories.TestFarmDir}))[\\/\\\\]forms[\\/\\\\](?<gfv2>\\d{6,}))`);
|
|
45038
45036
|
const match = regexp.exec(formPath);
|
|
45039
|
-
|
|
45037
|
+
const gfv = (_match$groups$gfv = match === null || match === void 0 || (_match$groups = match.groups) === null || _match$groups === void 0 ? void 0 : _match$groups["gfv1"]) !== null && _match$groups$gfv !== void 0 ? _match$groups$gfv : match === null || match === void 0 || (_match$groups2 = match.groups) === null || _match$groups2 === void 0 ? void 0 : _match$groups2["gfv2"];
|
|
45038
|
+
if (gfv) {
|
|
45039
|
+
return gfv;
|
|
45040
|
+
}
|
|
45041
|
+
// Ошибка не долетает до консоли при работе с сервисранера. Поэтому доп. консолька
|
|
45042
|
+
// eslint-disable-next-line no-console
|
|
45043
|
+
console.trace(`[Error] Unable to determine gfv from path: ${formPath}`);
|
|
45044
|
+
throw new Error(`Unable to determine gfv from path: ${formPath}`);
|
|
45040
45045
|
}
|
|
45041
45046
|
|
|
45042
45047
|
/***/ }),
|