@kontur.candy/generator 5.54.0 → 5.54.1-crlfhash.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 +1 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -67884,19 +67884,9 @@ async function getAllDependencies(formSourcesPath, farmDirectory) {
|
|
|
67884
67884
|
}
|
|
67885
67885
|
return [path__WEBPACK_IMPORTED_MODULE_1___default().join(formSugarDirectoryPath, "index.sugar.xml"), ...sugarReferences.fetchFunctionFiles.map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSugarDirectoryPath, x)), ...sugarReferences.sugarFiles.map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSugarDirectoryPath, x + ".sugar.xml")), ...sugarReferences.resourceFiles.map(x => path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSugarDirectoryPath, x)), ...(await checkFileExists(path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSourcesPath, "settings.json"))), ...(await checkFileExists(path__WEBPACK_IMPORTED_MODULE_1___default().resolve(formSourcesPath, "hooks.js"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "autocalc"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "helpers"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "converters"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "mergers"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "jsHelpers"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "xsltTemplates"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "validations"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "schemas"))), ...(await checkFileExists(path__WEBPACK_IMPORTED_MODULE_1___default().join(farmDirectory, "tour", "tour.js"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "controls"))), ...(await getAllFilePathsInDirectory(path__WEBPACK_IMPORTED_MODULE_1___default().join(formSourcesPath, "localization")))];
|
|
67886
67886
|
}
|
|
67887
|
-
function normalizeLineEndings(content) {
|
|
67888
|
-
return content.replace(/\r\n/gi, "\n").replace(/\n\r/gi, "\n");
|
|
67889
|
-
}
|
|
67890
67887
|
async function getAllDependenciesHash(formSourcesPath, farmDirectory) {
|
|
67891
67888
|
const allDeps = await getAllDependencies(formSourcesPath, farmDirectory);
|
|
67892
|
-
const hashes = await Promise.all(allDeps.map(async depFilePath =>
|
|
67893
|
-
if ([".js", ".xml", ".xslt", ".json"].some(ext => depFilePath.endsWith(ext))) {
|
|
67894
|
-
let content = await readFileAsync(depFilePath, "utf-8");
|
|
67895
|
-
content = normalizeLineEndings(content);
|
|
67896
|
-
return md5__WEBPACK_IMPORTED_MODULE_4___default()(content);
|
|
67897
|
-
}
|
|
67898
|
-
return md5_file__WEBPACK_IMPORTED_MODULE_5___default()(depFilePath);
|
|
67899
|
-
}));
|
|
67889
|
+
const hashes = await Promise.all(allDeps.map(async depFilePath => md5_file__WEBPACK_IMPORTED_MODULE_5___default()(depFilePath)));
|
|
67900
67890
|
return md5__WEBPACK_IMPORTED_MODULE_4___default()(hashes.join(""));
|
|
67901
67891
|
}
|
|
67902
67892
|
async function readSugarFiles(formSugarDirectoryPath, references) {
|