@ar.io/wayfinder-core 1.4.1 → 1.4.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"round-robin.d.ts","sourceRoot":"","sources":["../../src/routing/round-robin.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE7E,qBAAa,yBAA0B,YAAW,eAAe;IAC/D,SAAgB,IAAI,iBAAiB;IACrC,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,gBAAgB,CAAC,CAAmB;gBAEhC,EACV,QAGC,EACD,MAAsB,EACtB,gBAAgB,GACjB,GAAE;QACD,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;KAChC;IAcA,aAAa,IAAI,OAAO,CAAC,GAAG,CAAC;CAqBpC"}
1
+ {"version":3,"file":"round-robin.d.ts","sourceRoot":"","sources":["../../src/routing/round-robin.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE7E,qBAAa,yBAA0B,YAAW,eAAe;IAC/D,SAAgB,IAAI,iBAAiB;IACrC,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,gBAAgB,CAAC,CAAmB;gBAEhC,EACV,QAAQ,EACR,MAAsB,EACtB,gBAAgB,GACjB,GAAE;QACD,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;KAChC;IAiBA,aAAa,IAAI,OAAO,CAAC,GAAG,CAAC;CAqBpC"}
@@ -21,15 +21,15 @@ export class RoundRobinRoutingStrategy {
21
21
  currentIndex;
22
22
  logger;
23
23
  gatewaysProvider;
24
- constructor({ gateways = [
25
- new URL('https://arweave.net'),
26
- new URL('https://permagate.io'),
27
- ], logger = defaultLogger, gatewaysProvider, } = {}) {
24
+ constructor({ gateways, logger = defaultLogger, gatewaysProvider, } = {}) {
28
25
  if (gateways && gatewaysProvider) {
29
26
  throw new Error('Cannot provide both gateways and gatewaysProvider');
30
27
  }
31
28
  if (!gateways && !gatewaysProvider) {
32
- throw new Error('Must provide either gateways or gatewaysProvider');
29
+ gateways = [
30
+ new URL('https://arweave.net'),
31
+ new URL('https://permagate.io'),
32
+ ];
33
33
  }
34
34
  this.gateways = gateways || [];
35
35
  this.currentIndex = 0;
package/dist/version.d.ts CHANGED
@@ -14,5 +14,5 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- export declare const WAYFINDER_CORE_VERSION = "v1.4.1";
17
+ export declare const WAYFINDER_CORE_VERSION = "v1.4.2";
18
18
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -14,4 +14,4 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- export const WAYFINDER_CORE_VERSION = 'v1.4.1';
17
+ export const WAYFINDER_CORE_VERSION = 'v1.4.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/wayfinder-core",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "WayFinder core library for intelligently routing to optimal AR.IO gateways",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",