@eggjs/tegg-common-util 4.0.2-beta.16 → 4.0.2-beta.17

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.
@@ -7,7 +7,8 @@ declare class ModuleReferenceConfigHelp {
7
7
  }
8
8
  declare class ModuleConfigUtil {
9
9
  #private;
10
- static configNames: string[] | undefined;
10
+ static get configNames(): string[] | undefined;
11
+ static set configNames(configNames: string[] | undefined);
11
12
  static setConfigNames(configNames: string[] | undefined): void;
12
13
  static readModuleReference(baseDir: string, options?: ReadModuleReferenceOptions): readonly ModuleReference[];
13
14
  private static readModuleReferenceFromModuleJson;
@@ -2,6 +2,7 @@ import { FSUtil } from "./FSUtil.js";
2
2
  import assert from "node:assert";
3
3
  import fs, { promises } from "node:fs";
4
4
  import path from "node:path";
5
+ import { TeggScope } from "@eggjs/tegg-types";
5
6
  import { importResolve } from "@eggjs/utils";
6
7
  import { extend } from "extend2";
7
8
  import globby from "globby";
@@ -17,8 +18,14 @@ var ModuleReferenceConfigHelp = class {
17
18
  }
18
19
  };
19
20
  const DEFAULT_READ_MODULE_REF_OPTS = { deep: 10 };
21
+ const CONFIG_NAMES_SLOT = Symbol("tegg:common-util:moduleConfigNames");
20
22
  var ModuleConfigUtil = class ModuleConfigUtil {
21
- static configNames;
23
+ static get configNames() {
24
+ return TeggScope.getOr(CONFIG_NAMES_SLOT, () => void 0, "ModuleConfigUtil.configNames");
25
+ }
26
+ static set configNames(configNames) {
27
+ TeggScope.set(CONFIG_NAMES_SLOT, configNames);
28
+ }
22
29
  static setConfigNames(configNames) {
23
30
  ModuleConfigUtil.configNames = configNames;
24
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eggjs/tegg-common-util",
3
- "version": "4.0.2-beta.16",
3
+ "version": "4.0.2-beta.17",
4
4
  "description": "common util for tegg",
5
5
  "keywords": [
6
6
  "collection",
@@ -38,8 +38,8 @@
38
38
  "globby": "^11.0.2",
39
39
  "js-yaml": "^4.1.1",
40
40
  "reflect-metadata": "^0.2.2",
41
- "@eggjs/tegg-types": "4.0.2-beta.16",
42
- "@eggjs/utils": "5.0.2-beta.16"
41
+ "@eggjs/tegg-types": "4.0.2-beta.17",
42
+ "@eggjs/utils": "5.0.2-beta.17"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/js-yaml": "^4.0.9",