@izumi-framework/izumi-runtime-typescript 1.0.10-build.4875 → 1.0.10
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/dispatcher.js +11 -16
- package/dispatcher.js.map +1 -1
- package/either.js +50 -57
- package/either.js.map +1 -1
- package/formatter.js +49 -57
- package/formatter.js.map +1 -1
- package/index.js +9 -21
- package/index.js.map +1 -1
- package/introspector.js +12 -19
- package/introspector.js.map +1 -1
- package/logger/index.js +3 -15
- package/logger/index.js.map +1 -1
- package/logger/logger.console.js +26 -43
- package/logger/logger.console.js.map +1 -1
- package/logger/logger.dummy.js +3 -14
- package/logger/logger.dummy.js.map +1 -1
- package/logger/logger.js +2 -5
- package/logger/logger.js.map +1 -1
- package/marshaller.js +10 -16
- package/marshaller.js.map +1 -1
- package/package.json +1 -1
- package/transport/auth/auth.apikey.js +10 -30
- package/transport/auth/auth.apikey.js.map +1 -1
- package/transport/auth/auth.basic.js +14 -36
- package/transport/auth/auth.basic.js.map +1 -1
- package/transport/auth/auth.custom.js +10 -30
- package/transport/auth/auth.custom.js.map +1 -1
- package/transport/auth/auth.js +17 -23
- package/transport/auth/auth.js.map +1 -1
- package/transport/auth/auth.method.js +2 -9
- package/transport/auth/auth.method.js.map +1 -1
- package/transport/auth/auth.token.js +10 -30
- package/transport/auth/auth.token.js.map +1 -1
- package/transport/auth/index.js +6 -18
- package/transport/auth/index.js.map +1 -1
- package/transport/client/index.js +3 -15
- package/transport/client/index.js.map +1 -1
- package/transport/client/transport.http.client.js +57 -68
- package/transport/client/transport.http.client.js.map +1 -1
- package/transport/client/transport.hybrid.client.js +53 -89
- package/transport/client/transport.hybrid.client.js.map +1 -1
- package/transport/client/transport.websocket.client.js +104 -124
- package/transport/client/transport.websocket.client.js.map +1 -1
- package/transport/index.js +6 -18
- package/transport/index.js.map +1 -1
- package/transport/server/index.js +5 -17
- package/transport/server/index.js.map +1 -1
- package/transport/server/transport.context.js +5 -11
- package/transport/server/transport.context.js.map +1 -1
- package/transport/server/transport.context.system.js +5 -10
- package/transport/server/transport.context.system.js.map +1 -1
- package/transport/server/transport.server.http.js +52 -86
- package/transport/server/transport.server.http.js.map +1 -1
- package/transport/server/transport.server.js +1 -2
- package/transport/server/transport.server.websocket.js +24 -33
- package/transport/server/transport.server.websocket.js.map +1 -1
- package/transport/transport.js +1 -2
- package/transport/transport.websocket.js +2 -5
- package/transport/transport.websocket.js.map +1 -1
- package/transport/wsclient.js +66 -98
- package/transport/wsclient.js.map +1 -1
- package/void.js +3 -10
- package/void.js.map +1 -1
package/marshaller.js
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var void_1 = require("./void");
|
|
5
|
-
var JSONMarshallerImpl = (function () {
|
|
6
|
-
function JSONMarshallerImpl(pretty) {
|
|
7
|
-
if (pretty === void 0) { pretty = false; }
|
|
1
|
+
import { Void } from './void';
|
|
2
|
+
export class JSONMarshallerImpl {
|
|
3
|
+
constructor(pretty = false) {
|
|
8
4
|
this.pretty = pretty;
|
|
9
5
|
}
|
|
10
|
-
|
|
11
|
-
if (data instanceof
|
|
6
|
+
Marshal(data, toRaw) {
|
|
7
|
+
if (data instanceof Void) {
|
|
12
8
|
return toRaw ? {} : '{}';
|
|
13
9
|
}
|
|
14
|
-
|
|
10
|
+
const serialized = typeof data['serialize'] === 'function' ? data['serialize']() : data;
|
|
15
11
|
if (toRaw) {
|
|
16
12
|
return serialized;
|
|
17
13
|
}
|
|
@@ -21,14 +17,12 @@ var JSONMarshallerImpl = (function () {
|
|
|
21
17
|
else {
|
|
22
18
|
return JSON.stringify(serialized);
|
|
23
19
|
}
|
|
24
|
-
}
|
|
25
|
-
|
|
20
|
+
}
|
|
21
|
+
Unmarshal(data, fromRaw) {
|
|
26
22
|
if (fromRaw) {
|
|
27
23
|
return data;
|
|
28
24
|
}
|
|
29
25
|
return JSON.parse(data);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
}());
|
|
33
|
-
exports.JSONMarshallerImpl = JSONMarshallerImpl;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
34
28
|
//# sourceMappingURL=marshaller.js.map
|
package/marshaller.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marshaller.js","sourceRoot":"","sources":["../irt/marshaller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"marshaller.js","sourceRoot":"","sources":["../irt/marshaller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAU9B,MAAM,OAAO,kBAAkB;IAG3B,YAAmB,SAAkB,KAAK;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAEM,OAAO,CAAI,IAAO,EAAE,KAAe;QACtC,IAAI,IAAI,YAAY,IAAI,EAAE;YACtB,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;SAC5B;QAED,MAAM,UAAU,GAAG,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACxF,IAAI,KAAK,EAAE;YACP,OAAO,UAAU,CAAC;SACrB;QAED,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;SAC9C;aAAM;YACH,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SACrC;IACL,CAAC;IAEM,SAAS,CAAI,IAAwC,EAAE,OAAiB;QAC3E,IAAI,OAAO,EAAE;YAET,OAAO,IAAS,CAAC;SACpB;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,IAAc,CAAC,CAAC;IACtC,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,28 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.AuthApiKey = void 0;
|
|
17
|
-
var auth_method_1 = require("./auth.method");
|
|
18
|
-
var AuthApiKey = (function (_super) {
|
|
19
|
-
__extends(AuthApiKey, _super);
|
|
20
|
-
function AuthApiKey(apiKey) {
|
|
21
|
-
var _this = _super.call(this) || this;
|
|
22
|
-
_this.apiKey = apiKey;
|
|
23
|
-
return _this;
|
|
1
|
+
import { AuthMethod } from './auth.method';
|
|
2
|
+
export class AuthApiKey extends AuthMethod {
|
|
3
|
+
constructor(apiKey) {
|
|
4
|
+
super();
|
|
5
|
+
this.apiKey = apiKey;
|
|
24
6
|
}
|
|
25
|
-
|
|
7
|
+
fromValue(value) {
|
|
26
8
|
if (value.toLowerCase().indexOf('api-key ') === 0) {
|
|
27
9
|
this.apiKey = value.substr(8);
|
|
28
10
|
return undefined;
|
|
@@ -32,11 +14,9 @@ var AuthApiKey = (function (_super) {
|
|
|
32
14
|
return undefined;
|
|
33
15
|
}
|
|
34
16
|
return new Error('api key authorization must start with ApiKey, got ' + value);
|
|
35
|
-
}
|
|
36
|
-
|
|
17
|
+
}
|
|
18
|
+
toValue() {
|
|
37
19
|
return 'Api-Key ' + this.apiKey;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}(auth_method_1.AuthMethod));
|
|
41
|
-
exports.AuthApiKey = AuthApiKey;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
42
22
|
//# sourceMappingURL=auth.apikey.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.apikey.js","sourceRoot":"","sources":["../../../irt/transport/auth/auth.apikey.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.apikey.js","sourceRoot":"","sources":["../../../irt/transport/auth/auth.apikey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,OAAO,UAAW,SAAQ,UAAU;IAEtC,YAAY,MAAc;QACtB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAEM,SAAS,CAAC,KAAa;QAC1B,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;YAC/C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC9B,OAAO,SAAS,CAAC;SACpB;QAED,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAC9C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC9B,OAAO,SAAS,CAAC;SACpB;QAED,OAAO,IAAI,KAAK,CAAC,oDAAoD,GAAG,KAAK,CAAC,CAAA;IAClF,CAAC;IAEM,OAAO;QACV,OAAO,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC;IACpC,CAAC;CACJ"}
|
|
@@ -1,46 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.AuthBasic = void 0;
|
|
17
|
-
var auth_method_1 = require("./auth.method");
|
|
18
|
-
var AuthBasic = (function (_super) {
|
|
19
|
-
__extends(AuthBasic, _super);
|
|
20
|
-
function AuthBasic(user, pass) {
|
|
21
|
-
if (user === void 0) { user = undefined; }
|
|
22
|
-
if (pass === void 0) { pass = undefined; }
|
|
23
|
-
var _this = _super.call(this) || this;
|
|
24
|
-
_this.user = user;
|
|
25
|
-
_this.pass = pass ? btoa(pass) : undefined;
|
|
26
|
-
return _this;
|
|
1
|
+
import { AuthMethod } from './auth.method';
|
|
2
|
+
export class AuthBasic extends AuthMethod {
|
|
3
|
+
constructor(user = undefined, pass = undefined) {
|
|
4
|
+
super();
|
|
5
|
+
this.user = user;
|
|
6
|
+
this.pass = pass ? btoa(pass) : undefined;
|
|
27
7
|
}
|
|
28
|
-
|
|
8
|
+
getPass() {
|
|
29
9
|
return atob(this.pass);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
10
|
+
}
|
|
11
|
+
fromValue(value) {
|
|
12
|
+
const basicPieces = value.split(':');
|
|
33
13
|
if (basicPieces.length !== 2) {
|
|
34
14
|
return new Error('basic authorization update expects "user:pass" format, got ' + value);
|
|
35
15
|
}
|
|
36
16
|
this.user = basicPieces[0];
|
|
37
17
|
this.pass = basicPieces[1];
|
|
38
18
|
return undefined;
|
|
39
|
-
}
|
|
40
|
-
|
|
19
|
+
}
|
|
20
|
+
toValue() {
|
|
41
21
|
return 'Basic ' + this.user + ':' + this.pass;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
}(auth_method_1.AuthMethod));
|
|
45
|
-
exports.AuthBasic = AuthBasic;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
46
24
|
//# sourceMappingURL=auth.basic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.basic.js","sourceRoot":"","sources":["../../../irt/transport/auth/auth.basic.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.basic.js","sourceRoot":"","sources":["../../../irt/transport/auth/auth.basic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,OAAO,SAAU,SAAQ,UAAU;IAIrC,YAAY,OAAe,SAAS,EAAE,OAAe,SAAS;QAC1D,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9C,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAEM,SAAS,CAAC,KAAa;QAC1B,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1B,OAAO,IAAI,KAAK,CAAC,6DAA6D,GAAG,KAAK,CAAC,CAAC;SAC3F;QAED,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3B,OAAO,SAAS,CAAC;IACrB,CAAC;IAEM,OAAO;QACV,OAAO,QAAQ,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC;IAClD,CAAC;CACJ"}
|
|
@@ -1,35 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.AuthCustom = void 0;
|
|
17
|
-
var auth_method_1 = require("./auth.method");
|
|
18
|
-
var AuthCustom = (function (_super) {
|
|
19
|
-
__extends(AuthCustom, _super);
|
|
20
|
-
function AuthCustom(value) {
|
|
21
|
-
var _this = _super.call(this) || this;
|
|
22
|
-
_this.value = value;
|
|
23
|
-
return _this;
|
|
1
|
+
import { AuthMethod } from './auth.method';
|
|
2
|
+
export class AuthCustom extends AuthMethod {
|
|
3
|
+
constructor(value) {
|
|
4
|
+
super();
|
|
5
|
+
this.value = value;
|
|
24
6
|
}
|
|
25
|
-
|
|
7
|
+
fromValue(value) {
|
|
26
8
|
this.value = value;
|
|
27
9
|
return undefined;
|
|
28
|
-
}
|
|
29
|
-
|
|
10
|
+
}
|
|
11
|
+
toValue() {
|
|
30
12
|
return this.value;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
}(auth_method_1.AuthMethod));
|
|
34
|
-
exports.AuthCustom = AuthCustom;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
35
15
|
//# sourceMappingURL=auth.custom.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.custom.js","sourceRoot":"","sources":["../../../irt/transport/auth/auth.custom.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.custom.js","sourceRoot":"","sources":["../../../irt/transport/auth/auth.custom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,OAAO,UAAW,SAAQ,UAAU;IAEtC,YAAY,KAAa;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAEM,SAAS,CAAC,KAAa;QAC1B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,OAAO,SAAS,CAAC;IACrB,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;CACJ"}
|
package/transport/auth/auth.js
CHANGED
|
@@ -1,49 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function Authorization() {
|
|
10
|
-
}
|
|
11
|
-
Authorization.prototype.updateFromValue = function (auth) {
|
|
12
|
-
var pieces = auth.split(' ');
|
|
1
|
+
import { AuthCustom } from './auth.custom';
|
|
2
|
+
import { AuthToken } from './auth.token';
|
|
3
|
+
import { AuthApiKey } from './auth.apikey';
|
|
4
|
+
import { AuthBasic } from './auth.basic';
|
|
5
|
+
export class Authorization {
|
|
6
|
+
constructor() { }
|
|
7
|
+
updateFromValue(auth) {
|
|
8
|
+
const pieces = auth.split(' ');
|
|
13
9
|
if (pieces.length !== 2) {
|
|
14
10
|
if (auth.length > 0) {
|
|
15
|
-
this.method = new
|
|
11
|
+
this.method = new AuthCustom(auth);
|
|
16
12
|
return undefined;
|
|
17
13
|
}
|
|
18
14
|
return new Error('authorization update expects "type value" format, got ' + auth);
|
|
19
15
|
}
|
|
20
16
|
switch (pieces[0].toLowerCase()) {
|
|
21
17
|
case 'bearer':
|
|
22
|
-
this.method = new
|
|
18
|
+
this.method = new AuthToken(pieces[1]);
|
|
23
19
|
break;
|
|
24
20
|
case 'apikey':
|
|
25
21
|
case 'api-key':
|
|
26
|
-
this.method = new
|
|
22
|
+
this.method = new AuthApiKey(pieces[1]);
|
|
27
23
|
break;
|
|
28
24
|
case 'basic':
|
|
29
25
|
{
|
|
30
|
-
|
|
26
|
+
const basic = new AuthBasic();
|
|
31
27
|
basic.fromValue(pieces[1]);
|
|
32
28
|
this.method = basic;
|
|
33
29
|
}
|
|
34
30
|
break;
|
|
35
31
|
default:
|
|
36
|
-
this.method = new
|
|
32
|
+
this.method = new AuthCustom(auth);
|
|
37
33
|
}
|
|
38
34
|
return undefined;
|
|
39
|
-
}
|
|
40
|
-
|
|
35
|
+
}
|
|
36
|
+
toValue() {
|
|
41
37
|
if (!this.method) {
|
|
42
38
|
return '';
|
|
43
39
|
}
|
|
44
40
|
return this.method.toValue();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
}());
|
|
48
|
-
exports.Authorization = Authorization;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
49
43
|
//# sourceMappingURL=auth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../irt/transport/auth/auth.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../irt/transport/auth/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,OAAO,aAAa;IAGtB,gBAAe,CAAC;IAET,eAAe,CAAC,IAAY;QAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACrB,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;gBACjB,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;gBACnC,OAAO,SAAS,CAAC;aACpB;YAED,OAAO,IAAI,KAAK,CAAC,wDAAwD,GAAG,IAAI,CAAC,CAAC;SACrF;QAED,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE;YAC7B,KAAK,QAAQ;gBAAE,IAAI,CAAC,MAAM,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;gBAClD,MAAM;YACV,KAAK,QAAQ,CAAC;YACd,KAAK,SAAS;gBACV,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;gBACxC,MAAM;YACV,KAAK,OAAO;gBAAE;oBACV,MAAM,KAAK,GAAG,IAAI,SAAS,EAAE,CAAC;oBAC9B,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;iBACvB;gBAAC,MAAM;YACR;gBACI,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;SAE1C;QAED,OAAO,SAAS,CAAC;IACrB,CAAC;IAEM,OAAO;QACV,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACd,OAAO,EAAE,CAAC;SACb;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;IAChC,CAAC;CACJ"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.AuthMethod = void 0;
|
|
4
|
-
var AuthMethod = (function () {
|
|
5
|
-
function AuthMethod() {
|
|
6
|
-
}
|
|
7
|
-
return AuthMethod;
|
|
8
|
-
}());
|
|
9
|
-
exports.AuthMethod = AuthMethod;
|
|
1
|
+
export class AuthMethod {
|
|
2
|
+
}
|
|
10
3
|
//# sourceMappingURL=auth.method.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.method.js","sourceRoot":"","sources":["../../../irt/transport/auth/auth.method.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.method.js","sourceRoot":"","sources":["../../../irt/transport/auth/auth.method.ts"],"names":[],"mappings":"AACA,MAAM,OAAgB,UAAU;CAG/B"}
|
|
@@ -1,38 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.AuthToken = void 0;
|
|
17
|
-
var auth_method_1 = require("./auth.method");
|
|
18
|
-
var AuthToken = (function (_super) {
|
|
19
|
-
__extends(AuthToken, _super);
|
|
20
|
-
function AuthToken(token) {
|
|
21
|
-
var _this = _super.call(this) || this;
|
|
22
|
-
_this.token = token;
|
|
23
|
-
return _this;
|
|
1
|
+
import { AuthMethod } from './auth.method';
|
|
2
|
+
export class AuthToken extends AuthMethod {
|
|
3
|
+
constructor(token) {
|
|
4
|
+
super();
|
|
5
|
+
this.token = token;
|
|
24
6
|
}
|
|
25
|
-
|
|
7
|
+
fromValue(value) {
|
|
26
8
|
if (value.indexOf('Bearer ') !== 0) {
|
|
27
9
|
return new Error('token authorization must start with Bearer, got ' + value);
|
|
28
10
|
}
|
|
29
11
|
this.token = value.substr(7);
|
|
30
12
|
return undefined;
|
|
31
|
-
}
|
|
32
|
-
|
|
13
|
+
}
|
|
14
|
+
toValue() {
|
|
33
15
|
return 'Bearer ' + this.token;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
}(auth_method_1.AuthMethod));
|
|
37
|
-
exports.AuthToken = AuthToken;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
38
18
|
//# sourceMappingURL=auth.token.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.token.js","sourceRoot":"","sources":["../../../irt/transport/auth/auth.token.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.token.js","sourceRoot":"","sources":["../../../irt/transport/auth/auth.token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,OAAO,SAAU,SAAQ,UAAU;IAErC,YAAY,KAAa;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAEM,SAAS,CAAC,KAAa;QAC1B,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAChC,OAAO,IAAI,KAAK,CAAC,kDAAkD,GAAG,KAAK,CAAC,CAAA;SAC/E;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC7B,OAAO,SAAS,CAAC;IACrB,CAAC;IAEM,OAAO;QACV,OAAO,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;IAClC,CAAC;CACJ"}
|
package/transport/auth/index.js
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./auth"), exports);
|
|
14
|
-
__exportStar(require("./auth.method"), exports);
|
|
15
|
-
__exportStar(require("./auth.apikey"), exports);
|
|
16
|
-
__exportStar(require("./auth.basic"), exports);
|
|
17
|
-
__exportStar(require("./auth.token"), exports);
|
|
18
|
-
__exportStar(require("./auth.custom"), exports);
|
|
1
|
+
export * from './auth';
|
|
2
|
+
export * from './auth.method';
|
|
3
|
+
export * from './auth.apikey';
|
|
4
|
+
export * from './auth.basic';
|
|
5
|
+
export * from './auth.token';
|
|
6
|
+
export * from './auth.custom';
|
|
19
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../irt/transport/auth/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../irt/transport/auth/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./transport.http.client"), exports);
|
|
14
|
-
__exportStar(require("./transport.websocket.client"), exports);
|
|
15
|
-
__exportStar(require("./transport.hybrid.client"), exports);
|
|
1
|
+
export * from './transport.http.client';
|
|
2
|
+
export * from './transport.websocket.client';
|
|
3
|
+
export * from './transport.hybrid.client';
|
|
16
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../irt/transport/client/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../irt/transport/client/index.ts"],"names":[],"mappings":"AACA,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC"}
|