From 0523375ac65f909ca3351bc35dd0600f1908988c Mon Sep 17 00:00:00 2001 From: Curt Tudor Date: Thu, 21 Jul 2022 16:21:01 -0600 Subject: [PATCH] fix: Need for Speed: make EC keys the default (#74) --- package.json | 4 ++-- src/ZitiFirstStrategy.ts | 4 +++- yarn.lock | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index e7a1f41..400a1a9 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ ] }, "dependencies": { - "@openziti/ziti-browzer-core": "^0.16.2", + "@openziti/ziti-browzer-core": "^0.16.4", "async-mutex": "^0.3.2", "cheerio": "^1.0.0-rc.12", "jwt-decode": "^3.1.2", @@ -93,4 +93,4 @@ "workbox-expiration": "^6.5.3", "workbox-strategies": "^6.5.3" } -} \ No newline at end of file +} diff --git a/src/ZitiFirstStrategy.ts b/src/ZitiFirstStrategy.ts index 5811d4d..a64b3ac 100644 --- a/src/ZitiFirstStrategy.ts +++ b/src/ZitiFirstStrategy.ts @@ -40,7 +40,7 @@ var regexJPG = new RegExp( /^.*\.jpg$/, 'i' ); var regexSVG = new RegExp( /^.*\.svg$/, 'i' ); var regexControllerAPI: any; -var MAX_ZITI_FETCH_COUNT = 1; // aka the maximum number of concurrent Ziti Network Requests (TEMP) +var MAX_ZITI_FETCH_COUNT = 10; // aka the maximum number of concurrent Ziti Network Requests (TEMP) /** * An initial (stub) implementation of a @@ -176,6 +176,8 @@ class ZitiFirstStrategy extends CacheFirst /* NetworkFirst */ { }); this.logger.trace(`_initialize: ZitiContext created`); this._zitiBrowzerServiceWorkerGlobalScope._zitiContext = this._zitiContext; + + this._zitiContext.setKeyTypeEC(); await this._zitiContext.initialize({ loadWASM: true // unlike the ZBR, here in the ZBSW, we always instantiate the internal WebAssembly diff --git a/yarn.lock b/yarn.lock index c7ad45e..c57435d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -969,10 +969,10 @@ "@types/emscripten" "^1.39.6" "@wasmer/wasi" "^1.0.2" -"@openziti/ziti-browzer-core@^0.16.2": - version "0.16.2" - resolved "https://registry.yarnpkg.com/@openziti/ziti-browzer-core/-/ziti-browzer-core-0.16.2.tgz#349cee32c88f5adf344f4176c58941c8c326384c" - integrity sha512-UT3A14VaOH88LvjZOv24pAN0L8YelODHtISQjaIZ1/3nKeNUyem+1mwFpxD44oR0L1PmSKGfQzTpbBTCXlef2A== +"@openziti/ziti-browzer-core@^0.16.4": + version "0.16.4" + resolved "https://registry.yarnpkg.com/@openziti/ziti-browzer-core/-/ziti-browzer-core-0.16.4.tgz#c92a241edbb16a2c50cf2cf96a9a6516d55abb3d" + integrity sha512-saGXuqea1KERDYOlpjZH/xRuCMyReS6rn/3+z+F6c27hy6qSutD9isC+eQ/wt90ELBIh2DEra/5B7n70yKil4w== dependencies: "@openziti/libcrypto-js" "^0.9.0" "@openziti/ziti-browzer-edge-client" "^0.2.0"