@securitydept/client 0.3.0-beta.5 → 0.3.0-beta.7
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/{create-Bm-XRA3G.mjs → create-i5VyYgN6.mjs} +68 -652
- package/dist/create-i5VyYgN6.mjs.map +1 -0
- package/dist/handle-DwMgqe7R.mjs +638 -0
- package/dist/handle-DwMgqe7R.mjs.map +1 -0
- package/dist/{index-D5mW18cM.d.mts → index-B9SEJGU2.d.mts} +108 -89
- package/dist/{index-BT-u3qNI.d.mts → index-BjCFWcmV.d.mts} +3 -4
- package/dist/{index-Ch8lrE44.d.mts → index-CFAJ969E.d.mts} +81 -32
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +99 -99
- package/dist/index.mjs.map +1 -1
- package/dist/{router-BJ8LqNJ1.mjs → router-at5bTdJQ.mjs} +4 -4
- package/dist/{router-BJ8LqNJ1.mjs.map → router-at5bTdJQ.mjs.map} +1 -1
- package/dist/rx/index.d.mts +1 -2
- package/dist/rx/index.mjs +1 -1
- package/dist/{rx-BoB32Dzg.mjs → rx-DM6Ouv-m.mjs} +21 -8
- package/dist/rx-DM6Ouv-m.mjs.map +1 -0
- package/dist/server/index.d.mts +1 -2
- package/dist/server/index.mjs +1 -1
- package/dist/server/index.mjs.map +1 -1
- package/dist/test/index.d.mts +2 -3
- package/dist/test/index.mjs +3 -3
- package/dist/test/index.mjs.map +1 -1
- package/dist/{uri-string-BfnIT4gJ.mjs → uri-string-BPNbIMgv.mjs} +5 -3
- package/dist/{uri-string-BfnIT4gJ.mjs.map → uri-string-BPNbIMgv.mjs.map} +1 -1
- package/dist/web/index.d.mts +3 -4
- package/dist/web/index.mjs +27 -21
- package/dist/web/index.mjs.map +1 -1
- package/dist/webext/index.d.mts +2 -3
- package/dist/webext/index.mjs +12 -10
- package/dist/webext/index.mjs.map +1 -1
- package/package.json +14 -5
- package/dist/create-Bm-XRA3G.mjs.map +0 -1
- package/dist/rx-BoB32Dzg.mjs.map +0 -1
|
@@ -1,126 +1,8 @@
|
|
|
1
|
-
import { A as RxEventSubject,
|
|
1
|
+
import { A as RxEventSubject, F as SYMBOL_DISPOSE, H as ClientError, K as UserRecovery, M as isInteropObservableTrait, U as ClientErrorKind, W as ClientErrorSource, j as SYMBOL_OBSERVABLE, k as RxEventStream } from "./rx-DM6Ouv-m.mjs";
|
|
2
2
|
import { v7 } from "uuid";
|
|
3
3
|
import { InjectionToken, Injector, Optional, ReflectiveInjector } from "injection-js";
|
|
4
|
-
import {
|
|
4
|
+
import { EMPTY, from, fromEventPattern, map, merge, of } from "rxjs";
|
|
5
5
|
import { type } from "arktype";
|
|
6
|
-
//#region src/errors/presentation-descriptor.ts
|
|
7
|
-
const DEFAULT_RECOVERY_LABELS = {
|
|
8
|
-
[UserRecovery.None]: "",
|
|
9
|
-
[UserRecovery.Retry]: "Try again",
|
|
10
|
-
[UserRecovery.RestartFlow]: "Restart flow",
|
|
11
|
-
[UserRecovery.Reauthenticate]: "Sign in again",
|
|
12
|
-
[UserRecovery.ContactSupport]: "Contact support"
|
|
13
|
-
};
|
|
14
|
-
const userRecoveryValues = new Set(Object.values(UserRecovery));
|
|
15
|
-
const clientErrorKindValues = new Set(Object.values(ClientErrorKind));
|
|
16
|
-
function readErrorPresentationDescriptor(error, options = {}) {
|
|
17
|
-
const clientError = error instanceof ClientError ? error : coerceClientErrorLike(error);
|
|
18
|
-
if (!clientError) return {
|
|
19
|
-
code: null,
|
|
20
|
-
kind: null,
|
|
21
|
-
title: options.fallbackTitle ?? "Operation failed",
|
|
22
|
-
description: options.fallbackDescription ?? "An unexpected error prevented the operation from completing.",
|
|
23
|
-
recovery: UserRecovery.None,
|
|
24
|
-
retryable: false,
|
|
25
|
-
tone: ErrorPresentationTone.Danger,
|
|
26
|
-
primaryAction: null
|
|
27
|
-
};
|
|
28
|
-
const code = clientError.presentation?.code ?? clientError.code;
|
|
29
|
-
const codePresentation = code ? options.codePresentations?.[code] : void 0;
|
|
30
|
-
const recovery = clientError.presentation?.recovery ?? codePresentation?.recovery ?? clientError.recovery;
|
|
31
|
-
const generic = readGenericPresentation(clientError.kind);
|
|
32
|
-
return {
|
|
33
|
-
code,
|
|
34
|
-
kind: clientError.kind,
|
|
35
|
-
source: clientError.source,
|
|
36
|
-
title: codePresentation?.title ?? generic.title,
|
|
37
|
-
description: clientError.presentation?.message ?? codePresentation?.description ?? generic.description,
|
|
38
|
-
recovery,
|
|
39
|
-
retryable: clientError.retryable,
|
|
40
|
-
tone: codePresentation?.tone ?? readClientErrorTone(clientError.kind, recovery),
|
|
41
|
-
primaryAction: readPrimaryAction(recovery, options)
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
function readGenericPresentation(kind) {
|
|
45
|
-
switch (kind) {
|
|
46
|
-
case ClientErrorKind.Unauthenticated: return {
|
|
47
|
-
title: "Authentication required",
|
|
48
|
-
description: "Sign in again to continue."
|
|
49
|
-
};
|
|
50
|
-
case ClientErrorKind.Unauthorized: return {
|
|
51
|
-
title: "Access denied",
|
|
52
|
-
description: "You do not have permission to complete this operation."
|
|
53
|
-
};
|
|
54
|
-
case ClientErrorKind.Cancelled: return {
|
|
55
|
-
title: "Operation cancelled",
|
|
56
|
-
description: "The operation was cancelled before it completed."
|
|
57
|
-
};
|
|
58
|
-
case ClientErrorKind.Timeout: return {
|
|
59
|
-
title: "Request timed out",
|
|
60
|
-
description: "The operation did not complete in time."
|
|
61
|
-
};
|
|
62
|
-
case ClientErrorKind.Configuration: return {
|
|
63
|
-
title: "Configuration error",
|
|
64
|
-
description: "The client is not configured to complete this operation."
|
|
65
|
-
};
|
|
66
|
-
case ClientErrorKind.Storage: return {
|
|
67
|
-
title: "Storage failed",
|
|
68
|
-
description: "The client could not access required stored data."
|
|
69
|
-
};
|
|
70
|
-
case ClientErrorKind.Transport: return {
|
|
71
|
-
title: "Network request failed",
|
|
72
|
-
description: "The client could not reach the service."
|
|
73
|
-
};
|
|
74
|
-
case ClientErrorKind.Server: return {
|
|
75
|
-
title: "Server request failed",
|
|
76
|
-
description: "The service could not complete the request."
|
|
77
|
-
};
|
|
78
|
-
case ClientErrorKind.Protocol: return {
|
|
79
|
-
title: "Invalid response",
|
|
80
|
-
description: "The service response did not satisfy the expected protocol."
|
|
81
|
-
};
|
|
82
|
-
case ClientErrorKind.Authorization: return {
|
|
83
|
-
title: "Authorization failed",
|
|
84
|
-
description: "The authorization flow could not be completed."
|
|
85
|
-
};
|
|
86
|
-
default: return {
|
|
87
|
-
title: "Operation failed",
|
|
88
|
-
description: "The operation could not be completed."
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function readClientErrorTone(kind, recovery) {
|
|
93
|
-
if (kind === ClientErrorKind.Cancelled) return ErrorPresentationTone.Neutral;
|
|
94
|
-
if (kind === ClientErrorKind.Unauthenticated || kind === ClientErrorKind.Timeout || kind === ClientErrorKind.Transport || kind === ClientErrorKind.Server || recovery === UserRecovery.Retry || recovery === UserRecovery.RestartFlow || recovery === UserRecovery.Reauthenticate) return ErrorPresentationTone.Warning;
|
|
95
|
-
return ErrorPresentationTone.Danger;
|
|
96
|
-
}
|
|
97
|
-
function coerceClientErrorLike(error) {
|
|
98
|
-
if (typeof error !== "object" || error === null) return null;
|
|
99
|
-
const candidate = error;
|
|
100
|
-
if (typeof candidate.kind !== "string" || !clientErrorKindValues.has(candidate.kind)) return null;
|
|
101
|
-
return {
|
|
102
|
-
code: typeof candidate.code === "string" ? candidate.code : null,
|
|
103
|
-
kind: candidate.kind,
|
|
104
|
-
recovery: typeof candidate.recovery === "string" && userRecoveryValues.has(candidate.recovery) ? candidate.recovery : UserRecovery.None,
|
|
105
|
-
retryable: candidate.retryable === true,
|
|
106
|
-
source: typeof candidate.source === "string" ? candidate.source : void 0,
|
|
107
|
-
presentation: isErrorPresentation(candidate.presentation) ? candidate.presentation : void 0
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
function isErrorPresentation(value) {
|
|
111
|
-
return typeof value === "object" && value !== null && typeof value.code === "string" && typeof value.message === "string" && typeof value.recovery === "string" && userRecoveryValues.has(value.recovery);
|
|
112
|
-
}
|
|
113
|
-
function readPrimaryAction(recovery, options) {
|
|
114
|
-
if (recovery === UserRecovery.None) return null;
|
|
115
|
-
const label = options.recoveryLabels?.[recovery] ?? DEFAULT_RECOVERY_LABELS[recovery];
|
|
116
|
-
if (!label) return null;
|
|
117
|
-
return {
|
|
118
|
-
recovery,
|
|
119
|
-
label,
|
|
120
|
-
href: options.recoveryLinks?.[recovery] ?? null
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
//#endregion
|
|
124
6
|
//#region src/injection/types.ts
|
|
125
7
|
var SecuritydeptInjectionToken = class extends InjectionToken {};
|
|
126
8
|
const SecurityDeptOptional = Optional;
|
|
@@ -229,22 +111,6 @@ function describeDependencyToken(token) {
|
|
|
229
111
|
return String(token);
|
|
230
112
|
}
|
|
231
113
|
//#endregion
|
|
232
|
-
//#region src/signals/signal.ts
|
|
233
|
-
/**
|
|
234
|
-
* Minimal writable signal implementation.
|
|
235
|
-
* `set()` always publishes a write. Equality-based value-version suppression is
|
|
236
|
-
* handled by the underlying Rx signal for computed dependency validation.
|
|
237
|
-
*/
|
|
238
|
-
function createSignal(initial, options) {
|
|
239
|
-
return RxStateSignal.fromInitialValue(initial, options);
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Create a read-only view of a writable signal.
|
|
243
|
-
*/
|
|
244
|
-
function readonlySignal(signal) {
|
|
245
|
-
return signal;
|
|
246
|
-
}
|
|
247
|
-
//#endregion
|
|
248
114
|
//#region src/events/types.ts
|
|
249
115
|
const EventStreamTraitSchema = type({ subscribe: "Function" });
|
|
250
116
|
const EventSourceKind = {
|
|
@@ -263,32 +129,6 @@ function isEventStreamTrait(value) {
|
|
|
263
129
|
const PageLifecycleTraitSchema = type({ resume: EventStreamTraitSchema });
|
|
264
130
|
const PAGE_LIFECYCLE_TRAIT_TOKEN = new SecuritydeptInjectionToken("PAGE_LIFECYCLE_TRAIT_TOKEN");
|
|
265
131
|
//#endregion
|
|
266
|
-
//#region src/popup/errors.ts
|
|
267
|
-
const PopupErrorCode = {
|
|
268
|
-
Blocked: "popup.blocked",
|
|
269
|
-
Closed: "popup.closed_by_user"
|
|
270
|
-
};
|
|
271
|
-
function readPopupErrorPresentationDescriptor(error, options = {}) {
|
|
272
|
-
return readErrorPresentationDescriptor(error, {
|
|
273
|
-
...options,
|
|
274
|
-
codePresentations: {
|
|
275
|
-
[PopupErrorCode.Blocked]: {
|
|
276
|
-
title: "Popup was blocked",
|
|
277
|
-
description: "The browser blocked the popup window. Allow popups for this site, then try again.",
|
|
278
|
-
recovery: UserRecovery.Retry,
|
|
279
|
-
tone: ErrorPresentationTone.Warning
|
|
280
|
-
},
|
|
281
|
-
[PopupErrorCode.Closed]: {
|
|
282
|
-
title: "Popup was closed",
|
|
283
|
-
description: "The popup window was closed before the operation completed. Start the flow again.",
|
|
284
|
-
recovery: UserRecovery.RestartFlow,
|
|
285
|
-
tone: ErrorPresentationTone.Warning
|
|
286
|
-
},
|
|
287
|
-
...options.codePresentations
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
//#endregion
|
|
292
132
|
//#region src/validation/validator.ts
|
|
293
133
|
function formatValidationFailure(failure) {
|
|
294
134
|
if (!failure) return null;
|
|
@@ -363,473 +203,6 @@ function validateTraitInput(options) {
|
|
|
363
203
|
options.onInvalid(result);
|
|
364
204
|
}
|
|
365
205
|
//#endregion
|
|
366
|
-
//#region src/protocol/json-rpc/types.ts
|
|
367
|
-
const JsonRpcIdSchema = type("string | number");
|
|
368
|
-
const JsonRpcErrorPayloadSchema = type({
|
|
369
|
-
code: "number",
|
|
370
|
-
message: "string",
|
|
371
|
-
data: "unknown?"
|
|
372
|
-
});
|
|
373
|
-
const JsonRpcRequestMessageSchema = type({
|
|
374
|
-
jsonrpc: "\"2.0\"",
|
|
375
|
-
id: JsonRpcIdSchema,
|
|
376
|
-
method: "string",
|
|
377
|
-
params: "unknown?"
|
|
378
|
-
});
|
|
379
|
-
const JsonRpcNotificationMessageSchema = type({
|
|
380
|
-
jsonrpc: "\"2.0\"",
|
|
381
|
-
method: "string",
|
|
382
|
-
params: "unknown?"
|
|
383
|
-
});
|
|
384
|
-
const JsonRpcSuccessResponseMessageSchema = type({
|
|
385
|
-
jsonrpc: "\"2.0\"",
|
|
386
|
-
id: JsonRpcIdSchema,
|
|
387
|
-
result: "unknown"
|
|
388
|
-
});
|
|
389
|
-
const JsonRpcErrorResponseMessageSchema = type({
|
|
390
|
-
jsonrpc: "\"2.0\"",
|
|
391
|
-
id: JsonRpcIdSchema,
|
|
392
|
-
error: JsonRpcErrorPayloadSchema
|
|
393
|
-
});
|
|
394
|
-
const JsonRpcMessageSchema = JsonRpcRequestMessageSchema.or(JsonRpcNotificationMessageSchema).or(JsonRpcSuccessResponseMessageSchema).or(JsonRpcErrorResponseMessageSchema);
|
|
395
|
-
//#endregion
|
|
396
|
-
//#region src/protocol/json-rpc/create.ts
|
|
397
|
-
function createJsonRpcClient(options) {
|
|
398
|
-
return new JsonRpcClient(options);
|
|
399
|
-
}
|
|
400
|
-
function createJsonRpcServer(options) {
|
|
401
|
-
return new JsonRpcServer(options);
|
|
402
|
-
}
|
|
403
|
-
function createJsonRpcServerAndClient(options) {
|
|
404
|
-
return new JsonRpcServerAndClient(options);
|
|
405
|
-
}
|
|
406
|
-
var JsonRpcClient = class {
|
|
407
|
-
options;
|
|
408
|
-
onNotification;
|
|
409
|
-
notificationSubject = new RxEventSubject();
|
|
410
|
-
pendingRequests = /* @__PURE__ */ new Map();
|
|
411
|
-
disposed = false;
|
|
412
|
-
nextRequestId = 1;
|
|
413
|
-
constructor(options) {
|
|
414
|
-
this.options = options;
|
|
415
|
-
this.onNotification = this.notificationSubject;
|
|
416
|
-
}
|
|
417
|
-
request(method, params, requestOptions = {}) {
|
|
418
|
-
if (this.disposed) return Promise.reject(createJsonRpcDisposedError("client"));
|
|
419
|
-
const id = this.nextRequestId++;
|
|
420
|
-
const timeoutMs = requestOptions.timeoutMs ?? this.options.defaultRequestTimeoutMs;
|
|
421
|
-
return new Promise((resolve, reject) => {
|
|
422
|
-
const pendingRequest = {
|
|
423
|
-
method,
|
|
424
|
-
reject,
|
|
425
|
-
resolve
|
|
426
|
-
};
|
|
427
|
-
if (timeoutMs !== void 0) pendingRequest.timeoutHandle = this.options.time.setTimeout(() => {
|
|
428
|
-
this.pendingRequests.delete(id);
|
|
429
|
-
reject(/* @__PURE__ */ new Error(`JSON-RPC request timed out for ${method}.`));
|
|
430
|
-
}, timeoutMs);
|
|
431
|
-
this.pendingRequests.set(id, pendingRequest);
|
|
432
|
-
try {
|
|
433
|
-
this.options.send({
|
|
434
|
-
jsonrpc: "2.0",
|
|
435
|
-
id,
|
|
436
|
-
method,
|
|
437
|
-
params
|
|
438
|
-
});
|
|
439
|
-
} catch (error) {
|
|
440
|
-
this.clearPendingRequest(id);
|
|
441
|
-
reject(error);
|
|
442
|
-
}
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
notify(method, params) {
|
|
446
|
-
if (this.disposed) return;
|
|
447
|
-
this.options.send({
|
|
448
|
-
jsonrpc: "2.0",
|
|
449
|
-
method,
|
|
450
|
-
params
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
receive(message) {
|
|
454
|
-
if (this.disposed) return;
|
|
455
|
-
for (const parsedMessage of parseIncomingMessages(message)) {
|
|
456
|
-
if (isJsonRpcResponseMessage(parsedMessage)) {
|
|
457
|
-
this.resolvePendingRequest(parsedMessage);
|
|
458
|
-
continue;
|
|
459
|
-
}
|
|
460
|
-
if (isJsonRpcNotificationMessage(parsedMessage)) this.notificationSubject.next({
|
|
461
|
-
method: parsedMessage.method,
|
|
462
|
-
params: parsedMessage.params
|
|
463
|
-
});
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
rejectAllPendingRequests(reason) {
|
|
467
|
-
for (const [id, pendingRequest] of this.pendingRequests) {
|
|
468
|
-
this.clearPendingRequest(id);
|
|
469
|
-
pendingRequest.reject(reason);
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
dispose() {
|
|
473
|
-
if (this.disposed) return;
|
|
474
|
-
this.disposed = true;
|
|
475
|
-
this.rejectAllPendingRequests(/* @__PURE__ */ new Error("JSON-RPC client disposed."));
|
|
476
|
-
this.notificationSubject.complete();
|
|
477
|
-
}
|
|
478
|
-
[SYMBOL_DISPOSE]() {
|
|
479
|
-
this.dispose();
|
|
480
|
-
}
|
|
481
|
-
resolvePendingRequest(message) {
|
|
482
|
-
const pendingRequest = this.pendingRequests.get(message.id);
|
|
483
|
-
if (!pendingRequest) return;
|
|
484
|
-
this.clearPendingRequest(message.id);
|
|
485
|
-
if ("error" in message) {
|
|
486
|
-
pendingRequest.reject(/* @__PURE__ */ new Error(`JSON-RPC request failed for ${pendingRequest.method}: ${message.error.message}`));
|
|
487
|
-
return;
|
|
488
|
-
}
|
|
489
|
-
pendingRequest.resolve(message.result);
|
|
490
|
-
}
|
|
491
|
-
clearPendingRequest(id) {
|
|
492
|
-
const pendingRequest = this.pendingRequests.get(id);
|
|
493
|
-
if (!pendingRequest) return;
|
|
494
|
-
if (pendingRequest.timeoutHandle !== void 0) this.options.time.clearTimeout(pendingRequest.timeoutHandle);
|
|
495
|
-
this.pendingRequests.delete(id);
|
|
496
|
-
}
|
|
497
|
-
};
|
|
498
|
-
var JsonRpcServer = class {
|
|
499
|
-
options;
|
|
500
|
-
onRequest;
|
|
501
|
-
onNotification;
|
|
502
|
-
requestSubject = new RxEventSubject();
|
|
503
|
-
notificationSubject = new RxEventSubject();
|
|
504
|
-
disposed = false;
|
|
505
|
-
constructor(options) {
|
|
506
|
-
this.options = options;
|
|
507
|
-
this.onRequest = this.requestSubject;
|
|
508
|
-
this.onNotification = this.notificationSubject;
|
|
509
|
-
}
|
|
510
|
-
notify(method, params) {
|
|
511
|
-
if (this.disposed) return;
|
|
512
|
-
this.options.send({
|
|
513
|
-
jsonrpc: "2.0",
|
|
514
|
-
method,
|
|
515
|
-
params
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
receive(message) {
|
|
519
|
-
if (this.disposed) return;
|
|
520
|
-
for (const parsedMessage of parseIncomingMessages(message)) {
|
|
521
|
-
if (isJsonRpcRequestMessage(parsedMessage)) {
|
|
522
|
-
this.requestSubject.next({
|
|
523
|
-
id: parsedMessage.id,
|
|
524
|
-
method: parsedMessage.method,
|
|
525
|
-
params: parsedMessage.params
|
|
526
|
-
});
|
|
527
|
-
continue;
|
|
528
|
-
}
|
|
529
|
-
if (isJsonRpcNotificationMessage(parsedMessage)) this.notificationSubject.next({
|
|
530
|
-
method: parsedMessage.method,
|
|
531
|
-
params: parsedMessage.params
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
respondSuccess(id, result) {
|
|
536
|
-
if (this.disposed) return;
|
|
537
|
-
this.options.send({
|
|
538
|
-
jsonrpc: "2.0",
|
|
539
|
-
id,
|
|
540
|
-
result
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
respondError(id, error) {
|
|
544
|
-
if (this.disposed) return;
|
|
545
|
-
this.options.send({
|
|
546
|
-
jsonrpc: "2.0",
|
|
547
|
-
id,
|
|
548
|
-
error
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
dispose() {
|
|
552
|
-
if (this.disposed) return;
|
|
553
|
-
this.disposed = true;
|
|
554
|
-
this.requestSubject.complete();
|
|
555
|
-
this.notificationSubject.complete();
|
|
556
|
-
}
|
|
557
|
-
[SYMBOL_DISPOSE]() {
|
|
558
|
-
this.dispose();
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
var JsonRpcServerAndClient = class {
|
|
562
|
-
onNotification;
|
|
563
|
-
onRequest;
|
|
564
|
-
client;
|
|
565
|
-
server;
|
|
566
|
-
disposed = false;
|
|
567
|
-
constructor(options) {
|
|
568
|
-
this.client = new JsonRpcClient(options);
|
|
569
|
-
this.server = new JsonRpcServer(options);
|
|
570
|
-
this.onNotification = this.server.onNotification;
|
|
571
|
-
this.onRequest = this.server.onRequest;
|
|
572
|
-
}
|
|
573
|
-
request(method, params, options) {
|
|
574
|
-
return this.client.request(method, params, options);
|
|
575
|
-
}
|
|
576
|
-
notify(method, params) {
|
|
577
|
-
this.client.notify(method, params);
|
|
578
|
-
}
|
|
579
|
-
receive(message) {
|
|
580
|
-
for (const parsedMessage of parseIncomingMessages(message)) {
|
|
581
|
-
if (isJsonRpcResponseMessage(parsedMessage)) {
|
|
582
|
-
this.client.receive(parsedMessage);
|
|
583
|
-
continue;
|
|
584
|
-
}
|
|
585
|
-
this.server.receive(parsedMessage);
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
rejectAllPendingRequests(reason) {
|
|
589
|
-
this.client.rejectAllPendingRequests(reason);
|
|
590
|
-
}
|
|
591
|
-
respondSuccess(id, result) {
|
|
592
|
-
this.server.respondSuccess(id, result);
|
|
593
|
-
}
|
|
594
|
-
respondError(id, error) {
|
|
595
|
-
this.server.respondError(id, error);
|
|
596
|
-
}
|
|
597
|
-
dispose() {
|
|
598
|
-
if (this.disposed) return;
|
|
599
|
-
this.disposed = true;
|
|
600
|
-
this.client.dispose();
|
|
601
|
-
this.server.dispose();
|
|
602
|
-
}
|
|
603
|
-
[SYMBOL_DISPOSE]() {
|
|
604
|
-
this.dispose();
|
|
605
|
-
}
|
|
606
|
-
};
|
|
607
|
-
function parseIncomingMessages(message) {
|
|
608
|
-
if (!Array.isArray(message)) return parseJsonRpcMessage(message);
|
|
609
|
-
const parsedMessages = [];
|
|
610
|
-
for (const entry of message) parsedMessages.push(...parseJsonRpcMessage(entry));
|
|
611
|
-
return parsedMessages;
|
|
612
|
-
}
|
|
613
|
-
function parseJsonRpcMessage(message) {
|
|
614
|
-
const result = validateWithSchemaSync(JsonRpcMessageSchema, message);
|
|
615
|
-
return result.success ? [result.value] : [];
|
|
616
|
-
}
|
|
617
|
-
function isJsonRpcRequestMessage(message) {
|
|
618
|
-
return "method" in message && "id" in message;
|
|
619
|
-
}
|
|
620
|
-
function isJsonRpcResponseMessage(message) {
|
|
621
|
-
return "id" in message && !("method" in message);
|
|
622
|
-
}
|
|
623
|
-
function isJsonRpcNotificationMessage(message) {
|
|
624
|
-
return "method" in message && !("id" in message);
|
|
625
|
-
}
|
|
626
|
-
function createJsonRpcDisposedError(role) {
|
|
627
|
-
return /* @__PURE__ */ new Error(`JSON-RPC ${role} disposed.`);
|
|
628
|
-
}
|
|
629
|
-
//#endregion
|
|
630
|
-
//#region src/popup/session.ts
|
|
631
|
-
const PopupSessionControlMethod = {
|
|
632
|
-
Ready: "securitydept.popup.session.ready",
|
|
633
|
-
Ping: "securitydept.popup.session.ping",
|
|
634
|
-
Pong: "securitydept.popup.session.pong"
|
|
635
|
-
};
|
|
636
|
-
const DEFAULT_READY_TIMEOUT_MS = 1e4;
|
|
637
|
-
const DEFAULT_HEARTBEAT_INTERVAL_MS = 5e3;
|
|
638
|
-
const DEFAULT_HEARTBEAT_TIMEOUT_MS = 15e3;
|
|
639
|
-
var PopupClientSession = class {
|
|
640
|
-
failure = createSignal(null);
|
|
641
|
-
isActive = createSignal(false);
|
|
642
|
-
init$ = new ReplaySubject();
|
|
643
|
-
destroyed = createSignal(false);
|
|
644
|
-
destroyed$ = from(this.destroyed).pipe(distinctUntilChanged(), filter(Boolean), shareReplay(1));
|
|
645
|
-
constructor(options) {
|
|
646
|
-
const timestampScheduler = createAsyncSchedulerWithTimestampProvider(options.time);
|
|
647
|
-
const ready$ = new Subject();
|
|
648
|
-
const pong$ = new Subject();
|
|
649
|
-
const closed$ = from(options.closedStream).pipe(filter(Boolean));
|
|
650
|
-
const ping$ = merge(ready$.pipe(filter(Boolean)), pong$.pipe(filter(Boolean))).pipe(delayWhen(() => timer(options.heartbeatIntervalMs ?? DEFAULT_HEARTBEAT_INTERVAL_MS, timestampScheduler)));
|
|
651
|
-
from(this.init$).pipe(exhaustMap(() => from(options.jsonRpc.onNotification).pipe(filter(function isReadyNotification(event) {
|
|
652
|
-
return event.method === PopupSessionControlMethod.Ready;
|
|
653
|
-
}), take(1), timeout({
|
|
654
|
-
each: options.readyTimeoutMs ?? DEFAULT_READY_TIMEOUT_MS,
|
|
655
|
-
scheduler: timestampScheduler
|
|
656
|
-
}), map(() => true), catchError(() => of(false)))), takeUntil(this.destroyed$)).subscribe(ready$);
|
|
657
|
-
ping$.pipe(exhaustMap(() => from(options.jsonRpc.onNotification).pipe(filter(function isPongNotification(event) {
|
|
658
|
-
return event.method === PopupSessionControlMethod.Pong;
|
|
659
|
-
}), take(1), timeout({
|
|
660
|
-
first: options.heartbeatTimeoutMs ?? DEFAULT_HEARTBEAT_TIMEOUT_MS,
|
|
661
|
-
scheduler: timestampScheduler
|
|
662
|
-
}), map(() => true), catchError(() => of(false)))), takeUntil(this.destroyed$)).subscribe(pong$);
|
|
663
|
-
merge(closed$.pipe(map(() => new ClientError({
|
|
664
|
-
kind: ClientErrorKind.Authorization,
|
|
665
|
-
code: PopupErrorCode.Closed,
|
|
666
|
-
message: "Popup window was closed before completing the login flow.",
|
|
667
|
-
recovery: UserRecovery.RestartFlow,
|
|
668
|
-
source: "popup"
|
|
669
|
-
}))), ready$.pipe(map((success) => !success ? new ClientError({
|
|
670
|
-
kind: ClientErrorKind.Protocol,
|
|
671
|
-
message: "Did not receive ready notification from popup within the expected time.",
|
|
672
|
-
recovery: UserRecovery.RestartFlow,
|
|
673
|
-
source: "popup"
|
|
674
|
-
}) : null)), pong$.pipe(map((success) => !success ? new ClientError({
|
|
675
|
-
kind: ClientErrorKind.Protocol,
|
|
676
|
-
message: "Did not receive pong notification from popup within the expected time.",
|
|
677
|
-
recovery: UserRecovery.RestartFlow,
|
|
678
|
-
source: "popup"
|
|
679
|
-
}) : null))).pipe(takeUntil(this.destroyed$), shareReplay({
|
|
680
|
-
bufferSize: 1,
|
|
681
|
-
refCount: false
|
|
682
|
-
})).subscribe((error) => this.failure.set(error));
|
|
683
|
-
merge(closed$.pipe(map(() => false)), ready$.pipe(map(Boolean)), pong$.pipe(map(Boolean))).pipe(takeUntil(this.destroyed$)).subscribe((nextIsActive) => {
|
|
684
|
-
this.isActive.set(nextIsActive);
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
init() {
|
|
688
|
-
this.init$.next(true);
|
|
689
|
-
}
|
|
690
|
-
dispose() {
|
|
691
|
-
this.destroyed.set(true);
|
|
692
|
-
}
|
|
693
|
-
[SYMBOL_DISPOSE]() {
|
|
694
|
-
this.dispose();
|
|
695
|
-
}
|
|
696
|
-
};
|
|
697
|
-
var PopupServerSession = class {
|
|
698
|
-
init$ = new ReplaySubject();
|
|
699
|
-
destroyed$$ = new BehaviorSubject(false);
|
|
700
|
-
destroyed$ = this.destroyed$$.pipe(distinctUntilChanged(), filter(Boolean), shareReplay(1));
|
|
701
|
-
constructor(options) {
|
|
702
|
-
const ready$ = from(this.init$);
|
|
703
|
-
const pong$ = from(options.jsonRpc.onNotification).pipe(filter(function isPing(event) {
|
|
704
|
-
return event.method === PopupSessionControlMethod.Ping;
|
|
705
|
-
}));
|
|
706
|
-
merge(ready$.pipe(map(function createReadyNotify() {
|
|
707
|
-
return { method: PopupSessionControlMethod.Ready };
|
|
708
|
-
})), pong$.pipe(map(function createPongNotify() {
|
|
709
|
-
return { method: PopupSessionControlMethod.Pong };
|
|
710
|
-
}))).pipe(takeUntil(this.destroyed$)).subscribe((event) => {
|
|
711
|
-
options.jsonRpc.notify(event.method, event.params);
|
|
712
|
-
});
|
|
713
|
-
}
|
|
714
|
-
init() {
|
|
715
|
-
this.init$.next(true);
|
|
716
|
-
}
|
|
717
|
-
dispose() {
|
|
718
|
-
this.destroyed$$.next(true);
|
|
719
|
-
}
|
|
720
|
-
[SYMBOL_DISPOSE]() {
|
|
721
|
-
this.dispose();
|
|
722
|
-
}
|
|
723
|
-
};
|
|
724
|
-
//#endregion
|
|
725
|
-
//#region src/popup/handle.ts
|
|
726
|
-
/**
|
|
727
|
-
* popup opener
|
|
728
|
-
*/
|
|
729
|
-
var PopupClientWindowHandle = class {
|
|
730
|
-
messaging;
|
|
731
|
-
disposed = false;
|
|
732
|
-
jsonRpc;
|
|
733
|
-
session;
|
|
734
|
-
incomingSubscription;
|
|
735
|
-
closePopup;
|
|
736
|
-
constructor(options) {
|
|
737
|
-
this.messaging = options.messaging;
|
|
738
|
-
this.closePopup = options.close;
|
|
739
|
-
this.jsonRpc = createJsonRpcClient({
|
|
740
|
-
send: (message) => {
|
|
741
|
-
options.messaging.outgoing.next(message);
|
|
742
|
-
},
|
|
743
|
-
time: options.time
|
|
744
|
-
});
|
|
745
|
-
this.session = new PopupClientSession({
|
|
746
|
-
jsonRpc: this.jsonRpc,
|
|
747
|
-
time: options.time,
|
|
748
|
-
closedStream: options.closedStream
|
|
749
|
-
});
|
|
750
|
-
this.incomingSubscription = options.messaging.incoming.subscribe({ next: (message) => {
|
|
751
|
-
this.jsonRpc.receive(message);
|
|
752
|
-
} });
|
|
753
|
-
this.session.init();
|
|
754
|
-
}
|
|
755
|
-
get onNotification() {
|
|
756
|
-
return this.jsonRpc.onNotification;
|
|
757
|
-
}
|
|
758
|
-
get failure() {
|
|
759
|
-
return this.session.failure;
|
|
760
|
-
}
|
|
761
|
-
get isActive() {
|
|
762
|
-
return this.session.isActive;
|
|
763
|
-
}
|
|
764
|
-
async notify(method, params) {
|
|
765
|
-
this.jsonRpc.notify(method, params);
|
|
766
|
-
}
|
|
767
|
-
request(method, params, options) {
|
|
768
|
-
return this.jsonRpc.request(method, params, options);
|
|
769
|
-
}
|
|
770
|
-
close() {
|
|
771
|
-
this.closePopup();
|
|
772
|
-
}
|
|
773
|
-
dispose() {
|
|
774
|
-
if (this.disposed) return;
|
|
775
|
-
this.disposed = true;
|
|
776
|
-
this.session.dispose();
|
|
777
|
-
this.jsonRpc.dispose();
|
|
778
|
-
this.incomingSubscription.unsubscribe();
|
|
779
|
-
this.messaging.outgoing.complete();
|
|
780
|
-
}
|
|
781
|
-
[SYMBOL_DISPOSE]() {
|
|
782
|
-
this.dispose();
|
|
783
|
-
}
|
|
784
|
-
};
|
|
785
|
-
/**
|
|
786
|
-
* popup target
|
|
787
|
-
*/
|
|
788
|
-
var PopupServerWindowHandle = class {
|
|
789
|
-
messaging;
|
|
790
|
-
disposed = false;
|
|
791
|
-
jsonRpc;
|
|
792
|
-
session;
|
|
793
|
-
incomingSubscription;
|
|
794
|
-
closePopup;
|
|
795
|
-
constructor(options) {
|
|
796
|
-
this.messaging = options.messaging;
|
|
797
|
-
this.closePopup = options.close;
|
|
798
|
-
this.jsonRpc = createJsonRpcServer({ send: (message) => {
|
|
799
|
-
options.messaging.outgoing.next(message);
|
|
800
|
-
} });
|
|
801
|
-
this.session = new PopupServerSession({ jsonRpc: this.jsonRpc });
|
|
802
|
-
this.incomingSubscription = options.messaging.incoming.subscribe({ next: (message) => {
|
|
803
|
-
this.jsonRpc.receive(message);
|
|
804
|
-
} });
|
|
805
|
-
this.session.init();
|
|
806
|
-
}
|
|
807
|
-
get onNotification() {
|
|
808
|
-
return this.jsonRpc.onNotification;
|
|
809
|
-
}
|
|
810
|
-
get onRequest() {
|
|
811
|
-
return this.jsonRpc.onRequest;
|
|
812
|
-
}
|
|
813
|
-
notify(method, params) {
|
|
814
|
-
this.jsonRpc.notify(method, params);
|
|
815
|
-
return Promise.resolve();
|
|
816
|
-
}
|
|
817
|
-
close() {
|
|
818
|
-
this.closePopup();
|
|
819
|
-
}
|
|
820
|
-
dispose() {
|
|
821
|
-
if (this.disposed) return;
|
|
822
|
-
this.disposed = true;
|
|
823
|
-
this.session.dispose();
|
|
824
|
-
this.jsonRpc.dispose();
|
|
825
|
-
this.incomingSubscription.unsubscribe();
|
|
826
|
-
this.messaging.outgoing.complete();
|
|
827
|
-
}
|
|
828
|
-
[SYMBOL_DISPOSE]() {
|
|
829
|
-
this.dispose();
|
|
830
|
-
}
|
|
831
|
-
};
|
|
832
|
-
//#endregion
|
|
833
206
|
//#region src/popup/index.ts
|
|
834
207
|
const PopupAttachFailureReason = {
|
|
835
208
|
MissingOpener: "missing_opener",
|
|
@@ -967,7 +340,9 @@ const SpanCreateOptionsSchema = type({
|
|
|
967
340
|
const SpanTraitSchema = type({
|
|
968
341
|
id: "string",
|
|
969
342
|
fork: "Function",
|
|
970
|
-
|
|
343
|
+
getAttributes: "Function",
|
|
344
|
+
getRootToNodePath: "Function",
|
|
345
|
+
getRootToNodeAttributes: "Function"
|
|
971
346
|
});
|
|
972
347
|
const SPAN_TRAIT_TOKEN = new SecuritydeptInjectionToken("SPAN_TRAIT_TOKEN");
|
|
973
348
|
//#endregion
|
|
@@ -978,26 +353,63 @@ function createDefaultSpanId() {
|
|
|
978
353
|
var DefaultSpan = class DefaultSpan {
|
|
979
354
|
id;
|
|
980
355
|
parent;
|
|
981
|
-
|
|
356
|
+
_sharedAttributes;
|
|
357
|
+
_providerAttributes = /* @__PURE__ */ new Map();
|
|
982
358
|
_idFactory;
|
|
983
|
-
get attributes() {
|
|
984
|
-
return this._attributes;
|
|
985
|
-
}
|
|
986
359
|
constructor(parent, idFactory, attributes) {
|
|
987
360
|
this._idFactory = idFactory;
|
|
988
361
|
this.id = idFactory();
|
|
989
362
|
this.parent = parent;
|
|
990
|
-
this.
|
|
363
|
+
this._sharedAttributes = attributes;
|
|
991
364
|
}
|
|
992
365
|
static root(options = {}) {
|
|
993
|
-
return new DefaultSpan(void 0, options.idFactory ?? createDefaultSpanId,
|
|
366
|
+
return new DefaultSpan(void 0, options.idFactory ?? createDefaultSpanId, { ...options.attributes ?? {} });
|
|
994
367
|
}
|
|
995
368
|
fork(options = {}) {
|
|
996
|
-
return new DefaultSpan(this, options.idFactory ?? this._idFactory,
|
|
369
|
+
return new DefaultSpan(this, options.idFactory ?? this._idFactory, { ...options.attributes });
|
|
370
|
+
}
|
|
371
|
+
getAttributes(options) {
|
|
372
|
+
if (!options) return this._sharedAttributes;
|
|
373
|
+
const providerAttributes = this._providerAttributes.get(options.providerId) ?? {};
|
|
374
|
+
if (options.withShared === false) return providerAttributes;
|
|
375
|
+
return {
|
|
376
|
+
...this._sharedAttributes,
|
|
377
|
+
...providerAttributes
|
|
378
|
+
};
|
|
997
379
|
}
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
380
|
+
getRootToNodePath(options = {}) {
|
|
381
|
+
const path = [];
|
|
382
|
+
let current = options.skipSelf ? this.parent : this;
|
|
383
|
+
while (current) {
|
|
384
|
+
path.push(current);
|
|
385
|
+
current = current.parent;
|
|
386
|
+
}
|
|
387
|
+
return path.reverse();
|
|
388
|
+
}
|
|
389
|
+
getRootToNodeAttributes(options = {}) {
|
|
390
|
+
const path = this.getRootToNodePath({ skipSelf: options.skipSelf });
|
|
391
|
+
const frames = [];
|
|
392
|
+
for (const span of path) {
|
|
393
|
+
const attributes = options.providerId !== void 0 ? span.getAttributes({ providerId: options.providerId }) : span.getAttributes();
|
|
394
|
+
if (Object.keys(attributes).length === 0) continue;
|
|
395
|
+
frames.push({
|
|
396
|
+
spanId: span.id,
|
|
397
|
+
...span.parent ? { parentSpanId: span.parent.id } : {},
|
|
398
|
+
attributes
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
return frames;
|
|
402
|
+
}
|
|
403
|
+
setAttributes(attributes, options = {}) {
|
|
404
|
+
if (options.providerId === void 0) {
|
|
405
|
+
this._sharedAttributes = {
|
|
406
|
+
...this._sharedAttributes,
|
|
407
|
+
...attributes
|
|
408
|
+
};
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
this._providerAttributes.set(options.providerId, {
|
|
412
|
+
...this._providerAttributes.get(options.providerId),
|
|
1001
413
|
...attributes
|
|
1002
414
|
});
|
|
1003
415
|
}
|
|
@@ -1129,11 +541,14 @@ function normalizeAbortError(token, error) {
|
|
|
1129
541
|
function isAbortError(error) {
|
|
1130
542
|
return typeof error === "object" && error !== null && "name" in error && error.name === "AbortError";
|
|
1131
543
|
}
|
|
1132
|
-
|
|
544
|
+
//#endregion
|
|
545
|
+
//#region src/std/time.ts
|
|
546
|
+
const TimeTraitStdHostSchema = type({
|
|
1133
547
|
Date: type({ now: "Function" }),
|
|
1134
548
|
setTimeout: "Function",
|
|
1135
549
|
clearTimeout: "Function"
|
|
1136
|
-
})
|
|
550
|
+
});
|
|
551
|
+
const TimeForStdCreateOptionsSchema = type({ host: TimeTraitStdHostSchema });
|
|
1137
552
|
function createTimeForStd(options = {}) {
|
|
1138
553
|
const { validators, ...createOptions } = options;
|
|
1139
554
|
const resolvedCreateOptions = { host: createOptions.host ?? globalThis };
|
|
@@ -1321,8 +736,11 @@ function createInMemoryRecordStore() {
|
|
|
1321
736
|
};
|
|
1322
737
|
}
|
|
1323
738
|
//#endregion
|
|
739
|
+
//#region src/tracing/subscriber/types.ts
|
|
740
|
+
const TracingSubscriberTraitSchema = type({ record: "Function" });
|
|
741
|
+
//#endregion
|
|
1324
742
|
//#region src/tracing/create.ts
|
|
1325
|
-
const TracingCreateOptionsSchema = type({ subscribers:
|
|
743
|
+
const TracingCreateOptionsSchema = type({ subscribers: TracingSubscriberTraitSchema.array() });
|
|
1326
744
|
function createTracing(options) {
|
|
1327
745
|
const { validators, ...resolvedOptions } = options ?? {};
|
|
1328
746
|
const resolvedCreateOptions = { subscribers: resolvedOptions.subscribers ?? [] };
|
|
@@ -1338,18 +756,15 @@ function createTracing(options) {
|
|
|
1338
756
|
})
|
|
1339
757
|
});
|
|
1340
758
|
const subject = new RxEventSubject();
|
|
1341
|
-
|
|
1342
|
-
const subscriptions = [];
|
|
1343
|
-
for (const subscriber of resolvedCreateOptions.subscribers) subscriptions.push(events.subscribe({ next(event) {
|
|
1344
|
-
subscriber.record(event);
|
|
1345
|
-
} }));
|
|
759
|
+
let subscribers = resolvedCreateOptions.subscribers;
|
|
1346
760
|
return {
|
|
1347
761
|
record(event) {
|
|
762
|
+
for (const subscriber of subscribers) subscriber.record(event);
|
|
1348
763
|
subject.next(event);
|
|
1349
764
|
},
|
|
1350
|
-
events,
|
|
765
|
+
events: subject,
|
|
1351
766
|
dispose() {
|
|
1352
|
-
|
|
767
|
+
subscribers = [];
|
|
1353
768
|
},
|
|
1354
769
|
[SYMBOL_DISPOSE]() {
|
|
1355
770
|
this.dispose();
|
|
@@ -1370,6 +785,7 @@ const OperationTraceEventType = {
|
|
|
1370
785
|
Error: "operation.error",
|
|
1371
786
|
Ended: "operation.ended"
|
|
1372
787
|
};
|
|
788
|
+
const TRACING_SPAN_ATTRIBUTE_PROVIDER_ID = "@securitydept/client/tracing";
|
|
1373
789
|
const TracingTraitSchema = type({
|
|
1374
790
|
record: "Function",
|
|
1375
791
|
dispose: "Function",
|
|
@@ -1568,6 +984,6 @@ function createFoundationEnvironmentUnit() {
|
|
|
1568
984
|
};
|
|
1569
985
|
}
|
|
1570
986
|
//#endregion
|
|
1571
|
-
export {
|
|
987
|
+
export { notMissingProvider as $, SECURITYDEPT_COMPAT_FRAGMENT_VERSION as A, validateWithSchema as B, SPAN_TRAIT_TOKEN as C, RouterNavigationIntent as D, ROUTER_TRAIT_TOKEN as E, POPUP_TRAIT_TOKEN as F, INJECTOR_TOKEN as G, PAGE_LIFECYCLE_TRAIT_TOKEN as H, PopupAttachFailureReason as I, toRuntimeInjector as J, PARENT_INJECTOR_TOKEN as K, formatValidationFailure as L, isCompatFragmentBlock as M, parseCompatFragment as N, RouterNavigationMode as O, takeCompatFragment as P, getSecuritydeptProviderToken as Q, throwValidationClientError as R, createRootSpan as S, TIME_TRAIT_TOKEN as T, EventSourceKind as U, validateWithSchemaSync as V, isEventStreamTrait as W, SecuritydeptInjectionToken as X, SecurityDeptOptional as Y, createProviderIfTokenMissing as Z, createTimeForStd as _, TRACING_TRAIT_TOKEN as a, normalizeAbortError as b, createInMemoryRecordStore as c, SESSION_STORAGE_TRAIT_TOKEN as d, StorageChangeEventOrigin as f, TransportErrorCode as g, TRANSPORT_TRAIT_TOKEN as h, TRACING_SPAN_ATTRIBUTE_PROVIDER_ID as i, appendOrReplaceCompatFragment as j, takeCompatFragmentFromRouter as k, PERSISTENT_STORAGE_TRAIT_TOKEN as l, createBaseTransportForStdFetch as m, ENVIRONMENT_TOKEN as n, TracingLevel as o, FetchTransportRedirectKind as p, SecuritydeptInjector as q, OperationTraceEventType as r, createTracing as s, createFoundationEnvironment as t, REALM_STORAGE_TRAIT_TOKEN as u, abortSignalToCancellationToken as v, IDLE_CALLBACK_TRAIT_TOKEN as w, abortSignalToEventStream as x, cancellationTokenToAbortSignal as y, validateTraitInput as z };
|
|
1572
988
|
|
|
1573
|
-
//# sourceMappingURL=create-
|
|
989
|
+
//# sourceMappingURL=create-i5VyYgN6.mjs.map
|