@openfeature/server-sdk 1.9.0 → 1.10.0
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/README.md +2 -2
- package/dist/cjs/index.js +140 -199
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +140 -202
- package/dist/esm/index.js.map +1 -1
- package/dist/types.d.ts +12 -8
- package/package.json +5 -5
package/dist/types.d.ts
CHANGED
|
@@ -471,42 +471,42 @@ interface EvaluationLifeCycle<T> {
|
|
|
471
471
|
|
|
472
472
|
declare abstract class OpenFeatureError extends Error {
|
|
473
473
|
abstract code: ErrorCode;
|
|
474
|
-
constructor(message?: string);
|
|
474
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
475
475
|
}
|
|
476
476
|
|
|
477
477
|
declare class GeneralError extends OpenFeatureError {
|
|
478
478
|
code: ErrorCode;
|
|
479
|
-
constructor(message?: string);
|
|
479
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
480
480
|
}
|
|
481
481
|
|
|
482
482
|
declare class FlagNotFoundError extends OpenFeatureError {
|
|
483
483
|
code: ErrorCode;
|
|
484
|
-
constructor(message?: string);
|
|
484
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
declare class ParseError extends OpenFeatureError {
|
|
488
488
|
code: ErrorCode;
|
|
489
|
-
constructor(message?: string);
|
|
489
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
490
490
|
}
|
|
491
491
|
|
|
492
492
|
declare class TypeMismatchError extends OpenFeatureError {
|
|
493
493
|
code: ErrorCode;
|
|
494
|
-
constructor(message?: string);
|
|
494
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
495
495
|
}
|
|
496
496
|
|
|
497
497
|
declare class TargetingKeyMissingError extends OpenFeatureError {
|
|
498
498
|
code: ErrorCode;
|
|
499
|
-
constructor(message?: string);
|
|
499
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
500
500
|
}
|
|
501
501
|
|
|
502
502
|
declare class InvalidContextError extends OpenFeatureError {
|
|
503
503
|
code: ErrorCode;
|
|
504
|
-
constructor(message?: string);
|
|
504
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
505
505
|
}
|
|
506
506
|
|
|
507
507
|
declare class ProviderNotReadyError extends OpenFeatureError {
|
|
508
508
|
code: ErrorCode;
|
|
509
|
-
constructor(message?: string);
|
|
509
|
+
constructor(message?: string, options?: ErrorOptions);
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
/**
|
|
@@ -576,6 +576,10 @@ declare abstract class OpenFeatureCommonAPI<P extends CommonProvider = CommonPro
|
|
|
576
576
|
* @param {EventHandler} handler The handler to remove for the provider event type
|
|
577
577
|
*/
|
|
578
578
|
removeHandler<T extends AnyProviderEvent>(eventType: T, handler: EventHandler): void;
|
|
579
|
+
/**
|
|
580
|
+
* Removes all event handlers.
|
|
581
|
+
*/
|
|
582
|
+
clearHandlers(): void;
|
|
579
583
|
/**
|
|
580
584
|
* Gets the current handlers for the given provider event type.
|
|
581
585
|
* @param {AnyProviderEvent} eventType The provider event type to get the current handlers for
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfeature/server-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "OpenFeature SDK for JavaScript",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"files": [
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"test": "jest --verbose",
|
|
18
18
|
"lint": "eslint ./",
|
|
19
19
|
"clean": "shx rm -rf ./dist",
|
|
20
|
-
"build:esm": "esbuild src/index.ts --bundle --external:@openfeature/core --sourcemap --target=
|
|
21
|
-
"build:cjs": "esbuild src/index.ts --bundle --external:@openfeature/core --sourcemap --target=
|
|
20
|
+
"build:esm": "esbuild src/index.ts --bundle --external:@openfeature/core --sourcemap --target=es2022 --platform=node --format=esm --outfile=./dist/esm/index.js --analyze",
|
|
21
|
+
"build:cjs": "esbuild src/index.ts --bundle --external:@openfeature/core --sourcemap --target=es2022 --platform=node --format=cjs --outfile=./dist/cjs/index.js --analyze",
|
|
22
22
|
"build:rollup-types": "rollup -c ../../rollup.config.mjs",
|
|
23
23
|
"build": "npm run clean && npm run build:esm && npm run build:cjs && npm run build:rollup-types",
|
|
24
24
|
"postbuild": "shx cp ./../../package.esm.json ./dist/esm/package.json",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"node": ">=16"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@openfeature/core": "0.0.
|
|
51
|
+
"@openfeature/core": "0.0.24"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@openfeature/core": "0.0.
|
|
54
|
+
"@openfeature/core": "0.0.24"
|
|
55
55
|
}
|
|
56
56
|
}
|