From 1ea8b0911813f650d27299c82b6abd3020debc5c Mon Sep 17 00:00:00 2001 From: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Date: Thu, 23 Mar 2023 22:55:12 -0600 Subject: [PATCH] feat(mv3): Manifest V3 Migration Checklist (#1170) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(mv3): :sparkles: MV3 Manifest Migration * fix(mv3): :wastebasket: No longer needed * fix(mv3): :wrench: Corresponding MV3 Changes * feat(mv3): :package: Adding deps * feat(telemetry): Refactor Metrics Tracking from background service_worker (#1172) * feat(telemetry): :recycle: Init Telemetry away from background service_worker. * feat(telemetry): :recycle: Track metrics from page context instead of service_worker context * feat(mv3): :adhesive_bandage: Patch @protobufjs/inquire to not have eval * fix(mv3): :alien: Fixing contextMenus API changes (#1177) * fix(mv3): :alien: Fixing contextMenus API changes * fix(mv3): :adhesive_bandage: Fixing the browser.action api * fix(mv3): webpack configs (#1178) * fix(mv3): :alien: Fixing contextMenus API changes * fix(mv3): :adhesive_bandage: Fixing the browser.action api * fix(mv3): :wrench: Fixing webpack config * fix(mv3): :adhesive_bandage: Patching debug package and making background sw work. * feat(mv3): ✨ XHR to Fetch Migration (#1179) * fix(mv3): :alien: Fixing contextMenus API changes * fix(mv3): :adhesive_bandage: Fixing the browser.action api * fix(mv3): :wrench: Fixing webpack config * fix(mv3): :adhesive_bandage: Patching debug package and making background sw work. * feat(mv3): :sparkles: XMLHttpRequest => fetch * fix(mv3): :construction: Related changes to ipfs-path * fix(mv3): :construction: Other Related changes * fix(mv3): :construction: Changes to companion * fix(mv3): :white_check_mark: Fixing tests to account for async code. * Fix(mv3): Popup Was Broken (#1180) * fix(mv3): :alien: Fixing contextMenus API changes * fix(mv3): :adhesive_bandage: Fixing the browser.action api * fix(mv3): :wrench: Fixing webpack config * fix(mv3): :adhesive_bandage: Patching debug package and making background sw work. * feat(mv3): :sparkles: XMLHttpRequest => fetch * fix(mv3): :construction: Related changes to ipfs-path * fix(mv3): :construction: Other Related changes * fix(mv3): :construction: Changes to companion * fix(mv3): :white_check_mark: Fixing tests to account for async code. * feat(mv3): :recycle: Implementing a non-windowed companion instance * fix(mv3): :wastebasket: Removing calls to background page. * fix: :wastebasket: Unneeded debug statement * fix(mv3): :passport_control: Limiting permissions to chrome-extension * Update add-on/src/lib/ipfs-companion.js Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> --------- Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> --- .nvmrc | 1 + add-on/manifest.chromium.json | 11 +- add-on/manifest.common.json | 33 +- add-on/manifest.firefox.json | 2 +- add-on/src/background/background.html | 5 - add-on/src/background/background.js | 20 +- add-on/src/landing-pages/welcome/store.js | 4 +- add-on/src/lib/context-menus.js | 41 +- add-on/src/lib/copier.js | 2 +- add-on/src/lib/dnslink.js | 43 +- add-on/src/lib/ipfs-companion.js | 85 +- add-on/src/lib/ipfs-import.js | 4 +- add-on/src/lib/ipfs-path.js | 14 +- add-on/src/lib/ipfs-request.js | 56 +- add-on/src/lib/telemetry.js | 4 +- add-on/src/options/store.js | 4 +- add-on/src/popup/browser-action/store.js | 14 +- add-on/src/popup/quick-import.js | 17 +- add-on/src/recovery/recovery.js | 4 +- package-lock.json | 3831 ++++++++++++++++- package.json | 9 + patches/@protobufjs+inquire+1.1.0.patch | 13 + patches/debug+4.3.4.patch | 32 + test/functional/lib/dnslink.test.js | 86 +- test/functional/lib/ipfs-companion.test.js | 6 +- test/functional/lib/ipfs-path.test.js | 80 +- .../lib/ipfs-request-dnslink.test.js | 152 +- .../lib/ipfs-request-gateway-redirect.test.js | 206 +- .../ipfs-request-protocol-handlers.test.js | 160 +- .../lib/ipfs-request-workarounds.test.js | 46 +- webpack.config.js | 6 +- 31 files changed, 4395 insertions(+), 596 deletions(-) create mode 100644 .nvmrc delete mode 100644 add-on/src/background/background.html create mode 100644 patches/@protobufjs+inquire+1.1.0.patch create mode 100644 patches/debug+4.3.4.patch diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..49991d30c --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v18.14.0 diff --git a/add-on/manifest.chromium.json b/add-on/manifest.chromium.json index 9949e6e1d..01f88c6fd 100644 --- a/add-on/manifest.chromium.json +++ b/add-on/manifest.chromium.json @@ -1,17 +1,16 @@ { "minimum_chrome_version": "72", "permissions": [ - "", + "clipboardWrite", + "contextMenus", "idle", - "tabs", "notifications", "storage", + "tabs", "unlimitedStorage", - "contextMenus", - "clipboardWrite", "webNavigation", - "webRequest", - "webRequestBlocking" + "webRequest" ], + "host_permissions": [""], "incognito": "not_allowed" } diff --git a/add-on/manifest.common.json b/add-on/manifest.common.json index 2b3a331b8..06fdabe7f 100644 --- a/add-on/manifest.common.json +++ b/add-on/manifest.common.json @@ -1,5 +1,5 @@ { - "manifest_version": 2, + "manifest_version": 3, "name": "__MSG_manifest_extensionName__", "short_name": "__MSG_manifest_shortExtensionName__", "version": "2.22.1", @@ -12,9 +12,9 @@ "128": "icons/png/ipfs-logo-on_128.png" }, "background": { - "page": "dist/background/background.html" + "service_worker": "dist/bundles/backgroundPage.bundle.js" }, - "browser_action": { + "action": { "default_icon": { "19": "icons/png/ipfs-logo-off_19.png", "38": "icons/png/ipfs-logo-off_38.png", @@ -29,15 +29,24 @@ "page": "dist/options/options.html" }, "web_accessible_resources": [ - "icons/png/ipfs-logo-off_19.png", - "icons/png/ipfs-logo-off_38.png", - "icons/png/ipfs-logo-off_128.png", - "icons/ipfs-logo-on.svg", - "icons/ipfs-logo-off.svg", - "dist/recovery/recovery.css", - "dist/recovery/recovery.html", - "dist/recovery/recovery.js" + { + "resources": [ + "icons/png/ipfs-logo-off_19.png", + "icons/png/ipfs-logo-off_38.png", + "icons/png/ipfs-logo-off_128.png", + "icons/ipfs-logo-on.svg", + "icons/ipfs-logo-off.svg", + "dist/recovery/recovery.css", + "dist/recovery/recovery.html", + "dist/recovery/recovery.js" + ], + "matches": [ + "chrome-extension://*/*" + ] + } ], - "content_security_policy": "script-src 'self'; object-src 'self'; frame-src 'self';", + "content_security_policy": { + "extension_pages": "script-src 'self'; object-src 'self'; frame-src 'self';" + }, "default_locale": "en" } diff --git a/add-on/manifest.firefox.json b/add-on/manifest.firefox.json index 5e0b44a01..7eebcb40d 100644 --- a/add-on/manifest.firefox.json +++ b/add-on/manifest.firefox.json @@ -1,5 +1,5 @@ { - "browser_action": { + "action": { "browser_style": false }, "options_ui": { diff --git a/add-on/src/background/background.html b/add-on/src/background/background.html deleted file mode 100644 index e3ea3c511..000000000 --- a/add-on/src/background/background.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/add-on/src/background/background.js b/add-on/src/background/background.js index 7b9fddfab..65aff9c34 100644 --- a/add-on/src/background/background.js +++ b/add-on/src/background/background.js @@ -2,25 +2,15 @@ /* eslint-env browser, webextensions */ import browser from 'webextension-polyfill' +import createIpfsCompanion from '../lib/ipfs-companion.js' import { onInstalled } from '../lib/on-installed.js' import { getUninstallURL } from '../lib/on-uninstalled.js' -import { optionDefaults } from '../lib/options.js' -import createIpfsCompanion from '../lib/ipfs-companion.js' // register lifecycle hooks early, otherwise we miss first install event browser.runtime.onInstalled.addListener(onInstalled) browser.runtime.setUninstallURL(getUninstallURL(browser)) -// init add-on after all libs are loaded -document.addEventListener('DOMContentLoaded', async () => { - browser.runtime.sendMessage({ telemetry: { trackView: 'background' } }) - // setting debug namespaces require page reload to get applied - const debugNs = (await browser.storage.local.get({ logNamespaces: optionDefaults.logNamespaces })).logNamespaces - if (debugNs !== localStorage.debug) { - localStorage.debug = debugNs - window.location.reload() - } - // init inlined to read updated localStorage.debug - // @ts-expect-error - TS does not know about window.ipfsCompanion - window.ipfsCompanion = await createIpfsCompanion() -}) +const init = async () => { + await createIpfsCompanion() +} +init(); diff --git a/add-on/src/landing-pages/welcome/store.js b/add-on/src/landing-pages/welcome/store.js index 83f733d10..7d9a31fb2 100644 --- a/add-on/src/landing-pages/welcome/store.js +++ b/add-on/src/landing-pages/welcome/store.js @@ -1,6 +1,7 @@ 'use strict' /* eslint-env browser, webextensions */ import browser from 'webextension-polyfill' +import { handleConsentFromState, trackView } from '../../lib/telemetry.js' export default function createWelcomePageStore (i18n, runtime) { return function welcomePageStore (state, emitter) { @@ -9,7 +10,8 @@ export default function createWelcomePageStore (i18n, runtime) { state.webuiRootUrl = null let port emitter.on('DOMContentLoaded', async () => { - browser.runtime.sendMessage({ telemetry: { trackView: 'welcome' } }) + handleConsentFromState(state) + trackView('welcome') emitter.emit('render') port = runtime.connect({ name: 'browser-action-port' }) port.onMessage.addListener(async (message) => { diff --git a/add-on/src/lib/context-menus.js b/add-on/src/lib/context-menus.js index b651372fa..7dc76a070 100644 --- a/add-on/src/lib/context-menus.js +++ b/add-on/src/lib/context-menus.js @@ -71,29 +71,13 @@ export function createContextMenus ( getState, _runtime, ipfsPathValidator, { onAddFromContext, onCopyRawCid, onCopyAddressAtPublicGw }) { try { const createSubmenu = (id, contextType, menuBuilder) => { - browser.contextMenus.create({ - id, - title: browser.i18n.getMessage(id), - documentUrlPatterns: [''], - contexts: [contextType] - }) + browser.contextMenus.onClicked.addListener((...args) => console.log(args)) } const createImportToIpfsMenuItem = (parentId, id, contextType, ipfsAddOptions) => { const itemId = `${parentId}_${id}` apiMenuItems.add(itemId) - return browser.contextMenus.create({ - id: itemId, - parentId, - title: browser.i18n.getMessage(id), - contexts: [contextType], - documentUrlPatterns: [''], - enabled: false, - /* no support for 'icons' in Chrome - icons: { - '48': '/ui-kit/icons/stroke_cube.svg' - }, */ - onclick: (context) => onAddFromContext(context, contextType, ipfsAddOptions) - }) + return browser.contextMenus.onClicked.addListener((context) => onAddFromContext(context, contextType, ipfsAddOptions) + ) } const createCopierMenuItem = (parentId, id, contextType, handler) => { const itemId = `${parentId}_${id}` @@ -102,22 +86,9 @@ export function createContextMenus ( if (apiMenuItemIds.has(id)) { apiMenuItems.add(itemId) } - return browser.contextMenus.create({ - id: itemId, - parentId, - title: browser.i18n.getMessage(id), - contexts: [contextType], - documentUrlPatterns: [ - '*://*/ipfs/*', '*://*/ipns/*', - '*://*.ipfs.dweb.link/*', '*://*.ipns.dweb.link/*', // TODO: add any custom public gateway from Preferences - '*://*.ipfs.localhost/*', '*://*.ipns.localhost/*' - ], - /* no support for 'icons' in Chrome - icons: { - '48': '/ui-kit/icons/stroke_copy.svg' - }, */ - onclick: (context) => handler(context, contextType) - }) + return browser.contextMenus.onClicked.addListener( + (context) => handler(context, contextType) + ) } const buildSubmenu = (parentId, contextType) => { createSubmenu(parentId, contextType) diff --git a/add-on/src/lib/copier.js b/add-on/src/lib/copier.js index 7298d5695..699ccb470 100644 --- a/add-on/src/lib/copier.js +++ b/add-on/src/lib/copier.js @@ -72,7 +72,7 @@ export default function createCopier (notify, ipfsPathValidator) { async copyAddressAtPublicGw (context, contextType) { const url = await findValueForContext(context, contextType) - const publicUrl = ipfsPathValidator.resolveToPublicUrl(url) + const publicUrl = await ipfsPathValidator.resolveToPublicUrl(url) await copyTextToClipboard(publicUrl, notify) }, diff --git a/add-on/src/lib/dnslink.js b/add-on/src/lib/dnslink.js index b648ed2cf..4b19314fb 100644 --- a/add-on/src/lib/dnslink.js +++ b/add-on/src/lib/dnslink.js @@ -50,11 +50,11 @@ export default function createDnslinkResolver (getState) { !sameGateway(requestUrl, state.gwURL) }, - dnslinkAtGateway (url, dnslink) { + async dnslinkAtGateway (url, dnslink) { if (typeof url === 'string') { url = new URL(url) } - if (dnslinkResolver.canRedirectToIpns(url, dnslink)) { + if (await dnslinkResolver.canRedirectToIpns(url, dnslink)) { const state = getState() // redirect to IPNS and leave it up to the gateway // to load the correct path from IPFS @@ -65,12 +65,12 @@ export default function createDnslinkResolver (getState) { } }, - readAndCacheDnslink (fqdn) { + async readAndCacheDnslink (fqdn) { let dnslink = dnslinkResolver.cachedDnslink(fqdn) if (typeof dnslink === 'undefined') { try { log(`dnslink cache miss for '${fqdn}', running DNS TXT lookup`) - dnslink = dnslinkResolver.readDnslinkFromTxtRecord(fqdn) + dnslink = await dnslinkResolver.readDnslinkFromTxtRecord(fqdn) if (dnslink) { // TODO: set TTL as maxAge: setDnslink(fqdn, dnslink, maxAge) dnslinkResolver.setDnslink(fqdn, dnslink) @@ -96,6 +96,7 @@ export default function createDnslinkResolver (getState) { const cachedResult = dnslinkResolver.cachedDnslink(fqdn) if (cachedResult) return cachedResult return lookupQueue.add(() => { + // this will resolve eventually. return dnslinkResolver.readAndCacheDnslink(fqdn) }) }, @@ -120,7 +121,7 @@ export default function createDnslinkResolver (getState) { }, // low level lookup without cache - readDnslinkFromTxtRecord (fqdn) { + async readDnslinkFromTxtRecord (fqdn) { const state = getState() let apiProvider if (!state.ipfsNodeType.startsWith('embedded') && state.peerCount !== offlinePeerCount) { @@ -139,29 +140,29 @@ export default function createDnslinkResolver (getState) { // TODO: revisit after https://github.com/ipfs/js-ipfs-api/issues/501 is addressed // TODO: consider worst-case-scenario fallback to https://developers.google.com/speed/public-dns/docs/dns-over-https const apiCall = `${apiProvider}api/v0/name/resolve/${fqdn}?r=false` - const xhr = new XMLHttpRequest() // older XHR API us used because window.fetch appends Origin which causes error 403 in go-ipfs - // synchronous mode with small timeout - // (it is okay, because we do it only once, then it is cached and read via readAndCacheDnslink) - xhr.open('GET', apiCall, false) - xhr.setRequestHeader('Accept', 'application/json') - xhr.send(null) - if (xhr.status === 200) { - const dnslink = JSON.parse(xhr.responseText).Path - // console.log('readDnslinkFromTxtRecord', readDnslinkFromTxtRecord) + const response = await fetch(apiCall, { + method: 'GET', + headers: { + Accept: 'application/json' + } + }) + + if (response.ok) { + const { Path: dnslink } = await response.json() if (!IsIpfs.path(dnslink)) { throw new Error(`dnslink for '${fqdn}' is not a valid IPFS path: '${dnslink}'`) } return dnslink - } else if (xhr.status === 500) { + } else if (response.status === 500) { // go-ipfs returns 500 if host has no dnslink or an error occurred // TODO: find/fill an upstream bug to make this more intuitive return false } else { - throw new Error(xhr.statusText) + throw new Error(response.statusText) } }, - canRedirectToIpns (url, dnslink) { + async canRedirectToIpns (url, dnslink) { if (typeof url === 'string') { url = new URL(url) } @@ -185,7 +186,7 @@ export default function createDnslinkResolver (getState) { // is found in initial response. // More: https://github.com/ipfs-shipyard/ipfs-companion/blob/master/docs/dnslink.md const foundDnslink = dnslink || - (getState().dnslinkPolicy === 'enabled' + await (getState().dnslinkPolicy === 'enabled' ? dnslinkResolver.readAndCacheDnslink(fqdn) : dnslinkResolver.cachedDnslink(fqdn)) if (foundDnslink) { @@ -205,7 +206,7 @@ export default function createDnslinkResolver (getState) { // Test if URL contains a valid DNSLink FQDN // in url.hostname OR in url.pathname (/ipns/) // and return matching FQDN if present - findDNSLinkHostname (url) { + async findDNSLinkHostname (url) { if (!url) return // Normalize subdomain and path gateways to to /ipns/ const contentPath = ipfsContentPath(url) @@ -214,14 +215,14 @@ export default function createDnslinkResolver (getState) { const ipnsRoot = contentPath.match(/^\/ipns\/([^/]+)/)[1] // console.log('findDNSLinkHostname ==> inspecting IPNS root', ipnsRoot) // Ignore PeerIDs, match DNSLink only - if (!IsIpfs.cid(ipnsRoot) && dnslinkResolver.readAndCacheDnslink(ipnsRoot)) { + if (!IsIpfs.cid(ipnsRoot) && await dnslinkResolver.readAndCacheDnslink(ipnsRoot)) { // console.log('findDNSLinkHostname ==> found DNSLink for FQDN in url.pathname: ', ipnsRoot) return ipnsRoot } } // Check main hostname const { hostname } = new URL(url) - if (dnslinkResolver.readAndCacheDnslink(hostname)) { + if (await dnslinkResolver.readAndCacheDnslink(hostname)) { // console.log('findDNSLinkHostname ==> found DNSLink for url.hostname', hostname) return hostname } diff --git a/add-on/src/lib/ipfs-companion.js b/add-on/src/lib/ipfs-companion.js index b055f599e..5fb11cecd 100644 --- a/add-on/src/lib/ipfs-companion.js +++ b/add-on/src/lib/ipfs-companion.js @@ -23,14 +23,13 @@ import createRuntimeChecks from './runtime-checks.js' import { createContextMenus, findValueForContext, contextMenuCopyAddressAtPublicGw, contextMenuCopyRawCid, contextMenuCopyCanonicalAddress, contextMenuViewOnGateway, contextMenuCopyPermalink, contextMenuCopyCidAddress } from './context-menus.js' import { registerSubdomainProxy } from './http-proxy.js' import { runPendingOnInstallTasks } from './on-installed.js' -import { handleConsentFromState, startSession, endSession, trackView } from './telemetry.js' const log = debug('ipfs-companion:main') log.error = debug('ipfs-companion:main:error') let browserActionPort // reuse instance for status updates between on/off toggles // init happens on addon load in background/background.js -export default async function init () { +export default async function init (windowedContext = false) { // INIT // =================================================================== let ipfs // ipfs-api instance @@ -57,11 +56,8 @@ export default async function init () { runtime = await createRuntimeChecks(browser) state = initState(options) notify = createNotifier(getState) - // ensure consent is set properly on app init - handleConsentFromState(state) if (state.active) { - startSession() // It's ok for this to fail, node might be unavailable or mis-configured try { ipfs = await initIpfsClient(browser, state) @@ -79,19 +75,23 @@ export default async function init () { copier = createCopier(notify, ipfsPathValidator) ipfsImportHandler = createIpfsImportHandler(getState, getIpfs, ipfsPathValidator, runtime, copier) inspector = createInspector(notify, ipfsPathValidator, getState) - contextMenus = createContextMenus(getState, runtime, ipfsPathValidator, { - onAddFromContext, - onCopyCanonicalAddress: copier.copyCanonicalAddress, - onCopyRawCid: copier.copyRawCid, - onCopyAddressAtPublicGw: copier.copyAddressAtPublicGw - }) - modifyRequest = createRequestModifier(getState, dnslinkResolver, ipfsPathValidator, runtime) - log('register all listeners') - registerListeners() - await registerSubdomainProxy(getState, runtime, notify) - log('init done') - setApiStatusUpdateInterval(options.ipfsApiPollMs) - await runPendingOnInstallTasks() + if (!windowedContext) { + contextMenus = createContextMenus(getState, runtime, ipfsPathValidator, { + onAddFromContext, + onCopyCanonicalAddress: copier.copyCanonicalAddress, + onCopyRawCid: copier.copyRawCid, + onCopyAddressAtPublicGw: copier.copyAddressAtPublicGw + }) + modifyRequest = createRequestModifier(getState, dnslinkResolver, ipfsPathValidator, runtime) + log('register all listeners') + registerListeners() + await registerSubdomainProxy(getState, runtime, notify) + log('init done') + setApiStatusUpdateInterval(options.ipfsApiPollMs) + await runPendingOnInstallTasks() + } else { + log('init done (windowed context)') + } } catch (error) { log.error('Unable to initialize addon due to error', error) if (notify) notify('notify_addonIssueTitle', 'notify_addonIssueMsg') @@ -108,16 +108,16 @@ export default async function init () { throw new Error('IPFS Companion: API client is disabled') } - function registerListeners () { - const onBeforeSendInfoSpec = ['blocking', 'requestHeaders'] + function registerListeners() { + const onBeforeSendInfoSpec = ['requestHeaders'] if (browser.webRequest.OnBeforeSendHeadersOptions && 'EXTRA_HEADERS' in browser.webRequest.OnBeforeSendHeadersOptions) { // Chrome 72+ requires 'extraHeaders' for accessing all headers // Note: we need this for code ensuring kubo-rpc-client can talk to API without setting CORS onBeforeSendInfoSpec.push('extraHeaders') } browser.webRequest.onBeforeSendHeaders.addListener(onBeforeSendHeaders, { urls: [''] }, onBeforeSendInfoSpec) - browser.webRequest.onBeforeRequest.addListener(onBeforeRequest, { urls: [''] }, ['blocking']) - browser.webRequest.onHeadersReceived.addListener(onHeadersReceived, { urls: [''] }, ['blocking', 'responseHeaders']) + browser.webRequest.onBeforeRequest.addListener(onBeforeRequest, { urls: [''] }) + browser.webRequest.onHeadersReceived.addListener(onHeadersReceived, { urls: [''] }, ['responseHeaders']) browser.webRequest.onErrorOccurred.addListener(onErrorOccurred, { urls: [''], types: ['main_frame'] }) browser.webRequest.onCompleted.addListener(onCompleted, { urls: [''], types: ['main_frame'] }) browser.storage.onChanged.addListener(onStorageChange) @@ -164,23 +164,13 @@ export default async function init () { // =================================================================== // https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/sendMessage - function onRuntimeMessage (request, sender) { + async function onRuntimeMessage (request, sender) { // console.log((sender.tab ? 'Message from a content script:' + sender.tab.url : 'Message from the extension'), request) if (request.pubGwUrlForIpfsOrIpnsPath) { const path = request.pubGwUrlForIpfsOrIpnsPath const { validIpfsOrIpns, resolveToPublicUrl } = ipfsPathValidator - const result = validIpfsOrIpns(path) ? resolveToPublicUrl(path) : null - return Promise.resolve({ pubGwUrlForIpfsOrIpnsPath: result }) - } - if (request.telemetry) { - return Promise.resolve(onTelemetryMessage(request.telemetry, sender)) - } - } - - function onTelemetryMessage (request, sender) { - if (request.trackView) { - const { version } = browser.runtime.getManifest() - return trackView(request.trackView, { version }) + const result = await validIpfsOrIpns(path) ? await resolveToPublicUrl(path) : null + return { pubGwUrlForIpfsOrIpnsPath: result } } } @@ -254,7 +244,7 @@ export default async function init () { const url = info.currentTab.url info.isIpfsContext = ipfsPathValidator.isIpfsPageActionsContext(url) if (info.isIpfsContext) { - info.currentTabPublicUrl = ipfsPathValidator.resolveToPublicUrl(url) + info.currentTabPublicUrl = await ipfsPathValidator.resolveToPublicUrl(url) info.currentTabContentPath = ipfsPathValidator.resolveToIpfsPath(url) if (resolveCache.has(url)) { const [immutableIpfsPath, permalink, cid] = resolveCache.get(url) @@ -273,7 +263,7 @@ export default async function init () { }, 0) } } - info.currentDnslinkFqdn = dnslinkResolver.findDNSLinkHostname(url) + info.currentDnslinkFqdn =await dnslinkResolver.findDNSLinkHostname(url) info.currentFqdn = info.currentDnslinkFqdn || safeHostname(url) info.currentTabIntegrationsOptOut = !state.activeIntegrations(info.currentFqdn) info.isRedirectContext = info.currentFqdn && ipfsPathValidator.isRedirectPageActionsContext(url) @@ -473,7 +463,7 @@ export default async function init () { // ------------------------------------------------------------------- async function updateBrowserActionBadge () { - if (typeof browser.browserAction.setBadgeBackgroundColor === 'undefined') { + if (typeof browser.action.setBadgeBackgroundColor === 'undefined') { // Firefox for Android does not have this UI, so we just skip it return } @@ -498,13 +488,13 @@ export default async function init () { badgeIcon = '/icons/ipfs-logo-off.svg' } try { - const oldColor = colorArraytoHex(await browser.browserAction.getBadgeBackgroundColor({})) + const oldColor = colorArraytoHex(await browser.action.getBadgeBackgroundColor({})) if (badgeColor !== oldColor) { - await browser.browserAction.setBadgeBackgroundColor({ color: badgeColor }) + await browser.action.setBadgeBackgroundColor({ color: badgeColor }) await setBrowserActionIcon(badgeIcon) } - const oldText = await browser.browserAction.getBadgeText({}) - if (oldText !== badgeText) await browser.browserAction.setBadgeText({ text: badgeText }) + const oldText = await browser.action.getBadgeText({}) + if (oldText !== badgeText) await browser.action.setBadgeText({ text: badgeText }) } catch (error) { console.error('Unable to update browserAction badge due to error', error) } @@ -525,14 +515,17 @@ export default async function init () { let iconDefinition = { path: iconPath } try { // Try SVG first -- Firefox supports it natively - await browser.browserAction.setIcon(iconDefinition) + await browser.action.setIcon(iconDefinition) + if (browser.runtime.lastError.message === 'Icon invalid.') { + throw browser.runtime.lastError + } } catch (error) { // Fallback! // Chromium does not support SVG [ticket below is 8 years old, I can't even..] // https://bugs.chromium.org/p/chromium/issues/detail?id=29683 // Still, we want icon, so we precompute rasters of popular sizes and use them instead iconDefinition = await rasterIconDefinition(iconPath) - await browser.browserAction.setIcon(iconDefinition) + await browser.action.setIcon(iconDefinition) } } @@ -568,8 +561,6 @@ export default async function init () { await registerSubdomainProxy(getState, runtime) shouldRestartIpfsClient = true shouldStopIpfsClient = !state.active - // Any time the extension switches active state, start or stop the current session. - state.active ? startSession() : endSession() break case 'ipfsNodeType': if (change.oldValue !== braveNodeType && change.newValue === braveNodeType) { @@ -636,8 +627,6 @@ export default async function init () { break } } - // ensure consent is set properly on state changes - handleConsentFromState(state) if ((state.active && shouldRestartIpfsClient) || shouldStopIpfsClient) { try { diff --git a/add-on/src/lib/ipfs-import.js b/add-on/src/lib/ipfs-import.js index 8b4e8664d..1a0fdcd82 100644 --- a/add-on/src/lib/ipfs-import.js +++ b/add-on/src/lib/ipfs-import.js @@ -68,7 +68,7 @@ export function createIpfsImportHandler (getState, getIpfs, ipfsPathValidator, r // share wrapping dir path = `/ipfs/${root.cid}/` } - const url = resolveToPublicUrl(path) + const url = await resolveToPublicUrl(path) await copier.copyTextToClipboard(url) }, @@ -78,7 +78,7 @@ export function createIpfsImportHandler (getState, getIpfs, ipfsPathValidator, r for (const file of files) { if (file && file.cid) { const { path } = ipfsImportHandler.getIpfsPathAndNativeAddress(file.cid) - const preloadUrl = resolveToPublicUrl(`${path}#${redirectOptOutHint}`) + const preloadUrl = await resolveToPublicUrl(`${path}#${redirectOptOutHint}`) try { await fetch(preloadUrl, { method: 'HEAD' }) log('successfully preloaded', file) diff --git a/add-on/src/lib/ipfs-path.js b/add-on/src/lib/ipfs-path.js index 06b012755..5e3fe1ae8 100644 --- a/add-on/src/lib/ipfs-path.js +++ b/add-on/src/lib/ipfs-path.js @@ -163,7 +163,7 @@ export function createIpfsPathValidator (getState, getIpfs, dnslinkResolver) { const ipfsPathValidator = { // Test if URL is a Public IPFS resource // (pass validIpfsOrIpns(url) and not at the local gateway or API) - publicIpfsOrIpnsResource (url) { + async publicIpfsOrIpnsResource (url) { // exclude custom gateway and api, otherwise we have infinite loops const { gwURL, apiURL } = getState() if (!sameGateway(url, gwURL) && !sameGateway(url, apiURL)) { @@ -174,7 +174,7 @@ export function createIpfsPathValidator (getState, getIpfs, dnslinkResolver) { // Test if URL or a path is a valid IPFS resource // (IPFS needs to be a CID, IPNS can be PeerId or have dnslink entry) - validIpfsOrIpns (urlOrPath) { + async validIpfsOrIpns (urlOrPath) { // normalize input to a content path const path = ipfsContentPath(urlOrPath) if (!path) return false @@ -197,7 +197,7 @@ export function createIpfsPathValidator (getState, getIpfs, dnslinkResolver) { } // then see if there is an DNSLink entry for 'ipnsRoot' hostname // TODO: use dnslink cache only - if (dnslinkResolver.readAndCacheDnslink(ipnsRoot)) { + if (await dnslinkResolver.readAndCacheDnslink(ipnsRoot)) { // console.log('==> IPNS for FQDN with valid dnslink: ', ipnsRoot) return true } @@ -235,7 +235,7 @@ export function createIpfsPathValidator (getState, getIpfs, dnslinkResolver) { // The purpose of this resolver is to always return a meaningful, publicly // accessible URL that can be accessed without the need of IPFS client. // TODO: add Local version - resolveToPublicUrl (urlOrPath) { + async resolveToPublicUrl (urlOrPath) { const { pubSubdomainGwURL, pubGwURLString } = getState() const input = urlOrPath @@ -243,7 +243,7 @@ export function createIpfsPathValidator (getState, getIpfs, dnslinkResolver) { if (input.startsWith('ipns://')) { const dnslinkUrl = new URL(input) dnslinkUrl.protocol = 'https:' - const dnslink = dnslinkResolver.readAndCacheDnslink(dnslinkUrl.hostname) + const dnslink = await dnslinkResolver.readAndCacheDnslink(dnslinkUrl.hostname) if (dnslink) { return dnslinkUrl.toString() } @@ -267,7 +267,7 @@ export function createIpfsPathValidator (getState, getIpfs, dnslinkResolver) { const { id: ipnsId } = subdomainPatternMatch(url) if (!isIPFS.cid(ipnsId)) { // Confirm DNSLink record is present and its not a false-positive - const dnslink = dnslinkResolver.readAndCacheDnslink(ipnsId) + const dnslink = await dnslinkResolver.readAndCacheDnslink(ipnsId) if (dnslink) { // return URL to DNSLink hostname (FQDN without any suffix) url.hostname = ipnsId @@ -382,7 +382,7 @@ export function createIpfsPathValidator (getState, getIpfs, dnslinkResolver) { const fqdn = rawPath.replace(/^.*\/ipns\/([^/]+).*/, '$1') if (err.message === 'resolve non-IPFS names is not implemented' && isFQDN(fqdn)) { // js-ipfs without dnslink support, fallback to the value read from DNSLink - const dnslink = dnslinkResolver.readAndCacheDnslink(fqdn) + const dnslink = await dnslinkResolver.readAndCacheDnslink(fqdn) if (dnslink) { // swap problematic /ipns/{fqdn} with /ipfs/{cid} and retry lookup const safePath = trimDoubleSlashes(rawPath.replace(/^.*(\/ipns\/[^/]+)/, dnslink)) diff --git a/add-on/src/lib/ipfs-request.js b/add-on/src/lib/ipfs-request.js index e20e568ff..c058f49fc 100644 --- a/add-on/src/lib/ipfs-request.js +++ b/add-on/src/lib/ipfs-request.js @@ -65,29 +65,29 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida // Returns a canonical hostname representing the site from url // Main reason for this is unwrapping DNSLink from local subdomain // .ipns.localhost → - const findSiteFqdn = (url) => { + const findSiteFqdn = async (url) => { if (isIPFS.ipnsSubdomain(url)) { // convert subdomain's .ipns.gateway.tld to - const fqdn = dnslinkResolver.findDNSLinkHostname(url) + const fqdn = await dnslinkResolver.findDNSLinkHostname(url) if (fqdn) return fqdn } return new URL(url).hostname } // Finds canonical hostname of request.url and its parent page (if present) - const findSiteHostnames = (request) => { + const findSiteHostnames = async (request) => { const { url, originUrl, initiator } = request - const fqdn = findSiteFqdn(url) + const fqdn = await findSiteFqdn(url) // FF: originUrl (Referer-like Origin URL), Chrome: initiator (just Origin) const parentUrl = originUrl || initiator // String value 'null' is explicitly set by Chromium in some contexts const parentFqdn = parentUrl && parentUrl !== 'null' && url !== parentUrl - ? findSiteFqdn(parentUrl) + ? await findSiteFqdn(parentUrl) : null return { fqdn, parentFqdn } } - const preNormalizationSkip = (state, request) => { + const preNormalizationSkip = async (state, request) => { // skip requests to the custom gateway or API (otherwise we have too much recursion) if (sameGateway(request.url, state.gwURL) || sameGateway(request.url, state.apiURL)) { ignore(request.requestId) @@ -102,7 +102,7 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida } // skip if a per-site opt-out exists - const { fqdn, parentFqdn } = findSiteHostnames(request) + const { fqdn, parentFqdn } = await findSiteHostnames(request) const triggerOptOut = (optout) => { // Disable optout on canonical public gateway if (fqdn === 'gateway.ipfs.io') return false @@ -138,14 +138,14 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida // browser.webRequest.onBeforeRequest // This event is triggered when a request is about to be made, and before headers are available. // This is a good place to listen if you want to cancel or redirect the request. - onBeforeRequest (request) { + async onBeforeRequest (request) { const state = getState() if (!state.active) return // When local IPFS node is unreachable , show recovery page where user can redirect // to public gateway. if (!state.nodeActive && request.type === 'main_frame' && sameGateway(request.url, state.gwURL)) { - const publicUri = ipfsPathValidator.resolveToPublicUrl(request.url, state.pubGwURLString) + const publicUri = await ipfsPathValidator.resolveToPublicUrl(request.url, state.pubGwURLString) return { redirectUrl: `${dropSlash(runtimeRoot)}${recoveryPagePath}#${encodeURIComponent(publicUri)}` } } @@ -163,7 +163,7 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida } // early sanity checks - if (preNormalizationSkip(state, request)) { + if (await preNormalizationSkip(state, request)) { return } // poor-mans protocol handlers - https://github.com/ipfs/ipfs-companion/issues/164#issuecomment-328374052 @@ -188,13 +188,13 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida return } // Detect valid /ipfs/ and /ipns/ on any site - if (ipfsPathValidator.publicIpfsOrIpnsResource(request.url) && isSafeToRedirect(request, runtime)) { + if (await ipfsPathValidator.publicIpfsOrIpnsResource(request.url) && isSafeToRedirect(request, runtime)) { return redirectToGateway(request, request.url, state, ipfsPathValidator, runtime) } // Detect dnslink using heuristics enabled in Preferences if (state.dnslinkPolicy && dnslinkResolver.canLookupURL(request.url)) { if (state.dnslinkRedirect) { - const dnslinkAtGw = dnslinkResolver.dnslinkAtGateway(request.url) + const dnslinkAtGw = await dnslinkResolver.dnslinkAtGateway(request.url) if (dnslinkAtGw && isSafeToRedirect(request, runtime)) { return redirectToGateway(request, dnslinkAtGw, state, ipfsPathValidator, runtime) } @@ -293,7 +293,7 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida // browser.webRequest.onHeadersReceived // Fired when the HTTP response headers associated with a request have been received. // You can use this event to modify HTTP response headers or do a very late redirect. - onHeadersReceived (request) { + async onHeadersReceived (request) { const state = getState() if (!state.active) return @@ -308,7 +308,7 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida if (runtime.requiresXHRCORSfix && onHeadersReceivedRedirect.has(request.requestId)) { onHeadersReceivedRedirect.delete(request.requestId) if (state.dnslinkPolicy) { - const dnslinkAtGw = dnslinkResolver.dnslinkAtGateway(request.url) + const dnslinkAtGw = await dnslinkResolver.dnslinkAtGateway(request.url) if (dnslinkAtGw) { return redirectToGateway(request, dnslinkAtGw, state, ipfsPathValidator, runtime) } @@ -334,8 +334,8 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida // so we force dnslink lookup to pre-populate dnslink cache // in a way that works even when state.dnslinkPolicy !== 'enabled' // All the following requests will be upgraded to IPNS - const cachedDnslink = dnslinkResolver.readAndCacheDnslink(new URL(request.url).hostname) - const dnslinkAtGw = dnslinkResolver.dnslinkAtGateway(request.url, cachedDnslink) + const cachedDnslink = await dnslinkResolver.readAndCacheDnslink(new URL(request.url).hostname) + const dnslinkAtGw = await dnslinkResolver.dnslinkAtGateway(request.url, cachedDnslink) // redirect only if local node is around, as we can't guarantee DNSLink support // at a public subdomain gateway (requires more than 1 level of wildcard TLS certs) if (dnslinkAtGw && state.localGwAvailable) { @@ -374,7 +374,7 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida // Fired when a request could not be processed due to an error on network level. // For example: TCP timeout, DNS lookup failure // NOTE: this is executed only if webRequest.ResourceType='main_frame' - onErrorOccurred (request) { + async onErrorOccurred (request) { const state = getState() if (!state.active) return @@ -403,9 +403,9 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida // Check if error can be recovered via DNSLink if (isRecoverableViaDNSLink(request, state, dnslinkResolver)) { const { hostname } = new URL(request.url) - const dnslink = dnslinkResolver.readAndCacheDnslink(hostname) + const dnslink = await dnslinkResolver.readAndCacheDnslink(hostname) if (dnslink) { - const redirectUrl = dnslinkResolver.dnslinkAtGateway(request.url, dnslink) + const redirectUrl = await dnslinkResolver.dnslinkAtGateway(request.url, dnslink) log(`onErrorOccurred: attempting to recover from network error (${request.error}) using dnslink for ${request.url} → ${redirectUrl}`, request) // We are unable to redirect in onErrorOccurred, but we can update the tab return updateTabWithURL(request, redirectUrl, browser) @@ -419,8 +419,8 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida // Check if error can be recovered by opening same content-addresed path // using active gateway (public or local, depending on redirect state) - if (isRecoverable(request, state, ipfsPathValidator)) { - const redirectUrl = ipfsPathValidator.resolveToPublicUrl(request.url) + if (await isRecoverable(request, state, ipfsPathValidator)) { + const redirectUrl = await ipfsPathValidator.resolveToPublicUrl(request.url) log(`onErrorOccurred: attempting to recover from network error (${request.error}) for ${request.url} → ${redirectUrl}`, request) // We are unable to redirect in onErrorOccurred, but we can update the tab return updateTabWithURL(request, redirectUrl, browser) @@ -430,7 +430,7 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida // browser.webRequest.onCompleted // Fired when HTTP request is completed (successfully or with an error code) // NOTE: this is executed only if webRequest.ResourceType='main_frame' - onCompleted (request) { + async onCompleted (request) { const state = getState() if (!state.active) return if (request.statusCode === 200) return // finish if no error to recover from @@ -450,8 +450,8 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida return browser.tabs.update(request.tabId, { url: fixedUrl }) } - if (isRecoverable(request, state, ipfsPathValidator)) { - const redirectUrl = ipfsPathValidator.resolveToPublicUrl(request.url) + if (await isRecoverable(request, state, ipfsPathValidator)) { + const redirectUrl = await ipfsPathValidator.resolveToPublicUrl(request.url) log(`onCompleted: attempting to recover from HTTP Error ${request.statusCode} for ${request.url} → ${redirectUrl}`, request) return updateTabWithURL(request, redirectUrl, browser) } @@ -460,9 +460,9 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida } // Returns a string with URL at the active gateway (local or public) -function redirectToGateway (request, url, state, ipfsPathValidator, runtime) { +async function redirectToGateway (request, url, state, ipfsPathValidator, runtime) { const { resolveToPublicUrl, resolveToLocalUrl } = ipfsPathValidator - let redirectUrl = state.localGwAvailable ? resolveToLocalUrl(url) : resolveToPublicUrl(url) + let redirectUrl = await (state.localGwAvailable ? resolveToLocalUrl(url) : resolveToPublicUrl(url)) // SUBRESOURCE ON HTTPS PAGE: THE WORKAROUND EXTRAVAGANZA // ------------------------------------------------------ \o/ @@ -624,7 +624,7 @@ function normalizedUnhandledIpfsProtocol (request, pubGwUrl) { // =================================================================== // Recovery check for onErrorOccurred (request.error) and onCompleted (request.statusCode) -function isRecoverable (request, state, ipfsPathValidator) { +async function isRecoverable (request, state, ipfsPathValidator) { // Note: we are unable to recover default public gateways without a local one const { error, statusCode, url } = request const { redirect, localGwAvailable, pubGwURL, pubSubdomainGwURL } = state @@ -632,7 +632,7 @@ function isRecoverable (request, state, ipfsPathValidator) { request.type === 'main_frame' && (recoverableNetworkErrors.has(error) || recoverableHttpError(statusCode)) && - ipfsPathValidator.publicIpfsOrIpnsResource(url) && + await ipfsPathValidator.publicIpfsOrIpnsResource(url) && ((redirect && localGwAvailable) || (!sameGateway(url, pubGwURL) && !sameGateway(url, pubSubdomainGwURL)))) diff --git a/add-on/src/lib/telemetry.js b/add-on/src/lib/telemetry.js index 3d1932cc8..81fbb327a 100644 --- a/add-on/src/lib/telemetry.js +++ b/add-on/src/lib/telemetry.js @@ -1,3 +1,4 @@ +import browser from 'webextension-polyfill' import MetricsProvider from '@ipfs-shipyard/ignite-metrics/vanilla' import debug from 'debug' @@ -36,7 +37,8 @@ export function handleConsentFromState (state) { const ignoredViewsRegex = [] export function trackView (view, segments) { log('trackView called for view: ', view) - metricsProvider.trackView(view, ignoredViewsRegex, segments) + const { version } = browser.runtime.getManifest() + metricsProvider.trackView(view, ignoredViewsRegex, { ...segments, version }) } export const startSession = (...args) => metricsProvider.startSession(...args) diff --git a/add-on/src/options/store.js b/add-on/src/options/store.js index a5a3a0350..96d075479 100644 --- a/add-on/src/options/store.js +++ b/add-on/src/options/store.js @@ -4,6 +4,7 @@ import browser from 'webextension-polyfill' import { optionDefaults } from '../lib/options.js' import createRuntimeChecks from '../lib/runtime-checks.js' +import { handleConsentFromState, trackView } from '../lib/telemetry.js' // The store contains and mutates the state for the app export default function optionStore (state, emitter) { @@ -20,7 +21,8 @@ export default function optionStore (state, emitter) { } emitter.on('DOMContentLoaded', async () => { - browser.runtime.sendMessage({ telemetry: { trackView: 'options' } }) + handleConsentFromState(state) + trackView('options') updateStateOptions() browser.storage.onChanged.addListener(updateStateOptions) }) diff --git a/add-on/src/popup/browser-action/store.js b/add-on/src/popup/browser-action/store.js index 35d11cddf..784d39072 100644 --- a/add-on/src/popup/browser-action/store.js +++ b/add-on/src/popup/browser-action/store.js @@ -7,6 +7,7 @@ import { browserActionFilesCpImportCurrentTab } from '../../lib/ipfs-import.js' import { ipfsContentPath } from '../../lib/ipfs-path.js' import { welcomePage, optionsPage } from '../../lib/constants.js' import { contextMenuViewOnGateway, contextMenuCopyAddressAtPublicGw, contextMenuCopyPermalink, contextMenuCopyRawCid, contextMenuCopyCanonicalAddress, contextMenuCopyCidAddress } from '../../lib/context-menus.js' +import { endSession, handleConsentFromState, startSession, trackView } from '../../lib/telemetry.js' // The store contains and mutates the state for the app export default (state, emitter) => { @@ -38,7 +39,8 @@ export default (state, emitter) => { let port emitter.on('DOMContentLoaded', async () => { - browser.runtime.sendMessage({ telemetry: { trackView: 'browser-action' } }) + handleConsentFromState(state) + trackView('browser-action') // initial render with status stub emitter.emit('render') @@ -205,6 +207,7 @@ export default (state, emitter) => { const prev = state.active state.active = !prev if (!state.active) { + endSession() state.gatewayAddress = state.pubGwURLString state.ipfsApiUrl = null state.gatewayVersion = null @@ -213,6 +216,8 @@ export default (state, emitter) => { } try { await browser.storage.local.set({ active: state.active }) + startSession() + handleConsentFromState(state) } catch (error) { console.error(`Unable to update global Active flag due to ${error}`) state.active = prev @@ -230,8 +235,7 @@ export default (state, emitter) => { } else { state.gatewayAddress = status.pubGwURLString } - // Import requires access to the background page (https://github.com/ipfs-shipyard/ipfs-companion/issues/477) - state.isApiAvailable = state.active && !!(await getBackgroundPage()) && !browser.extension.inIncognitoContext // https://github.com/ipfs-shipyard/ipfs-companion/issues/243 + state.isApiAvailable = state.active && !browser.extension.inIncognitoContext // https://github.com/ipfs-shipyard/ipfs-companion/issues/243 state.swarmPeers = !state.active || status.peerCount === -1 ? null : status.peerCount state.isIpfsOnline = state.active && status.peerCount > -1 state.gatewayVersion = state.active && status.gatewayVersion ? status.gatewayVersion : null @@ -246,7 +250,3 @@ export default (state, emitter) => { } } } - -function getBackgroundPage () { - return browser.runtime.getBackgroundPage() -} diff --git a/add-on/src/popup/quick-import.js b/add-on/src/popup/quick-import.js index 24c310d17..ec6ee07c5 100644 --- a/add-on/src/popup/quick-import.js +++ b/add-on/src/popup/quick-import.js @@ -3,15 +3,17 @@ import './quick-import.css' -import browser from 'webextension-polyfill' import choo from 'choo' import html from 'choo/html/index.js' -import logo from './logo.js' -import * as externalApiClient from '../lib/ipfs-client/external.js' -import { formatImportDirectory } from '../lib/ipfs-import.js' -import all from 'it-all' import drop from 'drag-and-drop-files' import { filesize } from 'filesize' +import all from 'it-all' +import browser from 'webextension-polyfill' +import * as externalApiClient from '../lib/ipfs-client/external.js' +import createIpfsCompanion from '../lib/ipfs-companion.js' +import { formatImportDirectory } from '../lib/ipfs-import.js' +import { handleConsentFromState, trackView } from '../lib/telemetry.js' +import logo from './logo.js' document.title = browser.i18n.getMessage('quickImport_page_title') @@ -48,7 +50,8 @@ function quickImportStore (state, emitter) { let port emitter.on('DOMContentLoaded', async () => { - browser.runtime.sendMessage({ telemetry: { trackView: 'quick-import' } }) + handleConsentFromState(state) + trackView('quick-import') // initialize connection to the background script which will trigger UI updates port = browser.runtime.connect({ name: 'browser-action-port' }) port.onMessage.addListener(async (message) => { @@ -73,7 +76,7 @@ function quickImportStore (state, emitter) { async function processFiles (state, emitter, files) { console.log('Processing files', files) - const { ipfsCompanion } = await browser.runtime.getBackgroundPage() + const ipfsCompanion = await createIpfsCompanion(true) try { console.log('importing files', files) if (!files.length) { diff --git a/add-on/src/recovery/recovery.js b/add-on/src/recovery/recovery.js index e749123f8..18b433f72 100644 --- a/add-on/src/recovery/recovery.js +++ b/add-on/src/recovery/recovery.js @@ -7,6 +7,7 @@ import browser, { i18n, runtime } from 'webextension-polyfill' import { nodeOffSvg } from '../landing-pages/welcome/page.js' import createWelcomePageStore from '../landing-pages/welcome/store.js' import { optionsPage } from '../lib/constants.js' +import { handleConsentFromState, trackView } from '../lib/telemetry.js' import './recovery.css' const app = choo() @@ -19,7 +20,8 @@ const optionsPageLink = html` { - browser.runtime.sendMessage({ telemetry: { trackView: 'recovery' } }) + handleConsentFromState(state) + trackView('recovery') const { hash } = window.location const { href: publicURI } = new URL(decodeURIComponent(hash.slice(1))) diff --git a/package-lock.json b/package-lock.json index 2bfa79cf5..3e37e56ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,10 +1,12 @@ { "name": "ipfs-companion", + "version": "2.22.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ipfs-companion", + "version": "2.22.1", "license": "CC0-1.0", "dependencies": { "@ipfs-shipyard/ignite-metrics": "1.3.0", @@ -43,6 +45,7 @@ "abort-controller": "3.0.0", "babel-loader": "9.1.0", "babel-plugin-syntax-async-generators": "6.13.0", + "bufferutil": "^4.0.7", "c8": "7.12.0", "chai": "4.3.7", "cross-env": "7.0.3", @@ -52,6 +55,9 @@ "file-loader": "6.2.0", "fs-promise": "2.0.3", "get-firefox": "5.0.0", + "global": "^4.4.0", + "http-browserify": "^1.7.0", + "https-browserify": "^1.0.0", "ignore-loader": "0.1.2", "ignore-styles": "5.0.1", "ipfs-core": "0.17.0", @@ -63,6 +69,7 @@ "npm-run-all": "4.1.5", "patch-package": "6.5.0", "path": "0.12.7", + "process": "^0.11.10", "raw-loader": "4.0.2", "request-progress": "3.0.0", "selenium-webdriver": "^4.7.1", @@ -78,6 +85,7 @@ "ts-standard": "^12.0.2", "typescript": "^4.9.4", "url": "0.11.0", + "utf-8-validate": "^5.0.10", "web-ext": "7.3.1", "webpack": "5.75.0", "webpack-bundle-analyzer": "4.7.0", @@ -87,8 +95,7 @@ "engines": { "node": ">=18.12.1", "npm": ">=8.19.2" - }, - "version": "2.22.1" + } }, "node_modules/@achingbrain/ip-address": { "version": "8.1.0", @@ -2483,16 +2490,22 @@ }, "node_modules/@ipfs-shipyard/ignite-metrics": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ipfs-shipyard/ignite-metrics/-/ignite-metrics-1.3.0.tgz", - "integrity": "sha512-EKBgBHqIXIl82wlKN3pdIpOLC87cpIPtm7yrTGE8wSRsDe2ASEhu5wzbYYJ6InvtVA6AZsZ280VIuOubOG2usA==", + "resolved": "file:../ignite-metrics", + "license": "Apache-2.0 OR MIT", "dependencies": { + "child_process": "^1.0.2", + "cluster": "^0.7.7", "countly-sdk-nodejs": "^22.6.0", "countly-sdk-web": "^22.6.4", + "dgram": "^1.0.1", + "dns": "^0.2.2", "esbuild-css-modules-plugin": "^2.7.0", + "net": "^1.0.2", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.6.2", - "styled-components": "^5.3.6" + "styled-components": "^5.3.6", + "tty": "^1.0.1" }, "engines": { "node": ">=16.0.0", @@ -5571,6 +5584,26 @@ "node": ">=12" } }, + "node_modules/accepts": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.0.7.tgz", + "integrity": "sha512-iq8ew2zitUlNcUca0wye3fYwQ6sSPItDo38oC0R+XA5KTzeXRN+GF7NjOXs3dVItj4J+gQVdpq4/qbnMb1hMHw==", + "dependencies": { + "mime-types": "~1.0.0", + "negotiator": "0.4.7" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/accepts/node_modules/mime-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz", + "integrity": "sha512-echfutj/t5SoTL4WZpqjA1DCud1XO0WQF3/GJ48YBmc4ZMhCK77QA6Z/w6VTQERLKuJ4drze3kw2TUT8xZXVNw==", + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -6340,6 +6373,11 @@ "node": ">=6.0" } }, + "node_modules/after": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.1.tgz", + "integrity": "sha512-SuI3vWhCFeSmkmmJ3efyuOkrhGyp/AuHthh3F5DinGYh2kR9t/0xUlm3/Vn2qMScfgg+cKho5fW7TUEYUhYeiA==" + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -6558,6 +6596,14 @@ "node": ">=0.10.0" } }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/array-from": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", @@ -6656,6 +6702,11 @@ "get-intrinsic": "^1.1.3" } }, + "node_modules/arraybuffer.slice": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", + "integrity": "sha512-6ZjfQaBSy6CuIH0+B0NrxMfDE5VIOCP/5gOqSpEIsaAZx9/giszzrXg6PZ7G51U/n88UmlAgYLNQ9wAnII7PJA==" + }, "node_modules/arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -6689,7 +6740,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, "engines": { "node": ">=0.8" } @@ -6753,6 +6803,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/aws-sign": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/aws-sign/-/aws-sign-0.2.0.tgz", + "integrity": "sha512-6P7/Ls5F6++DsKu7iacris7qq/AZSWaX+gT4dtSyUxM82ePxWxaP7Slo82ZO3ZTx6GSKxQHAQlmFvM8e+Dd8ZA==", + "engines": { + "node": "*" + } + }, "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -6871,6 +6929,20 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha512-reGEWshDmTDQDsCec/HduOO9Wyj6yMOupMfhIf3ugN1TDlK2NQW4DDJSqNNtp380SNcvRfXtO8HSCQot0d0SMw==", + "dev": true + }, + "node_modules/base64-arraybuffer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz", + "integrity": "sha512-ewBKKVVPIl78B26mYQHYlaxR7NydMiD/GxwLNIwTAfLIE4xhN2Gxcy30//azq5UrejXjzGpWjcBu3NUJxzMMzg==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -6890,6 +6962,19 @@ } ] }, + "node_modules/base64id": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz", + "integrity": "sha512-DSjtfjhAsHl9J4OJj7e4+toV2zqxJrGwVd3CLlsCp8QmicvOn7irG0Mb8brOc/nur3SdO8lIbNlY1s1ZDJdUKQ==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/basic-auth": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.0.0.tgz", + "integrity": "sha512-qzxS7/bW/LSiKZzdZw3isPjiVmzXbJLM3ImZZ62WMR3oJQAyqy094Nnb0TA2ZZm65xB7nu0acfTQ99z7wwCDCw==" + }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -6909,6 +6994,17 @@ "platform": "^1.3.3" } }, + "node_modules/better-assert": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha512-bYeph2DFlpK1XmGs6fvlLRUN29QISM3GBuUwSFsMY2XRx4AvC0WNCS57j4c/xGrK2RS24C1w3YoBOsw9fT46tQ==", + "dependencies": { + "callsite": "1.0.0" + }, + "engines": { + "node": "*" + } + }, "node_modules/big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -6927,6 +7023,14 @@ "node": ">=8" } }, + "node_modules/binaryheap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/binaryheap/-/binaryheap-0.0.3.tgz", + "integrity": "sha512-9JFb4Yt5R9FZwbJaxOayF+T5sxn5eiU2NA9/LOeI1g2FUFRTdxpdmWppikO4O5AbNze8s0sL6ZuFxB1y4Ay8GA==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/bl": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", @@ -6952,6 +7056,11 @@ "node": ">= 6" } }, + "node_modules/blob": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.2.tgz", + "integrity": "sha512-BoCcDt8zBGShn6DawAGQw37s9SSs+fEjiZWDzyB+841PbOogcR2X7LGlM4sR3Zsiq/zoyl8MFWDfN6oDSlveBQ==" + }, "node_modules/blob-to-it": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/blob-to-it/-/blob-to-it-2.0.0.tgz", @@ -7054,12 +7163,109 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, + "node_modules/boom": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-0.3.1.tgz", + "integrity": "sha512-xWrlXnkK46TjEW7HU5G39AXWuG5aiHz3++zk3bBzF4mfnVCkpcYbwsnLUqMmfZNgPEYS/AI8MH+vmJxH5Kz0PA==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "dependencies": { + "hoek": "0.4.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/boom/node_modules/hoek": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.4.2.tgz", + "integrity": "sha512-Yj/N2TCrS0d8jvZgUpq9sDNt8/ABwTxPJW4+8QT0KXCMxOtRfUCUTEZEYyvMSgfDT3MGvwgO+NHfWPobagAIug==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/boxen": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", @@ -7333,6 +7539,30 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "node_modules/buffercursor": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/buffercursor/-/buffercursor-0.0.12.tgz", + "integrity": "sha512-Z+6Jm/eW6ITeqcFQKVXX7LYIGk7rENqCKHJ4CbWfJMeLpQZJj1v70WehkLmp+1kFN/QyCgpQ3Z0dKUHAwSbf9w==", + "dependencies": { + "verror": "^1.4.0" + }, + "engines": { + "node": ">= 0.5.0" + } + }, + "node_modules/bufferutil": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/builtins": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", @@ -7572,6 +7802,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ==", + "engines": { + "node": "*" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -7762,6 +8000,11 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/child_process": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/child_process/-/child_process-1.0.2.tgz", + "integrity": "sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g==" + }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -8112,6 +8355,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cluster": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/cluster/-/cluster-0.7.7.tgz", + "integrity": "sha512-16LzEZSoBUgRHSN7NA46ntGnI9tf0NnxTm3KCDvHd6aj4EsBqUbYDN3ImCfjYegBXJZiutULF5rWkcRusMIozQ==", + "dependencies": { + "log": ">= 1.2.0", + "mkdirp": ">= 0.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -8140,6 +8395,14 @@ "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, + "node_modules/colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha512-OsSVtHK8Ir8r3+Fxw/b4jS1ZLPXkV6ZxDRJQzeD7qo0SqMXWrHDM71DgYzPMHY8SFJ0Ao+nNU2p1MmwdzKqPrw==", + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/columnify": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.6.0.tgz", @@ -8207,12 +8470,22 @@ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, + "node_modules/component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==" + }, "node_modules/component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", "dev": true }, + "node_modules/component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -8274,6 +8547,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/connect": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.0.2.tgz", + "integrity": "sha512-k3kqw6T2Fc5ihvh5VVjwuJHA++qvh0/rPfe2GkJ5QNSQ9tRigQXMjtX2CYf73KZFe4+IV3HfQ3VR3W+nkt0eWQ==", + "dependencies": { + "debug": "1.0.3", + "finalhandler": "0.0.2", + "parseurl": "~1.1.3", + "utils-merge": "1.0.0" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/connect/node_modules/debug": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.3.tgz", + "integrity": "sha512-MltK7Ykj/udtD728gD/RrONStwVnDpBNIP1h+CBcnwnJdHqHxfWHI1E8XLootUl7NOPAYTCCXlb8/Qmy7WyB1w==", + "dependencies": { + "ms": "0.6.2" + } + }, + "node_modules/connect/node_modules/ms": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz", + "integrity": "sha512-/pc3eh7TWorTtbvXg8je4GvrvEqCfH7PA3P7iW01yL2E53FKixzgMBaQi0NOPbMJqY34cBSvR0tZtmlTkdUG4A==" + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -8286,6 +8586,17 @@ "node": ">= 0.6" } }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/convert-hrtime": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/convert-hrtime/-/convert-hrtime-5.0.0.tgz", @@ -8302,6 +8613,33 @@ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-jar": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/cookie-jar/-/cookie-jar-0.2.0.tgz", + "integrity": "sha512-yImk9AY90xjoUsN2fWHoIhVgveXqiZv7LDqUTZEzVBHyzfay8AjcJITUZpz2fTYLh6rnP+7GogiuRCo/5j2epg==", + "engines": { + "node": "*" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/cookiejar": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.3.tgz", @@ -8379,6 +8717,18 @@ "node": ">= 8" } }, + "node_modules/cryptiles": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.1.0.tgz", + "integrity": "sha512-WiOGszxSaVHd8T4hlu5Xcqs2uUYxbvotBP171ag2pLPKSwSKeTJYnzd98/YWV3jQYk/rpMHa3r01cQfN8SZrHQ==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "dependencies": { + "boom": "0.3.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/crypto-random-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", @@ -8528,6 +8878,28 @@ "node": ">=0.10.0" } }, + "node_modules/cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha512-TVF6svNzeQCOpjCqsy0/CSy8VgObG3wXusJ73xW2GbG5rGx7lC8zxDSURicsXI2UsGdi2L0QNRCi745/wUDvsA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/d/node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, "node_modules/dag-jose": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dag-jose/-/dag-jose-3.0.1.tgz", @@ -9007,6 +9379,14 @@ "node": ">= 10" } }, + "node_modules/defaultable": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/defaultable/-/defaultable-0.7.2.tgz", + "integrity": "sha512-UEaHGfefWfbnANtSlCtuAelo7HZhCbdLAQAttRDVJpQplbA1G21t/J70VGznRA4z9py2k70tTW+3ogGs5VgrcQ==", + "engines": [ + "node" + ] + }, "node_modules/defaults": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", @@ -9082,6 +9462,29 @@ "node": ">=0.10" } }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, "node_modules/detect-libc": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", @@ -9093,6 +9496,12 @@ "node": ">=0.10" } }, + "node_modules/dgram": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dgram/-/dgram-1.0.1.tgz", + "integrity": "sha512-zJVFL1EWfKtE0z2VN6qfpn/a+qG1viEzcwJA0EjtzS76ONSE3sEyWBwEbo32hS4IFw/EWVuWN+8b89aPW6It2A==", + "deprecated": "npm is holding this package for security reasons. As it's a core Node module, we will not transfer it over to other users. You may safely remove the package from your dependencies." + }, "node_modules/diff": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", @@ -9129,6 +9538,25 @@ "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", "dev": true }, + "node_modules/dns": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dns/-/dns-0.2.2.tgz", + "integrity": "sha512-dhCgBk0QglzySl2BVlIkRuk7aTqxlCe+5KhHEX5ULuco7RcB6d1zDnP5iGSs2rLdJaTc+82MxegtJtjFuueWiQ==", + "dependencies": { + "hbo-dnsd": "0.9.8", + "native-dns": "0.6.1", + "node-options": "0.0.6", + "tomahawk": "0.1.6", + "tomahawk-plugin-kv-memory-store": "0.0.3", + "winston": "0.7.3" + }, + "bin": { + "dns": "bin/dns" + }, + "engines": { + "node": ">= 0.10.0 < 0.11.0" + } + }, "node_modules/dns-over-http-resolver": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-1.2.3.tgz", @@ -9312,6 +9740,15 @@ "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", "dev": true }, + "node_modules/duration": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/duration/-/duration-0.2.2.tgz", + "integrity": "sha512-06kgtea+bGreF5eKYgI/36A6pLXggY7oR4p1pq4SmdFBn1ReOL5D8RhG64VrqfTTKNucqqtBAwEj8aB88mcqrg==", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.46" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -9343,6 +9780,11 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/ee-first": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.0.3.tgz", + "integrity": "sha512-1q/3kz+ZwmrrWpJcCCrBZ3JnBzB1BMA5EVW9nxnIP1LxDZ16Cqs9VdolqLWlExet1vU+bar3WSkAa4/YrA9bIw==" + }, "node_modules/electron-fetch": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/electron-fetch/-/electron-fetch-1.9.1.tgz", @@ -9370,6 +9812,14 @@ "node": ">=0.10.0" } }, + "node_modules/emitter": { + "version": "1.0.1", + "resolved": "http://github.com/component/emitter/archive/1.0.1.tar.gz", + "integrity": "sha512-k3Da+QreMb9waaGCHNAHox5QqxnZEYlQmvIVYwQibrI6OpIRyIIyFGgDV5dXRLr1AJ32JLqEh0VxQEq20dFskw==", + "dependencies": { + "indexof": "0.0.1" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -9385,6 +9835,17 @@ "node": ">= 4" } }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/encoding": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", @@ -9403,6 +9864,17 @@ "once": "^1.4.0" } }, + "node_modules/engine.io": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-1.3.1.tgz", + "integrity": "sha512-fjnHWC9SLPoygMp6pqwoxmNkDDdYme4eCRTBTZLmEtGZETCpUEgSwoQjSgyj7IyIjqninKRF+2VeEV2kOniUFQ==", + "dependencies": { + "base64id": "0.1.0", + "debug": "0.6.0", + "engine.io-parser": "1.0.6", + "ws": "0.4.31" + } + }, "node_modules/engine.io-client": { "version": "6.2.3", "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.2.3.tgz", @@ -9446,6 +9918,57 @@ "node": ">=10.0.0" } }, + "node_modules/engine.io/node_modules/commander": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", + "integrity": "sha512-0fLycpl1UMTGX257hRsu/arL/cUbcvQM4zMKwvLvzXtfdezIV4yotPS2dYtknF+NmEfWSoCEF6+hj9XLm/6hEw==", + "engines": { + "node": ">= 0.4.x" + } + }, + "node_modules/engine.io/node_modules/debug": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.6.0.tgz", + "integrity": "sha512-2vIZf67+gMicLu8McscD1NNhMWbiTSJkhlByoTA1Gw54zOb/9IlxylYG+Kr9z1X2wZTHh1AMSp+YiMjYtLkVUA==", + "engines": { + "node": "*" + } + }, + "node_modules/engine.io/node_modules/engine.io-parser": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.0.6.tgz", + "integrity": "sha512-ipbmiNj4OfAL9csof0FlI9L2jkU/lgcUphHjnTDo1KABsA21WtsVy/1OjhCj8xxhNIHtxEZ3/t7uB45gEMhD4g==", + "dependencies": { + "after": "0.8.1", + "arraybuffer.slice": "0.0.6", + "base64-arraybuffer": "0.1.2", + "blob": "0.0.2", + "utf8": "2.0.0" + } + }, + "node_modules/engine.io/node_modules/nan": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-0.3.2.tgz", + "integrity": "sha512-V9/Pyy5Oelv6vVJP9X+dAzU3IO19j6YXrJnODHxP2h54hTvfFQGahdsQV6Ule/UukiEJk1SkQ/aUyWUm61RBQw==" + }, + "node_modules/engine.io/node_modules/ws": { + "version": "0.4.31", + "resolved": "https://registry.npmjs.org/ws/-/ws-0.4.31.tgz", + "integrity": "sha512-mWiVQ9qZGPXvLxQ4xGy58Ix5Bw0L99SB+hDT8L59bty4fbnQczaGl4YEWR7AzLQGbvPn/30r9/o41dPiSuUmYw==", + "hasInstallScript": true, + "dependencies": { + "commander": "~0.6.1", + "nan": "~0.3.0", + "options": ">=0.0.5", + "tinycolor": "0.x" + }, + "bin": { + "wscat": "bin/wscat" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/enhanced-resolve": { "version": "5.10.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", @@ -9509,6 +10032,18 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/errorhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.1.1.tgz", + "integrity": "sha512-nqVAii3wDkiowAVKDmcuwKOQ/5vsg9GfCcJxSMHgy8yiZUA3mMDpBcHnCVolDYgQ7wsC2yZQVOavR5fGHhFMkg==", + "dependencies": { + "accepts": "~1.0.4", + "escape-html": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/es-abstract": { "version": "1.20.4", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz", @@ -9579,12 +10114,36 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, "node_modules/es6-object-assign": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", @@ -9599,6 +10158,15 @@ "node": ">=6" } }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, "node_modules/esbuild": { "version": "0.17.5", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.5.tgz", @@ -9740,6 +10308,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/escape-html": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz", + "integrity": "sha512-z6kAnok8fqVTra7Yu77dZF2Y6ETJlxH58wN38wNyuNQLm8xXdKnfNrlSmfXsTePWP03rRVUKHubtUwanwUi7+g==" + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -10561,6 +11134,26 @@ "node": ">=0.10.0" } }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "node_modules/event-iterator": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-2.0.0.tgz", @@ -10643,6 +11236,178 @@ "integrity": "sha512-oBuz5SYz5zzyuHINoe9ooePwSu0xApKWgeNzok4hZ5YKXFh9zrQBEM15CXqoZkJJPuI2ArvqjPQd8UKJA753XA==", "dev": true }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/express/node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/express/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/express/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/express/node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dependencies": { + "type": "^2.7.2" + } + }, "node_modules/ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -10678,11 +11443,18 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true, "engines": [ "node >=0.6.0" ] }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -10927,6 +11699,31 @@ "node": ">=8" } }, + "node_modules/finalhandler": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.0.2.tgz", + "integrity": "sha512-SbpQfvWVwWEBlPTQyaM9gs0D5404ENTC0x2jzbb7t+P+EOD/cBlWjAAvfozIQYtOepUuNkxoLNLCK9/kS29f4w==", + "dependencies": { + "debug": "1.0.2", + "escape-html": "1.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.2.tgz", + "integrity": "sha512-T9bufXIzQvCa4VrTIpLvvwdLhH+wuBtvIJJA3xgzVcaVETGmTIWMfEXQEd1K4p8BaRmQJPn6MPut38H7YQ+iIA==", + "dependencies": { + "ms": "0.6.2" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz", + "integrity": "sha512-/pc3eh7TWorTtbvXg8je4GvrvEqCfH7PA3P7iW01yL2E53FKixzgMBaQi0NOPbMJqY34cBSvR0tZtmlTkdUG4A==" + }, "node_modules/find-cache-dir": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", @@ -10981,6 +11778,14 @@ "micromatch": "^4.0.2" } }, + "node_modules/finished": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/finished/-/finished-1.2.2.tgz", + "integrity": "sha512-HPJ8x7Gn1pmTS1zWyMoXmQ1yxHkYHRoFsBI66ONq4PS9iWBJy1iHYXOSqMWNp3ksMXfrBpenkSwBhl9WG4zr4Q==", + "dependencies": { + "ee-first": "1.0.3" + } + }, "node_modules/firefox-profile": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/firefox-profile/-/firefox-profile-4.2.2.tgz", @@ -11169,6 +11974,17 @@ "url": "https://ko-fi.com/tunnckoCore/commissions" } }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/freeport-promise": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/freeport-promise/-/freeport-promise-2.0.0.tgz", @@ -11179,6 +11995,17 @@ "npm": ">=7.0.0" } }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/from2": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", @@ -12115,6 +12942,33 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-binary-data": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/has-binary-data/-/has-binary-data-0.1.1.tgz", + "integrity": "sha512-XqIrqIgPlA2gxvHKudDsLJt8Xu8B4DvkHyUWGmLWYOAO0rFOL94Ds4NSveSZ1fCjWX22tQgIiRpDKAETex8GCQ==", + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/has-binary-data/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "node_modules/has-cors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.0.3.tgz", + "integrity": "sha512-Mxk1ba23PNtB3zPigreijApS3uuH9bhgZkqQtLQj7ydWHsGeb9uOtk4gsK6mZj4rYG6VNS/CT9G1XkYfgItpKg==", + "dependencies": { + "global": "https://github.com/component/global/archive/v2.0.1.tar.gz" + } + }, + "node_modules/has-cors/node_modules/global": { + "version": "2.0.1", + "resolved": "https://github.com/component/global/archive/v2.0.1.tar.gz", + "integrity": "sha512-O91OcV/NbdmQJPHaRu2ekSP7bqFRLWgqSwaJvqHPZHUwmHBagQYTOra29+LnzzG3lZkXH1ANzHzfCxtAPM9HMA==", + "license": "MIT" + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -12211,6 +13065,18 @@ "@hapi/sntp": "4.x.x" } }, + "node_modules/hbo-dnsd": { + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/hbo-dnsd/-/hbo-dnsd-0.9.8.tgz", + "integrity": "sha512-mIj4V7OicuAlnSfvTXopd401Ba7eFFSL2L3EmM1NqlIWe1pJ/x9dyHqfnKXnJr5qSbNFLnadXvwNd3kURNy+ug==", + "dependencies": { + "defaultable": "~0.7.2", + "optimist": "~0.3.4" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -12220,6 +13086,15 @@ "he": "bin/he" } }, + "node_modules/hoek": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.7.6.tgz", + "integrity": "sha512-z75muWk69yyjWn6nNzJP0pnfgcewtSTs7uBolGUA7kWNdCYZukzHn3sYqUirhXul7qp9WBUwNT/7ieJZNveJqg==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "engines": { + "node": "0.8.x" + } + }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -12259,12 +13134,40 @@ "entities": "^4.3.0" } }, + "node_modules/http-browserify": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz", + "integrity": "sha512-Irf/LJXmE3cBzU1eaR4+NEX6bmVLqt1wkmDiA7kBwH7zmb0D8kBAXsDmQ88hhj/qv9iEZKlyGx/hrMcFi8sOHw==", + "dev": true, + "dependencies": { + "Base64": "~0.2.0", + "inherits": "~2.0.1" + } + }, "node_modules/http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", "dev": true }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -12305,6 +13208,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", + "dev": true + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -12482,6 +13391,11 @@ "node": ">=8" } }, + "node_modules/indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==" + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -12652,7 +13566,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==", - "dev": true, "engines": { "node": ">= 10" } @@ -14949,6 +15862,12 @@ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, + "node_modules/json3": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.2.6.tgz", + "integrity": "sha512-KA+GHhYTLTo7Ri4DyjwUgW8kn98AYtVZtBC94qL5yD0ZSYct8/eF8qBmTNyk+gPE578bKeIL4WBq+MUyd1I26g==", + "deprecated": "Please use the native JSON object instead of JSON 3" + }, "node_modules/json5": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", @@ -15846,6 +16765,20 @@ "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", "dev": true }, + "node_modules/log": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/log/-/log-6.3.1.tgz", + "integrity": "sha512-McG47rJEWOkXTDioZzQNydAVvZNeEkSyLJ1VWkFwfW+o1knW+QSi8D1KjPn/TnctV+q99lkvJNe1f0E1IjfY2A==", + "dependencies": { + "d": "^1.0.1", + "duration": "^0.2.2", + "es5-ext": "^0.10.53", + "event-emitter": "^0.3.5", + "sprintf-kit": "^2.0.1", + "type": "^2.5.0", + "uni-global": "^1.0.0" + } + }, "node_modules/log-symbols": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", @@ -16049,6 +16982,17 @@ "integrity": "sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==", "dev": true }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/mem": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/mem/-/mem-5.1.1.tgz", @@ -16108,6 +17052,14 @@ "node": ">=0.10.0" } }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/merge-options": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", @@ -16330,7 +17282,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -16637,6 +17588,33 @@ "node": "*" } }, + "node_modules/morgan": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.2.0.tgz", + "integrity": "sha512-VrasIzA69dsxJm1+MVWTLTiij3kiG33XPfGiexqstHpcSvSu/Z51W+FGQyIlbc3jZZuF2PFujsjw+YQvpXz3UA==", + "dependencies": { + "basic-auth": "1.0.0", + "bytes": "1.0.0", + "depd": "0.4.2", + "finished": "~1.2.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/morgan/node_modules/bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ==" + }, + "node_modules/morgan/node_modules/depd": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-0.4.2.tgz", + "integrity": "sha512-tG4S/hTtpA6stvb9Li65vWHrCblQ/oSN/UI90RKIA3wMk3N9lR1k/dCs8NKKNAy7UXD0+1/dUqhiaBuMatVNAQ==", + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/mortice": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mortice/-/mortice-3.0.1.tgz", @@ -17104,6 +18082,43 @@ "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==", "dev": true }, + "node_modules/native-dns": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/native-dns/-/native-dns-0.6.1.tgz", + "integrity": "sha512-svX0dstdoFeEO1sD1Kkrrj/Ad7QfHuczp2YpRnBpjJHqh0dpYLZhLERbf76S6LMkLAT5eZ8tJrPwZciIX5pj6Q==", + "dependencies": { + "ipaddr.js": ">= 0.1.1", + "native-dns-cache": ">= 0.0.1", + "native-dns-packet": ">= 0.0.4" + }, + "engines": { + "node": ">= 0.5.0" + } + }, + "node_modules/native-dns-cache": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/native-dns-cache/-/native-dns-cache-0.0.2.tgz", + "integrity": "sha512-09HXHdb/updxfigaFbR53F8nCKqxM8WuHfTWBsusVlwSSZZ3qwWRdD6Kx2x8HBI1Q5IaycwcJOvBoXZWJNfVEg==", + "dependencies": { + "binaryheap": ">= 0.0.3", + "native-dns-packet": ">= 0.0.1" + }, + "engines": { + "node": ">= 0.5.0" + } + }, + "node_modules/native-dns-packet": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/native-dns-packet/-/native-dns-packet-0.1.1.tgz", + "integrity": "sha512-j1XxnFFTUB7mujma468WyAOmyVtkuuLTelxJF13tSTIPO56X7bHALrG0G4jFQnvyTPCt4VnFiZezWpfKbaHc+g==", + "dependencies": { + "buffercursor": ">= 0.0.12", + "ipaddr.js": ">= 0.1.1" + }, + "engines": { + "node": ">= 0.5.0" + } + }, "node_modules/native-fetch": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/native-fetch/-/native-fetch-3.0.0.tgz", @@ -17134,12 +18149,25 @@ "ncp": "bin/ncp" } }, + "node_modules/negotiator": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.4.7.tgz", + "integrity": "sha512-ujxWwyRfZ6udAgHGECQC3JDO9e6UAsuItfUMcqA0Xf2OLNQTveFVFx+fHGIJ5p0MJaJrZyGQqPwzuN0NxJzEKA==", + "engines": { + "node": "*" + } + }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "node_modules/net": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/net/-/net-1.0.2.tgz", + "integrity": "sha512-kbhcj2SVVR4caaVnGLJKmlk2+f+oLkjqdKeQlmUtz6nGzOpbcobwVIeSURNgraV/v3tlmGIX82OcPCl0K6RbHQ==" + }, "node_modules/netmask": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", @@ -17149,6 +18177,11 @@ "node": ">= 0.4.0" } }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -17311,12 +18344,29 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/node-options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/node-options/-/node-options-0.0.6.tgz", + "integrity": "sha512-OrfY9+LgcLjoo2oyqxjP3gZLBuNDV1IblF69HGLdbE8JUJxSnl2kB561r41KOMc1GWLspjMSfa9L6+iW4fvYrw==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", "dev": true }, + "node_modules/node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA==", + "deprecated": "Use uuid module instead", + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/normalize-html-whitespace": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/normalize-html-whitespace/-/normalize-html-whitespace-0.2.0.tgz", @@ -17523,6 +18573,11 @@ "node": ">=0.10.0" } }, + "node_modules/object-component": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha512-S0sN3agnVh2SZNEIGc0N1X4Z5K0JeFbGBrnuZpsxuUh5XLF0BnvWkMjRXo/zGKLd/eghvNIKcx1pQkmUjXIyrA==" + }, "node_modules/object-inspect": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", @@ -17650,6 +18705,28 @@ "integrity": "sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w==", "dev": true }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-finished/node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/on-load": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/on-load/-/on-load-4.0.2.tgz", @@ -17708,6 +18785,14 @@ "opener": "bin/opener-bin.js" } }, + "node_modules/optimist": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", + "integrity": "sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ==", + "dependencies": { + "wordwrap": "~0.0.2" + } + }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -17725,6 +18810,14 @@ "node": ">= 0.8.0" } }, + "node_modules/options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "integrity": "sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -18293,6 +19386,35 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/parsejson": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.1.tgz", + "integrity": "sha512-W9CRvTfYQY/kbRc5Q6YTWarb/QDxdEGbd6RCP8CLUQDJV89RVHoS2A0dZYNtAcq31fulGNN4ZhAhiQQazwlKJg==", + "dependencies": { + "better-assert": "~1.0.0" + } + }, + "node_modules/parseqs": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz", + "integrity": "sha512-vyyyfQGUFZnDhgrrdn+hh1JuOfvbXU5oRr6dijfkSIbaFuxGgTSCA/RNVcsADmo0k2NX6wERVTMKkXokjuObJA==", + "dependencies": { + "better-assert": "~1.0.0" + } + }, + "node_modules/parseuri": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.2.tgz", + "integrity": "sha512-m0H+R0u5LXOx8sbxufnvgKrRLpkVpvtMf0AyWXYSqLwo2MWrVEgCIbgpaSVa398xl6wTLe0A7CGhiC4hBdEzHQ==", + "dependencies": { + "better-assert": "~1.0.0" + } + }, + "node_modules/parseurl": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.1.3.tgz", + "integrity": "sha512-7y9IL/9x2suvr1uIvoAc3yv3f28hZ55g2OM+ybEtnZqV6Ykeg36sy1PCsTN9rQUZYzb9lTKLzzmJM11jaXSloA==" + }, "node_modules/patch-package": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.0.tgz", @@ -18950,6 +20072,14 @@ "node": ">=4" } }, + "node_modules/pkginfo": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "integrity": "sha512-yO5feByMzAp96LtP58wvPKSbaKAi/1C4kV9XpTctr6EepnP6F33RBNOiVrdz9BrPA98U2BMFsTNHo44TWcbQ2A==", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/platform": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", @@ -19254,6 +20384,32 @@ "uint8arraylist": "^2.3.2" } }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-addr/node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -19402,12 +20558,54 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/rate-limiter-flexible": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/rate-limiter-flexible/-/rate-limiter-flexible-2.4.1.tgz", "integrity": "sha512-dgH4T44TzKVO9CLArNto62hJOwlWJMLUjVVr/ii0uUzZXEXthDNr7/yefW5z/1vvHAfycc1tnuiYyNJ8CTRB3g==", "dev": true }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/raw-loader": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz", @@ -20432,6 +21630,81 @@ "node": ">=10" } }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/send/node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/send/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "optional": true, + "peer": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -20441,6 +21714,42 @@ "randombytes": "^2.1.0" } }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-static/node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/serve-static/node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/set-delayed-interval": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/set-delayed-interval/-/set-delayed-interval-1.0.0.tgz", @@ -20453,6 +21762,14 @@ "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", "dev": true }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/sha": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/sha/-/sha-3.0.0.tgz", @@ -20761,6 +22078,73 @@ "uuid-parse": "^1.0.0" } }, + "node_modules/sntp": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-0.1.2.tgz", + "integrity": "sha512-6fsOpJYQAQcO/UeW7T9mJwEenJymdU77o+gNiompGAammlSa+C49Oyt79ta/kgVbT13l4JAuKlo8FNvUnVjvEQ==", + "deprecated": "This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", + "dependencies": { + "hoek": "0.4.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/sntp/node_modules/hoek": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.4.2.tgz", + "integrity": "sha512-Yj/N2TCrS0d8jvZgUpq9sDNt8/ABwTxPJW4+8QT0KXCMxOtRfUCUTEZEYyvMSgfDT3MGvwgO+NHfWPobagAIug==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/socket.io": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-1.0.6.tgz", + "integrity": "sha512-1x7TkMh8aKfLoXuXe5rXnDnv3xfcOFrDM6hR9z15dpZ83tTxt2NUxnpuGL2zMIAJQ4DitKiadEBvBVju5cxcHw==", + "dependencies": { + "debug": "0.7.4", + "engine.io": "1.3.1", + "has-binary-data": "0.1.1", + "socket.io-adapter": "0.2.0", + "socket.io-client": "1.0.6", + "socket.io-parser": "2.2.0" + } + }, + "node_modules/socket.io-adapter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.2.0.tgz", + "integrity": "sha512-3PlX+MOlpHiY+ZTbKhpE4i+M4u8hFUlVyqFP4K/mH+t+D9bMKATFqUUY3zWQMEo2g/1ckosURXviQw6M8R/y8A==", + "dependencies": { + "debug": "0.7.4", + "socket.io-parser": "2.1.2" + } + }, + "node_modules/socket.io-adapter/node_modules/debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha512-EohAb3+DSHSGx8carOSKJe8G0ayV5/i609OD0J2orCkuyae7SyZSz2aoLmQF2s0Pj5gITDebwPH7GFBlqOUQ1Q==", + "engines": { + "node": "*" + } + }, + "node_modules/socket.io-adapter/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "node_modules/socket.io-adapter/node_modules/socket.io-parser": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.1.2.tgz", + "integrity": "sha512-eVkt8prgw20H+4P8Iw6tis/w7leiN5EW/93Vq+KL8w+yNJu+QNgaej2Cgt8FhVCVuN3AHyLU50vXvM8cpUR1JQ==", + "dependencies": { + "debug": "0.7.4", + "emitter": "http://github.com/component/emitter/archive/1.0.1.tar.gz", + "isarray": "0.0.1", + "json3": "3.2.6" + } + }, "node_modules/socket.io-client": { "version": "4.5.3", "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.5.3.tgz", @@ -20789,6 +22173,113 @@ "node": ">=10.0.0" } }, + "node_modules/socket.io/node_modules/commander": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", + "integrity": "sha512-0fLycpl1UMTGX257hRsu/arL/cUbcvQM4zMKwvLvzXtfdezIV4yotPS2dYtknF+NmEfWSoCEF6+hj9XLm/6hEw==", + "engines": { + "node": ">= 0.4.x" + } + }, + "node_modules/socket.io/node_modules/component-emitter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", + "integrity": "sha512-YhIbp3PJiznERfjlIkK0ue4obZxt2S60+0W8z24ZymOHT8sHloOqWOqZRU2eN5OlY8U08VFsP02letcu26FilA==" + }, + "node_modules/socket.io/node_modules/debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha512-EohAb3+DSHSGx8carOSKJe8G0ayV5/i609OD0J2orCkuyae7SyZSz2aoLmQF2s0Pj5gITDebwPH7GFBlqOUQ1Q==", + "engines": { + "node": "*" + } + }, + "node_modules/socket.io/node_modules/engine.io-client": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.3.1.tgz", + "integrity": "sha512-bTOZMqAe7HXhyA/2T7Fve04b/ZZruTHSOqa+yn8U4RFSyRAVPePjopOgJOUNciEfuXo1gx850P5LzaQU28/p3w==", + "dependencies": { + "component-emitter": "1.1.2", + "component-inherit": "0.0.3", + "debug": "0.7.4", + "engine.io-parser": "1.0.6", + "has-cors": "1.0.3", + "indexof": "0.0.1", + "parsejson": "0.0.1", + "parseqs": "0.0.2", + "parseuri": "0.0.2", + "ws": "0.4.31", + "xmlhttprequest": "https://github.com/LearnBoost/node-XMLHttpRequest/archive/0f36d0b5ebc03d85f860d42a64ae9791e1daa433.tar.gz" + } + }, + "node_modules/socket.io/node_modules/engine.io-parser": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.0.6.tgz", + "integrity": "sha512-ipbmiNj4OfAL9csof0FlI9L2jkU/lgcUphHjnTDo1KABsA21WtsVy/1OjhCj8xxhNIHtxEZ3/t7uB45gEMhD4g==", + "dependencies": { + "after": "0.8.1", + "arraybuffer.slice": "0.0.6", + "base64-arraybuffer": "0.1.2", + "blob": "0.0.2", + "utf8": "2.0.0" + } + }, + "node_modules/socket.io/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "node_modules/socket.io/node_modules/nan": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-0.3.2.tgz", + "integrity": "sha512-V9/Pyy5Oelv6vVJP9X+dAzU3IO19j6YXrJnODHxP2h54hTvfFQGahdsQV6Ule/UukiEJk1SkQ/aUyWUm61RBQw==" + }, + "node_modules/socket.io/node_modules/socket.io-client": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.0.6.tgz", + "integrity": "sha512-itdtz6fQBTFIDBP4+hJox0OlT+SbCVdENjPgjMup3ehu7OsiG6t0FYBXCx+k/upt9lbeyp9BmUNNi5EfnGa5Vw==", + "dependencies": { + "component-bind": "1.0.0", + "component-emitter": "1.1.2", + "debug": "0.7.4", + "engine.io-client": "1.3.1", + "has-binary-data": "0.1.1", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseuri": "0.0.2", + "socket.io-parser": "2.2.0", + "to-array": "0.1.3" + } + }, + "node_modules/socket.io/node_modules/socket.io-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.0.tgz", + "integrity": "sha512-uW3UiLVibAyleKq8r/yZe1oPO51olhY18T6HtnN0iI6RLqJfYC0YiyAFlsPw1+8I0Z1qFd8jFLTRZo2vr6ISxA==", + "dependencies": { + "debug": "0.7.4", + "emitter": "http://github.com/component/emitter/archive/1.0.1.tar.gz", + "isarray": "0.0.1", + "json3": "3.2.6" + } + }, + "node_modules/socket.io/node_modules/ws": { + "version": "0.4.31", + "resolved": "https://registry.npmjs.org/ws/-/ws-0.4.31.tgz", + "integrity": "sha512-mWiVQ9qZGPXvLxQ4xGy58Ix5Bw0L99SB+hDT8L59bty4fbnQczaGl4YEWR7AzLQGbvPn/30r9/o41dPiSuUmYw==", + "hasInstallScript": true, + "dependencies": { + "commander": "~0.6.1", + "nan": "~0.3.0", + "options": ">=0.0.5", + "tinycolor": "0.x" + }, + "bin": { + "wscat": "bin/wscat" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/sonic-boom": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.2.0.tgz", @@ -20957,6 +22448,14 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, + "node_modules/sprintf-kit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/sprintf-kit/-/sprintf-kit-2.0.1.tgz", + "integrity": "sha512-2PNlcs3j5JflQKcg4wpdqpZ+AjhQJ2OZEo34NXDtlB0tIPG84xaaXhpA8XFacFiwjKA4m49UOYG83y3hbMn/gQ==", + "dependencies": { + "es5-ext": "^0.10.53" + } + }, "node_modules/sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -20988,6 +22487,14 @@ "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "engines": { + "node": "*" + } + }, "node_modules/standard": { "version": "16.0.4", "resolved": "https://registry.npmjs.org/standard/-/standard-16.0.4.tgz", @@ -21053,6 +22560,17 @@ "node": ">=8.10" } }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/stream-to-array": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/stream-to-array/-/stream-to-array-2.3.0.tgz", @@ -21909,6 +23427,14 @@ "node": ">= 4.5.0" } }, + "node_modules/tinycolor": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz", + "integrity": "sha512-+CorETse1kl98xg0WAzii8DTT4ABF4R3nquhrkIbVGcw1T8JYs5Gfx9xEfGINPUZGDj9C4BmOtuKeaTtuuRolg==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -21920,6 +23446,11 @@ "node": ">=8.17.0" } }, + "node_modules/to-array": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.3.tgz", + "integrity": "sha512-JQk/QMS4oHyU2VufVeyjN25dcnZnr1PV1pa1oKSj7l5tVO9WrU62og3fYzB3mrgJZZgBxdrrA/v6iZzMDuyFYw==" + }, "node_modules/to-buffer": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", @@ -21946,6 +23477,311 @@ "node": ">=8.0" } }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tomahawk": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/tomahawk/-/tomahawk-0.1.6.tgz", + "integrity": "sha512-HFLoewTx2gHD0o2t0tR+EIcDXhqdtakfZCDiYsGjOO93nYQ1i7nbhj3UL7iQdtoBbPAcEbrxeJ0KlfPOvhxFyg==", + "dependencies": { + "body-parser": "1.5.0", + "connect": "3.0.2", + "errorhandler": "1.1.1", + "express": "4.6.1", + "morgan": "1.2.0", + "node-options": "0.0.6", + "socket.io": "1.0.6", + "winston": "0.7.3" + }, + "bin": { + "tomahawk": "bin/tomahawk" + }, + "engines": { + "node": ">= 0.8.0 < 0.11.0" + } + }, + "node_modules/tomahawk-plugin-kv-memory-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tomahawk-plugin-kv-memory-store/-/tomahawk-plugin-kv-memory-store-0.0.3.tgz", + "integrity": "sha512-opt82r6s+775jmrREiWruMVTQaGQYgPd6/zYTDRwwHhDGSqpFaZZgCSnI/BAIs8nC88puTK4PyodkSRpUDp/2Q==" + }, + "node_modules/tomahawk/node_modules/body-parser": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.5.0.tgz", + "integrity": "sha512-UJfZike68QN1mdo0mA+Z0y+0qi10oxOrCPw2CZpP73O/LIfEWHDy9SHhwsME1mdk1WmnltBLddUkfBpuKPH4Ng==", + "dependencies": { + "bytes": "1.0.0", + "depd": "0.4.2", + "iconv-lite": "0.4.4", + "media-typer": "0.2.0", + "qs": "0.6.6", + "raw-body": "1.3.0", + "type-is": "~1.3.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/tomahawk/node_modules/buffer-crc32": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.3.tgz", + "integrity": "sha512-HLvoSqq1z8fJEcT1lUlJZ4OJaXJZ1wsWm0+fBxkz9Bdf/WphA4Da7FtGUguNNyEXL4WB0hNMTaWmdFRFPy8YOQ==", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ==" + }, + "node_modules/tomahawk/node_modules/cookie": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz", + "integrity": "sha512-+mHmWbhevLwkiBf7QcbZXHr0v4ZQQ/OgHk3fsQHrsMMiGzuvAmU/YMUR+ZfrO/BLAGIWFfx2Z7Oyso0tZR/wiA==", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/cookie-signature": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.4.tgz", + "integrity": "sha512-k+lrG38ZC/S7zN6l1/HcF6xF4jMwkIUjnr5afDU7tzFxIfDmKzdqJdXo8HNYaXOuBJ3tPKxSiwCOTA0b3qQfaA==" + }, + "node_modules/tomahawk/node_modules/debug": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.3.tgz", + "integrity": "sha512-MltK7Ykj/udtD728gD/RrONStwVnDpBNIP1h+CBcnwnJdHqHxfWHI1E8XLootUl7NOPAYTCCXlb8/Qmy7WyB1w==", + "dependencies": { + "ms": "0.6.2" + } + }, + "node_modules/tomahawk/node_modules/depd": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-0.4.2.tgz", + "integrity": "sha512-tG4S/hTtpA6stvb9Li65vWHrCblQ/oSN/UI90RKIA3wMk3N9lR1k/dCs8NKKNAy7UXD0+1/dUqhiaBuMatVNAQ==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/express": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.6.1.tgz", + "integrity": "sha512-nG9Y8xfzgrW/9XCr5sv+KDbtY8mZPN9HO3GziltaubpvleI+1RyHxAKvYjmFih3HkQIaPXW9ozxMHBDNf3UXng==", + "dependencies": { + "accepts": "~1.0.7", + "buffer-crc32": "0.2.3", + "cookie": "0.1.2", + "cookie-signature": "1.0.4", + "debug": "1.0.3", + "depd": "0.3.0", + "escape-html": "1.0.1", + "finalhandler": "0.0.3", + "fresh": "0.2.2", + "media-typer": "0.2.0", + "merge-descriptors": "0.0.2", + "methods": "1.1.0", + "parseurl": "~1.1.3", + "path-to-regexp": "0.1.3", + "proxy-addr": "1.0.1", + "qs": "0.6.6", + "range-parser": "1.0.0", + "send": "0.6.0", + "serve-static": "~1.3.2", + "type-is": "~1.3.2", + "utils-merge": "1.0.0", + "vary": "0.1.0" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/tomahawk/node_modules/express/node_modules/depd": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-0.3.0.tgz", + "integrity": "sha512-Uyx3FgdvEYlpA3W4lf37Ide++2qOsjLlJ7dap0tbM63j/BxTCcxmyIOO6PXbKbOuNSko+fsDHzzx1DUeo1+3fA==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/finalhandler": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.0.3.tgz", + "integrity": "sha512-/fqgssseNfnD8Y77HWyJKQ+1xbKu7bZl2LXfhFjkgeGg91WRMMO9GN1KKL53NnIG9g1H2Xq3iKrZkuIcAmjd0A==", + "dependencies": { + "debug": "1.0.3", + "escape-html": "1.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/fresh": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.2.tgz", + "integrity": "sha512-ZGGi8GROK//ijm2gB33sUuN9TjN1tC/dvG4Bt4j6IWrVGpMmudUBCxx+Ir7qePsdREfkpQC4FL8W0jeSOsgv1w==" + }, + "node_modules/tomahawk/node_modules/iconv-lite": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.4.tgz", + "integrity": "sha512-BnjNp13aZpK4WBGbmjaNHN2MCp3P850n8zd/JLinQJ8Lsnq2Br4o2467C2waMsY5kr7Z41SL1gEqh8Vbfzg15A==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/tomahawk/node_modules/ipaddr.js": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-0.1.2.tgz", + "integrity": "sha512-MGrEjHz4Hk5UVpJXZQ2tHB+bp6xgdRKCAEWdrgFsoAmXCgKAPtj8LqMxgvlWEAj9aN+PpTcvE051uZU3K3kLSQ==", + "engines": { + "node": ">= 0.2.5" + } + }, + "node_modules/tomahawk/node_modules/media-typer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.2.0.tgz", + "integrity": "sha512-TSggxYk75oP4tae7JkT8InpcFGUP4340zg1dOWjcu9qcphaDKtXEuNUv3OD4vJ+gVTvIDK797W0uYeNm8qqsDg==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/merge-descriptors": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-0.0.2.tgz", + "integrity": "sha512-dYBT4Ep+t/qnPeJcnMymmhTdd4g8/hn48ciaDqLAkfRf8abzLPS6Rb6EBdz5CZCL8tzZuI5ps9MhGQGxk+EuKg==" + }, + "node_modules/tomahawk/node_modules/methods": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.0.tgz", + "integrity": "sha512-Th88HxNePtsAmz0WjEhVVyRGv9AQFLv4z6zOj4Dt15PjsKLWB8JXSmxzP+Q27139+AXao0AlCWvonFuJhu4GuA==" + }, + "node_modules/tomahawk/node_modules/mime": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", + "integrity": "sha512-Ysa2F/nqTNGHhhm9MV8ure4+Hc+Y8AWiqUdHxsO7xu8zc92ND9f3kpALHjaP026Ft17UfxrMt95c50PLUeynBw==" + }, + "node_modules/tomahawk/node_modules/mime-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz", + "integrity": "sha512-echfutj/t5SoTL4WZpqjA1DCud1XO0WQF3/GJ48YBmc4ZMhCK77QA6Z/w6VTQERLKuJ4drze3kw2TUT8xZXVNw==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/ms": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz", + "integrity": "sha512-/pc3eh7TWorTtbvXg8je4GvrvEqCfH7PA3P7iW01yL2E53FKixzgMBaQi0NOPbMJqY34cBSvR0tZtmlTkdUG4A==" + }, + "node_modules/tomahawk/node_modules/path-to-regexp": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.3.tgz", + "integrity": "sha512-sd4vSOW+DCM6A5aRICI1CWaC7nufnzVpZfuh5T0VXshxxzFWuaFcvqKovAFLNGReOc+uZRptpcpPmn7CDvzLuA==" + }, + "node_modules/tomahawk/node_modules/proxy-addr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.1.tgz", + "integrity": "sha512-rIUGzBlSfkJMWWCgsd4N5wvVSNAcJZg//UwPZumDIbScHRUzuSOjBmIdyICiKkB9yArv+er9qC6RA/NL3AWc6A==", + "dependencies": { + "ipaddr.js": "0.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/qs": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz", + "integrity": "sha512-kN+yNdAf29Jgp+AYHUmC7X4QdJPR8czuMWLNLc0aRxkQ7tB3vJQEONKKT9ou/rW7EbqVec11srC9q9BiVbcnHA==", + "engines": { + "node": "*" + } + }, + "node_modules/tomahawk/node_modules/range-parser": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.0.tgz", + "integrity": "sha512-wOH5LIH2ZHo0P7/bwkR+aNbJ+kv3CHVX4B8qs9GqbtY29fi1bGPV5xczrutN20G+Z4XhRqRMTW3q0S4iyJJPfw==" + }, + "node_modules/tomahawk/node_modules/raw-body": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.3.0.tgz", + "integrity": "sha512-iuI1bOSi9tEmVCrXq02ZysXatTrhAu+fSo7XOQHhMo4g87dSy9YB2W/9Udwhz0bPpFk4UcoLhjrHgpPbRD3ktA==", + "dependencies": { + "bytes": "1", + "iconv-lite": "0.4.4" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/send": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.6.0.tgz", + "integrity": "sha512-A3EwHmDwcPcmLxIRNjr2YbXiYWq6M9JyUq4303pLKVFs4m5oeME0a9Cpcu9N22fED5XVepldjPYGo9eJifb7Yg==", + "dependencies": { + "debug": "1.0.3", + "depd": "0.3.0", + "escape-html": "1.0.1", + "finished": "1.2.2", + "fresh": "0.2.2", + "mime": "1.2.11", + "ms": "0.6.2", + "range-parser": "~1.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/send/node_modules/depd": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-0.3.0.tgz", + "integrity": "sha512-Uyx3FgdvEYlpA3W4lf37Ide++2qOsjLlJ7dap0tbM63j/BxTCcxmyIOO6PXbKbOuNSko+fsDHzzx1DUeo1+3fA==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/serve-static": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.3.2.tgz", + "integrity": "sha512-KwjCeYUx7IM1neg8/P0+O1DZsl76XcOSuV0ZxrI0r60vwGlcjMjKOYCK/OFLJy/a2CFuIyAa/x0PuQ0yuG+IgQ==", + "dependencies": { + "escape-html": "1.0.1", + "parseurl": "~1.1.3", + "send": "0.6.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tomahawk/node_modules/type-is": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.3.2.tgz", + "integrity": "sha512-sdIhnvhWEyIP2DKjj1o9tL31m8vFxDfLPD56KXz2absqY5AF2QYkJC7Wrw2fkzsZA9mv+PCtgyB7EqYOgR+r3Q==", + "dependencies": { + "media-typer": "0.2.0", + "mime-types": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/tomahawk/node_modules/vary": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/vary/-/vary-0.1.0.tgz", + "integrity": "sha512-tyyeG46NQdwyVP/RsWLSrT78ouwEuvwk9gK8vQK4jdXmqoXtTXW+vsCfNcnqRhigF8olV34QVZarmAi6wBV2Mw==", + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/tosource": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/tosource/-/tosource-1.0.0.tgz", @@ -22970,6 +24806,11 @@ "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, + "node_modules/tty": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tty/-/tty-1.0.1.tgz", + "integrity": "sha512-yCPqGIuidycVkRigBDshlGDLKu9+p4JKtBQijtYcI7ZnWwak56vwT7y7dGGTcxG+ecjxgWQOPWuvlePmxC5S2w==" + }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -22988,6 +24829,11 @@ "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, + "node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -23021,6 +24867,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -23194,6 +25055,14 @@ "node": ">=12.18" } }, + "node_modules/uni-global": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/uni-global/-/uni-global-1.0.0.tgz", + "integrity": "sha512-WWM3HP+siTxzIWPNUg7hZ4XO8clKi6NoCAJJWnuRL+BAqyFXF8gC03WNyTefGoUXYc47uYgXxpKLIEvo65PEHw==", + "dependencies": { + "type": "^2.5.0" + } + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -23258,6 +25127,17 @@ "node": ">= 10.0.0" } }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/upath": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", @@ -23482,6 +25362,24 @@ "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", "dev": true }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/utf8": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.0.0.tgz", + "integrity": "sha512-jWXHr+bQ8RsWazLzVY3V7XACPTbBHYSg/VoDVok+DBQk5ULm0AuBCNb9tGmjq2H+znnkBFwjhzzCbn9G3xlYcA==" + }, "node_modules/utf8-byte-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz", @@ -23505,6 +25403,14 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, + "node_modules/utils-merge": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "integrity": "sha512-HwU9SLQEtyo+0uoKXd1nkLqigUWLB+QuNQR4OcmB73eWqksM5ovuqcycks2x043W8XVb75rG1HQ0h93TMXkzQQ==", + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -23575,11 +25481,21 @@ "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", "dev": true }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "dev": true, "engines": [ "node >=0.6.0" ], @@ -23592,8 +25508,7 @@ "node_modules/verror/node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" }, "node_modules/watchpack": { "version": "2.4.0", @@ -24459,6 +26374,139 @@ "integrity": "sha512-typ/+JRmi7RqP1NanzFULK36vczznSNN8kWVA9vIqXyv8GhghUlwhGp1Xj3Nms1FsPcNnsQrJOR10N58/nQ9hQ==", "dev": true }, + "node_modules/winston": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-0.7.3.tgz", + "integrity": "sha512-iVTT8tf9YnTyfZX+aEUj2fl6WBRet7za6vdjMeyF8SA80Vii2rreM5XH+5qmpBV9uJGj8jz8BozvTDcroVq/eA==", + "dependencies": { + "async": "0.2.x", + "colors": "0.6.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "pkginfo": "0.3.x", + "request": "2.16.x", + "stack-trace": "0.0.x" + }, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/winston/node_modules/async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ==" + }, + "node_modules/winston/node_modules/combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", + "dependencies": { + "delayed-stream": "0.0.5" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/winston/node_modules/delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/winston/node_modules/forever-agent": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.2.0.tgz", + "integrity": "sha512-IasWSRIlfPnBZY1K9jEUK3PwsScR4mrcK+aNBJzGoPnW+S9b6f8I8ScyH4cehEOFNqnjGpP2gCaA22gqSV1xQA==", + "engines": { + "node": "*" + } + }, + "node_modules/winston/node_modules/form-data": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.0.10.tgz", + "integrity": "sha512-Z9/PpT/agxXi80nMpOH6GFD7XOr6mwk5aWMxDt/KMY+Nm7e4FnRMjddM4/mLPJhpmp6alY1F/1JQpRE6z07xng==", + "dependencies": { + "async": "~0.2.7", + "combined-stream": "~0.0.4", + "mime": "~1.2.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/winston/node_modules/hawk": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-0.10.2.tgz", + "integrity": "sha512-BjpmnZ95odv7KOIsydfNTAxfGOGaVc6xbYL4fozWl45PWjDqskix0LHAekmGkpnrCAI6+AZRvJIXNTAllj+e6w==", + "deprecated": "This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", + "dependencies": { + "boom": "0.3.x", + "cryptiles": "0.1.x", + "hoek": "0.7.x", + "sntp": "0.1.x" + }, + "engines": { + "node": "0.8.x" + } + }, + "node_modules/winston/node_modules/json-stringify-safe": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-3.0.0.tgz", + "integrity": "sha512-VSSuxEAawKLYlCabQOR7YDijQ69zPqQBOriUuCgNhlAqtU7RPr41gPpaSs6WkEu+ZOtUequpXWbI51CS+Z/gMQ==" + }, + "node_modules/winston/node_modules/mime": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", + "integrity": "sha512-Ysa2F/nqTNGHhhm9MV8ure4+Hc+Y8AWiqUdHxsO7xu8zc92ND9f3kpALHjaP026Ft17UfxrMt95c50PLUeynBw==" + }, + "node_modules/winston/node_modules/oauth-sign": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.2.0.tgz", + "integrity": "sha512-4DtiD64CwPJ5vZ636j/KtM7DxWbX1KlkqwbqbEAxI3BCpBrQdrKOv8vC/36U6gfm1CVapy6QmcVxPnXPPQApTA==", + "engines": { + "node": "*" + } + }, + "node_modules/winston/node_modules/qs": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-0.5.6.tgz", + "integrity": "sha512-KbOrQrP5Ye+0gmq+hwxoJwAFRwExACWqwxj1IDFFgqOw9Poxy3wwSbafd9ZqP6T6ykMfnxM573kt/a4i9ybatQ==", + "engines": { + "node": "*" + } + }, + "node_modules/winston/node_modules/request": { + "version": "2.16.6", + "resolved": "https://registry.npmjs.org/request/-/request-2.16.6.tgz", + "integrity": "sha512-TfD4kMo40kwuOpO7GYfAZpb2wYdw7yvTIglPNgPPSmp2Fz6MKNvPLla40FQ/ypdhy6B2jRNz3VlCjPD6mnzsmA==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "engines": [ + "node >= 0.8.0" + ], + "dependencies": { + "aws-sign": "~0.2.0", + "cookie-jar": "~0.2.0", + "forever-agent": "~0.2.0", + "form-data": "~0.0.3", + "hawk": "~0.10.2", + "json-stringify-safe": "~3.0.0", + "mime": "~1.2.7", + "node-uuid": "~1.4.0", + "oauth-sign": "~0.2.0", + "qs": "~0.5.4", + "tunnel-agent": "~0.2.0" + } + }, + "node_modules/winston/node_modules/tunnel-agent": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.2.0.tgz", + "integrity": "sha512-PXy4q1PH88BK0pcGOEMXFAslyBuRWz1wxLfPXTlYFd41eyUgjOALaVGbWJN1ymjbnBzjWunVSKmrrMMh8oLaZA==", + "engines": { + "node": "*" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -24468,6 +26516,14 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -24599,6 +26655,14 @@ "node": ">=4.0" } }, + "node_modules/xmlhttprequest": { + "version": "1.5.0", + "resolved": "https://github.com/LearnBoost/node-XMLHttpRequest/archive/0f36d0b5ebc03d85f860d42a64ae9791e1daa433.tar.gz", + "integrity": "sha512-TVSZwoeUQ7OKhb8jnQdSxGFz+lm4MGWmhG0deeYg85VQT74x5LcSrKeXHE0ZIzEycgqQ5mF8r8e1AykA7TpNAQ==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/xmlhttprequest-ssl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz", @@ -26432,19 +28496,23 @@ }, "@ipfs-shipyard/ignite-metrics": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ipfs-shipyard/ignite-metrics/-/ignite-metrics-1.3.0.tgz", - "integrity": "sha512-EKBgBHqIXIl82wlKN3pdIpOLC87cpIPtm7yrTGE8wSRsDe2ASEhu5wzbYYJ6InvtVA6AZsZ280VIuOubOG2usA==", "requires": { "@esbuild/darwin-arm64": "^0.16.17", "@esbuild/linux-x64": "^0.16.17", + "child_process": "^1.0.2", + "cluster": "^0.7.7", "countly-sdk-nodejs": "^22.6.0", "countly-sdk-web": "^22.6.4", + "dgram": "^1.0.1", + "dns": "^0.2.2", "esbuild-css-modules-plugin": "^2.7.0", + "net": "^1.0.2", "react": "^18.2.0", "react-dom": "^18.2.0", "react-refresh": "^0.14.0", "react-router-dom": "^6.6.2", - "styled-components": "^5.3.6" + "styled-components": "^5.3.6", + "tty": "^1.0.1" } }, "@ipld/car": { @@ -28923,6 +30991,22 @@ "queue-microtask": "^1.2.3" } }, + "accepts": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.0.7.tgz", + "integrity": "sha512-iq8ew2zitUlNcUca0wye3fYwQ6sSPItDo38oC0R+XA5KTzeXRN+GF7NjOXs3dVItj4J+gQVdpq4/qbnMb1hMHw==", + "requires": { + "mime-types": "~1.0.0", + "negotiator": "0.4.7" + }, + "dependencies": { + "mime-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz", + "integrity": "sha512-echfutj/t5SoTL4WZpqjA1DCud1XO0WQF3/GJ48YBmc4ZMhCK77QA6Z/w6VTQERLKuJ4drze3kw2TUT8xZXVNw==" + } + } + }, "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -29472,6 +31556,11 @@ "integrity": "sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==", "dev": true }, + "after": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.1.tgz", + "integrity": "sha512-SuI3vWhCFeSmkmmJ3efyuOkrhGyp/AuHthh3F5DinGYh2kR9t/0xUlm3/Vn2qMScfgg+cKho5fW7TUEYUhYeiA==" + }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -29637,6 +31726,14 @@ "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", "dev": true }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true, + "optional": true, + "peer": true + }, "array-from": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", @@ -29705,6 +31802,11 @@ "get-intrinsic": "^1.1.3" } }, + "arraybuffer.slice": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz", + "integrity": "sha512-6ZjfQaBSy6CuIH0+B0NrxMfDE5VIOCP/5gOqSpEIsaAZx9/giszzrXg6PZ7G51U/n88UmlAgYLNQ9wAnII7PJA==" + }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -29734,8 +31836,7 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" }, "assertion-error": { "version": "1.1.0", @@ -29778,6 +31879,11 @@ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" }, + "aws-sign": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/aws-sign/-/aws-sign-0.2.0.tgz", + "integrity": "sha512-6P7/Ls5F6++DsKu7iacris7qq/AZSWaX+gT4dtSyUxM82ePxWxaP7Slo82ZO3ZTx6GSKxQHAQlmFvM8e+Dd8ZA==" + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -29871,11 +31977,32 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha512-reGEWshDmTDQDsCec/HduOO9Wyj6yMOupMfhIf3ugN1TDlK2NQW4DDJSqNNtp380SNcvRfXtO8HSCQot0d0SMw==", + "dev": true + }, + "base64-arraybuffer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz", + "integrity": "sha512-ewBKKVVPIl78B26mYQHYlaxR7NydMiD/GxwLNIwTAfLIE4xhN2Gxcy30//azq5UrejXjzGpWjcBu3NUJxzMMzg==" + }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, + "base64id": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz", + "integrity": "sha512-DSjtfjhAsHl9J4OJj7e4+toV2zqxJrGwVd3CLlsCp8QmicvOn7irG0Mb8brOc/nur3SdO8lIbNlY1s1ZDJdUKQ==" + }, + "basic-auth": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.0.0.tgz", + "integrity": "sha512-qzxS7/bW/LSiKZzdZw3isPjiVmzXbJLM3ImZZ62WMR3oJQAyqy094Nnb0TA2ZZm65xB7nu0acfTQ99z7wwCDCw==" + }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -29895,6 +32022,14 @@ "platform": "^1.3.3" } }, + "better-assert": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha512-bYeph2DFlpK1XmGs6fvlLRUN29QISM3GBuUwSFsMY2XRx4AvC0WNCS57j4c/xGrK2RS24C1w3YoBOsw9fT46tQ==", + "requires": { + "callsite": "1.0.0" + } + }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -29907,6 +32042,11 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "binaryheap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/binaryheap/-/binaryheap-0.0.3.tgz", + "integrity": "sha512-9JFb4Yt5R9FZwbJaxOayF+T5sxn5eiU2NA9/LOeI1g2FUFRTdxpdmWppikO4O5AbNze8s0sL6ZuFxB1y4Ay8GA==" + }, "bl": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", @@ -29931,6 +32071,11 @@ } } }, + "blob": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.2.tgz", + "integrity": "sha512-BoCcDt8zBGShn6DawAGQw37s9SSs+fEjiZWDzyB+841PbOogcR2X7LGlM4sR3Zsiq/zoyl8MFWDfN6oDSlveBQ==" + }, "blob-to-it": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/blob-to-it/-/blob-to-it-2.0.0.tgz", @@ -30017,12 +32162,92 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, + "body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "ms": "2.0.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "optional": true, + "peer": true + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "side-channel": "^1.0.4" + } + } + } + }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, + "boom": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-0.3.1.tgz", + "integrity": "sha512-xWrlXnkK46TjEW7HU5G39AXWuG5aiHz3++zk3bBzF4mfnVCkpcYbwsnLUqMmfZNgPEYS/AI8MH+vmJxH5Kz0PA==", + "requires": { + "hoek": "0.4.x" + }, + "dependencies": { + "hoek": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.4.2.tgz", + "integrity": "sha512-Yj/N2TCrS0d8jvZgUpq9sDNt8/ABwTxPJW4+8QT0KXCMxOtRfUCUTEZEYyvMSgfDT3MGvwgO+NHfWPobagAIug==" + } + } + }, "boxen": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", @@ -30210,6 +32435,23 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "buffercursor": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/buffercursor/-/buffercursor-0.0.12.tgz", + "integrity": "sha512-Z+6Jm/eW6ITeqcFQKVXX7LYIGk7rENqCKHJ4CbWfJMeLpQZJj1v70WehkLmp+1kFN/QyCgpQ3Z0dKUHAwSbf9w==", + "requires": { + "verror": "^1.4.0" + } + }, + "bufferutil": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", + "dev": true, + "requires": { + "node-gyp-build": "^4.3.0" + } + }, "builtins": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", @@ -30379,6 +32621,11 @@ "get-intrinsic": "^1.0.2" } }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ==" + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -30519,6 +32766,11 @@ "domutils": "^3.0.1" } }, + "child_process": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/child_process/-/child_process-1.0.2.tgz", + "integrity": "sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g==" + }, "chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -30777,6 +33029,15 @@ "is-regexp": "^3.0.0" } }, + "cluster": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/cluster/-/cluster-0.7.7.tgz", + "integrity": "sha512-16LzEZSoBUgRHSN7NA46ntGnI9tf0NnxTm3KCDvHd6aj4EsBqUbYDN3ImCfjYegBXJZiutULF5rWkcRusMIozQ==", + "requires": { + "log": ">= 1.2.0", + "mkdirp": ">= 0.0.1" + } + }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -30802,6 +33063,11 @@ "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, + "colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha512-OsSVtHK8Ir8r3+Fxw/b4jS1ZLPXkV6ZxDRJQzeD7qo0SqMXWrHDM71DgYzPMHY8SFJ0Ao+nNU2p1MmwdzKqPrw==" + }, "columnify": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.6.0.tgz", @@ -30856,12 +33122,22 @@ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, + "component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==" + }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", "dev": true }, + "component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -30910,6 +33186,32 @@ } } }, + "connect": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.0.2.tgz", + "integrity": "sha512-k3kqw6T2Fc5ihvh5VVjwuJHA++qvh0/rPfe2GkJ5QNSQ9tRigQXMjtX2CYf73KZFe4+IV3HfQ3VR3W+nkt0eWQ==", + "requires": { + "debug": "1.0.3", + "finalhandler": "0.0.2", + "parseurl": "~1.1.3", + "utils-merge": "1.0.0" + }, + "dependencies": { + "debug": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.3.tgz", + "integrity": "sha512-MltK7Ykj/udtD728gD/RrONStwVnDpBNIP1h+CBcnwnJdHqHxfWHI1E8XLootUl7NOPAYTCCXlb8/Qmy7WyB1w==", + "requires": { + "ms": "0.6.2" + } + }, + "ms": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz", + "integrity": "sha512-/pc3eh7TWorTtbvXg8je4GvrvEqCfH7PA3P7iW01yL2E53FKixzgMBaQi0NOPbMJqY34cBSvR0tZtmlTkdUG4A==" + } + } + }, "content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -30919,6 +33221,14 @@ "safe-buffer": "5.2.1" } }, + "content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, + "optional": true, + "peer": true + }, "convert-hrtime": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/convert-hrtime/-/convert-hrtime-5.0.0.tgz", @@ -30929,6 +33239,27 @@ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "dev": true, + "optional": true, + "peer": true + }, + "cookie-jar": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/cookie-jar/-/cookie-jar-0.2.0.tgz", + "integrity": "sha512-yImk9AY90xjoUsN2fWHoIhVgveXqiZv7LDqUTZEzVBHyzfay8AjcJITUZpz2fTYLh6rnP+7GogiuRCo/5j2epg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true, + "optional": true, + "peer": true + }, "cookiejar": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.3.tgz", @@ -30985,6 +33316,14 @@ "which": "^2.0.1" } }, + "cryptiles": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.1.0.tgz", + "integrity": "sha512-WiOGszxSaVHd8T4hlu5Xcqs2uUYxbvotBP171ag2pLPKSwSKeTJYnzd98/YWV3jQYk/rpMHa3r01cQfN8SZrHQ==", + "requires": { + "boom": "0.3.x" + } + }, "crypto-random-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", @@ -31086,6 +33425,27 @@ "array-find-index": "^1.0.1" } }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha512-TVF6svNzeQCOpjCqsy0/CSy8VgObG3wXusJ73xW2GbG5rGx7lC8zxDSURicsXI2UsGdi2L0QNRCi745/wUDvsA==" + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + }, + "dependencies": { + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + } + } + }, "dag-jose": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dag-jose/-/dag-jose-3.0.1.tgz", @@ -31477,6 +33837,11 @@ "execa": "^5.0.0" } }, + "defaultable": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/defaultable/-/defaultable-0.7.2.tgz", + "integrity": "sha512-UEaHGfefWfbnANtSlCtuAelo7HZhCbdLAQAttRDVJpQplbA1G21t/J70VGznRA4z9py2k70tTW+3ogGs5VgrcQ==" + }, "defaults": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", @@ -31525,11 +33890,32 @@ "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==", "dev": true }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "optional": true, + "peer": true + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "optional": true, + "peer": true + }, "detect-libc": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==" }, + "dgram": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dgram/-/dgram-1.0.1.tgz", + "integrity": "sha512-zJVFL1EWfKtE0z2VN6qfpn/a+qG1viEzcwJA0EjtzS76ONSE3sEyWBwEbo32hS4IFw/EWVuWN+8b89aPW6It2A==" + }, "diff": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", @@ -31559,6 +33945,19 @@ "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", "dev": true }, + "dns": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dns/-/dns-0.2.2.tgz", + "integrity": "sha512-dhCgBk0QglzySl2BVlIkRuk7aTqxlCe+5KhHEX5ULuco7RcB6d1zDnP5iGSs2rLdJaTc+82MxegtJtjFuueWiQ==", + "requires": { + "hbo-dnsd": "0.9.8", + "native-dns": "0.6.1", + "node-options": "0.0.6", + "tomahawk": "0.1.6", + "tomahawk-plugin-kv-memory-store": "0.0.3", + "winston": "0.7.3" + } + }, "dns-over-http-resolver": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-1.2.3.tgz", @@ -31699,6 +34098,15 @@ "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", "dev": true }, + "duration": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/duration/-/duration-0.2.2.tgz", + "integrity": "sha512-06kgtea+bGreF5eKYgI/36A6pLXggY7oR4p1pq4SmdFBn1ReOL5D8RhG64VrqfTTKNucqqtBAwEj8aB88mcqrg==", + "requires": { + "d": "1", + "es5-ext": "~0.10.46" + } + }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -31732,6 +34140,11 @@ "safe-buffer": "^5.0.1" } }, + "ee-first": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.0.3.tgz", + "integrity": "sha512-1q/3kz+ZwmrrWpJcCCrBZ3JnBzB1BMA5EVW9nxnIP1LxDZ16Cqs9VdolqLWlExet1vU+bar3WSkAa4/YrA9bIw==" + }, "electron-fetch": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/electron-fetch/-/electron-fetch-1.9.1.tgz", @@ -31753,6 +34166,13 @@ "integrity": "sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ==", "dev": true }, + "emitter": { + "version": "http://github.com/component/emitter/archive/1.0.1.tar.gz", + "integrity": "sha512-k3Da+QreMb9waaGCHNAHox5QqxnZEYlQmvIVYwQibrI6OpIRyIIyFGgDV5dXRLr1AJ32JLqEh0VxQEq20dFskw==", + "requires": { + "indexof": "0.0.1" + } + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -31765,6 +34185,14 @@ "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", "dev": true }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "optional": true, + "peer": true + }, "encoding": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", @@ -31783,6 +34211,57 @@ "once": "^1.4.0" } }, + "engine.io": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-1.3.1.tgz", + "integrity": "sha512-fjnHWC9SLPoygMp6pqwoxmNkDDdYme4eCRTBTZLmEtGZETCpUEgSwoQjSgyj7IyIjqninKRF+2VeEV2kOniUFQ==", + "requires": { + "base64id": "0.1.0", + "debug": "0.6.0", + "engine.io-parser": "1.0.6", + "ws": "0.4.31" + }, + "dependencies": { + "commander": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", + "integrity": "sha512-0fLycpl1UMTGX257hRsu/arL/cUbcvQM4zMKwvLvzXtfdezIV4yotPS2dYtknF+NmEfWSoCEF6+hj9XLm/6hEw==" + }, + "debug": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.6.0.tgz", + "integrity": "sha512-2vIZf67+gMicLu8McscD1NNhMWbiTSJkhlByoTA1Gw54zOb/9IlxylYG+Kr9z1X2wZTHh1AMSp+YiMjYtLkVUA==" + }, + "engine.io-parser": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.0.6.tgz", + "integrity": "sha512-ipbmiNj4OfAL9csof0FlI9L2jkU/lgcUphHjnTDo1KABsA21WtsVy/1OjhCj8xxhNIHtxEZ3/t7uB45gEMhD4g==", + "requires": { + "after": "0.8.1", + "arraybuffer.slice": "0.0.6", + "base64-arraybuffer": "0.1.2", + "blob": "0.0.2", + "utf8": "2.0.0" + } + }, + "nan": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-0.3.2.tgz", + "integrity": "sha512-V9/Pyy5Oelv6vVJP9X+dAzU3IO19j6YXrJnODHxP2h54hTvfFQGahdsQV6Ule/UukiEJk1SkQ/aUyWUm61RBQw==" + }, + "ws": { + "version": "0.4.31", + "resolved": "https://registry.npmjs.org/ws/-/ws-0.4.31.tgz", + "integrity": "sha512-mWiVQ9qZGPXvLxQ4xGy58Ix5Bw0L99SB+hDT8L59bty4fbnQczaGl4YEWR7AzLQGbvPn/30r9/o41dPiSuUmYw==", + "requires": { + "commander": "~0.6.1", + "nan": "~0.3.0", + "options": ">=0.0.5", + "tinycolor": "0.x" + } + } + } + }, "engine.io-client": { "version": "6.2.3", "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.2.3.tgz", @@ -31856,6 +34335,15 @@ "is-arrayish": "^0.2.1" } }, + "errorhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.1.1.tgz", + "integrity": "sha512-nqVAii3wDkiowAVKDmcuwKOQ/5vsg9GfCcJxSMHgy8yiZUA3mMDpBcHnCVolDYgQ7wsC2yZQVOavR5fGHhFMkg==", + "requires": { + "accepts": "~1.0.4", + "escape-html": "1.0.1" + } + }, "es-abstract": { "version": "1.20.4", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.4.tgz", @@ -31914,12 +34402,32 @@ "is-symbol": "^1.0.2" } }, + "es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "requires": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + } + }, "es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, "es6-object-assign": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", @@ -31931,6 +34439,15 @@ "integrity": "sha512-ginqzK3J90Rd4/Yz7qRrqUeIpe3TwSXTPPZtPne7tGBPeAaQiU8qt4fpKApnxHcq1AwtUdHVg5P77x/yrggG8Q==", "dev": true }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, "esbuild": { "version": "0.17.5", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.5.tgz", @@ -32028,6 +34545,11 @@ "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==", "dev": true }, + "escape-html": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz", + "integrity": "sha512-z6kAnok8fqVTra7Yu77dZF2Y6ETJlxH58wN38wNyuNQLm8xXdKnfNrlSmfXsTePWP03rRVUKHubtUwanwUi7+g==" + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -32609,6 +35131,23 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "optional": true, + "peer": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "event-iterator": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-2.0.0.tgz", @@ -32669,6 +35208,156 @@ "integrity": "sha512-oBuz5SYz5zzyuHINoe9ooePwSu0xApKWgeNzok4hZ5YKXFh9zrQBEM15CXqoZkJJPuI2ArvqjPQd8UKJA753XA==", "dev": true }, + "express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "ms": "2.0.0" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "optional": true, + "peer": true + }, + "finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "optional": true, + "peer": true + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "optional": true, + "peer": true + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "optional": true, + "peer": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "dev": true, + "optional": true, + "peer": true + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "side-channel": "^1.0.4" + } + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "optional": true, + "peer": true + } + } + }, + "ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "requires": { + "type": "^2.7.2" + } + }, "ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -32697,8 +35386,12 @@ "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==" + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==" }, "fast-deep-equal": { "version": "3.1.3", @@ -32885,6 +35578,30 @@ "to-regex-range": "^5.0.1" } }, + "finalhandler": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.0.2.tgz", + "integrity": "sha512-SbpQfvWVwWEBlPTQyaM9gs0D5404ENTC0x2jzbb7t+P+EOD/cBlWjAAvfozIQYtOepUuNkxoLNLCK9/kS29f4w==", + "requires": { + "debug": "1.0.2", + "escape-html": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.2.tgz", + "integrity": "sha512-T9bufXIzQvCa4VrTIpLvvwdLhH+wuBtvIJJA3xgzVcaVETGmTIWMfEXQEd1K4p8BaRmQJPn6MPut38H7YQ+iIA==", + "requires": { + "ms": "0.6.2" + } + }, + "ms": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz", + "integrity": "sha512-/pc3eh7TWorTtbvXg8je4GvrvEqCfH7PA3P7iW01yL2E53FKixzgMBaQi0NOPbMJqY34cBSvR0tZtmlTkdUG4A==" + } + } + }, "find-cache-dir": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", @@ -32926,6 +35643,14 @@ "micromatch": "^4.0.2" } }, + "finished": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/finished/-/finished-1.2.2.tgz", + "integrity": "sha512-HPJ8x7Gn1pmTS1zWyMoXmQ1yxHkYHRoFsBI66ONq4PS9iWBJy1iHYXOSqMWNp3ksMXfrBpenkSwBhl9WG4zr4Q==", + "requires": { + "ee-first": "1.0.3" + } + }, "firefox-profile": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/firefox-profile/-/firefox-profile-4.2.2.tgz", @@ -33073,12 +35798,28 @@ "integrity": "sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ==", "dev": true }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "optional": true, + "peer": true + }, "freeport-promise": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/freeport-promise/-/freeport-promise-2.0.0.tgz", "integrity": "sha512-dwWpT1DdQcwrhmRwnDnPM/ZFny+FtzU+k50qF2eid3KxaQDsMiBrwo1i0G3qSugkN5db6Cb0zgfc68QeTOpEFg==", "dev": true }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "optional": true, + "peer": true + }, "from2": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", @@ -33785,6 +36526,35 @@ "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true }, + "has-binary-data": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/has-binary-data/-/has-binary-data-0.1.1.tgz", + "integrity": "sha512-XqIrqIgPlA2gxvHKudDsLJt8Xu8B4DvkHyUWGmLWYOAO0rFOL94Ds4NSveSZ1fCjWX22tQgIiRpDKAETex8GCQ==", + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + } + } + }, + "has-cors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.0.3.tgz", + "integrity": "sha512-Mxk1ba23PNtB3zPigreijApS3uuH9bhgZkqQtLQj7ydWHsGeb9uOtk4gsK6mZj4rYG6VNS/CT9G1XkYfgItpKg==", + "requires": { + "global": "https://github.com/component/global/archive/v2.0.1.tar.gz" + }, + "dependencies": { + "global": { + "version": "https://github.com/component/global/archive/v2.0.1.tar.gz", + "integrity": "sha512-O91OcV/NbdmQJPHaRu2ekSP7bqFRLWgqSwaJvqHPZHUwmHBagQYTOra29+LnzzG3lZkXH1ANzHzfCxtAPM9HMA==" + } + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -33851,12 +36621,26 @@ "@hapi/sntp": "4.x.x" } }, + "hbo-dnsd": { + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/hbo-dnsd/-/hbo-dnsd-0.9.8.tgz", + "integrity": "sha512-mIj4V7OicuAlnSfvTXopd401Ba7eFFSL2L3EmM1NqlIWe1pJ/x9dyHqfnKXnJr5qSbNFLnadXvwNd3kURNy+ug==", + "requires": { + "defaultable": "~0.7.2", + "optimist": "~0.3.4" + } + }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "hoek": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.7.6.tgz", + "integrity": "sha512-z75muWk69yyjWn6nNzJP0pnfgcewtSTs7uBolGUA7kWNdCYZukzHn3sYqUirhXul7qp9WBUwNT/7ieJZNveJqg==" + }, "hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -33889,12 +36673,37 @@ "entities": "^4.3.0" } }, + "http-browserify": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz", + "integrity": "sha512-Irf/LJXmE3cBzU1eaR4+NEX6bmVLqt1wkmDiA7kBwH7zmb0D8kBAXsDmQ88hhj/qv9iEZKlyGx/hrMcFi8sOHw==", + "dev": true, + "requires": { + "Base64": "~0.2.0", + "inherits": "~2.0.1" + } + }, "http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", "dev": true }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -33924,6 +36733,12 @@ } } }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", + "dev": true + }, "human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -34042,6 +36857,11 @@ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==" + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -34161,8 +36981,7 @@ "ipaddr.js": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", - "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==", - "dev": true + "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==" }, "ipfs-bitswap": { "version": "13.0.0", @@ -35896,6 +38715,11 @@ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, + "json3": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.2.6.tgz", + "integrity": "sha512-KA+GHhYTLTo7Ri4DyjwUgW8kn98AYtVZtBC94qL5yD0ZSYct8/eF8qBmTNyk+gPE578bKeIL4WBq+MUyd1I26g==" + }, "json5": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", @@ -36574,6 +39398,20 @@ "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", "dev": true }, + "log": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/log/-/log-6.3.1.tgz", + "integrity": "sha512-McG47rJEWOkXTDioZzQNydAVvZNeEkSyLJ1VWkFwfW+o1knW+QSi8D1KjPn/TnctV+q99lkvJNe1f0E1IjfY2A==", + "requires": { + "d": "^1.0.1", + "duration": "^0.2.2", + "es5-ext": "^0.10.53", + "event-emitter": "^0.3.5", + "sprintf-kit": "^2.0.1", + "type": "^2.5.0", + "uni-global": "^1.0.0" + } + }, "log-symbols": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", @@ -36738,6 +39576,14 @@ "integrity": "sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==", "dev": true }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "optional": true, + "peer": true + }, "mem": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/mem/-/mem-5.1.1.tgz", @@ -36787,6 +39633,14 @@ "trim-newlines": "^1.0.0" } }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "dev": true, + "optional": true, + "peer": true + }, "merge-options": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", @@ -36948,8 +39802,7 @@ "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" }, "mocha": { "version": "10.1.0", @@ -37159,6 +40012,29 @@ "dev": true, "optional": true }, + "morgan": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.2.0.tgz", + "integrity": "sha512-VrasIzA69dsxJm1+MVWTLTiij3kiG33XPfGiexqstHpcSvSu/Z51W+FGQyIlbc3jZZuF2PFujsjw+YQvpXz3UA==", + "requires": { + "basic-auth": "1.0.0", + "bytes": "1.0.0", + "depd": "0.4.2", + "finished": "~1.2.2" + }, + "dependencies": { + "bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ==" + }, + "depd": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-0.4.2.tgz", + "integrity": "sha512-tG4S/hTtpA6stvb9Li65vWHrCblQ/oSN/UI90RKIA3wMk3N9lR1k/dCs8NKKNAy7UXD0+1/dUqhiaBuMatVNAQ==" + } + } + }, "mortice": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mortice/-/mortice-3.0.1.tgz", @@ -37550,6 +40426,34 @@ "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==", "dev": true }, + "native-dns": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/native-dns/-/native-dns-0.6.1.tgz", + "integrity": "sha512-svX0dstdoFeEO1sD1Kkrrj/Ad7QfHuczp2YpRnBpjJHqh0dpYLZhLERbf76S6LMkLAT5eZ8tJrPwZciIX5pj6Q==", + "requires": { + "ipaddr.js": ">= 0.1.1", + "native-dns-cache": ">= 0.0.1", + "native-dns-packet": ">= 0.0.4" + } + }, + "native-dns-cache": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/native-dns-cache/-/native-dns-cache-0.0.2.tgz", + "integrity": "sha512-09HXHdb/updxfigaFbR53F8nCKqxM8WuHfTWBsusVlwSSZZ3qwWRdD6Kx2x8HBI1Q5IaycwcJOvBoXZWJNfVEg==", + "requires": { + "binaryheap": ">= 0.0.3", + "native-dns-packet": ">= 0.0.1" + } + }, + "native-dns-packet": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/native-dns-packet/-/native-dns-packet-0.1.1.tgz", + "integrity": "sha512-j1XxnFFTUB7mujma468WyAOmyVtkuuLTelxJF13tSTIPO56X7bHALrG0G4jFQnvyTPCt4VnFiZezWpfKbaHc+g==", + "requires": { + "buffercursor": ">= 0.0.12", + "ipaddr.js": ">= 0.1.1" + } + }, "native-fetch": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/native-fetch/-/native-fetch-3.0.0.tgz", @@ -37575,18 +40479,33 @@ "dev": true, "optional": true }, + "negotiator": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.4.7.tgz", + "integrity": "sha512-ujxWwyRfZ6udAgHGECQC3JDO9e6UAsuItfUMcqA0Xf2OLNQTveFVFx+fHGIJ5p0MJaJrZyGQqPwzuN0NxJzEKA==" + }, "neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "net": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/net/-/net-1.0.2.tgz", + "integrity": "sha512-kbhcj2SVVR4caaVnGLJKmlk2+f+oLkjqdKeQlmUtz6nGzOpbcobwVIeSURNgraV/v3tlmGIX82OcPCl0K6RbHQ==" + }, "netmask": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", "dev": true }, + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -37711,12 +40630,22 @@ } } }, + "node-options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/node-options/-/node-options-0.0.6.tgz", + "integrity": "sha512-OrfY9+LgcLjoo2oyqxjP3gZLBuNDV1IblF69HGLdbE8JUJxSnl2kB561r41KOMc1GWLspjMSfa9L6+iW4fvYrw==" + }, "node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", "dev": true }, + "node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA==" + }, "normalize-html-whitespace": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/normalize-html-whitespace/-/normalize-html-whitespace-0.2.0.tgz", @@ -37868,6 +40797,11 @@ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true }, + "object-component": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha512-S0sN3agnVh2SZNEIGc0N1X4Z5K0JeFbGBrnuZpsxuUh5XLF0BnvWkMjRXo/zGKLd/eghvNIKcx1pQkmUjXIyrA==" + }, "object-inspect": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", @@ -37955,6 +40889,27 @@ "integrity": "sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w==", "dev": true }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "ee-first": "1.1.1" + }, + "dependencies": { + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "optional": true, + "peer": true + } + } + }, "on-load": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/on-load/-/on-load-4.0.2.tgz", @@ -37998,6 +40953,14 @@ "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", "dev": true }, + "optimist": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", + "integrity": "sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ==", + "requires": { + "wordwrap": "~0.0.2" + } + }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -38012,6 +40975,11 @@ "word-wrap": "^1.2.3" } }, + "options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "integrity": "sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg==" + }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -38393,6 +41361,35 @@ "parse5": "^7.0.0" } }, + "parsejson": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.1.tgz", + "integrity": "sha512-W9CRvTfYQY/kbRc5Q6YTWarb/QDxdEGbd6RCP8CLUQDJV89RVHoS2A0dZYNtAcq31fulGNN4ZhAhiQQazwlKJg==", + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseqs": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz", + "integrity": "sha512-vyyyfQGUFZnDhgrrdn+hh1JuOfvbXU5oRr6dijfkSIbaFuxGgTSCA/RNVcsADmo0k2NX6wERVTMKkXokjuObJA==", + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseuri": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.2.tgz", + "integrity": "sha512-m0H+R0u5LXOx8sbxufnvgKrRLpkVpvtMf0AyWXYSqLwo2MWrVEgCIbgpaSVa398xl6wTLe0A7CGhiC4hBdEzHQ==", + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseurl": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.1.3.tgz", + "integrity": "sha512-7y9IL/9x2suvr1uIvoAc3yv3f28hZ55g2OM+ybEtnZqV6Ykeg36sy1PCsTN9rQUZYzb9lTKLzzmJM11jaXSloA==" + }, "patch-package": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.0.tgz", @@ -38905,6 +41902,11 @@ } } }, + "pkginfo": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "integrity": "sha512-yO5feByMzAp96LtP58wvPKSbaKAi/1C4kV9XpTctr6EepnP6F33RBNOiVrdz9BrPA98U2BMFsTNHo44TWcbQ2A==" + }, "platform": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", @@ -39133,6 +42135,28 @@ "uint8arraylist": "^2.3.2" } }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "dependencies": { + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "optional": true, + "peer": true + } + } + }, "psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -39244,12 +42268,47 @@ "safe-buffer": "^5.1.0" } }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "optional": true, + "peer": true + }, "rate-limiter-flexible": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/rate-limiter-flexible/-/rate-limiter-flexible-2.4.1.tgz", "integrity": "sha512-dgH4T44TzKVO9CLArNto62hJOwlWJMLUjVVr/ii0uUzZXEXthDNr7/yefW5z/1vvHAfycc1tnuiYyNJ8CTRB3g==", "dev": true }, + "raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, "raw-loader": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz", @@ -40003,6 +43062,76 @@ } } }, + "send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "optional": true, + "peer": true + } + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "optional": true, + "peer": true + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "optional": true, + "peer": true + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "optional": true, + "peer": true + } + } + }, "serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -40012,6 +43141,38 @@ "randombytes": "^2.1.0" } }, + "serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "dependencies": { + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "optional": true, + "peer": true + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "optional": true, + "peer": true + } + } + }, "set-delayed-interval": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/set-delayed-interval/-/set-delayed-interval-1.0.0.tgz", @@ -40024,6 +43185,14 @@ "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", "dev": true }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "optional": true, + "peer": true + }, "sha": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/sha/-/sha-3.0.0.tgz", @@ -40288,6 +43457,162 @@ "uuid-parse": "^1.0.0" } }, + "sntp": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-0.1.2.tgz", + "integrity": "sha512-6fsOpJYQAQcO/UeW7T9mJwEenJymdU77o+gNiompGAammlSa+C49Oyt79ta/kgVbT13l4JAuKlo8FNvUnVjvEQ==", + "requires": { + "hoek": "0.4.x" + }, + "dependencies": { + "hoek": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.4.2.tgz", + "integrity": "sha512-Yj/N2TCrS0d8jvZgUpq9sDNt8/ABwTxPJW4+8QT0KXCMxOtRfUCUTEZEYyvMSgfDT3MGvwgO+NHfWPobagAIug==" + } + } + }, + "socket.io": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-1.0.6.tgz", + "integrity": "sha512-1x7TkMh8aKfLoXuXe5rXnDnv3xfcOFrDM6hR9z15dpZ83tTxt2NUxnpuGL2zMIAJQ4DitKiadEBvBVju5cxcHw==", + "requires": { + "debug": "0.7.4", + "engine.io": "1.3.1", + "has-binary-data": "0.1.1", + "socket.io-adapter": "0.2.0", + "socket.io-client": "1.0.6", + "socket.io-parser": "2.2.0" + }, + "dependencies": { + "commander": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", + "integrity": "sha512-0fLycpl1UMTGX257hRsu/arL/cUbcvQM4zMKwvLvzXtfdezIV4yotPS2dYtknF+NmEfWSoCEF6+hj9XLm/6hEw==" + }, + "component-emitter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz", + "integrity": "sha512-YhIbp3PJiznERfjlIkK0ue4obZxt2S60+0W8z24ZymOHT8sHloOqWOqZRU2eN5OlY8U08VFsP02letcu26FilA==" + }, + "debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha512-EohAb3+DSHSGx8carOSKJe8G0ayV5/i609OD0J2orCkuyae7SyZSz2aoLmQF2s0Pj5gITDebwPH7GFBlqOUQ1Q==" + }, + "engine.io-client": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.3.1.tgz", + "integrity": "sha512-bTOZMqAe7HXhyA/2T7Fve04b/ZZruTHSOqa+yn8U4RFSyRAVPePjopOgJOUNciEfuXo1gx850P5LzaQU28/p3w==", + "requires": { + "component-emitter": "1.1.2", + "component-inherit": "0.0.3", + "debug": "0.7.4", + "engine.io-parser": "1.0.6", + "has-cors": "1.0.3", + "indexof": "0.0.1", + "parsejson": "0.0.1", + "parseqs": "0.0.2", + "parseuri": "0.0.2", + "ws": "0.4.31", + "xmlhttprequest": "https://github.com/LearnBoost/node-XMLHttpRequest/archive/0f36d0b5ebc03d85f860d42a64ae9791e1daa433.tar.gz" + } + }, + "engine.io-parser": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.0.6.tgz", + "integrity": "sha512-ipbmiNj4OfAL9csof0FlI9L2jkU/lgcUphHjnTDo1KABsA21WtsVy/1OjhCj8xxhNIHtxEZ3/t7uB45gEMhD4g==", + "requires": { + "after": "0.8.1", + "arraybuffer.slice": "0.0.6", + "base64-arraybuffer": "0.1.2", + "blob": "0.0.2", + "utf8": "2.0.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "nan": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-0.3.2.tgz", + "integrity": "sha512-V9/Pyy5Oelv6vVJP9X+dAzU3IO19j6YXrJnODHxP2h54hTvfFQGahdsQV6Ule/UukiEJk1SkQ/aUyWUm61RBQw==" + }, + "socket.io-client": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.0.6.tgz", + "integrity": "sha512-itdtz6fQBTFIDBP4+hJox0OlT+SbCVdENjPgjMup3ehu7OsiG6t0FYBXCx+k/upt9lbeyp9BmUNNi5EfnGa5Vw==", + "requires": { + "component-bind": "1.0.0", + "component-emitter": "1.1.2", + "debug": "0.7.4", + "engine.io-client": "1.3.1", + "has-binary-data": "0.1.1", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseuri": "0.0.2", + "socket.io-parser": "2.2.0", + "to-array": "0.1.3" + } + }, + "socket.io-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.0.tgz", + "integrity": "sha512-uW3UiLVibAyleKq8r/yZe1oPO51olhY18T6HtnN0iI6RLqJfYC0YiyAFlsPw1+8I0Z1qFd8jFLTRZo2vr6ISxA==", + "requires": { + "debug": "0.7.4", + "emitter": "http://github.com/component/emitter/archive/1.0.1.tar.gz", + "isarray": "0.0.1", + "json3": "3.2.6" + } + }, + "ws": { + "version": "0.4.31", + "resolved": "https://registry.npmjs.org/ws/-/ws-0.4.31.tgz", + "integrity": "sha512-mWiVQ9qZGPXvLxQ4xGy58Ix5Bw0L99SB+hDT8L59bty4fbnQczaGl4YEWR7AzLQGbvPn/30r9/o41dPiSuUmYw==", + "requires": { + "commander": "~0.6.1", + "nan": "~0.3.0", + "options": ">=0.0.5", + "tinycolor": "0.x" + } + } + } + }, + "socket.io-adapter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.2.0.tgz", + "integrity": "sha512-3PlX+MOlpHiY+ZTbKhpE4i+M4u8hFUlVyqFP4K/mH+t+D9bMKATFqUUY3zWQMEo2g/1ckosURXviQw6M8R/y8A==", + "requires": { + "debug": "0.7.4", + "socket.io-parser": "2.1.2" + }, + "dependencies": { + "debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha512-EohAb3+DSHSGx8carOSKJe8G0ayV5/i609OD0J2orCkuyae7SyZSz2aoLmQF2s0Pj5gITDebwPH7GFBlqOUQ1Q==" + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "socket.io-parser": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.1.2.tgz", + "integrity": "sha512-eVkt8prgw20H+4P8Iw6tis/w7leiN5EW/93Vq+KL8w+yNJu+QNgaej2Cgt8FhVCVuN3AHyLU50vXvM8cpUR1JQ==", + "requires": { + "debug": "0.7.4", + "emitter": "http://github.com/component/emitter/archive/1.0.1.tar.gz", + "isarray": "0.0.1", + "json3": "3.2.6" + } + } + } + }, "socket.io-client": { "version": "4.5.3", "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.5.3.tgz", @@ -40451,6 +43776,14 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, + "sprintf-kit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/sprintf-kit/-/sprintf-kit-2.0.1.tgz", + "integrity": "sha512-2PNlcs3j5JflQKcg4wpdqpZ+AjhQJ2OZEo34NXDtlB0tIPG84xaaXhpA8XFacFiwjKA4m49UOYG83y3hbMn/gQ==", + "requires": { + "es5-ext": "^0.10.53" + } + }, "sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -40476,6 +43809,11 @@ } } }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==" + }, "standard": { "version": "16.0.4", "resolved": "https://registry.npmjs.org/standard/-/standard-16.0.4.tgz", @@ -40504,6 +43842,14 @@ "xdg-basedir": "^4.0.0" } }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "optional": true, + "peer": true + }, "stream-to-array": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/stream-to-array/-/stream-to-array-2.3.0.tgz", @@ -41150,6 +44496,11 @@ "integrity": "sha512-NO/1CZigzlCWQiWdIGv8ebXt6Uk77zdLz2NE7KcZRU5Egj2+947lzUpk30xQUQlq5dRY25j7ZulG4RfA2DHYfA==", "dev": true }, + "tinycolor": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz", + "integrity": "sha512-+CorETse1kl98xg0WAzii8DTT4ABF4R3nquhrkIbVGcw1T8JYs5Gfx9xEfGINPUZGDj9C4BmOtuKeaTtuuRolg==" + }, "tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -41158,6 +44509,11 @@ "rimraf": "^3.0.0" } }, + "to-array": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.3.tgz", + "integrity": "sha512-JQk/QMS4oHyU2VufVeyjN25dcnZnr1PV1pa1oKSj7l5tVO9WrU62og3fYzB3mrgJZZgBxdrrA/v6iZzMDuyFYw==" + }, "to-buffer": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", @@ -41178,6 +44534,251 @@ "is-number": "^7.0.0" } }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "optional": true, + "peer": true + }, + "tomahawk": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/tomahawk/-/tomahawk-0.1.6.tgz", + "integrity": "sha512-HFLoewTx2gHD0o2t0tR+EIcDXhqdtakfZCDiYsGjOO93nYQ1i7nbhj3UL7iQdtoBbPAcEbrxeJ0KlfPOvhxFyg==", + "requires": { + "body-parser": "1.5.0", + "connect": "3.0.2", + "errorhandler": "1.1.1", + "express": "4.6.1", + "morgan": "1.2.0", + "node-options": "0.0.6", + "socket.io": "1.0.6", + "winston": "0.7.3" + }, + "dependencies": { + "body-parser": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.5.0.tgz", + "integrity": "sha512-UJfZike68QN1mdo0mA+Z0y+0qi10oxOrCPw2CZpP73O/LIfEWHDy9SHhwsME1mdk1WmnltBLddUkfBpuKPH4Ng==", + "requires": { + "bytes": "1.0.0", + "depd": "0.4.2", + "iconv-lite": "0.4.4", + "media-typer": "0.2.0", + "qs": "0.6.6", + "raw-body": "1.3.0", + "type-is": "~1.3.2" + } + }, + "buffer-crc32": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.3.tgz", + "integrity": "sha512-HLvoSqq1z8fJEcT1lUlJZ4OJaXJZ1wsWm0+fBxkz9Bdf/WphA4Da7FtGUguNNyEXL4WB0hNMTaWmdFRFPy8YOQ==" + }, + "bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ==" + }, + "cookie": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz", + "integrity": "sha512-+mHmWbhevLwkiBf7QcbZXHr0v4ZQQ/OgHk3fsQHrsMMiGzuvAmU/YMUR+ZfrO/BLAGIWFfx2Z7Oyso0tZR/wiA==" + }, + "cookie-signature": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.4.tgz", + "integrity": "sha512-k+lrG38ZC/S7zN6l1/HcF6xF4jMwkIUjnr5afDU7tzFxIfDmKzdqJdXo8HNYaXOuBJ3tPKxSiwCOTA0b3qQfaA==" + }, + "debug": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.3.tgz", + "integrity": "sha512-MltK7Ykj/udtD728gD/RrONStwVnDpBNIP1h+CBcnwnJdHqHxfWHI1E8XLootUl7NOPAYTCCXlb8/Qmy7WyB1w==", + "requires": { + "ms": "0.6.2" + } + }, + "depd": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-0.4.2.tgz", + "integrity": "sha512-tG4S/hTtpA6stvb9Li65vWHrCblQ/oSN/UI90RKIA3wMk3N9lR1k/dCs8NKKNAy7UXD0+1/dUqhiaBuMatVNAQ==" + }, + "express": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.6.1.tgz", + "integrity": "sha512-nG9Y8xfzgrW/9XCr5sv+KDbtY8mZPN9HO3GziltaubpvleI+1RyHxAKvYjmFih3HkQIaPXW9ozxMHBDNf3UXng==", + "requires": { + "accepts": "~1.0.7", + "buffer-crc32": "0.2.3", + "cookie": "0.1.2", + "cookie-signature": "1.0.4", + "debug": "1.0.3", + "depd": "0.3.0", + "escape-html": "1.0.1", + "finalhandler": "0.0.3", + "fresh": "0.2.2", + "media-typer": "0.2.0", + "merge-descriptors": "0.0.2", + "methods": "1.1.0", + "parseurl": "~1.1.3", + "path-to-regexp": "0.1.3", + "proxy-addr": "1.0.1", + "qs": "0.6.6", + "range-parser": "1.0.0", + "send": "0.6.0", + "serve-static": "~1.3.2", + "type-is": "~1.3.2", + "utils-merge": "1.0.0", + "vary": "0.1.0" + }, + "dependencies": { + "depd": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-0.3.0.tgz", + "integrity": "sha512-Uyx3FgdvEYlpA3W4lf37Ide++2qOsjLlJ7dap0tbM63j/BxTCcxmyIOO6PXbKbOuNSko+fsDHzzx1DUeo1+3fA==" + } + } + }, + "finalhandler": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.0.3.tgz", + "integrity": "sha512-/fqgssseNfnD8Y77HWyJKQ+1xbKu7bZl2LXfhFjkgeGg91WRMMO9GN1KKL53NnIG9g1H2Xq3iKrZkuIcAmjd0A==", + "requires": { + "debug": "1.0.3", + "escape-html": "1.0.1" + } + }, + "fresh": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.2.tgz", + "integrity": "sha512-ZGGi8GROK//ijm2gB33sUuN9TjN1tC/dvG4Bt4j6IWrVGpMmudUBCxx+Ir7qePsdREfkpQC4FL8W0jeSOsgv1w==" + }, + "iconv-lite": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.4.tgz", + "integrity": "sha512-BnjNp13aZpK4WBGbmjaNHN2MCp3P850n8zd/JLinQJ8Lsnq2Br4o2467C2waMsY5kr7Z41SL1gEqh8Vbfzg15A==" + }, + "ipaddr.js": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-0.1.2.tgz", + "integrity": "sha512-MGrEjHz4Hk5UVpJXZQ2tHB+bp6xgdRKCAEWdrgFsoAmXCgKAPtj8LqMxgvlWEAj9aN+PpTcvE051uZU3K3kLSQ==" + }, + "media-typer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.2.0.tgz", + "integrity": "sha512-TSggxYk75oP4tae7JkT8InpcFGUP4340zg1dOWjcu9qcphaDKtXEuNUv3OD4vJ+gVTvIDK797W0uYeNm8qqsDg==" + }, + "merge-descriptors": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-0.0.2.tgz", + "integrity": "sha512-dYBT4Ep+t/qnPeJcnMymmhTdd4g8/hn48ciaDqLAkfRf8abzLPS6Rb6EBdz5CZCL8tzZuI5ps9MhGQGxk+EuKg==" + }, + "methods": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.0.tgz", + "integrity": "sha512-Th88HxNePtsAmz0WjEhVVyRGv9AQFLv4z6zOj4Dt15PjsKLWB8JXSmxzP+Q27139+AXao0AlCWvonFuJhu4GuA==" + }, + "mime": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", + "integrity": "sha512-Ysa2F/nqTNGHhhm9MV8ure4+Hc+Y8AWiqUdHxsO7xu8zc92ND9f3kpALHjaP026Ft17UfxrMt95c50PLUeynBw==" + }, + "mime-types": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz", + "integrity": "sha512-echfutj/t5SoTL4WZpqjA1DCud1XO0WQF3/GJ48YBmc4ZMhCK77QA6Z/w6VTQERLKuJ4drze3kw2TUT8xZXVNw==" + }, + "ms": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz", + "integrity": "sha512-/pc3eh7TWorTtbvXg8je4GvrvEqCfH7PA3P7iW01yL2E53FKixzgMBaQi0NOPbMJqY34cBSvR0tZtmlTkdUG4A==" + }, + "path-to-regexp": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.3.tgz", + "integrity": "sha512-sd4vSOW+DCM6A5aRICI1CWaC7nufnzVpZfuh5T0VXshxxzFWuaFcvqKovAFLNGReOc+uZRptpcpPmn7CDvzLuA==" + }, + "proxy-addr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.0.1.tgz", + "integrity": "sha512-rIUGzBlSfkJMWWCgsd4N5wvVSNAcJZg//UwPZumDIbScHRUzuSOjBmIdyICiKkB9yArv+er9qC6RA/NL3AWc6A==", + "requires": { + "ipaddr.js": "0.1.2" + } + }, + "qs": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz", + "integrity": "sha512-kN+yNdAf29Jgp+AYHUmC7X4QdJPR8czuMWLNLc0aRxkQ7tB3vJQEONKKT9ou/rW7EbqVec11srC9q9BiVbcnHA==" + }, + "range-parser": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.0.tgz", + "integrity": "sha512-wOH5LIH2ZHo0P7/bwkR+aNbJ+kv3CHVX4B8qs9GqbtY29fi1bGPV5xczrutN20G+Z4XhRqRMTW3q0S4iyJJPfw==" + }, + "raw-body": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.3.0.tgz", + "integrity": "sha512-iuI1bOSi9tEmVCrXq02ZysXatTrhAu+fSo7XOQHhMo4g87dSy9YB2W/9Udwhz0bPpFk4UcoLhjrHgpPbRD3ktA==", + "requires": { + "bytes": "1", + "iconv-lite": "0.4.4" + } + }, + "send": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.6.0.tgz", + "integrity": "sha512-A3EwHmDwcPcmLxIRNjr2YbXiYWq6M9JyUq4303pLKVFs4m5oeME0a9Cpcu9N22fED5XVepldjPYGo9eJifb7Yg==", + "requires": { + "debug": "1.0.3", + "depd": "0.3.0", + "escape-html": "1.0.1", + "finished": "1.2.2", + "fresh": "0.2.2", + "mime": "1.2.11", + "ms": "0.6.2", + "range-parser": "~1.0.0" + }, + "dependencies": { + "depd": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-0.3.0.tgz", + "integrity": "sha512-Uyx3FgdvEYlpA3W4lf37Ide++2qOsjLlJ7dap0tbM63j/BxTCcxmyIOO6PXbKbOuNSko+fsDHzzx1DUeo1+3fA==" + } + } + }, + "serve-static": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.3.2.tgz", + "integrity": "sha512-KwjCeYUx7IM1neg8/P0+O1DZsl76XcOSuV0ZxrI0r60vwGlcjMjKOYCK/OFLJy/a2CFuIyAa/x0PuQ0yuG+IgQ==", + "requires": { + "escape-html": "1.0.1", + "parseurl": "~1.1.3", + "send": "0.6.0" + } + }, + "type-is": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.3.2.tgz", + "integrity": "sha512-sdIhnvhWEyIP2DKjj1o9tL31m8vFxDfLPD56KXz2absqY5AF2QYkJC7Wrw2fkzsZA9mv+PCtgyB7EqYOgR+r3Q==", + "requires": { + "media-typer": "0.2.0", + "mime-types": "~1.0.1" + } + }, + "vary": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/vary/-/vary-0.1.0.tgz", + "integrity": "sha512-tyyeG46NQdwyVP/RsWLSrT78ouwEuvwk9gK8vQK4jdXmqoXtTXW+vsCfNcnqRhigF8olV34QVZarmAi6wBV2Mw==" + } + } + }, + "tomahawk-plugin-kv-memory-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tomahawk-plugin-kv-memory-store/-/tomahawk-plugin-kv-memory-store-0.0.3.tgz", + "integrity": "sha512-opt82r6s+775jmrREiWruMVTQaGQYgPd6/zYTDRwwHhDGSqpFaZZgCSnI/BAIs8nC88puTK4PyodkSRpUDp/2Q==" + }, "tosource": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/tosource/-/tosource-1.0.0.tgz", @@ -41890,6 +45491,11 @@ "tslib": "^1.8.1" } }, + "tty": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tty/-/tty-1.0.1.tgz", + "integrity": "sha512-yCPqGIuidycVkRigBDshlGDLKu9+p4JKtBQijtYcI7ZnWwak56vwT7y7dGGTcxG+ecjxgWQOPWuvlePmxC5S2w==" + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -41905,6 +45511,11 @@ "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, + "type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -41926,6 +45537,18 @@ "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", "dev": true }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -42054,6 +45677,14 @@ "busboy": "^1.6.0" } }, + "uni-global": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/uni-global/-/uni-global-1.0.0.tgz", + "integrity": "sha512-WWM3HP+siTxzIWPNUg7hZ4XO8clKi6NoCAJJWnuRL+BAqyFXF8gC03WNyTefGoUXYc47uYgXxpKLIEvo65PEHw==", + "requires": { + "type": "^2.5.0" + } + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -42097,6 +45728,14 @@ "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", "dev": true }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "optional": true, + "peer": true + }, "upath": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", @@ -42259,6 +45898,20 @@ "integrity": "sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A==", "dev": true }, + "utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "dev": true, + "requires": { + "node-gyp-build": "^4.3.0" + } + }, + "utf8": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.0.0.tgz", + "integrity": "sha512-jWXHr+bQ8RsWazLzVY3V7XACPTbBHYSg/VoDVok+DBQk5ULm0AuBCNb9tGmjq2H+znnkBFwjhzzCbn9G3xlYcA==" + }, "utf8-byte-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz", @@ -42282,6 +45935,11 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, + "utils-merge": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "integrity": "sha512-HwU9SLQEtyo+0uoKXd1nkLqigUWLB+QuNQR4OcmB73eWqksM5ovuqcycks2x043W8XVb75rG1HQ0h93TMXkzQQ==" + }, "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -42343,11 +46001,18 @@ } } }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "optional": true, + "peer": true + }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "dev": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -42357,8 +46022,7 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" } } }, @@ -42969,12 +46633,120 @@ "integrity": "sha512-typ/+JRmi7RqP1NanzFULK36vczznSNN8kWVA9vIqXyv8GhghUlwhGp1Xj3Nms1FsPcNnsQrJOR10N58/nQ9hQ==", "dev": true }, + "winston": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-0.7.3.tgz", + "integrity": "sha512-iVTT8tf9YnTyfZX+aEUj2fl6WBRet7za6vdjMeyF8SA80Vii2rreM5XH+5qmpBV9uJGj8jz8BozvTDcroVq/eA==", + "requires": { + "async": "0.2.x", + "colors": "0.6.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "pkginfo": "0.3.x", + "request": "2.16.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ==" + }, + "combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", + "requires": { + "delayed-stream": "0.0.5" + } + }, + "delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==" + }, + "forever-agent": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.2.0.tgz", + "integrity": "sha512-IasWSRIlfPnBZY1K9jEUK3PwsScR4mrcK+aNBJzGoPnW+S9b6f8I8ScyH4cehEOFNqnjGpP2gCaA22gqSV1xQA==" + }, + "form-data": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.0.10.tgz", + "integrity": "sha512-Z9/PpT/agxXi80nMpOH6GFD7XOr6mwk5aWMxDt/KMY+Nm7e4FnRMjddM4/mLPJhpmp6alY1F/1JQpRE6z07xng==", + "requires": { + "async": "~0.2.7", + "combined-stream": "~0.0.4", + "mime": "~1.2.2" + } + }, + "hawk": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-0.10.2.tgz", + "integrity": "sha512-BjpmnZ95odv7KOIsydfNTAxfGOGaVc6xbYL4fozWl45PWjDqskix0LHAekmGkpnrCAI6+AZRvJIXNTAllj+e6w==", + "requires": { + "boom": "0.3.x", + "cryptiles": "0.1.x", + "hoek": "0.7.x", + "sntp": "0.1.x" + } + }, + "json-stringify-safe": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-3.0.0.tgz", + "integrity": "sha512-VSSuxEAawKLYlCabQOR7YDijQ69zPqQBOriUuCgNhlAqtU7RPr41gPpaSs6WkEu+ZOtUequpXWbI51CS+Z/gMQ==" + }, + "mime": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", + "integrity": "sha512-Ysa2F/nqTNGHhhm9MV8ure4+Hc+Y8AWiqUdHxsO7xu8zc92ND9f3kpALHjaP026Ft17UfxrMt95c50PLUeynBw==" + }, + "oauth-sign": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.2.0.tgz", + "integrity": "sha512-4DtiD64CwPJ5vZ636j/KtM7DxWbX1KlkqwbqbEAxI3BCpBrQdrKOv8vC/36U6gfm1CVapy6QmcVxPnXPPQApTA==" + }, + "qs": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-0.5.6.tgz", + "integrity": "sha512-KbOrQrP5Ye+0gmq+hwxoJwAFRwExACWqwxj1IDFFgqOw9Poxy3wwSbafd9ZqP6T6ykMfnxM573kt/a4i9ybatQ==" + }, + "request": { + "version": "2.16.6", + "resolved": "https://registry.npmjs.org/request/-/request-2.16.6.tgz", + "integrity": "sha512-TfD4kMo40kwuOpO7GYfAZpb2wYdw7yvTIglPNgPPSmp2Fz6MKNvPLla40FQ/ypdhy6B2jRNz3VlCjPD6mnzsmA==", + "requires": { + "aws-sign": "~0.2.0", + "cookie-jar": "~0.2.0", + "forever-agent": "~0.2.0", + "form-data": "~0.0.3", + "hawk": "~0.10.2", + "json-stringify-safe": "~3.0.0", + "mime": "~1.2.7", + "node-uuid": "~1.4.0", + "oauth-sign": "~0.2.0", + "qs": "~0.5.4", + "tunnel-agent": "~0.2.0" + } + }, + "tunnel-agent": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.2.0.tgz", + "integrity": "sha512-PXy4q1PH88BK0pcGOEMXFAslyBuRWz1wxLfPXTlYFd41eyUgjOALaVGbWJN1ymjbnBzjWunVSKmrrMMh8oLaZA==" + } + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==" + }, "workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -43070,6 +46842,10 @@ "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", "dev": true }, + "xmlhttprequest": { + "version": "https://github.com/LearnBoost/node-XMLHttpRequest/archive/0f36d0b5ebc03d85f860d42a64ae9791e1daa433.tar.gz", + "integrity": "sha512-TVSZwoeUQ7OKhb8jnQdSxGFz+lm4MGWmhG0deeYg85VQT74x5LcSrKeXHE0ZIzEycgqQ5mF8r8e1AykA7TpNAQ==" + }, "xmlhttprequest-ssl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz", @@ -43218,6 +46994,5 @@ "jszip": "^3.2.2" } } - }, - "version": "2.22.1" + } } diff --git a/package.json b/package.json index 6fff63534..db7196597 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,9 @@ "url": "https://github.com/ipfs-shipyard/ipfs-companion.git" }, "type": "module", + "sideEffects": [ + "*.css" + ], "scripts": { "start": "run-s clean build test firefox", "clean": "run-p clean:*", @@ -91,6 +94,7 @@ "abort-controller": "3.0.0", "babel-loader": "9.1.0", "babel-plugin-syntax-async-generators": "6.13.0", + "bufferutil": "^4.0.7", "c8": "7.12.0", "chai": "4.3.7", "cross-env": "7.0.3", @@ -100,6 +104,9 @@ "file-loader": "6.2.0", "fs-promise": "2.0.3", "get-firefox": "5.0.0", + "global": "^4.4.0", + "http-browserify": "^1.7.0", + "https-browserify": "^1.0.0", "ignore-loader": "0.1.2", "ignore-styles": "5.0.1", "ipfs-core": "0.17.0", @@ -111,6 +118,7 @@ "npm-run-all": "4.1.5", "patch-package": "6.5.0", "path": "0.12.7", + "process": "^0.11.10", "raw-loader": "4.0.2", "request-progress": "3.0.0", "selenium-webdriver": "^4.7.1", @@ -126,6 +134,7 @@ "ts-standard": "^12.0.2", "typescript": "^4.9.4", "url": "0.11.0", + "utf-8-validate": "^5.0.10", "web-ext": "7.3.1", "webpack": "5.75.0", "webpack-bundle-analyzer": "4.7.0", diff --git a/patches/@protobufjs+inquire+1.1.0.patch b/patches/@protobufjs+inquire+1.1.0.patch new file mode 100644 index 000000000..3b83f04c7 --- /dev/null +++ b/patches/@protobufjs+inquire+1.1.0.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/@protobufjs/inquire/index.js b/node_modules/@protobufjs/inquire/index.js +index 33778b5..3115fa7 100644 +--- a/node_modules/@protobufjs/inquire/index.js ++++ b/node_modules/@protobufjs/inquire/index.js +@@ -9,7 +9,7 @@ module.exports = inquire; + */ + function inquire(moduleName) { + try { +- var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval ++ var mod = require(moduleName); // eslint-disable-line no-eval + if (mod && (mod.length || Object.keys(mod).length)) + return mod; + } catch (e) {} // eslint-disable-line no-empty diff --git a/patches/debug+4.3.4.patch b/patches/debug+4.3.4.patch new file mode 100644 index 000000000..ae295b5f5 --- /dev/null +++ b/patches/debug+4.3.4.patch @@ -0,0 +1,32 @@ +diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js +index cd0fc35..794db58 100644 +--- a/node_modules/debug/src/browser.js ++++ b/node_modules/debug/src/browser.js +@@ -116,7 +116,7 @@ function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly +- if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { ++ if (typeof globalThis !== 'undefined' && globalThis.process && (globalThis.process.type === 'renderer' || globalThis.process.__nwjs)) { + return true; + } + +@@ -129,7 +129,7 @@ function useColors() { + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 +- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || ++ (typeof globalThis !== 'undefined' && globalThis.console && (globalThis.console.firebug || (globalThis.console.exception && globalThis.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || +@@ -245,6 +245,9 @@ function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. ++ if (chrome?.storage?.local) { ++ return chrome.storage.local; ++ } + return localStorage; + } catch (error) { + // Swallow diff --git a/test/functional/lib/dnslink.test.js b/test/functional/lib/dnslink.test.js index 0a7026092..5c5e18009 100644 --- a/test/functional/lib/dnslink.test.js +++ b/test/functional/lib/dnslink.test.js @@ -16,7 +16,7 @@ const dnslinkValue = '/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR' export function spoofDnsTxtRecord (fqdn, dnslinkResolver, value) { // spoofs existence of valid DNS TXT record (used on cache miss) - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns(value) + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves(value) } export function spoofCachedDnslink (fqdn, dnslinkResolver, value) { @@ -71,25 +71,25 @@ describe('dnslinkResolver (dnslinkPolicy=detectIpfsPathHeader)', function () { describe('dnslinkAtGateway(url)', function () { ['/api/v0/foo', '/ipfs/foo', '/ipns/foo'].forEach(path => { - it('should return nothing if dnslink is present in cache but path starts with ' + path, function () { + it('should return nothing if dnslink is present in cache but path starts with ' + path, async function () { const url = new URL('https://dnslinksite1.io' + path) const dnslinkResolver = createDnslinkResolver(getState) dnslinkResolver.setDnslink(url.hostname, '/ipfs/bafybeigxjv2o4jse2lajbd5c7xxl5rluhyqg5yupln42252e5tcao7hbge') expectNoDnsTxtRecordLookup(url.hostname, dnslinkResolver) - expect(dnslinkResolver.dnslinkAtGateway(url.toString())).to.equal(undefined) + expect(await dnslinkResolver.dnslinkAtGateway(url.toString())).to.equal(undefined) }) }) - it('[external node] should return redirect to custom gateway if dnslink is present in cache', function () { + it('[external node] should return redirect to custom gateway if dnslink is present in cache', async function () { const url = new URL('https://dnslinksite4.io/foo/barl?a=b#c=d') const dnslinkResolver = createDnslinkResolver(getExternalNodeState) dnslinkResolver.setDnslink(url.hostname, '/ipfs/bafybeigxjv2o4jse2lajbd5c7xxl5rluhyqg5yupln42252e5tcao7hbge') expectNoDnsTxtRecordLookup(url.hostname, dnslinkResolver) // note: locahost will redirect to subdomain if its go-ipfs >0.5, // so companion does not need to handle that - expect(dnslinkResolver.dnslinkAtGateway(url.toString())) + expect(await dnslinkResolver.dnslinkAtGateway(url.toString())) .to.equal('http://localhost:8080/ipns/dnslinksite4.io/foo/barl?a=b#c=d') }) - it('[external node] should return redirect to public gateway if dnslink is present in cache but redirect to local gw is off', function () { + it('[external node] should return redirect to public gateway if dnslink is present in cache but redirect to local gw is off', async function () { const oldState = getState getState = () => Object.assign(oldState(), { redirect: false }) const url = new URL('https://dnslinksite4.io/foo/barl?a=b#c=d') @@ -98,47 +98,47 @@ describe('dnslinkResolver (dnslinkPolicy=detectIpfsPathHeader)', function () { expectNoDnsTxtRecordLookup(url.hostname, dnslinkResolver) // note: locahost will redirect to subdomain if its go-ipfs >0.5, // so companion does not need to handle that - expect(dnslinkResolver.dnslinkAtGateway(url.toString())) + expect(await dnslinkResolver.dnslinkAtGateway(url.toString())) .to.equal('https://gateway.foobar.io/ipns/dnslinksite4.io/foo/barl?a=b#c=d') }) - it('[embedded node] should return redirect to public gateway if dnslink is present in cache', function () { + it('[embedded node] should return redirect to public gateway if dnslink is present in cache', async function () { const url = new URL('https://dnslinksite4.io/foo/barl?a=b#c=d') const dnslinkResolver = createDnslinkResolver(getEmbeddedNodeState) dnslinkResolver.setDnslink(url.hostname, '/ipfs/bafybeigxjv2o4jse2lajbd5c7xxl5rluhyqg5yupln42252e5tcao7hbge') expectNoDnsTxtRecordLookup(url.hostname, dnslinkResolver) - expect(dnslinkResolver.dnslinkAtGateway(url.toString())) + expect(await dnslinkResolver.dnslinkAtGateway(url.toString())) .to.equal('https://gateway.foobar.io/ipns/dnslinksite4.io/foo/barl?a=b#c=d') }) - it('[external node] should not return redirect to custom gateway if dnslink is not in cache and path does not belong to a gateway', function () { + it('[external node] should not return redirect to custom gateway if dnslink is not in cache and path does not belong to a gateway', async function () { const url = new URL('https://dnslinksite4.io/foo/barl?a=b#c=d') const dnslinkResolver = createDnslinkResolver(getExternalNodeState) dnslinkResolver.clearCache() expectNoDnsTxtRecordLookup(url.hostname, dnslinkResolver) - expect(dnslinkResolver.dnslinkAtGateway(url.toString())).to.equal(undefined) + expect(await dnslinkResolver.dnslinkAtGateway(url.toString())).to.equal(undefined) }) - it('[embedded node] should not return redirect to public gateway if dnslink is not in cache and path does not belong to a gateway', function () { + it('[embedded node] should not return redirect to public gateway if dnslink is not in cache and path does not belong to a gateway', async function () { const url = new URL('https://dnslinksite4.io/foo/barl?a=b#c=d') const dnslinkResolver = createDnslinkResolver(getEmbeddedNodeState) dnslinkResolver.clearCache() expectNoDnsTxtRecordLookup(url.hostname, dnslinkResolver) - expect(dnslinkResolver.dnslinkAtGateway(url.toString())).to.equal(undefined) + expect(await dnslinkResolver.dnslinkAtGateway(url.toString())).to.equal(undefined) }) }) describe('canRedirectToIpns(url)', function () { const httpGatewayPaths = ['/api/v0/foo', '/ipfs/foo', '/ipns/foo'] httpGatewayPaths.forEach(path => { - it('should return false if dnslink is present in cache but path starts with /api/v0/', function () { + it('should return false if dnslink is present in cache but path starts with /api/v0/', async function () { const url = new URL('https://dnslinksite1.io' + path) const dnslinkResolver = createDnslinkResolver(getState) dnslinkResolver.setDnslink(url.hostname, '/ipfs/bafybeigxjv2o4jse2lajbd5c7xxl5rluhyqg5yupln42252e5tcao7hbge') expectNoDnsTxtRecordLookup(url.hostname, dnslinkResolver) - expect(dnslinkResolver.canRedirectToIpns(url)).to.equal(false) + expect(await dnslinkResolver.canRedirectToIpns(url)).to.equal(false) }) }) const dnslinkCacheStates = [true, false] dnslinkCacheStates.forEach(cached => { - it(`should return ${cached} if dnslink is ${cached ? 'present' : 'not'} in cache and path does not belong to an HTTP gateway`, function () { + it(`should return ${cached} if dnslink is ${cached ? 'present' : 'not'} in cache and path does not belong to an HTTP gateway`, async function () { const url = new URL('https://dnslinksite4.io/foo/bar') const dnslinkResolver = createDnslinkResolver(getState) if (cached) { @@ -147,7 +147,7 @@ describe('dnslinkResolver (dnslinkPolicy=detectIpfsPathHeader)', function () { dnslinkResolver.clearCache() } expectNoDnsTxtRecordLookup(url.hostname, dnslinkResolver) - expect(dnslinkResolver.canRedirectToIpns(url)).to.equal(cached) + expect(await dnslinkResolver.canRedirectToIpns(url)).to.equal(cached) }) }) }) @@ -169,96 +169,96 @@ describe('dnslinkResolver (dnslinkPolicy=enabled)', function () { describe('dnslinkAtGateway(url)', function () { ['/api/v0/foo', '/ipfs/foo', '/ipns/foo'].forEach(path => { - it('should return nothing if DNS TXT record is present but path starts with ' + path, function () { + it('should return nothing if DNS TXT record is present but path starts with ' + path, async function () { const url = new URL('https://dnslinksite1.io' + path) const dnslinkResolver = createDnslinkResolver(getState) spoofDnsTxtRecord(url.hostname, dnslinkResolver, dnslinkValue) - expect(dnslinkResolver.dnslinkAtGateway(url.toString())).to.equal(undefined) + expect(await dnslinkResolver.dnslinkAtGateway(url.toString())).to.equal(undefined) }) }) - it('[external node] should return redirect to custom gateway if DNS TXT record is present and path does not belong to a gateway', function () { + it('[external node] should return redirect to custom gateway if DNS TXT record is present and path does not belong to a gateway', async function () { const url = new URL('https://dnslinksite4.io/foo/barl?a=b#c=d') const dnslinkResolver = createDnslinkResolver(getExternalNodeState) spoofDnsTxtRecord(url.hostname, dnslinkResolver, dnslinkValue) // note: locahost will redirect to subdomain if its go-ipfs >0.5, // so companion does not need to handle that - expect(dnslinkResolver.dnslinkAtGateway(url.toString())) + expect(await dnslinkResolver.dnslinkAtGateway(url.toString())) .to.equal('http://localhost:8080/ipns/dnslinksite4.io/foo/barl?a=b#c=d') }) - it('[embedded node] should return redirect to public gateway if DNS TXT record is present and path does not belong to a gateway', function () { + it('[embedded node] should return redirect to public gateway if DNS TXT record is present and path does not belong to a gateway', async function () { const url = new URL('https://dnslinksite4.io/foo/barl?a=b#c=d') const dnslinkResolver = createDnslinkResolver(getEmbeddedNodeState) spoofDnsTxtRecord(url.hostname, dnslinkResolver, dnslinkValue) - expect(dnslinkResolver.dnslinkAtGateway(url.toString())) + expect(await dnslinkResolver.dnslinkAtGateway(url.toString())) .to.equal('https://gateway.foobar.io/ipns/dnslinksite4.io/foo/barl?a=b#c=d') }) }) describe('canRedirectToIpns(url)', function () { - it('should return false if dnslink is present but path starts with /api/v0/', function () { + it('should return false if dnslink is present but path starts with /api/v0/', async function () { const url = new URL('https://dnslinksite1.io/api/v0/dns/ipfs.io') const dnslinkResolver = createDnslinkResolver(getState) spoofDnsTxtRecord(url.hostname, dnslinkResolver, dnslinkValue) - expect(dnslinkResolver.canRedirectToIpns(url)).to.equal(false) + expect(await dnslinkResolver.canRedirectToIpns(url)).to.equal(false) }) - it('should return false if dnslink is present but path starts with /ipfs/', function () { + it('should return false if dnslink is present but path starts with /ipfs/', async function () { const url = new URL('https://dnslinksite2.io/ipfs/foo/bar') const dnslinkResolver = createDnslinkResolver(getState) spoofDnsTxtRecord(url.hostname, dnslinkResolver, dnslinkValue) - expect(dnslinkResolver.canRedirectToIpns(url)).to.equal(false) + expect(await dnslinkResolver.canRedirectToIpns(url)).to.equal(false) }) - it('should return false if dnslink is present but path starts with /ipfs/', function () { + it('should return false if dnslink is present but path starts with /ipfs/', async function () { const url = new URL('https://dnslinksite3.io/ipns/foo/bar') const dnslinkResolver = createDnslinkResolver(getState) spoofDnsTxtRecord(url.hostname, dnslinkResolver, dnslinkValue) - expect(dnslinkResolver.canRedirectToIpns(url)).to.equal(false) + expect(await dnslinkResolver.canRedirectToIpns(url)).to.equal(false) }) const dnsTxtRecordPresence = [undefined, '/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR'] dnsTxtRecordPresence.forEach(present => { - it(`should return ${Boolean(present)} if DNS TXT record is ${present ? 'present' : 'missing'} and path does not belong to an HTTP gateway`, function () { + it(`should return ${Boolean(present)} if DNS TXT record is ${present ? 'present' : 'missing'} and path does not belong to an HTTP gateway`, async function () { const url = new URL('https://dnslinksite4.io/foo/bar') const dnslinkResolver = createDnslinkResolver(getState) spoofDnsTxtRecord(url.hostname, dnslinkResolver, present) - expect(dnslinkResolver.canRedirectToIpns(url)).to.equal(Boolean(present)) + expect(await dnslinkResolver.canRedirectToIpns(url)).to.equal(Boolean(present)) }) }) }) describe('findDNSLinkHostname(url)', function () { - it('should match directly', function () { + it('should match directly', async function () { const fqdn = 'dnslink-site.com' const url = new URL(`https://${fqdn}/some/path?ds=sdads#dfsdf`) const dnslinkResolver = createDnslinkResolver(getState) spoofDnsTxtRecord(fqdn, dnslinkResolver, dnslinkValue) - expect(dnslinkResolver.findDNSLinkHostname(url)).to.equal(fqdn) + expect(await dnslinkResolver.findDNSLinkHostname(url)).to.equal(fqdn) }) - it('should return nothing if no DNSLink record', function () { + it('should return nothing if no DNSLink record', async function () { const url = new URL('https://no-dnslink.example.com/some/path?ds=sdads#dfsdf') const dnslinkResolver = createDnslinkResolver(getState) - expect(dnslinkResolver.findDNSLinkHostname(url)).to.equal(undefined) + expect(await dnslinkResolver.findDNSLinkHostname(url)).to.equal(undefined) }) - it('should match /ipns/ on path gateway', function () { + it('should match /ipns/ on path gateway', async function () { const fqdn = 'dnslink-site.com' const url = `https://path-gateway.com/ipns/${fqdn}/some/path?ds=sdads#dfsdf` const dnslinkResolver = createDnslinkResolver(getState) spoofDnsTxtRecord(fqdn, dnslinkResolver, dnslinkValue) - expect(dnslinkResolver.findDNSLinkHostname(url)).to.equal(fqdn) + expect(await dnslinkResolver.findDNSLinkHostname(url)).to.equal(fqdn) }) - it('should match .ipns on local subdomain gateway', function () { + it('should match .ipns on local subdomain gateway', async function () { const fqdn = 'dnslink-site.com' const url = `https://${fqdn}.ipns.localhost:8080/some/path?ds=sdads#dfsdf` const dnslinkResolver = createDnslinkResolver(getState) spoofDnsTxtRecord(fqdn, dnslinkResolver, dnslinkValue) - expect(dnslinkResolver.findDNSLinkHostname(url)).to.equal(fqdn) + expect(await dnslinkResolver.findDNSLinkHostname(url)).to.equal(fqdn) }) - it('should match .ipns on public subdomain gateway', function () { + it('should match .ipns on public subdomain gateway', async function () { const fqdn = 'dnslink-site.com' const url = `https://${fqdn}.ipns.dweb.link/some/path?ds=sdads#dfsdf` const dnslinkResolver = createDnslinkResolver(getState) spoofDnsTxtRecord(fqdn, dnslinkResolver, dnslinkValue) - expect(dnslinkResolver.findDNSLinkHostname(url)).to.equal(fqdn) + expect(await dnslinkResolver.findDNSLinkHostname(url)).to.equal(fqdn) }) - it('should match .ipns on public subdomain gateway', function () { + it('should match .ipns on public subdomain gateway', async function () { // Context: https://github.com/ipfs/in-web-browsers/issues/169 const fqdn = 'dnslink-site.com' const fqdnInDNSLabel = 'dnslink--site-com' @@ -266,7 +266,7 @@ describe('dnslinkResolver (dnslinkPolicy=enabled)', function () { const dnslinkResolver = createDnslinkResolver(getState) spoofCachedDnslink(fqdnInDNSLabel, dnslinkResolver, false) spoofCachedDnslink(fqdn, dnslinkResolver, dnslinkValue) - expect(dnslinkResolver.findDNSLinkHostname(url)).to.equal(fqdn) + expect(await dnslinkResolver.findDNSLinkHostname(url)).to.equal(fqdn) }) }) diff --git a/test/functional/lib/ipfs-companion.test.js b/test/functional/lib/ipfs-companion.test.js index 96ca7098b..31bb4deb4 100644 --- a/test/functional/lib/ipfs-companion.test.js +++ b/test/functional/lib/ipfs-companion.test.js @@ -51,9 +51,9 @@ describe('lib/ipfs-companion.js', function () { it('should update ipfs API instance on IPFS API URL change', async function () { browser.storage.local.get.resolves(optionDefaults) browser.storage.local.set.resolves() - browser.browserAction.setBadgeBackgroundColor.resolves() - browser.browserAction.setBadgeText.resolves() - browser.browserAction.setIcon.resolves() + browser.action.setBadgeBackgroundColor.resolves() + browser.action.setBadgeText.resolves() + browser.action.setIcon.resolves() browser.tabs.query.resolves([{ id: 'TEST' }]) browser.contextMenus.update.resolves() browser.idle.queryState.resolves('active') diff --git a/test/functional/lib/ipfs-path.test.js b/test/functional/lib/ipfs-path.test.js index c72eea739..8e70c64a3 100644 --- a/test/functional/lib/ipfs-path.test.js +++ b/test/functional/lib/ipfs-path.test.js @@ -210,43 +210,43 @@ describe('ipfs-path.js', function () { describe('validIpfsOrIpns', function () { // this is just a smoke test, extensive tests are in is-ipfs package - it('should return true for IPFS NURI', function () { + it('should return true for IPFS NURI', async function () { const path = '/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest' - expect(ipfsPathValidator.validIpfsOrIpns(path)).to.equal(true) + expect(await ipfsPathValidator.validIpfsOrIpns(path)).to.equal(true) }) - it('should return false for non-IPFS NURI', function () { + it('should return false for non-IPFS NURI', async function () { const path = '/ipfs/NotAValidCid' - expect(ipfsPathValidator.validIpfsOrIpns(path)).to.equal(false) + expect(await ipfsPathValidator.validIpfsOrIpns(path)).to.equal(false) }) // this is just a smoke test, extensive tests are in is-ipfs package - it('should return true for URL at IPFS Gateway', function () { + it('should return true for URL at IPFS Gateway', async function () { const url = 'https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest' - expect(ipfsPathValidator.validIpfsOrIpns(url)).to.equal(true) + expect(await ipfsPathValidator.validIpfsOrIpns(url)).to.equal(true) }) - it('should return false for non-IPFS URL', function () { + it('should return false for non-IPFS URL', async function () { const url = 'https://ipfs.io/ipfs/NotACid?argTest#hashTest' - expect(ipfsPathValidator.validIpfsOrIpns(url)).to.equal(false) + expect(await ipfsPathValidator.validIpfsOrIpns(url)).to.equal(false) }) }) describe('publicIpfsOrIpnsResource', function () { - it('should return true for URL at Public IPFS Gateway', function () { + it('should return true for URL at Public IPFS Gateway', async function () { const url = `${state.pubGwURL}ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest` - expect(ipfsPathValidator.publicIpfsOrIpnsResource(url)).to.equal(true) + expect(await ipfsPathValidator.publicIpfsOrIpnsResource(url)).to.equal(true) }) - it('should return false for URL at Local IPFS Gateway', function () { + it('should return false for URL at Local IPFS Gateway', async function () { const url = `${state.gwURL}ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest` - expect(ipfsPathValidator.publicIpfsOrIpnsResource(url)).to.equal(false) + expect(await ipfsPathValidator.publicIpfsOrIpnsResource(url)).to.equal(false) }) - it('should return false for IPFS URL at API port', function () { + it('should return false for IPFS URL at API port', async function () { const url = `${state.apiURL}ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest` - expect(ipfsPathValidator.publicIpfsOrIpnsResource(url)).to.equal(false) - expect(ipfsPathValidator.validIpfsOrIpns(url)).to.equal(true) + expect(await ipfsPathValidator.publicIpfsOrIpnsResource(url)).to.equal(false) + expect(await ipfsPathValidator.validIpfsOrIpns(url)).to.equal(true) }) - it('should return false for non-IPFS URL', function () { + it('should return false for non-IPFS URL', async function () { const url = 'https://ipfs.io/ipfs/NotACid?argTest#hashTest' - expect(ipfsPathValidator.publicIpfsOrIpnsResource(url)).to.equal(false) - expect(ipfsPathValidator.validIpfsOrIpns(url)).to.equal(false) + expect(await ipfsPathValidator.publicIpfsOrIpnsResource(url)).to.equal(false) + expect(await ipfsPathValidator.validIpfsOrIpns(url)).to.equal(false) }) describe('isIpfsPageActionsContext', function () { it('should return true for URL at Public IPFS Gateway', function () { @@ -257,15 +257,15 @@ describe('ipfs-path.js', function () { const url = `${state.gwURL}ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest` expect(ipfsPathValidator.isIpfsPageActionsContext(url)).to.equal(true) }) - it('should return false for IPFS URL at API port', function () { + it('should return false for IPFS URL at API port', async function () { const url = `${state.apiURL}ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest` - expect(ipfsPathValidator.isIpfsPageActionsContext(url)).to.equal(false) - expect(ipfsPathValidator.validIpfsOrIpns(url)).to.equal(true) + expect(await ipfsPathValidator.isIpfsPageActionsContext(url)).to.equal(false) + expect(await ipfsPathValidator.validIpfsOrIpns(url)).to.equal(true) }) - it('should return false for non-IPFS URL', function () { + it('should return false for non-IPFS URL', async function () { const url = 'https://ipfs.io/ipfs/NotACid?argTest#hashTest' - expect(ipfsPathValidator.publicIpfsOrIpnsResource(url)).to.equal(false) - expect(ipfsPathValidator.validIpfsOrIpns(url)).to.equal(false) + expect(await ipfsPathValidator.publicIpfsOrIpnsResource(url)).to.equal(false) + expect(await ipfsPathValidator.validIpfsOrIpns(url)).to.equal(false) }) }) }) @@ -328,37 +328,37 @@ describe('ipfs-path.js', function () { }) describe('resolveToPublicUrl', function () { - it('should resolve URL with CID-in-subdomain to itself', function () { + it('should resolve URL with CID-in-subdomain to itself', async function () { const url = 'https://bafybeicgmdpvw4duutrmdxl4a7gc52sxyuk7nz5gby77afwdteh3jc5bqa.ipfs.dweb.link/wiki/Mars.html?argTest#hashTest' - expect(ipfsPathValidator.resolveToPublicUrl(url)).to.equal(url) + expect(await ipfsPathValidator.resolveToPublicUrl(url)).to.equal(url) }) - it('should resolve URL with /ipfs/ path to the default public gateway', function () { + it('should resolve URL with /ipfs/ path to the default public gateway', async function () { const url = 'https://example.com/ipfs/bafybeicgmdpvw4duutrmdxl4a7gc52sxyuk7nz5gby77afwdteh3jc5bqa/wiki/Mars.html?argTest#hashTest' - expect(ipfsPathValidator.resolveToPublicUrl(url)).to.equal(`${state.pubGwURL}ipfs/bafybeicgmdpvw4duutrmdxl4a7gc52sxyuk7nz5gby77afwdteh3jc5bqa/wiki/Mars.html?argTest#hashTest`) + expect(await ipfsPathValidator.resolveToPublicUrl(url)).to.equal(`${state.pubGwURL}ipfs/bafybeicgmdpvw4duutrmdxl4a7gc52sxyuk7nz5gby77afwdteh3jc5bqa/wiki/Mars.html?argTest#hashTest`) }) - it('should resolve /ipfs/ path to itself attached to the default public gateway', function () { + it('should resolve /ipfs/ path to itself attached to the default public gateway', async function () { const path = '/ipfs/bafybeicgmdpvw4duutrmdxl4a7gc52sxyuk7nz5gby77afwdteh3jc5bqa/wiki/Mars.html?argTest#hashTest' - expect(ipfsPathValidator.resolveToPublicUrl(path)).to.equal(`${state.pubGwURL}ipfs/bafybeicgmdpvw4duutrmdxl4a7gc52sxyuk7nz5gby77afwdteh3jc5bqa/wiki/Mars.html?argTest#hashTest`) + expect(await ipfsPathValidator.resolveToPublicUrl(path)).to.equal(`${state.pubGwURL}ipfs/bafybeicgmdpvw4duutrmdxl4a7gc52sxyuk7nz5gby77afwdteh3jc5bqa/wiki/Mars.html?argTest#hashTest`) }) - it('should resolve URL with /ipns/ path to the default public gateway', function () { + it('should resolve URL with /ipns/ path to the default public gateway', async function () { const url = 'https://example.com/ipns/docs.ipfs.io/?argTest#hashTest' - expect(ipfsPathValidator.resolveToPublicUrl(url)).to.equal(`${state.pubGwURL}ipns/docs.ipfs.io/?argTest#hashTest`) + expect(await ipfsPathValidator.resolveToPublicUrl(url)).to.equal(`${state.pubGwURL}ipns/docs.ipfs.io/?argTest#hashTest`) }) - it('should resolve /ipns/ path to itself at the default public gateway', function () { + it('should resolve /ipns/ path to itself at the default public gateway', async function () { const path = '/ipns/docs.ipfs.io/?argTest#hashTest' - expect(ipfsPathValidator.resolveToPublicUrl(path)).to.equal(`${state.pubGwURL}ipns/docs.ipfs.io/?argTest#hashTest`) + expect(await ipfsPathValidator.resolveToPublicUrl(path)).to.equal(`${state.pubGwURL}ipns/docs.ipfs.io/?argTest#hashTest`) }) - it('should resolve non-IPFS URL to itself (DNSLink websites)', function () { + it('should resolve non-IPFS URL to itself (DNSLink websites)', async function () { const url = 'https://example.com/foo/bar/?argTest#hashTest' - expect(ipfsPathValidator.resolveToPublicUrl(url)).to.equal(url) + expect(await ipfsPathValidator.resolveToPublicUrl(url)).to.equal(url) }) - it('should resolve to null if input is an invalid path', function () { + it('should resolve to null if input is an invalid path', async function () { const path = '/foo/bar/?argTest#hashTest' - expect(ipfsPathValidator.resolveToPublicUrl(path)).to.equal(null) + expect(await ipfsPathValidator.resolveToPublicUrl(path)).to.equal(null) }) - it('should resolve to null if input is an invalid URL', function () { + it('should resolve to null if input is an invalid URL', async function () { const url = 'example.com/foo/bar/?argTest#hashTest' - expect(ipfsPathValidator.resolveToPublicUrl(url)).to.equal(null) + expect(await ipfsPathValidator.resolveToPublicUrl(url)).to.equal(null) }) }) diff --git a/test/functional/lib/ipfs-request-dnslink.test.js b/test/functional/lib/ipfs-request-dnslink.test.js index ce813593a..fbfe80671 100644 --- a/test/functional/lib/ipfs-request-dnslink.test.js +++ b/test/functional/lib/ipfs-request-dnslink.test.js @@ -59,85 +59,85 @@ describe('modifyRequest processing of DNSLinks', function () { // clear dnslink cache to ensure DNS TXT record lookup is triggered dnslinkResolver.clearCache() }) - it('should do nothing if DNS TXT record exists', function () { + it('should do nothing if DNS TXT record exists', async function () { // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // const request = url2request('http://explore.ipld.io/index.html?argTest#hashTest') // onBeforeRequest should not change anything - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) // onHeadersReceived should not change anything - expect(modifyRequest.onHeadersReceived(request)).to.equal(undefined) + expect(await modifyRequest.onHeadersReceived(request)).to.equal(undefined) }) - it('should do nothing if dnslink for FQDN is in cache', function () { + it('should do nothing if dnslink for FQDN is in cache', async function () { // stub existence of a positive DNSLink cache hit const fqdn = 'explore.ipld.io' dnslinkResolver.setDnslink(fqdn, '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // const request = url2request('http://explore.ipld.io/index.html?argTest#hashTest') // onBeforeRequest should not change anything - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) // onHeadersReceived should not change anything - expect(modifyRequest.onHeadersReceived(request)).to.equal(undefined) + expect(await modifyRequest.onHeadersReceived(request)).to.equal(undefined) }) - it('should do nothing if DNS TXT record exists and dnslink is in cache', function () { + it('should do nothing if DNS TXT record exists and dnslink is in cache', async function () { // stub existence of a valid DNS record and cache const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') dnslinkResolver.setDnslink(fqdn, '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // const request = url2request('http://explore.ipld.io/index.html?argTest#hashTest') // onBeforeRequest should not change anything - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) // onHeadersReceived should not change anything - expect(modifyRequest.onHeadersReceived(request)).to.equal(undefined) + expect(await modifyRequest.onHeadersReceived(request)).to.equal(undefined) }) - it('should do nothing if DNS TXT record exists and x-ipfs-path is disabled', function () { + it('should do nothing if DNS TXT record exists and x-ipfs-path is disabled', async function () { // enable detection of x-ipfs-path to ensure it is not enough without dnslinkPolicy=detectIpfsPathHeader state.detectIpfsPathHeader = false // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipns/this-should-be-ignored.io') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipns/this-should-be-ignored.io') // const request = url2request('http://explore.ipld.io/index.html?argTest#hashTest') // onBeforeRequest should not change anything - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) // simulate presence of x-ipfs-path header returned by HTTP gateway request.responseHeaders = [{ name: 'X-Ipfs-Path', value: '/ipns/value-from-x-ipfs-path.io' }] // onHeadersReceived should not change anything - expect(modifyRequest.onHeadersReceived(request)).to.equal(undefined) + expect(await modifyRequest.onHeadersReceived(request)).to.equal(undefined) }) - it('should ignore DNS TXT record and use /ipfs/ path from x-ipfs-path if both are present', function () { + it('should ignore DNS TXT record and use /ipfs/ path from x-ipfs-path if both are present', async function () { // enable detection of x-ipfs-path to ensure it is not enough without dnslinkPolicy=detectIpfsPathHeader state.detectIpfsPathHeader = true // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipns/this-should-be-ignored.io') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipns/this-should-be-ignored.io') // const request = url2request('http://explore.ipld.io/index.html?argTest#hashTest') // onBeforeRequest should not change anything - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) // simulate presence of x-ipfs-path header returned by HTTP gateway request.responseHeaders = [{ name: 'X-Ipfs-Path', value: '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd' }] // onHeadersReceived should redirect to value from X-Ipfs-Path - expect(modifyRequest.onHeadersReceived(request).redirectUrl).to.equal(activeGateway + '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd?argTest#hashTest') + expect((await modifyRequest.onHeadersReceived(request)).redirectUrl).to.equal(activeGateway + '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd?argTest#hashTest') }) - it('should ignore DNS TXT record and also ignore /ipns/ path from x-ipfs-path if both are present', function () { + it('should ignore DNS TXT record and also ignore /ipns/ path from x-ipfs-path if both are present', async function () { // enable detection of x-ipfs-path to ensure it is not enough without dnslinkPolicy=detectIpfsPathHeader state.detectIpfsPathHeader = true // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipns/this-should-be-ignored.io') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipns/this-should-be-ignored.io') // const request = url2request('http://explore.ipld.io/index.html?argTest#hashTest') // onBeforeRequest should not change anything - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) // simulate presence of x-ipfs-path header returned by HTTP gateway request.responseHeaders = [{ name: 'X-Ipfs-Path', value: '/ipns/value-from-x-ipfs-path-to-ignore.io' }] // onHeadersReceived should ignore /ipns/ from x-ipfs-path because dnslink is disabled in preferences // and redirect would confuse users - expect(modifyRequest.onHeadersReceived(request)).to.equal(undefined) + expect(await modifyRequest.onHeadersReceived(request)).to.equal(undefined) }) }) @@ -156,60 +156,60 @@ describe('modifyRequest processing of DNSLinks', function () { // clear dnslink cache to ensure DNS TXT record lookup is triggered dnslinkResolver.clearCache() }) - it('should redirect in onBeforeRequest if dnslink exists', function () { + it('should redirect in onBeforeRequest if dnslink exists', async function () { // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // const request = url2request('http://explore.ipld.io/index.html?argTest#hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') }) - it('should redirect in onBeforeRequest if DNS TXT record exists, XHR is cross-origin and runtime is Chromium', function () { + it('should redirect in onBeforeRequest if DNS TXT record exists, XHR is cross-origin and runtime is Chromium', async function () { // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // runtime.isFirefox = false // Chrome uses 'initiator' for origin const xhrRequest = { url: 'http://explore.ipld.io/index.html?argTest#hashTest', type: 'xmlhttprequest', initiator: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') }) - it('should redirect in onBeforeRequest if dnslink exists, XHR is cross-origin and runtime is Firefox', function () { + it('should redirect in onBeforeRequest if dnslink exists, XHR is cross-origin and runtime is Firefox', async function () { // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // runtime.isFirefox = true // Firefox uses 'originUrl' for origin const xhrRequest = { url: 'http://explore.ipld.io/index.html?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') }) - it('should redirect later in onHeadersReceived if dnslink exists, XHR is cross-origin and runtime is Firefox <69', function () { + it('should redirect later in onHeadersReceived if dnslink exists, XHR is cross-origin and runtime is Firefox <69', async function () { // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // // Context for CORS XHR problems in Firefox <69: https://github.com/ipfs-shipyard/ipfs-companion/issues/436 runtime.requiresXHRCORSfix = true // Firefox uses 'originUrl' for origin const xhrRequest = { url: 'http://explore.ipld.io/index.html?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } // onBeforeRequest should not change anything, as it will trigger false-positive CORS error - expect(modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) // onHeadersReceived is after CORS validation happens, so its ok to cancel and redirect late - expect(modifyRequest.onHeadersReceived(xhrRequest).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') + expect((await modifyRequest.onHeadersReceived(xhrRequest)).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') }) - it('should do nothing if dnslink does not exist and XHR is cross-origin in Firefox', function () { + it('should do nothing if dnslink does not exist and XHR is cross-origin in Firefox', async function () { // stub no dnslink const fqdn = 'youtube.com' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns(undefined) + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves(undefined) // Context for CORS XHR problems in Firefox: https://github.com/ipfs-shipyard/ipfs-companion/issues/436 runtime.isFirefox = true // Firefox uses 'originUrl' for origin const xhrRequest = { url: 'https://youtube.com/index.html?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } // onBeforeRequest should not change anything - expect(modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) // onHeadersReceived should not change anything - expect(modifyRequest.onHeadersReceived(xhrRequest)).to.equal(undefined) + expect(await modifyRequest.onHeadersReceived(xhrRequest)).to.equal(undefined) }) }) @@ -231,77 +231,77 @@ describe('modifyRequest processing of DNSLinks', function () { // force-clear dnslink cache to enable cache miss dnslinkResolver.clearCache() }) - it('should redirect subrequests in onHeadersReceived if DNS TXT record exists and x-ipfs-path header is present', function () { + it('should redirect subrequests in onHeadersReceived if DNS TXT record exists and x-ipfs-path header is present', async function () { // clear dnslink cache to ensure miss dnslinkResolver.clearCache() // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // const request = url2request('http://explore.ipld.io/index.html?argTest#hashTest') request.type = 'sub_frame' // we test a subrequests because main_frame gets early DNSLink preload in onBeforeRequest - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) // simulate presence of x-ipfs-path header returned by HTTP gateway request.responseHeaders = [{ name: 'X-Ipfs-Path', value: '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd' }] // DNSLink is present, so we ignore hash from X-Ipfs-Path header and redirect to nice /ipns/ address - expect(modifyRequest.onHeadersReceived(request).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') + expect((await modifyRequest.onHeadersReceived(request)).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') }) - it('should redirect in onHeadersReceived if DNS TXT record is missing but x-ipfs-path header is present', function () { + it('should redirect in onHeadersReceived if DNS TXT record is missing but x-ipfs-path header is present', async function () { // clear dnslink cache to ensure miss dnslinkResolver.clearCache() // stub lack of DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns(false) + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves(false) // const request = url2request('http://explore.ipld.io/index.html?argTest#hashTest') request.type = 'sub_frame' // we test a subrequest here because main_frame gets early DNSLink preload in onBeforeRequest - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) // simulate presence of x-ipfs-path header returned by HTTP gateway request.responseHeaders = [{ name: 'X-Ipfs-Path', value: '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd' }] // Note that DNSLink is missing, so a path from x-ipfs-path is used - expect(modifyRequest.onHeadersReceived(request).redirectUrl).to.equal(activeGateway + '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd?argTest#hashTest') + expect((await modifyRequest.onHeadersReceived(request)).redirectUrl).to.equal(activeGateway + '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd?argTest#hashTest') }) - it('should do nothing if DNS TXT record exists but there is no x-ipfs-path header', function () { + it('should do nothing if DNS TXT record exists but there is no x-ipfs-path header', async function () { // clear dnslink cache to ensure miss dnslinkResolver.clearCache() // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // const request = url2request('http://explore.ipld.io/index.html?argTest#hashTest') request.type = 'sub_frame' // we test a subrequest here because main_frame gets early DNSLink preload in onBeforeRequest - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) - expect(modifyRequest.onHeadersReceived(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onHeadersReceived(request)).to.equal(undefined) }) describe('(XHR CORS scenario)', function () { // Test makes more sense for dnslinkPolicy=enabled, but we keep it here for completeness - it('should redirect in onHeadersReceived if XHR is cross-origin and runtime is not Firefox', function () { + it('should redirect in onHeadersReceived if XHR is cross-origin and runtime is not Firefox', async function () { // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // runtime.isFirefox = false const xhrRequest = { url: 'http://explore.ipld.io/index.html?argTest#hashTest', type: 'xmlhttprequest', initiator: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } - expect(modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) xhrRequest.responseHeaders = [{ name: 'X-Ipfs-Path', value: '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd' }] - expect(modifyRequest.onHeadersReceived(xhrRequest).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') + expect((await modifyRequest.onHeadersReceived(xhrRequest)).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') }) // Test makes more sense for dnslinkPolicy=enabled, but we keep it here for completeness - it('should redirect in onHeadersReceived if XHR is cross-origin and runtime is Firefox', function () { + it('should redirect in onHeadersReceived if XHR is cross-origin and runtime is Firefox', async function () { // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // // Context for CORS XHR problems in Firefox: https://github.com/ipfs-shipyard/ipfs-companion/issues/436 runtime.isFirefox = true const xhrRequest = { url: 'http://explore.ipld.io/index.html?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } // onBeforeRequest should not change anything, as it will trigger false-positive CORS error - expect(modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) // onHeadersReceived is after CORS validation happens, so its ok to cancel and redirect late xhrRequest.responseHeaders = [{ name: 'X-Ipfs-Path', value: '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd' }] - expect(modifyRequest.onHeadersReceived(xhrRequest).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') + expect((await modifyRequest.onHeadersReceived(xhrRequest)).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') }) - it('should redirect later in onHeadersReceived if XHR is cross-origin and runtime is Firefox <69', function () { + it('should redirect later in onHeadersReceived if XHR is cross-origin and runtime is Firefox <69', async function () { // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' dnslinkResolver.setDnslink(fqdn, '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') @@ -310,46 +310,46 @@ describe('modifyRequest processing of DNSLinks', function () { runtime.requiresXHRCORSfix = true const xhrRequest = { url: 'http://explore.ipld.io/index.html?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } // onBeforeRequest should not change anything, as it will trigger false-positive CORS error - expect(modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) // onHeadersReceived is after CORS validation happens, so its ok to cancel and redirect late - expect(modifyRequest.onHeadersReceived(xhrRequest).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') + expect((await modifyRequest.onHeadersReceived(xhrRequest)).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') }) // Test makes more sense for dnslinkPolicy=enabled, but we keep it here for completeness - it('should do nothing if DNS TXT record is missing and XHR is cross-origin in Firefox', function () { + it('should do nothing if DNS TXT record is missing and XHR is cross-origin in Firefox', async function () { // stub no dnslink const fqdn = 'youtube.com' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns(false) + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves(false) // Context for CORS XHR problems in Firefox: https://github.com/ipfs-shipyard/ipfs-companion/issues/436 runtime.isFirefox = true const xhrRequest = { url: 'https://youtube.com/index.html?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } // onBeforeRequest should not change anything - expect(modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) // onHeadersReceived should not change anything - expect(modifyRequest.onHeadersReceived(xhrRequest)).to.equal(undefined) + expect(await modifyRequest.onHeadersReceived(xhrRequest)).to.equal(undefined) }) }) }) describe('and dnslink cache hit', function () { - it('should redirect in onBeforeRequest', function () { + it('should redirect in onBeforeRequest', async function () { // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' // manually add item to cache to ensure cache hit dnslinkResolver.setDnslink(fqdn, '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // const request = url2request('http://explore.ipld.io/index.html?argTest#hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') }) describe('(XHR CORS scenario)', function () { - it('should redirect in onBeforeRequest if XHR is cross-origin and runtime is not Firefox', function () { + it('should redirect in onBeforeRequest if XHR is cross-origin and runtime is not Firefox', async function () { // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' dnslinkResolver.setDnslink(fqdn, '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') // runtime.isFirefox = false const xhrRequest = { url: 'http://explore.ipld.io/index.html?argTest#hashTest', type: 'xmlhttprequest', initiator: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') }) - it('should redirect in onBeforeRequest if XHR is cross-origin and runtime is Firefox', function () { + it('should redirect in onBeforeRequest if XHR is cross-origin and runtime is Firefox', async function () { // stub existence of a valid DNS record const fqdn = 'explore.ipld.io' dnslinkResolver.setDnslink(fqdn, '/ipfs/QmbfimSwTuCvGL8XBr3yk1iCjqgk2co2n21cWmcQohymDd') @@ -357,9 +357,9 @@ describe('modifyRequest processing of DNSLinks', function () { // Context for CORS XHR problems in Firefox: https://github.com/ipfs-shipyard/ipfs-companion/issues/436 runtime.isFirefox = true const xhrRequest = { url: 'http://explore.ipld.io/index.html?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal(activeGateway + '/ipns/explore.ipld.io/index.html?argTest#hashTest') }) - it('should do nothing if DNS TXT record is missing and XHR is cross-origin in Firefox', function () { + it('should do nothing if DNS TXT record is missing and XHR is cross-origin in Firefox', async function () { // stub cached info about lack of dnslink const fqdn = 'youtube.com' dnslinkResolver.setDnslink(fqdn, false) @@ -367,9 +367,9 @@ describe('modifyRequest processing of DNSLinks', function () { runtime.isFirefox = true const xhrRequest = { url: 'https://youtube.com/index.html?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } // onBeforeRequest should not change anything - expect(modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) // onHeadersReceived should not change anything - expect(modifyRequest.onHeadersReceived(xhrRequest)).to.equal(undefined) + expect(await modifyRequest.onHeadersReceived(xhrRequest)).to.equal(undefined) }) }) }) diff --git a/test/functional/lib/ipfs-request-gateway-redirect.test.js b/test/functional/lib/ipfs-request-gateway-redirect.test.js index 655fe49c0..c1e78bbd3 100644 --- a/test/functional/lib/ipfs-request-gateway-redirect.test.js +++ b/test/functional/lib/ipfs-request-gateway-redirect.test.js @@ -19,9 +19,9 @@ const fakeRequestId = () => { return Math.floor(Math.random() * 100000).toString() } -const expectNoRedirect = (modifyRequest, request) => { - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) - expect(modifyRequest.onHeadersReceived(request)).to.equal(undefined) +const expectNoRedirect = async (modifyRequest, request) => { + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onHeadersReceived(request)).to.equal(undefined) } const nodeTypes = ['external', 'embedded'] @@ -63,18 +63,18 @@ describe('modifyRequest.onBeforeRequest:', function () { beforeEach(function () { state.ipfsNodeType = 'external' }) - it('should be served from custom gateway if redirect is enabled', function () { + it('should be served from custom gateway if redirect is enabled', async function () { const request = url2request('https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('http://localhost:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('http://localhost:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) }) describe('with embedded node', function () { beforeEach(function () { state.ipfsNodeType = 'embedded' }) - it('should be served from public gateway if redirect is enabled', function () { + it('should be served from public gateway if redirect is enabled', async function () { const request = url2request('https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) }) describe('with every node type', function () { @@ -83,40 +83,40 @@ describe('modifyRequest.onBeforeRequest:', function () { beforeEach(function () { state.ipfsNodeType = nodeType }) - it(`should be left untouched if redirect is disabled (${nodeType} node)`, function () { + it(`should be left untouched if redirect is disabled (${nodeType} node)`, async function () { state.redirect = false const request = url2request('https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') - expectNoRedirect(modifyRequest, request) + await expectNoRedirect(modifyRequest, request) }) - it(`should be left untouched if redirect is enabled but global active flag is OFF (${nodeType} node)`, function () { + it(`should be left untouched if redirect is enabled but global active flag is OFF (${nodeType} node)`, async function () { state.active = false state.redirect = true const request = url2request('https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') - expectNoRedirect(modifyRequest, request) + await expectNoRedirect(modifyRequest, request) }) - it(`should be left untouched if URL includes opt-out hint (${nodeType} node)`, function () { + it(`should be left untouched if URL includes opt-out hint (${nodeType} node)`, async function () { // A safe way for preloading data at arbitrary gateways - it should arrive at original destination const request = url2request('https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?x-ipfs-companion-no-redirect#hashTest') - expectNoRedirect(modifyRequest, request) + await expectNoRedirect(modifyRequest, request) expect(redirectOptOutHint).to.equal('x-ipfs-companion-no-redirect') }) - it(`should be left untouched if request is for subresource on a page loaded from URL that includes opt-out hint (${nodeType} node)`, function () { + it(`should be left untouched if request is for subresource on a page loaded from URL that includes opt-out hint (${nodeType} node)`, async function () { // ensure opt-out works for subresources (Firefox only for now) const subRequest = { type: 'script', url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', originUrl: 'https://example.com/?x-ipfs-companion-no-redirect#hashTest' } - expectNoRedirect(modifyRequest, subRequest) + await expectNoRedirect(modifyRequest, subRequest) }) - it(`should be left untouched if CID is invalid (${nodeType} node)`, function () { + it(`should be left untouched if CID is invalid (${nodeType} node)`, async function () { const request = url2request('https://google.com/ipfs/notacid?argTest#hashTest') - expectNoRedirect(modifyRequest, request) + await expectNoRedirect(modifyRequest, request) }) - it(`should be left untouched if its is a HEAD preload with explicit opt-out in URL hash (${nodeType} node)`, function () { + it(`should be left untouched if its is a HEAD preload with explicit opt-out in URL hash (${nodeType} node)`, async function () { // HTTP HEAD is a popular way for preloading data at arbitrary gateways, so we have a dedicated test to make sure it works as expected const headRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#x-ipfs-companion-no-redirect', method: 'HEAD' } - expectNoRedirect(modifyRequest, headRequest) + await expectNoRedirect(modifyRequest, headRequest) }) }) }) @@ -127,50 +127,50 @@ describe('modifyRequest.onBeforeRequest:', function () { beforeEach(function () { state.ipfsNodeType = 'external' }) - it('should be served from custom gateway if fetched from the same origin and redirect is enabled in Firefox', function () { + it('should be served from custom gateway if fetched from the same origin and redirect is enabled in Firefox', async function () { runtime.isFirefox = true const xhrRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://google.com/' } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should be served from custom gateway if fetched from the same origin and redirect is enabled in Chromium', function () { + it('should be served from custom gateway if fetched from the same origin and redirect is enabled in Chromium', async function () { runtime.isFirefox = false const xhrRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', type: 'xmlhttprequest', initiator: 'https://google.com/' } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should be served from custom gateway if XHR is cross-origin and redirect is enabled in Chromium', function () { + it('should be served from custom gateway if XHR is cross-origin and redirect is enabled in Chromium', async function () { runtime.isFirefox = false const xhrRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', type: 'xmlhttprequest', initiator: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should be served from custom gateway if XHR is cross-origin and redirect is enabled in Firefox', function () { + it('should be served from custom gateway if XHR is cross-origin and redirect is enabled in Firefox', async function () { runtime.isFirefox = true const xhrRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) }) describe('with embedded node', function () { beforeEach(function () { state.ipfsNodeType = 'embedded' }) - it('should be served from public gateway if fetched from the same origin and redirect is enabled in Firefox', function () { + it('should be served from public gateway if fetched from the same origin and redirect is enabled in Firefox', async function () { runtime.isFirefox = true const xhrRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://google.com/' } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should be served from public gateway if fetched from the same origin and redirect is enabled in Chromium', function () { + it('should be served from public gateway if fetched from the same origin and redirect is enabled in Chromium', async function () { runtime.isFirefox = false const xhrRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', type: 'xmlhttprequest', initiator: 'https://google.com/' } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should be served from public gateway if XHR is cross-origin and redirect is enabled in Chromium', function () { + it('should be served from public gateway if XHR is cross-origin and redirect is enabled in Chromium', async function () { runtime.isFirefox = false const xhrRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', type: 'xmlhttprequest', initiator: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should be served from public gateway if XHR is cross-origin and redirect is enabled in Firefox', function () { + it('should be served from public gateway if XHR is cross-origin and redirect is enabled in Firefox', async function () { runtime.isFirefox = true const xhrRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) }) describe('with external node when runtime.requiresXHRCORSfix', function () { @@ -178,29 +178,29 @@ describe('modifyRequest.onBeforeRequest:', function () { state.ipfsNodeType = 'external' browser.runtime.getBrowserInfo = () => Promise.resolve({ name: 'Firefox', version: '68.0.0' }) }) - it('should be served from custom gateway if fetched from the same origin and redirect is enabled in Firefox', function () { + it('should be served from custom gateway if fetched from the same origin and redirect is enabled in Firefox', async function () { runtime.isFirefox = true const xhrRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://google.com/' } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should be served from custom gateway if fetched from the same origin and redirect is enabled in non-Firefox', function () { + it('should be served from custom gateway if fetched from the same origin and redirect is enabled in non-Firefox', async function () { runtime.isFirefox = false const xhrRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', type: 'xmlhttprequest', initiator: 'https://google.com/' } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should be served from custom gateway if XHR is cross-origin and redirect is enabled in non-Firefox', function () { + it('should be served from custom gateway if XHR is cross-origin and redirect is enabled in non-Firefox', async function () { runtime.isFirefox = false const xhrRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', type: 'xmlhttprequest', initiator: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } - expect(modifyRequest.onBeforeRequest(xhrRequest).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(xhrRequest)).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should be served from custom gateway via late redirect in onHeadersReceived if XHR is cross-origin and redirect is enabled in Firefox', function () { + it('should be served from custom gateway via late redirect in onHeadersReceived if XHR is cross-origin and redirect is enabled in Firefox', async function () { // Context for CORS XHR problems in Firefox: https://github.com/ipfs-shipyard/ipfs-companion/issues/436 runtime.isFirefox = true const xhrRequest = { url: 'https://google.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', type: 'xmlhttprequest', originUrl: 'https://www.nasa.gov/foo.html', requestId: fakeRequestId() } // onBeforeRequest should not change anything, as it will trigger false-positive CORS error - expect(modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(xhrRequest)).to.equal(undefined) // onHeadersReceived is after CORS validation happens, so its ok to cancel and redirect late - expect(modifyRequest.onHeadersReceived(xhrRequest).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onHeadersReceived(xhrRequest)).redirectUrl).to.equal('http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) }) }) @@ -210,19 +210,19 @@ describe('modifyRequest.onBeforeRequest:', function () { beforeEach(function () { state.ipfsNodeType = 'external' }) - it('should be served from custom gateway if {path} points to a FQDN with existing dnslink', function () { + it('should be served from custom gateway if {path} points to a FQDN with existing dnslink', async function () { const request = url2request('https://google.com/ipns/en.wikipedia-on-ipfs.org/index.html?argTest#hashTest') // stub the existence of valid dnslink const fqdn = 'en.wikipedia-on-ipfs.org' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipfs/Qmazvovg6Sic3m9igZMKoAPjkiVZsvbWWc8ZvgjjK1qMss') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipfs/Qmazvovg6Sic3m9igZMKoAPjkiVZsvbWWc8ZvgjjK1qMss') // pretend API is online and we can do dns lookups with it state.peerCount = 1 - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('http://localhost:8080/ipns/en.wikipedia-on-ipfs.org/index.html?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('http://localhost:8080/ipns/en.wikipedia-on-ipfs.org/index.html?argTest#hashTest') }) - it('should be served from custom gateway if {path} starts with a valid PeerID', function () { + it('should be served from custom gateway if {path} starts with a valid PeerID', async function () { const request = url2request('https://google.com/ipns/QmSWnBwMKZ28tcgMFdihD8XS7p6QzdRSGf71cCybaETSsU/index.html?argTest#hashTest') - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().returns(false) - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('http://localhost:8080/ipns/QmSWnBwMKZ28tcgMFdihD8XS7p6QzdRSGf71cCybaETSsU/index.html?argTest#hashTest') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().resolves(false) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('http://localhost:8080/ipns/QmSWnBwMKZ28tcgMFdihD8XS7p6QzdRSGf71cCybaETSsU/index.html?argTest#hashTest') }) }) @@ -230,19 +230,19 @@ describe('modifyRequest.onBeforeRequest:', function () { beforeEach(function () { state.ipfsNodeType = 'embedded' }) - it('should be served from public gateway if {path} points to a FQDN with existing dnslink', function () { + it('should be served from public gateway if {path} points to a FQDN with existing dnslink', async function () { const request = url2request('https://google.com/ipns/en.wikipedia-on-ipfs.org/index.html?argTest#hashTest') // stub the existence of valid dnslink const fqdn = 'en.wikipedia-on-ipfs.org' - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).returns('/ipfs/Qmazvovg6Sic3m9igZMKoAPjkiVZsvbWWc8ZvgjjK1qMss') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().withArgs(fqdn).resolves('/ipfs/Qmazvovg6Sic3m9igZMKoAPjkiVZsvbWWc8ZvgjjK1qMss') // pretend API is online and we can do dns lookups with it state.peerCount = 1 - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipns/en.wikipedia-on-ipfs.org/index.html?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipns/en.wikipedia-on-ipfs.org/index.html?argTest#hashTest') }) - it('should be served from public gateway if {path} starts with a valid PeerID', function () { + it('should be served from public gateway if {path} starts with a valid PeerID', async function () { const request = url2request('https://google.com/ipns/QmSWnBwMKZ28tcgMFdihD8XS7p6QzdRSGf71cCybaETSsU/index.html?argTest#hashTest') - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().returns(false) - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipns/QmSWnBwMKZ28tcgMFdihD8XS7p6QzdRSGf71cCybaETSsU/index.html?argTest#hashTest') + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().resolves(false) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipns/QmSWnBwMKZ28tcgMFdihD8XS7p6QzdRSGf71cCybaETSsU/index.html?argTest#hashTest') }) }) @@ -252,15 +252,15 @@ describe('modifyRequest.onBeforeRequest:', function () { beforeEach(function () { state.ipfsNodeType = nodeType }) - it(`should be left untouched if redirect is disabled' (${nodeType} node)`, function () { + it(`should be left untouched if redirect is disabled' (${nodeType} node)`, async function () { state.redirect = false const request = url2request('https://google.com/ipns/ipfs.io?argTest#hashTest') - expectNoRedirect(modifyRequest, request) + await expectNoRedirect(modifyRequest, request) }) - it(`should be left untouched if FQDN is not a real domain nor a valid CID (${nodeType} node)`, function () { + it(`should be left untouched if FQDN is not a real domain nor a valid CID (${nodeType} node)`, async function () { const request = url2request('https://google.com/ipns/notafqdnorcid?argTest#hashTest') - dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().returns(false) - expectNoRedirect(modifyRequest, request) + dnslinkResolver.readDnslinkFromTxtRecord = sinon.stub().resolves(false) + await expectNoRedirect(modifyRequest, request) }) }) }) @@ -279,7 +279,7 @@ describe('modifyRequest.onBeforeRequest:', function () { state.ipfsNodeType = 'external' // dweb.link is the default subdomain gw }) - it('should be redirected to localhost gateway (*.ipfs on default gw)', function () { + it('should be redirected to localhost gateway (*.ipfs on default gw)', async function () { state.redirect = true const request = url2request(`https://${cid}.ipfs.dweb.link/`) @@ -290,28 +290,28 @@ describe('modifyRequest.onBeforeRequest:', function () { // return redirect to a subdomain, and we don't want to break users // running older versions of go-ipfs by loading subdomain first and // failing. - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal(`http://localhost:8080/ipfs/${cid}/`) }) - it('should be redirected to localhost gateway (*.ipfs on 3rd party gw)', function () { + it('should be redirected to localhost gateway (*.ipfs on 3rd party gw)', async function () { state.redirect = true const request = url2request(`https://${cid}.ipfs.cf-ipfs.com/`) request.responseHeaders = [{ name: 'X-Ipfs-Path', value: fakeXIpfsPathHdrVal }] - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal(`http://localhost:8080/ipfs/${cid}/`) }) - it('should be redirected to localhost gateway and keep URL encoding of original path', function () { + it('should be redirected to localhost gateway and keep URL encoding of original path', async function () { state.redirect = true const request = url2request('https://bafybeigfejjsuq5im5c3w3t3krsiytszhfdc4v5myltcg4myv2n2w6jumy.ipfs.dweb.link/%3Ffilename=test.jpg?arg=val') request.responseHeaders = [{ name: 'X-Ipfs-Path', value: fakeXIpfsPathHdrVal }] - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal('http://localhost:8080/ipfs/bafybeigfejjsuq5im5c3w3t3krsiytszhfdc4v5myltcg4myv2n2w6jumy/%3Ffilename=test.jpg?arg=val') }) - it('should be redirected to localhost gateway (*.ipns on default gw)', function () { + it('should be redirected to localhost gateway (*.ipns on default gw)', async function () { state.redirect = true const request = url2request(`https://${peerid}.ipns.dweb.link/`) request.responseHeaders = [{ name: 'X-Ipfs-Path', value: '/ipns/QmPhnvn747LqwPYMJmQVorMaGbMSgA7mRRoyyZYz3DoZRQ' }] - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal(`http://localhost:8080/ipns/${peerid}/`) }) }) @@ -321,24 +321,24 @@ describe('modifyRequest.onBeforeRequest:', function () { state.ipfsNodeType = 'embedded' // dweb.link is the default subdomain gw }) - it('should be left untouched for *.ipfs at default public subdomain gw', function () { + it('should be left untouched for *.ipfs at default public subdomain gw', async function () { state.redirect = true const request = url2request(`https://${cid}.ipfs.dweb.link/`) request.responseHeaders = [{ name: 'X-Ipfs-Path', value: fakeXIpfsPathHdrVal }] - expectNoRedirect(modifyRequest, request) + await expectNoRedirect(modifyRequest, request) }) - it('should be redirected to user-prefered public gateway if 3rd party subdomain gw', function () { + it('should be redirected to user-prefered public gateway if 3rd party subdomain gw', async function () { state.redirect = true const request = url2request(`https://${cid}.ipfs.cf-ipfs.com/`) request.responseHeaders = [{ name: 'X-Ipfs-Path', value: fakeXIpfsPathHdrVal }] - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal(`https://${cid}.ipfs.dweb.link/`) }) - it('should be left untouched for *.ipns at default public subdomain gw', function () { + it('should be left untouched for *.ipns at default public subdomain gw', async function () { state.redirect = true const request = url2request(`https://${peerid}.ipns.dweb.link/`) request.responseHeaders = [{ name: 'X-Ipfs-Path', value: '/ipns/QmPhnvn747LqwPYMJmQVorMaGbMSgA7mRRoyyZYz3DoZRQ' }] - expectNoRedirect(modifyRequest, request) + await expectNoRedirect(modifyRequest, request) }) }) }) @@ -353,54 +353,54 @@ describe('modifyRequest.onBeforeRequest:', function () { describe('request for IPFS path at the localhost', function () { // we do not touch local requests, as it may interfere with other nodes running at the same machine // or could produce false-positives such as redirection from localhost:5001/ipfs/path to localhost:8080/ipfs/path - it('should fix localhost Kubo RPC hostname to IP', function () { + it('should fix localhost Kubo RPC hostname to IP', async function () { const request = url2request('http://localhost:5001/ipfs/QmPhnvn747LqwPYMJmQVorMaGbMSgA7mRRoyyZYz3DoZRQ/') // expectNoRedirect(modifyRequest, request) - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal('http://127.0.0.1:5001/ipfs/QmPhnvn747LqwPYMJmQVorMaGbMSgA7mRRoyyZYz3DoZRQ/') }) - it('should be left untouched if localhost Gateway is used', function () { + it('should be left untouched if localhost Gateway is used', async function () { const request = url2request('http://localhost:8080/ipfs/QmPhnvn747LqwPYMJmQVorMaGbMSgA7mRRoyyZYz3DoZRQ/') - expectNoRedirect(modifyRequest, request) + await expectNoRedirect(modifyRequest, request) }) - it('should fix 127.0.0.1 Gateway to localhost', function () { + it('should fix 127.0.0.1 Gateway to localhost', async function () { const request = url2request('http://127.0.0.1:8080/ipfs/QmPhnvn747LqwPYMJmQVorMaGbMSgA7mRRoyyZYz3DoZRQ/') // expectNoRedirect(modifyRequest, request) - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal('http://localhost:8080/ipfs/QmPhnvn747LqwPYMJmQVorMaGbMSgA7mRRoyyZYz3DoZRQ/') }) - it('should fix 0.0.0.0 to localhost IP API', function () { + it('should fix 0.0.0.0 to localhost IP API', async function () { // https://github.com/ipfs-shipyard/ipfs-companion/issues/867 const request = url2request('http://0.0.0.0:5001/ipfs/QmPhnvn747LqwPYMJmQVorMaGbMSgA7mRRoyyZYz3DoZRQ/') - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal('http://127.0.0.1:5001/ipfs/QmPhnvn747LqwPYMJmQVorMaGbMSgA7mRRoyyZYz3DoZRQ/') }) - it('should be left untouched if /webui on localhost Kubo RPC port', function () { + it('should be left untouched if /webui on localhost Kubo RPC port', async function () { // https://github.com/ipfs/ipfs-companion/issues/291 const request = url2request('http://localhost:5001/webui') // expectNoRedirect(modifyRequest, request) - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal('http://127.0.0.1:5001/webui') }) - it('should be left untouched if localhost Kubo RPC IP is used, even when x-ipfs-path is present', function () { + it('should be left untouched if localhost Kubo RPC IP is used, even when x-ipfs-path is present', async function () { // https://github.com/ipfs-shipyard/ipfs-companion/issues/604 const request = url2request('http://127.0.0.1:5001/ipfs/QmPhnvn747LqwPYMJmQVorMaGbMSgA7mRRoyyZYz3DoZRQ/') request.responseHeaders = [{ name: 'X-Ipfs-Path', value: '/ipfs/QmPhnvn747LqwPYMJmQVorMaGbMSgA7mRRoyyZYz3DDIFF' }] - expectNoRedirect(modifyRequest, request) + await expectNoRedirect(modifyRequest, request) }) - it('should be left untouched if [::1] is used', function () { + it('should be left untouched if [::1] is used', async function () { // https://github.com/ipfs/ipfs-companion/issues/291 const request = url2request('http://[::1]:5001/ipfs/QmPhnvn747LqwPYMJmQVorMaGbMSgA7mRRoyyZYz3DoZRQ/') - expectNoRedirect(modifyRequest, request) + await expectNoRedirect(modifyRequest, request) }) - it('should be redirected to localhost (subdomain in go-ipfs >0.5) if type=main_frame and 127.0.0.1 (path gw) is used un URL', function () { + it('should be redirected to localhost (subdomain in go-ipfs >0.5) if type=main_frame and 127.0.0.1 (path gw) is used un URL', async function () { state.redirect = true state.useSubdomains = true expect(state.gwURL.hostname).to.equal('localhost') const cid = 'QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR' const request = url2request(`http://127.0.0.1:8080/ipfs/${cid}?arg=val#hash`) request.type = 'main_frame' // explicit - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal(`http://localhost:8080/ipfs/${cid}?arg=val#hash`) }) }) @@ -412,17 +412,17 @@ describe('modifyRequest.onBeforeRequest:', function () { state.ipfsNodeType = 'external' state.redirect = true }) - it('should work for HTTP GW without explicit port in URL', function () { + it('should work for HTTP GW without explicit port in URL', async function () { state.gwURLString = 'http://foo:80/' state.gwURL = new URL(state.gwURLString) const request = url2request('https://bar.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('http://foo/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('http://foo/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should work for HTTPS GW without explicit port in URL', function () { + it('should work for HTTPS GW without explicit port in URL', async function () { state.gwURLString = 'https://foo:443/' state.gwURL = new URL(state.gwURLString) const request = url2request('https://bar.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://foo/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://foo/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) }) @@ -437,31 +437,31 @@ describe('modifyRequest.onBeforeRequest:', function () { state.pubGwURLString = 'https://ipfs.io' state.pubGwURL = new URL('https://ipfs.io') }) - it('should present recovery page if node is offline and redirect is enabled', function () { + it('should present recovery page if node is offline and redirect is enabled', async function () { expect(state.nodeActive).to.be.equal(false) state.redirect = true const request = url2request('https://localhost:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR/foo/bar') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('chrome-extension://testid/dist/recovery/recovery.html#https%3A%2F%2Fipfs.io%2Fipfs%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%2Ffoo%2Fbar') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('chrome-extension://testid/dist/recovery/recovery.html#https%3A%2F%2Fipfs.io%2Fipfs%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%2Ffoo%2Fbar') }) - it('should present recovery page if node is offline and redirect is disabled', function () { + it('should present recovery page if node is offline and redirect is disabled', async function () { expect(state.nodeActive).to.be.equal(false) state.redirect = false const request = url2request('https://localhost:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR/foo/bar') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('chrome-extension://testid/dist/recovery/recovery.html#https%3A%2F%2Fipfs.io%2Fipfs%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%2Ffoo%2Fbar') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('chrome-extension://testid/dist/recovery/recovery.html#https%3A%2F%2Fipfs.io%2Fipfs%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%2Ffoo%2Fbar') }) - it('should not show recovery page if node is offline, redirect is enabled, but non-gateway URL failed to load from the same port', function () { + it('should not show recovery page if node is offline, redirect is enabled, but non-gateway URL failed to load from the same port', async function () { // this covers https://github.com/ipfs/ipfs-companion/issues/1162 and https://twitter.com/unicomp21/status/1626244123102679041 state.redirect = true expect(state.nodeActive).to.be.equal(false) const request = url2request('https://localhost:8080/') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should not show recovery page if extension is disabled', function () { + it('should not show recovery page if extension is disabled', async function () { // allows user to quickly avoid anything similar to https://github.com/ipfs/ipfs-companion/issues/1162 state.active = false expect(state.nodeActive).to.be.equal(false) const request = url2request('https://localhost:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR/foo/bar') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) }) diff --git a/test/functional/lib/ipfs-request-protocol-handlers.test.js b/test/functional/lib/ipfs-request-protocol-handlers.test.js index 99a5547bb..4eae71bb9 100644 --- a/test/functional/lib/ipfs-request-protocol-handlers.test.js +++ b/test/functional/lib/ipfs-request-protocol-handlers.test.js @@ -59,175 +59,175 @@ describe('modifyRequest.onBeforeRequest:', function () { }) // without web+ prefix (Firefox > 59: https://github.com/ipfs-shipyard/ipfs-companion/issues/164#issuecomment-356301174) - it('should not be normalized if ipfs:/{CID}', function () { + it('should not be normalized if ipfs:/{CID}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=ipfs%3A%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should be normalized if ipfs://{CID}', function () { + it('should be normalized if ipfs://{CID}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=ipfs%3A%2F%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should not be normalized if ipns:/{fqdn}', function () { + it('should not be normalized if ipns:/{fqdn}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=ipns%3A%2Fipfs.io%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should be normalized if ipns://{fqdn}', function () { + it('should be normalized if ipns://{fqdn}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=ipns%3A%2F%2Fipfs.io%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipns/ipfs.io?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipns/ipfs.io?argTest#hashTest') }) - it('should be normalized if ipfs://{fqdn}', function () { + it('should be normalized if ipfs://{fqdn}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=ipfs%3A%2F%2Fipfs.io%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipns/ipfs.io?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipns/ipfs.io?argTest#hashTest') }) - it('should be normalized if dweb:/ipfs/{CID}', function () { + it('should be normalized if dweb:/ipfs/{CID}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=dweb%3A%2Fipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should not be normalized if dweb://ipfs/{CID}', function () { + it('should not be normalized if dweb://ipfs/{CID}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=dweb%3A%2F%2Fipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should be normalized if dweb:/ipns/{foo}', function () { + it('should be normalized if dweb:/ipns/{foo}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=dweb%3A%2Fipns/ipfs.io%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).equal('https://ipfs.io/ipns/ipfs.io?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).equal('https://ipfs.io/ipns/ipfs.io?argTest#hashTest') }) - it('should not be normalized if dweb://ipns/{foo}', function () { + it('should not be normalized if dweb://ipns/{foo}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=dweb%3A%2F%2Fipns/ipfs.io%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) // web+ prefixed versions (Firefox < 59 and Chrome) - it('should not be normalized if web+ipfs:/{CID}', function () { + it('should not be normalized if web+ipfs:/{CID}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=web%2Bipfs%3A%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should be normalized if web+ipfs://{CID}', function () { + it('should be normalized if web+ipfs://{CID}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=web%2Bipfs%3A%2F%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should not be normalized if web+ipns:/{foo}', function () { + it('should not be normalized if web+ipns:/{foo}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=web%2Bipns%3A%2Fipfs.io%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should be normalized if web+ipns://{foo}', function () { + it('should be normalized if web+ipns://{foo}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=web%2Bipns%3A%2F%2Fipfs.io%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipns/ipfs.io?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipns/ipfs.io?argTest#hashTest') }) - it('should be normalized if web+dweb:/ipfs/{CID}', function () { + it('should be normalized if web+dweb:/ipfs/{CID}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=web%2Bdweb%3A%2Fipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should not be normalized if web+dweb://ipfs/{CID}', function () { + it('should not be normalized if web+dweb://ipfs/{CID}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=web%2Bdweb%3A%2F%2Fipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should be normalized if web+dweb:/ipns/{foo}', function () { + it('should be normalized if web+dweb:/ipns/{foo}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=web%2Bdweb%3A%2Fipns/ipfs.io%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).equal('https://ipfs.io/ipns/ipfs.io?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).equal('https://ipfs.io/ipns/ipfs.io?argTest#hashTest') }) - it('should not be normalized if web+dweb://ipns/{foo}', function () { + it('should not be normalized if web+dweb://ipns/{foo}', async function () { const request = url2request('https://dweb.link/ipfs/?uri=web%2Bdweb%3A%2F%2Fipns/ipfs.io%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should not be normalized if web+{foo}:/bar', function () { + it('should not be normalized if web+{foo}:/bar', async function () { const request = url2request('https://dweb.link/ipfs/?uri=web%2Bfoo%3A%2Fbar%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should not be normalized if web+{foo}://bar', function () { + it('should not be normalized if web+{foo}://bar', async function () { const request = url2request('https://dweb.link/ipfs/?uri=web%2Bfoo%3A%2F%2Fbar%3FargTest%23hashTest') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) }) describe('catching unhandled custom protocol request', function () { - it('should not be normalized if ipfs:/{CID}', function () { + it('should not be normalized if ipfs:/{CID}', async function () { const request = url2request('https://duckduckgo.com/?q=ipfs%3A%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest&foo=bar') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should be normalized if ipfs://{CID}', function () { + it('should be normalized if ipfs://{CID}', async function () { const request = url2request('https://duckduckgo.com/?q=ipfs%3A%2F%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest&foo=bar') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should not be normalized if ipns:/{foo}', function () { + it('should not be normalized if ipns:/{foo}', async function () { const request = url2request('https://duckduckgo.com/?q=ipns%3A%2Fipns.io%2Findex.html%3Farg%3Dfoo%26bar%3Dbuzz%23hashTest') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should be normalized if ipns://{foo}', function () { + it('should be normalized if ipns://{foo}', async function () { const request = url2request('https://duckduckgo.com/?q=ipns%3A%2F%2Fipns.io%2Findex.html%3Farg%3Dfoo%26bar%3Dbuzz%23hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipns/ipns.io/index.html?arg=foo&bar=buzz#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipns/ipns.io/index.html?arg=foo&bar=buzz#hashTest') }) - it('should be normalized if ipfs://{fqdn}', function () { + it('should be normalized if ipfs://{fqdn}', async function () { const request = url2request('https://duckduckgo.com/?q=ipfs%3A%2F%2Fipns.io%2Findex.html%3Farg%3Dfoo%26bar%3Dbuzz%23hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipns/ipns.io/index.html?arg=foo&bar=buzz#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipns/ipns.io/index.html?arg=foo&bar=buzz#hashTest') }) - it('should be normalized if dweb:/ipfs/{CID}', function () { + it('should be normalized if dweb:/ipfs/{CID}', async function () { const request = url2request('https://duckduckgo.com/?q=dweb%3A%2Fipfs%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3Farg%3Dfoo%26bar%3Dbuzz%23hash&ia=software') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?arg=foo&bar=buzz#hash') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?arg=foo&bar=buzz#hash') }) - it('should not be normalized if dweb://ipfs/{CID}', function () { + it('should not be normalized if dweb://ipfs/{CID}', async function () { const request = url2request('https://duckduckgo.com/?q=dweb%3A%2F%2Fipfs%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3Farg%3Dfoo%26bar%3Dbuzz%23hash&ia=software') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should be normalized if dweb:/ipns/{foo}', function () { + it('should be normalized if dweb:/ipns/{foo}', async function () { const request = url2request('https://duckduckgo.com/?q=dweb%3A%2Fipns%2Fipfs.io%2Findex.html%3Farg%3Dfoo%26bar%3Dbuzz%23hash&ia=web') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipns/ipfs.io/index.html?arg=foo&bar=buzz#hash') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipns/ipfs.io/index.html?arg=foo&bar=buzz#hash') }) - it('should not be normalized if dweb://ipns/{foo}', function () { + it('should not be normalized if dweb://ipns/{foo}', async function () { const request = url2request('https://duckduckgo.com/?q=dweb%3A%2F%2Fipns%2Fipfs.io%2Findex.html%3Farg%3Dfoo%26bar%3Dbuzz%23hash&ia=web') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should not be normalized if web+ipfs:/{CID}', function () { + it('should not be normalized if web+ipfs:/{CID}', async function () { const request = url2request('https://duckduckgo.com/?q=web%2Bipfs%3A%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest&foo=bar') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should be normalized if web+ipfs://{CID}', function () { + it('should be normalized if web+ipfs://{CID}', async function () { const request = url2request('https://duckduckgo.com/?q=web%2Bipfs%3A%2F%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest&foo=bar') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest') }) - it('should not be normalized if web+ipns:/{foo}', function () { + it('should not be normalized if web+ipns:/{foo}', async function () { const request = url2request('https://duckduckgo.com/?q=web%2Bipns%3A%2Fipns.io%2Findex.html%3Farg%3Dfoo%26bar%3Dbuzz%23hashTest') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should be normalized if web+ipns://{foo}', function () { + it('should be normalized if web+ipns://{foo}', async function () { const request = url2request('https://duckduckgo.com/?q=web%2Bipns%3A%2F%2Fipns.io%2Findex.html%3Farg%3Dfoo%26bar%3Dbuzz%23hashTest') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipns/ipns.io/index.html?arg=foo&bar=buzz#hashTest') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipns/ipns.io/index.html?arg=foo&bar=buzz#hashTest') }) - it('should be normalized if web+dweb:/ipfs/{CID}', function () { + it('should be normalized if web+dweb:/ipfs/{CID}', async function () { const request = url2request('https://duckduckgo.com/?q=web%2Bdweb%3A%2Fipfs%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3Farg%3Dfoo%26bar%3Dbuzz%23hash&ia=software') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?arg=foo&bar=buzz#hash') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?arg=foo&bar=buzz#hash') }) - it('should not be normalized if web+dweb://ipfs/{CID}', function () { + it('should not be normalized if web+dweb://ipfs/{CID}', async function () { const request = url2request('https://duckduckgo.com/?q=web%2Bdweb%3A%2F%2Fipfs%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3Farg%3Dfoo%26bar%3Dbuzz%23hash&ia=software') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should be normalized if web+dweb:/ipns/{foo}', function () { + it('should be normalized if web+dweb:/ipns/{foo}', async function () { const request = url2request('https://duckduckgo.com/?q=web%2Bdweb%3A%2Fipns%2Fipfs.io%2Findex.html%3Farg%3Dfoo%26bar%3Dbuzz%23hash&ia=web') - expect(modifyRequest.onBeforeRequest(request).redirectUrl).to.equal('https://ipfs.io/ipns/ipfs.io/index.html?arg=foo&bar=buzz#hash') + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl).to.equal('https://ipfs.io/ipns/ipfs.io/index.html?arg=foo&bar=buzz#hash') }) - it('should not be normalized if web+dweb://ipns/{foo}', function () { + it('should not be normalized if web+dweb://ipns/{foo}', async function () { const request = url2request('https://duckduckgo.com/?q=web%2Bdweb%3A%2F%2Fipns%2Fipfs.io%2Findex.html%3Farg%3Dfoo%26bar%3Dbuzz%23hash&ia=web') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should not be normalized if disabled in Preferences', function () { + it('should not be normalized if disabled in Preferences', async function () { state.catchUnhandledProtocols = false const request = url2request('https://duckduckgo.com/?q=ipfs%3A%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest&foo=bar') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should not be normalized if CID is invalid', function () { + it('should not be normalized if CID is invalid', async function () { state.catchUnhandledProtocols = false const request = url2request('https://duckduckgo.com/?q=ipfs%3A%2FnotARealIpfsPathWithCid%3FargTest%23hashTest&foo=bar') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should not be normalized if presence of %3A%2F is a false-positive', function () { + it('should not be normalized if presence of %3A%2F is a false-positive', async function () { state.catchUnhandledProtocols = false const request = url2request('https://duckduckgo.com/?q=foo%3A%2Fbar%3FargTest%23hashTest&foo=bar') - expect(modifyRequest.onBeforeRequest(request)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(request)).to.equal(undefined) }) - it('should not be normalized if request.type != main_frame', function () { + it('should not be normalized if request.type != main_frame', async function () { const mediaRequest = { url: 'https://duckduckgo.com/?q=ipfs%3A%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23hashTest&foo=bar', type: 'media' } - expect(modifyRequest.onBeforeRequest(mediaRequest)).to.equal(undefined) + expect(await modifyRequest.onBeforeRequest(mediaRequest)).to.equal(undefined) }) }) }) diff --git a/test/functional/lib/ipfs-request-workarounds.test.js b/test/functional/lib/ipfs-request-workarounds.test.js index c7f401f69..ecf75840e 100644 --- a/test/functional/lib/ipfs-request-workarounds.test.js +++ b/test/functional/lib/ipfs-request-workarounds.test.js @@ -36,7 +36,7 @@ describe('modifyRequest processing', function () { // (eg. image embedded from public gateway on HTTPS website) describe('a subresource request on HTTPS website', function () { const cid = 'QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR' - it('should be routed to "127.0.0.1" gw in Chromium if type is image', function () { + it('should be routed to "127.0.0.1" gw in Chromium if type is image', async function () { runtime.isFirefox = false const request = { method: 'GET', @@ -44,10 +44,10 @@ describe('modifyRequest processing', function () { url: `https://ipfs.io/ipfs/${cid}`, initiator: 'https://some-website.example.com' // Chromium } - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal(`http://127.0.0.1:8080/ipfs/${cid}`) }) - it('should be routed to "localhost" gw in Chromium if not a subresource', function () { + it('should be routed to "localhost" gw in Chromium if not a subresource', async function () { runtime.isFirefox = false const request = { method: 'GET', @@ -55,10 +55,10 @@ describe('modifyRequest processing', function () { url: `https://ipfs.io/ipfs/${cid}`, initiator: 'https://some-website.example.com' // Chromium } - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal(`http://localhost:8080/ipfs/${cid}`) }) - it('should be routed to "127.0.0.1" gw to avoid mixed content warning in Firefox', function () { + it('should be routed to "127.0.0.1" gw to avoid mixed content warning in Firefox', async function () { runtime.isFirefox = true const request = { method: 'GET', @@ -66,10 +66,10 @@ describe('modifyRequest processing', function () { url: `https://ipfs.io/ipfs/${cid}`, originUrl: 'https://some-website.example.com/some/page.html' // FF only } - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal(`http://127.0.0.1:8080/ipfs/${cid}`) }) - it('should be routed to "localhost" gw in Firefox if not a subresource', function () { + it('should be routed to "localhost" gw in Firefox if not a subresource', async function () { runtime.isFirefox = true const request = { method: 'GET', @@ -77,14 +77,14 @@ describe('modifyRequest processing', function () { url: `https://ipfs.io/ipfs/${cid}`, originUrl: 'https://some-website.example.com/some/page.html' // FF only } - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal(`http://localhost:8080/ipfs/${cid}`) }) }) describe('a request to /api/v0/add with stream-channels=true', function () { const expectHeader = { name: 'Expect', value: '100-continue' } - it('should apply the "Expect: 100-continue" fix for https://github.com/ipfs/go-ipfs/issues/5168 ', function () { + it('should apply the "Expect: 100-continue" fix for https://github.com/ipfs/go-ipfs/issues/5168 ', async function () { const request = { method: 'POST', requestHeaders: [ @@ -93,7 +93,7 @@ describe('modifyRequest processing', function () { type: 'xmlhttprequest', url: `${state.apiURLString}api/v0/add?progress=true&wrapWithDirectory=true&pin=true&wrap-with-directory=true&stream-channels=true` } - modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state + await modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state expect(modifyRequest.onBeforeSendHeaders(request).requestHeaders).to.deep.include(expectHeader) }) }) @@ -123,7 +123,7 @@ describe('modifyRequest processing', function () { type: 'xmlhttprequest', url: `${state.apiURLString}api/v0/id` } - modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state + await modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state expect(modifyRequest.onBeforeSendHeaders(request).requestHeaders) .to.deep.include(apiOriginHeader) }) @@ -143,7 +143,7 @@ describe('modifyRequest processing', function () { type: 'xmlhttprequest', url: `${state.apiURLString}api/v0/id` } - modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state + await modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state expect(modifyRequest.onBeforeSendHeaders(request).requestHeaders) .to.deep.include(apiOriginHeader) }) @@ -163,7 +163,7 @@ describe('modifyRequest processing', function () { type: 'xmlhttprequest', url: `${state.apiURLString}api/v0/id` } - modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state + await modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state expect(modifyRequest.onBeforeSendHeaders(request).requestHeaders) .to.deep.include(apiOriginHeader) }) @@ -184,7 +184,7 @@ describe('modifyRequest processing', function () { type: 'xmlhttprequest', url: `${state.apiURLString}api/v0/id` } - modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state + await modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state expect(modifyRequest.onBeforeSendHeaders(request).requestHeaders) .to.deep.include(apiOriginHeader) }) @@ -203,7 +203,7 @@ describe('modifyRequest processing', function () { type: 'xmlhttprequest', url: `${state.apiURLString}api/v0/id` } - modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state + await modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state expect(modifyRequest.onBeforeSendHeaders(request).requestHeaders) .to.deep.include(expectedOriginHeader) }) @@ -222,7 +222,7 @@ describe('modifyRequest processing', function () { type: 'xmlhttprequest', url: `${state.apiURLString}api/v0/id` } - modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state + await modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state expect(modifyRequest.onBeforeSendHeaders(request).requestHeaders) .to.deep.include(expectedOriginHeader) }) @@ -245,7 +245,7 @@ describe('modifyRequest processing', function () { type: 'xmlhttprequest', url: `${state.apiURLString}api/v0/id` } - modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state + await modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state expect(modifyRequest.onBeforeSendHeaders(request).requestHeaders) .to.deep.include(expectedOriginHeader) }) @@ -265,7 +265,7 @@ describe('modifyRequest processing', function () { type: 'xmlhttprequest', url: `${state.apiURLString}api/v0/id` } - modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state + await modifyRequest.onBeforeRequest(request) // executes before onBeforeSendHeaders, may mutate state expect(modifyRequest.onBeforeSendHeaders(request).requestHeaders) .to.deep.include(expectedOriginHeader) }) @@ -290,7 +290,7 @@ describe('modifyRequest processing', function () { } browser.tabs.update.flush() assert.ok(browser.tabs.update.withArgs(request.tabId, { url: fixedDNSLinkUrl }).notCalled) - modifyRequest.onCompleted(request) + await modifyRequest.onCompleted(request) assert.ok(browser.tabs.update.withArgs(request.tabId, { url: fixedDNSLinkUrl }).calledOnce) browser.tabs.update.flush() }) @@ -323,7 +323,7 @@ describe('modifyRequest processing', function () { // https://github.com/ipfs-shipyard/ipfs-companion/issues/962 describe('redirect of IPFS resource to local gateway in Brave', function () { - it('should be redirected if not a subresource (not impacted by Brave Shields)', function () { + it('should be redirected if not a subresource (not impacted by Brave Shields)', async function () { runtime.isFirefox = false runtime.brave = { thisIsFakeBraveRuntime: true } const request = { @@ -332,10 +332,10 @@ describe('modifyRequest processing', function () { url: 'https://ipfs.io/ipfs/bafkqae2xmvwgg33nmuqhi3zajfiemuzahiwss', initiator: 'https://some-website.example.com' // Brave (built on Chromium) } - expect(modifyRequest.onBeforeRequest(request)) + expect(await modifyRequest.onBeforeRequest(request)) .to.equal(undefined) }) - it('should be left untouched if subresource (would be blocked by Brave Shields)', function () { + it('should be left untouched if subresource (would be blocked by Brave Shields)', async function () { runtime.isFirefox = false runtime.brave = { thisIsFakeBraveRuntime: true } const cid = 'bafkqae2xmvwgg33nmuqhi3zajfiemuzahiwss' @@ -345,7 +345,7 @@ describe('modifyRequest processing', function () { url: `https://ipfs.io/ipfs/${cid}`, initiator: 'https://some-website.example.com' // Brave (built on Chromium) } - expect(modifyRequest.onBeforeRequest(request).redirectUrl) + expect((await modifyRequest.onBeforeRequest(request)).redirectUrl) .to.equal(`http://localhost:8080/ipfs/${cid}`) }) }) diff --git a/webpack.config.js b/webpack.config.js index e47214c3a..6606c0cca 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -46,7 +46,7 @@ const commonConfig = { Buffer: ['buffer/', 'Buffer'] // ensure version from package.json is used }), new webpack.DefinePlugin({ - global: 'window', // https://github.com/webpack/webpack/issues/5627#issuecomment-394309966 + global: 'globalThis', // https://github.com/webpack/webpack/issues/5627#issuecomment-394309966 'process.emitWarning': (message, type) => {}, // console.warn(`${type}${type ? ': ' : ''}${message}`), 'process.env': { // NODE_ENV: '"production"', @@ -125,9 +125,13 @@ if (devBuild) { */ const bgConfig = merge(commonConfig, { name: 'background', + target: 'webworker', entry: { backgroundPage: './add-on/src/background/background.js' }, + output: { + globalObject: 'globalThis' + }, optimization: { splitChunks: { chunks: 'all',