@yamato-daiwa/automation 0.6.4 → 0.7.0-alpha.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.
Files changed (3) hide show
  1. package/EntryPoint.js +992 -1297
  2. package/README.md +24 -7
  3. package/package.json +15 -15
package/EntryPoint.js CHANGED
@@ -26,155 +26,6 @@ function revisionHash(data) {
26
26
  }
27
27
 
28
28
 
29
- /***/ }),
30
-
31
- /***/ "../node_modules/w3c-html-validator/dist/w3c-html-validator.js":
32
- /*!*********************************************************************!*\
33
- !*** ../node_modules/w3c-html-validator/dist/w3c-html-validator.js ***!
34
- \*********************************************************************/
35
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
36
-
37
- __webpack_require__.r(__webpack_exports__);
38
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39
- /* harmony export */ w3cHtmlValidator: () => (/* binding */ w3cHtmlValidator)
40
- /* harmony export */ });
41
- /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! chalk */ "chalk");
42
- /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ "fs");
43
- /* harmony import */ var fancy_log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! fancy-log */ "fancy-log");
44
- /* harmony import */ var superagent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! superagent */ "superagent");
45
- /* harmony import */ var slash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! slash */ "slash");
46
- //! w3c-html-validator v1.8.2 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
47
-
48
-
49
-
50
-
51
-
52
-
53
- const w3cHtmlValidator = {
54
- version: '1.8.2',
55
- validate(options) {
56
- const defaults = {
57
- checkUrl: 'https://validator.w3.org/nu/',
58
- dryRun: false,
59
- ignoreLevel: null,
60
- ignoreMessages: [],
61
- output: 'json',
62
- };
63
- const settings = { ...defaults, ...options };
64
- if (!settings.html && !settings.filename && !settings.website)
65
- throw new Error('[w3c-html-validator] Must specify the "html", "filename", or "website" option.');
66
- if (![null, 'info', 'warning'].includes(settings.ignoreLevel))
67
- throw new Error(`[w3c-html-validator] Invalid ignoreLevel option: ${settings.ignoreLevel}`);
68
- if (settings.output !== 'json' && settings.output !== 'html')
69
- throw new Error('[w3c-html-validator] Option "output" must be "json" or "html".');
70
- const filename = settings.filename ? slash__WEBPACK_IMPORTED_MODULE_4__(settings.filename) : null;
71
- const mode = settings.html ? 'html' : filename ? 'filename' : 'website';
72
- const readFile = (filename) => fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync(filename, 'utf-8').replace(/\r/g, '');
73
- const inputHtml = settings.html ?? (filename ? readFile(filename) : null);
74
- const makePostRequest = () => superagent__WEBPACK_IMPORTED_MODULE_3__.post(settings.checkUrl)
75
- .set('Content-Type', 'text/html; encoding=utf-8')
76
- .send(inputHtml);
77
- const makeGetRequest = () => superagent__WEBPACK_IMPORTED_MODULE_3__.get(settings.checkUrl)
78
- .query({ doc: settings.website });
79
- const w3cRequest = inputHtml ? makePostRequest() : makeGetRequest();
80
- w3cRequest.set('User-Agent', 'W3C HTML Validator ~ github.com/center-key/w3c-html-validator');
81
- w3cRequest.query({ out: settings.output });
82
- const json = settings.output === 'json';
83
- const success = '<p class="success">';
84
- const titleLookup = {
85
- html: `HTML String (characters: ${inputHtml?.length})`,
86
- filename: filename,
87
- website: settings.website,
88
- };
89
- const filterMessages = (response) => {
90
- const aboveInfo = (subType) => settings.ignoreLevel === 'info' && !!subType;
91
- const aboveIgnoreLevel = (message) => !settings.ignoreLevel || message.type !== 'info' || aboveInfo(message.subType);
92
- const matchesSkipPattern = (title) => settings.ignoreMessages.some(pattern => typeof pattern === 'string' ? title.includes(pattern) : pattern.test(title));
93
- const isImportant = (message) => aboveIgnoreLevel(message) && !matchesSkipPattern(message.message);
94
- if (json)
95
- response.body.messages = response.body.messages?.filter(isImportant) ?? [];
96
- return response;
97
- };
98
- const toValidatorResults = (response) => ({
99
- validates: json ? !response.body.messages.length : !!response.text?.includes(success),
100
- mode: mode,
101
- title: titleLookup[mode],
102
- html: inputHtml,
103
- filename: filename,
104
- website: settings.website || null,
105
- output: settings.output,
106
- status: response.statusCode || -1,
107
- messages: json ? response.body.messages : null,
108
- display: json ? null : response.text,
109
- dryRun: settings.dryRun,
110
- });
111
- const handleError = (reason) => {
112
- const errRes = reason.response ?? {};
113
- const getMsg = () => [errRes.status, errRes.res.statusMessage, errRes.request.url];
114
- const message = reason.response ? getMsg() : [reason.errno, reason.message];
115
- errRes.body = { messages: [{ type: 'network-error', message: message.join(' ') }] };
116
- return toValidatorResults(errRes);
117
- };
118
- const pseudoResponse = {
119
- statusCode: 200,
120
- body: { messages: [] },
121
- text: 'Validation bypassed.',
122
- };
123
- const pseudoRequest = () => new Promise(resolve => resolve(pseudoResponse));
124
- const validation = settings.dryRun ? pseudoRequest() : w3cRequest;
125
- return validation.then(filterMessages).then(toValidatorResults).catch(handleError);
126
- },
127
- dryRunNotice() {
128
- fancy_log__WEBPACK_IMPORTED_MODULE_2__(chalk__WEBPACK_IMPORTED_MODULE_0__.gray('w3c-html-validator'), chalk__WEBPACK_IMPORTED_MODULE_0__.yellowBright('dry run mode:'), chalk__WEBPACK_IMPORTED_MODULE_0__.whiteBright('validation being bypassed'));
129
- },
130
- summary(numFiles) {
131
- fancy_log__WEBPACK_IMPORTED_MODULE_2__(chalk__WEBPACK_IMPORTED_MODULE_0__.gray('w3c-html-validator'), chalk__WEBPACK_IMPORTED_MODULE_0__.magenta('files: ' + String(numFiles)));
132
- },
133
- reporter(results, options) {
134
- const defaults = {
135
- continueOnFail: false,
136
- maxMessageLen: null,
137
- quiet: false,
138
- title: null,
139
- };
140
- const settings = { ...defaults, ...options };
141
- if (typeof results?.validates !== 'boolean')
142
- throw new Error('[w3c-html-validator] Invalid results for reporter(): ' + String(results));
143
- const messages = results.messages ?? [];
144
- const title = settings.title ?? results.title;
145
- const status = results.validates ? chalk__WEBPACK_IMPORTED_MODULE_0__.green.bold('✔ pass') : chalk__WEBPACK_IMPORTED_MODULE_0__.red.bold('✘ fail');
146
- const count = results.validates ? '' : `(messages: ${messages.length})`;
147
- if (!results.validates || !settings.quiet)
148
- fancy_log__WEBPACK_IMPORTED_MODULE_2__(chalk__WEBPACK_IMPORTED_MODULE_0__.gray('w3c-html-validator'), status, chalk__WEBPACK_IMPORTED_MODULE_0__.blue.bold(title), chalk__WEBPACK_IMPORTED_MODULE_0__.white(count));
149
- const typeColorMap = {
150
- error: chalk__WEBPACK_IMPORTED_MODULE_0__.red.bold,
151
- warning: chalk__WEBPACK_IMPORTED_MODULE_0__.yellow.bold,
152
- info: chalk__WEBPACK_IMPORTED_MODULE_0__.white.bold,
153
- };
154
- const logMessage = (message) => {
155
- const type = message.subType ?? message.type;
156
- const typeColor = typeColorMap[type] ?? chalk__WEBPACK_IMPORTED_MODULE_0__.redBright.bold;
157
- const location = `line ${message.lastLine}, column ${message.firstColumn}:`;
158
- const lineText = message.extract?.replace(/\n/g, '\\n');
159
- const maxLen = settings.maxMessageLen ?? undefined;
160
- fancy_log__WEBPACK_IMPORTED_MODULE_2__(typeColor('HTML ' + type + ':'), message.message.substring(0, maxLen));
161
- if (message.lastLine)
162
- fancy_log__WEBPACK_IMPORTED_MODULE_2__(chalk__WEBPACK_IMPORTED_MODULE_0__.white(location), chalk__WEBPACK_IMPORTED_MODULE_0__.magenta(lineText));
163
- };
164
- messages.forEach(logMessage);
165
- const failDetails = () => {
166
- const toString = (message) => `${message.subType ?? message.type} line ${message.lastLine} column ${message.firstColumn}`;
167
- const fileDetails = () => `${results.filename} -- ${results.messages.map(toString).join(', ')}`;
168
- return !results.filename ? results.messages[0].message : fileDetails();
169
- };
170
- if (!settings.continueOnFail && !results.validates)
171
- throw new Error('[w3c-html-validator] Failed: ' + failDetails());
172
- return results;
173
- },
174
- };
175
-
176
-
177
-
178
29
  /***/ }),
179
30
 
180
31
  /***/ "../package.json":
@@ -183,7 +34,7 @@ const w3cHtmlValidator = {
183
34
  \***********************/
184
35
  /***/ ((module) => {
185
36
 
186
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@yamato-daiwa/automation","version":"0.6.4","description":"The project building tool with declarative YAML configuration specializing on Pug, Stylus and TypeScript as source code languages.","keywords":["build","pug","stylus","tool","typescript"],"engines":{"node":">=18.0.0"},"bin":{"yda":"Executable"},"files":["EntryPoint.js"],"dependencies":{"@eslint-community/eslint-plugin-eslint-comments":"4.4.1","@stylistic/eslint-plugin":"3.1.0","@typescript-eslint/eslint-plugin":"8.26.0","@typescript-eslint/parser":"8.26.0","@vue/compiler-sfc":"3.5.13","@webdiscus/pug-loader":"2.11.1","@yamato-daiwa/es-extensions":"1.8.0-alpha.9","@yamato-daiwa/es-extensions-nodejs":"1.8.0-alpha.9","@yamato-daiwa/style_guides":"0.6.5","autoprefixer":"10.4.20","browser-sync":"3.0.3","css-loader":"7.1.2","cssnano":"7.0.6","dotenv":"16.4.7","eslint":"9.22.0","eslint-plugin-import":"2.31.0","eslint-plugin-n":"17.16.2","eslint-plugin-react":"7.37.4","eslint-plugin-vue":"9.33.0","eslint-plugin-vue-pug":"0.6.2","fork-ts-checker-webpack-plugin":"7.3.0","gulp":"4.0.2","gulp-data":"1.3.1","gulp-if":"3.0.0","gulp-imagemin":"7.1.0","gulp-nodemon":"2.5.0","gulp-plumber":"1.2.1","gulp-postcss":"10.0.0","gulp-pug":"5.0.0","gulp-sourcemaps":"3.0.0","gulp-stylus":"3.0.1","imagemin-pngquant":"9.0.2","js-beautify":"1.15.4","json5-loader":"4.0.1","node-html-parser":"6.1.13","node-notifier":"10.0.1","pa11y":"8.0.0","probe-image-size":"7.2.3","pug-lint":"2.7.0","pug3-ast-loader":"0.0.0","puppeteer":"22.10.0","rev-hash":"4.1.0","stlint":"1.0.65","stream-combiner2":"1.1.1","style-loader":"4.0.0","stylus":"0.63.0","stylus-loader":"8.1.1","ts-loader":"9.5.2","vinyl":"2.2.1","vue-loader":"17.4.2","vue-style-loader":"4.1.3","w3c-html-validator":"1.8.2","webpack":"5.98.0","webpack-node-externals":"3.0.0","webpack-stream":"7.0.0","worker-loader":"3.0.8","yaml-loader":"0.8.1"},"devDependencies":{"@types/browser-sync":"2.29.0","@types/cssnano":"5.0.0","@types/gulp":"4.0.17","@types/gulp-if":"3.0.4","@types/gulp-imagemin":"7.0.3","@types/gulp-nodemon":"0.0.37","@types/gulp-plumber":"0.0.37","@types/gulp-postcss":"8.0.6","@types/gulp-sourcemaps":"0.0.38","@types/gulp-stylus":"2.7.8","@types/js-beautify":"1.14.3","@types/node":"22.13.7","@types/node-notifier":"8.0.5","@types/pa11y":"5.3.7","@types/probe-image-size":"7.2.5","@types/pug":"2.0.10","@types/vnu-jar":"17.11.2","@types/webpack-node-externals":"3.0.4","@types/webpack-stream":"3.2.15","eslint-webpack-plugin":"4.2.0","ts-node":"10.9.2","typescript":"5.8.2","vnu-jar":"24.10.17","webpack-cli":"6.0.1"},"scripts":{"Incremental Development Building":"webpack --mode development","Production Building":"webpack --mode production","Linting":"eslint Source"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation.git"},"homepage":"https://automation.yamato-daiwa.com/","bugs":{"url":"https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation/issues","email":"tokugawa.takesi@gmail.com"}}');
37
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@yamato-daiwa/automation","version":"0.7.0","description":"The project building tool with declarative YAML configuration specializing on Pug, Stylus and TypeScript as source code languages.","keywords":["build","pug","stylus","tool","typescript"],"engines":{"node":">=18.0.0"},"bin":{"yda":"Executable"},"files":["EntryPoint.js"],"dependencies":{"@eslint-community/eslint-plugin-eslint-comments":"4.5.0","@stylistic/eslint-plugin":"3.1.0","@typescript-eslint/eslint-plugin":"8.31.1","@typescript-eslint/parser":"8.31.1","@vue/compiler-sfc":"3.5.13","@webdiscus/pug-loader":"2.11.1","@yamato-daiwa/es-extensions":"1.8.0-alpha.9","@yamato-daiwa/es-extensions-nodejs":"1.8.0-alpha.9","@yamato-daiwa/style_guides":"0.6.6","autoprefixer":"10.4.21","browser-sync":"3.0.4","css-loader":"7.1.2","cssnano":"7.0.6","dotenv":"16.5.0","eslint":"9.26.0","eslint-plugin-import":"2.31.0","eslint-plugin-n":"17.17.0","eslint-plugin-react":"7.37.5","eslint-plugin-vue":"9.33.0","eslint-plugin-vue-pug":"0.6.2","fork-ts-checker-webpack-plugin":"7.3.0","gulp":"4.0.2","gulp-data":"1.3.1","gulp-if":"3.0.0","gulp-imagemin":"7.1.0","gulp-nodemon":"2.5.0","gulp-plumber":"1.2.1","gulp-postcss":"10.0.0","gulp-pug":"5.0.0","gulp-sourcemaps":"3.0.0","gulp-stylus":"3.0.1","imagemin-pngquant":"9.0.2","js-beautify":"1.15.4","json5-loader":"4.0.1","nanoid":"5.1.5","node-html-parser":"6.1.13","node-notifier":"10.0.1","pa11y":"8.0.0","probe-image-size":"7.2.3","pug-lint":"2.7.0","pug3-ast-loader":"0.0.0","puppeteer":"24.7.2","rev-hash":"4.1.0","stlint":"1.0.65","stream-combiner2":"1.1.1","style-loader":"4.0.0","stylus":"0.63.0","stylus-loader":"8.1.1","ts-loader":"9.5.2","vinyl":"2.2.1","vue-loader":"17.4.2","vue-style-loader":"4.1.3","webpack":"5.99.7","webpack-node-externals":"3.0.0","webpack-stream":"7.0.0","worker-loader":"3.0.8","yaml-loader":"0.8.1"},"devDependencies":{"@types/browser-sync":"2.29.0","@types/cssnano":"5.0.0","@types/gulp":"4.0.17","@types/gulp-if":"3.0.4","@types/gulp-imagemin":"7.0.3","@types/gulp-nodemon":"0.0.37","@types/gulp-plumber":"0.0.37","@types/gulp-postcss":"8.0.6","@types/gulp-sourcemaps":"0.0.38","@types/gulp-stylus":"2.7.8","@types/js-beautify":"1.14.3","@types/node":"22.15.2","@types/node-notifier":"8.0.5","@types/pa11y":"5.3.7","@types/probe-image-size":"7.2.5","@types/pug":"2.0.10","@types/vnu-jar":"17.11.2","@types/webpack-node-externals":"3.0.4","@types/webpack-stream":"3.2.15","eslint-webpack-plugin":"4.2.0","ts-node":"10.9.2","typescript":"5.8.2","vnu-jar":"24.10.17","webpack-cli":"6.0.1"},"scripts":{"Incremental Development Building":"webpack --mode development","Production Building":"webpack --mode production","Linting":"eslint Source"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation.git"},"homepage":"https://automation.yamato-daiwa.com/","bugs":{"url":"https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation/issues","email":"tokugawa.takesi@gmail.com"}}');
187
38
 
188
39
  /***/ }),
189
40
 
@@ -8685,23 +8536,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
8685
8536
  return (mod && mod.__esModule) ? mod : { "default": mod };
8686
8537
  };
8687
8538
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8688
- /* ─── Settings representatives ──────────────────────────────────────────────────────────────────────────────────── */
8539
+ /* ─── Settings Representatives ───────────────────────────────────────────────────────────────────────────────────── */
8689
8540
  const MarkupProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/MarkupProcessingSettingsRepresentative */ "./ProjectBuilding/SourceCodeProcessing/Markup/MarkupProcessingSettingsRepresentative.ts"));
8541
+ /* ─── State Management ───────────────────────────────────────────────────────────────────────────────────────────── */
8542
+ const MarkupProcessingSharedState_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/MarkupProcessingSharedState */ "./ProjectBuilding/SourceCodeProcessing/Markup/MarkupProcessingSharedState.ts"));
8690
8543
  /* ─── Vinyl FS ──────────────────────────────────────────────────────────────────────────────────────────────────── */
8691
8544
  const vinyl_1 = __importDefault(__webpack_require__(/*! vinyl */ "vinyl"));
8692
8545
  const VinylFileClass_1 = __importDefault(__webpack_require__(/*! @Utils/VinylFileClass */ "./Utils/VinylFileClass.ts"));
8546
+ /* ─── Utils ─────────────────────────────────────────────────────────────────────────────────────────────────────── */
8693
8547
  const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
8694
8548
  const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
