@kontur.candy/tools 2.249.0 → 2.251.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/distr/Common/CandyApiClient/CandyApiClient.js +50 -16
- package/distr/Common/CandyApiClient/CandyApiClient.js.map +1 -1
- package/distr/Common/CandyApiClient/ICandyApiClient.js.map +1 -1
- package/distr/Common/CandyApiClient/Types/CreateDraft/CreateDraftParams.js +6 -0
- package/distr/Common/CandyApiClient/Types/CreateDraft/CreateDraftParams.js.map +1 -0
- package/distr/Common/CandyApiClient/Types/FeatureFlags/FeatureFlagsResponse.js.map +1 -1
- package/distr/Common/DriveIntegration/DriveApiClientExtension.js +53 -0
- package/distr/Common/DriveIntegration/DriveApiClientExtension.js.map +1 -0
- package/distr/Common/DriveIntegration/DriveHelpers.js +24 -0
- package/distr/Common/DriveIntegration/DriveHelpers.js.map +1 -0
- package/distr/Common/DriveIntegration/ensureCandyFrontSrvDriveUri.js +23 -0
- package/distr/Common/DriveIntegration/ensureCandyFrontSrvDriveUri.js.map +1 -0
- package/distr/Common/FSPrinterClient/FSPrinterClient.js +18 -4
- package/distr/Common/FSPrinterClient/FSPrinterClient.js.map +1 -1
- package/distr/Common/hashUtils.js +9 -0
- package/distr/Common/hashUtils.js.map +1 -1
- package/distr/Tools/src/BuildTasks/ClientJS/BuildClientJsTask.js +2 -12
- package/distr/Tools/src/BuildTasks/ClientJS/BuildClientJsTask.js.map +1 -1
- package/distr/Tools/src/BuildTasks/Engine/BuildLocalEngineTask.js +2 -3
- package/distr/Tools/src/BuildTasks/Engine/BuildLocalEngineTask.js.map +1 -1
- package/distr/Tools/src/BuildTasks/EngineStructureUtils.js +2 -27
- package/distr/Tools/src/BuildTasks/EngineStructureUtils.js.map +1 -1
- package/distr/Tools/src/BuildTasks/Form/GenerateForm.js +2 -2
- package/distr/Tools/src/BuildTasks/Form/GenerateForm.js.map +1 -1
- package/distr/Tools/src/BuildTasks/Form/NullFormGenerator.js +0 -3
- package/distr/Tools/src/BuildTasks/Form/NullFormGenerator.js.map +1 -1
- package/distr/Tools/src/BuildTasks/Form/WriteFLangNormalizationFiles.js +0 -6
- package/distr/Tools/src/BuildTasks/Form/WriteFLangNormalizationFiles.js.map +1 -1
- package/distr/Tools/src/BuildTasks/FormSource.js +6 -0
- package/distr/Tools/src/BuildTasks/FormSource.js.map +1 -0
- package/distr/Tools/src/BuildTasks/Generator/BuildGeneratorFromSourcesTask.js +3 -10
- package/distr/Tools/src/BuildTasks/Generator/BuildGeneratorFromSourcesTask.js.map +1 -1
- package/distr/Tools/src/BuildTasks/Generator/GeneratorWorker/CreateAsyncGenerator.js +18 -70
- package/distr/Tools/src/BuildTasks/Generator/GeneratorWorker/CreateAsyncGenerator.js.map +1 -1
- package/distr/Tools/src/BuildTasks/Generator/GeneratorWorker/GeneratorRequireUtils.js +17 -67
- package/distr/Tools/src/BuildTasks/Generator/GeneratorWorker/GeneratorRequireUtils.js.map +1 -1
- package/distr/Tools/src/BuildTasks/Generator/GeneratorWorker/ReadSourcesAndProcessSugarWorker.js +6 -6
- package/distr/Tools/src/BuildTasks/Generator/GeneratorWorker/ReadSourcesAndProcessSugarWorker.js.map +1 -1
- package/distr/Tools/src/BuildTasks/Generator/GeneratorWorker/RequireUncached.js +0 -9
- package/distr/Tools/src/BuildTasks/Generator/GeneratorWorker/RequireUncached.js.map +1 -1
- package/distr/Tools/src/CLICommands/BuildForms/RunBuildForms.js +3 -3
- package/distr/Tools/src/CLICommands/BuildForms/RunBuildForms.js.map +1 -1
- package/distr/Tools/src/CLICommands/BuildServer/ResourcesControllers/BuildServerBuildFormsController.js +6 -9
- package/distr/Tools/src/CLICommands/BuildServer/ResourcesControllers/BuildServerBuildFormsController.js.map +1 -1
- package/distr/Tools/src/CLICommands/BuildServer/ResourcesControllers/DevServers/BuildFormDevServer.js +38 -61
- package/distr/Tools/src/CLICommands/BuildServer/ResourcesControllers/DevServers/BuildFormDevServer.js.map +1 -1
- package/distr/Tools/src/CLICommands/BuildServer/ResourcesControllers/DevServers/ClientJsDevServer.js +6 -7
- package/distr/Tools/src/CLICommands/BuildServer/ResourcesControllers/DevServers/ClientJsDevServer.js.map +1 -1
- package/distr/Tools/src/CLICommands/BuildServer/ResourcesControllers/DevServers/EngineDevServer.js +6 -7
- package/distr/Tools/src/CLICommands/BuildServer/ResourcesControllers/DevServers/EngineDevServer.js.map +1 -1
- package/distr/Tools/src/CLICommands/BuildServer/RunBuildServer.js +13 -26
- package/distr/Tools/src/CLICommands/BuildServer/RunBuildServer.js.map +1 -1
- package/distr/Tools/src/CLICommands/DevBuild/RunDevBuild.js +4 -4
- package/distr/Tools/src/CLICommands/DevBuild/RunDevBuild.js.map +1 -1
- package/distr/Tools/src/CLICommands/Localization/RunLocalization.js +2 -2
- package/distr/Tools/src/CLICommands/Localization/RunLocalization.js.map +1 -1
- package/distr/Tools/src/CLICommands/SugarExtractor/ExtractTextsFromSugarController.js +1 -2
- package/distr/Tools/src/CLICommands/SugarExtractor/ExtractTextsFromSugarController.js.map +1 -1
- package/distr/Tools/src/CLICommands/SugarExtractor/Utils.js +1 -3
- package/distr/Tools/src/CLICommands/SugarExtractor/Utils.js.map +1 -1
- package/distr/Tools/src/CandyCLI.js +3 -3
- package/distr/Tools/src/CandyCLI.js.map +1 -1
- package/distr/Tools/src/LocalServerFrontEndDist/index.js +1 -1
- package/distr/Tools/src/LocalServerFrontEndDist/index.js.map +1 -1
- package/distr/Tools/src/ReadFarmConfig.js +1 -2
- package/distr/Tools/src/ReadFarmConfig.js.map +1 -1
- package/package.json +1 -1
- package/distr/Tools/src/BuildTasks/ClientJS/IsWebpack5.js +0 -14
- package/distr/Tools/src/BuildTasks/ClientJS/IsWebpack5.js.map +0 -1
- package/distr/Tools/src/BuildTasks/Generator/GeneratorWorker/ProcessSugarWorker.js +0 -46
- package/distr/Tools/src/BuildTasks/Generator/GeneratorWorker/ProcessSugarWorker.js.map +0 -1
- package/distr/Tools/src/BuildTasks/ReadFormSource.js +0 -114
- package/distr/Tools/src/BuildTasks/ReadFormSource.js.map +0 -1
|
@@ -11,8 +11,7 @@ function readFarmConfig(farmDirectory) {
|
|
|
11
11
|
const configEvaluationResult = require(_path.default.join(farmDirectory, "config.js"))(farmDirectory);
|
|
12
12
|
return {
|
|
13
13
|
engineDirectory: configEvaluationResult.localEngineDirectoryPath,
|
|
14
|
-
resourcesDirectory: configEvaluationResult.resourcesDirectoryPath
|
|
15
|
-
hlFarmDirectoryPath: configEvaluationResult.hlFarmDirectoryPath
|
|
14
|
+
resourcesDirectory: configEvaluationResult.resourcesDirectoryPath
|
|
16
15
|
};
|
|
17
16
|
}
|
|
18
17
|
//# sourceMappingURL=ReadFarmConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadFarmConfig.js","names":["_path","_interopRequireDefault","require","readFarmConfig","farmDirectory","configEvaluationResult","path","join","engineDirectory","localEngineDirectoryPath","resourcesDirectory","resourcesDirectoryPath"
|
|
1
|
+
{"version":3,"file":"ReadFarmConfig.js","names":["_path","_interopRequireDefault","require","readFarmConfig","farmDirectory","configEvaluationResult","path","join","engineDirectory","localEngineDirectoryPath","resourcesDirectory","resourcesDirectoryPath"],"sources":["../../../src/ReadFarmConfig.ts"],"sourcesContent":["import path from \"path\";\n\nexport interface FarmConfig {\n engineDirectory?: string;\n resourcesDirectory?: string;\n}\n\nexport function readFarmConfig(farmDirectory: string): FarmConfig {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-require-imports\n const configEvaluationResult: any = require(path.join(farmDirectory, \"config.js\"))(farmDirectory);\n return {\n engineDirectory: configEvaluationResult.localEngineDirectoryPath,\n resourcesDirectory: configEvaluationResult.resourcesDirectoryPath,\n };\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAOO,SAASC,cAAcA,CAACC,aAAqB,EAAc;EAC9D;EACA,MAAMC,sBAA2B,GAAGH,OAAO,CAACI,aAAI,CAACC,IAAI,CAACH,aAAa,EAAE,WAAW,CAAC,CAAC,CAACA,aAAa,CAAC;EACjG,OAAO;IACHI,eAAe,EAAEH,sBAAsB,CAACI,wBAAwB;IAChEC,kBAAkB,EAAEL,sBAAsB,CAACM;EAC/C,CAAC;AACL","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isYarn = isYarn;
|
|
7
|
-
var path = _interopRequireWildcard(require("path"));
|
|
8
|
-
var _fsExtra = require("fs-extra");
|
|
9
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
|
-
async function isYarn(engineSourcesDir) {
|
|
12
|
-
return await (0, _fsExtra.pathExists)(path.join(engineSourcesDir, "yarn.lock"));
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=IsWebpack5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IsWebpack5.js","names":["path","_interopRequireWildcard","require","_fsExtra","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","isYarn","engineSourcesDir","pathExists","join"],"sources":["../../../../../src/BuildTasks/ClientJS/IsWebpack5.ts"],"sourcesContent":["import * as path from \"path\";\n\nimport { pathExists } from \"fs-extra\";\n\nexport async function isYarn(engineSourcesDir: string): Promise<boolean> {\n return await pathExists(path.join(engineSourcesDir, \"yarn.lock\"));\n}\n"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAAsC,SAAAE,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAE/B,eAAeW,MAAMA,CAACC,gBAAwB,EAAoB;EACrE,OAAO,MAAM,IAAAC,mBAAU,EAAC1B,IAAI,CAAC2B,IAAI,CAACF,gBAAgB,EAAE,WAAW,CAAC,CAAC;AACrE","ignoreList":[]}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _IterableUtils = require("../../../../../Common/IterableUtils");
|
|
4
|
-
var _GeneratorRequireUtils = require("./GeneratorRequireUtils");
|
|
5
|
-
var _TypedProcessWorker = require("./TypedProcessWorker");
|
|
6
|
-
_TypedProcessWorker.TypedProcessWorker.start(async ([pathToGeneratorProcessSugar, formSugarContent, additionalContent, generationOptions, purgeCache, requestNumber], send) => {
|
|
7
|
-
try {
|
|
8
|
-
const importer = new _GeneratorRequireUtils.GeneratorSourcesImporter(purgeCache);
|
|
9
|
-
const processSugar = await importer.importProcessSugar(pathToGeneratorProcessSugar);
|
|
10
|
-
const formContent = await processSugar(formSugarContent, additionalContent, generationOptions);
|
|
11
|
-
const result = {};
|
|
12
|
-
|
|
13
|
-
// NOTE Because only JSON are allowed for IPC we need to convert Buffer -> Base64
|
|
14
|
-
// Another solution is use a stream, but formContent still need to convert or send by chunks
|
|
15
|
-
for (const [key, formContentItem] of (0, _IterableUtils.iterateEntries)(formContent)) {
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
result[key] = formContentItem instanceof Buffer ? {
|
|
18
|
-
payload: formContentItem.toString("base64"),
|
|
19
|
-
encoding: "base64"
|
|
20
|
-
} : formContentItem;
|
|
21
|
-
}
|
|
22
|
-
send({
|
|
23
|
-
type: "Result",
|
|
24
|
-
gfv: additionalContent.gfv,
|
|
25
|
-
generatedForm: result,
|
|
26
|
-
requestNumber: requestNumber
|
|
27
|
-
});
|
|
28
|
-
} catch (error) {
|
|
29
|
-
if (error instanceof Error) {
|
|
30
|
-
send({
|
|
31
|
-
type: "Error",
|
|
32
|
-
gfv: additionalContent.gfv,
|
|
33
|
-
errorText: `${error.toString()}\n${error.stack}`,
|
|
34
|
-
requestNumber: requestNumber
|
|
35
|
-
});
|
|
36
|
-
} else {
|
|
37
|
-
send({
|
|
38
|
-
type: "Error",
|
|
39
|
-
gfv: additionalContent.gfv,
|
|
40
|
-
errorText: `${error}`,
|
|
41
|
-
requestNumber: requestNumber
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=ProcessSugarWorker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessSugarWorker.js","names":["_IterableUtils","require","_GeneratorRequireUtils","_TypedProcessWorker","TypedProcessWorker","start","pathToGeneratorProcessSugar","formSugarContent","additionalContent","generationOptions","purgeCache","requestNumber","send","importer","GeneratorSourcesImporter","processSugar","importProcessSugar","formContent","result","key","formContentItem","iterateEntries","Buffer","payload","toString","encoding","type","gfv","generatedForm","error","Error","errorText","stack"],"sources":["../../../../../../src/BuildTasks/Generator/GeneratorWorker/ProcessSugarWorker.ts"],"sourcesContent":["import { GeneratedForm, GenerationOptions } from \"../../Form/GenerateForm\";\nimport { FormResources, SugarContent } from \"../../ReadFormSource\";\nimport { iterateEntries } from \"../../../../../Common/IterableUtils\";\n\nimport { GeneratorSourcesImporter } from \"./GeneratorRequireUtils\";\nimport { TypedProcessWorker } from \"./TypedProcessWorker\";\n\nexport interface GeneratedFormInterProcessMessage {\n [relativeFileName: string]: string | { payload: string; encoding: BufferEncoding };\n}\n\nexport type CallMessage = [string, SugarContent, FormResources, undefined | GenerationOptions, boolean, number];\nexport type CallResponse =\n | { type: \"Result\"; gfv: string; generatedForm: GeneratedFormInterProcessMessage; requestNumber: number }\n | { type: \"Error\"; gfv: string; errorText: string; requestNumber: number };\n\nTypedProcessWorker.start<CallMessage, CallResponse>(\n async (\n [\n pathToGeneratorProcessSugar,\n formSugarContent,\n additionalContent,\n generationOptions,\n purgeCache,\n requestNumber,\n ],\n send\n ): Promise<void> => {\n try {\n const importer = new GeneratorSourcesImporter(purgeCache);\n const processSugar = await importer.importProcessSugar(pathToGeneratorProcessSugar);\n\n const formContent: GeneratedForm = await processSugar(\n formSugarContent,\n additionalContent,\n generationOptions\n );\n\n const result: GeneratedFormInterProcessMessage = {};\n\n // NOTE Because only JSON are allowed for IPC we need to convert Buffer -> Base64\n // Another solution is use a stream, but formContent still need to convert or send by chunks\n for (const [key, formContentItem] of iterateEntries(formContent)) {\n // @ts-ignore\n result[key] =\n formContentItem instanceof Buffer\n ? { payload: formContentItem.toString(\"base64\"), encoding: \"base64\" as BufferEncoding }\n : formContentItem;\n }\n\n send({ type: \"Result\", gfv: additionalContent.gfv, generatedForm: result, requestNumber: requestNumber });\n } catch (error) {\n if (error instanceof Error) {\n send({\n type: \"Error\",\n gfv: additionalContent.gfv,\n errorText: `${error.toString()}\\n${error.stack}`,\n requestNumber: requestNumber,\n });\n } else {\n send({\n type: \"Error\",\n gfv: additionalContent.gfv,\n errorText: `${error}`,\n requestNumber: requestNumber,\n });\n }\n }\n }\n);\n"],"mappings":";;AAEA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAWAG,sCAAkB,CAACC,KAAK,CACpB,OACI,CACIC,2BAA2B,EAC3BC,gBAAgB,EAChBC,iBAAiB,EACjBC,iBAAiB,EACjBC,UAAU,EACVC,aAAa,CAChB,EACDC,IAAI,KACY;EAChB,IAAI;IACA,MAAMC,QAAQ,GAAG,IAAIC,+CAAwB,CAACJ,UAAU,CAAC;IACzD,MAAMK,YAAY,GAAG,MAAMF,QAAQ,CAACG,kBAAkB,CAACV,2BAA2B,CAAC;IAEnF,MAAMW,WAA0B,GAAG,MAAMF,YAAY,CACjDR,gBAAgB,EAChBC,iBAAiB,EACjBC,iBACJ,CAAC;IAED,MAAMS,MAAwC,GAAG,CAAC,CAAC;;IAEnD;IACA;IACA,KAAK,MAAM,CAACC,GAAG,EAAEC,eAAe,CAAC,IAAI,IAAAC,6BAAc,EAACJ,WAAW,CAAC,EAAE;MAC9D;MACAC,MAAM,CAACC,GAAG,CAAC,GACPC,eAAe,YAAYE,MAAM,GAC3B;QAAEC,OAAO,EAAEH,eAAe,CAACI,QAAQ,CAAC,QAAQ,CAAC;QAAEC,QAAQ,EAAE;MAA2B,CAAC,GACrFL,eAAe;IAC7B;IAEAR,IAAI,CAAC;MAAEc,IAAI,EAAE,QAAQ;MAAEC,GAAG,EAAEnB,iBAAiB,CAACmB,GAAG;MAAEC,aAAa,EAAEV,MAAM;MAAEP,aAAa,EAAEA;IAAc,CAAC,CAAC;EAC7G,CAAC,CAAC,OAAOkB,KAAK,EAAE;IACZ,IAAIA,KAAK,YAAYC,KAAK,EAAE;MACxBlB,IAAI,CAAC;QACDc,IAAI,EAAE,OAAO;QACbC,GAAG,EAAEnB,iBAAiB,CAACmB,GAAG;QAC1BI,SAAS,EAAE,GAAGF,KAAK,CAACL,QAAQ,CAAC,CAAC,KAAKK,KAAK,CAACG,KAAK,EAAE;QAChDrB,aAAa,EAAEA;MACnB,CAAC,CAAC;IACN,CAAC,MAAM;MACHC,IAAI,CAAC;QACDc,IAAI,EAAE,OAAO;QACbC,GAAG,EAAEnB,iBAAiB,CAACmB,GAAG;QAC1BI,SAAS,EAAE,GAAGF,KAAK,EAAE;QACrBlB,aAAa,EAAEA;MACnB,CAAC,CAAC;IACN;EACJ;AACJ,CACJ,CAAC","ignoreList":[]}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.readFormSource = readFormSource;
|
|
8
|
-
var _path = _interopRequireDefault(require("path"));
|
|
9
|
-
var _fsExtra = require("fs-extra");
|
|
10
|
-
var _recursiveReaddir = _interopRequireDefault(require("recursive-readdir"));
|
|
11
|
-
var _FsUtils = require("../Commons/FsUtils");
|
|
12
|
-
var _GetRngSchemaFileExtension = require("../../../Common/GetRngSchemaFileExtension");
|
|
13
|
-
var _FormPathUtils = require("../../../Common/FormPathUtils");
|
|
14
|
-
var _ExtractGFVPath = require("../../../Common/ExtractGFVPath/ExtractGFVPath");
|
|
15
|
-
async function readFormSource(formSourcesPath, farmDirectory, hlFarmDirectoryPath) {
|
|
16
|
-
const rootPath = farmDirectory;
|
|
17
|
-
const formName = (0, _FormPathUtils.extractGfvFromFormPath)(formSourcesPath);
|
|
18
|
-
const sugarContent = await readSugarFiles(_path.default.join(formSourcesPath, "sugar"));
|
|
19
|
-
const result = {
|
|
20
|
-
sugarContent: sugarContent,
|
|
21
|
-
resources: {
|
|
22
|
-
gfv: _path.default.basename(formSourcesPath),
|
|
23
|
-
additionalSettings: await readFileWithDefault(formSourcesPath, "settings.json", "{}"),
|
|
24
|
-
autocalcsContent: await readAutoCalcFiles(_path.default.join(formSourcesPath, "autocalc")),
|
|
25
|
-
helpersContent: await readJavaScriptFilesWithNames(_path.default.join(formSourcesPath, "helpers")),
|
|
26
|
-
commonHelpersContent: await readJavaScriptFilesWithNames(_path.default.join(farmDirectory, "jsHelpers")),
|
|
27
|
-
validationsContent: await readJavaScriptFilesWithNames(_path.default.join(formSourcesPath, "validations")),
|
|
28
|
-
schemaRngContent: await readSchemaRngFile(_path.default.join(formSourcesPath, "schemas"), formName),
|
|
29
|
-
kcJsXmlContent: await readFileWithDefault(_path.default.join(formSourcesPath, "autocalc"), `${formName}.КС.candy.js.xml`, "<dummy/>"),
|
|
30
|
-
kcLangContent: await readFileWithDefault(_path.default.join(formSourcesPath, "autocalc"), `${formName}.КС.candy.js.kclang`, ""),
|
|
31
|
-
normativeHelpContent: await readNormativeHelpFile(hlFarmDirectoryPath),
|
|
32
|
-
tourSteps: await readFileWithDefault(_path.default.join(rootPath, "tour"), "tour.js", "{}"),
|
|
33
|
-
hooksContent: await readHooksFile(formSourcesPath),
|
|
34
|
-
customControlsContent: await readCustomControlsFiles(_path.default.join(formSourcesPath, "controls"))
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
if ((0, _ExtractGFVPath.extractGFV)(formName).group === "4") {
|
|
38
|
-
const commonResourcesPath = _path.default.join(formSourcesPath, "..", "..", "commonResources");
|
|
39
|
-
|
|
40
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
41
|
-
const {
|
|
42
|
-
elements
|
|
43
|
-
} = require(_path.default.join(commonResourcesPath, "statTitle.js"));
|
|
44
|
-
const hasRegionalForm = Object.values(sugarContent).find(sugar => sugar.includes('hasRegionalForms="true"'));
|
|
45
|
-
if (!result.resources.hooksContent && hasRegionalForm) {
|
|
46
|
-
result.resources.hooksContent = await readFileWithDefault(commonResourcesPath, "regionStatHooks.js");
|
|
47
|
-
}
|
|
48
|
-
result.resources.preprocessor = {
|
|
49
|
-
...elements
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
return result;
|
|
53
|
-
}
|
|
54
|
-
async function readSugarFiles(formSugarDirectoryPath) {
|
|
55
|
-
const fileNames = await (0, _fsExtra.readdir)(formSugarDirectoryPath);
|
|
56
|
-
const result = {};
|
|
57
|
-
for (const fileName of fileNames) {
|
|
58
|
-
const sugarModuleName = fileName.replace(".sugar.xml", "");
|
|
59
|
-
const sugarModuleContent = await (0, _fsExtra.readFile)(_path.default.join(formSugarDirectoryPath, fileName), "utf-8");
|
|
60
|
-
result[sugarModuleName] = sugarModuleContent;
|
|
61
|
-
}
|
|
62
|
-
return result;
|
|
63
|
-
}
|
|
64
|
-
async function readCustomControlsFiles(formSugarDirectoryPath) {
|
|
65
|
-
if (!(await (0, _FsUtils.isDirectoryExists)(formSugarDirectoryPath))) {
|
|
66
|
-
return {};
|
|
67
|
-
}
|
|
68
|
-
const fileNames = await (0, _recursiveReaddir.default)(formSugarDirectoryPath);
|
|
69
|
-
const result = {};
|
|
70
|
-
for (const fileName of fileNames) {
|
|
71
|
-
const sugarModuleContent = await (0, _fsExtra.readFile)(fileName, "utf-8");
|
|
72
|
-
const relativeFileName = ("controls\\" + fileName.replace(formSugarDirectoryPath + "\\", "")).replace(/\\/g, "/");
|
|
73
|
-
result[relativeFileName] = sugarModuleContent;
|
|
74
|
-
}
|
|
75
|
-
return result;
|
|
76
|
-
}
|
|
77
|
-
async function readAutoCalcFiles(formAutoCalcPath) {
|
|
78
|
-
try {
|
|
79
|
-
const files = await (0, _fsExtra.readdir)(formAutoCalcPath);
|
|
80
|
-
const jsFiles = files.filter(filename => /\.js$/.test(filename));
|
|
81
|
-
return Promise.all(jsFiles.map(filename => (0, _fsExtra.readFile)(_path.default.join(formAutoCalcPath, filename), "utf-8")));
|
|
82
|
-
} catch {
|
|
83
|
-
return [];
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
async function readJavaScriptFilesWithNames(formJavaScriptFilesPath) {
|
|
87
|
-
try {
|
|
88
|
-
const files = await (0, _fsExtra.readdir)(formJavaScriptFilesPath);
|
|
89
|
-
const jsFiles = files.filter(filename => /\.js$/.test(filename));
|
|
90
|
-
return Promise.all(jsFiles.map(async filename => ({
|
|
91
|
-
filename: _path.default.parse(filename).name,
|
|
92
|
-
content: await (0, _fsExtra.readFile)(_path.default.join(formJavaScriptFilesPath, filename), "utf-8")
|
|
93
|
-
})));
|
|
94
|
-
} catch {
|
|
95
|
-
return [];
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
function readSchemaRngFile(formSchemasPath, gfv) {
|
|
99
|
-
return (0, _fsExtra.readFile)(_path.default.join(formSchemasPath, `${gfv}${(0, _GetRngSchemaFileExtension.getRngSchemaFileExtension)(formSchemasPath, gfv)}`), "utf-8");
|
|
100
|
-
}
|
|
101
|
-
function readNormativeHelpFile(hlFarmDirectoryPath) {
|
|
102
|
-
return (0, _fsExtra.readFile)(_path.default.join(hlFarmDirectoryPath, "Forms", "helpid_normativ.xml"), "utf-8");
|
|
103
|
-
}
|
|
104
|
-
function readHooksFile(formDirectoryPath) {
|
|
105
|
-
return (0, _fsExtra.readFile)(_path.default.join(formDirectoryPath, "hooks.js"), "utf-8").catch(() => "");
|
|
106
|
-
}
|
|
107
|
-
async function readFileWithDefault(filePath, filename, defaultValue) {
|
|
108
|
-
try {
|
|
109
|
-
return await (0, _fsExtra.readFile)(_path.default.join(filePath, filename), "utf-8");
|
|
110
|
-
} catch {
|
|
111
|
-
return defaultValue;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
//# sourceMappingURL=ReadFormSource.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReadFormSource.js","names":["_path","_interopRequireDefault","require","_fsExtra","_recursiveReaddir","_FsUtils","_GetRngSchemaFileExtension","_FormPathUtils","_ExtractGFVPath","readFormSource","formSourcesPath","farmDirectory","hlFarmDirectoryPath","rootPath","formName","extractGfvFromFormPath","sugarContent","readSugarFiles","path","join","result","resources","gfv","basename","additionalSettings","readFileWithDefault","autocalcsContent","readAutoCalcFiles","helpersContent","readJavaScriptFilesWithNames","commonHelpersContent","validationsContent","schemaRngContent","readSchemaRngFile","kcJsXmlContent","kcLangContent","normativeHelpContent","readNormativeHelpFile","tourSteps","hooksContent","readHooksFile","customControlsContent","readCustomControlsFiles","extractGFV","group","commonResourcesPath","elements","hasRegionalForm","Object","values","find","sugar","includes","preprocessor","formSugarDirectoryPath","fileNames","readdir","fileName","sugarModuleName","replace","sugarModuleContent","readFile","isDirectoryExists","recursiveReaddir","relativeFileName","formAutoCalcPath","files","jsFiles","filter","filename","test","Promise","all","map","formJavaScriptFilesPath","parse","name","content","formSchemasPath","getRngSchemaFileExtension","formDirectoryPath","catch","filePath","defaultValue"],"sources":["../../../../src/BuildTasks/ReadFormSource.ts"],"sourcesContent":["import path from \"path\";\n\nimport { readdir, readFile } from \"fs-extra\";\nimport recursiveReaddir from \"recursive-readdir\";\n\nimport { isDirectoryExists } from \"../Commons/FsUtils\";\nimport { getRngSchemaFileExtension } from \"../../../Common/GetRngSchemaFileExtension\";\nimport { extractGfvFromFormPath } from \"../../../Common/FormPathUtils\";\nimport { extractGFV } from \"../../../Common/ExtractGFVPath/ExtractGFVPath\";\n\nexport interface SugarContent {\n [sugarFileNameWithoutExtension: string]: string;\n}\n\nexport interface CustomControlsContent {\n [key: string]: string;\n}\n\nexport interface FormResources {\n gfv: string;\n additionalSettings: undefined | string;\n autocalcsContent: string[];\n helpersContent: Array<{ filename: string; content: string }>;\n commonHelpersContent: Array<{ filename: string; content: string }>;\n validationsContent: Array<{ filename: string; content: string }>;\n schemaRngContent: string;\n kcJsXmlContent: undefined | string;\n kcLangContent: undefined | string;\n normativeHelpContent: string;\n tourSteps: undefined | string;\n hooksContent: undefined | string;\n customControlsContent: CustomControlsContent;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n preprocessor?: any[];\n}\n\nexport interface FormSource {\n sugarContent: SugarContent;\n resources: FormResources;\n}\n\nexport async function readFormSource(\n formSourcesPath: string,\n farmDirectory: string,\n hlFarmDirectoryPath: string\n): Promise<FormSource> {\n const rootPath = farmDirectory;\n const formName = extractGfvFromFormPath(formSourcesPath);\n const sugarContent = await readSugarFiles(path.join(formSourcesPath, \"sugar\"));\n const result: FormSource = {\n sugarContent: sugarContent,\n resources: {\n gfv: path.basename(formSourcesPath),\n additionalSettings: await readFileWithDefault(formSourcesPath, \"settings.json\", \"{}\"),\n autocalcsContent: await readAutoCalcFiles(path.join(formSourcesPath, \"autocalc\")),\n helpersContent: await readJavaScriptFilesWithNames(path.join(formSourcesPath, \"helpers\")),\n commonHelpersContent: await readJavaScriptFilesWithNames(path.join(farmDirectory, \"jsHelpers\")),\n validationsContent: await readJavaScriptFilesWithNames(path.join(formSourcesPath, \"validations\")),\n schemaRngContent: await readSchemaRngFile(path.join(formSourcesPath, \"schemas\"), formName),\n kcJsXmlContent: await readFileWithDefault(\n path.join(formSourcesPath, \"autocalc\"),\n `${formName}.КС.candy.js.xml`,\n \"<dummy/>\"\n ),\n kcLangContent: await readFileWithDefault(\n path.join(formSourcesPath, \"autocalc\"),\n `${formName}.КС.candy.js.kclang`,\n \"\"\n ),\n normativeHelpContent: await readNormativeHelpFile(hlFarmDirectoryPath),\n tourSteps: await readFileWithDefault(path.join(rootPath, \"tour\"), \"tour.js\", \"{}\"),\n hooksContent: await readHooksFile(formSourcesPath),\n customControlsContent: await readCustomControlsFiles(path.join(formSourcesPath, \"controls\")),\n },\n };\n\n if (extractGFV(formName).group === \"4\") {\n const commonResourcesPath = path.join(formSourcesPath, \"..\", \"..\", \"commonResources\");\n\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const { elements } = require(path.join(commonResourcesPath, \"statTitle.js\"));\n const hasRegionalForm = Object.values(sugarContent).find(sugar => sugar.includes('hasRegionalForms=\"true\"'));\n\n if (!result.resources.hooksContent && hasRegionalForm) {\n result.resources.hooksContent = await readFileWithDefault(commonResourcesPath, \"regionStatHooks.js\");\n }\n result.resources.preprocessor = { ...elements };\n }\n return result;\n}\n\nasync function readSugarFiles(formSugarDirectoryPath: string): Promise<SugarContent> {\n const fileNames = await readdir(formSugarDirectoryPath);\n const result: SugarContent = {};\n for (const fileName of fileNames) {\n const sugarModuleName = fileName.replace(\".sugar.xml\", \"\");\n const sugarModuleContent = await readFile(path.join(formSugarDirectoryPath, fileName), \"utf-8\");\n result[sugarModuleName] = sugarModuleContent;\n }\n return result;\n}\n\nasync function readCustomControlsFiles(formSugarDirectoryPath: string): Promise<CustomControlsContent> {\n if (!(await isDirectoryExists(formSugarDirectoryPath))) {\n return {};\n }\n const fileNames = await recursiveReaddir(formSugarDirectoryPath);\n const result: CustomControlsContent = {};\n for (const fileName of fileNames) {\n const sugarModuleContent = await readFile(fileName, \"utf-8\");\n const relativeFileName = (\"controls\\\\\" + fileName.replace(formSugarDirectoryPath + \"\\\\\", \"\")).replace(\n /\\\\/g,\n \"/\"\n );\n result[relativeFileName] = sugarModuleContent;\n }\n return result;\n}\n\nasync function readAutoCalcFiles(formAutoCalcPath: string): Promise<string[]> {\n try {\n const files = await readdir(formAutoCalcPath);\n const jsFiles = files.filter(filename => /\\.js$/.test(filename));\n return Promise.all(jsFiles.map(filename => readFile(path.join(formAutoCalcPath, filename), \"utf-8\")));\n } catch {\n return [];\n }\n}\n\nasync function readJavaScriptFilesWithNames(\n formJavaScriptFilesPath: string\n): Promise<Array<{ filename: string; content: string }>> {\n try {\n const files = await readdir(formJavaScriptFilesPath);\n const jsFiles = files.filter(filename => /\\.js$/.test(filename));\n return Promise.all(\n jsFiles.map(async filename => ({\n filename: path.parse(filename).name,\n content: await readFile(path.join(formJavaScriptFilesPath, filename), \"utf-8\"),\n }))\n );\n } catch {\n return [];\n }\n}\n\nfunction readSchemaRngFile(formSchemasPath: string, gfv: string): Promise<string> {\n return readFile(path.join(formSchemasPath, `${gfv}${getRngSchemaFileExtension(formSchemasPath, gfv)}`), \"utf-8\");\n}\n\nfunction readNormativeHelpFile(hlFarmDirectoryPath: string): Promise<string> {\n return readFile(path.join(hlFarmDirectoryPath, \"Forms\", \"helpid_normativ.xml\"), \"utf-8\");\n}\n\nfunction readHooksFile(formDirectoryPath: string): Promise<string> {\n return readFile(path.join(formDirectoryPath, \"hooks.js\"), \"utf-8\").catch(() => \"\");\n}\n\nasync function readFileWithDefault(\n filePath: string,\n filename: string,\n defaultValue?: string\n): Promise<undefined | string> {\n try {\n return await readFile(path.join(filePath, filename), \"utf-8\");\n } catch {\n return defaultValue;\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI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