@blackglory/geyser-js 0.2.3 → 0.2.4
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/es2015/index.min.mjs +3 -3
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +780 -124
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +758 -100
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +4 -4
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +2 -2
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +780 -124
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +758 -100
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +3 -3
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/blacklist-client.js +4 -4
- package/lib/es2015/blacklist-client.js.map +1 -1
- package/lib/es2015/configuration-client.js +7 -7
- package/lib/es2015/configuration-client.js.map +1 -1
- package/lib/es2015/geyser-client.js +3 -3
- package/lib/es2015/geyser-client.js.map +1 -1
- package/lib/es2015/token-client.js +5 -5
- package/lib/es2015/token-client.js.map +1 -1
- package/lib/es2015/token-policy-client.js +5 -5
- package/lib/es2015/token-policy-client.js.map +1 -1
- package/lib/es2015/utils.js +5 -5
- package/lib/es2015/utils.js.map +1 -1
- package/lib/es2015/whitelist-client.js +4 -4
- package/lib/es2015/whitelist-client.js.map +1 -1
- package/lib/es2018/blacklist-client.js +4 -4
- package/lib/es2018/blacklist-client.js.map +1 -1
- package/lib/es2018/configuration-client.js +7 -7
- package/lib/es2018/configuration-client.js.map +1 -1
- package/lib/es2018/geyser-client.js +3 -3
- package/lib/es2018/geyser-client.js.map +1 -1
- package/lib/es2018/token-client.js +5 -5
- package/lib/es2018/token-client.js.map +1 -1
- package/lib/es2018/token-policy-client.js +5 -5
- package/lib/es2018/token-policy-client.js.map +1 -1
- package/lib/es2018/utils.js +5 -5
- package/lib/es2018/utils.js.map +1 -1
- package/lib/es2018/whitelist-client.js +4 -4
- package/lib/es2018/whitelist-client.js.map +1 -1
- package/package.json +7 -9
|
@@ -12,13 +12,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.BlacklistClient = void 0;
|
|
13
13
|
const extra_fetch_1 = require("extra-fetch");
|
|
14
14
|
const extra_request_1 = require("extra-request");
|
|
15
|
-
const
|
|
15
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
16
16
|
const extra_response_1 = require("extra-response");
|
|
17
17
|
const utils_1 = require("./utils");
|
|
18
18
|
class BlacklistClient extends utils_1.GeyserManagerBase {
|
|
19
19
|
getNamespaces(options = {}) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
21
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)('/admin/blacklist'));
|
|
22
22
|
return yield (0, extra_fetch_1.fetch)(req)
|
|
23
23
|
.then(extra_response_1.ok)
|
|
24
24
|
.then(extra_response_1.toJSON);
|
|
@@ -26,13 +26,13 @@ class BlacklistClient extends utils_1.GeyserManagerBase {
|
|
|
26
26
|
}
|
|
27
27
|
add(namespace, options = {}) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0,
|
|
29
|
+
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/blacklist/${namespace}`));
|
|
30
30
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
remove(namespace, options = {}) {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0,
|
|
35
|
+
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/blacklist/${namespace}`));
|
|
36
36
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
37
37
|
});
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blacklist-client.js","sourceRoot":"","sources":["../../src/blacklist-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"blacklist-client.js","sourceRoot":"","sources":["../../src/blacklist-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,kEAA8D;AAC9D,mDAA2C;AAC3C,mCAAyE;AAEzE,MAAa,eAAgB,SAAQ,yBAAiB;IAC9C,aAAa,CAAC,UAAwC,EAAE;;YAC5D,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,kBAAkB,CAAC,CAC7B,CAAA;YAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;iBACpB,IAAI,CAAC,mBAAE,CAAC;iBACR,IAAI,CAAC,uBAAM,CAAa,CAAA;QAC7B,CAAC;KAAA;IAEK,GAAG,CAAC,SAAiB,EAAE,UAAwC,EAAE;;YACrE,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,oBAAoB,SAAS,EAAE,CAAC,CAC1C,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;QAC3B,CAAC;KAAA;IAEK,MAAM,CAAC,SAAiB,EAAE,UAAwC,EAAE;;YACxE,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,oBAAoB,SAAS,EAAE,CAAC,CAC1C,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;QAC3B,CAAC;KAAA;CACF;AA7BD,0CA6BC"}
|
|
@@ -12,13 +12,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ConfigurationClient = void 0;
|
|
13
13
|
const extra_fetch_1 = require("extra-fetch");
|
|
14
14
|
const extra_request_1 = require("extra-request");
|
|
15
|
-
const
|
|
15
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
16
16
|
const extra_response_1 = require("extra-response");
|
|
17
17
|
const utils_1 = require("./utils");
|
|
18
18
|
class ConfigurationClient extends utils_1.GeyserManagerBase {
|
|
19
19
|
getNamespaces(options = {}) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
21
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)('/admin/geyser-with-config'));
|
|
22
22
|
return yield (0, extra_fetch_1.fetch)(req)
|
|
23
23
|
.then(extra_response_1.ok)
|
|
24
24
|
.then(extra_response_1.toJSON);
|
|
@@ -26,7 +26,7 @@ class ConfigurationClient extends utils_1.GeyserManagerBase {
|
|
|
26
26
|
}
|
|
27
27
|
get(namespace, options = {}) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
29
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/config`));
|
|
30
30
|
return yield (0, extra_fetch_1.fetch)(req)
|
|
31
31
|
.then(extra_response_1.ok)
|
|
32
32
|
.then(extra_response_1.toJSON);
|
|
@@ -34,25 +34,25 @@ class ConfigurationClient extends utils_1.GeyserManagerBase {
|
|
|
34
34
|
}
|
|
35
35
|
setDuration(namespace, val, options = {}) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0,
|
|
37
|
+
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/config/duration`), (0, index_js_1.json)(val));
|
|
38
38
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
removeDuration(namespace, options = {}) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0,
|
|
43
|
+
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/config/duration`));
|
|
44
44
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
setLimit(namespace, val, options = {}) {
|
|
48
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0,
|
|
49
|
+
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/config/limit`), (0, index_js_1.json)(val));
|
|
50
50
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
removeLimit(namespace, options = {}) {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0,
|
|
55
|
+
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/config/limit`));
|
|
56
56
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
57
57
|
});
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-client.js","sourceRoot":"","sources":["../../src/configuration-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"configuration-client.js","sourceRoot":"","sources":["../../src/configuration-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,kEAAoE;AACpE,mDAA2C;AAC3C,mCAAyE;AAOzE,MAAa,mBAAoB,SAAQ,yBAAiB;IAClD,aAAa,CAAC,UAAwC,EAAE;;YAC5D,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,2BAA2B,CAAC,CACtC,CAAA;YAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;iBACpB,IAAI,CAAC,mBAAE,CAAC;iBACR,IAAI,CAAC,uBAAM,CAAa,CAAA;QAC7B,CAAC;KAAA;IAEK,GAAG,CACP,SAAiB,EACjB,UAAwC,EAAE;;YAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,SAAS,CAAC,CAC9C,CAAA;YAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;iBACpB,IAAI,CAAC,mBAAE,CAAC;iBACR,IAAI,CAAC,uBAAM,CAAmB,CAAA;QACnC,CAAC;KAAA;IAEK,WAAW,CACf,SAAiB,EACjB,GAAW,EACX,UAAwC,EAAE;;YAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,kBAAkB,CAAC,EACtD,IAAA,eAAI,EAAC,GAAG,CAAC,CACV,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;QAC3B,CAAC;KAAA;IAEK,cAAc,CAClB,SAAiB,EACjB,UAAwC,EAAE;;YAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,kBAAkB,CAAC,CACvD,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;QAC3B,CAAC;KAAA;IAEK,QAAQ,CACZ,SAAiB,EACjB,GAAW,EACX,UAAwC,EAAE;;YAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,eAAe,CAAC,EACnD,IAAA,eAAI,EAAC,GAAG,CAAC,CACV,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;QAC3B,CAAC;KAAA;IAEK,WAAW,CACf,SAAiB,EACjB,UAAwC,EAAE;;YAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,eAAe,CAAC,CACpD,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;QAC3B,CAAC;KAAA;CACF;AA7ED,kDA6EC"}
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.GeyserClient = exports.HTTPClientError = void 0;
|
|
13
13
|
const extra_fetch_1 = require("extra-fetch");
|
|
14
14
|
const extra_request_1 = require("extra-request");
|
|
15
|
-
const
|
|
15
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
16
16
|
const extra_response_1 = require("extra-response");
|
|
17
17
|
const extra_promise_1 = require("extra-promise");
|
|
18
18
|
var http_status_1 = require("@blackglory/http-status");
|
|
@@ -25,10 +25,10 @@ class GeyserClient {
|
|
|
25
25
|
var _a, _b, _c;
|
|
26
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
27
|
const token = (_a = options.token) !== null && _a !== void 0 ? _a : this.options.token;
|
|
28
|
-
const req = (0, extra_request_1.get)((0,
|
|
28
|
+
const req = (0, extra_request_1.get)((0, index_js_1.url)(this.options.server), (0, index_js_1.pathname)(`geyser/${namespace}`), token && (0, index_js_1.searchParams)({ token }), (0, index_js_1.signal)((0, extra_promise_1.raceAbortSignals)([
|
|
29
29
|
options.signal,
|
|
30
30
|
options.timeout !== false && ((_b = (options.timeout && (0, extra_promise_1.timeoutSignal)(options.timeout))) !== null && _b !== void 0 ? _b : (this.options.timeout && (0, extra_promise_1.timeoutSignal)(this.options.timeout)))
|
|
31
|
-
])), (0,
|
|
31
|
+
])), (0, index_js_1.keepalive)((_c = options.keepalive) !== null && _c !== void 0 ? _c : this.options.keepalive));
|
|
32
32
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geyser-client.js","sourceRoot":"","sources":["../../src/geyser-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmC;AACnC,iDAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"geyser-client.js","sourceRoot":"","sources":["../../src/geyser-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmC;AACnC,iDAAmC;AACnC,kEAC4C;AAC5C,mDAAmC;AACnC,iDAA+D;AAE/D,uDAAyD;AAAhD,8GAAA,eAAe,OAAA;AAgBxB,MAAa,YAAY;IACvB,YAAoB,OAA6B;QAA7B,YAAO,GAAP,OAAO,CAAsB;IAAG,CAAC;IAE/C,OAAO,CACX,SAAiB,EACjB,UAAuC,EAAE;;;YAEzC,MAAM,KAAK,GAAG,MAAA,OAAO,CAAC,KAAK,mCAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAA;YAEjD,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,IAAA,cAAG,EAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EACxB,IAAA,mBAAQ,EAAC,UAAU,SAAS,EAAE,CAAC,EAC/B,KAAK,IAAI,IAAA,uBAAY,EAAC,EAAE,KAAK,EAAE,CAAC,EAChC,IAAA,iBAAM,EAAC,IAAA,gCAAgB,EAAC;gBACtB,OAAO,CAAC,MAAM;gBACd,OAAO,CAAC,OAAO,KAAK,KAAK,IAAI,CAC3B,MAAA,CAAC,OAAO,CAAC,OAAO,IAAI,IAAA,6BAAa,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,mCACnD,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,IAAA,6BAAa,EAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAC9D;aACF,CAAC,CAAC,EACH,IAAA,oBAAS,EAAC,MAAA,OAAO,CAAC,SAAS,mCAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CACvD,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;;KAC1B;CACF;AAzBD,oCAyBC"}
|
|
@@ -12,13 +12,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.TokenClient = void 0;
|
|
13
13
|
const extra_fetch_1 = require("extra-fetch");
|
|
14
14
|
const extra_request_1 = require("extra-request");
|
|
15
|
-
const
|
|
15
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
16
16
|
const extra_response_1 = require("extra-response");
|
|
17
17
|
const utils_1 = require("./utils");
|
|
18
18
|
class TokenClient extends utils_1.GeyserManagerBase {
|
|
19
19
|
getNamespaces(options = {}) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
21
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)('/admin/geyser-with-tokens'));
|
|
22
22
|
return yield (0, extra_fetch_1.fetch)(req)
|
|
23
23
|
.then(extra_response_1.ok)
|
|
24
24
|
.then(extra_response_1.toJSON);
|
|
@@ -26,7 +26,7 @@ class TokenClient extends utils_1.GeyserManagerBase {
|
|
|
26
26
|
}
|
|
27
27
|
getTokens(namespace, options = {}) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
29
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/tokens`));
|
|
30
30
|
return yield (0, extra_fetch_1.fetch)(req)
|
|
31
31
|
.then(extra_response_1.ok)
|
|
32
32
|
.then(extra_response_1.toJSON);
|
|
@@ -34,13 +34,13 @@ class TokenClient extends utils_1.GeyserManagerBase {
|
|
|
34
34
|
}
|
|
35
35
|
addAcquireToken(namespace, token, options = {}) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0,
|
|
37
|
+
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/tokens/${token}/acquire`));
|
|
38
38
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
removeAcquireToken(namespace, token, options = {}) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0,
|
|
43
|
+
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/tokens/${token}/acquire`));
|
|
44
44
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-client.js","sourceRoot":"","sources":["../../src/token-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"token-client.js","sourceRoot":"","sources":["../../src/token-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,kEAA8D;AAC9D,mDAA2C;AAC3C,mCAAyE;AAOzE,MAAa,WAAY,SAAQ,yBAAiB;IAC1C,aAAa,CAAC,UAAwC,EAAE;;YAC5D,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,2BAA2B,CAAC,CACtC,CAAA;YAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;iBACpB,IAAI,CAAC,mBAAE,CAAC;iBACR,IAAI,CAAC,uBAAM,CAAa,CAAA;QAC7B,CAAC;KAAA;IAEK,SAAS,CACb,SAAiB,EACjB,UAAwC,EAAE;;YAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,SAAS,CAAC,CAC9C,CAAA;YAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;iBACpB,IAAI,CAAC,mBAAE,CAAC;iBACR,IAAI,CAAC,uBAAM,CAAiB,CAAA;QACjC,CAAC;KAAA;IAEK,eAAe,CACnB,SAAiB,EACjB,KAAa,EACb,UAAwC,EAAE;;YAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,WAAW,KAAK,UAAU,CAAC,CAC/D,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;QAC3B,CAAC;KAAA;IAEK,kBAAkB,CACtB,SAAiB,EACjB,KAAa,EACb,UAAwC,EAAE;;YAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,WAAW,KAAK,UAAU,CAAC,CAC/D,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;QAC3B,CAAC;KAAA;CACF;AAnDD,kCAmDC"}
|
|
@@ -12,13 +12,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.TokenPolicyClient = void 0;
|
|
13
13
|
const extra_fetch_1 = require("extra-fetch");
|
|
14
14
|
const extra_request_1 = require("extra-request");
|
|
15
|
-
const
|
|
15
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
16
16
|
const extra_response_1 = require("extra-response");
|
|
17
17
|
const utils_1 = require("./utils");
|
|
18
18
|
class TokenPolicyClient extends utils_1.GeyserManagerBase {
|
|
19
19
|
getNamespaces(options = {}) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
21
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)('/admin/geyser-with-token-policies'));
|
|
22
22
|
return yield (0, extra_fetch_1.fetch)(req)
|
|
23
23
|
.then(extra_response_1.ok)
|
|
24
24
|
.then(extra_response_1.toJSON);
|
|
@@ -26,7 +26,7 @@ class TokenPolicyClient extends utils_1.GeyserManagerBase {
|
|
|
26
26
|
}
|
|
27
27
|
get(namespace, options = {}) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
29
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/token-policies`));
|
|
30
30
|
return yield (0, extra_fetch_1.fetch)(req)
|
|
31
31
|
.then(extra_response_1.ok)
|
|
32
32
|
.then(extra_response_1.toJSON);
|
|
@@ -34,13 +34,13 @@ class TokenPolicyClient extends utils_1.GeyserManagerBase {
|
|
|
34
34
|
}
|
|
35
35
|
setAcquireTokenRequired(namespace, val, options = {}) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0,
|
|
37
|
+
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/token-policies/acquire-token-required`), (0, index_js_1.json)(val));
|
|
38
38
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
removeAcquireTokenRequired(namespace, options = {}) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0,
|
|
43
|
+
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/token-policies/acquire-token-required`));
|
|
44
44
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-policy-client.js","sourceRoot":"","sources":["../../src/token-policy-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"token-policy-client.js","sourceRoot":"","sources":["../../src/token-policy-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,kEAAoE;AACpE,mDAA2C;AAC3C,mCAAyE;AAMzE,MAAa,iBAAkB,SAAQ,yBAAiB;IAChD,aAAa,CAAC,UAAwC,EAAE;;YAC5D,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,mCAAmC,CAAC,CAC9C,CAAA;YAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;iBACpB,IAAI,CAAC,mBAAE,CAAC;iBACR,IAAI,CAAC,uBAAM,CAAa,CAAA;QAC7B,CAAC;KAAA;IAEK,GAAG,CACP,SAAiB,EACjB,UAAwC,EAAE;;YAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,iBAAiB,CAAC,CACtD,CAAA;YAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;iBACpB,IAAI,CAAC,mBAAE,CAAC;iBACR,IAAI,CAAC,uBAAM,CAAiB,CAAA;QACjC,CAAC;KAAA;IAEK,uBAAuB,CAC3B,SAAiB,EACjB,GAAY,EACZ,UAAwC,EAAE;;YAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,wCAAwC,CAAC,EAC5E,IAAA,eAAI,EAAC,GAAG,CAAC,CACV,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;QAC3B,CAAC;KAAA;IAEK,0BAA0B,CAC9B,SAAiB,EACjB,UAAwC,EAAE;;YAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,wCAAwC,CAAC,CAC7E,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;QAC3B,CAAC;KAAA;CACF;AAnDD,8CAmDC"}
|
package/lib/es2015/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GeyserManagerBase = void 0;
|
|
4
|
-
const
|
|
4
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
5
5
|
const extra_promise_1 = require("extra-promise");
|
|
6
6
|
class GeyserManagerBase {
|
|
7
7
|
constructor(options) {
|
|
@@ -10,13 +10,13 @@ class GeyserManagerBase {
|
|
|
10
10
|
getCommonTransformers(options) {
|
|
11
11
|
var _a, _b;
|
|
12
12
|
return [
|
|
13
|
-
(0,
|
|
14
|
-
(0,
|
|
15
|
-
(0,
|
|
13
|
+
(0, index_js_1.url)(this.options.server),
|
|
14
|
+
(0, index_js_1.bearerAuth)(this.options.adminPassword),
|
|
15
|
+
(0, index_js_1.signal)((0, extra_promise_1.raceAbortSignals)([
|
|
16
16
|
options.signal,
|
|
17
17
|
options.timeout !== false && ((_a = (options.timeout && (0, extra_promise_1.timeoutSignal)(options.timeout))) !== null && _a !== void 0 ? _a : (this.options.timeout && (0, extra_promise_1.timeoutSignal)(this.options.timeout)))
|
|
18
18
|
])),
|
|
19
|
-
(0,
|
|
19
|
+
(0, index_js_1.keepalive)((_b = options.keepalive) !== null && _b !== void 0 ? _b : this.options.keepalive)
|
|
20
20
|
];
|
|
21
21
|
}
|
|
22
22
|
}
|
package/lib/es2015/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AACA,kEAAwF;AACxF,iDAA+D;AAS/D,MAAa,iBAAiB;IAC5B,YAAoB,OAA8B;QAA9B,YAAO,GAAP,OAAO,CAAuB;IAAG,CAAC;IAE5C,qBAAqB,CAC7B,OAAqC;;QAErC,OAAO;YACL,IAAA,cAAG,EAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;YACxB,IAAA,qBAAU,EAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;YACtC,IAAA,iBAAM,EAAC,IAAA,gCAAgB,EAAC;gBACtB,OAAO,CAAC,MAAM;gBACd,OAAO,CAAC,OAAO,KAAK,KAAK,IAAI,CAC3B,MAAA,CAAC,OAAO,CAAC,OAAO,IAAI,IAAA,6BAAa,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,mCACnD,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,IAAA,6BAAa,EAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAC9D;aACF,CAAC,CAAC;YACH,IAAA,oBAAS,EAAC,MAAA,OAAO,CAAC,SAAS,mCAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;SACvD,CAAA;IACH,CAAC;CACF;AAnBD,8CAmBC"}
|
|
@@ -12,13 +12,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.WhitelistClient = void 0;
|
|
13
13
|
const extra_fetch_1 = require("extra-fetch");
|
|
14
14
|
const extra_request_1 = require("extra-request");
|
|
15
|
-
const
|
|
15
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
16
16
|
const extra_response_1 = require("extra-response");
|
|
17
17
|
const utils_1 = require("./utils");
|
|
18
18
|
class WhitelistClient extends utils_1.GeyserManagerBase {
|
|
19
19
|
getNamespaces(options = {}) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
21
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)('/admin/whitelist'));
|
|
22
22
|
return yield (0, extra_fetch_1.fetch)(req)
|
|
23
23
|
.then(extra_response_1.ok)
|
|
24
24
|
.then(extra_response_1.toJSON);
|
|
@@ -26,13 +26,13 @@ class WhitelistClient extends utils_1.GeyserManagerBase {
|
|
|
26
26
|
}
|
|
27
27
|
add(namespace, options = {}) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0,
|
|
29
|
+
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/whitelist/${namespace}`));
|
|
30
30
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
remove(namespace, options = {}) {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0,
|
|
35
|
+
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/whitelist/${namespace}`));
|
|
36
36
|
yield (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
37
37
|
});
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whitelist-client.js","sourceRoot":"","sources":["../../src/whitelist-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"whitelist-client.js","sourceRoot":"","sources":["../../src/whitelist-client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,kEAA8D;AAC9D,mDAA2C;AAC3C,mCAAyE;AAEzE,MAAa,eAAgB,SAAQ,yBAAiB;IAC9C,aAAa,CAAC,UAAwC,EAAE;;YAC5D,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,kBAAkB,CAAC,CAC7B,CAAA;YAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;iBACpB,IAAI,CAAC,mBAAE,CAAC;iBACR,IAAI,CAAC,uBAAM,CAAa,CAAA;QAC7B,CAAC;KAAA;IAEK,GAAG,CAAC,SAAiB,EAAE,UAAwC,EAAE;;YACrE,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,oBAAoB,SAAS,EAAE,CAAC,CAC1C,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;QAC3B,CAAC;KAAA;IAEK,MAAM,CAAC,SAAiB,EAAE,UAAwC,EAAE;;YACxE,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,oBAAoB,SAAS,EAAE,CAAC,CAC1C,CAAA;YAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;QAC3B,CAAC;KAAA;CACF;AA7BD,0CA6BC"}
|
|
@@ -3,22 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BlacklistClient = void 0;
|
|
4
4
|
const extra_fetch_1 = require("extra-fetch");
|
|
5
5
|
const extra_request_1 = require("extra-request");
|
|
6
|
-
const
|
|
6
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
7
7
|
const extra_response_1 = require("extra-response");
|
|
8
8
|
const utils_1 = require("./utils");
|
|
9
9
|
class BlacklistClient extends utils_1.GeyserManagerBase {
|
|
10
10
|
async getNamespaces(options = {}) {
|
|
11
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
11
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)('/admin/blacklist'));
|
|
12
12
|
return await (0, extra_fetch_1.fetch)(req)
|
|
13
13
|
.then(extra_response_1.ok)
|
|
14
14
|
.then(extra_response_1.toJSON);
|
|
15
15
|
}
|
|
16
16
|
async add(namespace, options = {}) {
|
|
17
|
-
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0,
|
|
17
|
+
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/blacklist/${namespace}`));
|
|
18
18
|
await (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
19
19
|
}
|
|
20
20
|
async remove(namespace, options = {}) {
|
|
21
|
-
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0,
|
|
21
|
+
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/blacklist/${namespace}`));
|
|
22
22
|
await (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blacklist-client.js","sourceRoot":"","sources":["../../src/blacklist-client.ts"],"names":[],"mappings":";;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"blacklist-client.js","sourceRoot":"","sources":["../../src/blacklist-client.ts"],"names":[],"mappings":";;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,kEAA8D;AAC9D,mDAA2C;AAC3C,mCAAyE;AAEzE,MAAa,eAAgB,SAAQ,yBAAiB;IACpD,KAAK,CAAC,aAAa,CAAC,UAAwC,EAAE;QAC5D,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,kBAAkB,CAAC,CAC7B,CAAA;QAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;aACpB,IAAI,CAAC,mBAAE,CAAC;aACR,IAAI,CAAC,uBAAM,CAAa,CAAA;IAC7B,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,SAAiB,EAAE,UAAwC,EAAE;QACrE,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,oBAAoB,SAAS,EAAE,CAAC,CAC1C,CAAA;QAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;IAC3B,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,SAAiB,EAAE,UAAwC,EAAE;QACxE,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,oBAAoB,SAAS,EAAE,CAAC,CAC1C,CAAA;QAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;IAC3B,CAAC;CACF;AA7BD,0CA6BC"}
|
|
@@ -3,36 +3,36 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ConfigurationClient = void 0;
|
|
4
4
|
const extra_fetch_1 = require("extra-fetch");
|
|
5
5
|
const extra_request_1 = require("extra-request");
|
|
6
|
-
const
|
|
6
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
7
7
|
const extra_response_1 = require("extra-response");
|
|
8
8
|
const utils_1 = require("./utils");
|
|
9
9
|
class ConfigurationClient extends utils_1.GeyserManagerBase {
|
|
10
10
|
async getNamespaces(options = {}) {
|
|
11
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
11
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)('/admin/geyser-with-config'));
|
|
12
12
|
return await (0, extra_fetch_1.fetch)(req)
|
|
13
13
|
.then(extra_response_1.ok)
|
|
14
14
|
.then(extra_response_1.toJSON);
|
|
15
15
|
}
|
|
16
16
|
async get(namespace, options = {}) {
|
|
17
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
17
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/config`));
|
|
18
18
|
return await (0, extra_fetch_1.fetch)(req)
|
|
19
19
|
.then(extra_response_1.ok)
|
|
20
20
|
.then(extra_response_1.toJSON);
|
|
21
21
|
}
|
|
22
22
|
async setDuration(namespace, val, options = {}) {
|
|
23
|
-
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0,
|
|
23
|
+
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/config/duration`), (0, index_js_1.json)(val));
|
|
24
24
|
await (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
25
25
|
}
|
|
26
26
|
async removeDuration(namespace, options = {}) {
|
|
27
|
-
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0,
|
|
27
|
+
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/config/duration`));
|
|
28
28
|
await (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
29
29
|
}
|
|
30
30
|
async setLimit(namespace, val, options = {}) {
|
|
31
|
-
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0,
|
|
31
|
+
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/config/limit`), (0, index_js_1.json)(val));
|
|
32
32
|
await (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
33
33
|
}
|
|
34
34
|
async removeLimit(namespace, options = {}) {
|
|
35
|
-
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0,
|
|
35
|
+
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/config/limit`));
|
|
36
36
|
await (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-client.js","sourceRoot":"","sources":["../../src/configuration-client.ts"],"names":[],"mappings":";;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"configuration-client.js","sourceRoot":"","sources":["../../src/configuration-client.ts"],"names":[],"mappings":";;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,kEAAoE;AACpE,mDAA2C;AAC3C,mCAAyE;AAOzE,MAAa,mBAAoB,SAAQ,yBAAiB;IACxD,KAAK,CAAC,aAAa,CAAC,UAAwC,EAAE;QAC5D,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,2BAA2B,CAAC,CACtC,CAAA;QAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;aACpB,IAAI,CAAC,mBAAE,CAAC;aACR,IAAI,CAAC,uBAAM,CAAa,CAAA;IAC7B,CAAC;IAED,KAAK,CAAC,GAAG,CACP,SAAiB,EACjB,UAAwC,EAAE;QAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,SAAS,CAAC,CAC9C,CAAA;QAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;aACpB,IAAI,CAAC,mBAAE,CAAC;aACR,IAAI,CAAC,uBAAM,CAAmB,CAAA;IACnC,CAAC;IAED,KAAK,CAAC,WAAW,CACf,SAAiB,EACjB,GAAW,EACX,UAAwC,EAAE;QAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,kBAAkB,CAAC,EACtD,IAAA,eAAI,EAAC,GAAG,CAAC,CACV,CAAA;QAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;IAC3B,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,SAAiB,EACjB,UAAwC,EAAE;QAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,kBAAkB,CAAC,CACvD,CAAA;QAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;IAC3B,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,SAAiB,EACjB,GAAW,EACX,UAAwC,EAAE;QAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,eAAe,CAAC,EACnD,IAAA,eAAI,EAAC,GAAG,CAAC,CACV,CAAA;QAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;IAC3B,CAAC;IAED,KAAK,CAAC,WAAW,CACf,SAAiB,EACjB,UAAwC,EAAE;QAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,eAAe,CAAC,CACpD,CAAA;QAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;IAC3B,CAAC;CACF;AA7ED,kDA6EC"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GeyserClient = exports.HTTPClientError = void 0;
|
|
4
4
|
const extra_fetch_1 = require("extra-fetch");
|
|
5
5
|
const extra_request_1 = require("extra-request");
|
|
6
|
-
const
|
|
6
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
7
7
|
const extra_response_1 = require("extra-response");
|
|
8
8
|
const extra_promise_1 = require("extra-promise");
|
|
9
9
|
var http_status_1 = require("@blackglory/http-status");
|
|
@@ -15,10 +15,10 @@ class GeyserClient {
|
|
|
15
15
|
async acquire(namespace, options = {}) {
|
|
16
16
|
var _a, _b, _c;
|
|
17
17
|
const token = (_a = options.token) !== null && _a !== void 0 ? _a : this.options.token;
|
|
18
|
-
const req = (0, extra_request_1.get)((0,
|
|
18
|
+
const req = (0, extra_request_1.get)((0, index_js_1.url)(this.options.server), (0, index_js_1.pathname)(`geyser/${namespace}`), token && (0, index_js_1.searchParams)({ token }), (0, index_js_1.signal)((0, extra_promise_1.raceAbortSignals)([
|
|
19
19
|
options.signal,
|
|
20
20
|
options.timeout !== false && ((_b = (options.timeout && (0, extra_promise_1.timeoutSignal)(options.timeout))) !== null && _b !== void 0 ? _b : (this.options.timeout && (0, extra_promise_1.timeoutSignal)(this.options.timeout)))
|
|
21
|
-
])), (0,
|
|
21
|
+
])), (0, index_js_1.keepalive)((_c = options.keepalive) !== null && _c !== void 0 ? _c : this.options.keepalive));
|
|
22
22
|
await (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geyser-client.js","sourceRoot":"","sources":["../../src/geyser-client.ts"],"names":[],"mappings":";;;AAAA,6CAAmC;AACnC,iDAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"geyser-client.js","sourceRoot":"","sources":["../../src/geyser-client.ts"],"names":[],"mappings":";;;AAAA,6CAAmC;AACnC,iDAAmC;AACnC,kEAC4C;AAC5C,mDAAmC;AACnC,iDAA+D;AAE/D,uDAAyD;AAAhD,8GAAA,eAAe,OAAA;AAgBxB,MAAa,YAAY;IACvB,YAAoB,OAA6B;QAA7B,YAAO,GAAP,OAAO,CAAsB;IAAG,CAAC;IAErD,KAAK,CAAC,OAAO,CACX,SAAiB,EACjB,UAAuC,EAAE;;QAEzC,MAAM,KAAK,GAAG,MAAA,OAAO,CAAC,KAAK,mCAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAA;QAEjD,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,IAAA,cAAG,EAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EACxB,IAAA,mBAAQ,EAAC,UAAU,SAAS,EAAE,CAAC,EAC/B,KAAK,IAAI,IAAA,uBAAY,EAAC,EAAE,KAAK,EAAE,CAAC,EAChC,IAAA,iBAAM,EAAC,IAAA,gCAAgB,EAAC;YACtB,OAAO,CAAC,MAAM;YACd,OAAO,CAAC,OAAO,KAAK,KAAK,IAAI,CAC3B,MAAA,CAAC,OAAO,CAAC,OAAO,IAAI,IAAA,6BAAa,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,mCACnD,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,IAAA,6BAAa,EAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAC9D;SACF,CAAC,CAAC,EACH,IAAA,oBAAS,EAAC,MAAA,OAAO,CAAC,SAAS,mCAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CACvD,CAAA;QAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;IAC3B,CAAC;CACF;AAzBD,oCAyBC"}
|
|
@@ -3,28 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TokenClient = void 0;
|
|
4
4
|
const extra_fetch_1 = require("extra-fetch");
|
|
5
5
|
const extra_request_1 = require("extra-request");
|
|
6
|
-
const
|
|
6
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
7
7
|
const extra_response_1 = require("extra-response");
|
|
8
8
|
const utils_1 = require("./utils");
|
|
9
9
|
class TokenClient extends utils_1.GeyserManagerBase {
|
|
10
10
|
async getNamespaces(options = {}) {
|
|
11
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
11
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)('/admin/geyser-with-tokens'));
|
|
12
12
|
return await (0, extra_fetch_1.fetch)(req)
|
|
13
13
|
.then(extra_response_1.ok)
|
|
14
14
|
.then(extra_response_1.toJSON);
|
|
15
15
|
}
|
|
16
16
|
async getTokens(namespace, options = {}) {
|
|
17
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
17
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/tokens`));
|
|
18
18
|
return await (0, extra_fetch_1.fetch)(req)
|
|
19
19
|
.then(extra_response_1.ok)
|
|
20
20
|
.then(extra_response_1.toJSON);
|
|
21
21
|
}
|
|
22
22
|
async addAcquireToken(namespace, token, options = {}) {
|
|
23
|
-
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0,
|
|
23
|
+
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/tokens/${token}/acquire`));
|
|
24
24
|
await (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
25
25
|
}
|
|
26
26
|
async removeAcquireToken(namespace, token, options = {}) {
|
|
27
|
-
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0,
|
|
27
|
+
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/tokens/${token}/acquire`));
|
|
28
28
|
await (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-client.js","sourceRoot":"","sources":["../../src/token-client.ts"],"names":[],"mappings":";;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"token-client.js","sourceRoot":"","sources":["../../src/token-client.ts"],"names":[],"mappings":";;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,kEAA8D;AAC9D,mDAA2C;AAC3C,mCAAyE;AAOzE,MAAa,WAAY,SAAQ,yBAAiB;IAChD,KAAK,CAAC,aAAa,CAAC,UAAwC,EAAE;QAC5D,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,2BAA2B,CAAC,CACtC,CAAA;QAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;aACpB,IAAI,CAAC,mBAAE,CAAC;aACR,IAAI,CAAC,uBAAM,CAAa,CAAA;IAC7B,CAAC;IAED,KAAK,CAAC,SAAS,CACb,SAAiB,EACjB,UAAwC,EAAE;QAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,SAAS,CAAC,CAC9C,CAAA;QAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;aACpB,IAAI,CAAC,mBAAE,CAAC;aACR,IAAI,CAAC,uBAAM,CAAiB,CAAA;IACjC,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,SAAiB,EACjB,KAAa,EACb,UAAwC,EAAE;QAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,WAAW,KAAK,UAAU,CAAC,CAC/D,CAAA;QAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;IAC3B,CAAC;IAED,KAAK,CAAC,kBAAkB,CACtB,SAAiB,EACjB,KAAa,EACb,UAAwC,EAAE;QAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,WAAW,KAAK,UAAU,CAAC,CAC/D,CAAA;QAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;IAC3B,CAAC;CACF;AAnDD,kCAmDC"}
|
|
@@ -3,28 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TokenPolicyClient = void 0;
|
|
4
4
|
const extra_fetch_1 = require("extra-fetch");
|
|
5
5
|
const extra_request_1 = require("extra-request");
|
|
6
|
-
const
|
|
6
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
7
7
|
const extra_response_1 = require("extra-response");
|
|
8
8
|
const utils_1 = require("./utils");
|
|
9
9
|
class TokenPolicyClient extends utils_1.GeyserManagerBase {
|
|
10
10
|
async getNamespaces(options = {}) {
|
|
11
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
11
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)('/admin/geyser-with-token-policies'));
|
|
12
12
|
return await (0, extra_fetch_1.fetch)(req)
|
|
13
13
|
.then(extra_response_1.ok)
|
|
14
14
|
.then(extra_response_1.toJSON);
|
|
15
15
|
}
|
|
16
16
|
async get(namespace, options = {}) {
|
|
17
|
-
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0,
|
|
17
|
+
const req = (0, extra_request_1.get)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/token-policies`));
|
|
18
18
|
return await (0, extra_fetch_1.fetch)(req)
|
|
19
19
|
.then(extra_response_1.ok)
|
|
20
20
|
.then(extra_response_1.toJSON);
|
|
21
21
|
}
|
|
22
22
|
async setAcquireTokenRequired(namespace, val, options = {}) {
|
|
23
|
-
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0,
|
|
23
|
+
const req = (0, extra_request_1.put)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/token-policies/acquire-token-required`), (0, index_js_1.json)(val));
|
|
24
24
|
await (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
25
25
|
}
|
|
26
26
|
async removeAcquireTokenRequired(namespace, options = {}) {
|
|
27
|
-
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0,
|
|
27
|
+
const req = (0, extra_request_1.del)(...this.getCommonTransformers(options), (0, index_js_1.pathname)(`/admin/geyser/${namespace}/token-policies/acquire-token-required`));
|
|
28
28
|
await (0, extra_fetch_1.fetch)(req).then(extra_response_1.ok);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-policy-client.js","sourceRoot":"","sources":["../../src/token-policy-client.ts"],"names":[],"mappings":";;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"token-policy-client.js","sourceRoot":"","sources":["../../src/token-policy-client.ts"],"names":[],"mappings":";;;AAAA,6CAAmC;AACnC,iDAA6C;AAC7C,kEAAoE;AACpE,mDAA2C;AAC3C,mCAAyE;AAMzE,MAAa,iBAAkB,SAAQ,yBAAiB;IACtD,KAAK,CAAC,aAAa,CAAC,UAAwC,EAAE;QAC5D,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,mCAAmC,CAAC,CAC9C,CAAA;QAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;aACpB,IAAI,CAAC,mBAAE,CAAC;aACR,IAAI,CAAC,uBAAM,CAAa,CAAA;IAC7B,CAAC;IAED,KAAK,CAAC,GAAG,CACP,SAAiB,EACjB,UAAwC,EAAE;QAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,iBAAiB,CAAC,CACtD,CAAA;QAED,OAAO,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC;aACpB,IAAI,CAAC,mBAAE,CAAC;aACR,IAAI,CAAC,uBAAM,CAAiB,CAAA;IACjC,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,SAAiB,EACjB,GAAY,EACZ,UAAwC,EAAE;QAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,wCAAwC,CAAC,EAC5E,IAAA,eAAI,EAAC,GAAG,CAAC,CACV,CAAA;QAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;IAC3B,CAAC;IAED,KAAK,CAAC,0BAA0B,CAC9B,SAAiB,EACjB,UAAwC,EAAE;QAE1C,MAAM,GAAG,GAAG,IAAA,mBAAG,EACb,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACtC,IAAA,mBAAQ,EAAC,iBAAiB,SAAS,wCAAwC,CAAC,CAC7E,CAAA;QAED,MAAM,IAAA,mBAAK,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,mBAAE,CAAC,CAAA;IAC3B,CAAC;CACF;AAnDD,8CAmDC"}
|
package/lib/es2018/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GeyserManagerBase = void 0;
|
|
4
|
-
const
|
|
4
|
+
const index_js_1 = require("extra-request/transformers/index.js");
|
|
5
5
|
const extra_promise_1 = require("extra-promise");
|
|
6
6
|
class GeyserManagerBase {
|
|
7
7
|
constructor(options) {
|
|
@@ -10,13 +10,13 @@ class GeyserManagerBase {
|
|
|
10
10
|
getCommonTransformers(options) {
|
|
11
11
|
var _a, _b;
|
|
12
12
|
return [
|
|
13
|
-
(0,
|
|
14
|
-
(0,
|
|
15
|
-
(0,
|
|
13
|
+
(0, index_js_1.url)(this.options.server),
|
|
14
|
+
(0, index_js_1.bearerAuth)(this.options.adminPassword),
|
|
15
|
+
(0, index_js_1.signal)((0, extra_promise_1.raceAbortSignals)([
|
|
16
16
|
options.signal,
|
|
17
17
|
options.timeout !== false && ((_a = (options.timeout && (0, extra_promise_1.timeoutSignal)(options.timeout))) !== null && _a !== void 0 ? _a : (this.options.timeout && (0, extra_promise_1.timeoutSignal)(this.options.timeout)))
|
|
18
18
|
])),
|
|
19
|
-
(0,
|
|
19
|
+
(0, index_js_1.keepalive)((_b = options.keepalive) !== null && _b !== void 0 ? _b : this.options.keepalive)
|
|
20
20
|
];
|
|
21
21
|
}
|
|
22
22
|
}
|
package/lib/es2018/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AACA,kEAAwF;AACxF,iDAA+D;AAS/D,MAAa,iBAAiB;IAC5B,YAAoB,OAA8B;QAA9B,YAAO,GAAP,OAAO,CAAuB;IAAG,CAAC;IAE5C,qBAAqB,CAC7B,OAAqC;;QAErC,OAAO;YACL,IAAA,cAAG,EAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;YACxB,IAAA,qBAAU,EAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;YACtC,IAAA,iBAAM,EAAC,IAAA,gCAAgB,EAAC;gBACtB,OAAO,CAAC,MAAM;gBACd,OAAO,CAAC,OAAO,KAAK,KAAK,IAAI,CAC3B,MAAA,CAAC,OAAO,CAAC,OAAO,IAAI,IAAA,6BAAa,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,mCACnD,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,IAAA,6BAAa,EAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAC9D;aACF,CAAC,CAAC;YACH,IAAA,oBAAS,EAAC,MAAA,OAAO,CAAC,SAAS,mCAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;SACvD,CAAA;IACH,CAAC;CACF;AAnBD,8CAmBC"}
|