@nymphjs/client 1.0.0-beta.8 → 1.0.0-beta.80
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/CHANGELOG.md +334 -0
- package/README.md +2 -2
- package/asyncitertest.js +53 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/lib/Entity.d.ts +112 -8
- package/lib/Entity.js +158 -76
- package/lib/Entity.js.map +1 -1
- package/lib/Entity.types.d.ts +144 -9
- package/lib/EntityWeakCache.js +3 -2
- package/lib/EntityWeakCache.js.map +1 -1
- package/lib/HttpRequester.d.ts +44 -8
- package/lib/HttpRequester.js +236 -21
- package/lib/HttpRequester.js.map +1 -1
- package/lib/Nymph.d.ts +42 -10
- package/lib/Nymph.js +92 -9
- package/lib/Nymph.js.map +1 -1
- package/lib/Nymph.types.d.ts +73 -1
- package/lib/PubSub.d.ts +15 -9
- package/lib/PubSub.js +148 -87
- package/lib/PubSub.js.map +1 -1
- package/lib/PubSub.types.d.ts +6 -1
- package/lib/entityRefresh.js +16 -0
- package/lib/entityRefresh.js.map +1 -1
- package/lib/utils.js +11 -0
- package/lib/utils.js.map +1 -1
- package/package.json +17 -14
- package/src/Entity.ts +163 -103
- package/src/Entity.types.ts +10 -46
- package/src/EntityWeakCache.ts +7 -5
- package/src/HttpRequester.ts +302 -29
- package/src/Nymph.ts +117 -57
- package/src/Nymph.types.ts +40 -1
- package/src/PubSub.ts +205 -132
- package/src/PubSub.types.ts +8 -3
- package/src/entityRefresh.ts +5 -5
- package/tsconfig.json +1 -1
- package/typedoc.json +4 -0
package/lib/Entity.types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type Nymph from './Nymph';
|
|
2
|
+
import type Entity from './Entity';
|
|
2
3
|
export type ServerCallResponse = {
|
|
3
4
|
return: any;
|
|
4
5
|
entity?: EntityJson;
|
|
@@ -28,38 +29,172 @@ export type EntityPatch = {
|
|
|
28
29
|
addTags: string[];
|
|
29
30
|
removeTags: string[];
|
|
30
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* Data Object interface.
|
|
34
|
+
*
|
|
35
|
+
* Objects which hold data from some type of storage.
|
|
36
|
+
*/
|
|
31
37
|
export interface DataObjectInterface {
|
|
38
|
+
/**
|
|
39
|
+
* Search the array for this object and return the corresponding index.
|
|
40
|
+
*
|
|
41
|
+
* If `strict` is false, `is()` is used to compare. If `strict` is true,
|
|
42
|
+
* `equals()` is used.
|
|
43
|
+
*
|
|
44
|
+
* @param array The array to search.
|
|
45
|
+
* @param strict Whether to use stronger comparison.
|
|
46
|
+
* @returns The index if the object is in the array, -1 if it isn't.
|
|
47
|
+
*/
|
|
32
48
|
$arraySearch(array: any[], strict?: boolean): number;
|
|
49
|
+
/**
|
|
50
|
+
* Delete the object from storage.
|
|
51
|
+
*
|
|
52
|
+
* @returns True on success, false on failure.
|
|
53
|
+
*/
|
|
33
54
|
$delete(): Promise<boolean>;
|
|
55
|
+
/**
|
|
56
|
+
* Perform a more strict comparison of this object to another.
|
|
57
|
+
*
|
|
58
|
+
* @param object The object to compare.
|
|
59
|
+
* @returns True or false.
|
|
60
|
+
*/
|
|
34
61
|
$equals(object: any): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Check whether this object is in an array.
|
|
64
|
+
*
|
|
65
|
+
* If `strict` is false, `is()` is used to compare. If `strict` is true,
|
|
66
|
+
* `equals()` is used.
|
|
67
|
+
*
|
|
68
|
+
* @param array The array to search.
|
|
69
|
+
* @param strict Whether to use stronger comparison.
|
|
70
|
+
* @returns True if the object is in the array, false if it isn't.
|
|
71
|
+
*/
|
|
35
72
|
$inArray(array: any[], strict?: boolean): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Perform a less strict comparison of this object to another.
|
|
75
|
+
*
|
|
76
|
+
* @param object The object to compare.
|
|
77
|
+
* @returns True or false.
|
|
78
|
+
*/
|
|
36
79
|
$is(object: any): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Save the object's dirty data to storage.
|
|
82
|
+
*
|
|
83
|
+
* @returns True on success, false on failure.
|
|
84
|
+
*/
|
|
37
85
|
$patch(): Promise<boolean>;
|
|
86
|
+
/**
|
|
87
|
+
* Refresh the object from storage. (Bypasses Nymph's cache.)
|
|
88
|
+
*
|
|
89
|
+
* If the object has been deleted from storage, the database cannot be
|
|
90
|
+
* reached, or a database error occurs, `refresh()` will return 0.
|
|
91
|
+
*
|
|
92
|
+
* @returns False if the data has not been saved, 0 if it can't be refreshed, true on success.
|
|
93
|
+
*/
|
|
38
94
|
$refresh(): Promise<boolean | 0>;
|
|
95
|
+
/**
|
|
96
|
+
* Save the object to storage.
|
|
97
|
+
*
|
|
98
|
+
* @returns True on success, false on failure.
|
|
99
|
+
*/
|
|
39
100
|
$save(): Promise<boolean>;
|
|
101
|
+
/**
|
|
102
|
+
* The object's data.
|
|
103
|
+
*/
|
|
40
104
|
[k: string]: any;
|
|
41
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Entity interface.
|
|
108
|
+
*/
|
|
42
109
|
export interface EntityInterface extends DataObjectInterface {
|
|
110
|
+
/**
|
|
111
|
+
* The instance of Nymph to use for queries.
|
|
112
|
+
*/
|
|
43
113
|
$nymph: Nymph;
|
|
114
|
+
/**
|
|
115
|
+
* The entity's Globally Unique ID.
|
|
116
|
+
*
|
|
117
|
+
* This is a 12 byte number represented as a lower case HEX string (24
|
|
118
|
+
* characters).
|
|
119
|
+
*/
|
|
44
120
|
guid: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* The creation date of the entity as a Unix timestamp in milliseconds.
|
|
123
|
+
*/
|
|
45
124
|
cdate: number | null;
|
|
125
|
+
/**
|
|
126
|
+
* The modified date of the entity as a Unix timestamp in milliseconds.
|
|
127
|
+
*/
|
|
46
128
|
mdate: number | null;
|
|
129
|
+
/**
|
|
130
|
+
* Array of the entity's tags.
|
|
131
|
+
*/
|
|
47
132
|
tags: string[];
|
|
133
|
+
/**
|
|
134
|
+
* Add one or more tags.
|
|
135
|
+
*
|
|
136
|
+
* @param tags List of tags.
|
|
137
|
+
*/
|
|
48
138
|
$addTag(...tags: string[]): void;
|
|
139
|
+
/**
|
|
140
|
+
* Get a patch of this entity's dirty data to be applied on the server.
|
|
141
|
+
*/
|
|
49
142
|
$getPatch(): EntityPatch;
|
|
143
|
+
/**
|
|
144
|
+
* Check that the entity has all of the given tags.
|
|
145
|
+
*
|
|
146
|
+
* @param tags List of tags.
|
|
147
|
+
* @returns True or false.
|
|
148
|
+
*/
|
|
50
149
|
$hasTag(...tags: string[]): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Initialize this entity from a JSON representation.
|
|
152
|
+
*
|
|
153
|
+
* @param entityJson The entity JSON.
|
|
154
|
+
*/
|
|
51
155
|
$init(entityJson: EntityJson | null): EntityInterface;
|
|
52
|
-
|
|
53
|
-
|
|
156
|
+
/**
|
|
157
|
+
* Retrieve this entity's data from the server.
|
|
158
|
+
*
|
|
159
|
+
* @returns The entity.
|
|
160
|
+
*/
|
|
161
|
+
$wake(): Promise<EntityInterface>;
|
|
162
|
+
/**
|
|
163
|
+
* Ready this entity's data, and the data of entity's within this one's.
|
|
164
|
+
*
|
|
165
|
+
* @param level The number of levels deep to wake. If undefined, it will keep going until there are no more entities. (Careful of infinite loops.)
|
|
166
|
+
* @returns The entity.
|
|
167
|
+
*/
|
|
168
|
+
$wakeAll(level?: number): Promise<EntityInterface>;
|
|
169
|
+
/**
|
|
170
|
+
* Remove one or more tags.
|
|
171
|
+
*
|
|
172
|
+
* @param tags List of tags.
|
|
173
|
+
*/
|
|
54
174
|
$removeTag(...tags: string[]): void;
|
|
175
|
+
/**
|
|
176
|
+
* Call an instance method on the server version of this entity.
|
|
177
|
+
*
|
|
178
|
+
* The entity's data will be sent up to the server as well, so the server's
|
|
179
|
+
* state can match the client's state. It won't be propagated into the DB,
|
|
180
|
+
* though.
|
|
181
|
+
*
|
|
182
|
+
* @param method The name of the method.
|
|
183
|
+
* @param params The parameters to call the method with.
|
|
184
|
+
* @param stateless Whether the server should return, and the client update, the data in the entity after the method has run.
|
|
185
|
+
* @returns The value that the method on the server returned.
|
|
186
|
+
*/
|
|
55
187
|
$serverCall(method: string, params: Iterable<any>, stateless: boolean): Promise<any>;
|
|
188
|
+
/**
|
|
189
|
+
* Return a Nymph Entity Reference for this entity.
|
|
190
|
+
*
|
|
191
|
+
* If the entity hasn't been saved yet (and has no GUID), it will be
|
|
192
|
+
* returned instead.
|
|
193
|
+
*
|
|
194
|
+
* @returns A Nymph Entity Reference array as an unsaved entity.
|
|
195
|
+
*/
|
|
56
196
|
$toReference(): EntityReference | EntityInterface;
|
|
57
197
|
}
|
|
58
|
-
export type EntityConstructor = (new (...args: any[]) =>
|
|
59
|
-
|
|
60
|
-
class: string;
|
|
61
|
-
factory(guid?: string): Promise<EntityInterface>;
|
|
62
|
-
factorySync(guid?: string): EntityInterface;
|
|
63
|
-
factoryReference(reference: EntityReference): EntityInterface;
|
|
64
|
-
serverCallStatic(method: string, params: Iterable<any>): Promise<any>;
|
|
198
|
+
export type EntityConstructor<D extends EntityData = EntityData, E extends Entity<D> = Entity<D>> = (new (...args: any[]) => E) & {
|
|
199
|
+
[k in keyof typeof Entity]: (typeof Entity)[k];
|
|
65
200
|
};
|
package/lib/EntityWeakCache.js
CHANGED
|
@@ -8,8 +8,9 @@ class EntityWeakCache {
|
|
|
8
8
|
const classMap = this.references.get(EntityClass);
|
|
9
9
|
if (classMap && guid in classMap) {
|
|
10
10
|
const weakRef = classMap[guid];
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const deref = weakRef && weakRef.deref();
|
|
12
|
+
if (deref != null) {
|
|
13
|
+
return deref;
|
|
13
14
|
}
|
|
14
15
|
else {
|
|
15
16
|
delete classMap[guid];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityWeakCache.js","sourceRoot":"","sources":["../src/EntityWeakCache.ts"],"names":[],"mappings":";;AAEA,MAAqB,eAAe;IAApC;QACU,eAAU,
|
|
1
|
+
{"version":3,"file":"EntityWeakCache.js","sourceRoot":"","sources":["../src/EntityWeakCache.ts"],"names":[],"mappings":";;AAEA,MAAqB,eAAe;IAApC;QACU,eAAU,GAGd,IAAI,OAAO,EAAE,CAAC;IA2BpB,CAAC;IAzBC,GAAG,CAAC,WAA8B,EAAE,IAAY;QAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAClD,IAAI,QAAQ,IAAI,IAAI,IAAI,QAAQ,EAAE,CAAC;YACjC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC/B,MAAM,KAAK,GAAG,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YACzC,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;gBAClB,OAAO,KAAK,CAAC;YACf,CAAC;iBAAM,CAAC;gBACN,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,GAAG,CAAC,WAA8B,EAAE,MAAuB;QACzD,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;QAEpC,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QACxD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC3C,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IAClC,CAAC;CACF;AA/BD,kCA+BC"}
|
package/lib/HttpRequester.d.ts
CHANGED
|
@@ -1,42 +1,78 @@
|
|
|
1
1
|
export type HttpRequesterEventType = 'request' | 'response';
|
|
2
2
|
export type HttpRequesterRequestCallback = (requester: HttpRequester, url: string, options: RequestInit) => void;
|
|
3
3
|
export type HttpRequesterResponseCallback = (requester: HttpRequester, response: Response, text: string) => void;
|
|
4
|
+
export type HttpRequesterIteratorCallback = (requester: HttpRequester, url: string, headers: Record<string, string>) => void;
|
|
4
5
|
export type HttpRequesterRequestOptions = {
|
|
5
6
|
url: string;
|
|
7
|
+
headers?: {
|
|
8
|
+
[k: string]: any;
|
|
9
|
+
};
|
|
6
10
|
data: {
|
|
7
11
|
[k: string]: any;
|
|
8
12
|
};
|
|
9
13
|
dataType: string;
|
|
10
14
|
};
|
|
15
|
+
export interface AbortableAsyncIterator<T extends any = any> extends AsyncIterable<T> {
|
|
16
|
+
abortController: AbortController;
|
|
17
|
+
}
|
|
11
18
|
export default class HttpRequester {
|
|
12
19
|
private fetch;
|
|
13
|
-
private xsrfToken;
|
|
14
20
|
private requestCallbacks;
|
|
15
21
|
private responseCallbacks;
|
|
22
|
+
private iteratorCallbacks;
|
|
16
23
|
static makeUrl(url: string, data: {
|
|
17
24
|
[k: string]: any;
|
|
18
25
|
}): string;
|
|
19
26
|
constructor(ponyFetch?: WindowOrWorkerGlobalScope['fetch']);
|
|
20
|
-
on<T extends HttpRequesterEventType>(event: T, callback: T extends 'request' ? HttpRequesterRequestCallback : T extends 'response' ? HttpRequesterResponseCallback : never): () => boolean;
|
|
21
|
-
off<T extends HttpRequesterEventType>(event: T, callback: T extends 'request' ? HttpRequesterRequestCallback : T extends 'response' ? HttpRequesterResponseCallback : never): boolean;
|
|
22
|
-
setXsrfToken(xsrfToken: string | null): void;
|
|
27
|
+
on<T extends HttpRequesterEventType>(event: T, callback: T extends 'request' ? HttpRequesterRequestCallback : T extends 'response' ? HttpRequesterResponseCallback : T extends 'iterator' ? HttpRequesterIteratorCallback : never): () => boolean;
|
|
28
|
+
off<T extends HttpRequesterEventType>(event: T, callback: T extends 'request' ? HttpRequesterRequestCallback : T extends 'response' ? HttpRequesterResponseCallback : T extends 'iterator' ? HttpRequesterIteratorCallback : never): boolean;
|
|
23
29
|
GET(opt: HttpRequesterRequestOptions): Promise<any>;
|
|
24
30
|
POST(opt: HttpRequesterRequestOptions): Promise<any>;
|
|
31
|
+
POST_ITERATOR(opt: HttpRequesterRequestOptions): Promise<AbortableAsyncIterator<any>>;
|
|
25
32
|
PUT(opt: HttpRequesterRequestOptions): Promise<any>;
|
|
26
33
|
PATCH(opt: HttpRequesterRequestOptions): Promise<any>;
|
|
27
34
|
DELETE(opt: HttpRequesterRequestOptions): Promise<any>;
|
|
28
35
|
_httpRequest(method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', opt: HttpRequesterRequestOptions): Promise<any>;
|
|
36
|
+
_iteratorRequest(method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', opt: HttpRequesterRequestOptions): Promise<AbortableAsyncIterator>;
|
|
29
37
|
}
|
|
30
38
|
export declare class InvalidResponseError extends Error {
|
|
31
39
|
constructor(message: string);
|
|
32
40
|
}
|
|
33
|
-
export declare class
|
|
34
|
-
constructor(
|
|
41
|
+
export declare class ConnectionClosedUnexpectedlyError extends Error {
|
|
42
|
+
constructor(message: string);
|
|
43
|
+
}
|
|
44
|
+
export declare class ConnectionError extends Error {
|
|
45
|
+
constructor(message: string);
|
|
46
|
+
}
|
|
47
|
+
export declare class HttpError extends Error {
|
|
48
|
+
status: number;
|
|
49
|
+
statusText: string;
|
|
50
|
+
constructor(name: string, response: Response, errObj: {
|
|
51
|
+
textStatus: string;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export declare class InformationalError extends HttpError {
|
|
55
|
+
constructor(response: Response, errObj: {
|
|
56
|
+
textStatus: string;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
export declare class SuccessError extends HttpError {
|
|
60
|
+
constructor(response: Response, errObj: {
|
|
61
|
+
textStatus: string;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
export declare class RedirectError extends HttpError {
|
|
65
|
+
constructor(response: Response, errObj: {
|
|
66
|
+
textStatus: string;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
export declare class ClientError extends HttpError {
|
|
70
|
+
constructor(response: Response, errObj: {
|
|
35
71
|
textStatus: string;
|
|
36
72
|
});
|
|
37
73
|
}
|
|
38
|
-
export declare class ServerError extends
|
|
39
|
-
constructor(errObj: {
|
|
74
|
+
export declare class ServerError extends HttpError {
|
|
75
|
+
constructor(response: Response, errObj: {
|
|
40
76
|
textStatus: string;
|
|
41
77
|
});
|
|
42
78
|
}
|
package/lib/HttpRequester.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServerError = exports.ClientError = exports.InvalidResponseError = void 0;
|
|
3
|
+
exports.ServerError = exports.ClientError = exports.RedirectError = exports.SuccessError = exports.InformationalError = exports.HttpError = exports.ConnectionError = exports.ConnectionClosedUnexpectedlyError = exports.InvalidResponseError = void 0;
|
|
4
|
+
const fetch_event_source_hperrin_1 = require("fetch-event-source-hperrin");
|
|
4
5
|
class HttpRequester {
|
|
5
6
|
static makeUrl(url, data) {
|
|
6
7
|
if (!data) {
|
|
@@ -17,9 +18,9 @@ class HttpRequester {
|
|
|
17
18
|
return url;
|
|
18
19
|
}
|
|
19
20
|
constructor(ponyFetch) {
|
|
20
|
-
this.xsrfToken = null;
|
|
21
21
|
this.requestCallbacks = [];
|
|
22
22
|
this.responseCallbacks = [];
|
|
23
|
+
this.iteratorCallbacks = [];
|
|
23
24
|
this.fetch = ponyFetch ? ponyFetch : (...args) => fetch(...args);
|
|
24
25
|
}
|
|
25
26
|
on(event, callback) {
|
|
@@ -27,6 +28,7 @@ class HttpRequester {
|
|
|
27
28
|
if (!(prop in this)) {
|
|
28
29
|
throw new Error('Invalid event type.');
|
|
29
30
|
}
|
|
31
|
+
// @ts-ignore: The callback should always be the right type here.
|
|
30
32
|
this[prop].push(callback);
|
|
31
33
|
return () => this.off(event, callback);
|
|
32
34
|
}
|
|
@@ -35,21 +37,23 @@ class HttpRequester {
|
|
|
35
37
|
if (!(prop in this)) {
|
|
36
38
|
return false;
|
|
37
39
|
}
|
|
40
|
+
// @ts-ignore: The callback should always be the right type here.
|
|
38
41
|
const i = this[prop].indexOf(callback);
|
|
39
42
|
if (i > -1) {
|
|
43
|
+
// @ts-ignore: The callback should always be the right type here.
|
|
40
44
|
this[prop].splice(i, 1);
|
|
41
45
|
}
|
|
42
46
|
return true;
|
|
43
47
|
}
|
|
44
|
-
setXsrfToken(xsrfToken) {
|
|
45
|
-
this.xsrfToken = xsrfToken;
|
|
46
|
-
}
|
|
47
48
|
async GET(opt) {
|
|
48
49
|
return await this._httpRequest('GET', opt);
|
|
49
50
|
}
|
|
50
51
|
async POST(opt) {
|
|
51
52
|
return await this._httpRequest('POST', opt);
|
|
52
53
|
}
|
|
54
|
+
async POST_ITERATOR(opt) {
|
|
55
|
+
return await this._iteratorRequest('POST', opt);
|
|
56
|
+
}
|
|
53
57
|
async PUT(opt) {
|
|
54
58
|
return await this._httpRequest('PUT', opt);
|
|
55
59
|
}
|
|
@@ -63,11 +67,13 @@ class HttpRequester {
|
|
|
63
67
|
const dataString = JSON.stringify(opt.data);
|
|
64
68
|
let url = opt.url;
|
|
65
69
|
if (method === 'GET') {
|
|
70
|
+
// TODO: what should this size be?
|
|
71
|
+
// && dataString.length < 1) {
|
|
66
72
|
url = HttpRequester.makeUrl(opt.url, opt.data);
|
|
67
73
|
}
|
|
68
74
|
const options = {
|
|
69
75
|
method,
|
|
70
|
-
headers: {},
|
|
76
|
+
headers: opt.headers ?? {},
|
|
71
77
|
credentials: 'include',
|
|
72
78
|
};
|
|
73
79
|
if (method !== 'GET' && opt.data) {
|
|
@@ -78,10 +84,6 @@ class HttpRequester {
|
|
|
78
84
|
for (let i = 0; i < this.requestCallbacks.length; i++) {
|
|
79
85
|
this.requestCallbacks[i] && this.requestCallbacks[i](this, url, options);
|
|
80
86
|
}
|
|
81
|
-
if (this.xsrfToken !== null) {
|
|
82
|
-
options.headers['X-Xsrf-Token'] =
|
|
83
|
-
this.xsrfToken;
|
|
84
|
-
}
|
|
85
87
|
const response = await this.fetch(url, options);
|
|
86
88
|
let text;
|
|
87
89
|
try {
|
|
@@ -106,9 +108,15 @@ class HttpRequester {
|
|
|
106
108
|
};
|
|
107
109
|
}
|
|
108
110
|
errObj.status = response.status;
|
|
109
|
-
throw response.status <
|
|
110
|
-
? new
|
|
111
|
-
:
|
|
111
|
+
throw response.status < 200
|
|
112
|
+
? new InformationalError(response, errObj)
|
|
113
|
+
: response.status < 300
|
|
114
|
+
? new SuccessError(response, errObj)
|
|
115
|
+
: response.status < 400
|
|
116
|
+
? new RedirectError(response, errObj)
|
|
117
|
+
: response.status < 500
|
|
118
|
+
? new ClientError(response, errObj)
|
|
119
|
+
: new ServerError(response, errObj);
|
|
112
120
|
}
|
|
113
121
|
for (let i = 0; i < this.responseCallbacks.length; i++) {
|
|
114
122
|
this.responseCallbacks[i] &&
|
|
@@ -132,6 +140,175 @@ class HttpRequester {
|
|
|
132
140
|
return text;
|
|
133
141
|
}
|
|
134
142
|
}
|
|
143
|
+
async _iteratorRequest(method, opt) {
|
|
144
|
+
const dataString = JSON.stringify(opt.data);
|
|
145
|
+
let url = opt.url;
|
|
146
|
+
if (method === 'GET') {
|
|
147
|
+
// TODO: what should this size be?
|
|
148
|
+
// && dataString.length < 1) {
|
|
149
|
+
url = HttpRequester.makeUrl(opt.url, opt.data);
|
|
150
|
+
}
|
|
151
|
+
const hasBody = method !== 'GET' && opt.data;
|
|
152
|
+
const headers = opt.headers ?? {};
|
|
153
|
+
if (hasBody) {
|
|
154
|
+
headers['Content-Type'] = 'application/json';
|
|
155
|
+
}
|
|
156
|
+
for (let i = 0; i < this.iteratorCallbacks.length; i++) {
|
|
157
|
+
this.iteratorCallbacks[i] &&
|
|
158
|
+
this.iteratorCallbacks[i](this, url, headers);
|
|
159
|
+
}
|
|
160
|
+
const responses = [];
|
|
161
|
+
let nextResponseResolve;
|
|
162
|
+
let nextResponseReadyPromise = new Promise((res) => {
|
|
163
|
+
nextResponseResolve = res;
|
|
164
|
+
});
|
|
165
|
+
let responsesDone = false;
|
|
166
|
+
let serverResponse;
|
|
167
|
+
const ctrl = new AbortController();
|
|
168
|
+
(0, fetch_event_source_hperrin_1.fetchEventSource)(url, {
|
|
169
|
+
openWhenHidden: true,
|
|
170
|
+
fetch: this.fetch,
|
|
171
|
+
method,
|
|
172
|
+
headers,
|
|
173
|
+
credentials: 'include',
|
|
174
|
+
body: hasBody ? dataString : undefined,
|
|
175
|
+
signal: ctrl.signal,
|
|
176
|
+
async onopen(response) {
|
|
177
|
+
serverResponse = response;
|
|
178
|
+
if (response.ok) {
|
|
179
|
+
if (response.headers.get('content-type') === fetch_event_source_hperrin_1.EventStreamContentType) {
|
|
180
|
+
throw new InvalidResponseError('Server response is not an event stream.');
|
|
181
|
+
}
|
|
182
|
+
// Response is ok, wait for messages.
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
let text = '';
|
|
186
|
+
try {
|
|
187
|
+
text = await response.text();
|
|
188
|
+
}
|
|
189
|
+
catch (e) {
|
|
190
|
+
// Ignore error here.
|
|
191
|
+
}
|
|
192
|
+
let errObj;
|
|
193
|
+
try {
|
|
194
|
+
errObj = JSON.parse(text);
|
|
195
|
+
}
|
|
196
|
+
catch (e) {
|
|
197
|
+
if (!(e instanceof SyntaxError)) {
|
|
198
|
+
throw e;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (typeof errObj !== 'object') {
|
|
202
|
+
errObj = {
|
|
203
|
+
textStatus: response.statusText,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
errObj.status = response.status;
|
|
207
|
+
throw response.status < 200
|
|
208
|
+
? new InformationalError(response, errObj)
|
|
209
|
+
: response.status < 300
|
|
210
|
+
? new SuccessError(response, errObj)
|
|
211
|
+
: response.status < 400
|
|
212
|
+
? new RedirectError(response, errObj)
|
|
213
|
+
: response.status < 500
|
|
214
|
+
? new ClientError(response, errObj)
|
|
215
|
+
: new ServerError(response, errObj);
|
|
216
|
+
},
|
|
217
|
+
onmessage(event) {
|
|
218
|
+
if (event.event === 'next') {
|
|
219
|
+
let text = event.data;
|
|
220
|
+
if (opt.dataType === 'json') {
|
|
221
|
+
if (!text.length) {
|
|
222
|
+
responses.push(new InvalidResponseError('Server response was empty.'));
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
try {
|
|
226
|
+
responses.push(JSON.parse(text));
|
|
227
|
+
}
|
|
228
|
+
catch (e) {
|
|
229
|
+
if (!(e instanceof SyntaxError)) {
|
|
230
|
+
responses.push(e);
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
responses.push(new InvalidResponseError('Server response was invalid: ' + JSON.stringify(text)));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
responses.push(text);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
else if (event.event === 'error') {
|
|
243
|
+
let text = event.data;
|
|
244
|
+
let errObj;
|
|
245
|
+
try {
|
|
246
|
+
errObj = JSON.parse(text);
|
|
247
|
+
}
|
|
248
|
+
catch (e) {
|
|
249
|
+
if (!(e instanceof SyntaxError)) {
|
|
250
|
+
throw e;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (typeof errObj !== 'object') {
|
|
254
|
+
errObj = {
|
|
255
|
+
status: 500,
|
|
256
|
+
textStatus: 'Iterator Error',
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
responses.push(errObj.status < 200
|
|
260
|
+
? new InformationalError(serverResponse, errObj)
|
|
261
|
+
: errObj.status < 300
|
|
262
|
+
? new SuccessError(serverResponse, errObj)
|
|
263
|
+
: errObj.status < 400
|
|
264
|
+
? new RedirectError(serverResponse, errObj)
|
|
265
|
+
: errObj.status < 500
|
|
266
|
+
? new ClientError(serverResponse, errObj)
|
|
267
|
+
: new ServerError(serverResponse, errObj));
|
|
268
|
+
}
|
|
269
|
+
else if (event.event === 'finished') {
|
|
270
|
+
responsesDone = true;
|
|
271
|
+
}
|
|
272
|
+
else if (event.event === 'ping') {
|
|
273
|
+
// Ignore keep-alive pings.
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
const resolve = nextResponseResolve;
|
|
277
|
+
if (!responsesDone) {
|
|
278
|
+
nextResponseReadyPromise = new Promise((res) => {
|
|
279
|
+
nextResponseResolve = res;
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
// Resolve the promise to continue any waiting iterator.
|
|
283
|
+
resolve();
|
|
284
|
+
},
|
|
285
|
+
onclose() {
|
|
286
|
+
responses.push(new ConnectionClosedUnexpectedlyError('The connection to the server was closed unexpectedly.'));
|
|
287
|
+
responsesDone = true;
|
|
288
|
+
nextResponseResolve();
|
|
289
|
+
},
|
|
290
|
+
onerror(err) {
|
|
291
|
+
// Rethrow to stop the operation.
|
|
292
|
+
throw err;
|
|
293
|
+
},
|
|
294
|
+
}).catch((err) => {
|
|
295
|
+
responses.push(new ConnectionError('The connection could not be established: ' + err));
|
|
296
|
+
responsesDone = true;
|
|
297
|
+
nextResponseResolve();
|
|
298
|
+
});
|
|
299
|
+
const iterator = {
|
|
300
|
+
abortController: ctrl,
|
|
301
|
+
async *[Symbol.asyncIterator]() {
|
|
302
|
+
do {
|
|
303
|
+
await nextResponseReadyPromise;
|
|
304
|
+
while (responses.length) {
|
|
305
|
+
yield responses.shift();
|
|
306
|
+
}
|
|
307
|
+
} while (!responsesDone);
|
|
308
|
+
},
|
|
309
|
+
};
|
|
310
|
+
return iterator;
|
|
311
|
+
}
|
|
135
312
|
}
|
|
136
313
|
exports.default = HttpRequester;
|
|
137
314
|
class InvalidResponseError extends Error {
|
|
@@ -141,19 +318,57 @@ class InvalidResponseError extends Error {
|
|
|
141
318
|
}
|
|
142
319
|
}
|
|
143
320
|
exports.InvalidResponseError = InvalidResponseError;
|
|
144
|
-
class
|
|
145
|
-
constructor(
|
|
321
|
+
class ConnectionClosedUnexpectedlyError extends Error {
|
|
322
|
+
constructor(message) {
|
|
323
|
+
super(message);
|
|
324
|
+
this.name = 'ConnectionClosedUnexpectedlyError';
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
exports.ConnectionClosedUnexpectedlyError = ConnectionClosedUnexpectedlyError;
|
|
328
|
+
class ConnectionError extends Error {
|
|
329
|
+
constructor(message) {
|
|
330
|
+
super(message);
|
|
331
|
+
this.name = 'ConnectionError';
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
exports.ConnectionError = ConnectionError;
|
|
335
|
+
class HttpError extends Error {
|
|
336
|
+
constructor(name, response, errObj) {
|
|
146
337
|
super(errObj.textStatus);
|
|
147
|
-
this.name =
|
|
338
|
+
this.name = name;
|
|
339
|
+
this.status = response.status;
|
|
340
|
+
this.statusText = response.statusText;
|
|
148
341
|
Object.assign(this, errObj);
|
|
149
342
|
}
|
|
150
343
|
}
|
|
344
|
+
exports.HttpError = HttpError;
|
|
345
|
+
class InformationalError extends HttpError {
|
|
346
|
+
constructor(response, errObj) {
|
|
347
|
+
super('InformationalError', response, errObj);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
exports.InformationalError = InformationalError;
|
|
351
|
+
class SuccessError extends HttpError {
|
|
352
|
+
constructor(response, errObj) {
|
|
353
|
+
super('SuccessError', response, errObj);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
exports.SuccessError = SuccessError;
|
|
357
|
+
class RedirectError extends HttpError {
|
|
358
|
+
constructor(response, errObj) {
|
|
359
|
+
super('RedirectError', response, errObj);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
exports.RedirectError = RedirectError;
|
|
363
|
+
class ClientError extends HttpError {
|
|
364
|
+
constructor(response, errObj) {
|
|
365
|
+
super('ClientError', response, errObj);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
151
368
|
exports.ClientError = ClientError;
|
|
152
|
-
class ServerError extends
|
|
153
|
-
constructor(errObj) {
|
|
154
|
-
super(errObj
|
|
155
|
-
this.name = 'ServerError';
|
|
156
|
-
Object.assign(this, errObj);
|
|
369
|
+
class ServerError extends HttpError {
|
|
370
|
+
constructor(response, errObj) {
|
|
371
|
+
super('ServerError', response, errObj);
|
|
157
372
|
}
|
|
158
373
|
}
|
|
159
374
|
exports.ServerError = ServerError;
|
package/lib/HttpRequester.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpRequester.js","sourceRoot":"","sources":["../src/HttpRequester.ts"],"names":[],"mappings":";;;AAiBA,MAAqB,aAAa;IAMhC,MAAM,CAAC,OAAO,CAAC,GAAW,EAAE,IAA0B;QACpD,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,GAAG,CAAC;SACZ;QACD,KAAK,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC7C,GAAG;gBACD,GAAG;oBACH,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;oBACrC,kBAAkB,CAAC,GAAG,CAAC;oBACvB,GAAG;oBACH,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;SAC7C;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,YAAY,SAA8C;QAnBlD,cAAS,GAAkB,IAAI,CAAC;QAChC,qBAAgB,GAAmC,EAAE,CAAC;QACtD,sBAAiB,GAAoC,EAAE,CAAC;QAkB9D,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;IACnE,CAAC;IAED,EAAE,CACA,KAAQ,EACR,QAIS;QAET,MAAM,IAA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