-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(mv3): Redirection Tests #1236
Conversation
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
* fix/analytics: fix(patch): :pin: Pinning countly-web-sdk to 23.2.2 fix(patch): countly-web-sdk fix: 🩹 Patching error messages
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
@whizzzkid lmk when this is ready for me to peek at again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like two tests from blockOrObserve.test.ts were removed? other than that.. it's looking good to me. just some comments and questions.
"lint": "run-s lint:*", | ||
"test:functional_MV3": "cross-env TEST_MV3=true npm run test:functional", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
global.URL = global.URL || URL | ||
global.screen = { width: 1024, height: 720 } | ||
global.addEventListener = () => { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to be careful about overriding globals in specific tests. I also thought about throwing together some helper functions that would do global setup via something like setupBrowserBefore
and setupTabsBefore
that would allow us to componentize our setups and more explicitly control what is being done in each test suite, but maybe we can take that on when/if it bites us later.
// | ||
// describe('importFiles', function () { | ||
// }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dunno where this comes from, 🗑️
}) | ||
} else { | ||
beforeEach(function () { | ||
browser.runtime.getURL.returns('chrome-extension://testid/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to put this in a non-conditional beforeEach but the tests did not like that when I was briefly changing things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I tried that too, it gets angry 😤.
browser.tabs = { | ||
...browser.tabs, | ||
getCurrent: sinonSandbox.stub().resolves({ id: 20 }), | ||
query: sinonSandbox.stub().resolves([{ id: 40 }]), | ||
update: sinonSandbox.stub().resolves() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this something we can, or should, be overriding in individual tests?
also, sinonSandbox.resetHistory should be resetting these so we may not need to run this in beforeEach.. but i'm not super worried about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that, that didn't work, in some test, there is a browser.flush()
that resets it back to what it was and not the stubbed value. So this needs to happen here.
/** | ||
* Ensure that the request is redirected | ||
* | ||
* @param modifiedRequestCallResp - Response from onBeforeRequest or onHeadersReceived | ||
* @param MV2Expectation - Expected redirect URL for Manifest V2 | ||
* @param MV3Expectation - Expected redirect URL for Manifest V3 | ||
* @param MV3Expectation.origin - Expected origin URL for Manifest V3 | ||
* @param MV3Expectation.destination - Expected destination URL for Manifest V3 | ||
*/ | ||
export function ensureCallRedirected ({ | ||
modifiedRequestCallResp, | ||
MV2Expectation, | ||
MV3Expectation | ||
}: { | ||
modifiedRequestCallResp: { redirectUrl: string }, | ||
MV2Expectation: string, | ||
MV3Expectation: { | ||
origin: string, | ||
destination: string | ||
} | ||
}): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will make the cleanup of MV2 stuff much more simple. +100
const nodeTypes = ['external'] | ||
|
||
describe('modifyRequest.onBeforeRequest:', function () { | ||
describe(`[${manifestVersion}] modifyRequest.onBeforeRequest:`, function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
describe(`[${manifestVersion}] modifyRequest.onBeforeRequest:`, function () { | |
describe(`[${manifestVersion}] gateway-redirect:`, 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/`) | ||
|
||
// X-Ipfs-Path to ensure value from URL takes a priority | ||
request.responseHeaders = [{ name: 'X-Ipfs-Path', value: fakeXIpfsPathHdrVal }] | ||
|
||
/// We expect redirect to path-based gateway because go-ipfs >=0.5 will | ||
// We expect redirect to path-based gateway because go-ipfs >=0.5 will | ||
// 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((await modifyRequest.onBeforeRequest(request)).redirectUrl) | ||
.to.equal(`http://localhost:8080/ipfs/${cid}/`) | ||
ensureCallRedirected({ | ||
modifiedRequestCallResp: await modifyRequest.onBeforeRequest(request), | ||
MV2Expectation: `http://localhost:8080/ipfs/${cid}/`, | ||
MV3Expectation: { | ||
origin: `^https?\\:\\/\\/${cid}\\.ipfs\\.dweb\\.link`, | ||
destination: `http://localhost:8080/ipfs/${cid}` | ||
} | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lidel @whizzzkid how deep does the maintenance for older versions go? We should be thinking about dropping support for extremely old versions if it's causing any issues. We can also check version numbers at https://github.com/plprobelab/network-measurements/blob/master/reports/2023/calendar-week-29/ipfs/README.md#agent-versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can create an issue for future.
}) | ||
}) | ||
|
||
it('Should remove the old rules when companion is no longer in active state', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like this test was removed? was that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not intended, I dunno I think it was a bad merge, brought it back.
}) | ||
|
||
it('Should remove the old rule when redirect changes for local gateway', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like this test was removed? was that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not intended, I dunno I think it was a bad merge, brought it back.
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
cf5b906
to
6fe39a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, made another pass, and I think there are only a few blockers:
- handling of
#fragment
(some rules preserve it, some do not?) - greedy localhost and 0.0.0.0 rules without port
- cosmetic: improve UX of
ensureCallRedirected
Details inline.
For the rest, I've filled separate issues for follow-up work that is not blocking this PR.
test/helpers/mv3-test-helper.ts
Outdated
await Promise.all([ | ||
modifyRequest.onBeforeRequest(request), | ||
modifyRequest.onHeadersReceived(request) | ||
].map(async (resp) => { | ||
await ensureRequestUntouched(await resp) | ||
})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ this was a surface for race condition bugs, was not testing them in order of execution that happens in the browser. fixed in e56bb6a, make sure to fetch my changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird, why won't this work in parallel 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onBeforeRequest
and onHeadersReceived
are expected to be called on a request in the specific order.
I remember we had some edge cases where we woudl detect something in one stage, and act on it in other stage. One I remember is ignoredRequests
(or maybe errorInFlight
?), but there may be more (or we may add them in future). Better to do this sequentially.
ensureCallRedirected({ | ||
modifiedRequestCallResp: await modifyRequest.onBeforeRequest(xhrRequest), | ||
MV2Expectation: 'http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', | ||
MV3Expectation: { | ||
origin: '^https?\\:\\/\\/google\\.com', | ||
destination: 'http://127.0.0.1:8080' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve UX around ensureCallRedirected
💭 just an idea, but if we rename things a bit, and pass request and function to call to ensureCallRedirected
and execute await call(request)
internally, we get a bit nicer API and the tests will read like a prose (request→call→expectations):
ensureCallRedirected({ | |
modifiedRequestCallResp: await modifyRequest.onBeforeRequest(xhrRequest), | |
MV2Expectation: 'http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', | |
MV3Expectation: { | |
origin: '^https?\\:\\/\\/google\\.com', | |
destination: 'http://127.0.0.1:8080' | |
ensureCallRedirected({ | |
request: xhrRequest, | |
call: modifyRequest.onBeforeRequest, | |
expectMV2Redirect: 'http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#hashTest', | |
expectMV3RuleAdd: { | |
origin: '^https?\\:\\/\\/google\\.com', | |
destination: 'http://127.0.0.1:8080' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these can be done:
MV2Expectation
=>expectMV2Redirect
MV3Expectation
=>expectMV3RuleAdd
However, I don't like passing call
and request
it has a weird smell 👃🏽 to it. I wanted ensureCallRedirected
to explicitly be synchronous, making it async is like await expect
expectations should be run on things that have been processed and done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sgtm.
origin: '^https?\\:\\/\\/dweb\\.link\\/ipfs\\/\\?uri\\=ipfs%3A%2F%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23', | ||
destination: 'https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is #
included in destination
?
I was under the impression that declarative API rules do not include #fragments
, and that the browser will append #hashTest
to the destination on its own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regex generator tries to find the lowest common substring,
const ALLOWED_CHARS_URL_REGEX = /([:\/\?#\[\]@!$&'\(\ )\*\+,;=\-_\.~])/g |
#
but the URL would be enconded which breaks the regex there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this is a bug in test approach?
afaik the #fragment is not sent to the server when a URL is requested, browser keeps it to itself, as it's meant for client-side use. Do we see #
being passed to the declarative rule engine at all?
If not, we should either remove percent-encoded #
from origin
:
origin: '^https?\\:\\/\\/dweb\\.link\\/ipfs\\/\\?uri\\=ipfs%3A%2F%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23', | |
destination: 'https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#' | |
origin: '^https?\\:\\/\\/dweb\\.link\\/ipfs\\/\\?uri\\=ipfs%3A%2F%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest', | |
destination: 'https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest' |
or have it unencoded in both:
origin: '^https?\\:\\/\\/dweb\\.link\\/ipfs\\/\\?uri\\=ipfs%3A%2F%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest%23', | |
destination: 'https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#' | |
origin: '^https?\\:\\/\\/dweb\\.link\\/ipfs\\/\\?uri\\=ipfs%3A%2F%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3FargTest#foo', | |
destination: 'https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?argTest#foo' |
MV2Expectation: 'https://ipfs.io/ipns/ipfs.io?argTest#hashTest', | ||
MV3Expectation: { | ||
origin: '^https?\\:\\/\\/dweb\\.link\\/ipfs\\/\\?uri\\=ipns%3A%2F%2Fipfs\\.io%3FargTest%23', | ||
destination: 'https://ipfs.io/ipns/ipfs.io?argTest#' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Not blocking this PR, but see #1254 for follow-up work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acknowledged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MV2Expectation: 'https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?arg=foo&bar=buzz#hash', | ||
MV3Expectation: { | ||
origin: '^https?\\:\\/\\/duckduckgo\\.com\\/\\?q\\=dweb%3A%2Fipfs%2FQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR%3Farg%3Dfoo%26bar%3Dbuzz%23hash\\&ia\\=software', | ||
destination: 'https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR?arg=foo&bar=buzz#hash' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test includes #hash
here but i've seen skipped #hashTest
in some previous ones?
This inconsistency looks like a bug that needs to be fixed in this PR.
- if declarative API takes care of
#fragments
then we should not include them in created rules. - if it does not handle fragments, we need to preserve them somehow
origin: '^https?\\:\\/\\/ipfs\\.io', | ||
destination: 'http://127.0.0.1:8080' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Not blocking this PR, but please see #1253 for follow-up work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acknowledged, I think I need to be more invasive with namespace detection, I was relying on common patterns between the two, but will have to re-think this specific concern.
Co-authored-by: Marcin Rataj <lidel@lidel.org>
* fix(mv3): 🔧 Modifying the default local redirect behaviour. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): 🔧 Modifying the default local redirect behaviour. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): 🐛 Making rules less greedy Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): ✨ Dynamic Rules for subdomain gateways. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(types): Adding ambient types for is-ipfs. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): helper Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): less greedy rules Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: Adding simpler regex for redirects from similar namespaces. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): 🚨 Warnings Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): Better Default Rules (#1260) * refactor(mv3): blockOrRequest code Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(mv3): Port Logic for Default Rules is more robust. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): Adding tests for default rule logic. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update add-on/src/lib/redirect-handler/blockOrObserve.ts * fix(docs): ✏️ Adding comments Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexfilters): Better Structure and Readability (#1261) * refactor(regexFilters): ✨ Adding a base class for regexFilters. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): ♻️ Moving subdomain filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): ♻️ Moving namespace filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): ♻️ Moving common filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(regexFilters): ✨ Hooking Up All together Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): ✏️ Lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(regexFilters): ✏️ Updating message. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(rename): ✏️ CommonPatterRedirectRegexFilter -> CommonPatternRedirectRegexFilter Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(regexFilters): ♻️ Refactor to remove call to super Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: make _canHandle private Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: ⚡ Fix math.min on every loop. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): no blanket redirect for subdomains without namespaces. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): unused import Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
* feat(mv3): Manifest V3 Migration Checklist (#1170) * 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> * fix(mv3): CI Builds 🏗️ (#1183) * fix(mv3): :adhesive_bandage: package.json * fix(mv3): :rotating_light: Fix Lint * fix(mv3): :green_heart: Manifest version * feat: :adhesive_bandage: temporary building from rc-branch * feat(mv3): blocking by observing (#1181) * 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> * fix(types): :label: Refactoring existing type declaration * fix(types): :label: Moving to new types path * feat(types): :sparkles: Adding typescript support for transpilation * feat(mv3): :sparkles: Adding blocking request tester * fix(mv3): :adhesive_bandage: package.json * fix(mv3): :rotating_light: Fix Lint * fix: :rotating_light: fix lint * fix(mv3): :adhesive_bandage: temp fix to build background context * fix(mv3): :necktie: Detection Logic for MV3 world. * feat(mv3): :sparkles: Dynamic RegexSubstitution * fix(types): :arrow_up: Adding .mocharc.json to fix mocha for TS. * fix: :rotating_light: Lint Fix * fix(mv3): :recycle: refactor background.service_worker * feat(mv3): :sparkles: Passing state to BlockOrObserve * fix(recovery): :bug: conditional for recovery * fix: :wastebasket: unneeded @ts-ignore * fix: :bulb: Adding comments * fix: fixing string method. * fix: removing extra space. * fix: removing @ts-nocheck --------- Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * feat(mv3): adding dynamicNetRequest rule reconciliation logic + Firefox Builds (#1186) * 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> * fix(types): :label: Refactoring existing type declaration * fix(types): :label: Moving to new types path * feat(types): :sparkles: Adding typescript support for transpilation * feat(mv3): :sparkles: Adding blocking request tester * fix(mv3): :adhesive_bandage: package.json * fix(mv3): :rotating_light: Fix Lint * fix: :rotating_light: fix lint * fix(mv3): :adhesive_bandage: temp fix to build background context * fix(mv3): :necktie: Detection Logic for MV3 world. * feat(mv3): :sparkles: Dynamic RegexSubstitution * fix(types): :arrow_up: Adding .mocharc.json to fix mocha for TS. * fix: :rotating_light: Lint Fix * fix(mv3): :recycle: refactor background.service_worker * feat(mv3): :sparkles: Passing state to BlockOrObserve * fix(recovery): :bug: conditional for recovery * fix: :wastebasket: unneeded @ts-ignore * fix: :bulb: Adding comments * fix: fixing string method. * fix: removing extra space. * fix: removing @ts-nocheck * no longer needed * fix(mv3): :recycle: Refactor * feat(mv3): :sparkles: Adding rule-recon logic * saving state * fix(mv3): :wrench: Manifest * fix(mv3): :wrench: Fixing firefox webpack config * fix(mv3): :adhesive_bandage: Patching debug to use in memory store instead of browser.storage.local * fix: :rotating_light: fixing lint and moving from record type to map type. * fix: :memo: Adding docstrings. * fix(mv3): :poop: web-ext making things harder than it needs to be. * fix(mv3): :rewind: no more debug patching * fix(mv3): :poop: improved recon logic * fix: :memo: adding comments regarding debug. * fix: :rotating_light: Fix lint * fix(mv3): :passport_control: manifest perms * fix: :wastebasket: unnecessary blank line * feat(mv3): :test_tube: Adding initial tests * feat(mv3): :clown_face: Adding Mock DeclarativeNetRequest Implementation * nits * fix: adding more test examples * fix: self-documenting code. * fix: unneeded comment * Update test/functional/lib/redirect-handler/blockOrObserve.test.ts --------- Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * Chore(mv3-release): Publishing RC releases (#1192) * 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> * fix(types): :label: Refactoring existing type declaration * fix(types): :label: Moving to new types path * feat(types): :sparkles: Adding typescript support for transpilation * feat(mv3): :sparkles: Adding blocking request tester * fix(mv3): :adhesive_bandage: package.json * fix(mv3): :rotating_light: Fix Lint * fix: :rotating_light: fix lint * fix(mv3): :adhesive_bandage: temp fix to build background context * fix(mv3): :necktie: Detection Logic for MV3 world. * feat(mv3): :sparkles: Dynamic RegexSubstitution * fix(types): :arrow_up: Adding .mocharc.json to fix mocha for TS. * fix: :rotating_light: Lint Fix * fix(mv3): :recycle: refactor background.service_worker * feat(mv3): :sparkles: Passing state to BlockOrObserve * fix(recovery): :bug: conditional for recovery * fix: :wastebasket: unneeded @ts-ignore * fix: :bulb: Adding comments * fix: fixing string method. * fix: removing extra space. * fix: removing @ts-nocheck * no longer needed * fix(mv3): :recycle: Refactor * feat(mv3): :sparkles: Adding rule-recon logic * saving state * fix(mv3): :wrench: Manifest * fix(mv3): :wrench: Fixing firefox webpack config * fix(mv3): :adhesive_bandage: Patching debug to use in memory store instead of browser.storage.local * fix: :rotating_light: fixing lint and moving from record type to map type. * fix: :memo: Adding docstrings. * fix(mv3): :poop: web-ext making things harder than it needs to be. * fix(mv3): :rewind: no more debug patching * fix(mv3): :poop: improved recon logic * fix: :memo: adding comments regarding debug. * fix: :rotating_light: Fix lint * fix(mv3): :passport_control: manifest perms * fix: :wastebasket: unnecessary blank line * feat(mv3): :test_tube: Adding initial tests * feat(mv3): :clown_face: Adding Mock DeclarativeNetRequest Implementation * nits * fix: adding more test examples * fix: self-documenting code. * fix: unneeded comment * Creating RC Releases --------- Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * fix(mv3): ref_name (#1193) * Fix/mv3 release (#1194) * fix(mv3): ref_name * fix: this is hard to test * Fixing beta builds * fix(mv3): :bug: Bad Regex for DNS links (#1198) * fix(mv3): :bug: Fixing copy functionality for MV3 (#1197) * fix(mv3): :bug: Fixing copy functionality for MV3 * fix: * Update add-on/src/lib/copier.js * feat(mv3): Handle State Changes (#1200) * fix(mv3): Add support for global toggle on/off * feat(mv3): Handle State Changes * fix(mv3): :recycle: Refactoring code to only message self in observation mode. * Fix/1202 first page is missing content (#1208) * fix: :arrow_up: package-lock * feat(mv3): :recycle: Reload tabs with request url. * fix(mv3): 👔 Adding better regex replace to remove infinite redirects. (#1210) * fix(mv3): :necktie: Adding better regex replace to remove infinite redirects. * fix(mv3): :test_tube: Adding more tests to account for local redirects * fix: :rotating_light: Linter * feat(mv3): :clown_face: DeclarativeNetRequestMock (#1211) * fix(mv3): :necktie: Adding better regex replace to remove infinite redirects. * fix(mv3): :test_tube: Adding more tests to account for local redirects * feat(mv3): :clown_face: DeclarativeNetRequestMock * fix: :rotating_light: Linter * feat(mv3): Adding ContextMenus MV3 Style (#1213) * feat(mv3): :sparkles: ContextMenus MV3 Style * feat(mv3): :test_tube: Adding tests * fix: test case * fix (quick-import): Duplicate behaviour in MV3 (#1215) * feat(mv3): :sparkles: ContextMenus MV3 Style * feat(mv3): :test_tube: Adding tests * fix: test case * fix(mv3): :bug: Quick Import * fix(mv3): :wastebasket: Removing Unnecessary Listener (#1219) * fix: Automatic Mode Description (#1224) * fix: :adhesive_bandage: Adding Automatic Mode Description * Update add-on/_locales/en/messages.json Co-authored-by: Steve Loeppky <stvn@loeppky.com> * Update add-on/_locales/en/messages.json Co-authored-by: Steve Loeppky <stvn@loeppky.com> --------- Co-authored-by: Steve Loeppky <stvn@loeppky.com> * fix: 🗑️ Remove Embedded Node Type (#1225) * fix: :wastebasket: no longer needed Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :wastebasket: unneeded messages Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :wastebasket: Removing unneeded test Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :necktie: Update logic or add todos to fix this later. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :wastebasket: remove logos Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint warning Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :alien: no idea why this is a problem now. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :wastebasket: irrelevant Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: quick-import Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: Fixing quick-import Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: Fixing Tools Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: fixing gateway-form Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: content-action Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: store Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: Fixing state Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Fix(docs): ✏️ Adding/Updating docs (#1230) * fix(docs): :pencil2: Api -> kubo rpc api Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(docs): :pencil2: reword Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(docs): :heavy_plus_sign: Adding MV3 Migration Docs and Assets. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update docs/MV3.md Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * Update docs/MV3.md Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * feat(metrics): ✨ Adding patched analytics. (#1232) * feat(mv3): :sparkles: Patching countly-sdk-web Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): :sparkles: Implementing Custom Async Store. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * chore(mv3): :adhesive_bandage: Hooking everything up together. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): Countly Patching + ignite-metrics@2.0.0 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :adhesive_bandage: Patching the Patch Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :adhesive_bandage: Patching error messages Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(patch): countly-web-sdk * fix(patch): :pin: Pinning countly-web-sdk to 23.2.2 --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :art: Replacing Static Images with Mermaid Diagrams (#1233) * fic(mv3): :art: Replacing Static Images with Mermaid Diagrams * fix(mv3): :pencil2: Improving Grammar Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Adding Colors Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * Update docs/MV3.md --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * feat(mv3): Faster Redirects During The First Page Load in main_frame (#1239) * feat(mv3): :zap: Faster redirects for the first time. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: removing only from the tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * test(mv3): Adding removing rule example. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * test(mv3): :test_tube: Added test regarding removal of rules Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(telemetry): Reverting to old state of things (#1242) * fix(mv3): Reverting Telemetry Changes To Use PatchedCountlySDK Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): metrics build Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: more reverts + fixing patch Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :adhesive_bandage: Patching the Patch Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(countly): :adhesive_bandage: don't look for debug, just log it. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(countly): removing session start/end. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: unused var Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(countly): patch * revert * fix(countly): repatch, old one seems to be failing. * fix(countly): bad patch * revert * retrying patch * fix: patch files should not be cached. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: fixing cache keys Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): ✨ Introduces Redirect Rule Management (#1240) * feat: exporting rules ending regex Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: :sparkles: Adding Rule Management UI Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: :sparkles: hooking up with background worker. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :art: button styling Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :lipstick: Making UI a bit better Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): Tracking URL resolved/observed count. (#1245) * fix(mv3): Reverting Telemetry Changes To Use PatchedCountlySDK Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): metrics build Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: more reverts + fixing patch Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: adding request view. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Reverting to mainline rc patch * Reverting to mainline rc add-on/src/lib/ipfs-companion.js * feat(telemetry): Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(telemetry): Implementing RequestTracker Event Handler Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(telemetry): hooking up events. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(types): annotations * fix(telemetry): :wastebasket: returning to previous state Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(telemetry): :recycle: Refactor Request Tracker Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(telemetry): hooking up requests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(telemetry): better types Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(countly): :wastebasket: more stuff goes, because test need to pass. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): fixed * feat(test): test tracker. * fix: remove only Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :lipstick: line break Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): Ask for Host Permissions if not exist. (#1250) * feat(mv3): :sparkles: Requesting Host Permissions Explicitly Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): :bug: Adding perms step on installed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: request-permission-view tracking Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): Making permissions agnostic to browser Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * docs: clarify why we need host permission making prompt less scary, shorter, and informative * Update add-on/src/lib/ipfs-request.js Co-authored-by: Marcin Rataj <lidel@lidel.org> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Marcin Rataj <lidel@lidel.org> * feat(mv3): Redirection Tests (#1236) * feat(mv3): :sparkles: Patching countly-sdk-web Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): :sparkles: Implementing Custom Async Store. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * chore(mv3): :adhesive_bandage: Hooking everything up together. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): Countly Patching + ignite-metrics@2.0.0 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :adhesive_bandage: Patching the Patch Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :recycle: Refactoring `supportsBlock` Checks. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): Regex Bug Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: Migrating blocking redirection test to observing redirection test Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :wrench: Fixing the mocha-setup. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :recycle: Moving Setup Files. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): gateway-redirect tests now fixed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :adhesive_bandage: Patching error messages Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(patch): countly-web-sdk * fix(patch): :pin: Pinning countly-web-sdk to 23.2.2 * fix(mv3): :lipstick: Fixing Lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: protocol-handler-redirection-tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: more tests fixed Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: More tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint fix Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * test: merge mocha-setup files (#1246) * test: merge mocha-setup files * test(helper): add mv3-test-enabled helper * test(setup): remove duplicate setup for mv3/mv2 * test(mv3): merge mv3 tests into mv2 test files (#1247) * test(mv3): merge mv3 tests into mv2 test files * chore(lint): fix lint failures * test(supportsBlock): cleanup test * test: migrating some tests * test(redirect): mv3 tests use same code as mv2 * test(redirect): mv3 test cleanup * test(protohandler): mv3 tests use same code as mv2 * test(helper): make isMv3 flag a boolean * test: fix after merge * test: fix after merge * fix: typerrors for localstorage Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: Updating test:functional_MV3 command. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: setup Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Fixing tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): Becuase Ofcourse * feat(test): scaffolding mv3 + mv2 calls in a single check. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): unskipping and upgrading dnslink tests to mv3 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): Upgrading workaround tests to MV3 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): removing all skips with better checks. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :recycle: Refactoring tests and removing redundant calls. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): More Dryer Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): one more Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :pencil2: Renaming isMv3TestingEnabled -> isManifestV3 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): refactor expectNoRedirect Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :recycle: Refactoring more. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: replacing checks to undefined Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: renaming expectNoRedirect -> ensureNoRedirect Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Adding missing JSDoc Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :shrug: how did this get removed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :wastebasket: removed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Suggestion * fix(test): :adhesive_bandage: Bad Merge Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): sequential expectNoRedirect * Update add-on/src/lib/redirect-handler/blockOrObserve.ts Co-authored-by: Marcin Rataj <lidel@lidel.org> * fix(rules): Better Redirect Rules (#1256) * fix(mv3): :wrench: Modifying the default local redirect behaviour. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :wrench: Modifying the default local redirect behaviour. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :bug: Making rules less greedy Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :sparkles: Dynamic Rules for subdomain gateways. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(types): Adding ambient types for is-ipfs. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): helper Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): less greedy rules Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: Adding simpler regex for redirects from similar namespaces. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): :rotating_light: Warnings Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): Better Default Rules (#1260) * refactor(mv3): blockOrRequest code Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(mv3): Port Logic for Default Rules is more robust. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): Adding tests for default rule logic. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update add-on/src/lib/redirect-handler/blockOrObserve.ts * fix(docs): :pencil2: Adding comments Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexfilters): Better Structure and Readability (#1261) * refactor(regexFilters): :sparkles: Adding a base class for regexFilters. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :recycle: Moving subdomain filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :recycle: Moving namespace filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :recycle: Moving common filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(regexFilters): :sparkles: Hooking Up All together Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): :pencil2: Lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(regexFilters): :pencil2: Updating message. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(rename): :pencil2: CommonPatterRedirectRegexFilter -> CommonPatternRedirectRegexFilter Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(regexFilters): :recycle: Refactor to remove call to super Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: make _canHandle private Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :zap: Fix math.min on every loop. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): no blanket redirect for subdomains without namespaces. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): unused import Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Co-authored-by: Marcin Rataj <lidel@lidel.org> * fix(recovery): Recovery Rules should reset (#1266) * feat(mv3): :sparkles: Patching countly-sdk-web Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): :sparkles: Implementing Custom Async Store. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * chore(mv3): :adhesive_bandage: Hooking everything up together. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): Countly Patching + ignite-metrics@2.0.0 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :adhesive_bandage: Patching the Patch Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :recycle: Refactoring `supportsBlock` Checks. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): Regex Bug Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: Migrating blocking redirection test to observing redirection test Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :wrench: Fixing the mocha-setup. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :recycle: Moving Setup Files. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): gateway-redirect tests now fixed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :adhesive_bandage: Patching error messages Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(patch): countly-web-sdk * fix(patch): :pin: Pinning countly-web-sdk to 23.2.2 * fix(mv3): :lipstick: Fixing Lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: protocol-handler-redirection-tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: more tests fixed Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: More tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint fix Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * test: merge mocha-setup files (#1246) * test: merge mocha-setup files * test(helper): add mv3-test-enabled helper * test(setup): remove duplicate setup for mv3/mv2 * test(mv3): merge mv3 tests into mv2 test files (#1247) * test(mv3): merge mv3 tests into mv2 test files * chore(lint): fix lint failures * test(supportsBlock): cleanup test * test: migrating some tests * test(redirect): mv3 tests use same code as mv2 * test(redirect): mv3 test cleanup * test(protohandler): mv3 tests use same code as mv2 * test(helper): make isMv3 flag a boolean * test: fix after merge * test: fix after merge * fix: typerrors for localstorage Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: Updating test:functional_MV3 command. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: setup Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Fixing tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): Becuase Ofcourse * feat(test): scaffolding mv3 + mv2 calls in a single check. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): unskipping and upgrading dnslink tests to mv3 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): Upgrading workaround tests to MV3 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): removing all skips with better checks. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :recycle: Refactoring tests and removing redundant calls. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): More Dryer Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): one more Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :pencil2: Renaming isMv3TestingEnabled -> isManifestV3 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): refactor expectNoRedirect Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :recycle: Refactoring more. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: replacing checks to undefined Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: renaming expectNoRedirect -> ensureNoRedirect Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Adding missing JSDoc Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :shrug: how did this get removed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :wastebasket: removed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Suggestion * fix(test): :adhesive_bandage: Bad Merge Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): sequential expectNoRedirect * Update add-on/src/lib/redirect-handler/blockOrObserve.ts Co-authored-by: Marcin Rataj <lidel@lidel.org> * fix(mv3): :wrench: Modifying the default local redirect behaviour. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :wrench: Modifying the default local redirect behaviour. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :bug: Making rules less greedy Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :sparkles: Dynamic Rules for subdomain gateways. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(types): Adding ambient types for is-ipfs. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): helper Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): less greedy rules Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: Adding simpler regex for redirects from similar namespaces. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): :rotating_light: Warnings Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): Better Default Rules (#1260) * refactor(mv3): blockOrRequest code Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(mv3): Port Logic for Default Rules is more robust. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): Adding tests for default rule logic. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update add-on/src/lib/redirect-handler/blockOrObserve.ts * fix(docs): :pencil2: Adding comments Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :sparkles: Adding a base class for regexFilters. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :recycle: Moving subdomain filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :recycle: Moving namespace filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :recycle: Moving common filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(regexFilters): :sparkles: Hooking Up All together Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): :pencil2: Lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(regexFilters): :pencil2: Updating message. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(rename): :pencil2: CommonPatterRedirectRegexFilter -> CommonPatternRedirectRegexFilter Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(regexFilters): :recycle: Refactor to remove call to super Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: make _canHandle private Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :zap: Fix math.min on every loop. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(recovery): reset rules Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(recovery): :recycle: Refactor messaging logic Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(recovery): :bug: Cleanup Logic Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :bug: fix toggle site integration. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :adhesive_bandage: Hard coding wait as the browser is not cooperative. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Co-authored-by: Marcin Rataj <lidel@lidel.org> * fix(mv3): :bug: rules section visible. (#1271) Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(brave): Fix Brave UX (#1270) * fix(options): fixing options menu Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): Adding brave specific redirects. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(e2e): Request Handling Tests (#1272) * fix(test): :recycle: simplify scaffolding Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): :test_tube: Adding a final resolution check Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update add-on/_locales/en/messages.json Co-authored-by: Marcin Rataj <lidel@lidel.org> * Update add-on/src/options/forms/api-form.js Co-authored-by: Marcin Rataj <lidel@lidel.org> * Update add-on/_locales/en/messages.json Co-authored-by: Marcin Rataj <lidel@lidel.org> * Update test/functional/lib/redirect-handler/blockOrObserve.test.ts Co-authored-by: Marcin Rataj <lidel@lidel.org> * Update README.md Co-authored-by: Marcin Rataj <lidel@lidel.org> * fix(test): Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :see_no_evil: Don't interrupt websockets and webtransports. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :pencil2: Rename: ensureDeclrativeNetRequetRuleIsAdded -> ensureDeclarativeNetRequestRuleIsAdded Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :pencil2: Rename: ensureTabRedirected -> ensureTabUpdatedTo Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(language): :pencil2: Rewrite Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :test_tube: Add a failing test. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update add-on/_locales/en/messages.json Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * Update ci/update-manifest.sh Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * fix: :pencil2: Beta naming Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): FF Browser Action (#1275) Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * test(import): :test_tube: Backfill Tests (#1276) * test(import): :test_tube: Backfill Tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update test/functional/lib/ipfs-import.test.js Co-authored-by: Marcin Rataj <lidel@lidel.org> * Update test/functional/lib/ipfs-import.test.js Co-authored-by: Marcin Rataj <lidel@lidel.org> * test(import): :test_tube: Backfilling tests for copyImportResultsToFiles Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Marcin Rataj <lidel@lidel.org> * feat(mv3): :heavy_plus_sign: Adding hash function to generate predict… (#1273) feat(mv3): :heavy_plus_sign: Adding hash function to generate predictable ids. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :wastebasket: Remove redundant lines. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :recycle: opposite functionality `supportsBlock` -> `supportsDeclarativeNetRequest` Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): :twisted_rightwards_arrows: Adding migrations for embedded to external. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Co-authored-by: Steve Loeppky <stvn@loeppky.com> Co-authored-by: Marcin Rataj <lidel@lidel.org>
BREAKING CHANGE: Implements the new MV3 standard for browser extensions. * feat(mv3): Manifest V3 Migration Checklist (#1170) * 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> * fix(mv3): CI Builds 🏗️ (#1183) * fix(mv3): :adhesive_bandage: package.json * fix(mv3): :rotating_light: Fix Lint * fix(mv3): :green_heart: Manifest version * feat: :adhesive_bandage: temporary building from rc-branch * feat(mv3): blocking by observing (#1181) * 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> * fix(types): :label: Refactoring existing type declaration * fix(types): :label: Moving to new types path * feat(types): :sparkles: Adding typescript support for transpilation * feat(mv3): :sparkles: Adding blocking request tester * fix(mv3): :adhesive_bandage: package.json * fix(mv3): :rotating_light: Fix Lint * fix: :rotating_light: fix lint * fix(mv3): :adhesive_bandage: temp fix to build background context * fix(mv3): :necktie: Detection Logic for MV3 world. * feat(mv3): :sparkles: Dynamic RegexSubstitution * fix(types): :arrow_up: Adding .mocharc.json to fix mocha for TS. * fix: :rotating_light: Lint Fix * fix(mv3): :recycle: refactor background.service_worker * feat(mv3): :sparkles: Passing state to BlockOrObserve * fix(recovery): :bug: conditional for recovery * fix: :wastebasket: unneeded @ts-ignore * fix: :bulb: Adding comments * fix: fixing string method. * fix: removing extra space. * fix: removing @ts-nocheck --------- Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * feat(mv3): adding dynamicNetRequest rule reconciliation logic + Firefox Builds (#1186) * 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> * fix(types): :label: Refactoring existing type declaration * fix(types): :label: Moving to new types path * feat(types): :sparkles: Adding typescript support for transpilation * feat(mv3): :sparkles: Adding blocking request tester * fix(mv3): :adhesive_bandage: package.json * fix(mv3): :rotating_light: Fix Lint * fix: :rotating_light: fix lint * fix(mv3): :adhesive_bandage: temp fix to build background context * fix(mv3): :necktie: Detection Logic for MV3 world. * feat(mv3): :sparkles: Dynamic RegexSubstitution * fix(types): :arrow_up: Adding .mocharc.json to fix mocha for TS. * fix: :rotating_light: Lint Fix * fix(mv3): :recycle: refactor background.service_worker * feat(mv3): :sparkles: Passing state to BlockOrObserve * fix(recovery): :bug: conditional for recovery * fix: :wastebasket: unneeded @ts-ignore * fix: :bulb: Adding comments * fix: fixing string method. * fix: removing extra space. * fix: removing @ts-nocheck * no longer needed * fix(mv3): :recycle: Refactor * feat(mv3): :sparkles: Adding rule-recon logic * saving state * fix(mv3): :wrench: Manifest * fix(mv3): :wrench: Fixing firefox webpack config * fix(mv3): :adhesive_bandage: Patching debug to use in memory store instead of browser.storage.local * fix: :rotating_light: fixing lint and moving from record type to map type. * fix: :memo: Adding docstrings. * fix(mv3): :poop: web-ext making things harder than it needs to be. * fix(mv3): :rewind: no more debug patching * fix(mv3): :poop: improved recon logic * fix: :memo: adding comments regarding debug. * fix: :rotating_light: Fix lint * fix(mv3): :passport_control: manifest perms * fix: :wastebasket: unnecessary blank line * feat(mv3): :test_tube: Adding initial tests * feat(mv3): :clown_face: Adding Mock DeclarativeNetRequest Implementation * nits * fix: adding more test examples * fix: self-documenting code. * fix: unneeded comment * Update test/functional/lib/redirect-handler/blockOrObserve.test.ts --------- Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * Chore(mv3-release): Publishing RC releases (#1192) * 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> * fix(types): :label: Refactoring existing type declaration * fix(types): :label: Moving to new types path * feat(types): :sparkles: Adding typescript support for transpilation * feat(mv3): :sparkles: Adding blocking request tester * fix(mv3): :adhesive_bandage: package.json * fix(mv3): :rotating_light: Fix Lint * fix: :rotating_light: fix lint * fix(mv3): :adhesive_bandage: temp fix to build background context * fix(mv3): :necktie: Detection Logic for MV3 world. * feat(mv3): :sparkles: Dynamic RegexSubstitution * fix(types): :arrow_up: Adding .mocharc.json to fix mocha for TS. * fix: :rotating_light: Lint Fix * fix(mv3): :recycle: refactor background.service_worker * feat(mv3): :sparkles: Passing state to BlockOrObserve * fix(recovery): :bug: conditional for recovery * fix: :wastebasket: unneeded @ts-ignore * fix: :bulb: Adding comments * fix: fixing string method. * fix: removing extra space. * fix: removing @ts-nocheck * no longer needed * fix(mv3): :recycle: Refactor * feat(mv3): :sparkles: Adding rule-recon logic * saving state * fix(mv3): :wrench: Manifest * fix(mv3): :wrench: Fixing firefox webpack config * fix(mv3): :adhesive_bandage: Patching debug to use in memory store instead of browser.storage.local * fix: :rotating_light: fixing lint and moving from record type to map type. * fix: :memo: Adding docstrings. * fix(mv3): :poop: web-ext making things harder than it needs to be. * fix(mv3): :rewind: no more debug patching * fix(mv3): :poop: improved recon logic * fix: :memo: adding comments regarding debug. * fix: :rotating_light: Fix lint * fix(mv3): :passport_control: manifest perms * fix: :wastebasket: unnecessary blank line * feat(mv3): :test_tube: Adding initial tests * feat(mv3): :clown_face: Adding Mock DeclarativeNetRequest Implementation * nits * fix: adding more test examples * fix: self-documenting code. * fix: unneeded comment * Creating RC Releases --------- Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * fix(mv3): ref_name (#1193) * Fix/mv3 release (#1194) * fix(mv3): ref_name * fix: this is hard to test * Fixing beta builds * fix(mv3): :bug: Bad Regex for DNS links (#1198) * fix(mv3): :bug: Fixing copy functionality for MV3 (#1197) * fix(mv3): :bug: Fixing copy functionality for MV3 * fix: * Update add-on/src/lib/copier.js * feat(mv3): Handle State Changes (#1200) * fix(mv3): Add support for global toggle on/off * feat(mv3): Handle State Changes * fix(mv3): :recycle: Refactoring code to only message self in observation mode. * Fix/1202 first page is missing content (#1208) * fix: :arrow_up: package-lock * feat(mv3): :recycle: Reload tabs with request url. * fix(mv3): 👔 Adding better regex replace to remove infinite redirects. (#1210) * fix(mv3): :necktie: Adding better regex replace to remove infinite redirects. * fix(mv3): :test_tube: Adding more tests to account for local redirects * fix: :rotating_light: Linter * feat(mv3): :clown_face: DeclarativeNetRequestMock (#1211) * fix(mv3): :necktie: Adding better regex replace to remove infinite redirects. * fix(mv3): :test_tube: Adding more tests to account for local redirects * feat(mv3): :clown_face: DeclarativeNetRequestMock * fix: :rotating_light: Linter * feat(mv3): Adding ContextMenus MV3 Style (#1213) * feat(mv3): :sparkles: ContextMenus MV3 Style * feat(mv3): :test_tube: Adding tests * fix: test case * fix (quick-import): Duplicate behaviour in MV3 (#1215) * feat(mv3): :sparkles: ContextMenus MV3 Style * feat(mv3): :test_tube: Adding tests * fix: test case * fix(mv3): :bug: Quick Import * fix(mv3): :wastebasket: Removing Unnecessary Listener (#1219) * fix: Automatic Mode Description (#1224) * fix: :adhesive_bandage: Adding Automatic Mode Description * Update add-on/_locales/en/messages.json Co-authored-by: Steve Loeppky <stvn@loeppky.com> * Update add-on/_locales/en/messages.json Co-authored-by: Steve Loeppky <stvn@loeppky.com> --------- Co-authored-by: Steve Loeppky <stvn@loeppky.com> * fix: 🗑️ Remove Embedded Node Type (#1225) * fix: :wastebasket: no longer needed Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :wastebasket: unneeded messages Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :wastebasket: Removing unneeded test Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :necktie: Update logic or add todos to fix this later. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :wastebasket: remove logos Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint warning Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :alien: no idea why this is a problem now. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :wastebasket: irrelevant Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: quick-import Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: Fixing quick-import Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: Fixing Tools Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: fixing gateway-form Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: content-action Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: store Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: Fixing state Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Fix(docs): ✏️ Adding/Updating docs (#1230) * fix(docs): :pencil2: Api -> kubo rpc api Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(docs): :pencil2: reword Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(docs): :heavy_plus_sign: Adding MV3 Migration Docs and Assets. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update docs/MV3.md Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * Update docs/MV3.md Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * feat(metrics): ✨ Adding patched analytics. (#1232) * feat(mv3): :sparkles: Patching countly-sdk-web Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): :sparkles: Implementing Custom Async Store. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * chore(mv3): :adhesive_bandage: Hooking everything up together. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): Countly Patching + ignite-metrics@2.0.0 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :adhesive_bandage: Patching the Patch Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :adhesive_bandage: Patching error messages Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(patch): countly-web-sdk * fix(patch): :pin: Pinning countly-web-sdk to 23.2.2 --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :art: Replacing Static Images with Mermaid Diagrams (#1233) * fic(mv3): :art: Replacing Static Images with Mermaid Diagrams * fix(mv3): :pencil2: Improving Grammar Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Adding Colors Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * Update docs/MV3.md --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * feat(mv3): Faster Redirects During The First Page Load in main_frame (#1239) * feat(mv3): :zap: Faster redirects for the first time. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: removing only from the tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * test(mv3): Adding removing rule example. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * test(mv3): :test_tube: Added test regarding removal of rules Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(telemetry): Reverting to old state of things (#1242) * fix(mv3): Reverting Telemetry Changes To Use PatchedCountlySDK Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): metrics build Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: more reverts + fixing patch Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :adhesive_bandage: Patching the Patch Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(countly): :adhesive_bandage: don't look for debug, just log it. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(countly): removing session start/end. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: unused var Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(countly): patch * revert * fix(countly): repatch, old one seems to be failing. * fix(countly): bad patch * revert * retrying patch * fix: patch files should not be cached. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: fixing cache keys Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): ✨ Introduces Redirect Rule Management (#1240) * feat: exporting rules ending regex Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: :sparkles: Adding Rule Management UI Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: :sparkles: hooking up with background worker. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :art: button styling Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :lipstick: Making UI a bit better Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): Tracking URL resolved/observed count. (#1245) * fix(mv3): Reverting Telemetry Changes To Use PatchedCountlySDK Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): metrics build Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: more reverts + fixing patch Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: adding request view. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Reverting to mainline rc patch * Reverting to mainline rc add-on/src/lib/ipfs-companion.js * feat(telemetry): Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(telemetry): Implementing RequestTracker Event Handler Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(telemetry): hooking up events. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(types): annotations * fix(telemetry): :wastebasket: returning to previous state Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(telemetry): :recycle: Refactor Request Tracker Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(telemetry): hooking up requests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(telemetry): better types Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(countly): :wastebasket: more stuff goes, because test need to pass. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): fixed * feat(test): test tracker. * fix: remove only Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :lipstick: line break Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): Ask for Host Permissions if not exist. (#1250) * feat(mv3): :sparkles: Requesting Host Permissions Explicitly Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): :bug: Adding perms step on installed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: request-permission-view tracking Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): Making permissions agnostic to browser Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * docs: clarify why we need host permission making prompt less scary, shorter, and informative * Update add-on/src/lib/ipfs-request.js Co-authored-by: Marcin Rataj <lidel@lidel.org> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Marcin Rataj <lidel@lidel.org> * feat(mv3): Redirection Tests (#1236) * feat(mv3): :sparkles: Patching countly-sdk-web Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): :sparkles: Implementing Custom Async Store. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * chore(mv3): :adhesive_bandage: Hooking everything up together. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): Countly Patching + ignite-metrics@2.0.0 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :adhesive_bandage: Patching the Patch Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :recycle: Refactoring `supportsBlock` Checks. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): Regex Bug Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: Migrating blocking redirection test to observing redirection test Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :wrench: Fixing the mocha-setup. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :recycle: Moving Setup Files. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): gateway-redirect tests now fixed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :adhesive_bandage: Patching error messages Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(patch): countly-web-sdk * fix(patch): :pin: Pinning countly-web-sdk to 23.2.2 * fix(mv3): :lipstick: Fixing Lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: protocol-handler-redirection-tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: more tests fixed Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: More tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint fix Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * test: merge mocha-setup files (#1246) * test: merge mocha-setup files * test(helper): add mv3-test-enabled helper * test(setup): remove duplicate setup for mv3/mv2 * test(mv3): merge mv3 tests into mv2 test files (#1247) * test(mv3): merge mv3 tests into mv2 test files * chore(lint): fix lint failures * test(supportsBlock): cleanup test * test: migrating some tests * test(redirect): mv3 tests use same code as mv2 * test(redirect): mv3 test cleanup * test(protohandler): mv3 tests use same code as mv2 * test(helper): make isMv3 flag a boolean * test: fix after merge * test: fix after merge * fix: typerrors for localstorage Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: Updating test:functional_MV3 command. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: setup Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Fixing tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): Becuase Ofcourse * feat(test): scaffolding mv3 + mv2 calls in a single check. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): unskipping and upgrading dnslink tests to mv3 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): Upgrading workaround tests to MV3 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): removing all skips with better checks. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :recycle: Refactoring tests and removing redundant calls. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): More Dryer Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): one more Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :pencil2: Renaming isMv3TestingEnabled -> isManifestV3 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): refactor expectNoRedirect Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :recycle: Refactoring more. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: replacing checks to undefined Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: renaming expectNoRedirect -> ensureNoRedirect Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Adding missing JSDoc Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :shrug: how did this get removed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :wastebasket: removed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Suggestion * fix(test): :adhesive_bandage: Bad Merge Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): sequential expectNoRedirect * Update add-on/src/lib/redirect-handler/blockOrObserve.ts Co-authored-by: Marcin Rataj <lidel@lidel.org> * fix(rules): Better Redirect Rules (#1256) * fix(mv3): :wrench: Modifying the default local redirect behaviour. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :wrench: Modifying the default local redirect behaviour. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :bug: Making rules less greedy Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :sparkles: Dynamic Rules for subdomain gateways. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(types): Adding ambient types for is-ipfs. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): helper Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): less greedy rules Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: Adding simpler regex for redirects from similar namespaces. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): :rotating_light: Warnings Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): Better Default Rules (#1260) * refactor(mv3): blockOrRequest code Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(mv3): Port Logic for Default Rules is more robust. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): Adding tests for default rule logic. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update add-on/src/lib/redirect-handler/blockOrObserve.ts * fix(docs): :pencil2: Adding comments Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexfilters): Better Structure and Readability (#1261) * refactor(regexFilters): :sparkles: Adding a base class for regexFilters. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :recycle: Moving subdomain filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :recycle: Moving namespace filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :recycle: Moving common filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(regexFilters): :sparkles: Hooking Up All together Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): :pencil2: Lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(regexFilters): :pencil2: Updating message. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(rename): :pencil2: CommonPatterRedirectRegexFilter -> CommonPatternRedirectRegexFilter Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(regexFilters): :recycle: Refactor to remove call to super Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: make _canHandle private Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :zap: Fix math.min on every loop. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): no blanket redirect for subdomains without namespaces. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): unused import Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Co-authored-by: Marcin Rataj <lidel@lidel.org> * fix(recovery): Recovery Rules should reset (#1266) * feat(mv3): :sparkles: Patching countly-sdk-web Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): :sparkles: Implementing Custom Async Store. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * chore(mv3): :adhesive_bandage: Hooking everything up together. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): Countly Patching + ignite-metrics@2.0.0 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :adhesive_bandage: Patching the Patch Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :recycle: Refactoring `supportsBlock` Checks. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): Regex Bug Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: Migrating blocking redirection test to observing redirection test Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :wrench: Fixing the mocha-setup. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :recycle: Moving Setup Files. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): gateway-redirect tests now fixed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :adhesive_bandage: Patching error messages Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(patch): countly-web-sdk * fix(patch): :pin: Pinning countly-web-sdk to 23.2.2 * fix(mv3): :lipstick: Fixing Lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: protocol-handler-redirection-tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: more tests fixed Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: More tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint fix Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * test: merge mocha-setup files (#1246) * test: merge mocha-setup files * test(helper): add mv3-test-enabled helper * test(setup): remove duplicate setup for mv3/mv2 * test(mv3): merge mv3 tests into mv2 test files (#1247) * test(mv3): merge mv3 tests into mv2 test files * chore(lint): fix lint failures * test(supportsBlock): cleanup test * test: migrating some tests * test(redirect): mv3 tests use same code as mv2 * test(redirect): mv3 test cleanup * test(protohandler): mv3 tests use same code as mv2 * test(helper): make isMv3 flag a boolean * test: fix after merge * test: fix after merge * fix: typerrors for localstorage Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: Updating test:functional_MV3 command. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: setup Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Fixing tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): Becuase Ofcourse * feat(test): scaffolding mv3 + mv2 calls in a single check. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): unskipping and upgrading dnslink tests to mv3 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): Upgrading workaround tests to MV3 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): removing all skips with better checks. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :recycle: Refactoring tests and removing redundant calls. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): More Dryer Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): one more Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :pencil2: Renaming isMv3TestingEnabled -> isManifestV3 Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): refactor expectNoRedirect Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :recycle: Refactoring more. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: replacing checks to undefined Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: renaming expectNoRedirect -> ensureNoRedirect Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Adding missing JSDoc Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :shrug: how did this get removed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :wastebasket: removed. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Suggestion * fix(test): :adhesive_bandage: Bad Merge Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): sequential expectNoRedirect * Update add-on/src/lib/redirect-handler/blockOrObserve.ts Co-authored-by: Marcin Rataj <lidel@lidel.org> * fix(mv3): :wrench: Modifying the default local redirect behaviour. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :wrench: Modifying the default local redirect behaviour. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :bug: Making rules less greedy Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :sparkles: Dynamic Rules for subdomain gateways. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(types): Adding ambient types for is-ipfs. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): helper Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): less greedy rules Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat: Adding simpler regex for redirects from similar namespaces. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): :rotating_light: Warnings Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): Better Default Rules (#1260) * refactor(mv3): blockOrRequest code Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(mv3): Port Logic for Default Rules is more robust. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(test): Adding tests for default rule logic. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update add-on/src/lib/redirect-handler/blockOrObserve.ts * fix(docs): :pencil2: Adding comments Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :sparkles: Adding a base class for regexFilters. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :recycle: Moving subdomain filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :recycle: Moving namespace filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * refactor(regexFilters): :recycle: Moving common filter to a subclass Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(regexFilters): :sparkles: Hooking Up All together Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(lint): :pencil2: Lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(regexFilters): :pencil2: Updating message. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(rename): :pencil2: CommonPatterRedirectRegexFilter -> CommonPatternRedirectRegexFilter Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(regexFilters): :recycle: Refactor to remove call to super Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: make _canHandle private Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :zap: Fix math.min on every loop. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(recovery): reset rules Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(recovery): :recycle: Refactor messaging logic Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(recovery): :bug: Cleanup Logic Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :bug: fix toggle site integration. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :adhesive_bandage: Hard coding wait as the browser is not cooperative. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Co-authored-by: Marcin Rataj <lidel@lidel.org> * fix(mv3): :bug: rules section visible. (#1271) Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(brave): Fix Brave UX (#1270) * fix(options): fixing options menu Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): Adding brave specific redirects. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: lint Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(e2e): Request Handling Tests (#1272) * fix(test): :recycle: simplify scaffolding Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): :test_tube: Adding a final resolution check Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update add-on/_locales/en/messages.json Co-authored-by: Marcin Rataj <lidel@lidel.org> * Update add-on/src/options/forms/api-form.js Co-authored-by: Marcin Rataj <lidel@lidel.org> * Update add-on/_locales/en/messages.json Co-authored-by: Marcin Rataj <lidel@lidel.org> * Update test/functional/lib/redirect-handler/blockOrObserve.test.ts Co-authored-by: Marcin Rataj <lidel@lidel.org> * Update README.md Co-authored-by: Marcin Rataj <lidel@lidel.org> * fix(test): Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :see_no_evil: Don't interrupt websockets and webtransports. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :pencil2: Rename: ensureDeclrativeNetRequetRuleIsAdded -> ensureDeclarativeNetRequestRuleIsAdded Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix: :pencil2: Rename: ensureTabRedirected -> ensureTabUpdatedTo Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(language): :pencil2: Rewrite Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(test): :test_tube: Add a failing test. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update add-on/_locales/en/messages.json Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * Update ci/update-manifest.sh Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> * fix: :pencil2: Beta naming Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): FF Browser Action (#1275) Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * test(import): :test_tube: Backfill Tests (#1276) * test(import): :test_tube: Backfill Tests Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * Update test/functional/lib/ipfs-import.test.js Co-authored-by: Marcin Rataj <lidel@lidel.org> * Update test/functional/lib/ipfs-import.test.js Co-authored-by: Marcin Rataj <lidel@lidel.org> * test(import): :test_tube: Backfilling tests for copyImportResultsToFiles Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Marcin Rataj <lidel@lidel.org> * feat(mv3): :heavy_plus_sign: Adding hash function to generate predict… (#1273) feat(mv3): :heavy_plus_sign: Adding hash function to generate predictable ids. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :wastebasket: Remove redundant lines. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * fix(mv3): :recycle: opposite functionality `supportsBlock` -> `supportsDeclarativeNetRequest` Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * feat(mv3): :twisted_rightwards_arrows: Adding migrations for embedded to external. Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --------- Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Co-authored-by: Steve Loeppky <stvn@loeppky.com> Co-authored-by: Marcin Rataj <lidel@lidel.org>
Closes: #1235
In this PR:
Edit (during the review):
ensure..
methods to test for both MV2 and MV3 side-effects.