request-iframe 0.1.1 → 0.2.1
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/QUICKSTART.CN.md +4 -2
- package/QUICKSTART.md +4 -2
- package/README.CN.md +129 -33
- package/README.md +116 -15
- package/cdn/request-iframe-react.umd.js +3354 -0
- package/cdn/request-iframe-react.umd.js.map +1 -0
- package/cdn/request-iframe-react.umd.min.js +2 -0
- package/cdn/request-iframe-react.umd.min.js.map +1 -0
- package/cdn/request-iframe.umd.js +19761 -0
- package/cdn/request-iframe.umd.js.map +1 -0
- package/cdn/request-iframe.umd.min.js +4 -0
- package/cdn/request-iframe.umd.min.js.map +1 -0
- package/esm/api/client.js +29 -21
- package/esm/api/endpoint.js +229 -0
- package/esm/api/server.js +16 -8
- package/esm/constants/debug.js +17 -0
- package/esm/constants/index.js +84 -67
- package/esm/constants/log.js +11 -0
- package/esm/constants/messages.js +3 -0
- package/esm/constants/warn-once.js +15 -0
- package/esm/endpoint/facade.js +390 -0
- package/esm/endpoint/heartbeat/heartbeat.js +60 -0
- package/esm/endpoint/heartbeat/ping.js +20 -0
- package/esm/endpoint/index.js +13 -0
- package/esm/endpoint/infra/hub.js +316 -0
- package/esm/endpoint/infra/inbox.js +232 -0
- package/esm/endpoint/infra/outbox.js +408 -0
- package/esm/endpoint/stream/dispatcher.js +58 -0
- package/esm/endpoint/stream/errors.js +27 -0
- package/esm/endpoint/stream/factory.js +76 -0
- package/esm/endpoint/stream/file-auto-resolve.js +34 -0
- package/esm/endpoint/stream/file-writable.js +105 -0
- package/esm/endpoint/stream/handler.js +26 -0
- package/esm/{core → impl}/client.js +240 -317
- package/esm/{core → impl}/response.js +113 -155
- package/esm/impl/server.js +568 -0
- package/esm/index.js +13 -6
- package/esm/message/ack.js +27 -0
- package/esm/message/channel-cache.js +108 -0
- package/esm/message/channel.js +90 -4
- package/esm/message/dispatcher.js +115 -75
- package/esm/stream/error.js +22 -0
- package/esm/stream/index.js +3 -1
- package/esm/stream/readable-stream.js +45 -9
- package/esm/stream/stream-core.js +7 -2
- package/esm/stream/writable-stream.js +97 -26
- package/esm/utils/blob.js +16 -0
- package/esm/utils/cache.js +25 -76
- package/esm/utils/content-type.js +81 -0
- package/esm/utils/debug.js +156 -179
- package/esm/utils/hooks.js +130 -0
- package/esm/utils/id.js +14 -0
- package/esm/utils/iframe.js +20 -0
- package/esm/utils/index.js +11 -163
- package/esm/utils/is.js +3 -0
- package/esm/utils/logger.js +55 -0
- package/esm/utils/promise.js +3 -0
- package/esm/utils/window.js +31 -0
- package/library/api/client.d.ts.map +1 -1
- package/library/api/client.js +30 -22
- package/library/api/endpoint.d.ts +23 -0
- package/library/api/endpoint.d.ts.map +1 -0
- package/library/api/endpoint.js +235 -0
- package/library/api/server.d.ts +4 -1
- package/library/api/server.d.ts.map +1 -1
- package/library/api/server.js +16 -8
- package/library/constants/debug.d.ts +18 -0
- package/library/constants/debug.d.ts.map +1 -0
- package/library/constants/debug.js +23 -0
- package/library/constants/index.d.ts +22 -2
- package/library/constants/index.d.ts.map +1 -1
- package/library/constants/index.js +110 -67
- package/library/constants/log.d.ts +12 -0
- package/library/constants/log.d.ts.map +1 -0
- package/library/constants/log.js +17 -0
- package/library/constants/messages.d.ts +3 -0
- package/library/constants/messages.d.ts.map +1 -1
- package/library/constants/messages.js +3 -0
- package/library/constants/warn-once.d.ts +12 -0
- package/library/constants/warn-once.d.ts.map +1 -0
- package/library/constants/warn-once.js +22 -0
- package/library/endpoint/facade.d.ts +238 -0
- package/library/endpoint/facade.d.ts.map +1 -0
- package/library/endpoint/facade.js +398 -0
- package/library/endpoint/heartbeat/heartbeat.d.ts +34 -0
- package/library/endpoint/heartbeat/heartbeat.d.ts.map +1 -0
- package/library/endpoint/heartbeat/heartbeat.js +67 -0
- package/library/endpoint/heartbeat/ping.d.ts +18 -0
- package/library/endpoint/heartbeat/ping.d.ts.map +1 -0
- package/library/endpoint/heartbeat/ping.js +26 -0
- package/library/endpoint/index.d.ts +16 -0
- package/library/endpoint/index.d.ts.map +1 -0
- package/library/endpoint/index.js +114 -0
- package/library/endpoint/infra/hub.d.ts +170 -0
- package/library/endpoint/infra/hub.d.ts.map +1 -0
- package/library/endpoint/infra/hub.js +323 -0
- package/library/endpoint/infra/inbox.d.ts +73 -0
- package/library/endpoint/infra/inbox.d.ts.map +1 -0
- package/library/endpoint/infra/inbox.js +239 -0
- package/library/endpoint/infra/outbox.d.ts +149 -0
- package/library/endpoint/infra/outbox.d.ts.map +1 -0
- package/library/endpoint/infra/outbox.js +415 -0
- package/library/endpoint/stream/dispatcher.d.ts +33 -0
- package/library/endpoint/stream/dispatcher.d.ts.map +1 -0
- package/library/endpoint/stream/dispatcher.js +66 -0
- package/library/endpoint/stream/errors.d.ts +20 -0
- package/library/endpoint/stream/errors.d.ts.map +1 -0
- package/library/endpoint/stream/errors.js +32 -0
- package/library/endpoint/stream/factory.d.ts +44 -0
- package/library/endpoint/stream/factory.d.ts.map +1 -0
- package/library/endpoint/stream/factory.js +82 -0
- package/library/endpoint/stream/file-auto-resolve.d.ts +26 -0
- package/library/endpoint/stream/file-auto-resolve.d.ts.map +1 -0
- package/library/endpoint/stream/file-auto-resolve.js +41 -0
- package/library/endpoint/stream/file-writable.d.ts +33 -0
- package/library/endpoint/stream/file-writable.d.ts.map +1 -0
- package/library/endpoint/stream/file-writable.js +115 -0
- package/library/endpoint/stream/handler.d.ts +20 -0
- package/library/endpoint/stream/handler.d.ts.map +1 -0
- package/library/endpoint/stream/handler.js +32 -0
- package/library/{core → impl}/client.d.ts +16 -13
- package/library/impl/client.d.ts.map +1 -0
- package/library/{core → impl}/client.js +251 -330
- package/library/{core → impl}/request.d.ts.map +1 -1
- package/library/{core → impl}/response.d.ts +5 -10
- package/library/impl/response.d.ts.map +1 -0
- package/library/{core → impl}/response.js +113 -155
- package/library/{core → impl}/server.d.ts +22 -55
- package/library/impl/server.d.ts.map +1 -0
- package/library/impl/server.js +575 -0
- package/library/index.d.ts +13 -6
- package/library/index.d.ts.map +1 -1
- package/library/index.js +16 -16
- package/library/message/ack.d.ts +15 -0
- package/library/message/ack.d.ts.map +1 -0
- package/library/message/ack.js +33 -0
- package/library/message/channel-cache.d.ts +26 -0
- package/library/message/channel-cache.d.ts.map +1 -0
- package/library/message/channel-cache.js +115 -0
- package/library/message/channel.d.ts +53 -6
- package/library/message/channel.d.ts.map +1 -1
- package/library/message/channel.js +94 -8
- package/library/message/dispatcher.d.ts +7 -0
- package/library/message/dispatcher.d.ts.map +1 -1
- package/library/message/dispatcher.js +116 -76
- package/library/stream/error.d.ts +24 -0
- package/library/stream/error.d.ts.map +1 -0
- package/library/stream/error.js +29 -0
- package/library/stream/index.d.ts +4 -1
- package/library/stream/index.d.ts.map +1 -1
- package/library/stream/index.js +7 -4
- package/library/stream/readable-stream.d.ts.map +1 -1
- package/library/stream/readable-stream.js +46 -10
- package/library/stream/stream-core.d.ts.map +1 -1
- package/library/stream/stream-core.js +6 -1
- package/library/stream/writable-stream.d.ts.map +1 -1
- package/library/stream/writable-stream.js +99 -28
- package/library/types/index.d.ts +15 -19
- package/library/types/index.d.ts.map +1 -1
- package/library/utils/blob.d.ts +3 -0
- package/library/utils/blob.d.ts.map +1 -0
- package/library/utils/blob.js +22 -0
- package/library/utils/cache.d.ts +10 -20
- package/library/utils/cache.d.ts.map +1 -1
- package/library/utils/cache.js +25 -79
- package/library/utils/content-type.d.ts +13 -0
- package/library/utils/content-type.d.ts.map +1 -0
- package/library/utils/content-type.js +87 -0
- package/library/utils/debug.d.ts.map +1 -1
- package/library/utils/debug.js +155 -177
- package/library/utils/hooks.d.ts +30 -0
- package/library/utils/hooks.d.ts.map +1 -0
- package/library/utils/hooks.js +139 -0
- package/library/utils/id.d.ts +9 -0
- package/library/utils/id.d.ts.map +1 -0
- package/library/utils/id.js +21 -0
- package/library/utils/iframe.d.ts +5 -0
- package/library/utils/iframe.d.ts.map +1 -0
- package/library/utils/iframe.js +25 -0
- package/library/utils/index.d.ts +7 -34
- package/library/utils/index.d.ts.map +1 -1
- package/library/utils/index.js +58 -194
- package/library/utils/is.d.ts +2 -0
- package/library/utils/is.d.ts.map +1 -0
- package/library/utils/is.js +9 -0
- package/library/utils/logger.d.ts +13 -0
- package/library/utils/logger.d.ts.map +1 -0
- package/library/utils/logger.js +63 -0
- package/library/utils/promise.d.ts +2 -0
- package/library/utils/promise.d.ts.map +1 -0
- package/library/utils/promise.js +9 -0
- package/library/utils/window.d.ts +2 -0
- package/library/utils/window.d.ts.map +1 -0
- package/library/utils/window.js +38 -0
- package/package.json +49 -2
- package/react/package.json +2 -1
- package/esm/core/client-server.js +0 -294
- package/esm/core/server.js +0 -776
- package/library/core/client-server.d.ts +0 -97
- package/library/core/client-server.d.ts.map +0 -1
- package/library/core/client-server.js +0 -301
- package/library/core/client.d.ts.map +0 -1
- package/library/core/response.d.ts.map +0 -1
- package/library/core/server.d.ts.map +0 -1
- package/library/core/server.js +0 -781
- /package/esm/{core → impl}/request.js +0 -0
- /package/library/{core → impl}/request.d.ts +0 -0
- /package/library/{core → impl}/request.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/impl/request.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAAE,cAAc,EAAE,eAAe,EAC/C,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C;;GAEG;AACH,qBAAa,iBAAkB,YAAW,aAAa;IAC9C,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,cAAc,CAAC;gBAGzB,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,cAAc,EACxB,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;CAkBtC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ServerResponse, CookieOptions, SendOptions, SendFileOptions } from '../types';
|
|
2
2
|
import { IframeWritableStream } from '../stream';
|
|
3
|
-
import {
|
|
3
|
+
import { RequestIframeEndpointOutbox } from '../endpoint';
|
|
4
4
|
/**
|
|
5
5
|
* Callback waiting for client acknowledgment
|
|
6
6
|
*/
|
|
@@ -14,30 +14,25 @@ export declare class ServerResponseImpl implements ServerResponse {
|
|
|
14
14
|
headers: Record<string, string | string[]>;
|
|
15
15
|
private readonly requestId;
|
|
16
16
|
private readonly path;
|
|
17
|
-
private readonly
|
|
18
|
-
private readonly targetWindow;
|
|
19
|
-
private readonly targetOrigin;
|
|
20
|
-
private readonly channel;
|
|
17
|
+
private readonly peer;
|
|
21
18
|
private readonly registerStreamHandler?;
|
|
22
19
|
private readonly unregisterStreamHandler?;
|
|
23
20
|
private readonly heartbeat?;
|
|
24
|
-
/** Target client ID (usually the creatorId of the original request) */
|
|
25
|
-
private readonly targetId?;
|
|
26
21
|
/** Server instance ID (for creatorId in responses) */
|
|
27
22
|
private readonly serverId?;
|
|
28
23
|
private onAckCallback?;
|
|
29
24
|
private onSentCallback?;
|
|
30
25
|
_sent: boolean;
|
|
31
|
-
constructor(requestId: string, path: string,
|
|
26
|
+
constructor(requestId: string, path: string, serverId?: string, peer?: RequestIframeEndpointOutbox, options?: {
|
|
32
27
|
registerStreamHandler?: (streamId: string, handler: (data: any) => void) => void;
|
|
33
28
|
unregisterStreamHandler?: (streamId: string) => void;
|
|
34
29
|
heartbeat?: () => Promise<boolean>;
|
|
35
30
|
onSent?: OnSentCallback;
|
|
36
31
|
});
|
|
37
32
|
/**
|
|
38
|
-
* Send message via
|
|
33
|
+
* Send message via bound peer
|
|
39
34
|
*/
|
|
40
|
-
private
|
|
35
|
+
private sendResponseMessage;
|
|
41
36
|
/**
|
|
42
37
|
* Check if header exists (case-insensitive)
|
|
43
38
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../src/impl/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIvF,OAAO,EAAE,oBAAoB,EAA0B,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAM1D;;GAEG;AACH,KAAK,WAAW,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;AAC1D,KAAK,cAAc,GAAG,MAAM,IAAI,CAAC;AAEjC;;GAEG;AACH,qBAAa,kBAAmB,YAAW,cAAc;IAChD,UAAU,EAAE,MAAM,CAAiB;IACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAM;IACvD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA8B;IACnD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAA2D;IAClG,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAA6B;IACtE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAyB;IACpD,sDAAsD;IACtD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,C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,EAC7B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,OAAO,CAAC;IAwCnB;;;OAGG;IACU,UAAU,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAmB7D,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc;IAKpC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI;IAwBhE,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,cAAc;IAMpE,MAAM,CACX,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,aAAa,GACtB,cAAc;IA4BV,WAAW,CAChB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,aAAa,GACtB,cAAc;CAkBlB"}
|
|
@@ -14,10 +14,11 @@ require("core-js/modules/es.promise.js");
|
|
|
14
14
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
15
15
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
-
var
|
|
17
|
+
var _cookie = require("../utils/cookie");
|
|
18
|
+
var _contentType = require("../utils/content-type");
|
|
18
19
|
var _constants = require("../constants");
|
|
19
20
|
var _stream = require("../stream");
|
|
20
|
-
var
|
|
21
|
+
var _endpoint = require("../endpoint");
|
|
21
22
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
23
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
24
|
/**
|
|
@@ -28,18 +29,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
28
29
|
* ServerResponse implementation
|
|
29
30
|
*/
|
|
30
31
|
class ServerResponseImpl {
|
|
31
|
-
constructor(requestId, path,
|
|
32
|
+
constructor(requestId, path, serverId, peer, options) {
|
|
32
33
|
(0, _defineProperty2.default)(this, "statusCode", _constants.HttpStatus.OK);
|
|
33
34
|
(0, _defineProperty2.default)(this, "headers", {});
|
|
34
35
|
(0, _defineProperty2.default)(this, "_sent", false);
|
|
35
36
|
this.requestId = requestId;
|
|
36
37
|
this.path = path;
|
|
37
|
-
this.secretKey = secretKey;
|
|
38
|
-
this.targetWindow = targetWindow;
|
|
39
|
-
this.targetOrigin = targetOrigin;
|
|
40
|
-
this.channel = channel;
|
|
41
38
|
this.serverId = serverId;
|
|
42
|
-
this.
|
|
39
|
+
this.peer = peer;
|
|
43
40
|
this.registerStreamHandler = options === null || options === void 0 ? void 0 : options.registerStreamHandler;
|
|
44
41
|
this.unregisterStreamHandler = options === null || options === void 0 ? void 0 : options.unregisterStreamHandler;
|
|
45
42
|
this.heartbeat = options === null || options === void 0 ? void 0 : options.heartbeat;
|
|
@@ -47,11 +44,10 @@ class ServerResponseImpl {
|
|
|
47
44
|
}
|
|
48
45
|
|
|
49
46
|
/**
|
|
50
|
-
* Send message via
|
|
47
|
+
* Send message via bound peer
|
|
51
48
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.channel.send(this.targetWindow, message, this.targetOrigin);
|
|
49
|
+
sendResponseMessage(data) {
|
|
50
|
+
return this.peer.sendMessage(_constants.MessageType.RESPONSE, this.requestId, data);
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
/**
|
|
@@ -67,7 +63,7 @@ class ServerResponseImpl {
|
|
|
67
63
|
* Returns null if Content-Type should not be auto-set
|
|
68
64
|
*/
|
|
69
65
|
detectContentType(data) {
|
|
70
|
-
return (0,
|
|
66
|
+
return (0, _contentType.detectContentType)(data, {
|
|
71
67
|
checkStream: true,
|
|
72
68
|
isIframeWritableStream: _stream.isIframeWritableStream
|
|
73
69
|
});
|
|
@@ -125,7 +121,7 @@ class ServerResponseImpl {
|
|
|
125
121
|
* Internal method: send raw data (used by send after type detection)
|
|
126
122
|
*/
|
|
127
123
|
_sendRaw(data, options) {
|
|
128
|
-
var _options$requireAck
|
|
124
|
+
var _options$requireAck;
|
|
129
125
|
if (this._sent) return Promise.resolve(false);
|
|
130
126
|
this.markSent();
|
|
131
127
|
var requireAck = (_options$requireAck = options === null || options === void 0 ? void 0 : options.requireAck) !== null && _options$requireAck !== void 0 ? _options$requireAck : false;
|
|
@@ -135,24 +131,18 @@ class ServerResponseImpl {
|
|
|
135
131
|
*
|
|
136
132
|
* NOTE: ack is an internal reserved field (not part of public API).
|
|
137
133
|
*/
|
|
138
|
-
var expectedAck = (
|
|
139
|
-
id: (0, _utils.generateRequestId)()
|
|
140
|
-
} : undefined;
|
|
134
|
+
var expectedAck = (0, _endpoint.buildExpectedAck)(requireAck, options === null || options === void 0 ? void 0 : options.ack);
|
|
141
135
|
try {
|
|
142
136
|
// If acknowledgment not required, send directly and return true
|
|
143
137
|
if (!requireAck) {
|
|
144
|
-
this.
|
|
138
|
+
this.sendResponseMessage({
|
|
145
139
|
path: this.path,
|
|
146
|
-
secretKey: this.secretKey,
|
|
147
140
|
data,
|
|
148
141
|
status: this.statusCode,
|
|
149
142
|
statusText: (0, _constants.getStatusText)(this.statusCode),
|
|
150
143
|
headers: this.headers,
|
|
151
|
-
requireAck: false
|
|
152
|
-
|
|
153
|
-
creatorId: this.serverId,
|
|
154
|
-
targetId: this.targetId
|
|
155
|
-
}));
|
|
144
|
+
requireAck: false
|
|
145
|
+
});
|
|
156
146
|
return Promise.resolve(true);
|
|
157
147
|
}
|
|
158
148
|
|
|
@@ -164,25 +154,21 @@ class ServerResponseImpl {
|
|
|
164
154
|
resolve(false);
|
|
165
155
|
return;
|
|
166
156
|
}
|
|
167
|
-
if (
|
|
157
|
+
if (!(0, _endpoint.isExpectedAckMatch)(expectedAck, receivedAckMeta)) {
|
|
168
158
|
resolve(false);
|
|
169
159
|
return;
|
|
170
160
|
}
|
|
171
161
|
resolve(true);
|
|
172
162
|
});
|
|
173
|
-
this.
|
|
163
|
+
this.sendResponseMessage({
|
|
174
164
|
path: this.path,
|
|
175
|
-
secretKey: this.secretKey,
|
|
176
165
|
data,
|
|
177
166
|
status: this.statusCode,
|
|
178
167
|
statusText: (0, _constants.getStatusText)(this.statusCode),
|
|
179
168
|
headers: this.headers,
|
|
180
169
|
requireAck: true,
|
|
181
|
-
ack: expectedAck
|
|
182
|
-
|
|
183
|
-
creatorId: this.serverId,
|
|
184
|
-
targetId: this.targetId
|
|
185
|
-
}));
|
|
170
|
+
ack: expectedAck
|
|
171
|
+
});
|
|
186
172
|
} catch (error) {
|
|
187
173
|
// If window is closed, reject immediately
|
|
188
174
|
if ((error === null || error === void 0 ? void 0 : error.code) === _constants.ErrorCode.TARGET_WINDOW_CLOSED) {
|
|
@@ -209,47 +195,59 @@ class ServerResponseImpl {
|
|
|
209
195
|
*/
|
|
210
196
|
send(data, options) {
|
|
211
197
|
var _this = this;
|
|
212
|
-
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
while (1) switch (_context.prev = _context.next) {
|
|
198
|
+
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
199
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
200
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
216
201
|
case 0:
|
|
217
202
|
if (!_this._sent) {
|
|
218
|
-
|
|
203
|
+
_context2.next = 1;
|
|
219
204
|
break;
|
|
220
205
|
}
|
|
221
|
-
return
|
|
206
|
+
return _context2.abrupt("return", Promise.resolve(false));
|
|
222
207
|
case 1:
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
208
|
+
return _context2.abrupt("return", _this.peer.send({
|
|
209
|
+
data,
|
|
210
|
+
onStream: function () {
|
|
211
|
+
var _onStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(stream) {
|
|
212
|
+
return _regenerator.default.wrap(function (_context) {
|
|
213
|
+
while (1) switch (_context.prev = _context.next) {
|
|
214
|
+
case 0:
|
|
215
|
+
_context.next = 1;
|
|
216
|
+
return _this.sendStream(stream);
|
|
217
|
+
case 1:
|
|
218
|
+
return _context.abrupt("return", true);
|
|
219
|
+
case 2:
|
|
220
|
+
case "end":
|
|
221
|
+
return _context.stop();
|
|
222
|
+
}
|
|
223
|
+
}, _callee);
|
|
224
|
+
}));
|
|
225
|
+
function onStream(_x) {
|
|
226
|
+
return _onStream.apply(this, arguments);
|
|
227
|
+
}
|
|
228
|
+
return onStream;
|
|
229
|
+
}(),
|
|
230
|
+
onFileOrBlob: () => {
|
|
231
|
+
// Extract options for sendFile
|
|
232
|
+
var fileOptions = _objectSpread({
|
|
233
|
+
requireAck: options === null || options === void 0 ? void 0 : options.requireAck
|
|
234
|
+
}, typeof File !== 'undefined' && data instanceof File ? {
|
|
235
|
+
mimeType: data.type,
|
|
236
|
+
fileName: data.name
|
|
237
|
+
} : {});
|
|
238
|
+
return _this.sendFile(data, fileOptions);
|
|
239
|
+
},
|
|
240
|
+
onOther: () => {
|
|
241
|
+
// For other types, auto-detect and set Content-Type, then send
|
|
242
|
+
_this.ensureContentTypeIfNeeded(data);
|
|
243
|
+
return _this._sendRaw(data, options);
|
|
244
|
+
}
|
|
245
|
+
}));
|
|
229
246
|
case 2:
|
|
230
|
-
return _context.abrupt("return", true);
|
|
231
|
-
case 3:
|
|
232
|
-
if (!(typeof File !== 'undefined' && data instanceof File || typeof Blob !== 'undefined' && data instanceof Blob)) {
|
|
233
|
-
_context.next = 4;
|
|
234
|
-
break;
|
|
235
|
-
}
|
|
236
|
-
// Extract options for sendFile
|
|
237
|
-
fileOptions = _objectSpread({
|
|
238
|
-
requireAck: options === null || options === void 0 ? void 0 : options.requireAck
|
|
239
|
-
}, typeof File !== 'undefined' && data instanceof File ? {
|
|
240
|
-
mimeType: data.type,
|
|
241
|
-
fileName: data.name
|
|
242
|
-
} : {});
|
|
243
|
-
return _context.abrupt("return", _this.sendFile(data, fileOptions));
|
|
244
|
-
case 4:
|
|
245
|
-
// For other types, auto-detect and set Content-Type, then send
|
|
246
|
-
_this.ensureContentTypeIfNeeded(data);
|
|
247
|
-
return _context.abrupt("return", _this._sendRaw(data, options));
|
|
248
|
-
case 5:
|
|
249
247
|
case "end":
|
|
250
|
-
return
|
|
248
|
+
return _context2.stop();
|
|
251
249
|
}
|
|
252
|
-
},
|
|
250
|
+
}, _callee2);
|
|
253
251
|
}))();
|
|
254
252
|
}
|
|
255
253
|
json(data, options) {
|
|
@@ -258,7 +256,6 @@ class ServerResponseImpl {
|
|
|
258
256
|
sendFile(content, options) {
|
|
259
257
|
var _this2 = this;
|
|
260
258
|
return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
261
|
-
var mimeType, fileName, fileContent, stream;
|
|
262
259
|
return _regenerator.default.wrap(function (_context3) {
|
|
263
260
|
while (1) switch (_context3.prev = _context3.next) {
|
|
264
261
|
case 0:
|
|
@@ -268,77 +265,43 @@ class ServerResponseImpl {
|
|
|
268
265
|
}
|
|
269
266
|
return _context3.abrupt("return", false);
|
|
270
267
|
case 1:
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
// If it's a plain string, convert to base64
|
|
278
|
-
fileContent = btoa(unescape(encodeURIComponent(content)));
|
|
279
|
-
_context3.next = 6;
|
|
280
|
-
break;
|
|
281
|
-
case 2:
|
|
282
|
-
if (!(content instanceof File)) {
|
|
283
|
-
_context3.next = 4;
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
mimeType = content.type || mimeType;
|
|
287
|
-
fileName = fileName || content.name;
|
|
288
|
-
_context3.next = 3;
|
|
289
|
-
return (0, _utils.blobToBase64)(content);
|
|
290
|
-
case 3:
|
|
291
|
-
fileContent = _context3.sent;
|
|
292
|
-
_context3.next = 6;
|
|
293
|
-
break;
|
|
294
|
-
case 4:
|
|
295
|
-
_context3.next = 5;
|
|
296
|
-
return (0, _utils.blobToBase64)(content);
|
|
297
|
-
case 5:
|
|
298
|
-
fileContent = _context3.sent;
|
|
299
|
-
case 6:
|
|
300
|
-
// Set file-related headers
|
|
301
|
-
_this2.setHeader(_constants.HttpHeader.CONTENT_TYPE, mimeType);
|
|
302
|
-
if (fileName) {
|
|
303
|
-
_this2.setHeader(_constants.HttpHeader.CONTENT_DISPOSITION, `attachment; filename="${fileName}"`);
|
|
304
|
-
} else {
|
|
305
|
-
_this2.setHeader(_constants.HttpHeader.CONTENT_DISPOSITION, 'attachment');
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// Create file stream with autoResolve enabled
|
|
309
|
-
stream = new _stream.IframeFileWritableStream({
|
|
310
|
-
filename: fileName || 'file',
|
|
311
|
-
mimeType,
|
|
268
|
+
_context3.next = 2;
|
|
269
|
+
return _this2.peer.sendFile({
|
|
270
|
+
content,
|
|
271
|
+
fileName: options === null || options === void 0 ? void 0 : options.fileName,
|
|
272
|
+
mimeType: options === null || options === void 0 ? void 0 : options.mimeType,
|
|
312
273
|
chunked: false,
|
|
313
|
-
// File is sent in one chunk
|
|
314
274
|
autoResolve: true,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
return _context2.stop();
|
|
328
|
-
}
|
|
329
|
-
}, _callee2);
|
|
330
|
-
}));
|
|
331
|
-
function next() {
|
|
332
|
-
return _next.apply(this, arguments);
|
|
275
|
+
defaultFileName: 'file',
|
|
276
|
+
defaultMimeType: 'application/octet-stream',
|
|
277
|
+
onFileInfo: ({
|
|
278
|
+
fileName,
|
|
279
|
+
mimeType
|
|
280
|
+
}) => {
|
|
281
|
+
// Set file-related headers
|
|
282
|
+
_this2.setHeader(_constants.HttpHeader.CONTENT_TYPE, mimeType);
|
|
283
|
+
if (fileName) {
|
|
284
|
+
_this2.setHeader(_constants.HttpHeader.CONTENT_DISPOSITION, `attachment; filename="${fileName}"`);
|
|
285
|
+
} else {
|
|
286
|
+
_this2.setHeader(_constants.HttpHeader.CONTENT_DISPOSITION, 'attachment');
|
|
333
287
|
}
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
288
|
+
_this2.markSent();
|
|
289
|
+
},
|
|
290
|
+
stream: {
|
|
291
|
+
bind: {
|
|
292
|
+
requestId: _this2.requestId,
|
|
293
|
+
registerStreamHandler: _this2.registerStreamHandler,
|
|
294
|
+
unregisterStreamHandler: _this2.unregisterStreamHandler,
|
|
295
|
+
heartbeat: _this2.heartbeat,
|
|
296
|
+
serverId: _this2.serverId,
|
|
297
|
+
targetId: _this2.peer.defaultTargetId
|
|
298
|
+
},
|
|
299
|
+
awaitStart: true
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
case 2:
|
|
340
303
|
return _context3.abrupt("return", true);
|
|
341
|
-
case
|
|
304
|
+
case 3:
|
|
342
305
|
case "end":
|
|
343
306
|
return _context3.stop();
|
|
344
307
|
}
|
|
@@ -362,27 +325,22 @@ class ServerResponseImpl {
|
|
|
362
325
|
}
|
|
363
326
|
return _context4.abrupt("return");
|
|
364
327
|
case 1:
|
|
365
|
-
_this3.markSent();
|
|
366
|
-
|
|
367
|
-
// Window check is handled in MessageDispatcher when stream sends messages
|
|
368
|
-
|
|
369
|
-
// Bind stream to request context
|
|
370
|
-
stream._bind({
|
|
371
|
-
requestId: _this3.requestId,
|
|
372
|
-
targetWindow: _this3.targetWindow,
|
|
373
|
-
targetOrigin: _this3.targetOrigin,
|
|
374
|
-
secretKey: _this3.secretKey,
|
|
375
|
-
channel: _this3.channel,
|
|
376
|
-
registerStreamHandler: _this3.registerStreamHandler,
|
|
377
|
-
unregisterStreamHandler: _this3.unregisterStreamHandler,
|
|
378
|
-
heartbeat: _this3.heartbeat,
|
|
379
|
-
serverId: _this3.serverId,
|
|
380
|
-
targetId: _this3.targetId
|
|
381
|
-
});
|
|
382
|
-
|
|
383
|
-
// Start stream transmission
|
|
384
328
|
_context4.next = 2;
|
|
385
|
-
return
|
|
329
|
+
return _this3.peer.sendStream({
|
|
330
|
+
stream: stream,
|
|
331
|
+
bind: {
|
|
332
|
+
requestId: _this3.requestId,
|
|
333
|
+
registerStreamHandler: _this3.registerStreamHandler,
|
|
334
|
+
unregisterStreamHandler: _this3.unregisterStreamHandler,
|
|
335
|
+
heartbeat: _this3.heartbeat,
|
|
336
|
+
serverId: _this3.serverId,
|
|
337
|
+
targetId: _this3.peer.defaultTargetId
|
|
338
|
+
},
|
|
339
|
+
awaitStart: true,
|
|
340
|
+
beforeStart: () => {
|
|
341
|
+
_this3.markSent();
|
|
342
|
+
}
|
|
343
|
+
});
|
|
386
344
|
case 2:
|
|
387
345
|
case "end":
|
|
388
346
|
return _context4.stop();
|
|
@@ -426,7 +384,7 @@ class ServerResponseImpl {
|
|
|
426
384
|
* Generate Set-Cookie string and add to headers[HttpHeader.SET_COOKIE] array
|
|
427
385
|
* Client will parse and save to cookie storage upon receiving
|
|
428
386
|
*/
|
|
429
|
-
var setCookieStr = (0,
|
|
387
|
+
var setCookieStr = (0, _cookie.createSetCookie)(name, value, {
|
|
430
388
|
path: options === null || options === void 0 ? void 0 : options.path,
|
|
431
389
|
expires: options === null || options === void 0 ? void 0 : options.expires,
|
|
432
390
|
maxAge: options === null || options === void 0 ? void 0 : options.maxAge,
|
|
@@ -449,7 +407,7 @@ class ServerResponseImpl {
|
|
|
449
407
|
* Clear specified Cookie
|
|
450
408
|
* Generate an expired Set-Cookie string, client will delete this cookie upon receiving
|
|
451
409
|
*/
|
|
452
|
-
var setCookieStr = (0,
|
|
410
|
+
var setCookieStr = (0, _cookie.createClearCookie)(name, {
|
|
453
411
|
path: options === null || options === void 0 ? void 0 : options.path
|
|
454
412
|
});
|
|
455
413
|
|
|
@@ -33,29 +33,31 @@ export interface ServerOptions {
|
|
|
33
33
|
* Uses shared MessageDispatcher (backed by MessageChannel) to listen for and send messages
|
|
34
34
|
*/
|
|
35
35
|
export declare class RequestIframeServerImpl implements RequestIframeServer {
|
|
36
|
+
private static readonly PENDING_ACKS;
|
|
37
|
+
private static readonly PENDING_PONGS;
|
|
38
|
+
private static readonly PENDING_STREAM_REQUESTS;
|
|
39
|
+
private static readonly LIMIT_IN_FLIGHT_BY_CLIENT;
|
|
36
40
|
/** Unique instance ID */
|
|
37
41
|
readonly id: string;
|
|
38
|
-
private readonly
|
|
42
|
+
private readonly endpoint;
|
|
43
|
+
private readonly hub;
|
|
39
44
|
private readonly ackTimeout;
|
|
40
|
-
private readonly versionValidator;
|
|
41
45
|
private readonly handlers;
|
|
42
46
|
private readonly middlewares;
|
|
43
47
|
private readonly originValidator?;
|
|
44
48
|
private readonly maxConcurrentRequestsPerClient;
|
|
45
|
-
private readonly inFlightByClientKey;
|
|
46
|
-
/** Responses waiting for client acknowledgment */
|
|
47
|
-
private readonly pendingAcks;
|
|
48
|
-
/** Pending pings waiting for client PONG (server -> client heartbeat) */
|
|
49
|
-
private readonly pendingPongs;
|
|
50
|
-
/** Pending requests waiting for client stream_start (streamId present) */
|
|
51
|
-
private readonly pendingStreamRequests;
|
|
52
|
-
/** Stream message handlers (streamId -> handler) for client→server streams */
|
|
53
|
-
private readonly streamHandlers;
|
|
54
|
-
/** List of functions to unregister handlers */
|
|
55
|
-
private readonly unregisterFns;
|
|
56
|
-
/** Whether it is open */
|
|
57
|
-
private _isOpen;
|
|
58
49
|
constructor(options?: ServerOptions);
|
|
50
|
+
private get dispatcher();
|
|
51
|
+
/** Message isolation key (read-only) */
|
|
52
|
+
get secretKey(): string | undefined;
|
|
53
|
+
/** Whether message handling is enabled */
|
|
54
|
+
get isOpen(): boolean;
|
|
55
|
+
/** Enable message handling (register message handler) */
|
|
56
|
+
open(): void;
|
|
57
|
+
/** Disable message handling (unregister message handler, but don't release resources) */
|
|
58
|
+
close(): void;
|
|
59
|
+
/** Get the underlying MessageDispatcher */
|
|
60
|
+
get messageDispatcher(): MessageDispatcher;
|
|
59
61
|
/**
|
|
60
62
|
* Check whether an incoming message origin is allowed.
|
|
61
63
|
*/
|
|
@@ -65,45 +67,10 @@ export declare class RequestIframeServerImpl implements RequestIframeServer {
|
|
|
65
67
|
* We intentionally include origin to prevent cross-origin collisions.
|
|
66
68
|
*/
|
|
67
69
|
private getClientKey;
|
|
68
|
-
private incInFlight;
|
|
69
|
-
private decInFlight;
|
|
70
|
-
/**
|
|
71
|
-
* Open message processing (register message handlers)
|
|
72
|
-
*/
|
|
73
|
-
open(): void;
|
|
74
|
-
/**
|
|
75
|
-
* Close message processing (unregister message handlers, but don't release channel)
|
|
76
|
-
*/
|
|
77
|
-
close(): void;
|
|
78
|
-
/**
|
|
79
|
-
* Whether it is open
|
|
80
|
-
*/
|
|
81
|
-
get isOpen(): boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Register message handlers
|
|
84
|
-
*/
|
|
85
|
-
private registerHandlers;
|
|
86
|
-
/** Handle stream_start from client (stream request with streamId) */
|
|
87
|
-
private handleStreamStart;
|
|
88
|
-
private dispatchStreamMessage;
|
|
89
70
|
/**
|
|
90
71
|
* Handle protocol version error
|
|
91
72
|
*/
|
|
92
73
|
private handleVersionError;
|
|
93
|
-
/**
|
|
94
|
-
* Handle ping message
|
|
95
|
-
*/
|
|
96
|
-
private handlePing;
|
|
97
|
-
private handlePong;
|
|
98
|
-
private pingClient;
|
|
99
|
-
/**
|
|
100
|
-
* Handle ACK (receipt confirmation for responses when requireAck === true).
|
|
101
|
-
*/
|
|
102
|
-
private handleAck;
|
|
103
|
-
/** Get secretKey */
|
|
104
|
-
get secretKey(): string | undefined;
|
|
105
|
-
/** Get the underlying MessageDispatcher */
|
|
106
|
-
get messageDispatcher(): MessageDispatcher;
|
|
107
74
|
private handleRequestError;
|
|
108
75
|
private handleRequestResult;
|
|
109
76
|
/**
|
|
@@ -116,10 +83,6 @@ export declare class RequestIframeServerImpl implements RequestIframeServer {
|
|
|
116
83
|
* Handle request
|
|
117
84
|
*/
|
|
118
85
|
private handleRequest;
|
|
119
|
-
/**
|
|
120
|
-
* Register pending acknowledgment response
|
|
121
|
-
*/
|
|
122
|
-
private registerPendingAck;
|
|
123
86
|
use(middleware: Middleware): void;
|
|
124
87
|
use(path: PathMatcher, middleware: Middleware): void;
|
|
125
88
|
on(path: string, handler: ServerHandler): () => void;
|
|
@@ -127,7 +90,11 @@ export declare class RequestIframeServerImpl implements RequestIframeServer {
|
|
|
127
90
|
off(path: string | string[]): void;
|
|
128
91
|
map(handlers: Record<string, ServerHandler>): (() => void);
|
|
129
92
|
/**
|
|
130
|
-
*
|
|
93
|
+
* Cleanup before destroy
|
|
94
|
+
*/
|
|
95
|
+
private cleanup;
|
|
96
|
+
/**
|
|
97
|
+
* Destroy server (close and release resources)
|
|
131
98
|
*/
|
|
132
99
|
destroy(): void;
|
|
133
100
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/impl/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,aAAa,EACb,eAAe,EAChB,MA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