dff-util 1.1.4 → 1.1.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/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/main/const-type.d.ts +2 -0
- package/dist/main/http.d.ts +2 -2
- package/dist/main/http.js +1 -1
- package/global.d.ts +1 -0
- package/package.json +3 -3
- package/tsconfig.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 [DFF TECH]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -214,6 +214,7 @@ export type SessionInfo = {
|
|
|
214
214
|
mobile?: string;
|
|
215
215
|
name?: string;
|
|
216
216
|
roles: string[];
|
|
217
|
+
type?: string;
|
|
217
218
|
requestId?: string;
|
|
218
219
|
token?: string;
|
|
219
220
|
iat?: number;
|
|
@@ -231,6 +232,7 @@ export type SessionUser = {
|
|
|
231
232
|
mobile?: string;
|
|
232
233
|
name?: string;
|
|
233
234
|
roles: string[];
|
|
235
|
+
type?: string;
|
|
234
236
|
};
|
|
235
237
|
```
|
|
236
238
|
|
|
@@ -5,6 +5,7 @@ export type SessionInfo = {
|
|
|
5
5
|
name?: string;
|
|
6
6
|
roles: string[];
|
|
7
7
|
requestId?: string;
|
|
8
|
+
type?: string;
|
|
8
9
|
token?: string;
|
|
9
10
|
iat?: number;
|
|
10
11
|
exp?: number;
|
|
@@ -16,6 +17,7 @@ export type SessionUser = {
|
|
|
16
17
|
mobile?: string;
|
|
17
18
|
name?: string;
|
|
18
19
|
roles: string[];
|
|
20
|
+
type?: string;
|
|
19
21
|
};
|
|
20
22
|
export type ResponseType = {
|
|
21
23
|
status?: string | number;
|
package/dist/main/http.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const BaseHeaders: {
|
|
|
15
15
|
'x-request-id': null;
|
|
16
16
|
};
|
|
17
17
|
export declare class Http {
|
|
18
|
-
static API_BASE_URL: string
|
|
18
|
+
static API_BASE_URL: string;
|
|
19
19
|
static TOKEN_URL: string;
|
|
20
20
|
private static RespData;
|
|
21
21
|
static Get(url: string, params: any, headers: any, type?: RespType): Promise<any>;
|
|
@@ -25,5 +25,5 @@ export declare class Http {
|
|
|
25
25
|
static Token(sessionInfo: any, appKey: string, apiKey?: string, type?: RespType): Promise<any>;
|
|
26
26
|
static FormUpload(url: string, file: File, isHeadersAddMultiForm?: boolean, data?: Record<string, any>, headers?: any, method?: 'POST' | 'PUT', type?: RespType): Promise<any>;
|
|
27
27
|
static CloudUpload(fullUrl: string, file: File, headers?: any, method?: 'POST' | 'PUT'): Promise<Response>;
|
|
28
|
-
static FileDownload(fullUrl: string, params: any, headers?: any, method?: string): Promise<Buffer<
|
|
28
|
+
static FileDownload(fullUrl: string, params: any, headers?: any, method?: string): Promise<Buffer<ArrayBuffer>>;
|
|
29
29
|
}
|
package/dist/main/http.js
CHANGED
package/global.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare var global: typeof globalThis;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dff-util",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
8
|
"build": "tsc",
|
|
9
|
-
"
|
|
9
|
+
"pp": "npm run build"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
12
|
"npm",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"util"
|
|
15
15
|
],
|
|
16
16
|
"author": "DesignForFeature",
|
|
17
|
-
"license": "
|
|
17
|
+
"license": "MIT",
|
|
18
18
|
"description": "DesignForFeature Utilities",
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/jwt-encode": "^1.0.3",
|
package/tsconfig.json
CHANGED
|
@@ -105,6 +105,6 @@
|
|
|
105
105
|
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
106
106
|
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
107
107
|
},
|
|
108
|
-
"include": [ "src/**/*", "src/tests/jwt.ts" ],
|
|
108
|
+
"include": [ "src/**/*", "src/tests/jwt.ts", "global.d.ts" ],
|
|
109
109
|
"exclude": [ "node_modules", "**/*.spec.ts" ]
|
|
110
110
|
}
|