@nu-art/thunderstorm-backend 0.401.5 → 0.401.7

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.
@@ -11,7 +11,13 @@ export class ModuleBE_AppConfigDB_Class extends ModuleBE_BaseDB {
11
11
  this.logVerbose('############## Pre Manipulation ##############');
12
12
  this.logVerbose(dbInstance);
13
13
  const appKey = this.keyMap[dbInstance.key];
14
- dbInstance.data = await appKey.dataManipulator(dbInstance.data);
14
+ try {
15
+ dbInstance.data = await appKey.dataManipulator(dbInstance.data);
16
+ }
17
+ catch (err) {
18
+ this.logError(`Failed to manipulate data on key ${dbInstance.key}`);
19
+ throw err;
20
+ }
15
21
  this.logVerbose('############## Post Manipulation ##############');
16
22
  this.logVerbose(dbInstance);
17
23
  }
package/core/BaseStorm.js CHANGED
@@ -29,11 +29,16 @@ export class BaseStorm extends ModuleManager {
29
29
  if (typeof config === 'string')
30
30
  this.innerConfig = {
31
31
  envKey: config,
32
- pathToDefaultConfig: `_config/default.json`,
33
- pathToEnvOverrideConfig: `_config/${config}.json`,
32
+ pathToDefaultConfig: `_config/default`,
33
+ pathToEnvOverrideConfig: `_config/${config}`,
34
34
  };
35
- else
35
+ else {
36
+ if (config.pathToDefaultConfig.startsWith('/'))
37
+ config.pathToDefaultConfig = config.pathToDefaultConfig.substring(1);
38
+ if (config.pathToEnvOverrideConfig.startsWith('/'))
39
+ config.pathToEnvOverrideConfig = config.pathToEnvOverrideConfig.substring(1);
36
40
  this.innerConfig = config;
41
+ }
37
42
  }
38
43
  getEnvironment() {
39
44
  return this.innerConfig.envKey;
@@ -54,11 +59,11 @@ export class BaseStorm extends ModuleManager {
54
59
  initialized++;
55
60
  };
56
61
  const defaultPromise = new Promise((resolve) => {
57
- this.logInfo(`Loading default config from: ${database.getUrl()}${this.innerConfig.pathToDefaultConfig}`);
62
+ this.logInfo(`Loading default config from: ${database.getUrl()}/${this.innerConfig.pathToDefaultConfig}`);
58
63
  database.listen(`/${this.innerConfig.pathToDefaultConfig}`, listener(resolve));
59
64
  });
60
65
  const envPromise = new Promise((resolve) => {
61
- this.logInfo(`Loading env override config from: ${database.getUrl()}${this.innerConfig.pathToEnvOverrideConfig}`);
66
+ this.logInfo(`Loading env override config from: ${database.getUrl()}/${this.innerConfig.pathToEnvOverrideConfig}`);
62
67
  database.listen(`/${this.innerConfig.pathToEnvOverrideConfig}`, listener(resolve));
63
68
  });
64
69
  const [defaultConfig, overrideConfig] = await Promise.all([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/thunderstorm-backend",
3
- "version": "0.401.5",
3
+ "version": "0.401.7",
4
4
  "description": "Thunderstorm Backend",
5
5
  "keywords": [
6
6
  "TacB0sS",
@@ -37,12 +37,12 @@
37
37
  "linkDirectory": true
38
38
  },
39
39
  "dependencies": {
40
- "@nu-art/testalot": "0.401.5",
41
- "@nu-art/thunderstorm-shared": "0.401.5",
42
- "@nu-art/firebase-backend": "0.401.5",
43
- "@nu-art/firebase-shared": "0.401.5",
44
- "@nu-art/google-services-backend": "0.401.5",
45
- "@nu-art/ts-common": "0.401.5",
40
+ "@nu-art/testalot": "0.401.7",
41
+ "@nu-art/thunderstorm-shared": "0.401.7",
42
+ "@nu-art/firebase-backend": "0.401.7",
43
+ "@nu-art/firebase-shared": "0.401.7",
44
+ "@nu-art/google-services-backend": "0.401.7",
45
+ "@nu-art/ts-common": "0.401.7",
46
46
  "abort-controller": "^3.0.0",
47
47
  "axios": "^1.13.1",
48
48
  "body-parser": "^1.19.0",