@smplkit/sdk 1.3.13 → 1.3.15
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/index.cjs +0 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -404,8 +404,6 @@ var ConfigClient = class {
|
|
|
404
404
|
/** @internal — set by SmplClient after construction. */
|
|
405
405
|
_parent = null;
|
|
406
406
|
_configCache = {};
|
|
407
|
-
/* v8 ignore next — bookkeeping for future use */
|
|
408
|
-
_configStore = [];
|
|
409
407
|
_initialized = false;
|
|
410
408
|
_listeners = [];
|
|
411
409
|
/** @internal */
|
|
@@ -632,7 +630,6 @@ var ConfigClient = class {
|
|
|
632
630
|
throw new SmplError("No environment set.");
|
|
633
631
|
}
|
|
634
632
|
const configs = await this.list();
|
|
635
|
-
this._configStore = configs;
|
|
636
633
|
const newCache = {};
|
|
637
634
|
for (const cfg of configs) {
|
|
638
635
|
const chain = await cfg._buildChain();
|
|
@@ -653,7 +650,6 @@ var ConfigClient = class {
|
|
|
653
650
|
throw new SmplError("No environment set. Ensure SmplClient is configured.");
|
|
654
651
|
}
|
|
655
652
|
const configs = await this.list();
|
|
656
|
-
this._configStore = configs;
|
|
657
653
|
const cache = {};
|
|
658
654
|
for (const cfg of configs) {
|
|
659
655
|
const chain = await cfg._buildChain();
|
|
@@ -670,7 +666,6 @@ var ConfigClient = class {
|
|
|
670
666
|
async _connectInternal(environment) {
|
|
671
667
|
if (this._initialized) return;
|
|
672
668
|
const configs = await this.list();
|
|
673
|
-
this._configStore = configs;
|
|
674
669
|
const cache = {};
|
|
675
670
|
for (const cfg of configs) {
|
|
676
671
|
const chain = await cfg._buildChain();
|
|
@@ -856,7 +851,6 @@ var Flag = class {
|
|
|
856
851
|
*
|
|
857
852
|
* Requires `initialize()` to have been called.
|
|
858
853
|
*/
|
|
859
|
-
/* v8 ignore next 3 — overridden by all exported subclasses */
|
|
860
854
|
get(options) {
|
|
861
855
|
return this._client._evaluateHandle(this.key, this.default, options?.context ?? null);
|
|
862
856
|
}
|
|
@@ -2490,26 +2484,11 @@ var SmplClient = class {
|
|
|
2490
2484
|
const apiKey = resolveApiKey(options.apiKey, environment);
|
|
2491
2485
|
this._apiKey = apiKey;
|
|
2492
2486
|
this._timeout = options.timeout ?? 3e4;
|
|
2493
|
-
const ms = this._timeout;
|
|
2494
2487
|
this._appHttp = createClient4({
|
|
2495
2488
|
baseUrl: APP_BASE_URL2,
|
|
2496
2489
|
headers: {
|
|
2497
2490
|
Authorization: `Bearer ${apiKey}`,
|
|
2498
2491
|
Accept: "application/json"
|
|
2499
|
-
},
|
|
2500
|
-
fetch: async (request) => {
|
|
2501
|
-
const controller = new AbortController();
|
|
2502
|
-
const timer = setTimeout(() => controller.abort(), ms);
|
|
2503
|
-
try {
|
|
2504
|
-
return await fetch(new Request(request, { signal: controller.signal }));
|
|
2505
|
-
} catch (err) {
|
|
2506
|
-
if (err instanceof DOMException && err.name === "AbortError") {
|
|
2507
|
-
throw new SmplTimeoutError(`Request timed out after ${ms}ms`);
|
|
2508
|
-
}
|
|
2509
|
-
throw err;
|
|
2510
|
-
} finally {
|
|
2511
|
-
clearTimeout(timer);
|
|
2512
|
-
}
|
|
2513
2492
|
}
|
|
2514
2493
|
});
|
|
2515
2494
|
this.config = new ConfigClient(apiKey, this._timeout);
|