@yamato-daiwa/automation 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EntryPoint.js +955 -727
- package/LICENSE +1 -1
- package/package.json +2 -2
package/EntryPoint.js
CHANGED
|
@@ -172,6 +172,7 @@ const LocalDevelopmentServerOrchestrator_1 = __importDefault(__webpack_require__
|
|
|
172
172
|
const BrowserLiveReloader_1 = __importDefault(__webpack_require__(/*! @BrowserLiveReloading/BrowserLiveReloader */ "./ProjectBuilding/BrowserLiveReloading/BrowserLiveReloader.ts"));
|
|
173
173
|
/* --- Applied utils ------------------------------------------------------------------------------------------------ */
|
|
174
174
|
const gulp_1 = __importDefault(__webpack_require__(/*! gulp */ "gulp"));
|
|
175
|
+
const FilesMasterWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts"));
|
|
175
176
|
/* --- General utils ------------------------------------------------------------------------------------------------ */
|
|
176
177
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
177
178
|
class ProjectBuilder {
|
|
@@ -213,6 +214,7 @@ class ProjectBuilder {
|
|
|
213
214
|
VideosProcessor_1.default.provideVideosProcessingIfMust(masterConfigRepresentative),
|
|
214
215
|
MarkupProcessor_1.default.provideMarkupProcessingIfMust(masterConfigRepresentative),
|
|
215
216
|
gulp_1.default.parallel([
|
|
217
|
+
FilesMasterWatcher_1.default.watchIfMust(masterConfigRepresentative),
|
|
216
218
|
LocalDevelopmentServerOrchestrator_1.default.orchestrateIfMust(masterConfigRepresentative),
|
|
217
219
|
BrowserLiveReloader_1.default.provideBrowserLiveReloadingIfMust(masterConfigRepresentative)
|
|
218
220
|
])
|
|
@@ -434,7 +436,6 @@ const AudiosSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @Audi
|
|
|
434
436
|
const GulpStreamsBasedAssetsProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts"));
|
|
435
437
|
/* ─── Shared State ───────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
436
438
|
const AudiosProcessingSharedState_1 = __importDefault(__webpack_require__(/*! @AudiosProcessing/AudiosProcessingSharedState */ "./ProjectBuilding/AssetsProcessing/Audios/AudiosProcessingSharedState.ts"));
|
|
437
|
-
const CommonSharedState_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/CommonSharedState */ "./ProjectBuilding/Common/CommonSharedState.ts"));
|
|
438
439
|
/* ─── Gulp & Plugins ─────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
439
440
|
const gulp_1 = __importDefault(__webpack_require__(/*! gulp */ "gulp"));
|
|
440
441
|
/* ─── Applied Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
@@ -451,26 +452,25 @@ class AudiosProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
|
|
|
451
452
|
return (0, createImmediatelyEndingEmptyStream_1.default)();
|
|
452
453
|
}
|
|
453
454
|
const dataHoldingSelfInstance = new AudiosProcessor(projectBuildingMasterConfigRepresentative, audiosProcessingSettingsRepresentative);
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
set("BY_AUDIOS_PROCESSOR", () => { audiosSourceFilesWatcher.startWatching(); });
|
|
455
|
+
if (projectBuildingMasterConfigRepresentative.mustProvideIncrementalBuilding) {
|
|
456
|
+
AudiosSourceFilesWatcher_1.default.
|
|
457
|
+
initializeIfRequiredAndGetInstance({
|
|
458
|
+
audiosProcessingSettingsRepresentative,
|
|
459
|
+
projectBuildingMasterConfigRepresentative
|
|
460
|
+
}).
|
|
461
|
+
addOnFileAddedEventHandler({
|
|
462
|
+
handlerID: "ON_AUDIO_FILE_ADDED--BY_AUDIOS_PROCESSOR",
|
|
463
|
+
handler: dataHoldingSelfInstance.onSourceFilesWatcherEmittedFileAddingOrUpdatingEvent.bind(dataHoldingSelfInstance)
|
|
464
|
+
}).
|
|
465
|
+
addFileUpdatedEventHandler({
|
|
466
|
+
handlerID: "ON_AUDIO_FILE_UPDATED--BY_AUDIOS_PROCESSOR",
|
|
467
|
+
handler: dataHoldingSelfInstance.onSourceFilesWatcherEmittedFileAddingOrUpdatingEvent.bind(dataHoldingSelfInstance)
|
|
468
|
+
}).
|
|
469
|
+
addOnFileDeletedEventHandler({
|
|
470
|
+
handlerID: "ON_AUDIO_FILE_DELETED--BY_AUDIOS_PROCESSOR",
|
|
471
|
+
handler: dataHoldingSelfInstance.onAudioFileDeleted.bind(dataHoldingSelfInstance)
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
474
|
return dataHoldingSelfInstance.processAssets(audiosProcessingSettingsRepresentative.actualAssetsSourceFilesAbsolutePaths);
|
|
475
475
|
}
|
|
476
476
|
constructor(projectBuildingMasterConfigRepresentative, audiosProcessingSettingsRepresentative) {
|
|
@@ -535,28 +535,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
535
535
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
536
536
|
};
|
|
537
537
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
538
|
-
|
|
538
|
+
/* ─── Related Classes ────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
539
|
+
const AssetsSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/AssetsSourceFilesWatcher */ "./ProjectBuilding/FilesWatching/Watchers/AssetsSourceFilesWatcher.ts"));
|
|
540
|
+
const FilesMasterWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts"));
|
|
539
541
|
/* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
540
542
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
541
543
|
class AudiosSourceFilesWatcher extends AssetsSourceFilesWatcher_1.default {
|
|
542
544
|
static selfSoleInstance = null;
|
|
543
|
-
mustLogSourceFilesWatcherEvents;
|
|
544
|
-
audiosProcessingSettingsRepresentative;
|
|
545
545
|
static initializeIfRequiredAndGetInstance(initializationRequirements) {
|
|
546
546
|
if ((0, es_extensions_1.isNull)(AudiosSourceFilesWatcher.selfSoleInstance)) {
|
|
547
547
|
AudiosSourceFilesWatcher.selfSoleInstance = new AudiosSourceFilesWatcher(initializationRequirements);
|
|
548
|
+
FilesMasterWatcher_1.default.addPassiveWatcher(AudiosSourceFilesWatcher.selfSoleInstance);
|
|
548
549
|
}
|
|
549
550
|
return AudiosSourceFilesWatcher.selfSoleInstance;
|
|
550
551
|
}
|
|
551
552
|
constructor({ audiosProcessingSettingsRepresentative, projectBuildingMasterConfigRepresentative }) {
|
|
552
553
|
super({
|
|
554
|
+
ID: "AUDIOS_SOURCE_FILES_WATCHER",
|
|
555
|
+
mustLogEvents: audiosProcessingSettingsRepresentative.loggingSettings.filesWatcherEvents,
|
|
553
556
|
projectBuildingMasterConfigRepresentative,
|
|
554
557
|
targetFilesNamesExtensionsWithoutLeadingDots: audiosProcessingSettingsRepresentative.
|
|
555
558
|
supportedSourceFilesNamesExtensionsWithoutLeadingDots,
|
|
559
|
+
outputFilesGlobSelectors: audiosProcessingSettingsRepresentative.actualOutputFilesGlobSelectors,
|
|
556
560
|
targetSourceFilesType__singularForm: "Audio"
|
|
557
561
|
});
|
|
558
|
-
this.audiosProcessingSettingsRepresentative = audiosProcessingSettingsRepresentative;
|
|
559
|
-
this.mustLogSourceFilesWatcherEvents = this.audiosProcessingSettingsRepresentative.loggingSettings.filesWatcherEvents;
|
|
560
562
|
}
|
|
561
563
|
}
|
|
562
564
|
exports["default"] = AudiosSourceFilesWatcher;
|
|
@@ -760,7 +762,6 @@ const FontsSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @Fonts
|
|
|
760
762
|
const GulpStreamsBasedAssetsProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts"));
|
|
761
763
|
/* ─── Shared State ───────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
762
764
|
const FontsProcessingSharedState_1 = __importDefault(__webpack_require__(/*! @FontsProcessing/FontsProcessingSharedState */ "./ProjectBuilding/AssetsProcessing/Fonts/FontsProcessingSharedState.ts"));
|
|
763
|
-
const CommonSharedState_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/CommonSharedState */ "./ProjectBuilding/Common/CommonSharedState.ts"));
|
|
764
765
|
/* ─── Gulp & Plugins ─────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
765
766
|
const gulp_1 = __importDefault(__webpack_require__(/*! gulp */ "gulp"));
|
|
766
767
|
/* ─── Applied Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
@@ -777,26 +778,25 @@ class FontsProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
|
|
|
777
778
|
return (0, createImmediatelyEndingEmptyStream_1.default)();
|
|
778
779
|
}
|
|
779
780
|
const dataHoldingSelfInstance = new FontsProcessor(projectBuildingMasterConfigRepresentative, fontsProcessingSettingsRepresentative);
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
set("BY_FONTS_PROCESSOR", () => { fontsSourceFilesWatcher.startWatching(); });
|
|
781
|
+
if (projectBuildingMasterConfigRepresentative.mustProvideIncrementalBuilding) {
|
|
782
|
+
FontsSourceFilesWatcher_1.default.
|
|
783
|
+
initializeIfRequiredAndGetInstance({
|
|
784
|
+
fontsProcessingSettingsRepresentative,
|
|
785
|
+
projectBuildingMasterConfigRepresentative
|
|
786
|
+
}).
|
|
787
|
+
addOnFileAddedEventHandler({
|
|
788
|
+
handlerID: "ON_FONTS_FILE_ADDED--BY_FONTS_PROCESSOR",
|
|
789
|
+
handler: dataHoldingSelfInstance.onSourceFilesWatcherEmittedFileAddingOrUpdatingEvent.bind(dataHoldingSelfInstance)
|
|
790
|
+
}).
|
|
791
|
+
addFileUpdatedEventHandler({
|
|
792
|
+
handlerID: "ON_FONTS_FILE_UPDATED--BY_FONTS_PROCESSOR",
|
|
793
|
+
handler: dataHoldingSelfInstance.onSourceFilesWatcherEmittedFileAddingOrUpdatingEvent.bind(dataHoldingSelfInstance)
|
|
794
|
+
}).
|
|
795
|
+
addOnFileDeletedEventHandler({
|
|
796
|
+
handlerID: "ON_FONTS_FILE_DELETED--BY_FONTS_PROCESSOR",
|
|
797
|
+
handler: dataHoldingSelfInstance.onFontFileDeleted.bind(dataHoldingSelfInstance)
|
|
798
|
+
});
|
|
799
|
+
}
|
|
800
800
|
return dataHoldingSelfInstance.processAssets(fontsProcessingSettingsRepresentative.actualAssetsSourceFilesAbsolutePaths);
|
|
801
801
|
}
|
|
802
802
|
constructor(projectBuildingMasterConfigRepresentative, fontsProcessingSettingsRepresentative) {
|
|
@@ -861,28 +861,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
861
861
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
862
862
|
};
|
|
863
863
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
864
|
-
|
|
864
|
+
/* ─── Related Classes ────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
865
|
+
const AssetsSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/AssetsSourceFilesWatcher */ "./ProjectBuilding/FilesWatching/Watchers/AssetsSourceFilesWatcher.ts"));
|
|
866
|
+
const FilesMasterWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts"));
|
|
865
867
|
/* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
866
868
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
867
869
|
class FontsSourceFilesWatcher extends AssetsSourceFilesWatcher_1.default {
|
|
868
870
|
static selfSoleInstance = null;
|
|
869
|
-
mustLogSourceFilesWatcherEvents;
|
|
870
|
-
fontsProcessingSettingsRepresentative;
|
|
871
871
|
static initializeIfRequiredAndGetInstance(initializationRequirements) {
|
|
872
872
|
if ((0, es_extensions_1.isNull)(FontsSourceFilesWatcher.selfSoleInstance)) {
|
|
873
873
|
FontsSourceFilesWatcher.selfSoleInstance = new FontsSourceFilesWatcher(initializationRequirements);
|
|
874
|
+
FilesMasterWatcher_1.default.addPassiveWatcher(FontsSourceFilesWatcher.selfSoleInstance);
|
|
874
875
|
}
|
|
875
876
|
return FontsSourceFilesWatcher.selfSoleInstance;
|
|
876
877
|
}
|
|
877
878
|
constructor({ fontsProcessingSettingsRepresentative, projectBuildingMasterConfigRepresentative }) {
|
|
878
879
|
super({
|
|
880
|
+
ID: "FONTS_SOURCE_FILES_WATCHER",
|
|
881
|
+
mustLogEvents: fontsProcessingSettingsRepresentative.loggingSettings.filesWatcherEvents,
|
|
879
882
|
projectBuildingMasterConfigRepresentative,
|
|
880
883
|
targetFilesNamesExtensionsWithoutLeadingDots: fontsProcessingSettingsRepresentative.
|
|
881
884
|
supportedSourceFilesNamesExtensionsWithoutLeadingDots,
|
|
885
|
+
outputFilesGlobSelectors: fontsProcessingSettingsRepresentative.actualOutputFilesGlobSelectors,
|
|
882
886
|
targetSourceFilesType__singularForm: "Video"
|
|
883
887
|
});
|
|
884
|
-
this.fontsProcessingSettingsRepresentative = fontsProcessingSettingsRepresentative;
|
|
885
|
-
this.mustLogSourceFilesWatcherEvents = this.fontsProcessingSettingsRepresentative.loggingSettings.filesWatcherEvents;
|
|
886
888
|
}
|
|
887
889
|
}
|
|
888
890
|
exports["default"] = FontsSourceFilesWatcher;
|
|
@@ -1085,7 +1087,6 @@ const ImagesSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @Imag
|
|
|
1085
1087
|
const GulpStreamsBasedAssetsProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts"));
|
|
1086
1088
|
/* ─── Shared State ───────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
1087
1089
|
const ImagesProcessingSharedState_1 = __importDefault(__webpack_require__(/*! @ImagesProcessing/ImagesProcessingSharedState */ "./ProjectBuilding/AssetsProcessing/Images/ImagesProcessingSharedState.ts"));
|
|
1088
|
-
const CommonSharedState_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/CommonSharedState */ "./ProjectBuilding/Common/CommonSharedState.ts"));
|
|
1089
1090
|
/* ─── Gulp & Plugins ─────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
1090
1091
|
const gulp_1 = __importDefault(__webpack_require__(/*! gulp */ "gulp"));
|
|
1091
1092
|
const gulp_if_1 = __importDefault(__webpack_require__(/*! gulp-if */ "gulp-if"));
|
|
@@ -1105,26 +1106,25 @@ class ImagesProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
|
|
|
1105
1106
|
return (0, createImmediatelyEndingEmptyStream_1.default)();
|
|
1106
1107
|
}
|
|
1107
1108
|
const dataHoldingSelfInstance = new ImagesProcessor(projectBuildingMasterConfigRepresentative, imagesProcessingSettingsRepresentative);
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
set("BY_IMAGES_PROCESSOR", () => { imagesSourceFilesWatcher.startWatching(); });
|
|
1109
|
+
if (projectBuildingMasterConfigRepresentative.mustProvideIncrementalBuilding) {
|
|
1110
|
+
ImagesSourceFilesWatcher_1.default.
|
|
1111
|
+
initializeIfRequiredAndGetInstance({
|
|
1112
|
+
imagesProcessingSettingsRepresentative,
|
|
1113
|
+
projectBuildingMasterConfigRepresentative
|
|
1114
|
+
}).
|
|
1115
|
+
addOnFileAddedEventHandler({
|
|
1116
|
+
handlerID: "ON_IMAGES_FILE_ADDED--BY_IMAGES_PROCESSOR",
|
|
1117
|
+
handler: dataHoldingSelfInstance.onSourceFilesWatcherEmittedFileAddingOrUpdatingEvent.bind(dataHoldingSelfInstance)
|
|
1118
|
+
}).
|
|
1119
|
+
addFileUpdatedEventHandler({
|
|
1120
|
+
handlerID: "ON_IMAGES_FILE_UPDATED--BY_IMAGES_PROCESSOR",
|
|
1121
|
+
handler: dataHoldingSelfInstance.onSourceFilesWatcherEmittedFileAddingOrUpdatingEvent.bind(dataHoldingSelfInstance)
|
|
1122
|
+
}).
|
|
1123
|
+
addOnFileDeletedEventHandler({
|
|
1124
|
+
handlerID: "ON_IMAGES_FILE_DELETED--BY_IMAGES_PROCESSOR",
|
|
1125
|
+
handler: dataHoldingSelfInstance.onImageFileDeleted.bind(dataHoldingSelfInstance)
|
|
1126
|
+
});
|
|
1127
|
+
}
|
|
1128
1128
|
return dataHoldingSelfInstance.processAssets(imagesProcessingSettingsRepresentative.actualAssetsSourceFilesAbsolutePaths);
|
|
1129
1129
|
}
|
|
1130
1130
|
constructor(projectBuildingMasterConfigRepresentative, imagesProcessingSettingsRepresentative) {
|
|
@@ -1196,28 +1196,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
1196
1196
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1197
1197
|
};
|
|
1198
1198
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1199
|
-
|
|
1199
|
+
/* ─── Related Classes ────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
1200
|
+
const AssetsSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/AssetsSourceFilesWatcher */ "./ProjectBuilding/FilesWatching/Watchers/AssetsSourceFilesWatcher.ts"));
|
|
1201
|
+
const FilesMasterWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts"));
|
|
1200
1202
|
/* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
1201
1203
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
1202
1204
|
class ImagesSourceFilesWatcher extends AssetsSourceFilesWatcher_1.default {
|
|
1203
1205
|
static selfSoleInstance = null;
|
|
1204
|
-
mustLogSourceFilesWatcherEvents;
|
|
1205
|
-
imagesProcessingSettingsRepresentative;
|
|
1206
1206
|
static initializeIfRequiredAndGetInstance(initializationRequirements) {
|
|
1207
1207
|
if ((0, es_extensions_1.isNull)(ImagesSourceFilesWatcher.selfSoleInstance)) {
|
|
1208
1208
|
ImagesSourceFilesWatcher.selfSoleInstance = new ImagesSourceFilesWatcher(initializationRequirements);
|
|
1209
|
+
FilesMasterWatcher_1.default.addPassiveWatcher(ImagesSourceFilesWatcher.selfSoleInstance);
|
|
1209
1210
|
}
|
|
1210
1211
|
return ImagesSourceFilesWatcher.selfSoleInstance;
|
|
1211
1212
|
}
|
|
1212
1213
|
constructor({ imagesProcessingSettingsRepresentative, projectBuildingMasterConfigRepresentative }) {
|
|
1213
1214
|
super({
|
|
1215
|
+
ID: "IMAGE_SOURCE_FILES_WATCHER",
|
|
1216
|
+
mustLogEvents: imagesProcessingSettingsRepresentative.loggingSettings.filesWatcherEvents,
|
|
1214
1217
|
projectBuildingMasterConfigRepresentative,
|
|
1215
1218
|
targetFilesNamesExtensionsWithoutLeadingDots: imagesProcessingSettingsRepresentative.
|
|
1216
1219
|
supportedSourceFilesNamesExtensionsWithoutLeadingDots,
|
|
1220
|
+
outputFilesGlobSelectors: imagesProcessingSettingsRepresentative.actualOutputFilesGlobSelectors,
|
|
1217
1221
|
targetSourceFilesType__singularForm: "Image"
|
|
1218
1222
|
});
|
|
1219
|
-
this.imagesProcessingSettingsRepresentative = imagesProcessingSettingsRepresentative;
|
|
1220
|
-
this.mustLogSourceFilesWatcherEvents = this.imagesProcessingSettingsRepresentative.loggingSettings.filesWatcherEvents;
|
|
1221
1223
|
}
|
|
1222
1224
|
}
|
|
1223
1225
|
exports["default"] = ImagesSourceFilesWatcher;
|
|
@@ -1420,7 +1422,6 @@ const VideosSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @Vide
|
|
|
1420
1422
|
const GulpStreamsBasedAssetsProcessor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts"));
|
|
1421
1423
|
/* ─── Shared State ───────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
1422
1424
|
const VideosProcessingSharedState_1 = __importDefault(__webpack_require__(/*! @VideosProcessing/VideosProcessingSharedState */ "./ProjectBuilding/AssetsProcessing/Videos/VideosProcessingSharedState.ts"));
|
|
1423
|
-
const CommonSharedState_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/CommonSharedState */ "./ProjectBuilding/Common/CommonSharedState.ts"));
|
|
1424
1425
|
/* ─── Gulp & Plugins ─────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
1425
1426
|
const gulp_1 = __importDefault(__webpack_require__(/*! gulp */ "gulp"));
|
|
1426
1427
|
/* ─── Applied Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
@@ -1437,26 +1438,25 @@ class VideosProcessor extends GulpStreamsBasedAssetsProcessor_1.default {
|
|
|
1437
1438
|
return (0, createImmediatelyEndingEmptyStream_1.default)();
|
|
1438
1439
|
}
|
|
1439
1440
|
const dataHoldingSelfInstance = new VideosProcessor(projectBuildingMasterConfigRepresentative, videosProcessingSettingsRepresentative);
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
set("BY_VIDEOS_PROCESSOR", () => { videosSourceFilesWatcher.startWatching(); });
|
|
1441
|
+
if (projectBuildingMasterConfigRepresentative.mustProvideIncrementalBuilding) {
|
|
1442
|
+
VideosSourceFilesWatcher_1.default.
|
|
1443
|
+
initializeIfRequiredAndGetInstance({
|
|
1444
|
+
videosProcessingSettingsRepresentative,
|
|
1445
|
+
projectBuildingMasterConfigRepresentative
|
|
1446
|
+
}).
|
|
1447
|
+
addOnFileAddedEventHandler({
|
|
1448
|
+
handlerID: "ON_VIDEO_FILE_ADDED--BY_VIDEOS_PROCESSOR",
|
|
1449
|
+
handler: dataHoldingSelfInstance.onSourceFilesWatcherEmittedFileAddingOrUpdatingEvent.bind(dataHoldingSelfInstance)
|
|
1450
|
+
}).
|
|
1451
|
+
addFileUpdatedEventHandler({
|
|
1452
|
+
handlerID: "ON_VIDEO_FILE_UPDATED--BY_VIDEOS_PROCESSOR",
|
|
1453
|
+
handler: dataHoldingSelfInstance.onSourceFilesWatcherEmittedFileAddingOrUpdatingEvent.bind(dataHoldingSelfInstance)
|
|
1454
|
+
}).
|
|
1455
|
+
addOnFileDeletedEventHandler({
|
|
1456
|
+
handlerID: "ON_VIDEO_FILE_DELETED--BY_VIDEOS_PROCESSOR",
|
|
1457
|
+
handler: dataHoldingSelfInstance.onVideoFileDeleted.bind(dataHoldingSelfInstance)
|
|
1458
|
+
});
|
|
1459
|
+
}
|
|
1460
1460
|
return dataHoldingSelfInstance.processAssets(videosProcessingSettingsRepresentative.actualAssetsSourceFilesAbsolutePaths);
|
|
1461
1461
|
}
|
|
1462
1462
|
constructor(projectBuildingMasterConfigRepresentative, videosProcessingConfigRepresentative) {
|
|
@@ -1521,33 +1521,75 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
1521
1521
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1522
1522
|
};
|
|
1523
1523
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1524
|
-
|
|
1524
|
+
/* ─── Related Classes ────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
1525
|
+
const AssetsSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/AssetsSourceFilesWatcher */ "./ProjectBuilding/FilesWatching/Watchers/AssetsSourceFilesWatcher.ts"));
|
|
1526
|
+
const FilesMasterWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts"));
|
|
1525
1527
|
/* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
1526
1528
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
1527
1529
|
class VideosSourceFilesWatcher extends AssetsSourceFilesWatcher_1.default {
|
|
1528
1530
|
static selfSoleInstance = null;
|
|
1529
|
-
mustLogSourceFilesWatcherEvents;
|
|
1530
|
-
videosProcessingSettingsRepresentative;
|
|
1531
1531
|
static initializeIfRequiredAndGetInstance(initializationRequirements) {
|
|
1532
1532
|
if ((0, es_extensions_1.isNull)(VideosSourceFilesWatcher.selfSoleInstance)) {
|
|
1533
1533
|
VideosSourceFilesWatcher.selfSoleInstance = new VideosSourceFilesWatcher(initializationRequirements);
|
|
1534
|
+
FilesMasterWatcher_1.default.addPassiveWatcher(VideosSourceFilesWatcher.selfSoleInstance);
|
|
1534
1535
|
}
|
|
1535
1536
|
return VideosSourceFilesWatcher.selfSoleInstance;
|
|
1536
1537
|
}
|
|
1537
1538
|
constructor({ videosProcessingSettingsRepresentative, projectBuildingMasterConfigRepresentative }) {
|
|
1538
1539
|
super({
|
|
1540
|
+
ID: "VIDEOS_SOURCE_FILES_WATCHER",
|
|
1541
|
+
mustLogEvents: videosProcessingSettingsRepresentative.loggingSettings.filesWatcherEvents,
|
|
1539
1542
|
projectBuildingMasterConfigRepresentative,
|
|
1540
1543
|
targetFilesNamesExtensionsWithoutLeadingDots: videosProcessingSettingsRepresentative.
|
|
1541
1544
|
supportedSourceFilesNamesExtensionsWithoutLeadingDots,
|
|
1545
|
+
outputFilesGlobSelectors: videosProcessingSettingsRepresentative.actualOutputFilesGlobSelectors,
|
|
1542
1546
|
targetSourceFilesType__singularForm: "Video"
|
|
1543
1547
|
});
|
|
1544
|
-
this.videosProcessingSettingsRepresentative = videosProcessingSettingsRepresentative;
|
|
1545
|
-
this.mustLogSourceFilesWatcherEvents = this.videosProcessingSettingsRepresentative.loggingSettings.filesWatcherEvents;
|
|
1546
1548
|
}
|
|
1547
1549
|
}
|
|
1548
1550
|
exports["default"] = VideosSourceFilesWatcher;
|
|
1549
1551
|
|
|
1550
1552
|
|
|
1553
|
+
/***/ }),
|
|
1554
|
+
|
|
1555
|
+
/***/ "./ProjectBuilding/BrowserLiveReloading/BrowserCoordinatorRelatedFilesWatcher.ts":
|
|
1556
|
+
/*!***************************************************************************************!*\
|
|
1557
|
+
!*** ./ProjectBuilding/BrowserLiveReloading/BrowserCoordinatorRelatedFilesWatcher.ts ***!
|
|
1558
|
+
\***************************************************************************************/
|
|
1559
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1560
|
+
|
|
1561
|
+
|
|
1562
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
1563
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1564
|
+
};
|
|
1565
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1566
|
+
const FilesPassiveWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesPassiveWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesPassiveWatcher.ts"));
|
|
1567
|
+
const FilesMasterWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts"));
|
|
1568
|
+
const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
|
|
1569
|
+
class BrowserCoordinatorRelatedFilesWatcher extends FilesPassiveWatcher_1.default {
|
|
1570
|
+
onAnyEventRelatedWithActualFilesHandler;
|
|
1571
|
+
static initialize(initializationRequirements) {
|
|
1572
|
+
FilesMasterWatcher_1.default.addPassiveWatcher(new BrowserCoordinatorRelatedFilesWatcher(initializationRequirements));
|
|
1573
|
+
}
|
|
1574
|
+
constructor({ browserLiveReloadingSettingsRepresentative, onAnyEventRelatedWithActualFilesHandler }) {
|
|
1575
|
+
super({
|
|
1576
|
+
ID: "BROWSER_COORDINATOR_RELATED_FILES_WATCHER",
|
|
1577
|
+
targetFilesGlobSelectors: [
|
|
1578
|
+
es_extensions_nodejs_1.ImprovedGlob.buildAllFilesInCurrentDirectoryAndBelowGlobSelector({
|
|
1579
|
+
basicDirectoryPath: browserLiveReloadingSettingsRepresentative.targetFilesRootDirectoryAbsolutePath
|
|
1580
|
+
})
|
|
1581
|
+
],
|
|
1582
|
+
mustLogEvents: browserLiveReloadingSettingsRepresentative.mustLogOutputFileChangeDetection
|
|
1583
|
+
});
|
|
1584
|
+
this.onAnyEventRelatedWithActualFilesHandler = onAnyEventRelatedWithActualFilesHandler;
|
|
1585
|
+
}
|
|
1586
|
+
notifyAboutRelatedFileStateChange(targetFileAbsolutePath__forwardSlashesPathSeparators, eventName) {
|
|
1587
|
+
this.onAnyEventRelatedWithActualFilesHandler(targetFileAbsolutePath__forwardSlashesPathSeparators, eventName);
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
exports["default"] = BrowserCoordinatorRelatedFilesWatcher;
|
|
1591
|
+
|
|
1592
|
+
|
|
1551
1593
|
/***/ }),
|
|
1552
1594
|
|
|
1553
1595
|
/***/ "./ProjectBuilding/BrowserLiveReloading/BrowserLiveReloader.ts":
|
|
@@ -1562,12 +1604,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
1562
1604
|
};
|
|
1563
1605
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1564
1606
|
/* ─── Applied Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
1565
|
-
const gulp_1 = __importDefault(__webpack_require__(/*! gulp */ "gulp"));
|
|
1566
1607
|
const browser_sync_1 = __importDefault(__webpack_require__(/*! browser-sync */ "browser-sync"));
|
|
1567
|
-
|
|
1568
|
-
const CommonSharedState_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/CommonSharedState */ "./ProjectBuilding/Common/CommonSharedState.ts"));
|
|
1569
|
-
/* ─── Third-party Solutions Specialises ──────────────────────────────────────────────────────────────────────────── */
|
|
1570
|
-
const ChokidarSpecialist_1 = __importDefault(__webpack_require__(/*! @ThirdPartySolutionsSpecialists/Chokidar/ChokidarSpecialist */ "./ThirdPartySolutionsSpecialists/Chokidar/ChokidarSpecialist.ts"));
|
|
1608
|
+
const BrowserCoordinatorRelatedFilesWatcher_1 = __importDefault(__webpack_require__(/*! @BrowserLiveReloading/BrowserCoordinatorRelatedFilesWatcher */ "./ProjectBuilding/BrowserLiveReloading/BrowserCoordinatorRelatedFilesWatcher.ts"));
|
|
1571
1609
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
1572
1610
|
const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
|
|
1573
1611
|
/* ─── Localization ───────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
@@ -1576,6 +1614,7 @@ class BrowserLiveReloader {
|
|
|
1576
1614
|
static localization = BrowserLiveReloaderLocalization_english_1.default;
|
|
1577
1615
|
static onURI_ChangedEventHandlers = [];
|
|
1578
1616
|
browserLiveReloadingSettingsRepresentative;
|
|
1617
|
+
waitingForSubsequentFilesWillBeUpdatedCountdown;
|
|
1579
1618
|
static provideBrowserLiveReloadingIfMust(masterConfigRepresentative) {
|
|
1580
1619
|
const browserLiveReloadingConfigRepresentative = masterConfigRepresentative.getBrowserLiveReloadingSettingsRepresentativeIfMustProvideBrowserLiveReloading();
|
|
1581
1620
|
if ((0, es_extensions_1.isNull)(browserLiveReloadingConfigRepresentative)) {
|
|
@@ -1583,8 +1622,12 @@ class BrowserLiveReloader {
|
|
|
1583
1622
|
}
|
|
1584
1623
|
const dataHoldingSelfInstance = new BrowserLiveReloader(browserLiveReloadingConfigRepresentative);
|
|
1585
1624
|
return () => {
|
|
1625
|
+
BrowserCoordinatorRelatedFilesWatcher_1.default.initialize({
|
|
1626
|
+
onAnyEventRelatedWithActualFilesHandler: dataHoldingSelfInstance.onAnyChangeInRelatedFiles.
|
|
1627
|
+
bind(dataHoldingSelfInstance),
|
|
1628
|
+
browserLiveReloadingSettingsRepresentative: browserLiveReloadingConfigRepresentative
|
|
1629
|
+
});
|
|
1586
1630
|
dataHoldingSelfInstance.initializeBrowsersync();
|
|
1587
|
-
dataHoldingSelfInstance.initializeOutputFilesWatcher();
|
|
1588
1631
|
};
|
|
1589
1632
|
}
|
|
1590
1633
|
static addOnURI_ChangedEventHandler(onURI_ChangedEventHandler) {
|
|
@@ -1624,33 +1667,18 @@ class BrowserLiveReloader {
|
|
|
1624
1667
|
logLevel: "warn",
|
|
1625
1668
|
notify: this.browserLiveReloadingSettingsRepresentative.mustDisplayBrowsersyncConnectedPopupInBrowser,
|
|
1626
1669
|
middleware: this.onRequest.bind(this)
|
|
1627
|
-
}, () => { CommonSharedState_1.default.triggerInitialBuildDoneEvent(); });
|
|
1628
|
-
}
|
|
1629
|
-
initializeOutputFilesWatcher() {
|
|
1630
|
-
let waitingForSubsequentFilesWillBeUpdatedCountdown;
|
|
1631
|
-
gulp_1.default.watch(es_extensions_nodejs_1.ImprovedGlob.buildAllFilesInCurrentDirectoryAndBelowGlobSelector({
|
|
1632
|
-
basicDirectoryPath: this.browserLiveReloadingSettingsRepresentative.targetFilesRootDirectoryAbsolutePath
|
|
1633
|
-
})).
|
|
1634
|
-
on("all", (eventName, fileOrDirectoryPath) => {
|
|
1635
|
-
if (eventName === ChokidarSpecialist_1.default.EventsNames.directoryAdded ||
|
|
1636
|
-
eventName === ChokidarSpecialist_1.default.EventsNames.directoryDeleted) {
|
|
1637
|
-
return;
|
|
1638
|
-
}
|
|
1639
|
-
clearTimeout(waitingForSubsequentFilesWillBeUpdatedCountdown);
|
|
1640
|
-
if (this.browserLiveReloadingSettingsRepresentative.mustLogOutputFileChangeDetection) {
|
|
1641
|
-
es_extensions_1.Logger.logInfo(BrowserLiveReloader.localization.generateOutputFileChangeDetectionLog({
|
|
1642
|
-
filePath: fileOrDirectoryPath,
|
|
1643
|
-
eventLocalizedInterpretation: ChokidarSpecialist_1.default.getEventNameInterpretation(eventName)
|
|
1644
|
-
}));
|
|
1645
|
-
}
|
|
1646
|
-
waitingForSubsequentFilesWillBeUpdatedCountdown = setTimeout(() => {
|
|
1647
|
-
if (this.browserLiveReloadingSettingsRepresentative.mustLogBrowserTabWillBeReloadedSoon) {
|
|
1648
|
-
es_extensions_1.Logger.logInfo(BrowserLiveReloader.localization.browserTabWillBeReloadedSoonLog);
|
|
1649
|
-
}
|
|
1650
|
-
browser_sync_1.default.reload();
|
|
1651
|
-
}, (0, es_extensions_1.secondsToMilliseconds)(this.browserLiveReloadingSettingsRepresentative.periodBetweenFileUpdatingAndBrowserReloading__seconds));
|
|
1652
1670
|
});
|
|
1653
1671
|
}
|
|
1672
|
+
onAnyChangeInRelatedFiles() {
|
|
1673
|
+
clearTimeout(this.waitingForSubsequentFilesWillBeUpdatedCountdown);
|
|
1674
|
+
this.waitingForSubsequentFilesWillBeUpdatedCountdown = setTimeout(() => {
|
|
1675
|
+
es_extensions_1.Logger.logInfo({
|
|
1676
|
+
mustOutputIf: this.browserLiveReloadingSettingsRepresentative.mustLogBrowserTabWillBeReloadedSoon,
|
|
1677
|
+
...BrowserLiveReloader.localization.browserTabWillBeReloadedSoonLog
|
|
1678
|
+
});
|
|
1679
|
+
browser_sync_1.default.reload();
|
|
1680
|
+
}, (0, es_extensions_1.secondsToMilliseconds)(this.browserLiveReloadingSettingsRepresentative.periodBetweenFileUpdatingAndBrowserReloading__seconds));
|
|
1681
|
+
}
|
|
1654
1682
|
onRequest(request, _response, letPass) {
|
|
1655
1683
|
if ((0, es_extensions_1.isUndefined)(request.url)) {
|
|
1656
1684
|
letPass();
|
|
@@ -2099,41 +2127,6 @@ const browserLiveReloadingSettingsNormalizerLocalization__english = {
|
|
|
2099
2127
|
exports["default"] = browserLiveReloadingSettingsNormalizerLocalization__english;
|
|
2100
2128
|
|
|
2101
2129
|
|
|
2102
|
-
/***/ }),
|
|
2103
|
-
|
|
2104
|
-
/***/ "./ProjectBuilding/Common/CommonSharedState.ts":
|
|
2105
|
-
/*!*****************************************************!*\
|
|
2106
|
-
!*** ./ProjectBuilding/Common/CommonSharedState.ts ***!
|
|
2107
|
-
\*****************************************************/
|
|
2108
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2112
|
-
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
2113
|
-
class CommonSharedState {
|
|
2114
|
-
/* ━━━ Events ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
|
|
2115
|
-
/* ─── On initial build done ────────────────────────────────────────────────────────────────────────────────────── */
|
|
2116
|
-
static onInitialBuildDoneEventHandlers = new Map();
|
|
2117
|
-
static triggerInitialBuildDoneEvent() {
|
|
2118
|
-
for (const [handlerID, handler] of CommonSharedState.onInitialBuildDoneEventHandlers.entries()) {
|
|
2119
|
-
try {
|
|
2120
|
-
handler();
|
|
2121
|
-
}
|
|
2122
|
-
catch (error) {
|
|
2123
|
-
es_extensions_1.Logger.logError({
|
|
2124
|
-
errorType: "EventHandlerExecutionFailedError",
|
|
2125
|
-
title: "Event handler execution failed",
|
|
2126
|
-
description: `The error has occurred during the execution of on initial build done event handler with ID: "${handlerID}".`,
|
|
2127
|
-
occurrenceLocation: "CommonSharedState.triggerInitialBuildDoneEvent()",
|
|
2128
|
-
caughtError: error
|
|
2129
|
-
});
|
|
2130
|
-
}
|
|
2131
|
-
}
|
|
2132
|
-
}
|
|
2133
|
-
}
|
|
2134
|
-
exports["default"] = CommonSharedState;
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
2130
|
/***/ }),
|
|
2138
2131
|
|
|
2139
2132
|
/***/ "./ProjectBuilding/Common/Defaults/AssetsProcessingGenericSettings__Default.ts":
|
|
@@ -2177,15 +2170,19 @@ exports["default"] = CONFIG_FILE_DEFAULT_NAME_WITH_EXTENSION;
|
|
|
2177
2170
|
/*!********************************************************************************************!*\
|
|
2178
2171
|
!*** ./ProjectBuilding/Common/NormalizedConfig/ProjectBuildingCommonSettingsNormalizer.ts ***!
|
|
2179
2172
|
\********************************************************************************************/
|
|
2180
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__)
|
|
2173
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2181
2174
|
|
|
2182
2175
|
|
|
2176
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
2177
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2178
|
+
};
|
|
2183
2179
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2184
2180
|
/* --- Business rules ----------------------------------------------------------------------------------------------- */
|
|
2185
2181
|
const ProjectBuildingTasksIDsForConfigFile_1 = __webpack_require__(/*! @ProjectBuilding:Common/RawConfig/Enumerations/ProjectBuildingTasksIDsForConfigFile */ "./ProjectBuilding/Common/RawConfig/Enumerations/ProjectBuildingTasksIDsForConfigFile.ts");
|
|
2186
2182
|
/* --- Utils -------------------------------------------------------------------------------------------------------- */
|
|
2187
2183
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
2188
2184
|
const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
|
|
2185
|
+
const mustProvideIncrementalProjectBuilding_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/mustProvideIncrementalProjectBuilding */ "./ProjectBuilding/Common/Restrictions/mustProvideIncrementalProjectBuilding.ts"));
|
|
2189
2186
|
class ProjectBuildingCommonSettingsNormalizer {
|
|
2190
2187
|
static normalize({ commonSettings__fromFile__rawValid, consumingProjectRootDirectoryAbsolutePath, projectBuildingMode, actualSelectiveExecutionID, actualSelectiveExecution }) {
|
|
2191
2188
|
const consumingProjectRootDirectoryAbsolutePath__forwardSlashes = es_extensions_nodejs_1.ImprovedPath.
|
|
@@ -2198,6 +2195,7 @@ class ProjectBuildingCommonSettingsNormalizer {
|
|
|
2198
2195
|
return {
|
|
2199
2196
|
projectRootDirectoryAbsolutePath: consumingProjectRootDirectoryAbsolutePath__forwardSlashes,
|
|
2200
2197
|
projectBuildingMode,
|
|
2198
|
+
mustProvideIncrementalBuilding: (0, mustProvideIncrementalProjectBuilding_1.default)(projectBuildingMode),
|
|
2201
2199
|
...(0, es_extensions_1.isNotUndefined)(actualSelectiveExecutionID) ? { selectiveExecutionID: actualSelectiveExecutionID } : null,
|
|
2202
2200
|
...(0, es_extensions_1.isNotUndefined)(actualSelectiveExecution) ? {
|
|
2203
2201
|
tasksAndSourceFilesSelection: {
|
|
@@ -2364,6 +2362,7 @@ var ProjectBuildingTasksIDsForConfigFile;
|
|
|
2364
2362
|
ProjectBuildingTasksIDsForConfigFile["videosProcessing"] = "videosProcessing";
|
|
2365
2363
|
ProjectBuildingTasksIDsForConfigFile["browserLiveReloading"] = "browserLiveReloading";
|
|
2366
2364
|
ProjectBuildingTasksIDsForConfigFile["plainCopying"] = "plainCopying";
|
|
2365
|
+
ProjectBuildingTasksIDsForConfigFile["filesWatching"] = "filesWatching";
|
|
2367
2366
|
})(ProjectBuildingTasksIDsForConfigFile || (exports.ProjectBuildingTasksIDsForConfigFile = ProjectBuildingTasksIDsForConfigFile = {}));
|
|
2368
2367
|
|
|
2369
2368
|
|
|
@@ -3127,6 +3126,27 @@ const PROCESSABLE_FILE_REFERENCE_ALIAS_PREFIX = "@";
|
|
|
3127
3126
|
exports["default"] = PROCESSABLE_FILE_REFERENCE_ALIAS_PREFIX;
|
|
3128
3127
|
|
|
3129
3128
|
|
|
3129
|
+
/***/ }),
|
|
3130
|
+
|
|
3131
|
+
/***/ "./ProjectBuilding/Common/Restrictions/mustProvideIncrementalProjectBuilding.ts":
|
|
3132
|
+
/*!**************************************************************************************!*\
|
|
3133
|
+
!*** ./ProjectBuilding/Common/Restrictions/mustProvideIncrementalProjectBuilding.ts ***!
|
|
3134
|
+
\**************************************************************************************/
|
|
3135
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3136
|
+
|
|
3137
|
+
|
|
3138
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3139
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3140
|
+
};
|
|
3141
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3142
|
+
const ConsumingProjectBuildingModes_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/Restrictions/ConsumingProjectBuildingModes */ "./ProjectBuilding/Common/Restrictions/ConsumingProjectBuildingModes.ts"));
|
|
3143
|
+
function mustProvideIncrementalProjectBuilding(consumingProjectBuildingModes) {
|
|
3144
|
+
return consumingProjectBuildingModes === ConsumingProjectBuildingModes_1.default.staticPreview ||
|
|
3145
|
+
consumingProjectBuildingModes === ConsumingProjectBuildingModes_1.default.localDevelopment;
|
|
3146
|
+
}
|
|
3147
|
+
exports["default"] = mustProvideIncrementalProjectBuilding;
|
|
3148
|
+
|
|
3149
|
+
|
|
3130
3150
|
/***/ }),
|
|
3131
3151
|
|
|
3132
3152
|
/***/ "./ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative.ts":
|
|
@@ -3451,10 +3471,10 @@ exports["default"] = SourceCodeProcessingConfigRepresentative;
|
|
|
3451
3471
|
|
|
3452
3472
|
/***/ }),
|
|
3453
3473
|
|
|
3454
|
-
/***/ "./ProjectBuilding/Common/
|
|
3455
|
-
|
|
3456
|
-
!*** ./ProjectBuilding/Common/
|
|
3457
|
-
|
|
3474
|
+
/***/ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts":
|
|
3475
|
+
/*!**********************************************************************************!*\
|
|
3476
|
+
!*** ./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts ***!
|
|
3477
|
+
\**********************************************************************************/
|
|
3458
3478
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3459
3479
|
|
|
3460
3480
|
|
|
@@ -3462,394 +3482,61 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3462
3482
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3463
3483
|
};
|
|
3464
3484
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3465
|
-
/* ───
|
|
3466
|
-
const
|
|
3467
|
-
const
|
|
3485
|
+
/* ─── Task Executors ─────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
3486
|
+
const GulpStreamsBasedTaskExecutor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBased/GulpStreamsBasedTaskExecutor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBased/GulpStreamsBasedTaskExecutor.ts"));
|
|
3487
|
+
const AssetVinylFile_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/VinylFiles/AssetVinylFile */ "./ProjectBuilding/Common/VinylFiles/AssetVinylFile.ts"));
|
|
3488
|
+
const GulpStreamModifier_1 = __importDefault(__webpack_require__(/*! @Utils/GulpStreamModifier */ "./Utils/GulpStreamModifier.ts"));
|
|
3489
|
+
const FileNameRevisionPostfixer_1 = __importDefault(__webpack_require__(/*! @Utils/FileNameRevisionPostfixer */ "./Utils/FileNameRevisionPostfixer.ts"));
|
|
3468
3490
|
/* ─── General Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
3469
3491
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
this.
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
this.LOGGER_BADGE_TEXT = `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} source files watcher report`;
|
|
3487
|
-
}
|
|
3488
|
-
addOnAnyEventRelatedWithActualFilesHandler({ handlerID, handler }) {
|
|
3489
|
-
this.onAnyEventRelatedWithActualFiles[handlerID] = handler;
|
|
3490
|
-
return this;
|
|
3491
|
-
}
|
|
3492
|
-
addOnFileAddedEventHandler({ handlerID, handler }) {
|
|
3493
|
-
this.onFileAddedEventHandlers[handlerID] = handler;
|
|
3494
|
-
return this;
|
|
3495
|
-
}
|
|
3496
|
-
addFileUpdatedEventHandler({ handlerID, handler }) {
|
|
3497
|
-
this.onFileUpdatedEventHandlers[handlerID] = handler;
|
|
3498
|
-
return this;
|
|
3499
|
-
}
|
|
3500
|
-
addOnFileDeletedEventHandler({ handlerID, handler }) {
|
|
3501
|
-
this.onFileDeletedEventHandlers[handlerID] = handler;
|
|
3502
|
-
return this;
|
|
3492
|
+
class GulpStreamsBasedAssetsProcessor extends GulpStreamsBasedTaskExecutor_1.default {
|
|
3493
|
+
absolutePathOfFilesWaitingForReProcessing = new Set();
|
|
3494
|
+
WAITING_FOR_SUBSEQUENT_FILES_WILL_SAVED_PERIOD__SECONDS;
|
|
3495
|
+
associatedAssetsProcessingSettingsRepresentative;
|
|
3496
|
+
subsequentFilesStateChangeTimeout = null;
|
|
3497
|
+
logging;
|
|
3498
|
+
constructor(constructorParameter) {
|
|
3499
|
+
super(constructorParameter);
|
|
3500
|
+
this.associatedAssetsProcessingSettingsRepresentative = constructorParameter.
|
|
3501
|
+
associatedAssetsProcessingSettingsRepresentative;
|
|
3502
|
+
this.WAITING_FOR_SUBSEQUENT_FILES_WILL_SAVED_PERIOD__SECONDS = constructorParameter.
|
|
3503
|
+
waitingForSubsequentFilesWillSavedPeriod__seconds;
|
|
3504
|
+
this.logging = {
|
|
3505
|
+
pathsOfFilesWillBeProcessed: this.associatedAssetsProcessingSettingsRepresentative.loggingSettings.filesPaths,
|
|
3506
|
+
quantityOfFilesWillBeProcessed: this.associatedAssetsProcessingSettingsRepresentative.loggingSettings.filesCount
|
|
3507
|
+
};
|
|
3503
3508
|
}
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
es_extensions_nodejs_1.ImprovedGlob.buildExcludingOfDirectoryWithSubdirectoriesGlobSelector(es_extensions_nodejs_1.ImprovedPath.joinPathSegments([this.projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath, "node_modules"], { alwaysForwardSlashSeparators: true }))
|
|
3513
|
-
], { alwaysForwardSlashSeparators: true })
|
|
3514
|
-
]).
|
|
3515
|
-
on("all", this.onAnyChokidarEvent.bind(this));
|
|
3509
|
+
/* ━━━ Pipeline methods ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
|
|
3510
|
+
async replacePlainVinylFileWithAssetVinylFile(plainVinylFile, addNewFileToStream) {
|
|
3511
|
+
addNewFileToStream(new AssetVinylFile_1.default({
|
|
3512
|
+
initialPlainVinylFile: plainVinylFile,
|
|
3513
|
+
actualAssetsGroupSettings: this.associatedAssetsProcessingSettingsRepresentative.
|
|
3514
|
+
getAssetsNormalizedSettingsActualForTargetSourceFile(plainVinylFile.path)
|
|
3515
|
+
}));
|
|
3516
|
+
return Promise.resolve(GulpStreamModifier_1.default.CompletionSignals.REMOVING_FILE_FROM_STREAM);
|
|
3516
3517
|
}
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
chokidarEventName === ChokidarSpecialist_1.default.EventsNames.directoryDeleted) {
|
|
3521
|
-
return;
|
|
3522
|
-
}
|
|
3523
|
-
const targetFileAbsolutePath = es_extensions_nodejs_1.ImprovedPath.replacePathSeparatorsToForwardSlashes(targetFileOrDirectoryAbsolutePath__operationingSystemDependentPathSeparators);
|
|
3524
|
-
for (const handler of Object.values(this.onAnyEventRelatedWithActualFiles)) {
|
|
3525
|
-
handler(targetFileAbsolutePath);
|
|
3518
|
+
static async addContentHashPostfixToFileNameIfMust(processedAssetFile) {
|
|
3519
|
+
if (processedAssetFile.actualAssetsGroupSettings.revisioning.mustExecute) {
|
|
3520
|
+
FileNameRevisionPostfixer_1.default.appendPostfixIfPossible(processedAssetFile, { contentHashPostfixSeparator: processedAssetFile.actualAssetsGroupSettings.revisioning.contentHashPostfixSeparator });
|
|
3526
3521
|
}
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
handler(targetFileAbsolutePath);
|
|
3538
|
-
}
|
|
3539
|
-
break;
|
|
3540
|
-
}
|
|
3541
|
-
case ChokidarSpecialist_1.default.EventsNames.fileChanged: {
|
|
3542
|
-
es_extensions_1.Logger.logInfo({
|
|
3543
|
-
mustOutputIf: this.mustLogSourceFilesWatcherEvents,
|
|
3544
|
-
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
3545
|
-
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} file update`,
|
|
3546
|
-
description: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} file has been updated.\n` +
|
|
3547
|
-
targetFileAbsolutePath
|
|
3548
|
-
});
|
|
3549
|
-
for (const handler of Object.values(this.onFileUpdatedEventHandlers)) {
|
|
3550
|
-
handler(targetFileAbsolutePath);
|
|
3551
|
-
}
|
|
3552
|
-
break;
|
|
3553
|
-
}
|
|
3554
|
-
case ChokidarSpecialist_1.default.EventsNames.fileDeleted: {
|
|
3555
|
-
es_extensions_1.Logger.logInfo({
|
|
3556
|
-
mustOutputIf: this.mustLogSourceFilesWatcherEvents,
|
|
3557
|
-
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
3558
|
-
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} entry point source file deleting`,
|
|
3559
|
-
description: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} entry point source file has ` +
|
|
3560
|
-
`been deleted.\n${targetFileAbsolutePath}`
|
|
3561
|
-
});
|
|
3562
|
-
for (const handler of Object.values(this.onFileDeletedEventHandlers)) {
|
|
3563
|
-
handler(targetFileAbsolutePath);
|
|
3564
|
-
}
|
|
3565
|
-
break;
|
|
3566
|
-
}
|
|
3567
|
-
default: {
|
|
3568
|
-
/* [ Approach ] Nothing required for other events */
|
|
3569
|
-
}
|
|
3522
|
+
return Promise.resolve(GulpStreamModifier_1.default.CompletionSignals.PASSING_ON);
|
|
3523
|
+
}
|
|
3524
|
+
/* ━━━ Rebuilding ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
|
|
3525
|
+
/* eslint-disable-next-line @typescript-eslint/member-ordering --
|
|
3526
|
+
* `addContentHashPostfixToFileNameIfMust`を静的にすると、`@typescript-eslint/class-methods-use-this`が発生するが、メソッドが論理的な
|
|
3527
|
+
* 順番通り整理してある。 */
|
|
3528
|
+
onSourceFilesWatcherEmittedFileAddingOrUpdatingEvent(targetFileAbsolutePath) {
|
|
3529
|
+
this.absolutePathOfFilesWaitingForReProcessing.add(targetFileAbsolutePath);
|
|
3530
|
+
if ((0, es_extensions_1.isNotNull)(this.subsequentFilesStateChangeTimeout)) {
|
|
3531
|
+
clearTimeout(this.subsequentFilesStateChangeTimeout);
|
|
3570
3532
|
}
|
|
3533
|
+
this.subsequentFilesStateChangeTimeout = setTimeout(() => {
|
|
3534
|
+
this.processAssets(Array.from(this.absolutePathOfFilesWaitingForReProcessing))();
|
|
3535
|
+
this.absolutePathOfFilesWaitingForReProcessing.clear();
|
|
3536
|
+
}, (0, es_extensions_1.secondsToMilliseconds)(this.WAITING_FOR_SUBSEQUENT_FILES_WILL_SAVED_PERIOD__SECONDS));
|
|
3571
3537
|
}
|
|
3572
3538
|
}
|
|
3573
|
-
exports["default"] =
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
/***/ }),
|
|
3577
|
-
|
|
3578
|
-
/***/ "./ProjectBuilding/Common/SourceFilesWatchers/CodeSourceFilesWatcher.ts":
|
|
3579
|
-
/*!******************************************************************************!*\
|
|
3580
|
-
!*** ./ProjectBuilding/Common/SourceFilesWatchers/CodeSourceFilesWatcher.ts ***!
|
|
3581
|
-
\******************************************************************************/
|
|
3582
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3586
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3587
|
-
};
|
|
3588
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3589
|
-
/* ─── Third-party Solutions Specialises ──────────────────────────────────────────────────────────────────────────── */
|
|
3590
|
-
const gulp_1 = __importDefault(__webpack_require__(/*! gulp */ "gulp"));
|
|
3591
|
-
const ChokidarSpecialist_1 = __importDefault(__webpack_require__(/*! @ThirdPartySolutionsSpecialists/Chokidar/ChokidarSpecialist */ "./ThirdPartySolutionsSpecialists/Chokidar/ChokidarSpecialist.ts"));
|
|
3592
|
-
/* ─── General Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
3593
|
-
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
3594
|
-
const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
|
|
3595
|
-
class CodeSourceFilesWatcher {
|
|
3596
|
-
targetFilesNamesExtensionsWithoutLeadingDots;
|
|
3597
|
-
outputFilesGlobSelectors;
|
|
3598
|
-
projectBuildingMasterConfigRepresentative;
|
|
3599
|
-
onAnyEventRelatedWithActualFiles = {};
|
|
3600
|
-
onAnyRelatedFileAddedEventHandlers = {};
|
|
3601
|
-
onAnyRelatedFileUpdatedEventHandlers = {};
|
|
3602
|
-
onAnyRelatedFileDeletedEventHandlers = {};
|
|
3603
|
-
onEntryPointFileAddedEventHandlers = {};
|
|
3604
|
-
onEntryPointFileUpdatedEventHandlers = {};
|
|
3605
|
-
onEntryPointFileDeletedEventHandlers = {};
|
|
3606
|
-
onNonEntryPointFileAddedEventHandlers = {};
|
|
3607
|
-
onNonEntryPointFileUpdatedEventHandlers = {};
|
|
3608
|
-
onNonEntryPointFileDeletedEventHandlers = {};
|
|
3609
|
-
TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED;
|
|
3610
|
-
TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__LOWERCASE;
|
|
3611
|
-
LOGGER_BADGE_TEXT;
|
|
3612
|
-
constructor({ projectBuildingMasterConfigRepresentative, targetFilesNamesExtensionsWithoutLeadingDots, targetSourceFilesType__singularForm, outputFilesGlobSelectors }) {
|
|
3613
|
-
this.projectBuildingMasterConfigRepresentative = projectBuildingMasterConfigRepresentative;
|
|
3614
|
-
this.targetFilesNamesExtensionsWithoutLeadingDots = targetFilesNamesExtensionsWithoutLeadingDots;
|
|
3615
|
-
this.outputFilesGlobSelectors = outputFilesGlobSelectors;
|
|
3616
|
-
this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED = (0, es_extensions_1.toUpperCamelCase)(targetSourceFilesType__singularForm);
|
|
3617
|
-
this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__LOWERCASE = (0, es_extensions_1.toLowerCamelCase)(targetSourceFilesType__singularForm);
|
|
3618
|
-
this.LOGGER_BADGE_TEXT = `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} source files watcher report`;
|
|
3619
|
-
}
|
|
3620
|
-
addOnAnyEventRelatedWithActualFilesHandler({ handlerID, handler }) {
|
|
3621
|
-
this.onAnyEventRelatedWithActualFiles[handlerID] = handler;
|
|
3622
|
-
return this;
|
|
3623
|
-
}
|
|
3624
|
-
addOnAnyRelatedFileAddedEventHandler({ handlerID, handler }) {
|
|
3625
|
-
this.onAnyRelatedFileAddedEventHandlers[handlerID] = handler;
|
|
3626
|
-
return this;
|
|
3627
|
-
}
|
|
3628
|
-
addOnAnyRelatedFileUpdatedEventHandler({ handlerID, handler }) {
|
|
3629
|
-
this.onAnyRelatedFileUpdatedEventHandlers[handlerID] = handler;
|
|
3630
|
-
return this;
|
|
3631
|
-
}
|
|
3632
|
-
addOnAnyRelatedFileDeletedEventHandler({ handlerID, handler }) {
|
|
3633
|
-
this.onAnyRelatedFileDeletedEventHandlers[handlerID] = handler;
|
|
3634
|
-
return this;
|
|
3635
|
-
}
|
|
3636
|
-
addOnEntryPointFileAddedEventHandler({ handlerID, handler }) {
|
|
3637
|
-
this.onEntryPointFileAddedEventHandlers[handlerID] = handler;
|
|
3638
|
-
return this;
|
|
3639
|
-
}
|
|
3640
|
-
addOnEntryPointFileUpdatedEventHandler({ handlerID, handler }) {
|
|
3641
|
-
this.onEntryPointFileUpdatedEventHandlers[handlerID] = handler;
|
|
3642
|
-
return this;
|
|
3643
|
-
}
|
|
3644
|
-
addOnEntryPointFileDeletedEventHandler({ handlerID, handler }) {
|
|
3645
|
-
this.onEntryPointFileDeletedEventHandlers[handlerID] = handler;
|
|
3646
|
-
return this;
|
|
3647
|
-
}
|
|
3648
|
-
addOnNonEntryPointFileAddedEventHandler({ handlerID, handler }) {
|
|
3649
|
-
this.onNonEntryPointFileAddedEventHandlers[handlerID] = handler;
|
|
3650
|
-
return this;
|
|
3651
|
-
}
|
|
3652
|
-
addOnNonEntryPointFileUpdatedEventHandler({ handlerID, handler }) {
|
|
3653
|
-
this.onNonEntryPointFileUpdatedEventHandlers[handlerID] = handler;
|
|
3654
|
-
return this;
|
|
3655
|
-
}
|
|
3656
|
-
addOnNonEntryPointFileDeletedEventHandler({ handlerID, handler }) {
|
|
3657
|
-
this.onNonEntryPointFileDeletedEventHandlers[handlerID] = handler;
|
|
3658
|
-
return this;
|
|
3659
|
-
}
|
|
3660
|
-
startWatching() {
|
|
3661
|
-
gulp_1.default.
|
|
3662
|
-
watch([
|
|
3663
|
-
es_extensions_nodejs_1.ImprovedGlob.buildAllFilesInCurrentDirectoryAndBelowGlobSelector({
|
|
3664
|
-
basicDirectoryPath: this.projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
|
|
3665
|
-
fileNamesExtensions: this.targetFilesNamesExtensionsWithoutLeadingDots
|
|
3666
|
-
}),
|
|
3667
|
-
es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
|
|
3668
|
-
es_extensions_nodejs_1.ImprovedGlob.buildExcludingOfDirectoryWithSubdirectoriesGlobSelector(es_extensions_nodejs_1.ImprovedPath.joinPathSegments([this.projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath, "node_modules"], { alwaysForwardSlashSeparators: true }))
|
|
3669
|
-
], { alwaysForwardSlashSeparators: true }),
|
|
3670
|
-
...es_extensions_nodejs_1.ImprovedGlob.includingGlobSelectorsToExcludingOnes(this.outputFilesGlobSelectors)
|
|
3671
|
-
]).
|
|
3672
|
-
on("all", this.onAnyChokidarEvent.bind(this));
|
|
3673
|
-
}
|
|
3674
|
-
/* [ Chokidar theory ] While the globs are absolute path based, the second parameter will be the absolute path too. */
|
|
3675
|
-
onAnyChokidarEvent(chokidarEventName, targetFileOrDirectoryAbsolutePath__operationingSystemDependentPathSeparators) {
|
|
3676
|
-
if (chokidarEventName === ChokidarSpecialist_1.default.EventsNames.directoryAdded ||
|
|
3677
|
-
chokidarEventName === ChokidarSpecialist_1.default.EventsNames.directoryDeleted) {
|
|
3678
|
-
return;
|
|
3679
|
-
}
|
|
3680
|
-
const targetFileAbsolutePath = es_extensions_nodejs_1.ImprovedPath.replacePathSeparatorsToForwardSlashes(targetFileOrDirectoryAbsolutePath__operationingSystemDependentPathSeparators);
|
|
3681
|
-
const isTargetFileTheEntryPoint = this.isFileAbsolutePathRefersToEntryPoint(targetFileAbsolutePath);
|
|
3682
|
-
for (const handler of Object.values(this.onAnyEventRelatedWithActualFiles)) {
|
|
3683
|
-
handler(targetFileAbsolutePath);
|
|
3684
|
-
}
|
|
3685
|
-
switch (chokidarEventName) {
|
|
3686
|
-
case ChokidarSpecialist_1.default.EventsNames.fileAdded: {
|
|
3687
|
-
for (const handler of Object.values(this.onAnyRelatedFileAddedEventHandlers)) {
|
|
3688
|
-
handler(targetFileAbsolutePath);
|
|
3689
|
-
}
|
|
3690
|
-
if (isTargetFileTheEntryPoint) {
|
|
3691
|
-
es_extensions_1.Logger.logInfo({
|
|
3692
|
-
mustOutputIf: this.mustLogSourceFilesWatcherEvents,
|
|
3693
|
-
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
3694
|
-
title: `New ${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__LOWERCASE} entry point source file`,
|
|
3695
|
-
description: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} entry point source file has ` +
|
|
3696
|
-
`been added.\n${targetFileAbsolutePath}`
|
|
3697
|
-
});
|
|
3698
|
-
for (const handler of Object.values(this.onEntryPointFileAddedEventHandlers)) {
|
|
3699
|
-
handler(targetFileAbsolutePath);
|
|
3700
|
-
}
|
|
3701
|
-
}
|
|
3702
|
-
else {
|
|
3703
|
-
es_extensions_1.Logger.logInfo({
|
|
3704
|
-
mustOutputIf: this.mustLogSourceFilesWatcherEvents,
|
|
3705
|
-
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
3706
|
-
title: `New ${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__LOWERCASE} non-entry point source file`,
|
|
3707
|
-
description: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} non-entry point source file ` +
|
|
3708
|
-
`has been added.\n${targetFileAbsolutePath}`
|
|
3709
|
-
});
|
|
3710
|
-
for (const handler of Object.values(this.onNonEntryPointFileAddedEventHandlers)) {
|
|
3711
|
-
handler(targetFileAbsolutePath);
|
|
3712
|
-
}
|
|
3713
|
-
}
|
|
3714
|
-
break;
|
|
3715
|
-
}
|
|
3716
|
-
case ChokidarSpecialist_1.default.EventsNames.fileChanged: {
|
|
3717
|
-
for (const handler of Object.values(this.onAnyRelatedFileUpdatedEventHandlers)) {
|
|
3718
|
-
handler(targetFileAbsolutePath);
|
|
3719
|
-
}
|
|
3720
|
-
if (isTargetFileTheEntryPoint) {
|
|
3721
|
-
es_extensions_1.Logger.logInfo({
|
|
3722
|
-
mustOutputIf: this.mustLogSourceFilesWatcherEvents,
|
|
3723
|
-
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
3724
|
-
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} entry point source file update`,
|
|
3725
|
-
description: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} entry point source file has ` +
|
|
3726
|
-
`been updated.\n${targetFileAbsolutePath}`
|
|
3727
|
-
});
|
|
3728
|
-
for (const handler of Object.values(this.onEntryPointFileUpdatedEventHandlers)) {
|
|
3729
|
-
handler(targetFileAbsolutePath);
|
|
3730
|
-
}
|
|
3731
|
-
}
|
|
3732
|
-
else {
|
|
3733
|
-
es_extensions_1.Logger.logInfo({
|
|
3734
|
-
mustOutputIf: this.mustLogSourceFilesWatcherEvents,
|
|
3735
|
-
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
3736
|
-
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} non-entry point source file update`,
|
|
3737
|
-
description: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} non-entry point source file has ` +
|
|
3738
|
-
` been updated.\n${targetFileAbsolutePath}`
|
|
3739
|
-
});
|
|
3740
|
-
for (const handler of Object.values(this.onNonEntryPointFileUpdatedEventHandlers)) {
|
|
3741
|
-
handler(targetFileAbsolutePath);
|
|
3742
|
-
}
|
|
3743
|
-
}
|
|
3744
|
-
break;
|
|
3745
|
-
}
|
|
3746
|
-
case ChokidarSpecialist_1.default.EventsNames.fileDeleted: {
|
|
3747
|
-
for (const handler of Object.values(this.onAnyRelatedFileDeletedEventHandlers)) {
|
|
3748
|
-
handler(targetFileAbsolutePath);
|
|
3749
|
-
}
|
|
3750
|
-
if (isTargetFileTheEntryPoint) {
|
|
3751
|
-
es_extensions_1.Logger.logInfo({
|
|
3752
|
-
mustOutputIf: this.mustLogSourceFilesWatcherEvents,
|
|
3753
|
-
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
3754
|
-
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} entry point source file deleting`,
|
|
3755
|
-
description: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} entry point source file has ` +
|
|
3756
|
-
`been deleted.\n${targetFileAbsolutePath}`
|
|
3757
|
-
});
|
|
3758
|
-
for (const handler of Object.values(this.onEntryPointFileDeletedEventHandlers)) {
|
|
3759
|
-
handler(targetFileAbsolutePath);
|
|
3760
|
-
}
|
|
3761
|
-
}
|
|
3762
|
-
else {
|
|
3763
|
-
es_extensions_1.Logger.logInfo({
|
|
3764
|
-
mustOutputIf: this.mustLogSourceFilesWatcherEvents,
|
|
3765
|
-
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
3766
|
-
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} non-entry point source file deleting`,
|
|
3767
|
-
description: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} non-entry point source file ` +
|
|
3768
|
-
`has been deleted.\n${targetFileAbsolutePath}`
|
|
3769
|
-
});
|
|
3770
|
-
for (const handler of Object.values(this.onNonEntryPointFileDeletedEventHandlers)) {
|
|
3771
|
-
handler(targetFileAbsolutePath);
|
|
3772
|
-
}
|
|
3773
|
-
}
|
|
3774
|
-
break;
|
|
3775
|
-
}
|
|
3776
|
-
default: {
|
|
3777
|
-
/* [ Approach ] Nothing required for other events */
|
|
3778
|
-
}
|
|
3779
|
-
}
|
|
3780
|
-
}
|
|
3781
|
-
}
|
|
3782
|
-
exports["default"] = CodeSourceFilesWatcher;
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
/***/ }),
|
|
3786
|
-
|
|
3787
|
-
/***/ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts":
|
|
3788
|
-
/*!**********************************************************************************!*\
|
|
3789
|
-
!*** ./ProjectBuilding/Common/TasksExecutors/GulpStreamsBasedAssetsProcessor.ts ***!
|
|
3790
|
-
\**********************************************************************************/
|
|
3791
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3795
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3796
|
-
};
|
|
3797
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3798
|
-
/* ─── Task Executors ─────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
3799
|
-
const GulpStreamsBasedTaskExecutor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBased/GulpStreamsBasedTaskExecutor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBased/GulpStreamsBasedTaskExecutor.ts"));
|
|
3800
|
-
const AssetVinylFile_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/VinylFiles/AssetVinylFile */ "./ProjectBuilding/Common/VinylFiles/AssetVinylFile.ts"));
|
|
3801
|
-
const GulpStreamModifier_1 = __importDefault(__webpack_require__(/*! @Utils/GulpStreamModifier */ "./Utils/GulpStreamModifier.ts"));
|
|
3802
|
-
const FileNameRevisionPostfixer_1 = __importDefault(__webpack_require__(/*! @Utils/FileNameRevisionPostfixer */ "./Utils/FileNameRevisionPostfixer.ts"));
|
|
3803
|
-
/* ─── General Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
3804
|
-
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
3805
|
-
class GulpStreamsBasedAssetsProcessor extends GulpStreamsBasedTaskExecutor_1.default {
|
|
3806
|
-
absolutePathOfFilesWaitingForReProcessing = new Set();
|
|
3807
|
-
WAITING_FOR_SUBSEQUENT_FILES_WILL_SAVED_PERIOD__SECONDS;
|
|
3808
|
-
associatedAssetsProcessingSettingsRepresentative;
|
|
3809
|
-
subsequentFilesStateChangeTimeout = null;
|
|
3810
|
-
logging;
|
|
3811
|
-
constructor(constructorParameter) {
|
|
3812
|
-
super(constructorParameter);
|
|
3813
|
-
this.associatedAssetsProcessingSettingsRepresentative = constructorParameter.
|
|
3814
|
-
associatedAssetsProcessingSettingsRepresentative;
|
|
3815
|
-
this.WAITING_FOR_SUBSEQUENT_FILES_WILL_SAVED_PERIOD__SECONDS = constructorParameter.
|
|
3816
|
-
waitingForSubsequentFilesWillSavedPeriod__seconds;
|
|
3817
|
-
this.logging = {
|
|
3818
|
-
pathsOfFilesWillBeProcessed: this.associatedAssetsProcessingSettingsRepresentative.loggingSettings.filesPaths,
|
|
3819
|
-
quantityOfFilesWillBeProcessed: this.associatedAssetsProcessingSettingsRepresentative.loggingSettings.filesCount
|
|
3820
|
-
};
|
|
3821
|
-
}
|
|
3822
|
-
/* ━━━ Pipeline methods ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
|
|
3823
|
-
async replacePlainVinylFileWithAssetVinylFile(plainVinylFile, addNewFileToStream) {
|
|
3824
|
-
addNewFileToStream(new AssetVinylFile_1.default({
|
|
3825
|
-
initialPlainVinylFile: plainVinylFile,
|
|
3826
|
-
actualAssetsGroupSettings: this.associatedAssetsProcessingSettingsRepresentative.
|
|
3827
|
-
getAssetsNormalizedSettingsActualForTargetSourceFile(plainVinylFile.path)
|
|
3828
|
-
}));
|
|
3829
|
-
return Promise.resolve(GulpStreamModifier_1.default.CompletionSignals.REMOVING_FILE_FROM_STREAM);
|
|
3830
|
-
}
|
|
3831
|
-
static async addContentHashPostfixToFileNameIfMust(processedAssetFile) {
|
|
3832
|
-
if (processedAssetFile.actualAssetsGroupSettings.revisioning.mustExecute) {
|
|
3833
|
-
FileNameRevisionPostfixer_1.default.appendPostfixIfPossible(processedAssetFile, { contentHashPostfixSeparator: processedAssetFile.actualAssetsGroupSettings.revisioning.contentHashPostfixSeparator });
|
|
3834
|
-
}
|
|
3835
|
-
return Promise.resolve(GulpStreamModifier_1.default.CompletionSignals.PASSING_ON);
|
|
3836
|
-
}
|
|
3837
|
-
/* ━━━ Rebuilding ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
|
|
3838
|
-
/* eslint-disable-next-line @typescript-eslint/member-ordering --
|
|
3839
|
-
* `addContentHashPostfixToFileNameIfMust`を静的にすると、`@typescript-eslint/class-methods-use-this`が発生するが、メソッドが論理的な
|
|
3840
|
-
* 順番通り整理してある。 */
|
|
3841
|
-
onSourceFilesWatcherEmittedFileAddingOrUpdatingEvent(targetFileAbsolutePath) {
|
|
3842
|
-
this.absolutePathOfFilesWaitingForReProcessing.add(targetFileAbsolutePath);
|
|
3843
|
-
if ((0, es_extensions_1.isNotNull)(this.subsequentFilesStateChangeTimeout)) {
|
|
3844
|
-
clearTimeout(this.subsequentFilesStateChangeTimeout);
|
|
3845
|
-
}
|
|
3846
|
-
this.subsequentFilesStateChangeTimeout = setTimeout(() => {
|
|
3847
|
-
this.processAssets(Array.from(this.absolutePathOfFilesWaitingForReProcessing))();
|
|
3848
|
-
this.absolutePathOfFilesWaitingForReProcessing.clear();
|
|
3849
|
-
}, (0, es_extensions_1.secondsToMilliseconds)(this.WAITING_FOR_SUBSEQUENT_FILES_WILL_SAVED_PERIOD__SECONDS));
|
|
3850
|
-
}
|
|
3851
|
-
}
|
|
3852
|
-
exports["default"] = GulpStreamsBasedAssetsProcessor;
|
|
3539
|
+
exports["default"] = GulpStreamsBasedAssetsProcessor;
|
|
3853
3540
|
|
|
3854
3541
|
|
|
3855
3542
|
/***/ }),
|
|
@@ -4110,117 +3797,583 @@ class LinterLikeTaskExecutor extends GulpStreamsBasedTaskExecutor_1.default {
|
|
|
4110
3797
|
};
|
|
4111
3798
|
return Promise.resolve(GulpStreamModifier_1.default.CompletionSignals.PASSING_ON);
|
|
4112
3799
|
}
|
|
4113
|
-
async logNoIssuesFoundInFileEventIfMust(targetSourceFile) {
|
|
4114
|
-
const fileCheckingIssues = Array.isArray(targetSourceFile.lintingResults) ? targetSourceFile.lintingResults : [];
|
|
4115
|
-
es_extensions_1.Logger.logSuccess({
|
|
4116
|
-
mustOutputIf: this.logging.completionWithoutIssues && fileCheckingIssues.length === 0,
|
|
4117
|
-
title: `${this.TASK_TITLE_FOR_LOGGING}, no issues found in the file`,
|
|
4118
|
-
description: `Path: ${es_extensions_nodejs_1.ImprovedPath.replacePathSeparatorsToForwardSlashes(targetSourceFile.relative)}`
|
|
4119
|
-
});
|
|
4120
|
-
return Promise.resolve(GulpStreamModifier_1.default.CompletionSignals.PASSING_ON);
|
|
3800
|
+
async logNoIssuesFoundInFileEventIfMust(targetSourceFile) {
|
|
3801
|
+
const fileCheckingIssues = Array.isArray(targetSourceFile.lintingResults) ? targetSourceFile.lintingResults : [];
|
|
3802
|
+
es_extensions_1.Logger.logSuccess({
|
|
3803
|
+
mustOutputIf: this.logging.completionWithoutIssues && fileCheckingIssues.length === 0,
|
|
3804
|
+
title: `${this.TASK_TITLE_FOR_LOGGING}, no issues found in the file`,
|
|
3805
|
+
description: `Path: ${es_extensions_nodejs_1.ImprovedPath.replacePathSeparatorsToForwardSlashes(targetSourceFile.relative)}`
|
|
3806
|
+
});
|
|
3807
|
+
return Promise.resolve(GulpStreamModifier_1.default.CompletionSignals.PASSING_ON);
|
|
3808
|
+
}
|
|
3809
|
+
reportCheckingIssues() {
|
|
3810
|
+
const hasAtLeastOneCheckingIssueBeenFound = Object.values(this.sourceFilesCheckingCachedResults.files).some((checkingResult) => (0, es_extensions_1.isNotUndefined)(checkingResult) && checkingResult.issues.length > 0);
|
|
3811
|
+
if (hasAtLeastOneCheckingIssueBeenFound) {
|
|
3812
|
+
const issuesFormattedLogs = [];
|
|
3813
|
+
for (const [fileRelativePath, lintingResult] of Object.entries(this.sourceFilesCheckingCachedResults.files)) {
|
|
3814
|
+
if ((0, es_extensions_1.isUndefined)(lintingResult) || lintingResult.issues.length === 0) {
|
|
3815
|
+
continue;
|
|
3816
|
+
}
|
|
3817
|
+
issuesFormattedLogs.push(`■ ${fileRelativePath}: ${lintingResult.issues.length} issue(s)` +
|
|
3818
|
+
`\n${this.formatIssuesOfSingleFile(lintingResult)}`);
|
|
3819
|
+
}
|
|
3820
|
+
es_extensions_1.Logger.logErrorLikeMessage({
|
|
3821
|
+
title: `${this.TASK_TITLE_FOR_LOGGING}, issue(s) found`,
|
|
3822
|
+
description: `\n${issuesFormattedLogs.join("\n\n")}`
|
|
3823
|
+
});
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3826
|
+
onStreamEnded() {
|
|
3827
|
+
if (this.isFirstGulpPipelinePass) {
|
|
3828
|
+
/* [ Theory ] Some files could be deleted or ignored during YDA has been stopped. */
|
|
3829
|
+
this.sourceFilesCheckingCachedResults.files =
|
|
3830
|
+
this.relativePathsOfFoundFilesMentionedInCache.size > 0 ?
|
|
3831
|
+
Array.from(Object.entries(this.sourceFilesCheckingCachedResults.files)).reduce((actualSourceFilesCheckingResults, [sourceFileRelativePath, cachedLintingResult]) => {
|
|
3832
|
+
if (this.relativePathsOfFoundFilesMentionedInCache.has(sourceFileRelativePath)) {
|
|
3833
|
+
actualSourceFilesCheckingResults[sourceFileRelativePath] = cachedLintingResult;
|
|
3834
|
+
}
|
|
3835
|
+
return actualSourceFilesCheckingResults;
|
|
3836
|
+
}, {}) :
|
|
3837
|
+
this.sourceFilesCheckingCachedResults.files;
|
|
3838
|
+
this.relativePathsOfFoundFilesMentionedInCache.clear();
|
|
3839
|
+
this.isFirstGulpPipelinePass = false;
|
|
3840
|
+
}
|
|
3841
|
+
this.reportCheckingIssuesAndOutputCacheToFile();
|
|
3842
|
+
}
|
|
3843
|
+
reportCheckingIssuesAndOutputCacheToFile() {
|
|
3844
|
+
this.reportCheckingIssues();
|
|
3845
|
+
es_extensions_nodejs_1.ImprovedFileSystem.writeFileToPossiblyNotExistingDirectory({
|
|
3846
|
+
filePath: this.ABSOLUTE_PATH_OF_FILE_WITH_CACHED_RESULTS_OF_SOURCE_FILES_CHECKING,
|
|
3847
|
+
content: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(this.sourceFilesCheckingCachedResults),
|
|
3848
|
+
synchronously: true
|
|
3849
|
+
});
|
|
3850
|
+
}
|
|
3851
|
+
/* eslint-enable @typescript-eslint/member-ordering */
|
|
3852
|
+
/* eslint-disable @typescript-eslint/member-ordering --
|
|
3853
|
+
* From now, the members has been organized by semantic groups. */
|
|
3854
|
+
/* ━━━ File watcher handlers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
|
|
3855
|
+
/* ─── Adding & updating ────────────────────────────────────────────────────────────────────────────────────────── */
|
|
3856
|
+
absolutePathsOfAddedOrUpdatedFiles = new Set();
|
|
3857
|
+
waitingForSubsequentFileWillBeAddedOrUpdatedTimer = null;
|
|
3858
|
+
WAITING_FOR_SUBSEQUENT_FILE_WILL_BE_ADDED_OR_UPDATED_PERIOD__SECONDS = 1;
|
|
3859
|
+
onFileHasBeenAddedOrUpdated(targetFileAbsolutePath) {
|
|
3860
|
+
if (!es_extensions_nodejs_1.ImprovedGlob.isFilePathMatchingWithAllGlobSelectors({
|
|
3861
|
+
filePath: targetFileAbsolutePath,
|
|
3862
|
+
globSelectors: this.targetFilesGlobSelectors
|
|
3863
|
+
})) {
|
|
3864
|
+
return;
|
|
3865
|
+
}
|
|
3866
|
+
clearTimeout((0, es_extensions_1.nullToUndefined)(this.waitingForSubsequentFileWillBeAddedOrUpdatedTimer));
|
|
3867
|
+
this.absolutePathsOfAddedOrUpdatedFiles.add(targetFileAbsolutePath);
|
|
3868
|
+
this.waitingForSubsequentFileWillBeAddedOrUpdatedTimer = setTimeout(() => {
|
|
3869
|
+
this.checkFiles(Array.from(this.absolutePathsOfAddedOrUpdatedFiles))();
|
|
3870
|
+
this.absolutePathsOfAddedOrUpdatedFiles.clear();
|
|
3871
|
+
}, (0, es_extensions_1.secondsToMilliseconds)(this.WAITING_FOR_SUBSEQUENT_FILE_WILL_BE_ADDED_OR_UPDATED_PERIOD__SECONDS));
|
|
3872
|
+
}
|
|
3873
|
+
/* ─── Deleting ─────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
3874
|
+
relativePathsOfFilesToDelete = new Set();
|
|
3875
|
+
waitingForSubsequentFileWillBeDeletedTimer = null;
|
|
3876
|
+
static WAITING_FOR_SUBSEQUENT_FILE_WILL_BE_DELETED_PERIOD__SECONDS = 1;
|
|
3877
|
+
onFileHasBeenDeleted(targetFileAbsolutePath) {
|
|
3878
|
+
if (!es_extensions_nodejs_1.ImprovedGlob.isFilePathMatchingWithAllGlobSelectors({
|
|
3879
|
+
filePath: targetFileAbsolutePath,
|
|
3880
|
+
globSelectors: this.targetFilesGlobSelectors
|
|
3881
|
+
})) {
|
|
3882
|
+
return;
|
|
3883
|
+
}
|
|
3884
|
+
clearTimeout((0, es_extensions_1.nullToUndefined)(this.waitingForSubsequentFileWillBeDeletedTimer));
|
|
3885
|
+
this.relativePathsOfFilesToDelete.add(es_extensions_nodejs_1.ImprovedPath.computeRelativePath({
|
|
3886
|
+
basePath: this.projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
|
|
3887
|
+
comparedPath: targetFileAbsolutePath,
|
|
3888
|
+
alwaysForwardSlashSeparators: true
|
|
3889
|
+
}));
|
|
3890
|
+
this.waitingForSubsequentFileWillBeDeletedTimer = setTimeout(() => {
|
|
3891
|
+
for (const fileRelativePath of this.relativePathsOfFilesToDelete) {
|
|
3892
|
+
/* eslint-disable-next-line @typescript-eslint/no-dynamic-delete --
|
|
3893
|
+
* The recommended by @typescript-eslint alternative is switching of "cachedLintingResults" to Map.
|
|
3894
|
+
* However, the Map could not be converted to JSON what causes the additional routines with reading and
|
|
3895
|
+
* writing of linting cache file. */
|
|
3896
|
+
delete this.sourceFilesCheckingCachedResults.files[fileRelativePath];
|
|
3897
|
+
}
|
|
3898
|
+
this.reportCheckingIssuesAndOutputCacheToFile();
|
|
3899
|
+
}, (0, es_extensions_1.secondsToMilliseconds)(LinterLikeTaskExecutor.WAITING_FOR_SUBSEQUENT_FILE_WILL_BE_DELETED_PERIOD__SECONDS));
|
|
3900
|
+
}
|
|
3901
|
+
}
|
|
3902
|
+
exports["default"] = LinterLikeTaskExecutor;
|
|
3903
|
+
|
|
3904
|
+
|
|
3905
|
+
/***/ }),
|
|
3906
|
+
|
|
3907
|
+
/***/ "./ProjectBuilding/Common/VinylFiles/AssetVinylFile.ts":
|
|
3908
|
+
/*!*************************************************************!*\
|
|
3909
|
+
!*** ./ProjectBuilding/Common/VinylFiles/AssetVinylFile.ts ***!
|
|
3910
|
+
\*************************************************************/
|
|
3911
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3912
|
+
|
|
3913
|
+
|
|
3914
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3915
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3916
|
+
};
|
|
3917
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3918
|
+
/* ─── Settings representatives ──────────────────────────────────────────────────────────────────────────────────── */
|
|
3919
|
+
const AssetsProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative */ "./ProjectBuilding/Common/SettingsRepresentatives/AssetsProcessingSettingsRepresentative.ts"));
|
|
3920
|
+
const VinylFileClass_1 = __importDefault(__webpack_require__(/*! @Utils/VinylFileClass */ "./Utils/VinylFileClass.ts"));
|
|
3921
|
+
/* ─── Utils ─────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
3922
|
+
const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
|
|
3923
|
+
class AssetVinylFile extends VinylFileClass_1.default {
|
|
3924
|
+
sourceAbsolutePath;
|
|
3925
|
+
outputDirectoryAbsolutePath;
|
|
3926
|
+
actualAssetsGroupSettings;
|
|
3927
|
+
constructor({ initialPlainVinylFile, actualAssetsGroupSettings }) {
|
|
3928
|
+
super({
|
|
3929
|
+
explicitlySpecifiedPathPart: initialPlainVinylFile.base,
|
|
3930
|
+
path: initialPlainVinylFile.path,
|
|
3931
|
+
contents: Buffer.isBuffer(initialPlainVinylFile.contents) ? initialPlainVinylFile.contents : Buffer.from("")
|
|
3932
|
+
});
|
|
3933
|
+
this.sourceAbsolutePath = es_extensions_nodejs_1.ImprovedPath.replacePathSeparatorsToForwardSlashes(initialPlainVinylFile.path);
|
|
3934
|
+
this.actualAssetsGroupSettings = actualAssetsGroupSettings;
|
|
3935
|
+
this.outputDirectoryAbsolutePath = AssetsProcessingSettingsRepresentative_1.default.
|
|
3936
|
+
computeRelevantOutputDirectoryAbsolutePathForTargetSourceFile({
|
|
3937
|
+
targetSourceFileAbsolutePath: this.sourceAbsolutePath,
|
|
3938
|
+
relevantAssetsGroupNormalizedSettings: this.actualAssetsGroupSettings
|
|
3939
|
+
});
|
|
3940
|
+
}
|
|
3941
|
+
}
|
|
3942
|
+
exports["default"] = AssetVinylFile;
|
|
3943
|
+
|
|
3944
|
+
|
|
3945
|
+
/***/ }),
|
|
3946
|
+
|
|
3947
|
+
/***/ "./ProjectBuilding/FilesWatching/FilesWatchingRestrictions.ts":
|
|
3948
|
+
/*!********************************************************************!*\
|
|
3949
|
+
!*** ./ProjectBuilding/FilesWatching/FilesWatchingRestrictions.ts ***!
|
|
3950
|
+
\********************************************************************/
|
|
3951
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
3952
|
+
|
|
3953
|
+
|
|
3954
|
+
/* eslint-disable no-inline-comments, @stylistic/no-multi-spaces -- Will comment with which technology each exclusion related. */
|
|
3955
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3956
|
+
exports["default"] = {
|
|
3957
|
+
relativePathsOfExcludeFiles: [
|
|
3958
|
+
"package-lock.json", // NPM
|
|
3959
|
+
"yarn.lock" // Yarn, the third-party package manager
|
|
3960
|
+
],
|
|
3961
|
+
relativePathsOfExcludeDirectories: [
|
|
3962
|
+
".git", // Git, the Version Control System (VSC
|
|
3963
|
+
".github", // GitHub, the Code Sharing Service
|
|
3964
|
+
".idea", // IntelliJ IDEA, The IDEs Family
|
|
3965
|
+
".nuxt", // Nuxt.js, the JavaScript framework
|
|
3966
|
+
".run", // .NET
|
|
3967
|
+
".vs", // Visual Studio IDE
|
|
3968
|
+
".vscode", // Visual Studio Code, the Code editor
|
|
3969
|
+
".yda", // Yamato Daiwa Automation
|
|
3970
|
+
"node_modules" // Node.js
|
|
3971
|
+
]
|
|
3972
|
+
};
|
|
3973
|
+
|
|
3974
|
+
|
|
3975
|
+
/***/ }),
|
|
3976
|
+
|
|
3977
|
+
/***/ "./ProjectBuilding/FilesWatching/FilesWatchingSettingsNormalizer.ts":
|
|
3978
|
+
/*!**************************************************************************!*\
|
|
3979
|
+
!*** ./ProjectBuilding/FilesWatching/FilesWatchingSettingsNormalizer.ts ***!
|
|
3980
|
+
\**************************************************************************/
|
|
3981
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3982
|
+
|
|
3983
|
+
|
|
3984
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3985
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3986
|
+
};
|
|
3987
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3988
|
+
/* ─── Restrictions ───────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
3989
|
+
const FilesWatchingRestrictions_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/FilesWatchingRestrictions */ "./ProjectBuilding/FilesWatching/FilesWatchingRestrictions.ts"));
|
|
3990
|
+
/* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
3991
|
+
const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
|
|
3992
|
+
class FilesWatchingSettingsNormalizer {
|
|
3993
|
+
static normalize({ filesWatchingSettings__fromFile__rawValid, projectBuilderCommonSettings__normalized }) {
|
|
3994
|
+
return {
|
|
3995
|
+
excludedFilesGlobSelectors: new Set([
|
|
3996
|
+
...FilesWatchingRestrictions_1.default.relativePathsOfExcludeFiles,
|
|
3997
|
+
...filesWatchingSettings__fromFile__rawValid?.relativePathsOfExcludeFiles ?? []
|
|
3998
|
+
].
|
|
3999
|
+
map((directoryRelativePath) => es_extensions_nodejs_1.ImprovedGlob.includingGlobSelectorToExcludingOne(es_extensions_nodejs_1.ImprovedPath.joinPathSegments([projectBuilderCommonSettings__normalized.projectRootDirectoryAbsolutePath, directoryRelativePath], { alwaysForwardSlashSeparators: true })))),
|
|
4000
|
+
excludedDirectoriesGlobSelectors: new Set([
|
|
4001
|
+
...FilesWatchingRestrictions_1.default.relativePathsOfExcludeDirectories,
|
|
4002
|
+
...filesWatchingSettings__fromFile__rawValid?.relativePathsOfExcludeDirectories ?? []
|
|
4003
|
+
].
|
|
4004
|
+
map((directoryRelativePath) => es_extensions_nodejs_1.ImprovedGlob.buildExcludingOfDirectoryWithSubdirectoriesGlobSelector(es_extensions_nodejs_1.ImprovedPath.joinPathSegments([projectBuilderCommonSettings__normalized.projectRootDirectoryAbsolutePath, directoryRelativePath], { alwaysForwardSlashSeparators: true }))))
|
|
4005
|
+
};
|
|
4006
|
+
}
|
|
4007
|
+
}
|
|
4008
|
+
exports["default"] = FilesWatchingSettingsNormalizer;
|
|
4009
|
+
|
|
4010
|
+
|
|
4011
|
+
/***/ }),
|
|
4012
|
+
|
|
4013
|
+
/***/ "./ProjectBuilding/FilesWatching/FilesWatchingSettingsRepresentative.ts":
|
|
4014
|
+
/*!******************************************************************************!*\
|
|
4015
|
+
!*** ./ProjectBuilding/FilesWatching/FilesWatchingSettingsRepresentative.ts ***!
|
|
4016
|
+
\******************************************************************************/
|
|
4017
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
4018
|
+
|
|
4019
|
+
|
|
4020
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4021
|
+
class FilesWatchingSettingsRepresentative {
|
|
4022
|
+
mustProvideFilesWatching;
|
|
4023
|
+
fileWatchingSettings;
|
|
4024
|
+
constructor(fileWatchingSettings, projectBuildingMasterConfigRepresentative) {
|
|
4025
|
+
this.fileWatchingSettings = fileWatchingSettings;
|
|
4026
|
+
this.mustProvideFilesWatching = projectBuildingMasterConfigRepresentative.mustProvideIncrementalBuilding;
|
|
4027
|
+
}
|
|
4028
|
+
get exclusiveGlobsOfExcludedFilesAndDirectories() {
|
|
4029
|
+
return [
|
|
4030
|
+
...Array.from(this.fileWatchingSettings.excludedFilesGlobSelectors),
|
|
4031
|
+
...Array.from(this.fileWatchingSettings.excludedDirectoriesGlobSelectors)
|
|
4032
|
+
];
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
exports["default"] = FilesWatchingSettingsRepresentative;
|
|
4036
|
+
|
|
4037
|
+
|
|
4038
|
+
/***/ }),
|
|
4039
|
+
|
|
4040
|
+
/***/ "./ProjectBuilding/FilesWatching/FilesWatchingSettings__FromFile__RawValid.ts":
|
|
4041
|
+
/*!************************************************************************************!*\
|
|
4042
|
+
!*** ./ProjectBuilding/FilesWatching/FilesWatchingSettings__FromFile__RawValid.ts ***!
|
|
4043
|
+
\************************************************************************************/
|
|
4044
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
4045
|
+
|
|
4046
|
+
|
|
4047
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4048
|
+
var FilesWatchingSettings__FromFile__RawValid;
|
|
4049
|
+
(function (FilesWatchingSettings__FromFile__RawValid) {
|
|
4050
|
+
function getLocalizedPropertiesSpecification(filesWatchingSettingsLocalization) {
|
|
4051
|
+
return {
|
|
4052
|
+
[filesWatchingSettingsLocalization.relativePathsOfExcludeFiles.KEY]: {
|
|
4053
|
+
newName: "relativePathsOfExcludeFiles",
|
|
4054
|
+
type: Array,
|
|
4055
|
+
required: false,
|
|
4056
|
+
element: {
|
|
4057
|
+
type: String,
|
|
4058
|
+
minimalCharactersCount: 1
|
|
4059
|
+
}
|
|
4060
|
+
},
|
|
4061
|
+
[filesWatchingSettingsLocalization.relativePathsOfExcludeDirectories.KEY]: {
|
|
4062
|
+
newName: "relativePathsOfExcludeDirectories",
|
|
4063
|
+
type: Array,
|
|
4064
|
+
required: false,
|
|
4065
|
+
element: {
|
|
4066
|
+
type: String,
|
|
4067
|
+
minimalCharactersCount: 1
|
|
4068
|
+
}
|
|
4069
|
+
}
|
|
4070
|
+
};
|
|
4071
|
+
}
|
|
4072
|
+
FilesWatchingSettings__FromFile__RawValid.getLocalizedPropertiesSpecification = getLocalizedPropertiesSpecification;
|
|
4073
|
+
})(FilesWatchingSettings__FromFile__RawValid || (FilesWatchingSettings__FromFile__RawValid = {}));
|
|
4074
|
+
exports["default"] = FilesWatchingSettings__FromFile__RawValid;
|
|
4075
|
+
|
|
4076
|
+
|
|
4077
|
+
/***/ }),
|
|
4078
|
+
|
|
4079
|
+
/***/ "./ProjectBuilding/FilesWatching/Watchers/AssetsSourceFilesWatcher.ts":
|
|
4080
|
+
/*!****************************************************************************!*\
|
|
4081
|
+
!*** ./ProjectBuilding/FilesWatching/Watchers/AssetsSourceFilesWatcher.ts ***!
|
|
4082
|
+
\****************************************************************************/
|
|
4083
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
4084
|
+
|
|
4085
|
+
|
|
4086
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4087
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4088
|
+
};
|
|
4089
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4090
|
+
/* ─── Superclass ─────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
4091
|
+
const FilesPassiveWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesPassiveWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesPassiveWatcher.ts"));
|
|
4092
|
+
/* ─── Related Classes ────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
4093
|
+
const FilesMasterWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts"));
|
|
4094
|
+
/* ─── General Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
4095
|
+
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
4096
|
+
const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
|
|
4097
|
+
class AssetsSourceFilesWatcher extends FilesPassiveWatcher_1.default {
|
|
4098
|
+
onAnyEventRelatedWithActualFiles = {};
|
|
4099
|
+
onFileAddedEventHandlers = {};
|
|
4100
|
+
onFileUpdatedEventHandlers = {};
|
|
4101
|
+
onFileDeletedEventHandlers = {};
|
|
4102
|
+
TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED;
|
|
4103
|
+
TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__LOWERCASE;
|
|
4104
|
+
LOGGER_BADGE_TEXT;
|
|
4105
|
+
constructor({ ID, mustLogEvents, projectBuildingMasterConfigRepresentative, targetFilesNamesExtensionsWithoutLeadingDots, outputFilesGlobSelectors, targetSourceFilesType__singularForm }) {
|
|
4106
|
+
super({
|
|
4107
|
+
ID,
|
|
4108
|
+
targetFilesGlobSelectors: [
|
|
4109
|
+
es_extensions_nodejs_1.ImprovedGlob.buildAllFilesInCurrentDirectoryAndBelowGlobSelector({
|
|
4110
|
+
basicDirectoryPath: projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
|
|
4111
|
+
fileNamesExtensions: targetFilesNamesExtensionsWithoutLeadingDots
|
|
4112
|
+
}),
|
|
4113
|
+
...es_extensions_nodejs_1.ImprovedGlob.includingGlobSelectorsToExcludingOnes(outputFilesGlobSelectors)
|
|
4114
|
+
],
|
|
4115
|
+
mustLogEvents
|
|
4116
|
+
});
|
|
4117
|
+
this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED = (0, es_extensions_1.toUpperCamelCase)(targetSourceFilesType__singularForm);
|
|
4118
|
+
this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__LOWERCASE = (0, es_extensions_1.toLowerCamelCase)(targetSourceFilesType__singularForm);
|
|
4119
|
+
this.LOGGER_BADGE_TEXT = `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} Source Files Watcher Report`;
|
|
4120
|
+
}
|
|
4121
|
+
notifyAboutRelatedFileStateChange(targetFileAbsolutePath__forwardSlashesPathSeparators, eventName) {
|
|
4122
|
+
for (const handler of Object.values(this.onAnyEventRelatedWithActualFiles)) {
|
|
4123
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4124
|
+
}
|
|
4125
|
+
switch (eventName) {
|
|
4126
|
+
case FilesMasterWatcher_1.default.EventsNames.fileAdded: {
|
|
4127
|
+
es_extensions_1.Logger.logInfo({
|
|
4128
|
+
mustOutputIf: this.mustLogEvents,
|
|
4129
|
+
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
4130
|
+
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__LOWERCASE} File Added`,
|
|
4131
|
+
description: targetFileAbsolutePath__forwardSlashesPathSeparators
|
|
4132
|
+
});
|
|
4133
|
+
for (const handler of Object.values(this.onFileAddedEventHandlers)) {
|
|
4134
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4135
|
+
}
|
|
4136
|
+
break;
|
|
4137
|
+
}
|
|
4138
|
+
case FilesMasterWatcher_1.default.EventsNames.fileUpdated: {
|
|
4139
|
+
es_extensions_1.Logger.logInfo({
|
|
4140
|
+
mustOutputIf: this.mustLogEvents,
|
|
4141
|
+
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
4142
|
+
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} File Updated`,
|
|
4143
|
+
description: targetFileAbsolutePath__forwardSlashesPathSeparators
|
|
4144
|
+
});
|
|
4145
|
+
for (const handler of Object.values(this.onFileUpdatedEventHandlers)) {
|
|
4146
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4147
|
+
}
|
|
4148
|
+
break;
|
|
4149
|
+
}
|
|
4150
|
+
case FilesMasterWatcher_1.default.EventsNames.fileDeleted: {
|
|
4151
|
+
es_extensions_1.Logger.logInfo({
|
|
4152
|
+
mustOutputIf: this.mustLogEvents,
|
|
4153
|
+
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
4154
|
+
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} File Deleted`,
|
|
4155
|
+
description: targetFileAbsolutePath__forwardSlashesPathSeparators
|
|
4156
|
+
});
|
|
4157
|
+
for (const handler of Object.values(this.onFileDeletedEventHandlers)) {
|
|
4158
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4159
|
+
}
|
|
4160
|
+
}
|
|
4161
|
+
}
|
|
4162
|
+
}
|
|
4163
|
+
addOnAnyEventRelatedWithActualFilesHandler({ handlerID, handler }) {
|
|
4164
|
+
this.onAnyEventRelatedWithActualFiles[handlerID] = handler;
|
|
4165
|
+
return this;
|
|
4166
|
+
}
|
|
4167
|
+
addOnFileAddedEventHandler({ handlerID, handler }) {
|
|
4168
|
+
this.onFileAddedEventHandlers[handlerID] = handler;
|
|
4169
|
+
return this;
|
|
4170
|
+
}
|
|
4171
|
+
addFileUpdatedEventHandler({ handlerID, handler }) {
|
|
4172
|
+
this.onFileUpdatedEventHandlers[handlerID] = handler;
|
|
4173
|
+
return this;
|
|
4174
|
+
}
|
|
4175
|
+
addOnFileDeletedEventHandler({ handlerID, handler }) {
|
|
4176
|
+
this.onFileDeletedEventHandlers[handlerID] = handler;
|
|
4177
|
+
return this;
|
|
4178
|
+
}
|
|
4179
|
+
}
|
|
4180
|
+
exports["default"] = AssetsSourceFilesWatcher;
|
|
4181
|
+
|
|
4182
|
+
|
|
4183
|
+
/***/ }),
|
|
4184
|
+
|
|
4185
|
+
/***/ "./ProjectBuilding/FilesWatching/Watchers/CodeSourceFilesWatcher.ts":
|
|
4186
|
+
/*!**************************************************************************!*\
|
|
4187
|
+
!*** ./ProjectBuilding/FilesWatching/Watchers/CodeSourceFilesWatcher.ts ***!
|
|
4188
|
+
\**************************************************************************/
|
|
4189
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
4190
|
+
|
|
4191
|
+
|
|
4192
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4193
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4194
|
+
};
|
|
4195
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4196
|
+
/* ─── Superclass ─────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
4197
|
+
const FilesPassiveWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesPassiveWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesPassiveWatcher.ts"));
|
|
4198
|
+
/* ─── Related Classes ────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
4199
|
+
const FilesMasterWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts"));
|
|
4200
|
+
/* ─── General Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
4201
|
+
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
4202
|
+
const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
|
|
4203
|
+
class CodeSourceFilesWatcher extends FilesPassiveWatcher_1.default {
|
|
4204
|
+
onAnyEventRelatedWithActualFiles = {};
|
|
4205
|
+
onAnyRelatedFileAddedEventHandlers = {};
|
|
4206
|
+
onAnyRelatedFileUpdatedEventHandlers = {};
|
|
4207
|
+
onAnyRelatedFileDeletedEventHandlers = {};
|
|
4208
|
+
onEntryPointFileAddedEventHandlers = {};
|
|
4209
|
+
onEntryPointFileUpdatedEventHandlers = {};
|
|
4210
|
+
onEntryPointFileDeletedEventHandlers = {};
|
|
4211
|
+
onNonEntryPointFileAddedEventHandlers = {};
|
|
4212
|
+
onNonEntryPointFileUpdatedEventHandlers = {};
|
|
4213
|
+
onNonEntryPointFileDeletedEventHandlers = {};
|
|
4214
|
+
TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED;
|
|
4215
|
+
TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__LOWERCASE;
|
|
4216
|
+
LOGGER_BADGE_TEXT;
|
|
4217
|
+
constructor({ ID, mustLogEvents, projectBuildingMasterConfigRepresentative, targetFilesNamesExtensionsWithoutLeadingDots, outputFilesGlobSelectors, targetSourceFilesType__singularForm }) {
|
|
4218
|
+
super({
|
|
4219
|
+
ID,
|
|
4220
|
+
targetFilesGlobSelectors: [
|
|
4221
|
+
es_extensions_nodejs_1.ImprovedGlob.buildAllFilesInCurrentDirectoryAndBelowGlobSelector({
|
|
4222
|
+
basicDirectoryPath: projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath,
|
|
4223
|
+
fileNamesExtensions: targetFilesNamesExtensionsWithoutLeadingDots
|
|
4224
|
+
}),
|
|
4225
|
+
...es_extensions_nodejs_1.ImprovedGlob.includingGlobSelectorsToExcludingOnes(outputFilesGlobSelectors)
|
|
4226
|
+
],
|
|
4227
|
+
mustLogEvents
|
|
4228
|
+
});
|
|
4229
|
+
this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED = (0, es_extensions_1.toUpperCamelCase)(targetSourceFilesType__singularForm);
|
|
4230
|
+
this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__LOWERCASE = (0, es_extensions_1.toLowerCamelCase)(targetSourceFilesType__singularForm);
|
|
4231
|
+
this.LOGGER_BADGE_TEXT = `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} source files watcher report`;
|
|
4232
|
+
}
|
|
4233
|
+
addOnAnyEventRelatedWithActualFilesHandler({ handlerID, handler }) {
|
|
4234
|
+
this.onAnyEventRelatedWithActualFiles[handlerID] = handler;
|
|
4235
|
+
return this;
|
|
4236
|
+
}
|
|
4237
|
+
addOnAnyRelatedFileAddedEventHandler({ handlerID, handler }) {
|
|
4238
|
+
this.onAnyRelatedFileAddedEventHandlers[handlerID] = handler;
|
|
4239
|
+
return this;
|
|
4240
|
+
}
|
|
4241
|
+
addOnAnyRelatedFileUpdatedEventHandler({ handlerID, handler }) {
|
|
4242
|
+
this.onAnyRelatedFileUpdatedEventHandlers[handlerID] = handler;
|
|
4243
|
+
return this;
|
|
4244
|
+
}
|
|
4245
|
+
addOnAnyRelatedFileDeletedEventHandler({ handlerID, handler }) {
|
|
4246
|
+
this.onAnyRelatedFileDeletedEventHandlers[handlerID] = handler;
|
|
4247
|
+
return this;
|
|
4248
|
+
}
|
|
4249
|
+
addOnEntryPointFileAddedEventHandler({ handlerID, handler }) {
|
|
4250
|
+
this.onEntryPointFileAddedEventHandlers[handlerID] = handler;
|
|
4251
|
+
return this;
|
|
4252
|
+
}
|
|
4253
|
+
addOnEntryPointFileUpdatedEventHandler({ handlerID, handler }) {
|
|
4254
|
+
this.onEntryPointFileUpdatedEventHandlers[handlerID] = handler;
|
|
4255
|
+
return this;
|
|
4121
4256
|
}
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
const issuesFormattedLogs = [];
|
|
4126
|
-
for (const [fileRelativePath, lintingResult] of Object.entries(this.sourceFilesCheckingCachedResults.files)) {
|
|
4127
|
-
if ((0, es_extensions_1.isUndefined)(lintingResult) || lintingResult.issues.length === 0) {
|
|
4128
|
-
continue;
|
|
4129
|
-
}
|
|
4130
|
-
issuesFormattedLogs.push(`■ ${fileRelativePath}: ${lintingResult.issues.length} issue(s)` +
|
|
4131
|
-
`\n${this.formatIssuesOfSingleFile(lintingResult)}`);
|
|
4132
|
-
}
|
|
4133
|
-
es_extensions_1.Logger.logErrorLikeMessage({
|
|
4134
|
-
title: `${this.TASK_TITLE_FOR_LOGGING}, issue(s) found`,
|
|
4135
|
-
description: `\n${issuesFormattedLogs.join("\n\n")}`
|
|
4136
|
-
});
|
|
4137
|
-
}
|
|
4257
|
+
addOnEntryPointFileDeletedEventHandler({ handlerID, handler }) {
|
|
4258
|
+
this.onEntryPointFileDeletedEventHandlers[handlerID] = handler;
|
|
4259
|
+
return this;
|
|
4138
4260
|
}
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
this.sourceFilesCheckingCachedResults.files =
|
|
4143
|
-
this.relativePathsOfFoundFilesMentionedInCache.size > 0 ?
|
|
4144
|
-
Array.from(Object.entries(this.sourceFilesCheckingCachedResults.files)).reduce((actualSourceFilesCheckingResults, [sourceFileRelativePath, cachedLintingResult]) => {
|
|
4145
|
-
if (this.relativePathsOfFoundFilesMentionedInCache.has(sourceFileRelativePath)) {
|
|
4146
|
-
actualSourceFilesCheckingResults[sourceFileRelativePath] = cachedLintingResult;
|
|
4147
|
-
}
|
|
4148
|
-
return actualSourceFilesCheckingResults;
|
|
4149
|
-
}, {}) :
|
|
4150
|
-
this.sourceFilesCheckingCachedResults.files;
|
|
4151
|
-
this.relativePathsOfFoundFilesMentionedInCache.clear();
|
|
4152
|
-
this.isFirstGulpPipelinePass = false;
|
|
4153
|
-
}
|
|
4154
|
-
this.reportCheckingIssuesAndOutputCacheToFile();
|
|
4261
|
+
addOnNonEntryPointFileAddedEventHandler({ handlerID, handler }) {
|
|
4262
|
+
this.onNonEntryPointFileAddedEventHandlers[handlerID] = handler;
|
|
4263
|
+
return this;
|
|
4155
4264
|
}
|
|
4156
|
-
|
|
4157
|
-
this.
|
|
4158
|
-
|
|
4159
|
-
filePath: this.ABSOLUTE_PATH_OF_FILE_WITH_CACHED_RESULTS_OF_SOURCE_FILES_CHECKING,
|
|
4160
|
-
content: (0, es_extensions_1.stringifyAndFormatArbitraryValue)(this.sourceFilesCheckingCachedResults),
|
|
4161
|
-
synchronously: true
|
|
4162
|
-
});
|
|
4265
|
+
addOnNonEntryPointFileUpdatedEventHandler({ handlerID, handler }) {
|
|
4266
|
+
this.onNonEntryPointFileUpdatedEventHandlers[handlerID] = handler;
|
|
4267
|
+
return this;
|
|
4163
4268
|
}
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
/* ━━━ File watcher handlers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
|
|
4168
|
-
/* ─── Adding & updating ────────────────────────────────────────────────────────────────────────────────────────── */
|
|
4169
|
-
absolutePathsOfAddedOrUpdatedFiles = new Set();
|
|
4170
|
-
waitingForSubsequentFileWillBeAddedOrUpdatedTimer = null;
|
|
4171
|
-
WAITING_FOR_SUBSEQUENT_FILE_WILL_BE_ADDED_OR_UPDATED_PERIOD__SECONDS = 1;
|
|
4172
|
-
onFileHasBeenAddedOrUpdated(targetFileAbsolutePath) {
|
|
4173
|
-
if (!es_extensions_nodejs_1.ImprovedGlob.isFilePathMatchingWithAllGlobSelectors({
|
|
4174
|
-
filePath: targetFileAbsolutePath,
|
|
4175
|
-
globSelectors: this.targetFilesGlobSelectors
|
|
4176
|
-
})) {
|
|
4177
|
-
return;
|
|
4178
|
-
}
|
|
4179
|
-
clearTimeout((0, es_extensions_1.nullToUndefined)(this.waitingForSubsequentFileWillBeAddedOrUpdatedTimer));
|
|
4180
|
-
this.absolutePathsOfAddedOrUpdatedFiles.add(targetFileAbsolutePath);
|
|
4181
|
-
this.waitingForSubsequentFileWillBeAddedOrUpdatedTimer = setTimeout(() => {
|
|
4182
|
-
this.checkFiles(Array.from(this.absolutePathsOfAddedOrUpdatedFiles))();
|
|
4183
|
-
this.absolutePathsOfAddedOrUpdatedFiles.clear();
|
|
4184
|
-
}, (0, es_extensions_1.secondsToMilliseconds)(this.WAITING_FOR_SUBSEQUENT_FILE_WILL_BE_ADDED_OR_UPDATED_PERIOD__SECONDS));
|
|
4269
|
+
addOnNonEntryPointFileDeletedEventHandler({ handlerID, handler }) {
|
|
4270
|
+
this.onNonEntryPointFileDeletedEventHandlers[handlerID] = handler;
|
|
4271
|
+
return this;
|
|
4185
4272
|
}
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
onFileHasBeenDeleted(targetFileAbsolutePath) {
|
|
4191
|
-
if (!es_extensions_nodejs_1.ImprovedGlob.isFilePathMatchingWithAllGlobSelectors({
|
|
4192
|
-
filePath: targetFileAbsolutePath,
|
|
4193
|
-
globSelectors: this.targetFilesGlobSelectors
|
|
4194
|
-
})) {
|
|
4195
|
-
return;
|
|
4273
|
+
notifyAboutRelatedFileStateChange(targetFileAbsolutePath__forwardSlashesPathSeparators, eventName) {
|
|
4274
|
+
const isTargetFileTheEntryPoint = this.isFileAbsolutePathOfEntryPoint(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4275
|
+
for (const handler of Object.values(this.onAnyEventRelatedWithActualFiles)) {
|
|
4276
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4196
4277
|
}
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4278
|
+
switch (eventName) {
|
|
4279
|
+
case FilesMasterWatcher_1.default.EventsNames.fileAdded: {
|
|
4280
|
+
for (const handler of Object.values(this.onAnyRelatedFileAddedEventHandlers)) {
|
|
4281
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4282
|
+
}
|
|
4283
|
+
if (isTargetFileTheEntryPoint) {
|
|
4284
|
+
es_extensions_1.Logger.logInfo({
|
|
4285
|
+
mustOutputIf: this.mustLogEvents,
|
|
4286
|
+
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
4287
|
+
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__LOWERCASE} Entry Point Source File Added`,
|
|
4288
|
+
description: targetFileAbsolutePath__forwardSlashesPathSeparators
|
|
4289
|
+
});
|
|
4290
|
+
for (const handler of Object.values(this.onEntryPointFileAddedEventHandlers)) {
|
|
4291
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4292
|
+
}
|
|
4293
|
+
}
|
|
4294
|
+
else {
|
|
4295
|
+
es_extensions_1.Logger.logInfo({
|
|
4296
|
+
mustOutputIf: this.mustLogEvents,
|
|
4297
|
+
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
4298
|
+
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__LOWERCASE} Partial Source File Added`,
|
|
4299
|
+
description: targetFileAbsolutePath__forwardSlashesPathSeparators
|
|
4300
|
+
});
|
|
4301
|
+
for (const handler of Object.values(this.onNonEntryPointFileAddedEventHandlers)) {
|
|
4302
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4303
|
+
}
|
|
4304
|
+
}
|
|
4305
|
+
break;
|
|
4210
4306
|
}
|
|
4211
|
-
|
|
4212
|
-
|
|
4307
|
+
case FilesMasterWatcher_1.default.EventsNames.fileUpdated: {
|
|
4308
|
+
for (const handler of Object.values(this.onAnyRelatedFileUpdatedEventHandlers)) {
|
|
4309
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4310
|
+
}
|
|
4311
|
+
if (isTargetFileTheEntryPoint) {
|
|
4312
|
+
es_extensions_1.Logger.logInfo({
|
|
4313
|
+
mustOutputIf: this.mustLogEvents,
|
|
4314
|
+
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
4315
|
+
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} Entry Point Source File Updated`,
|
|
4316
|
+
description: targetFileAbsolutePath__forwardSlashesPathSeparators
|
|
4317
|
+
});
|
|
4318
|
+
for (const handler of Object.values(this.onEntryPointFileUpdatedEventHandlers)) {
|
|
4319
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4320
|
+
}
|
|
4321
|
+
}
|
|
4322
|
+
else {
|
|
4323
|
+
es_extensions_1.Logger.logInfo({
|
|
4324
|
+
mustOutputIf: this.mustLogEvents,
|
|
4325
|
+
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
4326
|
+
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} Partial Source File Updated`,
|
|
4327
|
+
description: targetFileAbsolutePath__forwardSlashesPathSeparators
|
|
4328
|
+
});
|
|
4329
|
+
for (const handler of Object.values(this.onNonEntryPointFileUpdatedEventHandlers)) {
|
|
4330
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4331
|
+
}
|
|
4332
|
+
}
|
|
4333
|
+
break;
|
|
4334
|
+
}
|
|
4335
|
+
case FilesMasterWatcher_1.default.EventsNames.fileDeleted: {
|
|
4336
|
+
for (const handler of Object.values(this.onAnyRelatedFileDeletedEventHandlers)) {
|
|
4337
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4338
|
+
}
|
|
4339
|
+
if (isTargetFileTheEntryPoint) {
|
|
4340
|
+
es_extensions_1.Logger.logInfo({
|
|
4341
|
+
mustOutputIf: this.mustLogEvents,
|
|
4342
|
+
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
4343
|
+
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} Entry Point Source File Deleted`,
|
|
4344
|
+
description: targetFileAbsolutePath__forwardSlashesPathSeparators
|
|
4345
|
+
});
|
|
4346
|
+
for (const handler of Object.values(this.onEntryPointFileDeletedEventHandlers)) {
|
|
4347
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4348
|
+
}
|
|
4349
|
+
}
|
|
4350
|
+
else {
|
|
4351
|
+
es_extensions_1.Logger.logInfo({
|
|
4352
|
+
mustOutputIf: this.mustLogEvents,
|
|
4353
|
+
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
4354
|
+
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} Partial Source File Deleted`,
|
|
4355
|
+
description: targetFileAbsolutePath__forwardSlashesPathSeparators
|
|
4356
|
+
});
|
|
4357
|
+
for (const handler of Object.values(this.onNonEntryPointFileDeletedEventHandlers)) {
|
|
4358
|
+
handler(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4359
|
+
}
|
|
4360
|
+
}
|
|
4361
|
+
}
|
|
4362
|
+
}
|
|
4363
|
+
}
|
|
4364
|
+
isFileAbsolutePathOfEntryPoint(targetFileAbsolutePath__forwardSlashesPathSeparators) {
|
|
4365
|
+
return this.settingsRepresentative.isEntryPoint(targetFileAbsolutePath__forwardSlashesPathSeparators);
|
|
4213
4366
|
}
|
|
4214
4367
|
}
|
|
4215
|
-
exports["default"] =
|
|
4368
|
+
exports["default"] = CodeSourceFilesWatcher;
|
|
4216
4369
|
|
|
4217
4370
|
|
|
4218
4371
|
/***/ }),
|
|
4219
4372
|
|
|
4220
|
-
/***/ "./ProjectBuilding/
|
|
4221
|
-
|
|
4222
|
-
!*** ./ProjectBuilding/
|
|
4223
|
-
|
|
4373
|
+
/***/ "./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts":
|
|
4374
|
+
/*!**********************************************************************!*\
|
|
4375
|
+
!*** ./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts ***!
|
|
4376
|
+
\**********************************************************************/
|
|
4224
4377
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
4225
4378
|
|
|
4226
4379
|
|
|
@@ -4228,31 +4381,100 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4228
4381
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4229
4382
|
};
|
|
4230
4383
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4231
|
-
/* ───
|
|
4232
|
-
const
|
|
4233
|
-
|
|
4234
|
-
|
|
4384
|
+
/* ─── Third-party Solutions Specialises ──────────────────────────────────────────────────────────────────────────── */
|
|
4385
|
+
const ChokidarSpecialist_1 = __importDefault(__webpack_require__(/*! @ThirdPartySolutionsSpecialists/Chokidar/ChokidarSpecialist */ "./ThirdPartySolutionsSpecialists/Chokidar/ChokidarSpecialist.ts"));
|
|
4386
|
+
/* ─── General Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
4387
|
+
const gulp_1 = __importDefault(__webpack_require__(/*! gulp */ "gulp"));
|
|
4235
4388
|
const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
|
|
4236
|
-
class
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4389
|
+
class FilesMasterWatcher {
|
|
4390
|
+
static passiveWatchers = new Set();
|
|
4391
|
+
static watchIfMust(projectBuildingMasterConfigRepresentative) {
|
|
4392
|
+
const filesWatchingSettingsRepresentative = projectBuildingMasterConfigRepresentative.filesWatchingSettingsRepresentative;
|
|
4393
|
+
if (!filesWatchingSettingsRepresentative.mustProvideFilesWatching) {
|
|
4394
|
+
return (callback) => { callback(); };
|
|
4395
|
+
}
|
|
4396
|
+
return (callback) => {
|
|
4397
|
+
gulp_1.default.
|
|
4398
|
+
watch([
|
|
4399
|
+
es_extensions_nodejs_1.ImprovedGlob.buildAllFilesInCurrentDirectoryAndBelowGlobSelector({
|
|
4400
|
+
basicDirectoryPath: projectBuildingMasterConfigRepresentative.consumingProjectRootDirectoryAbsolutePath
|
|
4401
|
+
}),
|
|
4402
|
+
...filesWatchingSettingsRepresentative.exclusiveGlobsOfExcludedFilesAndDirectories
|
|
4403
|
+
]).
|
|
4404
|
+
on("all", FilesMasterWatcher.onAnyChokidarEvent.bind(this));
|
|
4405
|
+
callback();
|
|
4406
|
+
};
|
|
4407
|
+
}
|
|
4408
|
+
static addPassiveWatcher(passiveWatcher) {
|
|
4409
|
+
FilesMasterWatcher.passiveWatchers.add(passiveWatcher);
|
|
4410
|
+
}
|
|
4411
|
+
/* [ Chokidar theory ] While the globs are absolute path based, the second parameter will be the absolute path too. */
|
|
4412
|
+
static onAnyChokidarEvent(chokidarEventName, targetFileOrDirectoryAbsolutePath__operationingSystemDependentPathSeparators) {
|
|
4413
|
+
let eventName;
|
|
4414
|
+
switch (chokidarEventName) {
|
|
4415
|
+
case ChokidarSpecialist_1.default.EventsNames.fileAdded: {
|
|
4416
|
+
eventName = FilesMasterWatcher.EventsNames.fileAdded;
|
|
4417
|
+
break;
|
|
4418
|
+
}
|
|
4419
|
+
case ChokidarSpecialist_1.default.EventsNames.fileChanged: {
|
|
4420
|
+
eventName = FilesMasterWatcher.EventsNames.fileUpdated;
|
|
4421
|
+
break;
|
|
4422
|
+
}
|
|
4423
|
+
case ChokidarSpecialist_1.default.EventsNames.fileDeleted: {
|
|
4424
|
+
eventName = FilesMasterWatcher.EventsNames.fileDeleted;
|
|
4425
|
+
break;
|
|
4426
|
+
}
|
|
4427
|
+
default: {
|
|
4428
|
+
return;
|
|
4429
|
+
}
|
|
4430
|
+
}
|
|
4431
|
+
const targetFileAbsolutePath__forwardSlashesPathSeparators = es_extensions_nodejs_1.ImprovedPath.
|
|
4432
|
+
replacePathSeparatorsToForwardSlashes(targetFileOrDirectoryAbsolutePath__operationingSystemDependentPathSeparators);
|
|
4433
|
+
for (const passiveWatcher of FilesMasterWatcher.passiveWatchers) {
|
|
4434
|
+
if (passiveWatcher.isRelatedFileAbsolutePath(targetFileAbsolutePath__forwardSlashesPathSeparators)) {
|
|
4435
|
+
passiveWatcher.notifyAboutRelatedFileStateChange(targetFileAbsolutePath__forwardSlashesPathSeparators, eventName);
|
|
4436
|
+
}
|
|
4437
|
+
}
|
|
4438
|
+
}
|
|
4439
|
+
}
|
|
4440
|
+
(function (FilesMasterWatcher) {
|
|
4441
|
+
let EventsNames;
|
|
4442
|
+
(function (EventsNames) {
|
|
4443
|
+
EventsNames["fileAdded"] = "FILE_ADDED";
|
|
4444
|
+
EventsNames["fileUpdated"] = "FILE_UPDATED";
|
|
4445
|
+
EventsNames["fileDeleted"] = "FILE_DELETED";
|
|
4446
|
+
})(EventsNames = FilesMasterWatcher.EventsNames || (FilesMasterWatcher.EventsNames = {}));
|
|
4447
|
+
})(FilesMasterWatcher || (FilesMasterWatcher = {}));
|
|
4448
|
+
exports["default"] = FilesMasterWatcher;
|
|
4449
|
+
|
|
4450
|
+
|
|
4451
|
+
/***/ }),
|
|
4452
|
+
|
|
4453
|
+
/***/ "./ProjectBuilding/FilesWatching/Watchers/FilesPassiveWatcher.ts":
|
|
4454
|
+
/*!***********************************************************************!*\
|
|
4455
|
+
!*** ./ProjectBuilding/FilesWatching/Watchers/FilesPassiveWatcher.ts ***!
|
|
4456
|
+
\***********************************************************************/
|
|
4457
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
4458
|
+
|
|
4459
|
+
|
|
4460
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4461
|
+
const es_extensions_nodejs_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions-nodejs */ "@yamato-daiwa/es-extensions-nodejs");
|
|
4462
|
+
class FilesPassiveWatcher {
|
|
4463
|
+
ID;
|
|
4464
|
+
mustLogEvents;
|
|
4465
|
+
targetFilesGlobSelectors;
|
|
4466
|
+
constructor({ ID, targetFilesGlobSelectors, mustLogEvents }) {
|
|
4467
|
+
this.ID = ID;
|
|
4468
|
+
this.targetFilesGlobSelectors = targetFilesGlobSelectors;
|
|
4469
|
+
this.mustLogEvents = mustLogEvents;
|
|
4470
|
+
}
|
|
4471
|
+
isRelatedFileAbsolutePath(targetFilePath) {
|
|
4472
|
+
return es_extensions_nodejs_1.ImprovedGlob.isFilePathMatchingWithAllGlobSelectors({
|
|
4473
|
+
filePath: targetFilePath, globSelectors: this.targetFilesGlobSelectors
|
|
4252
4474
|
});
|
|
4253
4475
|
}
|
|
4254
4476
|
}
|
|
4255
|
-
exports["default"] =
|
|
4477
|
+
exports["default"] = FilesPassiveWatcher;
|
|
4256
4478
|
|
|
4257
4479
|
|
|
4258
4480
|
/***/ }),
|
|
@@ -4770,6 +4992,7 @@ const FontsProcessingRawSettingsNormalizer_1 = __importDefault(__webpack_require
|
|
|
4770
4992
|
const VideosProcessingRawSettingsNormalizer_1 = __importDefault(__webpack_require__(/*! @VideosProcessing/VideosProcessingRawSettingsNormalizer */ "./ProjectBuilding/AssetsProcessing/Videos/VideosProcessingRawSettingsNormalizer.ts"));
|
|
4771
4993
|
const AudiosProcessingRawSettingsNormalizer_1 = __importDefault(__webpack_require__(/*! @AudiosProcessing/AudiosProcessingRawSettingsNormalizer */ "./ProjectBuilding/AssetsProcessing/Audios/AudiosProcessingRawSettingsNormalizer.ts"));
|
|
4772
4994
|
const PlainCopyingRawSettingsNormalizer_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/PlainCopying/PlainCopyingRawSettingsNormalizer */ "./ProjectBuilding/PlainCopying/PlainCopyingRawSettingsNormalizer.ts"));
|
|
4995
|
+
const FilesWatchingSettingsNormalizer_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/FilesWatchingSettingsNormalizer */ "./ProjectBuilding/FilesWatching/FilesWatchingSettingsNormalizer.ts"));
|
|
4773
4996
|
const BrowserLiveReloadingSettingsNormalizer_1 = __importDefault(__webpack_require__(/*! @BrowserLiveReloading/RawSettingsNormalizer/BrowserLiveReloadingSettingsNormalizer */ "./ProjectBuilding/BrowserLiveReloading/RawSettingsNormalizer/BrowserLiveReloadingSettingsNormalizer.ts"));
|
|
4774
4997
|
/* --- Auxiliaries -------------------------------------------------------------------------------------------------- */
|
|
4775
4998
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
@@ -4927,6 +5150,10 @@ class ProjectBuilderRawConfigNormalizer {
|
|
|
4927
5150
|
})
|
|
4928
5151
|
};
|
|
4929
5152
|
})(),
|
|
5153
|
+
filesWatching: FilesWatchingSettingsNormalizer_1.default.normalize({
|
|
5154
|
+
filesWatchingSettings__fromFile__rawValid: projectBuildingConfig__fromFile__rawValid[ProjectBuildingTasksIDsForConfigFile_1.ProjectBuildingTasksIDsForConfigFile.filesWatching],
|
|
5155
|
+
projectBuilderCommonSettings__normalized: commonSettings__normalized
|
|
5156
|
+
}),
|
|
4930
5157
|
...(() => {
|
|
4931
5158
|
const browserLiveReloadingSettings__fromFile__rawValid = projectBuildingConfig__fromFile__rawValid[ProjectBuildingTasksIDsForConfigFile_1.ProjectBuildingTasksIDsForConfigFile.browserLiveReloading];
|
|
4932
5159
|
if ((0, es_extensions_1.isUndefined)(browserLiveReloadingSettings__fromFile__rawValid)) {
|
|
@@ -5013,7 +5240,8 @@ const ProjectBuildingConfigFromFileDefaultLocalization = {
|
|
|
5013
5240
|
audiosProcessing: "audiosProcessing",
|
|
5014
5241
|
videosProcessing: "videosProcessing",
|
|
5015
5242
|
plainCopying: "plainCopying",
|
|
5016
|
-
browserLiveReloading: "browserLiveReloading"
|
|
5243
|
+
browserLiveReloading: "browserLiveReloading",
|
|
5244
|
+
filesWatching: "filesWatching"
|
|
5017
5245
|
},
|
|
5018
5246
|
consumingProjectPreDefinedBuildingModes: {
|
|
5019
5247
|
staticPreview: "STATIC_PREVIEW",
|
|
@@ -5387,6 +5615,10 @@ const ProjectBuildingConfigFromFileDefaultLocalization = {
|
|
|
5387
5615
|
outputDirectoryPathTransformations: { KEY: "outputDirectoryPathTransformations" }
|
|
5388
5616
|
}
|
|
5389
5617
|
},
|
|
5618
|
+
filesWatching: {
|
|
5619
|
+
relativePathsOfExcludeFiles: { KEY: "relativePathsOfExcludeFiles" },
|
|
5620
|
+
relativePathsOfExcludeDirectories: { KEY: "relativePathsOfExcludeDirectories" }
|
|
5621
|
+
},
|
|
5390
5622
|
browserLiveReloading: {
|
|
5391
5623
|
setups: {
|
|
5392
5624
|
KEY: "setups",
|
|
@@ -5446,8 +5678,9 @@ const FontsProcessingSettings__FromFile__RawValid_1 = __importDefault(__webpack_
|
|
|
5446
5678
|
const VideosProcessingSettings__FromFile__RawValid_1 = __importDefault(__webpack_require__(/*! @VideosProcessing/VideosProcessingSettings__FromFile__RawValid */ "./ProjectBuilding/AssetsProcessing/Videos/VideosProcessingSettings__FromFile__RawValid.ts"));
|
|
5447
5679
|
const AudiosProcessingSettings__FromFile__RawValid_1 = __importDefault(__webpack_require__(/*! @AudiosProcessing/AudiosProcessingSettings__FromFile__RawValid */ "./ProjectBuilding/AssetsProcessing/Audios/AudiosProcessingSettings__FromFile__RawValid.ts"));
|
|
5448
5680
|
const PlainCopyingSettings__FromFile__RawValid_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/PlainCopying/PlainCopyingSettings__FromFile__RawValid */ "./ProjectBuilding/PlainCopying/PlainCopyingSettings__FromFile__RawValid.ts"));
|
|
5681
|
+
const FilesWatchingSettings__FromFile__RawValid_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/FilesWatchingSettings__FromFile__RawValid */ "./ProjectBuilding/FilesWatching/FilesWatchingSettings__FromFile__RawValid.ts"));
|
|
5449
5682
|
const BrowserLiveReloadingSettings__FromFile__RawValid_1 = __importDefault(__webpack_require__(/*! @BrowserLiveReloading/BrowserLiveReloadingSettings__FromFile__RawValid */ "./ProjectBuilding/BrowserLiveReloading/BrowserLiveReloadingSettings__FromFile__RawValid.ts"));
|
|
5450
|
-
/* ───
|
|
5683
|
+
/* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
5451
5684
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
5452
5685
|
var ProjectBuildingConfig__FromFile__RawValid;
|
|
5453
5686
|
(function (ProjectBuildingConfig__FromFile__RawValid) {
|
|
@@ -5586,6 +5819,13 @@ var ProjectBuildingConfig__FromFile__RawValid;
|
|
|
5586
5819
|
outputDirectoryPathTransformationsPropertiesLocalizedSpecification
|
|
5587
5820
|
})
|
|
5588
5821
|
},
|
|
5822
|
+
[localization.enumerations.tasksIDs.filesWatching]: {
|
|
5823
|
+
newName: "filesWatching",
|
|
5824
|
+
type: Object,
|
|
5825
|
+
required: false,
|
|
5826
|
+
preValidationModifications: es_extensions_1.nullToUndefined,
|
|
5827
|
+
properties: FilesWatchingSettings__FromFile__RawValid_1.default.getLocalizedPropertiesSpecification(localization.tasks.filesWatching)
|
|
5828
|
+
},
|
|
5589
5829
|
[localization.enumerations.tasksIDs.browserLiveReloading]: {
|
|
5590
5830
|
newName: "browserLiveReloading",
|
|
5591
5831
|
type: Object,
|
|
@@ -5628,6 +5868,7 @@ const FontsProcessingSettingsRepresentative_1 = __importDefault(__webpack_requir
|
|
|
5628
5868
|
const AudiosProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @AudiosProcessing/AudiosProcessingSettingsRepresentative */ "./ProjectBuilding/AssetsProcessing/Audios/AudiosProcessingSettingsRepresentative.ts"));
|
|
5629
5869
|
const VideosProcessingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @VideosProcessing/VideosProcessingSettingsRepresentative */ "./ProjectBuilding/AssetsProcessing/Videos/VideosProcessingSettingsRepresentative.ts"));
|
|
5630
5870
|
const PlainCopyingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/PlainCopying/PlainCopyingSettingsRepresentative */ "./ProjectBuilding/PlainCopying/PlainCopyingSettingsRepresentative.ts"));
|
|
5871
|
+
const FilesWatchingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/FilesWatchingSettingsRepresentative */ "./ProjectBuilding/FilesWatching/FilesWatchingSettingsRepresentative.ts"));
|
|
5631
5872
|
const BrowserLiveReloadingSettingsRepresentative_1 = __importDefault(__webpack_require__(/*! @BrowserLiveReloading/BrowserLiveReloadingSettingsRepresentative */ "./ProjectBuilding/BrowserLiveReloading/BrowserLiveReloadingSettingsRepresentative.ts"));
|
|
5632
5873
|
/* --- General auxiliaries ------------------------------------------------------------------------------------------ */
|
|
5633
5874
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
@@ -5641,6 +5882,7 @@ class ProjectBuildingMasterConfigRepresentative {
|
|
|
5641
5882
|
audiosProcessingSettingsRepresentative;
|
|
5642
5883
|
videosProcessingSettingsRepresentative;
|
|
5643
5884
|
plainCopyingSettingsRepresentative;
|
|
5885
|
+
filesWatchingSettingsRepresentative;
|
|
5644
5886
|
browserLiveReloadingSettingsRepresentative;
|
|
5645
5887
|
commonSettings;
|
|
5646
5888
|
static initializeAndGetInstance(projectBuilderConfig__normalized) {
|
|
@@ -5683,6 +5925,8 @@ class ProjectBuildingMasterConfigRepresentative {
|
|
|
5683
5925
|
if ((0, es_extensions_1.isNotUndefined)(projectBuilderNormalizedConfig.plainCopying)) {
|
|
5684
5926
|
this.plainCopyingSettingsRepresentative = new PlainCopyingSettingsRepresentative_1.default(projectBuilderNormalizedConfig.plainCopying);
|
|
5685
5927
|
}
|
|
5928
|
+
this.filesWatchingSettingsRepresentative =
|
|
5929
|
+
new FilesWatchingSettingsRepresentative_1.default(projectBuilderNormalizedConfig.filesWatching, this);
|
|
5686
5930
|
if ((0, es_extensions_1.isNotUndefined)(projectBuilderNormalizedConfig.browserLiveReloading)) {
|
|
5687
5931
|
this.browserLiveReloadingSettingsRepresentative = new BrowserLiveReloadingSettingsRepresentative_1.default(projectBuilderNormalizedConfig.browserLiveReloading);
|
|
5688
5932
|
}
|
|
@@ -5756,7 +6000,7 @@ class ProjectBuildingMasterConfigRepresentative {
|
|
|
5756
6000
|
/* eslint-enable @stylistic/brace-style */
|
|
5757
6001
|
/* --- Other ------------------------------------------------------------------------------------------------------ */
|
|
5758
6002
|
get mustProvideIncrementalBuilding() {
|
|
5759
|
-
return this.
|
|
6003
|
+
return this.commonSettings.mustProvideIncrementalBuilding;
|
|
5760
6004
|
}
|
|
5761
6005
|
}
|
|
5762
6006
|
exports["default"] = ProjectBuildingMasterConfigRepresentative;
|
|
@@ -6345,8 +6589,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6345
6589
|
};
|
|
6346
6590
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6347
6591
|
const ECMA_ScriptLogicProcessingSharedState_1 = __importDefault(__webpack_require__(/*! @ECMA_ScriptProcessing/ECMA_ScriptLogicProcessingSharedState */ "./ProjectBuilding/SourceCodeProcessing/ECMA_Script/ECMA_ScriptLogicProcessingSharedState.ts"));
|
|
6348
|
-
/* ─── Shared State ───────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
6349
|
-
const CommonSharedState_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/CommonSharedState */ "./ProjectBuilding/Common/CommonSharedState.ts"));
|
|
6350
6592
|
/* ─── Applied Utils ──────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
6351
6593
|
const webpack_1 = __importDefault(__webpack_require__(/*! webpack */ "webpack"));
|
|
6352
6594
|
const WebpackConfigGenerator_1 = __importDefault(__webpack_require__(/*! @ECMA_ScriptProcessing/Utils/WebpackConfigGenerator */ "./ProjectBuilding/SourceCodeProcessing/ECMA_Script/Utils/WebpackConfigGenerator.ts"));
|
|
@@ -6395,16 +6637,10 @@ class ECMA_ScriptLogicProcessor {
|
|
|
6395
6637
|
});
|
|
6396
6638
|
}
|
|
6397
6639
|
if (dataHoldingSelfInstance.masterConfigRepresentative.mustProvideIncrementalBuilding) {
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
initializeIfRequiredAndGetInstance({
|
|
6403
|
-
ecmaScriptLogicProcessingSettingsRepresentative: dataHoldingSelfInstance.
|
|
6404
|
-
ECMA_ScriptLogicProcessingConfigRepresentative,
|
|
6405
|
-
projectBuildingMasterConfigRepresentative: dataHoldingSelfInstance.masterConfigRepresentative
|
|
6406
|
-
}).
|
|
6407
|
-
startWatching();
|
|
6640
|
+
ECMA_ScriptSourceFilesWatcher_1.default.initializeIfRequiredAndGetInstance({
|
|
6641
|
+
ecmaScriptLogicProcessingSettingsRepresentative: dataHoldingSelfInstance.
|
|
6642
|
+
ECMA_ScriptLogicProcessingConfigRepresentative,
|
|
6643
|
+
projectBuildingMasterConfigRepresentative: dataHoldingSelfInstance.masterConfigRepresentative
|
|
6408
6644
|
});
|
|
6409
6645
|
}
|
|
6410
6646
|
/** 〔 納品版のみ理由 〕 開発版で同じ事をすれば、gulpが落ちる */
|
|
@@ -6458,32 +6694,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6458
6694
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6459
6695
|
};
|
|
6460
6696
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6461
|
-
|
|
6697
|
+
/* ─── Related Classes ────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
6698
|
+
const CodeSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/CodeSourceFilesWatcher */ "./ProjectBuilding/FilesWatching/Watchers/CodeSourceFilesWatcher.ts"));
|
|
6699
|
+
const FilesMasterWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts"));
|
|
6462
6700
|
/* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
6463
6701
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
6464
6702
|
class ECMA_ScriptSourceFilesWatcher extends CodeSourceFilesWatcher_1.default {
|
|
6465
6703
|
static selfSoleInstance = null;
|
|
6466
|
-
|
|
6467
|
-
ecmaScriptLogicProcessingSettingsRepresentative;
|
|
6704
|
+
settingsRepresentative;
|
|
6468
6705
|
static initializeIfRequiredAndGetInstance(initializationRequirements) {
|
|
6469
6706
|
if ((0, es_extensions_1.isNull)(ECMA_ScriptSourceFilesWatcher.selfSoleInstance)) {
|
|
6470
6707
|
ECMA_ScriptSourceFilesWatcher.selfSoleInstance = new ECMA_ScriptSourceFilesWatcher(initializationRequirements);
|
|
6708
|
+
FilesMasterWatcher_1.default.addPassiveWatcher(ECMA_ScriptSourceFilesWatcher.selfSoleInstance);
|
|
6471
6709
|
}
|
|
6472
6710
|
return ECMA_ScriptSourceFilesWatcher.selfSoleInstance;
|
|
6473
6711
|
}
|
|
6474
6712
|
constructor({ ecmaScriptLogicProcessingSettingsRepresentative, projectBuildingMasterConfigRepresentative }) {
|
|
6475
6713
|
super({
|
|
6714
|
+
ID: "ECMA_SCRIPT_LOGIC_SOURCE_FILES_WATCHER",
|
|
6715
|
+
mustLogEvents: ecmaScriptLogicProcessingSettingsRepresentative.mustLogSourceFilesWatcherEvents,
|
|
6476
6716
|
projectBuildingMasterConfigRepresentative,
|
|
6477
6717
|
targetFilesNamesExtensionsWithoutLeadingDots: ecmaScriptLogicProcessingSettingsRepresentative.
|
|
6478
6718
|
actualFileNameExtensionsWithoutLeadingDots,
|
|
6479
6719
|
outputFilesGlobSelectors: ecmaScriptLogicProcessingSettingsRepresentative.actualOutputFilesGlobSelectors,
|
|
6480
|
-
targetSourceFilesType__singularForm: "ECMAScript
|
|
6720
|
+
targetSourceFilesType__singularForm: "ECMAScript Logic"
|
|
6481
6721
|
});
|
|
6482
|
-
this.
|
|
6483
|
-
this.mustLogSourceFilesWatcherEvents = this.ecmaScriptLogicProcessingSettingsRepresentative.mustLogSourceFilesWatcherEvents;
|
|
6484
|
-
}
|
|
6485
|
-
isFileAbsolutePathRefersToEntryPoint(targetFileAbsolutePath) {
|
|
6486
|
-
return this.ecmaScriptLogicProcessingSettingsRepresentative.isEntryPoint(targetFileAbsolutePath);
|
|
6722
|
+
this.settingsRepresentative = ecmaScriptLogicProcessingSettingsRepresentative;
|
|
6487
6723
|
}
|
|
6488
6724
|
}
|
|
6489
6725
|
exports["default"] = ECMA_ScriptSourceFilesWatcher;
|
|
@@ -8015,7 +8251,6 @@ const MarkupSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @Mark
|
|
|
8015
8251
|
/* ─── Superclass ─────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
8016
8252
|
const GulpStreamsBasedTaskExecutor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBased/GulpStreamsBasedTaskExecutor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBased/GulpStreamsBasedTaskExecutor.ts"));
|
|
8017
8253
|
/* ─── Shared State ───────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
8018
|
-
const CommonSharedState_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/CommonSharedState */ "./ProjectBuilding/Common/CommonSharedState.ts"));
|
|
8019
8254
|
const MarkupProcessingSharedState_1 = __importDefault(__webpack_require__(/*! @MarkupProcessing/MarkupProcessingSharedState */ "./ProjectBuilding/SourceCodeProcessing/Markup/MarkupProcessingSharedState.ts"));
|
|
8020
8255
|
/* ─── Gulp & Plugins ─────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
8021
8256
|
const gulp_1 = __importDefault(__webpack_require__(/*! gulp */ "gulp"));
|
|
@@ -8104,7 +8339,7 @@ class MarkupProcessor extends GulpStreamsBasedTaskExecutor_1.default {
|
|
|
8104
8339
|
MarkupProcessor.ENTRY_POINTS_AND_PARTIAL_FILES_MAPPING_CACHE_FILE_NAME_WITH_EXTENSION
|
|
8105
8340
|
])
|
|
8106
8341
|
});
|
|
8107
|
-
|
|
8342
|
+
MarkupSourceFilesWatcher_1.default.
|
|
8108
8343
|
initializeIfRequiredAndGetInstance({
|
|
8109
8344
|
markupProcessingSettingsRepresentative,
|
|
8110
8345
|
projectBuildingMasterConfigRepresentative
|
|
@@ -8121,9 +8356,6 @@ class MarkupProcessor extends GulpStreamsBasedTaskExecutor_1.default {
|
|
|
8121
8356
|
handlerID: "ON_MARKUP_ENTRY_POINT_FILE_DELETED--BY_MARKUP_PROCESSOR",
|
|
8122
8357
|
handler: MarkupProcessor.onEntryPointFileDeleted
|
|
8123
8358
|
});
|
|
8124
|
-
CommonSharedState_1.default.
|
|
8125
|
-
onInitialBuildDoneEventHandlers.
|
|
8126
|
-
set("BY_MARKUP_PROCESSOR", () => { markupSourceFilesWatcher.startWatching(); });
|
|
8127
8359
|
}
|
|
8128
8360
|
return dataHoldingSelfInstance.processEntryPoints(markupProcessingSettingsRepresentative.relevantEntryPointsSourceFilesAbsolutePaths);
|
|
8129
8361
|
}
|
|
@@ -8461,32 +8693,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8461
8693
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8462
8694
|
};
|
|
8463
8695
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8464
|
-
|
|
8696
|
+
/* ─── Related Classes ────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
8697
|
+
const CodeSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/CodeSourceFilesWatcher */ "./ProjectBuilding/FilesWatching/Watchers/CodeSourceFilesWatcher.ts"));
|
|
8698
|
+
const FilesMasterWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts"));
|
|
8465
8699
|
/* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
8466
8700
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
8467
8701
|
class MarkupSourceFilesWatcher extends CodeSourceFilesWatcher_1.default {
|
|
8468
8702
|
static selfSoleInstance = null;
|
|
8469
|
-
|
|
8470
|
-
markupProcessingSettingsRepresentative;
|
|
8703
|
+
settingsRepresentative;
|
|
8471
8704
|
static initializeIfRequiredAndGetInstance(initializationRequirements) {
|
|
8472
8705
|
if ((0, es_extensions_1.isNull)(MarkupSourceFilesWatcher.selfSoleInstance)) {
|
|
8473
8706
|
MarkupSourceFilesWatcher.selfSoleInstance = new MarkupSourceFilesWatcher(initializationRequirements);
|
|
8707
|
+
FilesMasterWatcher_1.default.addPassiveWatcher(MarkupSourceFilesWatcher.selfSoleInstance);
|
|
8474
8708
|
}
|
|
8475
8709
|
return MarkupSourceFilesWatcher.selfSoleInstance;
|
|
8476
8710
|
}
|
|
8477
8711
|
constructor({ markupProcessingSettingsRepresentative, projectBuildingMasterConfigRepresentative }) {
|
|
8478
8712
|
super({
|
|
8713
|
+
ID: "MARKUP_SOURCE_FILES_WATCHER",
|
|
8714
|
+
mustLogEvents: markupProcessingSettingsRepresentative.mustLogSourceFilesWatcherEvents,
|
|
8479
8715
|
projectBuildingMasterConfigRepresentative,
|
|
8480
8716
|
targetFilesNamesExtensionsWithoutLeadingDots: markupProcessingSettingsRepresentative.
|
|
8481
8717
|
actualFileNameExtensionsWithoutLeadingDots,
|
|
8482
8718
|
outputFilesGlobSelectors: markupProcessingSettingsRepresentative.actualOutputFilesGlobSelectors,
|
|
8483
|
-
targetSourceFilesType__singularForm: "
|
|
8719
|
+
targetSourceFilesType__singularForm: "Markup"
|
|
8484
8720
|
});
|
|
8485
|
-
this.
|
|
8486
|
-
this.mustLogSourceFilesWatcherEvents = this.markupProcessingSettingsRepresentative.mustLogSourceFilesWatcherEvents;
|
|
8487
|
-
}
|
|
8488
|
-
isFileAbsolutePathRefersToEntryPoint(targetFileAbsolutePath) {
|
|
8489
|
-
return this.markupProcessingSettingsRepresentative.isEntryPoint(targetFileAbsolutePath);
|
|
8721
|
+
this.settingsRepresentative = markupProcessingSettingsRepresentative;
|
|
8490
8722
|
}
|
|
8491
8723
|
}
|
|
8492
8724
|
exports["default"] = MarkupSourceFilesWatcher;
|
|
@@ -12048,7 +12280,6 @@ const StylesSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @Styl
|
|
|
12048
12280
|
/* ─── Superclass ─────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
12049
12281
|
const GulpStreamsBasedTaskExecutor_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/TasksExecutors/GulpStreamsBased/GulpStreamsBasedTaskExecutor */ "./ProjectBuilding/Common/TasksExecutors/GulpStreamsBased/GulpStreamsBasedTaskExecutor.ts"));
|
|
12050
12282
|
/* ─── Shared State ───────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
12051
|
-
const CommonSharedState_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/Common/CommonSharedState */ "./ProjectBuilding/Common/CommonSharedState.ts"));
|
|
12052
12283
|
const StylesProcessingSharedState_1 = __importDefault(__webpack_require__(/*! @StylesProcessing/StylesProcessingSharedState */ "./ProjectBuilding/SourceCodeProcessing/Styles/StylesProcessingSharedState.ts"));
|
|
12053
12284
|
/* ─── Gulp & Plugins ─────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
12054
12285
|
const gulp_1 = __importDefault(__webpack_require__(/*! gulp */ "gulp"));
|
|
@@ -12106,7 +12337,7 @@ class StylesProcessor extends GulpStreamsBasedTaskExecutor_1.default {
|
|
|
12106
12337
|
StylesProcessor.ENTRY_POINTS_AND_PARTIAL_FILES_MAPPING_CACHE_FILE_NAME_WITH_EXTENSION
|
|
12107
12338
|
])
|
|
12108
12339
|
});
|
|
12109
|
-
|
|
12340
|
+
StylesSourceFilesWatcher_1.default.
|
|
12110
12341
|
initializeIfRequiredAndGetInstance({
|
|
12111
12342
|
stylesProcessingSettingsRepresentative,
|
|
12112
12343
|
projectBuildingMasterConfigRepresentative
|
|
@@ -12123,9 +12354,6 @@ class StylesProcessor extends GulpStreamsBasedTaskExecutor_1.default {
|
|
|
12123
12354
|
handlerID: "ON_STYLES_ENTRY_POINT_FILE_DELETED--BY_STYLES_PROCESSOR",
|
|
12124
12355
|
handler: StylesProcessor.onEntryPointFileDeleted
|
|
12125
12356
|
});
|
|
12126
|
-
CommonSharedState_1.default.
|
|
12127
|
-
onInitialBuildDoneEventHandlers.
|
|
12128
|
-
set("BY_STYLES_PROCESSOR", () => { stylesSourceFilesWatcher.startWatching(); });
|
|
12129
12357
|
}
|
|
12130
12358
|
return dataHoldingSelfInstance.processEntryPoints(stylesProcessingSettingsRepresentative.relevantEntryPointsSourceFilesAbsolutePaths);
|
|
12131
12359
|
}
|
|
@@ -12258,32 +12486,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12258
12486
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12259
12487
|
};
|
|
12260
12488
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
12261
|
-
|
|
12489
|
+
/* ─── Related Classes ────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
12490
|
+
const CodeSourceFilesWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/CodeSourceFilesWatcher */ "./ProjectBuilding/FilesWatching/Watchers/CodeSourceFilesWatcher.ts"));
|
|
12491
|
+
const FilesMasterWatcher_1 = __importDefault(__webpack_require__(/*! @ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher */ "./ProjectBuilding/FilesWatching/Watchers/FilesMasterWatcher.ts"));
|
|
12262
12492
|
/* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
|
|
12263
12493
|
const es_extensions_1 = __webpack_require__(/*! @yamato-daiwa/es-extensions */ "@yamato-daiwa/es-extensions");
|
|
12264
12494
|
class StylesSourceFilesWatcher extends CodeSourceFilesWatcher_1.default {
|
|
12265
12495
|
static selfSoleInstance = null;
|
|
12266
|
-
|
|
12267
|
-
stylesProcessingSettingsRepresentative;
|
|
12496
|
+
settingsRepresentative;
|
|
12268
12497
|
static initializeIfRequiredAndGetInstance(initializationRequirements) {
|
|
12269
12498
|
if ((0, es_extensions_1.isNull)(StylesSourceFilesWatcher.selfSoleInstance)) {
|
|
12270
12499
|
StylesSourceFilesWatcher.selfSoleInstance = new StylesSourceFilesWatcher(initializationRequirements);
|
|
12500
|
+
FilesMasterWatcher_1.default.addPassiveWatcher(StylesSourceFilesWatcher.selfSoleInstance);
|
|
12271
12501
|
}
|
|
12272
12502
|
return StylesSourceFilesWatcher.selfSoleInstance;
|
|
12273
12503
|
}
|
|
12274
12504
|
constructor({ stylesProcessingSettingsRepresentative, projectBuildingMasterConfigRepresentative }) {
|
|
12275
12505
|
super({
|
|
12506
|
+
ID: "STYLES_SOURCE_FILES_WATCHER",
|
|
12507
|
+
mustLogEvents: stylesProcessingSettingsRepresentative.mustLogSourceFilesWatcherEvents,
|
|
12276
12508
|
projectBuildingMasterConfigRepresentative,
|
|
12277
12509
|
targetFilesNamesExtensionsWithoutLeadingDots: stylesProcessingSettingsRepresentative.
|
|
12278
12510
|
actualFileNameExtensionsWithoutLeadingDots,
|
|
12279
12511
|
outputFilesGlobSelectors: stylesProcessingSettingsRepresentative.actualOutputFilesGlobSelectors,
|
|
12280
|
-
targetSourceFilesType__singularForm: "
|
|
12512
|
+
targetSourceFilesType__singularForm: "Stylesheet"
|
|
12281
12513
|
});
|
|
12282
|
-
this.
|
|
12283
|
-
this.mustLogSourceFilesWatcherEvents = this.stylesProcessingSettingsRepresentative.mustLogSourceFilesWatcherEvents;
|
|
12284
|
-
}
|
|
12285
|
-
isFileAbsolutePathRefersToEntryPoint(targetFileAbsolutePath) {
|
|
12286
|
-
return this.stylesProcessingSettingsRepresentative.isEntryPoint(targetFileAbsolutePath);
|
|
12514
|
+
this.settingsRepresentative = stylesProcessingSettingsRepresentative;
|
|
12287
12515
|
}
|
|
12288
12516
|
}
|
|
12289
12517
|
exports["default"] = StylesSourceFilesWatcher;
|
|
@@ -14054,7 +14282,7 @@ function revisionHash(data) {
|
|
|
14054
14282
|
\***********************/
|
|
14055
14283
|
/***/ ((module) => {
|
|
14056
14284
|
|
|
14057
|
-
module.exports = JSON.parse('{"name":"@yamato-daiwa/automation","version":"0.
|
|
14285
|
+
module.exports = JSON.parse('{"name":"@yamato-daiwa/automation","version":"0.4.0","description":"The project building tool with declarative YAML configuration specializing on Pug, Stylus and TypeScript as source code languages.","keywords":["build","pug","stylus","tool","typescript"],"engines":{"node":">=18.18.0"},"bin":{"yda":"Executable"},"files":["EntryPoint.js"],"dependencies":{"@stylistic/eslint-plugin":"1.7.0","@typescript-eslint/eslint-plugin":"7.4.0","@typescript-eslint/parser":"7.4.0","@vue/compiler-sfc":"3.4.21","@webdiscus/pug-loader":"2.11.0","@yamato-daiwa/es-extensions":"1.7.0-alpha.10","@yamato-daiwa/es-extensions-nodejs":"1.7.0-alpha.6","@yamato-daiwa/style_guides":"0.2.0","autoprefixer":"10.4.19","browser-sync":"3.0.2","css-loader":"6.11.0","cssnano":"6.1.2","eslint":"8.57.0","eslint-plugin-import":"2.29.1","eslint-plugin-node":"11.1.0","eslint-plugin-react":"7.34.1","eslint-plugin-vue":"9.24.0","eslint-plugin-vue-pug":"0.6.2","fork-ts-checker-webpack-plugin":"7.3.0","gulp":"4.0.2","gulp-data":"1.3.1","gulp-html-prettify":"0.0.1","gulp-if":"3.0.0","gulp-imagemin":"7.1.0","gulp-nodemon":"2.5.0","gulp-plumber":"1.2.1","gulp-postcss":"9.0.1","gulp-pug":"5.0.0","gulp-sourcemaps":"3.0.0","gulp-stylus":"3.0.1","imagemin-pngquant":"9.0.2","json5-loader":"4.0.1","node-html-parser":"6.1.13","node-notifier":"10.0.1","pa11y":"6.2.3","probe-image-size":"7.2.3","pug-lint":"2.7.0","pug-plain-loader":"1.1.0","puppeteer":"21.0.0","rev-hash":"4.1.0","stlint":"1.0.65","stream-combiner2":"1.1.1","style-loader":"3.3.4","stylus":"0.63.0","stylus-loader":"8.0.0","ts-loader":"9.4.4","vinyl":"2.2.1","vue-loader":"17.3.1","vue-style-loader":"4.1.3","w3c-html-validator":"0.8.1","webpack":"5.88.2","webpack-node-externals":"3.0.0","webpack-stream":"7.0.0","worker-loader":"3.0.8","yaml-loader":"0.8.0"},"devDependencies":{"@types/browser-sync":"2.26.3","@types/cssnano":"5.0.0","@types/gulp":"4.0.10","@types/gulp-html-prettify":"0.0.2","@types/gulp-if":"0.0.34","@types/gulp-imagemin":"8.0.1","@types/gulp-nodemon":"0.0.37","@types/gulp-plumber":"0.0.33","@types/gulp-postcss":"8.0.6","@types/gulp-sourcemaps":"0.0.36","@types/gulp-stylus":"2.7.8","@types/node":"18.13.0","@types/node-notifier":"8.0.5","@types/pa11y":"5.3.7","@types/probe-image-size":"7.2.3","@types/pug":"2.0.9","@types/webpack-node-externals":"2.5.3","@types/webpack-stream":"3.2.15","eslint-webpack-plugin":"4.1.0","ts-node":"10.9.2","typescript":"5.4.3","webpack-cli":"5.1.4"},"scripts":{"Incremental development building":"webpack --mode development","Production building":"webpack --mode production","Linting":"eslint Source","Tree diagram of source files generating":"tree Source /f"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation.git"},"bugs":{"url":"https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation/issues","email":"tokugawa.takesi@gmail.com"}}');
|
|
14058
14286
|
|
|
14059
14287
|
/***/ })
|
|
14060
14288
|
|