8695
- const addPenultimateFileNameExtension_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/Strings/addPenultimateFileNameExtension */ "./UtilsIncubator/Strings/addPenultimateFileNameExtension.ts"));
8696
8549
  class MarkupEntryPointVinylFile extends VinylFileClass_1.default {
8697
8550
  sourceAbsolutePath;
8698
8551
  outputDirectoryAbsolutePath;
8699
8552
  actualEntryPointsGroupSettings;
8700
8553
  pageStateDependentVariationData;
8701
- staticPreviewLocalizationData;
8554
+ localizationData;
8702
8555
  markupProcessingSettingsRepresentative;
8703
8556
  pageStateDependentVariationsSpecification;
8704
- constructor({ initialPlainVinylFile, markupProcessingSettingsRepresentative, pageStateDependentVariationData, staticPreviewLocalizationData }) {
8557
+ constructor({ initialPlainVinylFile, markupProcessingSettingsRepresentative, pageStateDependentVariationData, localizationData }) {
8705
8558
  super({
8706
8559
  explicitlySpecifiedPathPart: initialPlainVinylFile.base,
8707
8560
  path: initialPlainVinylFile.path,
@@ -8721,117 +8574,41 @@ class MarkupEntryPointVinylFile extends VinylFileClass_1.default {
8721
8574
  else if ((0, es_extensions_1.isNotUndefined)(pageStateDependentVariationData)) {
8722
8575
  this.pageStateDependentVariationData = pageStateDependentVariationData;
8723
8576
  }
8724
- if ((0, es_extensions_1.isNotUndefined)(staticPreviewLocalizationData)) {
8725
- this.staticPreviewLocalizationData = staticPreviewLocalizationData;
8577
+ if ((0, es_extensions_1.isNotUndefined)(localizationData)) {
8578
+ this.localizationData = localizationData;
8726
8579
  }
8727
8580
  }
8728
- manageVariationsForStaticPreviewIfAnyAndStaticPreviewBuildingMode() {
8729
- /* [ Approach ] For all product building modes except static preview all following settings will be undefined. */
8730
- const localeDependentPagesVariationsSettings = this.markupProcessingSettingsRepresentative.localeDependentPagesVariationsSettings;
8731
- const pageVariations = [];
8732
- if ((0, es_extensions_1.isUndefined)(localeDependentPagesVariationsSettings)) {
8733
- if ((0, es_extensions_1.isUndefined)(this.pageStateDependentVariationsSpecification)) {
8734
- return {
8735
- newFiles: [],
8736
- mustInitialFileBeDeleted: false
8737
- };
8738
- }
8739
- for (const [derivedFileAbsolutePath, state] of this.pageStateDependentVariationsSpecification.derivedPagesAndStatesMap.entries()) {
8740
- pageVariations.push(new MarkupEntryPointVinylFile({
8741
- initialPlainVinylFile: new vinyl_1.default({
8742
- base: this.base,
8743
- path: derivedFileAbsolutePath,
8744
- contents: this.contents
8745
- }),
8746
- markupProcessingSettingsRepresentative: this.markupProcessingSettingsRepresentative,
8747
- pageStateDependentVariationData: { [this.pageStateDependentVariationsSpecification.stateVariableName]: state }
8748
- }));
8749
- }
8581
+ manageVariations() {
8582
+ const actualPageVariationsMetadata = (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(MarkupProcessingSharedState_1.default.pagesVariationsMetadata, this.sourceAbsolutePath);
8583
+ if (actualPageVariationsMetadata.mustInitialFileBeKept &&
8584
+ actualPageVariationsMetadata.absoluteSourcePathsOfAllVariations.size === 1 &&
8585
+ actualPageVariationsMetadata.absoluteSourcePathsOfAllVariations.has(this.sourceAbsolutePath)) {
8750
8586
  return {
8751
- newFiles: pageVariations,
8587
+ newFiles: [],
8752
8588
  mustInitialFileBeDeleted: false
8753
8589
  };
8754
8590
  }
8755
- const { localizedStringResourcesConstantName, localeVariableName, locales } = localeDependentPagesVariationsSettings;
8756
- const areLocaleDependentVariationsRequiredForCurrentFile = locales.size > 0 &&
8757
- !localeDependentPagesVariationsSettings.excludedFilesAbsolutePaths.includes(this.sourceAbsolutePath);
8758
- if (areLocaleDependentVariationsRequiredForCurrentFile) {
8759
- for (const localeData of locales.values()) {
8760
- pageVariations.push(new MarkupEntryPointVinylFile({
8761
- initialPlainVinylFile: new vinyl_1.default({
8762
- base: this.base,
8763
- path: (0, addPenultimateFileNameExtension_1.default)({
8764
- targetPath: this.sourceAbsolutePath,
8765
- targetFileNamePenultimateExtensionWithOrWithoutLeadingDot: localeData.outputFileInterimNameExtensionWithoutDot,
8766
- mustAppendDuplicateEvenIfTargetPenultimateFileNameExtensionAlreadyExist: true,
8767
- mustAppendLastFileNameExtensionInsteadIfThereIsNoOne: true
8768
- }),
8769
- contents: this.contents
8770
- }),
8771
- markupProcessingSettingsRepresentative: this.markupProcessingSettingsRepresentative,
8772
- staticPreviewLocalizationData: {
8773
- ...(0, es_extensions_1.isNotUndefined)(localeVariableName) && (0, es_extensions_1.isNotUndefined)(localeData.localeVariableValue) ?
8774
- { [localeVariableName]: localeData.localeVariableValue } : null,
8775
- ...(0, es_extensions_1.isNotUndefined)(localizedStringResourcesConstantName) && (0, es_extensions_1.isNotUndefined)(localeData.stringResources) ?
8776
- { [localizedStringResourcesConstantName]: localeData.stringResources } : null
8777
- },
8778
- ...(0, es_extensions_1.isNotUndefined)(this.pageStateDependentVariationsSpecification) ?
8779
- {
8780
- pageStateDependentVariationData: {
8781
- [this.pageStateDependentVariationsSpecification.stateVariableName]: {}
8782
- }
8783
- } :
8784
- null
8785
- }));
8786
- }
8787
- }
8788
- if ((0, es_extensions_1.isUndefined)(this.pageStateDependentVariationsSpecification)) {
8789
- return {
8790
- newFiles: pageVariations,
8791
- mustInitialFileBeDeleted: areLocaleDependentVariationsRequiredForCurrentFile
8792
- };
8793
- }
8794
- for (const [derivedFileAbsolutePath, state] of this.pageStateDependentVariationsSpecification.derivedPagesAndStatesMap.entries()) {
8795
- if (areLocaleDependentVariationsRequiredForCurrentFile) {
8796
- for (const localeData of locales.values()) {
8797
- pageVariations.push(new MarkupEntryPointVinylFile({
8798
- initialPlainVinylFile: new vinyl_1.default({
8799
- base: this.base,
8800
- path: (0, addPenultimateFileNameExtension_1.default)({
8801
- targetPath: derivedFileAbsolutePath,
8802
- targetFileNamePenultimateExtensionWithOrWithoutLeadingDot: localeData.outputFileInterimNameExtensionWithoutDot,
8803
- mustAppendDuplicateEvenIfTargetPenultimateFileNameExtensionAlreadyExist: true,
8804
- mustAppendLastFileNameExtensionInsteadIfThereIsNoOne: true
8805
- }),
8806
- contents: this.contents
8807
- }),
8808
- markupProcessingSettingsRepresentative: this.markupProcessingSettingsRepresentative,
8809
- pageStateDependentVariationData: {
8810
- [this.pageStateDependentVariationsSpecification.stateVariableName]: state
8811
- },
8812
- staticPreviewLocalizationData: {
8813
- ...(0, es_extensions_1.isNotUndefined)(localeVariableName) && (0, es_extensions_1.isNotUndefined)(localeData.localeVariableValue) ?
8814
- { [localeVariableName]: localeData.localeVariableValue } : null,
8815
- ...(0, es_extensions_1.isNotUndefined)(localizedStringResourcesConstantName) && (0, es_extensions_1.isNotUndefined)(localeData.stringResources) ?
8816
- { [localizedStringResourcesConstantName]: localeData.stringResources } : null
8817
- }
8818
- }));
8819
- }
8591
+ const pageVariations = [];
8592
+ for (const [variationFileAbsolutePath__forwardSlashesPathSeparators, dataForPug] of actualPageVariationsMetadata.dataForPugBySourceFilesAbsolutePaths.entries()) {
8593
+ if (this.sourceAbsolutePath === variationFileAbsolutePath__forwardSlashesPathSeparators) {
8820
8594
  continue;
8821
8595
  }
8822
8596
  pageVariations.push(new MarkupEntryPointVinylFile({
8823
8597
  initialPlainVinylFile: new vinyl_1.default({
8824
8598
  base: this.base,
8825
- path: derivedFileAbsolutePath,
8599
+ path: variationFileAbsolutePath__forwardSlashesPathSeparators,
8826
8600
  contents: this.contents
8827
8601
  }),
8828
8602
  markupProcessingSettingsRepresentative: this.markupProcessingSettingsRepresentative,
8829
- pageStateDependentVariationData: { [this.pageStateDependentVariationsSpecification.stateVariableName]: state }
8603
+ pageStateDependentVariationData: {
8604
+ ...dataForPug.localizationData ?? null,
8605
+ ...dataForPug.pageStateDependentVariationData ?? null
8606
+ }
8830
8607
  }));
8831
8608
  }
8832
8609
  return {
8833
8610
  newFiles: pageVariations,
8834
- mustInitialFileBeDeleted: areLocaleDependentVariationsRequiredForCurrentFile
8611
+ mustInitialFileBeDeleted: !actualPageVariationsMetadata.mustInitialFileBeKept
8835
8612
  };
8836
8613
  }
8837
8614
  }
@@ -8844,10 +8621,14 @@ exports["default"] = MarkupEntryPointVinylFile;
8844
8621
  /*!*************************************************************************************!*\
8845
8622
  !*** ./ProjectBuilding/SourceCodeProcessing/Markup/MarkupProcessingRestrictions.ts ***!
8846
8623
  \*************************************************************************************/
8847
- /***/ ((__unused_webpack_module, exports) => {
8624
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
8848
8625
 
8849
8626
 
8627
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8628
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8629
+ };
8850
8630
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8631
+ const addPenultimateFileNameExtension_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/Strings/addPenultimateFileNameExtension */ "./UtilsIncubator/Strings/addPenultimateFileNameExtension.ts"));
8851
8632
  var MarkupProcessingRestrictions;
8852
8633
  (function (MarkupProcessingRestrictions) {
8853
8634
  MarkupProcessingRestrictions.supportedSourceFilesNamesExtensionsWithoutLeadingDots = ["pug"];
@@ -8864,6 +8645,23 @@ var MarkupProcessingRestrictions;
8864
8645
  SupportedAccessibilityStandards["WCAG2AA"] = "WCAG2AA";
8865
8646
  SupportedAccessibilityStandards["WCAG2AAA"] = "WCAG2AAA";
8866
8647
  })(SupportedAccessibilityStandards = MarkupProcessingRestrictions.SupportedAccessibilityStandards || (MarkupProcessingRestrictions.SupportedAccessibilityStandards = {}));
8648
+ function addLocaleIdentifyingPenultimateFileNameToAbsolutePathOfMarkupEntryPointSourceFile({ initialAbsolutePathOfMarkupEntryPointSourceFile, localeIdentifyingPenultimateFileNameExtensionWithoutLeadingDot }) {
8649
+ return (0, addPenultimateFileNameExtension_1.default)({
8650
+ targetPath: initialAbsolutePathOfMarkupEntryPointSourceFile,
8651
+ targetFileNamePenultimateExtensionWithOrWithoutLeadingDot: localeIdentifyingPenultimateFileNameExtensionWithoutLeadingDot,
8652
+ mustAppendDuplicateEvenIfTargetPenultimateFileNameExtensionAlreadyExist: true,
8653
+ mustAppendLastFileNameExtensionInsteadIfThereIsNoOne: true
8654
+ });
8655
+ }
8656
+ MarkupProcessingRestrictions.addLocaleIdentifyingPenultimateFileNameToAbsolutePathOfMarkupEntryPointSourceFile = addLocaleIdentifyingPenultimateFileNameToAbsolutePathOfMarkupEntryPointSourceFile;
8657
+ function computeOutputFileNameWithAllExtensionsForLocalizedMarkupEntryPoint({ sourceFileNameWithoutLastExtension, localeIdentifyingPenultimateFileNameExtensionWithoutLeadingDot, outputFileNameWithLastExtensionWithLeadingDot }) {
8658
+ return [
8659
+ sourceFileNameWithoutLastExtension,
8660
+ localeIdentifyingPenultimateFileNameExtensionWithoutLeadingDot,
8661
+ outputFileNameWithLastExtensionWithLeadingDot
8662
+ ].join(".");
8663
+ }
8664
+ MarkupProcessingRestrictions.computeOutputFileNameWithAllExtensionsForLocalizedMarkupEntryPoint = computeOutputFileNameWithAllExtensionsForLocalizedMarkupEntryPoint;
8867
8665
  })(MarkupProcessingRestrictions || (MarkupProcessingRestrictions = {}));
8868
8666
  exports["default"] = MarkupProcessingRestrictions;
8869
8667
 
@@ -8888,6 +8686,7 @@ const PLAIN_COPIED_FILES_POINTER_ALIAS_PREFIX_1 = __importDefault(__webpack_requ
8888
8686
  const GulpStreamBasedSourceCodeProcessingConfigRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/SettingsRepresentatives/GulpStreamBasedSourceCodeProcessingConfigRepresentative */ "./ProjectBuilding/Common/SettingsRepresentatives/GulpStreamBasedSourceCodeProcessingConfigRepresentative.ts"));
8889
8687
  /* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
8890
8688
  const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
8689
+ const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
8891
8690
  class MarkupProcessingSettingsRepresentative extends GulpStreamBasedSourceCodeProcessingConfigRepresentative_1.default {
8892
8691
  /* [ Theory ] Below two fields could be even or not. */
8893
8692
  supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots;
@@ -8961,9 +8760,6 @@ class MarkupProcessingSettingsRepresentative extends GulpStreamBasedSourceCodePr
8961
8760
  return this.staticPreviewSettings.pagesVariations.stateDependent.
8962
8761
  get((0, es_extensions_1.replaceDoubleBackslashesWithForwardSlashes)(targetFileAbsolutePath));
8963
8762
  }
8964
- get localeDependentPagesVariationsSettings() {
8965
- return this.staticPreviewSettings.pagesVariations.localeDependent;
8966
- }
8967
8763
  get staticDataForStaticPreview() {
8968
8764
  return this.staticPreviewSettings.importsFromStaticDataFiles;
8969
8765
  }
@@ -8971,6 +8767,139 @@ class MarkupProcessingSettingsRepresentative extends GulpStreamBasedSourceCodePr
8971
8767
  get mustLogSourceFilesWatcherEvents() {
8972
8768
  return this.loggingSettings.filesWatcherEvents;
8973
8769
  }
8770
+ /* ━━━ Pages Variations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
8771
+ createPagesVariationsMetadata(sourceFilesAbsolutePaths__forwardSlashesSeparators) {
8772
+ return new Map(sourceFilesAbsolutePaths__forwardSlashesSeparators.map((sourceFileAbsolutePath__forwardSlashesSeparators) => [
8773
+ sourceFileAbsolutePath__forwardSlashesSeparators,
8774
+ this.createPageVariationsMetadata(sourceFileAbsolutePath__forwardSlashesSeparators)
8775
+ ]));
8776
+ }
8777
+ createPageVariationsMetadata(sourceFileAbsolutePath__forwardSlashesSeparators) {
8778
+ const sourceAndOutputAbsolutePathsOfAllVariations = new Map();
8779
+ const absoluteSourcePathsOfAllVariations = new Set();
8780
+ const dataForPugBySourceFilesAbsolutePaths = new Map();
8781
+ const markupEntryPointsGroupSettingsActualForCurrentFile = this.getExpectedToExistEntryPointsGroupSettingsRelevantForSpecifiedSourceFileAbsolutePath(sourceFileAbsolutePath__forwardSlashesSeparators);
8782
+ const { localizedStringResourcesConstantName, localeConstantName, locales, excludedFilesAbsolutePaths, nameOfConstantForInterpolationToLangHTML_Attribute } = markupEntryPointsGroupSettingsActualForCurrentFile.localization;
8783
+ const areLocalizedVersionsRequiredForCurrentFile = locales.size > 0 &&
8784
+ !excludedFilesAbsolutePaths.includes(sourceFileAbsolutePath__forwardSlashesSeparators);
8785
+ const outputFileNameWithLastExtensionWithLeadingDot = this.computeOutputFileNameExtension({
8786
+ entryPointsGroupSettingsActualForTargetFile: markupEntryPointsGroupSettingsActualForCurrentFile,
8787
+ mustPrependDotToFileNameExtension: false
8788
+ });
8789
+ const outputDirectoryForCurrentMarkupFileAndDerivedOnes = MarkupProcessingSettingsRepresentative.
8790
+ computeRelevantOutputDirectoryAbsolutePathForTargetSourceFile(sourceFileAbsolutePath__forwardSlashesSeparators, markupEntryPointsGroupSettingsActualForCurrentFile);
8791
+ const entryPointStateDependentVariationsSpecification = this.getStateDependentVariationsForEntryPointWithAbsolutePath(sourceFileAbsolutePath__forwardSlashesSeparators);
8792
+ if (areLocalizedVersionsRequiredForCurrentFile) {
8793
+ for (const { outputFileInterimNameExtensionWithoutDot, localeConstantValue, stringResources, valueOfConstantForInterpolationToLangHTML_Attribute } of locales.values()) {
8794
+ const absolutePathOfLocalizedEntryPointSourceFile = MarkupProcessingRestrictions_1.default.
8795
+ addLocaleIdentifyingPenultimateFileNameToAbsolutePathOfMarkupEntryPointSourceFile({
8796
+ initialAbsolutePathOfMarkupEntryPointSourceFile: sourceFileAbsolutePath__forwardSlashesSeparators,
8797
+ localeIdentifyingPenultimateFileNameExtensionWithoutLeadingDot: outputFileInterimNameExtensionWithoutDot
8798
+ });
8799
+ sourceAndOutputAbsolutePathsOfAllVariations.set(absolutePathOfLocalizedEntryPointSourceFile, es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
8800
+ outputDirectoryForCurrentMarkupFileAndDerivedOnes,
8801
+ MarkupProcessingRestrictions_1.default.computeOutputFileNameWithAllExtensionsForLocalizedMarkupEntryPoint({
8802
+ sourceFileNameWithoutLastExtension: (0, es_extensions_1.extractFileNameWithoutLastExtension)(sourceFileAbsolutePath__forwardSlashesSeparators),
8803
+ localeIdentifyingPenultimateFileNameExtensionWithoutLeadingDot: outputFileInterimNameExtensionWithoutDot,
8804
+ outputFileNameWithLastExtensionWithLeadingDot
8805
+ })
8806
+ ], { alwaysForwardSlashSeparators: true }));
8807
+ absoluteSourcePathsOfAllVariations.add(absolutePathOfLocalizedEntryPointSourceFile);
8808
+ dataForPugBySourceFilesAbsolutePaths.set(absolutePathOfLocalizedEntryPointSourceFile, {
8809
+ localizationData: {
8810
+ ...(0, es_extensions_1.isNotUndefined)(localeConstantName) && (0, es_extensions_1.isNotUndefined)(localeConstantValue) ?
8811
+ { [localeConstantName]: localeConstantValue } : null,
8812
+ ...(0, es_extensions_1.isNotUndefined)(localizedStringResourcesConstantName) && (0, es_extensions_1.isNotUndefined)(stringResources) ?
8813
+ { [localizedStringResourcesConstantName]: stringResources } : null,
8814
+ ...(0, es_extensions_1.isNotUndefined)(nameOfConstantForInterpolationToLangHTML_Attribute) &&
8815
+ (0, es_extensions_1.isNotUndefined)(valueOfConstantForInterpolationToLangHTML_Attribute) ?
8816
+ {
8817
+ [nameOfConstantForInterpolationToLangHTML_Attribute]: valueOfConstantForInterpolationToLangHTML_Attribute
8818
+ } : null
8819
+ },
8820
+ ...(0, es_extensions_1.isNotUndefined)(entryPointStateDependentVariationsSpecification) ?
8821
+ {
8822
+ pageStateDependentVariationData: {
8823
+ [entryPointStateDependentVariationsSpecification.stateVariableName]: {}
8824
+ }
8825
+ } :
8826
+ null
8827
+ });
8828
+ }
8829
+ }
8830
+ else {
8831
+ sourceAndOutputAbsolutePathsOfAllVariations.set(sourceFileAbsolutePath__forwardSlashesSeparators, es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
8832
+ outputDirectoryForCurrentMarkupFileAndDerivedOnes,
8833
+ `${(0, es_extensions_1.extractFileNameWithoutLastExtension)(sourceFileAbsolutePath__forwardSlashesSeparators)}.` +
8834
+ outputFileNameWithLastExtensionWithLeadingDot
8835
+ ], { alwaysForwardSlashSeparators: true }));
8836
+ absoluteSourcePathsOfAllVariations.add(sourceFileAbsolutePath__forwardSlashesSeparators);
8837
+ }
8838
+ for (const derivedSourceFileAbsolutePath of (entryPointStateDependentVariationsSpecification?.derivedPagesAndStatesMap ?? new Map()).keys()) {
8839
+ if (areLocalizedVersionsRequiredForCurrentFile) {
8840
+ for (const { outputFileInterimNameExtensionWithoutDot, localeConstantValue, stringResources, valueOfConstantForInterpolationToLangHTML_Attribute } of locales.values()) {
8841
+ const absolutePathOfLocalizeEntryPointSourceFile = MarkupProcessingRestrictions_1.default.
8842
+ addLocaleIdentifyingPenultimateFileNameToAbsolutePathOfMarkupEntryPointSourceFile({
8843
+ initialAbsolutePathOfMarkupEntryPointSourceFile: derivedSourceFileAbsolutePath,
8844
+ localeIdentifyingPenultimateFileNameExtensionWithoutLeadingDot: outputFileInterimNameExtensionWithoutDot
8845
+ });
8846
+ sourceAndOutputAbsolutePathsOfAllVariations.set(absolutePathOfLocalizeEntryPointSourceFile, es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
8847
+ outputDirectoryForCurrentMarkupFileAndDerivedOnes,
8848
+ MarkupProcessingRestrictions_1.default.computeOutputFileNameWithAllExtensionsForLocalizedMarkupEntryPoint({
8849
+ sourceFileNameWithoutLastExtension: (0, es_extensions_1.extractFileNameWithoutLastExtension)(derivedSourceFileAbsolutePath),
8850
+ localeIdentifyingPenultimateFileNameExtensionWithoutLeadingDot: outputFileInterimNameExtensionWithoutDot,
8851
+ outputFileNameWithLastExtensionWithLeadingDot
8852
+ })
8853
+ ], { alwaysForwardSlashSeparators: true }));
8854
+ absoluteSourcePathsOfAllVariations.add(absolutePathOfLocalizeEntryPointSourceFile);
8855
+ dataForPugBySourceFilesAbsolutePaths.set(absolutePathOfLocalizeEntryPointSourceFile, {
8856
+ localizationData: {
8857
+ ...(0, es_extensions_1.isNotUndefined)(localeConstantName) && (0, es_extensions_1.isNotUndefined)(localeConstantValue) ?
8858
+ { [localeConstantName]: localeConstantValue } : null,
8859
+ ...(0, es_extensions_1.isNotUndefined)(localizedStringResourcesConstantName) && (0, es_extensions_1.isNotUndefined)(stringResources) ?
8860
+ { [localizedStringResourcesConstantName]: stringResources } : null,
8861
+ ...(0, es_extensions_1.isNotUndefined)(nameOfConstantForInterpolationToLangHTML_Attribute) &&
8862
+ (0, es_extensions_1.isNotUndefined)(valueOfConstantForInterpolationToLangHTML_Attribute) ?
8863
+ {
8864
+ [nameOfConstantForInterpolationToLangHTML_Attribute]: valueOfConstantForInterpolationToLangHTML_Attribute
8865
+ } : null
8866
+ },
8867
+ ...(0, es_extensions_1.isNotUndefined)(entryPointStateDependentVariationsSpecification) ?
8868
+ {
8869
+ pageStateDependentVariationData: {
8870
+ [entryPointStateDependentVariationsSpecification.stateVariableName]: (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(entryPointStateDependentVariationsSpecification.derivedPagesAndStatesMap, derivedSourceFileAbsolutePath)
8871
+ }
8872
+ } :
8873
+ null
8874
+ });
8875
+ }
8876
+ }
8877
+ else {
8878
+ sourceAndOutputAbsolutePathsOfAllVariations.set(derivedSourceFileAbsolutePath, es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
8879
+ outputDirectoryForCurrentMarkupFileAndDerivedOnes,
8880
+ `${(0, es_extensions_1.extractFileNameWithoutLastExtension)(derivedSourceFileAbsolutePath)}.` +
8881
+ outputFileNameWithLastExtensionWithLeadingDot
8882
+ ], { alwaysForwardSlashSeparators: true }));
8883
+ absoluteSourcePathsOfAllVariations.add(derivedSourceFileAbsolutePath);
8884
+ dataForPugBySourceFilesAbsolutePaths.set(derivedSourceFileAbsolutePath, {
8885
+ localizationData: {},
8886
+ ...(0, es_extensions_1.isNotUndefined)(entryPointStateDependentVariationsSpecification) ?
8887
+ {
8888
+ pageStateDependentVariationData: {
8889
+ [entryPointStateDependentVariationsSpecification.stateVariableName]: (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(entryPointStateDependentVariationsSpecification.derivedPagesAndStatesMap, derivedSourceFileAbsolutePath)
8890
+ }
8891
+ } :
8892
+ null
8893
+ });
8894
+ }
8895
+ }
8896
+ return {
8897
+ mustInitialFileBeKept: !areLocalizedVersionsRequiredForCurrentFile,
8898
+ sourceAndOutputAbsolutePathsOfAllVariations,
8899
+ absoluteSourcePathsOfAllVariations,
8900
+ dataForPugBySourceFilesAbsolutePaths
8901
+ };
8902
+ }
8974
8903
  }
8975
8904
  exports["default"] = MarkupProcessingSettingsRepresentative;
8976
8905
 
@@ -9064,82 +8993,97 @@ const SourceCodeProcessingSettingsGenericProperties__FromFile__RawValid_1 = __im
9064
8993
  const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
9065
8994
  var MarkupProcessingSettings__FromFile__RawValid;
9066
8995
  (function (MarkupProcessingSettings__FromFile__RawValid) {
9067
- function getLocalizedPropertiesSpecification({ markupProcessingPropertiesLocalization, localizedConsumingProjectLocalizedPreDefinedBuildingModes, lintingSettingsLocalizedPropertiesSpecification, sourceCodeProcessingSettingsGenericPropertiesLocalization, entryPointsGroupBuildingModeDependentOutputGenericSettingsLocalizedPropertiesSpecification }) {
8996
+ function generateLocalizationPropertiesSpecification(additionalPropertiesSpecification = {}) {
9068
8997
  return {
9069
- /* ━━━ Common ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
9070
- $common: {
9071
- newName: "common",
9072
- type: Object,
9073
- required: false,
9074
- preValidationModifications: es_extensions_1.nullToUndefined,
9075
- properties: {
9076
- $localization: {
9077
- newName: "localization",
8998
+ newName: "localization",
8999
+ type: Object,
9000
+ required: false,
9001
+ preValidationModifications: es_extensions_1.nullToUndefined,
9002
+ properties: {
9003
+ $stringResourcesFileRelativePath: {
9004
+ newName: "stringResourcesFileRelativePath",
9005
+ type: String,
9006
+ required: false,
9007
+ minimalCharactersCount: 1
9008
+ },
9009
+ $localizedStringResourcesConstantName: {
9010
+ newName: "localizedStringResourcesConstantName",
9011
+ type: String,
9012
+ required: false,
9013
+ minimalCharactersCount: 1
9014
+ },
9015
+ $localeConstantName: {
9016
+ newName: "localeConstantName",
9017
+ type: String,
9018
+ required: false,
9019
+ minimalCharactersCount: 1
9020
+ },
9021
+ $nameOfConstantForInterpolationToLangHTML_Attribute: {
9022
+ newName: "nameOfConstantForInterpolationToLangHTML_Attribute",
9023
+ type: String,
9024
+ required: false,
9025
+ minimalCharactersCount: 1
9026
+ },
9027
+ $locales: {
9028
+ newName: "locales",
9029
+ type: es_extensions_1.RawObjectDataProcessor.ValuesTypesIDs.associativeArrayOfUniformTypeValues,
9030
+ required: true,
9031
+ minimalEntriesCount: 1,
9032
+ value: {
9078
9033
  type: Object,
9079
- required: false,
9080
- preValidationModifications: es_extensions_1.nullToUndefined,
9081
9034
  properties: {
9082
- $stringResourcesFileRelativePath: {
9083
- newName: "stringResourcesFileRelativePath",
9035
+ $outputFileInterimNameExtensionWithoutDot: {
9036
+ newName: "outputFileInterimNameExtensionWithoutDot",
9084
9037
  type: String,
9085
- required: false,
9038
+ required: true,
9086
9039
  minimalCharactersCount: 1
9087
9040
  },
9088
- $localizedStringResourcesConstantName: {
9089
- newName: "localizedStringResourcesConstantName",
9041
+ $localeConstantValue: {
9042
+ newName: "localeConstantValue",
9090
9043
  type: String,
9091
9044
  required: false,
9092
9045
  minimalCharactersCount: 1
9093
9046
  },
9094
- $localeConstantName: {
9095
- newName: "localeConstantName",
9047
+ $keyInLocalizedStringResourcesObject: {
9048
+ newName: "keyInLocalizedStringResourcesObject",
9096
9049
  type: String,
9097
9050
  required: false,
9098
9051
  minimalCharactersCount: 1
9099
9052
  },
9100
- $nameOfConstantForInterpolationToLangHTML_Attribute: {
9101
- newName: "nameOfConstantForInterpolationToLangHTML_Attribute",
9053
+ $valueOfConstantForInterpolationToLangHTML_Attribute: {
9054
+ newName: "valueOfConstantForInterpolationToLangHTML_Attribute",
9102
9055
  type: String,
9103
9056
  required: false,
9104
9057
  minimalCharactersCount: 1
9105
- },
9106
- $locales: {
9107
- newName: "locales",
9108
- type: es_extensions_1.RawObjectDataProcessor.ValuesTypesIDs.associativeArrayOfUniformTypeValues,
9109
- required: true,
9110
- minimalEntriesCount: 1,
9111
- value: {
9112
- type: Object,
9113
- properties: {
9114
- $outputFileInterimNameExtensionWithoutDot: {
9115
- newName: "outputFileInterimNameExtensionWithoutDot",
9116
- type: String,
9117
- required: true,
9118
- minimalCharactersCount: 1
9119
- },
9120
- $localeConstantValue: {
9121
- newName: "localeConstantValue",
9122
- type: String,
9123
- required: false,
9124
- minimalCharactersCount: 1
9125
- },
9126
- $keyInLocalizedStringResourcesObject: {
9127
- newName: "keyInLocalizedStringResourcesObject",
9128
- type: String,
9129
- required: false,
9130
- minimalCharactersCount: 1
9131
- },
9132
- $valueOfConstantForInterpolationToLangHTML_Attribute: {
9133
- newName: "valueOfConstantForInterpolationToLangHTML_Attribute",
9134
- type: String,
9135
- required: false,
9136
- minimalCharactersCount: 1
9137
- }
9138
- }
9139
- }
9140
9058
  }
9141
9059
  }
9142
- },
9060
+ }
9061
+ },
9062
+ ...additionalPropertiesSpecification
9063
+ }
9064
+ };
9065
+ }
9066
+ MarkupProcessingSettings__FromFile__RawValid.generateLocalizationPropertiesSpecification = generateLocalizationPropertiesSpecification;
9067
+ function getLocalizedPropertiesSpecification({ markupProcessingPropertiesLocalization, localizedConsumingProjectLocalizedPreDefinedBuildingModes, lintingSettingsLocalizedPropertiesSpecification, sourceCodeProcessingSettingsGenericPropertiesLocalization, entryPointsGroupBuildingModeDependentOutputGenericSettingsLocalizedPropertiesSpecification }) {
9068
+ return {
9069
+ /* ━━━ Common ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
9070
+ $common: {
9071
+ newName: "common",
9072
+ type: Object,
9073
+ required: false,
9074
+ preValidationModifications: es_extensions_1.nullToUndefined,
9075
+ properties: {
9076
+ $localization: generateLocalizationPropertiesSpecification({
9077
+ $excludedFilesPathsRelativeRelativeToProjectRootDirectory: {
9078
+ newName: "excludedFilesPathsRelativeRelativeToProjectRootDirectory",
9079
+ type: Array,
9080
+ required: false,
9081
+ element: {
9082
+ type: String,
9083
+ minimalCharactersCount: 1
9084
+ }
9085
+ }
9086
+ }),
9143
9087
  $buildingModeDependent: {
9144
9088
  newName: "buildingModeDependent",
9145
9089
  type: es_extensions_1.RawObjectDataProcessor.ValuesTypesIDs.associativeArrayOfUniformTypeValues,
@@ -9183,89 +9127,17 @@ var MarkupProcessingSettings__FromFile__RawValid;
9183
9127
  type: Object,
9184
9128
  required: false,
9185
9129
  properties: {
9186
- $pagesVariations: {
9187
- newName: "pagesVariations",
9130
+ $stateDependentPagesVariations: {
9131
+ newName: "stateDependentPagesVariations",
9188
9132
  type: Object,
9189
9133
  required: false,
9190
9134
  preValidationModifications: es_extensions_1.nullToUndefined,
9191
9135
  properties: {
9192
- $stateDependent: {
9193
- newName: "stateDependent",
9194
- type: Object,
9195
- required: false,
9196
- preValidationModifications: es_extensions_1.nullToUndefined,
9197
- properties: {
9198
- $specificationFileRelativePath: {
9199
- newName: "specificationFileRelativePath",
9200
- type: String,
9201
- required: true,
9202
- minimalCharactersCount: 1
9203
- }
9204
- }
9205
- },
9206
- $localeDependent: {
9207
- newName: "localeDependent",
9208
- type: Object,
9209
- required: false,
9210
- preValidationModifications: es_extensions_1.nullToUndefined,
9211
- properties: {
9212
- $stringResourcesFileRelativePath: {
9213
- newName: "stringResourcesFileRelativePath",
9214
- type: String,
9215
- required: false,
9216
- minimalCharactersCount: 1
9217
- },
9218
- $localizedStringResourcesConstantName: {
9219
- newName: "localizedStringResourcesConstantName",
9220
- type: String,
9221
- required: false,
9222
- minimalCharactersCount: 1
9223
- },
9224
- $localeVariableName: {
9225
- newName: "localeVariableName",
9226
- type: String,
9227
- required: false,
9228
- minimalCharactersCount: 1
9229
- },
9230
- $locales: {
9231
- newName: "locales",
9232
- type: es_extensions_1.RawObjectDataProcessor.ValuesTypesIDs.associativeArrayOfUniformTypeValues,
9233
- required: true,
9234
- minimalEntriesCount: 1,
9235
- value: {
9236
- type: Object,
9237
- properties: {
9238
- $localeVariableValue: {
9239
- newName: "localeVariableValue",
9240
- type: String,
9241
- required: false,
9242
- minimalCharactersCount: 1
9243
- },
9244
- $keyInLocalizedStringResourcesObject: {
9245
- newName: "keyInLocalizedStringResourcesObject",
9246
- type: String,
9247
- required: false,
9248
- minimalCharactersCount: 1
9249
- },
9250
- $outputFileInterimNameExtensionWithoutDot: {
9251
- newName: "outputFileInterimNameExtensionWithoutDot",
9252
- type: String,
9253
- required: true,
9254
- minimalCharactersCount: 1
9255
- }
9256
- }
9257
- }
9258
- },
9259
- $excludedFilesRelativePaths: {
9260
- newName: "excludedFilesRelativePaths",
9261
- type: Array,
9262
- required: false,
9263
- element: {
9264
- type: String,
9265
- minimalCharactersCount: 1
9266
- }
9267
- }
9268
- }
9136
+ $specificationFileRelativePath: {
9137
+ newName: "specificationFileRelativePath",
9138
+ type: String,
9139
+ required: true,
9140
+ minimalCharactersCount: 1
9269
9141
  }
9270
9142
  }
9271
9143
  },
@@ -9294,40 +9166,38 @@ var MarkupProcessingSettings__FromFile__RawValid;
9294
9166
  }
9295
9167
  }
9296
9168
  },
9297
- // ━━━ TODO ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
9298
- [markupProcessingPropertiesLocalization.linting.KEY]: {
9169
+ $linting: {
9299
9170
  newName: "linting",
9300
9171
  preValidationModifications: es_extensions_1.nullToUndefined,
9301
9172
  type: Object,
9302
9173
  required: false,
9303
9174
  properties: lintingSettingsLocalizedPropertiesSpecification
9304
9175
  },
9305
- [markupProcessingPropertiesLocalization.importingFromTypeScript.KEY]: {
9176
+ $importingFromTypeScript: {
9306
9177
  newName: "importingFromTypeScript",
9307
9178
  preValidationModifications: es_extensions_1.nullToUndefined,
9308
9179
  type: Object,
9309
9180
  required: false,
9310
9181
  properties: {
9311
- [markupProcessingPropertiesLocalization.importingFromTypeScript.typeScriptConfigurationFileRelativePath.KEY]: {
9182
+ $typeScriptConfigurationFileRelativePath: {
9312
9183
  newName: "typeScriptConfigurationFileRelativePath",
9313
9184
  type: String,
9314
9185
  required: false,
9315
9186
  minimalCharactersCount: 1
9316
9187
  },
9317
- [markupProcessingPropertiesLocalization.importingFromTypeScript.importedNamespace.KEY]: {
9188
+ $importedNamespace: {
9318
9189
  newName: "importedNamespace",
9319
9190
  type: String,
9320
9191
  required: true,
9321
9192
  minimalCharactersCount: 1
9322
9193
  },
9323
- [markupProcessingPropertiesLocalization.importingFromTypeScript.sourceFileRelativePath.KEY]: {
9194
+ $sourceFileRelativePath: {
9324
9195
  newName: "sourceFileRelativePath",
9325
9196
  type: String,
9326
9197
  required: true,
9327
9198
  minimalCharactersCount: 1
9328
9199
  },
9329
- [markupProcessingPropertiesLocalization.importingFromTypeScript.
9330
- nameOfPugBlockToWhichTranspiledTypeScriptMustBeInjected.KEY]: {
9200
+ $nameOfPugBlockToWhichTranspiledTypeScriptMustBeInjected: {
9331
9201
  newName: "nameOfPugBlockToWhichTranspiledTypeScriptMustBeInjected",
9332
9202
  type: String,
9333
9203
  required: true,
@@ -9335,6 +9205,7 @@ var MarkupProcessingSettings__FromFile__RawValid;
9335
9205
  }
9336
9206
  }
9337
9207
  },
9208
+ // ━━━ TODO ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
9338
9209
  routing: {
9339
9210
  type: Object,
9340
9211
  required: false,
@@ -9374,82 +9245,17 @@ var MarkupProcessingSettings__FromFile__RawValid;
9374
9245
  allowedAlternatives: Object.values(MarkupProcessingRestrictions_1.default.OutputFormats),
9375
9246
  required: false
9376
9247
  },
9377
- $localization: {
9378
- newName: "localization",
9379
- type: Object,
9380
- required: false,
9381
- preValidationModifications: es_extensions_1.nullToUndefined,
9382
- properties: {
9383
- $stringResourcesFileRelativePath: {
9384
- newName: "stringResourcesFileRelativePath",
9385
- type: String,
9386
- required: false,
9387
- minimalCharactersCount: 1
9388
- },
9389
- $localizedStringResourcesConstantName: {
9390
- newName: "localizedStringResourcesConstantName",
9391
- type: String,
9392
- required: false,
9393
- minimalCharactersCount: 1
9394
- },
9395
- $localeConstantName: {
9396
- newName: "localeConstantName",
9397
- type: String,
9398
- required: false,
9399
- minimalCharactersCount: 1
9400
- },
9401
- $nameOfConstantForInterpolationToLangHTML_Attribute: {
9402
- newName: "nameOfConstantForInterpolationToLangHTML_Attribute",
9248
+ $localization: generateLocalizationPropertiesSpecification({
9249
+ $excludedFilesPathsRelativeToSourcesFilesTopDirectory: {
9250
+ newName: "excludedFilesPathsRelativeToSourcesFilesTopDirectory",
9251
+ type: Array,
9252
+ required: false,
9253
+ element: {
9403
9254
  type: String,
9404
- required: false,
9405
9255
  minimalCharactersCount: 1
9406
- },
9407
- $locales: {
9408
- newName: "locales",
9409
- type: es_extensions_1.RawObjectDataProcessor.ValuesTypesIDs.associativeArrayOfUniformTypeValues,
9410
- required: true,
9411
- minimalEntriesCount: 1,
9412
- value: {
9413
- type: Object,
9414
- properties: {
9415
- $outputFileInterimNameExtensionWithoutDot: {
9416
- newName: "outputFileInterimNameExtensionWithoutDot",
9417
- type: String,
9418
- required: true,
9419
- minimalCharactersCount: 1
9420
- },
9421
- $localeConstantValue: {
9422
- newName: "localeConstantValue",
9423
- type: String,
9424
- required: false,
9425
- minimalCharactersCount: 1
9426
- },
9427
- $keyInLocalizedStringResourcesObject: {
9428
- newName: "keyInLocalizedStringResourcesObject",
9429
- type: String,
9430
- required: false,
9431
- minimalCharactersCount: 1
9432
- },
9433
- $valueOfConstantForInterpolationToLangHTML_Attribute: {
9434
- newName: "valueOfConstantForInterpolationToLangHTML_Attribute",
9435
- type: String,
9436
- required: false,
9437
- minimalCharactersCount: 1
9438
- }
9439
- }
9440
- }
9441
- },
9442
- $excludedFilesPathsRelativeRelativeToSourcesFileTopDirectory: {
9443
- newName: "excludedFilesRelativePaths",
9444
- type: Array,
9445
- required: false,
9446
- element: {
9447
- type: String,
9448
- minimalCharactersCount: 1
9449
- }
9450
9256
  }
9451
9257
  }
9452
- },
9258
+ }),
9453
9259
  [markupProcessingPropertiesLocalization.entryPointsGroups.HTML_Validation.KEY]: {
9454
9260
  newName: "HTML_Validation",
9455
9261
  preValidationModifications: es_extensions_1.nullToUndefined,
@@ -9697,13 +9503,23 @@ exports["default"] = MarkupProcessingSettings__FromFile__RawValid;
9697
9503
  /*!************************************************************************************!*\
9698
9504
  !*** ./ProjectBuilding/SourceCodeProcessing/Markup/MarkupProcessingSharedState.ts ***!
9699
9505
  \************************************************************************************/
9700
- /***/ ((__unused_webpack_module, exports) => {
9506
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9701
9507
 
9702
9508
 
9703
9509
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9510
+ /* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
9511
+ const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
9704
9512
  class MarkupProcessingSharedState {
9705
- static entryPointsSourceAndOutputFilesAbsolutePathsCorrespondenceMap = new Map();
9706
9513
  static importingFromTypeScriptPugCodeGenerator;
9514
+ static pagesVariationsMetadata = new Map();
9515
+ static get entryPointsSourceAndOutputFilesAbsolutePathsCorrespondenceMap() {
9516
+ return Array.from(MarkupProcessingSharedState.pagesVariationsMetadata.values()).
9517
+ reduce((interimConcatenatedMap, { sourceAndOutputAbsolutePathsOfAllVariations }) => (0, es_extensions_1.addEntriesToMap)({
9518
+ targetMap: interimConcatenatedMap,
9519
+ mutably: true,
9520
+ newEntries: sourceAndOutputAbsolutePathsOfAllVariations
9521
+ }), new Map());
9522
+ }
9707
9523
  }
9708
9524
  exports["default"] = MarkupProcessingSharedState;
9709
9525
 
@@ -9723,7 +9539,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9723
9539
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9724
9540
  /* ─── Restrictions ───────────────────────────────────────────────────────────────────────────────────────────────── */
9725
9541
  const MarkupProcessingRestrictions_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/MarkupProcessingRestrictions */ "./ProjectBuilding/SourceCodeProcessing/Markup/MarkupProcessingRestrictions.ts"));
9726
- const MarkupProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/MarkupProcessingSettingsRepresentative */ "./ProjectBuilding/SourceCodeProcessing/Markup/MarkupProcessingSettingsRepresentative.ts"));
9727
9542
  /* ─── Source Files Watcher ───────────────────────────────────────────────────────────────────────────────────────── */
9728
9543
  const MarkupSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/MarkupSourceFilesWatcher */ "./ProjectBuilding/SourceCodeProcessing/Markup/MarkupSourceFilesWatcher.ts"));
9729
9544
  /* ─── Superclass ─────────────────────────────────────────────────────────────────────────────────────────────────── */
@@ -9744,22 +9559,20 @@ const MarkupEntryPointVinylFile_1 = __importDefault(__webpack_require__(/*! @Mar
9744
9559
  const SourceCodeSelectiveReprocessingHelper_1 = __importDefault(__webpack_require__(/*! @Utils/SourceCodeSelectiveReprocessingHelper */ "./Utils/SourceCodeSelectiveReprocessingHelper.ts"));
9745
9560
  const DotYDA_DirectoryManager_1 = __importDefault(__webpack_require__(/*! @Utils/DotYDA_DirectoryManager */ "./Utils/DotYDA_DirectoryManager.ts"));
9746
9561
  const rev_hash_1 = __importDefault(__webpack_require__(/*! rev-hash */ "../node_modules/rev-hash/index.js"));
9747
- const HTML_Validator_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/HTML_Validator/HTML_Validator */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_Validator.ts"));
9562
+ const HTML_Validator_1 = __importDefault(__webpack_require__(/*! ./Plugins/HTML_Validator/HTML_Validator */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_Validator.ts"));
9748
9563
  const ResourcesPointersResolverForHTML_1 = __importDefault(__webpack_require__(/*! ./Plugins/ResourcesPointersResolverForHTML/ResourcesPointersResolverForHTML */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/ResourcesPointersResolverForHTML/ResourcesPointersResolverForHTML.ts"));
9749
9564
  const AccessibilityInspector_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/AccessibilityInspector/AccessibilityInspector */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AccessibilityInspector/AccessibilityInspector.ts"));
9750
9565
  const ImagesAspectRatioAffixer_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/ImagesAspectRatioAffixer */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/ImagesAspectRatioAffixer.ts"));
9751
9566
  const SpacesNormalizerForCJK_Text_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/SpacesNormalizerForCJK_Text */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/SpacesNormalizerForCJK_Text.ts"));
9752
9567
  const CodeListingPugFilter_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/PugFilters/CodeListingPugFilter */ "./ProjectBuilding/SourceCodeProcessing/Markup/PugFilters/CodeListingPugFilter.ts"));
9568
+ /* ─── General Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
9753
9569
  const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
9754
9570
  const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
9755
9571
  const node_html_parser_1 = __webpack_require__(/*! node-html-parser */ "node-html-parser");
9756
- const addPenultimateFileNameExtension_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/Strings/addPenultimateFileNameExtension */ "./UtilsIncubator/Strings/addPenultimateFileNameExtension.ts"));
9757
9572
  class MarkupProcessor extends GulpStreamsBasedTaskExecutor_1.default {
9758
- static CACHED_HTML_VALIDATION_RESULTS_DIRECTORY_NAME = "HTML_Validation";
9759
9573
  static CACHED_ACCESSIBILITY_INSPECTION_RESULTS_DIRECTORY_NAME = "AccessibilityInspection";
9760
9574
  static ENTRY_POINTS_AND_PARTIAL_FILES_MAPPING_CACHE_FILE_NAME_WITH_EXTENSION = "MarkupEntryPointsAndAffiliatedFilesMappingCache.json";
9761
9575
  logging;
9762
- CACHED_HTML_VALIDATION_RESULTS_DIRECTORY_ABSOLUTE_PATH;
9763
9576
  CACHED_ACCESSIBILITY_INSPECTION_RESULTS_DIRECTORY_ABSOLUTE_PATH;
9764
9577
  markupProcessingSettingsRepresentative;
9765
9578
  absolutePathOfFilesWaitingForReProcessing = new Set();
@@ -9771,16 +9584,15 @@ class MarkupProcessor extends GulpStreamsBasedTaskExecutor_1.default {
9771
9584
  return (0, createImmediatelyEndingEmptyStream_1.default)();
9772
9585
  }
9773
9586
  const dataHoldingSelfInstance = new MarkupProcessor(markupProcessingSettingsRepresentative, projectBuildingMasterConfigRepresentative);
9774
- dataHoldingSelfInstance.initializeSourceAndOutputFilesAbsolutePathsCorrespondenceMap();
9587
+ MarkupProcessingSharedState_1.default.pagesVariationsMetadata = markupProcessingSettingsRepresentative.createPagesVariationsMetadata(es_extensions_nodejs_1.ImprovedGlob.getFilesAbsolutePathsSynchronously(markupProcessingSettingsRepresentative.initialRelevantEntryPointsSourceFilesAbsolutePaths, { alwaysForwardSlashSeparators: true }));
9775
9588
  if (markupProcessingSettingsRepresentative.mustValidateHTML) {
9776
- HTML_Validator_1.default.beginInitialization({
9777
- cachedValidationsResultsFileParentDirectoryAbsolutePath: dataHoldingSelfInstance.
9778
- CACHED_HTML_VALIDATION_RESULTS_DIRECTORY_ABSOLUTE_PATH,
9779
- consumingProjectBuildingMode: projectBuildingMasterConfigRepresentative.consumingProjectBuildingMode,
9780
- projectBuildingSelectiveExecutionID: projectBuildingMasterConfigRepresentative.selectiveExecutionID,
9589
+ HTML_Validator_1.default.initialize({
9590
+ temporaryFileDirectoryAbsolutePath: DotYDA_DirectoryManager_1.default.TEMPORARY_FILES_DIRECTORY_ABSOLUTE_PATH,
9591
+ projectBuildingMasterConfigRepresentative,
9781
9592
  logging: {
9782
9593
  validationStart: markupProcessingSettingsRepresentative.loggingSettings.HTML_Validation.starting,
9783
- validationCompletionWithoutIssues: markupProcessingSettingsRepresentative.loggingSettings.HTML_Validation.completionWithoutIssues
9594
+ validationCompletionWithoutIssues: markupProcessingSettingsRepresentative.loggingSettings.HTML_Validation.
9595
+ completionWithoutIssues
9784
9596
  }
9785
9597
  });
9786
9598
  }
@@ -9847,10 +9659,6 @@ class MarkupProcessor extends GulpStreamsBasedTaskExecutor_1.default {
9847
9659
  quantityOfFilesWillBeProcessed: markupProcessingSettingsRepresentative.loggingSettings.filesCount
9848
9660
  };
9849
9661
  this.markupProcessingSettingsRepresentative = markupProcessingSettingsRepresentative;
9850
- this.CACHED_HTML_VALIDATION_RESULTS_DIRECTORY_ABSOLUTE_PATH = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
9851
- DotYDA_DirectoryManager_1.default.OPTIMIZATION_FILES_DIRECTORY_ABSOLUTE_PATH,
9852
- MarkupProcessor.CACHED_HTML_VALIDATION_RESULTS_DIRECTORY_NAME
9853
- ], { alwaysForwardSlashSeparators: true });
9854
9662
  this.CACHED_ACCESSIBILITY_INSPECTION_RESULTS_DIRECTORY_ABSOLUTE_PATH = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
9855
9663
  DotYDA_DirectoryManager_1.default.OPTIMIZATION_FILES_DIRECTORY_ABSOLUTE_PATH,
9856
9664
  MarkupProcessor.CACHED_ACCESSIBILITY_INSPECTION_RESULTS_DIRECTORY_NAME
@@ -9876,13 +9684,13 @@ class MarkupProcessor extends GulpStreamsBasedTaskExecutor_1.default {
9876
9684
  })).
