You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cache-bundle-automation : Deprecate cacheBundleUploadService and use errorReportService instead
command task : cache-bundle-automation
cache-bundle-js : Support monitor mode
plugin: @thin-hook/cache-bundle-js : In monitoring mode, skip collecting data for cache-bundle.json
update-html-hash : Deprecate cacheBundleUploadService and use errorReportService instead
command task : update-html-hash
integrity-service-helpers : Skip building if already built
command task : integrity-service-helpers
plugin: [path.backend]/integrity-service-helpers
validation-console : Skip building if already built
command task : validation-console
plugin: [path.backend]/validatioin-console
cacheBundleGeneration.js : Avoid deprecated puppeteer API page.waitFor()
plugin: [path.backend]/cacheBundleGeneration.js
integrityService.js : Support monitor mode
plugin: [path.backend]/integrityService.js : In monitor mode, skip the host name (authority) check and the hash (ClientIntegrity) validation for reportage to work
cache-automation-js : Support monitor mode
NEW script: [path.base]/[path.config]/cache-automation-js/monitoring-automation.js : import reportage reporter script
script: [path.base]/[path.config]/cache-automation-js/automation.js : include monitoring-automation.js if enableMonitoring is true
[enhancement] TypeScript support
Motivations
TypeScript is the de-facto standard for the current web development
Language features beyond ES2018 can be supported through transpilation
Design Principles
Compatible libraries (ES2018-target) can replace the released versions to achieve compatibility
transpile phase is newly introduced to preprocess the sources into executable JavaScript
The target directory of the transpile phase can be either root or raw directory
Both bundling and raw execution are supported with the same module access policies
Components and Features
NEWtranspileTarget : Configure where to perform transpile phase tasks; raw or root
NEW config: ['path'].transpileTarget : raw or root
NEWbuild-compat-libs : Build compatible libraries for thin-hook (ES2018)
NEW command task: build-compat-libs
NEW config: ['path'].compatLib
NEW shell script: [path.base]/[path.compatLib]/build-compat-libs.sh : any build scripts can be added
NEW sample shell script: [path.base]/[path.compatLib]/build-react.sh : React with ESM exports
NEW sample shell script: [path.base]/[path.compatLib]/build-material-web.sh : @material/web with ES2018 target
phase: prepare
NEWnon-js-imports : Support importing non-js contents from modules
NEW task: non-js-imports
NEW plubin: @thin-hook/non-js-imports
NEW config: ['non-js-imports']
phase: transpile
NEWfrontend-modules-raw : Install frontend modules in [path.base]/[path.raw]/
NEW command task: frontend-modules-raw
phase: prepare
NEWfrontend-modules-locked-production : Install frontend modules in [path.base]/[path.root]/
NEW command task: frontend-modules-locked-production
phase: postTranspile
NEWcompile-scss : Compile scss to css in [path.base]/[path[path.tranpileTarget]]/
NEW command task: compile-scss
NEW config: ['non-js-imports'].scssDirectories : get the list of directories with scss files
NEW package dependency: sass
phase: transpile
NEWtypescript : Compile TypeScript in [path.base]/[path[path.tranpileTarget]]/
NEW command task: typescript
NEW package dependency: typescript
phase: transpile
Updated inject phases
inject : Introduce monitoring mode and TypeScript support
NEW phase: init : typically [ generate-version ]
NEW phase: prepare : typilcally [ build-compat-libs, frontend-modules-raw ]
NEW phase: transpile : typilcally [ compile-scss, typescript, non-js-imports ]
NEW phase: postTranspile: typically [ frontend-modules-locked-production ]
NEW phase: reportage : typically [ reportage-nginx-mkdir-log, reportage-nginx-conf, reportage-config-js ]
NEW phase: monitoring: typically [ dummy-script-hashes-integrity, clean-gzip-json, dummy-integrity, cache-bundle-automation-json ]
NEW phases prepareRoot : list of phases for preparing [path.base]/[path.root]
phases with transpileTarget : root : typically [ prepare, clean, transpile, postTranspile ]
phases with transpileTarget : raw : typically [ prepare, transpile, clean, postTranspile ]
phases with enableMonitoring : false : typically [ init, ...prepareRoot, backend, plugin, cache, frontend ]
phases with enableMonitoring : true : typically [ init, ...prepareRoot, backend, reportage, plugin, monitoring ]
[enhancement] Integrate with reportage and TypeScript
[monitoring] Introduce monitoring mode
Motivations
reportagetest runnerDesign Principles
monitoringmode is disabled, the build is the same as before the mode is introducedmonitoringmode is enabled, some security features are temporarily loosened so thatreportagecan work withthin-hookapplicationsComponents and Features
NEW
enableMonitoring: Enable/Disable monitoring mode['mode'].enableMonitoring:trueorfalseNEW
monitor: StartmonitorserversmonitorNEW
monitorServer: StartmonitorHTTPS servermonitorServercalled frommonitorconfig:
bootstrap-js: Allow no-hook scripts from reporter server['bootstrap-js'].additionalParameters:trueonenableMonitoring['bootstrap-js'].enableMonitoring['bootstrap-js'].reporterOrigin[path.base]/[path.config]/bootstrap-js/parameters.js:hook.parameters.noHookforreporterOriginifenableMonitoringistrueconfig:
policy: Allow no-hook scripts from reporter server['policy'].enableMonitoring['policy'].reporterOrigin: Allow reporter and test scripts to run as no-hook[path.base]/[path.config]/wildcardWhitelist.js: Inmonitoringmode, allowreportage's reporterOrigin scripts to run as no-hookNEW
generate-version: Flexible customization of app version at['hook-min-js'].searchParams.version@thin-hook/generate-versiongenerate-version['generate-version']initNEW
reportage-nginx-conf: Generate[path.base]/nginx.confforreportagereporter serverreportage-nginx-conf@thin-hook/reportage-nginx-conf['reportage-nginx-conf'][path.base]/[path.config]/reportage-nginx-conf/nginx.conf: template for[path.base]/nginx.confreportageNEW
reportage-config-js: Generate[path.base]/[path.test]/reportage.config.jsforreportagereportage-config-js@thin-hook/reportage-config-js['reportage-config-js'][path.base]/[path.config]/reportage-config-js/reportage.config.js: template for[path.base]/[path.test]/reportage.config.js[path.base]/[path.test]/package.json: Set"type":"module"to load[path.base]/[path.test]/*.js as ES modulesreportageNEW sample tests for
reportage[path.base]/[path.test]/suites-loader.js[path.base]/[path.test]/common-suite.js[path.base]/[path.test]/basic-suite.jsNEW
reportage-nginx-mkdir-log: Create[path.base]/[path.test]/logdirectoryreportage-nginx-mkdir-logNEW
reportage-nginx-start: Start nginx in backgroundreportage-nginx-start['reportage-nginx-conf']NEW
reportage-nginx-stop: Stop nginxreportage-nginx-stop['reportage-nginx-conf']NEW
reportage-nginx-foreground: Start nginx in foregroundreportage-nginx-foreground['reportage-nginx-conf']NEW
reportage-run: StartreportageCLI testreportage-run['reportage-config-js']NEW
reportage-browser: Launch Chrome browser locally on Linux withreportageconfigurationsreportage-browser['reportage-config-js']NEW
reportage-browser-wsl: Launch Chrome for Windows from within Ubuntu WSL withreportageconfigurationsreportage-browser-wsl['reportage-config-js']NEW
reportage-browser-windows-cmd: Generate a Windows cmd file for launching Chrome for Windows withreportageconfigurations for VMwarereportage-browser-windows-command['reportage-config-js']generate-cert-sh: Support wildcard host names forreportage@thin-hook/generate-cert-sh[path.base]/[path.keys]/generate_cert.sh:1.localhost...32.localhost,*.${SERVER_HOST}[path.base]/[path.keys]/[certificates.CA]/wildcard.${HOST}.[key|crt]cache-bundle-automation: DeprecatecacheBundleUploadServiceand useerrorReportServiceinsteadcache-bundle-automationcache-bundle-js: Supportmonitormode@thin-hook/cache-bundle-js: Inmonitoringmode, skip collecting data forcache-bundle.jsonupdate-html-hash: DeprecatecacheBundleUploadServiceand useerrorReportServiceinsteadupdate-html-hashintegrity-service-helpers: Skip building if already builtintegrity-service-helpers[path.backend]/integrity-service-helpersvalidation-console: Skip building if already builtvalidation-console[path.backend]/validatioin-consolecacheBundleGeneration.js: Avoid deprecated puppeteer APIpage.waitFor()[path.backend]/cacheBundleGeneration.jsintegrityService.js: Supportmonitormode[path.backend]/integrityService.js: Inmonitormode, skip the host name (authority) check and the hash (ClientIntegrity) validation forreportageto workcache-automation-js: Supportmonitormode[path.base]/[path.config]/cache-automation-js/monitoring-automation.js: importreportagereporter script[path.base]/[path.config]/cache-automation-js/automation.js: includemonitoring-automation.jsifenableMonitoringistrue[enhancement] TypeScript support
Motivations
Design Principles
transpilephase is newly introduced to preprocess the sources into executable JavaScripttranspilephase can be eitherrootorrawdirectoryComponents and Features
NEW
transpileTarget: Configure where to performtranspilephase tasks;raworroot['path'].transpileTarget:raworrootNEW
build-compat-libs: Build compatible libraries for thin-hook (ES2018)build-compat-libs['path'].compatLib[path.base]/[path.compatLib]/build-compat-libs.sh: any build scripts can be added[path.base]/[path.compatLib]/build-react.sh: React with ESM exports[path.base]/[path.compatLib]/build-material-web.sh:@material/webwith ES2018 targetprepareNEW
non-js-imports: Support importing non-js contents from modulesnon-js-imports@thin-hook/non-js-imports['non-js-imports']transpileNEW
frontend-modules-raw: Install frontend modules in[path.base]/[path.raw]/frontend-modules-rawprepareNEW
frontend-modules-locked-production: Install frontend modules in[path.base]/[path.root]/frontend-modules-locked-productionpostTranspileNEW
compile-scss: Compile scss to css in[path.base]/[path[path.tranpileTarget]]/compile-scss['non-js-imports'].scssDirectories: get the list of directories with scss filessasstranspileNEW
typescript: Compile TypeScript in[path.base]/[path[path.tranpileTarget]]/typescripttypescripttranspileUpdated
injectphasesinject: Introduce monitoring mode and TypeScript supportinit: typically [generate-version]prepare: typilcally [build-compat-libs,frontend-modules-raw]transpile: typilcally [compile-scss,typescript,non-js-imports]postTranspile: typically [frontend-modules-locked-production]reportage: typically [reportage-nginx-mkdir-log,reportage-nginx-conf,reportage-config-js]monitoring: typically [dummy-script-hashes-integrity,clean-gzip-json,dummy-integrity,cache-bundle-automation-json]prepareRoot: list of phases for preparing[path.base]/[path.root]transpileTarget:root: typically [prepare,clean,transpile,postTranspile]transpileTarget:raw: typically [prepare,transpile,clean,postTranspile]enableMonitoring:false: typically [init, ...prepareRoot,backend,plugin,cache,frontend]enableMonitoring:true: typically [init, ...prepareRoot,backend,reportage,plugin,monitoring]