abler-api 0.1.58 → 0.1.60

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/cjs/pp-util.js +18 -14
  2. package/package.json +1 -1
@@ -1612,22 +1612,25 @@ class preconditions$1 {
1612
1612
  return preconditions$1;
1613
1613
  }
1614
1614
 
1615
+ static pushMessage(msg) {
1616
+ if (msg) {
1617
+ if (!preconditions$1.messages) {
1618
+ preconditions$1.messages = [];
1619
+ }
1620
+
1621
+ preconditions$1.messages.push(`${preconditions$1.messages.length + 1}. ${msg}`);
1622
+ }
1623
+ }
1624
+
1615
1625
  static async checkAll() {
1616
1626
  for (let i = 0; i < preconditions$1.checkFunctions.length; i++) {
1617
- const f = preconditions$1.checkFunctions[i];
1618
- preconditions$1.addCheckPromise(f.check(f.args));
1627
+ const f = preconditions$1.checkFunctions[i]; // preconditions.addCheckPromise(f.check(f.args));
1628
+
1629
+ preconditions$1.pushMessage(await f.check(f.args));
1619
1630
  }
1620
1631
 
1621
1632
  for (let i = 0; i < preconditions$1.checkPromises.length; i++) {
1622
- let msg = await preconditions$1.checkPromises[i];
1623
-
1624
- if (msg) {
1625
- if (!preconditions$1.messages) {
1626
- preconditions$1.messages = [];
1627
- }
1628
-
1629
- preconditions$1.messages.push(`${preconditions$1.messages.length + 1}. ${msg}`);
1630
- }
1633
+ preconditions$1.pushMessage(await preconditions$1.checkPromises[i]);
1631
1634
  }
1632
1635
 
1633
1636
  let text = "";
@@ -1710,12 +1713,13 @@ async function checkExEnvSetting(loadjs) {
1710
1713
  let msg = await createEnvSettingFile(fileName, envSettingEx);
1711
1714
 
1712
1715
  if (!msg) {
1713
- delete require.cache[fileName];
1714
- ppUtil$3.importExEnvSetting(conf$2._envSetting, fileName, loadjs);
1716
+ return msg;
1715
1717
  }
1716
1718
 
1717
- return msg;
1719
+ delete require.cache[fileName];
1718
1720
  }
1721
+
1722
+ ppUtil$3.importExEnvSetting(conf$2._envSetting, fileName, loadjs);
1719
1723
  }
1720
1724
  } // async function checkDatabase() {
1721
1725
  // return dbCheck.check().then(info => info.updateMessage);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abler-api",
3
- "version": "0.1.58",
3
+ "version": "0.1.60",
4
4
  "description": "API服务相关工具",
5
5
  "main": "./dist/cjs/pp-util.js",
6
6
  "-module": "./dist/es/pp-util.js",