@multiplatform.one/frappe 9.0.11 → 9.2.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/cjs/auth.cjs +5 -1
- package/dist/cjs/auth.native.js +5 -1
- package/dist/cjs/auth.native.js.map +1 -1
- package/dist/cjs/call.native.js.map +1 -1
- package/dist/cjs/collection.native.js.map +1 -1
- package/dist/cjs/common/types.native.js.map +1 -1
- package/dist/cjs/connectionKey.native.js.map +1 -1
- package/dist/cjs/core/http.cjs +21 -6
- package/dist/cjs/core/http.native.js +27 -6
- package/dist/cjs/core/http.native.js.map +1 -1
- package/dist/cjs/core/serverMessages.native.js.map +1 -1
- package/dist/cjs/core/sessionGate.cjs +121 -0
- package/dist/cjs/core/sessionGate.native.js +284 -0
- package/dist/cjs/core/sessionGate.native.js.map +1 -0
- package/dist/cjs/core/types.native.js.map +1 -1
- package/dist/cjs/core/wire.native.js.map +1 -1
- package/dist/cjs/db.native.js.map +1 -1
- package/dist/cjs/devtools/FrappeDevtoolsPanel.native.js.map +1 -1
- package/dist/cjs/devtools/index.native.js.map +1 -1
- package/dist/cjs/devtools/plugin.native.js.map +1 -1
- package/dist/cjs/devtools/theme.native.js.map +1 -1
- package/dist/cjs/doctype.native.js.map +1 -1
- package/dist/cjs/file.native.js.map +1 -1
- package/dist/cjs/fixtureDb.native.js.map +1 -1
- package/dist/cjs/fixtures.native.js.map +1 -1
- package/dist/cjs/frappeApp.native.js.map +1 -1
- package/dist/cjs/frappeReact.native.js +1 -1
- package/dist/cjs/frappeReact.native.js.map +1 -1
- package/dist/cjs/index.gnome.native.js.map +1 -1
- package/dist/cjs/index.native.js +2 -2
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/optimistic.native.js.map +1 -1
- package/dist/cjs/pacer.native.js.map +1 -1
- package/dist/cjs/plugin/index.native.js.map +1 -1
- package/dist/cjs/realtime.native.js.map +1 -1
- package/dist/cjs/serverLoaders.native.js.map +1 -1
- package/dist/cjs/sync/backfill.native.js.map +1 -1
- package/dist/cjs/sync/filters.native.js.map +1 -1
- package/dist/cjs/sync/index.native.js.map +1 -1
- package/dist/cjs/sync/merge.native.js.map +1 -1
- package/dist/cjs/sync/mutationEngine.native.js.map +1 -1
- package/dist/cjs/sync/mutationJournal.native.js.map +1 -1
- package/dist/cjs/sync/normalizedCache.native.js.map +1 -1
- package/dist/cjs/sync/persistence.native.js.map +1 -1
- package/dist/cjs/sync/realtime.cjs +2 -1
- package/dist/cjs/sync/realtime.native.js +2 -1
- package/dist/cjs/sync/realtime.native.js.map +1 -1
- package/dist/cjs/sync/rehydration.native.js.map +1 -1
- package/dist/cjs/sync/storage.native.js.map +1 -1
- package/dist/cjs/sync/subscriptionManager.native.js.map +1 -1
- package/dist/cjs/sync/types.native.js.map +1 -1
- package/dist/cjs/sync/virtualPageManager.native.js.map +1 -1
- package/dist/cjs/syncOptionsKey.native.js.map +1 -1
- package/dist/cjs/useLiveQuery.native.js.map +1 -1
- package/dist/cjs/util.native.js.map +1 -1
- package/dist/esm/auth.mjs +5 -1
- package/dist/esm/auth.mjs.map +1 -1
- package/dist/esm/auth.native.js +5 -1
- package/dist/esm/auth.native.js.map +1 -1
- package/dist/esm/core/http.mjs +21 -6
- package/dist/esm/core/http.mjs.map +1 -1
- package/dist/esm/core/http.native.js +27 -6
- package/dist/esm/core/http.native.js.map +1 -1
- package/dist/esm/core/sessionGate.mjs +94 -0
- package/dist/esm/core/sessionGate.mjs.map +1 -0
- package/dist/esm/core/sessionGate.native.js +254 -0
- package/dist/esm/core/sessionGate.native.js.map +1 -0
- package/dist/esm/sync/realtime.mjs +2 -1
- package/dist/esm/sync/realtime.mjs.map +1 -1
- package/dist/esm/sync/realtime.native.js +2 -1
- package/dist/esm/sync/realtime.native.js.map +1 -1
- package/dist/jsx/auth.mjs +5 -1
- package/dist/jsx/auth.mjs.map +1 -1
- package/dist/jsx/auth.native.js +5 -1
- package/dist/jsx/auth.native.js.map +1 -1
- package/dist/jsx/core/http.mjs +21 -6
- package/dist/jsx/core/http.mjs.map +1 -1
- package/dist/jsx/core/http.native.js +27 -6
- package/dist/jsx/core/http.native.js.map +1 -1
- package/dist/jsx/core/sessionGate.mjs +94 -0
- package/dist/jsx/core/sessionGate.mjs.map +1 -0
- package/dist/jsx/core/sessionGate.native.js +284 -0
- package/dist/jsx/core/sessionGate.native.js.map +1 -0
- package/dist/jsx/sync/realtime.mjs +2 -1
- package/dist/jsx/sync/realtime.mjs.map +1 -1
- package/dist/jsx/sync/realtime.native.js +2 -1
- package/dist/jsx/sync/realtime.native.js.map +1 -1
- package/package.json +7 -7
- package/src/auth.sessionRace.spec.ts +209 -0
- package/src/auth.spec.ts +33 -14
- package/src/auth.ts +7 -5
- package/src/core/http.spec.ts +16 -10
- package/src/core/http.ts +28 -6
- package/src/core/sessionGate.ts +140 -0
- package/src/sync/realtime.spec.ts +23 -4
- package/src/sync/realtime.ts +2 -1
- package/types/auth.d.ts.map +1 -1
- package/types/core/http.d.ts +5 -1
- package/types/core/http.d.ts.map +1 -1
- package/types/core/sessionGate.d.ts +29 -0
- package/types/core/sessionGate.d.ts.map +1 -0
- package/types/sync/realtime.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","serverMessages_exports","__export","readServerMessages","serverMessageLines","module","exports","_type_of","obj","Symbol","constructor","lineBoundary","entities","html","text","replace","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","iterator","_step","next","done","pattern"],"sources":["../../../src/core/serverMessages.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,sBAAA;AAAAC,QAAA,CAAAD,sBAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAA,kBAAA;EAAAC,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAUAC,MAAM,CAAAC,OAAA,GAAAV,YACJ,CAAAK,sBAAA;AAEF,SAAMM,QAAqDA,CAAAC,GAAA;EACzD,uBAAe;;EACf,OAACA,GAAS,IAAG,OAAAC,MAAA,oBAAAD,GAAA,CAAAE,WAAA,KAAAD,MAAA,qBAAAD,GAAA;AAAA;AACA,IACZG,YAAW,GAAG;AAAA,IACdC,QAAA,GAAU,CACX,CACF,WAGO,IACL,EACA,CACA,OAAO,EAIT,IAEA,EACE,CACA,OAAI,EACF,IACE,EAAwB,CAExB,SAAO,EACT,IACF,EACA,CACA,QAAO,EACT,IAMO,EACL,CACA,QAAI,EACJ,GAAI,CACF,CAAwB;AAExB,SAAAR,kBAAQA,CAAAS,IAAA;EACV,IAAAC,IAAA,GAAAD,IAAA,CAAAE,OAAA,CAAAJ,YAAA,QAAAI,OAAA;EACA,IAAIC,yBAAyB,OAAO;IAACC,iBAAA;IAAAC,cAAA;EACrC;IACE,SAAMC,SAAO,GAAAP,QAAe,CAAAH,MAAA,CAAAW,QAAA,KAAAC,KAAA,IAAAL,yBAAA,IAAAK,KAAA,GAAAF,SAAA,CAAAG,IAAA,IAAAC,IAAA,GAAAP,yBAAA;MAC5B,KAAOQ,OAAO,EAAAxB,KAAA,IAASqB,KAAA,CAAArB,KAAW;MACnCc,IAAA,GAAAA,IAAA,CAAAC,OAAA,CAAAS,OAAA,EAAAxB,KAAA;IACH","ignoreList":[]}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var sessionGate_exports = {};
|
|
24
|
+
__export(sessionGate_exports, {
|
|
25
|
+
SESSION_CHANGE_WAIT_MS: () => SESSION_CHANGE_WAIT_MS,
|
|
26
|
+
SessionChangedError: () => SessionChangedError,
|
|
27
|
+
sendThroughSessionGate: () => sendThroughSessionGate
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(sessionGate_exports);
|
|
30
|
+
const SESSION_CHANGE_WAIT_MS = 5e3;
|
|
31
|
+
class SessionChangedError extends Error {
|
|
32
|
+
constructor() {
|
|
33
|
+
super("Request dropped: the session changed while it was in flight");
|
|
34
|
+
this.name = "AbortError";
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const gates = /* @__PURE__ */new Map();
|
|
38
|
+
function gateFor(origin) {
|
|
39
|
+
let gate = gates.get(origin);
|
|
40
|
+
if (!gate) {
|
|
41
|
+
gate = {
|
|
42
|
+
inFlight: /* @__PURE__ */new Set(),
|
|
43
|
+
idle: []
|
|
44
|
+
};
|
|
45
|
+
gates.set(origin, gate);
|
|
46
|
+
}
|
|
47
|
+
return gate;
|
|
48
|
+
}
|
|
49
|
+
async function sendOnce(gate, signal, send) {
|
|
50
|
+
while (gate.change) await gate.change;
|
|
51
|
+
const sent = {
|
|
52
|
+
controller: new AbortController(),
|
|
53
|
+
dropped: false
|
|
54
|
+
};
|
|
55
|
+
const forward = () => sent.controller.abort(signal?.reason);
|
|
56
|
+
if (signal?.aborted) forward();else signal?.addEventListener("abort", forward, {
|
|
57
|
+
once: true
|
|
58
|
+
});
|
|
59
|
+
gate.inFlight.add(sent);
|
|
60
|
+
try {
|
|
61
|
+
return {
|
|
62
|
+
sent,
|
|
63
|
+
ok: true,
|
|
64
|
+
result: await send(sent.controller.signal)
|
|
65
|
+
};
|
|
66
|
+
} catch (error) {
|
|
67
|
+
return {
|
|
68
|
+
sent,
|
|
69
|
+
ok: false,
|
|
70
|
+
error
|
|
71
|
+
};
|
|
72
|
+
} finally {
|
|
73
|
+
signal?.removeEventListener("abort", forward);
|
|
74
|
+
gate.inFlight.delete(sent);
|
|
75
|
+
if (gate.inFlight.size === 0) for (const wake of gate.idle.splice(0)) wake();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
async function sendRequest(gate, options, send) {
|
|
79
|
+
for (;;) {
|
|
80
|
+
const outcome = await sendOnce(gate, options.signal, send);
|
|
81
|
+
if (!outcome.sent.dropped) {
|
|
82
|
+
if (!outcome.ok) throw outcome.error;
|
|
83
|
+
return outcome.result;
|
|
84
|
+
}
|
|
85
|
+
if (!options.replayable) throw new SessionChangedError();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function waitForIdle(gate) {
|
|
89
|
+
if (gate.inFlight.size === 0) return Promise.resolve(true);
|
|
90
|
+
let timer;
|
|
91
|
+
const idle = new Promise(resolve => {
|
|
92
|
+
gate.idle.push(() => resolve(true));
|
|
93
|
+
});
|
|
94
|
+
const capped = new Promise(resolve => {
|
|
95
|
+
timer = setTimeout(() => resolve(false), SESSION_CHANGE_WAIT_MS);
|
|
96
|
+
});
|
|
97
|
+
return Promise.race([idle, capped]).finally(() => clearTimeout(timer));
|
|
98
|
+
}
|
|
99
|
+
async function sendSessionChange(gate, options, send) {
|
|
100
|
+
while (gate.change) await gate.change;
|
|
101
|
+
let release = () => {};
|
|
102
|
+
gate.change = new Promise(resolve => {
|
|
103
|
+
release = resolve;
|
|
104
|
+
});
|
|
105
|
+
try {
|
|
106
|
+
if (!(await waitForIdle(gate))) {
|
|
107
|
+
for (const sent of gate.inFlight) {
|
|
108
|
+
sent.dropped = true;
|
|
109
|
+
sent.controller.abort(new SessionChangedError());
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return await send(options.signal ?? void 0);
|
|
113
|
+
} finally {
|
|
114
|
+
gate.change = void 0;
|
|
115
|
+
release();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
function sendThroughSessionGate(origin, options, send) {
|
|
119
|
+
const gate = gateFor(origin);
|
|
120
|
+
return options.sessionChange ? sendSessionChange(gate, options, send) : sendRequest(gate, options, send);
|
|
121
|
+
}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var sessionGate_exports = {};
|
|
26
|
+
__export(sessionGate_exports, {
|
|
27
|
+
SESSION_CHANGE_WAIT_MS: () => SESSION_CHANGE_WAIT_MS,
|
|
28
|
+
SessionChangedError: () => SessionChangedError,
|
|
29
|
+
sendThroughSessionGate: () => sendThroughSessionGate
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(sessionGate_exports);
|
|
32
|
+
function _assert_this_initialized(self) {
|
|
33
|
+
if (self === void 0) {
|
|
34
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
35
|
+
}
|
|
36
|
+
return self;
|
|
37
|
+
}
|
|
38
|
+
function _call_super(_this, derived, args) {
|
|
39
|
+
derived = _get_prototype_of(derived);
|
|
40
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
41
|
+
}
|
|
42
|
+
function _class_call_check(instance, Constructor) {
|
|
43
|
+
if (!(instance instanceof Constructor)) {
|
|
44
|
+
throw new TypeError("Cannot call a class as a function");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function _construct(Parent, args, Class) {
|
|
48
|
+
if (_is_native_reflect_construct()) {
|
|
49
|
+
_construct = Reflect.construct;
|
|
50
|
+
} else {
|
|
51
|
+
_construct = function construct(Parent2, args2, Class2) {
|
|
52
|
+
var a = [null];
|
|
53
|
+
a.push.apply(a, args2);
|
|
54
|
+
var Constructor = Function.bind.apply(Parent2, a);
|
|
55
|
+
var instance = new Constructor();
|
|
56
|
+
if (Class2) _set_prototype_of(instance, Class2.prototype);
|
|
57
|
+
return instance;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return _construct.apply(null, arguments);
|
|
61
|
+
}
|
|
62
|
+
function _get_prototype_of(o) {
|
|
63
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {
|
|
64
|
+
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
65
|
+
};
|
|
66
|
+
return _get_prototype_of(o);
|
|
67
|
+
}
|
|
68
|
+
function _inherits(subClass, superClass) {
|
|
69
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
70
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
71
|
+
}
|
|
72
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
73
|
+
constructor: {
|
|
74
|
+
value: subClass,
|
|
75
|
+
writable: true,
|
|
76
|
+
configurable: true
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
80
|
+
}
|
|
81
|
+
function _is_native_function(fn) {
|
|
82
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
83
|
+
}
|
|
84
|
+
function _possible_constructor_return(self, call) {
|
|
85
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
86
|
+
return call;
|
|
87
|
+
}
|
|
88
|
+
return _assert_this_initialized(self);
|
|
89
|
+
}
|
|
90
|
+
function _set_prototype_of(o, p) {
|
|
91
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
|
|
92
|
+
o2.__proto__ = p2;
|
|
93
|
+
return o2;
|
|
94
|
+
};
|
|
95
|
+
return _set_prototype_of(o, p);
|
|
96
|
+
}
|
|
97
|
+
function _type_of(obj) {
|
|
98
|
+
"@swc/helpers - typeof";
|
|
99
|
+
|
|
100
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
101
|
+
}
|
|
102
|
+
function _wrap_native_super(Class) {
|
|
103
|
+
var _cache = typeof Map === "function" ? /* @__PURE__ */new Map() : void 0;
|
|
104
|
+
_wrap_native_super = function wrapNativeSuper(Class2) {
|
|
105
|
+
if (Class2 === null || !_is_native_function(Class2)) return Class2;
|
|
106
|
+
if (typeof Class2 !== "function") {
|
|
107
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
108
|
+
}
|
|
109
|
+
if (typeof _cache !== "undefined") {
|
|
110
|
+
if (_cache.has(Class2)) return _cache.get(Class2);
|
|
111
|
+
_cache.set(Class2, Wrapper);
|
|
112
|
+
}
|
|
113
|
+
function Wrapper() {
|
|
114
|
+
return _construct(Class2, arguments, _get_prototype_of(this).constructor);
|
|
115
|
+
}
|
|
116
|
+
Wrapper.prototype = Object.create(Class2.prototype, {
|
|
117
|
+
constructor: {
|
|
118
|
+
value: Wrapper,
|
|
119
|
+
enumerable: false,
|
|
120
|
+
writable: true,
|
|
121
|
+
configurable: true
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
return _set_prototype_of(Wrapper, Class2);
|
|
125
|
+
};
|
|
126
|
+
return _wrap_native_super(Class);
|
|
127
|
+
}
|
|
128
|
+
function _is_native_reflect_construct() {
|
|
129
|
+
try {
|
|
130
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
131
|
+
} catch (_) {}
|
|
132
|
+
return (_is_native_reflect_construct = function () {
|
|
133
|
+
return !!result;
|
|
134
|
+
})();
|
|
135
|
+
}
|
|
136
|
+
var SESSION_CHANGE_WAIT_MS = 5e3;
|
|
137
|
+
var SessionChangedError = /* @__PURE__ */function (Error1) {
|
|
138
|
+
"use strict";
|
|
139
|
+
|
|
140
|
+
_inherits(SessionChangedError2, Error1);
|
|
141
|
+
function SessionChangedError2() {
|
|
142
|
+
_class_call_check(this, SessionChangedError2);
|
|
143
|
+
var _this;
|
|
144
|
+
_this = _call_super(this, SessionChangedError2, ["Request dropped: the session changed while it was in flight"]);
|
|
145
|
+
_this.name = "AbortError";
|
|
146
|
+
return _this;
|
|
147
|
+
}
|
|
148
|
+
return SessionChangedError2;
|
|
149
|
+
}(_wrap_native_super(Error));
|
|
150
|
+
var gates = /* @__PURE__ */new Map();
|
|
151
|
+
function gateFor(origin) {
|
|
152
|
+
var gate = gates.get(origin);
|
|
153
|
+
if (!gate) {
|
|
154
|
+
gate = {
|
|
155
|
+
inFlight: /* @__PURE__ */new Set(),
|
|
156
|
+
idle: []
|
|
157
|
+
};
|
|
158
|
+
gates.set(origin, gate);
|
|
159
|
+
}
|
|
160
|
+
return gate;
|
|
161
|
+
}
|
|
162
|
+
async function sendOnce(gate, signal, send) {
|
|
163
|
+
while (gate.change) await gate.change;
|
|
164
|
+
var sent = {
|
|
165
|
+
controller: new AbortController(),
|
|
166
|
+
dropped: false
|
|
167
|
+
};
|
|
168
|
+
var forward = function forward2() {
|
|
169
|
+
return sent.controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason);
|
|
170
|
+
};
|
|
171
|
+
if (signal === null || signal === void 0 ? void 0 : signal.aborted) forward();else signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", forward, {
|
|
172
|
+
once: true
|
|
173
|
+
});
|
|
174
|
+
gate.inFlight.add(sent);
|
|
175
|
+
try {
|
|
176
|
+
return {
|
|
177
|
+
sent,
|
|
178
|
+
ok: true,
|
|
179
|
+
result: await send(sent.controller.signal)
|
|
180
|
+
};
|
|
181
|
+
} catch (error) {
|
|
182
|
+
return {
|
|
183
|
+
sent,
|
|
184
|
+
ok: false,
|
|
185
|
+
error
|
|
186
|
+
};
|
|
187
|
+
} finally {
|
|
188
|
+
signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", forward);
|
|
189
|
+
gate.inFlight.delete(sent);
|
|
190
|
+
var _iteratorNormalCompletion = true,
|
|
191
|
+
_didIteratorError = false,
|
|
192
|
+
_iteratorError = void 0;
|
|
193
|
+
if (gate.inFlight.size === 0) try {
|
|
194
|
+
for (var _iterator = gate.idle.splice(0)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
195
|
+
var wake = _step.value;
|
|
196
|
+
wake();
|
|
197
|
+
}
|
|
198
|
+
} catch (err) {
|
|
199
|
+
_didIteratorError = true;
|
|
200
|
+
_iteratorError = err;
|
|
201
|
+
} finally {
|
|
202
|
+
try {
|
|
203
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
204
|
+
_iterator.return();
|
|
205
|
+
}
|
|
206
|
+
} finally {
|
|
207
|
+
if (_didIteratorError) {
|
|
208
|
+
throw _iteratorError;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
async function sendRequest(gate, options, send) {
|
|
215
|
+
for (;;) {
|
|
216
|
+
var outcome = await sendOnce(gate, options.signal, send);
|
|
217
|
+
if (!outcome.sent.dropped) {
|
|
218
|
+
if (!outcome.ok) throw outcome.error;
|
|
219
|
+
return outcome.result;
|
|
220
|
+
}
|
|
221
|
+
if (!options.replayable) throw new SessionChangedError();
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
function waitForIdle(gate) {
|
|
225
|
+
if (gate.inFlight.size === 0) return Promise.resolve(true);
|
|
226
|
+
var timer;
|
|
227
|
+
var idle = new Promise(function (resolve) {
|
|
228
|
+
gate.idle.push(function () {
|
|
229
|
+
return resolve(true);
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
var capped = new Promise(function (resolve) {
|
|
233
|
+
timer = setTimeout(function () {
|
|
234
|
+
return resolve(false);
|
|
235
|
+
}, SESSION_CHANGE_WAIT_MS);
|
|
236
|
+
});
|
|
237
|
+
return Promise.race([idle, capped]).finally(function () {
|
|
238
|
+
return clearTimeout(timer);
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
async function sendSessionChange(gate, options, send) {
|
|
242
|
+
while (gate.change) await gate.change;
|
|
243
|
+
var release = function release2() {};
|
|
244
|
+
gate.change = new Promise(function (resolve) {
|
|
245
|
+
release = resolve;
|
|
246
|
+
});
|
|
247
|
+
try {
|
|
248
|
+
var _options_signal;
|
|
249
|
+
if (!(await waitForIdle(gate))) {
|
|
250
|
+
var _iteratorNormalCompletion = true,
|
|
251
|
+
_didIteratorError = false,
|
|
252
|
+
_iteratorError = void 0;
|
|
253
|
+
try {
|
|
254
|
+
for (var _iterator = gate.inFlight[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
255
|
+
var sent = _step.value;
|
|
256
|
+
sent.dropped = true;
|
|
257
|
+
sent.controller.abort(new SessionChangedError());
|
|
258
|
+
}
|
|
259
|
+
} catch (err) {
|
|
260
|
+
_didIteratorError = true;
|
|
261
|
+
_iteratorError = err;
|
|
262
|
+
} finally {
|
|
263
|
+
try {
|
|
264
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
265
|
+
_iterator.return();
|
|
266
|
+
}
|
|
267
|
+
} finally {
|
|
268
|
+
if (_didIteratorError) {
|
|
269
|
+
throw _iteratorError;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return await send((_options_signal = options.signal) !== null && _options_signal !== void 0 ? _options_signal : void 0);
|
|
275
|
+
} finally {
|
|
276
|
+
gate.change = void 0;
|
|
277
|
+
release();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
function sendThroughSessionGate(origin, options, send) {
|
|
281
|
+
var gate = gateFor(origin);
|
|
282
|
+
return options.sessionChange ? sendSessionChange(gate, options, send) : sendRequest(gate, options, send);
|
|
283
|
+
}
|
|
284
|
+
//# sourceMappingURL=sessionGate.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","sessionGate_exports","__export","SESSION_CHANGE_WAIT_MS","SessionChangedError","sendThroughSessionGate","module","exports","_assert_this_initialized","self","ReferenceError","_call_super","_this","derived","args","_get_prototype_of","_possible_constructor_return","_is_native_reflect_construct","Reflect","construct","constructor","apply","_class_call_check","instance","Constructor","TypeError","_construct","Parent","Class","Parent2","args2","Class2","a","push","Function","bind","_set_prototype_of","prototype","arguments","o","Object","setPrototypeOf","getPrototypeOf","o2","__proto__","_inherits","subClass","superClass","create","writable","configurable","_is_native_function","fn","toString","call","indexOf","_type_of","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AAA9C,wBAAU,CAAAC,IAAA;AAAA;AAEZ,SAAI2B,kBAAAG,CAAA,EAAAkB,CAAA;EACFrB,iBAAY,GAAAI,MAAY,CAAAC,cAAQ,aAAAA,eAAAE,EAAA,EAAAe,EAAA;IAC9Bf,EAAA,CAAAC,SAAA,GAAWc,EAAA;IACT,OAAAf,EAAK;EACL;EAA+C,OACjDP,iBAAA,CAAAG,CAAA,EAAAkB,CAAA;AAAA;AAEF,SAAAD,QAAaA,CAAAG,GAAA,EAAK;EACpB,uBAAE;;EACA,OAAKA,GAAA,WAASC,MAAA,oBAAAD,GAAA,CAAAvC,WAAA,KAAAwC,MAAA,qBAAAD,GAAA;AACd;AAAQ,SACVE,mBAAAjC,KAAA;EACF,IAAAkC,MAAA,UAAAC,GAAA,qCAAAA,GAAA;EAEOF,kBAAS,YACdG,eACAA,CAAAjC,MACA,EACY;IACZ,IAAMA,MAAA,KAAO,IAAQ,KAAAoB,mBAAM,CAAApB,MAAA,UAAAA,MAAA;IAC3B,WAAOA,MAAQ,eACX;MAEN,UAAAN,SAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","types_exports","AuthType","FrappeError","HttpMethod","module","exports","_assert_this_initialized","self","ReferenceError","_call_super","_this","derived","args","_get_prototype_of","_possible_constructor_return","_is_native_reflect_construct","Reflect","construct","constructor","apply","_class_call_check","instance","Constructor","TypeError","_construct","Parent","Class","Parent2","args2","Class2","a","push","Function","bind","_set_prototype_of","arguments","_define_property","obj","configurable","writable","o","setPrototypeOf","getPrototypeOf","o2","__proto__","_inherits","subClass","superClass","create","_is_native_function","fn","toString","indexOf","_type_of","p","p2","Symbol","_wrap_native_super","_cache","Map","wrapNativeSuper","has","set","Wrapper","result","Boolean","valueOf","_","AuthType2","HttpMethod2","Error1","FrappeError2","message","status","data","Error"],"sources":["types.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar types_exports = {};\n__export(types_exports, {\n AuthType: () => AuthType,\n FrappeError: () => FrappeError,\n HttpMethod: () => HttpMethod\n});\nmodule.exports = __toCommonJS(types_exports);\nfunction _assert_this_initialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _call_super(_this, derived, args) {\n derived = _get_prototype_of(derived);\n return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _construct(Parent, args, Class) {\n if (_is_native_reflect_construct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function construct(Parent2, args2, Class2) {\n var a = [\n null\n ];\n a.push.apply(a, args2);\n var Constructor = Function.bind.apply(Parent2, a);\n var instance = new Constructor();\n if (Class2) _set_prototype_of(instance, Class2.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _get_prototype_of(o) {\n _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {\n return o2.__proto__ || Object.getPrototypeOf(o2);\n };\n return _get_prototype_of(o);\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _set_prototype_of(subClass, superClass);\n}\nfunction _is_native_function(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\nfunction _possible_constructor_return(self, call) {\n if (call && (_type_of(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assert_this_initialized(self);\n}\nfunction _set_prototype_of(o, p) {\n _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {\n o2.__proto__ = p2;\n return o2;\n };\n return _set_prototype_of(o, p);\n}\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction _wrap_native_super(Class) {\n var _cache = typeof Map === \"function\" ? /* @__PURE__ */ new Map() : void 0;\n _wrap_native_super = function wrapNativeSuper(Class2) {\n if (Class2 === null || !_is_native_function(Class2)) return Class2;\n if (typeof Class2 !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class2)) return _cache.get(Class2);\n _cache.set(Class2, Wrapper);\n }\n function Wrapper() {\n return _construct(Class2, arguments, _get_prototype_of(this).constructor);\n }\n Wrapper.prototype = Object.create(Class2.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return _set_prototype_of(Wrapper, Class2);\n };\n return _wrap_native_super(Class);\n}\nfunction _is_native_reflect_construct() {\n try {\n var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {\n }));\n } catch (_) {\n }\n return (_is_native_reflect_construct = function() {\n return !!result;\n })();\n}\nvar AuthType = /* @__PURE__ */ (function(AuthType2) {\n AuthType2[\"Bearer\"] = \"Bearer\";\n AuthType2[\"Token\"] = \"token\";\n return AuthType2;\n})({});\nvar HttpMethod = /* @__PURE__ */ (function(HttpMethod2) {\n HttpMethod2[\"Delete\"] = \"DELETE\";\n HttpMethod2[\"Get\"] = \"GET\";\n HttpMethod2[\"Head\"] = \"HEAD\";\n HttpMethod2[\"Post\"] = \"POST\";\n HttpMethod2[\"Put\"] = \"PUT\";\n return HttpMethod2;\n})({});\nvar FrappeError = /* @__PURE__ */ (function(Error1) {\n \"use strict\";\n _inherits(FrappeError2, Error1);\n function FrappeError2(message, status, data) {\n _class_call_check(this, FrappeError2);\n var _this;\n _this = _call_super(this, FrappeError2, [\n message\n ]), _define_property(_this, \"status\", void 0), _define_property(_this, \"data\", void 0);\n _this.name = \"FrappeError\";\n _this.status = status;\n _this.data = data;\n Object.setPrototypeOf(_this, FrappeError2.prototype);\n return _this;\n }\n return FrappeError2;\n})(_wrap_native_super(Error));\n//# sourceMappingURL=types.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAA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AK,CAAC,GAAG,KAAK;EAC1BA,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM;EAC5BA,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM;EAC5BA,WAAW,CAAC,KAAK,CAAC,GAAG,KAAK;EAC1B,OAAOA,WAAW;AACpB,CAAC,CAAE,CAAC,CAAC,CAAC;AACN,IAAInE,WAAW,GAAG,eAAiB,UAASoE,MAAM,EAAE;EAClD,YAAY;;EACZzB,SAAS,CAAC0B,YAAY,EAAED,MAAM,CAAC;EAC/B,SAASC,YAAYA,CAACC,OAAO,EAAEC,MAAM,EAAEC,IAAI,EAAE;IAC3CtD,iBAAiB,CAAC,IAAI,EAAEmD,YAAY,CAAC;IACrC,IAAI7D,KAAK;IACTA,KAAK,GAAGD,WAAW,CAAC,IAAI,EAAE8D,YAAY,EAAE,CACtCC,OAAO,CACR,CAAC,EAAEpC,gBAAgB,CAAC1B,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,EAAE0B,gBAAgB,CAAC1B,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACtFA,KAAK,CAACvB,IAAI,GAAG,aAAa;IAC1BuB,KAAK,CAAC+D,MAAM,GAAGA,MAAM;IACrB/D,KAAK,CAACgE,IAAI,GAAGA,IAAI;IACjBnG,MAAM,CAACkE,cAAc,CAAC/B,KAAK,EAAE6D,YAAY,CAACzF,SAAS,CAAC;IACpD,OAAO4B,KAAK;EACd;EACA,OAAO6D,YAAY;AACrB,CAAC,CAAEd,kBAAkB,CAACkB,KAAK,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports","__export","AuthType","FrappeError","HttpMethod","module","exports","_assert_this_initialized","self","ReferenceError","_call_super","_this","derived","args","_get_prototype_of","_possible_constructor_return","_is_native_reflect_construct","Reflect","construct","constructor","apply","_class_call_check","instance","Constructor","TypeError","_construct","Parent","Class","Parent2","args2","Class2","a"],"sources":["../../../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ps","__defProp","value","wire_exports","__export","defaultWireEndpoints","isConflictError","isNotFoundError","isPermissionError","isPreconditionFailedError","isValidationError","module","exports","create","update","delete","backfill","err","error","exc_type"],"sources":["../../../src/core/wire.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,YAAA;AAAAC,QAAA,CAAAD,YAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA,oBAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,yBAAA,EAAAA,CAAA,KAAAA,yBAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAsWOC,MAAM,CAAAC,OAAA,GAAAd,YAAsC,CAAAK,YAAA;AAAA,IACjDE,oBAAQ;EACRQ,MAAA,EAAQ;EACRC,MAAA,EAAQ;EACRC,MAAA,yBAAU;EACZC,QAAA;AA6FO;AACL,SAAOV,eAAeA,CAAAW,GAAA;EACxB,QAAAA,GAAA,aAAAA,GAAA,uBAAAA,GAAA,CAAAC,KAAA;AAKO;AACL,SAAOT,yBAAeA,CAAAQ,GAAA;EACxB,QAAAA,GAAA,aAAAA,GAAA,uBAAAA,GAAA,CAAAC,KAAA;AAKO;AACL,SAAOR,iBAAKA,CAAaO,GAAA;EAC3B,QAAAA,GAAA,aAAAA,GAAA,uBAAAA,GAAA,CAAAE,QAAA;AAKO;AACL,SAAOX,iBAAKA,CAAaS,GAAA;EAC3B,QAAAA,GAAA,aAAAA,GAAA,uBAAAA,GAAA,CAAAE,QAAA;AAKO;AACL,SAAOZ,eAAKA,CAAAU,GAAa;EAC3B,QAAAA,GAAA,aAAAA,GAAA,uBAAAA,GAAA,CAAAE,QAAA","ignoreList":[]}
|