@zeesoft/i18n-verify 3.2.5 → 3.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/executor.mjs +40 -41
- package/package.json +1 -1
package/dist/executor.mjs
CHANGED
|
@@ -4156,6 +4156,9 @@ class ReportFactory {
|
|
|
4156
4156
|
}
|
|
4157
4157
|
}
|
|
4158
4158
|
static export(type, path2, name) {
|
|
4159
|
+
if (type === SUPPORTED_REPORT_TYPES.HTML && !path2) {
|
|
4160
|
+
return;
|
|
4161
|
+
}
|
|
4159
4162
|
const builder = ReportFactory.#build(type);
|
|
4160
4163
|
const reportData = new ReportData({
|
|
4161
4164
|
appName: Config.getAppName(),
|
|
@@ -5763,7 +5766,6 @@ class BaseValidator {
|
|
|
5763
5766
|
}
|
|
5764
5767
|
#getCompatibleLocale(locale) {
|
|
5765
5768
|
if (this.isQaLocale()) {
|
|
5766
|
-
Logger.warn(`Detected QA lcoale so defaulting to 'en'.`);
|
|
5767
5769
|
return "en";
|
|
5768
5770
|
}
|
|
5769
5771
|
locale = locale.replace(/[-_ ]/g, "-");
|
|
@@ -5777,9 +5779,6 @@ class BaseValidator {
|
|
|
5777
5779
|
if (firstMatch) {
|
|
5778
5780
|
suitableLocale = firstMatch;
|
|
5779
5781
|
} else {
|
|
5780
|
-
Logger.warn(
|
|
5781
|
-
`No suitable locale found for ${locale}. Defaulting to 'en'.`
|
|
5782
|
-
);
|
|
5783
5782
|
suitableLocale = "en";
|
|
5784
5783
|
}
|
|
5785
5784
|
}
|
|
@@ -6651,8 +6650,8 @@ const loadDependencies = () => {
|
|
|
6651
6650
|
if (Config.getDriver() && !Config.isLoaded() && Config.getLocale()) {
|
|
6652
6651
|
Config.build();
|
|
6653
6652
|
Resource.load();
|
|
6654
|
-
Validator.load();
|
|
6655
6653
|
Reports.setup();
|
|
6654
|
+
Validator.load();
|
|
6656
6655
|
Cache.init();
|
|
6657
6656
|
Config.setIsLoaded(true);
|
|
6658
6657
|
}
|
|
@@ -6773,39 +6772,39 @@ class Config {
|
|
|
6773
6772
|
try {
|
|
6774
6773
|
const config = readConfigFile();
|
|
6775
6774
|
validateConfig(config);
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6775
|
+
Config.#type = config?.type;
|
|
6776
|
+
Config.#mode = config?.mode;
|
|
6777
|
+
Config.#qaLocale = config?.qaLocale;
|
|
6778
|
+
Config.#appName = config?.appName;
|
|
6779
|
+
Config.#options = config;
|
|
6780
|
+
Config.#ssCount = 0;
|
|
6781
|
+
Config.getGarbledChars();
|
|
6783
6782
|
} catch (ex) {
|
|
6784
6783
|
Logger.error(ex.message);
|
|
6785
6784
|
throw ex;
|
|
6786
6785
|
}
|
|
6787
6786
|
}
|
|
6788
6787
|
static build() {
|
|
6789
|
-
|
|
6790
|
-
|
|
6788
|
+
Config.#driver = build$1(Config.#type, Config.#driver);
|
|
6789
|
+
Config.resetCounter();
|
|
6791
6790
|
}
|
|
6792
6791
|
static getGarbledChars() {
|
|
6793
|
-
return [...
|
|
6792
|
+
return [...Config.#options.garbledChars || [], ...GARBLED_CHARACTERS];
|
|
6794
6793
|
}
|
|
6795
6794
|
static getL10nReportsPath() {
|
|
6796
|
-
return
|
|
6795
|
+
return Config.#options.l10nReportsPath;
|
|
6797
6796
|
}
|
|
6798
6797
|
static setDriver(driver) {
|
|
6799
|
-
|
|
6798
|
+
Config.#driver = driver;
|
|
6800
6799
|
}
|
|
6801
6800
|
static setType(type) {
|
|
6802
|
-
|
|
6801
|
+
Config.#type = type;
|
|
6803
6802
|
}
|
|
6804
6803
|
static setLocale(locale) {
|
|
6805
|
-
|
|
6804
|
+
Config.#locale = locale;
|
|
6806
6805
|
}
|
|
6807
6806
|
static setOptions(options) {
|
|
6808
|
-
|
|
6807
|
+
Config.#options = options;
|
|
6809
6808
|
}
|
|
6810
6809
|
static getExecutor() {
|
|
6811
6810
|
if (Config.#executor) {
|
|
@@ -6816,65 +6815,65 @@ class Config {
|
|
|
6816
6815
|
"Unable to initialize process executor, driver is missing"
|
|
6817
6816
|
);
|
|
6818
6817
|
}
|
|
6819
|
-
|
|
6820
|
-
return
|
|
6818
|
+
Config.#executor = new Executor(Config.#driver);
|
|
6819
|
+
return Config.#executor;
|
|
6821
6820
|
}
|
|
6822
6821
|
static getDriver() {
|
|
6823
|
-
return
|
|
6822
|
+
return Config.#driver;
|
|
6824
6823
|
}
|
|
6825
6824
|
static getLocale() {
|
|
6826
|
-
return
|
|
6825
|
+
return Config.#locale;
|
|
6827
6826
|
}
|
|
6828
6827
|
static getDefaultLocale() {
|
|
6829
|
-
return
|
|
6828
|
+
return Config.#options.defaultLocale;
|
|
6830
6829
|
}
|
|
6831
6830
|
static getType() {
|
|
6832
|
-
return
|
|
6831
|
+
return Config.#type;
|
|
6833
6832
|
}
|
|
6834
6833
|
static getOptions() {
|
|
6835
|
-
return
|
|
6834
|
+
return Config.#options;
|
|
6836
6835
|
}
|
|
6837
6836
|
static setQALocale(locale) {
|
|
6838
|
-
|
|
6837
|
+
Config.#qaLocale = locale;
|
|
6839
6838
|
}
|
|
6840
6839
|
static getQALocale() {
|
|
6841
|
-
return
|
|
6840
|
+
return Config.#qaLocale;
|
|
6842
6841
|
}
|
|
6843
6842
|
static setResourceBundle(resources) {
|
|
6844
|
-
|
|
6843
|
+
Config.#resources = resources;
|
|
6845
6844
|
}
|
|
6846
6845
|
static getResourceBundle(value) {
|
|
6847
|
-
return
|
|
6846
|
+
return Config.#resources?.[value] || Config.#resources || [];
|
|
6848
6847
|
}
|
|
6849
6848
|
static incrementCounter() {
|
|
6850
|
-
|
|
6849
|
+
Config.#ssCount++;
|
|
6851
6850
|
}
|
|
6852
6851
|
static resetCounter() {
|
|
6853
|
-
|
|
6852
|
+
Config.#ssCount = 0;
|
|
6854
6853
|
}
|
|
6855
6854
|
static getSSCount(incrementCount = false) {
|
|
6856
|
-
return incrementCount ? ++
|
|
6855
|
+
return incrementCount ? ++Config.#ssCount : Config.#ssCount;
|
|
6857
6856
|
}
|
|
6858
6857
|
static getMode() {
|
|
6859
|
-
return
|
|
6858
|
+
return Config.#mode;
|
|
6860
6859
|
}
|
|
6861
6860
|
static isSanityRun() {
|
|
6862
|
-
return
|
|
6861
|
+
return Config.#mode === RUN_MODE.SANITY;
|
|
6863
6862
|
}
|
|
6864
6863
|
static isI18nVerificationRun() {
|
|
6865
|
-
return
|
|
6864
|
+
return Config.#mode === RUN_MODE.I18N;
|
|
6866
6865
|
}
|
|
6867
6866
|
static isContextRun() {
|
|
6868
|
-
return
|
|
6867
|
+
return Config.#mode === RUN_MODE.CONTEXT;
|
|
6869
6868
|
}
|
|
6870
6869
|
static getAppName() {
|
|
6871
|
-
return
|
|
6870
|
+
return Config.#appName;
|
|
6872
6871
|
}
|
|
6873
6872
|
static isLoaded() {
|
|
6874
|
-
return
|
|
6873
|
+
return Config.#isLoaded;
|
|
6875
6874
|
}
|
|
6876
6875
|
static setIsLoaded(value) {
|
|
6877
|
-
|
|
6876
|
+
Config.#isLoaded = value;
|
|
6878
6877
|
}
|
|
6879
6878
|
}
|
|
6880
6879
|
class BaseRunner {
|
package/package.json
CHANGED