@arc-js/config-manager 0.0.94 → 0.0.95

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.
package/config.d.ts CHANGED
@@ -1,17 +1,20 @@
1
- declare const DEFAULT_CONFIG = "base";
1
+ declare const DEFAULT_SCOPE = "app";
2
+ declare const COOKIE_NAME = "app_config_scope";
3
+ type ConfigScope = string;
2
4
  interface ConfigMap {
3
- [key: string]: () => Promise<Record<string, any>>;
5
+ [scope: string]: () => Promise<Record<string, any>>;
4
6
  }
5
7
  interface ModuleConfigs {
6
8
  [moduleName: string]: () => Promise<Record<string, any>>;
7
9
  }
8
- interface ConfigData {
9
- base: ConfigMap;
10
+ interface ConfigManagerConfig {
11
+ base: {
12
+ [scope: string]: () => Promise<Record<string, any>>;
13
+ };
10
14
  modules?: ModuleConfigs;
11
15
  }
12
- type ConfigManagerConfig = ConfigData;
13
- declare let configManagerConfig: ConfigManagerConfig | null;
14
- declare const setConfigManagerConfig: (config: ConfigManagerConfig) => void;
16
+ declare const getSavedScope: () => ConfigScope;
17
+ declare const saveScope: (scope: ConfigScope) => void;
15
18
 
16
- export { DEFAULT_CONFIG, configManagerConfig, setConfigManagerConfig };
17
- export type { ConfigData, ConfigManagerConfig, ConfigMap, ModuleConfigs };
19
+ export { COOKIE_NAME, DEFAULT_SCOPE, getSavedScope, saveScope };
20
+ export type { ConfigManagerConfig, ConfigMap, ConfigScope, ModuleConfigs };