9877
9685
  pipe(GulpStreamModifier_1.default.modify({
9878
9686
  onStreamStartedEventHandlersForSpecificFileTypes: new Map([
9879
- [MarkupEntryPointVinylFile_1.default, MarkupProcessor.createEntryPointsVariationsIfStaticPreviewBuildingMode]
9687
+ [MarkupEntryPointVinylFile_1.default, MarkupProcessor.managePageVariations]
9880
9688
  ])
9881
9689
  })).
9882
9690
  pipe(this.logProcessedFilesIfMust()).
9883
9691
  pipe((0, gulp_data_1.default)((vinylFile) => ({
9884
9692
  ...vinylFile.pageStateDependentVariationData ?? null,
9885
- ...vinylFile.staticPreviewLocalizationData ?? null,
9693
+ ...vinylFile.localizationData ?? null,
9886
9694
  ...this.projectBuildingMasterConfigRepresentative.isStaticPreviewBuildingMode ?
9887
9695
  this.markupProcessingSettingsRepresentative.staticDataForStaticPreview : null
9888
9696
  }))).
@@ -9992,8 +9800,8 @@ class MarkupProcessor extends GulpStreamsBasedTaskExecutor_1.default {
9992
9800
  }).join("\n"));
9993
9801
  return Promise.resolve(GulpStreamModifier_1.default.CompletionSignals.PASSING_ON);
9994
9802
  }
