@nano-lib/util 1.1.9 → 1.1.10
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/lib/index.d.ts +1 -1
- package/lib/index.js +5 -5
- package/lib/index.mjs +175 -185
- package/lib/types/index.d.ts +9 -0
- package/lib/utils/common.d.ts +1 -2
- package/package.json +1 -1
package/lib/types/index.d.ts
CHANGED
|
@@ -28,6 +28,15 @@ export type EnvConfigType = {
|
|
|
28
28
|
MODE: string;
|
|
29
29
|
DEV: boolean;
|
|
30
30
|
PRO: boolean;
|
|
31
|
+
VITE_APP_ENV: 'development' | 'production' | 'staging';
|
|
32
|
+
VITE_APP_TITLE: string;
|
|
33
|
+
VITE_APP_PORT: number;
|
|
34
|
+
VITE_APP_HOST: string;
|
|
35
|
+
VITE_APP_OUT_DIR: string;
|
|
36
|
+
VITE_APP_PUBLIC_PATH: string;
|
|
37
|
+
VITE_APP_DROP_CONSOLE: boolean;
|
|
38
|
+
VITE_APP_BUILD_COMPRESS: 'gzip' | 'brotli' | 'gzip,brotli' | 'none';
|
|
39
|
+
VITE_APP_OPEN_BROWSER: boolean;
|
|
31
40
|
[key: string]: string | number | boolean;
|
|
32
41
|
};
|
|
33
42
|
export type OptionType = {
|
package/lib/utils/common.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PromiseFn, Nullable, Fn, ProtocolType, AnyObj
|
|
1
|
+
import { PromiseFn, Nullable, Fn, ProtocolType, AnyObj } from '../types';
|
|
2
2
|
export declare const NOOP: () => void;
|
|
3
3
|
export declare function sleep(x: number): Promise<unknown>;
|
|
4
4
|
export declare function countdownTimer(x: number, cb: (x: number) => void | undefined): Promise<boolean>;
|
|
@@ -47,4 +47,3 @@ export declare function getPercentage(number: number, total: number, integer?: b
|
|
|
47
47
|
export declare function loadCss(url: string): void;
|
|
48
48
|
export declare function loadJs(src: string): Promise<void>;
|
|
49
49
|
export declare function getMapLocationIcon(color: string, width?: number, height?: number): string;
|
|
50
|
-
export declare function warpperEnv(envConfig: Recordable<string>, mode: string): EnvConfigType;
|