@yamato-daiwa/automation 0.9.0-alpha.2 → 0.9.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EntryPoint.js +67 -22
- package/package.json +1 -1
package/EntryPoint.js
CHANGED
|
@@ -34,7 +34,7 @@ function revisionHash(data) {
|
|
|
34
34
|
\***********************/
|
|
35
35
|
/***/ ((module) => {
|
|
36
36
|
|
|
37
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@yamato-daiwa/automation","version":"0.9.0-alpha.
|
|
37
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@yamato-daiwa/automation","version":"0.9.0-alpha.3","description":"The project building tool with declarative YAML configuration specializing on Pug, Stylus and TypeScript as source code languages.","keywords":["build","pug","stylus","tool","typescript"],"engines":{"node":">=20.0.0"},"bin":{"yda":"Executable"},"files":["EntryPoint.js"],"dependencies":{"@eslint-community/eslint-plugin-eslint-comments":"4.5.0","@stylistic/eslint-plugin":"5.6.1","@typescript-eslint/eslint-plugin":"8.51.0","@typescript-eslint/parser":"8.51.0","@vue/compiler-sfc":"3.5.26","@webdiscus/pug-loader":"2.11.1","@yamato-daiwa/es-extensions":"1.8.4","@yamato-daiwa/es-extensions-nodejs":"1.8.4","@yamato-daiwa/style_guides":"0.11.6","@yamato-daiwa/universal-reactive-webpack-loader":"0.1.0","autoprefixer":"10.4.23","browser-sync":"3.0.4","css-loader":"7.1.2","cssnano":"7.1.2","dotenv":"17.2.3","eslint":"9.39.2","eslint-plugin-import":"2.32.0","eslint-plugin-n":"17.23.1","eslint-plugin-react":"7.37.5","eslint-plugin-vue":"9.33.0","eslint-plugin-vue-pug":"0.6.2","gulp":"4.0.2","gulp-data":"1.3.1","gulp-if":"3.0.0","gulp-imagemin":"7.1.0","gulp-nodemon":"2.5.0","gulp-plumber":"1.2.1","gulp-postcss":"10.0.0","gulp-pug":"5.0.0","gulp-sourcemaps":"3.0.0","gulp-stylus":"3.0.1","htmlnano":"2.1.5","imagemin-pngquant":"9.0.2","js-beautify":"1.15.4","json5-loader":"4.0.1","nanoid":"5.1.6","node-html-parser":"7.0.1","node-notifier":"10.0.1","pa11y":"9.0.1","postcss-loader":"8.2.0","postcss-normalize-stylus-compatible-container-query-syntax":"1.1.2","probe-image-size":"7.2.3","pug-lint":"2.7.0","puppeteer":"24.34.0","require-from-string":"2.0.2","rev-hash":"4.1.0","stlint":"1.0.65","stream-combiner2":"1.1.1","style-loader":"4.0.0","stylus":"0.63.0","stylus-loader":"8.1.2","ts-loader":"9.5.4","vinyl":"2.2.1","vnu-jar":"24.10.17","vue-loader":"17.4.2","vue-style-loader":"4.1.3","vue-tsc":"3.2.1","webpack":"5.103.0","webpack-node-externals":"3.0.0","webpack-stream":"7.0.0","worker-loader":"3.0.8","yaml-loader":"0.9.0"},"devDependencies":{"@types/browser-sync":"2.29.1","@types/cssnano":"5.0.0","@types/gulp":"4.0.18","@types/gulp-if":"3.0.5","@types/gulp-imagemin":"7.0.3","@types/gulp-nodemon":"0.0.37","@types/gulp-plumber":"0.0.37","@types/gulp-postcss":"8.0.6","@types/gulp-sourcemaps":"0.0.38","@types/gulp-stylus":"2.7.8","@types/js-beautify":"1.14.3","@types/node":"22.15.30","@types/node-notifier":"8.0.5","@types/pa11y":"5.3.7","@types/probe-image-size":"7.2.5","@types/pug":"2.0.10","@types/require-from-string":"1.2.3","@types/vnu-jar":"17.11.2","@types/webpack-node-externals":"3.0.4","@types/webpack-stream":"3.2.16","eslint-webpack-plugin":"4.2.0","ts-node":"10.9.2","typescript":"5.9.3","webpack-cli":"6.0.1"},"scripts":{"Incremental Development Building":"webpack --mode development","Production Building":"webpack --mode production","Linting":"eslint Source"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation.git"},"homepage":"https://automation.yamato-daiwa.com/","funding":"https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation?sponsor=1","bugs":{"url":"https://github.com/TokugawaTakeshi/Yamato-Daiwa-Automation/issues","email":"tokugawa.takesi@gmail.com"}}');
|
|
38
38
|
|
|
39
39
|
/***/ }),
|
|
40
40
|
|
|
@@ -1773,13 +1773,13 @@ class BrowserLiveReloader {
|
|
|
1773
1773
|
static localization = BrowserLiveReloaderLocalization_english_1.default;
|
|
1774
1774
|
/* ┅┅┅ Private ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ */
|
|
1775
1775
|
static onNewPageOpenedEventHandlers = new Map();
|
|
1776
|
-
static EXPERIMENTAL_LOGGING =
|
|
1776
|
+
static EXPERIMENTAL_LOGGING = false;
|
|
1777
1777
|
/* ━━━ Instance Fields ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
|
|
1778
1778
|
browserLiveReloadingSettingsRepresentative;
|
|
1779
1779
|
markupProcessingSettingsRepresentative;
|
|
1780
|
+
absolutePathsOfSourceFileCorrespondingToViewedPages__forwardSlashesPathSeparators__processingOnDemandModeOnly = new Set();
|
|
1780
1781
|
waitingForSubsequentFilesWillBeUpdatedCountdown;
|
|
1781
|
-
|
|
1782
|
-
hasAcceptedAtLeastOneRequestPreviously = false;
|
|
1782
|
+
currentHTML_FileAbsolutePath__forwardSlashesPathSeparators = null;
|
|
1783
1783
|
/* ━━━ Public Methods ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
|
|
1784
1784
|
static provideBrowserLiveReloadingIfMust(masterConfigRepresentative) {
|
|
1785
1785
|
const browserLiveReloadingConfigRepresentative = masterConfigRepresentative.getBrowserLiveReloadingSettingsRepresentativeIfMustProvideBrowserLiveReloading();
|
|
@@ -1804,6 +1804,9 @@ class BrowserLiveReloader {
|
|
|
1804
1804
|
static reload() {
|
|
1805
1805
|
browser_sync_1.default.reload();
|
|
1806
1806
|
}
|
|
1807
|
+
static get currentHTML_FileAbsolutePath__forwardSlashesPathSeparators() {
|
|
1808
|
+
return BrowserLiveReloader.selfSingleInstance?.currentHTML_FileAbsolutePath__forwardSlashesPathSeparators ?? null;
|
|
1809
|
+
}
|
|
1807
1810
|
/* ━━━ Constructor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
|
|
1808
1811
|
constructor(browserLiveReloadingConfigRepresentative, markupProcessingSettingsRepresentative) {
|
|
1809
1812
|
this.browserLiveReloadingSettingsRepresentative = browserLiveReloadingConfigRepresentative;
|
|
@@ -1855,7 +1858,6 @@ class BrowserLiveReloader {
|
|
|
1855
1858
|
middleware: this.onRequest.bind(this)
|
|
1856
1859
|
});
|
|
1857
1860
|
}
|
|
1858
|
-
// ━━━ TODO ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1859
1861
|
onAnyChangeInRelatedFiles(targetFileAbsolutePath__forwardSlashesPathSeparators) {
|
|
1860
1862
|
es_extensions_1.Logger.logWarning({
|
|
1861
1863
|
badge: { customText: "Experimental" },
|
|
@@ -1864,12 +1866,14 @@ class BrowserLiveReloader {
|
|
|
1864
1866
|
compactLayout: true,
|
|
1865
1867
|
mustOutputIf: BrowserLiveReloader.EXPERIMENTAL_LOGGING
|
|
1866
1868
|
});
|
|
1869
|
+
/* [ Approach ]
|
|
1870
|
+
* In processing on demand case, the browser live reloading is being triggered by a markup processor on HTML file ready.
|
|
1871
|
+
* */
|
|
1867
1872
|
if (this.markupProcessingSettingsRepresentative?.processingOnDemandSettings.enabled === true &&
|
|
1868
1873
|
(0, es_extensions_1.extractLastExtensionOfFileName)({
|
|
1869
1874
|
targetPath: targetFileAbsolutePath__forwardSlashesPathSeparators,
|
|
1870
1875
|
withLeadingDot: true
|
|
1871
1876
|
}) === "html") {
|
|
1872
|
-
console.log("ok!!!");
|
|
1873
1877
|
return;
|
|
1874
1878
|
}
|
|
1875
1879
|
clearTimeout(this.waitingForSubsequentFilesWillBeUpdatedCountdown);
|
|
@@ -1889,6 +1893,7 @@ class BrowserLiveReloader {
|
|
|
1889
1893
|
compactLayout: true,
|
|
1890
1894
|
mustOutputIf: BrowserLiveReloader.EXPERIMENTAL_LOGGING
|
|
1891
1895
|
});
|
|
1896
|
+
/* [ Approach ] Currently, this middleware is only processing on demand feature. */
|
|
1892
1897
|
if (this.markupProcessingSettingsRepresentative?.processingOnDemandSettings.enabled !== true) {
|
|
1893
1898
|
letPass();
|
|
1894
1899
|
return;
|
|
@@ -1897,42 +1902,45 @@ class BrowserLiveReloader {
|
|
|
1897
1902
|
letPass();
|
|
1898
1903
|
return;
|
|
1899
1904
|
}
|
|
1900
|
-
const
|
|
1905
|
+
const targetHTML_FileAbsolutePath__forwardSlashesPathSeparators = request.url === "/" ?
|
|
1901
1906
|
es_extensions_nodejs_1.ImprovedPath.joinPathSegments([
|
|
1902
1907
|
this.browserLiveReloadingSettingsRepresentative.targetFilesRootDirectoryAbsolutePath,
|
|
1903
1908
|
this.browserLiveReloadingSettingsRepresentative.startingFileNameWithExtension
|
|
1904
1909
|
], { alwaysForwardSlashSeparators: true }) :
|
|
1905
1910
|
es_extensions_nodejs_1.ImprovedPath.joinPathSegments([this.browserLiveReloadingSettingsRepresentative.targetFilesRootDirectoryAbsolutePath, request.url], { alwaysForwardSlashSeparators: true });
|
|
1906
1911
|
if ((0, es_extensions_1.extractLastExtensionOfFileName)({
|
|
1907
|
-
targetPath:
|
|
1908
|
-
withLeadingDot: false
|
|
1912
|
+
targetPath: targetHTML_FileAbsolutePath__forwardSlashesPathSeparators, withLeadingDot: false
|
|
1909
1913
|
}) !== "html") {
|
|
1910
1914
|
letPass();
|
|
1911
1915
|
return;
|
|
1912
1916
|
}
|
|
1913
|
-
const correspondingSourcePugFileAbsolutePath__forwardSlashSeparators = (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(MarkupProcessingSharedState_1.default.outputHTML_FilesAndSourcePugFilesAbsolutePathsCorrespondenceMap,
|
|
1914
|
-
const hasPageChanged = this.
|
|
1917
|
+
const correspondingSourcePugFileAbsolutePath__forwardSlashSeparators = (0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(MarkupProcessingSharedState_1.default.outputHTML_FilesAndSourcePugFilesAbsolutePathsCorrespondenceMap, targetHTML_FileAbsolutePath__forwardSlashesPathSeparators);
|
|
1918
|
+
const hasPageChanged = this.currentHTML_FileAbsolutePath__forwardSlashesPathSeparators !==
|
|
1919
|
+
targetHTML_FileAbsolutePath__forwardSlashesPathSeparators;
|
|
1915
1920
|
es_extensions_1.Logger.logWarning({
|
|
1916
1921
|
badge: { customText: "Experimental" },
|
|
1917
1922
|
title: "BrowserLiveReloader.onRequest, Target HTML File:",
|
|
1918
|
-
description:
|
|
1923
|
+
description: targetHTML_FileAbsolutePath__forwardSlashesPathSeparators,
|
|
1919
1924
|
mustOutputIf: BrowserLiveReloader.EXPERIMENTAL_LOGGING,
|
|
1920
1925
|
additionalData: {
|
|
1921
1926
|
hasPageChanged,
|
|
1922
1927
|
relatedEntryPointsSourceFiles: correspondingSourcePugFileAbsolutePath__forwardSlashSeparators
|
|
1923
1928
|
}
|
|
1924
1929
|
});
|
|
1925
|
-
this.
|
|
1930
|
+
this.currentHTML_FileAbsolutePath__forwardSlashesPathSeparators =
|
|
1931
|
+
targetHTML_FileAbsolutePath__forwardSlashesPathSeparators;
|
|
1926
1932
|
if (hasPageChanged) {
|
|
1927
1933
|
for (const handler of BrowserLiveReloader.onNewPageOpenedEventHandlers.values()) {
|
|
1928
1934
|
handler({
|
|
1929
1935
|
relatedSourcePugFileAbsolutePath__forwardSlashSeparators: correspondingSourcePugFileAbsolutePath__forwardSlashSeparators,
|
|
1930
|
-
HTML_FileAbsolutePath__forwardSlashSeparators:
|
|
1936
|
+
HTML_FileAbsolutePath__forwardSlashSeparators: targetHTML_FileAbsolutePath__forwardSlashesPathSeparators
|
|
1931
1937
|
});
|
|
1932
1938
|
}
|
|
1933
1939
|
}
|
|
1934
|
-
if (!this.
|
|
1935
|
-
|
|
1940
|
+
if (!this.absolutePathsOfSourceFileCorrespondingToViewedPages__forwardSlashesPathSeparators__processingOnDemandModeOnly.
|
|
1941
|
+
has(correspondingSourcePugFileAbsolutePath__forwardSlashSeparators)) {
|
|
1942
|
+
this.absolutePathsOfSourceFileCorrespondingToViewedPages__forwardSlashesPathSeparators__processingOnDemandModeOnly.
|
|
1943
|
+
add(correspondingSourcePugFileAbsolutePath__forwardSlashSeparators);
|
|
1936
1944
|
response.setHeader("Content-Type", "text/html");
|
|
1937
1945
|
response.write("<body><h1>Please wait</h1></body>");
|
|
1938
1946
|
response.end();
|
|
@@ -3430,6 +3438,32 @@ var SourceCodeProcessingSettingsGenericProperties__FromFile__RawValid;
|
|
|
3430
3438
|
}
|
|
3431
3439
|
}
|
|
3432
3440
|
},
|
|
3441
|
+
$onlyWithPenultimateFileNamesExtensions: {
|
|
3442
|
+
type: Array,
|
|
3443
|
+
isUndefinedForbidden: false,
|
|
3444
|
+
isNullForbidden: true,
|
|
3445
|
+
areUndefinedElementsForbidden: true,
|
|
3446
|
+
areNullElementsForbidden: true,
|
|
3447
|
+
minimalElementsCount: 1,
|
|
3448
|
+
element: {
|
|
3449
|
+
type: String
|
|
3450
|
+
}
|
|
3451
|
+
},
|
|
3452
|
+
$excludeFilesWithPenultimateNamesExtensions: {
|
|
3453
|
+
type: Array,
|
|
3454
|
+
isUndefinedForbidden: false,
|
|
3455
|
+
mustBeUndefinedIf: {
|
|
3456
|
+
predicate: ({ rawData__currentObjectDepth: entryPointsGroup }) => (0, es_extensions_1.isNotUndefined)(entryPointsGroup.$onlyWithPenultimateFileNamesExtensions),
|
|
3457
|
+
descriptionForLogging: "`$onlyWithPenultimateFileNamesExtensions` has been specified"
|
|
3458
|
+
},
|
|
3459
|
+
isNullForbidden: true,
|
|
3460
|
+
areUndefinedElementsForbidden: true,
|
|
3461
|
+
areNullElementsForbidden: true,
|
|
3462
|
+
minimalElementsCount: 1,
|
|
3463
|
+
element: {
|
|
3464
|
+
type: String
|
|
3465
|
+
}
|
|
3466
|
+
},
|
|
3433
3467
|
$singleEntryPointSourceFileRelativePath: {
|
|
3434
3468
|
newName: "singleEntryPointSourceFileRelativePath",
|
|
3435
3469
|
type: String,
|
|
@@ -5158,7 +5192,7 @@ class CodeSourceFilesWatcher extends FilesPassiveWatcher_1.default {
|
|
|
5158
5192
|
es_extensions_1.Logger.logInfo({
|
|
5159
5193
|
mustOutputIf: this.mustLogEvents,
|
|
5160
5194
|
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
5161
|
-
title: `${this.
|
|
5195
|
+
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} Entry Point Source File Added`,
|
|
5162
5196
|
description: targetFileAbsolutePath__forwardSlashesPathSeparators
|
|
5163
5197
|
});
|
|
5164
5198
|
for (const handler of Object.values(this.onEntryPointFileAddedEventHandlers)) {
|
|
@@ -5169,7 +5203,7 @@ class CodeSourceFilesWatcher extends FilesPassiveWatcher_1.default {
|
|
|
5169
5203
|
es_extensions_1.Logger.logInfo({
|
|
5170
5204
|
mustOutputIf: this.mustLogEvents,
|
|
5171
5205
|
badge: { customText: this.LOGGER_BADGE_TEXT },
|
|
5172
|
-
title: `${this.
|
|
5206
|
+
title: `${this.TARGET_SOURCE_FILES_TYPE__SINGULAR_FORM__CAPITALIZED} Partial Source File Added`,
|
|
5173
5207
|
description: targetFileAbsolutePath__forwardSlashesPathSeparators
|
|
5174
5208
|
});
|
|
5175
5209
|
for (const handler of Object.values(this.onNonEntryPointFileAddedEventHandlers)) {
|
|
@@ -10643,10 +10677,21 @@ class MarkupProcessor extends GulpStreamsBasedTaskExecutor_1.default {
|
|
|
10643
10677
|
if ((0, es_extensions_1.isNotNull)(this.subsequentFilesStateChangeTimeout)) {
|
|
10644
10678
|
clearTimeout(this.subsequentFilesStateChangeTimeout);
|
|
10645
10679
|
}
|
|
10646
|
-
this.subsequentFilesStateChangeTimeout = setTimeout(()
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10680
|
+
this.subsequentFilesStateChangeTimeout = setTimeout(this.onSubsequentFilesStateChangeTimeoutExpired.bind(this), (0, es_extensions_1.secondsToMilliseconds)(this.markupProcessingSettingsRepresentative.WAITING_FOR_SUBSEQUENT_FILES_WILL_SAVED_PERIOD__SECONDS));
|
|
10681
|
+
}
|
|
10682
|
+
onSubsequentFilesStateChangeTimeoutExpired() {
|
|
10683
|
+
if (this.markupProcessingSettingsRepresentative.processingOnDemandSettings.enabled) {
|
|
10684
|
+
const currentHTML_FileAbsolutePath__forwardSlashesPathSeparators = BrowserLiveReloader_1.default.currentHTML_FileAbsolutePath__forwardSlashesPathSeparators;
|
|
10685
|
+
if ((0, es_extensions_1.isNotNull)(currentHTML_FileAbsolutePath__forwardSlashesPathSeparators)) {
|
|
10686
|
+
this.processEntryPoints([
|
|
10687
|
+
(0, es_extensions_1.getExpectedToBeNonUndefinedMapValue)(MarkupProcessingSharedState_1.default.outputHTML_FilesAndSourcePugFilesAbsolutePathsCorrespondenceMap, currentHTML_FileAbsolutePath__forwardSlashesPathSeparators)
|
|
10688
|
+
])();
|
|
10689
|
+
this.absolutePathOfFilesWaitingForReProcessing.clear();
|
|
10690
|
+
return;
|
|
10691
|
+
}
|
|
10692
|
+
}
|
|
10693
|
+
this.processEntryPoints(this.sourceCodeSelectiveReprocessingHelper?.getAbsolutePathsOfEntryPointsWhichMustBeProcessed(this.absolutePathOfFilesWaitingForReProcessing) ?? [])();
|
|
10694
|
+
this.absolutePathOfFilesWaitingForReProcessing.clear();
|
|
10650
10695
|
}
|
|
10651
10696
|
onEntryPointFileAdded(targetFileAbsolutePath__forwardSlashesSeparators) {
|
|
10652
10697
|
MarkupProcessingSharedState_1.default.pagesVariationsMetadata.set(targetFileAbsolutePath__forwardSlashesSeparators, this.markupProcessingSettingsRepresentative.createPageVariationsMetadata(targetFileAbsolutePath__forwardSlashesSeparators));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamato-daiwa/automation",
|
|
3
|
-
"version": "0.9.0-alpha.
|
|
3
|
+
"version": "0.9.0-alpha.3",
|
|
4
4
|
"description": "The project building tool with declarative YAML configuration specializing on Pug, Stylus and TypeScript as source code languages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|