@yamato-daiwa/automation 0.0.10 → 0.2.0-alpha.1
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 +519 -419
- package/package.json +10 -9
package/EntryPoint.js
CHANGED
|
@@ -6,10 +6,14 @@
|
|
|
6
6
|
/*!********************************************!*\
|
|
7
7
|
!*** ./ApplicationConsoleLineInterface.ts ***!
|
|
8
8
|
\********************************************/
|
|
9
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__)
|
|
9
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
+
};
|
|
12
15
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
16
|
+
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes */ "./ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes.ts"));
|
|
13
17
|
const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
|
|
14
18
|
var ApplicationConsoleLineInterface;
|
|
15
19
|
(function (ApplicationConsoleLineInterface) {
|
|
@@ -26,7 +30,8 @@ var ApplicationConsoleLineInterface;
|
|
|
26
30
|
newName: "projectBuildingMode",
|
|
27
31
|
type: es_extensions_nodejs_1.ConsoleCommandsParser.ParametersTypes.string,
|
|
28
32
|
required: true,
|
|
29
|
-
shortcut: "m"
|
|
33
|
+
shortcut: "m",
|
|
34
|
+
allowedAlternatives: Object.values(ConsumingProjectPreDefinedBuildingModes_1.default)
|
|
30
35
|
},
|
|
31
36
|
configurationFile: {
|
|
32
37
|
newName: "customConfigurationFileName__possiblyWithoutExtension",
|
|
@@ -72,6 +77,9 @@ const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensio
|
|
|
72
77
|
const path_1 = __importDefault(__webpack_require__(/*! path */ "path"));
|
|
73
78
|
const yamljs_1 = __importDefault(__webpack_require__(/*! yamljs */ "yamljs"));
|
|
74
79
|
class EntryPoint {
|
|
80
|
+
static {
|
|
81
|
+
es_extensions_1.Logger.setImplementation(es_extensions_nodejs_1.ConsoleApplicationLogger);
|
|
82
|
+
}
|
|
75
83
|
static interpretAndExecuteConsoleCommand(rawConsoleCommand) {
|
|
76
84
|
const parsedConsoleCommand = es_extensions_nodejs_1.ConsoleCommandsParser.parse(rawConsoleCommand, ApplicationConsoleLineInterface_1.default.specification);
|
|
77
85
|
if (true) {
|
|
@@ -113,9 +121,6 @@ class EntryPoint {
|
|
|
113
121
|
}
|
|
114
122
|
}
|
|
115
123
|
}
|
|
116
|
-
static {
|
|
117
|
-
es_extensions_1.Logger.setImplementation(es_extensions_nodejs_1.ConsoleApplicationLogger);
|
|
118
|
-
}
|
|
119
124
|
}
|
|
120
125
|
exports["default"] = EntryPoint;
|
|
121
126
|
|
|
@@ -291,12 +296,14 @@ const AssetsProcessingSettingsRepresentative_1 = __importDefault(__webpack_requi
|
|
|
291
296
|
class AudiosProcessingSettingsRepresentative extends AssetsProcessingSettingsRepresentative_1.default {
|
|
292
297
|
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Audio";
|
|
293
298
|
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Audios";
|
|
299
|
+
relevantSourceFilesGlobSelectors;
|
|
294
300
|
assetsProcessingCommonSettings;
|
|
295
301
|
actualAssetsGroupsSettings;
|
|
296
302
|
constructor(audiosManagementSettings, masterConfigRepresentative) {
|
|
297
303
|
super(masterConfigRepresentative);
|
|
298
304
|
this.assetsProcessingCommonSettings = audiosManagementSettings.common;
|
|
299
305
|
this.actualAssetsGroupsSettings = audiosManagementSettings.assetsGroups;
|
|
306
|
+
this.relevantSourceFilesGlobSelectors = Array.from(this.actualAssetsGroupsSettings.values()).map((imagesGroupSettings) => imagesGroupSettings.sourceFilesGlobSelector);
|
|
300
307
|
}
|
|
301
308
|
}
|
|
302
309
|
exports["default"] = AudiosProcessingSettingsRepresentative;
|
|
@@ -497,13 +504,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
497
504
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
498
505
|
const AssetsProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative */ "./ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative.ts"));
|
|
499
506
|
class FontsProcessingSettingsRepresentative extends AssetsProcessingSettingsRepresentative_1.default {
|
|
507
|
+
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Font";
|
|
500
508
|
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Fonts";
|
|
509
|
+
relevantSourceFilesGlobSelectors;
|
|
501
510
|
assetsProcessingCommonSettings;
|
|
502
511
|
actualAssetsGroupsSettings;
|
|
503
512
|
constructor(imagesManagementSettings, masterConfigRepresentative) {
|
|
504
513
|
super(masterConfigRepresentative);
|
|
505
514
|
this.assetsProcessingCommonSettings = imagesManagementSettings.common;
|
|
506
515
|
this.actualAssetsGroupsSettings = imagesManagementSettings.assetsGroups;
|
|
516
|
+
this.relevantSourceFilesGlobSelectors = Array.from(this.actualAssetsGroupsSettings.values()).map((imagesGroupSettings) => imagesGroupSettings.sourceFilesGlobSelector);
|
|
507
517
|
}
|
|
508
518
|
}
|
|
509
519
|
exports["default"] = FontsProcessingSettingsRepresentative;
|
|
@@ -705,12 +715,14 @@ const AssetsProcessingSettingsRepresentative_1 = __importDefault(__webpack_requi
|
|
|
705
715
|
class ImagesProcessingSettingsRepresentative extends AssetsProcessingSettingsRepresentative_1.default {
|
|
706
716
|
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Image";
|
|
707
717
|
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Images";
|
|
718
|
+
relevantSourceFilesGlobSelectors;
|
|
708
719
|
assetsProcessingCommonSettings;
|
|
709
720
|
actualAssetsGroupsSettings;
|
|
710
721
|
constructor(imagesManagementSettings, masterConfigRepresentative) {
|
|
711
722
|
super(masterConfigRepresentative);
|
|
712
723
|
this.assetsProcessingCommonSettings = imagesManagementSettings.common;
|
|
713
724
|
this.actualAssetsGroupsSettings = imagesManagementSettings.assetsGroups;
|
|
725
|
+
this.relevantSourceFilesGlobSelectors = Array.from(this.actualAssetsGroupsSettings.values()).map((imagesGroupSettings) => imagesGroupSettings.sourceFilesGlobSelector);
|
|
714
726
|
}
|
|
715
727
|
}
|
|
716
728
|
exports["default"] = ImagesProcessingSettingsRepresentative;
|
|
@@ -803,7 +815,7 @@ class ImagesProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
|
|
|
803
815
|
pipe(super.printProcessedFilesPathsAndQuantity()).
|
|
804
816
|
pipe(super.handleErrorIfItWillOccur()).
|
|
805
817
|
pipe((0, gulp_intercept_1.default)(this.addActualSourceCodeProcessingSettingsToVinylFile.bind(this))).
|
|
806
|
-
pipe((0, gulp_if_1.default)(this.masterConfigRepresentative.isProductionBuildingMode, (0, gulp_imagemin_1.default)([
|
|
818
|
+
pipe((0, gulp_if_1.default)(this.masterConfigRepresentative.isStagingBuildingMode || this.masterConfigRepresentative.isProductionBuildingMode, (0, gulp_imagemin_1.default)([
|
|
807
819
|
gulp_imagemin_1.default.mozjpeg({ progressive: true }),
|
|
808
820
|
gulp_imagemin_1.default.gifsicle({ interlaced: true }),
|
|
809
821
|
gulp_imagemin_1.default.svgo({}),
|
|
@@ -921,12 +933,14 @@ const AssetsProcessingSettingsRepresentative_1 = __importDefault(__webpack_requi
|
|
|
921
933
|
class VideosProcessingSettingsRepresentative extends AssetsProcessingSettingsRepresentative_1.default {
|
|
922
934
|
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Video";
|
|
923
935
|
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Videos";
|
|
936
|
+
relevantSourceFilesGlobSelectors;
|
|
924
937
|
assetsProcessingCommonSettings;
|
|
925
938
|
actualAssetsGroupsSettings;
|
|
926
939
|
constructor(videosManagementSettings, masterConfigRepresentative) {
|
|
927
940
|
super(masterConfigRepresentative);
|
|
928
941
|
this.assetsProcessingCommonSettings = videosManagementSettings.common;
|
|
929
942
|
this.actualAssetsGroupsSettings = videosManagementSettings.assetsGroups;
|
|
943
|
+
this.relevantSourceFilesGlobSelectors = Array.from(this.actualAssetsGroupsSettings.values()).map((imagesGroupSettings) => imagesGroupSettings.sourceFilesGlobSelector);
|
|
930
944
|
}
|
|
931
945
|
}
|
|
932
946
|
exports["default"] = VideosProcessingSettingsRepresentative;
|
|
@@ -1078,6 +1092,7 @@ class BrowserLiveReloader {
|
|
|
1078
1092
|
baseDir: browserLiveReloadingConfigRepresentative.targetFilesRootDirectoryAbsolutePath,
|
|
1079
1093
|
index: browserLiveReloadingConfigRepresentative.startingFilenameWithExtension
|
|
1080
1094
|
},
|
|
1095
|
+
browser: "chrome",
|
|
1081
1096
|
...(0, es_extensions_1.isNotNull)(browserLiveReloadingConfigRepresentative.customMainPort) ? {
|
|
1082
1097
|
port: browserLiveReloadingConfigRepresentative.customMainPort
|
|
1083
1098
|
} : {},
|
|
@@ -1346,10 +1361,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
1346
1361
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1347
1362
|
};
|
|
1348
1363
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1349
|
-
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/
|
|
1364
|
+
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes */ "./ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes.ts"));
|
|
1350
1365
|
exports["default"] = {
|
|
1351
1366
|
revisioning: {
|
|
1352
|
-
mustExecute: (projectBuildingMode__possiblyCustom) => projectBuildingMode__possiblyCustom !== ConsumingProjectPreDefinedBuildingModes_1.default.
|
|
1367
|
+
mustExecute: (projectBuildingMode__possiblyCustom) => projectBuildingMode__possiblyCustom !== ConsumingProjectPreDefinedBuildingModes_1.default.staticPreview &&
|
|
1368
|
+
projectBuildingMode__possiblyCustom !== ConsumingProjectPreDefinedBuildingModes_1.default.localDevelopment,
|
|
1353
1369
|
contentHashPostfixSeparator: "--"
|
|
1354
1370
|
}
|
|
1355
1371
|
};
|
|
@@ -1369,26 +1385,6 @@ const CONFIG_FILE_DEFAULT_NAME_WITH_EXTENSION = "yda.config.yaml";
|
|
|
1369
1385
|
exports["default"] = CONFIG_FILE_DEFAULT_NAME_WITH_EXTENSION;
|
|
1370
1386
|
|
|
1371
1387
|
|
|
1372
|
-
/***/ }),
|
|
1373
|
-
|
|
1374
|
-
/***/ "./ProjectBuilding/Common/Defaults/ConsumingProjectPreDefinedBuildingModes.ts":
|
|
1375
|
-
/*!************************************************************************************!*\
|
|
1376
|
-
!*** ./ProjectBuilding/Common/Defaults/ConsumingProjectPreDefinedBuildingModes.ts ***!
|
|
1377
|
-
\************************************************************************************/
|
|
1378
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1382
|
-
var ConsumingProjectPreDefinedBuildingModes;
|
|
1383
|
-
(function (ConsumingProjectPreDefinedBuildingModes) {
|
|
1384
|
-
ConsumingProjectPreDefinedBuildingModes["development"] = "DEVELOPMENT";
|
|
1385
|
-
ConsumingProjectPreDefinedBuildingModes["testing"] = "TESTING";
|
|
1386
|
-
ConsumingProjectPreDefinedBuildingModes["staging"] = "STAGING";
|
|
1387
|
-
ConsumingProjectPreDefinedBuildingModes["production"] = "PRODUCTION";
|
|
1388
|
-
})(ConsumingProjectPreDefinedBuildingModes || (ConsumingProjectPreDefinedBuildingModes = {}));
|
|
1389
|
-
exports["default"] = ConsumingProjectPreDefinedBuildingModes;
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
1388
|
/***/ }),
|
|
1393
1389
|
|
|
1394
1390
|
/***/ "./ProjectBuilding/Common/NormalizedConfig/ProjectBuildingCommonSettingsNormalizer.ts":
|
|
@@ -1459,7 +1455,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
1459
1455
|
};
|
|
1460
1456
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1461
1457
|
/* --- Enumerations ----------------------------------------------------------------------------------------------- */
|
|
1462
|
-
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/
|
|
1458
|
+
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes */ "./ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes.ts"));
|
|
1463
1459
|
/* --- General auxiliaries ------------------------------------------------------------------------------------------ */
|
|
1464
1460
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
1465
1461
|
var AssetsProcessingSettingsGenericProperties__FromFile__RawValid;
|
|
@@ -1491,21 +1487,20 @@ var AssetsProcessingSettingsGenericProperties__FromFile__RawValid;
|
|
|
1491
1487
|
newName: "buildingModeDependent",
|
|
1492
1488
|
type: es_extensions_1.RawObjectDataProcessor.ValuesTypesIDs.associativeArrayOfUniformTypeValues,
|
|
1493
1489
|
required: true,
|
|
1494
|
-
|
|
1495
|
-
consumingProjectLocalizedPreDefinedBuildingModes.development,
|
|
1496
|
-
consumingProjectLocalizedPreDefinedBuildingModes.production
|
|
1497
|
-
],
|
|
1490
|
+
minimalEntriesCount: 1,
|
|
1498
1491
|
keysRenamings: {
|
|
1499
|
-
[consumingProjectLocalizedPreDefinedBuildingModes.
|
|
1492
|
+
[consumingProjectLocalizedPreDefinedBuildingModes.staticPreview]: ConsumingProjectPreDefinedBuildingModes_1.default.staticPreview,
|
|
1493
|
+
[consumingProjectLocalizedPreDefinedBuildingModes.localDevelopment]: ConsumingProjectPreDefinedBuildingModes_1.default.localDevelopment,
|
|
1500
1494
|
[consumingProjectLocalizedPreDefinedBuildingModes.testing]: ConsumingProjectPreDefinedBuildingModes_1.default.testing,
|
|
1495
|
+
[consumingProjectLocalizedPreDefinedBuildingModes.staging]: ConsumingProjectPreDefinedBuildingModes_1.default.staging,
|
|
1501
1496
|
[consumingProjectLocalizedPreDefinedBuildingModes.production]: ConsumingProjectPreDefinedBuildingModes_1.default.production
|
|
1502
1497
|
},
|
|
1503
1498
|
value: {
|
|
1504
1499
|
type: Object,
|
|
1505
1500
|
properties: {
|
|
1506
1501
|
[assetsProcessingSettingsGenericPropertiesLocalization.assetsGroups.
|
|
1507
|
-
buildingModeDependent.
|
|
1508
|
-
newName: "
|
|
1502
|
+
buildingModeDependent.outputTopDirectoryRelativePath.KEY]: {
|
|
1503
|
+
newName: "outputTopDirectoryRelativePath",
|
|
1509
1504
|
type: String,
|
|
1510
1505
|
required: true
|
|
1511
1506
|
},
|
|
@@ -1587,10 +1582,15 @@ var ProjectBuildingTasksIDsForConfigFile;
|
|
|
1587
1582
|
/*!***********************************************************************************************!*\
|
|
1588
1583
|
!*** ./ProjectBuilding/Common/RawConfig/ProjectBuildingCommonSettings__FromFile__RawValid.ts ***!
|
|
1589
1584
|
\***********************************************************************************************/
|
|
1590
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__)
|
|
1585
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1591
1586
|
|
|
1592
1587
|
|
|
1588
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
1589
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1590
|
+
};
|
|
1593
1591
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1592
|
+
/* --- Defaults ----------------------------------------------------------------------------------------------------- */
|
|
1593
|
+
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes */ "./ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes.ts"));
|
|
1594
1594
|
const ProjectBuildingTasksIDsForConfigFile_1 = __webpack_require__(/*! @ProjectBuilding:Common/RawConfig/Enumerations/ProjectBuildingTasksIDsForConfigFile */ "./ProjectBuilding/Common/RawConfig/Enumerations/ProjectBuildingTasksIDsForConfigFile.ts");
|
|
1595
1595
|
/* --- General auxiliaries ------------------------------------------------------------------------------------------ */
|
|
1596
1596
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
@@ -1642,6 +1642,16 @@ var ProjectBuildingCommonSettings__FromFile__RawValid;
|
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
1644
1644
|
}
|
|
1645
|
+
},
|
|
1646
|
+
[projectBuildingCommonSettingsLocalization.publicDirectoriesRelativePaths.KEY]: {
|
|
1647
|
+
newName: "publicDirectoriesRelativePaths",
|
|
1648
|
+
type: es_extensions_1.RawObjectDataProcessor.ValuesTypesIDs.associativeArrayOfUniformTypeValues,
|
|
1649
|
+
required: false,
|
|
1650
|
+
allowedKeys: Object.values(ConsumingProjectPreDefinedBuildingModes_1.default),
|
|
1651
|
+
value: {
|
|
1652
|
+
type: String,
|
|
1653
|
+
minimalCharactersCount: 1
|
|
1654
|
+
}
|
|
1645
1655
|
}
|
|
1646
1656
|
};
|
|
1647
1657
|
}
|
|
@@ -1732,16 +1742,16 @@ exports["default"] = RevisioningSettings__FromFile__RawValid;
|
|
|
1732
1742
|
|
|
1733
1743
|
|
|
1734
1744
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1745
|
+
/* --- General auxiliaries ------------------------------------------------------------------------------------------ */
|
|
1735
1746
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
1736
1747
|
var SourceCodeProcessingSettingsGenericProperties__FromFile__RawValid;
|
|
1737
1748
|
(function (SourceCodeProcessingSettingsGenericProperties__FromFile__RawValid) {
|
|
1738
1749
|
function getLocalizedPropertiesSpecification(sourceCodeProcessingSettingsGenericPropertiesLocalization) {
|
|
1739
1750
|
return {
|
|
1740
|
-
[sourceCodeProcessingSettingsGenericPropertiesLocalization.
|
|
1741
|
-
|
|
1742
|
-
newName: "entryPointsSourceFilesTopDirectoryOrSingleFileRelativePath",
|
|
1751
|
+
[sourceCodeProcessingSettingsGenericPropertiesLocalization.topDirectoryRelativePath.KEY]: {
|
|
1752
|
+
newName: "topDirectoryRelativePath",
|
|
1743
1753
|
type: String,
|
|
1744
|
-
required:
|
|
1754
|
+
required: false,
|
|
1745
1755
|
minimalCharactersCount: 1
|
|
1746
1756
|
},
|
|
1747
1757
|
[sourceCodeProcessingSettingsGenericPropertiesLocalization.partialsRecognition.KEY]: {
|
|
@@ -1813,6 +1823,21 @@ var SourceCodeProcessingSettingsGenericProperties__FromFile__RawValid;
|
|
|
1813
1823
|
]
|
|
1814
1824
|
}
|
|
1815
1825
|
}
|
|
1826
|
+
},
|
|
1827
|
+
[sourceCodeProcessingSettingsGenericPropertiesLocalization.singleEntryPointRelativePath.KEY]: {
|
|
1828
|
+
newName: "singleEntryPointRelativePath",
|
|
1829
|
+
type: String,
|
|
1830
|
+
requiredIf: {
|
|
1831
|
+
predicate(rawObjectOfCurrentDepthLevel) {
|
|
1832
|
+
if (!(0, es_extensions_1.isArbitraryObject)(rawObjectOfCurrentDepthLevel)) {
|
|
1833
|
+
return false;
|
|
1834
|
+
}
|
|
1835
|
+
return !(0, es_extensions_1.isNonEmptyString)(rawObjectOfCurrentDepthLevel.topDirectoryRelativePath);
|
|
1836
|
+
},
|
|
1837
|
+
descriptionForLogging: sourceCodeProcessingSettingsGenericPropertiesLocalization.singleEntryPointRelativePath.
|
|
1838
|
+
REQUIREMENT_CONDITION_DESCRIPTION
|
|
1839
|
+
},
|
|
1840
|
+
minimalCharactersCount: 1
|
|
1816
1841
|
}
|
|
1817
1842
|
};
|
|
1818
1843
|
}
|
|
@@ -1866,7 +1891,7 @@ class AssetsProcessingRawSettingsNormalizer {
|
|
|
1866
1891
|
const aliasForPathsResolution = assetsGroupSettings__rawValid.sourceFilesTopDirectoryPathAliasForReferencingFromHTML ?? `@${groupID}`;
|
|
1867
1892
|
const outputFilesBaseDirectoryAbsolutePathActualForCurrentProjectBuildingMode = ImprovedPath_1.default.buildAbsolutePath([
|
|
1868
1893
|
this.consumingProjectRootDirectoryAbsolutePath,
|
|
1869
|
-
assetsGroupSettings__buildingModeDependent__rawValid.
|
|
1894
|
+
assetsGroupSettings__buildingModeDependent__rawValid.outputTopDirectoryRelativePath
|
|
1870
1895
|
], { forwardSlashOnlySeparators: true });
|
|
1871
1896
|
const assetsManagementGroupNormalizedSettingsGenericProperties = {
|
|
1872
1897
|
ID: groupID,
|
|
@@ -1932,7 +1957,7 @@ class SourceCodeProcessingRawSettingsNormalizer {
|
|
|
1932
1957
|
}
|
|
1933
1958
|
createNormalizedEntryPointsGroupsSettings(entryPointsGroupsSettings__rawValid, completeEntryPointsGroupNormalizedSettingsGeneralPropertiesUntilSpecificEntryPointsGroupNormalizedSettings) {
|
|
1934
1959
|
const entryPointsGroupsSettings__normalized = new Map();
|
|
1935
|
-
/* [ Approach ] This case could be both valid (e.
|
|
1960
|
+
/* [ Approach ] This case could be both valid (e.g. if inside the project markup is being declared only inside
|
|
1936
1961
|
Vue components) or invalid. */
|
|
1937
1962
|
if ((0, es_extensions_1.isUndefined)(entryPointsGroupsSettings__rawValid)) {
|
|
1938
1963
|
return entryPointsGroupsSettings__normalized;
|
|
@@ -1947,28 +1972,30 @@ class SourceCodeProcessingRawSettingsNormalizer {
|
|
|
1947
1972
|
}
|
|
1948
1973
|
let entryPointsGroupSourceFilesTopDirectoryAbsolutePath;
|
|
1949
1974
|
const currentEntryPointsGroupSourceFilesGlobSelectors = [];
|
|
1950
|
-
|
|
1951
|
-
if (
|
|
1975
|
+
let isSingeEntryPointGroup;
|
|
1976
|
+
if ("singleEntryPointRelativePath" in entryPointsGroupSettings__rawValid) {
|
|
1977
|
+
isSingeEntryPointGroup = true;
|
|
1952
1978
|
const absolutePathOfSingleEntryPointOfGroup = ImprovedPath_1.default.buildAbsolutePath([
|
|
1953
1979
|
this.consumingProjectRootDirectoryAbsolutePath,
|
|
1954
|
-
entryPointsGroupSettings__rawValid.
|
|
1980
|
+
entryPointsGroupSettings__rawValid.singleEntryPointRelativePath
|
|
1955
1981
|
], { forwardSlashOnlySeparators: true });
|
|
1956
1982
|
currentEntryPointsGroupSourceFilesGlobSelectors.push(absolutePathOfSingleEntryPointOfGroup);
|
|
1957
1983
|
entryPointsGroupSourceFilesTopDirectoryAbsolutePath = ImprovedPath_1.default.extractDirectoryFromFilePath(absolutePathOfSingleEntryPointOfGroup);
|
|
1958
1984
|
}
|
|
1959
1985
|
else {
|
|
1986
|
+
isSingeEntryPointGroup = false;
|
|
1960
1987
|
entryPointsGroupSourceFilesTopDirectoryAbsolutePath = ImprovedPath_1.default.extractDirectoryFromFilePath(ImprovedPath_1.default.buildAbsolutePath([
|
|
1961
1988
|
this.consumingProjectRootDirectoryAbsolutePath,
|
|
1962
|
-
entryPointsGroupSettings__rawValid.
|
|
1989
|
+
entryPointsGroupSettings__rawValid.topDirectoryRelativePath
|
|
1963
1990
|
], { forwardSlashOnlySeparators: true }));
|
|
1964
1991
|
currentEntryPointsGroupSourceFilesGlobSelectors.push(...this.getSourceFilesGlobSelectorsForMultipleEntryPointsGroup({
|
|
1965
|
-
|
|
1966
|
-
|
|
1992
|
+
entryPointsSourceFilesDirectoryAbsolutePath: entryPointsGroupSourceFilesTopDirectoryAbsolutePath,
|
|
1993
|
+
partialsRecognition: entryPointsGroupSettings__rawValid.partialsRecognition
|
|
1967
1994
|
}));
|
|
1968
1995
|
}
|
|
1969
1996
|
const entryPointsOutputFilesActualBaseDirectoryAbsolutePath = ImprovedPath_1.default.buildAbsolutePath([
|
|
1970
1997
|
this.consumingProjectRootDirectoryAbsolutePath,
|
|
1971
|
-
entryPointsGroupSettings__buildingModeDependent__rawValid.
|
|
1998
|
+
entryPointsGroupSettings__buildingModeDependent__rawValid.outputTopDirectoryRelativePath
|
|
1972
1999
|
], { forwardSlashOnlySeparators: true });
|
|
1973
2000
|
const entryPointsGroupNormalizedSettings__commonPropertiesOnly = {
|
|
1974
2001
|
ID: groupID,
|
|
@@ -1985,18 +2012,18 @@ class SourceCodeProcessingRawSettingsNormalizer {
|
|
|
1985
2012
|
* Generating of single glob with arbitrary conditions set is very difficult and it's not a fact that it's even possible.
|
|
1986
2013
|
* More rational approach is generate the array of globs consisting on main exclusive glob and exclusions.
|
|
1987
2014
|
* */
|
|
1988
|
-
getSourceFilesGlobSelectorsForMultipleEntryPointsGroup({
|
|
2015
|
+
getSourceFilesGlobSelectorsForMultipleEntryPointsGroup({ entryPointsSourceFilesDirectoryAbsolutePath, partialsRecognition }) {
|
|
1989
2016
|
const sourceFilesGlobSelectorsForMultipleEntryPointsGroup = [];
|
|
1990
2017
|
/* [ Specification ] If 'partialsRecognition' has not been specified, all files with filename extensions
|
|
1991
2018
|
* 'this.supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots' below 'entryPointsSourceFilesDirectoryAbsolutePath'
|
|
1992
2019
|
* are being considered as entry points. */
|
|
1993
|
-
if ((0, es_extensions_1.isUndefined)(
|
|
2020
|
+
if ((0, es_extensions_1.isUndefined)(partialsRecognition)) {
|
|
1994
2021
|
sourceFilesGlobSelectorsForMultipleEntryPointsGroup.push(ImprovedGlob_1.default.buildAllFilesInCurrentDirectoryAndBelowGlobSelector({
|
|
1995
2022
|
basicDirectoryPath: entryPointsSourceFilesDirectoryAbsolutePath,
|
|
1996
2023
|
fileNamesExtensions: this.supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots
|
|
1997
2024
|
}));
|
|
1998
2025
|
}
|
|
1999
|
-
else if (
|
|
2026
|
+
else if (partialsRecognition.excludeAllSubdirectories === true) {
|
|
2000
2027
|
sourceFilesGlobSelectorsForMultipleEntryPointsGroup.push(ImprovedGlob_1.default.buildAllFilesInCurrentDirectoryButNotBelowGlobSelector({
|
|
2001
2028
|
basicDirectoryPath: entryPointsSourceFilesDirectoryAbsolutePath,
|
|
2002
2029
|
fileNamesExtensions: this.supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots
|
|
@@ -2009,11 +2036,11 @@ class SourceCodeProcessingRawSettingsNormalizer {
|
|
|
2009
2036
|
});
|
|
2010
2037
|
sourceFilesGlobSelectorsForMultipleEntryPointsGroup.push(inclusiveMainGlobSelector);
|
|
2011
2038
|
let prefixesOfFilesWhichMustBeExcluded;
|
|
2012
|
-
if (Array.isArray(
|
|
2013
|
-
prefixesOfFilesWhichMustBeExcluded =
|
|
2039
|
+
if (Array.isArray(partialsRecognition.excludeFilesWithPrefixes)) {
|
|
2040
|
+
prefixesOfFilesWhichMustBeExcluded = partialsRecognition.excludeFilesWithPrefixes;
|
|
2014
2041
|
}
|
|
2015
|
-
else if ((0, es_extensions_1.isString)(
|
|
2016
|
-
prefixesOfFilesWhichMustBeExcluded = [
|
|
2042
|
+
else if ((0, es_extensions_1.isString)(partialsRecognition.excludeFilesWithPrefixes)) {
|
|
2043
|
+
prefixesOfFilesWhichMustBeExcluded = [partialsRecognition.excludeFilesWithPrefixes];
|
|
2017
2044
|
}
|
|
2018
2045
|
if ((0, es_extensions_1.isNotUndefined)(prefixesOfFilesWhichMustBeExcluded)) {
|
|
2019
2046
|
sourceFilesGlobSelectorsForMultipleEntryPointsGroup.push(ImprovedGlob_1.default.buildExcludingOfFilesWithSpecificPrefixesGlobSelector({
|
|
@@ -2023,14 +2050,11 @@ class SourceCodeProcessingRawSettingsNormalizer {
|
|
|
2023
2050
|
}));
|
|
2024
2051
|
}
|
|
2025
2052
|
let prefixesOfSubdirectoriesInWhichFilesMustBeExcluded;
|
|
2026
|
-
if (Array.isArray(
|
|
2027
|
-
prefixesOfSubdirectoriesInWhichFilesMustBeExcluded =
|
|
2028
|
-
partialsRecognition.excludeSubdirectoriesWithPrefixes;
|
|
2053
|
+
if (Array.isArray(partialsRecognition.excludeSubdirectoriesWithPrefixes)) {
|
|
2054
|
+
prefixesOfSubdirectoriesInWhichFilesMustBeExcluded = partialsRecognition.excludeSubdirectoriesWithPrefixes;
|
|
2029
2055
|
}
|
|
2030
|
-
else if ((0, es_extensions_1.isString)(
|
|
2031
|
-
prefixesOfSubdirectoriesInWhichFilesMustBeExcluded = [
|
|
2032
|
-
entryPointsGroupSettings__rawValid.partialsRecognition.excludeSubdirectoriesWithPrefixes
|
|
2033
|
-
];
|
|
2056
|
+
else if ((0, es_extensions_1.isString)(partialsRecognition.excludeSubdirectoriesWithPrefixes)) {
|
|
2057
|
+
prefixesOfSubdirectoriesInWhichFilesMustBeExcluded = [partialsRecognition.excludeSubdirectoriesWithPrefixes];
|
|
2034
2058
|
}
|
|
2035
2059
|
if ((0, es_extensions_1.isNotUndefined)(prefixesOfSubdirectoriesInWhichFilesMustBeExcluded)) {
|
|
2036
2060
|
sourceFilesGlobSelectorsForMultipleEntryPointsGroup.push(ImprovedGlob_1.default.buildExcludingOfFilesInSubdirectoriesWithSpecificPrefixesGlobSelector({
|
|
@@ -2040,14 +2064,11 @@ class SourceCodeProcessingRawSettingsNormalizer {
|
|
|
2040
2064
|
}));
|
|
2041
2065
|
}
|
|
2042
2066
|
let namesOfSubdirectoriesInWhichFilesMustBeExcluded;
|
|
2043
|
-
if (Array.isArray(
|
|
2044
|
-
namesOfSubdirectoriesInWhichFilesMustBeExcluded =
|
|
2045
|
-
partialsRecognition.excludeSubdirectoriesWithNames;
|
|
2067
|
+
if (Array.isArray(partialsRecognition.excludeSubdirectoriesWithNames)) {
|
|
2068
|
+
namesOfSubdirectoriesInWhichFilesMustBeExcluded = partialsRecognition.excludeSubdirectoriesWithNames;
|
|
2046
2069
|
}
|
|
2047
|
-
else if ((0, es_extensions_1.isString)(
|
|
2048
|
-
namesOfSubdirectoriesInWhichFilesMustBeExcluded = [
|
|
2049
|
-
entryPointsGroupSettings__rawValid.partialsRecognition.excludeSubdirectoriesWithNames
|
|
2050
|
-
];
|
|
2070
|
+
else if ((0, es_extensions_1.isString)(partialsRecognition.excludeSubdirectoriesWithNames)) {
|
|
2071
|
+
namesOfSubdirectoriesInWhichFilesMustBeExcluded = [partialsRecognition.excludeSubdirectoriesWithNames];
|
|
2051
2072
|
}
|
|
2052
2073
|
if ((0, es_extensions_1.isNotUndefined)(namesOfSubdirectoriesInWhichFilesMustBeExcluded)) {
|
|
2053
2074
|
sourceFilesGlobSelectorsForMultipleEntryPointsGroup.push(ImprovedGlob_1.default.buildExcludingOfFilesInSpecificSubdirectoriesGlobSelector({
|
|
@@ -2063,6 +2084,27 @@ class SourceCodeProcessingRawSettingsNormalizer {
|
|
|
2063
2084
|
exports["default"] = SourceCodeProcessingRawSettingsNormalizer;
|
|
2064
2085
|
|
|
2065
2086
|
|
|
2087
|
+
/***/ }),
|
|
2088
|
+
|
|
2089
|
+
/***/ "./ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes.ts":
|
|
2090
|
+
/*!****************************************************************************************!*\
|
|
2091
|
+
!*** ./ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes.ts ***!
|
|
2092
|
+
\****************************************************************************************/
|
|
2093
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
2094
|
+
|
|
2095
|
+
|
|
2096
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2097
|
+
var ConsumingProjectPreDefinedBuildingModes;
|
|
2098
|
+
(function (ConsumingProjectPreDefinedBuildingModes) {
|
|
2099
|
+
ConsumingProjectPreDefinedBuildingModes["staticPreview"] = "STATIC_PREVIEW";
|
|
2100
|
+
ConsumingProjectPreDefinedBuildingModes["localDevelopment"] = "LOCAL_DEVELOPMENT";
|
|
2101
|
+
ConsumingProjectPreDefinedBuildingModes["testing"] = "TESTING";
|
|
2102
|
+
ConsumingProjectPreDefinedBuildingModes["staging"] = "STAGING";
|
|
2103
|
+
ConsumingProjectPreDefinedBuildingModes["production"] = "PRODUCTION";
|
|
2104
|
+
})(ConsumingProjectPreDefinedBuildingModes || (ConsumingProjectPreDefinedBuildingModes = {}));
|
|
2105
|
+
exports["default"] = ConsumingProjectPreDefinedBuildingModes;
|
|
2106
|
+
|
|
2107
|
+
|
|
2066
2108
|
/***/ }),
|
|
2067
2109
|
|
|
2068
2110
|
/***/ "./ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative.ts":
|
|
@@ -2323,7 +2365,6 @@ const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "
|
|
|
2323
2365
|
class GulpStreamsBasedAssetsProcessor extends GulpStreamsBasedTaskExecutor_1.default {
|
|
2324
2366
|
static WAITING_FOR_OTHER_FILES_WILL_BE_SAVED_PERIOD__SECONDS = 1;
|
|
2325
2367
|
associatedAssetsProcessingConfigRepresentative;
|
|
2326
|
-
sourceFilesThoseAlwaysWillBeWatchedGlobSelectors = [];
|
|
2327
2368
|
filesWhichStatusHasBeenChangedAbsolutePathsQueueToProcessing = new Set();
|
|
2328
2369
|
waitingForOtherFilesWillBeSavedDuration = null;
|
|
2329
2370
|
constructor(masterConfigRepresentative, certainAssetsManagementConfigRepresentative) {
|
|
@@ -2331,7 +2372,7 @@ class GulpStreamsBasedAssetsProcessor extends GulpStreamsBasedTaskExecutor_1.def
|
|
|
2331
2372
|
this.associatedAssetsProcessingConfigRepresentative = certainAssetsManagementConfigRepresentative;
|
|
2332
2373
|
}
|
|
2333
2374
|
initializeOrUpdateSourceFilesWatcher() {
|
|
2334
|
-
gulp_1.default.watch(this.
|
|
2375
|
+
gulp_1.default.watch(this.associatedAssetsProcessingConfigRepresentative.relevantSourceFilesGlobSelectors).
|
|
2335
2376
|
on("all", (eventName, fileOrDirectoryPath) => {
|
|
2336
2377
|
es_extensions_1.Logger.logInfo({
|
|
2337
2378
|
title: `${this.SOURCE_FILES_TYPE_LABEL_FOR_LOGGING} files watcher`,
|
|
@@ -2353,7 +2394,7 @@ class GulpStreamsBasedAssetsProcessor extends GulpStreamsBasedTaskExecutor_1.def
|
|
|
2353
2394
|
this.filesWhichStatusHasBeenChangedAbsolutePathsQueueToProcessing.add(fileOrDirectoryPath);
|
|
2354
2395
|
this.waitingForOtherFilesWillBeSavedDuration = setTimeout(() => {
|
|
2355
2396
|
if (this.filesWhichStatusHasBeenChangedAbsolutePathsQueueToProcessing.size > 0) {
|
|
2356
|
-
this.processAssets(Array.from(this.filesWhichStatusHasBeenChangedAbsolutePathsQueueToProcessing));
|
|
2397
|
+
this.processAssets(Array.from(this.filesWhichStatusHasBeenChangedAbsolutePathsQueueToProcessing))();
|
|
2357
2398
|
}
|
|
2358
2399
|
this.filesWhichStatusHasBeenChangedAbsolutePathsQueueToProcessing.clear();
|
|
2359
2400
|
}, (0, es_extensions_1.secondsToMilliseconds)(GulpStreamsBasedAssetsProcessor.WAITING_FOR_OTHER_FILES_WILL_BE_SAVED_PERIOD__SECONDS));
|
|
@@ -2900,7 +2941,8 @@ const ProjectBuildingConfigFromFileDefaultLocalization = {
|
|
|
2900
2941
|
browserLiveReloading: "browserLiveReloading"
|
|
2901
2942
|
},
|
|
2902
2943
|
consumingProjectPreDefinedBuildingModes: {
|
|
2903
|
-
|
|
2944
|
+
staticPreview: "STATIC_PREVIEW",
|
|
2945
|
+
localDevelopment: "LOCAL_DEVELOPMENT",
|
|
2904
2946
|
testing: "TESTING",
|
|
2905
2947
|
staging: "STAGING",
|
|
2906
2948
|
production: "PRODUCTION"
|
|
@@ -2908,15 +2950,17 @@ const ProjectBuildingConfigFromFileDefaultLocalization = {
|
|
|
2908
2950
|
},
|
|
2909
2951
|
reusables: {
|
|
2910
2952
|
sourceCodeProcessingGenericProperties: {
|
|
2911
|
-
|
|
2912
|
-
KEY: "entryPointsSourceFilesTopDirectoryOrSingleFileRelativePath"
|
|
2913
|
-
},
|
|
2953
|
+
topDirectoryRelativePath: { KEY: "topDirectoryRelativePath" },
|
|
2914
2954
|
partialsRecognition: {
|
|
2915
2955
|
KEY: "partialsRecognition",
|
|
2916
2956
|
excludeAllSubdirectories: { KEY: "excludeAllSubdirectories" },
|
|
2917
2957
|
excludeSubdirectoriesWithNames: { KEY: "excludeSubdirectoriesWithNames" },
|
|
2918
2958
|
excludeSubdirectoriesWithPrefixes: { KEY: "excludeSubdirectoriesWithPrefixes" },
|
|
2919
2959
|
excludeFilesWithPrefixes: { KEY: "excludeFilesWithPrefixes" }
|
|
2960
|
+
},
|
|
2961
|
+
singleEntryPointRelativePath: {
|
|
2962
|
+
KEY: "singleEntryPointRelativePath",
|
|
2963
|
+
REQUIREMENT_CONDITION_DESCRIPTION: "'topDirectoryRelativePath' is not defined"
|
|
2920
2964
|
}
|
|
2921
2965
|
},
|
|
2922
2966
|
revisioning: {
|
|
@@ -2963,9 +3007,10 @@ const ProjectBuildingConfigFromFileDefaultLocalization = {
|
|
|
2963
3007
|
standard: { KEY: "standard" },
|
|
2964
3008
|
disable: { KEY: "disable" }
|
|
2965
3009
|
},
|
|
3010
|
+
convertToHandlebarsOnNonStaticPreviewModes: { KEY: "convertToHandlebarsOnNonStaticPreviewModes" },
|
|
2966
3011
|
buildingModeDependent: {
|
|
2967
3012
|
KEY: "buildingModeDependent",
|
|
2968
|
-
|
|
3013
|
+
outputTopDirectoryRelativePath: { KEY: "outputTopDirectoryRelativePath" }
|
|
2969
3014
|
}
|
|
2970
3015
|
}
|
|
2971
3016
|
},
|
|
@@ -2988,7 +3033,7 @@ const ProjectBuildingConfigFromFileDefaultLocalization = {
|
|
|
2988
3033
|
},
|
|
2989
3034
|
buildingModeDependent: {
|
|
2990
3035
|
KEY: "buildingModeDependent",
|
|
2991
|
-
|
|
3036
|
+
outputTopDirectoryRelativePath: { KEY: "outputTopDirectoryRelativePath" },
|
|
2992
3037
|
revisioning: { KEY: "revisioning" }
|
|
2993
3038
|
}
|
|
2994
3039
|
}
|
|
@@ -3039,7 +3084,7 @@ const ProjectBuildingConfigFromFileDefaultLocalization = {
|
|
|
3039
3084
|
},
|
|
3040
3085
|
buildingModeDependent: {
|
|
3041
3086
|
KEY: "buildingModeDependent",
|
|
3042
|
-
|
|
3087
|
+
outputTopDirectoryRelativePath: { KEY: "outputTopDirectoryRelativePath" },
|
|
3043
3088
|
revisioning: { KEY: "revisioning" },
|
|
3044
3089
|
dynamicallyLoadedFilesSubdirectory: { KEY: "dynamicallyLoadedFilesSubdirectory" },
|
|
3045
3090
|
dynamicallyLoadedFilesNamesTemplate: { KEY: "dynamicallyLoadedFilesNamesTemplate" }
|
|
@@ -3053,7 +3098,7 @@ const ProjectBuildingConfigFromFileDefaultLocalization = {
|
|
|
3053
3098
|
sourceFilesTopDirectoryPathAliasForReferencingFromHTML: { KEY: "sourceFilesTopDirectoryPathAliasForReferencingFromHTML" },
|
|
3054
3099
|
buildingModeDependent: {
|
|
3055
3100
|
KEY: "buildingModeDependent",
|
|
3056
|
-
|
|
3101
|
+
outputTopDirectoryRelativePath: { KEY: "outputTopDirectoryRelativePath" },
|
|
3057
3102
|
revisioning: { KEY: "revisioning" },
|
|
3058
3103
|
outputPathTransformations: {
|
|
3059
3104
|
KEY: "outputPathTransformations",
|
|
@@ -3070,7 +3115,7 @@ const ProjectBuildingConfigFromFileDefaultLocalization = {
|
|
|
3070
3115
|
sourceFilesTopDirectoryPathAliasForReferencingFromHTML: { KEY: "sourceFilesTopDirectoryPathAliasForReferencingFromHTML" },
|
|
3071
3116
|
buildingModeDependent: {
|
|
3072
3117
|
KEY: "buildingModeDependent",
|
|
3073
|
-
|
|
3118
|
+
outputTopDirectoryRelativePath: { KEY: "outputTopDirectoryRelativePath" },
|
|
3074
3119
|
revisioning: { KEY: "revisioning" },
|
|
3075
3120
|
outputPathTransformations: {
|
|
3076
3121
|
KEY: "outputPathTransformations",
|
|
@@ -3087,7 +3132,7 @@ const ProjectBuildingConfigFromFileDefaultLocalization = {
|
|
|
3087
3132
|
sourceFilesTopDirectoryPathAliasForReferencingFromHTML: { KEY: "sourceFilesTopDirectoryPathAliasForReferencingFromHTML" },
|
|
3088
3133
|
buildingModeDependent: {
|
|
3089
3134
|
KEY: "buildingModeDependent",
|
|
3090
|
-
|
|
3135
|
+
outputTopDirectoryRelativePath: { KEY: "outputTopDirectoryRelativePath" },
|
|
3091
3136
|
revisioning: { KEY: "revisioning" },
|
|
3092
3137
|
outputPathTransformations: {
|
|
3093
3138
|
KEY: "outputPathTransformations",
|
|
@@ -3104,7 +3149,7 @@ const ProjectBuildingConfigFromFileDefaultLocalization = {
|
|
|
3104
3149
|
sourceFilesTopDirectoryPathAliasForReferencingFromHTML: { KEY: "sourceFilesTopDirectoryPathAliasForReferencingFromHTML" },
|
|
3105
3150
|
buildingModeDependent: {
|
|
3106
3151
|
KEY: "buildingModeDependent",
|
|
3107
|
-
|
|
3152
|
+
outputTopDirectoryRelativePath: { KEY: "outputTopDirectoryRelativePath" },
|
|
3108
3153
|
revisioning: { KEY: "revisioning" },
|
|
3109
3154
|
outputPathTransformations: {
|
|
3110
3155
|
KEY: "outputPathTransformations",
|
|
@@ -3237,7 +3282,6 @@ var ProjectBuildingConfig__FromFile__RawValid;
|
|
|
3237
3282
|
required: false,
|
|
3238
3283
|
properties: ECMA_ScriptLogicProcessingSettings__FromFile__RawValid_1.default.getLocalizedPropertiesSpecification({
|
|
3239
3284
|
ECMA_ScriptProcessingLocalization: localization.tasks.ECMA_ScriptLogicProcessing,
|
|
3240
|
-
sourceCodeProcessingSettingsGenericPropertiesLocalization: localization.reusables.sourceCodeProcessingGenericProperties,
|
|
3241
3285
|
sourceCodeProcessingSettingsGenericPropertiesLocalizedSpecification,
|
|
3242
3286
|
consumingProjectLocalizedPreDefinedBuildingModes,
|
|
3243
3287
|
revisioningPropertiesLocalizedSpecification,
|
|
@@ -3331,7 +3375,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3331
3375
|
};
|
|
3332
3376
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3333
3377
|
/* --- Business rules ----------------------------------------------------------------------------------------------- */
|
|
3334
|
-
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/
|
|
3378
|
+
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes */ "./ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes.ts"));
|
|
3335
3379
|
/* --- Settings representatives --------------------------------------------------------------------------------------- */
|
|
3336
3380
|
const MarkupProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/MarkupProcessingSettingsRepresentative */ "./ProjectBuilding/SourceCodeProcessing/Markup/MarkupProcessingSettingsRepresentative.ts"));
|
|
3337
3381
|
const StylesProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @StylesProcessing/StylesProcessingSettingsRepresentative */ "./ProjectBuilding/SourceCodeProcessing/Styles/StylesProcessingSettingsRepresentative.ts"));
|
|
@@ -3405,8 +3449,11 @@ class ProjectBuildingMasterConfigRepresentative {
|
|
|
3405
3449
|
}
|
|
3406
3450
|
/* --- Project building mode -------------------------------------------------------------------------------------- */
|
|
3407
3451
|
get consumingProjectBuildingMode() { return this.commonSettings.projectBuildingMode; }
|
|
3408
|
-
get
|
|
3409
|
-
return this.commonSettings.projectBuildingMode === ConsumingProjectPreDefinedBuildingModes_1.default.
|
|
3452
|
+
get isStaticPreviewBuildingMode() {
|
|
3453
|
+
return this.commonSettings.projectBuildingMode === ConsumingProjectPreDefinedBuildingModes_1.default.staticPreview;
|
|
3454
|
+
}
|
|
3455
|
+
get isLocalDevelopmentBuildingMode() {
|
|
3456
|
+
return this.commonSettings.projectBuildingMode === ConsumingProjectPreDefinedBuildingModes_1.default.localDevelopment;
|
|
3410
3457
|
}
|
|
3411
3458
|
get isTestingBuildingMode() {
|
|
3412
3459
|
return this.commonSettings.projectBuildingMode === ConsumingProjectPreDefinedBuildingModes_1.default.testing;
|
|
@@ -3445,7 +3492,8 @@ class ProjectBuildingMasterConfigRepresentative {
|
|
|
3445
3492
|
return (0, es_extensions_1.isNotUndefined)(this.videosProcessingSettingsRepresentative);
|
|
3446
3493
|
}
|
|
3447
3494
|
get mustProvideBrowserLiveReloading() {
|
|
3448
|
-
return (0, es_extensions_1.isNotUndefined)(this.browserLiveReloadingSettingsRepresentative) &&
|
|
3495
|
+
return (0, es_extensions_1.isNotUndefined)(this.browserLiveReloadingSettingsRepresentative) &&
|
|
3496
|
+
(this.isStaticPreviewBuildingMode || this.isLocalDevelopmentBuildingMode);
|
|
3449
3497
|
}
|
|
3450
3498
|
/* --- Debugging -------------------------------------------------------------------------------------------------- */
|
|
3451
3499
|
get mustDebugEntryPointsAndPartialFiles() {
|
|
@@ -3703,7 +3751,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3703
3751
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3704
3752
|
};
|
|
3705
3753
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3706
|
-
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding
|
|
3754
|
+
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes */ "./ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes.ts"));
|
|
3707
3755
|
const ECMA_ScriptLogicProcessingRestrictions_1 = __importDefault(__webpack_require__(/*! @ECMA_ScriptProcessing/ECMA_ScriptLogicProcessingRestrictions */ "./ProjectBuilding/SourceCodeProcessing/ECMA_Script/ECMA_ScriptLogicProcessingRestrictions.ts"));
|
|
3708
3756
|
var SupportedECMA_ScriptRuntimesTypes = ECMA_ScriptLogicProcessingRestrictions_1.default.SupportedECMA_ScriptRuntimesTypes;
|
|
3709
3757
|
exports["default"] = {
|
|
@@ -3715,7 +3763,8 @@ exports["default"] = {
|
|
|
3715
3763
|
mustExecute(namedParameters) {
|
|
3716
3764
|
if (namedParameters.targetRuntimeType === SupportedECMA_ScriptRuntimesTypes.browser ||
|
|
3717
3765
|
namedParameters.targetRuntimeType === SupportedECMA_ScriptRuntimesTypes.webWorker) {
|
|
3718
|
-
return namedParameters.consumingProjectBuildingMode !== ConsumingProjectPreDefinedBuildingModes_1.default.
|
|
3766
|
+
return namedParameters.consumingProjectBuildingMode !== ConsumingProjectPreDefinedBuildingModes_1.default.staticPreview &&
|
|
3767
|
+
namedParameters.consumingProjectBuildingMode !== ConsumingProjectPreDefinedBuildingModes_1.default.localDevelopment;
|
|
3719
3768
|
}
|
|
3720
3769
|
return false;
|
|
3721
3770
|
},
|
|
@@ -3754,7 +3803,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
3754
3803
|
const ECMA_ScriptLogicProcessingRestrictions_1 = __importDefault(__webpack_require__(/*! @ECMA_ScriptProcessing/ECMA_ScriptLogicProcessingRestrictions */ "./ProjectBuilding/SourceCodeProcessing/ECMA_Script/ECMA_ScriptLogicProcessingRestrictions.ts"));
|
|
3755
3804
|
var SupportedECMA_ScriptRuntimesTypes = ECMA_ScriptLogicProcessingRestrictions_1.default.SupportedECMA_ScriptRuntimesTypes;
|
|
3756
3805
|
/* --- Default settings --------------------------------------------------------------------------------------------- */
|
|
3757
|
-
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/
|
|
3806
|
+
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes */ "./ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes.ts"));
|
|
3758
3807
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
3759
3808
|
/* eslint-disable-next-line @typescript-eslint/no-redeclare --
|
|
3760
3809
|
* The merging of type/interface and namespace is completely valid TypeScript,
|
|
@@ -3762,7 +3811,7 @@ const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "
|
|
|
3762
3811
|
* https://github.com/eslint/eslint/issues/15504 */
|
|
3763
3812
|
var ECMA_ScriptLogicProcessingSettings__FromFile__RawValid;
|
|
3764
3813
|
(function (ECMA_ScriptLogicProcessingSettings__FromFile__RawValid) {
|
|
3765
|
-
function getLocalizedPropertiesSpecification({ ECMA_ScriptProcessingLocalization,
|
|
3814
|
+
function getLocalizedPropertiesSpecification({ ECMA_ScriptProcessingLocalization, sourceCodeProcessingSettingsGenericPropertiesLocalizedSpecification, consumingProjectLocalizedPreDefinedBuildingModes, revisioningPropertiesLocalizedSpecification, lintingCommonSettingsLocalizedPropertiesSpecification }) {
|
|
3766
3815
|
return {
|
|
3767
3816
|
[ECMA_ScriptProcessingLocalization.common.KEY]: {
|
|
3768
3817
|
newName: "common",
|
|
@@ -3795,9 +3844,7 @@ var ECMA_ScriptLogicProcessingSettings__FromFile__RawValid;
|
|
|
3795
3844
|
value: {
|
|
3796
3845
|
type: Object,
|
|
3797
3846
|
properties: {
|
|
3798
|
-
|
|
3799
|
-
entryPointsSourceFilesTopDirectoryOrSingleFileRelativePath.KEY]: sourceCodeProcessingSettingsGenericPropertiesLocalizedSpecification[sourceCodeProcessingSettingsGenericPropertiesLocalization.
|
|
3800
|
-
entryPointsSourceFilesTopDirectoryOrSingleFileRelativePath.KEY],
|
|
3847
|
+
...sourceCodeProcessingSettingsGenericPropertiesLocalizedSpecification,
|
|
3801
3848
|
[ECMA_ScriptProcessingLocalization.entryPointsGroups.targetRuntime.KEY]: {
|
|
3802
3849
|
newName: "targetRuntime",
|
|
3803
3850
|
type: Object,
|
|
@@ -3914,21 +3961,20 @@ var ECMA_ScriptLogicProcessingSettings__FromFile__RawValid;
|
|
|
3914
3961
|
newName: "buildingModeDependent",
|
|
3915
3962
|
type: es_extensions_1.RawObjectDataProcessor.ValuesTypesIDs.associativeArrayOfUniformTypeValues,
|
|
3916
3963
|
required: true,
|
|
3917
|
-
|
|
3918
|
-
consumingProjectLocalizedPreDefinedBuildingModes.development,
|
|
3919
|
-
consumingProjectLocalizedPreDefinedBuildingModes.production
|
|
3920
|
-
],
|
|
3964
|
+
minimalEntriesCount: 1,
|
|
3921
3965
|
keysRenamings: {
|
|
3922
|
-
[consumingProjectLocalizedPreDefinedBuildingModes.
|
|
3966
|
+
[consumingProjectLocalizedPreDefinedBuildingModes.staticPreview]: ConsumingProjectPreDefinedBuildingModes_1.default.staticPreview,
|
|
3967
|
+
[consumingProjectLocalizedPreDefinedBuildingModes.localDevelopment]: ConsumingProjectPreDefinedBuildingModes_1.default.localDevelopment,
|
|
3923
3968
|
[consumingProjectLocalizedPreDefinedBuildingModes.testing]: ConsumingProjectPreDefinedBuildingModes_1.default.testing,
|
|
3969
|
+
[consumingProjectLocalizedPreDefinedBuildingModes.staging]: ConsumingProjectPreDefinedBuildingModes_1.default.staging,
|
|
3924
3970
|
[consumingProjectLocalizedPreDefinedBuildingModes.production]: ConsumingProjectPreDefinedBuildingModes_1.default.production
|
|
3925
3971
|
},
|
|
3926
3972
|
value: {
|
|
3927
3973
|
type: Object,
|
|
3928
3974
|
properties: {
|
|
3929
3975
|
[ECMA_ScriptProcessingLocalization.entryPointsGroups.
|
|
3930
|
-
buildingModeDependent.
|
|
3931
|
-
newName: "
|
|
3976
|
+
buildingModeDependent.outputTopDirectoryRelativePath.KEY]: {
|
|
3977
|
+
newName: "outputTopDirectoryRelativePath",
|
|
3932
3978
|
type: String,
|
|
3933
3979
|
required: true
|
|
3934
3980
|
},
|
|
@@ -4025,7 +4071,8 @@ class ECMA_ScriptLogicProcessor extends TaskExecutor_1.default {
|
|
|
4025
4071
|
});
|
|
4026
4072
|
}
|
|
4027
4073
|
/** 〔 納品版のみ理由 〕 開発版で同じ事をすれば、gulpが落ちる */
|
|
4028
|
-
if (dataHoldingSelfInstance.masterConfigRepresentative.
|
|
4074
|
+
if ((dataHoldingSelfInstance.masterConfigRepresentative.isStagingBuildingMode ||
|
|
4075
|
+
dataHoldingSelfInstance.masterConfigRepresentative.isProductionBuildingMode) &&
|
|
4029
4076
|
(0, es_extensions_1.isNotUndefined)(finalErrorMessageDynamicPart)) {
|
|
4030
4077
|
es_extensions_1.Logger.logError({
|
|
4031
4078
|
errorType: "ECMA_ScriptLogicProcessingError",
|
|
@@ -4271,9 +4318,14 @@ class WebpackConfigGenerator {
|
|
|
4271
4318
|
...willPugLibraryBeBuilt ? { globalObject: "globalThis" } : null
|
|
4272
4319
|
},
|
|
4273
4320
|
...willBrowserJS_LibraryBeBuilt ? { experiments: { outputModule: true } } : null,
|
|
4274
|
-
mode: this.masterConfigRepresentative.
|
|
4275
|
-
|
|
4276
|
-
|
|
4321
|
+
mode: this.masterConfigRepresentative.isStaticPreviewBuildingMode ||
|
|
4322
|
+
this.masterConfigRepresentative.isLocalDevelopmentBuildingMode ?
|
|
4323
|
+
"development" : "production",
|
|
4324
|
+
watch: this.masterConfigRepresentative.isStaticPreviewBuildingMode ||
|
|
4325
|
+
this.masterConfigRepresentative.isLocalDevelopmentBuildingMode,
|
|
4326
|
+
devtool: this.masterConfigRepresentative.isStaticPreviewBuildingMode ||
|
|
4327
|
+
this.masterConfigRepresentative.isLocalDevelopmentBuildingMode ?
|
|
4328
|
+
"eval" : false,
|
|
4277
4329
|
...entryPointsGroupSettings.targetRuntime.type === SupportedECMA_ScriptRuntimesTypes.nodeJS ? {
|
|
4278
4330
|
node: {
|
|
4279
4331
|
__dirname: true,
|
|
@@ -4429,13 +4481,17 @@ class WebpackConfigGenerator {
|
|
|
4429
4481
|
new vue_loader_1.VueLoaderPlugin(),
|
|
4430
4482
|
new eslint_webpack_plugin_1.default({
|
|
4431
4483
|
extensions: ["js", "ts", "vue"],
|
|
4432
|
-
failOnError: this.masterConfigRepresentative.
|
|
4433
|
-
|
|
4484
|
+
failOnError: this.masterConfigRepresentative.isStagingBuildingMode ||
|
|
4485
|
+
this.masterConfigRepresentative.isProductionBuildingMode,
|
|
4486
|
+
failOnWarning: this.masterConfigRepresentative.isStagingBuildingMode ||
|
|
4487
|
+
this.masterConfigRepresentative.isProductionBuildingMode
|
|
4434
4488
|
})
|
|
4435
4489
|
],
|
|
4436
4490
|
optimization: {
|
|
4437
|
-
minimize: this.masterConfigRepresentative.
|
|
4438
|
-
|
|
4491
|
+
minimize: this.masterConfigRepresentative.isStagingBuildingMode ||
|
|
4492
|
+
this.masterConfigRepresentative.isProductionBuildingMode,
|
|
4493
|
+
emitOnErrors: this.masterConfigRepresentative.isStaticPreviewBuildingMode ||
|
|
4494
|
+
this.masterConfigRepresentative.isLocalDevelopmentBuildingMode
|
|
4439
4495
|
}
|
|
4440
4496
|
};
|
|
4441
4497
|
}
|
|
@@ -4458,7 +4514,8 @@ class WebpackConfigGenerator {
|
|
|
4458
4514
|
* [ path at search string of browser ] + publicPath + chunkFilename
|
|
4459
4515
|
* */
|
|
4460
4516
|
computePublicPathIfPossible(ECMA_ScriptLogicEntryPointsGroupSettings__normalized) {
|
|
4461
|
-
if (!this.masterConfigRepresentative.
|
|
4517
|
+
if (!this.masterConfigRepresentative.isStaticPreviewBuildingMode &&
|
|
4518
|
+
!this.masterConfigRepresentative.isLocalDevelopmentBuildingMode) {
|
|
4462
4519
|
return "/";
|
|
4463
4520
|
}
|
|
4464
4521
|
return ECMA_ScriptLogicEntryPointsGroupSettings__normalized.ID.replace(ECMA_ScriptLogicEntryPointsGroupSettings__normalized.ID, "/");
|
|
@@ -4547,9 +4604,7 @@ class MarkupProcessingRawSettingsNormalizer extends SourceCodeProcessingRawSetti
|
|
|
4547
4604
|
lintingCommonSettings;
|
|
4548
4605
|
static normalize({ markupProcessingSettings__fromFile__rawValid, commonSettings__normalized }) {
|
|
4549
4606
|
const lintingCommonSettings = (0, es_extensions_1.isUndefined)(markupProcessingSettings__fromFile__rawValid.linting) ?
|
|
4550
|
-
{
|
|
4551
|
-
isCompletelyDisabled: !MarkupProcessingSettings__Default_1.default.linting.mustExecute
|
|
4552
|
-
} :
|
|
4607
|
+
{ isCompletelyDisabled: !MarkupProcessingSettings__Default_1.default.linting.mustExecute } :
|
|
4553
4608
|
{
|
|
4554
4609
|
isCompletelyDisabled: markupProcessingSettings__fromFile__rawValid.linting.disableCompletely === true ?
|
|
4555
4610
|
true : !MarkupProcessingSettings__Default_1.default.linting.mustExecute,
|
|
@@ -4577,7 +4632,7 @@ class MarkupProcessingRawSettingsNormalizer extends SourceCodeProcessingRawSetti
|
|
|
4577
4632
|
MarkupProcessingSettings__Default_1.default.waitingForOtherFilesWillBeSavedPeriod__seconds
|
|
4578
4633
|
},
|
|
4579
4634
|
linting: lintingCommonSettings,
|
|
4580
|
-
|
|
4635
|
+
relevantEntryPointsGroups: dataHoldingSelfInstance.createNormalizedEntryPointsGroupsSettings(markupProcessingSettings__fromFile__rawValid.entryPointsGroups, dataHoldingSelfInstance.
|
|
4581
4636
|
completeEntryPointsGroupNormalizedSettingsCommonPropertiesUntilMarkupEntryPointsGroupNormalizedSettings.
|
|
4582
4637
|
bind(dataHoldingSelfInstance))
|
|
4583
4638
|
};
|
|
@@ -4587,15 +4642,6 @@ class MarkupProcessingRawSettingsNormalizer extends SourceCodeProcessingRawSetti
|
|
|
4587
4642
|
this.lintingCommonSettings = namedParameters.lintingCommonSettings;
|
|
4588
4643
|
}
|
|
4589
4644
|
completeEntryPointsGroupNormalizedSettingsCommonPropertiesUntilMarkupEntryPointsGroupNormalizedSettings(entryPointsGroupGenericSettings__normalized, entryPointsGroupSettings__rawValid) {
|
|
4590
|
-
const entryPointsGroupSettings__buildingModeDependent__rawValid = entryPointsGroupSettings__rawValid.buildingModeDependent[this.consumingProjectBuildingMode];
|
|
4591
|
-
if ((0, es_extensions_1.isUndefined)(entryPointsGroupSettings__buildingModeDependent__rawValid)) {
|
|
4592
|
-
es_extensions_1.Logger.throwErrorAndLog({
|
|
4593
|
-
errorInstance: new es_extensions_1.AlgorithmMismatchError(`プロジェクト構成モード:「${this.consumingProjectBuildingMode}」に該当する生入点設定が発見されず。`),
|
|
4594
|
-
occurrenceLocation: "MarkupProcessingRawSettingsNormalizer" +
|
|
4595
|
-
"completeEntryPointsGroupNormalizedSettingsCommonPropertiesUntilMarkupEntryPointsGroupNormalizedSettings",
|
|
4596
|
-
title: es_extensions_1.AlgorithmMismatchError.localization.defaultTitle
|
|
4597
|
-
});
|
|
4598
|
-
}
|
|
4599
4645
|
return {
|
|
4600
4646
|
...entryPointsGroupGenericSettings__normalized,
|
|
4601
4647
|
HTML_Validation: {
|
|
@@ -4621,7 +4667,9 @@ class MarkupProcessingRawSettingsNormalizer extends SourceCodeProcessingRawSetti
|
|
|
4621
4667
|
MarkupProcessingSettings__Default_1.default.accessibilityInspection.mustExecute,
|
|
4622
4668
|
standard: entryPointsGroupSettings__rawValid.accessibilityInspection?.standard ??
|
|
4623
4669
|
MarkupProcessingSettings__Default_1.default.accessibilityInspection.standard
|
|
4624
|
-
}
|
|
4670
|
+
},
|
|
4671
|
+
mustConvertToHandlebarsOnNonStaticPreviewModes: entryPointsGroupSettings__rawValid.
|
|
4672
|
+
convertToHandlebarsOnNonStaticPreviewModes ?? false
|
|
4625
4673
|
};
|
|
4626
4674
|
}
|
|
4627
4675
|
}
|
|
@@ -4666,12 +4714,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4666
4714
|
};
|
|
4667
4715
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4668
4716
|
const GulpStreamBasedSourceCodeProcessingConfigRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/SettingsRepresentatives/GulpStreamBasedSourceCodeProcessingConfigRepresentative */ "./ProjectBuilding/Common/SettingsRepresentatives/GulpStreamBasedSourceCodeProcessingConfigRepresentative.ts"));
|
|
4669
|
-
/* --- Utils -------------------------------------------------------------------------------------------------------- */
|
|
4670
|
-
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
4671
4717
|
class MarkupProcessingSettingsRepresentative extends GulpStreamBasedSourceCodeProcessingConfigRepresentative_1.default {
|
|
4672
|
-
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Markup";
|
|
4673
4718
|
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots;
|
|
4719
|
+
TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM = "Markup";
|
|
4720
|
+
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM = "Markup";
|
|
4721
|
+
prefixOfEntryPointsGroupReference = "@";
|
|
4674
4722
|
waitingForTheOtherFilesWillBeSavedPeriod__seconds;
|
|
4723
|
+
entryPointsGroupsNormalizedSettingsMappedByReferences;
|
|
4675
4724
|
sourceCodeLintingCommonSettings;
|
|
4676
4725
|
sourceAndOutputFilesAbsolutePathsCorrespondenceMap = new Map();
|
|
4677
4726
|
relevantEntryPointsGroupsSettings;
|
|
@@ -4680,21 +4729,15 @@ class MarkupProcessingSettingsRepresentative extends GulpStreamBasedSourceCodePr
|
|
|
4680
4729
|
super(projectBuildingMasterConfigRepresentative);
|
|
4681
4730
|
this.sourceCodeProcessingCommonSettings = normalizedMarkupProcessingSettings.common;
|
|
4682
4731
|
this.sourceCodeLintingCommonSettings = normalizedMarkupProcessingSettings.linting;
|
|
4683
|
-
this.relevantEntryPointsGroupsSettings = normalizedMarkupProcessingSettings.
|
|
4684
|
-
entryPointsGroupsActualForCurrentProjectBuildingMode;
|
|
4685
|
-
if (this.relevantEntryPointsGroupsSettings.size === 0) {
|
|
4686
|
-
es_extensions_1.Logger.logWarning({
|
|
4687
|
-
title: "Styles processing idle",
|
|
4688
|
-
description: "Styles processing idle",
|
|
4689
|
-
occurrenceLocation: "No markup processing settings has been specified for project building mode " +
|
|
4690
|
-
`'${this.masterConfigRepresentative.consumingProjectBuildingMode}' and/or current ` +
|
|
4691
|
-
"selective execution."
|
|
4692
|
-
});
|
|
4693
|
-
}
|
|
4732
|
+
this.relevantEntryPointsGroupsSettings = normalizedMarkupProcessingSettings.relevantEntryPointsGroups;
|
|
4694
4733
|
this.supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots = normalizedMarkupProcessingSettings.common.
|
|
4695
4734
|
supportedSourceFileNameExtensionsWithoutLeadingDots;
|
|
4696
4735
|
this.waitingForTheOtherFilesWillBeSavedPeriod__seconds = normalizedMarkupProcessingSettings.common.
|
|
4697
4736
|
waitingForSubsequentFilesWillBeSavedPeriod__seconds;
|
|
4737
|
+
this.entryPointsGroupsNormalizedSettingsMappedByReferences = new Map(Array.from(this.relevantEntryPointsGroupsSettings.values()).map((entryPointsGroupSettings) => [
|
|
4738
|
+
`${this.prefixOfEntryPointsGroupReference}${entryPointsGroupSettings.ID}`,
|
|
4739
|
+
entryPointsGroupSettings
|
|
4740
|
+
]));
|
|
4698
4741
|
super.initializeOrUpdatePartialFilesAndEntryPointsRelationsMap();
|
|
4699
4742
|
}
|
|
4700
4743
|
}
|
|
@@ -4715,7 +4758,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4715
4758
|
};
|
|
4716
4759
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4717
4760
|
const MarkupProcessingRestrictions_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/MarkupProcessingRestrictions */ "./ProjectBuilding/SourceCodeProcessing/Markup/MarkupProcessingRestrictions.ts"));
|
|
4718
|
-
|
|
4761
|
+
const MarkupProcessingSettings__Default = {
|
|
4719
4762
|
waitingForOtherFilesWillBeSavedPeriod__seconds: 1,
|
|
4720
4763
|
linting: {
|
|
4721
4764
|
mustExecute: true,
|
|
@@ -4729,6 +4772,7 @@ exports["default"] = {
|
|
|
4729
4772
|
standard: MarkupProcessingRestrictions_1.default.SupportedAccessibilityStandards.WCAG2AAA
|
|
4730
4773
|
}
|
|
4731
4774
|
};
|
|
4775
|
+
exports["default"] = MarkupProcessingSettings__Default;
|
|
4732
4776
|
|
|
4733
4777
|
|
|
4734
4778
|
/***/ }),
|
|
@@ -4744,10 +4788,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4744
4788
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4745
4789
|
};
|
|
4746
4790
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4747
|
-
/* --- Enumerations ------------------------------------------------------------------------------------------------- */
|
|
4748
|
-
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Defaults/ConsumingProjectPreDefinedBuildingModes */ "./ProjectBuilding/Common/Defaults/ConsumingProjectPreDefinedBuildingModes.ts"));
|
|
4749
4791
|
/* --- Restrictions ------------------------------------------------------------------------------------------------- */
|
|
4750
4792
|
const MarkupProcessingRestrictions_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/MarkupProcessingRestrictions */ "./ProjectBuilding/SourceCodeProcessing/Markup/MarkupProcessingRestrictions.ts"));
|
|
4793
|
+
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes */ "./ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes.ts"));
|
|
4751
4794
|
/* --- General auxiliaries ------------------------------------------------------------------------------------------ */
|
|
4752
4795
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
4753
4796
|
/* eslint-disable-next-line @typescript-eslint/no-redeclare --
|
|
@@ -4783,6 +4826,7 @@ var MarkupProcessingSettings__FromFile__RawValid;
|
|
|
4783
4826
|
newName: "entryPointsGroups",
|
|
4784
4827
|
type: es_extensions_1.RawObjectDataProcessor.ValuesTypesIDs.associativeArrayOfUniformTypeValues,
|
|
4785
4828
|
required: true,
|
|
4829
|
+
minimalEntriesCount: 1,
|
|
4786
4830
|
value: {
|
|
4787
4831
|
type: Object,
|
|
4788
4832
|
properties: {
|
|
@@ -4832,24 +4876,28 @@ var MarkupProcessingSettings__FromFile__RawValid;
|
|
|
4832
4876
|
}
|
|
4833
4877
|
}
|
|
4834
4878
|
},
|
|
4879
|
+
[markupProcessingLocalization.entryPointsGroups.convertToHandlebarsOnNonStaticPreviewModes.KEY]: {
|
|
4880
|
+
newName: "convertToHandlebarsOnNonStaticPreviewModes",
|
|
4881
|
+
type: Boolean,
|
|
4882
|
+
required: false
|
|
4883
|
+
},
|
|
4835
4884
|
[markupProcessingLocalization.entryPointsGroups.buildingModeDependent.KEY]: {
|
|
4836
4885
|
newName: "buildingModeDependent",
|
|
4837
4886
|
type: es_extensions_1.RawObjectDataProcessor.ValuesTypesIDs.associativeArrayOfUniformTypeValues,
|
|
4838
4887
|
required: true,
|
|
4839
|
-
|
|
4840
|
-
consumingProjectLocalizedPreDefinedBuildingModes.development,
|
|
4841
|
-
consumingProjectLocalizedPreDefinedBuildingModes.production
|
|
4842
|
-
],
|
|
4888
|
+
minimalEntriesCount: 1,
|
|
4843
4889
|
keysRenamings: {
|
|
4844
|
-
[consumingProjectLocalizedPreDefinedBuildingModes.
|
|
4890
|
+
[consumingProjectLocalizedPreDefinedBuildingModes.staticPreview]: ConsumingProjectPreDefinedBuildingModes_1.default.staticPreview,
|
|
4891
|
+
[consumingProjectLocalizedPreDefinedBuildingModes.localDevelopment]: ConsumingProjectPreDefinedBuildingModes_1.default.localDevelopment,
|
|
4845
4892
|
[consumingProjectLocalizedPreDefinedBuildingModes.testing]: ConsumingProjectPreDefinedBuildingModes_1.default.testing,
|
|
4893
|
+
[consumingProjectLocalizedPreDefinedBuildingModes.staging]: ConsumingProjectPreDefinedBuildingModes_1.default.staging,
|
|
4846
4894
|
[consumingProjectLocalizedPreDefinedBuildingModes.production]: ConsumingProjectPreDefinedBuildingModes_1.default.production
|
|
4847
4895
|
},
|
|
4848
4896
|
value: {
|
|
4849
4897
|
type: Object,
|
|
4850
4898
|
properties: {
|
|
4851
|
-
[markupProcessingLocalization.entryPointsGroups.buildingModeDependent.
|
|
4852
|
-
newName: "
|
|
4899
|
+
[markupProcessingLocalization.entryPointsGroups.buildingModeDependent.outputTopDirectoryRelativePath.KEY]: {
|
|
4900
|
+
newName: "outputTopDirectoryRelativePath",
|
|
4853
4901
|
type: String,
|
|
4854
4902
|
required: true
|
|
4855
4903
|
}
|
|
@@ -4889,7 +4937,7 @@ const gulp_pug_1 = __importDefault(__webpack_require__(/*! gulp-pug */ "gulp-pug
|
|
|
4889
4937
|
const gulp_intercept_1 = __importDefault(__webpack_require__(/*! gulp-intercept */ "gulp-intercept"));
|
|
4890
4938
|
const gulp_html_prettify_1 = __importDefault(__webpack_require__(/*! gulp-html-prettify */ "gulp-html-prettify"));
|
|
4891
4939
|
/* --- Applied utils ------------------------------------------------------------------------------------------------ */
|
|
4892
|
-
const
|
|
4940
|
+
const ResourcesReferencesResolverForHTML_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/ResourcesReferencesResolverForHTML/ResourcesReferencesResolverForHTML */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/ResourcesReferencesResolverForHTML/ResourcesReferencesResolverForHTML.ts"));
|
|
4893
4941
|
const HTML_Validator_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/HTML_Validator/HTML_Validator */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_Validator.ts"));
|
|
4894
4942
|
const AccessibilityInspector_1 = __importDefault(__webpack_require__(/*! ./Plugins/AccessibilityInspector/AccessibilityInspector */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/AccessibilityInspector/AccessibilityInspector.ts"));
|
|
4895
4943
|
const removeExtraSpacesFromJapaneseText_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/removeExtraSpacesFromJapaneseText */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/removeExtraSpacesFromJapaneseText.ts"));
|
|
@@ -4906,7 +4954,8 @@ class MarkupProcessor extends GulpStreamsBasedSourceCodeProcessor_1.default {
|
|
|
4906
4954
|
return () => new stream_1.PassThrough().end();
|
|
4907
4955
|
}
|
|
4908
4956
|
const dataHoldingSelfInstance = new MarkupProcessor(masterConfigRepresentative, markupProcessingSettingsRepresentative);
|
|
4909
|
-
if (masterConfigRepresentative.
|
|
4957
|
+
if (masterConfigRepresentative.isStaticPreviewBuildingMode ||
|
|
4958
|
+
masterConfigRepresentative.isLocalDevelopmentBuildingMode) {
|
|
4910
4959
|
dataHoldingSelfInstance.initializeSourceFilesDirectoriesWhichAlwaysWillBeBeingWatchedGlobSelectors();
|
|
4911
4960
|
dataHoldingSelfInstance.initializeOrUpdateWatchedSourceFilesGlobSelectors();
|
|
4912
4961
|
dataHoldingSelfInstance.initializeOrUpdateSourceFilesWatcher();
|
|
@@ -4930,7 +4979,8 @@ class MarkupProcessor extends GulpStreamsBasedSourceCodeProcessor_1.default {
|
|
|
4930
4979
|
pipe((0, gulp_intercept_1.default)(this.addActualSourceCodeProcessingSettingsToVinylFile.bind(this))).
|
|
4931
4980
|
pipe((0, gulp_pug_1.default)({
|
|
4932
4981
|
locals: {
|
|
4933
|
-
|
|
4982
|
+
__IS_STATIC_PREVIEW_BUILDING_MODE__: this.masterConfigRepresentative.isStaticPreviewBuildingMode,
|
|
4983
|
+
__IS_LOCAL_DEVELOPMENT_BUILDING_MODE__: this.masterConfigRepresentative.isLocalDevelopmentBuildingMode,
|
|
4934
4984
|
__IS_TESTING_BUILDING_MODE__: this.masterConfigRepresentative.isTestingBuildingMode,
|
|
4935
4985
|
__IS_STAGING_BUILDING_MODE__: this.masterConfigRepresentative.isStagingBuildingMode,
|
|
4936
4986
|
__IS_PRODUCTION_BUILDING_MODE__: this.masterConfigRepresentative.isProductionBuildingMode
|
|
@@ -4954,16 +5004,25 @@ class MarkupProcessor extends GulpStreamsBasedSourceCodeProcessor_1.default {
|
|
|
4954
5004
|
}
|
|
4955
5005
|
onRawOutputCode(_compiledHTML_File) {
|
|
4956
5006
|
const compiledHTML_File = _compiledHTML_File;
|
|
4957
|
-
compiledHTML_File.contents = Buffer.from(
|
|
5007
|
+
compiledHTML_File.contents = Buffer.from(ResourcesReferencesResolverForHTML_1.default.resolve(compiledHTML_File, this.masterConfigRepresentative));
|
|
4958
5008
|
return compiledHTML_File;
|
|
4959
5009
|
}
|
|
4960
5010
|
onPostProcessedCode(_compiledHTML_File) {
|
|
4961
5011
|
const compiledHTML_File = _compiledHTML_File;
|
|
4962
|
-
|
|
4963
|
-
|
|
5012
|
+
this.markupProcessingConfigRepresentative.
|
|
5013
|
+
sourceAndOutputFilesAbsolutePathsCorrespondenceMap.
|
|
5014
|
+
set(ImprovedPath_1.default.replacePathSeparatorsToForwardSlashes(compiledHTML_File.sourceAbsolutePath), ImprovedPath_1.default.joinPathSegments(compiledHTML_File.outputDirectoryAbsolutePath, compiledHTML_File.basename));
|
|
5015
|
+
if (compiledHTML_File.processingSettings.mustConvertToHandlebarsOnNonStaticPreviewModes &&
|
|
5016
|
+
!this.masterConfigRepresentative.isStaticPreviewBuildingMode) {
|
|
5017
|
+
compiledHTML_File.extname = ".hbs";
|
|
4964
5018
|
}
|
|
4965
|
-
|
|
4966
|
-
|
|
5019
|
+
else {
|
|
5020
|
+
if (compiledHTML_File.processingSettings.HTML_Validation.mustExecute) {
|
|
5021
|
+
HTML_Validator_1.default.validateHTML(compiledHTML_File, this.masterConfigRepresentative);
|
|
5022
|
+
}
|
|
5023
|
+
if (compiledHTML_File.processingSettings.accessibilityInspection.mustExecute) {
|
|
5024
|
+
AccessibilityInspector_1.default.inspectAccessibility(compiledHTML_File, this.masterConfigRepresentative);
|
|
5025
|
+
}
|
|
4967
5026
|
}
|
|
4968
5027
|
return compiledHTML_File;
|
|
4969
5028
|
}
|
|
@@ -4992,7 +5051,6 @@ const access_sniff_1 = __importDefault(__webpack_require__(/*! access-sniff */ "
|
|
|
4992
5051
|
const node_notifier_1 = __importDefault(__webpack_require__(/*! node-notifier */ "node-notifier"));
|
|
4993
5052
|
const getExpectedToBeNonNullStringifiedContentOfVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile */ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts"));
|
|
4994
5053
|
const isCompiledHTML_ContentEmpty_1 = __importDefault(__webpack_require__(/*! @Utils/isCompiledHTML_ContentEmpty */ "./Utils/isCompiledHTML_ContentEmpty.ts"));
|
|
4995
|
-
/* --- General utils ------------------------------------------------------------------------------------------------ */
|
|
4996
5054
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
4997
5055
|
const ImprovedPath_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/ImprovedPath/ImprovedPath */ "./UtilsIncubator/ImprovedPath/ImprovedPath.ts"));
|
|
4998
5056
|
const Stopwatch_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/Stopwatch */ "./UtilsIncubator/Stopwatch.ts"));
|
|
@@ -5045,7 +5103,7 @@ class AccessibilityInspector {
|
|
|
5045
5103
|
}
|
|
5046
5104
|
es_extensions_1.Logger.logErrorLikeMessage(AccessibilityInspector.localization.generateIssuesFoundErrorLog({
|
|
5047
5105
|
targetFileRelativePath,
|
|
5048
|
-
|
|
5106
|
+
formattedErrorsAndWarnings: formattedErrors.join("\n\n")
|
|
5049
5107
|
}));
|
|
5050
5108
|
});
|
|
5051
5109
|
}
|
|
@@ -5063,85 +5121,259 @@ exports["default"] = AccessibilityInspector;
|
|
|
5063
5121
|
|
|
5064
5122
|
|
|
5065
5123
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5066
|
-
const
|
|
5124
|
+
const accessibilityInspectorLocalization__english = {
|
|
5067
5125
|
generateFileIsEmptyWarningLog: (namedParameters) => ({
|
|
5068
|
-
title: "
|
|
5069
|
-
description: `File '${namedParameters.targetFileRelativePath}' is empty,
|
|
5126
|
+
title: "HTML code accessibility inspection terminated",
|
|
5127
|
+
description: `File '${namedParameters.targetFileRelativePath}' is empty, nothing to inspect.`
|
|
5070
5128
|
}),
|
|
5071
5129
|
generateInspectionStartedInfoLog: (namedParameters) => ({
|
|
5072
|
-
title: "
|
|
5073
|
-
description: `Begin the inspection of file '${namedParameters.targetFileRelativePath}' ...`
|
|
5130
|
+
title: "HTML code accessibility inspection started",
|
|
5131
|
+
description: `Begin the accessibility inspection of HTML code in the file '${namedParameters.targetFileRelativePath}' ...`
|
|
5074
5132
|
}),
|
|
5075
5133
|
generateInspectionFinishedWithNoIssuesFoundSuccessLog: (namedParameters) => ({
|
|
5076
|
-
title: "
|
|
5077
|
-
description: `
|
|
5134
|
+
title: "HTML code accessibility inspection finished",
|
|
5135
|
+
description: `The HTML code in file '${namedParameters.targetFileRelativePath}' has not the accessibility issues.\n` +
|
|
5078
5136
|
`${namedParameters.secondsElapsed} seconds elapsed.`
|
|
5079
5137
|
}),
|
|
5080
5138
|
issuesFoundNotification: {
|
|
5081
|
-
title: "
|
|
5082
|
-
message: "Accessibility issues detected.
|
|
5139
|
+
title: "HTML code accessibility inspection, issue(s) found",
|
|
5140
|
+
message: "Accessibility issues detected in one or more HTML files. Please check the console for the details."
|
|
5083
5141
|
},
|
|
5084
5142
|
generateIssueOccurrenceLocationIndication: (namedParameters) => `Line ${namedParameters.lineNumber}, column ${namedParameters.columnNumber}`,
|
|
5085
5143
|
generateIssuesFoundErrorLog: (namedParameters) => ({
|
|
5086
|
-
customBadgeText: "
|
|
5087
|
-
title: "
|
|
5088
|
-
description: `
|
|
5089
|
-
`${namedParameters.
|
|
5144
|
+
customBadgeText: "HTML code accessibility inspection not passed",
|
|
5145
|
+
title: "HTML code accessibility inspection, issue(s) found",
|
|
5146
|
+
description: `HTML file '${namedParameters.targetFileRelativePath}' is including the following accessibility issues:\n\n` +
|
|
5147
|
+
`${namedParameters.formattedErrorsAndWarnings}\n\n`
|
|
5090
5148
|
}),
|
|
5091
5149
|
formattedError: {
|
|
5092
5150
|
violatedGuidelineItem: "Violated rule",
|
|
5093
5151
|
keyAndValueSeparator: ":"
|
|
5094
5152
|
}
|
|
5095
5153
|
};
|
|
5096
|
-
exports["default"] =
|
|
5154
|
+
exports["default"] = accessibilityInspectorLocalization__english;
|
|
5097
5155
|
|
|
5098
5156
|
|
|
5099
5157
|
/***/ }),
|
|
5100
5158
|
|
|
5101
|
-
/***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/
|
|
5102
|
-
|
|
5103
|
-
!*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/
|
|
5104
|
-
|
|
5159
|
+
/***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_Validator.ts":
|
|
5160
|
+
/*!**********************************************************************************************!*\
|
|
5161
|
+
!*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_Validator.ts ***!
|
|
5162
|
+
\**********************************************************************************************/
|
|
5163
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
5164
|
+
|
|
5165
|
+
|
|
5166
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5167
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5168
|
+
};
|
|
5169
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5170
|
+
/* --- Assets ------------------------------------------------------------------------------------------------------- */
|
|
5171
|
+
const HTML_ValidatorLocalization_english_1 = __importDefault(__webpack_require__(/*! ./HTML_ValidatorLocalization.english */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_ValidatorLocalization.english.ts"));
|
|
5172
|
+
/* --- Applied utils ------------------------------------------------------------------------------------------------ */
|
|
5173
|
+
const html_validator_1 = __importDefault(__webpack_require__(/*! html-validator */ "html-validator"));
|
|
5174
|
+
const getExpectedToBeNonNullStringifiedContentOfVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile */ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts"));
|
|
5175
|
+
const isCompiledHTML_ContentEmpty_1 = __importDefault(__webpack_require__(/*! @Utils/isCompiledHTML_ContentEmpty */ "./Utils/isCompiledHTML_ContentEmpty.ts"));
|
|
5176
|
+
const node_notifier_1 = __importDefault(__webpack_require__(/*! node-notifier */ "node-notifier"));
|
|
5177
|
+
/* --- General utils ------------------------------------------------------------------------------------------------ */
|
|
5178
|
+
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
5179
|
+
const ImprovedPath_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/ImprovedPath/ImprovedPath */ "./UtilsIncubator/ImprovedPath/ImprovedPath.ts"));
|
|
5180
|
+
const Stopwatch_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/Stopwatch */ "./UtilsIncubator/Stopwatch.ts"));
|
|
5181
|
+
class HTML_Validator {
|
|
5182
|
+
static localization = HTML_ValidatorLocalization_english_1.default;
|
|
5183
|
+
static validateHTML(compiledHTML_File, masterConfigRepresentative) {
|
|
5184
|
+
const extractedHTML_Code = (0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File);
|
|
5185
|
+
const targetFileRelativePath = ImprovedPath_1.default.computeRelativePath({
|
|
5186
|
+
basePath: masterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
|
|
5187
|
+
comparedPath: compiledHTML_File.path
|
|
5188
|
+
});
|
|
5189
|
+
if ((0, isCompiledHTML_ContentEmpty_1.default)(extractedHTML_Code)) {
|
|
5190
|
+
es_extensions_1.Logger.logWarning(HTML_Validator.localization.generateFileIsEmptyWarningLog({ targetFileRelativePath }));
|
|
5191
|
+
return;
|
|
5192
|
+
}
|
|
5193
|
+
const validationTimeMeasuringStopwatch = new Stopwatch_1.default().startOrRestart();
|
|
5194
|
+
es_extensions_1.Logger.logInfo(HTML_Validator.localization.generateValidationStartedInfoLog({ targetFileRelativePath }));
|
|
5195
|
+
(0, html_validator_1.default)({
|
|
5196
|
+
/* eslint-disable-next-line id-denylist --
|
|
5197
|
+
* From the viewpoint of TypeScript, the property name does not conflict with imported names.
|
|
5198
|
+
* ESLint community has declined to fix this.
|
|
5199
|
+
* https://github.com/eslint/eslint/issues/15504 */
|
|
5200
|
+
data: extractedHTML_Code,
|
|
5201
|
+
format: "json"
|
|
5202
|
+
}).
|
|
5203
|
+
then((validationResults) => {
|
|
5204
|
+
const validationPeriod__seconds = validationTimeMeasuringStopwatch.stop().seconds;
|
|
5205
|
+
const filteredIssues = (0, es_extensions_1.removeArrayElementsByPredicates)({
|
|
5206
|
+
targetArray: validationResults.messages,
|
|
5207
|
+
predicates: HTML_Validator.getPredicatesForHTML_ValidationIssuesFiltering(),
|
|
5208
|
+
mutably: false
|
|
5209
|
+
}).updatedArray;
|
|
5210
|
+
if (filteredIssues.length === 0) {
|
|
5211
|
+
es_extensions_1.Logger.logSuccess(HTML_Validator.localization.generateValidationFinishedWithNoIssuesFoundSuccessLog({
|
|
5212
|
+
targetFileRelativePath,
|
|
5213
|
+
secondsElapsed: validationPeriod__seconds
|
|
5214
|
+
}));
|
|
5215
|
+
return;
|
|
5216
|
+
}
|
|
5217
|
+
node_notifier_1.default.notify(HTML_Validator.localization.issuesFoundNotification);
|
|
5218
|
+
const formattedErrors = [];
|
|
5219
|
+
for (const issue of filteredIssues) {
|
|
5220
|
+
let accumulatingFormattedError = "";
|
|
5221
|
+
if (HTML_Validator.isValidationMessageLocationObject(issue)) {
|
|
5222
|
+
const codeFragmentPartWhichMustBeHighlighted = issue.extract.substring(issue.hiliteStart, issue.hiliteStart + issue.hiliteLength);
|
|
5223
|
+
accumulatingFormattedError = `${issue.extract.replace(codeFragmentPartWhichMustBeHighlighted, es_extensions_1.Logger.highlightText(codeFragmentPartWhichMustBeHighlighted))}\n${HTML_Validator.localization.generateIssueOccurrenceLocationIndication({
|
|
5224
|
+
lineNumber: issue.lastLine, startingColumnNumber: issue.firstColumn, lastColumnNumber: issue.lastColumn
|
|
5225
|
+
})}\n`;
|
|
5226
|
+
}
|
|
5227
|
+
switch (issue.type) {
|
|
5228
|
+
case "error": {
|
|
5229
|
+
accumulatingFormattedError = `${accumulatingFormattedError}` +
|
|
5230
|
+
`${HTML_Validator.localization.issuesTypesTitles.grossViolation}` +
|
|
5231
|
+
`${HTML_Validator.localization.issuesTypesTitles.keyAndValueSeparator}`;
|
|
5232
|
+
break;
|
|
5233
|
+
}
|
|
5234
|
+
case "info": {
|
|
5235
|
+
accumulatingFormattedError =
|
|
5236
|
+
`${accumulatingFormattedError}` +
|
|
5237
|
+
`${HTML_Validator.localization.issuesTypesTitles.recommendationDisregard}` +
|
|
5238
|
+
`${HTML_Validator.localization.issuesTypesTitles.keyAndValueSeparator}`;
|
|
5239
|
+
break;
|
|
5240
|
+
}
|
|
5241
|
+
default: {
|
|
5242
|
+
accumulatingFormattedError = `${accumulatingFormattedError}` +
|
|
5243
|
+
`${HTML_Validator.localization.issuesTypesTitles.other}` +
|
|
5244
|
+
`${HTML_Validator.localization.issuesTypesTitles.keyAndValueSeparator}`;
|
|
5245
|
+
break;
|
|
5246
|
+
}
|
|
5247
|
+
}
|
|
5248
|
+
accumulatingFormattedError = `${accumulatingFormattedError}${issue.message}`;
|
|
5249
|
+
formattedErrors.push(accumulatingFormattedError);
|
|
5250
|
+
}
|
|
5251
|
+
es_extensions_1.Logger.logErrorLikeMessage(HTML_Validator.localization.generateIssuesFoundErrorLog({
|
|
5252
|
+
targetFileRelativePath,
|
|
5253
|
+
formattedErrorsAndWarnings: formattedErrors.join("\n\n")
|
|
5254
|
+
}));
|
|
5255
|
+
}).
|
|
5256
|
+
catch((error) => {
|
|
5257
|
+
es_extensions_1.Logger.logError({
|
|
5258
|
+
errorType: es_extensions_1.DataRetrievingFailedError.localization.defaultTitle,
|
|
5259
|
+
...HTML_Validator.localization.validationFailedErrorLog,
|
|
5260
|
+
occurrenceLocation: "HTML_Validator.validateHTML(...parameters)",
|
|
5261
|
+
caughtError: error
|
|
5262
|
+
});
|
|
5263
|
+
});
|
|
5264
|
+
}
|
|
5265
|
+
static getPredicatesForHTML_ValidationIssuesFiltering() {
|
|
5266
|
+
return [
|
|
5267
|
+
(HTML_ValidationIssue) => HTML_ValidationIssue.message === "Attribute “webkitdirectory” not allowed on element “input” at this point."
|
|
5268
|
+
];
|
|
5269
|
+
}
|
|
5270
|
+
static isValidationMessageLocationObject(violation) {
|
|
5271
|
+
return (0, es_extensions_1.isArbitraryObject)(violation) &&
|
|
5272
|
+
(0, es_extensions_1.isNotUndefined)(violation.extract) &&
|
|
5273
|
+
(0, es_extensions_1.isNotUndefined)(violation.lastLine) &&
|
|
5274
|
+
(0, es_extensions_1.isNotUndefined)(violation.firstColumn) &&
|
|
5275
|
+
(0, es_extensions_1.isNotUndefined)(violation.lastColumn);
|
|
5276
|
+
}
|
|
5277
|
+
}
|
|
5278
|
+
exports["default"] = HTML_Validator;
|
|
5279
|
+
|
|
5280
|
+
|
|
5281
|
+
/***/ }),
|
|
5282
|
+
|
|
5283
|
+
/***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_ValidatorLocalization.english.ts":
|
|
5284
|
+
/*!******************************************************************************************************************!*\
|
|
5285
|
+
!*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_ValidatorLocalization.english.ts ***!
|
|
5286
|
+
\******************************************************************************************************************/
|
|
5287
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
5288
|
+
|
|
5289
|
+
|
|
5290
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5291
|
+
const HTML_ValidatorLocalization__english = {
|
|
5292
|
+
generateFileIsEmptyWarningLog: (namedParameters) => ({
|
|
5293
|
+
title: "HTML code validation terminated",
|
|
5294
|
+
description: `File '${namedParameters.targetFileRelativePath}' is empty, no HTML to validate.`
|
|
5295
|
+
}),
|
|
5296
|
+
generateValidationStartedInfoLog: (namedParameters) => ({
|
|
5297
|
+
title: "HTML code validation started",
|
|
5298
|
+
description: `Begin the validation of HTML code in the file '${namedParameters.targetFileRelativePath}' ...`
|
|
5299
|
+
}),
|
|
5300
|
+
generateValidationFinishedWithNoIssuesFoundSuccessLog: (namedParameters) => ({
|
|
5301
|
+
title: "HTML validation finished",
|
|
5302
|
+
description: `File '${namedParameters.targetFileRelativePath}' is fully obeying to W3C rules and recommendations.\n` +
|
|
5303
|
+
`${namedParameters.secondsElapsed} seconds elapsed.`
|
|
5304
|
+
}),
|
|
5305
|
+
issuesFoundNotification: {
|
|
5306
|
+
title: "HTML validation, issue(s) found",
|
|
5307
|
+
message: "W3C rules violations and / or recommendations neglect detected. Check the console for the details."
|
|
5308
|
+
},
|
|
5309
|
+
generateIssueOccurrenceLocationIndication: (namedParameters) => `Line ${namedParameters.lineNumber}, ` +
|
|
5310
|
+
`columns ${namedParameters.startingColumnNumber}-${namedParameters.lastColumnNumber}`,
|
|
5311
|
+
issuesTypesTitles: {
|
|
5312
|
+
grossViolation: "Gross violation",
|
|
5313
|
+
recommendationDisregard: "Recommendation disregard",
|
|
5314
|
+
other: "Other issue",
|
|
5315
|
+
keyAndValueSeparator: ": "
|
|
5316
|
+
},
|
|
5317
|
+
generateIssuesFoundErrorLog: (namedParameters) => ({
|
|
5318
|
+
customBadgeText: "HTML validation not passed",
|
|
5319
|
+
title: "HTML validation, issue(s) found",
|
|
5320
|
+
description: `File '${namedParameters.targetFileRelativePath}' is including the following HTML validity issues:\n\n` +
|
|
5321
|
+
`${namedParameters.formattedErrorsAndWarnings}\n\n`
|
|
5322
|
+
}),
|
|
5323
|
+
validationFailedErrorLog: {
|
|
5324
|
+
title: "HTML validation failed",
|
|
5325
|
+
description: "The error occurred during HTML validation"
|
|
5326
|
+
}
|
|
5327
|
+
};
|
|
5328
|
+
exports["default"] = HTML_ValidatorLocalization__english;
|
|
5329
|
+
|
|
5330
|
+
|
|
5331
|
+
/***/ }),
|
|
5332
|
+
|
|
5333
|
+
/***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/ResourcesReferencesResolverForHTML/ResourcesReferencesResolverForHTML.english.ts":
|
|
5334
|
+
/*!**********************************************************************************************************************************************!*\
|
|
5335
|
+
!*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/ResourcesReferencesResolverForHTML/ResourcesReferencesResolverForHTML.english.ts ***!
|
|
5336
|
+
\**********************************************************************************************************************************************/
|
|
5105
5337
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
5106
5338
|
|
|
5107
5339
|
|
|
5108
5340
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5109
5341
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
5110
|
-
const
|
|
5111
|
-
|
|
5342
|
+
const resourcesReferencesResolverForHTML_Localization__english = {
|
|
5343
|
+
generateUnableToResolveShortenedAbsolutePathWarningLog: (namedParameters) => ({
|
|
5112
5344
|
title: `${(0, es_extensions_1.capitalizeFirstCharacter)(namedParameters.filesType__singularForm)} file, unable to resolve the absolute path`,
|
|
5113
5345
|
description: `Unable to resolve the shortened absolute path for the ${namedParameters.filesType__singularForm} file ` +
|
|
5114
5346
|
`because no public path has been specified for '${namedParameters.projectBuildingMode}' project building mode. ` +
|
|
5115
5347
|
"Relative path will be used instead."
|
|
5116
5348
|
}),
|
|
5117
|
-
|
|
5118
|
-
title:
|
|
5119
|
-
description: `The
|
|
5120
|
-
`'${namedParameters.pickedPathOfTargetResourceFile}'
|
|
5121
|
-
|
|
5349
|
+
generateUnknownResourceGroupReferenceWarningLog: (namedParameters) => ({
|
|
5350
|
+
title: `Unknown reference to ${namedParameters.fileType__pluralForm} files group`,
|
|
5351
|
+
description: `The reference '${namedParameters.firstPathSegment}' in path ` +
|
|
5352
|
+
`'${namedParameters.pickedPathOfTargetResourceFile}' refers to unknown resources group. ` +
|
|
5353
|
+
`Below references are available for ${namedParameters.fileType__pluralForm} files: \n` +
|
|
5122
5354
|
`${namedParameters.formattedSourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap}`
|
|
5123
5355
|
}),
|
|
5124
|
-
|
|
5356
|
+
generateNoMatchingsForAliasedFilePathWithoutFilenameExtensionWarningLog: (namedParameters) => ({
|
|
5125
5357
|
title: `Unknown path to ${namedParameters.fileType__singularForm} file`,
|
|
5126
5358
|
description: `The aliased path '${namedParameters.pickedPathOfTargetResourceFile}' without filename extension ` +
|
|
5127
|
-
"refers to unknown file. Tried to search with all supported filename extensions: " +
|
|
5359
|
+
"refers to unknown file. Tried to search at path with all supported filename extensions: " +
|
|
5128
5360
|
`${namedParameters.checkedAbsolutePaths__formatted}.`
|
|
5129
5361
|
}),
|
|
5130
|
-
|
|
5362
|
+
generateNoOutputFileExistingForSpecifiedSourceFilePathWarningLog: (namedParameters) => ({
|
|
5131
5363
|
title: `Unknown path to ${namedParameters.fileType__singularForm} file`,
|
|
5132
|
-
description: `No ${namedParameters.fileType__singularForm} output file has been found for specified
|
|
5133
|
-
`file path '${namedParameters.pickedPathOfTargetResourceFile}'.`
|
|
5364
|
+
description: `No ${namedParameters.fileType__singularForm} output file has been found for specified source ` +
|
|
5365
|
+
`file path '${namedParameters.pickedPathOfTargetResourceFile}' including reference.`
|
|
5134
5366
|
})
|
|
5135
5367
|
};
|
|
5136
|
-
exports["default"] =
|
|
5368
|
+
exports["default"] = resourcesReferencesResolverForHTML_Localization__english;
|
|
5137
5369
|
|
|
5138
5370
|
|
|
5139
5371
|
/***/ }),
|
|
5140
5372
|
|
|
5141
|
-
/***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/
|
|
5142
|
-
|
|
5143
|
-
!*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/
|
|
5144
|
-
|
|
5373
|
+
/***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/ResourcesReferencesResolverForHTML/ResourcesReferencesResolverForHTML.ts":
|
|
5374
|
+
/*!**************************************************************************************************************************************!*\
|
|
5375
|
+
!*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/ResourcesReferencesResolverForHTML/ResourcesReferencesResolverForHTML.ts ***!
|
|
5376
|
+
\**************************************************************************************************************************************/
|
|
5145
5377
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
5146
5378
|
|
|
5147
5379
|
|
|
@@ -5150,27 +5382,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5150
5382
|
};
|
|
5151
5383
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5152
5384
|
/* --- Assets ------------------------------------------------------------------------------------------------------- */
|
|
5153
|
-
const
|
|
5385
|
+
const ResourcesReferencesResolverForHTML_english_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/Plugins/ResourcesReferencesResolverForHTML/ResourcesReferencesResolverForHTML.english */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/ResourcesReferencesResolverForHTML/ResourcesReferencesResolverForHTML.english.ts"));
|
|
5154
5386
|
/* --- Applied auxiliaries ------------------------------------------------------------------------------------------ */
|
|
5155
5387
|
const cheerio_1 = __importDefault(__webpack_require__(/*! cheerio */ "cheerio"));
|
|
5156
5388
|
const getExpectedToBeNonNullStringifiedContentOfVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile */ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts"));
|
|
5157
5389
|
/* --- General auxiliaries ------------------------------------------------------------------------------------------ */
|
|
5158
5390
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
5159
5391
|
const ImprovedPath_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/ImprovedPath/ImprovedPath */ "./UtilsIncubator/ImprovedPath/ImprovedPath.ts"));
|
|
5160
|
-
class
|
|
5161
|
-
static localization =
|
|
5392
|
+
class ResourcesReferencesResolverForHTML {
|
|
5393
|
+
static localization = ResourcesReferencesResolverForHTML_english_1.default;
|
|
5162
5394
|
compiledHTML_File;
|
|
5163
5395
|
HTML_FileContentCheerioCapturing;
|
|
5164
5396
|
masterConfigRepresentative;
|
|
5165
|
-
static
|
|
5166
|
-
return new
|
|
5397
|
+
static resolve(compiledHTML_File, masterConfigRepresentative) {
|
|
5398
|
+
return new ResourcesReferencesResolverForHTML(compiledHTML_File, masterConfigRepresentative).
|
|
5399
|
+
resolveInternalLinks().
|
|
5167
5400
|
resolveStylesheetsPathsAliases().
|
|
5168
5401
|
resoleScriptsPathsAliases().
|
|
5169
5402
|
resolveImagesPathsAliases().
|
|
5170
5403
|
resolveVideosPathsAliases().
|
|
5171
5404
|
resolveAudiosPathsAliases().
|
|
5172
5405
|
/* [ Theory ] Without '{ decodeEntities: false }' all ideographic characters will be converted to entities
|
|
5173
|
-
* like '文' what could cause some troubles during HTML code
|
|
5406
|
+
* like '文' what could cause some troubles during post-processing of HTML code. */
|
|
5174
5407
|
HTML_FileContentCheerioCapturing.
|
|
5175
5408
|
html({ decodeEntities: false });
|
|
5176
5409
|
}
|
|
@@ -5179,14 +5412,50 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5179
5412
|
this.HTML_FileContentCheerioCapturing = cheerio_1.default.load((0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File));
|
|
5180
5413
|
this.masterConfigRepresentative = masterConfigRepresentative;
|
|
5181
5414
|
}
|
|
5415
|
+
resolveInternalLinks() {
|
|
5416
|
+
if ((0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.markupProcessingSettingsRepresentative)) {
|
|
5417
|
+
return this;
|
|
5418
|
+
}
|
|
5419
|
+
const markupProcessingSettingsRepresentative = this.masterConfigRepresentative.markupProcessingSettingsRepresentative;
|
|
5420
|
+
for (const anchorElement of Array.from(this.HTML_FileContentCheerioCapturing("a"))) {
|
|
5421
|
+
const anchorCheerioElement = this.HTML_FileContentCheerioCapturing(anchorElement);
|
|
5422
|
+
const hrefAttributeValue = anchorCheerioElement.attr("href");
|
|
5423
|
+
if (!(0, es_extensions_1.isNonEmptyString)(hrefAttributeValue)) {
|
|
5424
|
+
continue;
|
|
5425
|
+
}
|
|
5426
|
+
const resolvedURI = this.resolveOutputResourceFileAbsolutePathIfPossible({
|
|
5427
|
+
pickedPathOfTargetResourceFile: hrefAttributeValue,
|
|
5428
|
+
prefixOfAliasOfTopDirectoryOfResourcesGroup: markupProcessingSettingsRepresentative.prefixOfEntryPointsGroupReference,
|
|
5429
|
+
sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.createMapBasedOnOtherMap)(markupProcessingSettingsRepresentative.entryPointsGroupsNormalizedSettingsMappedByReferences, (pathAlias, markupEntryPointsGroupNormalizedSettings) => [
|
|
5430
|
+
pathAlias,
|
|
5431
|
+
markupEntryPointsGroupNormalizedSettings.isSingeEntryPointGroup ?
|
|
5432
|
+
markupEntryPointsGroupNormalizedSettings.sourceFilesGlobSelectors[0] :
|
|
5433
|
+
markupEntryPointsGroupNormalizedSettings.sourceFilesTopDirectoryAbsolutePath
|
|
5434
|
+
]),
|
|
5435
|
+
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots: markupProcessingSettingsRepresentative.
|
|
5436
|
+
supportedEntryPointsSourceFileNameExtensionsWithoutLeadingDots,
|
|
5437
|
+
sourceAndOutputFilesAbsolutePathsCorrespondenceMap: markupProcessingSettingsRepresentative.sourceAndOutputFilesAbsolutePathsCorrespondenceMap,
|
|
5438
|
+
fileTypeForLogging__singularForm: markupProcessingSettingsRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM,
|
|
5439
|
+
fileTypeForLogging__pluralForm: markupProcessingSettingsRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
|
|
5440
|
+
});
|
|
5441
|
+
if ((0, es_extensions_1.isNull)(resolvedURI)) {
|
|
5442
|
+
continue;
|
|
5443
|
+
}
|
|
5444
|
+
anchorCheerioElement.attr("href", this.buildResourceFileFinalPath({
|
|
5445
|
+
resolvedOutputAbsolutePathOfResourceFile: resolvedURI,
|
|
5446
|
+
resourceFileType__singularForm: markupProcessingSettingsRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
|
|
5447
|
+
}));
|
|
5448
|
+
}
|
|
5449
|
+
return this;
|
|
5450
|
+
}
|
|
5182
5451
|
resolveStylesheetsPathsAliases() {
|
|
5183
5452
|
if ((0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.stylesProcessingSettingsRepresentative)) {
|
|
5184
5453
|
return this;
|
|
5185
5454
|
}
|
|
5186
5455
|
const stylesProcessingSettingsRepresentative = this.masterConfigRepresentative.stylesProcessingSettingsRepresentative;
|
|
5187
5456
|
for (const linkElement of Array.from(this.HTML_FileContentCheerioCapturing("link[rel='stylesheet']"))) {
|
|
5188
|
-
const
|
|
5189
|
-
const hrefAttributeValue =
|
|
5457
|
+
const linkCheerioElement = this.HTML_FileContentCheerioCapturing(linkElement);
|
|
5458
|
+
const hrefAttributeValue = linkCheerioElement.attr("href");
|
|
5190
5459
|
if (!(0, es_extensions_1.isNonEmptyString)(hrefAttributeValue)) {
|
|
5191
5460
|
continue;
|
|
5192
5461
|
}
|
|
@@ -5209,7 +5478,7 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5209
5478
|
if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfStylesheet)) {
|
|
5210
5479
|
continue;
|
|
5211
5480
|
}
|
|
5212
|
-
|
|
5481
|
+
linkCheerioElement.attr("href", this.buildResourceFileFinalPath({
|
|
5213
5482
|
resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfStylesheet,
|
|
5214
5483
|
resourceFileType__singularForm: stylesProcessingSettingsRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
|
|
5215
5484
|
}));
|
|
@@ -5222,8 +5491,8 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5222
5491
|
}
|
|
5223
5492
|
const ECMA_ScriptLogicProcessingConfigRepresentative = this.masterConfigRepresentative.ECMA_ScriptLogicProcessingSettingsRepresentative;
|
|
5224
5493
|
for (const scriptElement of Array.from(this.HTML_FileContentCheerioCapturing("script"))) {
|
|
5225
|
-
const
|
|
5226
|
-
const srcAttributeValue =
|
|
5494
|
+
const scriptCheerioElement = this.HTML_FileContentCheerioCapturing(scriptElement);
|
|
5495
|
+
const srcAttributeValue = scriptCheerioElement.attr("src");
|
|
5227
5496
|
if (!(0, es_extensions_1.isNonEmptyString)(srcAttributeValue)) {
|
|
5228
5497
|
continue;
|
|
5229
5498
|
}
|
|
@@ -5247,7 +5516,7 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5247
5516
|
if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfScript)) {
|
|
5248
5517
|
continue;
|
|
5249
5518
|
}
|
|
5250
|
-
|
|
5519
|
+
scriptCheerioElement.attr("src", this.buildResourceFileFinalPath({
|
|
5251
5520
|
resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfScript,
|
|
5252
5521
|
resourceFileType__singularForm: ECMA_ScriptLogicProcessingConfigRepresentative.
|
|
5253
5522
|
TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
|
|
@@ -5261,8 +5530,8 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5261
5530
|
}
|
|
5262
5531
|
const imagesProcessingConfigRepresentative = this.masterConfigRepresentative.imagesProcessingSettingsRepresentative;
|
|
5263
5532
|
for (const imageElement of Array.from(this.HTML_FileContentCheerioCapturing("img"))) {
|
|
5264
|
-
const
|
|
5265
|
-
const srcAttributeValue =
|
|
5533
|
+
const imageCheerioElement = this.HTML_FileContentCheerioCapturing(imageElement);
|
|
5534
|
+
const srcAttributeValue = imageCheerioElement.attr("src");
|
|
5266
5535
|
if (!(0, es_extensions_1.isNonEmptyString)(srcAttributeValue)) {
|
|
5267
5536
|
continue;
|
|
5268
5537
|
}
|
|
@@ -5279,14 +5548,14 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5279
5548
|
if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfImage)) {
|
|
5280
5549
|
continue;
|
|
5281
5550
|
}
|
|
5282
|
-
|
|
5551
|
+
imageCheerioElement.attr("src", this.buildResourceFileFinalPath({
|
|
5283
5552
|
resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfImage,
|
|
5284
5553
|
resourceFileType__singularForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__PLURAL_FORM
|
|
5285
5554
|
}));
|
|
5286
5555
|
}
|
|
5287
5556
|
for (const linkElement of Array.from(this.HTML_FileContentCheerioCapturing("link[type='image/x-icon']"))) {
|
|
5288
|
-
const
|
|
5289
|
-
const hrefAttributeValue =
|
|
5557
|
+
const linkCheerioElement = this.HTML_FileContentCheerioCapturing(linkElement);
|
|
5558
|
+
const hrefAttributeValue = linkCheerioElement.attr("href");
|
|
5290
5559
|
if ((0, es_extensions_1.isUndefined)(hrefAttributeValue)) {
|
|
5291
5560
|
continue;
|
|
5292
5561
|
}
|
|
@@ -5305,7 +5574,7 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5305
5574
|
if ((0, es_extensions_1.isNull)(imageResolvedOutputAbsolutePath)) {
|
|
5306
5575
|
continue;
|
|
5307
5576
|
}
|
|
5308
|
-
|
|
5577
|
+
linkCheerioElement.attr("href", this.buildResourceFileFinalPath({
|
|
5309
5578
|
resolvedOutputAbsolutePathOfResourceFile: imageResolvedOutputAbsolutePath,
|
|
5310
5579
|
resourceFileType__singularForm: imagesProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
|
|
5311
5580
|
}));
|
|
@@ -5318,8 +5587,8 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5318
5587
|
}
|
|
5319
5588
|
const videosProcessingConfigRepresentative = this.masterConfigRepresentative.videosProcessingSettingsRepresentative;
|
|
5320
5589
|
for (const sourceElement of Array.from(this.HTML_FileContentCheerioCapturing("video > source"))) {
|
|
5321
|
-
const
|
|
5322
|
-
const srcAttributeValue =
|
|
5590
|
+
const sourceCheerioElement = this.HTML_FileContentCheerioCapturing(sourceElement);
|
|
5591
|
+
const srcAttributeValue = sourceCheerioElement.attr("src");
|
|
5323
5592
|
if (!(0, es_extensions_1.isNonEmptyString)(srcAttributeValue)) {
|
|
5324
5593
|
continue;
|
|
5325
5594
|
}
|
|
@@ -5336,7 +5605,7 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5336
5605
|
if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfVideo)) {
|
|
5337
5606
|
continue;
|
|
5338
5607
|
}
|
|
5339
|
-
|
|
5608
|
+
sourceCheerioElement.attr("src", this.buildResourceFileFinalPath({
|
|
5340
5609
|
resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfVideo,
|
|
5341
5610
|
resourceFileType__singularForm: videosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
|
|
5342
5611
|
}));
|
|
@@ -5349,8 +5618,8 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5349
5618
|
}
|
|
5350
5619
|
const audiosProcessingConfigRepresentative = this.masterConfigRepresentative.audiosProcessingSettingsRepresentative;
|
|
5351
5620
|
for (const sourceElement of Array.from(this.HTML_FileContentCheerioCapturing("audio > source"))) {
|
|
5352
|
-
const
|
|
5353
|
-
const srcAttributeValue =
|
|
5621
|
+
const sourceCheerioElement = this.HTML_FileContentCheerioCapturing(sourceElement);
|
|
5622
|
+
const srcAttributeValue = sourceCheerioElement.attr("src");
|
|
5354
5623
|
if ((0, es_extensions_1.isUndefined)(srcAttributeValue)) {
|
|
5355
5624
|
continue;
|
|
5356
5625
|
}
|
|
@@ -5367,7 +5636,7 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5367
5636
|
if ((0, es_extensions_1.isNull)(resolvedOutputAbsolutePathOfVideo)) {
|
|
5368
5637
|
continue;
|
|
5369
5638
|
}
|
|
5370
|
-
|
|
5639
|
+
sourceCheerioElement.attr("src", this.buildResourceFileFinalPath({
|
|
5371
5640
|
resolvedOutputAbsolutePathOfResourceFile: resolvedOutputAbsolutePathOfVideo,
|
|
5372
5641
|
resourceFileType__singularForm: audiosProcessingConfigRepresentative.TARGET_FILES_KIND_FOR_LOGGING__SINGULAR_FORM
|
|
5373
5642
|
}));
|
|
@@ -5386,8 +5655,8 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5386
5655
|
}
|
|
5387
5656
|
const sourceFilesTopDirectoryAbsolutePathOfCurrentAlias = sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap.get(firstSegmentOfPickedPath);
|
|
5388
5657
|
if ((0, es_extensions_1.isUndefined)(sourceFilesTopDirectoryAbsolutePathOfCurrentAlias)) {
|
|
5389
|
-
es_extensions_1.Logger.logWarning(
|
|
5390
|
-
|
|
5658
|
+
es_extensions_1.Logger.logWarning(ResourcesReferencesResolverForHTML.localization.generateUnknownResourceGroupReferenceWarningLog({
|
|
5659
|
+
fileType__pluralForm: fileTypeForLogging__pluralForm,
|
|
5391
5660
|
firstPathSegment: firstSegmentOfPickedPath,
|
|
5392
5661
|
pickedPathOfTargetResourceFile,
|
|
5393
5662
|
formattedSourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(Array.from(sourceFilesTopDirectoriesAliasesAndRespectiveAbsolutePathsMap.entries()))
|
|
@@ -5402,8 +5671,8 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5402
5671
|
`${supportedStylesheetFileNameExtensionWithoutLeadingDot}`);
|
|
5403
5672
|
const searchingResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap = (0, es_extensions_1.filterMap)(sourceAndOutputFilesAbsolutePathsCorrespondenceMap, (sourceFileAbsolutePath) => possibleAbsolutePathsOfTargetSourceFile.includes(sourceFileAbsolutePath));
|
|
5404
5673
|
if (searchingResultsInSourceFilesAbsolutePathsAndOutputFilesActualPathsMap.size === 0) {
|
|
5405
|
-
es_extensions_1.Logger.logWarning(
|
|
5406
|
-
|
|
5674
|
+
es_extensions_1.Logger.logWarning(ResourcesReferencesResolverForHTML.localization.
|
|
5675
|
+
generateNoMatchingsForAliasedFilePathWithoutFilenameExtensionWarningLog({
|
|
5407
5676
|
pickedPathOfTargetResourceFile,
|
|
5408
5677
|
fileType__singularForm: fileTypeForLogging__pluralForm,
|
|
5409
5678
|
checkedAbsolutePaths__formatted: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(possibleAbsolutePathsOfTargetSourceFile)
|
|
@@ -5415,7 +5684,7 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5415
5684
|
const resolvedFileOutputAbsolutePath = sourceAndOutputFilesAbsolutePathsCorrespondenceMap.
|
|
5416
5685
|
get(sourceFileComputedAbsolutePathPossiblyWithoutFileNameExtension);
|
|
5417
5686
|
if ((0, es_extensions_1.isUndefined)(resolvedFileOutputAbsolutePath)) {
|
|
5418
|
-
es_extensions_1.Logger.logWarning(
|
|
5687
|
+
es_extensions_1.Logger.logWarning(ResourcesReferencesResolverForHTML.localization.generateNoOutputFileExistingForSpecifiedSourceFilePathWarningLog({
|
|
5419
5688
|
pickedPathOfTargetResourceFile,
|
|
5420
5689
|
fileType__singularForm: fileTypeForLogging__pluralForm
|
|
5421
5690
|
}));
|
|
@@ -5424,12 +5693,13 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5424
5693
|
return resolvedFileOutputAbsolutePath;
|
|
5425
5694
|
}
|
|
5426
5695
|
buildResourceFileFinalPath({ resolvedOutputAbsolutePathOfResourceFile, resourceFileType__singularForm }) {
|
|
5427
|
-
if (this.masterConfigRepresentative.
|
|
5696
|
+
if (this.masterConfigRepresentative.isStaticPreviewBuildingMode ||
|
|
5428
5697
|
(0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.actualPublicDirectoryAbsolutePath)) {
|
|
5429
|
-
if (!this.masterConfigRepresentative.
|
|
5698
|
+
if (!this.masterConfigRepresentative.isStaticPreviewBuildingMode &&
|
|
5430
5699
|
(0, es_extensions_1.isUndefined)(this.masterConfigRepresentative.actualPublicDirectoryAbsolutePath)) {
|
|
5431
|
-
es_extensions_1.Logger.logWarning(
|
|
5700
|
+
es_extensions_1.Logger.logWarning(ResourcesReferencesResolverForHTML.localization.generateUnableToResolveShortenedAbsolutePathWarningLog({
|
|
5432
5701
|
projectBuildingMode: this.masterConfigRepresentative.consumingProjectBuildingMode,
|
|
5702
|
+
targetFileAbsolutePath: resolvedOutputAbsolutePathOfResourceFile,
|
|
5433
5703
|
filesType__singularForm: resourceFileType__singularForm
|
|
5434
5704
|
}));
|
|
5435
5705
|
}
|
|
@@ -5444,181 +5714,7 @@ class ResourceFilesPathsAliasesResolverForHTML {
|
|
|
5444
5714
|
})}`;
|
|
5445
5715
|
}
|
|
5446
5716
|
}
|
|
5447
|
-
exports["default"] =
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
/***/ }),
|
|
5451
|
-
|
|
5452
|
-
/***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_Validator.ts":
|
|
5453
|
-
/*!**********************************************************************************************!*\
|
|
5454
|
-
!*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_Validator.ts ***!
|
|
5455
|
-
\**********************************************************************************************/
|
|
5456
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5460
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5461
|
-
};
|
|
5462
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5463
|
-
/* --- Assets ------------------------------------------------------------------------------------------------------- */
|
|
5464
|
-
const HTML_ValidatorLocalization_english_1 = __importDefault(__webpack_require__(/*! ./HTML_ValidatorLocalization.english */ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_ValidatorLocalization.english.ts"));
|
|
5465
|
-
/* --- Applied utils ------------------------------------------------------------------------------------------------ */
|
|
5466
|
-
const html_validator_1 = __importDefault(__webpack_require__(/*! html-validator */ "html-validator"));
|
|
5467
|
-
const getExpectedToBeNonNullStringifiedContentOfVinylFile_1 = __importDefault(__webpack_require__(/*! @Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile */ "./Utils/getExpectedToBeNonNullStringifiedContentOfVinylFile.ts"));
|
|
5468
|
-
const isCompiledHTML_ContentEmpty_1 = __importDefault(__webpack_require__(/*! @Utils/isCompiledHTML_ContentEmpty */ "./Utils/isCompiledHTML_ContentEmpty.ts"));
|
|
5469
|
-
const node_notifier_1 = __importDefault(__webpack_require__(/*! node-notifier */ "node-notifier"));
|
|
5470
|
-
/* --- General utils ------------------------------------------------------------------------------------------------ */
|
|
5471
|
-
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
5472
|
-
const ImprovedPath_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/ImprovedPath/ImprovedPath */ "./UtilsIncubator/ImprovedPath/ImprovedPath.ts"));
|
|
5473
|
-
const Stopwatch_1 = __importDefault(__webpack_require__(/*! @UtilsIncubator/Stopwatch */ "./UtilsIncubator/Stopwatch.ts"));
|
|
5474
|
-
class HTML_Validator {
|
|
5475
|
-
static localization = HTML_ValidatorLocalization_english_1.default;
|
|
5476
|
-
static validateHTML(compiledHTML_File, masterConfigRepresentative) {
|
|
5477
|
-
const extractedHTML_Code = (0, getExpectedToBeNonNullStringifiedContentOfVinylFile_1.default)(compiledHTML_File);
|
|
5478
|
-
const targetFileRelativePath = ImprovedPath_1.default.computeRelativePath({
|
|
5479
|
-
basePath: masterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
|
|
5480
|
-
comparedPath: compiledHTML_File.path
|
|
5481
|
-
});
|
|
5482
|
-
if ((0, isCompiledHTML_ContentEmpty_1.default)(extractedHTML_Code)) {
|
|
5483
|
-
es_extensions_1.Logger.logWarning(HTML_Validator.localization.generateFileIsEmptyWarningLog({ targetFileRelativePath }));
|
|
5484
|
-
return;
|
|
5485
|
-
}
|
|
5486
|
-
const validationTimeMeasuringStopwatch = new Stopwatch_1.default().startOrRestart();
|
|
5487
|
-
es_extensions_1.Logger.logInfo(HTML_Validator.localization.generateValidationStartedInfoLog({ targetFileRelativePath }));
|
|
5488
|
-
(0, html_validator_1.default)({
|
|
5489
|
-
/* eslint-disable-next-line id-denylist --
|
|
5490
|
-
* From the viewpoint of TypeScript, the property name does not conflict with imported names.
|
|
5491
|
-
* ESLint community has declined to fix this.
|
|
5492
|
-
* https://github.com/eslint/eslint/issues/15504 */
|
|
5493
|
-
data: extractedHTML_Code,
|
|
5494
|
-
format: "json"
|
|
5495
|
-
}).
|
|
5496
|
-
then((validationResults) => {
|
|
5497
|
-
const validationPeriod__seconds = validationTimeMeasuringStopwatch.stop().seconds;
|
|
5498
|
-
const filteredIssues = (0, es_extensions_1.removeArrayElementsByPredicates)({
|
|
5499
|
-
targetArray: validationResults.messages,
|
|
5500
|
-
predicates: HTML_Validator.getPredicatesForHTML_ValidationIssuesFiltering(),
|
|
5501
|
-
mutably: false
|
|
5502
|
-
}).updatedArray;
|
|
5503
|
-
if (filteredIssues.length === 0) {
|
|
5504
|
-
es_extensions_1.Logger.logSuccess(HTML_Validator.localization.generateValidationFinishedWithNoIssuesFoundSuccessLog({
|
|
5505
|
-
targetFileRelativePath,
|
|
5506
|
-
secondsElapsed: validationPeriod__seconds
|
|
5507
|
-
}));
|
|
5508
|
-
return;
|
|
5509
|
-
}
|
|
5510
|
-
node_notifier_1.default.notify(HTML_Validator.localization.issuesFoundNotification);
|
|
5511
|
-
const formattedErrors = [];
|
|
5512
|
-
for (const issue of filteredIssues) {
|
|
5513
|
-
let accumulatingFormattedError = "";
|
|
5514
|
-
if (HTML_Validator.isValidationMessageLocationObject(issue)) {
|
|
5515
|
-
const codeFragmentPartWhichMustBeHighlighted = issue.extract.substring(issue.hiliteStart, issue.hiliteStart + issue.hiliteLength);
|
|
5516
|
-
accumulatingFormattedError = `${issue.extract.replace(codeFragmentPartWhichMustBeHighlighted, es_extensions_1.Logger.highlightText(codeFragmentPartWhichMustBeHighlighted))}\n${HTML_Validator.localization.generateIssueOccurrenceLocationIndication({
|
|
5517
|
-
lineNumber: issue.lastLine, startingColumnNumber: issue.firstColumn, lastColumnNumber: issue.lastColumn
|
|
5518
|
-
})}\n`;
|
|
5519
|
-
}
|
|
5520
|
-
switch (issue.type) {
|
|
5521
|
-
case "error": {
|
|
5522
|
-
accumulatingFormattedError = `${accumulatingFormattedError}` +
|
|
5523
|
-
`${HTML_Validator.localization.issuesTypesTitles.grossViolation}` +
|
|
5524
|
-
`${HTML_Validator.localization.issuesTypesTitles.keyAndValueSeparator}`;
|
|
5525
|
-
break;
|
|
5526
|
-
}
|
|
5527
|
-
case "info": {
|
|
5528
|
-
accumulatingFormattedError =
|
|
5529
|
-
`${accumulatingFormattedError}` +
|
|
5530
|
-
`${HTML_Validator.localization.issuesTypesTitles.recommendationDisregard}` +
|
|
5531
|
-
`${HTML_Validator.localization.issuesTypesTitles.keyAndValueSeparator}`;
|
|
5532
|
-
break;
|
|
5533
|
-
}
|
|
5534
|
-
default: {
|
|
5535
|
-
accumulatingFormattedError = `${accumulatingFormattedError}` +
|
|
5536
|
-
`${HTML_Validator.localization.issuesTypesTitles.other}` +
|
|
5537
|
-
`${HTML_Validator.localization.issuesTypesTitles.keyAndValueSeparator}`;
|
|
5538
|
-
break;
|
|
5539
|
-
}
|
|
5540
|
-
}
|
|
5541
|
-
accumulatingFormattedError = `${accumulatingFormattedError}${issue.message}`;
|
|
5542
|
-
formattedErrors.push(accumulatingFormattedError);
|
|
5543
|
-
}
|
|
5544
|
-
es_extensions_1.Logger.logErrorLikeMessage(HTML_Validator.localization.generateIssuesFoundErrorLog({
|
|
5545
|
-
targetFileRelativePath,
|
|
5546
|
-
formattedErrors: formattedErrors.join("\n\n")
|
|
5547
|
-
}));
|
|
5548
|
-
}).
|
|
5549
|
-
catch((error) => {
|
|
5550
|
-
es_extensions_1.Logger.logError({
|
|
5551
|
-
errorType: es_extensions_1.DataRetrievingFailedError.localization.defaultTitle,
|
|
5552
|
-
...HTML_Validator.localization.validationFailedErrorLog,
|
|
5553
|
-
occurrenceLocation: "HTML_Validator.validateHTML(...parameters)",
|
|
5554
|
-
caughtError: error
|
|
5555
|
-
});
|
|
5556
|
-
});
|
|
5557
|
-
}
|
|
5558
|
-
static getPredicatesForHTML_ValidationIssuesFiltering() {
|
|
5559
|
-
return [
|
|
5560
|
-
(HTML_ValidationIssue) => HTML_ValidationIssue.message === "Attribute “webkitdirectory” not allowed on element “input” at this point."
|
|
5561
|
-
];
|
|
5562
|
-
}
|
|
5563
|
-
static isValidationMessageLocationObject(violation) {
|
|
5564
|
-
return (0, es_extensions_1.isArbitraryObject)(violation) &&
|
|
5565
|
-
(0, es_extensions_1.isNotUndefined)(violation.extract) &&
|
|
5566
|
-
(0, es_extensions_1.isNotUndefined)(violation.lastLine) &&
|
|
5567
|
-
(0, es_extensions_1.isNotUndefined)(violation.firstColumn) &&
|
|
5568
|
-
(0, es_extensions_1.isNotUndefined)(violation.lastColumn);
|
|
5569
|
-
}
|
|
5570
|
-
}
|
|
5571
|
-
exports["default"] = HTML_Validator;
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
/***/ }),
|
|
5575
|
-
|
|
5576
|
-
/***/ "./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_ValidatorLocalization.english.ts":
|
|
5577
|
-
/*!******************************************************************************************************************!*\
|
|
5578
|
-
!*** ./ProjectBuilding/SourceCodeProcessing/Markup/Plugins/HTML_Validator/HTML_ValidatorLocalization.english.ts ***!
|
|
5579
|
-
\******************************************************************************************************************/
|
|
5580
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5584
|
-
const HTML_ValidatorLocalization__English = {
|
|
5585
|
-
generateFileIsEmptyWarningLog: (namedParameters) => ({
|
|
5586
|
-
title: "HTML validation terminated",
|
|
5587
|
-
description: `File '${namedParameters.targetFileRelativePath}' is empty, no HTML to inspect.`
|
|
5588
|
-
}),
|
|
5589
|
-
generateValidationStartedInfoLog: (namedParameters) => ({
|
|
5590
|
-
title: "HTML validation started",
|
|
5591
|
-
description: `Begin the inspection of file '${namedParameters.targetFileRelativePath}' ...`
|
|
5592
|
-
}),
|
|
5593
|
-
generateValidationFinishedWithNoIssuesFoundSuccessLog: (namedParameters) => ({
|
|
5594
|
-
title: "HTML validation finished",
|
|
5595
|
-
description: `File '${namedParameters.targetFileRelativePath}' is fully obeying to W3C rules and recommendations.\n` +
|
|
5596
|
-
`${namedParameters.secondsElapsed} seconds elapsed.`
|
|
5597
|
-
}),
|
|
5598
|
-
issuesFoundNotification: {
|
|
5599
|
-
title: "HTML validation, issue(s) found",
|
|
5600
|
-
message: "W3C rules violations and / or recommendations neglect detected. Check the console for the details."
|
|
5601
|
-
},
|
|
5602
|
-
generateIssueOccurrenceLocationIndication: (namedParameters) => `Line ${namedParameters.lineNumber}, ` +
|
|
5603
|
-
`columns ${namedParameters.startingColumnNumber}-${namedParameters.lastColumnNumber}`,
|
|
5604
|
-
issuesTypesTitles: {
|
|
5605
|
-
grossViolation: "Gross violation",
|
|
5606
|
-
recommendationDisregard: "Recommendation disregard",
|
|
5607
|
-
other: "Other issue",
|
|
5608
|
-
keyAndValueSeparator: ": "
|
|
5609
|
-
},
|
|
5610
|
-
generateIssuesFoundErrorLog: (namedParameters) => ({
|
|
5611
|
-
customBadgeText: "HTML validation not passed",
|
|
5612
|
-
title: "HTML validation, issue(s) found",
|
|
5613
|
-
description: `File '${namedParameters.targetFileRelativePath}' is including following HTML validity issues:\n\n` +
|
|
5614
|
-
`${namedParameters.formattedErrors}\n\n`
|
|
5615
|
-
}),
|
|
5616
|
-
validationFailedErrorLog: {
|
|
5617
|
-
title: "HTML validation failed",
|
|
5618
|
-
description: "The error occurred during HTML validation"
|
|
5619
|
-
}
|
|
5620
|
-
};
|
|
5621
|
-
exports["default"] = HTML_ValidatorLocalization__English;
|
|
5717
|
+
exports["default"] = ResourcesReferencesResolverForHTML;
|
|
5622
5718
|
|
|
5623
5719
|
|
|
5624
5720
|
/***/ }),
|
|
@@ -5896,12 +5992,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5896
5992
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5897
5993
|
};
|
|
5898
5994
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5899
|
-
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding
|
|
5995
|
+
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes */ "./ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes.ts"));
|
|
5900
5996
|
exports["default"] = {
|
|
5901
5997
|
waitingForSubsequentFilesWillBeSavedPeriod__seconds: 1,
|
|
5902
5998
|
filePathAliasNotation: "@",
|
|
5903
5999
|
revisioning: {
|
|
5904
|
-
mustExecute: (projectBuildingMode__possiblyCustom) => projectBuildingMode__possiblyCustom !== ConsumingProjectPreDefinedBuildingModes_1.default.
|
|
6000
|
+
mustExecute: (projectBuildingMode__possiblyCustom) => projectBuildingMode__possiblyCustom !== ConsumingProjectPreDefinedBuildingModes_1.default.staticPreview &&
|
|
6001
|
+
projectBuildingMode__possiblyCustom !== ConsumingProjectPreDefinedBuildingModes_1.default.localDevelopment,
|
|
5905
6002
|
contentHashPostfixSeparator: "--"
|
|
5906
6003
|
},
|
|
5907
6004
|
linting: {
|
|
@@ -5924,8 +6021,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5924
6021
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5925
6022
|
};
|
|
5926
6023
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5927
|
-
/* ---
|
|
5928
|
-
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/
|
|
6024
|
+
/* --- Restrictions ------------------------------------------------------------------------------------------------- */
|
|
6025
|
+
const ConsumingProjectPreDefinedBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes */ "./ProjectBuilding/Common/Restrictions/ConsumingProjectPreDefinedBuildingModes.ts"));
|
|
5929
6026
|
/* --- General auxiliaries ------------------------------------------------------------------------------------------ */
|
|
5930
6027
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
5931
6028
|
/* eslint-disable-next-line @typescript-eslint/no-redeclare --
|
|
@@ -5990,20 +6087,19 @@ var StylesProcessingSettings__FromFile__RawValid;
|
|
|
5990
6087
|
preValidationModifications: es_extensions_1.nullToUndefined,
|
|
5991
6088
|
type: es_extensions_1.RawObjectDataProcessor.ValuesTypesIDs.associativeArrayOfUniformTypeValues,
|
|
5992
6089
|
required: true,
|
|
5993
|
-
|
|
5994
|
-
consumingProjectLocalizedPreDefinedBuildingModes.development,
|
|
5995
|
-
consumingProjectLocalizedPreDefinedBuildingModes.production
|
|
5996
|
-
],
|
|
6090
|
+
minimalEntriesCount: 1,
|
|
5997
6091
|
keysRenamings: {
|
|
5998
|
-
[consumingProjectLocalizedPreDefinedBuildingModes.
|
|
6092
|
+
[consumingProjectLocalizedPreDefinedBuildingModes.localDevelopment]: ConsumingProjectPreDefinedBuildingModes_1.default.staticPreview,
|
|
6093
|
+
[consumingProjectLocalizedPreDefinedBuildingModes.localDevelopment]: ConsumingProjectPreDefinedBuildingModes_1.default.localDevelopment,
|
|
5999
6094
|
[consumingProjectLocalizedPreDefinedBuildingModes.testing]: ConsumingProjectPreDefinedBuildingModes_1.default.testing,
|
|
6095
|
+
[consumingProjectLocalizedPreDefinedBuildingModes.staging]: ConsumingProjectPreDefinedBuildingModes_1.default.staging,
|
|
6000
6096
|
[consumingProjectLocalizedPreDefinedBuildingModes.production]: ConsumingProjectPreDefinedBuildingModes_1.default.production
|
|
6001
6097
|
},
|
|
6002
6098
|
value: {
|
|
6003
6099
|
type: Object,
|
|
6004
6100
|
properties: {
|
|
6005
|
-
[stylesProcessingLocalization.entryPointsGroups.buildingModeDependent.
|
|
6006
|
-
newName: "
|
|
6101
|
+
[stylesProcessingLocalization.entryPointsGroups.buildingModeDependent.outputTopDirectoryRelativePath.KEY]: {
|
|
6102
|
+
newName: "outputTopDirectoryRelativePath",
|
|
6007
6103
|
type: String,
|
|
6008
6104
|
required: true
|
|
6009
6105
|
},
|
|
@@ -6067,7 +6163,7 @@ class StylesProcessor extends GulpStreamsBasedSourceCodeProcessor_1.default {
|
|
|
6067
6163
|
return () => new stream_1.PassThrough().end();
|
|
6068
6164
|
}
|
|
6069
6165
|
const dataHoldingSelfInstance = new StylesProcessor(masterConfigRepresentative, stylesProcessingSettingsRepresentative);
|
|
6070
|
-
if (masterConfigRepresentative.
|
|
6166
|
+
if (masterConfigRepresentative.isStaticPreviewBuildingMode || masterConfigRepresentative.isLocalDevelopmentBuildingMode) {
|
|
6071
6167
|
dataHoldingSelfInstance.initializeSourceFilesDirectoriesWhichAlwaysWillBeBeingWatchedGlobSelectors();
|
|
6072
6168
|
dataHoldingSelfInstance.initializeOrUpdateWatchedSourceFilesGlobSelectors();
|
|
6073
6169
|
dataHoldingSelfInstance.initializeOrUpdateSourceFilesWatcher();
|
|
@@ -6089,7 +6185,8 @@ class StylesProcessor extends GulpStreamsBasedSourceCodeProcessor_1.default {
|
|
|
6089
6185
|
pipe(super.printProcessedFilesPathsAndQuantity()).
|
|
6090
6186
|
pipe(super.handleErrorIfItWillOccur()).
|
|
6091
6187
|
pipe((0, gulp_intercept_1.default)(this.addActualSourceCodeProcessingSettingsToVinylFile.bind(this))).
|
|
6092
|
-
pipe((0, gulp_if_1.default)(this.masterConfigRepresentative.
|
|
6188
|
+
pipe((0, gulp_if_1.default)(this.masterConfigRepresentative.isStaticPreviewBuildingMode ||
|
|
6189
|
+
this.masterConfigRepresentative.isLocalDevelopmentBuildingMode, gulp_sourcemaps_1.default.init())).
|
|
6093
6190
|
pipe((0, gulp_if_1.default)((file) => file.mustBeProcessedByStylus, (0, gulp_stylus_1.default)({
|
|
6094
6191
|
/* [ Theory ] Allows to "@include XXX.css" which is critical for third-party libraries usage. */
|
|
6095
6192
|
"include css": true
|
|
@@ -6101,14 +6198,17 @@ class StylesProcessor extends GulpStreamsBasedSourceCodeProcessor_1.default {
|
|
|
6101
6198
|
preset: [
|
|
6102
6199
|
"default",
|
|
6103
6200
|
{
|
|
6104
|
-
normalizeWhitespace: !this.masterConfigRepresentative.
|
|
6105
|
-
|
|
6201
|
+
normalizeWhitespace: !this.masterConfigRepresentative.isStaticPreviewBuildingMode &&
|
|
6202
|
+
!this.masterConfigRepresentative.isLocalDevelopmentBuildingMode,
|
|
6203
|
+
discardComments: !this.masterConfigRepresentative.isStaticPreviewBuildingMode &&
|
|
6204
|
+
!this.masterConfigRepresentative.isLocalDevelopmentBuildingMode
|
|
6106
6205
|
}
|
|
6107
6206
|
]
|
|
6108
6207
|
})
|
|
6109
6208
|
]
|
|
6110
6209
|
}))).
|
|
6111
|
-
pipe((0, gulp_if_1.default)(this.masterConfigRepresentative.
|
|
6210
|
+
pipe((0, gulp_if_1.default)(this.masterConfigRepresentative.isStaticPreviewBuildingMode ||
|
|
6211
|
+
this.masterConfigRepresentative.isLocalDevelopmentBuildingMode, gulp_sourcemaps_1.default.write())).
|
|
6112
6212
|
pipe((0, gulp_intercept_1.default)(this.onPostProcessedCode.bind(this))).
|
|
6113
6213
|
pipe(gulp_1.default.dest((targetFileInFinalState) => targetFileInFinalState.outputDirectoryAbsolutePath));
|
|
6114
6214
|
}
|