diff --git a/.build_exclusions b/.build_exclusions
index b8a9d2465a61..226dfd415add 100644
--- a/.build_exclusions
+++ b/.build_exclusions
@@ -10,10 +10,8 @@ chrome/content/rules/validity-*
chrome/content/rules/make-*
*.xcf.gz
.gitignore
-webextension/.gitignore
-chrome-resources/update-from-chrome-svn.sh
-webextension/chrome-resources/update-from-chrome-svn.sh
.eslintrc.json
-webextension/.eslintrc.json
.eslintignore
node_modules
+package-lock.json
+test
diff --git a/.editorconfig b/.editorconfig
index e93ea3f1b6c3..3188469e924a 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,4 +1,4 @@
-# EditorConfig is awesome: http://EditorConfig.org
+# EditorConfig is awesome: https://EditorConfig.org
root = true
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index ba89d09a6c9e..e57a0b19e0e8 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -4,37 +4,8 @@
[//]: # (Please help us by following this issue template.)
[//]: # (You can delete all blank lines and all lines starting)
[//]: # (with the comment marker, such as this one.)
-[//]: #
-[//]: # (Delete all but one of the following "Type" lines.)
-[//]: # (Leave in the line that best describes the issue you are reporting.)
-Type: ruleset issue
-Type: new ruleset
-Type: code issue
-Type: feature request
Type: other
-[//]: # (If you are reporting a ruleset/website problem, include the top-level)
-[//]: # (domain below. For example, if you want to report an issue about)
-[//]: # ("one.example.com" and "two.example.com", then the line below should)
-[//]: # (be:)
-[//]: #
-[//]: # (Domain: example.com)
-[//]: #
-[//]: # (Be sure to remove the parenthesis and comment marker. If you are only)
-[//]: # (reporting an issue about "one.example.com", then the line below should)
-[//]: # (be:)
-[//]: #
-[//]: # (Domain: one.example.com)
-[//]: #
-[//]: # (Only include one top-level domain. If you have more than one top-level)
-[//]: # (domain to report, such as both "example.com" and "example.org", open a)
-[//]: # (new issue for each top-level domain.)
-[//]: #
-[//]: # (If you are not reporting a ruleset/website problem, you can delete the)
-[//]: # ("Domain" line or leave it blank.)
-
-Domain:
-
[//]: # (Include any other relevant information below. Thank you again for)
[//]: # (helping to improve HTTPS Everywhere.)
diff --git a/.github/ISSUE_TEMPLATE/code-issue.md b/.github/ISSUE_TEMPLATE/code-issue.md
new file mode 100644
index 000000000000..c62ff8b75aff
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/code-issue.md
@@ -0,0 +1,16 @@
+---
+name: Code issue report
+about: Report an issue about our code
+---
+
+[//]: # (Thank you for reporting an issue to HTTPS Everywhere.)
+[//]: # (We welcome input from users on improving this project.)
+[//]: #
+[//]: # (Please help us by following this issue template.)
+[//]: # (You can delete all blank lines and all lines starting)
+[//]: # (with the comment marker, such as this one.)
+
+Type: code issue
+
+[//]: # (Include any other relevant information below. Thank you again for)
+[//]: # (helping to improve HTTPS Everywhere.)
diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md
new file mode 100644
index 000000000000..eb831076fd25
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature-request.md
@@ -0,0 +1,16 @@
+---
+name: Feature request
+about: Request a feature to help us improve HTTPS Everywhere
+---
+
+[//]: # (Thank you for reporting an issue to HTTPS Everywhere.)
+[//]: # (We welcome input from users on improving this project.)
+[//]: #
+[//]: # (Please help us by following this issue template.)
+[//]: # (You can delete all blank lines and all lines starting)
+[//]: # (with the comment marker, such as this one.)
+
+Type: feature request
+
+[//]: # (Include any other relevant information below. Thank you again for)
+[//]: # (helping to improve HTTPS Everywhere.)
diff --git a/.github/ISSUE_TEMPLATE/new-ruleset.md b/.github/ISSUE_TEMPLATE/new-ruleset.md
new file mode 100644
index 000000000000..59250bbece3f
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/new-ruleset.md
@@ -0,0 +1,42 @@
+---
+name: New ruleset
+about: Request/submit a new ruleset
+---
+
+[//]: # (Thank you for reporting an issue to HTTPS Everywhere.)
+[//]: # (We welcome input from users on improving this project.)
+[//]: #
+[//]: # (Please help us by following this issue template.)
+[//]: # (You can delete all blank lines and all lines starting)
+[//]: # (with the comment marker, such as this one.)
+[//]: #
+[//]: # (Delete all but one of the following "Type" lines.)
+[//]: # (Leave in the line that best describes the issue you are reporting.)
+[//]: #
+[//]: # (If you are submitting a new ruleset, please check the list at)
+[//]: # (https://www.eff.org/https-everywhere/atlas/index.html and the open)
+[//]: # (issues and pull requests to make sure it doesn't already exist.)
+
+Type: new ruleset
+
+[//]: # (If you are reporting a ruleset/website problem, include the top-level)
+[//]: # (domain below. For example, if you want to report an issue about)
+[//]: # ("one.example.com" and "two.example.com", then the line below should)
+[//]: # (be:)
+[//]: #
+[//]: # (Domain: example.com)
+[//]: #
+[//]: # (Be sure to remove the parenthesis and comment marker. If you are only)
+[//]: # (reporting an issue about "one.example.com", then the line below should)
+[//]: # (be:)
+[//]: #
+[//]: # (Domain: one.example.com)
+[//]: #
+[//]: # (Only include one top-level domain. If you have more than one top-level)
+[//]: # (domain to report, such as both "example.com" and "example.org", open a)
+[//]: # (new issue for each top-level domain.)
+
+Domain:
+
+[//]: # (Include any other relevant information below. Thank you again for)
+[//]: # (helping to improve HTTPS Everywhere.)
diff --git a/.github/ISSUE_TEMPLATE/ruleset-issue.md b/.github/ISSUE_TEMPLATE/ruleset-issue.md
new file mode 100644
index 000000000000..7b1217b52b42
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/ruleset-issue.md
@@ -0,0 +1,22 @@
+---
+name: Ruleset/website issue report
+about: Report a issue about a ruleset/website
+---
+
+[//]: # (Thank you for reporting an issue to HTTPS Everywhere.)
+[//]: # (We welcome input from users on improving this project.)
+[//]: #
+[//]: # (Please help us by following this issue template.)
+[//]: # (You can delete all blank lines and all lines starting)
+[//]: # (with the comment marker, such as this one.)
+[//]: #
+
+Type: ruleset/website issue
+
+[//]: # (Uncomment and fill the domain bellow if you belive that yet another)
+[//]: # (domain should be added to the existing ruleset.)
+
+[//]: # Domain:
+
+[//]: # (Include any other relevant information below. Thank you again for)
+[//]: # (helping to improve HTTPS Everywhere.)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 000000000000..89917ee4ceb8
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,20 @@
+version: 2
+updates:
+ # Maintain dependencies for npm
+ - package-ecosystem: "npm"
+ directory: "/chromium/"
+ schedule:
+ interval: "weekly"
+ day: "monday"
+ time: "06:00"
+ assignees:
+ - "zoracon"
+ commit-message:
+ prefix: "npmauto"
+ labels:
+ - "dependencies"
+ pull-request-branch-name:
+ separator: "-"
+ reviewers:
+ - "zoracon"
+ versioning-strategy: widen
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 000000000000..ef2f1688f71e
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,9 @@
+Fixes #(issue)
+
+## Type of change
+
+- [ ] Bug fix (non-breaking change which fixes an issue)
+- [ ] New feature (non-breaking change which adds functionality)
+- [ ] Refactoring existing code
+- [ ] New Ruleset
+- [ ] Existing Ruleset
diff --git a/.gitignore b/.gitignore
index 252f5c330084..104e25eb17f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,7 +11,7 @@ chromium.pem
from-preloads/
pkg/
src/chrome/content/rules/default.rulesets
-src/chrome/content/rulesets.json
+src/chrome/content/rules/default.rulesets.json
src/defaults/rulesets.sqlite
test_profile/
tokenkeys.py*
diff --git a/.gitmodules b/.gitmodules
index 049bbbed911c..1919060dd62c 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2,3 +2,7 @@
path = translations
url = https://git.torproject.org/translation.git
branch = https_everywhere
+
+[submodule "lib-wasm"]
+ path = lib-wasm
+ url = https://github.com/EFForg/https-everywhere-lib-wasm.git
diff --git a/.travis.yml b/.travis.yml
index 3fda2a067fb8..f028c3a3915c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,28 +1,29 @@
sudo: required
os: linux
-dist: trusty
+dist: bionic
language: python
python: 3.6
-group: deprecated-2017Q4
+group: bionic
services:
- docker
+ - xvfb
matrix:
fast_finish: true
include:
- env: TEST="lint"
language: node_js
node_js:
- - "node"
+ - "lts/*"
- env: TEST="unittests"
language: node_js
- node_js: node
- - "node"
+ node_js:
+ - "lts/*"
- env: TEST="validations"
- env: TEST="fetch"
- env: TEST="preloaded"
- - addons:
- chrome: beta
- env: TEST="chrome beta" BROWSER=google-chrome-beta
+ # - addons:
+ # chrome: beta
+ # env: TEST="chrome beta" BROWSER=google-chrome-beta
- addons:
chrome: stable
env: TEST="chrome stable" BROWSER=google-chrome-stable
@@ -32,8 +33,5 @@ matrix:
- addons:
firefox: latest-esr
env: TEST="firefox esr" BROWSER=firefox
-before_install:
- - export DISPLAY=:99.0
- - sh -e /etc/init.d/xvfb start
before_script: travis_retry test/setup_travis.sh
script: . test/run_travis.sh
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000000..f5636ad09567
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1 @@
+This project is governed by [EFF's Public Projects Code of Conduct](https://www.eff.org/pages/eppcode).
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3bef3a56544f..3ddaf4439e1d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,41 +1,51 @@
# Table of Contents
-* [Welcome!](#welcome)
- * [HTTPS Everywhere Source Code Layout](#https-everywhere-source-code-layout)
- * [Submitting Changes](#submitting-changes)
-* [Contributing Rulesets](#contributing-rulesets)
- * [General Info](#general-info)
- * [New Rulesets](#new-rulesets)
- * [Minimum Requirements for a Ruleset PR](#minimum-requirements-for-a-ruleset-pr)
- * [Testing](#testing)
- * [Ruleset Style Guide](#ruleset-style-guide)
- * [Motivation](#motivation)
- * [Indentation & Misc Stylistic Conventions](#indentation--misc-stylistic-conventions)
- * [Wildcards in Targets](#wildcards-in-targets)
- * [Left-Wildcards](#left-wildcards)
- * [Edge-Case: Right-Wildcards](#edge-case-right-wildcards)
- * [Complicated Regex in Rules](#complicated-regex-in-rules)
- * [Enumerating Subdomains](#enumerating-subdomains)
- * [Target Ordering](#target-ordering)
- * [Rule Ordering](#rule-ordering)
- * [Non-working hosts](#non-working-hosts)
- * [Ruleset Names](#ruleset-names)
- * [Filenames](#filenames)
- * [Cross-referencing Rulesets](#cross-referencing-rulesets)
- * [Regex Conventions](#regex-conventions)
- * [Snapping Redirects](#snapping-redirects)
- * [Example: Ruleset before style guidelines are applied](#example-ruleset-before-style-guidelines-are-applied)
- * [Example: Ruleset after style guidelines are applied, with test URLs](#example-ruleset-after-style-guidelines-are-applied-with-test-urls)
- * [Removal of Rules](#removal-of-rules)
- * [Regular Rules](#regular-rules)
- * [HSTS Preloaded Rules](#hsts-preloaded-rules)
-* [Contributing Code](#contributing-code)
-* [Contributing Documentation](#contributing-documentation)
-* [Contributing Translations](#contributing-translations)
-
-* * *
+## General Info
-# Welcome!
+**On May 31st, 2021 we will end manual additions to the rulesets.** Please see [this explanation on the future of HTTPSE Rulesets.](https://github.com/EFForg/https-everywhere/blob/master/docs/adrs/duckduckgo-smarter-encryption.md)
+
+We will continue accept requests on rulesets already in our list that are causing significant breakage for users through the summer. However, in autumn, we will begin the plan to ultimately move our crowdsourced rulesets out of the extension in favor of the Smarter Encryption Ruleset.
+
+- [Table of Contents](#table-of-contents)
+- [Welcome](#welcome)
+ - [HTTPS Everywhere Source Code Layout](#https-everywhere-source-code-layout)
+ - [Install Dependencies and Test Build](#install-dependencies-and-test-build)
+ - [Precommit Testing](#precommit-testing)
+ - [Testing](#testing)
+ - [Quickly Testing a Ruleset](#quickly-testing-a-ruleset)
+ - [Coverage](#coverage)
+ - [Submitting Changes](#submitting-changes)
+ - [Contributing Rulesets](#contributing-rulesets)
+ - [General Info](#general-info)
+ - [New Rulesets](#new-rulesets)
+ - [Minimum Requirements for a Ruleset PR](#minimum-requirements-for-a-ruleset-pr)
+ - [Ruleset Style Guide](#ruleset-style-guide)
+ - [Motivation](#motivation)
+ - [Indentation & Misc Stylistic Conventions](#indentation--misc-stylistic-conventions)
+ - [Wildcards in Targets](#wildcards-in-targets)
+ - [Left-Wildcards](#left-wildcards)
+ - [Edge-Case: Right-Wildcards](#edge-case-right-wildcards)
+ - [Complicated Regex in Rules](#complicated-regex-in-rules)
+ - [Enumerating Subdomains](#enumerating-subdomains)
+ - [Target Ordering](#target-ordering)
+ - [Rule Ordering](#rule-ordering)
+ - [Non-working hosts](#non-working-hosts)
+ - [Ruleset Names](#ruleset-names)
+ - [Filenames](#filenames)
+ - [Cross-referencing Rulesets](#cross-referencing-rulesets)
+ - [Regex Conventions](#regex-conventions)
+ - [Snapping Redirects](#snapping-redirects)
+ - [Example: Ruleset before style guidelines are applied](#example-ruleset-before-style-guidelines-are-applied)
+ - [Example: Ruleset after style guidelines are applied, with test URLs](#example-ruleset-after-style-guidelines-are-applied-with-test-urls)
+ - [Removal of Rules](#removal-of-rules)
+ - [Regular Rules](#regular-rules)
+ - [HSTS Preloaded Rules](#hsts-preloaded-rules)
+ - [Contributing Code](#contributing-code)
+ - [Contributing Documentation](#contributing-documentation)
+ - [Pull Requests from Deleted Accounts](#pull-requests-from-deleted-accounts)
+ - [Contributing Translations](#contributing-translations)
+
+# Welcome
Welcome, and thank you for your interest in contributing to HTTPS Everywhere! HTTPS Everywhere depends on the open source community for its continued success, so any contribution is appreciated.
@@ -43,12 +53,13 @@ One of the things that makes it easy to contribute to HTTPS Everywhere is that y
If you want to have the greatest impact, however, you can help be a ruleset maintainer. Ruleset maintainers are trusted volunteers who examine rulesets contributed by others and work with them to ensure that these rulesets work properly and are styled correctly before they're merged in. While we currently have a couple of extremely dedicated and extremely proficient ruleset maintainers, the backlog of sites to add to HTTPS Everywhere just keeps growing, and they need help! If you would like to volunteer to become one, the best thing to do is to build trust in your work by monitoring the repository, contributing pull requests, and commenting on issues that interest you. Then you can contact us at https-everywhere-rules-owner [at] eff <dot> org expressing your interest in helping out.
-If you get stuck we have two publicly-archived mailing lists: the https-everywhere list (https://lists.eff.org/mailman/listinfo/https-everywhere) is for discussing the project as a whole, and the https-everywhere-rulesets list (https://lists.eff.org/mailman/listinfo/https-everywhere-rules) is for discussing the `rulesets` and their contents, including patches and git pull requests.
+If you get stuck we have two publicly-archived mailing lists: the [https-everywhere list](https://lists.eff.org/mailman/listinfo/https-everywhere) is for discussing the project as a whole, and the [https-everywhere-rulesets list](https://lists.eff.org/mailman/listinfo/https-everywhere-rules) is for discussing the `rulesets` and their contents, including patches and git pull requests.
You can also find more information on about HTTPS Everywhere on our [FAQ](https://www.eff.org/https-everywhere/faq) page.
-Thanks again, and we look forward to your contributions!
+Also, please remember that this project is governed by [EFF's Public Projects Code of Conduct](https://www.eff.org/pages/eppcode).
+Thanks again, and we look forward to your contributions!
## HTTPS Everywhere Source Code Layout
@@ -62,37 +73,98 @@ The utilities ([`utils`](utils) top-level path) include scripts that build the e
Tests are performed in headless browsers and located in the [`test`](test) top-level path. These are written in Python, and some of the wrappers for these tests are in shell scripts.
+Source Tree:
+
+ chromium/ WebExtension source code (for Firefox & Chromium/chrome)
+ chromium/external External dependencies
+ chromium/test Unit tests
+
+ rules/ Symbolic link to src/chrome/content/rules
+
+ src/chrome/content/rules Ruleset files live here
+
+ test/ Travis unit test source code live here
+
+ utils/ Various utilities (includes some Travis test source)
+
+## Install Dependencies and Test Build
+
+Get the packages you need and install a git hook to run tests before push:
+
+ bash install-dev-dependencies.sh
+
+Run the ruleset validations and browser tests:
+
+ bash test.sh
+
+Run the latest code and rulesets in a standalone Firefox profile:
+
+ bash test/firefox.sh --justrun
+
+Run the latest code and rulesets in a standalone profile for a specific version of Firefox:
+
+ FIREFOX=/path/to/firefox bash test/firefox.sh --justrun
+
+Run the latest code and rulesets in a standalone Chromium profile:
+
+ bash test/chromium.sh --justrun
+
+Run the latest code and rulesets in a standalone Tor Browser profile:
+
+ bash test/tor-browser.sh path_to_tor_browser.tar.xz
+
+Build the Firefox (.xpi) & Chromium (.crx) extensions:
+
+ bash make.sh
+
+Both of the build commands store their output under pkg/.
+
+## Precommit Testing
+
+One can run the available test suites automatically by enabling the precommit
+hook provided with:
+
+ ln -s ../../hooks/precommit .git/hooks/pre-commit
+
+## Testing
+
+### Quickly Testing a Ruleset
+
+1. Open a version of the Firefox or Chrome browser without HTTPS Everywhere loaded to the HTTP endpoint
+
+2. From your working ruleset branch, test with running `bash test/firefox.sh --justrun` or `bash test/chromium.sh --justrun` to open a fresh profile with the extension loaded and click around and compare the look and functionality of both sites. If something fails to load or looks strange, you may be able to debug the problem by opening the network tab of your browser debugging tool. Modify the `ruleset` until you get it in a good state - you'll have to re-run the HTTPS Everywhere-equipped browser upon each change.
+
+### Coverage
+
+Please reference [HTTPS Ruleset Checker](https://github.com/EFForg/https-everywhere/blob/master/test/rules/README.md) to properly test rulesets against our tests before sending a pull request.
+
## Submitting Changes
To submit changes, open a pull request from our [GitHub repository](https://github.com/efforg/https-everywhere).
HTTPS Everywhere is maintained by a limited set of staff and volunteers. Please be mindful that we may take a while before we're able to review your contributions.
-* * *
-
-# Contributing Rulesets
-
-## General Info
+## Contributing Rulesets
Thanks for your interest in contributing to the HTTPS Everywhere `rulesets`! There's just a few things you should know before jumping in. First some terminology, which will help you understand how exactly `rulesets` are structured and what each one contains:
-- `ruleset`: a scope in which `rules`, `targets`, and `tests` are contained. `rulesets` are usually named after the entity which controls the group of `targets` contained in it. There is one `ruleset` per XML file within the `src/chrome/content/rules` directory.
-- `target`: a Fully Qualified Domain Name which may include a wildcard specified by `*.` on the left side, which `rules` are applied to. There may be many `targets` within any given `ruleset`.
-- `rule`: a specific regular expression rewrite that is applied for all matching `targets` within the same `ruleset`. There may be many `rules` within any given `ruleset`.
-- `test`: a URL for which a request is made to ensure that the rewrite is working properly. There may be many `tests` within any given `ruleset`.
+* `ruleset`: a scope in which `rules`, `targets`, and `tests` are contained. `rulesets` are usually named after the entity which controls the group of `targets` contained in it. There is one `ruleset` per XML file within the `src/chrome/content/rules` directory.
+* `target`: a Fully Qualified Domain Name which may include a wildcard specified by `*.` on the left side, which `rules` are applied to. There may be many `targets` within any given `ruleset`.
+* `rule`: a specific regular expression rewrite that is applied for all matching `targets` within the same `ruleset`. There may be many `rules` within any given `ruleset`.
+* `test`: a URL for which a request is made to ensure that the rewrite is working properly. There may be many `tests` within any given `ruleset`.
```xml
-
+
-
+
-
+
```
@@ -100,18 +172,20 @@ HTTPS Everywhere includes tens of thousands of `rulesets`. Any one of these sit
Some `rulesets` have the attribute `platform="mixedcontent"`. These `rulesets` cause problems in browsers that enable active mixed-content (loading insecure resources in a secure page) blocking. When browsers started enforcing active mixed-content blocking, some HTTPS sites started to break. That's why we introduced this tag - it disables those `rulesets` for browsers blocking active mixed content. It is likely that many of these sites have fixed this historical problem, so we particularly encourage `ruleset` contributors to fix these `rulesets` first:
- git grep -i mixedcontent src/chrome/content/rules
+ git grep -i mixedcontent src/chrome/content/rules
-## New Rulesets
+### New Rulesets
If you want to create new `rulesets` to submit to us, we expect them to be in the `src/chrome/content/rules` directory. That directory also contains a useful script, `make-trivial-rule`, to create a simple `ruleset` for a specified domain. There is also a script in `test/validations/special/run.py`, to check all the pending `rulesets` for several common errors and oversights. For example, if you wanted to make a `ruleset` for the `example.com` domain, you could run:
-```
+
+```bash
cd src/chrome/content/rules
bash ./make-trivial-rule example.com
```
+
This would create `Example.com.xml`, which you could then take a look at and edit based on your knowledge of any specific URLs at `example.com` that do or don't work in HTTPS. Please have a look at our Ruleset Style Guide below, where you can find useful tips about finding more subdomains. Our goal is to have as many subdomains covered as we can find.
-## Minimum Requirements for a Ruleset PR
+### Minimum Requirements for a Ruleset PR
There are several volunteers to HTTPS Everywhere who have graciously dedicated their time to look at the `ruleset` contributions and work with contributors to ensure quality of the pull requests before merging. It is typical for there to be several back-and-forth communications with these `ruleset` maintainers before a PR is in a good shape to merge. Please be patient and respectful, the maintainers are donating their time for no benefit other than the satisfaction of making the web more secure. They are under no obligation to merge your request, and may reject it if it is impossible to ensure quality. You can identify these volunteers by looking for the "Collaborator" identifier in their comments on HTTPS Everywhere issues and pull requests.
@@ -119,12 +193,6 @@ In the back-and-forth process of getting the `ruleset` in good shape, there may
We prefer small, granular changes to the rulesets. Not only are these easier to test and review, this results in cleaner commits.
-## Testing
-
-A general workflow for testing sites that provide both HTTP and HTTPS follows. Open a version of the browser of your choice without HTTPS Everywhere loaded to the HTTP endpoint, alongside the browser with the latest code and rulesets for HTTPS Everywhere loaded to the HTTPS endpoint (as described in [README.md](README.md).) Click around and compare the look and functionality of both sites.
-
-If something fails to load or looks strange, you may be able to debug the problem by opening the network tab of your browser debugging tool. Modify the `ruleset` until you get it in a good state - you'll have to re-run the HTTPS Everywhere-equipped browser upon each change.
-
## Ruleset Style Guide
### Motivation
@@ -170,19 +238,19 @@ In general, avoid using open-ended regex in rules. In certain cases, open-ended
Examples:
* Rulesets with a lot of domains that we can catch with a simple regex that would be tedious and error-prone to list individually, like [`360.cn.xml`](https://github.com/EFForg/https-everywhere/blob/9698e64a2de7cf37509ab13ba9dcfd5bd4f84a95/src/chrome/content/rules/360.cn.xml#L98-L103)
-* CDNs with an arbitrarily large number of subdomains, like https://github.com/EFForg/https-everywhere/pull/7484#issuecomment-262852427 .
+* CDNs with an arbitrarily large number of subdomains ([example](https://github.com/EFForg/https-everywhere/pull/7484#issuecomment-262852427)).
### Enumerating Subdomains
If you're not sure what subdomains might exist, you can install the `Sublist3r` tool:
- git clone https://github.com/aboul3la/Sublist3r.git
- cd Sublist3r
- sudo pip install -r requirements.txt # or use virtualenv...
+ git clone https://github.com/aboul3la/Sublist3r.git
+ cd Sublist3r
+ sudo pip install -r requirements.txt # or use virtualenv...
Then you can to enumerate the list of subdomains:
- python sublist3r.py -d example.com -e Baidu,Yahoo,Google,Bing,Ask,Netcraft,Virustotal,SSL
+ python sublist3r.py -d example.com -e Baidu,Yahoo,Google,Bing,Ask,Netcraft,Virustotal,SSL
Alternatively, you can iteratively use Google queries and enumerate the list of results like such:
@@ -196,15 +264,15 @@ Alternatively, you can iteratively use Google queries and enumerate the list of
In all cases where there is a list of domains, sort them in alphabetical order starting from the top level domain at the right reading left, moving ^ and www to the top of their group. For example:
- example.com
- www.example.com
- a.example.com
- www.a.example.com
- b.a.example.com
- b.example.com
- example.net
- www.example.net
- a.example.net
+ example.com
+ www.example.com
+ a.example.com
+ www.a.example.com
+ b.a.example.com
+ b.example.com
+ example.net
+ www.example.net
+ a.example.net
### Rule Ordering
@@ -217,23 +285,23 @@ It is useful to list hosts that do not work in the comments of a `ruleset`. Thi
For easy reading, please avoid using UTF characters unless in the rare instances that they are part of the hostname itself.
Example:
+
```xml
```
@@ -278,17 +346,17 @@ Prefer capturing groups `(www\.)?` over non-capturing `(?:www\.)?`. The non-capt
### Snapping Redirects
-Avoid snapping redirects. For instance, if https://foo.fm serves HTTPS correctly, but redirects to https://foo.com, it's tempting to rewrite foo.fm to foo.com, to save users the latency of the redirect. However, such rulesets are less obviously correct and require more scrutiny. And the redirect can go out of date and cause problems. HTTPS Everywhere rulesets should change requests the minimum amount necessary to ensure a secure connection.
+Avoid snapping redirects. For instance, if `https://foo.fm` serves HTTPS correctly, but redirects to `https://foo.com`, it's tempting to rewrite `foo.fm` to `foo.com`, to save users the latency of the redirect. However, such rulesets are less obviously correct and require more scrutiny. And the redirect can go out of date and cause problems. HTTPS Everywhere rulesets should change requests the minimum amount necessary to ensure a secure connection.
### Example: Ruleset before style guidelines are applied
```xml
-
-
+
+
-
+
```
@@ -309,8 +377,7 @@ Avoid snapping redirects. For instance, if https://foo.fm serves HTTPS correctly
-
+
```
@@ -326,59 +393,45 @@ In `utils` we have a tool called `hsts-prune` which removes `targets` from rules
> Let `included domain` denote either a `target`, or a parent of a `target`. Let `supported browsers` include the ESR, Dev, and Stable releases of Firefox, and the Stable release of Chromium. If `included domain` is a parent of the `target`, the `included domain` must be present in the HSTS preload list for all `supported browsers` with the relevant flag which denotes inclusion of subdomains set to `true`. If `included domain` is the `target` itself, it must be included the HSTS preload list for all `supported browsers`. Additionally, if the http endpoint of the `target` exists, it must issue a 3XX redirect to the https endpoint for that target. Additionally, the https endpoint for the `target` must deliver a `Strict-Transport-Security` header with the following directives present:
>
-> - `max-age` >= 10886400
-> - `includeSubDomains`
-> - `preload`
+> * `max-age` >= 31536000
+> * `includeSubDomains`
+> * `preload`
>
> If all the above conditions are met, a contributor may remove the `target` from the HTTPS Everywhere rulesets. If all targets are removed for a ruleset, the contributor is advised to remove the ruleset file itself. The ruleset `rule` and `test` tags may need to be modified in order to pass the ruleset coverage test.
Every new pull request automatically has the `hsts-prune` utility applied to it as part of the continual integration process. If a new PR introduces a `target` which is preloaded, it will fail the CI test suite. See:
-- `.travis.yml`
-- `test/run_travis.sh`
+* `.travis.yml`
+* `test/run_travis.sh`
-* * *
-
-# Contributing Code
+## Contributing Code
In addition to `ruleset` contributions, we also encourage code contributions to HTTPS Everywhere. There are a few considerations to keep in mind when contributing code.
Officially supported browsers:
-- Firefox Stable
-- Firefox ESR
-- Chromium Stable
+* Firefox Stable
+* Firefox ESR
+* Chromium Stable
We also informally support the Opera browser, but do not have tooling around testing Opera. Firefox ESR is supported because this is what the [Tor Browser](https://www.torproject.org/projects/torbrowser.html.en), which includes HTTPS Everywhere, is built upon. For the test commands, refer to [README.md](README.md).
-The current extension maintainer is @Hainish. You can tag him for PRs which involve the core codebase.
+The current extension maintainer is [@zoracon](https://github.com/zoracon). You can tag them for PRs which involve the core codebase.
Several of our utilities and our full test suite is written in Python. Eventually we would like the whole codebase to be standardized as JavaScript. If you are so inclined, it would be helpful to rewrite the tooling and tests into JavaScript while maintaining the functionality.
-* * *
-
-# Contributing Documentation
+## Contributing Documentation
Standalone documentation should be written in [Markdown](https://en.wikipedia.org/wiki/Markdown) that follows the [Google style guide](https://github.com/google/styleguide/blob/gh-pages/docguide/style.md). If you are updating existing documentation that does not follow the Google style guide, then you should follow the style of the file you are updating.
* * *
-# Pull Requests from Deleted Accounts
+## Pull Requests from Deleted Accounts
Sometimes a contributor will [delete their GitHub account](https://help.github.com/articles/deleting-your-user-account/) after submitting a pull request, resulting in the pull request being associated with the [Ghost user (@ghost)](https://github.com/ghost). These @ghost pull requests can cause problems for HTTPS Everywhere maintainers, leaving questions unanswered and closing off the possibility of receiving maintainer feedback to solicit clarification or request changes.
We ask that if you want to delete your GitHub account, you either close your HTTPS Everywhere pull requests before you delete your account, or wait to delete your account until we merge your pull requests. Otherwise, maintainers are free to close @ghost pull requests without any comment.
-* * *
-
-# Contributing Translations
-
-HTTPS Everywhere translations are handled through Transifex. The easiest way to help with translations is to [create a Transifex account](https://www.transifex.com/signup/) if you don't already have one. Then log into your account and click "Explore", then search for "Tor Project", and click on The Tor Project. Then choose the language you plan to translate into, click on the name of that language, and then click "Join team" and "Go" to accept joining the translation team for your language.
-
-Then, in the Tor Project resources list, find and click the link for the file
+## Contributing Translations
- HTTPS Everywhere - https-everywhere.dtd
-
-and choose "Translate now" to enter the translation interface.
-
-* * *
+We are reviewing our process around translations and currently discussing ways to improve. Translations are still processed under the same entity and those who have an account already, do not need to take action at this time. Thank you for your contributions.
diff --git a/LICENSE.txt b/LICENSE.txt
index 454ba6460dab..7c7a3bde0e95 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,12 +1,15 @@
HTTPS Everywhere:
-Copyright © 2010-2017 Electronic Frontier Foundation and others
+Copyright © 2010-2021 Electronic Frontier Foundation and others
Licensed GPL v2+
HTTPS Everywhere Rulesets (src/chrome/content/rules):
To the extent copyright applies to the rulesets, they can be used according to GPL v2 or later.
+The DuckDuckGo Smarter Encryption list, utilized by HTTPS Everywhere at https://www.https-rulesets.org/ddg, is publicly available under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0. International license.
+If you'd like to license the list for commercial use, please reach out to: https://help.duckduckgo.com/duckduckgo-help-pages/company/contact-us/
+
Issue Format Bot (utils/issue-format-bot/*):
Copyright © 2017 AJ Jordan, AGPLv3+
-The build system incorporates code from Python 3.6
+The build system incorporates code from Python 3.6 and Python 3 respectively
Copyright © 2001-2018 Python Software Foundation; All Rights Reserved
diff --git a/README.md b/README.md
index 9e10be63cde6..d3255879024e 100644
--- a/README.md
+++ b/README.md
@@ -1,69 +1,23 @@
-[HTTPS Everywhere](https://www.eff.org/https-everywhere) [](https://travis-ci.org/EFForg/https-everywhere)
+[](https://travis-ci.com/EFForg/https-everywhere)
[](https://coveralls.io/github/EFForg/https-everywhere?branch=master)
-================
-Getting Started
----------------
+# Update on HTTPS Everywhere
+⚠️This project is no longer being maintained or updated. Please uninstall and direct users to the advice below to switch to HTTPS by default natively.
-Get the packages you need and install a git hook to run tests before push:
+You no longer need HTTPS Everywhere to set HTTPS by default! Major browsers now offer native support for an HTTPS only mode.
+Find out how to turn it on [here](https://www.eff.org/https-everywhere/set-https-default-your-browser).
- bash install-dev-dependencies.sh
+This extension will be sunset by January 2023.
-Run the ruleset validations and browser tests:
- bash test.sh
+# Getting Started With HTTPS Everywhere
-Run the latest code and rulesets in a standalone Firefox profile:
+HTTPS Everywhere is a Firefox, Chrome, and Opera extension that encrypts your communications with many major websites, making your browsing more secure. Encrypt the web: [Install HTTPS Everywhere today](https://www.eff.org/https-everywhere).
- bash test/firefox.sh --justrun
+## For Users
-Run the latest code and rulesets in a standalone profile for a specific version of Firefox:
+Want to install or uninstall HTTPS Everywhere? Have questions? [View this guide](https://www.eff.org/https-everywhere) for installation and here for [FAQs](https://www.eff.org/https-everywhere/faq).
- FIREFOX=/path/to/firefox bash test/firefox.sh --justrun
+## For Website Owners and Maintainers
-Run the latest code and rulesets in a standalone Chromium profile:
-
- bash test/chromium.sh --justrun
-
-Run the latest code and rulesets in a standalone Tor Browser profile:
-
- bash test/tor-browser.sh path_to_tor_browser.tar.xz
-
-Build the Firefox (.xpi) & Chromium (.crx) extensions:
-
- bash make.sh
-
-Both of the build commands store their output under pkg/.
-
-Precommit Testing
------------------
-
-One can run the available test suites automatically by enabling the precommit
-hook provided with:
-
- ln -s ../../hooks/precommit .git/hooks/pre-commit
-
-Source Tree
------------
-
-This is the source tree for HTTPS Everywhere for Firefox and Chrome.
-
-Important directories you might want to know about
-
-
- chromium/ WebExtension source code (for Firefox & Chromium/chrome)
- chromium/external External dependencies
- chromium/test Unit tests
-
- rules/ Symbolic link to src/chrome/content/rules
-
- src/chrome/content/rules Ruleset files live here
-
- test/ Travis unit test source code live here
-
- utils/ Various utilities (includes some Travis test source)
-
-Hacking on the Source Code
---------------------------
-
-Please refer to our [contributing](CONTRIBUTING.md) document to contribute to the project.
+Want to deploy HTTPS on your site? [View this guide](https://www.eff.org/https-everywhere/deploying-https).
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 000000000000..186e6892ac86
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,17 @@
+# Security Policy
+
+## Supported Versions
+
+Use this section to tell people about which versions of your project are
+currently being supported with security updates.
+
+| Browser | Supported |
+| --------------- | ------------------ |
+| Firefox | :white_check_mark: |
+| Firefox Android | :white_check_mark: |
+| Chrome | :white_check_mark: |
+| Opera | :white_check_mark: |
+
+## Reporting a Vulnerability
+
+https://www.eff.org/security
diff --git a/browser-dist/README.md b/browser-dist/README.md
new file mode 100644
index 000000000000..47385bff828a
--- /dev/null
+++ b/browser-dist/README.md
@@ -0,0 +1,32 @@
+# Browser Distribution Special Cases
+
+## Edge
+
+Case:
+Edge does not accept CRX files for direct upload to store.
+
+Work around: `edge.sh`
+
+## Opera
+
+Case:
+Opera does not accept `default.rulesets` due to strict MIME type restriction
+
+In order to not disrupt many downstream channels, we are building a separate CRX file for Opera for now.
+
+Work around: `opera.sh`
+
+## Build process
+
+These scripts are normally ran after main build and deployment is finished. The reason being we want a confirmed CRX file upload to Chrome to build the Edge zip and Opera crx distributions on.
+
+## CRX Verification of Files before Upload
+
+Install Node Package for CRX Verification via NPM
+`[sudo] npm -g i crx3-utils`
+
+### Verify CRX file
+
+1. `crx3-info rsa 0 < $crx > public.pem`
+2. `crx3-verify rsa 0 public.pem < $crx`
+3. `echo "CRX verified"`
diff --git a/browser-dist/edge.sh b/browser-dist/edge.sh
new file mode 100755
index 000000000000..d8d62cd4a259
--- /dev/null
+++ b/browser-dist/edge.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# Written for transparency and reproducibility on Edge upload
+# See browser-dist.md for more info
+
+VERSION=`python3 -c "import json ; print(json.loads(open('../chromium/manifest.json').read())['version'])"`
+crx_cws="../pkg/https-everywhere-$VERSION-cws.crx"
+crx_eff="../pkg/https-everywhere-$VERSION-eff.crx"
+
+crx3-info rsa 0 < $crx_cws > public.pem
+crx3-verify rsa 0 public.pem < $crx_cws
+echo "CRX verified"
+
+#Build Edge Zip File
+echo "Building Edge Zip"
+crx3-info < $crx_eff | awk '/^header/ {print $2}' \
+ | xargs -I% dd if=$crx_eff iflag=skip_bytes skip=% > https-everywhere-$VERSION-edge.zip
+
+echo >&2 "Edge zip package has sha256sum: `openssl dgst -sha256 -binary "https-everywhere-$VERSION-edge.zip" | xxd -p`"
+
+mv https-everywhere-$VERSION-edge.zip ../pkg/https-everywhere-$VERSION-edge.zip
+
+echo "Created pkg/https-everywhere-$VERSION-edge.zip"
+
+#Now remove unneeded pem file
+rm public.pem
\ No newline at end of file
diff --git a/browser-dist/opera.sh b/browser-dist/opera.sh
new file mode 100755
index 000000000000..261b8ad41b6c
--- /dev/null
+++ b/browser-dist/opera.sh
@@ -0,0 +1,168 @@
+#!/usr/bin/env bash
+
+# Build an HTTPS Everywhere Opera CRX Distribution
+# Written for transparency and reproducibility on Opera upload
+# See browser-dist.md for more info
+
+# To build the current state of the tree:
+#
+# ./browser-dist-opera.sh
+#
+# To build a particular tagged release:
+#
+# ./browser-dist-opera.sh
+#
+# eg:
+#
+# ./browser-dist-opera.sh 2017.8.15
+#
+# Note that .crx files must be signed; this script makes you a
+# "dummy-chromium.pem" private key for you to sign your own local releases,
+# but these .crx files won't detect and upgrade to official HTTPS Everywhere
+# releases signed by EFF :/. We should find a more elegant arrangement.
+
+! getopt --test > /dev/null
+if [[ ${PIPESTATUS[0]} -ne 4 ]]; then
+ echo 'I’m sorry, `getopt --test` failed in this environment.'
+ exit 1
+fi
+
+OPTIONS=eck:
+LONGOPTS=remove-extension-update,remove-update-channels,key:
+! PARSED=$(getopt --options=$OPTIONS --longoptions=$LONGOPTS --name "$0" -- "$@")
+if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
+ # e.g. return value is 1
+ # then getopt has complained about wrong arguments to stdout
+ exit 2
+fi
+
+# read getopt’s output this way to handle the quoting right:
+eval set -- "$PARSED"
+
+REMOVE_EXTENSION_UPDATE=false
+REMOVE_UPDATE_CHANNELS=false
+KEY=$(pwd)/dummy-chromium.pem
+while true; do
+ case "$1" in
+ -e|--remove-extension-update)
+ REMOVE_EXTENSION_UPDATE=true
+ shift
+ ;;
+ -c|--remove-update-channels)
+ REMOVE_UPDATE_CHANNELS=true
+ shift
+ ;;
+ -k|--key)
+ KEY="$2"
+ shift 2
+ ;;
+ --)
+ shift
+ break
+ ;;
+ *)
+ echo "Programming error"
+ exit 3
+ ;;
+ esac
+done
+
+if [ "${KEY:0:1}" != "/" ]; then
+ echo "Key must be specified as an absolute path."
+ exit 4
+fi
+
+cd $(dirname $0)
+
+if [ -n "$1" ]; then
+ BRANCH=`git branch | head -n 1 | cut -d \ -f 2-`
+ SUBDIR=checkout
+ [ -d $SUBDIR ] || mkdir $SUBDIR
+ cp -r -f -a .git $SUBDIR
+ cd $SUBDIR
+ git reset --hard "$1"
+ git submodule update --recursive -f
+fi
+
+VERSION=`python3 -c "import json ; print(json.loads(open('../chromium/manifest.json').read())['version'])"`
+
+echo "Building version" $VERSION
+
+[ -d pkg ] || mkdir -p ../pkg
+[ -e pkg/crx-opera ] && rm -rf ../pkg/crx-opera
+
+# Clean up obsolete ruleset databases, just in case they still exist.
+rm -f src/chrome/content/rules/default.rulesets src/defaults/rulesets.sqlite
+
+mkdir -p ../pkg/crx-opera/rules
+cd ../pkg/crx-opera
+cp -a ../../chromium/* ./
+# Turn the Firefox translations into the appropriate Chrome format:
+rm -rf _locales/
+mkdir _locales/
+python3 ../../utils/chromium-translations.py ../../translations/ _locales/
+python3 ../../utils/chromium-translations.py ../../src/chrome/locale/ _locales/
+do_not_ship="*.py *.xml"
+rm -f $do_not_ship
+
+mkdir wasm
+cp ../../lib-wasm/pkg/*.wasm wasm
+cp ../../lib-wasm/pkg/*.js wasm
+
+cd ../..
+
+python3 ./utils/merge-rulesets.py || exit 5
+
+cp src/chrome/content/rules/default.rulesets.json pkg/crx-opera/rules/default.rulesets.json
+
+sed -i -e "s/VERSION/$VERSION/g" pkg/crx-opera/manifest.json
+
+for x in `cat .build_exclusions`; do
+ rm -rf pkg/crx-opera/$x
+done
+
+#Create Opera CRX caveat
+cd pkg/crx-opera
+sed -i 's/rules\/default.rulesets/rules\/default.rulesets.json/g' background-scripts/update.js
+cd ../..
+
+# Remove the 'applications' manifest key from the crx version of the extension, change the 'author' string to a hash, and add the "update_url" manifest key
+# "update_url" needs to be present to avoid problems reported in https://bugs.chromium.org/p/chromium/issues/detail?id=805755
+python3 -c "import json; m=json.loads(open('pkg/crx-opera/manifest.json').read()); m['author']={'email': 'eff.software.projects@gmail.com'}; del m['applications']; open('pkg/crx-opera/manifest.json','w').write(json.dumps(m,indent=4,sort_keys=True))"
+
+# If the --remove-update-channels flag is set, remove all out-of-band update channels
+if $REMOVE_UPDATE_CHANNELS; then
+ echo "Flag --remove-update-channels specified. Removing all out-of-band update channels."
+ echo "require.scopes.update_channels.update_channels = [];" >> pkg/crx-opera/background-scripts/update_channels.js
+fi
+
+if [ -n "$BRANCH" ] ; then
+ crx_opera="pkg/https-everywhere-$VERSION-opera.crx"
+else
+ crx_opera="pkg/https-everywhere-$VERSION-pre-opera.crx"
+fi
+if ! [ -f "$KEY" ] ; then
+ echo "Making a dummy signing key for local build purposes"
+ openssl genrsa -out /tmp/dummy-chromium.pem 768
+ openssl pkcs8 -topk8 -nocrypt -in /tmp/dummy-chromium.pem -out $KEY
+fi
+
+# now pack the crx'es
+BROWSER="chromium-browser"
+which $BROWSER || BROWSER="chromium"
+
+$BROWSER --no-message-box --pack-extension="pkg/crx-opera" --pack-extension-key="$KEY" 2> /dev/null
+
+mv pkg/crx-opera.crx $crx_opera
+
+echo >&2 "Opera crx package has sha256sum: `openssl dgst -sha256 -binary "$crx_opera" | xxd -p`"
+echo >&2 "Total included rules: `find src/chrome/content/rules -name "*.xml" | wc -l`"
+echo >&2 "Rules disabled by default: `find src/chrome/content/rules -name "*.xml" | xargs grep -F default_off | wc -l`"
+
+echo "Created $crx_opera"
+
+if [ -n "$BRANCH" ]; then
+ cd ..
+ cp $SUBDIR/$crx_opera pkg
+ rm -rf $SUBDIR
+fi
diff --git a/chromium/.eslintignore b/chromium/.eslintignore
index 79f09976bfe8..6f1043967f94 100644
--- a/chromium/.eslintignore
+++ b/chromium/.eslintignore
@@ -1 +1 @@
-external/*
+external/
diff --git a/chromium/.eslintrc.json b/chromium/.eslintrc.json
index 2851620f3a87..c696ae27c66e 100644
--- a/chromium/.eslintrc.json
+++ b/chromium/.eslintrc.json
@@ -5,17 +5,23 @@
"webextensions": true
},
"parserOptions": {
- "ecmaVersion": 2017,
+ "ecmaVersion": 2019,
"sourceType": "script"
},
"rules": {
"indent": ["error", 2, {"outerIIFEBody": 0}],
"no-unused-vars": "error",
"no-undef": "error",
- "strict": ["error", "global"]
+ "strict": ["error", "global"],
+ "semi": ["error", "always"],
+ "space-before-blocks": ["error"],
+ "brace-style": ["error"],
+ "no-invalid-regexp": "error",
+ "no-trailing-spaces": "error"
},
"globals": {
"exports": true,
- "require": true
+ "require": true,
+ "wasm_bindgen": true
}
}
diff --git a/chromium/.gitignore b/chromium/.gitignore
index 7f2b090f975b..94dda0257826 100644
--- a/chromium/.gitignore
+++ b/chromium/.gitignore
@@ -1 +1,2 @@
+.nyc_output
updates.xml
diff --git a/chromium/background-scripts/background.js b/chromium/background-scripts/background.js
index 55fff6298440..331e6dc22432 100644
--- a/chromium/background-scripts/background.js
+++ b/chromium/background-scripts/background.js
@@ -6,17 +6,24 @@ const rules = require('./rules'),
store = require('./store'),
incognito = require('./incognito'),
util = require('./util'),
- update = require('./update');
-
+ update = require('./update'),
+ { update_channels } = require('./update_channels'),
+ wasm = require('./wasm'),
+ ipUtils = require('./ip_utils'),
+ ssl_codes = require('./ssl_codes');
let all_rules = new rules.RuleSets();
+let blooms = [];
async function initialize() {
+ await wasm.initialize();
await store.initialize();
await store.performMigrations();
await initializeStoredGlobals();
+ await getUpgradeToSecureAvailable();
await update.initialize(store, initializeAllRules);
await all_rules.loadFromBrowserStorage(store, update.applyStoredRulesets);
+ await update.applyStoredBlooms(blooms);
await incognito.onIncognitoDestruction(destroy_caches);
}
initialize();
@@ -25,31 +32,61 @@ async function initializeAllRules() {
const r = new rules.RuleSets();
await r.loadFromBrowserStorage(store, update.applyStoredRulesets);
Object.assign(all_rules, r);
+ blooms.length = 0;
+ await update.applyStoredBlooms(blooms);
}
/**
* Load preferences. Structure is:
* {
* httpNowhere: Boolean,
- * showCounter: Boolean,
* isExtensionEnabled: Boolean
* }
*/
var httpNowhereOn = false;
-var showCounter = true;
var isExtensionEnabled = true;
+let disabledList = new Set();
+let httpOnceList = new Set();
+
+/**
+ * Check if HTTPS Everywhere should be ON for host
+ */
+function isExtensionDisabledOnSite(host) {
+ // make sure the host is not matched in the httpOnceList
+ if (httpOnceList.has(host)) {
+ return true;
+ }
+
+ // make sure the host is not matched in the disabledList
+ if (disabledList.has(host)) {
+ return true;
+ }
+
+ // make sure the host is matched by any wildcard expressions in the disabledList
+ const experessions = util.getWildcardExpressions(host);
+ for (const expression of experessions) {
+ if (disabledList.has(expression)) {
+ return true;
+ }
+ }
-function initializeStoredGlobals(){
+ // otherwise return false
+ return false;
+}
+
+function initializeStoredGlobals() {
return new Promise(resolve => {
store.get({
httpNowhere: false,
- showCounter: true,
globalEnabled: true,
- enableMixedRulesets: false
+ enableMixedRulesets: false,
+ disabledList: []
}, function(item) {
httpNowhereOn = item.httpNowhere;
- showCounter = item.showCounter;
isExtensionEnabled = item.globalEnabled;
+ for (let disabledSite of item.disabledList) {
+ disabledList.add(disabledSite);
+ }
updateState();
rules.settings.enableMixedRulesets = item.enableMixedRulesets;
@@ -59,16 +96,33 @@ function initializeStoredGlobals(){
});
}
+/** @type {boolean} */
+let upgradeToSecureAvailable = false;
+
+function getUpgradeToSecureAvailable() {
+ if (typeof browser !== 'undefined') {
+ return browser.runtime.getBrowserInfo().then(function(info) {
+ let version = info.version.match(/^(\d+)/)[1];
+ if (info.name == "Firefox" && version >= 59) {
+ upgradeToSecureAvailable = true;
+ } else {
+ upgradeToSecureAvailable = false;
+ }
+ });
+ } else {
+ return new Promise(resolve => {
+ upgradeToSecureAvailable = false;
+ resolve();
+ });
+ }
+}
+
chrome.storage.onChanged.addListener(async function(changes, areaName) {
if (areaName === 'sync' || areaName === 'local') {
if ('httpNowhere' in changes) {
httpNowhereOn = changes.httpNowhere.newValue;
updateState();
}
- if ('showCounter' in changes) {
- showCounter = changes.showCounter.newValue;
- updateState();
- }
if ('globalEnabled' in changes) {
isExtensionEnabled = changes.globalEnabled.newValue;
updateState();
@@ -93,20 +147,23 @@ if (chrome.windows) {
chrome.windows.onFocusChanged.addListener(function() {
updateState();
});
+
+ // Grant access to HTTP site only during session, clear once window is closed
+ chrome.windows.onRemoved.addListener(function() {
+ chrome.windows.getAll({}, function(windows) {
+ if(windows.length > 0) {
+ return;
+ } else {
+ httpOnceList.clear();
+ }
+ });
+ });
+
}
chrome.webNavigation.onCompleted.addListener(function() {
updateState();
});
-// Records which tabId's are active in the HTTPS Switch Planner (see
-// pages/devtools/panel-ux.js).
-var switchPlannerEnabledFor = {};
-// Detailed information recorded when the HTTPS Switch Planner is active.
-// Structure is:
-// switchPlannerInfo[tabId]["rw"/"nrw"][resource_host][active_content][url];
-// rw / nrw stand for "rewritten" versus "not rewritten"
-var switchPlannerInfo = {};
-
/**
* Set the icon color correctly
* active: extension is enabled.
@@ -125,33 +182,37 @@ function updateState () {
iconState = 'blocking';
}
- if ('setIcon' in chrome.browserAction) {
- chrome.browserAction.setIcon({
- path: {
- 38: 'images/icons/icon-' + iconState + '-38.png'
- }
- });
- }
-
chrome.browserAction.setTitle({
title: 'HTTPS Everywhere' + ((iconState === 'active') ? '' : ' (' + iconState + ')')
});
- chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) {
- if (!tabs || tabs.length === 0) {
- return;
- }
- const tabId = tabs[0].id;
- const activeCount = appliedRulesets.getActiveRulesetCount(tabId);
+ const chromeUrl = 'chrome://';
- if ('setBadgeBackgroundColor' in chrome.browserAction) {
- chrome.browserAction.setBadgeBackgroundColor({ color: '#666666', tabId });
+ chrome.tabs.query({ active: true, currentWindow: true, status: 'complete' }, function(tabs) {
+ if (!tabs || tabs.length === 0 || tabs[0].url.startsWith(chromeUrl) ) {
+ return;
}
- const showBadge = activeCount > 0 && isExtensionEnabled && showCounter;
+ // tabUrl.host instead of hostname should be used to show the "disabled" status properly (#19293)
+ const tabUrl = new URL(tabs[0].url);
+ const host = util.getNormalisedHostname(tabUrl.host);
- if ('setBadgeText' in chrome.browserAction) {
- chrome.browserAction.setBadgeText({ text: showBadge ? String(activeCount) : '', tabId });
+ if (isExtensionDisabledOnSite(host) || iconState == "disabled") {
+ if ('setIcon' in chrome.browserAction) {
+ chrome.browserAction.setIcon({
+ path: {
+ 38: 'images/icons/icon-disabled-38.png'
+ }
+ });
+ }
+ } else {
+ if ('setIcon' in chrome.browserAction) {
+ chrome.browserAction.setIcon({
+ path: {
+ 38: 'images/icons/icon-' + iconState + '-38.png'
+ }
+ });
+ }
}
});
}
@@ -160,44 +221,63 @@ function updateState () {
* The following allows fennec to interact with the popup ui
* */
chrome.browserAction.onClicked.addListener(e => {
- const url = chrome.extension.getURL("/pages/popup/index.html?tabId=" + e.id);
+ const url = chrome.runtime.getURL("/pages/popup/index.html?tabId=" + e.id);
chrome.tabs.create({
url
});
});
-
-
/**
- * Add a listener for removed tabs
+ * A centralized storage for browsing data within the browser session.
*/
-function AppliedRulesets() {
- this.active_tab_rules = new Map();
- this.active_tab_main_frames = new Map();
+function BrowserSession() {
+ this.tabs = new Map();
+ this.requests = new Map();
- let that = this;
if (chrome.tabs) {
- chrome.tabs.onRemoved.addListener(function(tabId) {
- that.removeTab(tabId);
+ chrome.tabs.onRemoved.addListener(tabId => {
+ this.deleteTab(tabId);
});
}
}
-AppliedRulesets.prototype = {
- addRulesetToTab: function(tabId, type, ruleset) {
- if (!this.active_tab_main_frames.has(tabId)) {
- this.active_tab_main_frames.set(tabId, false);
+BrowserSession.prototype = {
+ putTab: function(tabId, key, value, overwrite) {
+ if (!this.tabs.has(tabId)) {
+ this.tabs.set(tabId, {});
+ }
+
+ if (!(key in this.tabs.get(tabId)) || overwrite) {
+ this.tabs.get(tabId)[key] = value;
+ }
+ },
+
+ getTab: function(tabId, key, defaultValue) {
+ if (this.tabs.has(tabId) && key in this.tabs.get(tabId)) {
+ return this.tabs.get(tabId)[key];
+ }
+ return defaultValue;
+ },
+
+ deleteTab: function(tabId) {
+ if (this.tabs.has(tabId)) {
+ this.tabs.delete(tabId);
}
+ },
+
+ putTabAppliedRulesets: function(tabId, type, ruleset) {
+ this.putTab(tabId, "main_frame", false, false);
// always show main_frame ruleset on the top
if (type == "main_frame") {
- this.active_tab_main_frames.set(tabId, true);
- this.active_tab_rules.set(tabId, [ruleset,]);
+ this.putTab(tabId, "main_frame", true, true);
+ this.putTab(tabId, "applied_rulesets", [ruleset,], true);
return ;
}
- if (this.active_tab_rules.has(tabId)) {
- let rulesets = this.active_tab_rules.get(tabId);
+ // sort by ruleset names alphabetically, case-insensitive
+ if (this.getTab(tabId, "applied_rulesets", null)) {
+ let rulesets = this.getTab(tabId, "applied_rulesets", null);
let insertIndex = 0;
const ruleset_name = ruleset.name.toLowerCase();
@@ -207,7 +287,7 @@ AppliedRulesets.prototype = {
if (item_name == ruleset_name) {
return ;
- } else if (insertIndex == 0 && this.active_tab_main_frames.get(tabId)) {
+ } else if (insertIndex == 0 && this.getTab(tabId, "main_frame", false)) {
insertIndex = 1;
} else if (item_name < ruleset_name) {
insertIndex++;
@@ -215,45 +295,46 @@ AppliedRulesets.prototype = {
}
rulesets.splice(insertIndex, 0, ruleset);
} else {
- this.active_tab_rules.set(tabId, [ruleset,]);
+ this.putTab(tabId, "applied_rulesets", [ruleset,], true);
}
},
- getRulesets: function(tabId) {
- if (this.active_tab_rules.has(tabId)) {
- return this.active_tab_rules.get(tabId);
- } else {
- return null;
- }
+ getTabAppliedRulesets: function(tabId) {
+ return this.getTab(tabId, "applied_rulesets", null);
},
- removeTab: function(tabId) {
- this.active_tab_rules.delete(tabId);
- this.active_tab_main_frames.delete(tabId);
+ putRequest: function(requestId, key, value) {
+ if (!this.requests.has(requestId)) {
+ this.requests.set(requestId, {});
+ }
+ this.requests.get(requestId)[key] = value;
},
- getActiveRulesetCount: function (tabId) {
- let activeCount = 0;
+ getRequest: function(requestId, key, defaultValue) {
+ if (this.requests.has(requestId) && key in this.requests.get(requestId)) {
+ return this.requests.get(requestId)[key];
+ }
+ return defaultValue;
+ },
- const rulesets = this.getRulesets(tabId);
- if (rulesets) {
- for (const ruleset of rulesets) {
- if (ruleset.active) {
- activeCount++;
- }
- }
+ deleteRequest: function(requestId) {
+ if (this.requests.has(requestId)) {
+ this.requests.delete(requestId);
}
- return activeCount;
}
};
-var appliedRulesets = new AppliedRulesets();
+let browserSession = new BrowserSession();
var urlBlacklist = new Set();
-// redirect counter workaround
-// TODO: Remove this code if they ever give us a real counter
-var redirectCounter = new Map();
+const cancelUrl = chrome.runtime.getURL("/pages/cancel/index.html");
+
+function redirectOnCancel(shouldCancel, originURL) {
+ return shouldCancel ? {redirectUrl: newCancelUrl(originURL)} : {cancel: false};
+}
+
+const newCancelUrl = originURL => `${cancelUrl}?originURL=${encodeURIComponent(originURL)}`;
/**
* Called before a HTTP(s) request. Does the heavy lifting
@@ -269,20 +350,42 @@ function onBeforeRequest(details) {
let uri = new URL(details.url);
// Normalise hosts with tailing dots, e.g. "www.example.com."
- let canonical_host = uri.hostname;
- while (canonical_host.charAt(canonical_host.length - 1) == ".") {
- canonical_host = canonical_host.slice(0, -1);
- uri.hostname = canonical_host;
+ uri.hostname = util.getNormalisedHostname(uri.hostname);
+
+ let ip = ipUtils.parseIp(uri.hostname);
+
+ let isLocalIp = false;
+
+ if (ip !== -1) {
+ isLocalIp = ipUtils.isLocalIp(ip);
+ }
+
+ if (details.type == "main_frame") {
+ // Clear the content from previous browser session.
+ // This needed to be done before this listener returns,
+ // otherwise, the extension popup might include rulesets
+ // from previous page.
+ browserSession.deleteTab(details.tabId);
+
+ // Check if an user has disabled HTTPS Everywhere on this site. We should
+ // ensure that all subresources are not run through HTTPS Everywhere as well.
+ browserSession.putTab(details.tabId, 'first_party_host', uri.host, true);
+ }
+
+ if (isExtensionDisabledOnSite(browserSession.getTab(details.tabId, 'first_party_host', null))) {
+ return;
}
// Should the request be canceled?
+ // true if the URL is a http:// connection to a remote canonical host, and not
+ // a tor hidden service
const shouldCancel = httpNowhereOn &&
- uri.protocol === 'http:' &&
+ (uri.protocol === 'http:' || uri.protocol === 'ftp:') &&
uri.hostname.slice(-6) !== '.onion' &&
uri.hostname !== 'localhost' &&
- !/^127(\.[0-9]{1,3}){3}$/.test(canonical_host) &&
- !/^0\.0\.0\.0$/.test(canonical_host) &&
- uri.hostname !== '[::1]';
+ !uri.hostname.endsWith('.localhost') &&
+ uri.hostname !== '[::1]' &&
+ !isLocalIp;
// If there is a username / password, put them aside during the ruleset
// analysis process
@@ -297,38 +400,53 @@ function onBeforeRequest(details) {
uri.password = '';
}
- var canonical_url = uri.href;
- if (details.url != canonical_url && !using_credentials_in_url) {
+ if (details.url != uri.href && !using_credentials_in_url) {
util.log(util.INFO, "Original url " + details.url +
- " changed before processing to " + canonical_url);
+ " changed before processing to " + uri.href);
}
- if (urlBlacklist.has(canonical_url)) {
- return {cancel: shouldCancel};
+ if (urlBlacklist.has(uri.href)) {
+ return redirectOnCancel(shouldCancel, details.url);
}
- if (details.type == "main_frame") {
- appliedRulesets.removeTab(details.tabId);
+ if (browserSession.getRequest(details.requestId, "redirect_count", 0) >= 8) {
+ util.log(util.NOTE, "Redirect counter hit for " + uri.href);
+ urlBlacklist.add(uri.href);
+ rules.settings.domainBlacklist.add(uri.hostname);
+ util.log(util.WARN, "Domain blacklisted " + uri.hostname);
+ return redirectOnCancel(shouldCancel, details.url);
}
- var potentiallyApplicable = all_rules.potentiallyApplicableRulesets(canonical_host);
+ // whether to use mozilla's upgradeToSecure BlockingResponse if available
+ let upgradeToSecure = false;
+ let newuristr = null;
- if (redirectCounter.get(details.requestId) >= 8) {
- util.log(util.NOTE, "Redirect counter hit for " + canonical_url);
- urlBlacklist.add(canonical_url);
- rules.settings.domainBlacklist.add(canonical_host);
- util.log(util.WARN, "Domain blacklisted " + canonical_host);
- return {cancel: shouldCancel};
- }
-
- var newuristr = null;
+ let potentiallyApplicable = all_rules.potentiallyApplicableRulesets(uri.hostname);
for (let ruleset of potentiallyApplicable) {
- appliedRulesets.addRulesetToTab(details.tabId, details.type, ruleset);
- if (ruleset.active && !newuristr) {
- newuristr = ruleset.apply(canonical_url);
+ if (details.url.match(ruleset.scope)) {
+ browserSession.putTabAppliedRulesets(details.tabId, details.type, ruleset);
+ if (ruleset.active && !newuristr) {
+ newuristr = ruleset.apply(uri.href);
+ }
}
}
+ if (newuristr == null && blooms.length > 0 && uri.protocol === 'http:') {
+ for(let bloom of blooms) {
+ if(bloom.check(uri.hostname)) {
+ newuristr = uri.href.replace(/^http:/, "https:");
+ break;
+ }
+ }
+ }
+
+ // only use upgradeToSecure for trivial rewrites
+ if (upgradeToSecureAvailable && newuristr) {
+ // check rewritten URIs against the trivially upgraded URI
+ const trivialUpgradeUri = uri.href.replace(/^http:/, "https:");
+ upgradeToSecure = (newuristr == trivialUpgradeUri);
+ }
+
// re-insert userpass info which was stripped temporarily
if (using_credentials_in_url) {
if (newuristr) {
@@ -337,124 +455,49 @@ function onBeforeRequest(details) {
uri_with_credentials.password = tmp_pass;
newuristr = uri_with_credentials.href;
} else {
- const canonical_url_with_credentials = new URL(canonical_url);
- canonical_url_with_credentials.username = tmp_user;
- canonical_url_with_credentials.password = tmp_pass;
- canonical_url = canonical_url_with_credentials.href;
+ const url_with_credentials = new URL(uri.href);
+ url_with_credentials.username = tmp_user;
+ url_with_credentials.password = tmp_pass;
+ uri.href = url_with_credentials.href;
}
}
- // In Switch Planner Mode, record any non-rewriteable
- // HTTP URIs by parent hostname, along with the resource type.
- if (switchPlannerEnabledFor[details.tabId] && uri.protocol !== "https:") {
- writeToSwitchPlanner(details.type,
- details.tabId,
- canonical_host,
- details.url,
- newuristr);
- }
-
if (httpNowhereOn) {
// If loading a main frame, try the HTTPS version as an alternative to
// failing.
if (shouldCancel) {
if (!newuristr) {
- return {redirectUrl: canonical_url.replace(/^http:/, "https:")};
+ newuristr = uri.href.replace(/^http:/, "https:");
+ browserSession.putRequest(details.requestId, "simple_http_nowhere_redirect", true);
+ upgradeToSecure = true;
} else {
- return {redirectUrl: newuristr.replace(/^http:/, "https:")};
+ newuristr = newuristr.replace(/^http:/, "https:");
}
}
- if (newuristr && newuristr.substring(0, 5) === "http:") {
- // Abort early if we're about to redirect to HTTP in HTTP Nowhere mode
- return {cancel: true};
+ if (
+ newuristr &&
+ (
+ newuristr.substring(0, 5) === "http:" ||
+ newuristr.substring(0, 4) === "ftp:"
+ )
+ ) {
+ // Abort early if we're about to redirect to HTTP or FTP in HTTP Nowhere mode
+ return {redirectUrl: newCancelUrl(newuristr)};
}
}
- if (newuristr) {
+ if (upgradeToSecureAvailable && upgradeToSecure) {
+ util.log(util.INFO, 'onBeforeRequest returning upgradeToSecure: true');
+ return {upgradeToSecure: true};
+ } else if (newuristr) {
+ util.log(util.INFO, 'onBeforeRequest returning redirectUrl: ' + newuristr);
return {redirectUrl: newuristr};
} else {
- return {cancel: shouldCancel};
+ util.log(util.INFO, 'onBeforeRequest returning shouldCancel: ' + shouldCancel);
+ return redirectOnCancel(shouldCancel, details.url);
}
}
-
-// Map of which values for the `type' enum denote active vs passive content.
-// https://developer.chrome.com/extensions/webRequest.html#event-onBeforeRequest
-const mixedContentTypes = {
- object: 1, other: 1, script: 1, stylesheet: 1, sub_frame: 1, xmlhttprequest: 1,
- image: 0, main_frame: 0
-};
-
-/**
- * Record a non-HTTPS URL loaded by a given hostname in the Switch Planner, for
- * use in determining which resources need to be ported to HTTPS.
- * (Reminder: Switch planner is the pro-tool enabled by switching into debug-mode)
- *
- * @param type: type of the resource (see activeTypes and passiveTypes arrays)
- * @param tab_id: The id of the tab
- * @param resource_host: The host of the original url
- * @param resource_url: the original url
- * @param rewritten_url: The url rewritten to
- * */
-function writeToSwitchPlanner(type, tab_id, resource_host, resource_url, rewritten_url) {
- let rw = rewritten_url ? "rw" : "nrw";
-
- let active_content = 1;
- if (mixedContentTypes.hasOwnProperty(type)) {
- active_content = mixedContentTypes[type];
- } else {
- util.log(util.WARN, "Unknown type from onBeforeRequest details: `" + type + "', assuming active");
- }
-
- if (!switchPlannerInfo[tab_id]) {
- switchPlannerInfo[tab_id] = {};
- switchPlannerInfo[tab_id]["rw"] = {};
- switchPlannerInfo[tab_id]["nrw"] = {};
- }
- if (!switchPlannerInfo[tab_id][rw][resource_host])
- switchPlannerInfo[tab_id][rw][resource_host] = {};
- if (!switchPlannerInfo[tab_id][rw][resource_host][active_content])
- switchPlannerInfo[tab_id][rw][resource_host][active_content] = {};
-
- switchPlannerInfo[tab_id][rw][resource_host][active_content][resource_url] = 1;
-}
-
-/**
- * Return the number of properties in an object. For associative maps, this is
- * their size.
- * @param obj: object to calc the size for
- * */
-function objSize(obj) {
- if (typeof obj == 'undefined') return 0;
- var size = 0, key;
- for (key in obj) {
- if (obj.hasOwnProperty(key)) size++;
- }
- return size;
-}
-
-/**
- * Make an array of asset hosts by score so we can sort them,
- * presenting the most important ones first.
- * */
-function sortSwitchPlanner(tab_id, rewritten) {
- var asset_host_list = [];
- if (typeof switchPlannerInfo[tab_id] === 'undefined' ||
- typeof switchPlannerInfo[tab_id][rewritten] === 'undefined') {
- return [];
- }
- var tabInfo = switchPlannerInfo[tab_id][rewritten];
- for (var asset_host in tabInfo) {
- var ah = tabInfo[asset_host];
- var activeCount = objSize(ah[1]);
- var passiveCount = objSize(ah[0]);
- var score = activeCount * 100 + passiveCount;
- asset_host_list.push([score, activeCount, passiveCount, asset_host]);
- }
- asset_host_list.sort(function(a,b){return a[0]-b[0];});
- return asset_host_list;
-}
-
/**
* monitor cookie changes. Automatically convert them to secure cookies
* @param changeInfo Cookie changed info, see Chrome doc
@@ -510,13 +553,12 @@ function onBeforeRedirect(details) {
// Catch redirect loops (ignoring about:blank, etc. caused by other extensions)
let prefix = details.redirectUrl.substring(0, 5);
if (prefix === "http:" || prefix === "https") {
- let count = redirectCounter.get(details.requestId);
+ let count = browserSession.getRequest(details.requestId, "redirect_count", 0);
if (count) {
- redirectCounter.set(details.requestId, count + 1);
- util.log(util.DBUG, "Got redirect id "+details.requestId+
- ": "+count);
+ browserSession.putRequest(details.requestId, "redirect_count", count + 1);
+ util.log(util.DBUG, "Got redirect id " + details.requestId + ": "+count);
} else {
- redirectCounter.set(details.requestId, 1);
+ browserSession.putRequest(details.requestId, "redirect_count", 1);
}
}
}
@@ -526,9 +568,7 @@ function onBeforeRedirect(details) {
* @param details details for the chrome.webRequest (see chrome doc)
*/
function onCompleted(details) {
- if (redirectCounter.has(details.requestId)) {
- redirectCounter.delete(details.requestId);
- }
+ browserSession.deleteRequest(details.requestId);
}
/**
@@ -536,61 +576,100 @@ function onCompleted(details) {
* @param details details for the chrome.webRequest (see chrome doc)
*/
function onErrorOccurred(details) {
- if (redirectCounter.has(details.requestId)) {
- redirectCounter.delete(details.requestId);
+ if (httpNowhereOn &&
+ details.type == "main_frame" &&
+ browserSession.getRequest(details.requestId, "simple_http_nowhere_redirect", false) &&
+ // Enumerate errors that are likely due to HTTPS misconfigurations
+ ssl_codes.error_list.some(message => details.error.includes(message))
+ ) {
+ let url = new URL(details.url);
+ if (url.protocol == "https:") {
+ url.protocol = "http:";
+ }
+ chrome.tabs.update(details.tabId, {url: newCancelUrl(url.toString())});
}
+
+ browserSession.deleteRequest(details.requestId);
}
/**
- * handle webrequest.onHeadersReceived, insert upgrade-insecure-requests directive
+ * handle webrequest.onHeadersReceived, insert upgrade-insecure-requests directive and
+ * rewrite access-control-allow-origin if presented in HTTP Nowhere mode
* @param details details for the chrome.webRequest (see chrome doc)
*/
function onHeadersReceived(details) {
if (isExtensionEnabled && httpNowhereOn) {
- // Do not upgrade the .onion requests in HTTP Nowhere Mode,
+ // Do not upgrade the .onion requests in EASE mode,
// See https://github.com/EFForg/https-everywhere/pull/14600#discussion_r168072480
const uri = new URL(details.url);
- if (uri.hostname.slice(-6) == '.onion') {
+ const hostname = util.getNormalisedHostname(uri.hostname);
+ if (hostname.slice(-6) == '.onion') {
+ return {};
+ }
+
+ // Do not upgrade resources if the first-party domain disbled EASE mode
+ // This is needed for HTTPS sites serve mixed content and is broken
+ if (isExtensionDisabledOnSite(browserSession.getTab(details.tabId, 'first_party_host', null))) {
return {};
}
+ let responseHeadersChanged = false;
+ let cspHeaderFound = false;
+
for (const idx in details.responseHeaders) {
if (details.responseHeaders[idx].name.match(/Content-Security-Policy/i)) {
// Existing CSP headers found
+ cspHeaderFound = true;
const value = details.responseHeaders[idx].value;
// Prepend if no upgrade-insecure-requests directive exists
if (!value.match(/upgrade-insecure-requests/i)) {
details.responseHeaders[idx].value = "upgrade-insecure-requests; " + value;
- return {responseHeaders: details.responseHeaders};
+ responseHeadersChanged = true;
+ }
+ }
+
+ if (details.responseHeaders[idx].name.match(/Access-Control-Allow-Origin/i)) {
+ // Existing access-control-allow-origin header found
+ const value = details.responseHeaders[idx].value;
+
+ // If HTTP protocol is used, change it to HTTPS
+ if (value.match(/http:/)) {
+ details.responseHeaders[idx].value = value.replace(/http:/g, "https:");
+ responseHeadersChanged = true;
}
- return {};
}
}
- // CSP headers not found
- const upgradeInsecureRequests = {
- name: 'Content-Security-Policy',
- value: 'upgrade-insecure-requests'
+ if (!cspHeaderFound) {
+ // CSP headers not found
+ const upgradeInsecureRequests = {
+ name: 'Content-Security-Policy',
+ value: 'upgrade-insecure-requests'
+ };
+ details.responseHeaders.push(upgradeInsecureRequests);
+ responseHeadersChanged = true;
+ }
+
+ if (responseHeadersChanged) {
+ return {responseHeaders: details.responseHeaders};
}
- details.responseHeaders.push(upgradeInsecureRequests);
- return {responseHeaders: details.responseHeaders};
}
return {};
}
// Registers the handler for requests
// See: https://github.com/EFForg/https-everywhere/issues/10039
-chrome.webRequest.onBeforeRequest.addListener(onBeforeRequest, {urls: ["*://*/*"]}, ["blocking"]);
+chrome.webRequest.onBeforeRequest.addListener(onBeforeRequest, {urls: ["*://*/*", "ftp://*/*"]}, ["blocking"]);
// Try to catch redirect loops on URLs we've redirected to HTTPS.
chrome.webRequest.onBeforeRedirect.addListener(onBeforeRedirect, {urls: ["https://*/*"]});
-// Cleanup redirectCounter if neccessary
+// Cleanup redirectCounter if necessary
chrome.webRequest.onCompleted.addListener(onCompleted, {urls: ["*://*/*"]});
-// Cleanup redirectCounter if neccessary
-chrome.webRequest.onErrorOccurred.addListener(onErrorOccurred, {urls: ["*://*/*"]})
+// Cleanup redirectCounter if necessary
+chrome.webRequest.onErrorOccurred.addListener(onErrorOccurred, {urls: ["*://*/*"]});
// Insert upgrade-insecure-requests directive in httpNowhere mode
chrome.webRequest.onHeadersReceived.addListener(onHeadersReceived, {urls: ["https://*/*"]}, ["blocking", "responseHeaders"]);
@@ -598,128 +677,283 @@ chrome.webRequest.onHeadersReceived.addListener(onHeadersReceived, {urls: ["http
// Listen for cookies set/updated and secure them if applicable. This function is async/nonblocking.
chrome.cookies.onChanged.addListener(onCookieChanged);
+// This is necessary for communication with the popup in Firefox Private
+// Browsing Mode, see https://bugzilla.mozilla.org/show_bug.cgi?id=1329304
+chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
+
+ function get_update_channels_generic(update_channels) {
+ let last_updated_promises = [];
+ for(let update_channel of update_channels) {
+ last_updated_promises.push(new Promise(resolve => {
+ store.local.get({['uc-timestamp: ' + update_channel.name]: 0}, item => {
+ resolve([update_channel.name, item['uc-timestamp: ' + update_channel.name]]);
+ });
+ }));
+ }
+ Promise.all(last_updated_promises).then(results => {
+ const last_updated = results.reduce((obj, item) => {
+ obj[item[0]] = item[1];
+ return obj;
+ }, {});
+ sendResponse({update_channels, last_updated});
+ });
+ }
-/**
- * disable switch Planner
- * @param tabId the Tab to disable for
- */
-function disableSwitchPlannerFor(tabId) {
- delete switchPlannerEnabledFor[tabId];
- // Clear stored URL info.
- delete switchPlannerInfo[tabId];
-}
-
-/**
- * Enable switch planner for specific tab
- * @param tabId the tab to enable it for
- */
-function enableSwitchPlannerFor(tabId) {
- switchPlannerEnabledFor[tabId] = true;
-}
+ function storeDisabledList(message) {
-// Listen for connection from the DevTools panel so we can set up communication.
-chrome.runtime.onConnect.addListener(function (port) {
- if (port.name == "devtools-page") {
- chrome.runtime.onMessage.addListener(function(message, sender, sendResponse){
- var tabId = message.tabId;
+ const disabledListArray = Array.from(disabledList);
+ const httpOnceListArray = Array.from(httpOnceList);
- var disableOnCloseCallback = function() {
- util.log(util.DBUG, "Devtools window for tab " + tabId + " closed, clearing data.");
- disableSwitchPlannerFor(tabId);
- };
+ if (message === 'once') {
+ store.set({httpOnceList: httpOnceListArray}, () => {
+ sendResponse(true);
+ });
+ } else {
+ store.set({disabledList: disabledListArray}, () => {
+ sendResponse(true);
+ });
+ }
- if (message.type === "enable") {
- enableSwitchPlannerFor(tabId);
- port.onDisconnect.addListener(disableOnCloseCallback);
- } else if (message.type === "disable") {
- disableSwitchPlannerFor(tabId);
- } else if (message.type === "getHosts") {
- sendResponse({
- nrw: sortSwitchPlanner(tabId, "nrw"),
- rw: sortSwitchPlanner(tabId, "rw")
- });
- }
- });
+ return true;
}
-});
-// This is necessary for communication with the popup in Firefox Private
-// Browsing Mode, see https://bugzilla.mozilla.org/show_bug.cgi?id=1329304
-chrome.runtime.onMessage.addListener(function(message, sender, sendResponse){
- if (message.type == "get_option") {
- store.get(message.object, sendResponse);
- return true;
- } else if (message.type == "set_option") {
- store.set(message.object, item => {
- if (sendResponse) {
- sendResponse(item);
+ const responses = {
+ get_option: () => {
+ store.get(message.object, sendResponse);
+ return true;
+ },
+ set_option: () => {
+ store.set(message.object, item => {
+ if (sendResponse) {
+ sendResponse(item);
+ }
+ });
+ },
+ delete_from_ruleset_cache: () => {
+ all_rules.ruleCache.delete(message.object);
+ },
+ get_applied_rulesets: () => {
+ sendResponse(browserSession.getTabAppliedRulesets(message.object));
+ return true;
+ },
+ set_ruleset_active_status: () => {
+ let rulesets = browserSession.getTabAppliedRulesets(message.object.tab_id);
+
+ for (let ruleset of rulesets) {
+ if (ruleset.name == message.object.name) {
+ ruleset.active = message.object.active;
+ if (ruleset.default_state == message.object.active) {
+ message.object.active = undefined;
+ }
+ break;
+ }
}
- });
- } else if (message.type == "delete_from_ruleset_cache") {
- all_rules.ruleCache.delete(message.object);
- } else if (message.type == "get_active_rulesets") {
- sendResponse(appliedRulesets.getRulesets(message.object));
- } else if (message.type == "set_ruleset_active_status") {
- let rulesets = appliedRulesets.getRulesets(message.object.tab_id);
-
- for (let ruleset of rulesets) {
- if (ruleset.name == message.object.name) {
- ruleset.active = message.object.active;
- if (ruleset.default_state == message.object.active) {
- message.object.active = undefined;
+
+ all_rules.setRuleActiveState(message.object.name, message.object.active).then(() => {
+ sendResponse(true);
+ });
+
+ return true;
+ },
+ reset_to_defaults: () => {
+ // restore the 'default states' of the rulesets
+ store.set_promise('ruleActiveStates', {}).then(() => {
+ // clear the caches such that it becomes stateless
+ destroy_caches();
+ // re-activate all rules according to the new states
+ initializeAllRules();
+ // reload tabs when operations completed
+ chrome.tabs.reload();
+ });
+ },
+ get_user_rules: () => {
+ store.get_promise(all_rules.USER_RULE_KEY, []).then(userRules => sendResponse(userRules));
+ return true;
+ },
+ add_new_rule: () => {
+ all_rules.addNewRuleAndStore(message.object).then(() => {
+ sendResponse(true);
+ });
+ return true;
+ },
+ remove_rule: () => {
+ all_rules.removeRuleAndStore(message.object.ruleset, message.object.src)
+ .then(() => {
+ /**
+ * FIXME: initializeAllRules is needed for calls from the option pages.
+ * Since message.object is not of type Ruleset, rules.removeUserRule
+ * is not usable...
+ */
+ if (message.object.src === 'options') {
+ return initializeAllRules();
+ }
+ })
+ .then(() => {
+ if (sendResponse !== null) {
+ sendResponse(true);
+ }
+ });
+ return true;
+ },
+ get_update_channel_timestamps: () => {
+ update.getUpdateChannelTimestamps().then(timestamps => sendResponse(timestamps));
+ return true;
+ },
+ get_pinned_update_channels: () => {
+ get_update_channels_generic(update_channels);
+ return true;
+ },
+ get_stored_update_channels: () => {
+ store.get({update_channels: []}, item => {
+ get_update_channels_generic(item.update_channels);
+ });
+ return true;
+ },
+ create_update_channel: () => {
+
+ store.get({update_channels: []}, item => {
+
+ const update_channel_names = update_channels.concat(item.update_channels).reduce((obj, item) => {
+ obj.add(item.name);
+ return obj;
+ }, new Set());
+
+ if(update_channel_names.has(message.object)) {
+ return sendResponse(false);
}
- break;
+
+ item.update_channels.push({
+ name: message.object,
+ jwk: {},
+ update_path_prefix: '',
+ scope: ''
+ });
+
+ store.set({update_channels: item.update_channels}, () => {
+ sendResponse(true);
+ });
+
+ });
+ return true;
+ },
+ delete_update_channel: () => {
+ store.get({update_channels: []}, item => {
+ store.set({update_channels: item.update_channels.filter(update_channel => {
+ return (update_channel.name != message.object);
+ })}, () => {
+ store.local.remove([
+ 'uc-timestamp: ' + message.object,
+ 'uc-stored-timestamp: ' + message.object,
+ 'rulesets: ' + message.object,
+ 'bloom: ' + message.object,
+ 'bloom_bitmap_bits: ' + message.object,
+ 'bloom_k_num: ' + message.object,
+ 'bloom_sip_keys_0_0: ' + message.object,
+ 'bloom_sip_keys_0_1: ' + message.object,
+ 'bloom_sip_keys_1_0: ' + message.object,
+ 'bloom_sip_keys_1_1: ' + message.object,
+ ], () => {
+ initializeAllRules();
+ sendResponse(true);
+ });
+ });
+ });
+ return true;
+ },
+ update_update_channel: () => {
+ store.get({update_channels: []}, item => {
+ let scope_changed = false;
+ item.update_channels = item.update_channels.map(update_channel => {
+ if(update_channel.name == message.object.name) {
+ if(update_channel.scope != message.object.scope) {
+ scope_changed = true;
+ }
+ update_channel = message.object;
+ }
+ return update_channel;
+ });
+
+ // Ensure that we check for new rulesets from the update channel immediately.
+ // If the scope has changed, make sure that the rulesets are re-initialized.
+ update.removeStorageListener();
+ store.set({update_channels: item.update_channels}, () => {
+ update.loadUpdateChannelsKeys().then(() => {
+ update.resetTimer();
+ if(scope_changed) {
+ initializeAllRules();
+ }
+ sendResponse(true);
+ });
+ update.addStorageListener();
+ });
+ });
+ return true;
+ },
+ get_simple_rules_ending_with: () => {
+ return sendResponse(all_rules.getSimpleRulesEndingWith(message.object));
+ },
+ get_last_checked: () => {
+ store.local.get({'last-checked': false}, item => {
+ sendResponse(item['last-checked']);
+ });
+ return true;
+ },
+ disable_on_site_once: () => {
+ httpOnceList.add(message.object);
+ return storeDisabledList('once');
+ },
+ disable_on_site: () => {
+ const host = util.getNormalisedHostname(message.object);
+ // always validate hostname before adding it to the disabled list
+ if (util.isValidHostname(host)) {
+ disabledList.add(host);
+ return storeDisabledList('disable');
}
+ return sendResponse(false);
+ },
+ enable_on_site: () => {
+ disabledList.delete(util.getNormalisedHostname(message.object));
+ return storeDisabledList('enable');
+ },
+ check_if_site_disabled: () => {
+ return sendResponse(isExtensionDisabledOnSite(util.getNormalisedHostname(message.object)));
+ },
+ is_firefox: () => {
+ if(typeof(browser) != "undefined") {
+ browser.runtime.getBrowserInfo().then(function(info) {
+ if (info.name == "Firefox") {
+ sendResponse(true);
+ } else {
+ sendResponse(false);
+ }
+ });
+ } else {
+ sendResponse(false);
+ }
+ return true;
}
-
- all_rules.setRuleActiveState(message.object.name, message.object.active).then(() => {
- sendResponse(true);
- });
- return true;
- } else if (message.type == "add_new_rule") {
- all_rules.addNewRuleAndStore(message.object).then(() => {
- sendResponse(true);
- });
- return true;
- } else if (message.type == "remove_rule") {
- all_rules.removeRuleAndStore(message.object);
- } else if (message.type == "import_settings") {
- // This is used when importing settings from the options ui
- import_settings(message.object).then(() => {
- sendResponse(true);
- });
- } else if (message.type == "get_ruleset_timestamps") {
- update.getRulesetTimestamps().then(timestamps => sendResponse(timestamps));
- return true;
+ };
+ if (message.type in responses) {
+ return responses[message.type]();
}
});
/**
- * Import extension settings (custom rulesets, ruleset toggles, globals) from an object
- * @param settings the settings object
+ * @description Notify users about extension sunsetting in January 2023 and instructions turn on HTTPS natively
+ * @link https://www.eff.org/deeplinks/2021/09/https-actually-everywhere
*/
-async function import_settings(settings) {
- if (settings && settings.changed) {
- let ruleActiveStates = {};
- // Load all the ruleset toggles into memory and store
- for (const ruleset_name in settings.rule_toggle) {
- ruleActiveStates[ruleset_name] = (settings.rule_toggle[ruleset_name] == "true");
- }
-
- // Save settings
- await new Promise(resolve => {
- store.set({
- legacy_custom_rulesets: settings.custom_rulesets,
- httpNowhere: settings.prefs.http_nowhere_enabled,
- showCounter: settings.prefs.show_counter,
- globalEnabled: settings.prefs.global_enabled,
- ruleActiveStates
- }, resolve);
- });
-
- initializeAllRules();
+chrome.runtime.onInstalled.addListener(async ({reason, temporary}) => {
+ if (temporary) return;
+ switch (reason) {
+ case "install":
+ case "update":
+ {
+ const url = "https://www.eff.org/https-everywhere/set-https-default-your-browser";
+ await chrome.tabs.create({ active : false, url: url });
+ }
+ break;
}
-}
+});
/**
* Clear any cache/ blacklist we have.
@@ -730,13 +964,13 @@ function destroy_caches() {
all_rules.ruleCache.clear();
rules.settings.domainBlacklist.clear();
urlBlacklist.clear();
+ httpOnceList.clear();
}
Object.assign(exports, {
all_rules,
- urlBlacklist,
- sortSwitchPlanner,
- switchPlannerInfo
+ blooms,
+ urlBlacklist
});
})(typeof exports == 'undefined' ? require.scopes.background = {} : exports);
diff --git a/chromium/background-scripts/incognito.js b/chromium/background-scripts/incognito.js
index ca521771a524..7d4bc815c729 100644
--- a/chromium/background-scripts/incognito.js
+++ b/chromium/background-scripts/incognito.js
@@ -43,7 +43,7 @@ Incognito.prototype = {
}
}
},
-}
+};
/**
* Check if any incognito window still exists
diff --git a/chromium/background-scripts/ip_utils.js b/chromium/background-scripts/ip_utils.js
new file mode 100644
index 000000000000..90e0b1a44530
--- /dev/null
+++ b/chromium/background-scripts/ip_utils.js
@@ -0,0 +1,71 @@
+'use strict';
+
+(function (exports) {
+
+/**
+ * Parse and convert literal IP address into numerical IP address.
+ * @param {string} ip
+ * @returns {number}
+ */
+const parseIp = ip => {
+ if (!/^[0-9.]+$/.test(ip)) {
+ return -1;
+ }
+
+ /** @type {string[]} */
+ const octets = ip.split('.');
+
+ if (octets.length !== 4) {
+ return -1;
+ }
+
+ let ipN = 0;
+
+ for (const octet of octets) {
+ if (octet === '') {
+ return -1;
+ }
+
+ const octetN = parseInt(octet);
+
+ if (octetN < 0 || octetN > 255) {
+ return -1;
+ }
+
+ ipN = (ipN << 8) | octetN;
+ }
+
+ return ipN >>> 0;
+};
+
+/**
+ * Check if the numeric IP address is within a certain range.
+ * @param {number} ip
+ * @param {number[]} range
+ * @returns {boolean}
+ */
+const isIpInRange = (ip, [rangeIp, mask]) => (ip & mask) >>> 0 === rangeIp;
+
+// A list of local IP address ranges
+const localRanges = [
+ [/* 0.0.0.0 */ 0x00000000, /* 255.255.255.255 */ 0xffffffff],
+ [/* 127.0.0.0 */ 0x7f000000, /* 255.0.0.0 */ 0xff000000],
+ [/* 10.0.0.0 */ 0x0a000000, /* 255.0.0.0 */ 0xff000000],
+ [/* 172.16.0.0 */ 0xac100000, /* 255.240.0.0 */ 0xfff00000],
+ [/* 192.168.0.0 */ 0xc0a80000, /* 255.255.0.0 */ 0xffff0000],
+];
+
+/**
+ * Check if the numeric IP address is inside the local IP address ranges.
+ * @param {number} ip
+ * @returns {boolean}
+ */
+const isLocalIp = ip => localRanges.some(range => isIpInRange(ip, range));
+
+Object.assign(exports, {
+ parseIp,
+ isIpInRange,
+ isLocalIp
+});
+
+})(typeof exports !== 'undefined' ? exports : require.scopes.ip_utils = {});
diff --git a/chromium/background-scripts/modules/ssl_codes.js b/chromium/background-scripts/modules/ssl_codes.js
new file mode 100644
index 000000000000..ed955ec8355a
--- /dev/null
+++ b/chromium/background-scripts/modules/ssl_codes.js
@@ -0,0 +1,48 @@
+"use strict";
+
+/**
+ * @exports error_list
+ * @type {array}
+ * @description A list of known SSL config errors to filter through and not try to upgrade the user
+ * @see
+ * Chrome SSL errors: https://github.com/chromium/chromium/blob/master/components/domain_reliability/util.cc
+ * Firefox SSL Errors: https://hg.mozilla.org/releases/mozilla-release/file/tip/security/manager/locales/en-US/chrome/pipnss/nsserrors.properties
+ */
+
+(function (exports) {
+
+const error_list = [
+ "net::ERR_SSL_PROTOCOL_ERROR",
+ "net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH",
+ "net::ERR_SSL_UNRECOGNIZED_NAME_ALERT",
+ "net::ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN",
+ "net::ERR_CERT_COMMON_NAME_INVALID",
+ "net::ERR_CERT_DATE_INVALID",
+ "net::ERR_CERT_AUTHORITY_INVALID",
+ "net::ERR_CERT_REVOKED",
+ "net::ERR_CERT_INVALID",
+ "net::ERR_CONNECTION_CLOSED",
+ "net::ERR_CONNECTION_RESET",
+ "net::ERR_CONNECTION_REFUSED",
+ "net::ERR_CONNECTION_ABORTED",
+ "net::ERR_CONNECTION_FAILED",
+ "net::ERR_ABORTED", ,
+ "NS_ERROR_CONNECTION_REFUSED",
+ "NS_ERROR_NET_ON_TLS_HANDSHAKE_ENDED",
+ "NS_BINDING_ABORTED",
+ "SSL received a record that exceeded the maximum permissible length.",
+ "Peer’s Certificate has expired.",
+ "Unable to communicate securely with peer: requested domain name does not match the server’s certificate.",
+ "Peer’s Certificate issuer is not recognized.",
+ "Peer’s Certificate has been revoked.",
+ "Peer reports it experienced an internal error.",
+ "The server uses key pinning (HPKP) but no trusted certificate chain could be constructed that matches the pinset. Key pinning violations cannot be overridden.",
+ "SSL received a weak ephemeral Diffie-Hellman key in Server Key Exchange handshake message.",
+ "The certificate was signed using a signature algorithm that is disabled because it is not secure.",
+ "Cannot communicate securely with peer: no common encryption algorithm(s).",
+ "SSL peer has no certificate for the requested DNS name."
+];
+
+Object.assign(exports, { error_list });
+
+})(typeof exports !== 'undefined' ? exports : require.scopes.ssl_codes = {});
\ No newline at end of file
diff --git a/chromium/background-scripts/rules.js b/chromium/background-scripts/rules.js
index 6166b0f7ffa3..7f0a5b550637 100644
--- a/chromium/background-scripts/rules.js
+++ b/chromium/background-scripts/rules.js
@@ -2,7 +2,8 @@
(function(exports) {
-const util = require('./util');
+const util = require('./util'),
+ wasm = require('./wasm');
let settings = {
enableMixedRulesets: false,
@@ -10,50 +11,50 @@ let settings = {
};
// To reduce memory usage for the numerous rules/cookies with trivial rules
-const trivial_rule_from_c = /^http:/;
-const trivial_rule_to = 'https:';
const trivial_cookie_rule_c = /.+/;
-// Empty iterable singleton to reduce memory usage
-const nullIterable = Object.create(null, {
- [Symbol.iterator]: {
- value: function* () {
- // do nothing
- }
- },
+/* A map of all scope RegExp objects */
+const scopes = new Map();
- size: {
- value: 0
- },
-});
+/**
+ * Returns the scope object from the map for the given scope string.
+ * @param {string} scope ruleset scope string
+ * @returns {RegExp}
+ */
+function getScope(scope) {
+ if (!scopes.has(scope)) {
+ scopes.set(scope, new RegExp(scope));
+ }
+ return scopes.get(scope);
+}
/**
- * A single rule
+ * Constructs a single rule
* @param from
* @param to
* @constructor
*/
function Rule(from, to) {
+ this.from_c = new RegExp(from);
+ this.to = to;
+}
+
+// To reduce memory usage for the numerous rules/cookies with trivial rules
+const trivial_rule = new Rule("^http:", "https:");
+
+/**
+ * Returns a common trivial rule or constructs a new one.
+ */
+function getRule(from, to) {
if (from === "^http:" && to === "https:") {
// This is a trivial rule, rewriting http->https with no complex RegExp.
- this.to = trivial_rule_to;
- this.from_c = trivial_rule_from_c;
+ return trivial_rule;
} else {
// This is a non-trivial rule.
- this.to = to;
- this.from_c = new RegExp(from);
+ return new Rule(from, to);
}
}
-/**
- * Regex-Compile a pattern
- * @param pattern The pattern to compile
- * @constructor
- */
-function Exclusion(pattern) {
- this.pattern_c = new RegExp(pattern);
-}
-
/**
* Generates a CookieRule
* @param host The host regex to compile
@@ -78,18 +79,20 @@ function CookieRule(host, cookiename) {
/**
*A collection of rules
- * @param set_name The name of this set
- * @param default_state activity state
- * @param note Note will be displayed in popup
+ * @param {string} set_name The name of this set
+ * @param {boolean} default_state activity state
+ * @param {string} scope ruleset scope string
+ * @param {string} note Note will be displayed in popup
* @constructor
*/
-function RuleSet(set_name, default_state, note) {
+function RuleSet(set_name, default_state, scope, note) {
this.name = set_name;
this.rules = [];
this.exclusions = null;
this.cookierules = null;
this.active = default_state;
this.default_state = default_state;
+ this.scope = getScope(scope);
this.note = note;
}
@@ -102,13 +105,9 @@ RuleSet.prototype = {
apply: function(urispec) {
var returl = null;
// If we're covered by an exclusion, go home
- if (this.exclusions !== null) {
- for (let exclusion of this.exclusions) {
- if (exclusion.pattern_c.test(urispec)) {
- util.log(util.DBUG, "excluded uri " + urispec);
- return null;
- }
- }
+ if (this.exclusions !== null && this.exclusions.test(urispec)) {
+ util.log(util.DBUG, "excluded uri " + urispec);
+ return null;
}
// Okay, now find the first rule that triggers
@@ -130,21 +129,21 @@ RuleSet.prototype = {
isEquivalentTo: function(ruleset) {
if(this.name != ruleset.name ||
this.note != ruleset.note ||
- this.state != ruleset.state ||
+ this.active != ruleset.active ||
this.default_state != ruleset.default_state) {
return false;
}
try {
- var this_exclusions_length = this.exclusions.length;
+ var this_exclusions_source = this.exclusions.source;
} catch(e) {
- var this_exclusions_length = 0;
+ var this_exclusions_source = null;
}
try {
- var ruleset_exclusions_length = ruleset.exclusions.length;
+ var ruleset_exclusions_source = ruleset.exclusions.source;
} catch(e) {
- var ruleset_exclusions_length = 0;
+ var ruleset_exclusions_source = null;
}
try {
@@ -159,24 +158,22 @@ RuleSet.prototype = {
var ruleset_rules_length = 0;
}
- if(this_exclusions_length != ruleset_exclusions_length ||
- this_rules_length != ruleset_rules_length) {
+ if(this_rules_length != ruleset_rules_length) {
return false;
}
- if(this_exclusions_length > 0) {
- for(let x = 0; x < this.exclusions.length; x++){
- if(this.exclusions[x].pattern_c != ruleset.exclusions[x].pattern_c) {
- return false;
- }
- }
+
+ if (this_exclusions_source != ruleset_exclusions_source) {
+ return false;
}
+
if(this_rules_length > 0) {
- for(let x = 0; x < this.rules.length; x++){
+ for(let x = 0; x < this.rules.length; x++) {
if(this.rules[x].to != ruleset.rules[x].to) {
return false;
}
}
}
+
return true;
}
@@ -184,7 +181,6 @@ RuleSet.prototype = {
/**
* Initialize Rule Sets
- * @param ruleActiveStates default state for rules
* @constructor
*/
function RuleSets() {
@@ -197,7 +193,10 @@ function RuleSets() {
// A cache for cookie hostnames.
this.cookieHostCache = new Map();
- // A hash of rule name -> active status (true/false).
+ /**
+ * A hash of rule name -> active status (true/false).
+ * @type {Object}
+ */
this.ruleActiveStates = {};
// The key to retrieve user rules from the storage api
@@ -216,47 +215,74 @@ RuleSets.prototype = {
loadFromBrowserStorage: async function(store, applyStoredFunc) {
this.store = store;
this.ruleActiveStates = await this.store.get_promise('ruleActiveStates', {});
+ try {
+ this.wasm_rs = wasm.RuleSets.new();
+ } catch(e) {
+ util.log(util.WARN, 'Falling back to pure JS implementation: ' + e);
+ }
await applyStoredFunc(this);
- this.loadStoredUserRules();
+ await this.loadStoredUserRules();
await this.addStoredCustomRulesets();
},
/**
- * Iterate through data XML and load rulesets
+ * Convert XML to JS and load rulesets
+ * @param {Document} ruleXml
+ * @param {string} scope
*/
- addFromXml: function(ruleXml) {
- var sets = ruleXml.getElementsByTagName("ruleset");
- for (let s of sets) {
- try {
- this.parseOneXmlRuleset(s);
- } catch (e) {
- util.log(util.WARN, 'Error processing ruleset:' + e);
- }
+ addFromXml: function(ruleXml, scope) {
+ const rulesets_xml = ruleXml.getElementsByTagName("ruleset");
+
+ let rulesets = [];
+ for (let ruleset_xml of rulesets_xml) {
+ rulesets.push(this.convertOneXmlToJs(ruleset_xml));
}
+
+ this.addFromJson(rulesets, scope);
},
- addFromJson: function(ruleJson) {
- for (let ruleset of ruleJson) {
- try {
- this.parseOneJsonRuleset(ruleset);
- } catch(e) {
- util.log(util.WARN, 'Error processing ruleset:' + e);
+ /**
+ * @param {*} ruleJson
+ * @param {string} scope
+ */
+ addFromJson: function(ruleJson, scope) {
+ if (this.wasm_rs) {
+ this.wasm_rs.add_all_from_js_array(
+ ruleJson,
+ settings.enableMixedRulesets,
+ this.ruleActiveStates,
+ scope);
+ } else {
+ for (let ruleset of ruleJson) {
+ try {
+ this.parseOneJsonRuleset(ruleset, scope);
+ } catch(e) {
+ util.log(util.WARN, 'Error processing ruleset:' + e);
+ }
}
}
},
- parseOneJsonRuleset: function(ruletag) {
+ /**
+ * Parse one JSON format ruleset element
+ * @param {*} ruletag
+ * @param {string} scope
+ */
+ parseOneJsonRuleset: function(ruletag, scope) {
var default_state = true;
var note = "";
var default_off = ruletag["default_off"];
if (default_off) {
default_state = false;
+ if (default_off === "user rule") {
+ default_state = true;
+ }
note += default_off + "\n";
}
// If a ruleset declares a platform, and we don't match it, treat it as
// off-by-default. In practice, this excludes "mixedcontent" rules.
- var platform = ruletag["platform"]
+ var platform = ruletag["platform"];
if (platform) {
default_state = false;
if (platform == "mixedcontent" && settings.enableMixedRulesets) {
@@ -265,7 +291,7 @@ RuleSets.prototype = {
note += "Platform(s): " + platform + "\n";
}
- var rule_set = new RuleSet(ruletag["name"], default_state, note.trim());
+ var rule_set = new RuleSet(ruletag["name"], default_state, scope, note.trim());
// Read user prefs
if (rule_set.name in this.ruleActiveStates) {
@@ -275,20 +301,13 @@ RuleSets.prototype = {
var rules = ruletag["rule"];
for (let rule of rules) {
if (rule["from"] != null && rule["to"] != null) {
- rule_set.rules.push(new Rule(rule["from"], rule["to"]));
+ rule_set.rules.push(getRule(rule["from"], rule["to"]));
}
}
var exclusions = ruletag["exclusion"];
if (exclusions != null) {
- for (let exclusion of exclusions) {
- if (exclusion != null) {
- if (!rule_set.exclusions) {
- rule_set.exclusions = [];
- }
- rule_set.exclusions.push(new Exclusion(exclusion));
- }
- }
+ rule_set.exclusions = new RegExp(exclusions.join("|"));
}
var cookierules = ruletag["securecookie"];
@@ -317,22 +336,27 @@ RuleSets.prototype = {
/**
* Load a user rule
* @param params
+ * @param {string} scope
* @returns {boolean}
*/
- addUserRule : function(params) {
+ addUserRule : function(params, scope) {
util.log(util.INFO, 'adding new user rule for ' + JSON.stringify(params));
- var new_rule_set = new RuleSet(params.host, true, "user rule");
- var new_rule = new Rule(params.urlMatcher, params.redirectTo);
- new_rule_set.rules.push(new_rule);
- if (!this.targets.has(params.host)) {
- this.targets.set(params.host, []);
+ if (this.wasm_rs) {
+ this.wasm_rs.add_all_from_js_array(
+ [params],
+ settings.enableMixedRulesets,
+ this.ruleActiveStates,
+ scope);
+ } else {
+ this.parseOneJsonRuleset(params, scope);
}
- this.ruleCache.delete(params.host);
- // TODO: maybe promote this rule?
- this.targets.get(params.host).push(new_rule_set);
- if (new_rule_set.name in this.ruleActiveStates) {
- new_rule_set.active = this.ruleActiveStates[new_rule_set.name];
+
+ // clear cache so new rule take effect immediately
+ for (const target of params.target) {
+ this.ruleCache.delete(target);
}
+
+ // TODO: maybe promote this rule?
util.log(util.INFO, 'done adding rule');
return true;
},
@@ -342,20 +366,38 @@ RuleSets.prototype = {
* @param params
* @returns {boolean}
*/
- removeUserRule: function(ruleset) {
+ removeUserRule: function(ruleset, src) {
+ /**
+ * FIXME: We have to use ruleset.name here because the ruleset itself
+ * carries no information on the target it is applying on. This also
+ * made it impossible for users to set custom ruleset name.
+ */
util.log(util.INFO, 'removing user rule for ' + JSON.stringify(ruleset));
+
+ // Remove any cache from runtime
this.ruleCache.delete(ruleset.name);
+ if (src === 'popup') {
- var tmp = this.targets.get(ruleset.name).filter(r =>
- !(r.isEquivalentTo(ruleset))
- );
- this.targets.set(ruleset.name, tmp);
+ if (this.wasm_rs) {
+ this.wasm_rs.remove_ruleset(ruleset);
+ } else {
+ const tmp = this.targets.get(ruleset.name).filter(r => !r.isEquivalentTo(ruleset));
+ this.targets.set(ruleset.name, tmp);
- if (this.targets.get(ruleset.name).length == 0) {
- this.targets.delete(ruleset.name);
+ if (this.targets.get(ruleset.name).length == 0) {
+ this.targets.delete(ruleset.name);
+ }
+ }
}
+ if (src === 'options') {
+ /**
+ * FIXME: There is nothing we can do if the call comes from the
+ * option page because isEquivalentTo cannot work reliably.
+ * Leave the heavy duties to background.js to call initializeAllRules
+ */
+ }
util.log(util.INFO, 'done removing rule');
return true;
},
@@ -370,12 +412,12 @@ RuleSets.prototype = {
/**
* Load all stored user rules into this RuleSet object
*/
- loadStoredUserRules: async function() {
- const user_rules = await this.getStoredUserRules();
- for (let user_rule of user_rules) {
- this.addUserRule(user_rule);
- }
- util.log(util.INFO, 'loaded ' + user_rules.length + ' stored user rules');
+ loadStoredUserRules: function() {
+ return this.getStoredUserRules()
+ .then(userRules => {
+ this.addFromJson(userRules, '');
+ util.log(util.INFO, `loaded ${userRules.length} stored user rules`);
+ });
},
/**
@@ -384,7 +426,7 @@ RuleSets.prototype = {
* @param cb: Callback to call after success/fail
* */
addNewRuleAndStore: async function(params) {
- if (this.addUserRule(params)) {
+ if (this.addUserRule(params, '')) {
// If we successfully added the user rule, save it in the storage
// api so it's automatically applied when the extension is
// reloaded.
@@ -401,19 +443,26 @@ RuleSets.prototype = {
* Removes a user rule
* @param ruleset: the ruleset to remove
* */
- removeRuleAndStore: async function(ruleset) {
- if (this.removeUserRule(ruleset)) {
- // If we successfully removed the user rule, remove it in local storage too
+ removeRuleAndStore: async function(ruleset, src) {
+ if (this.removeUserRule(ruleset, src)) {
let userRules = await this.getStoredUserRules();
- userRules = userRules.filter(r =>
- !(r.host == ruleset.name &&
- r.redirectTo == ruleset.rules[0].to)
- );
+
+ if (src === 'popup') {
+ userRules = userRules.filter(r =>
+ !(r.name === ruleset.name && r.rule[0].to === ruleset.rules[0].to)
+ );
+ }
+
+ if (src === 'options') {
+ userRules = userRules.filter(r =>
+ !(r.name === ruleset.name && r.rule[0].to === ruleset.rule[0].to)
+ );
+ }
await this.store.set_promise(this.USER_RULE_KEY, userRules);
}
},
- addStoredCustomRulesets: function(){
+ addStoredCustomRulesets: function() {
return new Promise(resolve => {
this.store.get({
legacy_custom_rulesets: [],
@@ -427,17 +476,17 @@ RuleSets.prototype = {
},
// Load in the legacy custom rulesets, if any
- loadCustomRulesets: function(legacy_custom_rulesets){
- for(let legacy_custom_ruleset of legacy_custom_rulesets){
+ loadCustomRulesets: function(legacy_custom_rulesets) {
+ for(let legacy_custom_ruleset of legacy_custom_rulesets) {
this.loadCustomRuleset(legacy_custom_ruleset);
}
},
- loadCustomRuleset: function(ruleset_string){
- this.addFromXml((new DOMParser()).parseFromString(ruleset_string, 'text/xml'));
+ loadCustomRuleset: function(ruleset_string) {
+ this.addFromXml((new DOMParser()).parseFromString(ruleset_string, 'text/xml'), '');
},
- setRuleActiveState: async function(ruleset_name, active){
+ setRuleActiveState: async function(ruleset_name, active) {
if (active == undefined) {
delete this.ruleActiveStates[ruleset_name];
} else {
@@ -447,70 +496,70 @@ RuleSets.prototype = {
},
/**
- * Does the loading of a ruleset.
+ * Converts an XML ruleset to a JS ruleset for parsing
* @param ruletag The whole tag to parse
*/
- parseOneXmlRuleset: function(ruletag) {
- var default_state = true;
- var note = "";
- var default_off = ruletag.getAttribute("default_off");
- if (default_off) {
- default_state = false;
- note += default_off + "\n";
- }
+ convertOneXmlToJs: function(ruletag) {
+ try {
+ let ruleset = {};
- // If a ruleset declares a platform, and we don't match it, treat it as
- // off-by-default. In practice, this excludes "mixedcontent" rules.
- var platform = ruletag.getAttribute("platform");
- if (platform) {
- default_state = false;
- if (platform == "mixedcontent" && settings.enableMixedRulesets) {
- default_state = true;
+ let default_off = ruletag.getAttribute("default_off");
+ if (default_off) {
+ ruleset["default_off"] = default_off;
}
- note += "Platform(s): " + platform + "\n";
- }
- var rule_set = new RuleSet(ruletag.getAttribute("name"),
- default_state,
- note.trim());
+ let platform = ruletag.getAttribute("platform");
+ if (platform) {
+ ruleset["platform"] = platform;
+ }
- // Read user prefs
- if (rule_set.name in this.ruleActiveStates) {
- rule_set.active = (this.ruleActiveStates[rule_set.name] == "true");
- }
+ let name = ruletag.getAttribute("name");
+ if (name) {
+ ruleset["name"] = name;
+ }
- var rules = ruletag.getElementsByTagName("rule");
- for (let rule of rules) {
- rule_set.rules.push(new Rule(rule.getAttribute("from"),
- rule.getAttribute("to")));
- }
+ let rules = [];
+ for (let rule of ruletag.getElementsByTagName("rule")) {
+ rules.push({
+ from: rule.getAttribute("from"),
+ to: rule.getAttribute("to")
+ });
+ }
+ if (rules.length > 0) {
+ ruleset["rule"] = rules;
+ }
- var exclusions = ruletag.getElementsByTagName("exclusion");
- if (exclusions.length > 0) {
- rule_set.exclusions = [];
- for (let exclusion of exclusions) {
- rule_set.exclusions.push(
- new Exclusion(exclusion.getAttribute("pattern")));
+ let exclusions = [];
+ for (let exclusion of ruletag.getElementsByTagName("exclusion")) {
+ exclusions.push(exclusion.getAttribute("pattern"));
+ }
+ if (exclusions.length > 0) {
+ ruleset["exclusion"] = exclusions;
}
- }
- var cookierules = ruletag.getElementsByTagName("securecookie");
- if (cookierules.length > 0) {
- rule_set.cookierules = [];
- for (let cookierule of cookierules) {
- rule_set.cookierules.push(
- new CookieRule(cookierule.getAttribute("host"),
- cookierule.getAttribute("name")));
+ let cookierules = [];
+ for (let cookierule of ruletag.getElementsByTagName("securecookie")) {
+ cookierules.push({
+ host: cookierule.getAttribute("host"),
+ name: cookierule.getAttribute("name")
+ });
+ }
+ if (cookierules.length > 0) {
+ ruleset["securecookie"] = cookierules;
}
- }
- var targets = ruletag.getElementsByTagName("target");
- for (let target of targets) {
- var host = target.getAttribute("host");
- if (!this.targets.has(host)) {
- this.targets.set(host, []);
+ let targets = [];
+ for (let target of ruletag.getElementsByTagName("target")) {
+ targets.push(target.getAttribute("host"));
}
- this.targets.get(host).push(rule_set);
+ if (targets.length > 0) {
+ ruleset["target"] = targets;
+ }
+
+ return ruleset;
+ } catch (e) {
+ util.log(util.WARN, 'Error converting ruleset to JS:' + e);
+ return {};
}
},
@@ -529,50 +578,59 @@ RuleSets.prototype = {
util.log(util.DBUG, "Ruleset cache miss for " + host);
}
- // Let's begin search
- // Copy the host targsts so we don't modify them.
- let results = (this.targets.has(host) ?
- new Set([...this.targets.get(host)]) :
- new Set());
+ let results;
+ if (this.wasm_rs) {
+ let pa = this.wasm_rs.potentially_applicable(host);
+ results = new Set([...pa].map(ruleset => {
+ let rs = new RuleSet(ruleset.name, ruleset.default_state, ruleset.scope, ruleset.note);
- // Ensure host is well-formed (RFC 1035)
- if (host.length <= 0 || host.length > 255 || host.indexOf("..") != -1) {
- util.log(util.WARN, "Malformed host passed to potentiallyApplicableRulesets: " + host);
- return nullIterable;
- }
-
- // Replace each portion of the domain with a * in turn
- let segmented = host.split(".");
- for (let i = 0; i < segmented.length; i++) {
- let tmp = segmented[i];
- segmented[i] = "*";
+ if (ruleset.cookierules) {
+ let cookierules = ruleset.cookierules.map(cookierule => {
+ return new CookieRule(cookierule.host, cookierule.name);
+ });
+ rs.cookierules = cookierules;
+ } else {
+ rs.cookierules = null;
+ }
- results = (this.targets.has(segmented.join(".")) ?
- new Set([...results, ...this.targets.get(segmented.join("."))]) :
- results);
+ let rules = ruleset.rules.map(rule => {
+ return getRule(rule.from, rule.to);
+ });
+ rs.rules = rules;
- segmented[i] = tmp;
- }
+ if (ruleset.exclusions) {
+ rs.exclusions = new RegExp(ruleset.exclusions);
+ } else {
+ rs.exclusions = null;
+ }
- // now eat away from the left, with *, so that for x.y.z.google.com we
- // check *.z.google.com and *.google.com (we did *.y.z.google.com above)
- for (let i = 2; i <= segmented.length - 2; i++) {
- let t = "*." + segmented.slice(i, segmented.length).join(".");
+ rs.active = ruleset.active;
- results = (this.targets.has(t) ?
- new Set([...results, ...this.targets.get(t)]) :
- results);
- }
+ return rs;
+ }));
+ } else {
+ // Let's begin search
+ results = (this.targets.has(host) ?
+ new Set([...this.targets.get(host)]) :
+ new Set());
+
+ let expressions = util.getWildcardExpressions(host);
+ for (const expression of expressions) {
+ results = (this.targets.has(expression) ?
+ new Set([...results, ...this.targets.get(expression)]) :
+ results);
+ }
- // Clean the results list, which may contain duplicates or undefined entries
- results.delete(undefined);
+ // Clean the results list, which may contain duplicates or undefined entries
+ results.delete(undefined);
- util.log(util.DBUG,"Applicable rules for " + host + ":");
- if (results.size == 0) {
- util.log(util.DBUG, " None");
- results = nullIterable;
- } else {
- results.forEach(result => util.log(util.DBUG, " " + result.name));
+ util.log(util.DBUG,"Applicable rules for " + host + ":");
+ if (results.size == 0) {
+ util.log(util.DBUG, " None");
+ results = util.nullIterable;
+ } else {
+ results.forEach(result => util.log(util.DBUG, " " + result.name));
+ }
}
// Insert results into the ruleset cache
@@ -590,39 +648,15 @@ RuleSets.prototype = {
/**
* Check to see if the Cookie object c meets any of our cookierule criteria for being marked as secure.
* @param cookie The cookie to test
- * @returns {*} ruleset or null
+ * @returns {*} true or false
*/
shouldSecureCookie: function(cookie) {
- var hostname = cookie.domain;
+ let hostname = cookie.domain;
// cookie domain scopes can start with .
while (hostname.charAt(0) == ".") {
hostname = hostname.slice(1);
}
- if (!this.safeToSecureCookie(hostname)) {
- return null;
- }
-
- var potentiallyApplicable = this.potentiallyApplicableRulesets(hostname);
- for (let ruleset of potentiallyApplicable) {
- if (ruleset.cookierules !== null && ruleset.active) {
- for (let cookierules of ruleset.cookierules) {
- var cr = cookierules;
- if (cr.host_c.test(cookie.domain) && cr.name_c.test(cookie.name)) {
- return ruleset;
- }
- }
- }
- }
- return null;
- },
-
- /**
- * Check if it is secure to secure the cookie (=patch the secure flag in).
- * @param domain The domain of the cookie
- * @returns {*} true or false
- */
- safeToSecureCookie: function(domain) {
// Check if the domain might be being served over HTTP. If so, it isn't
// safe to secure a cookie! We can't always know this for sure because
// observing cookie-changed doesn't give us enough context to know the
@@ -635,20 +669,57 @@ RuleSets.prototype = {
// observed and the domain blacklisted, a cookie might already have been
// flagged as secure.
- if (settings.domainBlacklist.has(domain)) {
- util.log(util.INFO, "cookies for " + domain + "blacklisted");
+ if (settings.domainBlacklist.has(hostname)) {
+ util.log(util.INFO, "cookies for " + hostname + "blacklisted");
return false;
}
- var cached_item = this.cookieHostCache.get(domain);
- if (cached_item !== undefined) {
- util.log(util.DBUG, "Cookie host cache hit for " + domain);
- return cached_item;
+
+ // Second, we need a cookie pass two tests before patching it
+ // (1) it is safe to secure the cookie, as per safeToSecureCookie()
+ // (2) it matches with the CookieRule
+ //
+ // We kept a cache of the results for (1), if we have a cached result which
+ // (a) is false, we should not secure the cookie for sure
+ // (b) is true, we need to perform test (2)
+ //
+ // Otherwise,
+ // (c) We need to perform (1) and (2) in place
+
+ let safe = false;
+ if (this.cookieHostCache.has(hostname)) {
+ util.log(util.DBUG, "Cookie host cache hit for " + hostname);
+ safe = this.cookieHostCache.get(hostname); // true only if it is case (b)
+ if (!safe) {
+ return false; // (a)
+ }
+ } else {
+ util.log(util.DBUG, "Cookie host cache miss for " + hostname);
}
- util.log(util.DBUG, "Cookie host cache miss for " + domain);
- // If we passed that test, make up a random URL on the domain, and see if
- // we would HTTPSify that.
+ const potentiallyApplicable = this.potentiallyApplicableRulesets(hostname);
+ for (const ruleset of potentiallyApplicable) {
+ if (ruleset.cookierules !== null && ruleset.active) {
+ // safe is false only indicate the lack of a cached result
+ // we cannot use it to avoid looping here
+ for (const cookierule of ruleset.cookierules) {
+ // if safe is true, it is case (b); otherwise it is case (c)
+ if (cookierule.host_c.test(cookie.domain) && cookierule.name_c.test(cookie.name)) {
+ return safe || this.safeToSecureCookie(hostname, potentiallyApplicable);
+ }
+ }
+ }
+ }
+ return false;
+ },
+ /**
+ * Check if it is secure to secure the cookie (=patch the secure flag in).
+ * @param domain The domain of the cookie
+ * @param potentiallyApplicable
+ * @returns {*} true or false
+ */
+ safeToSecureCookie: function(domain, potentiallyApplicable) {
+ // Make up a random URL on the domain, and see if we would HTTPSify that.
var nonce_path = "/" + Math.random().toString();
var test_uri = "http://" + domain + nonce_path + nonce_path;
@@ -659,12 +730,8 @@ RuleSets.prototype = {
}
util.log(util.INFO, "Testing securecookie applicability with " + test_uri);
- var potentiallyApplicable = this.potentiallyApplicableRulesets(domain);
for (let ruleset of potentiallyApplicable) {
- if (!ruleset.active) {
- continue;
- }
- if (ruleset.apply(test_uri)) {
+ if (ruleset.active && ruleset.apply(test_uri)) {
util.log(util.INFO, "Cookie domain could be secured.");
this.cookieHostCache.set(domain, true);
return true;
@@ -675,6 +742,36 @@ RuleSets.prototype = {
return false;
},
+ /**
+ * Get a list of simple rules (active, with no exclusions) for all hosts that
+ * are in a single ruleset, and end in the specified ending.
+ * @param ending Target ending to search for
+ * @returns A list of { host, from_regex, to, scope_regex }
+ */
+ getSimpleRulesEndingWith: function(ending) {
+ let results;
+
+ if (this.wasm_rs) {
+ results = this.wasm_rs.get_simple_rules_ending_with(ending);
+ } else {
+ results = [];
+ for(let [host, rulesets] of this.targets) {
+ if (host.endsWith(ending) &&
+ rulesets.length == 1 &&
+ rulesets[0].active === true &&
+ rulesets[0].exclusions == null
+ ) {
+ for (let rule of rulesets[0].rules) {
+ if (rule.from_c.test("http://" + host + "/")) {
+ results.push({ host, from_regex: rule.from_c.toString(), to: rule.to, scope_regex: rulesets[0].scope.toString() });
+ }
+ }
+ }
+ }
+ }
+ return results;
+ },
+
/**
* Rewrite an URI
* @param urispec The uri to rewrite
@@ -694,14 +791,12 @@ RuleSets.prototype = {
};
Object.assign(exports, {
- nullIterable,
settings,
- trivial_rule_to,
- trivial_rule_from_c,
- Exclusion,
+ trivial_rule,
Rule,
RuleSet,
- RuleSets
+ RuleSets,
+ getRule
});
})(typeof exports == 'undefined' ? require.scopes.rules = {} : exports);
diff --git a/chromium/background-scripts/store.js b/chromium/background-scripts/store.js
index ce3448136a4a..e3af7cb8086f 100644
--- a/chromium/background-scripts/store.js
+++ b/chromium/background-scripts/store.js
@@ -3,12 +3,13 @@
(function(exports) {
const rules = require('./rules');
+const util = require("./util");
function initialize() {
return new Promise(resolve => {
if (chrome.storage.sync) {
chrome.storage.sync.set({"sync-set-test": true}, () => {
- if(chrome.runtime.lastError){
+ if(chrome.runtime.lastError) {
setStorage(chrome.storage.local);
} else {
setStorage(chrome.storage.sync);
@@ -51,34 +52,73 @@ function local_set_promise(key, value) {
async function performMigrations() {
- const migration_version = await get_promise('migration_version', 0);
-
- if (migration_version < 1) {
-
- let ls;
- try {
- ls = localStorage;
- } catch(e) {}
-
- let ruleActiveStates = {};
- for (const key in ls) {
- if (ls.hasOwnProperty(key)) {
- if (key == rules.RuleSets().USER_RULE_KEY){
- await set_promise(rules.RuleSets().USER_RULE_KEY, JSON.parse(ls[key]));
- } else {
- ruleActiveStates[key] = (ls[key] == "true");
+ let migration_version = await get_promise('migration_version', 0);
+
+ try {
+ if (migration_version === 0) {
+ let ls = localStorage;
+ let ruleActiveStates = {};
+
+ for (let key in ls) {
+ if (ls.hasOwnProperty(key)) {
+ if (rules.RuleSets().USER_RULE_KEY === key) {
+ await set_promise(rules.RuleSets().USER_RULE_KEY, JSON.parse(ls[key]));
+ } else {
+ ruleActiveStates[key] = (ls[key] === "true");
+ }
}
}
+ migration_version = 1;
+ await set_promise('migration_version', migration_version);
+ await set_promise('ruleActiveStates', ruleActiveStates);
}
- await set_promise('ruleActiveStates', ruleActiveStates);
+
+ } catch (e) {
+ // do nothing
+ }
+
+ if (migration_version <= 1) {
+ await get_promise(rules.RuleSets().USER_RULE_KEY, [])
+ .then(userRules => {
+ userRules = userRules.map(userRule => {
+ return {
+ name: userRule.host,
+ target: [userRule.host],
+ rule: [{ from: userRule.urlMatcher, to: userRule.redirectTo }],
+ default_off: "user rule"
+ };
+ });
+ return userRules;
+ })
+ .then(userRules => {
+ return set_promise(rules.RuleSets().USER_RULE_KEY, userRules);
+ });
+
+ migration_version = 2;
+ await set_promise('migration_version', migration_version);
}
- await set_promise('migration_version', 1);
+ if (migration_version <= 2) {
+ await get_promise('disabledList', [])
+ .then(disabledList => {
+ disabledList = disabledList.map(item => {
+ return util.getNormalisedHostname(item);
+ });
+ return disabledList;
+ })
+ .then(disabledList => {
+ return set_promise('disabledList', disabledList);
+ });
+
+ migration_version = 3;
+ await set_promise('migration_version', migration_version);
+ }
}
const local = {
- get: chrome.storage.local.get,
- set: chrome.storage.local.set,
+ get: (...args) => chrome.storage.local.get(...args),
+ set: (...args) => chrome.storage.local.set(...args),
+ remove: (...args) => chrome.storage.local.remove(...args),
get_promise: local_get_promise,
set_promise: local_set_promise
};
@@ -87,10 +127,12 @@ function setStorage(store) {
Object.assign(exports, {
get: store.get.bind(store),
set: store.set.bind(store),
+ remove: store.remove.bind(store),
get_promise,
set_promise,
local
});
+ chrome.runtime.sendMessage("store_initialized");
}
Object.assign(exports, {
diff --git a/chromium/background-scripts/update.js b/chromium/background-scripts/update.js
index 6e6116e17698..a0bc7fdf85e9 100644
--- a/chromium/background-scripts/update.js
+++ b/chromium/background-scripts/update.js
@@ -1,51 +1,74 @@
-/* global update_channels */
/* global pako */
-/* global __dirname */
"use strict";
+let combined_update_channels, extension_version;
+const { update_channels } = require('./update_channels');
+const wasm = require('./wasm');
+
// Determine if we're in the tests. If so, define some necessary components.
-if(typeof(window) == "undefined"){
- const fs = require('fs');
- const WebCrypto = require("node-webcrypto-ossl"),
+if (typeof window === "undefined") {
+ var WebCrypto = require("node-webcrypto-ossl"),
+ crypto = new WebCrypto(),
atob = require("atob"),
btoa = require("btoa"),
- encoding = require('text-encoding');
+ pako = require('../external/pako-1.0.5/pako_inflate.min.js'),
+ { TextDecoder } = require('text-encoding'),
+ chrome = require("sinon-chrome"),
+ window = { atob, btoa, chrome, crypto, pako, TextDecoder },
+ fs = require('fs');
- var window = {
- crypto: new WebCrypto(),
- atob,
- btoa
- };
+ extension_version = JSON.parse(fs.readFileSync('./manifest.json')).version;
- var update_channels = Function(fs.readFileSync(__dirname + '/update_channels.js').toString() + "return update_channels;")(),
- pako = Function(fs.readFileSync(__dirname + '/../external/pako-1.0.5/pako_inflate.min.js').toString() + "return pako;")(),
- TextDecoder = encoding.TextDecoder,
- chrome = require("sinon-chrome");
+ combined_update_channels = update_channels;
+} else {
+ extension_version = chrome.runtime.getManifest().version;
}
(function(exports) {
const util = require('./util');
+
let store,
background_callback;
// how often we should check for new rulesets
const periodicity = 86400;
-// jwk key loaded from keys.js
-let imported_keys = {};
-for(let update_channel of update_channels){
- imported_keys[update_channel.name] = window.crypto.subtle.importKey(
- "jwk",
- update_channel.jwk,
- {
- name: "RSA-PSS",
- hash: {name: "SHA-256"},
- },
- false,
- ["verify"]
- );
+const extension_date = new Date(extension_version.split('.').slice(0,3).join('-'));
+const extension_timestamp = extension_date.getTime() / 1000;
+
+let imported_keys;
+
+// update channels are loaded from `background-scripts/update_channels.js` as well as the storage api
+async function loadUpdateChannelsKeys() {
+ util.log(util.NOTE, 'Loading update channels and importing associated public keys.');
+
+ const stored_update_channels = await store.get_promise('update_channels', []);
+ const combined_update_channels_preflight = update_channels.concat(stored_update_channels);
+
+ imported_keys = {};
+ combined_update_channels = [];
+
+ for(let update_channel of combined_update_channels_preflight) {
+
+ try{
+ imported_keys[update_channel.name] = await window.crypto.subtle.importKey(
+ "jwk",
+ update_channel.jwk,
+ {
+ name: "RSA-PSS",
+ hash: {name: "SHA-256"},
+ },
+ false,
+ ["verify"]
+ );
+ combined_update_channels.push(update_channel);
+ util.log(util.NOTE, update_channel.name + ': Update channel key loaded.');
+ } catch(err) {
+ util.log(util.WARN, update_channel.name + ': Could not import key. Aborting.');
+ }
+ }
}
@@ -61,26 +84,33 @@ async function timeToNextCheck() {
}
}
-// Check for new rulesets. If found, return the timestamp. If not, return false
-async function checkForNewRulesets(update_channel) {
- let timestamp_result = await fetch(update_channel.update_path_prefix + "/latest-rulesets-timestamp");
+// Check for new rulesets immediately
+async function resetTimer() {
+ await store.local.set_promise('last-checked', false);
+ destroyTimer();
+ await createTimer();
+}
+
+// Check for new updates. If found, return the timestamp. If not, return false
+async function checkForNewUpdates(update_channel) {
+ let timestamp_result = await fetch(update_channel.update_path_prefix + (update_channel.format == "bloom" ? "/latest-bloom-timestamp" : "/latest-rulesets-timestamp"));
if(timestamp_result.status == 200) {
- let rulesets_timestamp = Number(await timestamp_result.text());
+ let uc_timestamp = Number(await timestamp_result.text());
- if((await store.local.get_promise('rulesets-timestamp: ' + update_channel.name, 0)) < rulesets_timestamp){
- return rulesets_timestamp;
+ if((await store.local.get_promise('uc-timestamp: ' + update_channel.name, 0)) < uc_timestamp) {
+ return uc_timestamp;
}
}
return false;
}
-// Retrieve the timestamp for when a stored ruleset bundle was published
-async function getRulesetTimestamps(){
+// Retrieve the timestamp for when an update channel was published
+async function getUpdateChannelTimestamps() {
let timestamp_promises = [];
- for(let update_channel of update_channels){
+ for(let update_channel of combined_update_channels) {
timestamp_promises.push(new Promise(async resolve => {
- let timestamp = await store.local.get_promise('rulesets-stored-timestamp: ' + update_channel.name, 0);
- resolve([update_channel.name, timestamp]);
+ let timestamp = await store.local.get_promise('uc-stored-timestamp: ' + update_channel.name, 0);
+ resolve([update_channel, timestamp]);
}));
}
let timestamps = await Promise.all(timestamp_promises);
@@ -90,7 +120,7 @@ async function getRulesetTimestamps(){
// Download and return new rulesets
async function getNewRulesets(rulesets_timestamp, update_channel) {
- store.local.set_promise('rulesets-timestamp: ' + update_channel.name, rulesets_timestamp);
+ store.local.set_promise('uc-timestamp: ' + update_channel.name, rulesets_timestamp);
let signature_promise = fetch(update_channel.update_path_prefix + "/rulesets-signature." + rulesets_timestamp + ".sha256");
let rulesets_promise = fetch(update_channel.update_path_prefix + "/default.rulesets." + rulesets_timestamp + ".gz");
@@ -101,8 +131,8 @@ async function getNewRulesets(rulesets_timestamp, update_channel) {
]);
let resolutions = await Promise.all([
- util.slurp(responses[0]),
- util.slurp(responses[1])
+ responses[0].arrayBuffer(),
+ responses[1].arrayBuffer()
]);
return {
@@ -111,108 +141,253 @@ async function getNewRulesets(rulesets_timestamp, update_channel) {
};
}
+// Download and return new bloom
+async function getNewBloom(bloom_timestamp, update_channel) {
+ store.local.set_promise('uc-timestamp: ' + update_channel.name, bloom_timestamp);
+
+ let signature_promise = fetch(update_channel.update_path_prefix + "/bloom-signature." + bloom_timestamp + ".sha256");
+ let bloom_metadata_promise = fetch(update_channel.update_path_prefix + "/bloom-metadata." + bloom_timestamp + ".json");
+ let bloom_promise = fetch(update_channel.update_path_prefix + "/bloom." + bloom_timestamp + ".bin");
+
+ let responses = await Promise.all([
+ signature_promise,
+ bloom_metadata_promise,
+ bloom_promise
+ ]);
+
+ let resolutions = await Promise.all([
+ responses[0].arrayBuffer(),
+ responses[1].arrayBuffer(),
+ responses[2].arrayBuffer()
+ ]);
+
+ return {
+ signature_array_buffer: resolutions[0],
+ bloom_metadata_array_buffer: resolutions[1],
+ bloom_array_buffer: resolutions[2],
+ };
+
+}
+
// Returns a promise which verifies that the rulesets have a valid EFF
// signature, and if so, stores them and returns true.
// Otherwise, it throws an exception.
-function verifyAndStoreNewRulesets(new_rulesets, rulesets_timestamp, update_channel){
+function verifyAndStoreNewRulesets(new_rulesets, rulesets_timestamp, update_channel) {
return new Promise((resolve, reject) => {
- imported_keys[update_channel.name].then(publicKey => {
- window.crypto.subtle.verify(
- {
- name: "RSA-PSS",
- saltLength: 32
- },
- publicKey,
- new_rulesets.signature_array_buffer,
- new_rulesets.rulesets_array_buffer
- ).then(async isvalid => {
- if(isvalid) {
- util.log(util.NOTE, update_channel.name + ': Downloaded ruleset signature checks out. Storing rulesets.');
-
- const rulesets_gz = util.ArrayBufferToString(new_rulesets.rulesets_array_buffer);
- const rulesets_byte_array = pako.inflate(rulesets_gz);
- const rulesets = new TextDecoder("utf-8").decode(rulesets_byte_array);
- const rulesets_json = JSON.parse(rulesets);
-
- if(rulesets_json.timestamp != rulesets_timestamp){
- reject(update_channel.name + ': Downloaded ruleset had an incorrect timestamp. This may be an attempted downgrade attack. Aborting.');
- } else {
- await store.local.set_promise('rulesets: ' + update_channel.name, window.btoa(rulesets_gz));
- resolve(true);
- }
+ window.crypto.subtle.verify(
+ {
+ name: "RSA-PSS",
+ saltLength: 32
+ },
+ imported_keys[update_channel.name],
+ new_rulesets.signature_array_buffer,
+ new_rulesets.rulesets_array_buffer
+ ).then(async isvalid => {
+ if(isvalid) {
+ util.log(util.NOTE, update_channel.name + ': Downloaded ruleset signature checks out. Storing rulesets.');
+
+ const rulesets_gz = util.ArrayBufferToString(new_rulesets.rulesets_array_buffer);
+ const rulesets_byte_array = pako.inflate(rulesets_gz);
+ const rulesets = new TextDecoder("utf-8").decode(rulesets_byte_array);
+ const rulesets_json = JSON.parse(rulesets);
+
+ if(rulesets_json.timestamp != rulesets_timestamp) {
+ reject(update_channel.name + ': Downloaded ruleset had an incorrect timestamp. This may be an attempted downgrade attack. Aborting.');
} else {
- reject(update_channel.name + ': Downloaded ruleset signature is invalid. Aborting.');
+ await store.local.set_promise('rulesets: ' + update_channel.name, window.btoa(rulesets_gz));
+ resolve(true);
}
- }).catch(() => {
- reject(update_channel.name + ': Downloaded ruleset signature could not be verified. Aborting.');
- });
+ } else {
+ reject(update_channel.name + ': Downloaded ruleset signature is invalid. Aborting.');
+ }
}).catch(() => {
- reject(update_channel.name + ': Could not import key. Aborting.');
+ reject(update_channel.name + ': Downloaded ruleset signature could not be verified. Aborting.');
});
});
}
-// Unzip and apply the rulesets we have stored.
-async function applyStoredRulesets(rulesets_obj){
- let rulesets_promises = [];
- for(let update_channel of update_channels){
- rulesets_promises.push(new Promise(resolve => {
- const key = 'rulesets: ' + update_channel.name
- chrome.storage.local.get(key, root => {
- if(root[key]){
- util.log(util.NOTE, update_channel.name + ': Applying stored rulesets.');
-
- const rulesets_gz = window.atob(root[key]);
- const rulesets_byte_array = pako.inflate(rulesets_gz);
- const rulesets = new TextDecoder("utf-8").decode(rulesets_byte_array);
- const rulesets_json = JSON.parse(rulesets);
-
- resolve(rulesets_json);
+// Returns a promise which verifies that the bloom has a valid EFF
+// signature, and if so, stores it and returns true.
+// Otherwise, it throws an exception.
+function verifyAndStoreNewBloom(new_bloom, bloom_timestamp, update_channel) {
+ return new Promise((resolve, reject) => {
+ window.crypto.subtle.verify(
+ {
+ name: "RSA-PSS",
+ saltLength: 32
+ },
+ imported_keys[update_channel.name],
+ new_bloom.signature_array_buffer,
+ new_bloom.bloom_metadata_array_buffer
+ ).then(async isvalid => {
+ if(isvalid) {
+ util.log(util.NOTE, update_channel.name + ': Bloom filter metadata signature checks out.');
+
+ const bloom_metadata = JSON.parse(util.ArrayBufferToString(new_bloom.bloom_metadata_array_buffer));
+ const bloom_str = util.ArrayBufferToString(new_bloom.bloom_array_buffer);
+
+ if(bloom_metadata.timestamp != bloom_timestamp) {
+ reject(update_channel.name + ': Downloaded bloom filter had an incorrect timestamp. This may be an attempted downgrade attack. Aborting.');
+ } else if(await sha256sum(new_bloom.bloom_array_buffer) != bloom_metadata.sha256sum) {
+ reject(update_channel.name + ': sha256sum of the bloom filter is invalid. Aborting.');
} else {
- resolve();
+ await store.local.set_promise('bloom: ' + update_channel.name, window.btoa(bloom_str));
+ await store.local.set_promise('bloom_bitmap_bits: ' + update_channel.name, bloom_metadata.bitmap_bits);
+ await store.local.set_promise('bloom_k_num: ' + update_channel.name, bloom_metadata.k_num);
+ await store.local.set_promise('bloom_sip_keys_0_0: ' + update_channel.name, bloom_metadata.sip_keys[0][0]);
+ await store.local.set_promise('bloom_sip_keys_0_1: ' + update_channel.name, bloom_metadata.sip_keys[0][1]);
+ await store.local.set_promise('bloom_sip_keys_1_0: ' + update_channel.name, bloom_metadata.sip_keys[1][0]);
+ await store.local.set_promise('bloom_sip_keys_1_1: ' + update_channel.name, bloom_metadata.sip_keys[1][1]);
+ resolve(true);
}
- });
- }));
+ } else {
+ reject(update_channel.name + ': Downloaded bloom filter metadata signature is invalid. Aborting.');
+ }
+ }).catch(() => {
+ reject(update_channel.name + ': Downloaded bloom signature could not be verified. Aborting.');
+ });
+ });
+}
+
+async function sha256sum(buffer) {
+ const hashBuffer = await window.crypto.subtle.digest('SHA-256', buffer);
+ const hashArray = Array.from(new Uint8Array(hashBuffer));
+ const hashHex = hashArray.map(b => ('00' + b.toString(16)).slice(-2)).join('');
+ return hashHex;
+}
+
+function isNotUndefined(subject) {
+ return (typeof subject != 'undefined');
+}
+
+// Apply the rulesets we have stored.
+async function applyStoredRulesets(rulesets_obj) {
+ let rulesets_promises = [];
+ for(let update_channel of combined_update_channels) {
+ if(update_channel.format == "rulesets" || !update_channel.format) {
+ rulesets_promises.push(new Promise(resolve => {
+ const key = 'rulesets: ' + update_channel.name;
+ chrome.storage.local.get(key, root => {
+ if(root[key]) {
+ util.log(util.NOTE, update_channel.name + ': Applying stored rulesets.');
+
+ const rulesets_gz = window.atob(root[key]);
+ const rulesets_byte_array = pako.inflate(rulesets_gz);
+ const rulesets_string = new TextDecoder("utf-8").decode(rulesets_byte_array);
+ const rulesets_json = JSON.parse(rulesets_string);
+
+ resolve({json: rulesets_json, scope: update_channel.scope, replaces: update_channel.replaces_default_rulesets});
+ } else {
+ resolve();
+ }
+ });
+ }));
+ }
}
- const rulesets_jsons = await Promise.all(rulesets_promises);
- if(rulesets_jsons.join("").length > 0){
- for(let rulesets_json of rulesets_jsons){
- rulesets_obj.addFromJson(rulesets_json.rulesets);
+ const rulesets_results = (await Promise.all(rulesets_promises)).filter(isNotUndefined);
+
+ let replaces = false;
+ for(const rulesets_result of rulesets_results) {
+ if(rulesets_result.replaces === true) {
+ replaces = true;
}
- } else {
- rulesets_obj.addFromJson(util.loadExtensionFile('rules/default.rulesets', 'json'));
+ rulesets_obj.addFromJson(rulesets_result.json.rulesets, rulesets_result.scope);
+ }
+
+ if(!replaces) {
+ rulesets_obj.addFromJson(util.loadExtensionFile('rules/default.rulesets', 'json'), '');
+ }
+}
+
+// Apply the blooms we have stored.
+async function applyStoredBlooms(bloom_arr) {
+ let bloom_promises = [];
+ for(let update_channel of combined_update_channels) {
+ if(update_channel.format == "bloom") {
+ bloom_promises.push(new Promise(resolve => {
+ const key = 'bloom: ' + update_channel.name;
+ chrome.storage.local.get(key, async root => {
+ if(root[key]) {
+ util.log(util.NOTE, update_channel.name + ': Applying stored bloom filter.');
+ const bloom = util.StringToArrayBuffer(window.atob(root[key]));
+ const bloom_bitmap_bits = await store.local.get_promise('bloom_bitmap_bits: ' + update_channel.name, "");
+ const bloom_k_num = await store.local.get_promise('bloom_k_num: ' + update_channel.name, "");
+ const bloom_sip_keys_0_0 = await store.local.get_promise('bloom_sip_keys_0_0: ' + update_channel.name, "");
+ const bloom_sip_keys_0_1 = await store.local.get_promise('bloom_sip_keys_0_1: ' + update_channel.name, "");
+ const bloom_sip_keys_1_0 = await store.local.get_promise('bloom_sip_keys_1_0: ' + update_channel.name, "");
+ const bloom_sip_keys_1_1 = await store.local.get_promise('bloom_sip_keys_1_1: ' + update_channel.name, "");
+
+ try{
+ resolve(wasm.Bloom.from_existing(bloom, bloom_bitmap_bits, bloom_k_num, [[bloom_sip_keys_0_0, bloom_sip_keys_0_1], [bloom_sip_keys_1_0, bloom_sip_keys_1_1]]));
+ } catch(_) {
+ resolve();
+ }
+ } else {
+ resolve();
+ }
+ });
+ }));
+ }
+ }
+
+ bloom_arr.length = 0;
+ const bloom_results = (await Promise.all(bloom_promises)).filter(isNotUndefined);
+ for(const bloom_result of bloom_results) {
+ bloom_arr.push(bloom_result);
}
}
+
// basic workflow for periodic checks
async function performCheck() {
- util.log(util.NOTE, 'Checking for new rulesets.');
+ util.log(util.NOTE, 'Checking for new updates.');
const current_timestamp = Date.now() / 1000;
store.local.set_promise('last-checked', current_timestamp);
let num_updates = 0;
- for(let update_channel of update_channels){
- let new_rulesets_timestamp = await checkForNewRulesets(update_channel);
- if(new_rulesets_timestamp){
- util.log(util.NOTE, update_channel.name + ': A new ruleset bundle has been released. Downloading now.');
- let new_rulesets = await getNewRulesets(new_rulesets_timestamp, update_channel);
- try{
- await verifyAndStoreNewRulesets(new_rulesets, new_rulesets_timestamp, update_channel);
- store.local.set_promise('rulesets-stored-timestamp: ' + update_channel.name, new_rulesets_timestamp);
- num_updates++;
- } catch(err) {
- util.log(util.WARN, update_channel.name + ': ' + err);
+ for(let update_channel of combined_update_channels) {
+ if(update_channel.format == "bloom") {
+ let new_bloom_timestamp = await checkForNewUpdates(update_channel);
+ if(new_bloom_timestamp) {
+ util.log(util.NOTE, update_channel.name + ': A new bloom filter has been released. Downloading now.');
+ let new_bloom = await getNewBloom(new_bloom_timestamp, update_channel);
+ try{
+ await verifyAndStoreNewBloom(new_bloom, new_bloom_timestamp, update_channel);
+ store.local.set_promise('uc-stored-timestamp: ' + update_channel.name, new_bloom_timestamp);
+ num_updates++;
+ } catch(err) {
+ util.log(util.WARN, update_channel.name + ': ' + err);
+ }
+ }
+ } else {
+ let new_rulesets_timestamp = await checkForNewUpdates(update_channel);
+ if(new_rulesets_timestamp) {
+
+ if(update_channel.replaces_default_rulesets && extension_timestamp > new_rulesets_timestamp) {
+ util.log(util.NOTE, update_channel.name + ': A new ruleset bundle has been released, but it is older than the extension-bundled rulesets it replaces. Skipping.');
+ continue;
+ }
+
+ util.log(util.NOTE, update_channel.name + ': A new ruleset bundle has been released. Downloading now.');
+ let new_rulesets = await getNewRulesets(new_rulesets_timestamp, update_channel);
+ try{
+ await verifyAndStoreNewRulesets(new_rulesets, new_rulesets_timestamp, update_channel);
+ store.local.set_promise('uc-stored-timestamp: ' + update_channel.name, new_rulesets_timestamp);
+ num_updates++;
+ } catch(err) {
+ util.log(util.WARN, update_channel.name + ': ' + err);
+ }
}
}
}
- if(num_updates > 0){
+ if(num_updates > 0) {
background_callback();
}
};
-chrome.storage.onChanged.addListener(async function(changes, areaName) {
+async function storageListener(changes, areaName) {
if (areaName === 'sync' || areaName === 'local') {
if ('autoUpdateRulesets' in changes) {
if (changes.autoUpdateRulesets.newValue) {
@@ -222,12 +397,26 @@ chrome.storage.onChanged.addListener(async function(changes, areaName) {
}
}
}
-});
+
+ if ('update_channels' in changes) {
+ await loadUpdateChannelsKeys();
+ }
+};
+
+function addStorageListener() {
+ chrome.storage.onChanged.addListener(storageListener);
+}
+
+function removeStorageListener() {
+ chrome.storage.onChanged.removeListener(storageListener);
+}
+
+addStorageListener();
let initialCheck,
subsequentChecks;
-async function createTimer(){
+async function createTimer() {
const time_to_next_check = await timeToNextCheck();
initialCheck = setTimeout(() => {
@@ -236,7 +425,7 @@ async function createTimer(){
}, time_to_next_check * 1000);
}
-function destroyTimer(){
+function destroyTimer() {
if (initialCheck) {
clearTimeout(initialCheck);
}
@@ -245,10 +434,33 @@ function destroyTimer(){
}
}
-async function initialize(store_param, cb){
+function clear_replacement_update_channels() {
+ let keys = [];
+ for (const update_channel of combined_update_channels) {
+ if(update_channel.replaces_default_rulesets) {
+ util.log(util.NOTE, update_channel.name + ': You have a new version of the extension. Clearing any stored rulesets, which replace the new extension-bundled ones.');
+ keys.push('uc-timestamp: ' + update_channel.name);
+ keys.push('uc-stored-timestamp: ' + update_channel.name);
+ keys.push('rulesets: ' + update_channel.name);
+ }
+ }
+
+ return new Promise(resolve => {
+ chrome.storage.local.remove(keys, resolve);
+ });
+}
+
+async function initialize(store_param, cb) {
store = store_param;
background_callback = cb;
+ await loadUpdateChannelsKeys();
+
+ if (await store.local.get_promise('extensionTimestamp', 0) !== extension_timestamp) {
+ await clear_replacement_update_channels();
+ await store.local.set_promise('extensionTimestamp', extension_timestamp);
+ }
+
if (await store.get_promise('autoUpdateRulesets', true)) {
await createTimer();
}
@@ -256,8 +468,13 @@ async function initialize(store_param, cb){
Object.assign(exports, {
applyStoredRulesets,
+ applyStoredBlooms,
initialize,
- getRulesetTimestamps
+ getUpdateChannelTimestamps,
+ resetTimer,
+ loadUpdateChannelsKeys,
+ addStorageListener,
+ removeStorageListener,
});
})(typeof exports == 'undefined' ? require.scopes.update = {} : exports);
diff --git a/chromium/background-scripts/update_channels.js b/chromium/background-scripts/update_channels.js
index e8032d874c37..80494ef0f2cc 100644
--- a/chromium/background-scripts/update_channels.js
+++ b/chromium/background-scripts/update_channels.js
@@ -1,13 +1,44 @@
/* exported update_channels */
-"use strict";
-
-var update_channels = [{
- name: "EFF (Full)",
- jwk: {
- kty: "RSA",
- e: "AQAB",
- n: "1cwvFQu3Kw-Pz8bcEFuV5zx0ZheDsc4Tva7Qv6BL90_sDLqCW79Y543nDkPtNVfFH_89pt2kSPp_IcS5XnYiw6zBQeFuILFw5JpvZt14K0s4e025Q9CXfhYKIBKT9PnqihwAacjMa6rQb7RTu7XxVvqxRb3b0vx2CR40LSlYZ8H_KpeaUwq2oz-fyrI6LFTeYvbO3ZuLKeK5xV1a32xeTVMFkIj3LxnQalxq-DRHfj7LRRoTnbRDW4uoDc8aVpLFliuO79jUKbobz4slpiWJ4wjKR_O6OK13HbZUiOSxi8Bms-UqBPOyzbMVpmA7lv_zWdaLu1IVlVXQyLVbbrqI6llRqfHdcJoEl-eC48AofuB-relQtjTEK_hyBf7sPwrbqAarjRjlyEx6Qy5gTXyxM9attfNAeupYR6jm8LKm6TFpfWkyDxUmj_f5pJMBWNTomV74f8iQ2M18_KWMUDCOf80tR0t21Q1iCWdvA3K_KJn05tTLyumlwwlQijMqRkYuao-CX9L3DJIaB3VPYPTSIPUr7oi16agsuamOyiOtlZiRpEvoNg2ksJMZtwnj5xhBQydkdhMW2ZpHDzcLuZlhJYZL_l3_7wuzRM7vpyA9obP92CpZRFJErGZmFxJC93I4U9-0B0wg-sbyMKGJ5j1BWTnibCklDXtWzXtuiz18EgE"
+'use strict';
+
+(function (exports) {
+
+exports.update_channels = [
+ {
+ name: 'EFF (Full)',
+ jwk: {
+ kty: 'RSA',
+ e: 'AQAB',
+ n: '1cwvFQu3Kw-Pz8bcEFuV5zx0ZheDsc4Tva7Qv6BL90_sDLqCW79Y543nDkPtNVfFH_89pt2kSPp_IcS5XnYiw6zBQeFuILFw5JpvZt14K0s4' +
+ 'e025Q9CXfhYKIBKT9PnqihwAacjMa6rQb7RTu7XxVvqxRb3b0vx2CR40LSlYZ8H_KpeaUwq2oz-fyrI6LFTeYvbO3ZuLKeK5xV1a32xeTVMF' +
+ 'kIj3LxnQalxq-DRHfj7LRRoTnbRDW4uoDc8aVpLFliuO79jUKbobz4slpiWJ4wjKR_O6OK13HbZUiOSxi8Bms-UqBPOyzbMVpmA7lv_zWdaL' +
+ 'u1IVlVXQyLVbbrqI6llRqfHdcJoEl-eC48AofuB-relQtjTEK_hyBf7sPwrbqAarjRjlyEx6Qy5gTXyxM9attfNAeupYR6jm8LKm6TFpfWky' +
+ 'DxUmj_f5pJMBWNTomV74f8iQ2M18_KWMUDCOf80tR0t21Q1iCWdvA3K_KJn05tTLyumlwwlQijMqRkYuao-CX9L3DJIaB3VPYPTSIPUr7oi1' +
+ '6agsuamOyiOtlZiRpEvoNg2ksJMZtwnj5xhBQydkdhMW2ZpHDzcLuZlhJYZL_l3_7wuzRM7vpyA9obP92CpZRFJErGZmFxJC93I4U9-0B0wg' +
+ '-sbyMKGJ5j1BWTnibCklDXtWzXtuiz18EgE'
+ },
+ update_path_prefix: 'https://www.https-rulesets.org/v1/',
+ scope: '',
+ replaces_default_rulesets: true
},
- update_path_prefix: "https://www.https-rulesets.org/v1/"
-}];
+ {
+ name: 'DuckDuckGo Smarter Encryption',
+ format: 'bloom',
+ jwk: {
+ kty: 'RSA',
+ e: 'AQAB',
+ n: '1cwvFQu3Kw-Pz8bcEFuV5zx0ZheDsc4Tva7Qv6BL90_sDLqCW79Y543nDkPtNVfFH_89pt2kSPp_IcS5XnYiw6zBQeFuILFw5JpvZt14K0s4' +
+ 'e025Q9CXfhYKIBKT9PnqihwAacjMa6rQb7RTu7XxVvqxRb3b0vx2CR40LSlYZ8H_KpeaUwq2oz-fyrI6LFTeYvbO3ZuLKeK5xV1a32xeTVMF' +
+ 'kIj3LxnQalxq-DRHfj7LRRoTnbRDW4uoDc8aVpLFliuO79jUKbobz4slpiWJ4wjKR_O6OK13HbZUiOSxi8Bms-UqBPOyzbMVpmA7lv_zWdaL' +
+ 'u1IVlVXQyLVbbrqI6llRqfHdcJoEl-eC48AofuB-relQtjTEK_hyBf7sPwrbqAarjRjlyEx6Qy5gTXyxM9attfNAeupYR6jm8LKm6TFpfWky' +
+ 'DxUmj_f5pJMBWNTomV74f8iQ2M18_KWMUDCOf80tR0t21Q1iCWdvA3K_KJn05tTLyumlwwlQijMqRkYuao-CX9L3DJIaB3VPYPTSIPUr7oi1' +
+ '6agsuamOyiOtlZiRpEvoNg2ksJMZtwnj5xhBQydkdhMW2ZpHDzcLuZlhJYZL_l3_7wuzRM7vpyA9obP92CpZRFJErGZmFxJC93I4U9-0B0wg' +
+ '-sbyMKGJ5j1BWTnibCklDXtWzXtuiz18EgE'
+ },
+ update_path_prefix: 'https://www.https-rulesets.org/ddg/',
+ scope: '',
+ }
+];
+
+})(typeof exports === 'undefined' ? require.scopes.update_channels = {} : exports);
diff --git a/chromium/background-scripts/util.js b/chromium/background-scripts/util.js
index 9d7dfc98bde3..e2b069b8017d 100644
--- a/chromium/background-scripts/util.js
+++ b/chromium/background-scripts/util.js
@@ -45,7 +45,7 @@ function loadExtensionFile(url, returnType) {
var xhr = new XMLHttpRequest();
// Use blocking XHR to ensure everything is loaded by the time
// we return.
- xhr.open("GET", chrome.extension.getURL(url), false);
+ xhr.open("GET", chrome.runtime.getURL(url), false);
xhr.send(null);
// Get file contents
if (xhr.readyState !== 4) {
@@ -60,6 +60,78 @@ function loadExtensionFile(url, returnType) {
return xhr.responseText;
}
+/**
+ * Remove tailing dots from hostname, e.g. "www.example.com."
+ * Preserve port numbers if they are used
+ */
+function getNormalisedHostname(host) {
+ let [ hostname, port ] = host.split(":");
+ while (hostname && hostname[hostname.length - 1] === '.' && hostname !== '.') {
+ hostname = hostname.slice(0, -1);
+ }
+ if (port) {
+ return `${hostname}:${port}`;
+ }
+ return hostname;
+}
+
+// Empty iterable singleton to reduce memory usage
+const nullIterable = Object.create(null, {
+ [Symbol.iterator]: {
+ value: function* () {
+ // do nothing
+ }
+ },
+
+ size: {
+ value: 0
+ },
+});
+
+/**
+ * Return true if host is well-formed (RFC 1035)
+ */
+function isValidHostname(host) {
+ if (host && host.length > 0 && host.length <= 255 && host.indexOf("..") === -1) {
+ return true;
+ }
+ return false;
+}
+
+/**
+ * Return a list of wildcard expressions which support
+ * the host under HTTPS Everywhere's implementation
+ */
+function getWildcardExpressions(host) {
+ // Ensure host is well-formed (RFC 1035)
+ if (!isValidHostname(host)) {
+ return nullIterable;
+ }
+
+ // Ensure host does not contain a wildcard itself
+ if (host.indexOf("*") != -1) {
+ return nullIterable;
+ }
+
+ let results = [];
+
+ // Replace www.example.com with www.example.*
+ // eat away from the right for once and only once
+ let segmented = host.split(".");
+ if (segmented.length > 1) {
+ const tmp = [...segmented.slice(0, segmented.length - 1), "*"].join(".");
+ results.push(tmp);
+ }
+
+ // now eat away from the left, with *, so that for x.y.z.google.com we
+ // check *.y.z.google.com, *.z.google.com and *.google.com
+ for (let i = 1; i < segmented.length - 1; i++) {
+ const tmp = ["*", ...segmented.slice(i, segmented.length)].join(".");
+ results.push(tmp);
+ }
+ return results;
+}
+
/**
* Convert an ArrayBuffer to string
*
@@ -69,7 +141,7 @@ function ArrayBufferToString(ab) {
let array = new Uint8Array(ab);
let string = "";
- for (let byte of array){
+ for (let byte of array) {
string += String.fromCharCode(byte);
}
@@ -77,20 +149,19 @@ function ArrayBufferToString(ab) {
}
/**
- * Return the entire contents of a fetch response object
+ * Convert a string to an ArrayBuffer
*
- * @param response: fetch response to read from
- * @return a promise which resolves to an ArrayBuffer of the fetch response contents
+ * @param string: a string to convert
*/
-function slurp(response) {
- return new Promise(res => {
- let reader = new FileReader();
- reader.addEventListener("loadend", () => res(reader.result));
-
- response.blob().then(blob => reader.readAsArrayBuffer(blob));
- });
+function StringToArrayBuffer(str) {
+ var byteArray = new Uint8Array(str.length);
+ for (var i = 0; i < str.length; i++) {
+ byteArray[i] = str.charCodeAt(i);
+ }
+ return byteArray;
}
+
Object.assign(exports, {
VERB,
DBUG,
@@ -98,11 +169,15 @@ Object.assign(exports, {
NOTE,
WARN,
log,
+ nullIterable,
+ isValidHostname,
+ getNormalisedHostname,
+ getWildcardExpressions,
setDefaultLogLevel,
getDefaultLogLevel,
loadExtensionFile,
ArrayBufferToString,
- slurp
+ StringToArrayBuffer
});
})(typeof exports == 'undefined' ? require.scopes.util = {} : exports);
diff --git a/chromium/background-scripts/wasm.js b/chromium/background-scripts/wasm.js
new file mode 100644
index 000000000000..551b1d3ea672
--- /dev/null
+++ b/chromium/background-scripts/wasm.js
@@ -0,0 +1,27 @@
+"use strict";
+
+(function(exports) {
+
+const util = require('./util'),
+ { RuleSets, Bloom } = wasm_bindgen;
+
+async function initialize() {
+ try {
+ await wasm_bindgen(chrome.runtime.getURL('wasm/https_everywhere_lib_wasm_bg.wasm'));
+ } catch(e) {
+ util.log(util.WARN, 'The wasm library has not loaded correctly: ' + e);
+ }
+}
+
+function is_enabled() {
+ return true;
+}
+
+Object.assign(exports, {
+ initialize,
+ RuleSets,
+ Bloom,
+ is_enabled,
+});
+
+})(typeof exports == 'undefined' ? require.scopes.wasm = {} : exports);
diff --git a/chromium/external/README.md b/chromium/external/README.md
index 10bc76a2dffe..031cf55c1721 100644
--- a/chromium/external/README.md
+++ b/chromium/external/README.md
@@ -4,7 +4,7 @@ This directory contains files that are external dependencies for HTTPS Everywher
## CodeMirror 5.31.0
-```
+```bash
$ npm install uglify-js@3.1.9
$ npm install uglifycss@0.0.27
$ curl -o codemirror.zip https://codemirror.net/codemirror-5.31.0.zip
@@ -40,14 +40,13 @@ uglifycss \
--output codemirror-5.31.0.min.css \
codemirror-5.31.0/lib/codemirror.css
```
+
## Pako 1.0.5
-```
-$ npm install pako@1.0.5
-```
+`$ npm install pako@1.0.5`
### pako_inflate.min.js
-```
+```bash
+
$ cp node_modules/pako/dist/pako_inflate.js pako-1.0.5/pako_inflate.min.js
-```
diff --git a/chromium/images/HTTPS-Everywhere-Logo.png b/chromium/images/HTTPS-Everywhere-Logo.png
new file mode 100644
index 000000000000..d1ebd640731b
Binary files /dev/null and b/chromium/images/HTTPS-Everywhere-Logo.png differ
diff --git a/chromium/images/banner-red.svg b/chromium/images/banner-red.svg
new file mode 100644
index 000000000000..5e1e54b9f800
--- /dev/null
+++ b/chromium/images/banner-red.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/chromium/images/eff-logo-monogram-red.png b/chromium/images/eff-logo-monogram-red.png
new file mode 100644
index 000000000000..2b91daab5203
Binary files /dev/null and b/chromium/images/eff-logo-monogram-red.png differ
diff --git a/chromium/images/onboarding/httpseverywhere-logo.png b/chromium/images/onboarding/httpseverywhere-logo.png
new file mode 100644
index 000000000000..30aebc3ee763
Binary files /dev/null and b/chromium/images/onboarding/httpseverywhere-logo.png differ
diff --git a/chromium/manifest.json b/chromium/manifest.json
index b30c41c2bf80..5a1ee704713e 100644
--- a/chromium/manifest.json
+++ b/chromium/manifest.json
@@ -10,12 +10,16 @@
"scripts": [
"background-scripts/bootstrap.js",
"background-scripts/util.js",
+ "wasm/https_everywhere_lib_wasm.js",
+ "background-scripts/wasm.js",
"background-scripts/update_channels.js",
"background-scripts/update.js",
"background-scripts/rules.js",
"background-scripts/store.js",
"external/pako-1.0.5/pako_inflate.min.js",
"background-scripts/incognito.js",
+ "background-scripts/ip_utils.js",
+ "background-scripts/modules/ssl_codes.js",
"background-scripts/background.js"
]
},
@@ -26,19 +30,20 @@
"default_popup": "pages/popup/index.html",
"default_title": "__MSG_about_ext_name__"
},
+ "content_security_policy": "script-src 'self' 'wasm-eval'; object-src 'self'",
"default_locale": "en",
"description": "__MSG_about_ext_description__",
- "devtools_page": "pages/devtools/index.html",
"homepage_url": "https://www.eff.org/https-everywhere",
"icons": {
"128": "images/icons/icon-active-128.png",
"48": "images/icons/icon-active-48.png"
},
- "incognito": "spanning",
+ "incognito": "split",
"manifest_version": 2,
"minimum_chrome_version": "55",
"name": "__MSG_about_ext_name__",
"options_ui": {
+ "open_in_tab": true,
"page": "pages/options/index.html"
},
"permissions": [
@@ -48,7 +53,11 @@
"tabs",
"cookies",
"storage",
- "*://*/*"
+ "*://*/*",
+ "ftp://*/*"
],
- "version": "2018.4.11"
+ "version": "2022.5.24",
+ "web_accessible_resources": [
+ "/pages/cancel/index.html"
+ ]
}
\ No newline at end of file
diff --git a/chromium/package-lock.json b/chromium/package-lock.json
new file mode 100644
index 000000000000..0886adcdb32c
--- /dev/null
+++ b/chromium/package-lock.json
@@ -0,0 +1,2909 @@
+{
+ "name": "https-everywhere",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "@babel/code-frame": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "^7.10.4"
+ }
+ },
+ "@babel/core": {
+ "version": "7.11.1",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.1.tgz",
+ "integrity": "sha512-XqF7F6FWQdKGGWAzGELL+aCO1p+lRY5Tj5/tbT3St1G8NaH70jhhDIKknIZaDans0OQBG5wRAldROLHSt44BgQ==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.10.4",
+ "@babel/generator": "^7.11.0",
+ "@babel/helper-module-transforms": "^7.11.0",
+ "@babel/helpers": "^7.10.4",
+ "@babel/parser": "^7.11.1",
+ "@babel/template": "^7.10.4",
+ "@babel/traverse": "^7.11.0",
+ "@babel/types": "^7.11.0",
+ "convert-source-map": "^1.7.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.1",
+ "json5": "^2.1.2",
+ "lodash": "^4.17.19",
+ "resolve": "^1.3.2",
+ "semver": "^5.4.1",
+ "source-map": "^0.5.0"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/generator": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz",
+ "integrity": "sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.11.0",
+ "jsesc": "^2.5.1",
+ "source-map": "^0.5.0"
+ }
+ },
+ "@babel/helper-function-name": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
+ "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-get-function-arity": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.10.4"
+ }
+ },
+ "@babel/helper-get-function-arity": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz",
+ "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.10.4"
+ }
+ },
+ "@babel/helper-member-expression-to-functions": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz",
+ "integrity": "sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.11.0"
+ }
+ },
+ "@babel/helper-module-imports": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz",
+ "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.10.4"
+ }
+ },
+ "@babel/helper-module-transforms": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz",
+ "integrity": "sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-imports": "^7.10.4",
+ "@babel/helper-replace-supers": "^7.10.4",
+ "@babel/helper-simple-access": "^7.10.4",
+ "@babel/helper-split-export-declaration": "^7.11.0",
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.11.0",
+ "lodash": "^4.17.19"
+ }
+ },
+ "@babel/helper-optimise-call-expression": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz",
+ "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.10.4"
+ }
+ },
+ "@babel/helper-replace-supers": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz",
+ "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-member-expression-to-functions": "^7.10.4",
+ "@babel/helper-optimise-call-expression": "^7.10.4",
+ "@babel/traverse": "^7.10.4",
+ "@babel/types": "^7.10.4"
+ }
+ },
+ "@babel/helper-simple-access": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz",
+ "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==",
+ "dev": true,
+ "requires": {
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.10.4"
+ }
+ },
+ "@babel/helper-split-export-declaration": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
+ "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.11.0"
+ }
+ },
+ "@babel/helper-validator-identifier": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
+ "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
+ "dev": true
+ },
+ "@babel/helpers": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.4.tgz",
+ "integrity": "sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==",
+ "dev": true,
+ "requires": {
+ "@babel/template": "^7.10.4",
+ "@babel/traverse": "^7.10.4",
+ "@babel/types": "^7.10.4"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ }
+ },
+ "@babel/parser": {
+ "version": "7.11.3",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz",
+ "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==",
+ "dev": true
+ },
+ "@babel/runtime": {
+ "version": "7.12.5",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz",
+ "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==",
+ "dev": true,
+ "requires": {
+ "regenerator-runtime": "^0.13.4"
+ }
+ },
+ "@babel/template": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.10.4",
+ "@babel/types": "^7.10.4"
+ }
+ },
+ "@babel/traverse": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.0.tgz",
+ "integrity": "sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.10.4",
+ "@babel/generator": "^7.11.0",
+ "@babel/helper-function-name": "^7.10.4",
+ "@babel/helper-split-export-declaration": "^7.11.0",
+ "@babel/parser": "^7.11.0",
+ "@babel/types": "^7.11.0",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0",
+ "lodash": "^4.17.19"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ }
+ }
+ },
+ "@babel/types": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
+ "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "@codemirror/autocomplete": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.0.2.tgz",
+ "integrity": "sha512-9PDjnllmXan/7Uax87KGORbxerDJ/cu10SB+n4Jz0zXMEvIh3+TGgZxhIvDOtaQ4jDBQEM7kHYW4vLdQB0DGZQ==",
+ "dev": true,
+ "requires": {
+ "@codemirror/language": "^6.0.0",
+ "@codemirror/state": "^6.0.0",
+ "@codemirror/view": "^6.0.0",
+ "@lezer/common": "^1.0.0"
+ }
+ },
+ "@codemirror/commands": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.0.1.tgz",
+ "integrity": "sha512-iNHDByicYqQjs0Wo1MKGfqNbMYMyhS9WV6EwMVwsHXImlFemgEUC+c5X22bXKBStN3qnwg4fArNZM+gkv22baQ==",
+ "dev": true,
+ "requires": {
+ "@codemirror/language": "^6.0.0",
+ "@codemirror/state": "^6.0.0",
+ "@codemirror/view": "^6.0.0",
+ "@lezer/common": "^1.0.0"
+ }
+ },
+ "@codemirror/language": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.2.0.tgz",
+ "integrity": "sha512-tabB0Ef/BflwoEmTB4a//WZ9P90UQyne9qWB9YFsmeS4bnEqSys7UpGk/da1URMXhyfuzWCwp+AQNMhvu8SfnA==",
+ "dev": true,
+ "requires": {
+ "@codemirror/state": "^6.0.0",
+ "@codemirror/view": "^6.0.0",
+ "@lezer/common": "^1.0.0",
+ "@lezer/highlight": "^1.0.0",
+ "@lezer/lr": "^1.0.0",
+ "style-mod": "^4.0.0"
+ }
+ },
+ "@codemirror/lint": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.0.0.tgz",
+ "integrity": "sha512-nUUXcJW1Xp54kNs+a1ToPLK8MadO0rMTnJB8Zk4Z8gBdrN0kqV7uvUraU/T2yqg+grDNR38Vmy/MrhQN/RgwiA==",
+ "dev": true,
+ "requires": {
+ "@codemirror/state": "^6.0.0",
+ "@codemirror/view": "^6.0.0",
+ "crelt": "^1.0.5"
+ }
+ },
+ "@codemirror/search": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.0.0.tgz",
+ "integrity": "sha512-rL0rd3AhI0TAsaJPUaEwC63KHLO7KL0Z/dYozXj6E7L3wNHRyx7RfE0/j5HsIf912EE5n2PCb4Vg0rGYmDv4UQ==",
+ "dev": true,
+ "requires": {
+ "@codemirror/state": "^6.0.0",
+ "@codemirror/view": "^6.0.0",
+ "crelt": "^1.0.5"
+ }
+ },
+ "@codemirror/state": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.1.0.tgz",
+ "integrity": "sha512-qbUr94DZTe6/V1VS7LDLz11rM/1t/nJxR1El4I6UaxDEdc0aZZvq6JCLJWiRmUf95NRAnDH6fhXn+PWp9wGCIg==",
+ "dev": true
+ },
+ "@codemirror/view": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.0.2.tgz",
+ "integrity": "sha512-mnVT/q1JvKPjpmjXJNeCi/xHyaJ3abGJsumIVpdQ1nE1MXAyHf7GHWt8QpWMUvDiqF0j+inkhVR2OviTdFFX7Q==",
+ "dev": true,
+ "requires": {
+ "@codemirror/state": "^6.0.0",
+ "style-mod": "^4.0.0",
+ "w3c-keyname": "^2.2.4"
+ }
+ },
+ "@istanbuljs/load-nyc-config": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
+ "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==",
+ "dev": true,
+ "requires": {
+ "camelcase": "^5.3.1",
+ "find-up": "^4.1.0",
+ "get-package-type": "^0.1.0",
+ "js-yaml": "^3.13.1",
+ "resolve-from": "^5.0.0"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ }
+ }
+ },
+ "@istanbuljs/schema": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz",
+ "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==",
+ "dev": true
+ },
+ "@lezer/common": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.0.0.tgz",
+ "integrity": "sha512-ohydQe+Hb+w4oMDvXzs8uuJd2NoA3D8YDcLiuDsLqH+yflDTPEpgCsWI3/6rH5C3BAedtH1/R51dxENldQceEA==",
+ "dev": true
+ },
+ "@lezer/highlight": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.0.0.tgz",
+ "integrity": "sha512-nsCnNtim90UKsB5YxoX65v3GEIw3iCHw9RM2DtdgkiqAbKh9pCdvi8AWNwkYf10Lu6fxNhXPpkpHbW6mihhvJA==",
+ "dev": true,
+ "requires": {
+ "@lezer/common": "^1.0.0"
+ }
+ },
+ "@lezer/lr": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.1.0.tgz",
+ "integrity": "sha512-Iad04uVwk1PvSnj25mqj7zEEIRAsasbsTRmVzI0AUTs/+1Dz1//iYAaoLr7A+Xa7bZDfql5MKTxZmSlkYZD3Dg==",
+ "dev": true,
+ "requires": {
+ "@lezer/common": "^1.0.0"
+ }
+ },
+ "@sinonjs/commons": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz",
+ "integrity": "sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==",
+ "dev": true,
+ "requires": {
+ "type-detect": "4.0.8"
+ }
+ },
+ "@sinonjs/fake-timers": {
+ "version": "9.1.2",
+ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz",
+ "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==",
+ "dev": true,
+ "requires": {
+ "@sinonjs/commons": "^1.7.0"
+ }
+ },
+ "@sinonjs/samsam": {
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz",
+ "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==",
+ "dev": true,
+ "requires": {
+ "@sinonjs/commons": "^1.6.0",
+ "lodash.get": "^4.4.2",
+ "type-detect": "^4.0.8"
+ }
+ },
+ "@sinonjs/text-encoding": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz",
+ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==",
+ "dev": true
+ },
+ "@types/color-name": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
+ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
+ "dev": true
+ },
+ "@ungap/promise-all-settled": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz",
+ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==",
+ "dev": true
+ },
+ "aggregate-error": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz",
+ "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==",
+ "dev": true,
+ "requires": {
+ "clean-stack": "^2.0.0",
+ "indent-string": "^4.0.0"
+ }
+ },
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ansi-colors": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
+ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
+ "dev": true
+ },
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "anymatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
+ "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
+ "dev": true,
+ "requires": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ }
+ },
+ "append-transform": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz",
+ "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==",
+ "dev": true,
+ "requires": {
+ "default-require-extensions": "^3.0.0"
+ }
+ },
+ "archy": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
+ "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
+ "dev": true
+ },
+ "argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "requires": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "array-from": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz",
+ "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=",
+ "dev": true
+ },
+ "asn1": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
+ "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
+ "dev": true,
+ "requires": {
+ "safer-buffer": "~2.1.0"
+ }
+ },
+ "assert-plus": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
+ },
+ "assertion-error": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
+ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
+ "dev": true
+ },
+ "asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
+ "dev": true
+ },
+ "atob": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
+ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
+ "dev": true
+ },
+ "aws-sign2": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
+ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
+ "dev": true
+ },
+ "aws4": {
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz",
+ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==",
+ "dev": true
+ },
+ "balanced-match": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+ "dev": true
+ },
+ "bcrypt-pbkdf": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
+ "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
+ "dev": true,
+ "requires": {
+ "tweetnacl": "^0.14.3"
+ }
+ },
+ "binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "requires": {
+ "fill-range": "^7.0.1"
+ }
+ },
+ "browser-stdout": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
+ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
+ "dev": true
+ },
+ "btoa": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz",
+ "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==",
+ "dev": true
+ },
+ "caching-transform": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz",
+ "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==",
+ "dev": true,
+ "requires": {
+ "hasha": "^5.0.0",
+ "make-dir": "^3.0.0",
+ "package-hash": "^4.0.0",
+ "write-file-atomic": "^3.0.0"
+ }
+ },
+ "camelcase": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
+ "dev": true
+ },
+ "caseless": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
+ "dev": true
+ },
+ "chai": {
+ "version": "4.3.6",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz",
+ "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==",
+ "dev": true,
+ "requires": {
+ "assertion-error": "^1.1.0",
+ "check-error": "^1.0.2",
+ "deep-eql": "^3.0.1",
+ "get-func-name": "^2.0.0",
+ "loupe": "^2.3.1",
+ "pathval": "^1.1.1",
+ "type-detect": "^4.0.5"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "dependencies": {
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "check-error": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
+ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
+ "dev": true
+ },
+ "chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "requires": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "fsevents": "~2.3.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ }
+ },
+ "clean-stack": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
+ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
+ "dev": true
+ },
+ "cliui": {
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
+ "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
+ "dev": true,
+ "requires": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^7.0.0"
+ }
+ },
+ "codemirror": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.1.tgz",
+ "integrity": "sha512-J8j+nZ+CdWmIeFIGXEFbFPtpiYacFMDR8GlHK3IyHQJMCaVRfGx9NT+Hxivv1ckLWPvNdZqndbr/7lVhrf/Svg==",
+ "dev": true,
+ "requires": {
+ "@codemirror/autocomplete": "^6.0.0",
+ "@codemirror/commands": "^6.0.0",
+ "@codemirror/language": "^6.0.0",
+ "@codemirror/lint": "^6.0.0",
+ "@codemirror/search": "^6.0.0",
+ "@codemirror/state": "^6.0.0",
+ "@codemirror/view": "^6.0.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
+ "combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dev": true,
+ "requires": {
+ "delayed-stream": "~1.0.0"
+ }
+ },
+ "commondir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
+ "dev": true
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+ "dev": true
+ },
+ "convert-source-map": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
+ "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.1.1"
+ }
+ },
+ "core-js": {
+ "version": "3.8.1",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.1.tgz",
+ "integrity": "sha512-9Id2xHY1W7m8hCl8NkhQn5CufmF/WuR30BTRewvCXc1aZd3kMECwNZ69ndLbekKfakw9Rf2Xyc+QR6E7Gg+obg==",
+ "dev": true
+ },
+ "core-util-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+ "dev": true
+ },
+ "coveralls": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz",
+ "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==",
+ "dev": true,
+ "requires": {
+ "js-yaml": "^3.13.1",
+ "lcov-parse": "^1.0.0",
+ "log-driver": "^1.2.7",
+ "minimist": "^1.2.5",
+ "request": "^2.88.2"
+ }
+ },
+ "crelt": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.5.tgz",
+ "integrity": "sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA==",
+ "dev": true
+ },
+ "cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "requires": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ }
+ },
+ "dashdash": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "^1.0.0"
+ }
+ },
+ "debug": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
+ "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
+ "dev": true,
+ "requires": {
+ "ms": "2.1.2"
+ }
+ },
+ "decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
+ "dev": true
+ },
+ "deep-eql": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
+ "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
+ "dev": true,
+ "requires": {
+ "type-detect": "^4.0.0"
+ }
+ },
+ "default-require-extensions": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz",
+ "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==",
+ "dev": true,
+ "requires": {
+ "strip-bom": "^4.0.0"
+ }
+ },
+ "delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+ "dev": true
+ },
+ "diff": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz",
+ "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==",
+ "dev": true
+ },
+ "ecc-jsbn": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
+ "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
+ "dev": true,
+ "requires": {
+ "jsbn": "~0.1.0",
+ "safer-buffer": "^2.1.0"
+ }
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "es6-error": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
+ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
+ "dev": true
+ },
+ "escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ },
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true
+ },
+ "extend": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
+ "dev": true
+ },
+ "extsprintf": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
+ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
+ "dev": true
+ },
+ "fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
+ },
+ "fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true
+ },
+ "fetch-mock": {
+ "version": "9.11.0",
+ "resolved": "https://registry.npmjs.org/fetch-mock/-/fetch-mock-9.11.0.tgz",
+ "integrity": "sha512-PG1XUv+x7iag5p/iNHD4/jdpxL9FtVSqRMUQhPab4hVDt80T1MH5ehzVrL2IdXO9Q2iBggArFvPqjUbHFuI58Q==",
+ "dev": true,
+ "requires": {
+ "@babel/core": "^7.0.0",
+ "@babel/runtime": "^7.0.0",
+ "core-js": "^3.0.0",
+ "debug": "^4.1.1",
+ "glob-to-regexp": "^0.4.0",
+ "is-subset": "^0.1.1",
+ "lodash.isequal": "^4.5.0",
+ "path-to-regexp": "^2.2.1",
+ "querystring": "^0.2.0",
+ "whatwg-url": "^6.5.0"
+ }
+ },
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "requires": {
+ "to-regex-range": "^5.0.1"
+ }
+ },
+ "find-cache-dir": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz",
+ "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==",
+ "dev": true,
+ "requires": {
+ "commondir": "^1.0.1",
+ "make-dir": "^3.0.2",
+ "pkg-dir": "^4.1.0"
+ }
+ },
+ "find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "flat": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz",
+ "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==",
+ "dev": true
+ },
+ "foreground-child": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz",
+ "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==",
+ "dev": true,
+ "requires": {
+ "cross-spawn": "^7.0.0",
+ "signal-exit": "^3.0.2"
+ }
+ },
+ "forever-agent": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
+ "dev": true
+ },
+ "form-data": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
+ "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
+ "dev": true,
+ "requires": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.6",
+ "mime-types": "^2.1.12"
+ }
+ },
+ "fromentries": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.1.tgz",
+ "integrity": "sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw==",
+ "dev": true
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "dev": true
+ },
+ "fsevents": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+ "dev": true,
+ "optional": true
+ },
+ "gensync": {
+ "version": "1.0.0-beta.1",
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz",
+ "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==",
+ "dev": true
+ },
+ "get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true
+ },
+ "get-func-name": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
+ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
+ "dev": true
+ },
+ "get-package-type": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz",
+ "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==",
+ "dev": true
+ },
+ "getpass": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
+ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "^1.0.0"
+ }
+ },
+ "glob": {
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "requires": {
+ "is-glob": "^4.0.1"
+ }
+ },
+ "glob-to-regexp": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
+ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
+ "dev": true
+ },
+ "globals": {
+ "version": "11.12.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
+ "dev": true
+ },
+ "graceful-fs": {
+ "version": "4.2.4",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
+ "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==",
+ "dev": true
+ },
+ "har-schema": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
+ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
+ "dev": true
+ },
+ "har-validator": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
+ "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
+ "dev": true,
+ "requires": {
+ "ajv": "^6.12.3",
+ "har-schema": "^2.0.0"
+ }
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "hasha": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz",
+ "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==",
+ "dev": true,
+ "requires": {
+ "is-stream": "^2.0.0",
+ "type-fest": "^0.8.0"
+ }
+ },
+ "he": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
+ "dev": true
+ },
+ "html-escaper": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
+ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
+ "dev": true
+ },
+ "http-signature": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
+ "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "^1.0.0",
+ "jsprim": "^1.2.2",
+ "sshpk": "^1.7.0"
+ }
+ },
+ "imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
+ "dev": true
+ },
+ "indent-string": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
+ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
+ "dev": true
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "dev": true,
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
+ "dev": true
+ },
+ "is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "requires": {
+ "binary-extensions": "^2.0.0"
+ }
+ },
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true
+ },
+ "is-plain-obj": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
+ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",
+ "dev": true
+ },
+ "is-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz",
+ "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==",
+ "dev": true
+ },
+ "is-subset": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz",
+ "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=",
+ "dev": true
+ },
+ "is-typedarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+ "dev": true
+ },
+ "is-unicode-supported": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",
+ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",
+ "dev": true
+ },
+ "is-windows": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
+ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
+ "dev": true
+ },
+ "isarray": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
+ "dev": true
+ },
+ "isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
+ "dev": true
+ },
+ "isstream": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
+ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
+ "dev": true
+ },
+ "istanbul-lib-coverage": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz",
+ "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==",
+ "dev": true
+ },
+ "istanbul-lib-hook": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz",
+ "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==",
+ "dev": true,
+ "requires": {
+ "append-transform": "^2.0.0"
+ }
+ },
+ "istanbul-lib-instrument": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz",
+ "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==",
+ "dev": true,
+ "requires": {
+ "@babel/core": "^7.7.5",
+ "@istanbuljs/schema": "^0.1.2",
+ "istanbul-lib-coverage": "^3.0.0",
+ "semver": "^6.3.0"
+ }
+ },
+ "istanbul-lib-processinfo": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz",
+ "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==",
+ "dev": true,
+ "requires": {
+ "archy": "^1.0.0",
+ "cross-spawn": "^7.0.0",
+ "istanbul-lib-coverage": "^3.0.0-alpha.1",
+ "make-dir": "^3.0.0",
+ "p-map": "^3.0.0",
+ "rimraf": "^3.0.0",
+ "uuid": "^3.3.3"
+ },
+ "dependencies": {
+ "uuid": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
+ "dev": true
+ }
+ }
+ },
+ "istanbul-lib-report": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",
+ "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==",
+ "dev": true,
+ "requires": {
+ "istanbul-lib-coverage": "^3.0.0",
+ "make-dir": "^3.0.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "istanbul-lib-source-maps": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz",
+ "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==",
+ "dev": true,
+ "requires": {
+ "debug": "^4.1.1",
+ "istanbul-lib-coverage": "^3.0.0",
+ "source-map": "^0.6.1"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
+ }
+ },
+ "istanbul-reports": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz",
+ "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==",
+ "dev": true,
+ "requires": {
+ "html-escaper": "^2.0.0",
+ "istanbul-lib-report": "^3.0.0"
+ }
+ },
+ "js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.13.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+ "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "jsbn": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
+ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
+ "dev": true
+ },
+ "jsesc": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
+ "dev": true
+ },
+ "json-schema": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
+ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "json-stringify-safe": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
+ "dev": true
+ },
+ "json5": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
+ "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
+ "jsprim": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
+ "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
+ "dev": true,
+ "requires": {
+ "assert-plus": "1.0.0",
+ "extsprintf": "1.3.0",
+ "json-schema": "0.4.0",
+ "verror": "1.10.0"
+ }
+ },
+ "just-extend": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz",
+ "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==",
+ "dev": true
+ },
+ "lcov-parse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz",
+ "integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=",
+ "dev": true
+ },
+ "locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^5.0.0"
+ }
+ },
+ "lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ },
+ "lodash.flattendeep": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz",
+ "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=",
+ "dev": true
+ },
+ "lodash.get": {
+ "version": "4.4.2",
+ "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
+ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
+ "dev": true
+ },
+ "lodash.isequal": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
+ "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=",
+ "dev": true
+ },
+ "lodash.sortby": {
+ "version": "4.7.0",
+ "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
+ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=",
+ "dev": true
+ },
+ "log-driver": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz",
+ "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==",
+ "dev": true
+ },
+ "log-symbols": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
+ "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
+ "dev": true,
+ "requires": {
+ "chalk": "^4.1.0",
+ "is-unicode-supported": "^0.1.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ }
+ }
+ },
+ "lolex": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz",
+ "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==",
+ "dev": true
+ },
+ "loupe": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.1.tgz",
+ "integrity": "sha512-EN1D3jyVmaX4tnajVlfbREU4axL647hLec1h/PXAb8CPDMJiYitcWF2UeLVNttRqaIqQs4x+mRvXf+d+TlDrCA==",
+ "dev": true,
+ "requires": {
+ "get-func-name": "^2.0.0"
+ }
+ },
+ "make-dir": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+ "dev": true,
+ "requires": {
+ "semver": "^6.0.0"
+ }
+ },
+ "mime-db": {
+ "version": "1.48.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz",
+ "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==",
+ "dev": true
+ },
+ "mime-types": {
+ "version": "2.1.31",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz",
+ "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==",
+ "dev": true,
+ "requires": {
+ "mime-db": "1.48.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "minimist": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
+ "mocha": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz",
+ "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==",
+ "dev": true,
+ "requires": {
+ "@ungap/promise-all-settled": "1.1.2",
+ "ansi-colors": "4.1.1",
+ "browser-stdout": "1.3.1",
+ "chokidar": "3.5.3",
+ "debug": "4.3.4",
+ "diff": "5.0.0",
+ "escape-string-regexp": "4.0.0",
+ "find-up": "5.0.0",
+ "glob": "7.2.0",
+ "he": "1.2.0",
+ "js-yaml": "4.1.0",
+ "log-symbols": "4.1.0",
+ "minimatch": "5.0.1",
+ "ms": "2.1.3",
+ "nanoid": "3.3.3",
+ "serialize-javascript": "6.0.0",
+ "strip-json-comments": "3.1.1",
+ "supports-color": "8.1.1",
+ "workerpool": "6.2.1",
+ "yargs": "16.2.0",
+ "yargs-parser": "20.2.4",
+ "yargs-unparser": "2.0.0"
+ },
+ "dependencies": {
+ "argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true
+ },
+ "debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "requires": {
+ "ms": "2.1.2"
+ },
+ "dependencies": {
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ }
+ }
+ },
+ "escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "dev": true
+ },
+ "glob": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
+ "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "dependencies": {
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ }
+ }
+ },
+ "js-yaml": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "dev": true,
+ "requires": {
+ "argparse": "^2.0.1"
+ }
+ },
+ "minimatch": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
+ "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^2.0.1"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0"
+ }
+ }
+ }
+ },
+ "ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
+ }
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "nan": {
+ "version": "2.16.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.16.0.tgz",
+ "integrity": "sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==",
+ "dev": true
+ },
+ "nanoid": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz",
+ "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==",
+ "dev": true
+ },
+ "nise": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz",
+ "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==",
+ "dev": true,
+ "requires": {
+ "@sinonjs/commons": "^1.8.3",
+ "@sinonjs/fake-timers": ">=5",
+ "@sinonjs/text-encoding": "^0.7.1",
+ "just-extend": "^4.0.2",
+ "path-to-regexp": "^1.7.0"
+ },
+ "dependencies": {
+ "@sinonjs/commons": {
+ "version": "1.8.3",
+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz",
+ "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==",
+ "dev": true,
+ "requires": {
+ "type-detect": "4.0.8"
+ }
+ },
+ "path-to-regexp": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
+ "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
+ "dev": true,
+ "requires": {
+ "isarray": "0.0.1"
+ }
+ }
+ }
+ },
+ "node-preload": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz",
+ "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==",
+ "dev": true,
+ "requires": {
+ "process-on-spawn": "^1.0.0"
+ }
+ },
+ "node-webcrypto-ossl": {
+ "version": "1.0.49",
+ "resolved": "https://registry.npmjs.org/node-webcrypto-ossl/-/node-webcrypto-ossl-1.0.49.tgz",
+ "integrity": "sha512-Zs73PeTWoUXUFicvAaxZC6ZyVCuq1Eg/Q4rYqiWyBY4eWIbZPFiRIi/KRM0A9GVKBPRNraaXsVmRAC83jEQ6nw==",
+ "dev": true,
+ "requires": {
+ "mkdirp": "^0.5.5",
+ "nan": "^2.14.0",
+ "tslib": "^1.11.1",
+ "webcrypto-core": "^0.1.27"
+ }
+ },
+ "normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true
+ },
+ "nyc": {
+ "version": "15.1.0",
+ "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz",
+ "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==",
+ "dev": true,
+ "requires": {
+ "@istanbuljs/load-nyc-config": "^1.0.0",
+ "@istanbuljs/schema": "^0.1.2",
+ "caching-transform": "^4.0.0",
+ "convert-source-map": "^1.7.0",
+ "decamelize": "^1.2.0",
+ "find-cache-dir": "^3.2.0",
+ "find-up": "^4.1.0",
+ "foreground-child": "^2.0.0",
+ "get-package-type": "^0.1.0",
+ "glob": "^7.1.6",
+ "istanbul-lib-coverage": "^3.0.0",
+ "istanbul-lib-hook": "^3.0.0",
+ "istanbul-lib-instrument": "^4.0.0",
+ "istanbul-lib-processinfo": "^2.0.2",
+ "istanbul-lib-report": "^3.0.0",
+ "istanbul-lib-source-maps": "^4.0.0",
+ "istanbul-reports": "^3.0.2",
+ "make-dir": "^3.0.0",
+ "node-preload": "^0.2.1",
+ "p-map": "^3.0.0",
+ "process-on-spawn": "^1.0.0",
+ "resolve-from": "^5.0.0",
+ "rimraf": "^3.0.0",
+ "signal-exit": "^3.0.2",
+ "spawn-wrap": "^2.0.0",
+ "test-exclude": "^6.0.0",
+ "yargs": "^15.0.2"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "dev": true,
+ "requires": {
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
+ }
+ },
+ "cliui": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
+ "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
+ "dev": true,
+ "requires": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^6.2.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ },
+ "wrap-ansi": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "y18n": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
+ "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
+ "dev": true
+ },
+ "yargs": {
+ "version": "15.4.1",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
+ "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
+ "dev": true,
+ "requires": {
+ "cliui": "^6.0.0",
+ "decamelize": "^1.2.0",
+ "find-up": "^4.1.0",
+ "get-caller-file": "^2.0.1",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^2.0.0",
+ "set-blocking": "^2.0.0",
+ "string-width": "^4.2.0",
+ "which-module": "^2.0.0",
+ "y18n": "^4.0.0",
+ "yargs-parser": "^18.1.2"
+ }
+ },
+ "yargs-parser": {
+ "version": "18.1.3",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
+ "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
+ "dev": true,
+ "requires": {
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
+ }
+ }
+ }
+ },
+ "oauth-sign": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
+ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
+ "dev": true
+ },
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "dev": true,
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "p-limit": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
+ "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
+ "dev": true,
+ "requires": {
+ "p-try": "^2.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^3.0.2"
+ },
+ "dependencies": {
+ "p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dev": true,
+ "requires": {
+ "yocto-queue": "^0.1.0"
+ }
+ }
+ }
+ },
+ "p-map": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz",
+ "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==",
+ "dev": true,
+ "requires": {
+ "aggregate-error": "^3.0.0"
+ }
+ },
+ "p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+ "dev": true
+ },
+ "package-hash": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz",
+ "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.15",
+ "hasha": "^5.0.0",
+ "lodash.flattendeep": "^4.4.0",
+ "release-zalgo": "^1.0.0"
+ }
+ },
+ "pako": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz",
+ "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==",
+ "dev": true
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "dev": true
+ },
+ "path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true
+ },
+ "path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true
+ },
+ "path-to-regexp": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.4.0.tgz",
+ "integrity": "sha512-G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w==",
+ "dev": true
+ },
+ "pathval": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
+ "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
+ "dev": true
+ },
+ "performance-now": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
+ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
+ "dev": true
+ },
+ "picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true
+ },
+ "pkg-dir": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+ "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "dev": true,
+ "requires": {
+ "find-up": "^4.0.0"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ }
+ }
+ },
+ "process-on-spawn": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz",
+ "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==",
+ "dev": true,
+ "requires": {
+ "fromentries": "^1.2.0"
+ }
+ },
+ "psl": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
+ "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==",
+ "dev": true
+ },
+ "punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+ "dev": true
+ },
+ "qs": {
+ "version": "6.5.2",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
+ "dev": true
+ },
+ "querystring": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
+ "dev": true
+ },
+ "randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "requires": {
+ "picomatch": "^2.2.1"
+ }
+ },
+ "regenerator-runtime": {
+ "version": "0.13.7",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
+ "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==",
+ "dev": true
+ },
+ "release-zalgo": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz",
+ "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=",
+ "dev": true,
+ "requires": {
+ "es6-error": "^4.0.1"
+ }
+ },
+ "request": {
+ "version": "2.88.2",
+ "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
+ "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
+ "dev": true,
+ "requires": {
+ "aws-sign2": "~0.7.0",
+ "aws4": "^1.8.0",
+ "caseless": "~0.12.0",
+ "combined-stream": "~1.0.6",
+ "extend": "~3.0.2",
+ "forever-agent": "~0.6.1",
+ "form-data": "~2.3.2",
+ "har-validator": "~5.1.3",
+ "http-signature": "~1.2.0",
+ "is-typedarray": "~1.0.0",
+ "isstream": "~0.1.2",
+ "json-stringify-safe": "~5.0.1",
+ "mime-types": "~2.1.19",
+ "oauth-sign": "~0.9.0",
+ "performance-now": "^2.1.0",
+ "qs": "~6.5.2",
+ "safe-buffer": "^5.1.2",
+ "tough-cookie": "~2.5.0",
+ "tunnel-agent": "^0.6.0",
+ "uuid": "^3.3.2"
+ }
+ },
+ "require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
+ "dev": true
+ },
+ "require-main-filename": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
+ "dev": true
+ },
+ "resolve": {
+ "version": "1.17.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
+ "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
+ "dev": true,
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
+ },
+ "resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "dev": true
+ },
+ "rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "dev": true
+ },
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true
+ },
+ "serialize-javascript": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz",
+ "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==",
+ "dev": true,
+ "requires": {
+ "randombytes": "^2.1.0"
+ }
+ },
+ "set-blocking": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
+ "dev": true
+ },
+ "shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "requires": {
+ "shebang-regex": "^3.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true
+ },
+ "signal-exit": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
+ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
+ "dev": true
+ },
+ "sinon": {
+ "version": "14.0.0",
+ "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.0.tgz",
+ "integrity": "sha512-ugA6BFmE+WrJdh0owRZHToLd32Uw3Lxq6E6LtNRU+xTVBefx632h03Q7apXWRsRdZAJ41LB8aUfn2+O4jsDNMw==",
+ "dev": true,
+ "requires": {
+ "@sinonjs/commons": "^1.8.3",
+ "@sinonjs/fake-timers": "^9.1.2",
+ "@sinonjs/samsam": "^6.1.1",
+ "diff": "^5.0.0",
+ "nise": "^5.1.1",
+ "supports-color": "^7.2.0"
+ },
+ "dependencies": {
+ "@sinonjs/commons": {
+ "version": "1.8.3",
+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz",
+ "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==",
+ "dev": true,
+ "requires": {
+ "type-detect": "4.0.8"
+ }
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
+ }
+ },
+ "sinon-chrome": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/sinon-chrome/-/sinon-chrome-3.0.1.tgz",
+ "integrity": "sha512-NTEFhyuiWEMnRmIqldUiA2DhKn2EqnZxyEk5Ez5rBXj+Nl54aJ0MEmF4wjltrxecxd8zlNLxyE0HyLabev9JsQ==",
+ "dev": true,
+ "requires": {
+ "lodash": "^4.16.3",
+ "sinon": "^7.2.3",
+ "urijs": "^1.18.2"
+ },
+ "dependencies": {
+ "@sinonjs/formatio": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.2.tgz",
+ "integrity": "sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ==",
+ "dev": true,
+ "requires": {
+ "@sinonjs/commons": "^1",
+ "@sinonjs/samsam": "^3.1.0"
+ }
+ },
+ "@sinonjs/samsam": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz",
+ "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==",
+ "dev": true,
+ "requires": {
+ "@sinonjs/commons": "^1.3.0",
+ "array-from": "^2.1.1",
+ "lodash": "^4.17.15"
+ }
+ },
+ "diff": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
+ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "nise": {
+ "version": "1.5.3",
+ "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.3.tgz",
+ "integrity": "sha512-Ymbac/94xeIrMf59REBPOv0thr+CJVFMhrlAkW/gjCIE58BGQdCj0x7KRCb3yz+Ga2Rz3E9XXSvUyyxqqhjQAQ==",
+ "dev": true,
+ "requires": {
+ "@sinonjs/formatio": "^3.2.1",
+ "@sinonjs/text-encoding": "^0.7.1",
+ "just-extend": "^4.0.2",
+ "lolex": "^5.0.1",
+ "path-to-regexp": "^1.7.0"
+ },
+ "dependencies": {
+ "lolex": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz",
+ "integrity": "sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==",
+ "dev": true,
+ "requires": {
+ "@sinonjs/commons": "^1.7.0"
+ }
+ }
+ }
+ },
+ "path-to-regexp": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
+ "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
+ "dev": true,
+ "requires": {
+ "isarray": "0.0.1"
+ }
+ },
+ "sinon": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.5.0.tgz",
+ "integrity": "sha512-AoD0oJWerp0/rY9czP/D6hDTTUYGpObhZjMpd7Cl/A6+j0xBE+ayL/ldfggkBXUs0IkvIiM1ljM8+WkOc5k78Q==",
+ "dev": true,
+ "requires": {
+ "@sinonjs/commons": "^1.4.0",
+ "@sinonjs/formatio": "^3.2.1",
+ "@sinonjs/samsam": "^3.3.3",
+ "diff": "^3.5.0",
+ "lolex": "^4.2.0",
+ "nise": "^1.5.2",
+ "supports-color": "^5.5.0"
+ }
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+ "dev": true
+ },
+ "spawn-wrap": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz",
+ "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==",
+ "dev": true,
+ "requires": {
+ "foreground-child": "^2.0.0",
+ "is-windows": "^1.0.2",
+ "make-dir": "^3.0.0",
+ "rimraf": "^3.0.0",
+ "signal-exit": "^3.0.2",
+ "which": "^2.0.1"
+ }
+ },
+ "sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
+ "dev": true
+ },
+ "sshpk": {
+ "version": "1.16.1",
+ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
+ "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
+ "dev": true,
+ "requires": {
+ "asn1": "~0.2.3",
+ "assert-plus": "^1.0.0",
+ "bcrypt-pbkdf": "^1.0.0",
+ "dashdash": "^1.12.0",
+ "ecc-jsbn": "~0.1.1",
+ "getpass": "^0.1.1",
+ "jsbn": "~0.1.0",
+ "safer-buffer": "^2.0.2",
+ "tweetnacl": "~0.14.0"
+ }
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ },
+ "strip-bom": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
+ "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==",
+ "dev": true
+ },
+ "strip-json-comments": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+ "dev": true
+ },
+ "style-mod": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.0.0.tgz",
+ "integrity": "sha512-OPhtyEjyyN9x3nhPsu76f52yUGXiZcgvsrFVtvTkyGRQJ0XK+GPc6ov1z+lRpbeabka+MYEQxOYRnt5nF30aMw==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "test-exclude": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
+ "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==",
+ "dev": true,
+ "requires": {
+ "@istanbuljs/schema": "^0.1.2",
+ "glob": "^7.1.4",
+ "minimatch": "^3.0.4"
+ }
+ },
+ "text-encoding": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.7.0.tgz",
+ "integrity": "sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA==",
+ "dev": true
+ },
+ "to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
+ "dev": true
+ },
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "requires": {
+ "is-number": "^7.0.0"
+ }
+ },
+ "tough-cookie": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
+ "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
+ "dev": true,
+ "requires": {
+ "psl": "^1.1.28",
+ "punycode": "^2.1.1"
+ }
+ },
+ "tr46": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz",
+ "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=",
+ "dev": true,
+ "requires": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "tslib": {
+ "version": "1.13.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
+ "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
+ "dev": true
+ },
+ "tunnel-agent": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+ "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "tweetnacl": {
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+ "dev": true
+ },
+ "type-detect": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
+ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
+ "dev": true
+ },
+ "type-fest": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
+ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
+ "dev": true
+ },
+ "typedarray-to-buffer": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
+ "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
+ "dev": true,
+ "requires": {
+ "is-typedarray": "^1.0.0"
+ }
+ },
+ "uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dev": true,
+ "requires": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "urijs": {
+ "version": "1.19.11",
+ "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz",
+ "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==",
+ "dev": true
+ },
+ "uuid": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
+ "dev": true
+ },
+ "verror": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
+ "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "^1.0.0",
+ "core-util-is": "1.0.2",
+ "extsprintf": "^1.2.0"
+ }
+ },
+ "w3c-keyname": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.4.tgz",
+ "integrity": "sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw==",
+ "dev": true
+ },
+ "webcrypto-core": {
+ "version": "0.1.27",
+ "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-0.1.27.tgz",
+ "integrity": "sha512-r0MSFxvqaIjoqIKerm80P9+7n1dWBG88PYnshJk57J4uZuXlqNX8yQixrEIe3CGqrJ7xwfGM2SQGR4AlJYr02g==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.7.1"
+ }
+ },
+ "webidl-conversions": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
+ "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==",
+ "dev": true
+ },
+ "whatwg-url": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz",
+ "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==",
+ "dev": true,
+ "requires": {
+ "lodash.sortby": "^4.7.0",
+ "tr46": "^1.0.1",
+ "webidl-conversions": "^4.0.2"
+ }
+ },
+ "which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "which-module": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
+ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
+ "dev": true
+ },
+ "workerpool": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz",
+ "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==",
+ "dev": true
+ },
+ "wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ }
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "dev": true
+ },
+ "write-file-atomic": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
+ "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
+ "dev": true,
+ "requires": {
+ "imurmurhash": "^0.1.4",
+ "is-typedarray": "^1.0.0",
+ "signal-exit": "^3.0.2",
+ "typedarray-to-buffer": "^3.1.5"
+ }
+ },
+ "y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "dev": true
+ },
+ "yargs": {
+ "version": "16.2.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
+ "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
+ "dev": true,
+ "requires": {
+ "cliui": "^7.0.2",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.0",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^20.2.2"
+ }
+ },
+ "yargs-parser": {
+ "version": "20.2.4",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
+ "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==",
+ "dev": true
+ },
+ "yargs-unparser": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz",
+ "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==",
+ "dev": true,
+ "requires": {
+ "camelcase": "^6.0.0",
+ "decamelize": "^4.0.0",
+ "flat": "^5.0.2",
+ "is-plain-obj": "^2.1.0"
+ },
+ "dependencies": {
+ "camelcase": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
+ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
+ "dev": true
+ },
+ "decamelize": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz",
+ "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==",
+ "dev": true
+ }
+ }
+ },
+ "yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "dev": true
+ }
+ }
+}
diff --git a/chromium/package.json b/chromium/package.json
index 8c378d77b776..8918b2b89a60 100644
--- a/chromium/package.json
+++ b/chromium/package.json
@@ -3,26 +3,32 @@
"version": "1.0.0",
"description": "",
"main": "utils.js",
- "dependencies": {},
"devDependencies": {
"atob": "^2.0.3",
"btoa": "^1.1.2",
- "chai": "^4.1.2",
- "coveralls": "^3.0.0",
- "fetch-mock": "^6.3.0",
- "mocha": "^4.1.0",
- "nan": "^2.10.0",
- "node-webcrypto-ossl": "^1.0.36",
- "nyc": "^11.6.0",
- "sinon": "^4.4.8",
- "sinon-chrome": "^2.3.1",
- "text-encoding": "^0.6.4"
+ "chai": "^4.2.0",
+ "coveralls": "^3.1.0",
+ "codemirror": "~6.0.1",
+ "fetch-mock": "^9.10.7",
+ "mocha": "^10.0.0",
+ "nan": "^2.14.1",
+ "node-webcrypto-ossl": "^1.0.49",
+ "nyc": "^15.1.0",
+ "pako": "~2.0.2",
+ "sinon": "^14.0.0",
+ "sinon-chrome": "^3.0.1",
+ "text-encoding": "^0.7.0"
},
"scripts": {
"test": "mocha",
"cover": "nyc --reporter=html --reporter=text mocha",
"report": "nyc report --reporter=text-lcov | coveralls"
},
+ "nyc": {
+ "exclude": [
+ "external"
+ ]
+ },
"keywords": [],
"author": "",
"license": "GPL-2.0+"
diff --git a/chromium/pages/base.css b/chromium/pages/base.css
new file mode 100644
index 000000000000..92adbf8a2dd6
--- /dev/null
+++ b/chromium/pages/base.css
@@ -0,0 +1,46 @@
+:root {
+ --https-blue: #0a84ff;
+ --darker-blue: #0060df;
+ --text-main: #000;
+ --text-secondary: #464646;
+ --light-grey: #ececec;
+ --space: 5px;
+ --font: 'Lucida Grande', 'Segoe UI', Tahoma, 'DejaVu Sans', Arial, sans-serif;
+ --code-font: 'VeraMono';
+}
+
+/*--------------------------------------------------------------
+# Layout
+--------------------------------------------------------------*/
+.grid {
+ display: grid;
+ grid-template-columns: 1fr 1fr 1fr;
+ row-gap: 16px;
+}
+
+/*--------------------------------------------------------------
+# Typography
+--------------------------------------------------------------*/
+.font {
+ font-family: var(--font);
+}
+
+/*--------------------------------------------------------------
+# Elements
+--------------------------------------------------------------*/
+.button {
+ border: var(--https-blue) solid 1px;
+ color: var(--text-main);
+ display: block;
+ font-size: 12px;
+ font-weight: bold;
+ margin: var(--space) auto;
+ padding: 10px;
+ text-align: center;
+ text-decoration: none;
+}
+
+.button:hover {
+ background-color: var(--darker-blue);
+ color: #fff;
+}
diff --git a/chromium/pages/cancel/index.html b/chromium/pages/cancel/index.html
new file mode 100644
index 000000000000..ec2518437350
--- /dev/null
+++ b/chromium/pages/cancel/index.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+ ⚠ HTTPS Everywhere ⚠
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/chromium/pages/cancel/style.css b/chromium/pages/cancel/style.css
new file mode 100644
index 000000000000..aeba151a0749
--- /dev/null
+++ b/chromium/pages/cancel/style.css
@@ -0,0 +1,130 @@
+@import "../main.css";
+
+body {
+ display: grid;
+ grid-template-columns: 1fr 1fr 1fr;
+ margin: 2% auto;
+ font-size: 12pt;
+ font-family: sans-serif;
+ line-height: 150%;
+ row-gap: 16px;
+}
+
+/*---------
+# GRID LAYOUT
+---------*/
+.banner {
+ grid-column: 2;
+ grid-row: 1;
+}
+.explainer {
+ grid-column: 2;
+ grid-row: 2;
+}
+.copy_block {
+ grid-column: 2;
+ grid-row: 3;
+}
+.button_options {
+ grid-column: 2;
+ grid-row: 4;
+}
+
+h1 {
+ display: block;
+}
+
+h1 img {
+ width: 100%;
+ height: auto;
+}
+
+#url-paragraph {
+ display: inline-flex;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+.ease_button {
+ background-color: #ec1e1e;
+ border: 1px solid #ec1e1e;
+ border-radius: 4px;
+ color: #fff;
+ cursor: pointer;
+ padding: 0.5em 1em;
+ float: none;
+ font-size: 12pt;
+ font-weight: normal;
+ margin: 8px 0;
+ line-height: 150%;
+}
+
+button:last-child {
+ margin: 0;
+}
+
+#url-value{
+ float: left;
+ font-weight: bold;
+ margin: 2% 2% 0 0;
+}
+#copy-url, #open-url-button{
+ background-color: var(--light-grey) !important;
+ border: 1px solid var(--text-secondary) !important;
+}
+#copy-url {
+ color: var(--text-secondary) !important;
+ font-size: 14px;
+}
+#open-url-button {
+ color: #666666 !important;
+}
+#copy-url:hover, #open-url-button:hover {
+ background-color: var(--text-secondary) !important;
+ border: 1px solid var(--text-secondary) !important;
+ color: var(--light-grey) !important;
+}
+
+@media screen and (max-width: 800px) {
+ body {
+ grid-template-columns: 1fr;
+ margin: 5%;
+ }
+ .banner {
+ grid-row: 1;
+ }
+ .explainer {
+ grid-row: 2;
+ }
+ .copy_block {
+ grid-row: 3;
+ }
+ .button_options {
+ grid-row: 4;
+ }
+ .ease_button {
+ width: 100%;
+ margin: 8px 0;
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ body {
+ background-color: #202023;
+ color: #f9f9fa;
+ }
+
+ a {
+ color: #45a1ff;
+ }
+
+ .ease_button {
+ color: #202023;
+ }
+
+ .ease_button:hover {
+ background-color: #202023;
+ border-color: #ec1e1e;
+ }
+}
diff --git a/chromium/pages/cancel/ux.js b/chromium/pages/cancel/ux.js
new file mode 100644
index 000000000000..d13dfdfb711a
--- /dev/null
+++ b/chromium/pages/cancel/ux.js
@@ -0,0 +1,124 @@
+/* global sendMessage */
+
+"use strict";
+
+let observer;
+document.addEventListener("DOMContentLoaded", () => {
+ const explainer = document.querySelector("[data-i18n=cancel_he_blocking_explainer]");
+ observer = new MutationObserver(() => {
+ replaceLink(explainer);
+ });
+ if (explainer.innerText.length > 0) {
+ replaceLink(explainer);
+ } else {
+ observer.observe(explainer, {childList: true});
+ }
+ displayURL();
+});
+
+function replaceLink(explainer) {
+ observer.disconnect();
+ const linkText = chrome.i18n.getMessage("cancel_he_blocking_network");
+ const link = document.createElement("a");
+ link.classList.add("wikilink");
+ link.href = "https://en.wikipedia.org/wiki/Downgrade_attack";
+ link.innerText = linkText;
+ explainer.innerHTML = explainer.innerHTML.replace(linkText, link.outerHTML);
+
+ /*
+ In response to translation of i18n string "cancel_he_blocking_network".
+ Within context of the paragraph and as a standalone string can be interpreted differently
+ langauge to language.
+
+ So if link fails to swap in replace, this conditional is triggered
+ */
+ if (document.getElementsByClassName("wikilink").length === 0) {
+ link.innerText = linkText;
+ explainer.after(link);
+ }
+
+}
+
+function displayURL() {
+ const searchParams = new URLSearchParams(window.location.search);
+ const originURL = searchParams.get('originURL');
+ const originURLLink = document.getElementById('url-value');
+ const openURLButton = document.getElementById('open-url-button');
+ const openHttpOnce = document.getElementById('http-once-button');
+ const copyButton = document.getElementById('copy-url');
+ const url = new URL(originURL);
+
+ originURLLink.innerText = originURL;
+ originURLLink.href = originURL;
+
+ openURLButton.addEventListener("click", function() {
+ sendMessage("disable_on_site", url.host, () => {
+ window.location = originURL;
+ });
+
+ return false;
+ });
+
+ // Copy URL Feature on EASE
+
+ function copyLinkAlternate() {
+ let isSuccessful = false;
+
+ const sel = window.getSelection();
+
+ try {
+ sel.removeAllRanges();
+
+ const range = document.createRange();
+ range.selectNode(originURLLink);
+
+ sel.addRange(range);
+
+ isSuccessful = document.execCommand("copy");
+
+ sel.removeAllRanges();
+
+ return isSuccessful;
+ } catch (err) {
+ console.error(err);
+
+ sel.removeAllRanges();
+
+ return false;
+ }
+ }
+
+ async function copyLink() {
+ try {
+ await navigator.clipboard.writeText(originURL);
+ return true;
+ } catch (err) {
+ return copyLinkAlternate();
+ }
+ }
+
+ let restoreTimeout = null;
+
+ copyButton.addEventListener("click", async () => {
+ if (await copyLink()) {
+ copyButton.innerText = chrome.i18n.getMessage("cancel_copied_url");
+
+ if (restoreTimeout !== null) {
+ clearTimeout(restoreTimeout);
+ }
+
+ restoreTimeout = setTimeout(() => {
+ copyButton.innerText = chrome.i18n.getMessage("cancel_copy_url");
+ restoreTimeout = null;
+ }, 1500);
+ }
+ });
+
+ openHttpOnce.addEventListener("click", function() {
+ sendMessage("disable_on_site_once", url.host, () => {
+ window.location = originURL;
+ });
+
+ return false;
+ });
+}
diff --git a/chromium/pages/debugging-rulesets/index.html b/chromium/pages/debugging-rulesets/index.html
index bd6f74332d1a..d3e91227f4c3 100644
--- a/chromium/pages/debugging-rulesets/index.html
+++ b/chromium/pages/debugging-rulesets/index.html
@@ -19,7 +19,7 @@
Saved!
-
+