@yamato-daiwa/automation 0.7.0-alpha.6 → 0.7.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EntryPoint.js +30 -31
- package/package.json +3 -3
package/EntryPoint.js
CHANGED
|
@@ -34,7 +34,7 @@ function revisionHash(data) {
|
|
|
34
34
|
\***********************/
|
|
35
35
|
/***/ ((module) => {
|
|
36
36
|
|
|
37
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@yamato-daiwa/automation","version":"0.7.0-alpha.
|
|
37
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@yamato-daiwa/automation","version":"0.7.0-alpha.7","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":">=20.0.0"},"bin":{"yda":"Executable"},"files":["EntryPoint.js"],"dependencies":{"@eslint-community/eslint-plugin-eslint-comments":"4.5.0","@stylistic/eslint-plugin":"4.4.1","@typescript-eslint/eslint-plugin":"8.33.1","@typescript-eslint/parser":"8.33.1","@vue/compiler-sfc":"3.5.16","@webdiscus/pug-loader":"2.11.1","@yamato-daiwa/es-extensions":"1.8.0-alpha.16","@yamato-daiwa/es-extensions-nodejs":"1.8.0-alpha.16","@yamato-daiwa/style_guides":"0.7.0","autoprefixer":"10.4.21","browser-sync":"3.0.4","css-loader":"7.1.2","cssnano":"7.0.7","dotenv":"16.5.0","eslint":"9.28.0","eslint-plugin-import":"2.31.0","eslint-plugin-n":"17.19.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","htmlnano":"2.1.2","imagemin-pngquant":"9.0.2","js-beautify":"1.15.4","json5-loader":"4.0.1","nanoid":"5.1.5","node-html-parser":"7.0.1","node-notifier":"10.0.1","pa11y":"9.0.0","probe-image-size":"7.2.3","pug-lint":"2.7.0","pug3-ast-loader":"0.0.0","puppeteer":"24.10.0","require-from-string":"2.0.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","vnu-jar":"24.10.17","vue-loader":"17.4.2","vue-style-loader":"4.1.3","vue-tsc":"2.2.10","webpack":"5.99.9","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.30","@types/node-notifier":"8.0.5","@types/pa11y":"5.3.7","@types/probe-image-size":"7.2.5","@types/pug":"2.0.10","@types/require-from-string":"1.2.3","@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.3","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/","funding":"https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation?sponsor=1","bugs":{"url":"https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation/issues","email":"tokugawa.takesi@gmail.com"}}');
|
|
38
38
|
|
|
39
39
|
/***/ }),
|
|
40
40
|
|
|
@@ -10458,7 +10458,10 @@ class HTML_Validator {
|
|
|
10458
10458
|
/* ━━━ Fields ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
|
|
10459
10459
|
static selfSingleInstance = null;
|
|
10460
10460
|
/* ─── Work Variables ───────────────────────────────────────────────────────────────────────────────────────────── */
|
|
10461
|
-
|
|
10461
|
+
/* [ Approach ]
|
|
10462
|
+
* Although "queue" usually means the order, here is order does not matter unlike the files' uniqueness theat is why
|
|
10463
|
+
* set instead of simple Array used. */
|
|
10464
|
+
queuedFilesMetadata = new Set();
|
|
10462
10465
|
consumingProjectRootDirectoryAbsolutePath;
|
|
10463
10466
|
/* ─── Raw Validations Results Specification (Third-party Library Dependent) ────────────────────────────────────── */
|
|
10464
10467
|
/** @description
|
|
@@ -10674,7 +10677,7 @@ class HTML_Validator {
|
|
|
10674
10677
|
HTML_Validator.
|
|
10675
10678
|
getExpectedToBeInitializedSelfSingleInstance().
|
|
10676
10679
|
queuedFilesMetadata.
|
|
10677
|
-
|
|
10680
|
+
add(targetFileMetadata);
|
|
10678
10681
|
}
|
|
10679
10682
|
static validateQueuedFilesButReportAll() {
|
|
10680
10683
|
HTML_Validator.
|
|
@@ -10738,7 +10741,6 @@ class HTML_Validator {
|
|
|
10738
10741
|
/* ━━━ Private Methods ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
|
|
10739
10742
|
/* ─── Validation ───────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
10740
10743
|
async validateQueuedFilesButReportAll() {
|
|
10741
|
-
const validationsResults = (0, es_extensions_1.createMapBasedOnOtherMap)(this.cachedValidationsResults, (filePathRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly, { issues }) => [filePathRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly, issues]);
|
|
10742
10744
|
/* [ Approach ]
|
|
10743
10745
|
* To get readable logs with code fragment, the original output HTML files can not be used because they possibly
|
|
10744
10746
|
* contains the minified HTML code.
|
|
@@ -10767,13 +10769,7 @@ class HTML_Validator {
|
|
|
10767
10769
|
if (cachedValidationsResultsForCurrentFile?.contentMD5Checksum === HTML_ContentMD5_Hash) {
|
|
10768
10770
|
continue;
|
|
10769
10771
|
}
|
|
10770
|
-
|
|
10771
|
-
// TODO По возмоности, вместо validationsResults используй this.cachedValidationsResults
|
|
10772
|
-
// Возможно в итоге окажется, что validationsResults больше не нужна.
|
|
10773
|
-
// В противном случае потребуется комментарий о том, зачем эта переменная нужна вдобавок к this.cachedValidationsResults
|
|
10774
|
-
// Очистка устаревших данных из validationsResults не объясняет, почему эта переменная нужна.
|
|
10775
|
-
// Что мешает удалить эти данные раз из this.cachedValidationsResults, если данные всё равно устарели?
|
|
10776
|
-
validationsResults.delete(originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly);
|
|
10772
|
+
this.cachedValidationsResults.delete(originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly);
|
|
10777
10773
|
cachedHTML_CodeExplodedToLinesByRelativePathsOfOriginalHTML_Files.set(originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly, (0, es_extensions_1.splitString)(formattedHTML_Content, "\n"));
|
|
10778
10774
|
const formattedTemporaryHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly = es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
|
|
10779
10775
|
this.pathRelativeToConsumingProjectRootOfParentDirectoryOfTemporaryFormattedHTML_Files,
|
|
@@ -10797,7 +10793,7 @@ class HTML_Validator {
|
|
|
10797
10793
|
const validationTimeMeasuringStopwatch = new Stopwatch_1.default().startOrRestart();
|
|
10798
10794
|
/* [ Theory ] If pass no files to Nu HTML Checker, it will fail with the error. */
|
|
10799
10795
|
if (formattedTemporaryHTML_FilesPathsRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly.length === 0) {
|
|
10800
|
-
HTML_Validator.reportValidationsResults(
|
|
10796
|
+
HTML_Validator.reportValidationsResults(this.cachedValidationsResults);
|
|
10801
10797
|
return;
|
|
10802
10798
|
}
|
|
10803
10799
|
const rawValidationsResults = await HTML_Validator.getRawValidationsResultsFromNuHTML_Checker(formattedTemporaryHTML_FilesPathsRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly);
|
|
@@ -10813,8 +10809,7 @@ class HTML_Validator {
|
|
|
10813
10809
|
errorType: es_extensions_1.UnexpectedEventError.NAME,
|
|
10814
10810
|
title: es_extensions_1.UnexpectedEventError.localization.defaultTitle,
|
|
10815
10811
|
description: "The Nu HTML Checker does not much with expected one.\n" +
|
|
10816
|
-
es_extensions_1.RawObjectDataProcessor.
|
|
10817
|
-
formatValidationErrorsList(rawValidationsResultsInspectionOutput.validationErrorsMessages),
|
|
10812
|
+
es_extensions_1.RawObjectDataProcessor.formatValidationErrorsList(rawValidationsResultsInspectionOutput.validationErrorsMessages),
|
|
10818
10813
|
occurrenceLocation: "HTML_Validator.validateQueuedFilesButReportAll()",
|
|
10819
10814
|
mustOutputIf: true
|
|
10820
10815
|
});
|
|
@@ -10825,31 +10820,35 @@ class HTML_Validator {
|
|
|
10825
10820
|
* The `messages` property is the array of objects each of which has `message` string property.
|
|
10826
10821
|
* There are could be multiple objects for single file thus sorting by files required first. */
|
|
10827
10822
|
for (const rawValidationIssue of rawValidationsResultsInspectionOutput.processedData.messages) {
|
|
10828
|
-
const
|
|
10829
|
-
relativeToConsumingProjectRootPathsOfOriginalHTML_FilesWillBeValidated__forwardSlashesSeparatorsOnly.delete(
|
|
10830
|
-
|
|
10823
|
+
const originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly = (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(temporaryFormattedHTML_FilesEncodedURIsAndOriginalHTML_FilesRelativePathsCorrespondence, rawValidationIssue.url);
|
|
10824
|
+
relativeToConsumingProjectRootPathsOfOriginalHTML_FilesWillBeValidated__forwardSlashesSeparatorsOnly.delete(originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly);
|
|
10825
|
+
/* [ Approach ] In the first pass for each file, the value will be undefined. */
|
|
10826
|
+
const issuesOfCurrentFile = this.cachedValidationsResults.
|
|
10827
|
+
get(originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly)?.
|
|
10828
|
+
issues;
|
|
10831
10829
|
if ((0, es_extensions_1.isUndefined)(issuesOfCurrentFile)) {
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10830
|
+
this.cachedValidationsResults.set(originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly, {
|
|
10831
|
+
contentMD5Checksum: (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(MD5_HashesOfHTML_ContentByRelativePathsOfOriginalHTML_Files, originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly),
|
|
10832
|
+
issues: [
|
|
10833
|
+
HTML_Validator.normalizeRawValidationIssue(rawValidationIssue, (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(cachedHTML_CodeExplodedToLinesByRelativePathsOfOriginalHTML_Files, originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly))
|
|
10834
|
+
]
|
|
10835
|
+
});
|
|
10835
10836
|
continue;
|
|
10836
10837
|
}
|
|
10837
|
-
issuesOfCurrentFile.push(HTML_Validator.normalizeRawValidationIssue(rawValidationIssue, (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(cachedHTML_CodeExplodedToLinesByRelativePathsOfOriginalHTML_Files,
|
|
10838
|
+
issuesOfCurrentFile.push(HTML_Validator.normalizeRawValidationIssue(rawValidationIssue, (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(cachedHTML_CodeExplodedToLinesByRelativePathsOfOriginalHTML_Files, originalHTML_FilePathRelativeToConsumingProjectRoot__forwardSlashesSeparatorsOnly)));
|
|
10838
10839
|
}
|
|
10839
10840
|
for (const relativeToConsumingProjectRootPathOfOriginalValidHTML_Files__forwardSlashesSeparatorsOnly of relativeToConsumingProjectRootPathsOfOriginalHTML_FilesWillBeValidated__forwardSlashesSeparatorsOnly) {
|
|
10840
|
-
|
|
10841
|
+
this.cachedValidationsResults.set(relativeToConsumingProjectRootPathOfOriginalValidHTML_Files__forwardSlashesSeparatorsOnly, {
|
|
10842
|
+
issues: [],
|
|
10843
|
+
contentMD5Checksum: (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(MD5_HashesOfHTML_ContentByRelativePathsOfOriginalHTML_Files, relativeToConsumingProjectRootPathOfOriginalValidHTML_Files__forwardSlashesSeparatorsOnly)
|
|
10844
|
+
});
|
|
10841
10845
|
}
|
|
10842
10846
|
validationTimeMeasuringStopwatch.stop();
|
|
10843
|
-
HTML_Validator.reportValidationsResults(
|
|
10844
|
-
this.cachedValidationsResults = (0, es_extensions_1.createMapBasedOnOtherMap)(validationsResults, (filePathRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly, issues) => [
|
|
10845
|
-
filePathRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly,
|
|
10846
|
-
{
|
|
10847
|
-
issues,
|
|
10848
|
-
contentMD5Checksum: (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(MD5_HashesOfHTML_ContentByRelativePathsOfOriginalHTML_Files, filePathRelativeToConsumingProjectRootDirectory__forwardSlashesSeparatorsOnly)
|
|
10849
|
-
}
|
|
10850
|
-
]);
|
|
10847
|
+
HTML_Validator.reportValidationsResults(this.cachedValidationsResults);
|
|
10851
10848
|
this.writeCacheToFile();
|
|
10849
|
+
this.queuedFilesMetadata.clear();
|
|
10852
10850
|
}
|
|
10851
|
+
// ━━━ TODO ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
10853
10852
|
static async getRawValidationsResultsFromNuHTML_Checker(targetFilesPathRelativeToConsumingProjectRoot__forwardSlashesPathSeparators) {
|
|
10854
10853
|
return new Promise((resolve, reject) => {
|
|
10855
10854
|
/* [ Theory ] "vnu-jar" works only with relative paths. Absolute paths will not work with any path separators. */
|
|
@@ -10955,7 +10954,7 @@ class HTML_Validator {
|
|
|
10955
10954
|
let hasAtLeastOneFileWithInvalidHTML = false;
|
|
10956
10955
|
const hasEachFileIssues = new Map();
|
|
10957
10956
|
const formattedIssuesForEachFile = new Map();
|
|
10958
|
-
for (const [fileRelativePath__forwardPathSeparatorsOnly, issues] of validationsResults.entries()) {
|
|
10957
|
+
for (const [fileRelativePath__forwardPathSeparatorsOnly, { issues }] of validationsResults.entries()) {
|
|
10959
10958
|
hasEachFileIssues.set(fileRelativePath__forwardPathSeparatorsOnly, issues.length > 0);
|
|
10960
10959
|
if (issues.length > 0) {
|
|
10961
10960
|
hasAtLeastOneFileWithInvalidHTML = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamato-daiwa/automation",
|
|
3
|
-
"version": "0.7.0-alpha.
|
|
3
|
+
"version": "0.7.0-alpha.7",
|
|
4
4
|
"description": "The project building tool with declarative YAML configuration specializing on Pug, Stylus and TypeScript as source code languages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@typescript-eslint/parser": "8.33.1",
|
|
26
26
|
"@vue/compiler-sfc": "3.5.16",
|
|
27
27
|
"@webdiscus/pug-loader": "2.11.1",
|
|
28
|
-
"@yamato-daiwa/es-extensions": "1.8.0-
|
|
29
|
-
"@yamato-daiwa/es-extensions-nodejs": "1.8.0-
|
|
28
|
+
"@yamato-daiwa/es-extensions": "1.8.0-alpha.16",
|
|
29
|
+
"@yamato-daiwa/es-extensions-nodejs": "1.8.0-alpha.16",
|
|
30
30
|
"@yamato-daiwa/style_guides": "0.7.0",
|
|
31
31
|
"autoprefixer": "10.4.21",
|
|
32
32
|
"browser-sync": "3.0.4",
|