9995
- static async createEntryPointsVariationsIfStaticPreviewBuildingMode(markupEntryPointVinylFile, addNewFilesToStream) {
9996
- const { newFiles, mustInitialFileBeDeleted } = markupEntryPointVinylFile.manageVariationsForStaticPreviewIfAnyAndStaticPreviewBuildingMode();
9803
+ static async managePageVariations(markupEntryPointVinylFile, addNewFilesToStream) {
9804
+ const { newFiles, mustInitialFileBeDeleted } = markupEntryPointVinylFile.manageVariations();
9997
9805
  addNewFilesToStream(newFiles);
9998
9806
  return Promise.resolve(mustInitialFileBeDeleted ?
9999
9807
  GulpStreamModifier_1.default.CompletionSignals.REMOVING_FILE_FROM_STREAM :
@@ -10022,11 +9830,14 @@ class MarkupProcessor extends GulpStreamsBasedTaskExecutor_1.default {
10022
9830
  /* eslint-disable @typescript-eslint/member-ordering --
10023
9831
  * From now, static and non-static methods are following by the usage order. */
10024
9832
  async onOutputHTML_FileReady(processedEntryPointVinylFile) {
10025
- const entryPointFileContentRelativeToConsumingProjectRootDirectory = es_extensions_nodejs_1.ImprovedPath.computeRelativePath({
9833
+ const entryPointFileContentRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly = es_extensions_nodejs_1.ImprovedPath.computeRelativePath({
10026
9834
  basePath: this.projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
10027
9835
  comparedPath: processedEntryPointVinylFile.path,
10028
9836
  alwaysForwardSlashSeparators: true
10029
9837
  });
9838
+ /** @description
9839
+ * Pug gives neither good formatting nor good minification, thus the `stringifiedContents` is neither of.
9840
+ * Depending on the settings, the `stringifiedContents` must be formatted or minified. */
10030
9841
  let semiFinishedHTML_Code = processedEntryPointVinylFile.stringifiedContents;
10031
9842
  const semiFinishedHTML_CodeMD5_Checksum = (0, rev_hash_1.default)(semiFinishedHTML_Code);
10032
9843
  let rootHTML_Element = (0, node_html_parser_1.parse)(semiFinishedHTML_Code);
@@ -10060,49 +9871,34 @@ class MarkupProcessor extends GulpStreamsBasedTaskExecutor_1.default {
10060
9871
  }
10061
9872
  let formattedHTML_CodeForReports = processedEntryPointVinylFile.actualEntryPointsGroupSettings.outputCodeFormatting.mustExecute ?
10062
9873
  semiFinishedHTML_Code : null;
10063
- if (this.projectBuildingMasterConfigRepresentative.mustProvideIncrementalBuilding) {
10064
- if (processedEntryPointVinylFile.actualEntryPointsGroupSettings.HTML_Validation.mustExecute) {
10065
- formattedHTML_CodeForReports =
10066
- formattedHTML_CodeForReports ??
10067
- MarkupProcessor.formatHTML_Code(processedEntryPointVinylFile);
10068
- HTML_Validator_1.default.validateAtBackgroundAndReportImmideatlyWithoutThrowingOfErrors({
10069
- HTML_Code: formattedHTML_CodeForReports,
10070
- HTML_CodeMD5Checksum: semiFinishedHTML_CodeMD5_Checksum,
10071
- targetHTML_FilePathRelativeToConsumingProjectRootDirectory: entryPointFileContentRelativeToConsumingProjectRootDirectory
10072
- });
10073
- }
10074
- if (processedEntryPointVinylFile.actualEntryPointsGroupSettings.accessibilityInspection.mustExecute) {
10075
- formattedHTML_CodeForReports =
10076
- formattedHTML_CodeForReports ??
10077
- MarkupProcessor.formatHTML_Code(processedEntryPointVinylFile);
10078
- AccessibilityInspector_1.default.inspectAtBackgroundAndReportImmideatlyWithoutThrowingOfErrors({
10079
- HTML_Code: formattedHTML_CodeForReports,
10080
- HTML_CodeMD5Checksum: semiFinishedHTML_CodeMD5_Checksum,
10081
- accessibilityStandard: processedEntryPointVinylFile.actualEntryPointsGroupSettings.accessibilityInspection.standard,
10082
- targetHTML_FilePathRelativeToConsumingProjectRootDirectory: entryPointFileContentRelativeToConsumingProjectRootDirectory
10083
- });
10084
- }
9874
+ if (processedEntryPointVinylFile.actualEntryPointsGroupSettings.HTML_Validation.mustExecute) {
9875
+ formattedHTML_CodeForReports =
9876
+ formattedHTML_CodeForReports ??
9877
+ MarkupProcessor.formatHTML_Code(processedEntryPointVinylFile);
9878
+ HTML_Validator_1.default.enqueueFileForValidation({
9879
+ formattedHTML_Content: formattedHTML_CodeForReports,
9880
+ HTML_ContentMD5_Hash: semiFinishedHTML_CodeMD5_Checksum,
9881
+ pathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly: entryPointFileContentRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly
9882
+ });
10085
9883
  }
10086
- else {
10087
- if (processedEntryPointVinylFile.actualEntryPointsGroupSettings.HTML_Validation.mustExecute) {
10088
- formattedHTML_CodeForReports =
10089
- formattedHTML_CodeForReports ??
10090
- MarkupProcessor.formatHTML_Code(processedEntryPointVinylFile);
10091
- HTML_Validator_1.default.validateAtBackgroundWithoutReporting({
9884
+ if (processedEntryPointVinylFile.actualEntryPointsGroupSettings.accessibilityInspection.mustExecute) {
9885
+ formattedHTML_CodeForReports =
9886
+ formattedHTML_CodeForReports ??
9887
+ MarkupProcessor.formatHTML_Code(processedEntryPointVinylFile);
9888
+ if (this.projectBuildingMasterConfigRepresentative.mustProvideIncrementalBuilding) {
9889
+ AccessibilityInspector_1.default.inspectAtBackgroundAndReportImmediatelyWithoutThrowingOfErrors({
10092
9890
  HTML_Code: formattedHTML_CodeForReports,
10093
9891
  HTML_CodeMD5Checksum: semiFinishedHTML_CodeMD5_Checksum,
10094
- targetHTML_FilePathRelativeToConsumingProjectRootDirectory: entryPointFileContentRelativeToConsumingProjectRootDirectory
9892
+ accessibilityStandard: processedEntryPointVinylFile.actualEntryPointsGroupSettings.accessibilityInspection.standard,
9893
+ targetHTML_FilePathRelativeToConsumingProjectRootDirectory: entryPointFileContentRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly
10095
9894
  });
10096
9895
  }
10097
- if (processedEntryPointVinylFile.actualEntryPointsGroupSettings.accessibilityInspection.mustExecute) {
10098
- formattedHTML_CodeForReports =
10099
- formattedHTML_CodeForReports ??
10100
- MarkupProcessor.formatHTML_Code(processedEntryPointVinylFile);
9896
+ else {
10101
9897
  AccessibilityInspector_1.default.inspectAtBackgroundWithoutReporting({
10102
9898
  HTML_Code: formattedHTML_CodeForReports,
10103
9899
  HTML_CodeMD5Checksum: semiFinishedHTML_CodeMD5_Checksum,
10104
9900
  accessibilityStandard: processedEntryPointVinylFile.actualEntryPointsGroupSettings.accessibilityInspection.standard,
10105
- targetHTML_FilePathRelativeToConsumingProjectRootDirectory: entryPointFileContentRelativeToConsumingProjectRootDirectory
9901
+ targetHTML_FilePathRelativeToConsumingProjectRootDirectory: entryPointFileContentRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly
10106
9902
  });
10107
9903
  }
10108
9904
  }
@@ -10110,18 +9906,18 @@ class MarkupProcessor extends GulpStreamsBasedTaskExecutor_1.default {
10110
9906
  return GulpStreamModifier_1.default.CompletionSignals.PASSING_ON;
10111
9907
  }
10112
9908
  onStreamEnded() {
9909
+ if (this.markupProcessingSettingsRepresentative.mustValidateHTML) {
9910
+ HTML_Validator_1.default.validateQueuedFilesButReportAll();
9911
+ }
10113
9912
  if (!this.projectBuildingMasterConfigRepresentative.mustProvideIncrementalBuilding) {
10114
- if (this.markupProcessingSettingsRepresentative.mustValidateHTML) {
10115
- HTML_Validator_1.default.reportCachedValidationsResultsAndFinalize();
10116
- }
10117
9913
  if (this.markupProcessingSettingsRepresentative.mustInspectAccessibility) {
10118
9914
  AccessibilityInspector_1.default.reportCachedValidationsResultsAndFinalize();
10119
9915
  }
10120
9916
  }
10121
9917
  }
10122
9918
  /* ━━━ Rebuilding ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
10123
- onSourceFilesWatcherEmitsAnyEvent(targetFileAbsolutePath) {
10124
- this.absolutePathOfFilesWaitingForReProcessing.add(targetFileAbsolutePath);
9919
+ onSourceFilesWatcherEmitsAnyEvent(targetFileAbsolutePath__forwardSlashesSeparators) {
9920
+ this.absolutePathOfFilesWaitingForReProcessing.add(targetFileAbsolutePath__forwardSlashesSeparators);
10125
9921
  if ((0, es_extensions_1.isNotNull)(this.subsequentFilesStateChangeTimeout)) {
10126
9922
  clearTimeout(this.subsequentFilesStateChangeTimeout);
10127
9923
  }
@@ -10130,106 +9926,13 @@ class MarkupProcessor extends GulpStreamsBasedTaskExecutor_1.default {
10130
9926
  this.absolutePathOfFilesWaitingForReProcessing.clear();
10131
9927
  }, (0, es_extensions_1.secondsToMilliseconds)(this.markupProcessingSettingsRepresentative.WAITING_FOR_SUBSEQUENT_FILES_WILL_SAVED_PERIOD__SECONDS));
10132
9928
  }
10133
- onEntryPointFileAdded(targetEntryPointFileAbsolutePath) {
10134
- const markupEntryPointsGroupSettingsActualForCurrentFile = this.
10135
- markupProcessingSettingsRepresentative.
10136
- getExpectedToExistEntryPointsGroupSettingsRelevantForSpecifiedSourceFileAbsolutePath(targetEntryPointFileAbsolutePath);
10137
- const outputFileNameWithExtensionWithLeadingDot = this.
10138
- markupProcessingSettingsRepresentative.
10139
- computeOutputFileNameExtension({
10140
- entryPointsGroupSettingsActualForTargetFile: markupEntryPointsGroupSettingsActualForCurrentFile,
10141
- mustPrependDotToFileNameExtension: false
10142
- });
10143
- MarkupProcessingSharedState_1.default.
10144
- entryPointsSourceAndOutputFilesAbsolutePathsCorrespondenceMap.
10145
- set(targetEntryPointFileAbsolutePath, es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
10146
- MarkupProcessingSettingsRepresentative_1.default.computeRelevantOutputDirectoryAbsolutePathForTargetSourceFile(targetEntryPointFileAbsolutePath, markupEntryPointsGroupSettingsActualForCurrentFile),
10147
- `${(0, es_extensions_1.extractFileNameWithoutLastExtension)(targetEntryPointFileAbsolutePath)}.` +
10148
- outputFileNameWithExtensionWithLeadingDot
10149
- ], { alwaysForwardSlashSeparators: true }));
9929
+ onEntryPointFileAdded(targetFileAbsolutePath__forwardSlashesSeparators) {
9930
+ MarkupProcessingSharedState_1.default.pagesVariationsMetadata.set(targetFileAbsolutePath__forwardSlashesSeparators, this.markupProcessingSettingsRepresentative.createPageVariationsMetadata(targetFileAbsolutePath__forwardSlashesSeparators));
10150
9931
  }
10151
- static onEntryPointFileDeleted(targetEntryPointFileAbsolutePath) {
10152
- MarkupProcessingSharedState_1.default.
10153
- entryPointsSourceAndOutputFilesAbsolutePathsCorrespondenceMap.
10154
- delete(targetEntryPointFileAbsolutePath);
9932
+ static onEntryPointFileDeleted(targetFileAbsolutePath__forwardSlashesSeparators) {
9933
+ MarkupProcessingSharedState_1.default.pagesVariationsMetadata.delete(targetFileAbsolutePath__forwardSlashesSeparators);
10155
9934
  }
10156
9935
  /* ━━━ Helpers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
10157
- initializeSourceAndOutputFilesAbsolutePathsCorrespondenceMap() {
10158
- const localeDependentPagesVariationsSettings = this.markupProcessingSettingsRepresentative.localeDependentPagesVariationsSettings;
10159
- const localesData = localeDependentPagesVariationsSettings?.locales ?? new Map();
10160
- for (const markupSourceFileAbsolutePath of es_extensions_nodejs_1.ImprovedGlob.getFilesAbsolutePathsSynchronously(this.markupProcessingSettingsRepresentative.initialRelevantEntryPointsSourceFilesAbsolutePaths, { alwaysForwardSlashSeparators: true })) {
10161
- const areLocaleDependentVariationsRequiredForCurrentFile = localesData.size > 0 &&
10162
- localeDependentPagesVariationsSettings?.excludedFilesAbsolutePaths.includes(markupSourceFileAbsolutePath) === false;
10163
- const markupEntryPointsGroupSettingsActualForCurrentFile = this.markupProcessingSettingsRepresentative.
10164
- getExpectedToExistEntryPointsGroupSettingsRelevantForSpecifiedSourceFileAbsolutePath(markupSourceFileAbsolutePath);
10165
- const outputFileNameWithLastExtensionWithLeadingDot = this.markupProcessingSettingsRepresentative.
10166
- computeOutputFileNameExtension({
10167
- entryPointsGroupSettingsActualForTargetFile: markupEntryPointsGroupSettingsActualForCurrentFile,
10168
- mustPrependDotToFileNameExtension: false
10169
- });
10170
- const outputDirectoryForCurrentMarkupFileAndDerivedOnes = MarkupProcessingSettingsRepresentative_1.default.
10171
- computeRelevantOutputDirectoryAbsolutePathForTargetSourceFile(markupSourceFileAbsolutePath, markupEntryPointsGroupSettingsActualForCurrentFile);
10172
- if (areLocaleDependentVariationsRequiredForCurrentFile) {
10173
- for (const localeData of localesData.values()) {
10174
- MarkupProcessingSharedState_1.default.
10175
- entryPointsSourceAndOutputFilesAbsolutePathsCorrespondenceMap.
10176
- set((0, addPenultimateFileNameExtension_1.default)({
10177
- targetPath: markupSourceFileAbsolutePath,
10178
- targetFileNamePenultimateExtensionWithOrWithoutLeadingDot: localeData.outputFileInterimNameExtensionWithoutDot,
10179
- mustAppendDuplicateEvenIfTargetPenultimateFileNameExtensionAlreadyExist: true,
10180
- mustAppendLastFileNameExtensionInsteadIfThereIsNoOne: true
10181
- }), es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
10182
- outputDirectoryForCurrentMarkupFileAndDerivedOnes,
10183
- [
10184
- (0, es_extensions_1.extractFileNameWithoutLastExtension)(markupSourceFileAbsolutePath),
10185
- localeData.outputFileInterimNameExtensionWithoutDot,
10186
- outputFileNameWithLastExtensionWithLeadingDot
10187
- ].join(".")
10188
- ], { alwaysForwardSlashSeparators: true }));
10189
- }
10190
- }
10191
- else {
10192
- MarkupProcessingSharedState_1.default.
10193
- entryPointsSourceAndOutputFilesAbsolutePathsCorrespondenceMap.
10194
- set(markupSourceFileAbsolutePath, es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
10195
- outputDirectoryForCurrentMarkupFileAndDerivedOnes,
10196
- `${(0, es_extensions_1.extractFileNameWithoutLastExtension)(markupSourceFileAbsolutePath)}.` +
10197
- outputFileNameWithLastExtensionWithLeadingDot
10198
- ], { alwaysForwardSlashSeparators: true }));
10199
- }
10200
- const entryPointStateDependentVariations = this.markupProcessingSettingsRepresentative.
10201
- getStateDependentVariationsForEntryPointWithAbsolutePath(markupSourceFileAbsolutePath);
10202
- for (const derivedSourceFileAbsolutePath of (entryPointStateDependentVariations?.derivedPagesAndStatesMap ?? new Map()).keys()) {
10203
- if (areLocaleDependentVariationsRequiredForCurrentFile) {
10204
- for (const localeData of localesData.values()) {
10205
- MarkupProcessingSharedState_1.default.
10206
- entryPointsSourceAndOutputFilesAbsolutePathsCorrespondenceMap.
10207
- set((0, addPenultimateFileNameExtension_1.default)({
10208
- targetPath: derivedSourceFileAbsolutePath,
10209
- targetFileNamePenultimateExtensionWithOrWithoutLeadingDot: localeData.outputFileInterimNameExtensionWithoutDot,
10210
- mustAppendDuplicateEvenIfTargetPenultimateFileNameExtensionAlreadyExist: true,
10211
- mustAppendLastFileNameExtensionInsteadIfThereIsNoOne: true
10212
- }), es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
10213
- outputDirectoryForCurrentMarkupFileAndDerivedOnes,
10214
- [
10215
- (0, es_extensions_1.extractFileNameWithoutLastExtension)(derivedSourceFileAbsolutePath),
10216
- localeData.outputFileInterimNameExtensionWithoutDot,
10217
- "html"
10218
- ].join(".")
10219
- ], { alwaysForwardSlashSeparators: true }));
10220
- }
10221
- }
10222
- else {
10223
- MarkupProcessingSharedState_1.default.
10224
- entryPointsSourceAndOutputFilesAbsolutePathsCorrespondenceMap.
10225
- set(derivedSourceFileAbsolutePath, es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
10226
- outputDirectoryForCurrentMarkupFileAndDerivedOnes,
10227
- `${(0, es_extensions_1.extractFileNameWithoutLastExtension)(derivedSourceFileAbsolutePath)}.html`
10228
- ], { alwaysForwardSlashSeparators: true }));
10229
- }
10230
- }
10231
- }
10232
- }
10233
9936
  static formatHTML_Code(markupVinylFile) {
10234
9937
  const { outputCodeFormatting: outputCodeFormattingSettings } = markupVinylFile.actualEntryPointsGroupSettings;
10235
9938
  return js_beautify_1.default.html(markupVinylFile.stringifiedContents, {
@@ -10437,13 +10140,13 @@ class AccessibilityInspector {
10437
10140
  }
10438
10141
  /* ─── Inspection ───────────────────────────────────────────────────────────────────────────────────────────────── */
10439
10142
  /** @description Designed for the modes with incremental building. */
10440
- static inspectAtBackgroundAndReportImmideatlyWithoutThrowingOfErrors(singleFileAccessibilityCheckingOrder) {
10143
+ static inspectAtBackgroundAndReportImmediatelyWithoutThrowingOfErrors(singleFileAccessibilityCheckingOrder) {
10441
10144
  AccessibilityInspector.getInstanceOnceReady().
10442
10145
  then(async (selfSoleInstance) => {
10443
10146
  clearTimeout((0, es_extensions_1.nullToUndefined)(selfSoleInstance.waitingForStaringOfWritingOfCacheFileWithInspectionsResults));
10444
10147
  return selfSoleInstance.inspectSingleFile({
10445
10148
  ...singleFileAccessibilityCheckingOrder,
10446
- mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime: true
10149
+ mustLogIssuesImmediatelyAndSaveCacheToFileDuringDowntime: true
10447
10150
  });
10448
10151
  }).
10449
10152
  catch((error) => {
@@ -10454,7 +10157,7 @@ class AccessibilityInspector {
10454
10157
  description: "The error has been caught during the execution of asynchronous method \"inspectSingleFile\", " +
10455
10158
  "while expected that all errors has been handled inside this method.",
10456
10159
  occurrenceLocation: "AccessibilityInspector." +
10457
- "inspectAtBackgroundAndReportImmideatlyWithoutThrowingOfErrors(singleFileAccessibilityCheckingOrder)",
10160
+ "inspectAtBackgroundAndReportImmediatelyWithoutThrowingOfErrors(singleFileAccessibilityCheckingOrder)",
10458
10161
  caughtError: error
10459
10162
  });
10460
10163
  }
@@ -10466,7 +10169,7 @@ class AccessibilityInspector {
10466
10169
  then((selfSoleInstance) => {
10467
10170
  selfSoleInstance.inspectionsInProgressForProductionLikeModes.push(selfSoleInstance.inspectSingleFile({
10468
10171
  ...singleFileAccessibilityCheckingOrder,
10469
- mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime: false
10172
+ mustLogIssuesImmediatelyAndSaveCacheToFileDuringDowntime: false
10470
10173
  }));
10471
10174
  }).
10472
10175
  catch((error) => {
@@ -10553,12 +10256,12 @@ class AccessibilityInspector {
10553
10256
  this.logging = logging;
10554
10257
  }
10555
10258
  /* ━━━ Private methods ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
10556
- async inspectSingleFile({ HTML_Code, HTML_CodeMD5Checksum, targetHTML_FilePathRelativeToConsumingProjectRootDirectory, accessibilityStandard, mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime }) {
10259
+ async inspectSingleFile({ HTML_Code, HTML_CodeMD5Checksum, targetHTML_FilePathRelativeToConsumingProjectRootDirectory, accessibilityStandard, mustLogIssuesImmediatelyAndSaveCacheToFileDuringDowntime }) {
10557
10260
  const cachedInspectionsResultsForCurrentFile = this.cachedInspectionsResults.get(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
10558
10261
  if (cachedInspectionsResultsForCurrentFile?.contentMD5Checksum === HTML_CodeMD5Checksum) {
10559
10262
  this.relativePathsOfFilesWhichHasBeenInspectedCurrentDuringExecution.
10560
10263
  add(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
10561
- if (mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime) {
10264
+ if (mustLogIssuesImmediatelyAndSaveCacheToFileDuringDowntime) {
10562
10265
  this.logInspectionResultsForSingleFile({
10563
10266
  targetHTML_FilePathRelativeToConsumingProjectRootDirectory,
10564
10267
  normalizedInspectionIssues: cachedInspectionsResultsForCurrentFile.issues
@@ -10582,7 +10285,7 @@ class AccessibilityInspector {
10582
10285
  }));
10583
10286
  }
10584
10287
  const inspectionTimeMeasuringStopwatch = new Stopwatch_1.default().startOrRestart();
10585
- if (mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime) {
10288
+ if (mustLogIssuesImmediatelyAndSaveCacheToFileDuringDowntime) {
10586
10289
  this.relativePathsOfFilesWhichIsBeingInspected.add(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
10587
10290
  }
10588
10291
  let webBrowserPage;
@@ -10600,7 +10303,7 @@ class AccessibilityInspector {
10600
10303
  occurrenceLocation: "AccessibilityInspector.inspectSingleFile(singleFileAccessibilityCheckingOrder)",
10601
10304
  caughtError: error
10602
10305
  });
10603
- if (mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime) {
10306
+ if (mustLogIssuesImmediatelyAndSaveCacheToFileDuringDowntime) {
10604
10307
  this.relativePathsOfFilesWhichIsBeingInspected.delete(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
10605
10308
  }
10606
10309
  return;
@@ -10619,7 +10322,7 @@ class AccessibilityInspector {
10619
10322
  occurrenceLocation: "AccessibilityInspector.inspectSingleFile(singleFileAccessibilityCheckingOrder)",
10620
10323
  caughtError: error
10621
10324
  });
10622
- if (mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime) {
10325
+ if (mustLogIssuesImmediatelyAndSaveCacheToFileDuringDowntime) {
10623
10326
  this.relativePathsOfFilesWhichIsBeingInspected.delete(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
10624
10327
  }
10625
10328
  return;
@@ -10631,7 +10334,14 @@ class AccessibilityInspector {
10631
10334
  page: webBrowserPage,
10632
10335
  browser: this.webBrowser,
10633
10336
  /* [ Reference ] https://stackoverflow.com/a/76537290/4818123 */
10634
- ignoreUrl: true
10337
+ ignoreUrl: true,
10338
+ ignore: [
10339
+ /* [ Specification ]
10340
+ * Being the part of markup processing functionality, the AccessibilityInspector indented to be used only for
10341
+ * inspection of the accessibility of HTML code. The issues like contract ratio could not be simply fixed
10342
+ * because requires the involving of designer and/or customer.. */
10343
+ "WCAG2AAA.Principle1.Guideline1_4.1_4_6.G17.Fail"
10344
+ ]
10635
10345
  });
10636
10346
  }
10637
10347
  catch (error) {
@@ -10642,7 +10352,7 @@ class AccessibilityInspector {
10642
10352
  occurrenceLocation: "AccessibilityInspector.inspectSingleFile(singleFileAccessibilityCheckingOrder)",
10643
10353
  caughtError: error
10644
10354
  });
10645
- if (mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime) {
10355
+ if (mustLogIssuesImmediatelyAndSaveCacheToFileDuringDowntime) {
10646
10356
  this.relativePathsOfFilesWhichIsBeingInspected.delete(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
10647
10357
  }
10648
10358
  webBrowserPage.close().catch((potentialWebBrowserPageClosingError) => {
@@ -10668,7 +10378,7 @@ class AccessibilityInspector {
10668
10378
  });
10669
10379
  this.relativePathsOfFilesWhichHasBeenInspectedCurrentDuringExecution.
10670
10380
  add(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
10671
- if (!mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime) {
10381
+ if (!mustLogIssuesImmediatelyAndSaveCacheToFileDuringDowntime) {
10672
10382
  return;
10673
10383
  }
10674
10384
  this.relativePathsOfFilesWhichIsBeingInspected.delete(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
@@ -10840,8 +10550,8 @@ class AccessibilityInspector {
10840
10550
  })}\n`,
10841
10551
  ...(0, es_extensions_1.isNonEmptyString)(issue.codeFragment.beforeHighlighting) ? [issue.codeFragment.beforeHighlighting] : [],
10842
10552
  ...(0, es_extensions_1.isNonEmptyString)(issue.codeFragment.beforeHighlighting) && (0, es_extensions_1.isNonEmptyString)(issue.codeFragment.afterHighlighting) ?
10843
- es_extensions_1.Logger.highlightText(issue.codeFragment.highlighted) :
10844
- issue.codeFragment.highlighted,
10553
+ [es_extensions_1.Logger.highlightText(issue.codeFragment.highlighted)] :
10554
+ [issue.codeFragment.highlighted],
10845
10555
  ...(0, es_extensions_1.isNonEmptyString)(issue.codeFragment.afterHighlighting) ? [issue.codeFragment.afterHighlighting] : [],
10846
10556
  "\n",
10847
10557
  `${"-".repeat(AccessibilityInspector.DISPLAYING_MAXIMAL_COLUMNS_COUNT_IN_LOG)}\n`,
@@ -11056,72 +10766,42 @@ exports["default"] = accessibilityInspectorLocalization__english;
11056
10766
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11057
10767
 
11058
10768
 
11059
- /* eslint-disable @typescript-eslint/member-ordering --
11060
- * There is the processing order herewith some methods required the accessing to non-static fields, some - not. */
11061
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11062
- if (k2 === undefined) k2 = k;
11063
- var desc = Object.getOwnPropertyDescriptor(m, k);
11064
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11065
- desc = { enumerable: true, get: function() { return m[k]; } };
11066
- }
11067
- Object.defineProperty(o, k2, desc);
11068
- }) : (function(o, m, k, k2) {
11069
- if (k2 === undefined) k2 = k;
11070
- o[k2] = m[k];
11071
- }));
11072
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
11073
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11074
- }) : function(o, v) {
11075
- o["default"] = v;
11076
- });
11077
- var __importStar = (this && this.__importStar) || (function () {
11078
- var ownKeys = function(o) {
11079
- ownKeys = Object.getOwnPropertyNames || function (o) {
11080
- var ar = [];
11081
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
11082
- return ar;
11083
- };
11084
- return ownKeys(o);
11085
- };
11086
- return function (mod) {
11087
- if (mod && mod.__esModule) return mod;
11088
- var result = {};
11089
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
11090
- __setModuleDefault(result, mod);
11091
- return result;
11092
- };
11093
- })();
10769
+ /* eslint-disable @typescript-eslint/member-ordering -- Sorted by semantic categories. */
11094
10770
  var __importDefault = (this && this.__importDefault) || function (mod) {
11095
10771
  return (mod && mod.__esModule) ? mod : { "default": mod };
11096
10772
  };
11097
10773
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11098
- /* ━━━ Imports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
11099
10774
  /* ─── Assets ────────────────────────────────────────────────────────────────────────────────────────────────────── */
11100
10775
  const HTML_ValidatorLocalization_english_1 = __importDefault(__webpack_require__(/*! ./HTML_ValidatorLocalization.english */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_ValidatorLocalization.english.ts"));
11101
- /* ─── Generals utils ────────────────────────────────────────────────────────────────────────────────────────────── */
10776
+ /* ─── Applied Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
10777
+ const vnu_jar_1 = __importDefault(__webpack_require__(/*! vnu-jar */ "vnu-jar"));
10778
+ const DotYDA_DirectoryManager_1 = __importDefault(__webpack_require__(/*! @Utils/DotYDA_DirectoryManager */ "./Utils/DotYDA_DirectoryManager.ts"));
10779
+ /* ─── Generals Utils ─────────────────────────────────────────────────────────────────────────────────────────────── */
11102
10780
  const fs_1 = __importDefault(__webpack_require__(/*! fs */ "fs"));
10781
+ const node_child_process_1 = __importDefault(__webpack_require__(/*! node:child_process */ "node:child_process"));
10782
+ const node_notifier_1 = __importDefault(__webpack_require__(/*! node-notifier */ "node-notifier"));
11103
10783
  const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
11104
10784
  const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
11105
- const Stopwatch_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/Stopwatch */ "./UtilsIncubator/Stopwatch.ts"));
11106
- const node_notifier_1 = __importDefault(__webpack_require__(/*! node-notifier */ "node-notifier"));
10785
+ const nanoid_1 = __webpack_require__(/*! nanoid */ "nanoid");
11107
10786
  class HTML_Validator {
11108
10787
  /* ━━━ Fields ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
11109
- HTML_ValidationService;
11110
- relativePathsOfFilesWhichIsBeingValidated = new Set();
11111
- validationsInProgressForProductionLikeModes = [];
11112
- /* ─── Initialization ───────────────────────────────────────────────────────────────────────────────────────────── */
11113
- static selfSoleInstance = null;
11114
- static hasInitializationStarted = false;
11115
- static onSelfSoleInstanceReadyEventsHandlers = new Set();
10788
+ static selfSingleInstance = null;
10789
+ /* ─── Work Variables ───────────────────────────────────────────────────────────────────────────────────────────── */
10790
+ queuedFilesMetadata = [];
10791
+ /* ─── Logging ──────────────────────────────────────────────────────────────────────────────────────────────────── */
10792
+ logging;
10793
+ static DISPLAYING_LINES_COUNT_BEFORE_ISSUE_IN_CODE_LISTING = 2;
10794
+ static DISPLAYING_LINES_COUNT_AFTER_ISSUE_IN_CODE_LISTING = 1;
10795
+ /* [ Theory ] 120 columns is about the half of the 1920x1080 screen. */
10796
+ static DISPLAYING_MAXIMAL_COLUMNS_COUNT_IN_LOG = 120;
11116
10797
  /* ─── Caching ──────────────────────────────────────────────────────────────────────────────────────────────────── */
11117
- /* [ Theory ] The caching is very important optimization measure.
11118
- * Between 2 project buildings, most of HTML files could not change (especially since the project hase become mature).
11119
- * Without caching, many requests will be submitted to HTML validating service which will be the big performance
11120
- * impact and also "Too many requests" error risk when the files count is large. */
10798
+ /* [ Theory ]
10799
+ * Between 2 project buildings, the content of most HTML files could not change (especially since the project has
10800
+ * become mature). */
10801
+ static CACHED_HTML_VALIDATION_RESULTS_DIRECTORY_NAME = "HTML_Validation";
11121
10802
  CACHED_VALIDATIONS_RESULTS_FILE_PARENT_DIRECTORY_ABSOLUTE_PATH;
11122
10803
  CACHED_VALIDATIONS_RESULTS_FILE_ABSOLUTE_PATH;
11123
10804
  cachedValidationsResults;
11124
- relativePathsOfFilesWhichHasBeenValidatedDuringCurrentExecution = new Set();
11125
10805
  static cachedValidationsResultsFileContentSpecification = {
11126
10806
  nameForLogging: "HTML_Validator.CachedValidationResultsFileContentSpecification",
11127
10807
  subtype: es_extensions_1.RawObjectDataProcessor.ObjectSubtypes.associativeArray,
@@ -11191,339 +10871,417 @@ class HTML_Validator {
11191
10871
  }
11192
10872
  }
11193
10873
  };
11194
- waitingForStaringOfWritingOfCacheFileWithValidationsResults = null;
11195
- static WAITING_FOR_STARING_OF_WRITING_OF_CACHE_FILE_WITH_VALIDATION_RESULTS_PERIOD__SECONDS = 1;
11196
- /* ─── Logging ──────────────────────────────────────────────────────────────────────────────────────────────────── */
11197
- logging;
11198
- static DISPLAYING_LINES_COUNT_BEFORE_ISSUE_IN_CODE_LISTING = 2;
11199
- static DISPLAYING_LINES_COUNT_AFTER_ISSUE_IN_CODE_LISTING = 1;
11200
- /* [ Theory ] 120 columns is about the half of the 1920x1080 screen. */
11201
- static DISPLAYING_MAXIMAL_COLUMNS_COUNT_IN_LOG = 120;
11202
- /* [ Theory ] The toast notification of each invalid file could be bothersome; it should be the cooling down period. */
11203
- static SUBSEQUENT_TOAST_NOTIFICATION_PROHIBITION_PERIOD__SECONDS = 5;
11204
- waitingForToastNotificationsWillBePermittedAgain = null;
11205
- isToastNotificationPermitted = true;
10874
+ /* ─── Raw Validations Results Specification (Third-party Library Dependent) ────────────────────────────────────── */
10875
+ /** @description
10876
+ * The NuChecker output could change with new versions. The validation allows to be notified about them soon.
10877
+ * ● Being defined in third-parry solution, the following properties could not be renamed to more clear ones during
10878
+ * data reading.
10879
+ * ● The order of properties has been matched with output of parsed JSON to console. */
10880
+ static validationsResultsSpecification = {
10881
+ nameForLogging: "Nu HTML Checker (v.Nu) Output",
10882
+ subtype: es_extensions_1.RawObjectDataProcessor.ObjectSubtypes.fixedKeyAndValuePairsObject,
10883
+ properties: {
10884
+ messages: {
10885
+ type: Array,
10886
+ required: true,
10887
+ element: {
10888
+ type: Object,
10889
+ properties: {
10890
+ type: {
10891
+ type: String,
10892
+ required: true,
10893
+ allowedAlternatives: ["info", "error", "non-document-error", "network-error"]
10894
+ },
10895
+ url: {
10896
+ type: String,
10897
+ required: true,
10898
+ minimalCharactersCount: 7
10899
+ },
10900
+ lastLine: {
10901
+ type: Number,
10902
+ required: false,
10903
+ numbersSet: es_extensions_1.RawObjectDataProcessor.NumbersSets.naturalNumber
10904
+ },
10905
+ lastColumn: {
10906
+ type: Number,
10907
+ required: false,
10908
+ numbersSet: es_extensions_1.RawObjectDataProcessor.NumbersSets.naturalNumber
10909
+ },
10910
+ firstColumn: {
10911
+ type: Number,
10912
+ required: false,
10913
+ numbersSet: es_extensions_1.RawObjectDataProcessor.NumbersSets.naturalNumber
10914
+ },
10915
+ subType: {
10916
+ type: String,
10917
+ required: false,
10918
+ allowedAlternatives: ["warning", "fatal", "io", "schema", "internal"]
10919
+ },
10920
+ message: {
10921
+ type: String,
10922
+ required: true,
10923
+ minimalCharactersCount: 1
10924
+ },
10925
+ extract: {
10926
+ type: String,
10927
+ required: false
10928
+ },
10929
+ hiliteStart: {
10930
+ type: Number,
10931
+ required: false,
10932
+ numbersSet: es_extensions_1.RawObjectDataProcessor.NumbersSets.naturalNumber
10933
+ },
10934
+ hiliteLength: {
10935
+ type: Number,
10936
+ required: false,
10937
+ numbersSet: es_extensions_1.RawObjectDataProcessor.NumbersSets.naturalNumber
10938
+ }
10939
+ }
10940
+ }
10941
+ }
10942
+ }
10943
+ };
10944
+ /* ─── Temporary Files ──────────────────────────────────────────────────────────────────────────────────────────── */
10945
+ static TEMPORARY_FORMATTED_HTML_FILES_FOLDER_NAME = "HTML_Validation";
10946
+ TEMPORARY_FORMATTED_HTML_FILES_DIRECTORY_ABSOLUTE_PATH;
10947
+ TEMPORARY_FORMATTED_HTML_FILES_DIRECTORY_PATH_RELATIVE_TO_CONSUMING_PROJECT_ROOT;
10948
+ CONSUMING_PROJECT_ROOT_DIRECTORY_ABSOLUTE_PATH;
11206
10949
  /* ─── Localization ─────────────────────────────────────────────────────────────────────────────────────────────── */
11207
10950
  static localization = HTML_ValidatorLocalization_english_1.default;
11208
- /* ━━━ Public static methods ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
11209
- /* ─── Initialization ───────────────────────────────────────────────────────────────────────────────────────────── */
11210
- /* [ Specification ] Could not be async because intended to be used ini non-async methods. */
11211
- static beginInitialization(configuration) {
11212
- HTML_Validator.hasInitializationStarted = true;
11213
- const cachedValidationsResultsFileAbsolutePath = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
11214
- configuration.cachedValidationsResultsFileParentDirectoryAbsolutePath,
11215
- "HTML_Validation." +
11216
- (0, es_extensions_1.insertSubstring)(configuration.projectBuildingSelectiveExecutionID, { modifier: (projectBuildingSelectiveExecutionID) => `${projectBuildingSelectiveExecutionID}.` }) +
11217
- `${(0, es_extensions_1.toLowerCamelCase)(configuration.consumingProjectBuildingMode)}.json`
11218
- ]);
11219
- Promise.all([
11220
- Promise.resolve().then(() => __importStar(__webpack_require__(/*! w3c-html-validator */ "../node_modules/w3c-html-validator/dist/w3c-html-validator.js"))),
11221
- HTML_Validator.retrieveCachedPastValidationsResultsFromFileIfItExists({
11222
- cachedValidationsResultsFileAbsolutePath,
11223
- cachedValidationsResultsDirectoryAbsolutePath: configuration.cachedValidationsResultsFileParentDirectoryAbsolutePath
11224
- })
11225
- ]).
11226
- then(([dynamicallyLoadedHTML_ValidatorModule, cachedValidationsResults]) => {
11227
- HTML_Validator.selfSoleInstance = new HTML_Validator({
11228
- HTML_ValidationService: dynamicallyLoadedHTML_ValidatorModule.w3cHtmlValidator,
11229
- cachedValidationsResults,
11230
- cachedValidationsResultsFileAbsolutePath,
11231
- ...configuration
11232
- });
11233
- this.onSelfSoleInstanceReady(HTML_Validator.selfSoleInstance);
11234
- }).
11235
- catch((error) => {
10951
+ /* ━━━ Public Static Methods (Facade) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
10952
+ static initialize(requirements) {
10953
+ if ((0, es_extensions_1.isNotNull)(HTML_Validator.selfSingleInstance)) {
11236
10954
  es_extensions_1.Logger.logError({
11237
- errorType: es_extensions_1.UnexpectedEventError.NAME,
11238
- title: es_extensions_1.UnexpectedEventError.localization.defaultTitle,
11239
- description: "The unexpected error occurred during the initialization of HTML validation functionality",
11240
- occurrenceLocation: "HTML_Validator.beginInitialization(configuration)",
11241
- caughtError: error
11242
- });
11243
- });
11244
- }
11245
- /* ─── Validation ───────────────────────────────────────────────────────────────────────────────────────────────── */
11246
- /** @description Designed for the modes with incremental building. */
11247
- static validateAtBackgroundAndReportImmideatlyWithoutThrowingOfErrors(singleFileHTML_ValidationOrder) {
11248
- HTML_Validator.getInstanceOnceReady().
11249
- then(async (selfSoleInstance) => {
11250
- clearTimeout((0, es_extensions_1.nullToUndefined)(selfSoleInstance.waitingForStaringOfWritingOfCacheFileWithValidationsResults));
11251
- return selfSoleInstance.validateSingleFile({
11252
- ...singleFileHTML_ValidationOrder,
11253
- mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime: true
10955
+ errorType: es_extensions_1.ClassRedundantSubsequentInitializationError.NAME,
10956
+ title: es_extensions_1.ClassRedundantSubsequentInitializationError.localization.defaultTitle,
10957
+ description: es_extensions_1.ClassRedundantSubsequentInitializationError.localization.generateDescription({
10958
+ className: "HTML_Validator"
10959
+ }),
10960
+ occurrenceLocation: "HTML_Validator.initialize(configuration)",
10961
+ mustOutputIf: true
11254
10962
  });
11255
- }).
11256
- catch((error) => {
11257
- if (true) {
11258
- es_extensions_1.Logger.logError({
11259
- errorType: es_extensions_1.AlgorithmMismatchError.NAME,
11260
- title: es_extensions_1.AlgorithmMismatchError.localization.defaultTitle,
11261
- description: "The error has been caught during the execution of asynchronous method \"validateSingleFile\", " +
11262
- "while expected that all errors has been handled inside this method.",
11263
- occurrenceLocation: "HTML_Validator." +
11264
- "validateAtBackgroundAndReportImmideatlyWithoutThrowingOfErrors(singleFileHTML_ValidationOrder)",
11265
- caughtError: error
11266
- });
11267
- }
11268
- });
10963
+ return;
10964
+ }
10965
+ HTML_Validator.selfSingleInstance = new HTML_Validator(requirements);
11269
10966
  }
11270
- /** @description Designed for production-like modes. */
11271
- static validateAtBackgroundWithoutReporting(singleFileHTML_ValidationOrder) {
11272
- HTML_Validator.getInstanceOnceReady().
11273
- then((selfSoleInstance) => {
11274
- selfSoleInstance.validationsInProgressForProductionLikeModes.push(selfSoleInstance.validateSingleFile({
11275
- ...singleFileHTML_ValidationOrder,
11276
- mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime: false
11277
- }));
11278
- }).
11279
- catch((error) => {
11280
- if (true) {
11281
- es_extensions_1.Logger.logError({
11282
- errorType: es_extensions_1.AlgorithmMismatchError.NAME,
11283
- title: es_extensions_1.AlgorithmMismatchError.localization.defaultTitle,
11284
- description: "The error has been caught during the execution of asynchronous method \"validateSingleFile\", " +
11285
- "while expected that all errors has been handled inside this method.",
11286
- occurrenceLocation: "HTML_Validator." +
11287
- "validateAtBackgroundAndReportImmideatlyWithoutThrowingOfErrors(singleFileHTML_ValidationOrder)",
11288
- caughtError: error
11289
- });
11290
- }
11291
- });
10967
+ static enqueueFileForValidation(targetFileMetadata) {
10968
+ const selfSingleInstance = HTML_Validator.
10969
+ getExpectedToBeInitializedSelfSingleInstance();
10970
+ selfSingleInstance.queuedFilesMetadata.push(targetFileMetadata);
11292
10971
  }
11293
- static reportCachedValidationsResultsAndFinalize() {
10972
+ static validateQueuedFilesButReportAll() {
11294
10973
  HTML_Validator.
11295
- getInstanceOnceReady().
11296
- then(async (selfSoleInstance) => {
11297
- await Promise.all(selfSoleInstance.validationsInProgressForProductionLikeModes);
11298
- return selfSoleInstance;
11299
- }).
11300
- then((selfSoleInstance) => {
11301
- const HTML_ValidityIssuesLogForEachFile = [];
11302
- for (const [filePathRelativeToConsumingProjectRootDirectory, cachedValidationResult] of selfSoleInstance.cachedValidationsResults.entries()) {
11303
- if (cachedValidationResult.issues.length > 0) {
11304
- HTML_ValidityIssuesLogForEachFile.push((0, es_extensions_1.surroundLabelByOrnament)({
11305
- label: ` ${filePathRelativeToConsumingProjectRootDirectory} `,
11306
- ornamentPatten: "─",
11307
- prependedPartCharactersCount: 3,
11308
- totalCharactersCount: HTML_Validator.DISPLAYING_MAXIMAL_COLUMNS_COUNT_IN_LOG
11309
- }), HTML_Validator.formatValidationResultForSingleFile(cachedValidationResult.issues));
11310
- }
11311
- }
11312
- selfSoleInstance.writeCacheToFile();
11313
- selfSoleInstance.cachedValidationsResults.clear();
11314
- if (HTML_ValidityIssuesLogForEachFile.length === 0 && selfSoleInstance.logging.validationCompletionWithoutIssues) {
11315
- es_extensions_1.Logger.logSuccess(HTML_Validator.localization.validationOfAllFilesHasFinishedWithNoIssuesFoundSuccessLog);
11316
- return;
11317
- }
11318
- es_extensions_1.Logger.logErrorLikeMessage({
11319
- title: HTML_Validator.localization.issuesFoundInOneOrMultipleFilesErrorLog.title,
11320
- description: `\n${HTML_ValidityIssuesLogForEachFile.join("\n")}`
11321
- });
11322
- es_extensions_1.Logger.throwErrorAndLog({
11323
- errorType: "InvalidHTMLCode_Error",
11324
- ...HTML_Validator.localization.issuesFoundInOneOrMultipleFilesErrorLog,
11325
- occurrenceLocation: "HTML_Validator.reportCachedResultAndWriteItToFile"
10974
+ getExpectedToBeInitializedSelfSingleInstance().
10975
+ validateQueuedFilesButReportAll().
10976
+ catch(es_extensions_1.Logger.logPromiseError);
10977
+ }
10978
+ /* ━━━ Constructor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
10979
+ constructor({ temporaryFileDirectoryAbsolutePath, projectBuildingMasterConfigRepresentative, logging }) {
10980
+ this.CACHED_VALIDATIONS_RESULTS_FILE_PARENT_DIRECTORY_ABSOLUTE_PATH = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
10981
+ DotYDA_DirectoryManager_1.default.OPTIMIZATION_FILES_DIRECTORY_ABSOLUTE_PATH,
10982
+ HTML_Validator.CACHED_HTML_VALIDATION_RESULTS_DIRECTORY_NAME
10983
+ ], { alwaysForwardSlashSeparators: true });
10984
+ this.CACHED_VALIDATIONS_RESULTS_FILE_ABSOLUTE_PATH = HTML_Validator.
10985
+ computeActualCachedValidationsResultsFileParentDirectoryAbsolutePath({
10986
+ parentDirectoryAbsolutePath: this.CACHED_VALIDATIONS_RESULTS_FILE_PARENT_DIRECTORY_ABSOLUTE_PATH,
10987
+ projectBuildingSelectiveExecutionID: projectBuildingMasterConfigRepresentative.selectiveExecutionID,
10988
+ consumingProjectBuildingMode: projectBuildingMasterConfigRepresentative.consumingProjectBuildingMode
10989
+ });
10990
+ let cachedValidationsResults;
10991
+ try {
10992
+ cachedValidationsResults = es_extensions_nodejs_1.ObjectDataFilesProcessor.
10993
+ processFile({
10994
+ filePath: this.CACHED_VALIDATIONS_RESULTS_FILE_ABSOLUTE_PATH,
10995
+ validDataSpecification: HTML_Validator.cachedValidationsResultsFileContentSpecification,
10996
+ synchronously: true
11326
10997
  });
11327
- }).
11328
- catch((error) => {
11329
- if (error instanceof Error && error.name === "InvalidHTMLCode_Error") {
11330
- throw error;
10998
+ }
10999
+ catch (error) {
11000
+ if (!(error instanceof es_extensions_nodejs_1.FileNotFoundError)) {
11001
+ // TODO ① Extract textings
11002
+ es_extensions_1.Logger.logError({
11003
+ errorType: "CachedDataRetrievingFailure",
11004
+ title: "Cached data retrieving failure",
11005
+ description: `Unable to read the existing cache file "${this.CACHED_VALIDATIONS_RESULTS_FILE_ABSOLUTE_PATH}".`,
11006
+ occurrenceLocation: "HTML_Validator.retrieveCachedPastValidationsResultsFromFileIfItExists" +
11007
+ "(cachedValidationsResultsFileAbsolutePath)",
11008
+ caughtError: error,
11009
+ mustOutputIf: true
11010
+ });
11331
11011
  }
11332
- es_extensions_1.Logger.logError({
11333
- errorType: es_extensions_1.UnexpectedEventError.NAME,
11334
- title: es_extensions_1.UnexpectedEventError.localization.defaultTitle,
11335
- description: "The error occurred during the HTML validation.",
11336
- occurrenceLocation: "HTML_Validator.reportCachedResultAndWriteItToFile",
11337
- caughtError: error
11338
- });
11012
+ }
11013
+ this.cachedValidationsResults = new Map(Object.entries(cachedValidationsResults ?? {}));
11014
+ this.TEMPORARY_FORMATTED_HTML_FILES_DIRECTORY_ABSOLUTE_PATH = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
11015
+ temporaryFileDirectoryAbsolutePath,
11016
+ HTML_Validator.TEMPORARY_FORMATTED_HTML_FILES_FOLDER_NAME
11017
+ ]);
11018
+ this.TEMPORARY_FORMATTED_HTML_FILES_DIRECTORY_PATH_RELATIVE_TO_CONSUMING_PROJECT_ROOT = es_extensions_nodejs_1.ImprovedPath.
11019
+ computeRelativePath({
11020
+ basePath: projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
11021
+ comparedPath: this.TEMPORARY_FORMATTED_HTML_FILES_DIRECTORY_ABSOLUTE_PATH,
11022
+ alwaysForwardSlashSeparators: true
11339
11023
  });
11340
- }
11341
- /* ━━━ Constructor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
11342
- constructor({ HTML_ValidationService, cachedValidationsResults, cachedValidationsResultsFileParentDirectoryAbsolutePath, cachedValidationsResultsFileAbsolutePath, logging }) {
11343
- this.HTML_ValidationService = HTML_ValidationService;
11344
- this.cachedValidationsResults = cachedValidationsResults ?? new Map();
11345
- this.CACHED_VALIDATIONS_RESULTS_FILE_PARENT_DIRECTORY_ABSOLUTE_PATH = cachedValidationsResultsFileParentDirectoryAbsolutePath;
11346
- this.CACHED_VALIDATIONS_RESULTS_FILE_ABSOLUTE_PATH = cachedValidationsResultsFileAbsolutePath;
11024
+ this.CONSUMING_PROJECT_ROOT_DIRECTORY_ABSOLUTE_PATH =
11025
+ projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath;
11347
11026
  this.logging = logging;
11348
11027
  }
11349
- /* ━━━ Private methods ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
11350
- async validateSingleFile({ targetHTML_FilePathRelativeToConsumingProjectRootDirectory, HTML_Code, HTML_CodeMD5Checksum, mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime }) {
11351
- const cachedValidationsResultsForCurrentFile = this.cachedValidationsResults.get(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
11352
- if (cachedValidationsResultsForCurrentFile?.contentMD5Checksum === HTML_CodeMD5Checksum) {
11353
- this.relativePathsOfFilesWhichHasBeenValidatedDuringCurrentExecution.
11354
- add(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
11355
- if (mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime) {
11356
- this.logValidationResultsForSingleFile({
11357
- targetHTML_FilePathRelativeToConsumingProjectRootDirectory,
11358
- normalizedValidationIssues: cachedValidationsResultsForCurrentFile.issues
11359
- });
11360
- /* [ Theory ] If the cache will be output one at a time, the files reading/writing error could occur. */
11361
- if (this.relativePathsOfFilesWhichIsBeingValidated.size === 0) {
11362
- this.waitingForStaringOfWritingOfCacheFileWithValidationsResults = setTimeout(this.writeCacheToFile.bind(this), (0, es_extensions_1.secondsToMilliseconds)(HTML_Validator.WAITING_FOR_STARING_OF_WRITING_OF_CACHE_FILE_WITH_VALIDATION_RESULTS_PERIOD__SECONDS));
11363
- }
11028
+ /* ━━━ Private Methods ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
11029
+ /* ─── Validation ───────────────────────────────────────────────────────────────────────────────────────────────── */
11030
+ async validateQueuedFilesButReportAll() {
11031
+ const validationsResults = (0, es_extensions_1.createMapBasedOnOtherMap)(this.cachedValidationsResults, (filePathRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly, { issues }) => [filePathRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly, issues]);
11032
+ /* [ Approach ]
11033
+ * To get readable logs with code fragment, the original output HTML files could not be used because they could
11034
+ * contain the minified HTML code.
11035
+ * The saving of temporary HTML files with formatted HTML code could be the solution.
11036
+ * Anyway the Nu HTML Checker does not work with HTML strings — it accepts only relative paths of file saved to drive. */
11037
+ const formattedTemporaryHTML_FilesPathsRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly = [];
11038
+ /* [ Theory ] How to understand for which file Nu HTML Checker issued the message?
11039
+ * By the output which will include the URI like
11040
+ * "file:/D:/IntelliJ%20IDEA/SampleProject/.yda/Temporary/HTML_Validation/4834cf5c-253f-4147-b00c-b8ca53922315.html"
11041
+ * It is the encoded (`encodeURI()` for ECMAScript) absolute path of temporary formatted HTML file with "file:/" prefix. */
11042
+ const temporaryFormattedHTML_FilesEncodedURIsAndOriginalHTML_FilesRelativePathsCorrespondence = new Map();
11043
+ /* [ Theory ]
11044
+ * Nu HTML Checker will not output the data for valid files while their paths is still required for summary. */
11045
+ const relativeToConsumingProjectRootPathsOfOriginalHTML_FilesWillBeValidated__forwardSlashesSeparatorsOnly = new Set();
11046
+ const cachedHTML_CodeSplitToLinesByFilesRelativePaths = new Map();
11047
+ const MD5_HashesOfHTML_ContentBySourceFilesRelativePaths = new Map();
11048
+ for (const { pathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly: originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly, formattedHTML_Content, HTML_ContentMD5_Hash } of this.queuedFilesMetadata) {
11049
+ relativeToConsumingProjectRootPathsOfOriginalHTML_FilesWillBeValidated__forwardSlashesSeparatorsOnly.add(originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly);
11050
+ const cachedValidationsResultsForCurrentFile = this.cachedValidationsResults.get(originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly);
11051
+ MD5_HashesOfHTML_ContentBySourceFilesRelativePaths.set(originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly, HTML_ContentMD5_Hash);
11052
+ if (cachedValidationsResultsForCurrentFile?.contentMD5Checksum === HTML_ContentMD5_Hash) {
11053
+ continue;
11364
11054
  }
11365
- return;
11366
- }
11367
- if (HTML_Code.trim().length === 0) {
11368
- es_extensions_1.Logger.logWarning(HTML_Validator.localization.generateFileIsEmptyWarningLog({
11369
- targetFileRelativePath: targetHTML_FilePathRelativeToConsumingProjectRootDirectory
11370
- }));
11371
- return;
11055
+ validationsResults.delete(originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly);
11056
+ cachedHTML_CodeSplitToLinesByFilesRelativePaths.set(originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly, (0, es_extensions_1.splitString)(formattedHTML_Content, "\n"));
11057
+ const temporaryHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
11058
+ this.TEMPORARY_FORMATTED_HTML_FILES_DIRECTORY_PATH_RELATIVE_TO_CONSUMING_PROJECT_ROOT,
11059
+ `${(0, nanoid_1.nanoid)()}.html`
11060
+ ], { alwaysForwardSlashSeparators: true });
11061
+ formattedTemporaryHTML_FilesPathsRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly.push(temporaryHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly);
11062
+ const temporaryHTML_FileAbsolutePath__forwardSlashesSeparatorsOnly = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
11063
+ this.CONSUMING_PROJECT_ROOT_DIRECTORY_ABSOLUTE_PATH,
11064
+ temporaryHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly
11065
+ ], { alwaysForwardSlashSeparators: true });
11066
+ temporaryFormattedHTML_FilesEncodedURIsAndOriginalHTML_FilesRelativePathsCorrespondence.set(`file:/${encodeURI(temporaryHTML_FileAbsolutePath__forwardSlashesSeparatorsOnly)}`, originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly);
11067
+ es_extensions_nodejs_1.ImprovedFileSystem.writeFileToPossiblyNotExistingDirectory({
11068
+ filePath: temporaryHTML_FileAbsolutePath__forwardSlashesSeparatorsOnly,
11069
+ content: formattedHTML_Content,
11070
+ synchronously: true
11071
+ });
11372
11072
  }
11373
11073
  if (this.logging.validationStart) {
11374
11074
  es_extensions_1.Logger.logInfo(HTML_Validator.localization.generateValidationStartedInfoLog({
11375
- targetFileRelativePath: targetHTML_FilePathRelativeToConsumingProjectRootDirectory
11075
+ targetFileRelativePaths: this.queuedFilesMetadata.map((metadataOfQueuedFile) => metadataOfQueuedFile.pathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly)
11376
11076
  }));
11377
11077
  }
11378
- const validationTimeMeasuringStopwatch = new Stopwatch_1.default().startOrRestart();
11379
- if (mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime) {
11380
- this.relativePathsOfFilesWhichIsBeingValidated.add(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
11381
- }
11382
- let validationRawResults;
11383
- try {
11384
- validationRawResults = await this.HTML_ValidationService.validate({
11385
- html: HTML_Code,
11386
- output: "json"
11387
- });
11388
- if ((0, es_extensions_1.isNotUndefined)(validationRawResults.messages?.find((rawValidationIssue) => rawValidationIssue.type === "network-error" && rawValidationIssue.message.includes("429 Too Many Requests")))) {
11389
- es_extensions_1.Logger.throwErrorAndLog({
11390
- errorType: "HTML_ValidationServiceRejectionError",
11391
- title: "HTML Validation Rejection",
11392
- description: "Sorry, the validation service has rejected the requests because of limit exceeding. ",
11393
- occurrenceLocation: "HTML_Validator.validateSingleFile(compoundParameter)"
11394
- });
11395
- }
11078
+ /* [ Theory ] If pass no files to Nu HTML Checker, it will fail with error. */
11079
+ if (formattedTemporaryHTML_FilesPathsRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly.length === 0) {
11080
+ HTML_Validator.reportValidationsResults(validationsResults);
11081
+ return;
11396
11082
  }
11397
- catch (error) {
11398
- validationTimeMeasuringStopwatch.stop();
11399
- if (mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime) {
11400
- this.relativePathsOfFilesWhichIsBeingValidated.delete(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
11401
- }
11083
+ const rawValidationsResults = await HTML_Validator.getRawValidationsResultsFromNuHTML_Checker(formattedTemporaryHTML_FilesPathsRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly);
11084
+ // TODO ④ Improve Method
11085
+ es_extensions_nodejs_1.ImprovedFileSystem.removeDirectoryWithFiles({
11086
+ targetPath: this.TEMPORARY_FORMATTED_HTML_FILES_DIRECTORY_ABSOLUTE_PATH,
11087
+ mustThrowErrorIfOneOrMoreFilesCouldNotBeDeleted: false
11088
+ });
11089
+ const rawValidationsResultsInspectionOutput = es_extensions_1.RawObjectDataProcessor.process(rawValidationsResults, HTML_Validator.validationsResultsSpecification);
11090
+ if (rawValidationsResultsInspectionOutput.rawDataIsInvalid) {
11091
+ // TODO ③ Better Error
11402
11092
  es_extensions_1.Logger.logError({
11403
- errorType: es_extensions_1.DataRetrievingFailedError.localization.defaultTitle,
11404
- ...HTML_Validator.localization.validationFailedErrorLog,
11405
- occurrenceLocation: "htmlValidator.validateSingleFile(compoundParameter)",
11406
- caughtError: error
11093
+ errorType: es_extensions_1.UnexpectedEventError.NAME,
11094
+ title: es_extensions_1.UnexpectedEventError.localization.defaultTitle,
11095
+ description: es_extensions_1.RawObjectDataProcessor.
11096
+ formatValidationErrorsList(rawValidationsResultsInspectionOutput.validationErrorsMessages),
11097
+ occurrenceLocation: "experimentalHTML_Validator.validateQueuedFilesButReportAll()"
11407
11098
  });
11408
11099
  return;
11409
11100
  }
11410
- const validationPeriod__seconds = validationTimeMeasuringStopwatch.stop().seconds;
11411
- const normalizedValidationIssues = HTML_Validator.normalizeValidationIssues(validationRawResults.messages ?? [], HTML_Code);
11412
- this.cachedValidationsResults.set(targetHTML_FilePathRelativeToConsumingProjectRootDirectory, {
11413
- contentMD5Checksum: HTML_CodeMD5Checksum,
11414
- issues: normalizedValidationIssues
11415
- });
11416
- this.relativePathsOfFilesWhichHasBeenValidatedDuringCurrentExecution.
11417
- add(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
11418
- if (!mustLogIssuesImmideatlyAndSaveCacheToFileDuringDowntime) {
11419
- return;
11101
+ /* [ Theory ]
11102
+ * The ones which called `messages` in Nu HTML Checker are not the messages.
11103
+ * The `messages` property is the array of objects each of which has `message` string property.
11104
+ * There are could be multiple objects for single file thus sorting by files required first. */
11105
+ for (const rawValidationIssue of rawValidationsResultsInspectionOutput.processedData.messages) {
11106
+ const filePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly = (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(temporaryFormattedHTML_FilesEncodedURIsAndOriginalHTML_FilesRelativePathsCorrespondence, rawValidationIssue.url);
11107
+ relativeToConsumingProjectRootPathsOfOriginalHTML_FilesWillBeValidated__forwardSlashesSeparatorsOnly.delete(filePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly);
11108
+ const issuesOfCurrentFile = validationsResults.get(filePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly);
11109
+ if ((0, es_extensions_1.isUndefined)(issuesOfCurrentFile)) {
11110
+ validationsResults.set(filePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly, [
11111
+ HTML_Validator.normalizeRawValidationIssue(rawValidationIssue, (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(cachedHTML_CodeSplitToLinesByFilesRelativePaths, filePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly))
11112
+ ]);
11113
+ continue;
11114
+ }
11115
+ issuesOfCurrentFile.push(HTML_Validator.normalizeRawValidationIssue(rawValidationIssue, (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(cachedHTML_CodeSplitToLinesByFilesRelativePaths, filePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly)));
11420
11116
  }
11421
- this.relativePathsOfFilesWhichIsBeingValidated.delete(targetHTML_FilePathRelativeToConsumingProjectRootDirectory);
11422
- /* [ Theory ] If the cache will be output one at a time, the files reading/writing error could occur. */
11423
- if (this.relativePathsOfFilesWhichIsBeingValidated.size === 0) {
11424
- this.waitingForStaringOfWritingOfCacheFileWithValidationsResults = setTimeout(this.writeCacheToFile.bind(this), (0, es_extensions_1.secondsToMilliseconds)(HTML_Validator.WAITING_FOR_STARING_OF_WRITING_OF_CACHE_FILE_WITH_VALIDATION_RESULTS_PERIOD__SECONDS));
11117
+ for (const relativeToConsumingProjectRootPathOfOriginalValidHTML_Files__forwardSlashesSeparatorsOnly of relativeToConsumingProjectRootPathsOfOriginalHTML_FilesWillBeValidated__forwardSlashesSeparatorsOnly) {
11118
+ validationsResults.set(relativeToConsumingProjectRootPathOfOriginalValidHTML_Files__forwardSlashesSeparatorsOnly, []);
11425
11119
  }
11426
- this.logValidationResultsForSingleFile({
11427
- targetHTML_FilePathRelativeToConsumingProjectRootDirectory,
11428
- normalizedValidationIssues,
11429
- validationPeriod__seconds
11120
+ HTML_Validator.reportValidationsResults(validationsResults);
11121
+ this.cachedValidationsResults = (0, es_extensions_1.createMapBasedOnOtherMap)(validationsResults, (filePathRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly, issues) => [
11122
+ filePathRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly,
11123
+ {
11124
+ issues,
11125
+ contentMD5Checksum: (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(MD5_HashesOfHTML_ContentBySourceFilesRelativePaths, filePathRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly)
11126
+ }
11127
+ ]);
11128
+ this.writeCacheToFile();
11129
+ }
11130
+ static async getRawValidationsResultsFromNuHTML_Checker(targetFilesPathRelativeToConsumingProjectRoot__forwardSlashesPathSeparators) {
11131
+ return new Promise((resolve, reject) => {
11132
+ /* [ Theory ] "vnu-jar" works only with relative paths. Absolute paths will not work with any path separators. */
11133
+ node_child_process_1.default.execFile("java", [
11134
+ "-jar",
11135
+ `"${vnu_jar_1.default}"`,
11136
+ "--format",
11137
+ "json",
11138
+ ...targetFilesPathRelativeToConsumingProjectRoot__forwardSlashesPathSeparators
11139
+ ], { shell: true }, (_error, _stdout, stderr) => {
11140
+ /* [ Theory ] vnu-jar
11141
+ * + All validation errors will be output to `stderr` herewith the first parameter will be non-null.
11142
+ * + It is possible to output the validation error to `stdout` instead if to specify the respective option,
11143
+ * but the first parameter will be non-null anyway.
11144
+ * + The reaction to non-existing file is completely same as to valid file: the stringified object
11145
+ * `{"messages":[]}` will be returned. */
11146
+ const stringifiedOutput = Buffer.isBuffer(stderr) ? stderr.toString("utf8") : stderr;
11147
+ try {
11148
+ resolve(JSON.parse(stringifiedOutput));
11149
+ }
11150
+ catch (error) {
11151
+ reject(error);
11152
+ }
11153
+ });
11430
11154
  });
11431
11155
  }
11432
- static normalizeValidationIssues(rawValidationIssues, HTML_Code) {
11433
- return rawValidationIssues.map((rawValidationIssue) => {
11434
- const HTML_CodeSplitToLines = (0, es_extensions_1.splitString)(HTML_Code, "\n");
11435
- /* [ W3C validator theory ] The HTML validating service marks only one line of code. */
11436
- const lineNumberOfActualCodeFragment__numerationFrom1 = rawValidationIssue.lastLine;
11437
- const actualLineOfCode = HTML_CodeSplitToLines[lineNumberOfActualCodeFragment__numerationFrom1 - 1];
11438
- const numberOfStartingLineWhichWillBeExtractedFromCodeListingForLogging__numerationFrom1 = (0, es_extensions_1.limitMinimalValue)({
11439
- targetNumber: lineNumberOfActualCodeFragment__numerationFrom1 -
11440
- HTML_Validator.DISPLAYING_LINES_COUNT_BEFORE_ISSUE_IN_CODE_LISTING,
11441
- minimalValue: 1
11442
- });
11443
- const numberOfEndingLineWhichWillBeExtractedFromCodeListingForLogging__numerationFrom1 = (0, es_extensions_1.limitMaximalValue)({
11444
- targetNumber: lineNumberOfActualCodeFragment__numerationFrom1 +
11445
- HTML_Validator.DISPLAYING_LINES_COUNT_AFTER_ISSUE_IN_CODE_LISTING,
11446
- maximalValue: HTML_CodeSplitToLines.length
11447
- });
11448
- /* [ Approach ] Although the W3C validator suggesting the "extract", "hiliteStart" and "hiliteLength" data
11449
- * for highlighting, here will be the improved highlighting with caching. */
11450
- const numberOfStartingColumnOfHighlightedCodeFragment__numerationFrom1 =
11451
- /* eslint-disable-next-line @typescript-eslint/no-unnecessary-condition --
11452
- * Although according to types for "w3c-html-validator" the `firstColumn` is the required property,
11453
- * experimentally has been known that it could be omitted. */
11454
- rawValidationIssue?.firstColumn ?? rawValidationIssue.lastColumn;
11455
- const numberOfEndingColumnOfHighlightedCodeFragment__numerationFrom1 = rawValidationIssue.lastColumn;
11456
- /* [ Maintainability ] Keep these variables for easier debugging. */
11457
- const codeFragmentBeforeHighlighting = `${(0, es_extensions_1.cropArray)({
11458
- targetArray: HTML_CodeSplitToLines,
11459
- startingElementNumber__numerationFrom1: numberOfStartingLineWhichWillBeExtractedFromCodeListingForLogging__numerationFrom1,
11460
- endingElementNumber__numerationFrom1: (0, es_extensions_1.limitMinimalValue)({
11461
- targetNumber: lineNumberOfActualCodeFragment__numerationFrom1 - 1, minimalValue: 1
11462
- }),
11463
- mustThrowErrorIfSpecifiedElementsNumbersAreOutOfRange: false,
11464
- mutably: false
11465
- }).join("\n")}\n` +
11156
+ /* ─── Raw Issues Normalizing ───────────────────────────────────────────────────────────────────────────────────── */
11157
+ static normalizeRawValidationIssue({ type, subType, message, lastLine: lineNumberOfActualCodeFragment__numerationFrom1, firstColumn, lastColumn: numberOfEndingColumnOfHighlightedCodeFragment__numerationFrom1 }, HTML_CodeSplitToLines) {
11158
+ if ((0, es_extensions_1.isUndefined)(lineNumberOfActualCodeFragment__numerationFrom1) ||
11159
+ (0, es_extensions_1.isUndefined)(numberOfEndingColumnOfHighlightedCodeFragment__numerationFrom1)) {
11160
+ return {
11161
+ type,
11162
+ subType,
11163
+ message
11164
+ };
11165
+ }
11166
+ const actualLineOfCode = HTML_CodeSplitToLines[lineNumberOfActualCodeFragment__numerationFrom1 - 1];
11167
+ const numberOfStartingLineWhichWillBeExtractedFromCodeListingForLogging__numerationFrom1 = (0, es_extensions_1.limitMinimalValue)({
11168
+ targetNumber: lineNumberOfActualCodeFragment__numerationFrom1 -
11169
+ HTML_Validator.DISPLAYING_LINES_COUNT_BEFORE_ISSUE_IN_CODE_LISTING,
11170
+ minimalValue: 1
11171
+ });
11172
+ const numberOfEndingLineWhichWillBeExtractedFromCodeListingForLogging__numerationFrom1 = (0, es_extensions_1.limitMaximalValue)({
11173
+ targetNumber: lineNumberOfActualCodeFragment__numerationFrom1 +
11174
+ HTML_Validator.DISPLAYING_LINES_COUNT_AFTER_ISSUE_IN_CODE_LISTING,
11175
+ maximalValue: HTML_CodeSplitToLines.length
11176
+ });
11177
+ const numberOfStartingColumnOfHighlightedCodeFragment__numerationFrom1 = firstColumn ?? numberOfEndingColumnOfHighlightedCodeFragment__numerationFrom1;
11178
+ /* [ Maintainability ] Keep these variables for easier debugging. */
11179
+ const codeFragmentBeforeHighlighting = `${(0, es_extensions_1.cropArray)({
11180
+ targetArray: HTML_CodeSplitToLines,
11181
+ startingElementNumber__numerationFrom1: numberOfStartingLineWhichWillBeExtractedFromCodeListingForLogging__numerationFrom1,
11182
+ endingElementNumber__numerationFrom1: (0, es_extensions_1.limitMinimalValue)({
11183
+ targetNumber: lineNumberOfActualCodeFragment__numerationFrom1 - 1, minimalValue: 1
11184
+ }),
11185
+ mustThrowErrorIfSpecifiedElementsNumbersAreOutOfRange: false,
11186
+ mutably: false
11187
+ }).join("\n")}\n` +
11188
+ (numberOfStartingColumnOfHighlightedCodeFragment__numerationFrom1 > 1 ?
11466
11189
  (0, es_extensions_1.cropString)({
11467
11190
  targetString: actualLineOfCode,
11468
11191
  startingCharacterNumber__numerationFrom1: 1,
11469
11192
  endingCharacterNumber__numerationFrom1: numberOfStartingColumnOfHighlightedCodeFragment__numerationFrom1 - 1,
11470
11193
  mustThrowErrorIfSpecifiedCharactersNumbersIsOutOfRange: false
11471
- });
11472
- const highlightedCodeFragment = (0, es_extensions_1.cropString)({
11473
- targetString: actualLineOfCode,
11474
- startingCharacterNumber__numerationFrom1: numberOfStartingColumnOfHighlightedCodeFragment__numerationFrom1,
11475
- endingCharacterNumber__numerationFrom1: numberOfEndingColumnOfHighlightedCodeFragment__numerationFrom1,
11476
- mustThrowErrorIfSpecifiedCharactersNumbersIsOutOfRange: false
11477
- });
11478
- const codeFragmentAfterHighlighting = `${(0, es_extensions_1.cropString)({
11479
- targetString: actualLineOfCode,
11480
- startingCharacterNumber__numerationFrom1: numberOfEndingColumnOfHighlightedCodeFragment__numerationFrom1 + 1,
11481
- endingCharacterNumber__numerationFrom1: actualLineOfCode.length,
11482
- mustThrowErrorIfSpecifiedCharactersNumbersIsOutOfRange: false
11483
- })}\n` +
11484
- (0, es_extensions_1.cropArray)({
11485
- targetArray: HTML_CodeSplitToLines,
11486
- startingElementNumber__numerationFrom1: lineNumberOfActualCodeFragment__numerationFrom1 + 1,
11487
- endingElementNumber__numerationFrom1: numberOfEndingLineWhichWillBeExtractedFromCodeListingForLogging__numerationFrom1,
11488
- mustThrowErrorIfSpecifiedElementsNumbersAreOutOfRange: false,
11489
- mutably: false
11490
- }).join("\n");
11491
- return {
11492
- type: rawValidationIssue.type,
11493
- subType: rawValidationIssue.subType,
11494
- message: rawValidationIssue.message,
11495
- lineNumber__numerationFrom1: lineNumberOfActualCodeFragment__numerationFrom1,
11496
- startingColumnNumber__numerationFrom1: numberOfStartingColumnOfHighlightedCodeFragment__numerationFrom1,
11497
- endingColumnNumber__numerationFrom1: numberOfEndingColumnOfHighlightedCodeFragment__numerationFrom1,
11498
- codeFragment: {
11499
- beforeHighlighting: codeFragmentBeforeHighlighting,
11500
- highlighted: highlightedCodeFragment,
11501
- afterHighlighting: codeFragmentAfterHighlighting
11502
- }
11503
- };
11194
+ }) :
11195
+ "");
11196
+ // ━━━ TODO ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11197
+ const highlightedCodeFragment = (0, es_extensions_1.cropString)({
11198
+ targetString: actualLineOfCode,
11199
+ startingCharacterNumber__numerationFrom1: numberOfStartingColumnOfHighlightedCodeFragment__numerationFrom1,
11200
+ endingCharacterNumber__numerationFrom1: numberOfEndingColumnOfHighlightedCodeFragment__numerationFrom1,
11201
+ mustThrowErrorIfSpecifiedCharactersNumbersIsOutOfRange: false
11504
11202
  });
11203
+ const codeFragmentAfterHighlighting = `${(0, es_extensions_1.cropString)({
11204
+ targetString: actualLineOfCode,
11205
+ startingCharacterNumber__numerationFrom1: numberOfEndingColumnOfHighlightedCodeFragment__numerationFrom1 + 1,
11206
+ endingCharacterNumber__numerationFrom1: actualLineOfCode.length,
11207
+ mustThrowErrorIfSpecifiedCharactersNumbersIsOutOfRange: false
11208
+ })}\n` +
11209
+ (0, es_extensions_1.cropArray)({
11210
+ targetArray: HTML_CodeSplitToLines,
11211
+ startingElementNumber__numerationFrom1: lineNumberOfActualCodeFragment__numerationFrom1 + 1,
11212
+ endingElementNumber__numerationFrom1: numberOfEndingLineWhichWillBeExtractedFromCodeListingForLogging__numerationFrom1,
11213
+ mustThrowErrorIfSpecifiedElementsNumbersAreOutOfRange: false,
11214
+ mutably: false
11215
+ }).join("\n");
11216
+ return {
11217
+ type,
11218
+ subType,
11219
+ message,
11220
+ lineNumber__numerationFrom1: lineNumberOfActualCodeFragment__numerationFrom1,
11221
+ startingColumnNumber__numerationFrom1: numberOfStartingColumnOfHighlightedCodeFragment__numerationFrom1,
11222
+ endingColumnNumber__numerationFrom1: numberOfEndingColumnOfHighlightedCodeFragment__numerationFrom1,
11223
+ codeFragment: {
11224
+ beforeHighlighting: codeFragmentBeforeHighlighting,
11225
+ highlighted: highlightedCodeFragment,
11226
+ afterHighlighting: codeFragmentAfterHighlighting
11227
+ }
11228
+ };
11505
11229
  }
11506
- /* ─── Logging ──────────────────────────────────────────────────────────────────────────────────────────────────── */
11507
- logValidationResultsForSingleFile({ targetHTML_FilePathRelativeToConsumingProjectRootDirectory, normalizedValidationIssues, validationPeriod__seconds }) {
11508
- if (normalizedValidationIssues.length > 0) {
11509
- es_extensions_1.Logger.logErrorLikeMessage(HTML_Validator.localization.generateIssuesFoundInSingleFileErrorLog({
11510
- targetFileRelativePath: targetHTML_FilePathRelativeToConsumingProjectRootDirectory,
11511
- formattedErrorsAndWarnings: HTML_Validator.formatValidationResultForSingleFile(normalizedValidationIssues)
11512
- }));
11513
- clearTimeout((0, es_extensions_1.nullToUndefined)(this.waitingForToastNotificationsWillBePermittedAgain));
11514
- if (this.isToastNotificationPermitted) {
11515
- node_notifier_1.default.notify(HTML_Validator.localization.issuesFoundToastNotification);
11516
- this.isToastNotificationPermitted = false;
11517
- this.waitingForToastNotificationsWillBePermittedAgain = setTimeout(() => { this.isToastNotificationPermitted = true; }, (0, es_extensions_1.secondsToMilliseconds)(HTML_Validator.SUBSEQUENT_TOAST_NOTIFICATION_PROHIBITION_PERIOD__SECONDS));
11230
+ /* ─── Reporting ────────────────────────────────────────────────────────────────────────────────────────────────── */
11231
+ static reportValidationsResults(validationsResults) {
11232
+ // TODO Alphabet order
11233
+ let hasAtLeastOneFileWithInvalidHTML = false;
11234
+ const hasEachFileIssues = new Map();
11235
+ const formattedIssuesForEachFile = new Map();
11236
+ for (const [fileRelativePath__forwardPathSeparatorsOnly, issues] of validationsResults.entries()) {
11237
+ hasEachFileIssues.set(fileRelativePath__forwardPathSeparatorsOnly, issues.length > 0);
11238
+ if (issues.length > 0) {
11239
+ hasAtLeastOneFileWithInvalidHTML = true;
11240
+ formattedIssuesForEachFile.set(fileRelativePath__forwardPathSeparatorsOnly, HTML_Validator.formatValidationResultForSingleFile(issues));
11518
11241
  }
11519
11242
  }
11520
- if (this.logging.validationCompletionWithoutIssues) {
11521
- es_extensions_1.Logger.logSuccess(HTML_Validator.localization.generateValidationOfSingleFilesHasFinishedWithNoIssuesFoundSuccessLog({
11522
- targetFileRelativePath: targetHTML_FilePathRelativeToConsumingProjectRootDirectory,
11523
- secondsElapsed: validationPeriod__seconds
11524
- }));
11243
+ const summary = `${(0, es_extensions_1.surroundLabelByOrnament)({
11244
+ label: " Summary ",
11245
+ ornamentPatten: "━",
11246
+ prependedPartCharactersCount: 3,
11247
+ totalCharactersCount: HTML_Validator.DISPLAYING_MAXIMAL_COLUMNS_COUNT_IN_LOG
11248
+ })}\n` +
11249
+ Array.from(hasEachFileIssues.entries()).
11250
+ map(([fileRelativePath__forwardPathSeparatorsOnly, hasAtLeastOneIssue]) => `${hasAtLeastOneIssue ? "❌" : "✅"} ${fileRelativePath__forwardPathSeparatorsOnly}`).
11251
+ join("\n");
11252
+ const detailedReport = `${(0, es_extensions_1.surroundLabelByOrnament)({
11253
+ label: " Details ",
11254
+ ornamentPatten: "━",
11255
+ prependedPartCharactersCount: 3,
11256
+ totalCharactersCount: HTML_Validator.DISPLAYING_MAXIMAL_COLUMNS_COUNT_IN_LOG
11257
+ })}\n` +
11258
+ Array.from(formattedIssuesForEachFile.entries()).
11259
+ map(([fileRelativePath__forwardPathSeparatorsOnly, formattedIssues]) => `${(0, es_extensions_1.surroundLabelByOrnament)({
11260
+ label: ` ${fileRelativePath__forwardPathSeparatorsOnly} `,
11261
+ ornamentPatten: "─",
11262
+ prependedPartCharactersCount: 3,
11263
+ totalCharactersCount: HTML_Validator.DISPLAYING_MAXIMAL_COLUMNS_COUNT_IN_LOG
11264
+ })}\n` +
11265
+ formattedIssues).
11266
+ join("\n");
11267
+ if (hasAtLeastOneFileWithInvalidHTML) {
11268
+ es_extensions_1.Logger.logErrorLikeMessage({
11269
+ title: "HTML Validation, Issue(s) Detected",
11270
+ description: `${summary}\n\n${detailedReport}`
11271
+ });
11272
+ node_notifier_1.default.notify(HTML_Validator.localization.issuesFoundToastNotification);
11273
+ return;
11525
11274
  }
11275
+ es_extensions_1.Logger.logSuccess({
11276
+ title: "HTML Validation, All Valid",
11277
+ description: "All HTML files (except excluded ones if any) contains valid HTML. " +
11278
+ "The following files has been checked.\n" +
11279
+ Array.from(validationsResults.keys()).
11280
+ map((fileRelativePath__forwardPathSeparatorsOnly) => `● ${fileRelativePath__forwardPathSeparatorsOnly}`).
11281
+ join("\n")
11282
+ });
11526
11283
  }
11284
+ /* ─── Formatting ───────────────────────────────────────────────────────────────────────────────────────────────── */
11527
11285
  static formatValidationResultForSingleFile(issues) {
11528
11286
  const formattedIssues = [];
11529
11287
  for (const [index, issue] of issues.entries()) {
@@ -11542,64 +11300,52 @@ class HTML_Validator {
11542
11300
  formattedIssues.push([
11543
11301
  `${(0, es_extensions_1.surroundLabelByOrnament)({
11544
11302
  label: HTML_Validator.localization.generateIssueNumberLabel({ issueNumber: index + 1 }),
11545
- ornamentPatten: "=",
11303
+ ornamentPatten: "",
11546
11304
  prependedPartCharactersCount: 3,
11547
11305
  totalCharactersCount: HTML_Validator.DISPLAYING_MAXIMAL_COLUMNS_COUNT_IN_LOG
11548
11306
  })}\n`,
11549
- issue.codeFragment.beforeHighlighting,
11550
- es_extensions_1.Logger.highlightText(issue.codeFragment.highlighted),
11551
- `${issue.codeFragment.afterHighlighting}\n`,
11307
+ ...(0, es_extensions_1.isNotUndefined)(issue.codeFragment) ?
11308
+ [
11309
+ issue.codeFragment.beforeHighlighting,
11310
+ es_extensions_1.Logger.highlightText(issue.codeFragment.highlighted),
11311
+ `${issue.codeFragment.afterHighlighting}\n`
11312
+ ] :
11313
+ [],
11552
11314
  `${"-".repeat(HTML_Validator.DISPLAYING_MAXIMAL_COLUMNS_COUNT_IN_LOG)}\n`,
11553
11315
  issue.message,
11554
11316
  ` (${(() => {
11555
11317
  switch (issue.type) {
11556
- case HTML_Validator.CachedValidationsResults.Issue.Types.error:
11318
+ case HTML_Validator.NormalizedValidationsResults.Issue.Types.error:
11557
11319
  return HTML_Validator.localization.issuesTypesTitles.grossViolation;
11558
- case HTML_Validator.CachedValidationsResults.Issue.Types.info:
11320
+ case HTML_Validator.NormalizedValidationsResults.Issue.Types.info:
11559
11321
  return HTML_Validator.localization.issuesTypesTitles.recommendationDisregard;
11560
11322
  default:
11561
11323
  return HTML_Validator.localization.issuesTypesTitles.other;
11562
11324
  }
11563
11325
  })()})\n`,
11564
- HTML_Validator.localization.generateIssueOccurrenceLocationIndication({
11565
- lineNumber: issue.lineNumber__numerationFrom1,
11566
- startingColumnNumber: issue.startingColumnNumber__numerationFrom1,
11567
- lastColumnNumber: issue.endingColumnNumber__numerationFrom1
11568
- })
11326
+ ...((0, es_extensions_1.isNotUndefined)(issue.lineNumber__numerationFrom1) &&
11327
+ (0, es_extensions_1.isNotUndefined)(issue.startingColumnNumber__numerationFrom1) &&
11328
+ (0, es_extensions_1.isNotUndefined)(issue.endingColumnNumber__numerationFrom1)) ?
11329
+ [
11330
+ HTML_Validator.localization.generateIssueOccurrenceLocationIndication({
11331
+ lineNumber: issue.lineNumber__numerationFrom1,
11332
+ startingColumnNumber: issue.startingColumnNumber__numerationFrom1,
11333
+ lastColumnNumber: issue.endingColumnNumber__numerationFrom1
11334
+ })
11335
+ ] :
11336
+ []
11569
11337
  ].join(""));
11570
11338
  }
11571
11339
  return formattedIssues.join("\n\n");
11572
11340
  }
11573
11341
  /* ─── Cache file ───────────────────────────────────────────────────────────────────────────────────────────────── */
11574
- static async retrieveCachedPastValidationsResultsFromFileIfItExists({ cachedValidationsResultsDirectoryAbsolutePath, cachedValidationsResultsFileAbsolutePath }) {
11575
- const isCachedValidationsResultsDirectoryExists = await es_extensions_nodejs_1.ImprovedFileSystem.
11576
- isFileOrDirectoryExists({ targetPath: cachedValidationsResultsDirectoryAbsolutePath, synchronously: false });
11577
- /* [ Theory ] No need to create the directory now because it could be deleted manually any time after has been created. */
11578
- if (!isCachedValidationsResultsDirectoryExists) {
11579
- return null;
11580
- }
11581
- let cachedValidationResults;
11582
- try {
11583
- cachedValidationResults = await es_extensions_nodejs_1.ObjectDataFilesProcessor.processFile({
11584
- filePath: cachedValidationsResultsFileAbsolutePath,
11585
- validDataSpecification: HTML_Validator.cachedValidationsResultsFileContentSpecification,
11586
- synchronously: false
11587
- });
11588
- }
11589
- catch (error) {
11590
- if (!(error instanceof es_extensions_nodejs_1.FileNotFoundError) && true) {
11591
- es_extensions_1.Logger.logError({
11592
- errorType: "CachedDataRetrievingFailure",
11593
- title: "Cached data retrieving failure",
11594
- description: `Unable to read the existing cache file "${cachedValidationsResultsFileAbsolutePath}".`,
11595
- occurrenceLocation: "HTML_Validator.retrieveCachedPastValidationsResultsFromFileIfItExists" +
11596
- "(cachedValidationsResultsFileAbsolutePath)",
11597
- caughtError: error
11598
- });
11599
- }
11600
- return null;
11601
- }
11602
- return new Map(Object.entries(cachedValidationResults));
11342
+ static computeActualCachedValidationsResultsFileParentDirectoryAbsolutePath({ parentDirectoryAbsolutePath, projectBuildingSelectiveExecutionID, consumingProjectBuildingMode }) {
11343
+ return es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
11344
+ parentDirectoryAbsolutePath,
11345
+ "HTML_Validation." +
11346
+ (0, es_extensions_1.insertSubstring)(projectBuildingSelectiveExecutionID, { modifier: (specifiedProjectBuildingSelectiveExecutionID) => `${specifiedProjectBuildingSelectiveExecutionID}.` }) +
11347
+ `${(0, es_extensions_1.toLowerCamelCase)(consumingProjectBuildingMode)}.json`
11348
+ ]);
11603
11349
  }
11604
11350
  writeCacheToFile() {
11605
11351
  es_extensions_nodejs_1.ImprovedFileSystem.createDirectory({
@@ -11607,41 +11353,29 @@ class HTML_Validator {
11607
11353
  mustThrowErrorIfTargetDirectoryExists: false,
11608
11354
  synchronously: true
11609
11355
  });
11610
- const cachedValidationsResultsFileContent = Array.from((0, es_extensions_1.filterMap)(this.cachedValidationsResults, (filePathRelativeToConsumingProjectRootDirectory) => this.relativePathsOfFilesWhichHasBeenValidatedDuringCurrentExecution.
11611
- has(filePathRelativeToConsumingProjectRootDirectory)).entries()).
11356
+ const cachedValidationsResultsFileContent = Array.from(this.cachedValidationsResults.entries()).
11612
11357
  reduce((accumulatingValue, [filePathRelativeToConsumingProjectRootDirectory, cachedValidationRawResultsForSpecificFile]) => {
11613
11358
  accumulatingValue[filePathRelativeToConsumingProjectRootDirectory] = cachedValidationRawResultsForSpecificFile;
11614
11359
  return accumulatingValue;
11615
11360
  }, {});
11616
- fs_1.default.writeFileSync(this.CACHED_VALIDATIONS_RESULTS_FILE_ABSOLUTE_PATH, (0, es_extensions_1.stringifyAndFormatArbitraryValue)(cachedValidationsResultsFileContent));
11617
- }
11618
- /* ─── Routines ─────────────────────────────────────────────────────────────────────────────────────────────────── */
11619
- static onSelfSoleInstanceReady(selfSoleInstance) {
11620
- for (const onSelfSoleInstanceReadyEventsHandler of HTML_Validator.onSelfSoleInstanceReadyEventsHandlers) {
11621
- onSelfSoleInstanceReadyEventsHandler(selfSoleInstance);
11622
- }
11623
- HTML_Validator.onSelfSoleInstanceReadyEventsHandlers.clear();
11361
+ fs_1.default.writeFileSync(this.CACHED_VALIDATIONS_RESULTS_FILE_ABSOLUTE_PATH, JSON.stringify(cachedValidationsResultsFileContent, null, 2));
11624
11362
  }
11625
- static async getInstanceOnceReady() {
11626
- if (!HTML_Validator.hasInitializationStarted) {
11363
+ /* ━━━ Routines ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
11364
+ static getExpectedToBeInitializedSelfSingleInstance() {
11365
+ return HTML_Validator.selfSingleInstance ??
11627
11366
  es_extensions_1.Logger.throwErrorAndLog({
11628
11367
  errorInstance: new es_extensions_1.ClassRequiredInitializationHasNotBeenExecutedError({
11629
- className: "AccessibilityInspector",
11630
- initializingMethodName: "beginInitialization"
11368
+ className: "HTML_Validator",
11369
+ initializingMethodName: "initialize"
11631
11370
  }),
11632
11371
  title: es_extensions_1.ClassRequiredInitializationHasNotBeenExecutedError.localization.defaultTitle,
11633
- occurrenceLocation: "AccessibilityInspector.getInstanceOnceReady()"
11634
- });
11635
- }
11636
- return HTML_Validator.selfSoleInstance ??
11637
- new Promise((resolve) => {
11638
- HTML_Validator.onSelfSoleInstanceReadyEventsHandlers.add(resolve);
11372
+ occurrenceLocation: "HTML_Validator.getExpectedToBeInitializedSelfSingleInstance()"
11639
11373
  });
11640
11374
  }
11641
11375
  }
11642
11376
  (function (HTML_Validator) {
11643
- let CachedValidationsResults;
11644
- (function (CachedValidationsResults) {
11377
+ let NormalizedValidationsResults;
11378
+ (function (NormalizedValidationsResults) {
11645
11379
  let Issue;
11646
11380
  (function (Issue) {
11647
11381
  let Types;
@@ -11659,8 +11393,8 @@ class HTML_Validator {
11659
11393
  Subtypes["schema"] = "schema";
11660
11394
  Subtypes["internal"] = "internal";
11661
11395
  })(Subtypes = Issue.Subtypes || (Issue.Subtypes = {}));
11662
- })(Issue = CachedValidationsResults.Issue || (CachedValidationsResults.Issue = {}));
11663
- })(CachedValidationsResults = HTML_Validator.CachedValidationsResults || (HTML_Validator.CachedValidationsResults = {}));
11396
+ })(Issue = NormalizedValidationsResults.Issue || (NormalizedValidationsResults.Issue = {}));
11397
+ })(NormalizedValidationsResults = HTML_Validator.NormalizedValidationsResults || (HTML_Validator.NormalizedValidationsResults = {}));
11664
11398
  })(HTML_Validator || (HTML_Validator = {}));
11665
11399
  exports["default"] = HTML_Validator;
11666
11400
 
@@ -11671,44 +11405,18 @@ exports["default"] = HTML_Validator;
11671
11405
  /*!******************************************************************************************************************!*\
11672
11406
  !*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_ValidatorLocalization.english.ts ***!
11673
11407
  \******************************************************************************************************************/
11674
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11408
+ /***/ ((__unused_webpack_module, exports) => {
11675
11409
 
11676
11410
 
11677
11411
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11678
- const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
11679
11412
  const HTML_ValidatorLocalization__english = {
11680
- generateFileIsEmptyWarningLog: ({ targetFileRelativePath }) => ({
11681
- title: "HTML code validation terminated because of empty file",
11682
- description: `File "${targetFileRelativePath}" is empty, no HTML to validate. ` +
11683
- "Please note that at production-like modes the empty HTML files are being considered as invalid."
11684
- }),
11685
- generateValidationStartedInfoLog: ({ targetFileRelativePath }) => ({
11413
+ generateValidationStartedInfoLog: ({ targetFileRelativePaths }) => ({
11686
11414
  title: "HTML code validation started",
11687
- description: `Begin the validation of the HTML code in the file "${targetFileRelativePath}" ...`
11688
- }),
11689
- validationFailedErrorLog: {
11690
- title: "HTML validation failed",
11691
- description: "The error occurred during HTML validation. " +
11692
- "It may be caused by the problems with the internet connection. " +
11693
- "Well, we should not stop the project building because of this. " +
11694
- "We believe that you will check the HTML validity afterwards and fix the issues if they will be."
11695
- },
11696
- generateValidationOfSingleFilesHasFinishedWithNoIssuesFoundSuccessLog: ({ targetFileRelativePath, secondsElapsed }) => ({
11697
- title: "HTML validation of single file has finished with no issues found",
11698
- description: `File "${targetFileRelativePath}" is fully obeying to W3C rules and recommendations.\n` +
11699
- (0, es_extensions_1.isUndefined)(secondsElapsed) ?
11700
- "(Cached result, no changes in output HTML code since last building)" :
11701
- `${secondsElapsed} seconds taken.`
11702
- }),
11703
- generateIssuesFoundInSingleFileErrorLog: ({ targetFileRelativePath, formattedErrorsAndWarnings }) => ({
11704
- title: "HTML validation, issue(s) found",
11705
- description: `File "${targetFileRelativePath}" is including the following HTML validity issues:\n\n` +
11706
- `${formattedErrorsAndWarnings}\n\n`
11415
+ description: "Begin the validation of the HTML code for the following files.\n" +
11416
+ targetFileRelativePaths.
11417
+ map((targetFileRelativePath) => `● ${targetFileRelativePath}`).
11418
+ join("\n")
11707
11419
  }),
11708
- validationOfAllFilesHasFinishedWithNoIssuesFoundSuccessLog: {
11709
- title: "HTML validation, no issues found",
11710
- description: "All files are fully obeying to W3C rules and recommendations."
11711
- },
11712
11420
  issuesFoundToastNotification: {
11713
11421
  title: "HTML validation, issue(s) found",
11714
11422
  message: "W3C rules violations and / or recommendations neglect detected. Check the console for the details."
@@ -11719,13 +11427,6 @@ const HTML_ValidatorLocalization__english = {
11719
11427
  grossViolation: "Gross violation",
11720
11428
  recommendationDisregard: "Recommendation disregard",
11721
11429
  other: "Other issue"
11722
- },
11723
- issuesFoundInOneOrMultipleFilesErrorLog: {
11724
- title: "HTML validation, issue(s) found",
11725
- description: "The issue(s) has been found in one or more output HTML files. " +
11726
- "Intended to be used for the high quality development, YDA can not accept the invalid HTML code on " +
11727
- "production and production-like modes. " +
11728
- "Its strongly recommended to fix these issue(s) instead of disabling of HTML validation."
11729
11430
  }
11730
11431
  };
11731
11432
  exports["default"] = HTML_ValidatorLocalization__english;
@@ -12676,6 +12377,8 @@ const SourceCodeProcessingRawSettingsNormalizer_1 = __importDefault(__webpack_re
12676
12377
  const RoutingSettingsNormalizer_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/RawSettingsNormalizer/RoutingSettingsNormalizer */ "./ProjectBuilding/SourceCodeProcessing/Markup/RawSettingsNormalizer/RoutingSettingsNormalizer.ts"));
12677
12378
  /* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
12678
12379
  const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
12380
+ const removeMultipleElementsFromSetByPredicate_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/Set/removeMultipleElementsFromSetByPredicate */ "./UtilsIncubator/Set/removeMultipleElementsFromSetByPredicate.ts"));
12381
+ const isSubdirectory_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/NodeJS/isSubdirectory */ "./UtilsIncubator/NodeJS/isSubdirectory.ts"));
12679
12382
  const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
12680
12383
  /* ─── Localization ───────────────────────────────────────────────────────────────────────────────────────────────── */
12681
12384
  const MarkupProcessingRawSettingsNormalizerLocalization_english_1 = __importDefault(__webpack_require__(/*! ./MarkupProcessingRawSettingsNormalizerLocalization.english */ "./ProjectBuilding/SourceCodeProcessing/Markup/RawSettingsNormalizer/MarkupProcessingRawSettingsNormalizerLocalization.english.ts"));
@@ -12683,6 +12386,7 @@ class MarkupProcessingRawSettingsNormalizer extends SourceCodeProcessingRawSetti
12683
12386
  static localization = MarkupProcessingRawSettingsNormalizerLocalization_english_1.default;
12684
12387
  supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots = MarkupProcessingRestrictions_1.default.supportedSourceFilesNamesExtensionsWithoutLeadingDots;
12685
12388
  markupProcessingSettings__fromFile__rawValid;
12389
+ unusedCommonlyExcludedFromLocalizationEntryPointsSourceFilesAbsolutePaths;
12686
12390
  commonStringResources;
12687
12391
  static normalize({ markupProcessingSettings__fromFile__rawValid, commonSettings__normalized }) {
12688
12392
  const dataHoldingSelfInstance = new MarkupProcessingRawSettingsNormalizer({
@@ -12734,6 +12438,14 @@ class MarkupProcessingRawSettingsNormalizer extends SourceCodeProcessingRawSetti
12734
12438
  constructor(constructorParameter) {
12735
12439
  super(constructorParameter);
12736
12440
  this.markupProcessingSettings__fromFile__rawValid = constructorParameter.markupProcessingSettings__fromFile__rawValid;
12441
+ this.unusedCommonlyExcludedFromLocalizationEntryPointsSourceFilesAbsolutePaths = new Set((this.markupProcessingSettings__fromFile__rawValid.
12442
+ common?.
12443
+ localization?.
12444
+ excludedFilesPathsRelativeRelativeToProjectRootDirectory ??
12445
+ []).map((excludedFilePathRelativeRelativeToProjectRootDirectory) => es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
12446
+ constructorParameter.projectBuildingCommonSettings__normalized.projectRootDirectoryAbsolutePath,
12447
+ excludedFilePathRelativeRelativeToProjectRootDirectory
12448
+ ], { alwaysForwardSlashSeparators: true })));
12737
12449
  }
12738
12450
  computeMustResolveResourcesReferencesToAbsolutePathPropertyValue() {
12739
12451
  const explicitlySpecifiedMustResolveResourceReferencesToRelativePathsPropertyValue = this.markupProcessingSettings__fromFile__rawValid.common?.
@@ -12793,103 +12505,120 @@ class MarkupProcessingRawSettingsNormalizer extends SourceCodeProcessingRawSetti
12793
12505
  };
12794
12506
  }
12795
12507
  normalizeStaticPreviewPagesVariationsSettings() {
12796
- const staticPreviewPageVariationsSettings = this.markupProcessingSettings__fromFile__rawValid.staticPreview?.pagesVariations;
12508
+ const stateDependentPagesVariationsSettings = this.markupProcessingSettings__fromFile__rawValid.staticPreview?.stateDependentPagesVariations;
12797
12509
  const stateDependentPagesVariationsMetadata = new Map();
12798
- if ((0, es_extensions_1.isUndefined)(staticPreviewPageVariationsSettings) ||
12510
+ if ((0, es_extensions_1.isUndefined)(stateDependentPagesVariationsSettings) ||
12799
12511
  this.consumingProjectBuildingMode !== ConsumingProjectBuildingModes_1.default.staticPreview) {
12800
12512
  return { stateDependent: stateDependentPagesVariationsMetadata };
12801
12513
  }
12802
- if ((0, es_extensions_1.isNotUndefined)(staticPreviewPageVariationsSettings.stateDependent)) {
12803
- const variationsByStatesSpecificationFileAbsolutePath = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
12804
- this.consumingProjectRootDirectoryAbsolutePath,
12805
- staticPreviewPageVariationsSettings.stateDependent.specificationFileRelativePath
12806
- ], { alwaysForwardSlashSeparators: true });
12807
- /* [ Approach ] Currently, the `RawObjectDataProcessor` thus `ObjectDataFilesProcessor` are ignoring and not keep
12808
- * the data which validation rules has not been specified. In this case, the state dependent object is
12809
- * such data. */
12810
- let rawPagesStateDependentVariationsSpecification;
12811
- try {
12812
- rawPagesStateDependentVariationsSpecification = es_extensions_nodejs_1.ObjectDataFilesProcessor.processFile({
12813
- filePath: variationsByStatesSpecificationFileAbsolutePath,
12814
- schema: es_extensions_nodejs_1.ObjectDataFilesProcessor.SupportedSchemas.YAML,
12815
- synchronously: true
12816
- });
12817
- }
12818
- catch (error) {
12514
+ const variationsByStatesSpecificationFileAbsolutePath = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
12515
+ this.consumingProjectRootDirectoryAbsolutePath,
12516
+ stateDependentPagesVariationsSettings.specificationFileRelativePath
12517
+ ], { alwaysForwardSlashSeparators: true });
12518
+ /* [ Approach ] Currently, the `RawObjectDataProcessor` thus `ObjectDataFilesProcessor` are ignoring and not keep
12519
+ * the data which validation rules has not been specified. In this case, the state dependent object is
12520
+ * such data. */
12521
+ let rawPagesStateDependentVariationsSpecification;
12522
+ try {
12523
+ rawPagesStateDependentVariationsSpecification = es_extensions_nodejs_1.ObjectDataFilesProcessor.processFile({
12524
+ filePath: variationsByStatesSpecificationFileAbsolutePath,
12525
+ schema: es_extensions_nodejs_1.ObjectDataFilesProcessor.SupportedSchemas.YAML,
12526
+ synchronously: true
12527
+ });
12528
+ }
12529
+ catch (error) {
12530
+ es_extensions_1.Logger.throwErrorAndLog({
12531
+ errorInstance: new es_extensions_1.FileReadingFailedError({
12532
+ customMessage: MarkupProcessingRawSettingsNormalizer.localization.
12533
+ generateStaticPreviewStateDependentPagesVariationsSpecificationFileReadingFailedMessage({
12534
+ staticPreviewStateDependentPagesVariationsSpecificationFileAbsolutePath: variationsByStatesSpecificationFileAbsolutePath
12535
+ })
12536
+ }),
12537
+ title: es_extensions_1.FileReadingFailedError.localization.defaultTitle,
12538
+ occurrenceLocation: "MarkupProcessingRawSettingsNormalizer." +
12539
+ "normalizeStaticPreviewPagesVariationsSettings()",
12540
+ innerError: error
12541
+ });
12542
+ }
12543
+ if (!(0, es_extensions_1.isArbitraryObject)(rawPagesStateDependentVariationsSpecification)) {
12544
+ es_extensions_1.Logger.logError({
12545
+ errorType: es_extensions_1.InvalidExternalDataError.NAME,
12546
+ title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
12547
+ description: es_extensions_1.PoliteErrorsMessagesBuilder.buildMessage(MarkupProcessingRawSettingsNormalizer.localization.
12548
+ generateStaticPreviewStateDependentPagesVariationsSpecificationIsNotTheObjectErrorLog({
12549
+ staticPreviewStateDependentPagesVariationsSpecificationFileRelativePath: variationsByStatesSpecificationFileAbsolutePath,
12550
+ stringifiedRawData: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(rawPagesStateDependentVariationsSpecification),
12551
+ rawDataActualType: typeof rawPagesStateDependentVariationsSpecification
12552
+ })),
12553
+ occurrenceLocation: "MarkupProcessingRawSettingsNormalizer." +
12554
+ "normalizeStaticPreviewPagesVariationsSettings()"
12555
+ });
12556
+ return {
12557
+ stateDependent: stateDependentPagesVariationsMetadata
12558
+ };
12559
+ }
12560
+ for (const [markupEntryPointSourceFileRelativePath__possiblyWithoutExtension, stateDependentPageVariationsData] of Object.entries(rawPagesStateDependentVariationsSpecification)) {
12561
+ const markupEntryPointSourceFileRelativePath = (0, es_extensions_1.appendLastFileNameExtension)({
12562
+ targetPath: markupEntryPointSourceFileRelativePath__possiblyWithoutExtension,
12563
+ targetFileNameExtensionWithOrWithoutLeadingDot: "pug",
12564
+ mustAppendDuplicateEvenIfTargetLastFileNameExtensionAlreadyPresentsAtSpecifiedPath: false
12565
+ });
12566
+ if (!(0, es_extensions_1.isArbitraryObject)(stateDependentPageVariationsData)) {
12819
12567
  es_extensions_1.Logger.throwErrorAndLog({
12820
- errorInstance: new es_extensions_1.FileReadingFailedError({
12568
+ errorInstance: new es_extensions_1.InvalidExternalDataError({
12821
12569
  customMessage: MarkupProcessingRawSettingsNormalizer.localization.
12822
- generateStaticPreviewStateDependentPagesVariationsSpecificationFileReadingFailedMessage({
12823
- staticPreviewStateDependentPagesVariationsSpecificationFileAbsolutePath: variationsByStatesSpecificationFileAbsolutePath
12570
+ generateInvalidValueOfStaticPreviewStateDependentPagesVariationsSpecificationAssociativeArrayMessage({
12571
+ staticPreviewStateDependentPagesVariationsSpecificationFileRelativePath: stateDependentPagesVariationsSettings.specificationFileRelativePath,
12572
+ invalidEntryKey: markupEntryPointSourceFileRelativePath,
12573
+ invalidEntryValueType: typeof stateDependentPageVariationsData,
12574
+ invalidEntryStringifiedValue: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(stateDependentPageVariationsData)
12824
12575
  })
12825
12576
  }),
12826
- title: es_extensions_1.FileReadingFailedError.localization.defaultTitle,
12577
+ title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
12827
12578
  occurrenceLocation: "MarkupProcessingRawSettingsNormalizer." +
12828
- "normalizeStaticPreviewPagesVariationsSettings()",
12829
- innerError: error
12579
+ "normalizeStaticPreviewPagesVariationsSettings()"
12830
12580
  });
12831
12581
  }
12832
- if (!(0, es_extensions_1.isArbitraryObject)(rawPagesStateDependentVariationsSpecification)) {
12833
- es_extensions_1.Logger.logError({
12834
- errorType: es_extensions_1.InvalidExternalDataError.NAME,
12582
+ if (!(0, es_extensions_1.isNonEmptyString)(stateDependentPageVariationsData.$stateObjectTypeVariableName)) {
12583
+ es_extensions_1.Logger.throwErrorAndLog({
12584
+ errorInstance: new es_extensions_1.InvalidExternalDataError({
12585
+ customMessage: MarkupProcessingRawSettingsNormalizer.localization.generateInvalidPageStateVariableNameMessage({
12586
+ targetMarkupFileRelativePath: markupEntryPointSourceFileRelativePath,
12587
+ stringifiedValueOfSpecifiedVariableNameProperty: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(stateDependentPageVariationsData.$stateObjectTypeVariableName),
12588
+ specifiedTypeOfVariableNameProperty: typeof stateDependentPageVariationsData.$stateObjectTypeVariableName
12589
+ })
12590
+ }),
12835
12591
  title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
12836
- description: es_extensions_1.PoliteErrorsMessagesBuilder.buildMessage(MarkupProcessingRawSettingsNormalizer.localization.
12837
- generateStaticPreviewStateDependentPagesVariationsSpecificationIsNotTheObjectErrorLog({
12838
- staticPreviewStateDependentPagesVariationsSpecificationFileRelativePath: variationsByStatesSpecificationFileAbsolutePath,
12839
- stringifiedRawData: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(rawPagesStateDependentVariationsSpecification),
12840
- rawDataActualType: typeof rawPagesStateDependentVariationsSpecification
12841
- })),
12842
12592
  occurrenceLocation: "MarkupProcessingRawSettingsNormalizer." +
12843
12593
  "normalizeStaticPreviewPagesVariationsSettings()"
12844
12594
  });
12845
- return {
12846
- stateDependent: stateDependentPagesVariationsMetadata
12847
- };
12848
12595
  }
12849
- for (const [markupEntryPointSourceFileRelativePath__possiblyWithoutExtension, stateDependentPageVariationsData] of Object.entries(rawPagesStateDependentVariationsSpecification)) {
12850
- const markupEntryPointSourceFileRelativePath = (0, es_extensions_1.appendLastFileNameExtension)({
12851
- targetPath: markupEntryPointSourceFileRelativePath__possiblyWithoutExtension,
12852
- targetFileNameExtensionWithOrWithoutLeadingDot: "pug",
12853
- mustAppendDuplicateEvenIfTargetLastFileNameExtensionAlreadyPresentsAtSpecifiedPath: false
12596
+ if (!(0, es_extensions_1.isArbitraryObject)(stateDependentPageVariationsData.$stateDependentVariations)) {
12597
+ es_extensions_1.Logger.throwErrorAndLog({
12598
+ errorInstance: new es_extensions_1.InvalidExternalDataError({
12599
+ customMessage: MarkupProcessingRawSettingsNormalizer.localization.
12600
+ generateInvalidPageStateDependentVariationsSpecificationMessage({
12601
+ targetMarkupFileRelativePath: markupEntryPointSourceFileRelativePath,
12602
+ actualType: typeof stateDependentPageVariationsData.$stateDependentVariations,
12603
+ actualStringifiedValue: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(stateDependentPageVariationsData.$stateDependentVariations)
12604
+ })
12605
+ }),
12606
+ title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
12607
+ occurrenceLocation: "MarkupProcessingRawSettingsNormalizer." +
12608
+ "normalizeStaticPreviewPagesVariationsSettings()"
12854
12609
  });
12855
- if (!(0, es_extensions_1.isArbitraryObject)(stateDependentPageVariationsData)) {
12856
- es_extensions_1.Logger.throwErrorAndLog({
12857
- errorInstance: new es_extensions_1.InvalidExternalDataError({
12858
- customMessage: MarkupProcessingRawSettingsNormalizer.localization.
12859
- generateInvalidValueOfStaticPreviewStateDependentPagesVariationsSpecificationAssociativeArrayMessage({
12860
- staticPreviewStateDependentPagesVariationsSpecificationFileRelativePath: staticPreviewPageVariationsSettings.stateDependent.specificationFileRelativePath,
12861
- invalidEntryKey: markupEntryPointSourceFileRelativePath,
12862
- invalidEntryValueType: typeof stateDependentPageVariationsData,
12863
- invalidEntryStringifiedValue: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(stateDependentPageVariationsData)
12864
- })
12865
- }),
12866
- title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
12867
- occurrenceLocation: "MarkupProcessingRawSettingsNormalizer." +
12868
- "normalizeStaticPreviewPagesVariationsSettings()"
12869
- });
12870
- }
12871
- if (!(0, es_extensions_1.isNonEmptyString)(stateDependentPageVariationsData.$stateObjectTypeVariableName)) {
12872
- es_extensions_1.Logger.throwErrorAndLog({
12873
- errorInstance: new es_extensions_1.InvalidExternalDataError({
12874
- customMessage: MarkupProcessingRawSettingsNormalizer.localization.generateInvalidPageStateVariableNameMessage({
12875
- targetMarkupFileRelativePath: markupEntryPointSourceFileRelativePath,
12876
- stringifiedValueOfSpecifiedVariableNameProperty: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(stateDependentPageVariationsData.$stateObjectTypeVariableName),
12877
- specifiedTypeOfVariableNameProperty: typeof stateDependentPageVariationsData.$stateObjectTypeVariableName
12878
- })
12879
- }),
12880
- title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
12881
- occurrenceLocation: "MarkupProcessingRawSettingsNormalizer." +
12882
- "normalizeStaticPreviewPagesVariationsSettings()"
12883
- });
12884
- }
12885
- if (!(0, es_extensions_1.isArbitraryObject)(stateDependentPageVariationsData.$stateDependentVariations)) {
12610
+ }
12611
+ const markupSourceFileFileAbsolutePath = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([this.consumingProjectRootDirectoryAbsolutePath, markupEntryPointSourceFileRelativePath], { alwaysForwardSlashSeparators: true });
12612
+ const derivedPagesAndStatesMap = new Map();
12613
+ for (const [fineNamePostfix, stateData] of Object.entries(stateDependentPageVariationsData.$stateDependentVariations)) {
12614
+ const derivedFileAbsolutePath = `${(0, es_extensions_1.removeAllFileNameExtensions)(markupSourceFileFileAbsolutePath)}${fineNamePostfix}.pug`;
12615
+ if (!(0, es_extensions_1.isArbitraryObject)(stateData)) {
12886
12616
  es_extensions_1.Logger.throwErrorAndLog({
12887
12617
  errorInstance: new es_extensions_1.InvalidExternalDataError({
12888
- customMessage: MarkupProcessingRawSettingsNormalizer.localization.
12889
- generateInvalidPageStateDependentVariationsSpecificationMessage({
12618
+ customMessage: MarkupProcessingRawSettingsNormalizer.localization.generateInvalidPageStateVariableMessage({
12890
12619
  targetMarkupFileRelativePath: markupEntryPointSourceFileRelativePath,
12891
- actualType: typeof stateDependentPageVariationsData.$stateDependentVariations,
12892
- actualStringifiedValue: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(stateDependentPageVariationsData.$stateDependentVariations)
12620
+ actualStringifiedValue: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(stateData),
12621
+ actualType: typeof stateData
12893
12622
  })
12894
12623
  }),
12895
12624
  title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
@@ -12897,57 +12626,15 @@ class MarkupProcessingRawSettingsNormalizer extends SourceCodeProcessingRawSetti
12897
12626
  "normalizeStaticPreviewPagesVariationsSettings()"
12898
12627
  });
12899
12628
  }
12900
- const markupSourceFileFileAbsolutePath = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([this.consumingProjectRootDirectoryAbsolutePath, markupEntryPointSourceFileRelativePath], { alwaysForwardSlashSeparators: true });
12901
- const derivedPagesAndStatesMap = new Map();
12902
- for (const [fineNamePostfix, stateData] of Object.entries(stateDependentPageVariationsData.$stateDependentVariations)) {
12903
- const derivedFileAbsolutePath = `${(0, es_extensions_1.removeAllFileNameExtensions)(markupSourceFileFileAbsolutePath)}${fineNamePostfix}.pug`;
12904
- if (!(0, es_extensions_1.isArbitraryObject)(stateData)) {
12905
- es_extensions_1.Logger.throwErrorAndLog({
12906
- errorInstance: new es_extensions_1.InvalidExternalDataError({
12907
- customMessage: MarkupProcessingRawSettingsNormalizer.localization.generateInvalidPageStateVariableMessage({
12908
- targetMarkupFileRelativePath: markupEntryPointSourceFileRelativePath,
12909
- actualStringifiedValue: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(stateData),
12910
- actualType: typeof stateData
12911
- })
12912
- }),
12913
- title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
12914
- occurrenceLocation: "MarkupProcessingRawSettingsNormalizer." +
12915
- "normalizeStaticPreviewPagesVariationsSettings()"
12916
- });
12917
- }
12918
- derivedPagesAndStatesMap.set(derivedFileAbsolutePath, stateData);
12919
- }
12920
- stateDependentPagesVariationsMetadata.set(es_extensions_nodejs_1.ImprovedPath.joinPathSegments([this.consumingProjectRootDirectoryAbsolutePath, markupEntryPointSourceFileRelativePath], { alwaysForwardSlashSeparators: true }), {
12921
- stateVariableName: stateDependentPageVariationsData.$stateObjectTypeVariableName,
12922
- derivedPagesAndStatesMap
12923
- });
12629
+ derivedPagesAndStatesMap.set(derivedFileAbsolutePath, stateData);
12924
12630
  }
12631
+ stateDependentPagesVariationsMetadata.set(es_extensions_nodejs_1.ImprovedPath.joinPathSegments([this.consumingProjectRootDirectoryAbsolutePath, markupEntryPointSourceFileRelativePath], { alwaysForwardSlashSeparators: true }), {
12632
+ stateVariableName: stateDependentPageVariationsData.$stateObjectTypeVariableName,
12633
+ derivedPagesAndStatesMap
12634
+ });
12925
12635
  }
12926
- if ((0, es_extensions_1.isUndefined)(staticPreviewPageVariationsSettings.localeDependent)) {
12927
- return { stateDependent: stateDependentPagesVariationsMetadata };
12928
- }
12929
- const stringResources = this.getStringResourcesFromFileIfExist(staticPreviewPageVariationsSettings.localeDependent.stringResourcesFileRelativePath);
12930
- const localeDependentPagesVariationsMetadata = {
12931
- localizedStringResourcesConstantName: staticPreviewPageVariationsSettings.localeDependent.
12932
- localizedStringResourcesConstantName,
12933
- localeVariableName: staticPreviewPageVariationsSettings.localeDependent.localeVariableName,
12934
- locales: new Map(Object.entries(staticPreviewPageVariationsSettings.localeDependent.locales).
12935
- map(([localeKey, localeData]) => [
12936
- localeKey,
12937
- {
12938
- ...(0, es_extensions_1.isNotNull)(stringResources) && (0, es_extensions_1.isNotUndefined)(localeData.keyInLocalizedStringResourcesObject) ?
12939
- { stringResources: stringResources[localeData.keyInLocalizedStringResourcesObject] } : null,
12940
- ...(0, es_extensions_1.isNotUndefined)(localeData.localeVariableValue) ?
12941
- { localeVariableValue: localeData.localeVariableValue } : null,
12942
- outputFileInterimNameExtensionWithoutDot: localeData.outputFileInterimNameExtensionWithoutDot
12943
- }
12944
- ])),
12945
- excludedFilesAbsolutePaths: staticPreviewPageVariationsSettings.localeDependent.excludedFilesRelativePaths?.
12946
- map((excludedFileRelativePath) => es_extensions_nodejs_1.ImprovedPath.joinPathSegments([this.consumingProjectRootDirectoryAbsolutePath, excludedFileRelativePath], { alwaysForwardSlashSeparators: true })) ?? []
12947
- };
12948
12636
  return {
12949
- stateDependent: stateDependentPagesVariationsMetadata,
12950
- localeDependent: localeDependentPagesVariationsMetadata
12637
+ stateDependent: stateDependentPagesVariationsMetadata
12951
12638
  };
12952
12639
  }
12953
12640
  normalizeImportsFromStaticDataFiles() {
@@ -12983,7 +12670,7 @@ class MarkupProcessingRawSettingsNormalizer extends SourceCodeProcessingRawSetti
12983
12670
  return {
12984
12671
  ...entryPointsGroupGenericSettings__normalized,
12985
12672
  outputFormat,
12986
- localization: this.normalizeEntryPointsGroupLocalizationsSettings(entryPointsGroupGenericSettings__normalized.outputFilesTopDirectoryAbsolutePath, entryPointsGroupSettings__rawValid.localization),
12673
+ localization: this.normalizeEntryPointsGroupLocalizationsSettings(entryPointsGroupGenericSettings__normalized.sourceFilesTopDirectoryAbsolutePath, entryPointsGroupSettings__rawValid.localization),
12987
12674
  HTML_Validation: {
12988
12675
  mustExecute: entryPointsGroupSettings__rawValid.HTML_Validation?.disable === true ? false :
12989
12676
  MarkupProcessingSettings__Default_1.default.HTML_Validation.mustExecute,
@@ -13050,7 +12737,7 @@ class MarkupProcessingRawSettingsNormalizer extends SourceCodeProcessingRawSetti
13050
12737
  }
13051
12738
  };
13052
12739
  }
13053
- normalizeEntryPointsGroupLocalizationsSettings(outputFilesTopDirectoryAbsolutePath, entryPointGroupLocalizationSettings__rawValid) {
12740
+ normalizeEntryPointsGroupLocalizationsSettings(sourceFilesTopDirectoryAbsolutePath, entryPointGroupLocalizationSettings__rawValid) {
13054
12741
  const localizedStringResourcesConstantName = entryPointGroupLocalizationSettings__rawValid?.localizedStringResourcesConstantName ??
13055
12742
  this.markupProcessingSettings__fromFile__rawValid.common?.localization?.localizedStringResourcesConstantName;
13056
12743
  const localeConstantName = entryPointGroupLocalizationSettings__rawValid?.localeConstantName ??
@@ -13096,48 +12783,19 @@ class MarkupProcessingRawSettingsNormalizer extends SourceCodeProcessingRawSetti
13096
12783
  ...(0, es_extensions_1.isNotUndefined)(nameOfConstantForInterpolationToLangHTML_Attribute) ?
13097
12784
  { nameOfConstantForInterpolationToLangHTML_Attribute } : null,
13098
12785
  locales,
13099
- excludedFilesAbsolutePaths: entryPointGroupLocalizationSettings__rawValid?.
13100
- excludedFilesPathsRelativeRelativeToSourcesFileTopDirectory?.
13101
- map((excludedFilePathRelativeRelativeToSourcesFileTopDirectory) => es_extensions_nodejs_1.ImprovedPath.joinPathSegments([outputFilesTopDirectoryAbsolutePath, excludedFilePathRelativeRelativeToSourcesFileTopDirectory], { alwaysForwardSlashSeparators: true })) ??
13102
- []
12786
+ excludedFilesAbsolutePaths: (entryPointGroupLocalizationSettings__rawValid?.
12787
+ excludedFilesPathsRelativeToSourcesFilesTopDirectory?.
12788
+ map((excludedFilePathRelativeRelativeToSourcesFileTopDirectory) => es_extensions_nodejs_1.ImprovedPath.joinPathSegments([sourceFilesTopDirectoryAbsolutePath, excludedFilePathRelativeRelativeToSourcesFileTopDirectory], { alwaysForwardSlashSeparators: true })) ??
12789
+ []).
12790
+ concat(Array.from((0, removeMultipleElementsFromSetByPredicate_1.default)({
12791
+ targetSet: this.unusedCommonlyExcludedFromLocalizationEntryPointsSourceFilesAbsolutePaths,
12792
+ predicate: (commonlyExcludedFromLocalizationEntryPointsSourceFileAbsolutePath) => (0, isSubdirectory_1.default)({
12793
+ whichPath: commonlyExcludedFromLocalizationEntryPointsSourceFileAbsolutePath,
12794
+ ofWhichPath: sourceFilesTopDirectoryAbsolutePath
12795
+ })
12796
+ }).removedElements))
13103
12797
  };
13104
12798
  }
13105
- /** @deprecated Will be deleted soon */
13106
- getStringResourcesFromFileIfExist(stringResourcesFileRelativePath) {
13107
- if ((0, es_extensions_1.isUndefined)(stringResourcesFileRelativePath)) {
13108
- return null;
13109
- }
13110
- const stringResourcesFileAbsolutePath = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([this.consumingProjectRootDirectoryAbsolutePath, stringResourcesFileRelativePath], { alwaysForwardSlashSeparators: true });
13111
- let stringResources;
13112
- try {
13113
- stringResources = es_extensions_nodejs_1.ObjectDataFilesProcessor.processFile({
13114
- filePath: stringResourcesFileAbsolutePath,
13115
- synchronously: true
13116
- });
13117
- }
13118
- catch (error) {
13119
- es_extensions_1.Logger.throwErrorAndLog({
13120
- errorInstance: new es_extensions_1.FileReadingFailedError({
13121
- customMessage: `Unable to read the file with string resources at "${stringResourcesFileAbsolutePath}".`
13122
- }),
13123
- title: es_extensions_1.FileReadingFailedError.localization.defaultTitle,
13124
- occurrenceLocation: "markupProcessingRawSettingsNormalizer." +
13125
- "getStringResourcesFromFileIfExist(stringResourcesFileRelativePath)",
13126
- innerError: error
13127
- });
13128
- }
13129
- if (!(0, es_extensions_1.isArbitraryObject)(stringResources)) {
13130
- es_extensions_1.Logger.throwErrorAndLog({
13131
- errorInstance: new es_extensions_1.InvalidExternalDataError({
13132
- customMessage: `The content of string resources files "${stringResourcesFileAbsolutePath}" is not an object.`
13133
- }),
13134
- title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
13135
- occurrenceLocation: "markupProcessingRawSettingsNormalizer." +
13136
- "getStringResourcesFromFileIfExist(stringResourcesFileRelativePath)",
13137
- });
13138
- }
13139
- return stringResources;
13140
- }
13141
12799
  getStringResourcesFromFile(stringResourcesFileRelativePath) {
13142
12800
  const stringResourcesFileAbsolutePath = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([this.consumingProjectRootDirectoryAbsolutePath, stringResourcesFileRelativePath], { alwaysForwardSlashSeparators: true });
13143
12801
  let stringResources;
@@ -13165,7 +12823,7 @@ class MarkupProcessingRawSettingsNormalizer extends SourceCodeProcessingRawSetti
13165
12823
  }),
13166
12824
  title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
13167
12825
  occurrenceLocation: "markupProcessingRawSettingsNormalizer." +
13168
- "getStringResourcesFromFileIfExist(stringResourcesFileRelativePath)",
12826
+ "getStringResourcesFromFileIfExist(stringResourcesFileRelativePath)"
13169
12827
  });
13170
12828
  }
13171
12829
  return stringResources;
@@ -16326,6 +15984,53 @@ function extractStringifiedContentFromVinylFile(targetFile) {
16326
15984
  }
16327
15985
 
16328
15986
 
15987
+ /***/ }),
15988
+
15989
+ /***/ "./UtilsIncubator/NodeJS/isSubdirectory.ts":
15990
+ /*!*************************************************!*\
15991
+ !*** ./UtilsIncubator/NodeJS/isSubdirectory.ts ***!
15992
+ \*************************************************/
15993
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
15994
+
15995
+
15996
+ var __importDefault = (this && this.__importDefault) || function (mod) {
15997
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15998
+ };
15999
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
16000
+ exports["default"] = isSubdirectory;
16001
+ const path_1 = __importDefault(__webpack_require__(/*! path */ "path"));
16002
+ function isSubdirectory({ whichPath, ofWhichPath }) {
16003
+ const relativePath = path_1.default.relative(ofWhichPath, whichPath);
16004
+ return relativePath.length > 0 && !relativePath.startsWith("..") && !path_1.default.isAbsolute(relativePath);
16005
+ }
16006
+
16007
+
16008
+ /***/ }),
16009
+
16010
+ /***/ "./UtilsIncubator/Set/removeMultipleElementsFromSetByPredicate.ts":
16011
+ /*!************************************************************************!*\
16012
+ !*** ./UtilsIncubator/Set/removeMultipleElementsFromSetByPredicate.ts ***!
16013
+ \************************************************************************/
16014
+ /***/ ((__unused_webpack_module, exports) => {
16015
+
16016
+
16017
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
16018
+ exports["default"] = removeMultipleElementsFromSetByPredicate;
16019
+ function removeMultipleElementsFromSetByPredicate({ targetSet, predicate }) {
16020
+ const removedElements = [];
16021
+ for (const element of targetSet) {
16022
+ if (predicate(element)) {
16023
+ targetSet.delete(element);
16024
+ removedElements.push(element);
16025
+ }
16026
+ }
16027
+ return {
16028
+ updatedSet: targetSet,
16029
+ removedElements
16030
+ };
16031
+ }
16032
+
16033
+
16329
16034
  /***/ }),
16330
16035
 
16331
16036
  /***/ "./UtilsIncubator/Stopwatch.ts":
@@ -16456,16 +16161,6 @@ module.exports = require("browser-sync");
16456
16161
 
16457
16162
  /***/ }),
16458
16163
 
16459
- /***/ "chalk":
16460
- /*!************************!*\
16461
- !*** external "chalk" ***!
16462
- \************************/
16463
- /***/ ((module) => {
16464
-
16465
- module.exports = require("chalk");
16466
-
16467
- /***/ }),
16468
-
16469
16164
  /***/ "cssnano":
16470
16165
  /*!**************************!*\
16471
16166
  !*** external "cssnano" ***!
@@ -16496,16 +16191,6 @@ module.exports = require("eslint");
16496
16191
 
16497
16192
  /***/ }),
16498
16193
 
16499
- /***/ "fancy-log":
16500
- /*!****************************!*\
16501
- !*** external "fancy-log" ***!
16502
- \****************************/
16503
- /***/ ((module) => {
16504
-
16505
- module.exports = require("fancy-log");
16506
-
16507
- /***/ }),
16508
-
16509
16194
  /***/ "fork-ts-checker-webpack-plugin":
16510
16195
  /*!*************************************************!*\
16511
16196
  !*** external "fork-ts-checker-webpack-plugin" ***!
@@ -16646,6 +16331,16 @@ module.exports = require("js-beautify");
16646
16331
 
16647
16332
  /***/ }),
16648
16333
 
16334
+ /***/ "nanoid":
16335
+ /*!*************************!*\
16336
+ !*** external "nanoid" ***!
16337
+ \*************************/
16338
+ /***/ ((module) => {
16339
+
16340
+ module.exports = require("nanoid");
16341
+
16342
+ /***/ }),
16343
+
16649
16344
  /***/ "node-html-parser":
16650
16345
  /*!***********************************!*\
16651
16346
  !*** external "node-html-parser" ***!
@@ -16666,6 +16361,16 @@ module.exports = require("node-notifier");
16666
16361
 
16667
16362
  /***/ }),
16668
16363
 
16364
+ /***/ "node:child_process":
16365
+ /*!*************************************!*\
16366
+ !*** external "node:child_process" ***!
16367
+ \*************************************/
16368
+ /***/ ((module) => {
16369
+
16370
+ module.exports = require("node:child_process");
16371
+
16372
+ /***/ }),
16373
+
16669
16374
  /***/ "node:crypto":
16670
16375
  /*!******************************!*\
16671
16376
  !*** external "node:crypto" ***!
@@ -16756,16 +16461,6 @@ module.exports = require("puppeteer");
16756
16461
 
16757
16462
  /***/ }),
16758
16463
 
16759
- /***/ "slash":
16760
- /*!************************!*\
16761
- !*** external "slash" ***!
16762
- \************************/
16763
- /***/ ((module) => {
16764
-
16765
- module.exports = require("slash");
16766
-
16767
- /***/ }),
16768
-
16769
16464
  /***/ "stream":
16770
16465
  /*!*************************!*\
16771
16466
  !*** external "stream" ***!
@@ -16786,16 +16481,6 @@ module.exports = require("stream-combiner2");
16786
16481
 
16787
16482
  /***/ }),
16788
16483
 
16789
- /***/ "superagent":
16790
- /*!*****************************!*\
16791
- !*** external "superagent" ***!
16792
- \*****************************/
16793
- /***/ ((module) => {
16794
-
16795
- module.exports = require("superagent");
16796
-
16797
- /***/ }),
16798
-
16799
16484
  /***/ "typescript":
16800
16485
  /*!*****************************!*\
16801
16486
  !*** external "typescript" ***!
@@ -16816,6 +16501,16 @@ module.exports = require("vinyl");
16816
16501
 
16817
16502
  /***/ }),
16818
16503
 
16504
+ /***/ "vnu-jar":
16505
+ /*!**************************!*\
16506
+ !*** external "vnu-jar" ***!
16507
+ \**************************/
16508
+ /***/ ((module) => {
16509
+
16510
+ module.exports = require("vnu-jar");
16511
+
16512
+ /***/ }),
16513
+
16819
16514
  /***/ "vue-loader":
16820
16515
  /*!*****************************!*\
16821
16516
  !*** external "vue-loader" ***!