@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.cjs
CHANGED
|
@@ -464,8 +464,6 @@ var ConfigClient = class {
|
|
|
464
464
|
/** @internal — set by SmplClient after construction. */
|
|
465
465
|
_parent = null;
|
|
466
466
|
_configCache = {};
|
|
467
|
-
/* v8 ignore next — bookkeeping for future use */
|
|
468
|
-
_configStore = [];
|
|
469
467
|
_initialized = false;
|
|
470
468
|
_listeners = [];
|
|
471
469
|
/** @internal */
|
|
@@ -692,7 +690,6 @@ var ConfigClient = class {
|
|
|
692
690
|
throw new SmplError("No environment set.");
|
|
693
691
|
}
|
|
694
692
|
const configs = await this.list();
|
|
695
|
-
this._configStore = configs;
|
|
696
693
|
const newCache = {};
|
|
697
694
|
for (const cfg of configs) {
|
|
698
695
|
const chain = await cfg._buildChain();
|
|
@@ -713,7 +710,6 @@ var ConfigClient = class {
|
|
|
713
710
|
throw new SmplError("No environment set. Ensure SmplClient is configured.");
|
|
714
711
|
}
|
|
715
712
|
const configs = await this.list();
|
|
716
|
-
this._configStore = configs;
|
|
717
713
|
const cache = {};
|
|
718
714
|
for (const cfg of configs) {
|
|
719
715
|
const chain = await cfg._buildChain();
|
|
@@ -730,7 +726,6 @@ var ConfigClient = class {
|
|
|
730
726
|
async _connectInternal(environment) {
|
|
731
727
|
if (this._initialized) return;
|
|
732
728
|
const configs = await this.list();
|
|
733
|
-
this._configStore = configs;
|
|
734
729
|
const cache = {};
|
|
735
730
|
for (const cfg of configs) {
|
|
736
731
|
const chain = await cfg._buildChain();
|
|
@@ -916,7 +911,6 @@ var Flag = class {
|
|
|
916
911
|
*
|
|
917
912
|
* Requires `initialize()` to have been called.
|
|
918
913
|
*/
|
|
919
|
-
/* v8 ignore next 3 — overridden by all exported subclasses */
|
|
920
914
|
get(options) {
|
|
921
915
|
return this._client._evaluateHandle(this.key, this.default, options?.context ?? null);
|
|
922
916
|
}
|
|
@@ -2550,26 +2544,11 @@ var SmplClient = class {
|
|
|
2550
2544
|
const apiKey = resolveApiKey(options.apiKey, environment);
|
|
2551
2545
|
this._apiKey = apiKey;
|
|
2552
2546
|
this._timeout = options.timeout ?? 3e4;
|
|
2553
|
-
const ms = this._timeout;
|
|
2554
2547
|
this._appHttp = (0, import_openapi_fetch4.default)({
|
|
2555
2548
|
baseUrl: APP_BASE_URL2,
|
|
2556
2549
|
headers: {
|
|
2557
2550
|
Authorization: `Bearer ${apiKey}`,
|
|
2558
2551
|
Accept: "application/json"
|
|
2559
|
-
},
|
|
2560
|
-
fetch: async (request) => {
|
|
2561
|
-
const controller = new AbortController();
|
|
2562
|
-
const timer = setTimeout(() => controller.abort(), ms);
|
|
2563
|
-
try {
|
|
2564
|
-
return await fetch(new Request(request, { signal: controller.signal }));
|
|
2565
|
-
} catch (err) {
|
|
2566
|
-
if (err instanceof DOMException && err.name === "AbortError") {
|
|
2567
|
-
throw new SmplTimeoutError(`Request timed out after ${ms}ms`);
|
|
2568
|
-
}
|
|
2569
|
-
throw err;
|
|
2570
|
-
} finally {
|
|
2571
|
-
clearTimeout(timer);
|
|
2572
|
-
}
|
|
2573
2552
|
}
|
|
2574
2553
|
});
|
|
2575
2554
|
this.config = new ConfigClient(apiKey, this._timeout);
|