@yamato-daiwa/automation 0.0.2 → 0.0.6

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 +283 -227
  2. package/README.md +12 -2
  3. package/package.json +10 -8
package/EntryPoint.js CHANGED
@@ -289,6 +289,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
289
289
  Object.defineProperty(exports, "__esModule", ({ value: true }));
290
290
  const AssetsProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative */ "./ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative.ts"));
291
291
  class AudiosProcessingSettingsRepresentative extends AssetsProcessingSettingsRepresentative_1.default {
292
+ TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Audio";
292
293
  TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Audios";
293
294
  assetsProcessingCommonSettings;
294
295
  actualAssetsGroupsSettings;
@@ -345,6 +346,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
345
346
  return (mod && mod.__esModule) ? mod : { "default": mod };
346
347
  };
347
348
  Object.defineProperty(exports, "__esModule", ({ value: true }));
349
+ const AudiosProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @AudiosProcessing/AudiosProcessingSettingsRepresentative */ "./ProjectBuilding/AssetsProcessing/Audios/AudiosProcessingSettingsRepresentative.ts"));
348
350
  /* --- Tasks executors ---------------------------------------------------------------------------------------------- */
349
351
  const GulpStreamsBasedAssetsProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts"));
350
352
  /* --- Applied utils ------------------------------------------------------------------------------------------------ */
@@ -394,7 +396,7 @@ class AudiosProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
394
396
  /* [ Theory ] The value of 'path' could change during file processing. */
395
397
  fileInInitialState.sourceAbsolutePath = fileInInitialState.path;
396
398
  fileInInitialState.outputDirectoryAbsolutePath =
397
- this.audiosProcessingConfigRepresentative.computeActualOutputDirectoryAbsolutePathForTargetSourceFile({
399
+ AudiosProcessingSettingsRepresentative_1.default.computeActualOutputDirectoryAbsolutePathForTargetSourceFile({
398
400
  targetSourceFileAbsolutePath: fileInInitialState.path,
399
401
  respectiveAssetsGroupNormalizedSettings: normalizedAudiosGroupSettingsActualForCurrentFile
400
402
  });
@@ -551,6 +553,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
551
553
  return (mod && mod.__esModule) ? mod : { "default": mod };
552
554
  };
553
555
  Object.defineProperty(exports, "__esModule", ({ value: true }));
556
+ const FontsProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @FontsProcessing/FontsProcessingSettingsRepresentative */ "./ProjectBuilding/AssetsProcessing/Fonts/FontsProcessingSettingsRepresentative.ts"));
554
557
  /* --- Tasks executor ----------------------------------------------------------------------------------------------- */
555
558
  const GulpStreamsBasedAssetsProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts"));
556
559
  /* --- Applied utils ------------------------------------------------------------------------------------------------ */
@@ -599,7 +602,7 @@ class FontsProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
599
602
  fileInInitialState.processingSettings = normalizedFontsGroupSettingsActualForCurrentFile;
600
603
  /* [ Theory ] The value of 'path' could change during file processing. */
601
604
  fileInInitialState.sourceAbsolutePath = fileInInitialState.path;
602
- fileInInitialState.outputDirectoryAbsolutePath = this.fontsProcessorConfigRepresentative.
605
+ fileInInitialState.outputDirectoryAbsolutePath = FontsProcessingSettingsRepresentative_1.default.
603
606
  computeActualOutputDirectoryAbsolutePathForTargetSourceFile({
604
607
  targetSourceFileAbsolutePath: fileInInitialState.path,
605
608
  respectiveAssetsGroupNormalizedSettings: normalizedFontsGroupSettingsActualForCurrentFile
@@ -700,6 +703,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
700
703
  Object.defineProperty(exports, "__esModule", ({ value: true }));
701
704
  const AssetsProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative */ "./ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative.ts"));
702
705
  class ImagesProcessingSettingsRepresentative extends AssetsProcessingSettingsRepresentative_1.default {
706
+ TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Image";
703
707
  TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Images";
704
708
  assetsProcessingCommonSettings;
705
709
  actualAssetsGroupsSettings;
@@ -756,6 +760,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
756
760
  return (mod && mod.__esModule) ? mod : { "default": mod };
757
761
  };
758
762
  Object.defineProperty(exports, "__esModule", ({ value: true }));
763
+ const ImagesProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ImagesProcessing/ImagesProcessingSettingsRepresentative */ "./ProjectBuilding/AssetsProcessing/Images/ImagesProcessingSettingsRepresentative.ts"));
759
764
  /* --- Tasks executor ----------------------------------------------------------------------------------------------- */
760
765
  const GulpStreamsBasedAssetsProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts"));
761
766
  /* --- Applied utils ------------------------------------------------------------------------------------------------ */
@@ -813,7 +818,7 @@ class ImagesProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
813
818
  fileInInitialState.processingSettings = normalizedImagesGroupSettingsActualForCurrentFile;
814
819
  /* [ Theory ] The value of 'path' could change during file processing. */
815
820
  fileInInitialState.sourceAbsolutePath = fileInInitialState.path;
816
- fileInInitialState.outputDirectoryAbsolutePath = this.imagesProcessorConfigRepresentative.
821
+ fileInInitialState.outputDirectoryAbsolutePath = ImagesProcessingSettingsRepresentative_1.default.
817
822
  computeActualOutputDirectoryAbsolutePathForTargetSourceFile({
818
823
  targetSourceFileAbsolutePath: fileInInitialState.path,
819
824
  respectiveAssetsGroupNormalizedSettings: normalizedImagesGroupSettingsActualForCurrentFile
@@ -914,6 +919,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
914
919
  Object.defineProperty(exports, "__esModule", ({ value: true }));
915
920
  const AssetsProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative */ "./ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative.ts"));
916
921
  class VideosProcessingSettingsRepresentative extends AssetsProcessingSettingsRepresentative_1.default {
922
+ TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Video";
917
923
  TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Videos";
918
924
  assetsProcessingCommonSettings;
919
925
  actualAssetsGroupsSettings;
@@ -970,6 +976,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
970
976
  return (mod && mod.__esModule) ? mod : { "default": mod };
971
977
  };
972
978
  Object.defineProperty(exports, "__esModule", ({ value: true }));
979
+ const VideosProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @VideosProcessing/VideosProcessingSettingsRepresentative */ "./ProjectBuilding/AssetsProcessing/Videos/VideosProcessingSettingsRepresentative.ts"));
973
980
  /* --- Tasks executor ----------------------------------------------------------------------------------------------- */
974
981
  const GulpStreamsBasedAssetsProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts"));
975
982
  /* --- Applied utils ------------------------------------------------------------------------------------------------ */
@@ -1018,7 +1025,7 @@ class VideosProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
1018
1025
  fileInInitialState.processingSettings = normalizedVideosGroupSettingsActualForCurrentFile;
1019
1026
  /* [ Theory ] The value of 'path' could change during file processing. */
1020
1027
  fileInInitialState.sourceAbsolutePath = fileInInitialState.path;
1021
- fileInInitialState.outputDirectoryAbsolutePath = this.videosProcessingConfigRepresentative.
1028
+ fileInInitialState.outputDirectoryAbsolutePath = VideosProcessingSettingsRepresentative_1.default.
1022
1029
  computeActualOutputDirectoryAbsolutePathForTargetSourceFile({
1023
1030
  targetSourceFileAbsolutePath: fileInInitialState.path,
1024
1031
  respectiveAssetsGroupNormalizedSettings: normalizedVideosGroupSettingsActualForCurrentFile
@@ -2076,27 +2083,9 @@ const ImprovedPath_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/I
2076
2083
  const ImprovedGlob_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/ImprovedGlob */ "./UtilsIncubator/ImprovedGlob.ts"));
