@arc-js/config-manager 0.0.5 → 0.0.6
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/index.d.ts +2 -34
- package/index.js +2 -2516
- package/index.min.js +1 -1
- package/package.json +2 -4
- package/providers/ConfigProvider.jsx +14 -11
- package/providers/ConfigProvider.tsx +64 -62
package/index.d.ts
CHANGED
|
@@ -1,35 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
[key: string]: () => Promise<Record<string, any>>;
|
|
3
|
-
}
|
|
4
|
-
interface ModuleConfigs {
|
|
5
|
-
[moduleName: string]: () => Promise<Record<string, any>>;
|
|
6
|
-
}
|
|
7
|
-
interface ConfigData {
|
|
8
|
-
base: ConfigMap;
|
|
9
|
-
modules?: ModuleConfigs;
|
|
10
|
-
}
|
|
11
|
-
type ConfigManagerConfig = ConfigData;
|
|
1
|
+
declare const _default: {};
|
|
12
2
|
|
|
13
|
-
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
configs: ConfigManagerConfig;
|
|
16
|
-
}>;
|
|
17
|
-
declare const useConfigManager: () => any;
|
|
18
|
-
|
|
19
|
-
declare const useConfig: (moduleName?: string) => {
|
|
20
|
-
cf: (key: string, options?: any) => any;
|
|
21
|
-
getConfig: any;
|
|
22
|
-
reloadConfig: any;
|
|
23
|
-
isLoading: any;
|
|
24
|
-
isModuleLoaded: boolean;
|
|
25
|
-
loadModuleConfig: any;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
interface ConfigOptions {
|
|
29
|
-
moduleName?: string;
|
|
30
|
-
defaultValue?: any;
|
|
31
|
-
pathSeparator?: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { ConfigManagerProvider, useConfig, useConfigManager };
|
|
35
|
-
export type { ConfigManagerConfig, ConfigOptions };
|
|
3
|
+
export { _default as default };
|