@omnia/tooling 8.0.197-dev → 8.0.198-dev

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,18 @@ _globalThis.o$ = {
7
7
  function addEnums(name) {
8
8
  return {
9
9
  value(data) {
10
- _globalThis.o$.enums[name] = data;
10
+ let ns = _globalThis.o$.enums;
11
+ const parts = name.split(".");
12
+ parts.forEach((p, index) => {
13
+ if (!ns[p] && index !== parts.length - 1) {
14
+ ns[p] = {};
15
+ ns = ns[p];
16
+ }
17
+ else if (index !== parts.length - 1) {
18
+ ns = ns[p];
19
+ }
20
+ });
21
+ ns[parts[parts.length - 1]] = data;
11
22
  }
12
23
  };
13
24
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/tooling",
3
3
  "license": "MIT",
4
- "version": "8.0.197-dev",
4
+ "version": "8.0.198-dev",
5
5
  "description": "Provide basic stuffs extensible for omnia extension.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "main": "index.js",
28
28
  "dependencies": {
29
- "@omnia/types": "8.0.197-dev",
29
+ "@omnia/types": "8.0.198-dev",
30
30
  "@types/node": "18.13.0",
31
31
  "tslib": "2.6.2",
32
32
  "typescript": "5.3.3",