@genesislcap/foundation-comms 14.456.2 → 14.456.3-alpha-964727d.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/dts/connect/connect.d.ts +6 -2
- package/dist/dts/connect/connect.d.ts.map +1 -1
- package/dist/dts/connect/http.connect.d.ts +2 -1
- package/dist/dts/connect/http.connect.d.ts.map +1 -1
- package/dist/dts/connect/message.d.ts +7 -0
- package/dist/dts/connect/message.d.ts.map +1 -1
- package/dist/dts/metadata/metadata.d.ts +39 -3
- package/dist/dts/metadata/metadata.d.ts.map +1 -1
- package/dist/esm/connect/connect.js +26 -5
- package/dist/esm/connect/http.connect.js +56 -33
- package/dist/esm/connect/message.js +24 -0
- package/dist/esm/metadata/metadata.js +10 -0
- package/dist/foundation-comms.api.json +484 -9
- package/dist/foundation-comms.d.ts +56 -5
- package/package.json +14 -14
|
@@ -148,9 +148,12 @@ export interface Connect {
|
|
|
148
148
|
* @public
|
|
149
149
|
* @param resourceName - The name of the resource to request.
|
|
150
150
|
* @param params - An object containing optional parameters to include in the request.
|
|
151
|
+
* @param useCache - Whether to return a cached response when one exists for the same
|
|
152
|
+
* `resourceName` + `params` combination, and cache the response when a fresh request is made.
|
|
153
|
+
* Default: false.
|
|
151
154
|
* @returns A promise that resolves to a Message containing the server's response.
|
|
152
155
|
*/
|
|
153
|
-
request(resourceName: string, params?: RequestParams): Promise<Message>;
|
|
156
|
+
request(resourceName: string, params?: RequestParams, useCache?: boolean): Promise<Message>;
|
|
154
157
|
/**
|
|
155
158
|
* Sends a request to the server to get available resources.
|
|
156
159
|
* @public
|
|
@@ -205,7 +208,8 @@ export declare class DefaultConnect implements Connect {
|
|
|
205
208
|
dataLogoff(streamSourceRef: string): Promise<Message>;
|
|
206
209
|
getMetadata(resourceName: string, useCache?: boolean): Promise<Metadata>;
|
|
207
210
|
getJSONSchema(resourceName: string, useCache?: boolean): Promise<SchemaResponse>;
|
|
208
|
-
|
|
211
|
+
private inFlightRequests;
|
|
212
|
+
request(resourceName: string, params?: RequestParams, useCache?: boolean): Promise<Message>;
|
|
209
213
|
getAvailableResources(params?: RequestParams, useCache?: boolean): Promise<ResourcesMessage>;
|
|
210
214
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
|
211
215
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../src/connect/connect.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../src/connect/connect.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAEL,YAAY,EACZ,gBAAgB,EAEhB,OAAO,EACP,cAAc,EACd,aAAa,EACb,gBAAgB,EACjB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH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AAO,CAAC;IAef,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMrE,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKnD,UAAU,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMrD,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,GAAE,OAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;IAmC9E,aAAa,CACxB,YAAY,EAAE,MAAM,EACpB,QAAQ,GAAE,OAAc,GACvB,OAAO,CAAC,cAAc,CAAC;IAiC1B,OAAO,CAAC,gBAAgB,CAAuC;IAElD,OAAO,CAClB,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,aAAa,EACtB,QAAQ,GAAE,OAAe,GACxB,OAAO,CAAC,OAAO,CAAC;IA+Bb,qBAAqB,CACzB,MAAM,CAAC,EAAE,aAAa,EACtB,QAAQ,GAAE,OAAc,GACvB,OAAO,CAAC,gBAAgB,CAAC;IAef,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;CAWrF;AAID;;;GAGG;AACH,eAAO,MAAM,SAAS,+DAAkE,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,OAAO,+DAEnB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAEpC"}
|
|
@@ -45,6 +45,7 @@ export declare class DefaultHttpConnect implements Connect {
|
|
|
45
45
|
* @internal
|
|
46
46
|
*/
|
|
47
47
|
private streams;
|
|
48
|
+
private inFlightRequests;
|
|
48
49
|
/**
|
|
49
50
|
* Promise that tracks an ongoing session refresh to prevent concurrent refreshes from the same instance.
|
|
50
51
|
* @internal
|
|
@@ -84,7 +85,7 @@ export declare class DefaultHttpConnect implements Connect {
|
|
|
84
85
|
dataLogoff(streamSourceRef: string): Promise<Message>;
|
|
85
86
|
getMetadata(resourceName: string, useCache?: boolean): Promise<Metadata>;
|
|
86
87
|
getJSONSchema(resourceName: string): Promise<SchemaResponse>;
|
|
87
|
-
request(resourceName: string, params?: RequestParams): Promise<Message>;
|
|
88
|
+
request(resourceName: string, params?: RequestParams, useCache?: boolean): Promise<Message>;
|
|
88
89
|
getAvailableResources(params?: any, useCache?: boolean): Promise<ResourcesMessage>;
|
|
89
90
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
|
90
91
|
private maybeTurbo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.connect.d.ts","sourceRoot":"","sources":["../../../src/connect/http.connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAI/D,OAAO,EACL,eAAe,EAMf,UAAU,EAMX,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"http.connect.d.ts","sourceRoot":"","sources":["../../../src/connect/http.connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAI/D,OAAO,EACL,eAAe,EAMf,UAAU,EAMX,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAA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,OAAO,CAAC,OAAO,CAAC;IAWrD,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,GAAE,OAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;IAqB9E,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAY5D,OAAO,CAClB,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,aAAa,EACtB,QAAQ,GAAE,OAAe,GACxB,OAAO,CAAC,OAAO,CAAC;IAqEb,qBAAqB,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,QAAQ,GAAE,OAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAkBjF,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;IAYpF,OAAO,CAAC,UAAU;IAkDlB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,8BAA8B;IAmBtC,OAAO,CAAC,MAAM,CAAC,OAAO;IAItB,OAAO,CAAC,MAAM,CAAC,MAAM;CAUtB;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,+DAAsE,CAAC"}
|
|
@@ -307,6 +307,13 @@ export type RequestParams = {
|
|
|
307
307
|
REQUEST?: any;
|
|
308
308
|
[key: string]: any;
|
|
309
309
|
};
|
|
310
|
+
/**
|
|
311
|
+
* Builds a stable cache key for a REQ_ request from its resource name and params.
|
|
312
|
+
* Object keys are sorted so that semantically equivalent params produce the same key
|
|
313
|
+
* regardless of the order in which callers construct them.
|
|
314
|
+
* @internal
|
|
315
|
+
*/
|
|
316
|
+
export declare function buildRequestCacheKey(resourceName: string, params?: RequestParams): string;
|
|
310
317
|
/**
|
|
311
318
|
* Parameters for a COMMIT message
|
|
312
319
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/connect/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,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yB,IAAI,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC;IAYjE,2BAA2B,CAChC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC;IAYlC,2BAA2B,CAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,GAAE,MAAiB,GAC3B,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC;IAYlC,gCAAgC,CACrC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,SAAS,GAAE,MAAiB,GAC3B,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC;IAavC,qBAAqB,CAC1B,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC;IAY5B,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAOpD,4BAA4B,CACjC,OAAO,EAAE,OAAO,EAChB,WAAW,GAAE,MAA0C,GACtD,WAAW;IAed,8DAA8D;IACvD,0BAA0B,CAAC,OAAO,UAAQ,GAAG,WAAW;CAShE;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,sEAE1B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResourcesMessage } from '../connect/message';
|
|
1
|
+
import type { Message, ResourcesMessage } from '../connect/message';
|
|
2
2
|
import type { Metadata, SchemaResponse } from './metadata.types';
|
|
3
3
|
/**
|
|
4
4
|
* A Metadata cache definition
|
|
@@ -53,10 +53,42 @@ export interface ResourcesCache {
|
|
|
53
53
|
setResources(resources: ResourcesMessage): void;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* A request cache definition
|
|
57
57
|
* @public
|
|
58
58
|
*/
|
|
59
|
-
export
|
|
59
|
+
export interface RequestCache {
|
|
60
|
+
/**
|
|
61
|
+
* A map of cached request responses, keyed by resource name and serialized params.
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
cachedRequests: Map<string, Message>;
|
|
65
|
+
/**
|
|
66
|
+
* Returns the cached response for the specified key.
|
|
67
|
+
* @public
|
|
68
|
+
* @param key - The cache key (resource name + serialized params).
|
|
69
|
+
* @returns The cached response.
|
|
70
|
+
*/
|
|
71
|
+
getRequestFor(key: string): Message;
|
|
72
|
+
/**
|
|
73
|
+
* Returns true if a cached response exists for the specified key.
|
|
74
|
+
* @public
|
|
75
|
+
* @param key - The cache key.
|
|
76
|
+
* @returns True if a cached response exists, otherwise false.
|
|
77
|
+
*/
|
|
78
|
+
hasRequestFor(key: string): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Sets the cached response for the specified key.
|
|
81
|
+
* @public
|
|
82
|
+
* @param key - The cache key.
|
|
83
|
+
* @param response - The response to cache.
|
|
84
|
+
*/
|
|
85
|
+
setRequestFor(key: string, response: Message): void;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Union type of MetadataCache, JsonSchemaCache, ResourcesCache and RequestCache
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
91
|
+
export type MetaCache = MetadataCache & JsonSchemaCache & ResourcesCache & RequestCache;
|
|
60
92
|
/**
|
|
61
93
|
* The default implementation for the MetaCache interface.
|
|
62
94
|
* @public
|
|
@@ -65,6 +97,7 @@ export declare class DefaultMetaCache implements MetaCache {
|
|
|
65
97
|
cachedMetadata: Map<string, Metadata>;
|
|
66
98
|
cachedJsonSchema: Map<string, SchemaResponse>;
|
|
67
99
|
cachedResources: ResourcesMessage | null;
|
|
100
|
+
cachedRequests: Map<string, Message>;
|
|
68
101
|
getMetadataFor(resourceName: string): Metadata;
|
|
69
102
|
getJsonSchemaFor(resourceName: string): SchemaResponse;
|
|
70
103
|
getResources(): ResourcesMessage;
|
|
@@ -74,6 +107,9 @@ export declare class DefaultMetaCache implements MetaCache {
|
|
|
74
107
|
setMetadataFor(resourceName: string, metadata: Metadata): void;
|
|
75
108
|
setJsonSchemaFor(resourceName: string, schemaResponse: SchemaResponse): void;
|
|
76
109
|
setResources(resources: ResourcesMessage): void;
|
|
110
|
+
getRequestFor(key: string): Message;
|
|
111
|
+
hasRequestFor(key: string): boolean;
|
|
112
|
+
setRequestFor(key: string, response: Message): void;
|
|
77
113
|
}
|
|
78
114
|
/**
|
|
79
115
|
* The DI token for the MetaCache interface.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/metadata/metadata.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/metadata/metadata.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAEtC;;;;;OAKG;IACH,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,CAAC;IAE/C;;;;;OAKG;IACH,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;IAE9C;;;;;OAKG;IACH,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;CAChE;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC9C,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,CAAC;IACvD,gBAAgB,CAAC,YAAY,E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AAG,IAAI;IAI9D,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,GAAG,IAAI;IAI5E,YAAY,CAAC,SAAS,EAAE,gBAAgB,GAAG,IAAI;IAI/C,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAInC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAInC,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI;CAG3D;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,iEAAsE,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { logger } from '../utils';
|
|
|
8
8
|
import { ConnectEventsEmitter } from './connect.events';
|
|
9
9
|
import { ConnectConfig } from './connect.types';
|
|
10
10
|
import { HttpConnect } from './http.connect';
|
|
11
|
-
import { EventMessageType, MessageBuilder, } from './message';
|
|
11
|
+
import { buildRequestCacheKey, EventMessageType, MessageBuilder, } from './message';
|
|
12
12
|
import { Socket } from './socket';
|
|
13
13
|
import { updateState } from './updateState';
|
|
14
14
|
/**
|
|
@@ -36,6 +36,7 @@ let DefaultConnect = class DefaultConnect {
|
|
|
36
36
|
this.events = events;
|
|
37
37
|
this.config = config;
|
|
38
38
|
this.isWorking = false;
|
|
39
|
+
this.inFlightRequests = new Map();
|
|
39
40
|
}
|
|
40
41
|
httpMode() {
|
|
41
42
|
return false;
|
|
@@ -186,10 +187,30 @@ let DefaultConnect = class DefaultConnect {
|
|
|
186
187
|
return jsonSchema;
|
|
187
188
|
});
|
|
188
189
|
}
|
|
189
|
-
request(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
request(resourceName_1, params_1) {
|
|
191
|
+
return __awaiter(this, arguments, void 0, function* (resourceName, params, useCache = false) {
|
|
192
|
+
const cacheKey = buildRequestCacheKey(resourceName, params);
|
|
193
|
+
if (useCache && this.metaCache.hasRequestFor(cacheKey)) {
|
|
194
|
+
logger.debug(`Cached request response retrieved for ${cacheKey}`);
|
|
195
|
+
return this.metaCache.getRequestFor(cacheKey);
|
|
196
|
+
}
|
|
197
|
+
const inFlight = this.inFlightRequests.get(cacheKey);
|
|
198
|
+
if (inFlight) {
|
|
199
|
+
logger.debug(`In-flight request collapsed for ${cacheKey}`);
|
|
200
|
+
return inFlight;
|
|
201
|
+
}
|
|
202
|
+
const requestMessage = this.messageBuilder.createRequestMessage(resourceName, params);
|
|
203
|
+
logger.debug(`${requestMessage.MESSAGE_TYPE} (request server) message created -> `, requestMessage);
|
|
204
|
+
const promise = this.socket.send(requestMessage).finally(() => {
|
|
205
|
+
this.inFlightRequests.delete(cacheKey);
|
|
206
|
+
});
|
|
207
|
+
this.inFlightRequests.set(cacheKey, promise);
|
|
208
|
+
const response = yield promise;
|
|
209
|
+
if (useCache && response) {
|
|
210
|
+
this.metaCache.setRequestFor(cacheKey, response);
|
|
211
|
+
}
|
|
212
|
+
return response;
|
|
213
|
+
});
|
|
193
214
|
}
|
|
194
215
|
getAvailableResources(params_1) {
|
|
195
216
|
return __awaiter(this, arguments, void 0, function* (params, useCache = true) {
|
|
@@ -10,7 +10,7 @@ import { Session } from '../session';
|
|
|
10
10
|
import { logger } from '../utils';
|
|
11
11
|
import { Http } from './http';
|
|
12
12
|
import { HttpConnectConfig } from './http.connect.types';
|
|
13
|
-
import { EventMessageType, MessageBuilder, MessageType, } from './message';
|
|
13
|
+
import { buildRequestCacheKey, EventMessageType, MessageBuilder, MessageType, } from './message';
|
|
14
14
|
import { SessionRefreshResult, tryRefreshSession } from './sessionRefresh';
|
|
15
15
|
import { updateState } from './updateState';
|
|
16
16
|
/**
|
|
@@ -47,6 +47,7 @@ let DefaultHttpConnect = DefaultHttpConnect_1 = class DefaultHttpConnect {
|
|
|
47
47
|
* @internal
|
|
48
48
|
*/
|
|
49
49
|
this.streams = new Map();
|
|
50
|
+
this.inFlightRequests = new Map();
|
|
50
51
|
/**
|
|
51
52
|
* Promise that tracks an ongoing session refresh to prevent concurrent refreshes from the same instance.
|
|
52
53
|
* @internal
|
|
@@ -293,39 +294,61 @@ let DefaultHttpConnect = DefaultHttpConnect_1 = class DefaultHttpConnect {
|
|
|
293
294
|
return this.send(metaRequestMessage);
|
|
294
295
|
});
|
|
295
296
|
}
|
|
296
|
-
request(
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
297
|
+
request(resourceName_1, params_1) {
|
|
298
|
+
return __awaiter(this, arguments, void 0, function* (resourceName, params, useCache = false) {
|
|
299
|
+
const cacheKey = buildRequestCacheKey(resourceName, params);
|
|
300
|
+
if (useCache && this.metaCache.hasRequestFor(cacheKey)) {
|
|
301
|
+
logger.debug(`HTTP MODE - Cached request response retrieved for ${cacheKey}`);
|
|
302
|
+
return this.metaCache.getRequestFor(cacheKey);
|
|
303
|
+
}
|
|
304
|
+
const inFlight = this.inFlightRequests.get(cacheKey);
|
|
305
|
+
if (inFlight) {
|
|
306
|
+
logger.debug(`HTTP MODE - In-flight request collapsed for ${cacheKey}`);
|
|
307
|
+
return inFlight;
|
|
308
|
+
}
|
|
309
|
+
const requestMessage = this.messageBuilder.createRequestMessage(resourceName, params);
|
|
310
|
+
logger.debug(`HTTP MODE! - ${requestMessage.MESSAGE_TYPE} (request server) message created -> `, requestMessage);
|
|
311
|
+
// REQUEST_SERVER messages use GET method in HTTP mode
|
|
312
|
+
// GET requests cannot have a body, so we convert REQUEST and DETAILS params to query string
|
|
313
|
+
let url = DefaultHttpConnect_1.getUrl(this.host, requestMessage);
|
|
314
|
+
const queryParts = [];
|
|
315
|
+
if (requestMessage.REQUEST && Object.keys(requestMessage.REQUEST).length > 0) {
|
|
316
|
+
Object.keys(requestMessage.REQUEST).forEach((key) => {
|
|
317
|
+
const value = requestMessage.REQUEST[key];
|
|
318
|
+
if (value !== undefined && value !== null && !Number.isNaN(value)) {
|
|
319
|
+
// Server expects REQUEST.FIELD_NAME=value format
|
|
320
|
+
// Using dot notation which the server converts internally
|
|
321
|
+
queryParts.push(`REQUEST.${key}=${encodeURIComponent(String(value))}`);
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
// Note: Server expects these as plain parameters (e.g., MAX_ROWS=250)
|
|
326
|
+
// The server converts them to DETAILS.FIELD_NAME internally
|
|
327
|
+
if (requestMessage.DETAILS) {
|
|
328
|
+
Object.keys(requestMessage.DETAILS).forEach((key) => {
|
|
329
|
+
const value = requestMessage.DETAILS[key];
|
|
330
|
+
if (value !== undefined && value !== null && !Number.isNaN(value)) {
|
|
331
|
+
queryParts.push(`${key}=${encodeURIComponent(String(value))}`);
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
if (queryParts.length > 0) {
|
|
336
|
+
url = `${url}?${queryParts.join('&')}`;
|
|
337
|
+
}
|
|
338
|
+
logger.debug(`HTTP MODE! - REQUEST_SERVER GET URL: ${url}`);
|
|
339
|
+
const promise = this.http
|
|
340
|
+
.get(url, {
|
|
341
|
+
headers: this.messageBuilder.createHTTPHeadersFromMessage(requestMessage),
|
|
342
|
+
})
|
|
343
|
+
.finally(() => {
|
|
344
|
+
this.inFlightRequests.delete(cacheKey);
|
|
321
345
|
});
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
headers: this.messageBuilder.createHTTPHeadersFromMessage(requestMessage),
|
|
346
|
+
this.inFlightRequests.set(cacheKey, promise);
|
|
347
|
+
const response = yield promise;
|
|
348
|
+
if (useCache && response) {
|
|
349
|
+
this.metaCache.setRequestFor(cacheKey, response);
|
|
350
|
+
}
|
|
351
|
+
return response;
|
|
329
352
|
});
|
|
330
353
|
}
|
|
331
354
|
getAvailableResources(params_1) {
|
|
@@ -54,6 +54,30 @@ export var MessageCode;
|
|
|
54
54
|
MessageCode["SESSION_NOT_FOUND"] = "SESSION_NOT_FOUND";
|
|
55
55
|
MessageCode["UNKNOWN_MESSAGE_TYPE"] = "UNKNOWN_MESSAGE_TYPE";
|
|
56
56
|
})(MessageCode || (MessageCode = {}));
|
|
57
|
+
const sortKeys = (value) => {
|
|
58
|
+
if (Array.isArray(value))
|
|
59
|
+
return value.map(sortKeys);
|
|
60
|
+
// Only recurse into plain objects — class instances (Date, etc.) have custom
|
|
61
|
+
// serialization that JSON.stringify must reach via toJSON.
|
|
62
|
+
if (value && typeof value === 'object' && value.constructor === Object) {
|
|
63
|
+
return Object.keys(value)
|
|
64
|
+
.sort()
|
|
65
|
+
.reduce((acc, key) => {
|
|
66
|
+
acc[key] = sortKeys(value[key]);
|
|
67
|
+
return acc;
|
|
68
|
+
}, {});
|
|
69
|
+
}
|
|
70
|
+
return value;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Builds a stable cache key for a REQ_ request from its resource name and params.
|
|
74
|
+
* Object keys are sorted so that semantically equivalent params produce the same key
|
|
75
|
+
* regardless of the order in which callers construct them.
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
export function buildRequestCacheKey(resourceName, params) {
|
|
79
|
+
return `${resourceName}::${JSON.stringify(sortKeys(params !== null && params !== void 0 ? params : {}))}`;
|
|
80
|
+
}
|
|
57
81
|
/**
|
|
58
82
|
* Check if the provided message contains an error and throw an Error if it does
|
|
59
83
|
* @public
|
|
@@ -8,6 +8,7 @@ export class DefaultMetaCache {
|
|
|
8
8
|
this.cachedMetadata = new Map();
|
|
9
9
|
this.cachedJsonSchema = new Map();
|
|
10
10
|
this.cachedResources = null;
|
|
11
|
+
this.cachedRequests = new Map();
|
|
11
12
|
}
|
|
12
13
|
getMetadataFor(resourceName) {
|
|
13
14
|
return this.cachedMetadata.get(resourceName);
|
|
@@ -36,6 +37,15 @@ export class DefaultMetaCache {
|
|
|
36
37
|
setResources(resources) {
|
|
37
38
|
this.cachedResources = resources;
|
|
38
39
|
}
|
|
40
|
+
getRequestFor(key) {
|
|
41
|
+
return this.cachedRequests.get(key);
|
|
42
|
+
}
|
|
43
|
+
hasRequestFor(key) {
|
|
44
|
+
return this.cachedRequests.has(key);
|
|
45
|
+
}
|
|
46
|
+
setRequestFor(key, response) {
|
|
47
|
+
this.cachedRequests.set(key, response);
|
|
48
|
+
}
|
|
39
49
|
}
|
|
40
50
|
/**
|
|
41
51
|
* The DI token for the MetaCache interface.
|
|
@@ -2082,7 +2082,7 @@
|
|
|
2082
2082
|
{
|
|
2083
2083
|
"kind": "MethodSignature",
|
|
2084
2084
|
"canonicalReference": "@genesislcap/foundation-comms!Connect#request:member(1)",
|
|
2085
|
-
"docComment": "/**\n * Sends a request to the server to retrieve data or perform an action.\n *\n * @param resourceName - The name of the resource to request.\n *\n * @param params - An object containing optional parameters to include in the request.\n *\n * @returns A promise that resolves to a Message containing the server's response.\n *\n * @public\n */\n",
|
|
2085
|
+
"docComment": "/**\n * Sends a request to the server to retrieve data or perform an action.\n *\n * @param resourceName - The name of the resource to request.\n *\n * @param params - An object containing optional parameters to include in the request.\n *\n * @param useCache - Whether to return a cached response when one exists for the same `resourceName` + `params` combination, and cache the response when a fresh request is made. Default: false.\n *\n * @returns A promise that resolves to a Message containing the server's response.\n *\n * @public\n */\n",
|
|
2086
2086
|
"excerptTokens": [
|
|
2087
2087
|
{
|
|
2088
2088
|
"kind": "Content",
|
|
@@ -2101,6 +2101,14 @@
|
|
|
2101
2101
|
"text": "RequestParams",
|
|
2102
2102
|
"canonicalReference": "@genesislcap/foundation-comms!RequestParams:type"
|
|
2103
2103
|
},
|
|
2104
|
+
{
|
|
2105
|
+
"kind": "Content",
|
|
2106
|
+
"text": ", useCache?: "
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
"kind": "Content",
|
|
2110
|
+
"text": "boolean"
|
|
2111
|
+
},
|
|
2104
2112
|
{
|
|
2105
2113
|
"kind": "Content",
|
|
2106
2114
|
"text": "): "
|
|
@@ -2130,8 +2138,8 @@
|
|
|
2130
2138
|
],
|
|
2131
2139
|
"isOptional": false,
|
|
2132
2140
|
"returnTypeTokenRange": {
|
|
2133
|
-
"startIndex":
|
|
2134
|
-
"endIndex":
|
|
2141
|
+
"startIndex": 7,
|
|
2142
|
+
"endIndex": 11
|
|
2135
2143
|
},
|
|
2136
2144
|
"releaseTag": "Public",
|
|
2137
2145
|
"overloadIndex": 1,
|
|
@@ -2151,6 +2159,14 @@
|
|
|
2151
2159
|
"endIndex": 4
|
|
2152
2160
|
},
|
|
2153
2161
|
"isOptional": true
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
"parameterName": "useCache",
|
|
2165
|
+
"parameterTypeTokenRange": {
|
|
2166
|
+
"startIndex": 5,
|
|
2167
|
+
"endIndex": 6
|
|
2168
|
+
},
|
|
2169
|
+
"isOptional": true
|
|
2154
2170
|
}
|
|
2155
2171
|
],
|
|
2156
2172
|
"name": "request"
|
|
@@ -12524,6 +12540,14 @@
|
|
|
12524
12540
|
"text": "RequestParams",
|
|
12525
12541
|
"canonicalReference": "@genesislcap/foundation-comms!RequestParams:type"
|
|
12526
12542
|
},
|
|
12543
|
+
{
|
|
12544
|
+
"kind": "Content",
|
|
12545
|
+
"text": ", useCache?: "
|
|
12546
|
+
},
|
|
12547
|
+
{
|
|
12548
|
+
"kind": "Content",
|
|
12549
|
+
"text": "boolean"
|
|
12550
|
+
},
|
|
12527
12551
|
{
|
|
12528
12552
|
"kind": "Content",
|
|
12529
12553
|
"text": "): "
|
|
@@ -12553,8 +12577,8 @@
|
|
|
12553
12577
|
],
|
|
12554
12578
|
"isStatic": false,
|
|
12555
12579
|
"returnTypeTokenRange": {
|
|
12556
|
-
"startIndex":
|
|
12557
|
-
"endIndex":
|
|
12580
|
+
"startIndex": 7,
|
|
12581
|
+
"endIndex": 11
|
|
12558
12582
|
},
|
|
12559
12583
|
"releaseTag": "Public",
|
|
12560
12584
|
"isProtected": false,
|
|
@@ -12575,6 +12599,14 @@
|
|
|
12575
12599
|
"endIndex": 4
|
|
12576
12600
|
},
|
|
12577
12601
|
"isOptional": true
|
|
12602
|
+
},
|
|
12603
|
+
{
|
|
12604
|
+
"parameterName": "useCache",
|
|
12605
|
+
"parameterTypeTokenRange": {
|
|
12606
|
+
"startIndex": 5,
|
|
12607
|
+
"endIndex": 6
|
|
12608
|
+
},
|
|
12609
|
+
"isOptional": true
|
|
12578
12610
|
}
|
|
12579
12611
|
],
|
|
12580
12612
|
"isOptional": false,
|
|
@@ -18906,6 +18938,14 @@
|
|
|
18906
18938
|
"text": "RequestParams",
|
|
18907
18939
|
"canonicalReference": "@genesislcap/foundation-comms!RequestParams:type"
|
|
18908
18940
|
},
|
|
18941
|
+
{
|
|
18942
|
+
"kind": "Content",
|
|
18943
|
+
"text": ", useCache?: "
|
|
18944
|
+
},
|
|
18945
|
+
{
|
|
18946
|
+
"kind": "Content",
|
|
18947
|
+
"text": "boolean"
|
|
18948
|
+
},
|
|
18909
18949
|
{
|
|
18910
18950
|
"kind": "Content",
|
|
18911
18951
|
"text": "): "
|
|
@@ -18935,8 +18975,8 @@
|
|
|
18935
18975
|
],
|
|
18936
18976
|
"isStatic": false,
|
|
18937
18977
|
"returnTypeTokenRange": {
|
|
18938
|
-
"startIndex":
|
|
18939
|
-
"endIndex":
|
|
18978
|
+
"startIndex": 7,
|
|
18979
|
+
"endIndex": 11
|
|
18940
18980
|
},
|
|
18941
18981
|
"releaseTag": "Public",
|
|
18942
18982
|
"isProtected": false,
|
|
@@ -18957,6 +18997,14 @@
|
|
|
18957
18997
|
"endIndex": 4
|
|
18958
18998
|
},
|
|
18959
18999
|
"isOptional": true
|
|
19000
|
+
},
|
|
19001
|
+
{
|
|
19002
|
+
"parameterName": "useCache",
|
|
19003
|
+
"parameterTypeTokenRange": {
|
|
19004
|
+
"startIndex": 5,
|
|
19005
|
+
"endIndex": 6
|
|
19006
|
+
},
|
|
19007
|
+
"isOptional": true
|
|
18960
19008
|
}
|
|
18961
19009
|
],
|
|
18962
19010
|
"isOptional": false,
|
|
@@ -21089,6 +21137,50 @@
|
|
|
21089
21137
|
"isProtected": false,
|
|
21090
21138
|
"isAbstract": false
|
|
21091
21139
|
},
|
|
21140
|
+
{
|
|
21141
|
+
"kind": "Property",
|
|
21142
|
+
"canonicalReference": "@genesislcap/foundation-comms!DefaultMetaCache#cachedRequests:member",
|
|
21143
|
+
"docComment": "",
|
|
21144
|
+
"excerptTokens": [
|
|
21145
|
+
{
|
|
21146
|
+
"kind": "Content",
|
|
21147
|
+
"text": "cachedRequests: "
|
|
21148
|
+
},
|
|
21149
|
+
{
|
|
21150
|
+
"kind": "Reference",
|
|
21151
|
+
"text": "Map",
|
|
21152
|
+
"canonicalReference": "!Map:interface"
|
|
21153
|
+
},
|
|
21154
|
+
{
|
|
21155
|
+
"kind": "Content",
|
|
21156
|
+
"text": "<string, "
|
|
21157
|
+
},
|
|
21158
|
+
{
|
|
21159
|
+
"kind": "Reference",
|
|
21160
|
+
"text": "Message",
|
|
21161
|
+
"canonicalReference": "@genesislcap/foundation-comms!Message:type"
|
|
21162
|
+
},
|
|
21163
|
+
{
|
|
21164
|
+
"kind": "Content",
|
|
21165
|
+
"text": ">"
|
|
21166
|
+
},
|
|
21167
|
+
{
|
|
21168
|
+
"kind": "Content",
|
|
21169
|
+
"text": ";"
|
|
21170
|
+
}
|
|
21171
|
+
],
|
|
21172
|
+
"isReadonly": false,
|
|
21173
|
+
"isOptional": false,
|
|
21174
|
+
"releaseTag": "Public",
|
|
21175
|
+
"name": "cachedRequests",
|
|
21176
|
+
"propertyTypeTokenRange": {
|
|
21177
|
+
"startIndex": 1,
|
|
21178
|
+
"endIndex": 5
|
|
21179
|
+
},
|
|
21180
|
+
"isStatic": false,
|
|
21181
|
+
"isProtected": false,
|
|
21182
|
+
"isAbstract": false
|
|
21183
|
+
},
|
|
21092
21184
|
{
|
|
21093
21185
|
"kind": "Property",
|
|
21094
21186
|
"canonicalReference": "@genesislcap/foundation-comms!DefaultMetaCache#cachedResources:member",
|
|
@@ -21222,6 +21314,55 @@
|
|
|
21222
21314
|
"isAbstract": false,
|
|
21223
21315
|
"name": "getMetadataFor"
|
|
21224
21316
|
},
|
|
21317
|
+
{
|
|
21318
|
+
"kind": "Method",
|
|
21319
|
+
"canonicalReference": "@genesislcap/foundation-comms!DefaultMetaCache#getRequestFor:member(1)",
|
|
21320
|
+
"docComment": "",
|
|
21321
|
+
"excerptTokens": [
|
|
21322
|
+
{
|
|
21323
|
+
"kind": "Content",
|
|
21324
|
+
"text": "getRequestFor(key: "
|
|
21325
|
+
},
|
|
21326
|
+
{
|
|
21327
|
+
"kind": "Content",
|
|
21328
|
+
"text": "string"
|
|
21329
|
+
},
|
|
21330
|
+
{
|
|
21331
|
+
"kind": "Content",
|
|
21332
|
+
"text": "): "
|
|
21333
|
+
},
|
|
21334
|
+
{
|
|
21335
|
+
"kind": "Reference",
|
|
21336
|
+
"text": "Message",
|
|
21337
|
+
"canonicalReference": "@genesislcap/foundation-comms!Message:type"
|
|
21338
|
+
},
|
|
21339
|
+
{
|
|
21340
|
+
"kind": "Content",
|
|
21341
|
+
"text": ";"
|
|
21342
|
+
}
|
|
21343
|
+
],
|
|
21344
|
+
"isStatic": false,
|
|
21345
|
+
"returnTypeTokenRange": {
|
|
21346
|
+
"startIndex": 3,
|
|
21347
|
+
"endIndex": 4
|
|
21348
|
+
},
|
|
21349
|
+
"releaseTag": "Public",
|
|
21350
|
+
"isProtected": false,
|
|
21351
|
+
"overloadIndex": 1,
|
|
21352
|
+
"parameters": [
|
|
21353
|
+
{
|
|
21354
|
+
"parameterName": "key",
|
|
21355
|
+
"parameterTypeTokenRange": {
|
|
21356
|
+
"startIndex": 1,
|
|
21357
|
+
"endIndex": 2
|
|
21358
|
+
},
|
|
21359
|
+
"isOptional": false
|
|
21360
|
+
}
|
|
21361
|
+
],
|
|
21362
|
+
"isOptional": false,
|
|
21363
|
+
"isAbstract": false,
|
|
21364
|
+
"name": "getRequestFor"
|
|
21365
|
+
},
|
|
21225
21366
|
{
|
|
21226
21367
|
"kind": "Method",
|
|
21227
21368
|
"canonicalReference": "@genesislcap/foundation-comms!DefaultMetaCache#getResources:member(1)",
|
|
@@ -21350,6 +21491,54 @@
|
|
|
21350
21491
|
"isAbstract": false,
|
|
21351
21492
|
"name": "hasMetadataFor"
|
|
21352
21493
|
},
|
|
21494
|
+
{
|
|
21495
|
+
"kind": "Method",
|
|
21496
|
+
"canonicalReference": "@genesislcap/foundation-comms!DefaultMetaCache#hasRequestFor:member(1)",
|
|
21497
|
+
"docComment": "",
|
|
21498
|
+
"excerptTokens": [
|
|
21499
|
+
{
|
|
21500
|
+
"kind": "Content",
|
|
21501
|
+
"text": "hasRequestFor(key: "
|
|
21502
|
+
},
|
|
21503
|
+
{
|
|
21504
|
+
"kind": "Content",
|
|
21505
|
+
"text": "string"
|
|
21506
|
+
},
|
|
21507
|
+
{
|
|
21508
|
+
"kind": "Content",
|
|
21509
|
+
"text": "): "
|
|
21510
|
+
},
|
|
21511
|
+
{
|
|
21512
|
+
"kind": "Content",
|
|
21513
|
+
"text": "boolean"
|
|
21514
|
+
},
|
|
21515
|
+
{
|
|
21516
|
+
"kind": "Content",
|
|
21517
|
+
"text": ";"
|
|
21518
|
+
}
|
|
21519
|
+
],
|
|
21520
|
+
"isStatic": false,
|
|
21521
|
+
"returnTypeTokenRange": {
|
|
21522
|
+
"startIndex": 3,
|
|
21523
|
+
"endIndex": 4
|
|
21524
|
+
},
|
|
21525
|
+
"releaseTag": "Public",
|
|
21526
|
+
"isProtected": false,
|
|
21527
|
+
"overloadIndex": 1,
|
|
21528
|
+
"parameters": [
|
|
21529
|
+
{
|
|
21530
|
+
"parameterName": "key",
|
|
21531
|
+
"parameterTypeTokenRange": {
|
|
21532
|
+
"startIndex": 1,
|
|
21533
|
+
"endIndex": 2
|
|
21534
|
+
},
|
|
21535
|
+
"isOptional": false
|
|
21536
|
+
}
|
|
21537
|
+
],
|
|
21538
|
+
"isOptional": false,
|
|
21539
|
+
"isAbstract": false,
|
|
21540
|
+
"name": "hasRequestFor"
|
|
21541
|
+
},
|
|
21353
21542
|
{
|
|
21354
21543
|
"kind": "Method",
|
|
21355
21544
|
"canonicalReference": "@genesislcap/foundation-comms!DefaultMetaCache#hasResources:member(1)",
|
|
@@ -21511,6 +21700,71 @@
|
|
|
21511
21700
|
"isAbstract": false,
|
|
21512
21701
|
"name": "setMetadataFor"
|
|
21513
21702
|
},
|
|
21703
|
+
{
|
|
21704
|
+
"kind": "Method",
|
|
21705
|
+
"canonicalReference": "@genesislcap/foundation-comms!DefaultMetaCache#setRequestFor:member(1)",
|
|
21706
|
+
"docComment": "",
|
|
21707
|
+
"excerptTokens": [
|
|
21708
|
+
{
|
|
21709
|
+
"kind": "Content",
|
|
21710
|
+
"text": "setRequestFor(key: "
|
|
21711
|
+
},
|
|
21712
|
+
{
|
|
21713
|
+
"kind": "Content",
|
|
21714
|
+
"text": "string"
|
|
21715
|
+
},
|
|
21716
|
+
{
|
|
21717
|
+
"kind": "Content",
|
|
21718
|
+
"text": ", response: "
|
|
21719
|
+
},
|
|
21720
|
+
{
|
|
21721
|
+
"kind": "Reference",
|
|
21722
|
+
"text": "Message",
|
|
21723
|
+
"canonicalReference": "@genesislcap/foundation-comms!Message:type"
|
|
21724
|
+
},
|
|
21725
|
+
{
|
|
21726
|
+
"kind": "Content",
|
|
21727
|
+
"text": "): "
|
|
21728
|
+
},
|
|
21729
|
+
{
|
|
21730
|
+
"kind": "Content",
|
|
21731
|
+
"text": "void"
|
|
21732
|
+
},
|
|
21733
|
+
{
|
|
21734
|
+
"kind": "Content",
|
|
21735
|
+
"text": ";"
|
|
21736
|
+
}
|
|
21737
|
+
],
|
|
21738
|
+
"isStatic": false,
|
|
21739
|
+
"returnTypeTokenRange": {
|
|
21740
|
+
"startIndex": 5,
|
|
21741
|
+
"endIndex": 6
|
|
21742
|
+
},
|
|
21743
|
+
"releaseTag": "Public",
|
|
21744
|
+
"isProtected": false,
|
|
21745
|
+
"overloadIndex": 1,
|
|
21746
|
+
"parameters": [
|
|
21747
|
+
{
|
|
21748
|
+
"parameterName": "key",
|
|
21749
|
+
"parameterTypeTokenRange": {
|
|
21750
|
+
"startIndex": 1,
|
|
21751
|
+
"endIndex": 2
|
|
21752
|
+
},
|
|
21753
|
+
"isOptional": false
|
|
21754
|
+
},
|
|
21755
|
+
{
|
|
21756
|
+
"parameterName": "response",
|
|
21757
|
+
"parameterTypeTokenRange": {
|
|
21758
|
+
"startIndex": 3,
|
|
21759
|
+
"endIndex": 4
|
|
21760
|
+
},
|
|
21761
|
+
"isOptional": false
|
|
21762
|
+
}
|
|
21763
|
+
],
|
|
21764
|
+
"isOptional": false,
|
|
21765
|
+
"isAbstract": false,
|
|
21766
|
+
"name": "setRequestFor"
|
|
21767
|
+
},
|
|
21514
21768
|
{
|
|
21515
21769
|
"kind": "Method",
|
|
21516
21770
|
"canonicalReference": "@genesislcap/foundation-comms!DefaultMetaCache#setResources:member(1)",
|
|
@@ -30835,7 +31089,7 @@
|
|
|
30835
31089
|
{
|
|
30836
31090
|
"kind": "TypeAlias",
|
|
30837
31091
|
"canonicalReference": "@genesislcap/foundation-comms!MetaCache:type",
|
|
30838
|
-
"docComment": "/**\n * Union type of MetadataCache, JsonSchemaCache and
|
|
31092
|
+
"docComment": "/**\n * Union type of MetadataCache, JsonSchemaCache, ResourcesCache and RequestCache\n *\n * @public\n */\n",
|
|
30839
31093
|
"excerptTokens": [
|
|
30840
31094
|
{
|
|
30841
31095
|
"kind": "Content",
|
|
@@ -30864,6 +31118,15 @@
|
|
|
30864
31118
|
"text": "ResourcesCache",
|
|
30865
31119
|
"canonicalReference": "@genesislcap/foundation-comms!ResourcesCache:interface"
|
|
30866
31120
|
},
|
|
31121
|
+
{
|
|
31122
|
+
"kind": "Content",
|
|
31123
|
+
"text": " & "
|
|
31124
|
+
},
|
|
31125
|
+
{
|
|
31126
|
+
"kind": "Reference",
|
|
31127
|
+
"text": "RequestCache",
|
|
31128
|
+
"canonicalReference": "@genesislcap/foundation-comms!RequestCache_2:interface"
|
|
31129
|
+
},
|
|
30867
31130
|
{
|
|
30868
31131
|
"kind": "Content",
|
|
30869
31132
|
"text": ";"
|
|
@@ -30874,7 +31137,7 @@
|
|
|
30874
31137
|
"name": "MetaCache",
|
|
30875
31138
|
"typeTokenRange": {
|
|
30876
31139
|
"startIndex": 1,
|
|
30877
|
-
"endIndex":
|
|
31140
|
+
"endIndex": 8
|
|
30878
31141
|
}
|
|
30879
31142
|
},
|
|
30880
31143
|
{
|
|
@@ -32721,6 +32984,218 @@
|
|
|
32721
32984
|
"endIndex": 6
|
|
32722
32985
|
}
|
|
32723
32986
|
},
|
|
32987
|
+
{
|
|
32988
|
+
"kind": "Interface",
|
|
32989
|
+
"canonicalReference": "@genesislcap/foundation-comms!RequestCache_2:interface",
|
|
32990
|
+
"docComment": "/**\n * A request cache definition\n *\n * @public\n */\n",
|
|
32991
|
+
"excerptTokens": [
|
|
32992
|
+
{
|
|
32993
|
+
"kind": "Content",
|
|
32994
|
+
"text": "export interface RequestCache "
|
|
32995
|
+
}
|
|
32996
|
+
],
|
|
32997
|
+
"fileUrlPath": "src/metadata/metadata.ts",
|
|
32998
|
+
"releaseTag": "Public",
|
|
32999
|
+
"name": "RequestCache_2",
|
|
33000
|
+
"preserveMemberOrder": false,
|
|
33001
|
+
"members": [
|
|
33002
|
+
{
|
|
33003
|
+
"kind": "PropertySignature",
|
|
33004
|
+
"canonicalReference": "@genesislcap/foundation-comms!RequestCache_2#cachedRequests:member",
|
|
33005
|
+
"docComment": "/**\n * A map of cached request responses, keyed by resource name and serialized params.\n *\n * @public\n */\n",
|
|
33006
|
+
"excerptTokens": [
|
|
33007
|
+
{
|
|
33008
|
+
"kind": "Content",
|
|
33009
|
+
"text": "cachedRequests: "
|
|
33010
|
+
},
|
|
33011
|
+
{
|
|
33012
|
+
"kind": "Reference",
|
|
33013
|
+
"text": "Map",
|
|
33014
|
+
"canonicalReference": "!Map:interface"
|
|
33015
|
+
},
|
|
33016
|
+
{
|
|
33017
|
+
"kind": "Content",
|
|
33018
|
+
"text": "<string, "
|
|
33019
|
+
},
|
|
33020
|
+
{
|
|
33021
|
+
"kind": "Reference",
|
|
33022
|
+
"text": "Message",
|
|
33023
|
+
"canonicalReference": "@genesislcap/foundation-comms!Message:type"
|
|
33024
|
+
},
|
|
33025
|
+
{
|
|
33026
|
+
"kind": "Content",
|
|
33027
|
+
"text": ">"
|
|
33028
|
+
},
|
|
33029
|
+
{
|
|
33030
|
+
"kind": "Content",
|
|
33031
|
+
"text": ";"
|
|
33032
|
+
}
|
|
33033
|
+
],
|
|
33034
|
+
"isReadonly": false,
|
|
33035
|
+
"isOptional": false,
|
|
33036
|
+
"releaseTag": "Public",
|
|
33037
|
+
"name": "cachedRequests",
|
|
33038
|
+
"propertyTypeTokenRange": {
|
|
33039
|
+
"startIndex": 1,
|
|
33040
|
+
"endIndex": 5
|
|
33041
|
+
}
|
|
33042
|
+
},
|
|
33043
|
+
{
|
|
33044
|
+
"kind": "MethodSignature",
|
|
33045
|
+
"canonicalReference": "@genesislcap/foundation-comms!RequestCache_2#getRequestFor:member(1)",
|
|
33046
|
+
"docComment": "/**\n * Returns the cached response for the specified key.\n *\n * @param key - The cache key (resource name + serialized params).\n *\n * @returns The cached response.\n *\n * @public\n */\n",
|
|
33047
|
+
"excerptTokens": [
|
|
33048
|
+
{
|
|
33049
|
+
"kind": "Content",
|
|
33050
|
+
"text": "getRequestFor(key: "
|
|
33051
|
+
},
|
|
33052
|
+
{
|
|
33053
|
+
"kind": "Content",
|
|
33054
|
+
"text": "string"
|
|
33055
|
+
},
|
|
33056
|
+
{
|
|
33057
|
+
"kind": "Content",
|
|
33058
|
+
"text": "): "
|
|
33059
|
+
},
|
|
33060
|
+
{
|
|
33061
|
+
"kind": "Reference",
|
|
33062
|
+
"text": "Message",
|
|
33063
|
+
"canonicalReference": "@genesislcap/foundation-comms!Message:type"
|
|
33064
|
+
},
|
|
33065
|
+
{
|
|
33066
|
+
"kind": "Content",
|
|
33067
|
+
"text": ";"
|
|
33068
|
+
}
|
|
33069
|
+
],
|
|
33070
|
+
"isOptional": false,
|
|
33071
|
+
"returnTypeTokenRange": {
|
|
33072
|
+
"startIndex": 3,
|
|
33073
|
+
"endIndex": 4
|
|
33074
|
+
},
|
|
33075
|
+
"releaseTag": "Public",
|
|
33076
|
+
"overloadIndex": 1,
|
|
33077
|
+
"parameters": [
|
|
33078
|
+
{
|
|
33079
|
+
"parameterName": "key",
|
|
33080
|
+
"parameterTypeTokenRange": {
|
|
33081
|
+
"startIndex": 1,
|
|
33082
|
+
"endIndex": 2
|
|
33083
|
+
},
|
|
33084
|
+
"isOptional": false
|
|
33085
|
+
}
|
|
33086
|
+
],
|
|
33087
|
+
"name": "getRequestFor"
|
|
33088
|
+
},
|
|
33089
|
+
{
|
|
33090
|
+
"kind": "MethodSignature",
|
|
33091
|
+
"canonicalReference": "@genesislcap/foundation-comms!RequestCache_2#hasRequestFor:member(1)",
|
|
33092
|
+
"docComment": "/**\n * Returns true if a cached response exists for the specified key.\n *\n * @param key - The cache key.\n *\n * @returns True if a cached response exists, otherwise false.\n *\n * @public\n */\n",
|
|
33093
|
+
"excerptTokens": [
|
|
33094
|
+
{
|
|
33095
|
+
"kind": "Content",
|
|
33096
|
+
"text": "hasRequestFor(key: "
|
|
33097
|
+
},
|
|
33098
|
+
{
|
|
33099
|
+
"kind": "Content",
|
|
33100
|
+
"text": "string"
|
|
33101
|
+
},
|
|
33102
|
+
{
|
|
33103
|
+
"kind": "Content",
|
|
33104
|
+
"text": "): "
|
|
33105
|
+
},
|
|
33106
|
+
{
|
|
33107
|
+
"kind": "Content",
|
|
33108
|
+
"text": "boolean"
|
|
33109
|
+
},
|
|
33110
|
+
{
|
|
33111
|
+
"kind": "Content",
|
|
33112
|
+
"text": ";"
|
|
33113
|
+
}
|
|
33114
|
+
],
|
|
33115
|
+
"isOptional": false,
|
|
33116
|
+
"returnTypeTokenRange": {
|
|
33117
|
+
"startIndex": 3,
|
|
33118
|
+
"endIndex": 4
|
|
33119
|
+
},
|
|
33120
|
+
"releaseTag": "Public",
|
|
33121
|
+
"overloadIndex": 1,
|
|
33122
|
+
"parameters": [
|
|
33123
|
+
{
|
|
33124
|
+
"parameterName": "key",
|
|
33125
|
+
"parameterTypeTokenRange": {
|
|
33126
|
+
"startIndex": 1,
|
|
33127
|
+
"endIndex": 2
|
|
33128
|
+
},
|
|
33129
|
+
"isOptional": false
|
|
33130
|
+
}
|
|
33131
|
+
],
|
|
33132
|
+
"name": "hasRequestFor"
|
|
33133
|
+
},
|
|
33134
|
+
{
|
|
33135
|
+
"kind": "MethodSignature",
|
|
33136
|
+
"canonicalReference": "@genesislcap/foundation-comms!RequestCache_2#setRequestFor:member(1)",
|
|
33137
|
+
"docComment": "/**\n * Sets the cached response for the specified key.\n *\n * @param key - The cache key.\n *\n * @param response - The response to cache.\n *\n * @public\n */\n",
|
|
33138
|
+
"excerptTokens": [
|
|
33139
|
+
{
|
|
33140
|
+
"kind": "Content",
|
|
33141
|
+
"text": "setRequestFor(key: "
|
|
33142
|
+
},
|
|
33143
|
+
{
|
|
33144
|
+
"kind": "Content",
|
|
33145
|
+
"text": "string"
|
|
33146
|
+
},
|
|
33147
|
+
{
|
|
33148
|
+
"kind": "Content",
|
|
33149
|
+
"text": ", response: "
|
|
33150
|
+
},
|
|
33151
|
+
{
|
|
33152
|
+
"kind": "Reference",
|
|
33153
|
+
"text": "Message",
|
|
33154
|
+
"canonicalReference": "@genesislcap/foundation-comms!Message:type"
|
|
33155
|
+
},
|
|
33156
|
+
{
|
|
33157
|
+
"kind": "Content",
|
|
33158
|
+
"text": "): "
|
|
33159
|
+
},
|
|
33160
|
+
{
|
|
33161
|
+
"kind": "Content",
|
|
33162
|
+
"text": "void"
|
|
33163
|
+
},
|
|
33164
|
+
{
|
|
33165
|
+
"kind": "Content",
|
|
33166
|
+
"text": ";"
|
|
33167
|
+
}
|
|
33168
|
+
],
|
|
33169
|
+
"isOptional": false,
|
|
33170
|
+
"returnTypeTokenRange": {
|
|
33171
|
+
"startIndex": 5,
|
|
33172
|
+
"endIndex": 6
|
|
33173
|
+
},
|
|
33174
|
+
"releaseTag": "Public",
|
|
33175
|
+
"overloadIndex": 1,
|
|
33176
|
+
"parameters": [
|
|
33177
|
+
{
|
|
33178
|
+
"parameterName": "key",
|
|
33179
|
+
"parameterTypeTokenRange": {
|
|
33180
|
+
"startIndex": 1,
|
|
33181
|
+
"endIndex": 2
|
|
33182
|
+
},
|
|
33183
|
+
"isOptional": false
|
|
33184
|
+
},
|
|
33185
|
+
{
|
|
33186
|
+
"parameterName": "response",
|
|
33187
|
+
"parameterTypeTokenRange": {
|
|
33188
|
+
"startIndex": 3,
|
|
33189
|
+
"endIndex": 4
|
|
33190
|
+
},
|
|
33191
|
+
"isOptional": false
|
|
33192
|
+
}
|
|
33193
|
+
],
|
|
33194
|
+
"name": "setRequestFor"
|
|
33195
|
+
}
|
|
33196
|
+
],
|
|
33197
|
+
"extendsTokenRanges": []
|
|
33198
|
+
},
|
|
32724
33199
|
{
|
|
32725
33200
|
"kind": "TypeAlias",
|
|
32726
33201
|
"canonicalReference": "@genesislcap/foundation-comms!RequestDetailsParam:type",
|
|
@@ -156,6 +156,14 @@ export declare type BasicCredentialsInput = {
|
|
|
156
156
|
password: string;
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
+
/**
|
|
160
|
+
* Builds a stable cache key for a REQ_ request from its resource name and params.
|
|
161
|
+
* Object keys are sorted so that semantically equivalent params produce the same key
|
|
162
|
+
* regardless of the order in which callers construct them.
|
|
163
|
+
* @internal
|
|
164
|
+
*/
|
|
165
|
+
export declare function buildRequestCacheKey(resourceName: string, params?: RequestParams): string;
|
|
166
|
+
|
|
159
167
|
/**
|
|
160
168
|
* @public
|
|
161
169
|
*/
|
|
@@ -385,9 +393,12 @@ export declare interface Connect {
|
|
|
385
393
|
* @public
|
|
386
394
|
* @param resourceName - The name of the resource to request.
|
|
387
395
|
* @param params - An object containing optional parameters to include in the request.
|
|
396
|
+
* @param useCache - Whether to return a cached response when one exists for the same
|
|
397
|
+
* `resourceName` + `params` combination, and cache the response when a fresh request is made.
|
|
398
|
+
* Default: false.
|
|
388
399
|
* @returns A promise that resolves to a Message containing the server's response.
|
|
389
400
|
*/
|
|
390
|
-
request(resourceName: string, params?: RequestParams): Promise<Message>;
|
|
401
|
+
request(resourceName: string, params?: RequestParams, useCache?: boolean): Promise<Message>;
|
|
391
402
|
/**
|
|
392
403
|
* Sends a request to the server to get available resources.
|
|
393
404
|
* @public
|
|
@@ -1860,7 +1871,8 @@ export declare class DefaultConnect implements Connect {
|
|
|
1860
1871
|
dataLogoff(streamSourceRef: string): Promise<Message>;
|
|
1861
1872
|
getMetadata(resourceName: string, useCache?: boolean): Promise<Metadata>;
|
|
1862
1873
|
getJSONSchema(resourceName: string, useCache?: boolean): Promise<SchemaResponse>;
|
|
1863
|
-
|
|
1874
|
+
private inFlightRequests;
|
|
1875
|
+
request(resourceName: string, params?: RequestParams, useCache?: boolean): Promise<Message>;
|
|
1864
1876
|
getAvailableResources(params?: RequestParams, useCache?: boolean): Promise<ResourcesMessage>;
|
|
1865
1877
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
|
1866
1878
|
}
|
|
@@ -2184,6 +2196,7 @@ export declare class DefaultHttpConnect implements Connect {
|
|
|
2184
2196
|
* @internal
|
|
2185
2197
|
*/
|
|
2186
2198
|
private streams;
|
|
2199
|
+
private inFlightRequests;
|
|
2187
2200
|
/**
|
|
2188
2201
|
* Promise that tracks an ongoing session refresh to prevent concurrent refreshes from the same instance.
|
|
2189
2202
|
* @internal
|
|
@@ -2223,7 +2236,7 @@ export declare class DefaultHttpConnect implements Connect {
|
|
|
2223
2236
|
dataLogoff(streamSourceRef: string): Promise<Message>;
|
|
2224
2237
|
getMetadata(resourceName: string, useCache?: boolean): Promise<Metadata>;
|
|
2225
2238
|
getJSONSchema(resourceName: string): Promise<SchemaResponse>;
|
|
2226
|
-
request(resourceName: string, params?: RequestParams): Promise<Message>;
|
|
2239
|
+
request(resourceName: string, params?: RequestParams, useCache?: boolean): Promise<Message>;
|
|
2227
2240
|
getAvailableResources(params?: any, useCache?: boolean): Promise<ResourcesMessage>;
|
|
2228
2241
|
commitEvent(eventName: string, params?: CommitParams): Promise<Message>;
|
|
2229
2242
|
private maybeTurbo;
|
|
@@ -2360,6 +2373,7 @@ export declare class DefaultMetaCache implements MetaCache {
|
|
|
2360
2373
|
cachedMetadata: Map<string, Metadata>;
|
|
2361
2374
|
cachedJsonSchema: Map<string, SchemaResponse>;
|
|
2362
2375
|
cachedResources: ResourcesMessage | null;
|
|
2376
|
+
cachedRequests: Map<string, Message>;
|
|
2363
2377
|
getMetadataFor(resourceName: string): Metadata;
|
|
2364
2378
|
getJsonSchemaFor(resourceName: string): SchemaResponse;
|
|
2365
2379
|
getResources(): ResourcesMessage;
|
|
@@ -2369,6 +2383,9 @@ export declare class DefaultMetaCache implements MetaCache {
|
|
|
2369
2383
|
setMetadataFor(resourceName: string, metadata: Metadata): void;
|
|
2370
2384
|
setJsonSchemaFor(resourceName: string, schemaResponse: SchemaResponse): void;
|
|
2371
2385
|
setResources(resources: ResourcesMessage): void;
|
|
2386
|
+
getRequestFor(key: string): Message;
|
|
2387
|
+
hasRequestFor(key: string): boolean;
|
|
2388
|
+
setRequestFor(key: string, response: Message): void;
|
|
2372
2389
|
}
|
|
2373
2390
|
|
|
2374
2391
|
/**
|
|
@@ -3911,10 +3928,10 @@ export declare enum MessageType {
|
|
|
3911
3928
|
}
|
|
3912
3929
|
|
|
3913
3930
|
/**
|
|
3914
|
-
* Union type of MetadataCache, JsonSchemaCache and
|
|
3931
|
+
* Union type of MetadataCache, JsonSchemaCache, ResourcesCache and RequestCache
|
|
3915
3932
|
* @public
|
|
3916
3933
|
*/
|
|
3917
|
-
export declare type MetaCache = MetadataCache & JsonSchemaCache & ResourcesCache;
|
|
3934
|
+
export declare type MetaCache = MetadataCache & JsonSchemaCache & ResourcesCache & RequestCache_2;
|
|
3918
3935
|
|
|
3919
3936
|
/**
|
|
3920
3937
|
* The DI token for the MetaCache interface.
|
|
@@ -4271,6 +4288,40 @@ export declare type ReplyDetail = {
|
|
|
4271
4288
|
[key: string]: any;
|
|
4272
4289
|
};
|
|
4273
4290
|
|
|
4291
|
+
/**
|
|
4292
|
+
* A request cache definition
|
|
4293
|
+
* @public
|
|
4294
|
+
*/
|
|
4295
|
+
declare interface RequestCache_2 {
|
|
4296
|
+
/**
|
|
4297
|
+
* A map of cached request responses, keyed by resource name and serialized params.
|
|
4298
|
+
* @public
|
|
4299
|
+
*/
|
|
4300
|
+
cachedRequests: Map<string, Message>;
|
|
4301
|
+
/**
|
|
4302
|
+
* Returns the cached response for the specified key.
|
|
4303
|
+
* @public
|
|
4304
|
+
* @param key - The cache key (resource name + serialized params).
|
|
4305
|
+
* @returns The cached response.
|
|
4306
|
+
*/
|
|
4307
|
+
getRequestFor(key: string): Message;
|
|
4308
|
+
/**
|
|
4309
|
+
* Returns true if a cached response exists for the specified key.
|
|
4310
|
+
* @public
|
|
4311
|
+
* @param key - The cache key.
|
|
4312
|
+
* @returns True if a cached response exists, otherwise false.
|
|
4313
|
+
*/
|
|
4314
|
+
hasRequestFor(key: string): boolean;
|
|
4315
|
+
/**
|
|
4316
|
+
* Sets the cached response for the specified key.
|
|
4317
|
+
* @public
|
|
4318
|
+
* @param key - The cache key.
|
|
4319
|
+
* @param response - The response to cache.
|
|
4320
|
+
*/
|
|
4321
|
+
setRequestFor(key: string, response: Message): void;
|
|
4322
|
+
}
|
|
4323
|
+
export { RequestCache_2 as RequestCache }
|
|
4324
|
+
|
|
4274
4325
|
/**
|
|
4275
4326
|
* @public
|
|
4276
4327
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-comms",
|
|
3
3
|
"description": "Genesis Foundation UI Comms",
|
|
4
|
-
"version": "14.456.
|
|
4
|
+
"version": "14.456.3-alpha-964727d.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -77,24 +77,24 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@genesislcap/foundation-testing": "14.456.
|
|
81
|
-
"@genesislcap/genx": "14.456.
|
|
82
|
-
"@genesislcap/rollup-builder": "14.456.
|
|
83
|
-
"@genesislcap/ts-builder": "14.456.
|
|
84
|
-
"@genesislcap/uvu-playwright-builder": "14.456.
|
|
85
|
-
"@genesislcap/vite-builder": "14.456.
|
|
86
|
-
"@genesislcap/webpack-builder": "14.456.
|
|
80
|
+
"@genesislcap/foundation-testing": "14.456.3-alpha-964727d.0",
|
|
81
|
+
"@genesislcap/genx": "14.456.3-alpha-964727d.0",
|
|
82
|
+
"@genesislcap/rollup-builder": "14.456.3-alpha-964727d.0",
|
|
83
|
+
"@genesislcap/ts-builder": "14.456.3-alpha-964727d.0",
|
|
84
|
+
"@genesislcap/uvu-playwright-builder": "14.456.3-alpha-964727d.0",
|
|
85
|
+
"@genesislcap/vite-builder": "14.456.3-alpha-964727d.0",
|
|
86
|
+
"@genesislcap/webpack-builder": "14.456.3-alpha-964727d.0",
|
|
87
87
|
"@types/js-cookie": "^3.0.2",
|
|
88
88
|
"@types/json-schema": "^7.0.11",
|
|
89
89
|
"@types/webappsec-credential-management": "^0.6.2",
|
|
90
90
|
"sinon": "^17.0.1"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@genesislcap/foundation-broadcast-channel": "14.456.
|
|
94
|
-
"@genesislcap/foundation-logger": "14.456.
|
|
95
|
-
"@genesislcap/foundation-user": "14.456.
|
|
96
|
-
"@genesislcap/foundation-utils": "14.456.
|
|
97
|
-
"@genesislcap/web-core": "14.456.
|
|
93
|
+
"@genesislcap/foundation-broadcast-channel": "14.456.3-alpha-964727d.0",
|
|
94
|
+
"@genesislcap/foundation-logger": "14.456.3-alpha-964727d.0",
|
|
95
|
+
"@genesislcap/foundation-user": "14.456.3-alpha-964727d.0",
|
|
96
|
+
"@genesislcap/foundation-utils": "14.456.3-alpha-964727d.0",
|
|
97
|
+
"@genesislcap/web-core": "14.456.3-alpha-964727d.0",
|
|
98
98
|
"@microsoft/fast-element": "1.14.0",
|
|
99
99
|
"@microsoft/fast-foundation": "2.50.0",
|
|
100
100
|
"analytics": "0.8.16",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"publishConfig": {
|
|
114
114
|
"access": "public"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "e7b41d7a925a02ed4d5f85725c01189d100f0037"
|
|
117
117
|
}
|