@basmilius/http-client 1.5.3 → 1.6.0
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/dist/adapter/HttpAdapter.d.ts +3 -3
- package/dist/adapter/index.d.ts +1 -1
- package/dist/decorator/adapter.d.ts +2 -2
- package/dist/decorator/bound.d.ts +1 -1
- package/dist/decorator/debounce.d.ts +1 -1
- package/dist/decorator/dto/arrayProxy.d.ts +15 -15
- package/dist/decorator/dto/classProxy.d.ts +8 -8
- package/dist/decorator/dto/clone.d.ts +4 -4
- package/dist/decorator/dto/constant.d.ts +7 -7
- package/dist/decorator/dto/fill.d.ts +4 -4
- package/dist/decorator/dto/helper/areEqual.d.ts +4 -4
- package/dist/decorator/dto/helper/assertDto.d.ts +4 -4
- package/dist/decorator/dto/helper/circularProtect.d.ts +1 -1
- package/dist/decorator/dto/helper/cloneDto.d.ts +3 -3
- package/dist/decorator/dto/helper/executeIfDtoDirtyAndMarkClean.d.ts +7 -4
- package/dist/decorator/dto/helper/index.d.ts +17 -17
- package/dist/decorator/dto/helper/instance.d.ts +2 -2
- package/dist/decorator/dto/helper/isDto.d.ts +4 -4
- package/dist/decorator/dto/helper/isDtoClean.d.ts +3 -3
- package/dist/decorator/dto/helper/isDtoDirty.d.ts +3 -3
- package/dist/decorator/dto/helper/markDtoClean.d.ts +3 -3
- package/dist/decorator/dto/helper/markDtoDirty.d.ts +3 -3
- package/dist/decorator/dto/helper/relateDtoTo.d.ts +4 -4
- package/dist/decorator/dto/helper/relateValueTo.d.ts +4 -4
- package/dist/decorator/dto/helper/trackDto.d.ts +3 -3
- package/dist/decorator/dto/helper/triggerDto.d.ts +3 -4
- package/dist/decorator/dto/helper/unrelateDtoFrom.d.ts +4 -4
- package/dist/decorator/dto/helper/unrelateValueFrom.d.ts +4 -4
- package/dist/decorator/dto/index.d.ts +6 -6
- package/dist/decorator/dto/instanceProxy.d.ts +21 -21
- package/dist/decorator/dto/map.d.ts +2 -2
- package/dist/decorator/dto/refProxy.d.ts +30 -30
- package/dist/decorator/dto/serialize/deserialize.d.ts +1 -1
- package/dist/decorator/dto/serialize/deserializeArray.d.ts +1 -1
- package/dist/decorator/dto/serialize/deserializeDateTime.d.ts +3 -3
- package/dist/decorator/dto/serialize/deserializeDto.d.ts +3 -3
- package/dist/decorator/dto/serialize/deserializeObject.d.ts +1 -1
- package/dist/decorator/dto/serialize/deserializeUnknown.d.ts +1 -1
- package/dist/decorator/dto/serialize/index.d.ts +2 -2
- package/dist/decorator/dto/serialize/isSerializedDateTime.d.ts +2 -2
- package/dist/decorator/dto/serialize/isSerializedDto.d.ts +2 -2
- package/dist/decorator/dto/serialize/serialize.d.ts +1 -1
- package/dist/decorator/dto/serialize/serializeArray.d.ts +2 -2
- package/dist/decorator/dto/serialize/serializeDateTime.d.ts +3 -3
- package/dist/decorator/dto/serialize/serializeDto.d.ts +3 -3
- package/dist/decorator/dto/serialize/serializeObject.d.ts +1 -1
- package/dist/decorator/dto/serialize/serializeUnknown.d.ts +2 -2
- package/dist/decorator/dto/serialize/uuid.d.ts +1 -1
- package/dist/decorator/dto/symbols.d.ts +11 -11
- package/dist/decorator/dto/toJSON.d.ts +4 -4
- package/dist/decorator/index.d.ts +7 -7
- package/dist/dto/BlobResponse.d.ts +4 -4
- package/dist/dto/Paginated.d.ts +7 -7
- package/dist/dto/index.d.ts +2 -2
- package/dist/http/BaseResponse.d.ts +8 -8
- package/dist/http/BaseService.d.ts +3 -3
- package/dist/http/HttpClient.d.ts +8 -8
- package/dist/http/QueryString.d.ts +11 -12
- package/dist/http/RequestBuilder.d.ts +31 -28
- package/dist/http/RequestError.d.ts +7 -7
- package/dist/http/helpers.d.ts +1 -1
- package/dist/http/index.d.ts +7 -7
- package/dist/http-client.js +3638 -1
- package/dist/http-client.js.map +68 -5
- package/dist/index.d.ts +5 -5
- package/package.json +56 -57
- package/dist/decorator/dto/instance.d.ts +0 -31
- package/dist/decorator/dto/serialize/types.d.ts +0 -3
- package/dist/type/index.d.ts +0 -2
- package/dist/util/datetime.d.ts +0 -2
- package/dist/util/index.d.ts +0 -2
- package/dist/util/reflection.d.ts +0 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export type * from
|
|
1
|
+
export * from "@/adapter";
|
|
2
|
+
export * from "@/decorator";
|
|
3
|
+
export * from "@/dto";
|
|
4
|
+
export * from "@/http";
|
|
5
|
+
export type * from "@/type";
|
package/package.json
CHANGED
|
@@ -1,59 +1,58 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
2
|
+
"name": "@basmilius/http-client",
|
|
3
|
+
"description": "Http client for Vue projects.",
|
|
4
|
+
"version": "1.6.0",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"funding": "https://github.com/sponsors/basmilius",
|
|
7
|
+
"homepage": "https://github.com/basmilius/http-client",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/basmilius/http-client.git"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"http",
|
|
14
|
+
"http client",
|
|
15
|
+
"http dto",
|
|
16
|
+
"dto",
|
|
17
|
+
"vue",
|
|
18
|
+
"vue 3"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "bun --bun build.ts"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=23"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist/*"
|
|
28
|
+
],
|
|
29
|
+
"type": "module",
|
|
30
|
+
"main": "./dist/http-client.js",
|
|
31
|
+
"module": "./dist/http-client.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"default": "./dist/http-client.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public",
|
|
41
|
+
"provenance": true
|
|
42
|
+
},
|
|
43
|
+
"sideEffects": false,
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@basmilius/utils": "^1.7.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/bun": "^1.2.2",
|
|
49
|
+
"@types/luxon": "^3.4.2",
|
|
50
|
+
"luxon": "^3.5.0",
|
|
51
|
+
"oxc-transform": "^0.48.2",
|
|
52
|
+
"vue": "^3.5.13"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"luxon": "^3.5.0",
|
|
56
|
+
"vue": "^3.5.13"
|
|
34
57
|
}
|
|
35
|
-
|
|
36
|
-
"publishConfig": {
|
|
37
|
-
"access": "public",
|
|
38
|
-
"provenance": true
|
|
39
|
-
},
|
|
40
|
-
"sideEffects": false,
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"@types/luxon": "^3.4.2",
|
|
43
|
-
"esbuild": "^0.24.0",
|
|
44
|
-
"luxon": "^3.5.0",
|
|
45
|
-
"tsc-alias": "^1.8.10",
|
|
46
|
-
"typescript": "^5.7.2",
|
|
47
|
-
"vue": "^3.5.13"
|
|
48
|
-
},
|
|
49
|
-
"peerDependencies": {
|
|
50
|
-
"luxon": "^3.5.0",
|
|
51
|
-
"vue": "^3.5.12"
|
|
52
|
-
},
|
|
53
|
-
"scripts": {
|
|
54
|
-
"build": "pnpm esbuild && pnpm gentypes",
|
|
55
|
-
"dev": "pnpm esbuild --watch",
|
|
56
|
-
"esbuild": "esbuild src/index.ts --bundle --minify --sourcemap --target=esnext --external:luxon --external:vue --platform=browser --format=esm --outfile=dist/http-client.js",
|
|
57
|
-
"gentypes": "tsc --noCheck && tsc-alias"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
58
|
+
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Descriptors } from '../../util';
|
|
2
|
-
import type { ARGS, CHILDREN, DESCRIPTORS, DIRTY, NAME, PARENT, PARENT_KEY, PROPERTIES, TRACK, TRIGGER } from './symbols';
|
|
3
|
-
export default interface DtoInstance<T> extends Function {
|
|
4
|
-
[ARGS]: any[];
|
|
5
|
-
[CHILDREN]?: DtoInstance<unknown>[];
|
|
6
|
-
[DESCRIPTORS]: Descriptors;
|
|
7
|
-
[DIRTY]: boolean;
|
|
8
|
-
[NAME]: string;
|
|
9
|
-
[PARENT]?: DtoInstance<unknown>;
|
|
10
|
-
[PARENT_KEY]?: string;
|
|
11
|
-
[PROPERTIES]: string[];
|
|
12
|
-
[TRACK]: (instance: DtoInstance<unknown>, key: string) => void;
|
|
13
|
-
[TRIGGER]: (instance: DtoInstance<unknown>, key: string | symbol, value: unknown, oldValue?: unknown) => void;
|
|
14
|
-
/**
|
|
15
|
-
* Clones the DTO starting with the original arguments
|
|
16
|
-
* and replaces them with the current values. Unfortunately
|
|
17
|
-
* this is the only way at this point. It's a good thing
|
|
18
|
-
* we don't need cloning a lot :)
|
|
19
|
-
*/
|
|
20
|
-
clone(): DtoInstance<T>;
|
|
21
|
-
/**
|
|
22
|
-
* Fills the DTO with the given data.
|
|
23
|
-
*/
|
|
24
|
-
fill(data: Record<string, unknown>): void;
|
|
25
|
-
/**
|
|
26
|
-
* Gets all getters of the DTO and returns them as
|
|
27
|
-
* an object, so {@see JSON.stringify} knows what
|
|
28
|
-
* to do with our DTO.
|
|
29
|
-
*/
|
|
30
|
-
toJSON(): Record<string, unknown>;
|
|
31
|
-
}
|
package/dist/type/index.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
|
|
2
|
-
export type HttpStatusCode = 100 | 101 | 102 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
|
package/dist/util/datetime.d.ts
DELETED
package/dist/util/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type Constructor<T = {}> = new (...args: any[]) => T;
|
|
2
|
-
export type Descriptors = Record<string | symbol, TypedPropertyDescriptor<unknown> | PropertyDescriptor>;
|
|
3
|
-
export declare function getPrototypeChain(obj: Function): Descriptors;
|
|
4
|
-
export declare function setObjectMethod(obj: Function, key: string, fn: Function): void;
|
|
5
|
-
export declare function setObjectValue(obj: object, key: symbol | string, value: unknown): void;
|