@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.
Files changed (2) hide show
  1. package/dist/executor.mjs +40 -41
  2. 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
- this.#type = config?.type;
6777
- this.#mode = config?.mode;
6778
- this.#qaLocale = config?.qaLocale;
6779
- this.#appName = config?.appName;
6780
- this.#options = config;
6781
- this.#ssCount = 0;
6782
- this.getGarbledChars();
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
- this.#driver = build$1(this.#type, this.#driver);
6790
- this.resetCounter();
6788
+ Config.#driver = build$1(Config.#type, Config.#driver);
6789
+ Config.resetCounter();
6791
6790
  }
6792
6791
  static getGarbledChars() {
6793
- return [...this.#options.garbledChars || [], ...GARBLED_CHARACTERS];
6792
+ return [...Config.#options.garbledChars || [], ...GARBLED_CHARACTERS];
6794
6793
  }
6795
6794
  static getL10nReportsPath() {
6796
- return this.#options.l10nReportsPath;
6795
+ return Config.#options.l10nReportsPath;
6797
6796
  }
6798
6797
  static setDriver(driver) {
6799
- this.#driver = driver;
6798
+ Config.#driver = driver;
6800
6799
  }
6801
6800
  static setType(type) {
6802
- this.#type = type;
6801
+ Config.#type = type;
6803
6802
  }
6804
6803
  static setLocale(locale) {
6805
- this.#locale = locale;
6804
+ Config.#locale = locale;
6806
6805
  }
6807
6806
  static setOptions(options) {
6808
- this.#options = options;
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
- this.#executor = new Executor(this.#driver);
6820
- return this.#executor;
6818
+ Config.#executor = new Executor(Config.#driver);
6819
+ return Config.#executor;
6821
6820
  }
6822
6821
  static getDriver() {
6823
- return this.#driver;
6822
+ return Config.#driver;
6824
6823
  }
6825
6824
  static getLocale() {
6826
- return this.#locale;
6825
+ return Config.#locale;
6827
6826
  }
6828
6827
  static getDefaultLocale() {
6829
- return this.#options.defaultLocale;
6828
+ return Config.#options.defaultLocale;
6830
6829
  }
6831
6830
  static getType() {
6832
- return this.#type;
6831
+ return Config.#type;
6833
6832
  }
6834
6833
  static getOptions() {
6835
- return this.#options;
6834
+ return Config.#options;
6836
6835
  }
6837
6836
  static setQALocale(locale) {
6838
- this.#qaLocale = locale;
6837
+ Config.#qaLocale = locale;
6839
6838
  }
6840
6839
  static getQALocale() {
6841
- return this.#qaLocale;
6840
+ return Config.#qaLocale;
6842
6841
  }
6843
6842
  static setResourceBundle(resources) {
6844
- this.#resources = resources;
6843
+ Config.#resources = resources;
6845
6844
  }
6846
6845
  static getResourceBundle(value) {
6847
- return this.#resources?.[value] || this.#resources || [];
6846
+ return Config.#resources?.[value] || Config.#resources || [];
6848
6847
  }
6849
6848
  static incrementCounter() {
6850
- this.#ssCount++;
6849
+ Config.#ssCount++;
6851
6850
  }
6852
6851
  static resetCounter() {
6853
- this.#ssCount = 0;
6852
+ Config.#ssCount = 0;
6854
6853
  }
6855
6854
  static getSSCount(incrementCount = false) {
6856
- return incrementCount ? ++this.#ssCount : this.#ssCount;
6855
+ return incrementCount ? ++Config.#ssCount : Config.#ssCount;
6857
6856
  }
6858
6857
  static getMode() {
6859
- return this.#mode;
6858
+ return Config.#mode;
6860
6859
  }
6861
6860
  static isSanityRun() {
6862
- return this.#mode === RUN_MODE.SANITY;
6861
+ return Config.#mode === RUN_MODE.SANITY;
6863
6862
  }
6864
6863
  static isI18nVerificationRun() {
6865
- return this.#mode === RUN_MODE.I18N;
6864
+ return Config.#mode === RUN_MODE.I18N;
6866
6865
  }
6867
6866
  static isContextRun() {
6868
- return this.#mode === RUN_MODE.CONTEXT;
6867
+ return Config.#mode === RUN_MODE.CONTEXT;
6869
6868
  }
6870
6869
  static getAppName() {
6871
- return this.#appName;
6870
+ return Config.#appName;
6872
6871
  }
6873
6872
  static isLoaded() {
6874
- return this.#isLoaded;
6873
+ return Config.#isLoaded;
6875
6874
  }
6876
6875
  static setIsLoaded(value) {
6877
- this.#isLoaded = value;
6876
+ Config.#isLoaded = value;
6878
6877
  }
6879
6878
  }
6880
6879
  class BaseRunner {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeesoft/i18n-verify",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
4
4
  "description": "Library to perform I18n verification on Nightwatch, WebdriverIO or Selenium framework projects",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",