@openfeature/ofrep-web-provider 0.1.2 → 0.1.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/README.md CHANGED
@@ -13,7 +13,7 @@ npm install @openfeature/ofrep-web-provider
13
13
  ### yarn
14
14
 
15
15
  ```sh
16
- yarn add @openfeature/ofrep-web-provider @openfeature/ofrep-core @openfeature/web-sdk
16
+ yarn add @openfeature/ofrep-web-provider @openfeature/ofrep-core @openfeature/web-sdk @openfeature/core
17
17
  ```
18
18
 
19
19
  > [!NOTE]
@@ -24,9 +24,9 @@ yarn add @openfeature/ofrep-web-provider @openfeature/ofrep-core @openfeature/we
24
24
  The provider needs the base url of the OFREP server for instantiation.
25
25
 
26
26
  ```ts
27
- import { OFREPWebProvider } from '@openfeature/ofrep-web';
27
+ import { OFREPWebProvider } from '@openfeature/ofrep-web-provider';
28
28
 
29
- OpenFeature.setProvider(new OFREPWebProvider({ baseUrl: 'https://localhost:8080', pollingInterval: 60000 }));
29
+ OpenFeature.setProvider(new OFREPWebProvider({ baseUrl: 'https://localhost:8080', pollInterval: 60000 }));
30
30
  ```
31
31
 
32
32
  ### HTTP headers
package/index.cjs.js CHANGED
@@ -30,13 +30,6 @@ class OFREPWebProvider {
30
30
  this.runsOn = 'client';
31
31
  this.events = new webSdk.OpenFeatureEventEmitter();
32
32
  this._cache = {};
33
- try {
34
- // Cannot use URL.canParse as it is only available from Node 19.x
35
- new URL(options.baseUrl);
36
- }
37
- catch (_b) {
38
- throw new Error(`The given OFREP URL "${options.baseUrl}" is not a valid URL.`);
39
- }
40
33
  this._options = options;
41
34
  this._logger = logger;
42
35
  this._etag = null;
package/index.esm.js CHANGED
@@ -26,13 +26,6 @@ class OFREPWebProvider {
26
26
  this.runsOn = 'client';
27
27
  this.events = new OpenFeatureEventEmitter();
28
28
  this._cache = {};
29
- try {
30
- // Cannot use URL.canParse as it is only available from Node 19.x
31
- new URL(options.baseUrl);
32
- }
33
- catch (_b) {
34
- throw new Error(`The given OFREP URL "${options.baseUrl}" is not a valid URL.`);
35
- }
36
29
  this._options = options;
37
30
  this._logger = logger;
38
31
  this._etag = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfeature/ofrep-web-provider",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0"
6
6
  },
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "peerDependencies": {
14
14
  "@openfeature/web-sdk": ">=0.4.0",
15
- "@openfeature/ofrep-core": "^0.1.2"
15
+ "@openfeature/ofrep-core": "^0.1.4"
16
16
  },
17
17
  "exports": {
18
18
  "./package.json": "./package.json",