@zeesoft/i18n-verify 3.2.4 → 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 +44 -40
- 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(),
|
|
@@ -5772,10 +5775,11 @@ class BaseValidator {
|
|
|
5772
5775
|
suitableLocale = locale;
|
|
5773
5776
|
} else {
|
|
5774
5777
|
const temp = locale.split("-")[0];
|
|
5775
|
-
|
|
5776
|
-
|
|
5778
|
+
const firstMatch = locales.find((l) => l.startsWith(temp));
|
|
5779
|
+
if (firstMatch) {
|
|
5780
|
+
suitableLocale = firstMatch;
|
|
5777
5781
|
} else {
|
|
5778
|
-
suitableLocale =
|
|
5782
|
+
suitableLocale = "en";
|
|
5779
5783
|
}
|
|
5780
5784
|
}
|
|
5781
5785
|
return suitableLocale;
|
|
@@ -6646,8 +6650,8 @@ const loadDependencies = () => {
|
|
|
6646
6650
|
if (Config.getDriver() && !Config.isLoaded() && Config.getLocale()) {
|
|
6647
6651
|
Config.build();
|
|
6648
6652
|
Resource.load();
|
|
6649
|
-
Validator.load();
|
|
6650
6653
|
Reports.setup();
|
|
6654
|
+
Validator.load();
|
|
6651
6655
|
Cache.init();
|
|
6652
6656
|
Config.setIsLoaded(true);
|
|
6653
6657
|
}
|
|
@@ -6768,39 +6772,39 @@ class Config {
|
|
|
6768
6772
|
try {
|
|
6769
6773
|
const config = readConfigFile();
|
|
6770
6774
|
validateConfig(config);
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
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();
|
|
6778
6782
|
} catch (ex) {
|
|
6779
6783
|
Logger.error(ex.message);
|
|
6780
6784
|
throw ex;
|
|
6781
6785
|
}
|
|
6782
6786
|
}
|
|
6783
6787
|
static build() {
|
|
6784
|
-
|
|
6785
|
-
|
|
6788
|
+
Config.#driver = build$1(Config.#type, Config.#driver);
|
|
6789
|
+
Config.resetCounter();
|
|
6786
6790
|
}
|
|
6787
6791
|
static getGarbledChars() {
|
|
6788
|
-
return [...
|
|
6792
|
+
return [...Config.#options.garbledChars || [], ...GARBLED_CHARACTERS];
|
|
6789
6793
|
}
|
|
6790
6794
|
static getL10nReportsPath() {
|
|
6791
|
-
return
|
|
6795
|
+
return Config.#options.l10nReportsPath;
|
|
6792
6796
|
}
|
|
6793
6797
|
static setDriver(driver) {
|
|
6794
|
-
|
|
6798
|
+
Config.#driver = driver;
|
|
6795
6799
|
}
|
|
6796
6800
|
static setType(type) {
|
|
6797
|
-
|
|
6801
|
+
Config.#type = type;
|
|
6798
6802
|
}
|
|
6799
6803
|
static setLocale(locale) {
|
|
6800
|
-
|
|
6804
|
+
Config.#locale = locale;
|
|
6801
6805
|
}
|
|
6802
6806
|
static setOptions(options) {
|
|
6803
|
-
|
|
6807
|
+
Config.#options = options;
|
|
6804
6808
|
}
|
|
6805
6809
|
static getExecutor() {
|
|
6806
6810
|
if (Config.#executor) {
|
|
@@ -6811,65 +6815,65 @@ class Config {
|
|
|
6811
6815
|
"Unable to initialize process executor, driver is missing"
|
|
6812
6816
|
);
|
|
6813
6817
|
}
|
|
6814
|
-
|
|
6815
|
-
return
|
|
6818
|
+
Config.#executor = new Executor(Config.#driver);
|
|
6819
|
+
return Config.#executor;
|
|
6816
6820
|
}
|
|
6817
6821
|
static getDriver() {
|
|
6818
|
-
return
|
|
6822
|
+
return Config.#driver;
|
|
6819
6823
|
}
|
|
6820
6824
|
static getLocale() {
|
|
6821
|
-
return
|
|
6825
|
+
return Config.#locale;
|
|
6822
6826
|
}
|
|
6823
6827
|
static getDefaultLocale() {
|
|
6824
|
-
return
|
|
6828
|
+
return Config.#options.defaultLocale;
|
|
6825
6829
|
}
|
|
6826
6830
|
static getType() {
|
|
6827
|
-
return
|
|
6831
|
+
return Config.#type;
|
|
6828
6832
|
}
|
|
6829
6833
|
static getOptions() {
|
|
6830
|
-
return
|
|
6834
|
+
return Config.#options;
|
|
6831
6835
|
}
|
|
6832
6836
|
static setQALocale(locale) {
|
|
6833
|
-
|
|
6837
|
+
Config.#qaLocale = locale;
|
|
6834
6838
|
}
|
|
6835
6839
|
static getQALocale() {
|
|
6836
|
-
return
|
|
6840
|
+
return Config.#qaLocale;
|
|
6837
6841
|
}
|
|
6838
6842
|
static setResourceBundle(resources) {
|
|
6839
|
-
|
|
6843
|
+
Config.#resources = resources;
|
|
6840
6844
|
}
|
|
6841
6845
|
static getResourceBundle(value) {
|
|
6842
|
-
return
|
|
6846
|
+
return Config.#resources?.[value] || Config.#resources || [];
|
|
6843
6847
|
}
|
|
6844
6848
|
static incrementCounter() {
|
|
6845
|
-
|
|
6849
|
+
Config.#ssCount++;
|
|
6846
6850
|
}
|
|
6847
6851
|
static resetCounter() {
|
|
6848
|
-
|
|
6852
|
+
Config.#ssCount = 0;
|
|
6849
6853
|
}
|
|
6850
6854
|
static getSSCount(incrementCount = false) {
|
|
6851
|
-
return incrementCount ? ++
|
|
6855
|
+
return incrementCount ? ++Config.#ssCount : Config.#ssCount;
|
|
6852
6856
|
}
|
|
6853
6857
|
static getMode() {
|
|
6854
|
-
return
|
|
6858
|
+
return Config.#mode;
|
|
6855
6859
|
}
|
|
6856
6860
|
static isSanityRun() {
|
|
6857
|
-
return
|
|
6861
|
+
return Config.#mode === RUN_MODE.SANITY;
|
|
6858
6862
|
}
|
|
6859
6863
|
static isI18nVerificationRun() {
|
|
6860
|
-
return
|
|
6864
|
+
return Config.#mode === RUN_MODE.I18N;
|
|
6861
6865
|
}
|
|
6862
6866
|
static isContextRun() {
|
|
6863
|
-
return
|
|
6867
|
+
return Config.#mode === RUN_MODE.CONTEXT;
|
|
6864
6868
|
}
|
|
6865
6869
|
static getAppName() {
|
|
6866
|
-
return
|
|
6870
|
+
return Config.#appName;
|
|
6867
6871
|
}
|
|
6868
6872
|
static isLoaded() {
|
|
6869
|
-
return
|
|
6873
|
+
return Config.#isLoaded;
|
|
6870
6874
|
}
|
|
6871
6875
|
static setIsLoaded(value) {
|
|
6872
|
-
|
|
6876
|
+
Config.#isLoaded = value;
|
|
6873
6877
|
}
|
|
6874
6878
|
}
|
|
6875
6879
|
class BaseRunner {
|
package/package.json
CHANGED