@yamato-daiwa/automation 0.5.0-alpha.2 → 0.5.0-alpha.3
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 +108 -29
- package/package.json +12 -12
package/EntryPoint.js
CHANGED
|
@@ -3177,12 +3177,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3177
3177
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3178
3178
|
};
|
|
3179
3179
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3180
|
+
exports["default"] = mustProvideIncrementalProjectBuilding;
|
|
3180
3181
|
const ConsumingProjectBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/ConsumingProjectBuildingModes */ "./ProjectBuilding/Common/Restrictions/ConsumingProjectBuildingModes.ts"));
|
|
3181
3182
|
function mustProvideIncrementalProjectBuilding(consumingProjectBuildingModes) {
|
|
3182
3183
|
return consumingProjectBuildingModes === ConsumingProjectBuildingModes_1.default.staticPreview ||
|
|
3183
3184
|
consumingProjectBuildingModes === ConsumingProjectBuildingModes_1.default.localDevelopment;
|
|
3184
3185
|
}
|
|
3185
|
-
exports["default"] = mustProvideIncrementalProjectBuilding;
|
|
3186
3186
|
|
|
3187
3187
|
|
|
3188
3188
|
/***/ }),
|
|
@@ -7442,13 +7442,9 @@ class ECMA_ScriptSourceCodeLinter extends LinterLikeTaskExecutor_1.default {
|
|
|
7442
7442
|
}),
|
|
7443
7443
|
es_extensions_nodejs_1.ImprovedGlob.buildExcludingOfDirectoryWithSubdirectoriesGlobSelector(es_extensions_nodejs_1.ImprovedPath.joinPathSegments([projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath, "node_modules"])),
|
|
7444
7444
|
/* [ ESLint theory ]
|
|
7445
|
-
*
|
|
7446
|
-
*
|
|
7447
|
-
|
|
7448
|
-
...ESLintLinterSpecialist_1.default.getGlobSelectorsOfExcludedFiles({
|
|
7449
|
-
consumingProjectRootDirectoryAbsolutePath: projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
|
|
7450
|
-
mustSkipNodeModulesDirectory: true
|
|
7451
|
-
})
|
|
7445
|
+
* In there are files and/or directories ignored in ESLint configuration they also must be excluded from
|
|
7446
|
+
* the Gulp pipelines otherwise ESLint will emit the warning for ignored files. */
|
|
7447
|
+
...ESLintLinterSpecialist_1.default.generateExcludingGlobSelectorsOfIgnoredFiles(projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath)
|
|
7452
7448
|
],
|
|
7453
7449
|
logging: {
|
|
7454
7450
|
pathsOfFilesWillBeProcessed: ecmaScriptLogicProcessingSettingsRepresentative.loggingSettings.filesPaths,
|
|
@@ -13716,25 +13712,108 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13716
13712
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13717
13713
|
};
|
|
13718
13714
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
13719
|
-
const fs_1 = __importDefault(__webpack_require__(/*! fs */ "fs"));
|
|
13720
13715
|
const path_1 = __importDefault(__webpack_require__(/*! path */ "path"));
|
|
13716
|
+
const fs_1 = __importDefault(__webpack_require__(/*! fs */ "fs"));
|
|
13721
13717
|
const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
|
|
13718
|
+
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
13722
13719
|
class ESLintLinterSpecialist {
|
|
13723
|
-
static
|
|
13724
|
-
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
|
|
13720
|
+
static SUPPORTED_CONFIGURATION_FILES_NAMES_WITH_EXTENSIONS = [
|
|
13721
|
+
"eslint.config.js",
|
|
13722
|
+
"eslint.config.mjs",
|
|
13723
|
+
"eslint.config.cjs",
|
|
13724
|
+
"eslint.config.ts",
|
|
13725
|
+
"eslint.config.mts",
|
|
13726
|
+
"eslint.config.cts"
|
|
13727
|
+
];
|
|
13728
|
+
static generateExcludingGlobSelectorsOfIgnoredFiles(consumingProjectRootDirectoryAbsolutePath) {
|
|
13729
|
+
let configurationFileContent;
|
|
13730
|
+
for (const potentialConfigurationFileNameWithExtension of ESLintLinterSpecialist.SUPPORTED_CONFIGURATION_FILES_NAMES_WITH_EXTENSIONS) {
|
|
13731
|
+
try {
|
|
13732
|
+
configurationFileContent = fs_1.default.readFileSync(es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
|
|
13733
|
+
consumingProjectRootDirectoryAbsolutePath,
|
|
13734
|
+
potentialConfigurationFileNameWithExtension
|
|
13735
|
+
], { alwaysForwardSlashSeparators: true }), "utf-8");
|
|
13736
|
+
break;
|
|
13737
|
+
}
|
|
13738
|
+
catch (error) {
|
|
13739
|
+
if ((0, es_extensions_nodejs_1.isErrnoException)(error) && error.code === "ENOENT") {
|
|
13740
|
+
continue;
|
|
13741
|
+
}
|
|
13742
|
+
es_extensions_1.Logger.logError({
|
|
13743
|
+
mustOutputIf: true,
|
|
13744
|
+
errorType: "FileReadingFailedError",
|
|
13745
|
+
title: "File Reading Failed",
|
|
13746
|
+
description: `Unable to read the file ${potentialConfigurationFileNameWithExtension} while this file seems to be exist`,
|
|
13747
|
+
occurrenceLocation: "ESLintLinterSpecialist.getGlobSelectorsOfExcludedFiles(compoundParameter)",
|
|
13748
|
+
caughtError: error
|
|
13749
|
+
});
|
|
13750
|
+
}
|
|
13751
|
+
}
|
|
13752
|
+
if ((0, es_extensions_1.isUndefined)(configurationFileContent)) {
|
|
13753
|
+
es_extensions_1.Logger.logWarning({
|
|
13754
|
+
title: "No Files Will be Ignored by ESLint",
|
|
13755
|
+
description: "ESLint configuration file not found thus unable to decide which files must be ignored.",
|
|
13756
|
+
occurrenceLocation: "className.methodName(compoundParameter)"
|
|
13757
|
+
});
|
|
13758
|
+
return [];
|
|
13759
|
+
}
|
|
13760
|
+
const filesIgnoringPatternsRawExpression = (0, es_extensions_1.getMatchingWithFirstRegularExpressionCapturingGroup)({
|
|
13761
|
+
targetString: configurationFileContent,
|
|
13762
|
+
regularExpression: /ignores:\s*(?<array>\[(?:.|\s)+?\])/gu
|
|
13763
|
+
});
|
|
13764
|
+
if ((0, es_extensions_1.isNull)(filesIgnoringPatternsRawExpression)) {
|
|
13765
|
+
return [];
|
|
13766
|
+
}
|
|
13767
|
+
let filesIgnoringPatterns;
|
|
13768
|
+
try {
|
|
13769
|
+
filesIgnoringPatterns = JSON.parse(filesIgnoringPatternsRawExpression.replace("'", "\""));
|
|
13770
|
+
}
|
|
13771
|
+
catch (error) {
|
|
13772
|
+
es_extensions_1.Logger.logError({
|
|
13773
|
+
errorType: es_extensions_1.InvalidExternalDataError.NAME,
|
|
13774
|
+
title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
|
|
13775
|
+
description: "Invalid ignoring patters in ESLint configuration.",
|
|
13776
|
+
occurrenceLocation: "ESLintLinterSpecialist.getGlobSelectorsOfExcludedFiles(compoundParameter)",
|
|
13777
|
+
caughtError: error
|
|
13778
|
+
});
|
|
13779
|
+
return [];
|
|
13780
|
+
}
|
|
13781
|
+
const processingResult = es_extensions_1.RawObjectDataProcessor.process(filesIgnoringPatterns, {
|
|
13782
|
+
subtype: es_extensions_1.RawObjectDataProcessor.ObjectSubtypes.indexedArray,
|
|
13783
|
+
nameForLogging: "ESLint ignoring patterns",
|
|
13784
|
+
element: {
|
|
13785
|
+
type: String
|
|
13786
|
+
}
|
|
13787
|
+
});
|
|
13788
|
+
if (processingResult.rawDataIsInvalid) {
|
|
13789
|
+
es_extensions_1.Logger.logError({
|
|
13790
|
+
errorType: es_extensions_1.InvalidExternalDataError.NAME,
|
|
13791
|
+
title: es_extensions_1.InvalidExternalDataError.localization.defaultTitle,
|
|
13792
|
+
description: "Invalid ignoring patters in ESLint configuration.\n" +
|
|
13793
|
+
es_extensions_1.RawObjectDataProcessor.formatValidationErrorsList(processingResult.validationErrorsMessages),
|
|
13794
|
+
occurrenceLocation: "ESLintLinterSpecialist.getGlobSelectorsOfExcludedFiles(compoundParameter)"
|
|
13795
|
+
});
|
|
13796
|
+
return [];
|
|
13797
|
+
}
|
|
13798
|
+
/* [ Theory ] Known Patterns from ESLint Documentation & Experiments
|
|
13799
|
+
* 1. ".config/*": ignore subdirectory ".config" in directory below root, but not ".config" recursively
|
|
13800
|
+
* 2. ".config/": equivalent of 1
|
|
13801
|
+
* 2. ".config": equivalent of 1
|
|
13802
|
+
* 3. "**/.config/": recursive ignoring of ".config"
|
|
13803
|
+
* 4. config.js - ignoring of specific file
|
|
13804
|
+
* See https://eslint.org/docs/latest/use/configure/ignore#ignoring-files
|
|
13805
|
+
* */
|
|
13806
|
+
return processingResult.processedData.
|
|
13807
|
+
/* [ Theory ]
|
|
13808
|
+
* ESLint ignores "node_modules" as default, so it must be ignored whatever it has been specified in ESLint
|
|
13809
|
+
* configuration file or no. */
|
|
13810
|
+
filter((ignoredFilesPattern) => !ignoredFilesPattern.includes("node_module")).
|
|
13811
|
+
map((ignoredFilesPattern) => {
|
|
13812
|
+
if (ignoredFilesPattern.startsWith("**/")) {
|
|
13813
|
+
return es_extensions_nodejs_1.ImprovedGlob.buildExcludingOfDirectoryWithSubdirectoriesGlobSelector(path_1.default.join(consumingProjectRootDirectoryAbsolutePath, ignoredFilesPattern.replace(/^\*\*\//gu, "")));
|
|
13814
|
+
}
|
|
13815
|
+
return es_extensions_nodejs_1.ImprovedGlob.buildExcludingOfDirectoryWithSubdirectoriesGlobSelector(path_1.default.join(consumingProjectRootDirectoryAbsolutePath, ignoredFilesPattern.replace(/\*/gu, "")));
|
|
13816
|
+
});
|
|
13738
13817
|
}
|
|
13739
13818
|
}
|
|
13740
13819
|
exports["default"] = ESLintLinterSpecialist;
|
|
@@ -14034,6 +14113,7 @@ exports["default"] = WebpackSpecialist;
|
|
|
14034
14113
|
|
|
14035
14114
|
|
|
14036
14115
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
14116
|
+
exports["default"] = getExpectedToBeExistingMapValue;
|
|
14037
14117
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
14038
14118
|
function getExpectedToBeExistingMapValue(targetMap, targetKey) {
|
|
14039
14119
|
const targetValue = targetMap.get(targetKey);
|
|
@@ -14046,7 +14126,6 @@ function getExpectedToBeExistingMapValue(targetMap, targetKey) {
|
|
|
14046
14126
|
}
|
|
14047
14127
|
return targetValue;
|
|
14048
14128
|
}
|
|
14049
|
-
exports["default"] = getExpectedToBeExistingMapValue;
|
|
14050
14129
|
|
|
14051
14130
|
|
|
14052
14131
|
/***/ }),
|
|
@@ -14095,11 +14174,11 @@ exports["default"] = Stopwatch;
|
|
|
14095
14174
|
|
|
14096
14175
|
|
|
14097
14176
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
14177
|
+
exports["default"] = replaceLinesSeparators;
|
|
14098
14178
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
14099
14179
|
function replaceLinesSeparators(targetString, lineSeparators) {
|
|
14100
14180
|
return (0, es_extensions_1.explodeStringToLines)({ targetString, mustIgnoreCarriageReturn: false }).join(lineSeparators);
|
|
14101
14181
|
}
|
|
14102
|
-
exports["default"] = replaceLinesSeparators;
|
|
14103
14182
|
|
|
14104
14183
|
|
|
14105
14184
|
/***/ }),
|
|
@@ -15032,11 +15111,11 @@ exports["default"] = VinylFileClass;
|
|
|
15032
15111
|
|
|
15033
15112
|
|
|
15034
15113
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
15114
|
+
exports["default"] = createImmediatelyEndingEmptyStream;
|
|
15035
15115
|
const stream_1 = __webpack_require__(/*! stream */ "stream");
|
|
15036
15116
|
function createImmediatelyEndingEmptyStream() {
|
|
15037
15117
|
return () => new stream_1.PassThrough().end();
|
|
15038
15118
|
}
|
|
15039
|
-
exports["default"] = createImmediatelyEndingEmptyStream;
|
|
15040
15119
|
|
|
15041
15120
|
|
|
15042
15121
|
/***/ }),
|
|
@@ -15049,6 +15128,7 @@ exports["default"] = createImmediatelyEndingEmptyStream;
|
|
|
15049
15128
|
|
|
15050
15129
|
|
|
15051
15130
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
15131
|
+
exports["default"] = extractStringifiedContentFromVinylFile;
|
|
15052
15132
|
function extractStringifiedContentFromVinylFile(targetFile) {
|
|
15053
15133
|
if (targetFile.contents === null) {
|
|
15054
15134
|
return "";
|
|
@@ -15058,7 +15138,6 @@ function extractStringifiedContentFromVinylFile(targetFile) {
|
|
|
15058
15138
|
}
|
|
15059
15139
|
return targetFile.contents.toString();
|
|
15060
15140
|
}
|
|
15061
|
-
exports["default"] = extractStringifiedContentFromVinylFile;
|
|
15062
15141
|
|
|
15063
15142
|
|
|
15064
15143
|
/***/ }),
|
|
@@ -15495,7 +15574,7 @@ function revisionHash(data) {
|
|
|
15495
15574
|
\***********************/
|
|
15496
15575
|
/***/ ((module) => {
|
|
15497
15576
|
|
|
15498
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@yamato-daiwa/automation","version":"0.5.0-alpha.
|
|
15577
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@yamato-daiwa/automation","version":"0.5.0-alpha.3","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.18.0"},"bin":{"yda":"Executable"},"files":["EntryPoint.js"],"dependencies":{"@stylistic/eslint-plugin":"2.8.0","@typescript-eslint/eslint-plugin":"8.8.0","@typescript-eslint/parser":"8.8.0","@vue/compiler-sfc":"3.4.27","@webdiscus/pug-loader":"2.11.0","@yamato-daiwa/es-extensions":"1.8.0-alpha.2","@yamato-daiwa/es-extensions-nodejs":"1.8.0-alpha.1","@yamato-daiwa/style_guides":"0.3.0-alpha.8","autoprefixer":"10.4.19","browser-sync":"3.0.2","css-loader":"7.1.2","cssnano":"7.0.2","eslint":"9.12.0","eslint-plugin-import":"2.31.0","eslint-plugin-n":"17.10.3","eslint-plugin-react":"7.37.1","eslint-plugin-vue":"9.28.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-html-prettify":"0.0.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","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","pug3-ast-loader":"0.0.0","pug-lint":"2.7.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.0","ts-loader":"9.5.1","vinyl":"2.2.1","vue-loader":"17.4.2","vue-style-loader":"4.1.3","w3c-html-validator":"0.8.1","webpack":"5.91.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-html-prettify":"0.0.5","@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/node":"20.14.2","@types/node-notifier":"8.0.5","@types/pa11y":"5.3.7","@types/probe-image-size":"7.2.4","@types/pug":"2.0.10","@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.5.4","webpack-cli":"5.1.4"},"scripts":{"Incremental development building":"webpack --mode development","Production building":"webpack --mode production","Linting":"eslint Source","Tree diagram of source files generating":"tree Source /f"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation.git"},"bugs":{"url":"https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation/issues","email":"tokugawa.takesi@gmail.com"}}');
|
|
15499
15578
|
|
|
15500
15579
|
/***/ })
|
|
15501
15580
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamato-daiwa/automation",
|
|
3
|
-
"version": "0.5.0-alpha.
|
|
3
|
+
"version": "0.5.0-alpha.3",
|
|
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",
|
|
@@ -19,23 +19,23 @@
|
|
|
19
19
|
"EntryPoint.js"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@stylistic/eslint-plugin": "
|
|
23
|
-
"@typescript-eslint/eslint-plugin": "
|
|
24
|
-
"@typescript-eslint/parser": "
|
|
22
|
+
"@stylistic/eslint-plugin": "2.8.0",
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "8.8.0",
|
|
24
|
+
"@typescript-eslint/parser": "8.8.0",
|
|
25
25
|
"@vue/compiler-sfc": "3.4.27",
|
|
26
26
|
"@webdiscus/pug-loader": "2.11.0",
|
|
27
27
|
"@yamato-daiwa/es-extensions": "1.8.0-alpha.2",
|
|
28
28
|
"@yamato-daiwa/es-extensions-nodejs": "1.8.0-alpha.1",
|
|
29
|
-
"@yamato-daiwa/style_guides": "0.
|
|
29
|
+
"@yamato-daiwa/style_guides": "0.3.0-alpha.8",
|
|
30
30
|
"autoprefixer": "10.4.19",
|
|
31
31
|
"browser-sync": "3.0.2",
|
|
32
32
|
"css-loader": "7.1.2",
|
|
33
33
|
"cssnano": "7.0.2",
|
|
34
|
-
"eslint": "
|
|
35
|
-
"eslint-plugin-import": "2.
|
|
36
|
-
"eslint-plugin-
|
|
37
|
-
"eslint-plugin-react": "7.
|
|
38
|
-
"eslint-plugin-vue": "9.
|
|
34
|
+
"eslint": "9.12.0",
|
|
35
|
+
"eslint-plugin-import": "2.31.0",
|
|
36
|
+
"eslint-plugin-n": "17.10.3",
|
|
37
|
+
"eslint-plugin-react": "7.37.1",
|
|
38
|
+
"eslint-plugin-vue": "9.28.0",
|
|
39
39
|
"eslint-plugin-vue-pug": "0.6.2",
|
|
40
40
|
"fork-ts-checker-webpack-plugin": "7.3.0",
|
|
41
41
|
"gulp": "4.0.2",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@types/gulp": "4.0.17",
|
|
82
82
|
"@types/gulp-html-prettify": "0.0.5",
|
|
83
83
|
"@types/gulp-if": "3.0.4",
|
|
84
|
-
"@types/gulp-imagemin": "
|
|
84
|
+
"@types/gulp-imagemin": "7.0.3",
|
|
85
85
|
"@types/gulp-nodemon": "0.0.37",
|
|
86
86
|
"@types/gulp-plumber": "0.0.37",
|
|
87
87
|
"@types/gulp-postcss": "8.0.6",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@types/webpack-stream": "3.2.15",
|
|
97
97
|
"eslint-webpack-plugin": "4.2.0",
|
|
98
98
|
"ts-node": "10.9.2",
|
|
99
|
-
"typescript": "5.4
|
|
99
|
+
"typescript": "5.5.4",
|
|
100
100
|
"webpack-cli": "5.1.4"
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|