@nu-art/ts-common 0.203.67 → 0.203.69

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.
@@ -13,6 +13,7 @@ export declare const RuntimeModules: () => {
13
13
  includes: <T_5>(module: T_5) => boolean;
14
14
  all: Module<any, any, import("..").Validator<any> | import("..").TypeValidator<any>>[];
15
15
  };
16
+ export declare const RuntimeVersion: () => string | undefined;
16
17
  export declare class ModuleManager extends Logger {
17
18
  protected config: any;
18
19
  readonly modules: {
@@ -25,9 +26,11 @@ export declare class ModuleManager extends Logger {
25
26
  all: Module<any, any, import("..").Validator<any> | import("..").TypeValidator<any>>[];
26
27
  };
27
28
  static instance: ModuleManager;
29
+ readonly version?: string;
28
30
  protected constructor();
29
31
  private static resetForTests;
30
32
  setConfig(config: object): this;
33
+ setVersion(version: string): this;
31
34
  addModulePack(modules: Module[]): this;
32
35
  init(): this;
33
36
  build(): void;
@@ -17,7 +17,7 @@
17
17
  * limitations under the License.
18
18
  */
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.ModuleManager = exports.RuntimeModules = exports.moduleResolver = void 0;
20
+ exports.ModuleManager = exports.RuntimeVersion = exports.RuntimeModules = exports.moduleResolver = void 0;
21
21
  const dispatcher_1 = require("./dispatcher");
22
22
  const exceptions_1 = require("./exceptions/exceptions");
23
23
  const Logger_1 = require("./logger/Logger");
@@ -51,8 +51,9 @@ const modulesInterface = {
51
51
  };
52
52
  const RuntimeModules = () => ModuleManager.instance.modules;
53
53
  exports.RuntimeModules = RuntimeModules;
54
+ const RuntimeVersion = () => ModuleManager.instance.version;
55
+ exports.RuntimeVersion = RuntimeVersion;
54
56
  class ModuleManager extends Logger_1.Logger {
55
- // noinspection JSUnusedLocalSymbols
56
57
  constructor() {
57
58
  super();
58
59
  this.modules = modulesInterface;
@@ -71,6 +72,11 @@ class ModuleManager extends Logger_1.Logger {
71
72
  this.config = config || {};
72
73
  return this;
73
74
  }
75
+ setVersion(version) {
76
+ // @ts-ignore
77
+ this.version = version;
78
+ return this;
79
+ }
74
80
  addModulePack(modules) {
75
81
  modules.reduce((carry, module) => {
76
82
  if (!carry.includes(module))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/ts-common",
3
- "version": "0.203.67",
3
+ "version": "0.203.69",
4
4
  "description": "js and ts infra",
5
5
  "keywords": [
6
6
  "TacB0sS",