2077
2084
  class AssetsProcessingSettingsRepresentative {
2078
2085
  sourceFilesAbsolutePathsAndOutputFilesActualPathsMap = new Map();
2079
- filePathAliasPrefix = "@";
2086
+ prefixOfAliasOfTopDirectoryOfEntryPointsGroup = "@";
2080
2087
  masterConfigRepresentative;
2081
- constructor(masterConfigRepresentative) {
2082
- this.masterConfigRepresentative = masterConfigRepresentative;
2083
- }
2084
- get supportedSourceFilesNamesExtensionsWithoutLeadingDots() {
2085
- return this.assetsProcessingCommonSettings.supportedSourceFilesNamesExtensionsWithoutLeadingDots;
2086
- }
2087
- get hasAtLeastOneActualAssetsGroup() {
2088
- return this.actualAssetsGroupsSettings.size > 0;
2089
- }
2090
- get actualAssetsSourceFilesAbsolutePaths() {
2091
- const assetsSourceFilesAbsolutePaths = [];
2092
- this.actualAssetsGroupsSettings.forEach((assetsGroupSettings) => {
2093
- assetsSourceFilesAbsolutePaths.push(...ImprovedGlob_1.default.getFilesAbsolutePathsSynchronously([
2094
- assetsGroupSettings.sourceFilesGlobSelector
2095
- ]));
2096
- });
2097
- return assetsSourceFilesAbsolutePaths;
2098
- }
2099
- computeActualOutputDirectoryAbsolutePathForTargetSourceFile({ targetSourceFileAbsolutePath, respectiveAssetsGroupNormalizedSettings }) {
2088
+ static computeActualOutputDirectoryAbsolutePathForTargetSourceFile({ targetSourceFileAbsolutePath, respectiveAssetsGroupNormalizedSettings }) {
2100
2089
  let outputDirectoryAbsolutePathForCurrentSourceFile = ImprovedPath_1.default.buildAbsolutePath([
2101
2090
  respectiveAssetsGroupNormalizedSettings.outputFilesTopDirectoryAbsolutePath,
2102
2091
  ImprovedPath_1.default.computeRelativePath({
@@ -2124,6 +2113,24 @@ class AssetsProcessingSettingsRepresentative {
2124
2113
  }
2125
2114
  return outputDirectoryAbsolutePathForCurrentSourceFile;
2126
2115
  }
2116
+ constructor(masterConfigRepresentative) {
2117
+ this.masterConfigRepresentative = masterConfigRepresentative;
2118
+ }
2119
+ get supportedSourceFilesNamesExtensionsWithoutLeadingDots() {
2120
+ return this.assetsProcessingCommonSettings.supportedSourceFilesNamesExtensionsWithoutLeadingDots;
2121
+ }
2122
+ get hasAtLeastOneActualAssetsGroup() {
2123
+ return this.actualAssetsGroupsSettings.size > 0;
2124
+ }
2125
+ get actualAssetsSourceFilesAbsolutePaths() {
2126
+ const assetsSourceFilesAbsolutePaths = [];
2127
+ this.actualAssetsGroupsSettings.forEach((assetsGroupSettings) => {
2128
+ assetsSourceFilesAbsolutePaths.push(...ImprovedGlob_1.default.getFilesAbsolutePathsSynchronously([
2129
+ assetsGroupSettings.sourceFilesGlobSelector
2130
+ ]));
2131
+ });
2132
+ return assetsSourceFilesAbsolutePaths;
2133
+ }
2127
2134
  getAssetsNormalizedSettingsActualForTargetSourceFile(targetSourceFileAbsolutePath) {
2128
2135
  const assetsNormalizedSettingsActualForTargetSourceFile = Array.from(this.actualAssetsGroupsSettings.values()).
2129
2136
  find((assetsGroupNormalizedSettings) => ImprovedGlob_1.default.isFileMatchingWithGlobSelector({
@@ -2183,6 +2190,19 @@ class GulpStreamBasedSourceCodeProcessingConfigRepresentative extends SourceCode
2183
2190
  static #localization = GulpStreamBasedSourceCodeProcessingConfigRepresentative.getDefaultLocalization();
2184
2191
  partialFilesAndEntryPointsRelationsMap = new Map();
2185
2192
  onPartialFilesAndEntryPointsRelationsMapUpdatedEventSubscribers = [];
2193
+ /* === Static helpers ============================================================================================= */
2194
+ static computeRelevantOutputDirectoryAbsolutePathForTargetSourceFile(targetSourceFileAbsolutePath, respectiveEntryPointsGroupSettings) {
2195
+ if (respectiveEntryPointsGroupSettings.isSingeEntryPointGroup) {
2196
+ return respectiveEntryPointsGroupSettings.outputFilesTopDirectoryAbsolutePath;
2197
+ }
2198
+ return ImprovedPath_1.default.buildAbsolutePath([
2199
+ respectiveEntryPointsGroupSettings.outputFilesTopDirectoryAbsolutePath,
2200
+ ImprovedPath_1.default.computeRelativePath({
2201
+ basePath: respectiveEntryPointsGroupSettings.sourceFilesTopDirectoryAbsolutePath,
2202
+ comparedPath: ImprovedPath_1.default.extractDirectoryFromFilePath(targetSourceFileAbsolutePath)
2203
+ })
2204
+ ], { forwardSlashOnlySeparators: true });
2205
+ }
2186
2206
  static setLocalization(newLocalization) {
2187
2207
  this.#localization = newLocalization;
2188
2208
  }
@@ -2223,20 +2243,6 @@ class GulpStreamBasedSourceCodeProcessingConfigRepresentative extends SourceCode
2223
2243
  }
2224
2244
  return entryPointsGroupsNormalizedSettingsRelevantForTargetSourceFile;
2225
2245
  }
2226
- /* eslint-disable-next-line class-methods-use-this --
2227
- * Intended to be inherited and used by inheritors. */
2228
- computeRelevantOutputDirectoryAbsolutePathForTargetSourceFile(targetSourceFileAbsolutePath, respectiveEntryPointsGroupSettings) {
2229
- if (respectiveEntryPointsGroupSettings.isSingeEntryPointGroup) {
2230
- return respectiveEntryPointsGroupSettings.outputFilesTopDirectoryAbsolutePath;
2231
- }
2232
- return ImprovedPath_1.default.buildAbsolutePath([
2233
- respectiveEntryPointsGroupSettings.outputFilesTopDirectoryAbsolutePath,
2234
- ImprovedPath_1.default.computeRelativePath({
2235
- basePath: respectiveEntryPointsGroupSettings.sourceFilesTopDirectoryAbsolutePath,
2236
- comparedPath: ImprovedPath_1.default.extractDirectoryFromFilePath(targetSourceFileAbsolutePath)
2237
- })
2238
- ], { forwardSlashOnlySeparators: true });
2239
- }
2240
2246
  /* === Partial files and entry points relations map ============================================================= */
2241
2247
  initializeOrUpdatePartialFilesAndEntryPointsRelationsMap() {
2242
2248
  this.partialFilesAndEntryPointsRelationsMap.clear();
@@ -2252,7 +2258,7 @@ class GulpStreamBasedSourceCodeProcessingConfigRepresentative extends SourceCode
2252
2258
  subscribeOnPartialFilesAndEntryPointsRelationsMapUpdatedEvent(subscriber) {
2253
2259
  this.onPartialFilesAndEntryPointsRelationsMapUpdatedEventSubscribers.push(subscriber);
2254
2260
  }
2255
- /* === Localization ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~============================================================= */
2261
+ /* === Localization =============================================================================================== */
2256
2262
  static getDefaultLocalization() {
2257
2263
  return {
2258
2264
  generateEntryPointsGroupNormalizedSettingsNotFoundForSpecifiedFilePath: ({ targetSourceFileAbsolutePath }) => `No normalized config found for file '${targetSourceFileAbsolutePath}'.'`
@@ -3616,7 +3622,9 @@ const SourceCodeProcessingConfigRepresentative_1 = __importDefault(__webpack_req
3616
3622
  const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
3617
3623
  class ECMA_ScriptLogicProcessingSettingsRepresentative extends SourceCodeProcessingConfigRepresentative_1.default {
3618
3624
  supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots;
3625
+ TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Script";
3619
3626
  TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Scripts";
3627
+ prefixOfAliasOfTopDirectoryOfEntryPointsGroup = "@";
3620
3628
  relevantEntryPointsGroupsSettings;
3621
3629
  entryPointsSourceFilesAbsolutePathsAndOutputFilesActualPathsMap = new Map();
3622
3630
  sourceCodeProcessingCommonSettings;
@@ -4028,6 +4036,10 @@ class ECMA_ScriptLogicEntryPointsSourceFilesAbsolutePathsAndOutputFilesActualPat
4028
4036
  else {
4029
4037
  correspondingOutputFileAbsolutePath = ImprovedPath_1.default.buildAbsolutePath([
4030
4038
  entryPointsGroupNormalizedSettings.outputFilesTopDirectoryAbsolutePath,
4039
+ ImprovedPath_1.default.computeRelativePath({
4040
+ comparedPath: ImprovedPath_1.default.extractDirectoryFromFilePath(sourceFileAbsolutePath),
4041
+ basePath: entryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath
4042
+ }),
4031
4043
  `${ImprovedPath_1.default.extractFileNameWithoutExtensionFromPath(sourceFileAbsolutePath)}.js`
4032
4044
  ], { forwardSlashOnlySeparators: true });
4033
4045
  }
@@ -4303,6 +4315,7 @@ class WebpackConfigGenerator {
4303
4315
  new vue_loader_1.VueLoaderPlugin(),
4304
4316
  new eslint_webpack_plugin_1.default({
4305
4317
  extensions: ["js", "ts", "vue"],
4318
+ failOnError: this.masterConfigRepresentative.isProductionBuildingMode,
4306
4319
  failOnWarning: this.masterConfigRepresentative.isProductionBuildingMode
4307
4320
  })
4308
4321
  ],
@@ -4755,6 +4768,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4755
4768
  };
4756
4769
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4757
4770
  exports.MarkupProcessor = void 0;
4771
+ const MarkupProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/MarkupProcessingSettingsRepresentative */ "./ProjectBuilding/SourceCodeProcessing/Markup/MarkupProcessingSettingsRepresentative.ts"));
4758
4772
  /* --- Tasks executors ---------------------------------------------------------------------------------------------- */
4759
4773
  const GulpStreamsBasedSourceCodeProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedSourceCodeProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedSourceCodeProcessor.ts"));
4760
4774
  /* --- Gulp plugins ------------------------------------------------------------------------------------------------- */
@@ -4763,7 +4777,7 @@ const gulp_pug_1 = __importDefault(__webpack_require__(/*! gulp-pug */ "gulp-pug
4763
4777
  const gulp_intercept_1 = __importDefault(__webpack_require__(/*! gulp-intercept */ "gulp-intercept"));
4764
4778
  const gulp_html_prettify_1 = __importDefault(__webpack_require__(/*! gulp-html-prettify */ "gulp-html-prettify"));
4765
4779
  /* --- Applied utils ------------------------------------------------------------------------------------------------ */
4766
- const AssetsPathsAliasesResolverForHTML_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML.ts"));
4780
+ const ResourceFilesPathsAliasesResolverForHTML_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/AssetsPathsAliasesResolverForHTML/ResourceFilesPathsAliasesResolverForHTML */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/ResourceFilesPathsAliasesResolverForHTML.ts"));
4767
4781
  const HTML_Validator_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/HTML_Validator/HTML_Validator */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_Validator.ts"));
4768
4782
  const AccessibilityInspector_1 = __importDefault(__webpack_require__(/*! ./Plugins/AccessibilityInspector/AccessibilityInspector */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AccessibilityInspector/AccessibilityInspector.ts"));
4769
4783
  const removeExtraSpacesFromJapaneseText_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/removeExtraSpacesFromJapaneseText */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/removeExtraSpacesFromJapaneseText.ts"));
@@ -4822,13 +4836,13 @@ class MarkupProcessor extends GulpStreamsBasedSourceCodeProcessor_1.default {
4822
4836
  fileInInitialState.processingSettings = markupEntryPointsGroupSettingsActualForCurrentFile;
4823
4837
  /* [ Theory ] The value of 'path' could change during file processing. */
4824
4838
  fileInInitialState.sourceAbsolutePath = ImprovedPath_1.default.replacePathSeparatorsToForwardSlashes(fileInInitialState.path);
4825
- fileInInitialState.outputDirectoryAbsolutePath = this.markupProcessingConfigRepresentative.
4839
+ fileInInitialState.outputDirectoryAbsolutePath = MarkupProcessingSettingsRepresentative_1.default.
4826
4840
  computeRelevantOutputDirectoryAbsolutePathForTargetSourceFile(fileInInitialState.path, markupEntryPointsGroupSettingsActualForCurrentFile);
4827
4841
  return fileInInitialState;
4828
4842
  }
4829
4843
  onRawOutputCode(_compiledHTML_File) {
4830
4844
  const compiledHTML_File = _compiledHTML_File;
4831
- compiledHTML_File.contents = Buffer.from(AssetsPathsAliasesResolverForHTML_1.default.getHTML_CodeWithResolvedAliases(compiledHTML_File, this.masterConfigRepresentative));
4845
+ compiledHTML_File.contents = Buffer.from(ResourceFilesPathsAliasesResolverForHTML_1.default.resolvePathAliases(compiledHTML_File, this.masterConfigRepresentative));
4832
4846
  return compiledHTML_File;
4833
4847
  }
4834
4848
  onPostProcessedCode(_compiledHTML_File) {
@@ -4864,7 +4878,7 @@ const AccessibilityInspectorLocalization_english_1 = __importDefault(__webpack_r
4864
4878
  /* --- Applied utils ------------------------------------------------------------------------------------------------ */
4865
4879
  const access_sniff_1 = __importDefault(__webpack_require__(/*! access-sniff */ "access-sniff"));
4866
4880
  const node_notifier_1 = __importDefault(__webpack_require__(/*! node-notifier */ "node-notifier"));
4867
- const extractStringifiedContentFromVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/extractStringifiedContentFromVinylFile */ "./Utils/extractStringifiedContentFromVinylFile.ts"));
4881
+ const getExpectedToBeNonNullStringifiedContentOfVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile */ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts"));
4868
4882
  const isCompiledHTML_ContentEmpty_1 = __importDefault(__webpack_require__(/*! @Utils/isCompiledHTML_ContentEmpty */ "./Utils/isCompiledHTML_ContentEmpty.ts"));
4869
4883
  /* --- General utils ------------------------------------------------------------------------------------------------ */
4870
4884
  const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
@@ -4873,7 +4887,7 @@ const Stopwatch_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/Stop
4873
4887
  class AccessibilityInspector {
4874
4888
  static localization = AccessibilityInspectorLocalization_english_1.default;
4875
4889
  static inspectAccessibility(compiledHTML_File, masterConfigRepresentative) {
4876
- const extractedHTML_Code = (0, extractStringifiedContentFromVinylFile_1.default)(compiledHTML_File);
4890
+ const extractedHTML_Code = (0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File);
4877
4891
  const targetFileRelativePath = ImprovedPath_1.default.computeRelativePath({
4878
4892
  basePath: masterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
4879
4893
  comparedPath: compiledHTML_File.path
@@ -4888,7 +4902,7 @@ class AccessibilityInspector {
4888
4902
  * 1. With '{ verbose: true }' (default) it will be a lot of recommendations which never disappear. The output pollution.
4889
4903
  * 2. In `import AccessSniff, { reports } from 'access-sniff';`, the 'reports' are 'undefined',
4890
4904
  * 3. In 'then(function(report) {}}', the 'report' is an empty object. */
4891
- (0, access_sniff_1.default)((0, extractStringifiedContentFromVinylFile_1.default)(compiledHTML_File), {
4905
+ (0, access_sniff_1.default)((0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File), {
4892
4906
  verbose: false,
4893
4907
  accessibilityLevel: compiledHTML_File.processingSettings.accessibilityInspection.standard
4894
4908
  }).
@@ -4947,7 +4961,7 @@ const AccessibilityInspectorLocalization__English = {
4947
4961
  description: `Begin the inspection of file '${namedParameters.targetFileRelativePath}' ...`
4948
4962
  }),
4949
4963
  generateInspectionFinishedWithNoIssuesFoundSuccessLog: (namedParameters) => ({
4950
- title: "HTML validation finished",
4964
+ title: "Accessibility inspection finished",
4951
4965
  description: `File '${namedParameters.targetFileRelativePath}' is has not the accessibility issues.\n` +
4952
4966
  `${namedParameters.secondsElapsed} seconds elapsed.`
4953
4967
  }),
@@ -4972,10 +4986,50 @@ exports["default"] = AccessibilityInspectorLocalization__English;
4972
4986
 
4973
4987
  /***/ }),
4974
4988
 
4975
- /***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML.ts":
4976
- /*!************************************************************************************************************************************!*\
4977
- !*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML.ts ***!
4978
- \************************************************************************************************************************************/
4989
+ /***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML_Localization.english.ts":
4990
+ /*!*********************************************************************************************************************************************************!*\
4991
+ !*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML_Localization.english.ts ***!
4992
+ \*********************************************************************************************************************************************************/
4993
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4994
+
4995
+
4996
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
4997
+ const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
4998
+ const assetsPathsAliasesResolverForHTML_Localization__english = {
4999
+ generateUnableToResolveShortenedAbsolutePathWarning: (namedParameters) => ({
5000
+ title: `${(0, es_extensions_1.capitalizeFirstCharacter)(namedParameters.filesType__singularForm)} file, unable to resolve the absolute path`,
5001
+ description: `Unable to resolve the shortened absolute path for the ${namedParameters.filesType__singularForm} file ` +
5002
+ `because no public path has been specified for '${namedParameters.projectBuildingMode}' project building mode. ` +
5003
+ "Relative path will be used instead."
5004
+ }),
5005
+ generateUnknownSourceFileTopDirectoryAliasWarning: (namedParameters) => ({
5006
+ title: `${namedParameters.fileType__singularForm} file, unknown directory path alias`,
5007
+ description: `The alias '${namedParameters.firstPathSegment}' in path ` +
5008
+ `'${namedParameters.pickedPathOfTargetResourceFile}' has not been specified neither explicitly nor implicitly ` +
5009
+ "(via resources group name). Below directories paths' aliases are available for usage: \n" +
5010
+ `${namedParameters.formattedSourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap}`
5011
+ }),
5012
+ generateNoMatchingsForAliasedFilePathWithoutFilenameExtensionWarning: (namedParameters) => ({
5013
+ title: `Unknown path to ${namedParameters.fileType__singularForm} file`,
5014
+ description: `The aliased path '${namedParameters.pickedPathOfTargetResourceFile}' without filename extension ` +
5015
+ "refers to unknown file. Tried to search with all supported filename extensions: " +
5016
+ `${namedParameters.checkedAbsolutePaths__formatted}.`
5017
+ }),
5018
+ generateNoOutputFileExistingForSpecifiedSourceFilePath: (namedParameters) => ({
5019
+ title: `Unknown path to ${namedParameters.fileType__singularForm} file`,
5020
+ description: `No ${namedParameters.fileType__singularForm} output file has been found for specified aliased source ` +
5021
+ `file path '${namedParameters.pickedPathOfTargetResourceFile}'.`
5022
+ })
5023
+ };
5024
+ exports["default"] = assetsPathsAliasesResolverForHTML_Localization__english;
5025
+
5026
+
5027
+ /***/ }),
5028
+
5029
+ /***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/ResourceFilesPathsAliasesResolverForHTML.ts":
5030
+ /*!*******************************************************************************************************************************************!*\
5031
+ !*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/ResourceFilesPathsAliasesResolverForHTML.ts ***!
5032
+ \*******************************************************************************************************************************************/
4979
5033
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
4980
5034
 
4981
5035
 
@@ -4987,60 +5041,66 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
4987
5041
  const AssetsPathsAliasesResolverForHTML_Localization_english_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML_Localization.english */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML_Localization.english.ts"));
4988
5042
  /* --- Applied auxiliaries ------------------------------------------------------------------------------------------ */
4989
5043
  const cheerio_1 = __importDefault(__webpack_require__(/*! cheerio */ "cheerio"));
4990
- const extractStringifiedContentFromVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/extractStringifiedContentFromVinylFile */ "./Utils/extractStringifiedContentFromVinylFile.ts"));
5044
+ const getExpectedToBeNonNullStringifiedContentOfVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile */ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts"));
4991
5045
  /* --- General auxiliaries ------------------------------------------------------------------------------------------ */
4992
5046
  const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
4993
5047
  const ImprovedPath_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/ImprovedPath/ImprovedPath */ "./UtilsIncubator/ImprovedPath/ImprovedPath.ts"));
4994
- class AssetsPathsAliasesResolverForHTML {
5048
+ class ResourceFilesPathsAliasesResolverForHTML {
4995
5049
  static localization = AssetsPathsAliasesResolverForHTML_Localization_english_1.default;
4996
5050
  compiledHTML_File;
4997
- $HTML_FileContentCheerioCapturing;
5051
+ HTML_FileContentCheerioCapturing;
4998
5052
  masterConfigRepresentative;
4999
- static getHTML_CodeWithResolvedAliases(compiledHTML_File, masterConfigRepresentative) {
5000
- return new AssetsPathsAliasesResolverForHTML(compiledHTML_File, masterConfigRepresentative).
5053
+ static resolvePathAliases(compiledHTML_File, masterConfigRepresentative) {
5054
+ return new ResourceFilesPathsAliasesResolverForHTML(compiledHTML_File, masterConfigRepresentative).
5001
5055
  resolveStylesheetsPathsAliases().
5002
5056
  resoleScriptsPathsAliases().
5003
5057
  resolveImagesPathsAliases().
5004
5058
  resolveVideosPathsAliases().
5005
5059
  resolveAudiosPathsAliases().
5006
- /* 理論 { decodeEntities: false }が無ければ、全ての漢字等は'文'の様にユニコード実体に成る。 */
5007
- $HTML_FileContentCheerioCapturing.html({ decodeEntities: false });
5060
+ /* [ Theory ] Without '{ decodeEntities: false }' all ideographic characters will be converted to entities
5061
+ * like '文' what could cause some troubles during HTML code post-processing. */
5062
+ HTML_FileContentCheerioCapturing.
5063
+ html({ decodeEntities: false });
5008
5064
  }
5009
5065
  constructor(compiledHTML_File, masterConfigRepresentative) {
5010
5066
  this.compiledHTML_File = compiledHTML_File;
5011
- this.$HTML_FileContentCheerioCapturing = cheerio_1.default.load((0, extractStringifiedContentFromVinylFile_1.default)(compiledHTML_File));
5067
+ this.HTML_FileContentCheerioCapturing = cheerio_1.default.load((0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File));
5012
5068
  this.masterConfigRepresentative = masterConfigRepresentative;
5013
5069
  }
5014
5070
  resolveStylesheetsPathsAliases() {
5015
5071
  if ((0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.stylesProcessingSettingsRepresentative)) {
5016
5072
  return this;
5017
5073
  }
5018
- const stylesProcessingConfigRepresentative = this.masterConfigRepresentative.stylesProcessingSettingsRepresentative;
5019
- for (const linkElement of Array.from(this.$HTML_FileContentCheerioCapturing("link[rel='stylesheet']"))) {
5020
- const $LinkElement = this.$HTML_FileContentCheerioCapturing(linkElement);
5021
- const hrefAttributeValue = $LinkElement.attr("href");
5022
- if ((0, es_extensions_1.isUndefined)(hrefAttributeValue)) {
5074
+ const stylesProcessingSettingsRepresentative = this.masterConfigRepresentative.stylesProcessingSettingsRepresentative;
5075
+ for (const linkElement of Array.from(this.HTML_FileContentCheerioCapturing("link[rel='stylesheet']"))) {
5076
+ const $linkElement = this.HTML_FileContentCheerioCapturing(linkElement);
5077
+ const hrefAttributeValue = $linkElement.attr("href");
5078
+ if (!(0, es_extensions_1.isNonEmptyString)(hrefAttributeValue)) {
5023
5079
  continue;
5024
5080
  }
5025
- const stylesheetResolvedOutputAbsolutePath = AssetsPathsAliasesResolverForHTML.
5026
- resolveOutputAssetFileAbsolutePathIfPossible({
5027
- pickedURL: hrefAttributeValue,
5028
- filePathAliasPrefix: "@",
5029
- sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(stylesProcessingConfigRepresentative.entryPointsGroupsNormalizedSettingsMappedByPathAliases, (pathAlias, stylesEntryPointsGroupNormalizedSettings) => [
5081
+ const resolvedOutputAbsolutePathOfStylesheet = this.resolveOutputResourceFileAbsolutePathIfPossible({
5082
+ pickedPathOfTargetResourceFile: hrefAttributeValue,
5083
+ prefixOfAliasOfTopDirectoryOfResourcesGroup: stylesProcessingSettingsRepresentative.
5084
+ prefixOfAliasOfTopDirectoryOfEntryPointsGroup,
5085
+ sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(stylesProcessingSettingsRepresentative.entryPointsGroupsNormalizedSettingsMappedByPathAliases, (pathAlias, stylesEntryPointsGroupNormalizedSettings) => [
5030
5086
  pathAlias,
5031
5087
  stylesEntryPointsGroupNormalizedSettings.isSingeEntryPointGroup ?
5032
5088
  stylesEntryPointsGroupNormalizedSettings.sourceFilesGlobSelectors[0] :
5033
5089
  stylesEntryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath
5034
5090
  ]),
5035
- supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: stylesProcessingConfigRepresentative.
5091
+ supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: stylesProcessingSettingsRepresentative.
5036
5092
  supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots,
5037
- sourceAndOutputFilesAbsolutePathsCorrespondenceMap: stylesProcessingConfigRepresentative.sourceAndOutputFilesAbsolutePathsCorrespondenceMap,
5038
- fileTypeForLogging: stylesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5093
+ sourceAndOutputFilesAbsolutePathsCorrespondenceMap: stylesProcessingSettingsRepresentative.sourceAndOutputFilesAbsolutePathsCorrespondenceMap,
5094
+ fileTypeForLogging__singularForm: stylesProcessingSettingsRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM,
5095
+ fileTypeForLogging__pluralForm: stylesProcessingSettingsRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5039
5096
  });
5040
- if ((0, es_extensions_1.isNull)(stylesheetResolvedOutputAbsolutePath)) {
5097
+ if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfStylesheet)) {
5041
5098
  continue;
5042
5099
  }
5043
- $LinkElement.attr("href", this.buildFinalAssetURL(stylesheetResolvedOutputAbsolutePath, stylesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM));
5100
+ $linkElement.attr("href", this.buildResourceFileFinalPath({
5101
+ resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfStylesheet,
5102
+ resourceFileType__singularForm: stylesProcessingSettingsRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5103
+ }));
5044
5104
  }
5045
5105
  return this;
5046
5106
  }
@@ -5049,16 +5109,16 @@ class AssetsPathsAliasesResolverForHTML {
5049
5109
  return this;
5050
5110
  }
5051
5111
  const ECMA_ScriptLogicProcessingConfigRepresentative = this.masterConfigRepresentative.ECMA_ScriptLogicProcessingSettingsRepresentative;
5052
- for (const scriptElement of Array.from(this.$HTML_FileContentCheerioCapturing("script"))) {
5053
- const $ScriptElement = this.$HTML_FileContentCheerioCapturing(scriptElement);
5054
- const srcAttributeValue = $ScriptElement.attr("src");
5055
- if ((0, es_extensions_1.isUndefined)(srcAttributeValue)) {
5112
+ for (const scriptElement of Array.from(this.HTML_FileContentCheerioCapturing("script"))) {
5113
+ const $scriptElement = this.HTML_FileContentCheerioCapturing(scriptElement);
5114
+ const srcAttributeValue = $scriptElement.attr("src");
5115
+ if (!(0, es_extensions_1.isNonEmptyString)(srcAttributeValue)) {
5056
5116
  continue;
5057
5117
  }
5058
- const scriptResolvedOutputAbsolutePath = AssetsPathsAliasesResolverForHTML.
5059
- resolveOutputAssetFileAbsolutePathIfPossible({
5060
- pickedURL: srcAttributeValue,
5061
- filePathAliasPrefix: "@",
5118
+ const resolvedOutputAbsolutePathOfScript = this.resolveOutputResourceFileAbsolutePathIfPossible({
5119
+ pickedPathOfTargetResourceFile: srcAttributeValue,
5120
+ prefixOfAliasOfTopDirectoryOfResourcesGroup: ECMA_ScriptLogicProcessingConfigRepresentative.
5121
+ prefixOfAliasOfTopDirectoryOfEntryPointsGroup,
5062
5122
  sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(ECMA_ScriptLogicProcessingConfigRepresentative.entryPointsGroupsNormalizedSettingsMappedByPathAliases, (pathAlias, entryPointsGroupNormalizedSettings) => [
5063
5123
  pathAlias,
5064
5124
  entryPointsGroupNormalizedSettings.isSingeEntryPointGroup ?
@@ -5067,12 +5127,19 @@ class AssetsPathsAliasesResolverForHTML {
5067
5127
  ]),
5068
5128
  supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: ECMA_ScriptLogicProcessingConfigRepresentative.supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots,
5069
5129
  sourceAndOutputFilesAbsolutePathsCorrespondenceMap: ECMA_ScriptLogicProcessingConfigRepresentative.entryPointsSourceFilesAbsolutePathsAndOutputFilesActualPathsMap,
5070
- fileTypeForLogging: ECMA_ScriptLogicProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5130
+ fileTypeForLogging__singularForm: ECMA_ScriptLogicProcessingConfigRepresentative.
5131
+ TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM,
5132
+ fileTypeForLogging__pluralForm: ECMA_ScriptLogicProcessingConfigRepresentative.
5133
+ TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5071
5134
  });
5072
- if ((0, es_extensions_1.isNull)(scriptResolvedOutputAbsolutePath)) {
5135
+ if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfScript)) {
5073
5136
  continue;
5074
5137
  }
5075
- $ScriptElement.attr("src", this.buildFinalAssetURL(scriptResolvedOutputAbsolutePath, ECMA_ScriptLogicProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM));
5138
+ $scriptElement.attr("src", this.buildResourceFileFinalPath({
5139
+ resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfScript,
5140
+ resourceFileType__singularForm: ECMA_ScriptLogicProcessingConfigRepresentative.
5141
+ TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
5142
+ }));
5076
5143
  }
5077
5144
  return this;
5078
5145
  }
@@ -5081,47 +5148,55 @@ class AssetsPathsAliasesResolverForHTML {
5081
5148
  return this;
5082
5149
  }
5083
5150
  const imagesProcessingConfigRepresentative = this.masterConfigRepresentative.imagesProcessingSettingsRepresentative;
5084
- for (const imageElement of Array.from(this.$HTML_FileContentCheerioCapturing("img"))) {
5085
- const $ImageElement = this.$HTML_FileContentCheerioCapturing(imageElement);
5086
- const srcAttributeValue = $ImageElement.attr("src");
5087
- if ((0, es_extensions_1.isUndefined)(srcAttributeValue)) {
5151
+ for (const imageElement of Array.from(this.HTML_FileContentCheerioCapturing("img"))) {
5152
+ const $imageElement = this.HTML_FileContentCheerioCapturing(imageElement);
5153
+ const srcAttributeValue = $imageElement.attr("src");
5154
+ if (!(0, es_extensions_1.isNonEmptyString)(srcAttributeValue)) {
5088
5155
  continue;
5089
5156
  }
5090
- const imageResolvedOutputAbsolutePath = AssetsPathsAliasesResolverForHTML.
5091
- resolveOutputAssetFileAbsolutePathIfPossible({
5092
- pickedURL: srcAttributeValue,
5093
- filePathAliasPrefix: imagesProcessingConfigRepresentative.filePathAliasPrefix,
5157
+ const resolvedOutputAbsolutePathOfImage = this.resolveOutputResourceFileAbsolutePathIfPossible({
5158
+ pickedPathOfTargetResourceFile: srcAttributeValue,
5159
+ prefixOfAliasOfTopDirectoryOfResourcesGroup: imagesProcessingConfigRepresentative.
5160
+ prefixOfAliasOfTopDirectoryOfEntryPointsGroup,
5094
5161
  sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(imagesProcessingConfigRepresentative.assetsGroupsNormalizedSettingsMappedByAssetAliases, (pathAlias, stylesEntryPointsGroupNormalizedSettings) => [pathAlias, stylesEntryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath]),
5095
5162
  supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: imagesProcessingConfigRepresentative.supportedSourceFilesNamesExtensionsWithoutLeadingDots,
5096
5163
  sourceAndOutputFilesAbsolutePathsCorrespondenceMap: imagesProcessingConfigRepresentative.sourceFilesAbsolutePathsAndOutputFilesActualPathsMap,
5097
- fileTypeForLogging: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5164
+ fileTypeForLogging__singularForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM,
5165
+ fileTypeForLogging__pluralForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5098
5166
  });
5099
- if ((0, es_extensions_1.isNull)(imageResolvedOutputAbsolutePath)) {
5167
+ if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfImage)) {
5100
5168
  continue;
5101
5169
  }
5102
- $ImageElement.attr("src", this.buildFinalAssetURL(imageResolvedOutputAbsolutePath, imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM));
5170
+ $imageElement.attr("src", this.buildResourceFileFinalPath({
5171
+ resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfImage,
5172
+ resourceFileType__singularForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5173
+ }));
5103
5174
  }
5104
- for (const linkElement of Array.from(this.$HTML_FileContentCheerioCapturing("link[type='image/x-icon']"))) {
5105
- const $LinkElement = this.$HTML_FileContentCheerioCapturing(linkElement);
5106
- const hrefAttributeValue = $LinkElement.attr("href");
5175
+ for (const linkElement of Array.from(this.HTML_FileContentCheerioCapturing("link[type='image/x-icon']"))) {
5176
+ const $linkElement = this.HTML_FileContentCheerioCapturing(linkElement);
5177
+ const hrefAttributeValue = $linkElement.attr("href");
5107
5178
  if ((0, es_extensions_1.isUndefined)(hrefAttributeValue)) {
5108
5179
  continue;
5109
5180
  }
5110
- const imageResolvedOutputAbsolutePath = AssetsPathsAliasesResolverForHTML.
5111
- resolveOutputAssetFileAbsolutePathIfPossible({
5112
- pickedURL: hrefAttributeValue,
5113
- filePathAliasPrefix: imagesProcessingConfigRepresentative.filePathAliasPrefix,
5181
+ const imageResolvedOutputAbsolutePath = this.resolveOutputResourceFileAbsolutePathIfPossible({
5182
+ pickedPathOfTargetResourceFile: hrefAttributeValue,
5183
+ prefixOfAliasOfTopDirectoryOfResourcesGroup: imagesProcessingConfigRepresentative.
5184
+ prefixOfAliasOfTopDirectoryOfEntryPointsGroup,
5114
5185
  sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(imagesProcessingConfigRepresentative.assetsGroupsNormalizedSettingsMappedByAssetAliases, (pathAlias, stylesEntryPointsGroupNormalizedSettings) => [
5115
5186
  pathAlias, stylesEntryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath
5116
5187
  ]),
5117
5188
  supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: imagesProcessingConfigRepresentative.supportedSourceFilesNamesExtensionsWithoutLeadingDots,
5118
5189
  sourceAndOutputFilesAbsolutePathsCorrespondenceMap: imagesProcessingConfigRepresentative.sourceFilesAbsolutePathsAndOutputFilesActualPathsMap,
5119
- fileTypeForLogging: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5190
+ fileTypeForLogging__singularForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM,
5191
+ fileTypeForLogging__pluralForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5120
5192
  });
5121
5193
  if ((0, es_extensions_1.isNull)(imageResolvedOutputAbsolutePath)) {
5122
5194
  continue;
5123
5195
  }
5124
- $LinkElement.attr("href", this.buildFinalAssetURL(imageResolvedOutputAbsolutePath, imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM));
5196
+ $linkElement.attr("href", this.buildResourceFileFinalPath({
5197
+ resolvedOutputAbsolutePathOfResourceFile: imageResolvedOutputAbsolutePath,
5198
+ resourceFileType__singularForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
5199
+ }));
5125
5200
  }
5126
5201
  return this;
5127
5202
  }
@@ -5130,159 +5205,134 @@ class AssetsPathsAliasesResolverForHTML {
5130
5205
  return this;
5131
5206
  }
5132
5207
  const videosProcessingConfigRepresentative = this.masterConfigRepresentative.videosProcessingSettingsRepresentative;
5133
- for (const sourceElement of Array.from(this.$HTML_FileContentCheerioCapturing("video > source"))) {
5134
- const $SourceElement = this.$HTML_FileContentCheerioCapturing(sourceElement);
5135
- const srcAttributeValue = $SourceElement.attr("src");
5136
- if ((0, es_extensions_1.isUndefined)(srcAttributeValue)) {
5208
+ for (const sourceElement of Array.from(this.HTML_FileContentCheerioCapturing("video > source"))) {
5209
+ const $sourceElement = this.HTML_FileContentCheerioCapturing(sourceElement);
5210
+ const srcAttributeValue = $sourceElement.attr("src");
5211
+ if (!(0, es_extensions_1.isNonEmptyString)(srcAttributeValue)) {
5137
5212
  continue;
5138
5213
  }
5139
- const videoResolvedOutputAbsolutePath = AssetsPathsAliasesResolverForHTML.
5140
- resolveOutputAssetFileAbsolutePathIfPossible({
5141
- pickedURL: srcAttributeValue,
5142
- filePathAliasPrefix: videosProcessingConfigRepresentative.filePathAliasPrefix,
5214
+ const resolvedOutputAbsolutePathOfVideo = this.resolveOutputResourceFileAbsolutePathIfPossible({
5215
+ pickedPathOfTargetResourceFile: srcAttributeValue,
5216
+ prefixOfAliasOfTopDirectoryOfResourcesGroup: videosProcessingConfigRepresentative.
5217
+ prefixOfAliasOfTopDirectoryOfEntryPointsGroup,
5143
5218
  sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(videosProcessingConfigRepresentative.assetsGroupsNormalizedSettingsMappedByAssetAliases, (pathAlias, stylesEntryPointsGroupNormalizedSettings) => [pathAlias, stylesEntryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath]),
5144
5219
  supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: videosProcessingConfigRepresentative.supportedSourceFilesNamesExtensionsWithoutLeadingDots,
5145
5220
  sourceAndOutputFilesAbsolutePathsCorrespondenceMap: videosProcessingConfigRepresentative.sourceFilesAbsolutePathsAndOutputFilesActualPathsMap,
5146
- fileTypeForLogging: videosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5221
+ fileTypeForLogging__singularForm: videosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM,
5222
+ fileTypeForLogging__pluralForm: videosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5147
5223
  });
5148
- if ((0, es_extensions_1.isNull)(videoResolvedOutputAbsolutePath)) {
5224
+ if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfVideo)) {
5149
5225
  continue;
5150
5226
  }
5151
- $SourceElement.attr("src", this.buildFinalAssetURL(videoResolvedOutputAbsolutePath, videosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM));
5227
+ $sourceElement.attr("src", this.buildResourceFileFinalPath({
5228
+ resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfVideo,
5229
+ resourceFileType__singularForm: videosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
5230
+ }));
5152
5231
  }
5153
5232
  return this;
5154
5233
  }
5155
- /* --- 録音 -------------------------------------------------------------------------------------------------------- */
5156
5234
  resolveAudiosPathsAliases() {
5157
5235
  if ((0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.audiosProcessingSettingsRepresentative)) {
5158
5236
  return this;
5159
5237
  }
5160
5238
  const audiosProcessingConfigRepresentative = this.masterConfigRepresentative.audiosProcessingSettingsRepresentative;
5161
- for (const sourceElement of Array.from(this.$HTML_FileContentCheerioCapturing("audio > source"))) {
5162
- const $SourceElement = this.$HTML_FileContentCheerioCapturing(sourceElement);
5163
- const srcAttributeValue = $SourceElement.attr("src");
5239
+ for (const sourceElement of Array.from(this.HTML_FileContentCheerioCapturing("audio > source"))) {
5240
+ const $sourceElement = this.HTML_FileContentCheerioCapturing(sourceElement);
5241
+ const srcAttributeValue = $sourceElement.attr("src");
5164
5242
  if ((0, es_extensions_1.isUndefined)(srcAttributeValue)) {
5165
5243
  continue;
5166
5244
  }
5167
- const audioResolvedOutputAbsolutePath = AssetsPathsAliasesResolverForHTML.
5168
- resolveOutputAssetFileAbsolutePathIfPossible({
5169
- pickedURL: srcAttributeValue,
5170
- filePathAliasPrefix: audiosProcessingConfigRepresentative.filePathAliasPrefix,
5245
+ const resolvedOutputAbsolutePathOfVideo = this.resolveOutputResourceFileAbsolutePathIfPossible({
5246
+ pickedPathOfTargetResourceFile: srcAttributeValue,
5247
+ prefixOfAliasOfTopDirectoryOfResourcesGroup: audiosProcessingConfigRepresentative.
5248
+ prefixOfAliasOfTopDirectoryOfEntryPointsGroup,
5171
5249
  sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(audiosProcessingConfigRepresentative.assetsGroupsNormalizedSettingsMappedByAssetAliases, (pathAlias, stylesEntryPointsGroupNormalizedSettings) => [pathAlias, stylesEntryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath]),
5172
5250
  supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: audiosProcessingConfigRepresentative.supportedSourceFilesNamesExtensionsWithoutLeadingDots,
5173
5251
  sourceAndOutputFilesAbsolutePathsCorrespondenceMap: audiosProcessingConfigRepresentative.sourceFilesAbsolutePathsAndOutputFilesActualPathsMap,
5174
- fileTypeForLogging: audiosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5252
+ fileTypeForLogging__singularForm: audiosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM,
5253
+ fileTypeForLogging__pluralForm: audiosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
5175
5254
  });
5176
- if ((0, es_extensions_1.isNull)(audioResolvedOutputAbsolutePath)) {
5255
+ if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfVideo)) {
5177
5256
  continue;
5178
5257
  }
5179
- $SourceElement.attr("src", this.buildFinalAssetURL(audioResolvedOutputAbsolutePath, audiosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM));
5258
+ $sourceElement.attr("src", this.buildResourceFileFinalPath({
5259
+ resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfVideo,
5260
+ resourceFileType__singularForm: audiosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
5261
+ }));
5180
5262
  }
5181
5263
  return this;
5182
5264
  }
5183
5265
  /* --- Helpers ---------------------------------------------------------------------------------------------------- */
5184
- buildFinalAssetURL(assetResolvedOutputAbsolutePath, assetTypeForLogging) {
5185
- if (this.masterConfigRepresentative.isDevelopmentBuildingMode ||
5186
- (0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.actualPublicDirectoryAbsolutePath)) {
5187
- if (!this.masterConfigRepresentative.isDevelopmentBuildingMode &&
5188
- (0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.actualPublicDirectoryAbsolutePath)) {
5189
- es_extensions_1.Logger.logWarning(AssetsPathsAliasesResolverForHTML.localization.generateUnableToComputeShortenedAbsolutePathWarning({
5190
- projectBuildingMode: this.masterConfigRepresentative.consumingProjectBuildingMode,
5191
- filesTypeForLogging: assetTypeForLogging
5192
- }));
5193
- }
5194
- return ImprovedPath_1.default.computeRelativePath({
5195
- basePath: this.compiledHTML_File.outputDirectoryAbsolutePath,
5196
- comparedPath: assetResolvedOutputAbsolutePath
5197
- });
5198
- }
5199
- return `/${ImprovedPath_1.default.computeRelativePath({
5200
- basePath: this.masterConfigRepresentative.actualPublicDirectoryAbsolutePath,
5201
- comparedPath: assetResolvedOutputAbsolutePath
5202
- })}`;
5203
- }
5204
- static resolveOutputAssetFileAbsolutePathIfPossible({ pickedURL, filePathAliasPrefix, sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap, supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots, sourceAndOutputFilesAbsolutePathsCorrespondenceMap, fileTypeForLogging }) {
5205
- const pickedURL_Segments = ImprovedPath_1.default.splitPathToSegments(pickedURL);
5206
- const firstURL_Segment__possiblyPathAlias = pickedURL_Segments[0];
5207
- if ((0, es_extensions_1.isUndefined)(firstURL_Segment__possiblyPathAlias) ||
5208
- !firstURL_Segment__possiblyPathAlias.startsWith(filePathAliasPrefix)) {
5266
+ /* eslint-disable-next-line class-methods-use-this --
5267
+ * The method is being used before non-static "buildResourceFileFinalPath", so in this case it has been declared first. */
5268
+ resolveOutputResourceFileAbsolutePathIfPossible({ pickedPathOfTargetResourceFile, prefixOfAliasOfTopDirectoryOfResourcesGroup, sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap, supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots, sourceAndOutputFilesAbsolutePathsCorrespondenceMap, fileTypeForLogging__pluralForm }) {
5269
+ const segmentsOfPickedPath = ImprovedPath_1.default.splitPathToSegments(pickedPathOfTargetResourceFile);
5270
+ const firstSegmentOfPickedPath = segmentsOfPickedPath[0];
5271
+ if ((0, es_extensions_1.isUndefined)(firstSegmentOfPickedPath) ||
5272
+ !firstSegmentOfPickedPath.startsWith(prefixOfAliasOfTopDirectoryOfResourcesGroup)) {
5209
5273
  return null;
5210
5274
  }
5211
- const sourceFilesTopDirectoryAbsolutePathForCurrentAlias = sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap.get(firstURL_Segment__possiblyPathAlias);
5212
- if ((0, es_extensions_1.isUndefined)(sourceFilesTopDirectoryAbsolutePathForCurrentAlias)) {
5213
- es_extensions_1.Logger.logWarning(AssetsPathsAliasesResolverForHTML.localization.generateUnknownSourceFileTopDirectoryAliasWarning({
5214
- fileTypeForLogging,
5215
- firstPathSegment: firstURL_Segment__possiblyPathAlias,
5216
- pickedPath: pickedURL,
5275
+ const sourceFilesTopDirectoryAbsolutePathOfCurrentAlias = sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap.get(firstSegmentOfPickedPath);
5276
+ if ((0, es_extensions_1.isUndefined)(sourceFilesTopDirectoryAbsolutePathOfCurrentAlias)) {
5277
+ es_extensions_1.Logger.logWarning(ResourceFilesPathsAliasesResolverForHTML.localization.generateUnknownSourceFileTopDirectoryAliasWarning({
5278
+ fileType__singularForm: fileTypeForLogging__pluralForm,
5279
+ firstPathSegment: firstSegmentOfPickedPath,
5280
+ pickedPathOfTargetResourceFile,
5217
5281
  formattedSourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(Array.from(sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap.entries()))
5218
5282
  }));
5219
5283
  return null;
5220
5284
  }
5221
- const sourceFileComputedAbsolutePath__possiblyWithoutFilenameExtension = ImprovedPath_1.default.joinPathSegments(sourceFilesTopDirectoryAbsolutePathForCurrentAlias, ...pickedURL_Segments.slice(1));
5285
+ const sourceFileComputedAbsolutePathPossiblyWithoutFileNameExtension = ImprovedPath_1.default.joinPathSegments(sourceFilesTopDirectoryAbsolutePathOfCurrentAlias, ...segmentsOfPickedPath.slice(1));
5222
5286
  const explicitlySpecifiedSourceFilenameExtension = ImprovedPath_1.default.
5223
- extractLastFilenameExtensionWithoutFirstDot(sourceFileComputedAbsolutePath__possiblyWithoutFilenameExtension);
5287
+ extractLastFilenameExtensionWithoutFirstDot(sourceFileComputedAbsolutePathPossiblyWithoutFileNameExtension);
5224
5288
  if ((0, es_extensions_1.isNull)(explicitlySpecifiedSourceFilenameExtension)) {
5225
- const sourceFilesPossibleAbsolutePaths = supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots.map((supportedStylesheetFileNameExtensionWithoutDot) => `${sourceFileComputedAbsolutePath__possiblyWithoutFilenameExtension}.` +
5226
- `${supportedStylesheetFileNameExtensionWithoutDot}`);
5227
- const searchResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap = (0, es_extensions_1.filterMap)(sourceAndOutputFilesAbsolutePathsCorrespondenceMap, (sourceFileAbsolutePath) => sourceFilesPossibleAbsolutePaths.includes(sourceFileAbsolutePath));
5228
- if (searchResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.size === 0) {
5229
- es_extensions_1.Logger.logWarning({
5230
- title: `${fileTypeForLogging}ファイル、不明パスアリアス`,
5231
- description: `${fileTypeForLogging}ファイル:「${pickedURL}」に在るアリアス:${firstURL_Segment__possiblyPathAlias}に` +
5232
- "該当する出力ファイルが見つけられなかった。"
5233
- });
5234
- return null;
5235
- }
5236
- else if (searchResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.size > 1) {
5237
- es_extensions_1.Logger.logWarning({
5238
- title: `${fileTypeForLogging}ファイル、漠然パスアリアス`,
5239
- description: `${fileTypeForLogging}ファイル:「${pickedURL}」に在るアリアス:${firstURL_Segment__possiblyPathAlias}は複数` +
5240
- `のファイルに該当している:\n${(0, es_extensions_1.stringifyAndFormatArbitraryValue)(Array.from(searchResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.values()))}\n其の場合は、源ファイルのファイル名拡張子を明示的に指定するのが必要。`
5241
- });
5289
+ const possibleAbsolutePathsOfTargetSourceFile = supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots.map((supportedStylesheetFileNameExtensionWithoutLeadingDot) => `${sourceFileComputedAbsolutePathPossiblyWithoutFileNameExtension}.` +
5290
+ `${supportedStylesheetFileNameExtensionWithoutLeadingDot}`);
5291
+ const searchingResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap = (0, es_extensions_1.filterMap)(sourceAndOutputFilesAbsolutePathsCorrespondenceMap, (sourceFileAbsolutePath) => possibleAbsolutePathsOfTargetSourceFile.includes(sourceFileAbsolutePath));
5292
+ if (searchingResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.size === 0) {
5293
+ es_extensions_1.Logger.logWarning(ResourceFilesPathsAliasesResolverForHTML.localization.
5294
+ generateNoMatchingsForAliasedFilePathWithoutFilenameExtensionWarning({
5295
+ pickedPathOfTargetResourceFile,
5296
+ fileType__singularForm: fileTypeForLogging__pluralForm,
5297
+ checkedAbsolutePaths__formatted: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(possibleAbsolutePathsOfTargetSourceFile)
5298
+ }));
5242
5299
  return null;
5243
5300
  }
5244
- return Array.from(searchResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.values())[0];
5301
+ return Array.from(searchingResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.values())[0];
5245
5302
  }
5246
- const resolvedFileOutputAbsolutePath = sourceAndOutputFilesAbsolutePathsCorrespondenceMap.get(sourceFileComputedAbsolutePath__possiblyWithoutFilenameExtension);
5303
+ const resolvedFileOutputAbsolutePath = sourceAndOutputFilesAbsolutePathsCorrespondenceMap.
5304
+ get(sourceFileComputedAbsolutePathPossiblyWithoutFileNameExtension);
5247
5305
  if ((0, es_extensions_1.isUndefined)(resolvedFileOutputAbsolutePath)) {
5248
- es_extensions_1.Logger.logWarning({
5249
- title: `${fileTypeForLogging}ファイル、不明パスアリアス`,
5250
- description: `${fileTypeForLogging}ファイル:「${pickedURL}」に在るアリアス:${firstURL_Segment__possiblyPathAlias}に` +
5251
- "該当する出力ファイルが見つけられなかった。"
5252
- });
5306
+ es_extensions_1.Logger.logWarning(ResourceFilesPathsAliasesResolverForHTML.localization.generateNoOutputFileExistingForSpecifiedSourceFilePath({
5307
+ pickedPathOfTargetResourceFile,
5308
+ fileType__singularForm: fileTypeForLogging__pluralForm
5309
+ }));
5253
5310
  return null;
5254
5311
  }
5255
5312
  return resolvedFileOutputAbsolutePath;
5256
5313
  }
5314
+ buildResourceFileFinalPath({ resolvedOutputAbsolutePathOfResourceFile, resourceFileType__singularForm }) {
5315
+ if (this.masterConfigRepresentative.isDevelopmentBuildingMode ||
5316
+ (0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.actualPublicDirectoryAbsolutePath)) {
5317
+ if (!this.masterConfigRepresentative.isDevelopmentBuildingMode &&
5318
+ (0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.actualPublicDirectoryAbsolutePath)) {
5319
+ es_extensions_1.Logger.logWarning(ResourceFilesPathsAliasesResolverForHTML.localization.generateUnableToResolveShortenedAbsolutePathWarning({
5320
+ projectBuildingMode: this.masterConfigRepresentative.consumingProjectBuildingMode,
5321
+ filesType__singularForm: resourceFileType__singularForm
5322
+ }));
5323
+ }
5324
+ return ImprovedPath_1.default.computeRelativePath({
5325
+ basePath: this.compiledHTML_File.outputDirectoryAbsolutePath,
5326
+ comparedPath: resolvedOutputAbsolutePathOfResourceFile
5327
+ });
5328
+ }
5329
+ return `/${ImprovedPath_1.default.computeRelativePath({
5330
+ basePath: this.masterConfigRepresentative.actualPublicDirectoryAbsolutePath,
5331
+ comparedPath: resolvedOutputAbsolutePathOfResourceFile
5332
+ })}`;
5333
+ }
5257
5334
  }
5258
- exports["default"] = AssetsPathsAliasesResolverForHTML;
5259
-
5260
-
5261
- /***/ }),
5262
-
5263
- /***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML_Localization.english.ts":
5264
- /*!*********************************************************************************************************************************************************!*\
5265
- !*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AssetsPathsAliasesResolverForHTML/AssetsPathsAliasesResolverForHTML_Localization.english.ts ***!
5266
- \*********************************************************************************************************************************************************/
5267
- /***/ ((__unused_webpack_module, exports) => {
5268
-
5269
-
5270
- Object.defineProperty(exports, "__esModule", ({ value: true }));
5271
- const assetsPathsAliasesResolverForHTML_Localization__english = {
5272
- generateUnableToComputeShortenedAbsolutePathWarning: (namedParameters) => ({
5273
- title: `${namedParameters.filesTypeForLogging} files, unable to generate the absolute path`,
5274
- description: `Unable to generate the shortened absolute path for the ${namedParameters.filesTypeForLogging} files ` +
5275
- `because no public path has been specified for '${namedParameters.projectBuildingMode}' mode. Relative path ` +
5276
- "will be generated instead."
5277
- }),
5278
- generateUnknownSourceFileTopDirectoryAliasWarning: (namedParameters) => ({
5279
- title: `${namedParameters.fileTypeForLogging} files, unknown path alias`,
5280
- description: `The alias '${namedParameters.firstPathSegment}' in path '${namedParameters.pickedPath}' has not been ` +
5281
- "specified neither explicitly nor implicitly. Below aliases are available for usage: \n" +
5282
- `${namedParameters.formattedSourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap}`
5283
- })
5284
- };
5285
- exports["default"] = assetsPathsAliasesResolverForHTML_Localization__english;
5335
+ exports["default"] = ResourceFilesPathsAliasesResolverForHTML;
5286
5336
 
5287
5337
 
5288
5338
  /***/ }),
@@ -5302,7 +5352,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
5302
5352
  const HTML_ValidatorLocalization_english_1 = __importDefault(__webpack_require__(/*! ./HTML_ValidatorLocalization.english */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_ValidatorLocalization.english.ts"));
5303
5353
  /* --- Applied utils ------------------------------------------------------------------------------------------------ */
5304
5354
  const html_validator_1 = __importDefault(__webpack_require__(/*! html-validator */ "html-validator"));
5305
- const extractStringifiedContentFromVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/extractStringifiedContentFromVinylFile */ "./Utils/extractStringifiedContentFromVinylFile.ts"));
5355
+ const getExpectedToBeNonNullStringifiedContentOfVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile */ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts"));
5306
5356
  const isCompiledHTML_ContentEmpty_1 = __importDefault(__webpack_require__(/*! @Utils/isCompiledHTML_ContentEmpty */ "./Utils/isCompiledHTML_ContentEmpty.ts"));
5307
5357
  const node_notifier_1 = __importDefault(__webpack_require__(/*! node-notifier */ "node-notifier"));
5308
5358
  /* --- General utils ------------------------------------------------------------------------------------------------ */
@@ -5312,7 +5362,7 @@ const Stopwatch_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/Stop
5312
5362
  class HTML_Validator {
5313
5363
  static localization = HTML_ValidatorLocalization_english_1.default;
5314
5364
  static validateHTML(compiledHTML_File, masterConfigRepresentative) {
5315
- const extractedHTML_Code = (0, extractStringifiedContentFromVinylFile_1.default)(compiledHTML_File);
5365
+ const extractedHTML_Code = (0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File);
5316
5366
  const targetFileRelativePath = ImprovedPath_1.default.computeRelativePath({
5317
5367
  basePath: masterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
5318
5368
  comparedPath: compiledHTML_File.path
@@ -5443,7 +5493,7 @@ const HTML_ValidatorLocalization__English = {
5443
5493
  grossViolation: "Gross violation",
5444
5494
  recommendationDisregard: "Recommendation disregard",
5445
5495
  other: "Other issue",
5446
- keyAndValueSeparator: ":"
5496
+ keyAndValueSeparator: ": "
5447
5497
  },
5448
5498
  generateIssuesFoundErrorLog: (namedParameters) => ({
5449
5499
  customBadgeText: "HTML validation not passed",
@@ -5472,12 +5522,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5472
5522
  return (mod && mod.__esModule) ? mod : { "default": mod };
5473
5523
  };
5474
5524
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5475
- const extractStringifiedContentFromVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/extractStringifiedContentFromVinylFile */ "./Utils/extractStringifiedContentFromVinylFile.ts"));
5525
+ const getExpectedToBeNonNullStringifiedContentOfVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile */ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts"));
5476
5526
  const cheerio_1 = __importDefault(__webpack_require__(/*! cheerio */ "cheerio"));
5477
5527
  const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
5478
5528
  function removeExtraSpacesFromJapaneseText(compiledHTML_File) {
5479
5529
  const $HTML_FileContentCheerioCapturing = cheerio_1.default.
5480
- load((0, extractStringifiedContentFromVinylFile_1.default)(compiledHTML_File), { decodeEntities: false });
5530
+ load((0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File), { decodeEntities: false });
5481
5531
  for (const targetElement of Array.from($HTML_FileContentCheerioCapturing("p"))) {
5482
5532
  const $TargetElement = $HTML_FileContentCheerioCapturing(targetElement);
5483
5533
  const targetElementHTML = $TargetElement.html();
@@ -5633,7 +5683,10 @@ const ImprovedPath_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/I
5633
5683
  const PoliteErrorsMessagesBuilder_1 = __importDefault(__webpack_require__(/*! @Utils/PoliteErrorsMessagesBuilder */ "./Utils/PoliteErrorsMessagesBuilder.ts"));
5634
5684
  class StylesProcessingSettingsRepresentative extends GulpStreamBasedSourceCodeProcessingConfigRepresentative_1.default {
5635
5685
  static #localization = {
5636
- targetFilesKind__pluralForm: "stylesheets",
5686
+ targetFilesType: {
5687
+ singularForm: "stylesheet",
5688
+ pluralForm: "stylesheets"
5689
+ },
5637
5690
  errorsMessagesData: {
5638
5691
  unableToDecideMustFileBePrecessedByStylusPreProcessorBecauseFileNameExtensionIsMissing: {
5639
5692
  generateTechnicalDetails({ filePath }) {
@@ -5660,9 +5713,12 @@ class StylesProcessingSettingsRepresentative extends GulpStreamBasedSourceCodePr
5660
5713
  }
5661
5714
  };
5662
5715
  supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots;
5716
+ TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = StylesProcessingSettingsRepresentative.#localization.
5717
+ targetFilesType.singularForm;
5663
5718
  TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = StylesProcessingSettingsRepresentative.#localization.
5664
- targetFilesKind__pluralForm;
5719
+ targetFilesType.pluralForm;
5665
5720
  waitingForTheOtherFilesWillBeSavedPeriod__seconds;
5721
+ prefixOfAliasOfTopDirectoryOfEntryPointsGroup = "@";
5666
5722
  sourceCodeLintingCommonSettings;
5667
5723
  sourceAndOutputFilesAbsolutePathsCorrespondenceMap = new Map();
5668
5724
  relevantEntryPointsGroupsSettings;
@@ -5951,7 +6007,7 @@ class StylesProcessor extends GulpStreamsBasedSourceCodeProcessor_1.default {
5951
6007
  fileInInitialState.processingSettings = normalizedStylesEntryPointsGroupSettingsActualForCurrentFile;
5952
6008
  /* [ Theory ] The value of 'path' could change during file processing. */
5953
6009
  fileInInitialState.sourceAbsolutePath = ImprovedPath_1.default.replacePathSeparatorsToForwardSlashes(fileInInitialState.path);
5954
- fileInInitialState.outputDirectoryAbsolutePath = this.stylesProcessingConfigRepresentative.
6010
+ fileInInitialState.outputDirectoryAbsolutePath = StylesProcessingSettingsRepresentative_1.default.
5955
6011
  computeRelevantOutputDirectoryAbsolutePathForTargetSourceFile(fileInInitialState.path, normalizedStylesEntryPointsGroupSettingsActualForCurrentFile);
5956
6012
  fileInInitialState.mustBeProcessedByStylus = StylesProcessingSettingsRepresentative_1.default.
5957
6013
  mustFileBeProcessedByStylus(fileInInitialState.path);
@@ -6895,21 +6951,21 @@ exports["default"] = PoliteErrorsMessagesBuilder;
6895
6951
 
6896
6952
  /***/ }),
6897
6953
 
6898
- /***/ "./Utils/extractStringifiedContentFromVinylFile.ts":
6899
- /*!*********************************************************!*\
6900
- !*** ./Utils/extractStringifiedContentFromVinylFile.ts ***!
6901
- \*********************************************************/
6954
+ /***/ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts":
6955
+ /*!**********************************************************************!*\
6956
+ !*** ./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts ***!
6957
+ \**********************************************************************/
6902
6958
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6903
6959
 
6904
6960
 
6905
6961
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6906
6962
  const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
6907
- function extractStringifiedContentFromVinylFile(targetFile) {
6963
+ function getExpectedToBeNonNullStringifiedContentOfVinylFile(targetFile) {
6908
6964
  if (targetFile.contents === null) {
6909
6965
  es_extensions_1.Logger.throwErrorAndLog({
6910
6966
  errorInstance: new es_extensions_1.UnexpectedEventError(`目標的Vinylファイル:「${targetFile.path}」の'contents'プロパティは'null'と成っている。`),
6911
6967
  title: es_extensions_1.UnexpectedEventError.localization.defaultTitle,
6912
- occurrenceLocation: "extractStringifiedContentFromVinylFile(targetFile)",
6968
+ occurrenceLocation: "extractExpectedToBeNonNullStringifiedContentFromVinylFile(targetFile)",
6913
6969
  additionalData: targetFile
6914
6970
  });
6915
6971
  }
@@ -6917,13 +6973,13 @@ function extractStringifiedContentFromVinylFile(targetFile) {
6917
6973
  es_extensions_1.Logger.throwErrorAndLog({
6918
6974
  errorInstance: new es_extensions_1.UnexpectedEventError(`目標的Vinylファイル:「${targetFile.path}」の'contents'プロパティは'Buffer'のインスタンスではない為、内容を抽出出来ません。`),
6919
6975
  title: es_extensions_1.UnexpectedEventError.localization.defaultTitle,
6920
- occurrenceLocation: "extractStringifiedContentFromVinylFile(targetFile)",
6976
+ occurrenceLocation: "extractExpectedToBeNonNullStringifiedContentFromVinylFile(targetFile)",
6921
6977
  additionalData: targetFile
6922
6978
  });
6923
6979
  }
6924
6980
  return targetFile.contents.toString();
6925
6981
  }
6926
- exports["default"] = extractStringifiedContentFromVinylFile;
6982
+ exports["default"] = getExpectedToBeNonNullStringifiedContentOfVinylFile;
6927
6983
 
6928
6984
 
6929
6985
  /***/ }),
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Yamato-Daiwa Automation 〔YDA〕
1
+ # Yamato Daiwa Automation 〔YDA〕
2
2
 
3
3
  The project building tool with declarative YAML configuration based on Gulp and Webpack.
4
4
  Specializing on Pug, Stylus and TypeScript as source code languages; also works with images, fonts, videos and audios.
@@ -124,6 +124,13 @@ npm i @yamato-daiwa/automation -D -E
124
124
  <dt>ts-loader</dt>
125
125
  <dd>Used to provide the integration of TypeScript and Webpack</dd>
126
126
 
127
+ <dt>vinyl</dt>
128
+ <dd>
129
+ Used to create new Gulp plugins.
130
+ Although this package is being installed indirectly, the importing of this package without manual installing will cause
131
+ "node/no-extraneous-import" ESLint issue and there is no reason to mute it.
132
+ </dd>
133
+
127
134
  <dt>vue-style-loader</dt>
128
135
  <dd>Used to provide the dynamical loading of CSS written in Vue Single File Components to HTML document</dd>
129
136
 
@@ -168,6 +175,9 @@ All **@types** are the TypeScript types definitions that required for normal tra
168
175
  <dl>
169
176
 
170
177
  <dt>glob</dt>
171
- <dd>Used by <b>ImprovedGlob</b> which will be moved to <b>@yamato-daiwa/es-extensions-nodejs</b> and used as dependency</dd>
178
+ <dd>Used by <b>ImprovedGlob</b> which will be moved to <b>@yamato-daiwa/es-extensions-nodejs</b> and used as dependency </dd>
179
+
180
+ <dt>minimatch</dt>
181
+ <dd>used by <b>ImprovedGlob</b> which will be moved to <b>@yamato-daiwa/es-extensions-nodejs</b> and used as dependency </dd>
172
182
 
173
183
  </dl>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamato-daiwa/automation",
3
- "version": "0.0.2",
3
+ "version": "0.0.6",
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,19 +19,19 @@
19
19
  "EntryPoint.js"
20
20
  ],
21
21
  "dependencies": {
22
- "@typescript-eslint/eslint-plugin": "5.26.0",
23
- "@typescript-eslint/parser": "5.26.0",
22
+ "@typescript-eslint/eslint-plugin": "5.30.5",
23
+ "@typescript-eslint/parser": "5.30.5",
24
24
  "@vue/compiler-sfc": "3.2.37",
25
- "@yamato-daiwa/es-extensions": "1.5.0-alpha.7",
26
- "@yamato-daiwa/es-extensions-nodejs": "1.5.0-alpha.4",
27
- "@yamato-daiwa/style_guides": "0.0.7",
25
+ "@yamato-daiwa/es-extensions": "1.5.1",
26
+ "@yamato-daiwa/es-extensions-nodejs": "1.5.0",
27
+ "@yamato-daiwa/style_guides": "0.0.16",
28
28
  "access-sniff": "3.2.0",
29
29
  "autoprefixer": "10.4.7",
30
30
  "browser-sync": "2.27.10",
31
31
  "cheerio": "1.0.0-rc.1",
32
32
  "css-loader": "6.7.1",
33
33
  "cssnano": "5.1.10",
34
- "eslint": "8.16.0",
34
+ "eslint": "8.19.0",
35
35
  "eslint-plugin-import": "2.26.0",
36
36
  "eslint-plugin-node": "11.1.0",
37
37
  "eslint-webpack-plugin": "3.1.1",
@@ -52,6 +52,7 @@
52
52
  "html-validator": "6.0.1",
53
53
  "imagemin-pngquant": "9.0.2",
54
54
  "json5-loader": "4.0.1",
55
+ "minimatch": "5.1.0",
55
56
  "node-notifier": "10.0.1",
56
57
  "pug-html-loader": "1.1.5",
57
58
  "pug-plain-loader": "1.1.0",
@@ -60,6 +61,7 @@
60
61
  "style-loader": "3.3.1",
61
62
  "stylus-loader": "6.2.0",
62
63
  "ts-loader": "9.3.0",
64
+ "vinyl": "2.2.1",
63
65
  "vue": "3.2.37",
64
66
  "vue-loader": "17.0.0",
65
67
  "vue-style-loader": "4.1.3",
@@ -90,7 +92,7 @@
90
92
  "@types/webpack-node-externals": "2.5.3",
91
93
  "@types/yamljs": "0.2.31",
92
94
  "ts-node": "10.8.1",
93
- "typescript": "4.7.3",
95
+ "typescript": "4.7.4",
94
96
  "webpack-cli": "4.10.0"
95
97
  },
96
98
  "scripts": {