diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index c2ffa2b2..00000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -coverage/ -_site/ -dist/ diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index d2b2fba9..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - parser: "babel-eslint", - // extends: ['eslint-config-google'].map(require.resolve), - extends: ['@advanced-rest-client/eslint-config'].map(require.resolve), - rules: { - 'import/no-extraneous-dependencies': 'off' - } -}; diff --git a/.gitbook/assets/1.png b/.gitbook/assets/1.png deleted file mode 100644 index 8b53c820..00000000 Binary files a/.gitbook/assets/1.png and /dev/null differ diff --git a/.gitbook/assets/2.png b/.gitbook/assets/2.png deleted file mode 100644 index c3d737f0..00000000 Binary files a/.gitbook/assets/2.png and /dev/null differ diff --git a/.gitbook/assets/auth-anypoint-variable.png b/.gitbook/assets/auth-anypoint-variable.png deleted file mode 100644 index 1fc936e5..00000000 Binary files a/.gitbook/assets/auth-anypoint-variable.png and /dev/null differ diff --git a/.gitbook/assets/auth-response-action-configuration.png b/.gitbook/assets/auth-response-action-configuration.png deleted file mode 100644 index 7daf61aa..00000000 Binary files a/.gitbook/assets/auth-response-action-configuration.png and /dev/null differ diff --git a/.gitbook/assets/authenticated-response.png b/.gitbook/assets/authenticated-response.png deleted file mode 100644 index aa1e6ce7..00000000 Binary files a/.gitbook/assets/authenticated-response.png and /dev/null differ diff --git a/.gitbook/assets/authenticated-user-anypoint.png b/.gitbook/assets/authenticated-user-anypoint.png deleted file mode 100644 index 820e256a..00000000 Binary files a/.gitbook/assets/authenticated-user-anypoint.png and /dev/null differ diff --git a/.gitbook/assets/authentication-response.png b/.gitbook/assets/authentication-response.png deleted file mode 100644 index 4e00ca7f..00000000 Binary files a/.gitbook/assets/authentication-response.png and /dev/null differ diff --git a/.gitbook/assets/cookie-manager.png b/.gitbook/assets/cookie-manager.png deleted file mode 100644 index fdfe8372..00000000 Binary files a/.gitbook/assets/cookie-manager.png and /dev/null differ diff --git a/.gitbook/assets/image (1).png b/.gitbook/assets/image (1).png deleted file mode 100644 index 038544c3..00000000 Binary files a/.gitbook/assets/image (1).png and /dev/null differ diff --git a/.gitbook/assets/image (10).png b/.gitbook/assets/image (10).png deleted file mode 100644 index 77faa0f4..00000000 Binary files a/.gitbook/assets/image (10).png and /dev/null differ diff --git a/.gitbook/assets/image (11).png b/.gitbook/assets/image (11).png deleted file mode 100644 index 23f3039d..00000000 Binary files a/.gitbook/assets/image (11).png and /dev/null differ diff --git a/.gitbook/assets/image (12).png b/.gitbook/assets/image (12).png deleted file mode 100644 index c5068506..00000000 Binary files a/.gitbook/assets/image (12).png and /dev/null differ diff --git a/.gitbook/assets/image (13).png b/.gitbook/assets/image (13).png deleted file mode 100644 index d21f771f..00000000 Binary files a/.gitbook/assets/image (13).png and /dev/null differ diff --git a/.gitbook/assets/image (14).png b/.gitbook/assets/image (14).png deleted file mode 100644 index 3b8a456d..00000000 Binary files a/.gitbook/assets/image (14).png and /dev/null differ diff --git a/.gitbook/assets/image (15).png b/.gitbook/assets/image (15).png deleted file mode 100644 index a8ea9331..00000000 Binary files a/.gitbook/assets/image (15).png and /dev/null differ diff --git a/.gitbook/assets/image (16).png b/.gitbook/assets/image (16).png deleted file mode 100644 index 5c5b7df5..00000000 Binary files a/.gitbook/assets/image (16).png and /dev/null differ diff --git a/.gitbook/assets/image (17).png b/.gitbook/assets/image (17).png deleted file mode 100644 index 1754bac6..00000000 Binary files a/.gitbook/assets/image (17).png and /dev/null differ diff --git a/.gitbook/assets/image (18).png b/.gitbook/assets/image (18).png deleted file mode 100644 index 54f8061a..00000000 Binary files a/.gitbook/assets/image (18).png and /dev/null differ diff --git a/.gitbook/assets/image (19).png b/.gitbook/assets/image (19).png deleted file mode 100644 index dfc73e42..00000000 Binary files a/.gitbook/assets/image (19).png and /dev/null differ diff --git a/.gitbook/assets/image (2).png b/.gitbook/assets/image (2).png deleted file mode 100644 index eebaa27d..00000000 Binary files a/.gitbook/assets/image (2).png and /dev/null differ diff --git a/.gitbook/assets/image (20).png b/.gitbook/assets/image (20).png deleted file mode 100644 index 5cdf2242..00000000 Binary files a/.gitbook/assets/image (20).png and /dev/null differ diff --git a/.gitbook/assets/image (21).png b/.gitbook/assets/image (21).png deleted file mode 100644 index f53fede8..00000000 Binary files a/.gitbook/assets/image (21).png and /dev/null differ diff --git a/.gitbook/assets/image (22).png b/.gitbook/assets/image (22).png deleted file mode 100644 index 810eb841..00000000 Binary files a/.gitbook/assets/image (22).png and /dev/null differ diff --git a/.gitbook/assets/image (23).png b/.gitbook/assets/image (23).png deleted file mode 100644 index 4d7760ad..00000000 Binary files a/.gitbook/assets/image (23).png and /dev/null differ diff --git a/.gitbook/assets/image (24).png b/.gitbook/assets/image (24).png deleted file mode 100644 index eac3a59e..00000000 Binary files a/.gitbook/assets/image (24).png and /dev/null differ diff --git a/.gitbook/assets/image (25).png b/.gitbook/assets/image (25).png deleted file mode 100644 index cdf022c4..00000000 Binary files a/.gitbook/assets/image (25).png and /dev/null differ diff --git a/.gitbook/assets/image (26).png b/.gitbook/assets/image (26).png deleted file mode 100644 index 8385c5b2..00000000 Binary files a/.gitbook/assets/image (26).png and /dev/null differ diff --git a/.gitbook/assets/image (27).png b/.gitbook/assets/image (27).png deleted file mode 100644 index d22e9c33..00000000 Binary files a/.gitbook/assets/image (27).png and /dev/null differ diff --git a/.gitbook/assets/image (28).png b/.gitbook/assets/image (28).png deleted file mode 100644 index e2f7fd68..00000000 Binary files a/.gitbook/assets/image (28).png and /dev/null differ diff --git a/.gitbook/assets/image (29).png b/.gitbook/assets/image (29).png deleted file mode 100644 index fe4e6af0..00000000 Binary files a/.gitbook/assets/image (29).png and /dev/null differ diff --git a/.gitbook/assets/image (3).png b/.gitbook/assets/image (3).png deleted file mode 100644 index 74b29c40..00000000 Binary files a/.gitbook/assets/image (3).png and /dev/null differ diff --git a/.gitbook/assets/image (30).png b/.gitbook/assets/image (30).png deleted file mode 100644 index 8f8e7436..00000000 Binary files a/.gitbook/assets/image (30).png and /dev/null differ diff --git a/.gitbook/assets/image (31).png b/.gitbook/assets/image (31).png deleted file mode 100644 index 123406d6..00000000 Binary files a/.gitbook/assets/image (31).png and /dev/null differ diff --git a/.gitbook/assets/image (32).png b/.gitbook/assets/image (32).png deleted file mode 100644 index aab5d8ef..00000000 Binary files a/.gitbook/assets/image (32).png and /dev/null differ diff --git a/.gitbook/assets/image (33).png b/.gitbook/assets/image (33).png deleted file mode 100644 index 9dda0f0e..00000000 Binary files a/.gitbook/assets/image (33).png and /dev/null differ diff --git a/.gitbook/assets/image (34).png b/.gitbook/assets/image (34).png deleted file mode 100644 index 661ab037..00000000 Binary files a/.gitbook/assets/image (34).png and /dev/null differ diff --git a/.gitbook/assets/image (35).png b/.gitbook/assets/image (35).png deleted file mode 100644 index 51b51c34..00000000 Binary files a/.gitbook/assets/image (35).png and /dev/null differ diff --git a/.gitbook/assets/image (36).png b/.gitbook/assets/image (36).png deleted file mode 100644 index 5c71bfb5..00000000 Binary files a/.gitbook/assets/image (36).png and /dev/null differ diff --git a/.gitbook/assets/image (37).png b/.gitbook/assets/image (37).png deleted file mode 100644 index 626c26f2..00000000 Binary files a/.gitbook/assets/image (37).png and /dev/null differ diff --git a/.gitbook/assets/image (38).png b/.gitbook/assets/image (38).png deleted file mode 100644 index d515f1a2..00000000 Binary files a/.gitbook/assets/image (38).png and /dev/null differ diff --git a/.gitbook/assets/image (39).png b/.gitbook/assets/image (39).png deleted file mode 100644 index 306e3667..00000000 Binary files a/.gitbook/assets/image (39).png and /dev/null differ diff --git a/.gitbook/assets/image (4).png b/.gitbook/assets/image (4).png deleted file mode 100644 index c0f1ad19..00000000 Binary files a/.gitbook/assets/image (4).png and /dev/null differ diff --git a/.gitbook/assets/image (40).png b/.gitbook/assets/image (40).png deleted file mode 100644 index 828fb43d..00000000 Binary files a/.gitbook/assets/image (40).png and /dev/null differ diff --git a/.gitbook/assets/image (41).png b/.gitbook/assets/image (41).png deleted file mode 100644 index 949ccf84..00000000 Binary files a/.gitbook/assets/image (41).png and /dev/null differ diff --git a/.gitbook/assets/image (42).png b/.gitbook/assets/image (42).png deleted file mode 100644 index 571bce07..00000000 Binary files a/.gitbook/assets/image (42).png and /dev/null differ diff --git a/.gitbook/assets/image (43).png b/.gitbook/assets/image (43).png deleted file mode 100644 index f25ff282..00000000 Binary files a/.gitbook/assets/image (43).png and /dev/null differ diff --git a/.gitbook/assets/image (44).png b/.gitbook/assets/image (44).png deleted file mode 100644 index 9e2aa41c..00000000 Binary files a/.gitbook/assets/image (44).png and /dev/null differ diff --git a/.gitbook/assets/image (45).png b/.gitbook/assets/image (45).png deleted file mode 100644 index abfd1692..00000000 Binary files a/.gitbook/assets/image (45).png and /dev/null differ diff --git a/.gitbook/assets/image (46).png b/.gitbook/assets/image (46).png deleted file mode 100644 index bfe1af1b..00000000 Binary files a/.gitbook/assets/image (46).png and /dev/null differ diff --git a/.gitbook/assets/image (47).png b/.gitbook/assets/image (47).png deleted file mode 100644 index 9a60698b..00000000 Binary files a/.gitbook/assets/image (47).png and /dev/null differ diff --git a/.gitbook/assets/image (48).png b/.gitbook/assets/image (48).png deleted file mode 100644 index 09874ba8..00000000 Binary files a/.gitbook/assets/image (48).png and /dev/null differ diff --git a/.gitbook/assets/image (49).png b/.gitbook/assets/image (49).png deleted file mode 100644 index 58af64df..00000000 Binary files a/.gitbook/assets/image (49).png and /dev/null differ diff --git a/.gitbook/assets/image (5).png b/.gitbook/assets/image (5).png deleted file mode 100644 index 90fbb63e..00000000 Binary files a/.gitbook/assets/image (5).png and /dev/null differ diff --git a/.gitbook/assets/image (50).png b/.gitbook/assets/image (50).png deleted file mode 100644 index 1f14d2bf..00000000 Binary files a/.gitbook/assets/image (50).png and /dev/null differ diff --git a/.gitbook/assets/image (51).png b/.gitbook/assets/image (51).png deleted file mode 100644 index f6e7def1..00000000 Binary files a/.gitbook/assets/image (51).png and /dev/null differ diff --git a/.gitbook/assets/image (52).png b/.gitbook/assets/image (52).png deleted file mode 100644 index a5805ad1..00000000 Binary files a/.gitbook/assets/image (52).png and /dev/null differ diff --git a/.gitbook/assets/image (53).png b/.gitbook/assets/image (53).png deleted file mode 100644 index e325e57f..00000000 Binary files a/.gitbook/assets/image (53).png and /dev/null differ diff --git a/.gitbook/assets/image (54).png b/.gitbook/assets/image (54).png deleted file mode 100644 index 626c26f2..00000000 Binary files a/.gitbook/assets/image (54).png and /dev/null differ diff --git a/.gitbook/assets/image (55).png b/.gitbook/assets/image (55).png deleted file mode 100644 index 693c4a2b..00000000 Binary files a/.gitbook/assets/image (55).png and /dev/null differ diff --git a/.gitbook/assets/image (56).png b/.gitbook/assets/image (56).png deleted file mode 100644 index b4822644..00000000 Binary files a/.gitbook/assets/image (56).png and /dev/null differ diff --git a/.gitbook/assets/image (57).png b/.gitbook/assets/image (57).png deleted file mode 100644 index 39323b46..00000000 Binary files a/.gitbook/assets/image (57).png and /dev/null differ diff --git a/.gitbook/assets/image (58).png b/.gitbook/assets/image (58).png deleted file mode 100644 index e4a19cc1..00000000 Binary files a/.gitbook/assets/image (58).png and /dev/null differ diff --git a/.gitbook/assets/image (59).png b/.gitbook/assets/image (59).png deleted file mode 100644 index 266e7034..00000000 Binary files a/.gitbook/assets/image (59).png and /dev/null differ diff --git a/.gitbook/assets/image (6).png b/.gitbook/assets/image (6).png deleted file mode 100644 index 1de87682..00000000 Binary files a/.gitbook/assets/image (6).png and /dev/null differ diff --git a/.gitbook/assets/image (60).png b/.gitbook/assets/image (60).png deleted file mode 100644 index 8cc57849..00000000 Binary files a/.gitbook/assets/image (60).png and /dev/null differ diff --git a/.gitbook/assets/image (61).png b/.gitbook/assets/image (61).png deleted file mode 100644 index a711a693..00000000 Binary files a/.gitbook/assets/image (61).png and /dev/null differ diff --git a/.gitbook/assets/image (62).png b/.gitbook/assets/image (62).png deleted file mode 100644 index d3aa33c6..00000000 Binary files a/.gitbook/assets/image (62).png and /dev/null differ diff --git a/.gitbook/assets/image (63).png b/.gitbook/assets/image (63).png deleted file mode 100644 index 3afc3ac2..00000000 Binary files a/.gitbook/assets/image (63).png and /dev/null differ diff --git a/.gitbook/assets/image (64).png b/.gitbook/assets/image (64).png deleted file mode 100644 index 9db2be64..00000000 Binary files a/.gitbook/assets/image (64).png and /dev/null differ diff --git a/.gitbook/assets/image (65).png b/.gitbook/assets/image (65).png deleted file mode 100644 index c4d85511..00000000 Binary files a/.gitbook/assets/image (65).png and /dev/null differ diff --git a/.gitbook/assets/image (66).png b/.gitbook/assets/image (66).png deleted file mode 100644 index 2525f349..00000000 Binary files a/.gitbook/assets/image (66).png and /dev/null differ diff --git a/.gitbook/assets/image (67).png b/.gitbook/assets/image (67).png deleted file mode 100644 index dfc73e42..00000000 Binary files a/.gitbook/assets/image (67).png and /dev/null differ diff --git a/.gitbook/assets/image (68).png b/.gitbook/assets/image (68).png deleted file mode 100644 index 9ada10bf..00000000 Binary files a/.gitbook/assets/image (68).png and /dev/null differ diff --git a/.gitbook/assets/image (69).png b/.gitbook/assets/image (69).png deleted file mode 100644 index e6685bbc..00000000 Binary files a/.gitbook/assets/image (69).png and /dev/null differ diff --git a/.gitbook/assets/image (7).png b/.gitbook/assets/image (7).png deleted file mode 100644 index 42309722..00000000 Binary files a/.gitbook/assets/image (7).png and /dev/null differ diff --git a/.gitbook/assets/image (8).png b/.gitbook/assets/image (8).png deleted file mode 100644 index a76afeb4..00000000 Binary files a/.gitbook/assets/image (8).png and /dev/null differ diff --git a/.gitbook/assets/image (9).png b/.gitbook/assets/image (9).png deleted file mode 100644 index 92f96d35..00000000 Binary files a/.gitbook/assets/image (9).png and /dev/null differ diff --git a/.gitbook/assets/image.png b/.gitbook/assets/image.png deleted file mode 100644 index ad459a4d..00000000 Binary files a/.gitbook/assets/image.png and /dev/null differ diff --git a/.gitbook/assets/variables-preview.png b/.gitbook/assets/variables-preview.png deleted file mode 100644 index 12026927..00000000 Binary files a/.gitbook/assets/variables-preview.png and /dev/null differ diff --git a/.gitbook/assets/worspace-area.png b/.gitbook/assets/worspace-area.png deleted file mode 100644 index 65b7bc00..00000000 Binary files a/.gitbook/assets/worspace-area.png and /dev/null differ diff --git a/.travis.yml b/.travis.yml index 38f7afe8..b3dd47c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,23 +3,16 @@ jobs: - os: osx osx_image: xcode10.2 language: node_js - node_js: stable + node_js: 14 env: - ELECTRON_CACHE=$HOME/.cache/electron - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder - os: linux language: node_js - node_js: stable + node_js: 14 services: - docker - xvfb -cache: - directories: - - node_modules - - "$HOME/.cache/electron" - - "$HOME/.cache/electron-builder" -before_cache: -- rm -rf $HOME/.cache/electron-builder/wine branches: except: - "/^\\d+\\.\\d+\\.\\d+$/" diff --git a/.vscode/launch.json b/.vscode/launch.json index d2070ce1..d4753574 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,7 +2,7 @@ "version": "0.2.0", "configurations": [ { - "name": "Debug Main Process", + "name": "Main Process", "type": "node", "request": "launch", "cwd": "${workspaceRoot}", @@ -10,7 +10,19 @@ "windows": { "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd" }, - "args" : [".", "--debug", "--debug-level=\"silly\"", "--workspace-path=\"~/arc-dev/workspace\"", "--settings-file=\"~/arc-dev/dev-settings.json\"", "--themes-path=\"~/arc-dev/themes-esm\""] + "args": [ + ".", + "--skip-app-update", + "--skip-themes-update", + "--dev", + "--debug-level=\"silly\"", + "--with-devtools", + "--workspace-path=\"~/arc-dev/workspace\"", + "--settings-file=\"~/arc-dev/dev-settings.json\"", + "--state-file=\"~/arc-dev/dev-state.json\"", + "--themes-path=\"~/arc-dev/themes-esm\"" + ], + "outputCapture": "std" } ] -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..8a20c6b5 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,39 @@ +{ + "cSpell.words": [ + "Renderable", + "advancedrestclient", + "appresources", + "autoupdate", + "camelcase", + "codemirror", + "firstbyte", + "forcereload", + "googleusercontent", + "headersreceived", + "hideothers", + "jnjgsluqk", + "maxsize", + "monospace", + "pageview", + "pasteandmatchstyle", + "printf", + "requestfirstbytereceived", + "requestloadend", + "requestloadstart", + "resetzoom", + "restclient", + "screenview", + "selectall", + "settingschanged", + "settingsread", + "settingsupdate", + "spectron", + "tbie", + "themeactivated", + "toggledevtools", + "togglefullscreen", + "webservice", + "zoomin", + "zoomout" + ] +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 46dbabf7..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,40 +0,0 @@ - -## [11.0.23](https://github.com/advanced-rest-client/arc-electron/compare/v11.0.22...v11.0.23) (2017-10-27) - - -### Update - -* Updating builder module ([acb3c48bb05a24a9a355853e5fb1d7c38a080de0](https://github.com/advanced-rest-client/arc-electron/commit/acb3c48bb05a24a9a355853e5fb1d7c38a080de0)) - - - - -## [11.0.22](https://github.com/advanced-rest-client/arc-electron/compare/v11.0.21...v11.0.22) (2017-10-27) - - -### Fix - -* Fixed appending a tab each time when request panel is opened. ([eab02ca023c1c3f6951ff78fb9f98e95fc1e60b0](https://github.com/advanced-rest-client/arc-electron/commit/eab02ca023c1c3f6951ff78fb9f98e95fc1e60b0)) -* Fixed request clear action ([7b858ec95f114ebaffda8876a212585ab29fc217](https://github.com/advanced-rest-client/arc-electron/commit/7b858ec95f114ebaffda8876a212585ab29fc217)) -* Fixed route change handler to respect opened state ([6968e63921cbf0943cc076a98dc064fdfc3be70b](https://github.com/advanced-rest-client/arc-electron/commit/6968e63921cbf0943cc076a98dc064fdfc3be70b)) -* Fixed workspace state mamagement. ([c31d3c37dda5ef7bdd97ce53b2c4b3337ff9cff5](https://github.com/advanced-rest-client/arc-electron/commit/c31d3c37dda5ef7bdd97ce53b2c4b3337ff9cff5)) -* RMoved FormData module to correct path. ([74a762a389a0c4abaf50571526dd835913693301](https://github.com/advanced-rest-client/arc-electron/commit/74a762a389a0c4abaf50571526dd835913693301)) - - - - -## [11.0.14](https://github.com/advanced-rest-client/arc-electron/compare/v11.0.15...v11.0.14) (2017-10-14) - - -### Fix - -* Fixed save bottom-sheet elements behavior ([9e15f75ec8cc19385f43c63e84a6b87f81082368](https://github.com/advanced-rest-client/arc-electron/commit/9e15f75ec8cc19385f43c63e84a6b87f81082368)) - -### New - -* Added page title element ([78bb7ad5416c8fbb17b5a4119673f46f8a233fc5](https://github.com/advanced-rest-client/arc-electron/commit/78bb7ad5416c8fbb17b5a4119673f46f8a233fc5)) - -### Update - -* Added open from Google Drive to main menu. ([bc43a7a08eed0b92502b4f452415c5a86add81fa](https://github.com/advanced-rest-client/arc-electron/commit/bc43a7a08eed0b92502b4f452415c5a86add81fa)) -* Removing logo ([b758272e58f1d1f769b84187efe9cec639ffe9f4](https://github.com/advanced-rest-client/arc-electron/commit/b758272e58f1d1f769b84187efe9cec639ffe9f4)) diff --git a/README.md b/README.md index b2ecd46a..e06e6e33 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,31 @@ ---- -description: Installation process for the Advanced REST Client application. ---- +# Advanced REST Client application -# Installing Advanced REST Client +This is the main repository for the ARC Electron application -## Installing Advanced REST Client +Tis is work in progress. -In most cases you can download the app from [https://github.com/advanced-rest-client/arc-electron/releases](https://github.com/advanced-rest-client/arc-electron/releases) +To try this version of the application: -Find an installer for your platform under "Assets" section. +Cone the repository: -![Assets section for a release](.gitbook/assets/image%20%2843%29.png) +```sh +git clone https://github.com/advanced-rest-client/arc-electron.git +``` -For example, for Windows you would download [`arc-setup.exe`](https://github.com/advanced-rest-client/arc-electron/releases/latest/download/arc-setup.exe). For MacOS download `arc-13.0.7.dmg`. +Checkout this branch -{% hint style="info" %} -Version number may be different to the one in the screen shoot. For normal use, please, download latest stable version. -{% endhint %} +```sh +git checkout redesign2020 +``` -When downloaded, run the file. The installer will walk you through the installation process. +Next, install dependencies (it may take a moment) -## Linux installation +```sh +npm install +``` -ARC's build process generates several builds for Linux. Find your platform and then architecture. Wrong architecture \(x86 instead of x64\) will result with error when installing or running the application. - -Please note that ARC won't update automatically on Linux platform as this is not yet supported by the build library. This may be possible in the future. - -ARC uses for testing +And run the application +```sh +npm start +``` diff --git a/SUMMARY.md b/SUMMARY.md deleted file mode 100644 index 1ddf5a3c..00000000 --- a/SUMMARY.md +++ /dev/null @@ -1,31 +0,0 @@ -# Table of contents - -* [Installing Advanced REST Client](README.md) -* [RESTful APIs getting started](restful-apis-getting-started.md) -* [Moving From Chrome Application To Desktop Client](moving-from-chrome-application-to-desktop-client.md) - -## Using ARC - -* [Your first API call](using-arc/your-first-api-call.md) -* [Environments and variables](using-arc/environments-and-variables.md) -* [Host rules](using-arc/host-rules.md) -* [Request actions](using-arc/request-actions.md) -* [Searching for a request](using-arc/searching-for-a-request.md) -* [Cookies and session management](using-arc/cookies-and-session-management.md) -* [Workspaces](using-arc/workspaces.md) - -## Guides - -* [Authenticating With OAuth2 And Request Actions](guides/authenticating-with-oauth2-and-request-actions.md) - -## API School - -* [Web APIs basics](api-school/web-apis-basics.md) - -## ARC Actions - -* [Introduction](arc-actions/introduction/README.md) - * [Set variable action](arc-actions/introduction/set-variable-action.md) - * [Set cookie action](arc-actions/introduction/set-cookie-action.md) - * [Remove cookie\(s\) action](arc-actions/introduction/remove-cookie-s-action.md) - diff --git a/api-school/building-an-api-node.md b/api-school/building-an-api-node.md deleted file mode 100644 index 09eb9f27..00000000 --- a/api-school/building-an-api-node.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -description: This tutorial shows very simple API in Node.js step by step. ---- - -# Building an API \(Node\) - diff --git a/api-school/web-apis-basics.md b/api-school/web-apis-basics.md deleted file mode 100644 index 3b912d43..00000000 --- a/api-school/web-apis-basics.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -description: Learn basics of web APIs in our Web APIs school ---- - -# Web APIs basics - -Before we begin, this article mostly focuses on REST APIs and ignores other types. This will be described in separate articles. - -A web API, or web Application Programming Interface, is a formalized way of how one application talk to another. The web prefix means that the communication is based on HTTP protocol. Because the transport protocol is not relevant at this time you don't have to worry about it. - -To visualize this, consider having an application on your smartphone that renders a feed of pictures of people you follow. The application, when running on your phone, knows nothing about what others recently posted on their phones. To get the data about others activities the application has to communicate with the server - an application running on a remote machine publicly available over internet. Without the API the client application \(on your phone\) wouldn't be able to understand what server is talking about. It wouldn't even know how to request for latest updates! - -Web APIs come in handy is such situation.They allow to define the vocabulary the applications \(the client and the server\) are using while talking to each other \(we will call them schemas or more widely resources\), and the syntax \(endpoints and methods\). - -On a the most basic level you need 2 to 4 ingredients to allow applications to communicate to each other: - -1. Endpoint - the location of the resource, -2. Method, sometimes called the verb or an operation, -3. Optional headers that helps the recipient to read the message properly -4. Optional body if required \(I will explain later\) - -To perform any operation on a resource, whether it is a read or create operation, the endpoint and the method is always required to start communicating with the server. Endpoint tells where the resource is located \(the URI or Uniform Resource Identifier\). It is a unique address in the internet where the resource exists. The method has a semantic meaning and tells what kind of operation can be performed on the resource. The most basic operations are: - -* GET - read the resource or a collection of the resource -* POST - create a resource -* DELETE - remove existing resource -* PUT - update existing resource - -There are more less common methods like PATCH \(partial update\), OPTIONS \(returns response headers without the actual body\), and few more we won't mention here. You can learn more about them in [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods). - -So now just by having the URI and the method you can recognize what kind of operation on which resource can be performed. - -## Headers in API communication - -When it comes to web APIs, its integral part are headers. Headers are pairs of name and the value that helps the recipient to understand how to process the request. There are a number of standard request and response headers commonly used in communication with remote systems. Because they are integral part of the HTTP transport, in most cases the headers are automatically filled up for you when executing a request by the underlying framework your application is based on. Such common header would be `content-length` which tells the recipient how much body it should expect before finalizing processing the entire message and preparing response. When working with web APIs you almost never set this header manually. However, the other very common header `content-type` almost always has to be set by you. This header tells the recipient what is the format of the incoming data. It can be a JSON, XML, binary data of any form, any many more. You can also define own set of headers that are only used by your particular API if that's really needed. However, the standard set of the headers usually is enough for majority of cases. - -## Request and response body - -The most interesting part for you is obviously the body. This is the reason why the API exists in the first place: to exchange information about a resource. The body is the representation of the resource that resists on the server \(or client when creating a resource\). I am using "representation" because the resource may be represented in more than one form. For example, a Person resource, which is a user in the system, may be represented in JSON and and XML format depending on the [accept](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept) header sent with the request. - -The response body contains the resource shaped by the request. The request may contain parameters \(query parameters, headers\) that may somehow transform the response. Consider our picture feed application. When requesting a list of latest pictures \(collection of resources\) you may ask the server to return a 100 latest posts instead of default 25. Usually this is done by defining a query parameters that are responsible for pagination. Other example would be searching for a specific tag associated with a picture. In this case the server would return the same collection of resources but the request parameters would be different and would include search phrase. - -After receiving the response, the client can do whatever it wants with it. It can be stored in local data store for offline use or for caching. Then it is rendered to the final user in the application UI \(I am purposely not using GUI as this may come in variety of forms, like spoken communication\). - -## API specification - -Small organizations like small start-ups may not formalize an API for their application in any of available API description languages. However, it doesn't scale and in long run not having API specification causes a lot of problems, even internally, not only with external developer teams. Larger organizations prefer design first approach where an API is first designed and after it meets all requirements then it is implemented. Currently the most commonly used languages to describe an API are RAML and OAS. Which one you will choose to use it's up to you. However, your should be aware that API description is as important as having an API. - -API specification is a formal record of how your API works. It describes schemas \(data types\) that are used to communicate with the clients and the structure of the API \(endpoints and methods\). The obvious benefit of having an API specification is that multiple teams can work in parallel on the same API without the actual API being up an running. Because API specification describes the protocol used to communicate between the server and the application the development teams not always need access to live API. Second reason to have API specification is ability to use it in a wide range of API tooling that can read API specification and transform it into something else. For example there are applications that reads API specification and generates automated, but dummy, server response. It is called mocking service. It could be used to test client application before the API is running. Other example of such tooling is automated documentation generation for your API from such specification. It can be used internally by your teams but also externally by other developers that are using your API. - -This is only tip of an icebug in API tooling. There is a lot of tools that allows you to automate your work by only just having an API specification. - diff --git a/app.html b/app.html deleted file mode 100644 index 18180392..00000000 --- a/app.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - Advanced REST client - - - - - - - - - - - - - - -
- ARC logo -

Loading your API consumer experience

-
- - - diff --git a/app.js b/app.js deleted file mode 100644 index 4b00b4a7..00000000 --- a/app.js +++ /dev/null @@ -1,557 +0,0 @@ -// Scrips are moved to scripts/renderer/preload.js so node integration can be disabled -// in the application window. - -/* eslint-disable no-console */ - -/** - * Class responsible for initializing the main ARC elements - * and setup base options. - * Also serves as a communication bridge between main process and app window. - * - * This is only supported in the Electron platform. - * - * In ARC node integration is disabled as responses received from the server - * can be executed in preview window. Any script would instantly get access - * to whole electron and node environment. As a consequence the script - * would have access to user system. Classes that need access to electron / node - * API are loaded in sandbox in the preload script and initialized here. - * Scripts can't use `require()` or any other node function. - */ -class ArcInit { - /** - * @constructor - */ - constructor() { - /* global ipc, ArcContextMenu, ArcElectronDrive, OAuth2Handler, - ThemeManager, ArcPreferencesProxy, CookieBridge, WorkspaceManager, - FilesystemProxy, ElectronAmfService, versionInfo, WindowSearchService, - UpgradeHelper, ImportFilePrePprocessor, EncryptionService */ - this.created = false; - this.contextActions = new ArcContextMenu(); - this.driveBridge = new ArcElectronDrive(); - this.oauth2Proxy = new OAuth2Handler(); - this.themeManager = new ThemeManager(); - this.prefProxy = new ArcPreferencesProxy(); - this.cookieBridge = new CookieBridge(); - this.fs = new FilesystemProxy(); - this.amfService = new ElectronAmfService(); - this.search = new WindowSearchService(); - this.encryption = new EncryptionService(); - } - /** - * @return {ImportFilePrePprocessor} Instance of import processor class. - */ - get importPreprocessor() { - if (!this.__importPreprocessor) { - this.__importPreprocessor = new ImportFilePrePprocessor(); - } - return this.__importPreprocessor; - } - /** - * Reference to the main application window. - * - * @return {HtmlElement} - */ - get app() { - return document.getElementById('app'); - } - /** - * Listens for application events to create a communication - * bridge between main process and the app. - */ - listen() { - this.contextActions.listenMainEvents(); - window.onbeforeunload = this.beforeUnloadWindow.bind(this); - this.driveBridge.listen(); - this.oauth2Proxy.listen(); - this.themeManager.listen(); - this.prefProxy.observe(); - this.cookieBridge.listen(); - this.fs.listen(); - this.amfService.listen(); - this.search.listen(); - this.encryption.listen(); - - ipc.on('checking-for-update', () => { - this.updateEventHandler('checking-for-update'); - }); - ipc.on('update-available', (info) => { - this.updateEventHandler('update-available', info); - }); - ipc.on('update-not-available', () => { - this.updateEventHandler('update-not-available'); - }); - ipc.on('autoupdate-error', (error) => { - this.updateEventHandler('autoupdate-error', error); - }); - ipc.on('download-progress', (progressObj) => { - this.updateEventHandler('download-progress', progressObj); - }); - ipc.on('update-downloaded', (info) => { - this.updateEventHandler('update-downloaded', info); - }); - ipc.on('command', this.commandHandler.bind(this)); - ipc.on('request-action', this.execRequestAction.bind(this)); - ipc.on('theme-editor-preview', this._themePreviewHandler.bind(this)); - ipc.on('window-state-info', this._stateInfoHandler.bind(this)); - ipc.on('app-navigate', this._appNavHandler.bind(this)); - ipc.on('popup-app-menu-opened', this._popupMenuOpened.bind(this)); - ipc.on('popup-app-menu-closed', this._popupMenuClosed.bind(this)); - ipc.on('system-theme-changed', this._systemThemeChangeHandler.bind(this)); - document.body.addEventListener('settings-changed', this._settingsHandler.bind(this)); - } - /** - * Requests initial state information from the main process for current - * window. - */ - requestState() { - ipc.send('window-state-request'); - } - /** - * Handler for the `window-state-info` event from the main process. - * Setups properties to be passed to the ARC application. - * - * When this is called it creates application window and places it in the - * document body. - * - * @param {Event} e - * @param {Object} info Main proces initil properties. See `AppOptions` class - * for more details. - */ - async _stateInfoHandler(e, info) { - info = info || {}; - const initConfig = info; - if (!window.ArcConfig) { - window.ArcConfig = {}; - } - this.initConfig = initConfig; - window.ArcConfig.initConfig = initConfig; - - let cnf; - try { - cnf = await this.prefProxy.load(); - await this._createApp(cnf); - } catch (e) { - this.reportFatalError(e); - throw e; - } - if (typeof cnf.ignoreSessionCookies === 'boolean') { - this.cookieBridge.ignoreSessionCookies = cnf.ignoreSessionCookies; - } - await this.initApp(cnf); - await this.upgradeApp(cnf); - await this.processInitialPath(); - await this.removeLoader(); - console.log('Application window is now ready.'); - } - /** - * Initialized the application when window is ready. - * - * @param {Object} cnf Current qapplication configuration - * @return {Promise} - */ - async initApp(cnf) { - // console.info('Initializing renderer window...'); - this.workspaceManager = new WorkspaceManager(this.initConfig.workspaceFile); - this.workspaceManager.observe(); - if (this.initConfig.darkMode) { - cnf.theme = '@advanced-rest-client/arc-electron-dark-theme'; - } - if (cnf.theme === '@advanced-rest-client/arc-electron-anypoint-theme') { - const app = this.app; - app.compatibility = true; - } - try { - await this.themeManager.loadTheme(cnf.theme); - } catch (e) { - console.error(e); - } - } - /** - * Reports fatal application error. - * - * @param {Error} err Error object - */ - reportFatalError(err) { - console.error(err); - ipc.send('fatal-error', err.message); - } - /** - * Creates application main element. - * - * @param {Object} config Current configuration. - * @return {Promise} Promise resolved when element is loaded and ready - * rendered. - */ - async _createApp(config) { - if (this.created) { - return Promise.resolve(); - } - /* eslint-disable-next-line import/no-unresolved */ - await import('web-module://src/arc-electron.js'); - const app = document.createElement('arc-electron'); - app.id = 'app'; - app.config = config; - app.componentsDir = 'web_modules'; - this._setupApp(app); - document.body.appendChild(app); - this.created = true; - } - /** - * Sets up the application properties. - * - * @param {ArcElectron} app App electron element. - */ - _setupApp(app) { - // console.info('Initializing ARC app'); - // app.componentsDir = this.initConfig.appComponents; - app.appVersion = versionInfo.appVersion; - app.browserVersion = versionInfo.chrome; - app.initApplication(); - app.initTutorial(); - } - /** - * Because window has to be setup from the main process - * (setting app init values) the window sends reload - * information to the main process so it can re-set the - * window after it's reloaded. - */ - beforeUnloadWindow() { - ipc.send('window-reloading'); - } - /** - * Handles events related to the application auto-update action. - * - * @param {String} type - * @param {Object|undefined} args - */ - updateEventHandler(type, args) { - const app = this.app; - if (!app) { - return; - } - // console.log('updateEventHandler', message); - app.updateState = type; - if (args) { - console.log(type, args); - } - if (type === 'update-downloaded') { - app.hasAppUpdate = true; - } - } - /** - * Handler for application command. - * - * @param {EventEmitter} e Node's event - * @param {String} action - * @param {Array} args - */ - commandHandler(e, action, ...args) { - // console.info('Renderer command handled: ', action); - const { app } = this; - switch (action) { - case 'show-settings': app.openSettings(); break; - case 'about': app.openAbout(); break; - case 'open-license': app.openLicense(); break; - case 'import-data': app.openImport(); break; - case 'export-data': app.openExport(); break; - case 'open-saved': app.openSaved(); break; - case 'open-history': app.openHistory(); break; - case 'open-drive': app.openDrivePicker(); break; - case 'open-messages': app.openInfoCenter(); break; - case 'login-external-webservice': app.openWebUrl(); break; - case 'open-cookie-manager': app.openCookieManager(); break; - case 'open-hosts-editor': app.openHostRules(); break; - case 'get-tabs-count': this.sendTabsCount(e, args[0]); break; - case 'activate-tab': this.activateTab(e, args[0], args[1]); break; - case 'get-request-data': this.getRequestData(e, args[0], args[1]); break; - case 'open-themes': app.openThemesPanel(); break; - case 'open-requests-workspace': app.openWorkspace(); break; - case 'open-web-socket': app.openWebSocket(); break; - case 'popup-menu': this._toggleMenuWindow(); break; - case 'process-external-file': this.processExternalFile(args[0]); break; - case 'open-onboarding': app.openOnboarding(); break; - case 'open-workspace-details': app.openWorkspaceDetails(); break; - case 'export-workspace': this.exportWorkspace(); break; - case 'open-client-certificates': app.openClientCertificates(); break; - default: - console.warn('Unknown command', action, args); - } - } - - async processExternalFile(filePath) { - try { - return await this.importPreprocessor.processFile(filePath); - } catch (cause) { - this.app.notifyError(cause.message); - console.error(cause); - } - } - - /** - * Remote API command. - * Sends number of tabs command to the main process. - * - * @param {EventEmitter} e - * @param {Number} callId - */ - sendTabsCount(e, callId) { - const cnt = this.app.getTabsCount(); - e.sender.send('current-tabs-count', callId, false, cnt); - } - /** - * Remote API command. - * Activates a tab in current window. - * - * @param {EventEmitter} e - * @param {Number} callId - * @param {Number} tabId ID of a tab - */ - activateTab(e, callId, tabId) { - this.app.workspace.selected = tabId; - e.sender.send('tab-activated', callId, false); - } - /** - * Remote API command. - * Sends request data to the main process. - * - * Because of limitations of sending the data between - * renderer and main process objects like FormData of - * file data won't be sent. - * - * @param {EventEmitter} e - * @param {Number} callId - * @param {Number} tabId ID of a tab - */ - getRequestData(e, callId, tabId) { - const request = this.app.workspace.activeRequests[tabId]; - e.sender.send('request-data', callId, false, request); - } - /** - * Handles action performed in main thread (menu action) related to - * a request. - * - * @param {EventEmitter} e - * @param {String} action Action name to perform. - */ - execRequestAction(e, action, ...args) { - // console.info('Renderer request command handled: ', action); - const app = this.app; - switch (action) { - case 'save': - app.saveOpened({ - source: 'shortcut' - }); - break; - case 'save-as': - app.saveOpened(); - break; - case 'new-tab': - app.newRequestTab(); - break; - case 'send-current': - app.sendCurrentTab(); - break; - case 'update-request': - app.updateRequestTab(args[0], args[1]); - break; - case 'close-tab': - app.closeActiveTab(); - break; - default: - throw new Error('Unrecognized action ' + action); - } - } - /** - * Handler for `theme-editor-preview` event. Current;ly this system is not - * in use - * - * @param {EventEmitter} e - * @param {Object} stylesMap - */ - _themePreviewHandler(e, stylesMap) { - this.themeLoader.previewThemes(stylesMap); - } - /** - * Handler for `app-navigare` event dispatched by the IO process. - * It dispatches navigate event recognized by ARC to perform navigation - * action. - * - * @param {Object} e - * @param {Object} detail - */ - _appNavHandler(e, detail) { - this.app.dispatchEvent(new CustomEvent('navigate', { - bubbles: true, - cancelable: true, - detail - })); - } - - _toggleMenuWindow() { - const app = this.app; - if (!app.menuConfig) { - app.menuConfig = {}; - } - const state = !app.menuConfig.menuDisabled; - app.menuConfig.menuDisabled = state; - app.requestUpdate(); - } - - _popupMenuOpened(e, type) { - this._menuToggleOption(type, true); - } - - _popupMenuClosed(e, type) { - this._menuToggleOption(type, false); - } - - _menuToggleOption(type, value) { - const app = this.app; - if (!app.menuConfig) { - app.menuConfig = {}; - } - let key; - switch (type) { - case 'history-menu': key = 'hideHistory'; break; - case 'saved-menu': key = 'hideSaved'; break; - case 'projects-menu': key = 'hideProjects'; break; - case 'rest-api-menu': key = 'hideApis'; break; - case '*': key = 'menuDisabled'; break; - default: - console.warn('Unknown menu state'); - return; - } - app.menuConfig[key] = value; - app.requestUpdate(); - } - - removeLoader() { - const loader = document.querySelector('.loader'); - if (!loader) { - return; - } - loader.classList.add('end'); - setTimeout(() => { - loader.parentNode.removeChild(loader); - }, 150); - } - - async upgradeApp(cnf) { - const inst = new UpgradeHelper(cnf.upgrades); - const upgrades = inst.getUpgrades(); - if (!upgrades || upgrades.length === 0) { - return; - } - console.info('Applying upgrades...'); - return await inst.upgrade(upgrades); - } - - async processInitialPath() { - const startPath = this.initConfig.startPath; - if (!startPath) { - return Promise.resolve(); - } - const parts = startPath.split('/'); - if (parts[0] === 'file-protocol-action') { - return await this.handleDefaultProtocolActon(parts.slice(1)); - } else { - history.pushState('', null, '#' + startPath); - } - } - /** - * Handles action run from default protocol. ARC open files having protocol - * `arc-file:`. - * @param {Array} args Action arguments passed from the main process. - * @return {Promise} - */ - async handleDefaultProtocolActon(args) { - const [source, action, id] = args; - switch (source) { - case 'google-drive': return await this.handleGoogleDriveAction(action, id); - } - console.warn('Unknown protocol action. ', args); - } - /** - * Handles opening a file from Google Drive UI. - * @param {String} action Action passed from the Drive app. Currently only `open` action - * is supported. - * @param {String} fileId File id to process - * @return {Promise} - */ - async handleGoogleDriveAction(action, fileId) { - if (action !== 'open') { - console.warn('Currently only open action for Google Drive is supported.'); - return; - } - const infoNode = document.querySelector('.loading-info'); - infoNode.innerText = 'Loading file from Google Drive'; - let data = await this.driveBridge.getFile(fileId) - if (!data) { - const e = new Error('Google drive did not return any data.'); - this.app.notifyError(e.message); - throw e; - } - try { - data = JSON.parse(data); - } catch (cause) { - console.warn(cause); - this.app.notifyError(cause.message); - throw new Error('Unable to parse received data.'); - } - document.body.dispatchEvent(new CustomEvent('import-process-data', { - bubbles: true, - cancelable: true, - detail: { - data - } - })); - } - /** - * Calls ARC app to serialize workspace data and exports it to a file. - * @return {Promise} - */ - async exportWorkspace() { - const workspace = this.app.workspace.serializeWorkspace(); - return await this.fs.exportFileData(workspace, 'application/json', 'arc-workspace.arc'); - } - /** - * Handler for system theme change event dispatche in the IO thread. - * Updates theme depending on current setting. - * - * @param {Event} e - * @param {Boolean} isDarkMode true when Electron detected dark mode - * @return {Promise} - */ - async _systemThemeChangeHandler(e, isDarkMode) { - const theme = isDarkMode ? - '@advanced-rest-client/arc-electron-dark-theme' : - '@advanced-rest-client/arc-electron-default-theme'; - const app = this.app; - app.compatibility = false; - try { - await this.themeManager.loadTheme(theme); - } catch (e) { - console.error(e); - } - } - - /** - * A handler for settings change event. - * Performs actions that are important when a confic object has changed. - * - * @param {CustomEvent} e An event dispatched by preferences proxy. - */ - _settingsHandler(e) { - const { name, value } = e.detail; - switch (name) { - case 'ignoreSessionCookies': - this.cookieBridge.ignoreSessionCookies = value; - break; - } - } -} - -const initScript = new ArcInit(); -initScript.listen(); -initScript.requestState(); diff --git a/appresources/themes/@advanced-rest-client/arc-electron-dark-theme/arc-electron-dark-theme.css b/appresources/themes/@advanced-rest-client/arc-electron-dark-theme/arc-electron-dark-theme.css index 4216e160..2cf8bc2a 100644 --- a/appresources/themes/@advanced-rest-client/arc-electron-dark-theme/arc-electron-dark-theme.css +++ b/appresources/themes/@advanced-rest-client/arc-electron-dark-theme/arc-electron-dark-theme.css @@ -1,77 +1,38 @@ body { - background-color: #424242; - height: 100vh; + background-color: #212121; color: #fff; - - --arc-font-family: 'Roboto', 'Noto', sans-serif; - --arc-font-font-smoothing: antialiased; - --arc-font-code-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace; - --arc-font-nowrap-white-space: nowrap; - --arc-font-nowrap-overflow: hidden; - --arc-font-nowrap-text-overflow: ellipsis; - --arc-font-expensive-kerning: optimizeLegibility; - - --arc-font-display1-font-size: 34px; - --arc-font-display1-font-weight: 400; - --arc-font-display1-letter-spacing: -.01em; - --arc-font-display1-line-height: 40px; - - --arc-font-title-font-size: 20px; - --arc-font-title-font-weight: 500; - --arc-font-title-line-height: 28px; - - --arc-font-headline-font-size: 24px; - --arc-font-headline-font-weight: 400; - --arc-font-headline-letter-spacing: -.012em; - --arc-font-headline-line-height: 32px; - - --arc-font-subhead-font-size: 16px; - --arc-font-subhead-font-weight: 400; - --arc-font-subhead-line-height: 24px; - - --arc-font-body1-font-size: 14px; - --arc-font-body1-font-weight: 400; - --arc-font-body1-line-height: 20px; - - --arc-font-body2-font-size: 14px; - --arc-font-body2-font-weight: 500; - --arc-font-body2-line-height: 24px; - - --arc-font-caption-font-size: 12px; - --arc-font-caption-font-weight: 400; - --arc-font-caption-letter-spacing: 0.011em; - --arc-font-caption-line-height: 20px; - - --select-text-user-select: text; - --select-text-cursor: text; - - --primary-color: #BBDEFB; + --primary-color: #ffcc80; --primary-text-color: #fff; - --error-color: #FF5722; - --accent-color: #4CAF50; - --primary-background-color: #424242; - --action-button-background-color: #fff; - --action-button-color: var(--primary-color); + --accent-color: #E040FB; + --secondary-text-color: rgba(255, 255, 255, 0.84); + --primary-background-color: #212121; + --secondary-action-button-color: #fff; - --anypoint-color-primary: var(--primary-color); - --paper-toggle-button-label-color: #fff; - --paper-listbox-background-color: #424242; - --paper-listbox-color: #fff; - --google-drive-list-view-file-icon-color: rgba(255, 255, 255, 0.54); - --google-drive-list-view-search-icon-color: rgba(255, 255, 255, 0.54); - --paper-item-body-secondary-color: rgba(255, 255, 255, 0.64); --action-button-background-color: #212121; --action-button-color: #fff; --action-button-hover-background-color: #212121; --action-button-hover-color: #04b3f5; - --google-drive-list-view-selected-background-color: #757575; - --paper-input-container-color: rgba(255, 255, 255, 0.64); - --paper-toggle-button-label-color: #fff; + --error-message-icon-color: rgba(255, 255, 255, 0.64); --error-message-color: #fff; - --secondary-text-color: #EEEEEE; - --anypoint-input-legacy-label-color: #F5F5F5; + --error-message-code-color: #9e9e9e; + + --saved-request-detail-background-color: #212121; + --saved-request-detail-color: #fff; + --saved-request-detail-padding: 20px; + --saved-request-detail-data-list-color: #fff; + --saved-request-detail-action-button-color: #fff; + --saved-request-detail-action-icon-color: #fff; + + --anypoint-chip-label-color: #fff; + --anypoint-chip-icon-color: #fff; + --anypoint-chip-label-focused-color: #fff; + --anypoint-chip-label-active-color: #fff; + --anypoint-chip-focused-background-color: #34434b; + --anypoint-chip-background-color: #424242; + --arc-interactive-demo-options-color: #F5F5F5; + --anypoint-checkbox-label-color: #F5F5F5; --anypoint-input-background-color: #494949; --anypoint-input-label-color: #fff; @@ -82,7 +43,9 @@ body { --anypoint-input-legacy-focus-background-color: #3a3b3c; --anypoint-input-legacy-focus-border-color: #178bea; --anypoint-input-info-message-color: #fff; - --inline-documentation-background-color: #3a3a3a; + + --anypoint-menu-button-border-radius: 12px; + --anypoint-dropdown-menu-background-color: #494949; --anypoint-dropdown-menu-label-background-color: var(--primary-background-color); --anypoint-listbox-background-color: #494949; @@ -90,178 +53,145 @@ body { --anypoint-dropdown-menu-label-color: #fff; --anypoint-dropdown-menu-info-message-color: #fff; --anypoint-item-hover-background-color: #616161; - --anypoiont-autocomplete-background-color: #494949; - --anypoint-icon-button-emphasis-low-color: #fff; - --api-form-action-icon-color: #fff; - --api-form-action-button-color: #fff; - --anypoint-icon-button-emphasis-low-color: #fff; - --anypoiont-autocomplete-background-color: #494949; - --auth-method-oauth2-redirect-info-color: #fff; - --inline-documentation-color: #fff; - --code-mirror-background-color: #37474F; + --anypoint-item-focused-background-color: #212121; + --anypoint-autocomplete-background-color: #494949; + --anypoint-icon-button-emphasis-low-color: #c5c5c5; + --anypoint-item-before-background: transparent; + + --anypoint-button-emphasis-low-hover-background-color: #616161; + --anypoint-button-emphasis-low-focus-background-color: var(--anypoint-button-emphasis-low-hover-background-color); + --anypoint-button-emphasis-low-focus-color: var(--primary-color); + + --code-mirror-background-color: #1e1e1e; + --code-mirror-gutters-background-color: #1e1e1e; --code-mirror-string-color: #C3E88D; --code-mirror-punctuation-color: #EEFFFF; --code-mirror-atom-color: #F07178; --code-mirror-number-color: #F78C6A; --code-mirror-cursor-color: #009688; - --code-mirror-gutters-background-color:#212121; - --code-mirror-variable-color: #fff; - --code-mirror-selected-background-color: #7c7c7c; - --code-mirror-focused-selected-background-color: #2196f3; - --code-mirror-meta-color: #EEEEEE; - --code-mirror-attribute-color: #84c9ff; - --code-mirror-tag-color: #ff7c7c; - --code-mirror-qualifier-color: #BDBDBD; - --code-mirror-variable2-color: #fff; - --code-mirror-property-color: #FFCB6B; - --code-mirror-keyword-color: #C792EA; - --request-editor-panel-background-color: #424242; - --request-editor-panel-border: 1px #757575 solid; - --request-actions-panel-empty-screen-color: #fff; - --request-action-iterator-editor-background-color: #212121; - --request-action-iterator-editor-info-color: #fff; - --request-condition-editor-background-color: #212121; + --code-mirror-tag-color: #ffffff; + --code-mirror-tag-color: #b4b4b4; + --code-mirror-gutters-border-right-color: #757575; - --code-color: #fff; - --code-background-color: #263238; - --code-type-boolean-value-color: #F07178; --code-operator-value-background-color: transparent; + --code-background-color: #212121; + --code-color: #fff; --code-type-number-value-color: #eb67b0; - --code-token-comment-value-color: #C792EA; - --code-property-value-color: #F07178 - --code-keyword-value-color: #C3E88D; - --code-type-text-value-color: #FFCB6B; - --code-punctuation-value-color: rgba(255, 255, 255, 0.82); + --code-property-value-color: #b0e6ff; + --code-type-text-value-color: #ffb89b; + --code-type-boolean-value-color: #72baff; + --code-type-number-value-color: #b5cea8; + --code-token-comment-value-color: #91afcd; + --code-keyword-value-color: #63d0ff; --http-code-snippet-code-text-shadow: #fff; --http-code-snippet-container-background-color: var(--code-background-color); --http-code-snippet-code-function-color: #82AAFF; --http-code-snippet-code-keyword-color: #C792EA; --http-code-snippet-code-cdata-color: #adb9c5; - --response-status-view-loading-time-color: #fff; - --anypoint-button-emphasis-high-background-color: #fff; - --anypoint-button-emphasis-high-focus-background-color: #E3F2FD; - --anypoint-button-emphasis-low-focus-color: var(--accent-color); - --anypoint-button-emphasis-high-hover-background-color: var(--primary-color); - --anypoint-button-hover-background-color: var(--primary-color); - --anypoint-button-emphasis-high-color: #2196f3; - --anypoint-button-color: #2196f3; - --anypoint-input-compatibility-label-color: #fff; - --anypoint-dropdown-menu-compatibility-label-color: #fff; - --url-input-editor-query-title-color: #fff; - --anypoint-button-color: #FF9800; - --anypoint-checkbox-checked-color: #FF9800; - --anypoint-checkbox-checked-color: #FF9800; - --anypoint-switch-active-color: #FF9800; - --anypoint-dialog-title-color: #fff; - --anypoint-dialog-content-color: rgba(255, 255, 255, 0.74); - - --http-method-label-get-background-color: rgb(0, 128, 0); - --http-method-label-get-color: #fff; - --http-method-label-post-background-color: rgb(33, 150, 243); - --http-method-label-post-color: #fff; - --http-method-label-put-background-color: rgb(255, 165, 0); - --http-method-label-put-color: fff; - --http-method-label-delete-background-color: rgb(244, 67, 54); - --http-method-label-delete-color: fff; - --iron-icon-fill-color: #fff; - --api-type-document-type-attribute-color: #fff; - --api-annotation-document-color: #fff; - --api-body-document-description-color: #fff; - --api-method-documentation-description-color: #fff; - --api-method-documentation-bottom-navigation-color: #fff; - - --api-method-documentation-url-background-color: var(--code-background-color); - --markdown-styles-code-text-shadow: none; - - --api-type-document-property-parent-color: #fff; - - --from-row-action-icon-color: #fff; - --icon-button-color: #fff; - - --api-console-menu-background-color: #424242; - --api-console-menu-color: #fff; - - --api-endpoint-documentation-bottom-navigation-color: #fff; - --api-navigation-section-title-focus-background-color: #616161; - --api-endpoint-documentation-tryit-background-color: #424242; - --api-endpoint-documentation-tryit-panels-background-color: #424242; - --api-type-document-property-color: #fff; - --api-endpoint-documentation-description-color: #fff; - --api-body-document-code-color: #fff; - - - --arc-menu-color: #fff; - --request-list-item-history-group-header-color: #fff; - --request-list-item-selected-background-color: #212121; - --arc-menu-background-color: var(--primary-background-color); - --arc-request-workspace-tabs-close-color: #fff; - - --request-timings-progress-background: #9E9E9E; - --request-timings-progress-background: #616161; - --request-timings-progress-color: #4CAF50; - - --exchange-search-list-item-author-color: rgba(255, 255, 255, 0.74); - - --anypoiont-dropdown-shaddow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4); - --anypoiont-autocomplete-dropdown-shaddow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4); - - --box-shadow-transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1); - --box-shadow-2dp: 0 2px 2px 0 rgba(0, 0, 0, 0.14), - 0 1px 5px 0 rgba(0, 0, 0, 0.12), - 0 3px 1px -2px rgba(0, 0, 0, 0.2); - --box-shadow-3dp: 0 3px 4px 0 rgba(0, 0, 0, 0.14), - 0 1px 8px 0 rgba(0, 0, 0, 0.12), - 0 3px 3px -2px rgba(0, 0, 0, 0.4); - --box-shadow-4dp: 0 4px 5px 0 rgba(0, 0, 0, 0.14), - 0 1px 10px 0 rgba(0, 0, 0, 0.12), - 0 2px 4px -1px rgba(0, 0, 0, 0.4); - --box-shadow-6dp: 0 6px 10px 0 rgba(0, 0, 0, 0.14), - 0 1px 18px 0 rgba(0, 0, 0, 0.12), - 0 3px 5px -1px rgba(0, 0, 0, 0.4); - --box-shadow-8dp: 0 8px 10px 1px rgba(0, 0, 0, 0.14), - 0 3px 14px 2px rgba(0, 0, 0, 0.12), - 0 5px 5px -3px rgba(0, 0, 0, 0.4); - --box-shadow-12dp: 0 12px 16px 1px rgba(0, 0, 0, 0.14), - 0 4px 22px 3px rgba(0, 0, 0, 0.12), - 0 6px 7px -4px rgba(0, 0, 0, 0.4); - --box-shadow-16dp: 0 16px 24px 2px rgba(0, 0, 0, 0.14), - 0 6px 30px 5px rgba(0, 0, 0, 0.12), - 0 8px 10px -5px rgba(0, 0, 0, 0.4); - --box-shadow-24dp: 0 24px 38px 3px rgba(0, 0, 0, 0.14), - 0 9px 46px 8px rgba(0, 0, 0, 0.12), - 0 11px 15px -7px rgba(0, 0, 0, 0.4); + --authorization-method-oauth2-redirect-info-color: var(--secondary-text-color); + --auth-method-certificate-second-line-color: var(--secondary-text-color); + + --request-editor-url-area-background-color: #424242; + --request-editor-url-input-background-color: #212121; + --progress-info-background-color: #404040; + --progress-info-color: #fff; + + --arc-request-workspace-tabs-close-color: #9e9e9e; + --workspace-tabs-add-color: #fff; + + --arc-actions-tutorial-content-color: var(--secondary-text-color); + --action-editor-opened-border-color: #616161; + --action-editor-opened-title-background-color: transparent; + --action-editor-opened-title-color: #fff; + --action-condition-closed-background-color: transparent; + --action-editor-opened-title-border-bottom-color: #616161; + --action-condition-wrapper-border-bottom-color: #616161; + --action-condition-closed-border-bottom-color: #616161; + + --requests-list-history-group-header-background-color: #424242; + --requests-list-item-history-group-header-color: #fff; + + --request-panel-resizer-active-background-color: #424242; + + /* Response view styles */ + --response-empty-panel-background-color: #212121; + --error-message-icon-color: rgba(255, 255, 255, 0.64); + --error-message-color: #fff; + --error-message-code-color: #9e9e9e; + --response-status-view-request-url-background-color: #424242; + --response-tabs-border-color: #757575; + --response-tab-close-hover-background-color: #424242; + --response-code-line-numbers-border-color: #757575; + --response-code-line-numbers-color: #999; + --response-code-toggle-line-border-color: #757575; + + /* Timings view styles */ + --request-timings-total-border-color: #757575; + --request-timings-progress-background: #424242; + --request-timings-progress-color: #c6f68d; + + /* App toolbar */ + --arc-toolbar-background: #424242; + + /* ARC menu */ + --arc-rail-menu-icon-color: #757575; + --arc-rail-menu-icon-selected-color: #fff; + --arc-menu-title-background-color: #424242; + --arc-menu-title-color: #fff; + --requests-list-history-group-header-background-color: #424242; + --requests-list-item-history-group-header-color: rgba(255, 255, 255, 0.74); + + /* HTTP method colors */ + --http-get-color: #c6f68d; + --http-post-color: #b39afd; + --http-put-color: #ffc77d; + --http-patch-color: #f186c0; + --http-delete-color: #FF5252; + --http-options-color: rgba(128, 128, 128, 0.74); + --http-head-color: rgba(128, 128, 128, 0.74); + --http-connect-color: rgba(128, 128, 128, 0.74); + --http-trace-color: rgba(128, 128, 128, 0.74); + --http-method-label-get-background-color: var(--http-get-color); + --http-method-label-get-color: #000; + --http-method-label-post-background-color: var(--http-post-color); + --http-method-label-post-color: #000; + --http-method-label-put-background-color: var(--http-put-color); + --http-method-label-put-color: #000; + --http-method-label-delete-background-color: var(--http-delete-color); + --http-method-label-delete-color: #000; + --http-method-label-options-background-color: var(--http-options-color); + --http-method-label-options-background-color: #fff; + --http-method-label-head-background-color: var(--http-head-color); + --http-method-label-head-color: #fff; + --http-method-label-patch-background-color: var(--http-patch-color); + --http-method-label-patch-color: #000; + + /* Status code colors */ + --arc-status-code-color-200: #c6f68d; + --arc-status-code-color-300: #b39afd; + --arc-status-code-color-400: #ffc77d; + --arc-status-code-color-500: #FF5252; + --response-status-code-color: #000; + + /* Web session URL */ + --web-url-input-background-color: #212121; + + /* shadows */ + --box-shadow-6dp: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); + + /* Dialogs */ + --anypoint-dialog-title-color: #fff; + --anypoint-dialog-content-color: #fff; - --bottom-sheet-box-shadow: var(--box-shadow-6dp); - --bottom-sheet-background-color: var(--primary-background-color); + /* Bottom sheets */ + --bottom-sheet-background-color: #424242; --bottom-sheet-color: #fff; - --saved-request-detail-data-list-color: #fff; - --saved-request-detail-action-icon-color: #fff; - --saved-request-editor-options-color: #fff; - - --arc-toolbar-variables-panel-color: #fff; - --variables-preview-overlay-background-color: var(--primary-background-color); - --variables-preview-overlay-var-name-color: rgba(255, 255, 255, 0.54); - --variables-preview-overlay-var-value-color: rgba(255, 255, 255, 0.87); - --variables-drawer-editor-background-color: var(--primary-background-color); - - --import-table-title-request-project-background-color: #616161; - - --project-details-description-color: #fff; - - --web-url-input-background-color: #616161; - - --arc-env-container-color: #fff; - --arc-toolbar-variables-toggle-icon-color: #fff; - --arc-toolbar-back-icon-color: #fff; - --arc-toolbar-icon-color: #fff; - --arc-toolbar-button-background-color: #212121; - - --about-arc-version-label-color: #fff; - --about-arc-updates-section-background-color: #424242; -} -body[narrow] { + /* Cookies manager */ + --cookie-details-meta-color: #fff; + /* Client certificates */ + --certificate-details-data-list-color: #fff; } diff --git a/appresources/themes/@advanced-rest-client/arc-electron-default-theme/arc-electron-default-theme.css b/appresources/themes/@advanced-rest-client/arc-electron-default-theme/arc-electron-default-theme.css index 8d5e4206..d8245af2 100644 --- a/appresources/themes/@advanced-rest-client/arc-electron-default-theme/arc-electron-default-theme.css +++ b/appresources/themes/@advanced-rest-client/arc-electron-default-theme/arc-electron-default-theme.css @@ -1,80 +1,18 @@ body { - --primary-color: #00A2DF; - --accent-color: #4CAF50; - --primary-text-color: rgba(0, 0, 0, 0.87); + color: #000; + --primary-color: #00a2df; + --accent-color: #2196f3; + --error-color: red; + --primary-text-color: #000; --primary-background-color: #ffffff; - --secondary-color: #506773; - --secondary-text-color: #737373; - --disabled-text-color: #9b9b9b; - --divider-color: #dbdbdb; - --light-primary-color: var(--paper-indygo-100); - --dark-primary-color: var(--paper-blue-700); - --light-accent-color: #ff80ab; - --dark-accent-color: #f50057; - --menu-link-color: #111111; - --link-color: #00A1DF; - --toolbar-color: #ffffff; - --toolbar-background-color: #00569a; - --main-section-border-color: rgba(0, 0, 0, 0.12); - --hover-button-accent-color: #df0052; - --pages-fixed-height: calc(100vh - 64px); - --arc-menu-height: 100%; - --menu-selection-background-color: #00b9ff; - --arc-menu-selected-background-color: var(--menu-selection-background-color); - --saved-menu-selected-item-background-color: var(--menu-selection-background-color); - --history-menu-selected-item-background-color: var(--menu-selection-background-color); - --projects-menu-selected-item-background-color: var(--menu-selection-background-color); - --projects-menu-requests-selected-item-background-color: var(--menu-selection-background-color); - --rest-api-menu-selected-item-background-color: var(--menu-selection-background-color); - --error-color: #dd2c00; - --paper-dialog-background-color: #fff; - --arc-font-family: 'Roboto', 'Noto', sans-serif; - --arc-font-font-smoothing: antialiased; - --arc-font-code-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace; - --arc-font-nowrap-white-space: nowrap; - --arc-font-nowrap-overflow: hidden; - --arc-font-nowrap-text-overflow: ellipsis; - --arc-font-expensive-kerning: optimizeLegibility; - - --arc-font-display1-font-size: 34px; - --arc-font-display1-font-weight: 400; - --arc-font-display1-letter-spacing: -.01em; - --arc-font-display1-line-height: 40px; - - --arc-font-display3-font-size: 56px; - --arc-font-display3-font-weight: 400; - --arc-font-display3-letter-spacing: -.026em; - --arc-font-display3-line-height: 60px; - - --arc-font-title-font-size: 20px; - --arc-font-title-font-weight: 500; - --arc-font-title-line-height: 28px; - - --arc-font-headline-font-size: 24px; - --arc-font-headline-font-weight: 400; - --arc-font-headline-letter-spacing: -.012em; - --arc-font-headline-line-height: 32px; - - --arc-font-subhead-font-size: 16px; - --arc-font-subhead-font-weight: 400; - --arc-font-subhead-line-height: 24px; - - --arc-font-body1-font-size: 14px; - --arc-font-body1-font-weight: 400; - --arc-font-body1-line-height: 20px; - - --arc-font-body2-font-size: 14px; - --arc-font-body2-font-weight: 500; - --arc-font-body2-line-height: 24px; - - --arc-font-caption-font-size: 12px; - --arc-font-caption-font-weight: 400; - --arc-font-caption-letter-spacing: 0.011em; - --arc-font-caption-line-height: 20px; - - --select-text-user-select: text; - --select-text-cursor: text; - + --code-mirror-height: 300px; + --code-mirror-background-color: #f5f5f5; + --anypoint-dropdown-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4); + --anypoint-autocomplete-dropdown-shadow: var(--anypoint-dropdown-shadow); + + --request-editor-url-area-background-color: #e4e4e4; + --url-input-editor-border-color: #e5e5ee; + --action-button-background-color: var(--primary-color); --action-button-background-image: none; --action-button-color: #fff; @@ -84,61 +22,59 @@ body { --action-button-disabled-background-color: #eaeaea; --action-button-disabled-color: #a8a8a8; - --http-method-label-get-background-color: rgb(0, 128, 0); - --http-method-label-get-color: #fff; - --http-method-label-post-background-color: #006ec5; - --http-method-label-post-color: #fff; - --http-method-label-put-background-color: #ffa500; - --http-method-label-put-color: #1D0029; - --http-method-label-delete-background-color: #e93628; - --http-method-label-delete-color: #fff; - --http-method-label-patch-background-color: #811f92; - --http-method-label-patch-color: #F2F1EF; + --action-editor-opened-border-color: #2196f3; + --action-editor-opened-title-background-color: #0d47a1; + --action-editor-opened-title-color: #fff; - --anypoiont-dropdown-shaddow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4); - --anypoiont-autocomplete-dropdown-shaddow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4); + /* Toolbars */ + --arc-menu-title-background-color: #0073ad; + --arc-menu-title-color: #fff; + --arc-toolbar-background: #0073ad; + --arc-toolbar-color: #fff; - --anypoint-listbox-background-color: #fff; - --api-navigation-list-item-selected-background-color: #E1F5FE; - --api-navigation-list-item-selected-color: #0277BD; - --api-navigation-operation-font-size: 13px; + /* Main navigation menu */ + --arc-rail-menu-icon-color: #de1643; + --arc-menu-title-background-color: #0073ad; + --arc-menu-title-color: #fff; - --code-background-color: #f5f2f0; + /* List items */ + /* --anypoint-item-before-background: #fff; */ - --box-shadow-transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1); - --box-shadow-2dp: 0 2px 2px 0 rgba(0, 0, 0, 0.14), - 0 1px 5px 0 rgba(0, 0, 0, 0.12), - 0 3px 1px -2px rgba(0, 0, 0, 0.2); - --box-shadow-3dp: 0 3px 4px 0 rgba(0, 0, 0, 0.14), - 0 1px 8px 0 rgba(0, 0, 0, 0.12), - 0 3px 3px -2px rgba(0, 0, 0, 0.4); - --box-shadow-4dp: 0 4px 5px 0 rgba(0, 0, 0, 0.14), - 0 1px 10px 0 rgba(0, 0, 0, 0.12), - 0 2px 4px -1px rgba(0, 0, 0, 0.4); - --box-shadow-6dp: 0 6px 10px 0 rgba(0, 0, 0, 0.14), - 0 1px 18px 0 rgba(0, 0, 0, 0.12), - 0 3px 5px -1px rgba(0, 0, 0, 0.4); - --box-shadow-8dp: 0 8px 10px 1px rgba(0, 0, 0, 0.14), - 0 3px 14px 2px rgba(0, 0, 0, 0.12), - 0 5px 5px -3px rgba(0, 0, 0, 0.4); - --box-shadow-12dp: 0 12px 16px 1px rgba(0, 0, 0, 0.14), - 0 4px 22px 3px rgba(0, 0, 0, 0.12), - 0 6px 7px -4px rgba(0, 0, 0, 0.4); - --box-shadow-16dp: 0 16px 24px 2px rgba(0, 0, 0, 0.14), - 0 6px 30px 5px rgba(0, 0, 0, 0.12), - 0 8px 10px -5px rgba(0, 0, 0, 0.4); - --box-shadow-24dp: 0 24px 38px 3px rgba(0, 0, 0, 0.14), - 0 9px 46px 8px rgba(0, 0, 0, 0.12), - 0 11px 15px -7px rgba(0, 0, 0, 0.4); - --bottom-sheet-box-shadow: var(--box-shadow-6dp); + /* Dividers */ + --dark-divider-opacity: 0.14; - --variables-preview-overlay-background-color: var(--primary-background-color); - --arc-env-container-color: #fff; - --arc-toolbar-variables-toggle-icon-color: #fff; - --arc-toolbar-back-icon-color: #fff; - --arc-toolbar-icon-color: #fff; -} + /* shadows */ + --box-shadow-6dp: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); -body[narrow] { + /* Code editors */ + --code-background-color: #f5f2f0; + /* HTTP method colors */ + --http-get-color: rgba(0, 128, 0, 0.74); + --http-post-color: rgba(33, 150, 243, 0.74); + --http-put-color: rgba(255, 165, 0, 0.74); + --http-patch-color: rgb(156, 39, 176); + --http-delete-color: rgba(244, 67, 54, 0.74); + --http-options-color: rgba(128, 128, 128, 0.74); + --http-head-color: rgba(128, 128, 128, 0.74); + --http-connect-color: rgba(128, 128, 128, 0.74); + --http-trace-color: rgba(128, 128, 128, 0.74); + --http-method-label-get-background-color: var(--http-get-color); + --http-method-label-get-color: #fff; + --http-method-label-post-background-color: var(--http-post-color); + --http-method-label-post-color: #fff; + --http-method-label-patch-background-color: var(--http-patch-color); + --http-method-label-patch-color: #fff; + --http-method-label-put-background-color: var(--http-put-color); + --http-method-label-put-color: #fff; + --http-method-label-delete-background-color: var(--http-delete-color); + --http-method-label-delete-color: #fff; + --http-method-label-options-background-color: var(--http-options-color); + --http-method-label-options-background-color: #fff; + --http-method-label-head-background-color: var(--http-head-color); + --http-method-label-head-background-color: #fff; + --http-method-label-trace-background-color: var(--http-trace-color); + --http-method-label-trace-background-color: #fff; + --http-method-label-connect-background-color: var(--http-connect-color); + --http-method-label-connect-background-color: #fff; } diff --git a/arc-actions/introduction/README.md b/arc-actions/introduction/README.md deleted file mode 100644 index ff1d134b..00000000 --- a/arc-actions/introduction/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Introduction - -ARC actions allows you automate some work before and after request is made. - -The request actions allow to perform some logic before the connection to the destination URL is made. At this time you can modify the request values by setting up variables or modifying cookies. The actions run before other transformations are made to the request object like applying cookies or variables. - -The response actions are performed after the response has been completely ready from the connection, the response object has been created, and cookies has been processed. This way you can modify data stored in ARC after a response has been processed. - -Actions by default runs synchronously. This means that the request is being made after all request actions finish. The same for the response actions. Response is reported after the actions are performed. When it make sense some actions may have configuration option to enable asynchronous processing. - -When an action fails the request fails. Some actions may have a configuration option to ignore failures and allow to continue the request. - diff --git a/arc-actions/introduction/remove-cookie-s-action.md b/arc-actions/introduction/remove-cookie-s-action.md deleted file mode 100644 index 747821fe..00000000 --- a/arc-actions/introduction/remove-cookie-s-action.md +++ /dev/null @@ -1,4 +0,0 @@ -# Remove cookie\(s\) action - -Coming soon - diff --git a/arc-actions/introduction/set-cookie-action.md b/arc-actions/introduction/set-cookie-action.md deleted file mode 100644 index ee9ef995..00000000 --- a/arc-actions/introduction/set-cookie-action.md +++ /dev/null @@ -1,12 +0,0 @@ -# Set cookie action - -Set cookie action allows you to create a new cookie or to update existing one from the request or the response data. The cookie is stored in Electron's internal cookie storage \(ARC is built on the Electron platform which is derivative of the Chromium project\). - -To set a cookie you need to configure cookie name to set, it's URL configuration, and the value. - -The **name** of the cookie can be any value that is acceptable as a cookie value in HTTP specification. - -The **URL** of the cookie can be either a request or final response URL or manually configured from a domain and a path. In the Chromium project cookies are internally associated with an URL. This includes the host part of the URL and the path. Final response URL is the URL used to make the last request before receiving non-redirected response \(or the first response if redirects are disabled for the request\). - -Finally the data can be extracted from the request or response data.It can be an URL, headers, or the body. Depending whether it's request or response action the source of the data can be either a HTTP method or the status code. - diff --git a/arc-actions/introduction/set-variable-action.md b/arc-actions/introduction/set-variable-action.md deleted file mode 100644 index 0cc24788..00000000 --- a/arc-actions/introduction/set-variable-action.md +++ /dev/null @@ -1,4 +0,0 @@ -# Set variable action - -Coming soon. - diff --git a/assets/Browserstack-logo@2x.png b/assets/Browserstack-logo@2x.png deleted file mode 100644 index 973bbc5c..00000000 Binary files a/assets/Browserstack-logo@2x.png and /dev/null differ diff --git a/dev-changelog.md b/dev-changelog.md deleted file mode 100644 index 7a70ae0b..00000000 --- a/dev-changelog.md +++ /dev/null @@ -1,68 +0,0 @@ -## Security - -- Disabled node integration in the renderer process -- Added content security policy to the application -- Added preload script to be very specific about code that can be executed in the renderer process - -## General - -- Upgraded Electron to version 4 -- Upgraded components to Polymer 2.0; Components now use Web Components specification v1. -- Navigation now pop-ups from the application drawer (to enable go to Settings -> Experiments) -- Redesigned navigation: - - Default screen is now workspace screen; other screens are sub-pages - - Access to web sockets is now in application menu > Request - - Added button to refresh list in the menu - - Deprecating "Saved" and added message to the menu. - - Navigation lists now comes with 3 size settings: default, comfortable, and compact (sounds like Gmail to you?). Change it in Settings > View -- New settings panel -- Parts of the application has been modularized and moved to external libraries (Payload processor, ARC preferences manager, Content search, Source manager, Cookie parser, Google Drive service, OAuth2 service, Request engine, Session manager) -- Redesigning themes and sources loading process to support single components source. This simplifies application startup logic by a lot which makes it easier to test and maitain. Because of that the real Anypoint theme cannot be recreated (inputs, icons). Anypoint theme will use anypoint colors scheme only. -- Adding dark theme -- Adding an option to install theme from npm or GitHub repo. -- Variables are now part of the application main toolbar instead of a request -- Redesign of data models -- Redesign of import / export logic. Now export also includes internal entity ID that will be restored when importing back to the application. Conflicts are resolved to new accept incoming data. -- Duplicate request: new context menu option for request workspace tabs. -- The app now accept `--debug` command line switch to enable detailed message tracing -- Added file log output. The log file location dependes on the OS. See [electronjs.org/docs/api/app](https://electronjs.org/docs/api/app#appgetpathname). -- Fixed units in Task manager -- Task manager now renders processes names more accurately -- Adding release channels. Now app support Stable, Beta, and Unstable release channels. Access settings in "About ARC" screen. -- Task manager may no show memory info [electron#16179](https://github.com/electron/electron/issues/16179) -- Adding new "File" menu entry to open a file from the filesystem [#111](https://github.com/advanced-rest-client/arc-electron/issues/111) - -## Requests - -- Redesigned workspace experience -- Increased workspace load time -- Tabs can now be reordered -- Removed headers sets -- Added code examples to the request options -- Request now can be saved in more than one project -- New settings options: - - Disable local variables (defined in variables panel) - - Disable system variables - - Disable redirects - - Enable SSL certificates validation (disabled by default). To manage this setting go to Settings > Experiments - - Enable node native request instead of ARC's own HTTP client. Use it if you having trouble connecting to your web service. To manage this setting go to Settings > Experiments -- Redesigned "save" dialogs and added request details dialog with stored metadata -- When restoring workspace state latest response is also restored - -## APIs - -- Upgraded API console to version 5 - - This breaking change renders previously saved APIs incompatible with current version; APIs have to be re-imported - - API console now works with new AMF parser that allows to read RAML and OAS files -- Fixing Anypoint sign in process -- REST APIs stored before this version cannot be used with this version. Old console is not supported. -- REST APIs are now stored as AMF ld+json model which enables future API spec editing - -## Roadmap (future releases) - -- ARC plug-ins registry - enables users to install plugins and themes and share their plugins with the community -- API visual designer to replace projects - this allows to create more advanced projects that can be later on exported to RAML or OAS spec -- Exchange asset upload - adding created with visual designer APIs to Exchange -- Integration with API monitoring by MuleSoft - enables application users to upload API test definition to API Monitoring to run API tests -- Remove of "Saved" requests menu, screen and search option. All currently saved requests will become part of a "Saved" project -- Upgrade components to use ES6 import instead of deprecated HTML imports. diff --git a/docs/api/auth-object.md b/docs/api/auth-object.md deleted file mode 100644 index 5213a8ae..00000000 --- a/docs/api/auth-object.md +++ /dev/null @@ -1,171 +0,0 @@ -# Auth object - -An object represeting authorization configuration for the request. - -## Example - -```json -{ - "type": "oauth2", - "settings": {} -} -``` - -The `type` property represents auhorization method type. One of `basic`, `ntlm`, `digest`, `oauth2`, and `oauth1`. - -The `settings` property vary and depends on the `type.` - -### Basic - -```json -{ - "type": "basic", - "settings": { - "hash": "dGVzdDp0ZXN0", - "password": "test", - "username": "test" - } -} -``` - -### NTLM - -```json -{ - "type": "ntlm", - "settings": { - "domain": "my-domain", - "password": "test", - "username": "test" - } -} -``` - -### Digest - -```json -{ - "type": "digest", - "settings": { - "username": "user", - "realm": "realm", - "nonce": "nonce", - "response": "58f63c763ba73a09643eece458124266", - "opaque": "opaque", - "qop": "auth", - "nc": "00000001", - "cnonce": "edad6fdf6f5cbc3" - } -} -``` - -### OAuth2 - Implicit (access token) type - -```json -{ - "type": "oauth2", - "settings": { - "type": "implicit", - "clientId": "my-client-id", - "accessToken": "", - "tokenType": "Bearer", - "scopes": [ - "profile" - ], - "deliveryMethod": "header", - "deliveryName": "authorization", - "authorizationUri": "https://auth.domain.com/auth", - "redirectUri": "https://auth.domain.com/callback" - } -} -``` - -### OAuth2 - Authorization code type - -```json -{ - "type": "oauth2", - "settings": { - "type": "authorization_code", - "clientId": "my-client-id", - "accessToken": "", - "tokenType": "Bearer", - "scopes": [ - "profile" - ], - "deliveryMethod": "header", - "deliveryName": "authorization", - "clientSecret": "secret", - "authorizationUri": "https://auth.domain.com/auth", - "accessTokenUri": "https://auth.domain.com/token", - "redirectUri": "https://auth.domain.com/callback" - } -} -``` - -### OAuth2 - Client credentials type - -```json -{ - "type": "oauth2", - "settings": { - "type": "client_credentials", - "clientId": "my-client-id", - "accessToken": "", - "tokenType": "Bearer", - "scopes": [ - "profile" - ], - "deliveryMethod": "header", - "deliveryName": "authorization", - "clientSecret": "secret", - "accessTokenUri": "https://auth.domain.com/token" - } -} -``` - -### OAuth2 - Password type - -```json -{ - "type": "oauth2", - "settings": { - "type": "password", - "clientId": "my-client-id", - "accessToken": "", - "tokenType": "Bearer", - "scopes": [ - "profile" - ], - "deliveryMethod": "header", - "deliveryName": "authorization", - "username": "username", - "password": "password", - "accessTokenUri": "https://auth.domain.com/token" - } -} -``` - -### OAuth1 - -```json -{ - "type": "oauth2", - "settings": { - "consumerKey": "key", - "consumerSecret": "secret", - "token": "token", - "tokenSecret": "token-secret", - "timestamp": 1555778946, - "nonce": "QxVd8wL3CFG4Q1ULnG0bxWNIPmsdu3mK", - "realm": "realm", - "signatureMethod": "HMAC-SHA1", - "requestTokenUri": "https://auth.domain.com/token", - "accessTokenUri": "https://auth.domain.com/auth", - "redirectUri": "https://auth.domain.com/callback", - "authTokenMethod": "POST", - "authParamsLocation": "authorization", - "authorizationUri": "https://auth.domain.com/login" - } -} -``` diff --git a/docs/api/host-object.md b/docs/api/host-object.md deleted file mode 100644 index f83261a0..00000000 --- a/docs/api/host-object.md +++ /dev/null @@ -1,28 +0,0 @@ -# Host object - -Hosts allows to connect to a server using mapped value as a host and use `host` header from the mapping. -This allows to (for example) test virtual hosts on your server when the domain is not yet connected to the IP address. - -## Example - -```json -{ - "comment": "", - "enabled": true, - "from": "domain.com", - "to": "127.0.0.1", - "updated": 1555783444231 -} -``` - -The following example wiil cause the request to the URL `https://domain.com/endpoint` to be send to `https://127.0.0.1/endpoint`. The `Host` header will contain `domain.com` instead of `127.0.0.1`. - - -``` -Connecting to 127.0.0.1 ... - -GET /endpoint HTTP/1.1 -Host: domain.com -Connection: close - -``` diff --git a/docs/api/request-action.md b/docs/api/request-action.md deleted file mode 100644 index bb3f5d33..00000000 --- a/docs/api/request-action.md +++ /dev/null @@ -1,39 +0,0 @@ -# RequestAction - -An object representing an action to be executed before the request is made. - -## Example - -```json -{ - "variables": [{ - "variable": "AnypointToken", - "action": "store-variable", - "value": "unused", - "enabled": true - }] -} -``` - -## Description - -### variables - -`Array` A list of variables to manipulate before executing the request. - - -__variables.variable__ - -`String`. Name of the variable to update - -__variables.action__ - -`String`. `store-variable` to save value in the datastore or `assign-variable` to store variable in memory only. In memory values always overrides stored values. - -__variables.value__ - -`String`. New value. Can contain other variables, like `Bearer ${authToken}`. - -__variables.enabled__ - -`Boolean`. Whether or not the action is enabled. It is always rendered in the UI but excludes it from the execution. diff --git a/docs/api/request.md b/docs/api/request.md deleted file mode 100644 index 748594e0..00000000 --- a/docs/api/request.md +++ /dev/null @@ -1,84 +0,0 @@ -# ARC Request - -An object describing a request in request editor. - -```json -{ - "url": "http://domain.com", - "method": "POST", - "headers": "Content-Type: application/json", - "payload": "{\n \"test\": true\n}", - "auth": "Auth", - "requestActions": "RequestAction", - "responseActions": ["ResponseAction"], - "_state": { - "collapseOpened": false, - "selectedTab": 1, - "urlOpened": false - } -} -``` - -## Properties - -### url - -`String`. __Required__ - -The request URL. - -### method - -`String`. __Required__ - -HTTP method name. - -### headers - -`String`. __Optional__. - -HTTP headers string as defined in [rfc7230](https://httpwg.org/specs/rfc7230.html#header.fields). - -### payload - -`String` __Optional__. - -HTTP message to send with the request. - -Note, that ARC removes the payload from `GET` and `HEAD` requests. - -### auth - -`Object`. __Optional__. - -Authorization configuration for the request. See [Auth object](auth-object.md) document for more information. - -### requestActions - -`Object`. __Optional__. - -Actions to be executed before the request is executed. See [Request Actions](request-action.md) document for more information. - -### responseActions - -`Array`. __Optional__. - -List of actions to be executed after the response is ready. See [Response Actions](response-action.md) document for more information. - -### _state - -`Object`. __Optional__. - -The request editor UI state control options. - -___state.collapseOpened__ - -`Boolean`. When `true` the parameters editor (headers, body, authorization, actions) is collapsed. - -__selectedTab__ - -`Number`. Index of selected request tab. - -__urlOpened__ - -`Boolean`. When `true` the URL detailed editor is opened. diff --git a/docs/api/response-action.md b/docs/api/response-action.md deleted file mode 100644 index d6706283..00000000 --- a/docs/api/response-action.md +++ /dev/null @@ -1,174 +0,0 @@ -# ResponseAction - -An object representing an action to be executed after the request is executed. -When the action run all response properties are available. - -Response actions allows to lookup for a value in all request/response fileds and assign veriables from the data. This allows for semi-automation when executing a request. For example authorization request returns auth token which can be then passed to a variable and then used with another request. - -## Example - -```json -{ - "source": "response.url.hash.access_token", - "action": "store-variable", - "destination": "AnypointToken", - "enabled": true, - "conditions": [{ - "source": "response.status", - "operator": "equal", - "condition": "200", - "enabled": true - }] -} -``` - -## Description - -### source - -`String`. - -First thing to do to configure the request action is to tell the application where to look for the data. The source represents a path to the data separated by a dot. - -First part of the path is either `request` or `response`. - -Other values depends on which data source is being used. - -#### request source - -Allows to access request properties: `url`, `headers`, `body`. - -#### response source - -Allows to access response properties: `url`, `status`, `headers`, `body`. - -#### Accessing the data - -##### url data - -The application uses the URL for last response (it can be more than one response if there was a redirection). -You can specify following paths for url: - -- `host` - Returns the host value, e.g. `api.domain.com` -- `protocol` - Returns URL's protocol, e.g. `https:` -- `path` - URL's path, e.g. `/path/to/resource.json` -- `query` - Returns full query string, e.g. `version=1&page=test` -- `query.[any string]` - Returns the value of a query parameter. For `query.version` it would return `1` -- `hash` - Returns everything that is after the `#` character, e.g. `access_token=token&state=A6RT7W` -- `hast.[any string]` - It treats hash as query parameters and returns the value of the parameter. For `hash.access_token` it would return `token` - -__Examples__ - -URL: `https://auth.domain.com/auth/oauth-popup?version=2&remember=true#access_token=z8a1d97c-c4e6-488f-8ac0-a32e3d749f49&token_type=bearer&state=Y2I1CD` - -```javascript -path = 'response.url.host' // auth.domain.com -path = 'response.url.protocol' // https: -path = 'response.url.path' // /auth/oauth-popup -path = 'response.url.query' // version=2&remember=true -path = 'response.url.query.version' // 2 (String!) -path = 'response.url.hash' // access_token=z8a1d97c-c4e6-488f-8ac0-a32e3d749f49&token_type=bearer&state=Y2I1CD -path = 'response.url.hash.access_token' // z8a1d97c-c4e6-488f-8ac0-a32e3d749f49 -``` - -##### headers data - -Allows to access headers data. The application ignores character case. - -__Examples__ - -Headers list: - -``` -Content-Type: application/json -Content-Length: 100 -Connection: close -``` - -```javascript -path = 'response.headers.content-type' // application/json -path = 'response.headers.Content-length' // 100 (it is String!) -``` - -##### status data - -There's no additional accessors. The status code is a number returned by the server. - -__Examples__ - -``` -HTTP/1.1 200 OK -``` - -```javascript -path = 'response.status' // 200 -``` - -##### body data - -Currently only JSON and XML responses are supported. Also, XML has to be valid XML string or the parser will not produce the value. - -For JSON types simply specify path to the data. To access array values use dot with index notation, e.g.: `data.0.name`. This will get value for `name` property for the first item on the data array. - -ARC allows to iterate over arrays for lookup the value. See `Iteratiors` section below. - -__Example for JSON__ - -```json -{ - "property": { - "otherProperty": { - "value": 123456 - } - } -} -``` - -```javascript -path = 'response.body.property.otherProperty.value' // 123456 -``` - -Note, `Boolean` and `Number` values are cast to the corresponding type. - -__Example for XML__ - -```xml - - - - -
- 202-456-1111 - - -``` - -```javascript -path = 'response.body.people.person.0.phoneNumber' // 202-456-1111 -``` - -__Accessing XML attribute value__ - -XML path supports attr(ATTRIBUTE NAME) function that returns the value of the attribute: - -```javascript -path = 'response.body.people.person.0.name.attr(first)' // george -``` - -### action - -`String` - -`store-variable` to save value in the datastore or `assign-variable` to store variable in memory only. In memory values always overrides stored values. - -### destination - -`String` - -Name of the variable to update. - -### enabled - -`Boolean` - -Whether or not the action is enabled. It is always rendered in the UI but excludes it from the execution. diff --git a/docs/api/workspace.md b/docs/api/workspace.md deleted file mode 100644 index 0fde6b06..00000000 --- a/docs/api/workspace.md +++ /dev/null @@ -1,236 +0,0 @@ -# Workspaces - -A workspace represents a list of requests rendered in a single workspace view and configuration applied to this requests. The workspace configuration overrides global application configuration. However, the same configuration applied to the request obejct overrides workspace settings. - -## Data structure - -This data structure is supported since ARC 14.0.0. - -### Example - -```json -{ - "kind": "ARC#Workspace", - "version": "0.0.1", - "published": "2019-04-19T22:18:37.475Z", - "provider": { - "url": "https://page.domain.com", - "name": "John Doe", - "email": "jdoe.salesforce.com" - }, - "requests": [ - { - "headers": "Accept: application/ld+json\ncontent-length: 406", - "method": "POST", - "payload": "{...}", - "url": "http://api.domain.com/endpoint", - "_isErrorResponse": false, - "_response": { - "status": 200, - "statusText": "OK", - "headers": "Content-Type: application/json\r\nTransfer-Encoding: chunked", - "url": "http://api.domain.com/endpoint/redirect.json", - "payload": "Hello World." - }, - "_responseMeta": { - "loadingTime": 366.39999999897555, - "responseIsXhr": false, - "timing": { - "dns": 46.80000000007567, - "connect": 158.0999999996493, - "receive": 2.3999999993975507, - "send": 1.5999999995983671, - "ssl": -1, - "wait": 157.50000000025466 - }, - "sourceMessage": "GET /endpoint HTTP/1.1\r\nHost: api.domain.com\r\n\r\n" - } - } - ], - "selected": 0, - "environment": "DevX", - "variables": { - "var": "value" - }, - "config": { - "requestTimeout": 120, - "validateCertificates": true, - "followRedirects": true, - "sentMessageLimit": 1024, - "workspaceReadOnly": true, - "variablesDisabled": false, - "nativeTransport": false - }, - "webSession": { - "webSessionUrl": "https://app.domain.com/login" - }, - "auth": { - "oauth2RedirectUri": "https://auth.domain.com/callback.html" - }, - "hosts": ["Host"] -} -``` - -### Description - -#### kind - -The kind of data struct. For workspace it is always `ARC#Workspace`. - -#### version - -__Optional.__ `String`. The version of the workspace file. Any string. It is rendered in workspace info dialog. - -#### published - -__Optional.__ `String`. Workspace publication date as ISO date string. - -#### provider - -__Optional.__ `Object`. Author info. -See `Provider` description for item details. - -#### requests - -`Array`. List of requests to render in the workspace view. See `Request` description for item details. - -#### selected - -__Optional.__ `Number`. The index of an item in the requests array to be seleced in the view. - -#### environment - -__Optional.__ `String`. Name of the selected environment. In ARC environments are generated dynamically by name rather by ID. If the environment does not exists it will create a dynamic environment that will become persistant once a variable is added to it. - -#### variables - -__Optional.__ `Object`. A map of key-value pairs where key is variable name and value is variable value. Values can contain other variables in form of `${varName}`. - -#### hosts - -The hosts table. See [Host object](host-object.md) document for more details. - -#### config - -__Optional.__ Workspace configuration. Values defined in this struct are design to override global application settings. This allows to apply application configuration but only on workspace level. -See `Config` description for item details. - -#### webSession - -__Optional.__ Configuration option related to setting up a web session and cookie management. -See `WebSession` description for item details. - -#### auth - -__Optional.__ Configuration option related to request authorization. -See `Auth` description for item details. - - -### Provider - -#### url - -__Optional.__ `String`. Author website URL. - -#### name - -__Optional.__ `String`. Author name. - -#### email - -__Optional.__ `String`. Author email. - - -### Auth - -#### oauth2RedirectUri - -__Optional.__ `String`. Auth2 redirect URI to be used with request editor. -The URL may be fake but valid. - -### WebSession - -#### webSessionUrl - -__Optional.__ `String`. An URL to be placed in the URL input when iniciating web session ("Login to a web service" menu). - -### Config - -#### requestTimeout - -__Optional.__ `Number`. The number of seconds after which the request will time out. `0` value means no timeout. Only positive integer and zero is allowed. - -#### validateCertificates - -__Optional.__ `Boolean`. Control whether the app should validate SSL certificates. - -#### followRedirects - -__Optional.__ `Boolean`. Control whether the app should follow HTTP redirects. - -#### workspaceReadOnly - -__Optional.__ `Boolean`. When `true` then loaded workspace file won't be overriten by user interaction (normally every interaction like making a request, changes workspace file to store current state). - -#### sentMessageLimit - -__Optional.__ `Number`. Number of bytes that limits the HTTP request message to be stored in the application (and also workspace file). -Normally ARC does not impose any limitations for data size. However sometimes it may be required for very big requests that may influence performance. - -#### variablesDisabled - -__Optional.__ `Boolean`. When `true` variables evaluation is disabled for any request made from the workspace. - -#### nativeTransport - -__Optional.__ `Boolean`. When `true` it instructs the app to use native node HTTP/HTTPS module instead of ARC's HTTP transport library. - -### Request - -The request object contains the same properties as [Arc Request](request.md) object. Below is the description of additional properties used in workspace state. - -#### _response - -__Optional.__ `Object`. An object describing a response to be rendered with the request at load. - -___response.status__ - -`Number`. Response status code. - -___response.statusText__ - -`String`. Response status message. - -___response.headers__ - -`String`. HTTP headers string - -___response.url__ - -`String`. The final URL of the request. When the request was redirected this is the last redirect URL. Otherwise it is request URL. - -___response.payload__ - -`String|Object`. Response message. -When string it will be rendered without any processing (unless JSON or XML value recognized by `content-type` header). - -When object it must contain `type` and `data` properties. Currently only `Buffer` type is supported as a stringified value of Node's Buffer. The data is an array of byte char codes. - - -#### _responseMeta - -__Optional.__ `Object`. Responses metadata that helps render response view. - -___responseMeta.loadingTime__ - -`Number`. Total time of sending the request and receiving the response. - -___responseMeta.responseIsXhr__ - -__Optional.__ `Boolean`. When `true` ARC renders simplified view of the response panel - without timings and redirects. In this case corresponding `redirects` and `timing` properties are unused. - -___responseMeta.timing__ - -__Optional.__ `Object`. A HAR 1.2 timings object. It contains values of request timings data: `connect` as a time used to make a connection, `receive` as time of receiving data, `send` as time of transmitting the HTTP message, `wait` as a time of waiting for the message to arrive, `dns` as a time needed for DNS lookup, and `ssl` as a time needed for SSL hadshake. If any value is not available `-1` should be used. - -This values are rendered in response timings panel. diff --git a/docs/images/request-actions-editor.png b/docs/images/request-actions-editor.png deleted file mode 100644 index fad70254..00000000 Binary files a/docs/images/request-actions-editor.png and /dev/null differ diff --git a/docs/images/request-condition-editor.png b/docs/images/request-condition-editor.png deleted file mode 100644 index 171266b4..00000000 Binary files a/docs/images/request-condition-editor.png and /dev/null differ diff --git a/guides/authenticating-with-oauth2-and-request-actions.md b/guides/authenticating-with-oauth2-and-request-actions.md deleted file mode 100644 index 557989ec..00000000 --- a/guides/authenticating-with-oauth2-and-request-actions.md +++ /dev/null @@ -1,47 +0,0 @@ -# Authenticating With OAuth2 And Request Actions - -It become challenging for REST testing tools to authenticate the user when OAuth2 authorization scheme is applied to an API. OAuth 2 is a multi-step process that requires user input, valid session on the authorization server, and transferring response data from a response to another request. Advanced REST Client has request actions and cookie sessions that allows to automate this process so you will spend less time managing sessions and tokens, and do more with APIs. - -In short summary, OAuth2 requires you to have a valid session on the authentication server, then you have to obtain authorization token using one of predefined or custom authorization methods \(token grant type\). The token has to be used in a request that requires authenticated user, usually by putting it into _Authorization_ header \(_access\_token_ query parameter is also used instead of the header\). This article focuses on obtaining implicit grant type token \(I am calling it browser flow because it doesn’t require server component and is designed to work in browsers only\) and then using the token in another request without copy/paste the token all the time. - -The first thing we need is to setup a session on authorization server. Without it the token request end up being redirected to a login page and therefore the ARC would render this page in response instead of getting token value. Let’s say I want to make a query to Anypoint Exchange to list my API assets. Normally I would go to [https://www.mulesoft.com/exchange/](https://www.mulesoft.com/exchange/) and log in. Then I would browse the asset in Exchange’s UI. But now I would like to query for my REST APIs assets using the API. To do so we have to setup a session inside ARC application. Open the application and from application menu select Request > Web session >Login to a web service. This brings a prompt to enter the URL of the service. - -![ARC menu option to log in to a web service](../.gitbook/assets/1.png) - -Now we enter Exchange’s url \([https://www.mulesoft.com/exchange/](https://www.mulesoft.com/exchange/)\) and after clicking the “Open” button it will bring new window, which is Chromium browser, with loaded Exchange UI. Now we navigate to “Login” page. - -![Browser window opened by ARC to setup the session](../.gitbook/assets/2.png) - -After the login process the window shows Anypoint platform page but now we are authenticated. - -![Authenticated user in browser window](../.gitbook/assets/authenticated-user-anypoint.png) - -To confirm we can go to cookie manager in ARC \(Request > Web session > Cookie manager\) and query cookies by domain mulesoft.com. - -![Generated session cookies](../.gitbook/assets/cookie-manager.png) - -To obtain the token we have to call authorization endpoint. In my case it is `https://anypoint.mulesoft.com/accounts/oauth2/authorize?client_id=AZ8ewU90hIgZMJec&redirect_uri=https%3A%2F%2Fauth.advancedrestclient.com%2Foauth-popup.html&response_type=token` -The `https://anypoint.mulesoft.com/accounts/oauth2/authorize` is the authorization endpoint. This is where you redirect the user to authenticate with OAuth2. The `client_id` parameter is a generated by OAuth2 provider ID when registering an application \(here it is not real client ID, however this is public information\). The `redirect_uri` tells where to redirect the user after login or failure. ARC uses `https://auth.advancedrestclient.com/oauth-popup.html` by default \(you can change it in application settings\). Finally `response_type` tells the authorization server that this is implicit authentication flow and in response the app expects the token to be set in redirect URL. Usually the `scope` parameter is used with OAuth2 request but I will skip it this time. - -After providing this URL to ARC’s URL field and executing the request instead of receiving login page you will see the `redirect_uri` page \(the oauth popup\). What is more interesting, the redirect URL contains `access_token` value in the URL hash part \(you may need to toggle “Details” on response view\). - -![Response with access token](../.gitbook/assets/authentication-response.png) - -Now we have to extract access token value and put it into application variable so it can be later used by other requests. We will use the request actions panel to do that. In the Actions tab create a new action in After response section. We will tell ARC to get access\_token value from response URL and then to store it as a AnypointToken variable. - -![Response action configuration](../.gitbook/assets/auth-response-action-configuration.png) - -The `hash.access_token` value in “Path to data” field tells to search for the `access_token` parameter in the `hash` part of the response URL. Finally the configuration tells the application to store the value as `AnypointToken` variable. Try running the request again. After the response is ready you will see new variable in the variables preview \(right top corner of the app\). - -![Variables list with new variable](../.gitbook/assets/variables-preview.png) - -At this point we had authenticated the user in OAuth service and then we had stored access token value as application variable. Now we can use the variable to put the token into `Authorization` header and make authenticated call to the API endpoint. Let’s try `https://anypoint.mulesoft.com/exchange/api/v1/profile` which returns profile data for the user. The endpoint requires bearer token obtained before from the authentication server. In the headers panel put `Bearer ${AnypointToken}` as the value for `Authorization` header. - -![Using variables in headers editor](../.gitbook/assets/auth-anypoint-variable.png) - -After calling the endpoint a 200 response is reported back with profile information. - -![Authenticated response](../.gitbook/assets/authenticated-response.png) - -You can use this example for any other OAuth 2 provider. You may need to change authorization parameters like authorization URI, client id, and so on. - diff --git a/main.js b/main.js deleted file mode 100644 index 732373bb..00000000 --- a/main.js +++ /dev/null @@ -1,4 +0,0 @@ -const startTime = Date.now(); - -const start = require('./scripts/main/start'); -start(startTime); diff --git a/moving-from-chrome-application-to-desktop-client.md b/moving-from-chrome-application-to-desktop-client.md deleted file mode 100644 index 649450f0..00000000 --- a/moving-from-chrome-application-to-desktop-client.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -description: >- - Advanced REST Client Chrome application is different from its desktop - counterpart. This page describes how to move from deprecated Chrome - application to desktop client. ---- - -# Moving From Chrome Application To Desktop Client - -## Step 1: install desktop client - -Go to [https://install.advancedrestclient.com/install](https://install.advancedrestclient.com/install) to install latest version of Advanced REST Client if you haven't already. - -## Step 2: export data from Chrome application - -Open Chrome application. You can recognize it by green baner in the left-bottom corner saying "**Install new ARC with new features!**" - -In the top right application menu select Import and export data. - -![Chrome application menu](.gitbook/assets/image%20%2835%29.png) - -Click on the **Prepare data** button to create export object. Depending on the amount of data it may take a minute or two. - -![Export configuration options](.gitbook/assets/image%20%2827%29.png) - -On the next screen choose "Download file" tile. - -{% hint style="warning" %} -Do not export to Google Drive as desktop client don't have access to the data created by Chrome application. -{% endhint %} - -![Export destination options](.gitbook/assets/image%20%2834%29.png) - -This opens a dialog to save the file on disk. Select any location to store the file. We will use this file later to import it in desktop client. - -## Step 3: import data to desktop client - -Once the data export from Chrome application is ready import it to the desktop client. - -Open Advanced REST Client desktop application. - -{% hint style="info" %} -At this point your system tells you there are two Advanced REST Client applications installed: Chrome application and desktop client. The desktop client has slightly lighter shade of blue in application icon. -{% endhint %} - -Select **File** > **Import data** from application system menu. - -![Import menu option in Advanced REST Client](.gitbook/assets/image%20%2855%29.png) - -In the import screen choose "Open from file" option and point to the file saved in the previous step. After the data are processed the import inspector screen is rendered. - -The inspector screen contains list of all data about to be imported to the application. - -![Import data inspector](.gitbook/assets/image%20%2813%29.png) - -You can to ignore some data if you wish. When finished press "Import data" button at the bottom of the screen.The "Data are now saved in the datastore" message should appear. The data are now moved to the desktop client. - -## Step 4: uninstall chrome application - -Don't get confused by having two applications installed in your system. Uninstall Chrome application using Chrome options. Open `chrome://apps/` page and find the application in the list of applications. Right click on the application icon and choose "**Remove from Chrome...**" option. - -![Removing ARC from Chrome](.gitbook/assets/image%20%2816%29.png) - -That's it. You have successfully migrated from Chrome application to desktop client. - diff --git a/package-lock.json b/package-lock.json index 1b8eebce..f98f46f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "advanced-rest-client", - "version": "16.0.0-aplha.5", + "version": "16.0.0-alpha.6", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -10,541 +10,530 @@ "integrity": "sha512-GLyWIFBbGvpKPGo55JyRZAo4lVbnBiD52cKlw/0Vt+wnmKvWJkpZvsjVoaIolyBXDeAQKSicRtqFNPem9w0WYA==", "dev": true }, - "@advanced-rest-client/about-arc-electron": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/about-arc-electron/-/about-arc-electron-4.0.0.tgz", - "integrity": "sha512-OrDTgdvGXaUvuOMgTcY5I7X79vz1mr/h3q2K6Zoqkx9fDbcJEywq58sVEL7rfFMJnLGMwLTr1dGNR2HAOCm1GA==", + "@advanced-rest-client/arc-actions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-actions/-/arc-actions-0.1.4.tgz", + "integrity": "sha512-VYchVMaK5kz0ftbZcYtivfcO/13WPJvYAMJjO4GwnNumhiNX7OZF/WbP1Gbo+6q9ctD7eR8oMv99cE8adDeAIw==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/arc-settings-panel": "^4.0.1", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@anypoint-web-components/anypoint-switch": "^0.1.2", - "lit-element": "^2.3.1" + "@advanced-rest-client/arc-environment": "^0.1.2", + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-models": "^4.2.7", + "@advanced-rest-client/arc-types": "^0.2.43", + "@advanced-rest-client/events-target-mixin": "^3.2.3", + "@advanced-rest-client/headers-parser-mixin": "^3.2.0", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-checkbox": "^1.1.3", + "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.20", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-menu-button": "^0.1.4", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "@anypoint-web-components/anypoint-tabs": "^0.1.12", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" + } + }, + "@advanced-rest-client/arc-cookies": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-cookies/-/arc-cookies-0.1.0.tgz", + "integrity": "sha512-zTHTbgEOwnriZtTe3PNzOO/Rpb9Ned553eRjSXDLutLEVOIqp1HmG8abhetae1WVD9iNvJjRlN2hOHSC1tvltQ==", + "dev": true, + "requires": { + "@advanced-rest-client/arc-events": "^0.2.10", + "@advanced-rest-client/arc-icons": "^3.1.0", + "@advanced-rest-client/arc-ie": "^1.0.2", + "@advanced-rest-client/arc-resizable-mixin": "^1.1.0", + "@advanced-rest-client/arc-types": "^0.2.33", + "@advanced-rest-client/bottom-sheet": "^3.2.2", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-checkbox": "^1.1.2", + "@anypoint-web-components/anypoint-dialog": "^0.1.3", + "@anypoint-web-components/anypoint-input": "^0.2.18", + "@anypoint-web-components/anypoint-item": "^1.0.7", + "@anypoint-web-components/anypoint-selector": "^1.1.7", + "@github/time-elements": "^3.1.1", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/app-analytics": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/app-analytics/-/app-analytics-3.0.1.tgz", - "integrity": "sha512-QN7Nw6tVymzf0eWqF5DA1oS8jLtUj8b3sWgkSZZegEvUEy4fyaPtsKDrmvMkbn9MbL5GVOcR5v8lIJkYuUaBXA==", - "dev": true, + "@advanced-rest-client/arc-definitions": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-definitions/-/arc-definitions-3.1.1.tgz", + "integrity": "sha512-AbnR14AdFwlVSqWF83senQVM5JjllBoRq5uCGBGw8gLhIXylG+nlk+9sOLlpWCeAaxYiiGGqw/Lw4Ke57xf6Hw==" + }, + "@advanced-rest-client/arc-electron-payload-processor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-electron-payload-processor/-/arc-electron-payload-processor-1.0.2.tgz", + "integrity": "sha512-I52FrPrW+8i444YCbxlWMaO1EtXDu1OxKNrEE7QArrn5f9b6Bg0nzU4bpSTb6CZpEdLFU9IGAKeQYooLaumsRw==", "requires": { - "@advanced-rest-client/uuid-generator": "^3.0.1" + "@advanced-rest-client/arc-types": "^0.2.20", + "esm": "^3.2.25" } }, - "@advanced-rest-client/arc-app-mixin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-app-mixin/-/arc-app-mixin-5.0.1.tgz", - "integrity": "sha512-bEyLjxOYkRBhx9W+Zq/WiCbDYt4FnXIgh0VnMZVuEOqTKAp6OJ1AQO2Irhb2C0EL7VNDm1o6Q27GaNzU/kMIJQ==", + "@advanced-rest-client/arc-environment": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-environment/-/arc-environment-0.1.2.tgz", + "integrity": "sha512-xvAl7M3F1k3KxmKq2w1EyKDHflMqAfk+BhCkbWNNVgB/wfZRen3cZ9B+EoUXtd+ThZ5GFel0Kg66K5hadY2o7A==", "dev": true, "requires": { - "@advanced-rest-client/app-analytics": "^3.0.1", - "@advanced-rest-client/arc-data-export": "^3.3.2", - "@advanced-rest-client/arc-data-import": "^3.1.1", - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/arc-info-messages": "^3.0.0", - "@advanced-rest-client/arc-license-dialog": "^3.0.0", - "@advanced-rest-client/arc-menu": "^3.0.1", - "@advanced-rest-client/arc-messages-service": "^3.0.1", - "@advanced-rest-client/arc-models": "^3.1.1", - "@advanced-rest-client/arc-request-logic": "^3.0.3", - "@advanced-rest-client/arc-request-workspace": "^5.0.0", - "@advanced-rest-client/arc-settings-panel": "^4.0.1", - "@advanced-rest-client/authorization-data-saver": "^3.0.0", - "@advanced-rest-client/cookie-manager": "^3.0.1", - "@advanced-rest-client/environment-selector": "^3.0.2", - "@advanced-rest-client/export-panel": "^3.2.0", - "@advanced-rest-client/google-drive-browser": "^3.1.0", - "@advanced-rest-client/history-panel": "^3.0.4", - "@advanced-rest-client/import-panel": "^3.0.1", - "@advanced-rest-client/oauth-authorization": "^4.0.2", - "@advanced-rest-client/project-details": "^3.0.1", - "@advanced-rest-client/request-hooks-logic": "^3.0.0", - "@advanced-rest-client/response-history-saver": "^3.0.1", - "@advanced-rest-client/saved-requests-panel": "^3.0.1", - "@advanced-rest-client/variables-drawer-editor": "^3.0.0", - "@advanced-rest-client/variables-evaluator": "^3.0.0", - "@advanced-rest-client/variables-manager": "^3.0.1", - "@advanced-rest-client/variables-preview-overlay": "^3.0.2", - "@advanced-rest-client/websocket-panel": "^3.0.0", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@anypoint-web-components/anypoint-menu-button": "^0.1.0", - "@polymer/app-layout": "^3.1.0", - "@polymer/iron-media-query": "^3.0.1", - "@polymer/paper-toast": "^3.0.1", - "lit-element": "^2.3.1" + "@advanced-rest-client/arc-events": "^0.2.10", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-models": "^4.2.7", + "@advanced-rest-client/arc-overlay-mixin": "^1.1.7", + "@advanced-rest-client/arc-resizable-mixin": "^1.2.0", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-dropdown": "^1.1.4", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/arc-data-export": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-data-export/-/arc-data-export-3.3.2.tgz", - "integrity": "sha512-JBtE5EJZ3W55uqEsXz1tzMgCzFQjDe6b4W3Qvg5DJgqTBjzKHTDBDACqAnnvGF41vTJlxr2ZZeu+tNCQIdMglA==", - "dev": true, + "@advanced-rest-client/arc-events": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-events/-/arc-events-0.2.13.tgz", + "integrity": "sha512-I5Cx+jYqS4BXoJ1+noWMDbUefTctCqmzZkpfxF0brld8icn/lAeaHV9yu4rizdjx+sc3ps+Co57SmIC9MrTvYw==", "requires": { - "pouchdb": "^7.1.1" + "@advanced-rest-client/arc-types": "^0.2.40" } }, - "@advanced-rest-client/arc-data-import": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-data-import/-/arc-data-import-3.1.1.tgz", - "integrity": "sha512-ARQiiTymVVylMJqtFP6u3aiarOT0IErZjVu6kQvuEik6jgjlBs2GOSR+2dlYhR5mEIzDOME84iy5aC4J9JPQrg==", + "@advanced-rest-client/arc-filesystem": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-filesystem/-/arc-filesystem-0.1.3.tgz", + "integrity": "sha512-yHp+atJNn4oW7Qb/U12xAHsll57eITgIlPecrmB4zvFPn2ILjqcgwrcepsoSqjYZcuZZ3hAureFjwZDF51uGow==", "dev": true, "requires": { - "lit-element": "^2.2.1", - "pouchdb": "^7.1.1" + "@advanced-rest-client/arc-events": "^0.2.13", + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.4.0" } }, - "@advanced-rest-client/arc-definitions": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-definitions/-/arc-definitions-3.1.0.tgz", - "integrity": "sha512-cv8Qqfa/NGcWgnRTiV2O7bclfYp/FnZDn0cKLUkpzQJzZT/bP/aNfd8qZpCwFKpkIFXgKuT0IZXuoQj3F4qTLg==", - "dev": true - }, - "@advanced-rest-client/arc-electron-helpers": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-electron-helpers/-/arc-electron-helpers-1.1.1.tgz", - "integrity": "sha512-VGToC7N0DvpPP9qS7CSsYlFFVKEjWWg9Qc2bMrRfagT3fIBwT26GYwX41jAAASfClfpwp3axfKWKhjLwJ++guw==", + "@advanced-rest-client/arc-fit-mixin": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-fit-mixin/-/arc-fit-mixin-1.2.1.tgz", + "integrity": "sha512-r7QWIOKRRY4+Cn7/cILJKMf63V5nlb/Ej6B58DftLXOMJ5hqKPKdJWuXB+DRHAwAEfF+FhCmY5HfibSmCskj+Q==", "requires": { - "esm": "^3.2.25" + "@open-wc/dedupe-mixin": "^1.3.0" } }, - "@advanced-rest-client/arc-electron-payload-processor": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-electron-payload-processor/-/arc-electron-payload-processor-0.4.0.tgz", - "integrity": "sha512-vORRUrm5lSg3o+gd1ZJtd6N4hekOy6DOlBYrGC8Eek//dL6QZGi9rbxlHRZrtjj5bGQ8ln0may6D/A7LXZYRnA==", + "@advanced-rest-client/arc-headers": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-headers/-/arc-headers-0.1.7.tgz", + "integrity": "sha512-6J/jo9WfTW9piJ+/REvF8b8VJLBfFVdOFCKfucRqqT2EMOdZOa2X/zulRwpBesZPezZ5b6Pik7DscUY4I9ORwg==", "requires": { - "esm": "^3.2.25" + "@advanced-rest-client/arc-definitions": "^3.1.1", + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-types": "^0.2.47", + "@advanced-rest-client/clipboard-copy": "^3.0.1", + "@advanced-rest-client/code-mirror": "^3.1.4", + "@advanced-rest-client/events-target-mixin": "^3.2.3", + "@anypoint-web-components/anypoint-autocomplete": "^0.2.8", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/arc-file-drop-mixin": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-file-drop-mixin/-/arc-file-drop-mixin-3.0.1.tgz", - "integrity": "sha512-Ro0PuRGcMlh9pXAGbJqQswJkoyCosjb1Ag9pmIzH79RnnsonRbn+Wk/RqHFlOyO0WbjNP7JgdUK7clHaKcqYFw==", - "dev": true - }, - "@advanced-rest-client/arc-fit-mixin": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-fit-mixin/-/arc-fit-mixin-1.0.3.tgz", - "integrity": "sha512-2kwxnyZ9nUDRNC+4XVCz6fU+HyOK7X8s9qcGf3oL3/JlLUGyF3JTgQ+NrZBBmkWT/VMdyAZDEKb0SBhDqbD51w==", - "dev": true - }, "@advanced-rest-client/arc-icons": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-icons/-/arc-icons-3.1.0.tgz", - "integrity": "sha512-tM0lxKLcFvalWjIEG7lNbtrOe94SDq7EEgdZi24Oh3DScbX0YgCM7FH1gI51P9mP6iCas4x0cQF6wjmW7lFZ2Q==", - "dev": true, + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-icons/-/arc-icons-3.2.2.tgz", + "integrity": "sha512-4KC2Amg7Bzaty0q0H2QsyZlfx0ceFdyN/WGrj1UXF98RdXtmKX8tBK9PrgHSnuaBWw1l/u/ZmjmXle6uXG6xvA==", "requires": { "@polymer/iron-icon": "^3.0.1", "@polymer/iron-iconset-svg": "^3.0.1", - "lit-element": "^2.2.1", - "lit-html": "^1.1.2" + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/arc-info-messages": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-info-messages/-/arc-info-messages-3.0.0.tgz", - "integrity": "sha512-lSi+hHUs3jX3YSJVuJxGKf4ck/t07KivCxr8bNB7NtYItwpuFunVY/UO/6HWBuiuJLDHij8UBhnvyIM9GZKVjA==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.2", - "@advanced-rest-client/date-time": "^3.0.0", - "@anypoint-web-components/anypoint-button": "^1.0.10", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.2.1" - } - }, - "@advanced-rest-client/arc-license-dialog": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-license-dialog/-/arc-license-dialog-3.0.0.tgz", - "integrity": "sha512-0+nqxqV2IIfBYMcIIMEF/t9RUvAN/c10xdC6T+kOwLt62eky17oj/MJ25zXA4QO9P3JhH2i3bQZIpEUC+IivLw==", - "dev": true, + "@advanced-rest-client/arc-ie": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-ie/-/arc-ie-1.0.3.tgz", + "integrity": "sha512-o23khQAOt6UWh+EcAUBd8+OpRF8qN9AlHFFFeRujVfqzxWWeTxhZDQZi+wKSgPzVyjn9qTB6zaSSxKu92RGqYw==", "requires": { - "@anypoint-web-components/anypoint-button": "^1.0.11", - "@anypoint-web-components/anypoint-dialog": "^0.1.1", - "lit-element": "^2.2.1" + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-models": "^4.2.7", + "@advanced-rest-client/arc-types": "^0.2.45", + "@advanced-rest-client/date-time": "^3.0.2", + "@anypoint-web-components/anypoint-autocomplete": "^0.2.8", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-checkbox": "^1.1.3", + "@anypoint-web-components/anypoint-collapse": "^0.1.0", + "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.20", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-selector": "^1.1.7", + "@api-components/http-method-label": "^3.1.2", + "@polymer/iron-form": "^3.0.1", + "@polymer/paper-toast": "^3.0.1", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0", + "pouchdb": "^7.2.2" } }, "@advanced-rest-client/arc-marked": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-marked/-/arc-marked-1.0.6.tgz", - "integrity": "sha512-ixB0944OQGqN63BpDikx1QI4BODe7xWuQpWaI1KHsf68uxgQ40FqvGviEqXErcCf7qRoAI4nB5NnZXbd6IBagA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-marked/-/arc-marked-1.1.0.tgz", + "integrity": "sha512-MxDtVlOBLz/ovzRrG69+OWMQWDvE6M1/+NxS3FvsAYAxRCtbyJpzqJOvo3BOtX46U9icWgBGWP8Pzx7ixzCFww==", "dev": true, "requires": { - "dompurify": "^2.0.7", - "lit-element": "^2.2.1", - "lit-html": "^1.1.2", + "dompurify": "^2.1.1", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0", "marked": "^0.7.0" } }, "@advanced-rest-client/arc-menu": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-menu/-/arc-menu-3.0.1.tgz", - "integrity": "sha512-vXIq8HVXIMpXQYKzuQz/AYDRZ4N8CNAManBcCs9cNiHspVBnCJpSZuhlVlUpBG8G2qEPzWHK/3x+KU/BLKngUQ==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-file-drop-mixin": "^3.0.1", - "@advanced-rest-client/arc-icons": "^3.0.2", - "@advanced-rest-client/arc-models": "^3.0.1", - "@advanced-rest-client/history-list-mixin": "^3.0.1", - "@advanced-rest-client/projects-list-consumer-mixin": "^3.0.1", - "@advanced-rest-client/requests-list-mixin": "^3.0.1", - "@advanced-rest-client/saved-list-mixin": "^3.0.2", - "@advanced-rest-client/uuid-generator": "^3.0.2", - "@anypoint-web-components/anypoint-button": "^1.0.12", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@anypoint-web-components/anypoint-menu-button": "^0.1.0", - "@anypoint-web-components/anypoint-menu-mixin": "^1.0.2", - "@anypoint-web-components/anypoint-tabs": "^0.1.7", - "@api-components/http-method-label": "^3.0.0", - "@polymer/paper-progress": "^3.0.0", - "lit-element": "^2.2.1" - } - }, - "@advanced-rest-client/arc-messages-service": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-messages-service/-/arc-messages-service-3.0.1.tgz", - "integrity": "sha512-sCxUdN1mHBodNz4Z5BE9M2ZGJg0zAb/iWEEtmM+CEWvQxNLOWQBzn+IAPtsvIN+TlioF8Nqs+b8IrHLx23i+KQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-menu/-/arc-menu-4.0.3.tgz", + "integrity": "sha512-LnhV7F9YmrW/YOvG2dm4Y9SSuako7keJwEte0ktbUJ23Zo7muoXS4HZf62WkkUq8/qJt4mlpnxdeNzZ2/Ju4IQ==", "dev": true, "requires": { - "@polymer/iron-ajax": "^3.0.0", - "lit-element": "^2.2.1" + "@advanced-rest-client/arc-events": "^0.2.10", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-ie": "^1.0.2", + "@advanced-rest-client/arc-models": "^4.2.6", + "@advanced-rest-client/bottom-sheet": "^3.2.2", + "@advanced-rest-client/requests-list": "^0.1.7", + "@advanced-rest-client/uuid-generator": "^3.1.1", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-dialog": "^0.1.6", + "@anypoint-web-components/anypoint-item": "^1.0.7", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-menu-button": "^0.1.4", + "@anypoint-web-components/anypoint-menu-mixin": "^1.1.8", + "@api-components/http-method-label": "^3.1.2", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, "@advanced-rest-client/arc-models": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-models/-/arc-models-3.1.1.tgz", - "integrity": "sha512-r27KsQnw0pioFpmQPE4y/800LrKm/Bbrk429tXP9glAhrsI2PQVex6ZQ2wznL2NwvTXu+G+8CvHVJc/tM0V4iQ==", - "dev": true, + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-models/-/arc-models-4.2.8.tgz", + "integrity": "sha512-xzybGC14UKbxP0WHLOz81VCsuSH4hsqUF92B/yWYliYrNbTNjtNpu+xqeYHelCAA2uWLwgFqYVEmvHqHZput0w==", "requires": { - "@advanced-rest-client/arc-electron-payload-processor": "^0.4.0", + "@advanced-rest-client/arc-electron-payload-processor": "^1.0.1", + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-url": "^0.1.3", "@advanced-rest-client/pouchdb-quick-search": "^2.0.3", - "@advanced-rest-client/uuid-generator": "^3.0.2", - "pouchdb": "^7.2.1" - } - }, - "@advanced-rest-client/arc-onboarding": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-onboarding/-/arc-onboarding-3.0.1.tgz", - "integrity": "sha512-1beQ/4/4aCXB2a3QPAehV+Iul2XS47VbsuOtzgbzav8iVsqwTHzZykpb40tnOn8/ZVE7jo42w8ic9asx2aywWQ==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.0", - "@advanced-rest-client/arc-overlay-mixin": "^1.0.0", - "@advanced-rest-client/arc-resizable-mixin": "^1.0.0", - "@anypoint-web-components/anypoint-button": "^1.0.10", - "@anypoint-web-components/anypoint-radio-button": "^0.1.2", - "@anypoint-web-components/anypoint-selector": "^1.0.2", - "lit-element": "^2.2.1" + "@advanced-rest-client/uuid-generator": "^3.1.1", + "pouchdb": "^7.2.2" } }, "@advanced-rest-client/arc-overlay-mixin": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-overlay-mixin/-/arc-overlay-mixin-1.0.4.tgz", - "integrity": "sha512-BGbD0DIzbwWEbwb+3XbDXAGKUFqW5Gy+m6naSCirIso+j+H85lpcEa5Vv5XouIYVqXXD+z7TiHXy/PInWjO87w==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-fit-mixin": "^1.0.2", - "@advanced-rest-client/arc-resizable-mixin": "^1.0.0" - } - }, - "@advanced-rest-client/arc-request-logic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-request-logic/-/arc-request-logic-3.0.3.tgz", - "integrity": "sha512-1NZMPoUtR6h4CdVf0yiilPGSMbQGaMXXj7ES7M8Sa4OBa2Hbs/IUbySYWdYJ6OJEHY1bQPiQeKVkycKNdfpkog==", - "dev": true, + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-overlay-mixin/-/arc-overlay-mixin-1.1.7.tgz", + "integrity": "sha512-Q3JHK2F0S5lFv3Xrp9DYuswzXC0O421i3PkGELfaznvRnuOD/0r8irlgShWXWltQbl9A79uKG11mnfU37aRXUA==", "requires": { - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@advanced-rest-client/headers-parser-mixin": "^3.0.0", - "@advanced-rest-client/variables-evaluator": "^3.0.0", - "lit-element": "^2.2.1" + "@advanced-rest-client/arc-fit-mixin": "^1.2.1", + "@advanced-rest-client/arc-resizable-mixin": "^1.1.2", + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/arc-request-workspace": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-request-workspace/-/arc-request-workspace-5.0.0.tgz", - "integrity": "sha512-xDzcvVNeZ9QHhi3tf4c/F9gXCLlgjAXWkE2bommMc64OmK/PnAGNLp4EnPVnMA34rcmfGD0RtI8+26jSg7KkeA==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-file-drop-mixin": "^3.0.1", - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/arc-marked": "^1.0.6", - "@advanced-rest-client/arc-resizable-mixin": "^1.0.0", - "@advanced-rest-client/bottom-sheet": "^3.0.0", - "@advanced-rest-client/date-time": "^3.0.0", - "@advanced-rest-client/export-options": "^3.2.0", - "@advanced-rest-client/markdown-styles": "^3.1.2", - "@advanced-rest-client/request-panel": "^5.0.0", - "@advanced-rest-client/saved-request-detail": "^3.0.3", - "@advanced-rest-client/saved-request-editor": "^3.0.3", - "@advanced-rest-client/uuid-generator": "^3.0.0", - "@advanced-rest-client/web-url-input": "^3.0.2", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-input": "^0.2.13", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-tabs": "^0.1.10", - "@polymer/iron-collapse": "^3.0.1", - "@polymer/paper-progress": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.3.1" + "@advanced-rest-client/arc-request-ui": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-request-ui/-/arc-request-ui-0.1.8.tgz", + "integrity": "sha512-jW/6E0Rnt+bQOf6oL+ReZ8Ua+9VaFPOn+r0z6Ad11FGYNPjZfbD6R5AgQIlvEDDP6oUORnbI7TZvpY+sK3nmxQ==", + "dev": true, + "requires": { + "@advanced-rest-client/arc-actions": "^0.1.4", + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-headers": "^0.1.7", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-ie": "^1.0.3", + "@advanced-rest-client/arc-marked": "^1.1.0", + "@advanced-rest-client/arc-models": "^4.2.8", + "@advanced-rest-client/arc-resizable-mixin": "^1.2.0", + "@advanced-rest-client/arc-response": "^0.1.6", + "@advanced-rest-client/arc-types": "^0.2.49", + "@advanced-rest-client/arc-url": "^0.1.3", + "@advanced-rest-client/arc-websocket": "^0.1.1", + "@advanced-rest-client/authorization-method": "^0.2.3", + "@advanced-rest-client/authorization-selector": "^0.2.3", + "@advanced-rest-client/body-editor": "^0.1.13", + "@advanced-rest-client/bottom-sheet": "^3.2.2", + "@advanced-rest-client/client-certificates": "^0.1.1", + "@advanced-rest-client/events-target-mixin": "^3.2.3", + "@advanced-rest-client/http-code-snippets": "^3.2.1", + "@advanced-rest-client/markdown-styles": "^3.1.3", + "@advanced-rest-client/monaco-support": "^1.0.1", + "@advanced-rest-client/requests-list": "^0.1.9", + "@advanced-rest-client/uuid-generator": "^3.1.1", + "@anypoint-web-components/anypoint-button": "^1.2.0", + "@anypoint-web-components/anypoint-checkbox": "^1.1.3", + "@anypoint-web-components/anypoint-chip": "^0.2.1", + "@anypoint-web-components/anypoint-chip-input": "^0.2.4", + "@anypoint-web-components/anypoint-collapse": "^0.1.0", + "@anypoint-web-components/anypoint-dialog": "^0.1.6", + "@anypoint-web-components/anypoint-dropdown": "^1.1.4", + "@anypoint-web-components/anypoint-input": "^0.2.24", + "@anypoint-web-components/anypoint-item": "^1.1.0", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-menu-button": "^0.1.4", + "@anypoint-web-components/anypoint-selector": "^1.1.7", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "@anypoint-web-components/anypoint-tabs": "^0.1.12", + "@api-components/http-method-label": "^3.1.3", + "@github/time-elements": "^3.1.1", + "@polymer/iron-form": "^3.0.1", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0", + "monaco-editor": "^0.21.3" } }, "@advanced-rest-client/arc-resizable-mixin": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-resizable-mixin/-/arc-resizable-mixin-1.0.0.tgz", - "integrity": "sha512-xQFafw0mk/6MHBLQSZ9YLLRJ7jb+wZsmAnAAqdrurjSIAQWxmKajLd7EaLhtup3spKGLGvI3xHk2ahyQ7xxbPQ==", - "dev": true - }, - "@advanced-rest-client/arc-scroll-target-mixin": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-scroll-target-mixin/-/arc-scroll-target-mixin-1.0.2.tgz", - "integrity": "sha512-RoIU/2Mboa04cZMwypPr3Foc0fTkftRyhHXPdXu/F0/rzH2LW+j1LD9vGXz0kUr7HeAoIrR/ApCFNYA+0XTLnA==", - "dev": true - }, - "@advanced-rest-client/arc-scroll-threshold": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-scroll-threshold/-/arc-scroll-threshold-1.0.0.tgz", - "integrity": "sha512-nBf54Ad+WDGl4WgTnhzuPYQ+m2gtDocEBu11PBX8Q32E2TkYdaP0PCac4nOnus2+3J3IPHAL4/em6gyuaftX6w==", - "dev": true, + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-resizable-mixin/-/arc-resizable-mixin-1.2.0.tgz", + "integrity": "sha512-hc8XjY6CfQDANuf0TfsfE6EWJwlXBZTtmv2h4luLZgHz55XPlWO7w2XI/YAZX6xQpcsR3cGv0eDnj9CkOaCcCQ==", "requires": { - "@advanced-rest-client/arc-scroll-target-mixin": "1.0.2", - "lit-element": "^2.0.1" + "@open-wc/dedupe-mixin": "^1.3.0" } }, - "@advanced-rest-client/arc-settings-panel": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-settings-panel/-/arc-settings-panel-4.0.1.tgz", - "integrity": "sha512-JwMzDu67yJ8L6/kO/vPB6HvD6OpfAvzA7vVn/vgIZaT/uRKwuc126f/a0ThANmr6oitQfspGNFRoCK4B6CQj5A==", + "@advanced-rest-client/arc-response": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-response/-/arc-response-0.1.6.tgz", + "integrity": "sha512-3WEbjTySTZElnfq8DnW8ojsht2yqjOHCNpiMv9s/mUvb8thHXyEIryXj/TipOR8rD7CctkwyzsYv4JNt73feLA==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/export-panel": "^3.2.0", + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-headers": "^0.1.5", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-types": "^0.2.43", + "@advanced-rest-client/date-time": "^3.0.2", + "@advanced-rest-client/prism-highlight": "^4.0.2", "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-checkbox": "^1.0.2", - "@anypoint-web-components/anypoint-dialog": "^0.1.1", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", - "@anypoint-web-components/anypoint-input": "^0.2.13", "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@anypoint-web-components/anypoint-switch": "^0.1.3", - "@anypoint-web-components/anypoint-tabs": "^0.1.10", - "lit-element": "^2.3.1" - } - }, - "@advanced-rest-client/auth-dialogs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/auth-dialogs/-/auth-dialogs-3.0.0.tgz", - "integrity": "sha512-zZE6h4ovPnUCO/NnBgYaT+guOpOXh+0+kHs+1LXi1mK3ieO36qWgtOcpnLKhatommT8HoJUJffXot7VYW0jPiw==", - "dev": true, - "requires": { - "@anypoint-web-components/anypoint-button": "^1.0.10", - "@anypoint-web-components/anypoint-dialog": "^0.1.1", - "@anypoint-web-components/anypoint-input": "^0.2.5", - "lit-element": "^2.2.1" + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-menu-button": "^0.1.4", + "@polymer/paper-progress": "^3.0.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0", + "prismjs": "^1.22.0" } }, - "@advanced-rest-client/auth-methods": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/auth-methods/-/auth-methods-5.0.10.tgz", - "integrity": "sha512-FIY3XaoT9s5bmGZhYJLCSBZvlCuabpgMLj4G1GhGhLqtQYvoocFdJLxre9Y3lDMXVANbP6cTwRkAXz8XFUgm4g==", + "@advanced-rest-client/arc-settings": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-settings/-/arc-settings-0.1.2.tgz", + "integrity": "sha512-Gc4pOmDZfD+IEA7WuVrH3wuasSUjDNBdYI5B/tXBAqSlF+GX8V7ouL6fd4c9dPswF9O5sE2pRmXb+TPqGgnm2Q==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.3", - "@advanced-rest-client/arc-marked": "^1.0.6", - "@advanced-rest-client/client-certificates-consumer-mixin": "^1.0.0", - "@advanced-rest-client/clipboard-copy": "^3.0.1", - "@advanced-rest-client/date-time": "^3.0.2", - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@advanced-rest-client/markdown-styles": "^3.1.0", - "@advanced-rest-client/oauth2-scope-selector": "^3.0.3", - "@anypoint-web-components/anypoint-button": "^1.0.11", - "@anypoint-web-components/anypoint-checkbox": "^1.0.1", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.11", - "@anypoint-web-components/anypoint-input": "^0.2.9", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@anypoint-web-components/anypoint-radio-button": "^0.1.3", - "@api-components/amf-helper-mixin": "^4.0.16", - "@api-components/api-form-mixin": "^3.0.3", - "@api-components/api-property-form-item": "^3.0.11", - "@api-components/api-view-model-transformer": "^4.0.1", - "@polymer/iron-form": "^3.0.0", - "@polymer/iron-meta": "^3.0.0", - "@polymer/paper-ripple": "^3.0.0", - "@polymer/paper-spinner": "^3.0.2", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.0.1" + "@advanced-rest-client/arc-events": "^0.2.10", + "@advanced-rest-client/arc-icons": "^3.2.1", + "@advanced-rest-client/arc-types": "^0.2.38", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-checkbox": "^1.1.3", + "@anypoint-web-components/anypoint-dialog": "^0.1.6", + "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.20", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "@anypoint-web-components/anypoint-tabs": "^0.1.12", + "lit-element": "^2.4.0" + } + }, + "@advanced-rest-client/arc-types": { + "version": "0.2.49", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-types/-/arc-types-0.2.49.tgz", + "integrity": "sha512-bAGqtedKqocYXJgkvkSrrBW6acmcGYYZq96oSVY5lWIvAqkXjgqz8ryXuoeoZ/qxBzwYAxAOmjteUkJTqFJshA==" + }, + "@advanced-rest-client/arc-url": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-url/-/arc-url-0.1.3.tgz", + "integrity": "sha512-TiNPDIe45PCfy1pNJY2naga/rfhaW8n/J3+VmizyowldBk68wqcpmETLnNz0GXJcpTImez4jaE74oYzmAUjLHA==", + "requires": { + "@advanced-rest-client/arc-events": "^0.2.6", + "@advanced-rest-client/arc-icons": "^3.1.2", + "@advanced-rest-client/arc-models": "^4.2.6", + "@advanced-rest-client/arc-overlay-mixin": "^1.1.7", + "@advanced-rest-client/arc-resizable-mixin": "^1.2.0", + "@advanced-rest-client/events-target-mixin": "^3.2.3", + "@anypoint-web-components/anypoint-autocomplete": "^0.2.7", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-collapse": "^0.1.0", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "@anypoint-web-components/validatable-mixin": "^1.1.3", + "@polymer/iron-form": "^3.0.1", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/authorization-data-saver": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/authorization-data-saver/-/authorization-data-saver-3.0.0.tgz", - "integrity": "sha512-QOBjypqWeyVBCZKcU4R1cGzZSk6BSLpdErHKsfrDFpo5dDgVdOz0lS9vVtXMnxv6WyqgbP9kpB+JG6kGbkxxdQ==", - "dev": true, - "requires": { - "@advanced-rest-client/auth-dialogs": "^3.0.0", - "@advanced-rest-client/headers-parser-mixin": "^3.0.0", - "lit-element": "^2.2.1" + "@advanced-rest-client/arc-websocket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/arc-websocket/-/arc-websocket-0.1.1.tgz", + "integrity": "sha512-1WXYR8V3BE9zUJaR7c31Ai7jYjPX8KNLlO2Iv49OpATXzNyk8qzQqte8A6VdeePF6zle1ss6gZIskTxe13vLXg==", + "dev": true, + "requires": { + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-ie": "^1.0.2", + "@advanced-rest-client/arc-models": "^4.2.7", + "@advanced-rest-client/arc-resizable-mixin": "^1.2.0", + "@advanced-rest-client/arc-response": "^0.1.5", + "@advanced-rest-client/arc-types": "^0.2.43", + "@advanced-rest-client/body-editor": "^0.1.12", + "@advanced-rest-client/bottom-sheet": "^3.2.2", + "@advanced-rest-client/events-target-mixin": "^3.2.3", + "@advanced-rest-client/monaco-support": "^1.0.1", + "@advanced-rest-client/uuid-generator": "^3.1.1", + "@anypoint-web-components/anypoint-autocomplete": "^0.2.8", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-menu-button": "^0.1.4", + "@anypoint-web-components/anypoint-tabs": "^0.1.12", + "@github/time-elements": "^3.1.1", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0", + "monaco-editor": "^0.21.2" } }, "@advanced-rest-client/authorization-method": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/authorization-method/-/authorization-method-0.1.15.tgz", - "integrity": "sha512-R5RKsqbMQw4fcrV0WP5Dxt8U/0N+IkheJH8ZZyiwNGlvq5fdSiCN/Um3VXC1L6RCW7ymFLjNMBS+FhY1HgZOWA==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/authorization-method/-/authorization-method-0.2.3.tgz", + "integrity": "sha512-97sH3dHVJTcPMY/aFEejdKSP9aJ5hNFoM170xvQ8o9rlX5D0rvSG4hEOWUJ3Dyq5G6iyoQ/FWRWznjCxEOqFzA==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.1.0", + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-types": "^0.2.47", "@advanced-rest-client/clipboard-copy": "^3.0.1", - "@advanced-rest-client/events-target-mixin": "^3.2.0", - "@advanced-rest-client/oauth2-scope-selector": "^3.0.4", + "@advanced-rest-client/events-target-mixin": "^3.2.3", + "@advanced-rest-client/oauth2-scope-selector": "^4.0.0", "@anypoint-web-components/anypoint-button": "^1.1.1", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", - "@anypoint-web-components/anypoint-input": "^0.2.15", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.1.0", - "@anypoint-web-components/anypoint-switch": "^0.1.3", - "@open-wc/dedupe-mixin": "^1.2.17", + "@anypoint-web-components/anypoint-checkbox": "^1.1.3", + "@anypoint-web-components/anypoint-dialog": "^0.1.6", + "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.20", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "@open-wc/dedupe-mixin": "^1.3.0", "@polymer/paper-spinner": "^3.0.2", - "lit-element": "^2.3.1", - "lit-html": "^1.2.1" - } - }, - "@advanced-rest-client/authorization-panel": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/authorization-panel/-/authorization-panel-4.0.3.tgz", - "integrity": "sha512-sNys0WHs662twVRfEYOcjl1usLdCMwNOXfcrdyC/NAQ8Hcs8/F1qRjBc8DxUbHw2vmV8oqnuPXSEEY9KGeWE+g==", - "dev": true, - "requires": { - "@advanced-rest-client/auth-methods": "^5.0.6", - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.12", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@api-components/amf-helper-mixin": "^4.0.17", - "@polymer/iron-meta": "^3.0.0", - "cryptojslib": "^3.1.2", - "jsrsasign": "^8.0.12", - "lit-element": "^2.0.1" + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, "@advanced-rest-client/authorization-selector": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/authorization-selector/-/authorization-selector-0.1.1.tgz", - "integrity": "sha512-OOkblsdL3UIhlYNeRWNoyZZxtpbgfZtaFFeS6ystbCQ6Ux8WyPb3ZuDGhXM+pkzL/cpEX3Yw58h82rG79QKkZg==", - "dev": true, - "requires": { - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@anypoint-web-components/anypoint-selector": "^1.0.2", - "lit-element": "^2.0.1", - "lit-html": "^1.0.0" - } - }, - "@advanced-rest-client/bottom-sheet": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/bottom-sheet/-/bottom-sheet-3.1.0.tgz", - "integrity": "sha512-HZqdlFhVTLy1DLmffrEeIziy3qssU+zqeelR9ZrlL9BCTDPcdwjz5PEtR5AXdTYX+m112qqUtlFQLUo4+0TUVw==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/authorization-selector/-/authorization-selector-0.2.3.tgz", + "integrity": "sha512-FhZKKLV/LcmvhzNcpUpYgrOvD6HgMc1aUSy2hmoy5DY0sRyL2chqHwCu9aJh39vitm8PjHb1P8mWRanmTNVklw==", "dev": true, "requires": { - "@advanced-rest-client/arc-overlay-mixin": "^1.0.1", - "@polymer/iron-a11y-announcer": "^3.0.0", - "lit-element": "^2.0.1" + "@advanced-rest-client/arc-types": "^0.2.47", + "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.20", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-selector": "^1.1.7", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/cc-authorization-method": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/cc-authorization-method/-/cc-authorization-method-0.1.3.tgz", - "integrity": "sha512-LreFc/yaDAvEunIGGAonrRz+07KGZKucKphMj0NvZSU/WjLtGllzUgy0jXdCYoitzsL7jzB5wX+mjOqGQQypZg==", + "@advanced-rest-client/body-editor": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/body-editor/-/body-editor-0.1.13.tgz", + "integrity": "sha512-aGAOmrWKFRzCN08hgmtQcQ1EPT5tCIzWGjy/3/Vcm3Fri+dc38J5JACuDVzvqWuJetzzMMG+klyQ5TpceC0gdA==", "dev": true, "requires": { - "@advanced-rest-client/authorization-method": "^0.1.7", - "@advanced-rest-client/client-certificates-consumer-mixin": "^1.0.2", - "@advanced-rest-client/date-time": "^3.0.2", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-radio-button": "^0.1.4", - "lit-element": "^2.0.1", - "lit-html": "^1.0.0" + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-resizable-mixin": "^1.2.0", + "@advanced-rest-client/code-mirror": "^3.1.4", + "@advanced-rest-client/code-mirror-linter": "^3.0.2", + "@advanced-rest-client/events-target-mixin": "^3.2.3", + "@advanced-rest-client/monaco-support": "^1.0.1", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-dialog": "^0.1.6", + "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.20", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0", + "monaco-editor": "^0.21.3" } }, - "@advanced-rest-client/client-certificates-consumer-mixin": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/client-certificates-consumer-mixin/-/client-certificates-consumer-mixin-1.0.2.tgz", - "integrity": "sha512-Kp08RsejjAqY88N2RFtaU0qsjyZd9fT16sAleLs2HLFT7AycDWnMZdwDyLlVu3j4ru1tnq+G+Cc3aMuo/8j5MQ==", - "dev": true, + "@advanced-rest-client/bottom-sheet": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/bottom-sheet/-/bottom-sheet-3.2.2.tgz", + "integrity": "sha512-PAtCusqCPjZy0SRerYRkrTHi0PsmEDDIZF3nCDzNi/Kentpx9yqdHD0TuBNV3dfc8t9lrcYq4aRnwRrz8na/Dw==", "requires": { - "lit-element": "^2.2.1" + "@advanced-rest-client/arc-overlay-mixin": "^1.1.7", + "@polymer/iron-a11y-announcer": "^3.1.0", + "lit-element": "^2.4.0" } }, - "@advanced-rest-client/client-certificates-panel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/client-certificates-panel/-/client-certificates-panel-1.0.6.tgz", - "integrity": "sha512-BycIdS5j21QJTEYCYuW/uJ6E4f5ZQrw4Oe6FpAJbpVQCs4Z7lxjdyzdEuQvj4OdCwlN8nn4RV8gRZoetnNr/qQ==", + "@advanced-rest-client/client-certificates": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/client-certificates/-/client-certificates-0.1.1.tgz", + "integrity": "sha512-KtQOzrXnb63gujJyasvFsJ38JW4pyoMuaVs0BuzO5WcYkTyXHgwUb6ZrNeQ2QhCcvOZwmplmsuNAn2RFJFkH9Q==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/bottom-sheet": "^3.1.0", - "@advanced-rest-client/client-certificates-consumer-mixin": "^1.0.2", + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-ie": "^1.0.3", + "@advanced-rest-client/arc-models": "^4.2.8", + "@advanced-rest-client/arc-types": "^0.2.49", + "@advanced-rest-client/authorization-method": "^0.2.3", + "@advanced-rest-client/bottom-sheet": "^3.2.2", "@advanced-rest-client/date-time": "^3.0.2", - "@advanced-rest-client/export-options": "^3.2.0", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-dialog": "^0.1.0", - "@anypoint-web-components/anypoint-input": "^0.2.13", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@anypoint-web-components/anypoint-menu-button": "^0.1.0", - "@anypoint-web-components/anypoint-switch": "^0.1.3", - "@polymer/paper-fab": "^3.0.0", - "@polymer/paper-progress": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.2.1", - "lit-html": "^1.1.2" + "@anypoint-web-components/anypoint-button": "^1.2.0", + "@anypoint-web-components/anypoint-dialog": "^0.1.6", + "@anypoint-web-components/anypoint-input": "^0.2.24", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-menu-button": "^0.1.4", + "@anypoint-web-components/anypoint-radio-button": "^0.1.6", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, "@advanced-rest-client/clipboard-copy": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@advanced-rest-client/clipboard-copy/-/clipboard-copy-3.0.1.tgz", - "integrity": "sha512-nuadCt6g/bhhbiUcC64yyPsZIgyWwSJvB6dD2Xpoe1G78FhqYU3bCLPco4iN5voFlo9TgDryxOaagPwcz/AUqA==", - "dev": true + "integrity": "sha512-nuadCt6g/bhhbiUcC64yyPsZIgyWwSJvB6dD2Xpoe1G78FhqYU3bCLPco4iN5voFlo9TgDryxOaagPwcz/AUqA==" }, "@advanced-rest-client/code-mirror": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/code-mirror/-/code-mirror-3.0.3.tgz", - "integrity": "sha512-ahiQXZik987M7mH/pSywS3o6Rciy3dbXuIDV904z5Mm2RbKi9oUQTi/rMwlaJS9x9rNoI7yMl0Bt65Mf7xfH4Q==", - "dev": true, + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/code-mirror/-/code-mirror-3.1.4.tgz", + "integrity": "sha512-GgFx6Go0owxXx5/m+Fw2anT7QSvhaTG7B1uZ3Yi9TKnrGDGW/fYJqkNhbZtjvtza/KxBNh/lfz8MKTpuNTK3lQ==", "requires": { - "@anypoint-web-components/validatable-mixin": "^1.0.2", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/validatable-mixin": "^1.1.3", "@polymer/paper-styles": "^3.0.0", - "codemirror": "^5.49.2", - "lit-element": "^2.2.1" - } - }, - "@advanced-rest-client/code-mirror-hint": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/code-mirror-hint/-/code-mirror-hint-3.0.2.tgz", - "integrity": "sha512-T9uD0NO8IDxFqCVzzDlrGEMCAxtAPOutRZBrxU4MYqYHoNADHcv9C0bPefQqZV63KgApc6LBTWuzT4v1kelWkA==", - "requires": { - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "lit-element": "^2.0.1", - "lit-html": "^1.1.2" + "@types/codemirror": "^0.0.100", + "codemirror": "^5.58.3", + "lit-element": "^2.4.0" } }, "@advanced-rest-client/code-mirror-linter": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/code-mirror-linter/-/code-mirror-linter-3.0.1.tgz", - "integrity": "sha512-dZCfQ5jtFjH9d3QXZ9yDejOfLloopcJYmHGNpvkr9IsYyorLpQ41PRWIaCb2l0Hg+PCaNYElER/G7CYcrNjv1w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/code-mirror-linter/-/code-mirror-linter-3.0.2.tgz", + "integrity": "sha512-jFdQsRztepCvGGRZbKTILeLxJTzycsw5iJ2pf5SmEiQlANOwBqXUp/9KvSkZksck/QnDsZDrJASv1MQ9OnJzhg==", + "dev": true, "requires": { - "codemirror": "^5.52.2", + "codemirror": "^5.58.1", "jsonlint": "^1.6.3", - "lit-element": "^2.3.1" + "lit-element": "^2.4.0" } }, "@advanced-rest-client/content-type-selector": { @@ -560,58 +549,6 @@ "lit-element": "^2.0.1" } }, - "@advanced-rest-client/cookie-details": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/cookie-details/-/cookie-details-3.0.1.tgz", - "integrity": "sha512-yHMvUbB/1KnUnQVwrC+Jw7OKl6WdFUjOTBKI1IRXIurOvFixwZlszO4vbL9wl8jL8oAFoCRS5jHM9kgFPnfPPA==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/arc-resizable-mixin": "^1.0.0", - "@advanced-rest-client/date-time": "^3.0.0", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@polymer/iron-icon": "^3.0.0", - "lit-element": "^2.3.1" - } - }, - "@advanced-rest-client/cookie-editor": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/cookie-editor/-/cookie-editor-3.0.2.tgz", - "integrity": "sha512-e5OtJKYwgOjyMU/PVkNRs1aapb+DqSEu3Wy3vOptETT/lHa1KRLEInsFwU6GJhVM0Gc61YXI3/rg4/5Uv4Moow==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-resizable-mixin": "^1.0.0", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-checkbox": "^1.0.2", - "@anypoint-web-components/anypoint-input": "^0.2.13", - "@polymer/iron-form": "^3.0.0", - "lit-element": "^2.3.1" - } - }, - "@advanced-rest-client/cookie-manager": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/cookie-manager/-/cookie-manager-3.0.3.tgz", - "integrity": "sha512-qW1IFFiARGIFFP7CV7a93DKGh3gFyGSHgRtklP2GYtKWy4lFWCYH6wVpop8UpU/he+BjlAGFgiEs8mVqyeDhaQ==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/bottom-sheet": "^3.1.0", - "@advanced-rest-client/cookie-details": "^3.0.1", - "@advanced-rest-client/cookie-editor": "^3.0.2", - "@advanced-rest-client/cookies-list-items": "^3.0.1", - "@advanced-rest-client/export-options": "^3.2.0", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-dialog": "^0.1.0", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@anypoint-web-components/anypoint-menu-button": "^0.1.0", - "@polymer/paper-fab": "^3.0.0", - "@polymer/paper-progress": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.3.1", - "lit-html": "^1.2.1" - } - }, "@advanced-rest-client/cookie-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@advanced-rest-client/cookie-parser/-/cookie-parser-3.2.0.tgz", @@ -620,203 +557,73 @@ "esm": "^3.2.25" } }, - "@advanced-rest-client/cookies-list-items": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/cookies-list-items/-/cookies-list-items-3.0.1.tgz", - "integrity": "sha512-8+XLLJBlrQpcK9aWHRpUV6f8bWLL/lM63LDPxVlVJH6/Eh+32yaOsoNme+xIoggT8Ixlaf1qdaaNb5Ai78UKhQ==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-input": "^0.2.13", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@anypoint-web-components/anypoint-menu-button": "^0.1.0", - "@anypoint-web-components/anypoint-menu-mixin": "^1.0.2", - "lit-element": "^2.3.1" - } - }, "@advanced-rest-client/date-time": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@advanced-rest-client/date-time/-/date-time-3.0.2.tgz", - "integrity": "sha512-e5hJSVex/EHMo0YWZprOZUQs4KO/Bkt0KAUzjGrOZbpoafuK1Zs1Szu52KtEh7iui9jaTloWqhasrpnkqsgMDQ==", - "dev": true + "integrity": "sha512-e5hJSVex/EHMo0YWZprOZUQs4KO/Bkt0KAUzjGrOZbpoafuK1Zs1Szu52KtEh7iui9jaTloWqhasrpnkqsgMDQ==" }, "@advanced-rest-client/electron-amf-service": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/electron-amf-service/-/electron-amf-service-4.0.0.tgz", - "integrity": "sha512-KztW9YjgGHq20qo9wROHY0v+ni5i40+NjgrjT++h4CLDG/YTS9L/jeKwYFZ2YvC4oNxCklGV0JUeehT1FORbWQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/electron-amf-service/-/electron-amf-service-5.0.0.tgz", + "integrity": "sha512-GMox1cQ3v/K9m+36FzNNaHAl/PLMWbRlxp2rWc9lkCjW7gbwNk0qSwkDM7kvNKzgwbk89zL7PsUWJYS/uT551g==", "requires": { - "amf-client-js": "^4.0.6", + "@advanced-rest-client/arc-events": "^0.2.13", + "amf-client-js": "^4.5.1", "esm": "^3.2.25", - "fs-extra": "^9.0.0", - "tmp": "0.1.0", - "unzipper": "^0.10.10" - } - }, - "@advanced-rest-client/electron-drive": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/electron-drive/-/electron-drive-0.5.0.tgz", - "integrity": "sha512-h9OGD78VRwZr/t3HfzJ5KJh4xy6Cr0OzSrqtksaV6vI85NKbo7Uun5kZ/SNMDqZwQLxVJFXq4tjfSJ5v1T27qw==", - "requires": { - "@advanced-rest-client/electron-oauth2": "^3.0.0", - "esm": "^3.2.25" + "fs-extra": "^9.0.1", + "tmp-promise": "^3.0.2", + "unzipper": "^0.10.11" } }, "@advanced-rest-client/electron-oauth2": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/electron-oauth2/-/electron-oauth2-3.1.0.tgz", - "integrity": "sha512-IBoEgrgiwJDAPJT4KHlieBqDfSwdsbh3WFmpOyy7KuO8jrY4NehmF/TjcR2kSOepOc8yyjF1mmVrFTXgITi3Lw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/electron-oauth2/-/electron-oauth2-5.0.1.tgz", + "integrity": "sha512-feBl6gIY0cKOax+pcsCZvTwD+UGJRFk5ZSjGA5J3WDECJUhmyv/FCx0RljePEwKFtLaH2kmkAOaBKkF6Wbm3hw==", "requires": { - "electron-store": "^5.1.1", + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-types": "^0.2.45", + "electron-store": "^6.0.1", "esm": "^3.2.25", - "fs-extra": "^9.0.0", - "i18n": "^0.10.0" + "fs-extra": "^9.0.1", + "i18n": "^0.13.2" } }, "@advanced-rest-client/electron-request": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/electron-request/-/electron-request-2.4.0.tgz", - "integrity": "sha512-cMGXNJtT9cetW1ELHZkRLXgx4DYsBPVWioNR5GAyZx/qoZFYdJL1Q0Jc4urhw2BPPaEt0ziFH9AFC+hqFQelww==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/electron-request/-/electron-request-3.1.1.tgz", + "integrity": "sha512-xNlNZUbvo0qRhZEFHkKNiM9oGUXp3Kjh1Qbv5CY/Sq+iC0LO1mvp9YY0VwHv7yT/qiyxxwyv3hleE+4zljCFtg==", "requires": { + "@advanced-rest-client/arc-headers": "^0.1.5", + "@advanced-rest-client/arc-types": "^0.2.35", "@advanced-rest-client/cookie-parser": "^3.2.0", - "electron-log": "^4.2.0", + "electron-log": "^4.3.1", "esm": "^3.2.25", "form-data": "^3.0.0" } }, - "@advanced-rest-client/electron-session-state": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/electron-session-state/-/electron-session-state-3.0.0.tgz", - "integrity": "sha512-n8CItCqO/lXpWdbbfhiJErZrPM2gvy34vYlET87rXjH7wZVwn3ZWLPD5Q3t68JHwNm5S8Vycayra3cg0QHMLLQ==", - "requires": { - "@advanced-rest-client/arc-electron-helpers": "^1.1.1", - "@advanced-rest-client/cookie-parser": "^3.1.0", - "esm": "^3.2.25" - } - }, - "@advanced-rest-client/environment-selector": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/environment-selector/-/environment-selector-3.0.2.tgz", - "integrity": "sha512-wWifjHyppkx9sZ94NW9D0yDs5cqEFA0Cq0wkQ3IzDn+87Hu81E57PXSJSODrQiNT4CCHzL9ajVW3G9uptE2+xw==", - "dev": true, - "requires": { - "@advanced-rest-client/variables-consumer-mixin": "^3.0.4", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.11", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "lit-element": "^2.2.1" - } - }, - "@advanced-rest-client/error-message": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/error-message/-/error-message-3.0.1.tgz", - "integrity": "sha512-D2k4kF4QKs8DHhZ+sHdX+RqYifPuiobNayDNQMa3Nv24h54hRyBYHwbAIsk35v998Y0z4wJxg0AJGtciPtcExA==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.0", - "@polymer/iron-icon": "^3.0.0", - "lit-element": "^2.2.1" - } - }, - "@advanced-rest-client/eslint-config": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/eslint-config/-/eslint-config-1.1.5.tgz", - "integrity": "sha512-OMwAJf1Vuo3hRThKEa5Ga/nc4bw8+yfGuX1HLjHqH6JiorSvasuhfjHyKbfYX3LKp7zXCSViEWalVyQ2yMO0QA==", - "dev": true, - "requires": { - "babel-eslint": "^10.1.0", - "eslint": "^6.8.0", - "eslint-config-google": "^0.14.0", - "eslint-config-prettier": "^6.10.0", - "eslint-plugin-html": "^6.0.0", - "eslint-plugin-import": "^2.20.1", - "eslint-plugin-wc": "^1.2.0" - } - }, "@advanced-rest-client/events-target-mixin": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/events-target-mixin/-/events-target-mixin-3.2.0.tgz", - "integrity": "sha512-JX7+LmoXWXHD9jRk1f0vBYZmHSfTHnTKY+86LERsv26zlR6fewnOGmXjqwuHeQOFsZhA+WJXOaGI6zypjYs1aA==", - "dev": true, + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/events-target-mixin/-/events-target-mixin-3.2.3.tgz", + "integrity": "sha512-rXdou8ZqOhtb8BEp5YFJXi1i3xugIuH3k154mdcuObkd5LR/HEHdACKKaYyGe7ATmaBy5mzvr7l4WZFpiTigNg==", "requires": { - "@open-wc/dedupe-mixin": "^1.2.17" + "@open-wc/dedupe-mixin": "^1.2.18" } }, "@advanced-rest-client/exchange-search-panel": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/exchange-search-panel/-/exchange-search-panel-3.0.3.tgz", - "integrity": "sha512-nKvJyEa7uc/rJBDRhCRp9GiVZtbZbyv23ubQUOcow5+jfhyw3HeuYDMMWvefJQZ5v0v/YadeX2QGMXF6Fh8BwA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/exchange-search-panel/-/exchange-search-panel-4.0.0.tgz", + "integrity": "sha512-Xies+5IvTgEmvdLyIoVYD8veLgRWSeSgjF2TF6VkcyYSAAIoFEDjszojsK1Mixp8MjMJqE1UXr72QwJJK9wyew==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.0", - "@advanced-rest-client/star-rating": "^1.0.0", - "@anypoint-web-components/anypoint-button": "^1.0.10", - "@anypoint-web-components/anypoint-input": "^0.2.5", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-signin": "^4.0.2", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/star-rating": "^1.3.0", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-signin": "^5.0.0", "@polymer/iron-ajax": "^3.0.0", - "@polymer/iron-media-query": "^3.0.1", - "@polymer/paper-progress": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.2.1", - "lit-html": "^1.1.2" - } - }, - "@advanced-rest-client/export-options": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/export-options/-/export-options-3.2.0.tgz", - "integrity": "sha512-DZst0HZk6ec5WI7uyv0k6O+H4RVEWWxJxFPdt3HJ2wduuk3bapy12OsAlaCfN0bi2USIUAYdRx0u24xW+8H31g==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.2", - "@anypoint-web-components/anypoint-button": "^1.0.11", - "@anypoint-web-components/anypoint-checkbox": "^1.0.1", - "@anypoint-web-components/anypoint-chip-input": "^0.2.0", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.12", - "@anypoint-web-components/anypoint-input": "^0.2.6", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@polymer/iron-form": "^3.0.0", - "lit-element": "^2.2.1" - } - }, - "@advanced-rest-client/export-panel": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/export-panel/-/export-panel-3.2.0.tgz", - "integrity": "sha512-RCP+IopFVvDRW0AOUMHsxFHi61I//4vYazJMJ92LCRAGfZZ4Ekt+qBVEj0rQ2WrFW/p0jt25oHozFc1m+703Bg==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.2", - "@anypoint-web-components/anypoint-button": "^1.0.12", - "@anypoint-web-components/anypoint-checkbox": "^1.0.1", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.12", - "@anypoint-web-components/anypoint-input": "^0.2.6", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@polymer/iron-form": "^3.0.0", - "@polymer/paper-spinner": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.0.1" - } - }, - "@advanced-rest-client/file-drop": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/file-drop/-/file-drop-3.1.0.tgz", - "integrity": "sha512-RS6XJeb9xcGYCRGcjYTV+o71HK/lTxwO1hODhoj0ZMyjvCfn65cJuBO81aMqdehV1cDeNP4y6wwCdy5gIvjFAw==", - "dev": true, - "requires": { - "@anypoint-web-components/anypoint-button": "^1.0.11", - "lit-element": "^2.2.1" - } - }, - "@advanced-rest-client/file-reader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/file-reader/-/file-reader-3.0.1.tgz", - "integrity": "sha512-8lDo0OnRyFkM4VOQXir7Y+ymEU+Djxc4lFgcXE8C5YqMqHnVEtDa4noUu/4T8bG9PluTTDaunQiHKEqHx7mw/Q==", - "dev": true, - "requires": { - "lit-element": "^2.3.1" + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, "@advanced-rest-client/files-payload-editor": { @@ -852,34 +659,17 @@ } }, "@advanced-rest-client/google-drive-browser": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/google-drive-browser/-/google-drive-browser-3.1.0.tgz", - "integrity": "sha512-KHsccr03AZ7gtYan/MAZCHAQU78FGkpzc2zXRw4VHWKoqfJXIMlttZj0t/pJc00SAfH0BXu7RpsaMVhCiNSnUw==", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/google-drive-browser/-/google-drive-browser-4.0.0.tgz", + "integrity": "sha512-F5BrR9Zp+bFcM/9f7w3QCEJ+Dm1rSlepxw5Xtc/ONJb65ymA0AAIxl+LditUX16/Klk8sUr9lMkG/yyaNyj+nQ==", "requires": { - "@advanced-rest-client/arc-icons": "^3.0.2", - "@advanced-rest-client/arc-scroll-threshold": "^1.0.0", + "@advanced-rest-client/arc-icons": "^3.2.2", "@advanced-rest-client/date-time": "^3.0.2", - "@advanced-rest-client/error-message": "^3.0.1", - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@anypoint-web-components/anypoint-button": "^1.0.11", - "@anypoint-web-components/anypoint-input": "^0.2.5", - "@anypoint-web-components/anypoint-item": "^1.0.3", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@polymer/iron-ajax": "^3.0.0", - "@polymer/paper-progress": "^3.0.0", - "@polymer/paper-spinner": "^3.0.0", - "lit-element": "^2.2.1" - } - }, - "@advanced-rest-client/headers-list-view": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/headers-list-view/-/headers-list-view-3.0.3.tgz", - "integrity": "sha512-PqDjw/W0OvdBqwkZcllUVsNN65Rh3RX8lr2NWxOJbGynRwo0lta6fiAG+Pr52w9USjDN1MlYPfW690EAMUM7kw==", - "dev": true, - "requires": { - "@advanced-rest-client/headers-parser-mixin": "^3.0.0", - "lit-element": "^2.2.1" + "@advanced-rest-client/events-target-mixin": "^3.2.3", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, "@advanced-rest-client/headers-parser-mixin": { @@ -891,83 +681,41 @@ "@open-wc/dedupe-mixin": "^1.2.17" } }, - "@advanced-rest-client/history-list-mixin": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/history-list-mixin/-/history-list-mixin-3.0.2.tgz", - "integrity": "sha512-A662VGpwefgLBz1JncTO1eYwr28yj8vpXq9rqrMjqqbQojvkf6iOJUE1NZJFcAxXBxx3k7QiGizT85/8epg/Jw==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-models": "^3.1.1", - "lit-html": "^1.2.1" - } - }, - "@advanced-rest-client/history-panel": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/history-panel/-/history-panel-3.0.4.tgz", - "integrity": "sha512-7AgkvG+8JGryMIhGS0EoZf26cTea9iSnWhxCinvVIkaAzMjr8eCT34j57MR0CebkcAcCXafJQMzCz6wPR+Bn0w==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.2", - "@advanced-rest-client/bottom-sheet": "^3.1.0", - "@advanced-rest-client/export-options": "^3.2.0", - "@advanced-rest-client/history-list-mixin": "^3.0.0", - "@advanced-rest-client/requests-list-mixin": "^3.0.1", - "@advanced-rest-client/saved-request-detail": "^3.0.3", - "@advanced-rest-client/saved-request-editor": "^3.0.3", - "@anypoint-web-components/anypoint-button": "^1.0.11", - "@anypoint-web-components/anypoint-checkbox": "^1.0.1", - "@anypoint-web-components/anypoint-dialog": "^0.1.1", - "@anypoint-web-components/anypoint-input": "^0.2.6", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@anypoint-web-components/anypoint-menu-button": "^0.1.0", - "@anypoint-web-components/anypoint-menu-mixin": "^1.0.2", - "@api-components/http-method-label": "^3.0.1", - "@polymer/iron-icon": "^3.0.0", - "@polymer/paper-fab": "^3.0.0", - "@polymer/paper-progress": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.2.1", - "lit-html": "^1.1.2" - } - }, "@advanced-rest-client/host-rules-editor": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/host-rules-editor/-/host-rules-editor-3.0.1.tgz", - "integrity": "sha512-HGpdDUz79k3wxBapKIl/gLpNXW50Y0Z/osN4BJoWKTmyKYcr7EDutqZMG8kMyRB1PaG5uMG739XVqE2miIFoVw==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.2", - "@advanced-rest-client/bottom-sheet": "^3.1.0", - "@advanced-rest-client/export-options": "^3.2.0", - "@advanced-rest-client/uuid-generator": "^3.0.0", - "@anypoint-web-components/anypoint-button": "^1.0.11", - "@anypoint-web-components/anypoint-checkbox": "^1.0.1", - "@anypoint-web-components/anypoint-dialog": "^0.1.0", - "@anypoint-web-components/anypoint-input": "^0.2.6", - "@anypoint-web-components/anypoint-item": "^1.0.3", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@anypoint-web-components/anypoint-menu-button": "^0.1.0", - "@polymer/iron-collapse": "^3.0.0", - "@polymer/paper-fab": "^3.0.0", - "@polymer/paper-progress": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "@polymer/polymer": "^3.2.0", - "lit-element": "^2.2.1", - "lit-html": "^1.1.2" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/host-rules-editor/-/host-rules-editor-4.0.0.tgz", + "integrity": "sha512-cGoyplck3pvW0OAKdV7BE0kYo8AtJ2RZpwhw5zmKFL6/Ij/yaqiyJEtfTS5GPFAfcQtryC4I8/23SYaET9yFrg==", + "requires": { + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-ie": "^1.0.2", + "@advanced-rest-client/arc-models": "^4.2.7", + "@advanced-rest-client/arc-types": "^0.2.44", + "@advanced-rest-client/bottom-sheet": "^3.2.2", + "@advanced-rest-client/uuid-generator": "^3.1.1", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-collapse": "^0.1.0", + "@anypoint-web-components/anypoint-dialog": "^0.1.6", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/anypoint-menu-button": "^0.1.4", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, "@advanced-rest-client/http-code-snippets": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/http-code-snippets/-/http-code-snippets-3.1.2.tgz", - "integrity": "sha512-pT8ftoBLkPrQKMF32wL6fQ386pcAjRpw48CgxuMAA/zzxMgdCG45ovNA4fGvq4va8LPu2OQJKfX17sPkvW8esA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/http-code-snippets/-/http-code-snippets-3.2.1.tgz", + "integrity": "sha512-3DC3IcY5A0CxZ+yLuwNkJSbdf0i5odMBjJ7R1HL5vX3Uny5RVKtzXmYN8lJMRIGjjbbkHHCJqSbB8HXjOcGceg==", "dev": true, "requires": { - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-tabs": "^0.1.10", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-tabs": "^0.1.12", "@polymer/prism-element": "^3.0.0", - "lit-element": "^2.2.1", - "prismjs": "^1.19.0" + "lit-element": "^2.4.0", + "prismjs": "^1.23.0" } }, "@advanced-rest-client/http-method-selector": { @@ -988,62 +736,37 @@ "lit-html": "^1.1.2" } }, - "@advanced-rest-client/import-panel": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/import-panel/-/import-panel-3.0.1.tgz", - "integrity": "sha512-qyT9dVGi90VjXnsJK1wvSlT0TMHjd19RWJoARWG1uwHvf2m1ByK1HwTYgzpKD3Ae9htVVsBv6R717sETpeLaRw==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/date-time": "^3.0.0", - "@advanced-rest-client/file-reader": "^3.0.0", - "@advanced-rest-client/google-drive-browser": "^3.1.0", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-checkbox": "^1.0.2", - "@anypoint-web-components/anypoint-input": "^0.2.13", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-selector": "^1.0.2", - "@api-components/http-method-label": "^3.0.2", - "@polymer/iron-collapse": "^3.0.0", - "@polymer/paper-spinner": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "@polymer/polymer": "^3.3.1", - "lit-element": "^2.2.1" - } - }, "@advanced-rest-client/json-table": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/json-table/-/json-table-3.1.5.tgz", - "integrity": "sha512-KS2B4ncAYfQZOgwzikx8nZdhY8t4b2otM8ZJR41gzbuVXMTQLx7SPdlA52o5cJJUgcw4XzTl4lMPUvr9V2fZIA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/json-table/-/json-table-3.2.0.tgz", + "integrity": "sha512-RCMhLzlRgIk2gK57LzJPHi9Czgr2jLj++eDStwpTUvETdwdLIt1ijDzfeHIMTGeNQAG1C2IZTytIV1L1npRsKg==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.4", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "lit-element": "^2.2.1" + "@advanced-rest-client/arc-icons": "^3.1.0", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.16", + "@anypoint-web-components/anypoint-item": "^1.0.7", + "@anypoint-web-components/anypoint-listbox": "^1.1.4", + "@open-wc/dedupe-mixin": "^1.2.17", + "lit-element": "^2.3.1" } }, - "@advanced-rest-client/json-viewer": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/json-viewer/-/json-viewer-3.1.4.tgz", - "integrity": "sha512-DawyuGmKV4iupvF2Ed7/jBlypablncBRw3ZyR3Cone+2ELjkO/KpHho2EbgGWJ2id6/JzxCoq/A5oYDp4JZITQ==", + "@advanced-rest-client/markdown-styles": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/markdown-styles/-/markdown-styles-3.1.3.tgz", + "integrity": "sha512-Vru2fA8P1SEtqEEw8HJ2B6bqFZIZhgHB1em93N5EkJlFWU6J97Zt5njoz3iWVbqdZyLerRFbR2t436SzbV4gfg==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.4", - "@polymer/iron-collapse": "^3.0.0", - "@polymer/paper-spinner": "^3.0.2", - "lit-element": "^2.2.1" + "lit-element": "^2.4.0" } }, - "@advanced-rest-client/markdown-styles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/markdown-styles/-/markdown-styles-3.1.2.tgz", - "integrity": "sha512-TFYF8d8vGXX0b9yVMB3nXhLLDVp1vU/jojJ7ca+pSrVRcna6RTyyG5fEKUGpnLs2H+ZqsJ7UaBy7LXqnes9Vqg==", + "@advanced-rest-client/monaco-support": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/monaco-support/-/monaco-support-1.0.1.tgz", + "integrity": "sha512-Vdv12H2acYT0dD2jn0YpBYnv53+/ZhvzExRsWbRWkqlSTWPEqTQCwruqE5UET2BjnFeaPTMQ5jjOZQpOEZSRtg==", "dev": true, "requires": { - "lit-element": "^2.3.1" + "lit-element": "^2.4.0" } }, "@advanced-rest-client/multipart-payload-editor": { @@ -1082,33 +805,34 @@ } }, "@advanced-rest-client/oauth-authorization": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/oauth-authorization/-/oauth-authorization-4.0.3.tgz", - "integrity": "sha512-jiTwRy29+d8WocKwGzvWoKb4qSuK/pJX7uLxxGOjxbWuFCEi+JdD8H344xs3XlyLdm3auq6DBnSYhwut+9medA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/oauth-authorization/-/oauth-authorization-5.0.4.tgz", + "integrity": "sha512-1hdT7hEz/QRx6499dYiPSYnKdYD+C0NLIBtvRN+qYSoqFK3dlxhKcvVVdmMVCgXB1mwbJYeQR2zPJ4V946xoMw==", "dev": true, "requires": { - "@advanced-rest-client/events-target-mixin": "^3.2.0", + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-types": "^0.2.47", + "@advanced-rest-client/events-target-mixin": "^3.2.3", "@advanced-rest-client/headers-parser-mixin": "^3.2.0", "@polymer/iron-meta": "^3.0.0", - "lit-element": "^2.3.1" + "lit-element": "^2.4.0" } }, "@advanced-rest-client/oauth2-scope-selector": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/oauth2-scope-selector/-/oauth2-scope-selector-3.0.4.tgz", - "integrity": "sha512-E7+HmVx6jkwjnS+GfiNI/G6FAID0T4tSFtQLhd9RLKElKAMJv5ijHERdZS1DAILBDrHYOOuTaLg9z991SF3LoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/oauth2-scope-selector/-/oauth2-scope-selector-4.0.0.tgz", + "integrity": "sha512-PbK3pTD9Dr57rDAlaOoN1JSuoljsFQsI+vm0nUt48wTXtFNx3EV/26JdeZ1QfTvKWGPFDlOsEut8oMSaokIPHw==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.2", - "@anypoint-web-components/anypoint-autocomplete": "^0.1.3", - "@anypoint-web-components/anypoint-button": "^1.0.11", - "@anypoint-web-components/anypoint-control-mixins": "^1.0.2", - "@anypoint-web-components/anypoint-input": "^0.2.5", - "@anypoint-web-components/validatable-mixin": "^1.0.2", - "@polymer/iron-icon": "^3.0.1", + "@advanced-rest-client/arc-icons": "^3.1.2", + "@anypoint-web-components/anypoint-autocomplete": "^0.2.7", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-control-mixins": "^1.1.3", + "@anypoint-web-components/anypoint-input": "^0.2.22", + "@anypoint-web-components/validatable-mixin": "^1.1.3", "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.0.1", - "lit-html": "^1.1.2" + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, "@advanced-rest-client/payload-parser-mixin": { @@ -1124,7 +848,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@advanced-rest-client/pouchdb-mapreduce-no-ddocs/-/pouchdb-mapreduce-no-ddocs-3.0.3.tgz", "integrity": "sha512-5gqGWnlLQxLJov/6WE7iuz/LOE0xZJcRI7o2lnxBVore3sj+F3R4OjRjiL8wiZvykEMSdX7Qy+BhFMUrKMvWSw==", - "dev": true, "requires": { "inherits": "2.0.1", "pouchdb-binary-utils": "6.4.3", @@ -1141,14 +864,12 @@ "inherits": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" }, "pouchdb-promise": { "version": "6.4.3", "resolved": "https://registry.npmjs.org/pouchdb-promise/-/pouchdb-promise-6.4.3.tgz", "integrity": "sha512-ruJaSFXwzsxRHQfwNHjQfsj58LBOY1RzGzde4PM5CWINZwFjCQAhZwfMrch2o/0oZT6d+Xtt0HTWhq35p3b0qw==", - "dev": true, "requires": { "lie": "3.1.1" } @@ -1156,8 +877,7 @@ "spark-md5": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-2.0.2.tgz", - "integrity": "sha1-N7djhHdjrn56zvLKUjPQHmSaeLc=", - "dev": true + "integrity": "sha1-N7djhHdjrn56zvLKUjPQHmSaeLc=" } } }, @@ -1165,7 +885,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/@advanced-rest-client/pouchdb-quick-search/-/pouchdb-quick-search-2.0.3.tgz", "integrity": "sha512-nOJo7AT037UTPQY5CFiVqk4NucwjNiPGWyF/QU8dXPqyK2ZgxjiN/wyRzcpLvIYj6MO2JepQFdfW8nx35cJxXw==", - "dev": true, "requires": { "@advanced-rest-client/pouchdb-mapreduce-no-ddocs": "^3.0.0", "json-stable-stringify": "^1.0.1", @@ -1186,47 +905,6 @@ "prismjs": "^1.11.0" } }, - "@advanced-rest-client/project-details": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/project-details/-/project-details-3.0.1.tgz", - "integrity": "sha512-goeFxC7ageKPfy93SfolzyY7jSRV6aJuIDDiieDcaz5pcMvxgG/Qyawx8frmDxUaKXhn+UBwYzZAYfExvrBBZw==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.2", - "@advanced-rest-client/arc-marked": "^1.0.4", - "@advanced-rest-client/arc-models": "^3.0.0", - "@advanced-rest-client/bottom-sheet": "^3.0.0", - "@advanced-rest-client/export-options": "^3.2.0", - "@advanced-rest-client/markdown-styles": "^3.1.0", - "@advanced-rest-client/requests-list-mixin": "^3.0.1", - "@advanced-rest-client/saved-request-detail": "^3.0.3", - "@advanced-rest-client/saved-request-editor": "^3.0.3", - "@advanced-rest-client/uuid-generator": "^3.0.0", - "@anypoint-web-components/anypoint-button": "^1.0.10", - "@anypoint-web-components/anypoint-checkbox": "^1.0.1", - "@anypoint-web-components/anypoint-dialog": "^0.1.1", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.12", - "@anypoint-web-components/anypoint-input": "^0.2.6", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@anypoint-web-components/anypoint-menu-button": "^0.1.0", - "@anypoint-web-components/anypoint-menu-mixin": "^1.0.2", - "@api-components/http-method-label": "^3.0.1", - "@polymer/paper-fab": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.2.1", - "lit-html": "^1.1.2" - } - }, - "@advanced-rest-client/projects-list-consumer-mixin": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/projects-list-consumer-mixin/-/projects-list-consumer-mixin-3.0.1.tgz", - "integrity": "sha512-SPAXzP+2dT7uMIXPF8O6YxA14OpG14u1IW81npkhrYJyS6JRmKBtK/YUhHq1Fg/UXO3jRuNS456Fyaocb7ixXA==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-models": "^3.0.0-preview.7" - } - }, "@advanced-rest-client/raw-payload-editor": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/@advanced-rest-client/raw-payload-editor/-/raw-payload-editor-3.0.6.tgz", @@ -1243,2297 +921,3133 @@ "lit-element": "^2.2.1" } }, - "@advanced-rest-client/request-actions-panel": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/request-actions-panel/-/request-actions-panel-3.0.5.tgz", - "integrity": "sha512-iO75P0NoPNW/F3TLEb7zRwi+1tC14V1j+YqBzzVC3DlC+DDVygAg5uyz6H+jyeQgNJqR/79ejpYqi5dVLEMdYQ==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.4", - "@advanced-rest-client/variables-consumer-mixin": "^3.0.5", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-combobox": "^0.1.2", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", - "@anypoint-web-components/anypoint-input": "^0.2.12", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@anypoint-web-components/anypoint-switch": "^0.1.3", - "@polymer/iron-collapse": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.2.1" + "@advanced-rest-client/request-engine": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/request-engine/-/request-engine-0.1.10.tgz", + "integrity": "sha512-TJrTKXwYn1iFbVdDQeQnG/EaeF1ll5uwkOmq8ivz72dcsWOk/F5vri/rDHYiJbZWhEmDqYCpu2vu6NVBwrSX7Q==", + "dev": true, + "requires": { + "@advanced-rest-client/arc-actions": "^0.1.4", + "@advanced-rest-client/arc-cookies": "^0.1.0", + "@advanced-rest-client/arc-environment": "^0.1.2", + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-headers": "^0.1.5", + "@advanced-rest-client/arc-models": "^4.2.7", + "@advanced-rest-client/arc-types": "^0.2.44", + "@advanced-rest-client/authorization-method": "^0.2.2" + } + }, + "@advanced-rest-client/requests-list": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/requests-list/-/requests-list-0.1.9.tgz", + "integrity": "sha512-xzXnf1H1zGxbGh4UXZA/HiYW6Uy1Ignwta/xlnEk8e6s4G7vBuXv/fqBhuGI2rG1frU2qUE4PLdB0oz39ZPoNQ==", + "dev": true, + "requires": { + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-filesystem": "^0.1.3", + "@advanced-rest-client/arc-icons": "^3.1.2", + "@advanced-rest-client/arc-ie": "^1.0.3", + "@advanced-rest-client/arc-models": "^4.2.7", + "@advanced-rest-client/arc-types": "^0.2.45", + "@advanced-rest-client/bottom-sheet": "^3.2.1", + "@anypoint-web-components/anypoint-autocomplete": "^0.2.8", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-chip-input": "^0.2.4", + "@anypoint-web-components/anypoint-collapse": "^0.1.0", + "@anypoint-web-components/anypoint-input": "^0.2.21", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-selector": "^1.1.5", + "@api-components/http-method-label": "^3.1.3", + "@github/time-elements": "^3.1.1", + "@material/mwc-snackbar": "^0.20.0", + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/request-editor": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/request-editor/-/request-editor-5.0.0.tgz", - "integrity": "sha512-ZCUVGMVLjQVoZDrIJM/zXKpmdRsLSGt+6+iMDAbDa1pBkM9E+zvATmyA+gHeI2v15re91mXbiNOO7busCpVoVQ==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/authorization-method": "^0.1.7", - "@advanced-rest-client/authorization-selector": "^0.1.1", - "@advanced-rest-client/cc-authorization-method": "^0.1.3", - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@advanced-rest-client/http-code-snippets": "^3.1.2", - "@advanced-rest-client/http-method-selector": "^3.0.5", - "@advanced-rest-client/request-actions-panel": "^3.0.5", - "@advanced-rest-client/url-input-editor": "^3.1.0", - "@advanced-rest-client/uuid-generator": "^3.0.0", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-dialog": "^0.1.1", - "@anypoint-web-components/anypoint-input": "^0.2.13", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@anypoint-web-components/anypoint-menu-button": "^0.1.0", - "@anypoint-web-components/anypoint-switch": "^0.1.2", - "@anypoint-web-components/anypoint-tabs": "^0.1.10", - "@api-components/api-body-editor": "^4.0.2", - "@api-components/api-headers-editor": "^4.0.2", - "@polymer/iron-collapse": "^3.0.0", - "lit-element": "^2.2.1", - "lit-html": "^1.1.2" - } + "@advanced-rest-client/star-rating": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/star-rating/-/star-rating-1.3.0.tgz", + "integrity": "sha512-55Rf3QudgiKtBGzF/D098szZ8anSF11WEMBAU6hXA3o7x5Z7A1vtT8VkNPUW36H5Q8PGZ8CiVCDFUg5h2dYbTw==", + "dev": true }, - "@advanced-rest-client/request-hooks-logic": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/request-hooks-logic/-/request-hooks-logic-3.0.0.tgz", - "integrity": "sha512-KAlKGmyIW2Ewqd1U9PWKgBcUMTwPsnxzEnikCaXRyODKi9SiMqd5puh6NCDCEKcSpGyXPchvRM9ZLyTThByBYg==", - "dev": true, - "requires": { - "@advanced-rest-client/headers-parser-mixin": "^3.0.0", - "@advanced-rest-client/variables-evaluator": "^3.0.0", - "lit-element": "^2.2.1" - } + "@advanced-rest-client/uuid-generator": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@advanced-rest-client/uuid-generator/-/uuid-generator-3.1.1.tgz", + "integrity": "sha512-FGC/8jodMca8j4qlSxn4+D+5PrrJfUzYkCxkfjNp9uSzMEuuSiBONIwKVKoCSu6HehBHvLpuGdmIh4KLE6RMJg==" }, - "@advanced-rest-client/request-panel": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/request-panel/-/request-panel-5.0.0.tgz", - "integrity": "sha512-UyFJZAeA9IkqNbZK+fd6/K9Wa3Uuigwx+qkt/VA6ARApRBbVf/eulm0IafOmyhrTAqXr8gyRY+NpdckmJ4acuA==", - "dev": true, + "@anypoint-web-components/anypoint-autocomplete": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-autocomplete/-/anypoint-autocomplete-0.2.8.tgz", + "integrity": "sha512-VprriG126tHjkzfopJ/fWykGa5VW1n/bawqnkv46IFZj2+yVDEj+0U/7wQMlKzvkKopj7rVQYlD9rn7lbNc1PQ==", "requires": { - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@advanced-rest-client/request-editor": "^5.0.0", - "@advanced-rest-client/response-view": "^3.0.4", + "@anypoint-web-components/anypoint-dropdown": "^1.1.4", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", "@polymer/paper-progress": "^3.0.0", - "lit-element": "^2.3.1" + "@polymer/paper-ripple": "^3.0.2", + "lit-element": "^2.4.0" } }, - "@advanced-rest-client/request-timings": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/request-timings/-/request-timings-3.0.2.tgz", - "integrity": "sha512-urTf0ZV1ZoMJeddDVz00+5EVL0nJq1i8vrX8UMlT2w8AsKh+i8kn1cSjOCNuVPaFQ7ZWu4inHHYxxXlIaNlx8w==", - "dev": true, + "@anypoint-web-components/anypoint-button": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-button/-/anypoint-button-1.2.0.tgz", + "integrity": "sha512-z3og4oxSlwo37ISbg4S32/NeOqtJcsEfAk4CQ1c4tJM/TsI+lTFLZHwNELeunRg8yoGGnjhrnrxTbin+YKfYBQ==", "requires": { - "@advanced-rest-client/date-time": "^3.0.2", - "@polymer/paper-progress": "^3.0.0", - "lit-element": "^2.0.1" + "@anypoint-web-components/anypoint-control-mixins": "^1.1.3", + "@polymer/paper-ripple": "^3.0.2", + "lit-element": "^2.4.0" } }, - "@advanced-rest-client/requests-list-mixin": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/requests-list-mixin/-/requests-list-mixin-3.0.1.tgz", - "integrity": "sha512-0eiBkGiegIyWxcsngNkBVtmnbGZhCxygaiMJ+1RfeVBW5EkhcDZbHYUEAuWbHN4PcU5IL0vOQ8mJA8+iP9Hf2A==", - "dev": true, + "@anypoint-web-components/anypoint-checkbox": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-checkbox/-/anypoint-checkbox-1.1.3.tgz", + "integrity": "sha512-z/yfnAMyXb/dyKIvE6Dm/5UJ6U1dm+nJ+p2Ss9Vx6awAtpcHfsjZd1mAwsdeiTzgN8qgFlhdCxMkNBctQmbmxA==", "requires": { - "@advanced-rest-client/arc-models": "^3.0.0-preview.7", - "lit-element": "^2.2.1" + "@anypoint-web-components/anypoint-control-mixins": "^1.1.3", + "@anypoint-web-components/anypoint-form-mixins": "^1.2.2", + "lit-element": "^2.4.0" } }, - "@advanced-rest-client/response-body-view": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/response-body-view/-/response-body-view-3.0.8.tgz", - "integrity": "sha512-KeneMUj69Zd0WnTS7W9LAzWflVfrBuZGZRM4iktDtRtvWHuJVLPrLkCBHngisSj2tg3hXLxAKU2VqO6wl8DsOA==", + "@anypoint-web-components/anypoint-chip": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-chip/-/anypoint-chip-0.2.1.tgz", + "integrity": "sha512-HpKNdHafP2srHn/CLz4ttwZr1R3gS3nJiHlutOKJXeM2P7dEzw1NjIfWneIXpi08wBlBKOO/Uokp5GAQOnD5+A==", "dev": true, "requires": { - "@advanced-rest-client/clipboard-copy": "^3.0.1", - "@advanced-rest-client/json-table": "^3.1.3", - "@advanced-rest-client/json-viewer": "^3.1.3", - "@advanced-rest-client/response-highlighter": "^3.0.1", - "@advanced-rest-client/response-raw-viewer": "^3.0.1", - "@anypoint-web-components/anypoint-button": "^1.0.11", - "lit-element": "^2.0.1", - "lit-html": "^1.1.2" + "@advanced-rest-client/arc-icons": "^3.1.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/response-error-view": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/response-error-view/-/response-error-view-3.0.4.tgz", - "integrity": "sha512-q4m1KPW+N2imxzSH5OTDeOJklernx/C33NyGzVr3iIzreV2zXIoI2o82Rq3mIIzgUXu1i/eDl3PBsL4jtgKjlw==", + "@anypoint-web-components/anypoint-chip-input": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-chip-input/-/anypoint-chip-input-0.2.4.tgz", + "integrity": "sha512-+5N63zq4ebP2l+usyN29CRqIlvOTf4uOtKLnl7ZJfnlzL1TolYU94HBmQ29lyPTzoCx8gpvBjDLKEN2m47yHsw==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.4", - "@anypoint-web-components/anypoint-button": "^1.0.12", - "@polymer/iron-icon": "^3.0.0", - "lit-element": "^2.0.1" + "@anypoint-web-components/anypoint-autocomplete": "^0.2.6", + "@anypoint-web-components/anypoint-chip": "^0.2.1", + "@anypoint-web-components/anypoint-input": "^0.2.21", + "lit-element": "^2.4.0" } }, - "@advanced-rest-client/response-highlighter": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/response-highlighter/-/response-highlighter-3.0.3.tgz", - "integrity": "sha512-t3+lgDhjIeMqpr5A9etIlYXJCW8mBTOi+A6ERY1ueyyWo41a5EpbsTDCS7lPlRpktOs9Iz6bxjx715qQi2S7Tg==", - "dev": true, + "@anypoint-web-components/anypoint-collapse": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-collapse/-/anypoint-collapse-0.1.0.tgz", + "integrity": "sha512-EVl5sVD3ErRN2MNOcWNck/huuRW5/RJVGuK/YK+dWwg602OQ9L2RbLLJrS0GQ7hh8al/1DmhdmGauK73QkTM1A==", "requires": { - "@advanced-rest-client/prism-highlight": "^4.0.2", - "lit-element": "^2.0.1", + "@advanced-rest-client/arc-resizable-mixin": "^1.1.0", + "lit-element": "^2.2.1", "lit-html": "^1.1.2" } }, - "@advanced-rest-client/response-history-saver": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/response-history-saver/-/response-history-saver-3.0.1.tgz", - "integrity": "sha512-BxgGu6ptcoSB9GgPue4ofF+xWVPES0xd/+YFDVsSr9XfX6fcMjqbpfcSKBSKVDTR5To+Q9X4XSll6wVge73hBQ==", - "dev": true, + "@anypoint-web-components/anypoint-control-mixins": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-control-mixins/-/anypoint-control-mixins-1.1.3.tgz", + "integrity": "sha512-LRhwEav2ZpDBRKiGo3Upu4B0ur/j8+2JxeqHGwxcXc8ORuiJLVxcorURuKhLyvEjk5fP5pI0S0KGIUj66N1KQg==", "requires": { - "@advanced-rest-client/uuid-generator": "^3.0.2", - "pouchdb": "^7.1.1" + "@open-wc/dedupe-mixin": "^1.3.0" } }, - "@advanced-rest-client/response-raw-viewer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/response-raw-viewer/-/response-raw-viewer-3.0.2.tgz", - "integrity": "sha512-Q06SdtVIjoNm7QoAdL31e9svJ/o0aWPNoPrBpxyAEWyWK5PxPh27zT2+ccGnUd+fErLKPFtDJbxYSn7Y69Ok3Q==", - "dev": true, + "@anypoint-web-components/anypoint-dialog": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-dialog/-/anypoint-dialog-0.1.6.tgz", + "integrity": "sha512-BAne4mYs8zp2RlzoB8RWDqRIHvke7ezMQj8qGT6xgHO96j5p8uF2tjbaX5Py50JXeMDsvj8JuZUPJFlzqAxWOA==", "requires": { - "lit-element": "^2.0.1", - "lit-html": "^1.1.2" + "@advanced-rest-client/arc-overlay-mixin": "^1.1.6", + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/response-status-view": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/response-status-view/-/response-status-view-3.0.4.tgz", - "integrity": "sha512-A143vbdgzt+zxGkjrvyvEReiZefXVRfP5SkkVc89rgIcQ2NwQwnJRq5BdTDrt8ELkBiIgQvsheD2FWWxdkSL7A==", - "dev": true, + "@anypoint-web-components/anypoint-dropdown": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-dropdown/-/anypoint-dropdown-1.1.4.tgz", + "integrity": "sha512-t84wYqpeljd2+41Ci/ME82o1R2qL1gn3mLTmHx3J+oS8ou0FOGhSHKKuxchF0Y87ydE1fGmWdE6Im4FIwLUCKQ==", "requires": { - "@advanced-rest-client/arc-icons": "^3.0.4", - "@advanced-rest-client/headers-list-view": "^3.0.3", - "@advanced-rest-client/request-timings": "^3.0.2", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-tabs": "^0.1.10", - "@polymer/iron-collapse": "^3.0.0", - "lit-element": "^2.2.1" + "@advanced-rest-client/arc-overlay-mixin": "^1.1.7", + "@anypoint-web-components/anypoint-control-mixins": "^1.1.3", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/response-view": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/response-view/-/response-view-3.0.4.tgz", - "integrity": "sha512-ZdAtR4oNQLTQoYUpsIKS2ZryGmWs1AeL/N3nNH9poBl03ePNz+Q+vMXGaj+3YsLry/syYukPCXnEbEtDRbPHuw==", - "dev": true, + "@anypoint-web-components/anypoint-dropdown-menu": { + "version": "0.1.20", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-dropdown-menu/-/anypoint-dropdown-menu-0.1.20.tgz", + "integrity": "sha512-iqV6KkorsP7vUtNX/zKv3Pxy/oktXbijdjCDjHwzxJ/jzuokJc+Y4VhnLdQ3B0dNUn+D2Mg3lhppy1FwLl6oZg==", "requires": { - "@advanced-rest-client/response-body-view": "^3.0.4", - "@advanced-rest-client/response-error-view": "^3.0.1", - "@advanced-rest-client/response-status-view": "^3.0.2", - "lit-element": "^2.0.1" + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-control-mixins": "^1.1.3", + "@anypoint-web-components/anypoint-dropdown": "^1.1.4", + "@anypoint-web-components/validatable-mixin": "^1.1.3", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/rest-apis-list-panel": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/rest-apis-list-panel/-/rest-apis-list-panel-3.0.1.tgz", - "integrity": "sha512-sRpD65i7LXH27xLz0C5YHJysbehXo2MVavh29kH8VxjSUREFt+4LTQHj8Pt4Wy5htKD0BqquOlmjpV9WW9rH6g==", - "dev": true, + "@anypoint-web-components/anypoint-form-mixins": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-form-mixins/-/anypoint-form-mixins-1.2.2.tgz", + "integrity": "sha512-Z9aC5WZOr58GnabwPhVq8OpZ6Yk6RU/HGX/uC9mP2h5cohTqCCwZBgyDmRE5YzjBidaWR+9mCUPKJsxl9Z9AEA==", "requires": { - "@advanced-rest-client/arc-icons": "^3.0.3", - "@advanced-rest-client/arc-models": "^3.0.3", - "@anypoint-web-components/anypoint-button": "^1.0.12", - "@anypoint-web-components/anypoint-input": "^0.2.9", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@anypoint-web-components/anypoint-menu-button": "^0.1.0", - "@polymer/paper-progress": "^3.0.1", - "lit-element": "^2.2.1" + "@anypoint-web-components/validatable-mixin": "^1.1.3", + "@open-wc/dedupe-mixin": "^1.3.0" } }, - "@advanced-rest-client/saved-list-mixin": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/saved-list-mixin/-/saved-list-mixin-3.0.3.tgz", - "integrity": "sha512-wmldtnZVRW0vQR0OIOXp8vDXiMZ9h1rieAkRzIZOAfGy7eHKGikSda8bQQx+qi2brUF2GvBmERuT9RW7I/3RSw==", - "dev": true, + "@anypoint-web-components/anypoint-input": { + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-input/-/anypoint-input-0.2.24.tgz", + "integrity": "sha512-IFxwuolKXBtGDmWGqfmdlJwzGlAJr7fE56tNqMrdqCNHEEJvxcWBxIXiWDfnN7SctuqQDkX1Oz+o9wIe3k2tlw==", "requires": { - "@advanced-rest-client/arc-models": "^3.1.1", - "lit-html": "^1.2.1" + "@advanced-rest-client/arc-icons": "^3.1.2", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-control-mixins": "^1.1.3", + "@anypoint-web-components/validatable-mixin": "^1.1.3", + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/saved-request-detail": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/saved-request-detail/-/saved-request-detail-3.0.3.tgz", - "integrity": "sha512-wl3+do9Bf5t4dgsVPmaOfeZTEHrGC+juvcFJvywuYg2GAflMbrh5MMwdK6ePrQWcwQ8KPtd6oEtEwTkMUydprw==", - "dev": true, + "@anypoint-web-components/anypoint-item": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-item/-/anypoint-item-1.1.0.tgz", + "integrity": "sha512-a4Lz1p5vpdgxeQ4sTAr23kiV9cvKAQ6aVGXRbrEOVYpXKkBJVlkWPvIJ44i14e6APW9F4kY0nczQayAn83QDfg==", "requires": { - "@advanced-rest-client/arc-icons": "^3.0.2", - "@advanced-rest-client/arc-marked": "^1.0.4", - "@advanced-rest-client/arc-models": "^3.0.0", - "@advanced-rest-client/arc-resizable-mixin": "^1.0.0", - "@advanced-rest-client/date-time": "^3.0.2", - "@advanced-rest-client/markdown-styles": "^3.1.0", - "@anypoint-web-components/anypoint-button": "^1.0.11", - "@anypoint-web-components/anypoint-chip": "^0.2.0", - "@api-components/http-method-label": "^3.0.1", - "@polymer/paper-toast": "^3.0.1", - "lit-element": "^2.2.1" + "@anypoint-web-components/anypoint-control-mixins": "^1.1.3", + "@anypoint-web-components/anypoint-styles": "^1.0.1", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/saved-request-editor": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/saved-request-editor/-/saved-request-editor-3.0.4.tgz", - "integrity": "sha512-tGealvkaXvkTL0yGQ89ZR9JZCdF2LKu2UTgVQxy1Ahjg8mIcHAmzseo27dBY5/NIyE8Gh50pqcHvU39OBPabqw==", - "dev": true, + "@anypoint-web-components/anypoint-listbox": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-listbox/-/anypoint-listbox-1.1.6.tgz", + "integrity": "sha512-YkQuORirn6k+erAeB1H1OZgFqc7gOPcGaJoH+TuXW8Sb5gdburU8UtdTnO9CvZ/a+pCcIE35EgrdcInBglXGiQ==", "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/arc-models": "^3.1.1", - "@advanced-rest-client/code-mirror": "^3.0.3", - "@advanced-rest-client/projects-list-consumer-mixin": "^3.0.1", - "@advanced-rest-client/saved-request-detail": "^3.0.3", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-checkbox": "^1.0.2", - "@anypoint-web-components/anypoint-chip-input": "^0.2.1", - "@anypoint-web-components/anypoint-input": "^0.2.13", - "@polymer/iron-collapse": "^3.0.0", - "@polymer/iron-form": "^3.0.0", - "lit-element": "^2.3.1" + "@anypoint-web-components/anypoint-menu-mixin": "^1.1.7", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/saved-requests-panel": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/saved-requests-panel/-/saved-requests-panel-3.0.1.tgz", - "integrity": "sha512-yyR3Z5JKgc6Z3FY7dx1ymOGutS8b1h/iIV96MRA8u3Jxx8O7JcPLuEdx9uz1KlsEvlTsvI2RQ3qMzlB1Sqmg0w==", - "dev": true, + "@anypoint-web-components/anypoint-menu-button": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-menu-button/-/anypoint-menu-button-0.1.4.tgz", + "integrity": "sha512-wPGgvTYZtegArAqsMkA+M7b9UodW2bFPkG/87s/FEj9MXUrLAarevqNq/oHeKBCq598Sl5P2o2XG5fZm5AX8Qg==", "requires": { - "@advanced-rest-client/arc-icons": "^3.0.2", - "@advanced-rest-client/bottom-sheet": "^3.1.0", - "@advanced-rest-client/export-options": "^3.2.0", - "@advanced-rest-client/history-panel": "^3.0.3", - "@advanced-rest-client/projects-list-consumer-mixin": "^3.0.1", - "@advanced-rest-client/requests-list-mixin": "^3.0.1", - "@advanced-rest-client/saved-list-mixin": "^3.0.1", - "@advanced-rest-client/saved-request-detail": "^3.0.3", - "@advanced-rest-client/saved-request-editor": "^3.0.3", - "@anypoint-web-components/anypoint-button": "^1.0.11", - "@anypoint-web-components/anypoint-checkbox": "^1.0.1", - "@anypoint-web-components/anypoint-chip-input": "^0.2.0", - "@anypoint-web-components/anypoint-dialog": "^0.1.1", - "@anypoint-web-components/anypoint-input": "^0.2.6", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@anypoint-web-components/anypoint-menu-button": "^0.1.0", - "@anypoint-web-components/anypoint-menu-mixin": "^1.0.2", - "@anypoint-web-components/anypoint-radio-button": "^0.1.2", - "@api-components/http-method-label": "^3.0.1", - "@polymer/paper-fab": "^3.0.0", - "@polymer/paper-progress": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.2.1", - "lit-html": "^1.1.2" + "@anypoint-web-components/anypoint-control-mixins": "^1.1.3", + "@anypoint-web-components/anypoint-dropdown": "^1.1.4", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/star-rating": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/star-rating/-/star-rating-1.2.0.tgz", - "integrity": "sha512-FpLuvCebUW6SOUtWTVrPKdDzkigOVcAQymky5uKp2zzF3/XjiptEeYn5TZe4Qox12lbh8HuTFjFMgRK4iGkfjw==", - "dev": true - }, - "@advanced-rest-client/themes-panel": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/themes-panel/-/themes-panel-3.0.1.tgz", - "integrity": "sha512-K2atUm/HMWAuoQeX5PGnohyduee3XrbJbhlwHkfBpGmzjJjWWDUW/vztQ2mvP/gkTatEVjm00tbQDbKGUX6BBw==", - "dev": true, + "@anypoint-web-components/anypoint-menu-mixin": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-menu-mixin/-/anypoint-menu-mixin-1.1.8.tgz", + "integrity": "sha512-Aq4hEcDeVQc/aCStExqaSOz2soVrwmlwpbW0VdILCIUjCVCIK5WbLvCeYY7H6SVYZpNhCwgfYAELYCTII+e6oQ==", "requires": { - "@advanced-rest-client/arc-icons": "^3.0.2", - "@anypoint-web-components/anypoint-button": "^1.0.10", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.11", - "@anypoint-web-components/anypoint-input": "^0.2.4", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@polymer/paper-spinner": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.2.1" + "@anypoint-web-components/anypoint-selector": "^1.1.6", + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/url-input-editor": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/url-input-editor/-/url-input-editor-3.1.1.tgz", - "integrity": "sha512-fqvknzr+wrMCSWArJpALs3K3wVTtx8ao8qBCW34X7JMktLEfg6L/37OMfR46FSnMPwEhsxpPX3rcg8WSTpnqhA==", + "@anypoint-web-components/anypoint-radio-button": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-radio-button/-/anypoint-radio-button-0.1.6.tgz", + "integrity": "sha512-WOT4jXDoa40tPxySjF39pidATUvnlBO7UmqTTNLzsCjxSUy9hETP2yxE7ok4Qe6tvI5vHfaTxcho535a5X0tTQ==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@advanced-rest-client/url-parser": "^3.0.1", - "@anypoint-web-components/anypoint-autocomplete": "^0.1.5", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-input": "^0.2.13", - "@anypoint-web-components/anypoint-switch": "^0.1.3", - "@anypoint-web-components/validatable-mixin": "^1.0.2", - "@polymer/iron-collapse": "^3.0.0", - "@polymer/iron-form": "^3.0.0", - "lit-element": "^2.3.0" + "@anypoint-web-components/anypoint-form-mixins": "^1.2.1", + "@anypoint-web-components/anypoint-menu-mixin": "^1.1.7", + "@anypoint-web-components/anypoint-styles": "^1.0.1", + "lit-element": "^2.4.0" } }, - "@advanced-rest-client/url-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/url-parser/-/url-parser-3.0.1.tgz", - "integrity": "sha512-x8rKpwxHwXhbzbf6vp1tHPKE4W6pTWp+MsLiRYh3j5Jj8mVHW6zsrQARTu5VRzv7MOQYeGclrhsNxjBaAoq2WQ==", - "dev": true - }, - "@advanced-rest-client/uuid-generator": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/uuid-generator/-/uuid-generator-3.1.0.tgz", - "integrity": "sha512-8q+V1i+Aq/0AFLEDQ/kGTPgKtEHBBHuUWHRwMQ2dZVlr6bNlTH6mmPxHBMp9FnjCAYoxMVH71c6CYSUT9nEXYg==", - "dev": true - }, - "@advanced-rest-client/variables-consumer-mixin": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/variables-consumer-mixin/-/variables-consumer-mixin-3.0.6.tgz", - "integrity": "sha512-BvaEJot8xBTTN9OQWP+bBl7WIeeImpb/5uE+GIoUYANGNjRDl5H9JAWt0Udv9+Lmb6RPB0wxKCvFx4pn31T6Ww==", - "dev": true + "@anypoint-web-components/anypoint-selector": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-selector/-/anypoint-selector-1.1.7.tgz", + "integrity": "sha512-icQ7BCTWw6emq+8zW/tiaKwa7Nux7iJQ9rQIAeWFP43Z6no19yhUFGMbBnr6L3Kdzpo7O+goQPQQiXskd3tJUA==", + "requires": { + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" + } }, - "@advanced-rest-client/variables-drawer-editor": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/variables-drawer-editor/-/variables-drawer-editor-3.0.0.tgz", - "integrity": "sha512-Qg/8TmsK5HVkAMiE7h9ZfkPvx+TlamvLRd1asiepomUCv1HH1yyPdQqxd/gHwXvWA/VkGOKDZfqipXMnXtWHDw==", + "@anypoint-web-components/anypoint-signin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-signin/-/anypoint-signin-5.0.1.tgz", + "integrity": "sha512-OebG+dU/9EuzgQ3i4ICK6RyngcXV8ddDJd1hPxJpIuZmp7H06Lfck4VAYTGCk86Fty1MfK4wazolANcoPdFpHA==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.0", - "@advanced-rest-client/arc-overlay-mixin": "^1.0.3", - "@advanced-rest-client/variables-editor": "^3.0.0", - "@anypoint-web-components/anypoint-button": "^1.0.10", - "lit-element": "^2.2.1" + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-types": "^0.2.47", + "@advanced-rest-client/oauth-authorization": "^5.0.4", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "lit-element": "^2.4.0" } }, - "@advanced-rest-client/variables-editor": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/variables-editor/-/variables-editor-3.0.5.tgz", - "integrity": "sha512-SBFo2jCMTJVRoZbCAusJF4tqbEFSOpZ0Lq7nU+T8jFUQU2qhBpTcgGYSKxMrzo+F2bnSSGTOlYzGInUcdZEbKw==", - "dev": true, + "@anypoint-web-components/anypoint-styles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-styles/-/anypoint-styles-1.0.1.tgz", + "integrity": "sha512-sTsbaVSWuFEaOjFL+9t++E95rV+aQqtnbqqIEhhLei7P/z0v/ySfRxATnyjq6YgfHN0D2axZ3uk7l6nEN6YKHQ==", "requires": { - "@advanced-rest-client/arc-icons": "^3.0.0", - "@advanced-rest-client/environment-selector": "^3.0.2", - "@advanced-rest-client/uuid-generator": "^3.0.0", - "@advanced-rest-client/variables-consumer-mixin": "^3.0.5", - "@anypoint-web-components/anypoint-button": "^1.0.10", - "@anypoint-web-components/anypoint-dialog": "^0.1.1", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.11", - "@anypoint-web-components/anypoint-input": "^0.2.6", - "@anypoint-web-components/anypoint-item": "^1.0.4", - "@anypoint-web-components/anypoint-listbox": "^1.0.3", - "@anypoint-web-components/anypoint-switch": "^0.1.3", - "@anypoint-web-components/anypoint-tabs": "^0.1.7", "lit-element": "^2.2.1", "lit-html": "^1.1.2" } }, - "@advanced-rest-client/variables-evaluator": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/variables-evaluator/-/variables-evaluator-3.1.0.tgz", - "integrity": "sha512-wE5PAleCMAkwMeteOq8CuruIuLK2P1+xlBW4fr+BnpQY4XsHeg9NAAW9IQrjTydvdCpGKLXj1fcGKdtI0CLImg==", - "dev": true, + "@anypoint-web-components/anypoint-switch": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-switch/-/anypoint-switch-0.1.4.tgz", + "integrity": "sha512-ltjgMHFuWC80V1+FDI34M+Q6gnNXs0+skfuM6/bbL0SPup5wttQc5OGrZcje7PwxExstUNHIF9+oLzPbHjfShQ==", "requires": { - "@advanced-rest-client/events-target-mixin": "^3.1.1", + "@anypoint-web-components/anypoint-control-mixins": "^1.1.1", + "@anypoint-web-components/anypoint-form-mixins": "^1.2.0", "lit-element": "^2.3.1" } }, - "@advanced-rest-client/variables-manager": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/variables-manager/-/variables-manager-3.0.1.tgz", - "integrity": "sha512-5LwLsFosGUcjx/8QeOVIQ0lfw3kPQCUm+a1PHG4WUz21qXOl2hGK5ADwD2UnYcQKZYGgmAn4MFfoFTXPqOyovA==", + "@anypoint-web-components/anypoint-tabs": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-tabs/-/anypoint-tabs-0.1.12.tgz", + "integrity": "sha512-t3Qe9JPRJCof5LMMVDcOqltDnGvpigUboxASVrovuf0iPeDYgPWjJ59pNgeLFnT20LGsZVgEAGWBnOuuK5XGuw==", "dev": true, "requires": { - "@advanced-rest-client/arc-models": "^3.0.0-preview.14", - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "lit-element": "^2.2.1" + "@advanced-rest-client/arc-resizable-mixin": "^1.1.1", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-control-mixins": "^1.1.2", + "@anypoint-web-components/anypoint-menu-mixin": "^1.1.7", + "@polymer/iron-icon": "^3.0.1", + "@polymer/paper-ripple": "^3.0.2", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@advanced-rest-client/variables-preview-overlay": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/variables-preview-overlay/-/variables-preview-overlay-3.0.2.tgz", - "integrity": "sha512-1uI8tsD8R/4hLVzD7tYytgRsKicoZtLpLcYT6/2YGa0kKhnEEduVwFcdIonHBQZOS5fPAVrO3wVt/JVTh+slCg==", - "dev": true, + "@anypoint-web-components/validatable-mixin": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/validatable-mixin/-/validatable-mixin-1.1.3.tgz", + "integrity": "sha512-cObFmNCIWxbGoYEO7cMUEEB4LQ4n3HEgk1gS7LB/TZSvXzzth00f3lbxkvQsubBIFVEOKFUq5Lo8vuG81t0/2w==", "requires": { - "@advanced-rest-client/arc-overlay-mixin": "^1.0.3", - "@advanced-rest-client/variables-consumer-mixin": "^3.0.4", - "@anypoint-web-components/anypoint-button": "^1.0.10", - "lit-element": "^2.2.1" + "@anypoint-web-components/validator-mixin": "^1.1.1", + "@open-wc/dedupe-mixin": "^1.3.0" } }, - "@advanced-rest-client/web-socket": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/web-socket/-/web-socket-3.0.2.tgz", - "integrity": "sha512-KhJv8wZOdEGsAC4VL4d+DoSkHfHNCbx0CI9BhSMeRzh3eXEnycibBfVut/J1z0kjnX2TdkLaunAkeYufq7YmvA==", - "dev": true, + "@anypoint-web-components/validator-mixin": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@anypoint-web-components/validator-mixin/-/validator-mixin-1.1.1.tgz", + "integrity": "sha512-SHBFXn/uHP5ptQY/ZV/DzEb0dBYldQF1Rti1q+3lfbUcYiA59QdfsPvOmre6a64NeaHagV/aMd4zj3FNH5hAXg==", "requires": { - "lit-element": "^2.3.1" + "@open-wc/dedupe-mixin": "^1.2.17" } }, - "@advanced-rest-client/web-url-input": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/web-url-input/-/web-url-input-3.0.2.tgz", - "integrity": "sha512-vqVEmAvLw2S0H3v+sCS56HPpDhKNuZy6oV6l15jwhVjb5NOx5lC8bN1IXYKGSzna3VMs7/irGlNIPgKcDv8cAw==", - "dev": true, - "requires": { - "@advanced-rest-client/arc-models": "^3.0.0-preview.14", - "@advanced-rest-client/arc-overlay-mixin": "^1.0.1", - "@anypoint-web-components/anypoint-autocomplete": "^0.1.3", - "@anypoint-web-components/anypoint-button": "^1.0.10", - "@anypoint-web-components/anypoint-input": "^0.2.4", - "lit-element": "^2.2.1" - } + "@api-components/amf-helper-mixin": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@api-components/amf-helper-mixin/-/amf-helper-mixin-4.3.4.tgz", + "integrity": "sha512-YJg3gmckxI07Rw8B/5DCZMHoEC/Exl+FF1wDThfcN35UfE7yBrcAEQ4zbGcMHdloZQDPpg7B/KAV5g9pzdD/KQ==", + "dev": true }, - "@advanced-rest-client/websocket-data-view": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/websocket-data-view/-/websocket-data-view-3.0.0.tgz", - "integrity": "sha512-HS80kOgscjJ+XUfsB+3eWBaG8HzBLi4UtnHEoybyLKigm92qGXEL7ftpT0qGfLRbwW23UADY+6udtZ3RxEmIRQ==", + "@api-components/api-annotation-document": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@api-components/api-annotation-document/-/api-annotation-document-4.1.0.tgz", + "integrity": "sha512-LP8dX2WqEkPUYF9BM4AV+LyUII/rTN1URbXNy0MilMfupR+oNjBymxhvd59gsDYpJKtHPJwdiKfx4+nWXakCJQ==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.0", - "@advanced-rest-client/date-time": "^3.0.0", - "@polymer/paper-button": "^3.0.0", - "@polymer/paper-dialog": "^3.0.0", - "@polymer/paper-icon-button": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.0.1" + "@advanced-rest-client/arc-icons": "^3.0.5", + "@api-components/amf-helper-mixin": "^4.0.17", + "lit-element": "^2.2.1", + "lit-html": "^1.1.2" } }, - "@advanced-rest-client/websocket-history": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/websocket-history/-/websocket-history-3.0.0.tgz", - "integrity": "sha512-cJI7TrVgvlTjP6wd1OQRQMrcDqd1d53u0pJkx+EbbSvEnh0vlWwsP2BwR0XMFrQqdSdzuAzj1O2+vJ2rgrOzHA==", + "@api-components/api-authorization": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@api-components/api-authorization/-/api-authorization-0.5.1.tgz", + "integrity": "sha512-zH3P/yxtZw74lw0ZS3ePpm1JTWK75u7JkqQct3or9y78jzfLqugZD6zAWhea4oql+3pZq6nD4saV9nVEouMAAQ==", "dev": true, "requires": { - "@advanced-rest-client/arc-models": "^3.0.0-preview.6", - "@advanced-rest-client/date-time": "^3.0.0", - "@polymer/paper-button": "^3.0.0", - "@polymer/paper-item": "^3.0.0", - "lit-element": "^2.0.1" + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-marked": "^1.1.0", + "@advanced-rest-client/arc-types": "^0.2.47", + "@advanced-rest-client/authorization-method": "^0.2.3", + "@advanced-rest-client/events-target-mixin": "^3.1.1", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", + "@anypoint-web-components/anypoint-item": "^1.0.5", + "@anypoint-web-components/anypoint-listbox": "^1.0.4", + "@api-components/amf-helper-mixin": "^4.3.4", + "@api-components/api-forms": "^0.1.2", + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.3.1", + "lit-html": "^1.2.1" } }, - "@advanced-rest-client/websocket-panel": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/websocket-panel/-/websocket-panel-3.0.0.tgz", - "integrity": "sha512-0RFIo4/HWjA8XP36qMA7qxKOVUul8iwwtaRKRvWXNRdphpEA7ka357xa4s5Eo6iYXx7TobF4t2P1nSh0gNoN+w==", + "@api-components/api-body-document": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@api-components/api-body-document/-/api-body-document-4.2.1.tgz", + "integrity": "sha512-VK6ZsSX4Vw4KFGrlhmoC7VHjlC8ueH9lkX6okn2iLb9MoXNMptsAJ6Z6iFpaWLsSbpuJyeA6WsVjQx8j49RbhQ==", "dev": true, "requires": { - "@advanced-rest-client/websocket-data-view": "^3.0.0", - "@advanced-rest-client/websocket-history": "^3.0.0", - "@advanced-rest-client/websocket-request": "^3.0.1", - "lit-element": "^2.0.1" + "@advanced-rest-client/arc-icons": "^3.0.4", + "@advanced-rest-client/arc-marked": "^1.0.6", + "@advanced-rest-client/markdown-styles": "^3.1.1", + "@anypoint-web-components/anypoint-button": "^1.0.15", + "@api-components/amf-helper-mixin": "^4.1.8", + "@api-components/api-resource-example-document": "^4.1.1", + "@api-components/api-schema-document": "^4.0.3", + "@api-components/api-type-document": "^4.2.2", + "@api-components/raml-aware": "^3.0.0", + "@polymer/iron-collapse": "^3.0.0", + "lit-element": "^2.4.0" } }, - "@advanced-rest-client/websocket-request": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/websocket-request/-/websocket-request-3.0.4.tgz", - "integrity": "sha512-muVOP2VYNe0p2yJyX/j3dV4onkxhqn8/fTLIHtQnUZOzjqS7auTyCbqNI37pr6rwpPrIp6voQJkmU4L9rCtwTg==", + "@api-components/api-body-editor": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@api-components/api-body-editor/-/api-body-editor-4.0.6.tgz", + "integrity": "sha512-n+y3K29cCBgG4nWbmq1Gs1vtUbkI7Q23rMyxZofQ//TErwLK9y6K21KGJGHLUiEWjW5qYtTA+5LmRoB6mdKh+g==", "dev": true, "requires": { - "@advanced-rest-client/arc-models": "^3.1.0", - "@advanced-rest-client/file-drop": "^3.1.0", - "@advanced-rest-client/web-socket": "^3.0.1", - "@anypoint-web-components/anypoint-autocomplete": "^0.1.5", + "@advanced-rest-client/clipboard-copy": "^3.0.1", + "@advanced-rest-client/content-type-selector": "^3.1.3", + "@advanced-rest-client/events-target-mixin": "^3.1.1", + "@advanced-rest-client/files-payload-editor": "^3.0.4", + "@advanced-rest-client/form-data-editor": "^3.0.7", + "@advanced-rest-client/multipart-payload-editor": "^4.0.1", + "@advanced-rest-client/raw-payload-editor": "^3.0.6", "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-checkbox": "^1.0.2", - "@anypoint-web-components/anypoint-input": "^0.2.13", - "@anypoint-web-components/anypoint-tabs": "^0.1.10", - "@polymer/paper-progress": "^3.0.0", - "@polymer/paper-toast": "^3.0.0", - "lit-element": "^2.3.0" + "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", + "@anypoint-web-components/anypoint-item": "^1.0.5", + "@anypoint-web-components/anypoint-listbox": "^1.0.4", + "@api-components/amf-helper-mixin": "^4.1.1", + "@api-components/api-example-generator": "^4.2.0", + "@api-components/api-form-mixin": "^3.0.4", + "@api-components/api-view-model-transformer": "^4.0.3", + "@api-components/raml-aware": "^3.0.0", + "lit-element": "^2.3.1", + "lit-html": "^1.2.1" } }, - "@anypoint-web-components/anypoint-autocomplete": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-autocomplete/-/anypoint-autocomplete-0.1.5.tgz", - "integrity": "sha512-O6eY03RONbN1TiBxhp8g5OnwANyMdj0voZ1eo0jgJSyBgyoi8d1RoZLkfw1xCZs3zTaXmvvFghVw7t3YEbnGQA==", + "@api-components/api-console-ext-comm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@api-components/api-console-ext-comm/-/api-console-ext-comm-3.0.0.tgz", + "integrity": "sha512-aHpuDhsUFUp5tNy0cMtWG52uCOMPMSU+Owpj5JleqnAuHC7bBrBM+qntAZK9PNHm8itRNG+2bov3CwBzdt5bXA==", "dev": true, "requires": { - "@anypoint-web-components/anypoint-dropdown": "^1.0.1", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@polymer/paper-progress": "^3.0.0", - "@polymer/paper-ripple": "^3.0.2", - "lit-element": "^2.3.0" + "lit-element": "^2.0.1" } }, - "@anypoint-web-components/anypoint-button": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-button/-/anypoint-button-1.1.1.tgz", - "integrity": "sha512-S+cfMd5GRepD+133ajGwCNGG+nzTQnH88kcXzbG+Nsl2yC7FQRNNO6N0VQFsfuRl7e+FwWAp3W2iM/HxoAO1kg==", + "@api-components/api-documentation": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@api-components/api-documentation/-/api-documentation-6.0.1.tgz", + "integrity": "sha512-RA9oHqQZqVF/SrXVXFQpHTbBSMOoFChsejoPks7UHSx8mMVq6wEpYpmOuTxtmbW1KQM1m31eoaQmrvQ2TMeSsA==", "dev": true, "requires": { - "@anypoint-web-components/anypoint-control-mixins": "^1.1.1", - "@polymer/paper-ripple": "^3.0.2", - "lit-element": "^2.3.1" + "@advanced-rest-client/events-target-mixin": "^3.2.3", + "@api-components/amf-helper-mixin": "^4.3.4", + "@api-components/api-documentation-document": "^4.0.2", + "@api-components/api-endpoint-documentation": "^6.0.0", + "@api-components/api-method-documentation": "^5.1.9", + "@api-components/api-security-documentation": "^4.0.5", + "@api-components/api-server-selector": "^0.6.3", + "@api-components/api-summary": "^4.3.0", + "@api-components/api-type-documentation": "^4.1.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@anypoint-web-components/anypoint-checkbox": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-checkbox/-/anypoint-checkbox-1.0.2.tgz", - "integrity": "sha512-ufh+VqueD8pj4rMQNaaElMRwSmA6+gIqiEKcLePEJmIEn465ARdT7y37EJxrGxKzytn1k7BKn6VaVcDF5iR/aA==", + "@api-components/api-documentation-document": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@api-components/api-documentation-document/-/api-documentation-document-4.0.2.tgz", + "integrity": "sha512-zHwLytXjYAgeEfjGPtjz+aVATuL5MQrsIY4ro1giMx5DprkQyVodZ86fZG1bO80kyWINpQXNfKfselnVDAWubQ==", "dev": true, "requires": { - "@anypoint-web-components/anypoint-control-mixins": "^1.0.2", - "@anypoint-web-components/anypoint-form-mixins": "^1.0.1", + "@advanced-rest-client/arc-marked": "^1.0.4", + "@advanced-rest-client/markdown-styles": "^3.1.0", + "@api-components/amf-helper-mixin": "^4.0.13", "lit-element": "^2.2.1" } }, - "@anypoint-web-components/anypoint-chip": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-chip/-/anypoint-chip-0.2.0.tgz", - "integrity": "sha512-eNTZywEM+AHusORZkr2WM/5nWd7fR0p3OIKE9w8gKQQktpWxc4jJ25h09MIRmviP19XMpp7C/XZRxBvUWzsAZw==", + "@api-components/api-endpoint-documentation": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@api-components/api-endpoint-documentation/-/api-endpoint-documentation-6.0.0.tgz", + "integrity": "sha512-CvfB+dWvjsveF5Lt69WEvGK+8HCMjImiek9hgTBFxU428BO5MiYOvZbSgjvwfbRZwn8H1FItsVifd+O8XI7K4w==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.2", - "lit-element": "^2.0.1", - "lit-html": "^1.0.0" + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-marked": "^1.0.6", + "@advanced-rest-client/clipboard-copy": "^3.0.1", + "@advanced-rest-client/http-code-snippets": "^3.2.1", + "@advanced-rest-client/markdown-styles": "^3.1.2", + "@anypoint-web-components/anypoint-button": "^1.0.15", + "@anypoint-web-components/anypoint-collapse": "^0.1.0", + "@api-components/amf-helper-mixin": "^4.3.4", + "@api-components/api-annotation-document": "^4.0.3", + "@api-components/api-example-generator": "^4.4.6", + "@api-components/api-method-documentation": "^5.1.9", + "@api-components/api-parameters-document": "^4.0.5", + "@api-components/api-request": "^0.1.1", + "@api-components/http-method-label": "^3.1.3", + "lit-element": "^2.3.1", + "lit-html": "^1.2.1" } }, - "@anypoint-web-components/anypoint-chip-input": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-chip-input/-/anypoint-chip-input-0.2.1.tgz", - "integrity": "sha512-9aueLjVTtYtdWv4iVLXLcvuQrRHRZy/eb+r6gWLuIwe5QfR2Iv4wrWVQzQIKfGuNwlrujuFUGRCyRqjIaIQY+A==", + "@api-components/api-example-generator": { + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@api-components/api-example-generator/-/api-example-generator-4.4.6.tgz", + "integrity": "sha512-5C2oVvtrw1AO487nbReOjxJLCDV8r72ggJloqHwY9/U232iq0zumKKQ5zZUIlilRyNQvGj//n8ck4oItcmpVEQ==", "dev": true, "requires": { - "@anypoint-web-components/anypoint-autocomplete": "^0.1.4", - "@anypoint-web-components/anypoint-chip": "^0.2.0", - "@anypoint-web-components/anypoint-input": "^0.2.13", - "lit-element": "^2.2.1" + "@api-components/amf-helper-mixin": "^4.1.8", + "lit-element": "^2.4.0" } }, - "@anypoint-web-components/anypoint-combobox": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-combobox/-/anypoint-combobox-0.1.2.tgz", - "integrity": "sha512-bkoluy7Q0f056Cylbt2RdKmihjjKiK/mZSRhAEMOK3qCdONqq8+v7jwNoesvignEBhlT2GvQjl0Ot2+0JMP7Dg==", + "@api-components/api-form-mixin": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@api-components/api-form-mixin/-/api-form-mixin-3.1.3.tgz", + "integrity": "sha512-U+8F/vau3KhG6LEJFW10JdaO482YKvkJamtD2KHYgtdHNmmzQUy2C3vZuesdorUpl5ZbaBM0Em03atTFzNYGlg==", "dev": true, "requires": { - "@anypoint-web-components/anypoint-autocomplete": "^0.1.4", - "@anypoint-web-components/anypoint-input": "^0.2.12", - "lit-element": "^2.0.1" + "@api-components/api-view-model-transformer": "^4.1.1", + "lit-element": "^2.3.1" } }, - "@anypoint-web-components/anypoint-control-mixins": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-control-mixins/-/anypoint-control-mixins-1.1.1.tgz", - "integrity": "sha512-s1VX8EQnogzo5aLjoyxnLuLVzEoZ0rL6LMlV3gEM1g1SJbZyy7SFLMrbiiQheq1zyJMUUEcoux5Jpkadb7R1dg==", + "@api-components/api-forms": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@api-components/api-forms/-/api-forms-0.1.2.tgz", + "integrity": "sha512-62Jx4wEHmnsSmj886IeZ4tSA6/MTQp0ureTxkqdRd6uO0ryXdhOXGH6AZhel/rouLsyKAoMhR6HKvb5L5v3RZw==", + "dev": true, "requires": { - "@open-wc/dedupe-mixin": "^1.2.17" + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-types": "^0.2.47", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-checkbox": "^1.1.3", + "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.20", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.6", + "@anypoint-web-components/validatable-mixin": "^1.1.3", + "@api-components/amf-helper-mixin": "^4.2.0", + "@api-components/api-example-generator": "^4.4.5", + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" + } + }, + "@api-components/api-headers": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@api-components/api-headers/-/api-headers-0.1.0.tgz", + "integrity": "sha512-PM2uAMt65b/cJfU13AxlbZFgnr/JGWrImYx+bjUdCx+WF2uV3gSh56kHS7+S+AD/kcNWYSAAIxoFmdsa0Q7kmQ==", + "dev": true, + "requires": { + "@advanced-rest-client/arc-headers": "^0.1.7", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "@api-components/amf-helper-mixin": "^4.3.2", + "@api-components/api-forms": "^0.1.2", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@anypoint-web-components/anypoint-dialog": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-dialog/-/anypoint-dialog-0.1.1.tgz", - "integrity": "sha512-hFwcMLmyGxlu/P5AHs4EteVc9livTO5GPE04kUNb2fudb1HFB+AWD1+zZCdm8OvoRNAs2aNslBFP/qQWSC4Rqg==", + "@api-components/api-headers-document": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@api-components/api-headers-document/-/api-headers-document-4.2.0.tgz", + "integrity": "sha512-8ipyXIrhHV3YHtd/FIuzijMkuB2v+7VYphBwI7J0c+ZaX+vyt8iXFL15619SPLnQ9RTrQW2u33t32I9kX55dHg==", "dev": true, "requires": { - "@advanced-rest-client/arc-overlay-mixin": "^1.0.3", - "lit-element": "^2.0.1", - "lit-html": "^1.0.0" + "@advanced-rest-client/arc-icons": "^3.2.2", + "@anypoint-web-components/anypoint-button": "^1.0.14", + "@anypoint-web-components/anypoint-collapse": "^0.1.0", + "@api-components/api-type-document": "^4.2.4", + "lit-element": "^2.2.1" } }, - "@anypoint-web-components/anypoint-dropdown": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-dropdown/-/anypoint-dropdown-1.0.1.tgz", - "integrity": "sha512-9bnJkIl1TCgy4u4TDIM1gX3uJxPmT78AH13M9CDi0m7+hGD6DnPZgFTc/7voHV0bK4Qye6RHTEAieYQmkCWVlQ==", + "@api-components/api-method-documentation": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/@api-components/api-method-documentation/-/api-method-documentation-5.1.9.tgz", + "integrity": "sha512-Vih4O3Wd3h+TEWj3EMPHGsLy9nGelaM1AV9Upux9kzOZ+NnxQr+9KISET/ernUvM/hMTMU9EB76all4iDlntKQ==", "dev": true, "requires": { - "@advanced-rest-client/arc-overlay-mixin": "^1.0.4", - "@anypoint-web-components/anypoint-control-mixins": "^1.0.2", - "lit-element": "^2.0.1", - "lit-html": "^1.1.2" + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-marked": "^1.1.0", + "@advanced-rest-client/clipboard-copy": "^3.0.1", + "@advanced-rest-client/http-code-snippets": "^3.2.1", + "@advanced-rest-client/markdown-styles": "^3.1.3", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-collapse": "^0.1.0", + "@api-components/amf-helper-mixin": "^4.3.4", + "@api-components/api-annotation-document": "^4.1.0", + "@api-components/api-body-document": "^4.2.1", + "@api-components/api-example-generator": "^4.4.6", + "@api-components/api-headers-document": "^4.2.0", + "@api-components/api-parameters-document": "^4.0.5", + "@api-components/api-responses-document": "^4.1.3", + "@api-components/api-security-documentation": "^4.0.5", + "@api-components/http-method-label": "^3.1.3", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@anypoint-web-components/anypoint-dropdown-menu": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-dropdown-menu/-/anypoint-dropdown-menu-0.1.14.tgz", - "integrity": "sha512-naeZgZdWx0AaTWHvquCcw/hXEmS27Ui4Cfgph2Z/9ZLoW9H+TxcMnewarv0FZAGcTNpuO3ETf9qCdpN+meEwwg==", + "@api-components/api-navigation": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/@api-components/api-navigation/-/api-navigation-4.2.6.tgz", + "integrity": "sha512-PmplRckJBM+i38ECOHkvlZsjDhLnEseNQQcHy3cuizMroeFChY5BLNn6fjXHDBnDm2GPMqOssfbUhVFZUTJvvA==", "dev": true, "requires": { - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-control-mixins": "^1.0.2", - "@anypoint-web-components/anypoint-dropdown": "^1.0.1", - "@anypoint-web-components/validatable-mixin": "^1.0.2", - "lit-element": "^2.0.1", - "lit-html": "^1.1.2" + "@advanced-rest-client/arc-icons": "^3.2.2", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-collapse": "^0.1.0", + "@api-components/amf-helper-mixin": "^4.3.4", + "@api-components/http-method-label": "^3.1.3", + "@api-components/raml-aware": "^3.0.0", + "lit-element": "^2.3.1", + "lit-html": "^1.2.1" } }, - "@anypoint-web-components/anypoint-form-mixins": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-form-mixins/-/anypoint-form-mixins-1.1.0.tgz", - "integrity": "sha512-I5wO86DQEFgCuSKABg5A134J5ekhBAmraRRmQlg8BPodbQxsR6YuNX0mGVqFbHGj741QEbciwNZ6r4lFmjLmxQ==", + "@api-components/api-parameters-document": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@api-components/api-parameters-document/-/api-parameters-document-4.0.5.tgz", + "integrity": "sha512-+lqVNH+HgPD3U9MnOq/s7cWHpXWn1qwwYq0pIuVgHgJNVyQjpgKvy4VhlpY6rsNzB5DiTATHHxcM7t/37WgxnA==", "dev": true, "requires": { - "@anypoint-web-components/validatable-mixin": "^1.0.2" + "@advanced-rest-client/arc-icons": "^3.0.4", + "@anypoint-web-components/anypoint-button": "^1.0.15", + "@api-components/api-type-document": "^4.0.6", + "@api-components/raml-aware": "^3.0.0", + "@polymer/iron-collapse": "^3.0.0", + "lit-element": "^2.2.1" } }, - "@anypoint-web-components/anypoint-input": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-input/-/anypoint-input-0.2.15.tgz", - "integrity": "sha512-fPA8gnTJM4QwY1UHdsJPjkYIM0W1G3O1V0q7+9pPVdej6gG1NjuX5xA3r5u994++Y7ReA2+rQXByYkSAZ96VxQ==", + "@api-components/api-property-form-item": { + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@api-components/api-property-form-item/-/api-property-form-item-3.0.15.tgz", + "integrity": "sha512-znKSsPUXYGmu3Q2mV+f0VckjU+X3CVisRorHjpKKLu4H/w+WO9GSTUBs4Lllb9nAnNk6ovLcCxckRTxWQzGJRw==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.1.0", + "@advanced-rest-client/arc-icons": "^3.1.2", "@anypoint-web-components/anypoint-button": "^1.1.1", - "@anypoint-web-components/anypoint-control-mixins": "^1.1.1", - "@anypoint-web-components/validatable-mixin": "^1.1.1", - "@open-wc/dedupe-mixin": "^1.2.17", - "lit-element": "^2.3.1", - "lit-html": "^1.2.1" + "@anypoint-web-components/anypoint-checkbox": "^1.1.3", + "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.17", + "@anypoint-web-components/anypoint-input": "^0.2.22", + "@anypoint-web-components/anypoint-item": "^1.0.8", + "@anypoint-web-components/anypoint-listbox": "^1.1.5", + "@anypoint-web-components/validatable-mixin": "^1.1.3", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@anypoint-web-components/anypoint-item": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-item/-/anypoint-item-1.0.5.tgz", - "integrity": "sha512-zBl5JoPrN5fFNpgggGmew3wxXMULr0VKFBosbhWBtMtWCsjprNIL9yvxb1A1s8Xu/bgAkTOU+YxxCmAOM87vKw==", + "@api-components/api-request": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@api-components/api-request/-/api-request-0.1.3.tgz", + "integrity": "sha512-z6zNK96LVOgPwVsVXzOtKIjP+uyAnOXMYDg+zvBn3FWOLrIdui7CDSeVYUJnNRHWCPRmrAg0bp7GaLFXFLFAfA==", + "dev": true, "requires": { - "@anypoint-web-components/anypoint-control-mixins": "^1.0.2", - "@anypoint-web-components/anypoint-styles": "^1.0.1", - "lit-element": "^2.2.1", - "lit-html": "^1.1.2" + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-headers": "^0.1.7", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-response": "^0.1.6", + "@advanced-rest-client/arc-types": "^0.2.47", + "@advanced-rest-client/arc-url": "^0.1.3", + "@advanced-rest-client/events-target-mixin": "^3.2.3", + "@advanced-rest-client/http-method-selector": "^3.0.5", + "@advanced-rest-client/oauth-authorization": "^5.0.4", + "@advanced-rest-client/uuid-generator": "^3.1.1", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@api-components/amf-helper-mixin": "^4.3.4", + "@api-components/api-authorization": "^0.5.1", + "@api-components/api-body-editor": "^4.0.5", + "@api-components/api-forms": "^0.1.2", + "@api-components/api-headers": "^0.1.0", + "@api-components/api-server-selector": "^0.6.3", + "@api-components/api-url": "^0.1.1", + "cryptojslib": "^3.1.2", + "jsrsasign": "^10.1.5", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@anypoint-web-components/anypoint-listbox": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-listbox/-/anypoint-listbox-1.1.0.tgz", - "integrity": "sha512-TfsdCHS9xzS9gtGrLsVj/fbv6YHlbJh5sXIlFJb39ZnEF/Jxxci0QSVpq20NEb7fcVeEAMNUexb3KNGMcG9JHg==", + "@api-components/api-resource-example-document": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@api-components/api-resource-example-document/-/api-resource-example-document-4.1.2.tgz", + "integrity": "sha512-mfqQcAmOsjkC3z5cVgA0lpZDRCR6G0f6XcTTEW+t3Jb28zSo8qbIrOReQed5cn1cxoZeMkZqaEKzA/KvGY/mnw==", + "dev": true, "requires": { - "@anypoint-web-components/anypoint-menu-mixin": "^1.1.1", - "lit-element": "^2.3.1", - "lit-html": "^1.2.1" + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-types": "^0.2.47", + "@advanced-rest-client/clipboard-copy": "^3.0.1", + "@advanced-rest-client/json-table": "^3.2.0", + "@advanced-rest-client/prism-highlight": "^4.0.2", + "@anypoint-web-components/anypoint-button": "^1.0.15", + "@api-components/amf-helper-mixin": "^4.3.3", + "@api-components/api-example-generator": "^4.4.6", + "@polymer/prism-element": "^3.0.0", + "lit-element": "^2.4.0" } }, - "@anypoint-web-components/anypoint-menu-button": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-menu-button/-/anypoint-menu-button-0.1.0.tgz", - "integrity": "sha512-CdDnVR2oSQ/719pwmAMMeBf+cS27rLgJore10CWpRCgGrsPYPwUlPuc93vUjhMjyd43O0BASSEDiykj3a1njSg==", + "@api-components/api-responses-document": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@api-components/api-responses-document/-/api-responses-document-4.1.3.tgz", + "integrity": "sha512-jy1JVOgxZWQV0j2ArZiN93bv+9xfQQ7x1NQq8PR/31i8cj088ozd7zzH894S7nNWV9SPyfr45bWm7AjPLMz24g==", "dev": true, "requires": { - "@anypoint-web-components/anypoint-control-mixins": "^1.0.2", - "@anypoint-web-components/anypoint-dropdown": "^1.0.0", - "lit-element": "^2.0.1", - "lit-html": "^1.0.0" + "@advanced-rest-client/arc-marked": "^1.0.6", + "@advanced-rest-client/markdown-styles": "^3.1.2", + "@anypoint-web-components/anypoint-tabs": "^0.1.10", + "@api-components/amf-helper-mixin": "^4.0.24", + "@api-components/api-annotation-document": "^4.0.3", + "@api-components/api-body-document": "^4.1.0", + "@api-components/api-headers-document": "^4.0.4", + "@api-components/raml-aware": "^3.0.0", + "lit-element": "^2.3.1" } }, - "@anypoint-web-components/anypoint-menu-mixin": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-menu-mixin/-/anypoint-menu-mixin-1.1.1.tgz", - "integrity": "sha512-CwSEMcHrrMFQzaL2QESzwC1+/59oYFfs3puFftKCpsOxs2hAF+cYiyoExEAkqi3+LalwbJ77jO7SFTuReW/H9w==", + "@api-components/api-schema-document": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@api-components/api-schema-document/-/api-schema-document-4.2.0.tgz", + "integrity": "sha512-wJQg8wkOlxXzN2Iak83vuOMurz/jI8eyDjagPkGWjceQF1FTtAiDaomlKQ7HJZTPp39wSr1Bbzjrdw6Y+9wbXQ==", + "dev": true, "requires": { - "@anypoint-web-components/anypoint-selector": "^1.1.1", - "@open-wc/dedupe-mixin": "^1.2.17", - "lit-element": "^2.3.1", - "lit-html": "^1.2.1" + "@advanced-rest-client/arc-types": "^0.2.47", + "@advanced-rest-client/prism-highlight": "^4.0.2", + "@anypoint-web-components/anypoint-tabs": "^0.1.12", + "@api-components/amf-helper-mixin": "^4.3.4", + "@api-components/api-example-generator": "^4.4.6", + "@polymer/prism-element": "^3.0.0", + "lit-element": "^2.4.0" } }, - "@anypoint-web-components/anypoint-radio-button": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-radio-button/-/anypoint-radio-button-0.1.4.tgz", - "integrity": "sha512-3mcppcK6Rk+C5px1vclg4XQzitHORvIh9tik7x6qOt0/GNwYdeJ3t3QH8kjZ4EbszPTTqoc1s1VBBLVqgwA+jQ==", + "@api-components/api-security-documentation": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@api-components/api-security-documentation/-/api-security-documentation-4.0.5.tgz", + "integrity": "sha512-Cy+4HtAJOJXTHW7Q5LoWFwx35IxxPhqKyQaMIJblCQHkrm8LCuf/N6W3LZTPII47D8pzqkRRh8iA538YuRyfPQ==", "dev": true, "requires": { - "@anypoint-web-components/anypoint-form-mixins": "^1.0.1", - "@anypoint-web-components/anypoint-menu-mixin": "^1.0.2", - "@anypoint-web-components/anypoint-styles": "^1.0.1", - "lit-element": "^2.0.1" + "@advanced-rest-client/arc-marked": "^1.0.6", + "@advanced-rest-client/markdown-styles": "^3.1.1", + "@api-components/amf-helper-mixin": "^4.0.14", + "@api-components/api-annotation-document": "^4.0.1", + "@api-components/api-headers-document": "^4.0.4", + "@api-components/api-parameters-document": "^4.0.5", + "@api-components/api-responses-document": "^4.0.1", + "@api-components/raml-aware": "^3.0.0", + "lit-element": "^2.2.1" } }, - "@anypoint-web-components/anypoint-selector": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-selector/-/anypoint-selector-1.1.2.tgz", - "integrity": "sha512-JEVffKjcGbHIMveIyS0ZxiEKYgRY6DYB1ewY3/XXhjurxWWLbD8P2n0KCyWk3uW6sZ/WamRTBghYgB1GEX8Edw==", + "@api-components/api-server-selector": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@api-components/api-server-selector/-/api-server-selector-0.6.3.tgz", + "integrity": "sha512-vqZRg64S3FFRbyDYqKOAaWac6JpL+M76oqbJwh8sJk7oiVP2FAZrpA1X1bVrWJ0MEmixxMwmIlzlwvNg8YVQ+w==", + "dev": true, "requires": { - "@open-wc/dedupe-mixin": "^1.2.17", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@anypoint-web-components/anypoint-button": "^1.0.15", + "@anypoint-web-components/anypoint-dropdown": "^1.1.2", + "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.16", + "@anypoint-web-components/anypoint-input": "^0.2.14", + "@anypoint-web-components/anypoint-item": "^1.0.5", + "@anypoint-web-components/anypoint-listbox": "^1.0.4", + "@api-components/amf-helper-mixin": "^4.3.4", "lit-element": "^2.3.1", "lit-html": "^1.2.1" } }, - "@anypoint-web-components/anypoint-signin": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-signin/-/anypoint-signin-4.0.3.tgz", - "integrity": "sha512-Oo/uX0JF0K+FjcPM9u7mdK1T2Er9ALZMUVhLUsV6nmy8kpncxhVlwElg+k0M9dPp+XT2KYcMW8pGF2jY+dJ07w==", + "@api-components/api-summary": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@api-components/api-summary/-/api-summary-4.3.0.tgz", + "integrity": "sha512-hcITD9tI+FgeouX/3Mel7e9/qPiUeNF/oDy7who7y31+XyxVGR3+70aj8KFvKeqmUrHeqEzApCjXGW0BqI3leg==", "dev": true, "requires": { - "@advanced-rest-client/oauth-authorization": "^3.0.1", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "lit-element": "^2.0.1" - }, - "dependencies": { - "@advanced-rest-client/oauth-authorization": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@advanced-rest-client/oauth-authorization/-/oauth-authorization-3.0.2.tgz", - "integrity": "sha512-kSZkyUovsCo020Xiva8qQmZ7FrP61Ztcq3ThT1DB0FDgBMNZHy2LV3KndP1cwE6CtHfWpr20BP9e158EyfpfTA==", - "dev": true, - "requires": { - "@advanced-rest-client/headers-parser-mixin": "^3.0.0", - "@polymer/iron-meta": "^3.0.0", - "lit-element": "^2.0.1" - } - } + "@advanced-rest-client/arc-marked": "^1.0.6", + "@advanced-rest-client/markdown-styles": "^3.1.2", + "@api-components/amf-helper-mixin": "^4.3.4", + "@api-components/api-method-documentation": "^5.1.9", + "@api-components/http-method-label": "^3.0.2", + "@api-components/raml-aware": "^3.0.0", + "@polymer/iron-meta": "^3.0.0", + "dompurify": "^2.0.8", + "lit-element": "^2.3.1", + "lit-html": "^1.3.0" } }, - "@anypoint-web-components/anypoint-styles": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-styles/-/anypoint-styles-1.0.1.tgz", - "integrity": "sha512-sTsbaVSWuFEaOjFL+9t++E95rV+aQqtnbqqIEhhLei7P/z0v/ySfRxATnyjq6YgfHN0D2axZ3uk7l6nEN6YKHQ==", + "@api-components/api-type-document": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@api-components/api-type-document/-/api-type-document-4.2.4.tgz", + "integrity": "sha512-A/e0DeLptrDBxqWSqy37gHy8+5qafYsa0AE4ZmY2cEMfoEb00YxhAvUcGF3PmHYVBijBYL4jmkA8MFFRStr8zA==", + "dev": true, "requires": { - "lit-element": "^2.2.1", - "lit-html": "^1.1.2" + "@advanced-rest-client/arc-marked": "^1.1.0", + "@advanced-rest-client/markdown-styles": "^3.1.3", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@api-components/amf-helper-mixin": "^4.3.3", + "@api-components/api-annotation-document": "^4.1.0", + "@api-components/api-resource-example-document": "^4.1.2", + "@open-wc/dedupe-mixin": "^1.3.0", + "lit-element": "^2.4.0" } }, - "@anypoint-web-components/anypoint-switch": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-switch/-/anypoint-switch-0.1.3.tgz", - "integrity": "sha512-PYht55i+6IqrzXRg6z5cEUsJBAgXzP2ETDQ548pr+SI5N0PGpdbsweDbKS0a76R16RJ5m0eBR/hNnF8Dn2bDkQ==", + "@api-components/api-type-documentation": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@api-components/api-type-documentation/-/api-type-documentation-4.1.0.tgz", + "integrity": "sha512-YqS+cCyx5s6q79TAIP/y649Te6B8hnEyTvXgfih7RBqusYtwSy934q3QEWxEhiB8JuPHfF10rW1xsNXs7pLk9g==", "dev": true, "requires": { - "@anypoint-web-components/anypoint-control-mixins": "^1.0.2", - "@anypoint-web-components/anypoint-form-mixins": "^1.0.1", - "lit-element": "^2.0.1" + "@advanced-rest-client/arc-marked": "^1.1.0", + "@advanced-rest-client/markdown-styles": "^3.1.3", + "@api-components/amf-helper-mixin": "^4.3.4", + "@api-components/api-annotation-document": "^4.1.0", + "@api-components/api-resource-example-document": "^4.1.2", + "@api-components/api-schema-document": "^4.2.0", + "@api-components/api-type-document": "^4.2.4", + "lit-element": "^2.4.0" } }, - "@anypoint-web-components/anypoint-tabs": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/anypoint-tabs/-/anypoint-tabs-0.1.10.tgz", - "integrity": "sha512-Up6iUdNv24x8JIRlPboUp+tLKRrOch7kMynFC73HyWnCL3HL+egOv4Rrow0HHdvM/7ywWQ27pR7pPsDAC7x49A==", + "@api-components/api-url": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@api-components/api-url/-/api-url-0.1.1.tgz", + "integrity": "sha512-c+uy6X08uWW7a2I0q+lI448/bOAHYJRF9ek0siNbZB3NIpDQ3BeOGVco/4XparFp2R4umwU9I8gjjn95lpdSGQ==", "dev": true, "requires": { - "@advanced-rest-client/arc-resizable-mixin": "^1.0.0", - "@anypoint-web-components/anypoint-button": "^1.0.13", - "@anypoint-web-components/anypoint-control-mixins": "^1.0.2", - "@anypoint-web-components/anypoint-menu-mixin": "^1.0.2", - "@polymer/iron-icon": "^3.0.1", - "@polymer/paper-ripple": "^3.0.1", - "lit-element": "^2.0.1", - "lit-html": "^1.1.2" + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-types": "^0.2.47", + "@advanced-rest-client/events-target-mixin": "^3.2.3", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-input": "^0.2.23", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "@anypoint-web-components/validatable-mixin": "^1.1.3", + "@api-components/amf-helper-mixin": "^4.3.4", + "@api-components/api-forms": "^0.1.2", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@anypoint-web-components/validatable-mixin": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/validatable-mixin/-/validatable-mixin-1.1.1.tgz", - "integrity": "sha512-YGUWS+bi1SW5pG9irzPQGHDMr9MNStenRCUQnOmkCsp+RIi7eVkx3vP3uAUH4cI3/4/LcVTNSztnagryP+ZwGw==", + "@api-components/api-view-model-transformer": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@api-components/api-view-model-transformer/-/api-view-model-transformer-4.2.2.tgz", + "integrity": "sha512-R+qrjx4daChcuILXMdj3v81iv37WdH2UzeyPhc31pmMY4G3NbOkHE5qmv+2DVB11uPTabjQhFHu2qEuQ+yVHBA==", "dev": true, "requires": { - "@anypoint-web-components/validator-mixin": "^1.1.1", - "@open-wc/dedupe-mixin": "^1.2.17" + "@advanced-rest-client/events-target-mixin": "^3.2.3", + "@api-components/amf-helper-mixin": "^4.2.0", + "@api-components/api-example-generator": "^4.4.5", + "lit-element": "^2.4.0" } }, - "@anypoint-web-components/validator-mixin": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@anypoint-web-components/validator-mixin/-/validator-mixin-1.1.1.tgz", - "integrity": "sha512-SHBFXn/uHP5ptQY/ZV/DzEb0dBYldQF1Rti1q+3lfbUcYiA59QdfsPvOmre6a64NeaHagV/aMd4zj3FNH5hAXg==", - "dev": true, + "@api-components/http-method-label": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@api-components/http-method-label/-/http-method-label-3.1.3.tgz", + "integrity": "sha512-Pz1vpq26kntclfxj0Ym5e/6h4DN2CZWFR4DHJidK5hUj3SJskPK9J4jzh6Wx1F1poHmrDSmbvfJPEYERNg6ipA==", "requires": { - "@open-wc/dedupe-mixin": "^1.2.17" + "lit-element": "^2.4.0", + "lit-html": "^1.3.0" } }, - "@api-components/amf-helper-mixin": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@api-components/amf-helper-mixin/-/amf-helper-mixin-4.1.4.tgz", - "integrity": "sha512-V3YS9VpDWm6bE8qzbyLLOLhaCEX3nHpEvkEPHEc7/dKTmXW3PoiF9Cq9LVXikbNBCF3cklPcDLkTuagyUepzkA==", - "dev": true + "@api-components/raml-aware": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@api-components/raml-aware/-/raml-aware-3.0.0.tgz", + "integrity": "sha512-lWIjd8Wq6tYJmF8ZXyUgQdGq+vhXP7pKY/QcPQdKOn2IXb4/gqTglebtXnxjME41+uKSPQoMSKTEVT/PwX93qQ==", + "dev": true }, - "@api-components/api-annotation-document": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@api-components/api-annotation-document/-/api-annotation-document-4.0.3.tgz", - "integrity": "sha512-bms5cCY4wjAl5n4cS1X2muYd9npxawbnxgPzazrgadGbHR0YYFlk4tT+7jdfgRXJVbc6HGaEjk0E4CBWH9A6KA==", + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@api-components/amf-helper-mixin": "^4.0.17", - "lit-element": "^2.2.1", - "lit-html": "^1.1.2" + "@babel/highlight": "^7.10.4" } }, - "@api-components/api-body-document": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@api-components/api-body-document/-/api-body-document-4.0.7.tgz", - "integrity": "sha512-78feKHO3GI5sZbtG9RW7rTKOi+ZFhvUuABywk15xmqLuEtoESv4znt0WdQ9ZSZ00BuH6Mfe/zeryCQXG12Dp3w==", + "@babel/compat-data": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.7.tgz", + "integrity": "sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw==", + "dev": true + }, + "@babel/core": { + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.10.tgz", + "integrity": "sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.10", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.10", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.10", + "@babel/types": "^7.12.10", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "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" + } + }, + "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 + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz", + "integrity": "sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.4", - "@advanced-rest-client/arc-marked": "^1.0.6", - "@advanced-rest-client/markdown-styles": "^3.1.1", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@api-components/amf-helper-mixin": "^4.0.20", - "@api-components/api-resource-example-document": "^4.0.6", - "@api-components/api-schema-document": "^4.0.3", - "@api-components/api-type-document": "^4.0.6", - "@api-components/raml-aware": "^3.0.0", - "@polymer/iron-collapse": "^3.0.0", - "lit-element": "^2.2.1" + "@babel/types": "^7.12.11", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, - "@api-components/api-body-editor": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@api-components/api-body-editor/-/api-body-editor-4.0.4.tgz", - "integrity": "sha512-3s44LLZ9IDApoAZlJ9KA4fQLW5+qLSl9ZHSw0XjgeqFLDl9xoB5ek6M5Le2/wdBkV5eAModggUy2K5t36bdo3Q==", + "@babel/helper-annotate-as-pure": { + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.10.tgz", + "integrity": "sha512-XplmVbC1n+KY6jL8/fgLVXXUauDIB+lD5+GsQEh6F6GBF1dq1qy4DP4yXWzDKcoqXB3X58t61e85Fitoww4JVQ==", "dev": true, "requires": { - "@advanced-rest-client/clipboard-copy": "^3.0.1", - "@advanced-rest-client/content-type-selector": "^3.1.3", - "@advanced-rest-client/events-target-mixin": "^3.1.1", - "@advanced-rest-client/files-payload-editor": "^3.0.4", - "@advanced-rest-client/form-data-editor": "^3.0.7", - "@advanced-rest-client/multipart-payload-editor": "^4.0.1", - "@advanced-rest-client/raw-payload-editor": "^3.0.6", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@api-components/amf-helper-mixin": "^4.1.1", - "@api-components/api-example-generator": "^4.2.0", - "@api-components/api-form-mixin": "^3.0.4", - "@api-components/api-view-model-transformer": "^4.0.3", - "@api-components/raml-aware": "^3.0.0", - "lit-element": "^2.3.1", - "lit-html": "^1.2.1" + "@babel/types": "^7.12.10" } }, - "@api-components/api-candidates-dialog": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@api-components/api-candidates-dialog/-/api-candidates-dialog-3.0.0.tgz", - "integrity": "sha512-cYiRNnD34yAm/CiKDFAi6OYP/G4ZgxSD0IM3+ws9eHpey/bDPJNEjFO48qjPm8/Nu74Yy0UQq7gdnjNrLC/s6w==", + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz", + "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==", "dev": true, "requires": { - "@polymer/neon-animation": "^3.0.0", - "@polymer/paper-button": "^3.0.0", - "@polymer/paper-dialog-behavior": "^3.0.0", - "@polymer/paper-item": "^3.0.0", - "@polymer/paper-listbox": "^3.0.0", - "@polymer/polymer": "^3.2.0" + "@babel/helper-explode-assignable-expression": "^7.10.4", + "@babel/types": "^7.10.4" } }, - "@api-components/api-documentation": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@api-components/api-documentation/-/api-documentation-4.1.2.tgz", - "integrity": "sha512-+I3qtyR6D2+8jB9WqACPTbxZicLT5tenHCnqQxUjvbKnhTTXhtxMzk/Byav+7a7q34T6o5aRN665mZzzsMmHdQ==", + "@babel/helper-compilation-targets": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz", + "integrity": "sha512-+qH6NrscMolUlzOYngSBMIOQpKUGPPsc61Bu5W10mg84LxZ7cmvnBHzARKbDoFxVvqqAbj6Tg6N7bSrWSPXMyw==", "dev": true, "requires": { - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@api-components/amf-helper-mixin": "^4.0.17", - "@api-components/api-documentation-document": "^4.0.2", - "@api-components/api-endpoint-documentation": "^4.0.4", - "@api-components/api-method-documentation": "^4.0.7", - "@api-components/api-security-documentation": "^4.0.5", - "@api-components/api-server-selector": "^0.3.2", - "@api-components/api-summary": "^4.0.2", - "@api-components/api-type-documentation": "^4.0.3", - "@api-components/raml-aware": "^3.0.0", - "lit-element": "^2.0.1", - "lit-html": "^1.1.2" + "@babel/compat-data": "^7.12.5", + "@babel/helper-validator-option": "^7.12.1", + "browserslist": "^4.14.5", + "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, - "@api-components/api-documentation-document": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@api-components/api-documentation-document/-/api-documentation-document-4.0.2.tgz", - "integrity": "sha512-zHwLytXjYAgeEfjGPtjz+aVATuL5MQrsIY4ro1giMx5DprkQyVodZ86fZG1bO80kyWINpQXNfKfselnVDAWubQ==", + "@babel/helper-create-class-features-plugin": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz", + "integrity": "sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w==", "dev": true, "requires": { - "@advanced-rest-client/arc-marked": "^1.0.4", - "@advanced-rest-client/markdown-styles": "^3.1.0", - "@api-components/amf-helper-mixin": "^4.0.13", - "lit-element": "^2.2.1" + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-member-expression-to-functions": "^7.12.1", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.10.4" } }, - "@api-components/api-endpoint-documentation": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@api-components/api-endpoint-documentation/-/api-endpoint-documentation-4.0.4.tgz", - "integrity": "sha512-wtI2Y8GjPRZoSa00/STxkHh+p/F4F/246O/wCncrLuJZKgfpcbOi/WrG6Zfnvigk1A3WDqirpM3sRQG+Vw/d7g==", + "@babel/helper-create-regexp-features-plugin": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.7.tgz", + "integrity": "sha512-idnutvQPdpbduutvi3JVfEgcVIHooQnhvhx0Nk9isOINOIGYkZea1Pk2JlJRiUnMefrlvr0vkByATBY/mB4vjQ==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/arc-marked": "^1.0.6", - "@advanced-rest-client/clipboard-copy": "^3.0.1", - "@advanced-rest-client/http-code-snippets": "^3.1.1", - "@advanced-rest-client/markdown-styles": "^3.1.1", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@api-components/amf-helper-mixin": "^4.0.17", - "@api-components/api-annotation-document": "^4.0.2", - "@api-components/api-example-generator": "^4.0.4", - "@api-components/api-method-documentation": "^4.0.7", - "@api-components/api-parameters-document": "^4.0.5", - "@api-components/api-request-panel": "^4.0.1", - "@api-components/http-method-label": "^3.0.2", - "@api-components/raml-aware": "^3.0.0", - "@polymer/iron-collapse": "^3.0.0", - "lit-element": "^2.0.1", - "lit-html": "^1.1.2" + "@babel/helper-annotate-as-pure": "^7.10.4", + "regexpu-core": "^4.7.1" + } + }, + "@babel/helper-define-map": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz", + "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/types": "^7.10.5", + "lodash": "^4.17.19" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz", + "integrity": "sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + } + }, + "@babel/helper-function-name": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz", + "integrity": "sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.12.10", + "@babel/template": "^7.12.7", + "@babel/types": "^7.12.11" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz", + "integrity": "sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag==", + "dev": true, + "requires": { + "@babel/types": "^7.12.10" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz", + "integrity": "sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz", + "integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==", + "dev": true, + "requires": { + "@babel/types": "^7.12.7" + } + }, + "@babel/helper-module-imports": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz", + "integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5" + } + }, + "@babel/helper-module-transforms": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz", + "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-simple-access": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/helper-validator-identifier": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", + "lodash": "^4.17.19" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz", + "integrity": "sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ==", + "dev": true, + "requires": { + "@babel/types": "^7.12.10" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz", + "integrity": "sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-wrap-function": "^7.10.4", + "@babel/types": "^7.12.1" + } + }, + "@babel/helper-replace-supers": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz", + "integrity": "sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.12.7", + "@babel/helper-optimise-call-expression": "^7.12.10", + "@babel/traverse": "^7.12.10", + "@babel/types": "^7.12.11" + } + }, + "@babel/helper-simple-access": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz", + "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", + "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz", + "integrity": "sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g==", + "dev": true, + "requires": { + "@babel/types": "^7.12.11" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz", + "integrity": "sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz", + "integrity": "sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helpers": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz", + "integrity": "sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==", + "dev": true, + "requires": { + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" + } + }, + "@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" + }, + "dependencies": { + "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" + } + }, + "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" + } + } + } + }, + "@babel/parser": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz", + "integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==", + "dev": true + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.12.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.12.tgz", + "integrity": "sha512-nrz9y0a4xmUrRq51bYkWJIO5SBZyG2ys2qinHsN0zHDHVsUaModrkpyWWWXfGqYQmOL3x9sQIcTNN/pBGpo09A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-remap-async-to-generator": "^7.12.1", + "@babel/plugin-syntax-async-generators": "^7.8.0" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz", + "integrity": "sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz", + "integrity": "sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-dynamic-import": "^7.8.0" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz", + "integrity": "sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz", + "integrity": "sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.0" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz", + "integrity": "sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz", + "integrity": "sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.7.tgz", + "integrity": "sha512-8c+uy0qmnRTeukiGsjLGy6uVs/TFjJchGXUeBqlG4VWYOdJWkhhVPdQ3uHwbmalfJwv2JsV0qffXP4asRfL2SQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz", + "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.12.1" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz", + "integrity": "sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz", + "integrity": "sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz", + "integrity": "sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz", + "integrity": "sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz", + "integrity": "sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz", + "integrity": "sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz", + "integrity": "sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz", + "integrity": "sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-remap-async-to-generator": "^7.12.1" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz", + "integrity": "sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.12.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.12.tgz", + "integrity": "sha512-VOEPQ/ExOVqbukuP7BYJtI5ZxxsmegTwzZ04j1aF0dkSypGo9XpDHuOrABsJu+ie+penpSJheDJ11x1BEZNiyQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz", + "integrity": "sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-define-map": "^7.10.4", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.10.4", + "globals": "^11.1.0" + }, + "dependencies": { + "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 + } + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz", + "integrity": "sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz", + "integrity": "sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz", + "integrity": "sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz", + "integrity": "sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz", + "integrity": "sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz", + "integrity": "sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz", + "integrity": "sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz", + "integrity": "sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz", + "integrity": "sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz", + "integrity": "sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz", + "integrity": "sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-simple-access": "^7.12.1", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz", + "integrity": "sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.10.4", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-validator-identifier": "^7.10.4", + "babel-plugin-dynamic-import-node": "^2.3.3" } }, - "@api-components/api-example-generator": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@api-components/api-example-generator/-/api-example-generator-4.3.0.tgz", - "integrity": "sha512-Aqqjhi5Lp4cvgMhukxGkte0QVnmDIkdjGtsRcKQ9jb/cgxtuzyQ/8ks73DOVVmo+eiv6aWhC+Qf4FzFWeEquJA==", + "@babel/plugin-transform-modules-umd": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz", + "integrity": "sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q==", "dev": true, "requires": { - "@api-components/amf-helper-mixin": "^4.1.1", - "lit-element": "^2.3.1" + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@api-components/api-form-mixin": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@api-components/api-form-mixin/-/api-form-mixin-3.1.3.tgz", - "integrity": "sha512-U+8F/vau3KhG6LEJFW10JdaO482YKvkJamtD2KHYgtdHNmmzQUy2C3vZuesdorUpl5ZbaBM0Em03atTFzNYGlg==", + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz", + "integrity": "sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q==", "dev": true, "requires": { - "@api-components/api-view-model-transformer": "^4.1.1", - "lit-element": "^2.3.1" + "@babel/helper-create-regexp-features-plugin": "^7.12.1" } }, - "@api-components/api-headers-document": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@api-components/api-headers-document/-/api-headers-document-4.0.4.tgz", - "integrity": "sha512-g837w6KAHfQ0xs1RZ07F+vqaQOAZUyyrlUwEpnnNksEBS7tcr+kojdnjUe7NqTYzp18A8Dhggjl1/ZQCIjNOSw==", + "@babel/plugin-transform-new-target": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz", + "integrity": "sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.4", - "@anypoint-web-components/anypoint-button": "^1.0.14", - "@api-components/api-type-document": "^4.0.4", - "@api-components/raml-aware": "^3.0.0", - "@polymer/iron-collapse": "^3.0.0", - "lit-element": "^2.2.1" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@api-components/api-headers-editor": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@api-components/api-headers-editor/-/api-headers-editor-4.1.1.tgz", - "integrity": "sha512-s2wsa2/81WFqNsNfaFXUS2rTElLYeyrXfJGSqcW0A33Cd3L+HCX019WBlv0/14hW2qgBauap1I2qVSUGDWvILQ==", + "@babel/plugin-transform-object-super": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz", + "integrity": "sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw==", "dev": true, "requires": { - "@advanced-rest-client/clipboard-copy": "^3.0.1", - "@advanced-rest-client/code-mirror": "^3.0.1", - "@advanced-rest-client/code-mirror-hint": "^3.0.2", - "@advanced-rest-client/events-target-mixin": "^3.2.0", - "@advanced-rest-client/headers-parser-mixin": "^3.2.0", - "@anypoint-web-components/anypoint-button": "^1.1.1", - "@anypoint-web-components/validatable-mixin": "^1.1.1", - "@api-components/amf-helper-mixin": "^4.1.2", - "@api-components/api-form-mixin": "^3.1.3", - "@api-components/api-headers-form": "^4.1.1", - "@api-components/api-view-model-transformer": "^4.1.1", - "@api-components/raml-aware": "^3.0.0", - "lit-element": "^2.3.1", - "lit-html": "^1.2.1" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.12.1" } }, - "@api-components/api-headers-form": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@api-components/api-headers-form/-/api-headers-form-4.1.2.tgz", - "integrity": "sha512-5Mps2yADZXL/XdpiW17ATMQ1N5HJqr7TCSi1XM/mbdqa41fzP1sLmx2zirRtc49aAx/+YhZX/RqsIETvwbKYvA==", + "@babel/plugin-transform-parameters": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz", + "integrity": "sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg==", "dev": true, "requires": { - "@advanced-rest-client/arc-definitions": "^3.1.0", - "@advanced-rest-client/arc-icons": "^3.1.0", - "@advanced-rest-client/arc-marked": "^1.0.6", - "@advanced-rest-client/markdown-styles": "^3.1.2", - "@anypoint-web-components/anypoint-autocomplete": "^0.1.5", - "@anypoint-web-components/anypoint-button": "^1.1.1", - "@anypoint-web-components/anypoint-checkbox": "^1.0.2", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", - "@anypoint-web-components/anypoint-input": "^0.2.15", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@anypoint-web-components/validatable-mixin": "^1.1.1", - "@api-components/api-form-mixin": "^3.1.3", - "@api-components/api-property-form-item": "^3.0.12", - "@polymer/iron-form": "^3.0.0", - "lit-element": "^2.3.1" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@api-components/api-method-documentation": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@api-components/api-method-documentation/-/api-method-documentation-4.1.1.tgz", - "integrity": "sha512-qJvzXs37SnPuDjg+0iPrR6T3PD889pEbdm78UxLyXmAZptzULrWa3MicoSLSE3D/7SieLFkzNGrF2QuX4mLrVA==", + "@babel/plugin-transform-property-literals": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz", + "integrity": "sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/arc-marked": "^1.0.6", - "@advanced-rest-client/clipboard-copy": "^3.0.1", - "@advanced-rest-client/http-code-snippets": "^3.1.2", - "@advanced-rest-client/markdown-styles": "^3.1.2", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@api-components/amf-helper-mixin": "^4.1.1", - "@api-components/api-annotation-document": "^4.0.3", - "@api-components/api-body-document": "^4.0.7", - "@api-components/api-example-generator": "^4.2.0", - "@api-components/api-headers-document": "^4.0.4", - "@api-components/api-parameters-document": "^4.0.5", - "@api-components/api-responses-document": "^4.1.0", - "@api-components/api-security-documentation": "^4.0.5", - "@api-components/http-method-label": "^3.0.2", - "@api-components/raml-aware": "^3.0.0", - "@polymer/iron-collapse": "^3.0.0", - "lit-element": "^2.3.1", - "lit-html": "^1.2.1" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@api-components/api-navigation": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@api-components/api-navigation/-/api-navigation-4.1.1.tgz", - "integrity": "sha512-ItexKeAzWTdpKbxqHK0+2kaZnxq+WuA4nLcfYBzW5Dag6Ge0EPgTorPz+uGKxysTYtLnHNFHLu0BiWuymjWF0g==", + "@babel/plugin-transform-regenerator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz", + "integrity": "sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.1.0", - "@anypoint-web-components/anypoint-button": "^1.1.1", - "@api-components/amf-helper-mixin": "^4.1.2", - "@api-components/http-method-label": "^3.1.1", - "@api-components/raml-aware": "^3.0.0", - "@polymer/iron-collapse": "^3.0.0", - "lit-element": "^2.3.1", - "lit-html": "^1.2.1" + "regenerator-transform": "^0.14.2" } }, - "@api-components/api-parameters-document": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@api-components/api-parameters-document/-/api-parameters-document-4.0.5.tgz", - "integrity": "sha512-+lqVNH+HgPD3U9MnOq/s7cWHpXWn1qwwYq0pIuVgHgJNVyQjpgKvy4VhlpY6rsNzB5DiTATHHxcM7t/37WgxnA==", + "@babel/plugin-transform-reserved-words": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz", + "integrity": "sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.4", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@api-components/api-type-document": "^4.0.6", - "@api-components/raml-aware": "^3.0.0", - "@polymer/iron-collapse": "^3.0.0", - "lit-element": "^2.2.1" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@api-components/api-property-form-item": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@api-components/api-property-form-item/-/api-property-form-item-3.0.12.tgz", - "integrity": "sha512-G5XKtZNE8EQ3CEoJIc+jebRIFVqMTX+vplcqPlMqD/CWzY1YmQgEtFM79aOCIhZy+3VT3MfLcBZiY/o2Pswy5g==", + "@babel/plugin-transform-shorthand-properties": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz", + "integrity": "sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.4", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-checkbox": "^1.0.2", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", - "@anypoint-web-components/anypoint-input": "^0.2.12", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@anypoint-web-components/validatable-mixin": "^1.0.2", - "lit-element": "^2.0.1", - "lit-html": "^1.1.2" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@api-components/api-request-editor": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@api-components/api-request-editor/-/api-request-editor-4.0.5.tgz", - "integrity": "sha512-lczaeO78osy6UA1e8iASwef/XtT6bzJ//3FaNAxKEKEWfn1aCAUnChpT5NiRzfIuMg24JuGoScUtZ4DveBBXPg==", + "@babel/plugin-transform-spread": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz", + "integrity": "sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/authorization-panel": "^4.0.3", - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@advanced-rest-client/http-method-selector": "^3.0.5", - "@advanced-rest-client/uuid-generator": "^3.0.2", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@api-components/amf-helper-mixin": "^4.0.19", - "@api-components/api-body-editor": "^4.0.2", - "@api-components/api-form-mixin": "^3.0.4", - "@api-components/api-headers-editor": "^4.0.2", - "@api-components/api-url-data-model": "^4.0.5", - "@api-components/api-url-editor": "^4.0.1", - "@api-components/api-url-params-editor": "^4.0.2", - "@api-components/raml-aware": "^3.0.0", - "@polymer/paper-spinner": "^3.0.2", - "@polymer/paper-toast": "^3.0.0", - "cryptojslib": "^3.1.2", - "jsrsasign": "^8.0.12", - "lit-element": "^2.0.1", - "lit-html": "^1.1.2" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" } }, - "@api-components/api-request-panel": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@api-components/api-request-panel/-/api-request-panel-4.1.3.tgz", - "integrity": "sha512-rOMBxqbnwXPeHHNlgV1RqrewSRtEcA7WD7DbOlsM13omHDZmwX6yivd1mtj4miYdiwgRBdEQBIMtsHEj4ERWyQ==", + "@babel/plugin-transform-sticky-regex": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.7.tgz", + "integrity": "sha512-VEiqZL5N/QvDbdjfYQBhruN0HYjSPjC4XkeqW4ny/jNtH9gcbgaqBIXYEZCNnESMAGs0/K/R7oFGMhOyu/eIxg==", "dev": true, "requires": { - "@advanced-rest-client/arc-scroll-target-mixin": "^1.0.2", - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@advanced-rest-client/headers-parser-mixin": "^3.0.1", - "@advanced-rest-client/response-view": "^3.0.4", - "@api-components/amf-helper-mixin": "^4.0.24", - "@api-components/api-request-editor": "^4.0.5", - "@api-components/api-server-selector": "^0.3.2", - "@api-components/raml-aware": "^3.0.0", - "lit-element": "^2.3.1", - "lit-html": "^1.2.1" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@api-components/api-resource-example-document": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@api-components/api-resource-example-document/-/api-resource-example-document-4.0.8.tgz", - "integrity": "sha512-bAp8vyNSpiPm/iEOCAAN85yyN/irZU9a6TQBs+3MWmJ5HYHMnittKt/w5kxhhrYhfXxPpcm5c20CAZK8ACmvIA==", + "@babel/plugin-transform-template-literals": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz", + "integrity": "sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/clipboard-copy": "^3.0.1", - "@advanced-rest-client/json-table": "^3.1.5", - "@advanced-rest-client/prism-highlight": "^4.0.2", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@api-components/amf-helper-mixin": "^4.1.1", - "@api-components/api-example-generator": "^4.2.0", - "@polymer/prism-element": "^3.0.0", - "lit-element": "^2.3.1" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@api-components/api-responses-document": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@api-components/api-responses-document/-/api-responses-document-4.1.0.tgz", - "integrity": "sha512-9eHhHSna5ej5/e/ChHknbZd2wmDzHzCfFdsb+qYBW78kAZtKqastdjWUb5DObqdvrxvv0E6a20KichdN2MymUQ==", + "@babel/plugin-transform-typeof-symbol": { + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.10.tgz", + "integrity": "sha512-JQ6H8Rnsogh//ijxspCjc21YPd3VLVoYtAwv3zQmqAt8YGYUtdo5usNhdl4b9/Vir2kPFZl6n1h0PfUz4hJhaA==", "dev": true, "requires": { - "@advanced-rest-client/arc-marked": "^1.0.6", - "@advanced-rest-client/markdown-styles": "^3.1.2", - "@anypoint-web-components/anypoint-tabs": "^0.1.10", - "@api-components/amf-helper-mixin": "^4.0.24", - "@api-components/api-annotation-document": "^4.0.3", - "@api-components/api-body-document": "^4.0.7", - "@api-components/api-headers-document": "^4.0.4", - "@api-components/raml-aware": "^3.0.0", - "lit-element": "^2.3.1" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@api-components/api-schema-document": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@api-components/api-schema-document/-/api-schema-document-4.1.0.tgz", - "integrity": "sha512-Aca8ojU9kvkNVmsop9/Cj3Vwf5JK4q51jQy3CsYN9oFlUa1bAjasjwcvzDQvs6ceTX9bt9DbL+FdYdJ5kmDNQQ==", + "@babel/plugin-transform-unicode-escapes": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz", + "integrity": "sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q==", "dev": true, "requires": { - "@advanced-rest-client/prism-highlight": "^4.0.2", - "@anypoint-web-components/anypoint-tabs": "^0.1.10", - "@api-components/amf-helper-mixin": "^4.1.1", - "@api-components/api-example-generator": "^4.2.0", - "@api-components/raml-aware": "^3.0.0", - "@polymer/prism-element": "^3.0.0", - "lit-element": "^2.3.1" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@api-components/api-security-documentation": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@api-components/api-security-documentation/-/api-security-documentation-4.0.5.tgz", - "integrity": "sha512-Cy+4HtAJOJXTHW7Q5LoWFwx35IxxPhqKyQaMIJblCQHkrm8LCuf/N6W3LZTPII47D8pzqkRRh8iA538YuRyfPQ==", + "@babel/plugin-transform-unicode-regex": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz", + "integrity": "sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg==", "dev": true, "requires": { - "@advanced-rest-client/arc-marked": "^1.0.6", - "@advanced-rest-client/markdown-styles": "^3.1.1", - "@api-components/amf-helper-mixin": "^4.0.14", - "@api-components/api-annotation-document": "^4.0.1", - "@api-components/api-headers-document": "^4.0.4", - "@api-components/api-parameters-document": "^4.0.5", - "@api-components/api-responses-document": "^4.0.1", - "@api-components/raml-aware": "^3.0.0", - "lit-element": "^2.2.1" + "@babel/helper-create-regexp-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@api-components/api-server-selector": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@api-components/api-server-selector/-/api-server-selector-0.3.2.tgz", - "integrity": "sha512-wFfzL2IgxUeOJcN2pDpbK9qa5ZG++j9MUQZaiUC+NpxpBhHI6qt/CUROlVumf+yE3VTjY59Nokx9UHpx6XQO4Q==", + "@babel/preset-env": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.11.tgz", + "integrity": "sha512-j8Tb+KKIXKYlDBQyIOy4BLxzv1NUOwlHfZ74rvW+Z0Gp4/cI2IMDPBWAgWceGcE7aep9oL/0K9mlzlMGxA8yNw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.12.7", + "@babel/helper-compilation-targets": "^7.12.5", + "@babel/helper-module-imports": "^7.12.5", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-validator-option": "^7.12.11", + "@babel/plugin-proposal-async-generator-functions": "^7.12.1", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-dynamic-import": "^7.12.1", + "@babel/plugin-proposal-export-namespace-from": "^7.12.1", + "@babel/plugin-proposal-json-strings": "^7.12.1", + "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", + "@babel/plugin-proposal-numeric-separator": "^7.12.7", + "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.12.7", + "@babel/plugin-proposal-private-methods": "^7.12.1", + "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-class-properties": "^7.12.1", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.12.1", + "@babel/plugin-transform-arrow-functions": "^7.12.1", + "@babel/plugin-transform-async-to-generator": "^7.12.1", + "@babel/plugin-transform-block-scoped-functions": "^7.12.1", + "@babel/plugin-transform-block-scoping": "^7.12.11", + "@babel/plugin-transform-classes": "^7.12.1", + "@babel/plugin-transform-computed-properties": "^7.12.1", + "@babel/plugin-transform-destructuring": "^7.12.1", + "@babel/plugin-transform-dotall-regex": "^7.12.1", + "@babel/plugin-transform-duplicate-keys": "^7.12.1", + "@babel/plugin-transform-exponentiation-operator": "^7.12.1", + "@babel/plugin-transform-for-of": "^7.12.1", + "@babel/plugin-transform-function-name": "^7.12.1", + "@babel/plugin-transform-literals": "^7.12.1", + "@babel/plugin-transform-member-expression-literals": "^7.12.1", + "@babel/plugin-transform-modules-amd": "^7.12.1", + "@babel/plugin-transform-modules-commonjs": "^7.12.1", + "@babel/plugin-transform-modules-systemjs": "^7.12.1", + "@babel/plugin-transform-modules-umd": "^7.12.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", + "@babel/plugin-transform-new-target": "^7.12.1", + "@babel/plugin-transform-object-super": "^7.12.1", + "@babel/plugin-transform-parameters": "^7.12.1", + "@babel/plugin-transform-property-literals": "^7.12.1", + "@babel/plugin-transform-regenerator": "^7.12.1", + "@babel/plugin-transform-reserved-words": "^7.12.1", + "@babel/plugin-transform-shorthand-properties": "^7.12.1", + "@babel/plugin-transform-spread": "^7.12.1", + "@babel/plugin-transform-sticky-regex": "^7.12.7", + "@babel/plugin-transform-template-literals": "^7.12.1", + "@babel/plugin-transform-typeof-symbol": "^7.12.10", + "@babel/plugin-transform-unicode-escapes": "^7.12.1", + "@babel/plugin-transform-unicode-regex": "^7.12.1", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.12.11", + "core-js-compat": "^3.8.0", + "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@babel/preset-modules": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", "dev": true, "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@anypoint-web-components/anypoint-dropdown": "^1.0.1", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", - "@anypoint-web-components/anypoint-input": "^0.2.14", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@api-components/amf-helper-mixin": "^4.0.24", - "lit-element": "^2.3.1", - "lit-html": "^1.2.1" + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" } }, - "@api-components/api-summary": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@api-components/api-summary/-/api-summary-4.1.0.tgz", - "integrity": "sha512-jgU0W9tUkVAeNgdc0rgxNlV+WMefNpDGIYvQuk/gzQ3Oc5LK3N1c8FcwLY+tahkIcAbzTbpd3AV5+tAYqUtXsw==", + "@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==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/runtime-corejs3": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.12.5.tgz", + "integrity": "sha512-roGr54CsTmNPPzZoCP1AmDXuBoNao7tnSA83TXTwt+UK5QVyh1DIJnrgYRPWKCF2flqZQXwa7Yr8v7VmLzF0YQ==", "dev": true, "requires": { - "@advanced-rest-client/arc-marked": "^1.0.6", - "@advanced-rest-client/markdown-styles": "^3.1.2", - "@api-components/amf-helper-mixin": "^4.0.24", - "@api-components/http-method-label": "^3.0.2", - "@api-components/raml-aware": "^3.0.0", - "@polymer/iron-meta": "^3.0.0", - "dompurify": "^2.0.8", - "lit-element": "^2.3.1" + "core-js-pure": "^3.0.0", + "regenerator-runtime": "^0.13.4" } }, - "@api-components/api-type-document": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@api-components/api-type-document/-/api-type-document-4.0.6.tgz", - "integrity": "sha512-t/7bDNsjXhyrqSKhtSqcqQgJxmge+O0OoTPvY+KYFqCoaAtWlTO46zxRxoCee3jXSvDz0wRASQA/Trq1UgfJUA==", + "@babel/template": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", + "integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==", "dev": true, "requires": { - "@advanced-rest-client/arc-marked": "^1.0.6", - "@advanced-rest-client/markdown-styles": "^3.1.1", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@api-components/amf-helper-mixin": "^4.0.14", - "@api-components/api-annotation-document": "^4.0.1", - "@api-components/api-resource-example-document": "^4.0.6", - "@api-components/raml-aware": "^3.0.0", - "lit-element": "^2.2.1" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7" } }, - "@api-components/api-type-documentation": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@api-components/api-type-documentation/-/api-type-documentation-4.0.3.tgz", - "integrity": "sha512-6EXi6vsdaEuLvbadGBHuk4gcwEqdwsgJh6RpRVD9YSW21Xo3Lfjbr3Dmg4Y65PuhMwCaMgqCjh62A9fIvNUBvg==", + "@babel/traverse": { + "version": "7.12.12", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.12.tgz", + "integrity": "sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w==", "dev": true, "requires": { - "@advanced-rest-client/arc-marked": "^1.0.6", - "@advanced-rest-client/markdown-styles": "^3.1.1", - "@api-components/amf-helper-mixin": "^4.0.13", - "@api-components/api-annotation-document": "^4.0.1", - "@api-components/api-resource-example-document": "^4.0.6", - "@api-components/api-schema-document": "^4.0.2", - "@api-components/api-type-document": "^4.0.6", - "@api-components/raml-aware": "^3.0.0", - "lit-element": "^2.2.1" + "@babel/code-frame": "^7.12.11", + "@babel/generator": "^7.12.11", + "@babel/helper-function-name": "^7.12.11", + "@babel/helper-split-export-declaration": "^7.12.11", + "@babel/parser": "^7.12.11", + "@babel/types": "^7.12.12", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "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 + }, + "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 + } + } + }, + "@babel/types": { + "version": "7.12.12", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz", + "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "@comunica/actor-abstract-bindings-hash": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-abstract-bindings-hash/-/actor-abstract-bindings-hash-1.19.0.tgz", + "integrity": "sha512-FvHFdSkbGVx+/KmCc/8SbmtvX9o1KaaZiHmJxGNzv2a8jN2RXSfKq6qlLaQbp76/nvsFrGYR4m5fQsajIOANeA==", + "requires": { + "canonicalize": "^1.0.1", + "hash.js": "^1.1.7", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@api-components/api-url-data-model": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@api-components/api-url-data-model/-/api-url-data-model-4.1.1.tgz", - "integrity": "sha512-R+7VRisGIQCMWSDN65FJF1LrWt3nRVkJmIs6ayYkXnPwqDF0bCOav1EutSuX2wJRG1pUjDMNrAGD5HGmT3hJLQ==", - "dev": true, + "@comunica/actor-abstract-mediatyped": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-abstract-mediatyped/-/actor-abstract-mediatyped-1.19.0.tgz", + "integrity": "sha512-f8KPM8xsjB70REsS2ALrLNlMRHwPmb21OJy6u5YPARKCr95Usff38L/Fntm3ey6oQTwfwK/XEYuQVtwx5EqJYw==" + }, + "@comunica/actor-abstract-path": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-abstract-path/-/actor-abstract-path-1.19.0.tgz", + "integrity": "sha512-zH5lErHpn9+eq8x2u7ohxCBxpdARQeWaxJgj2d52hBrdY+QArfwJQgIS3f+wiO42/LObhK8ZDNAJsagU/vDmkg==", "requires": { - "@api-components/amf-helper-mixin": "^4.0.26", - "@api-components/api-view-model-transformer": "^4.0.3", - "@api-components/raml-aware": "^3.0.0", - "lit-element": "^2.3.1" + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "rdf-data-factory": "^1.0.3", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@api-components/api-url-editor": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@api-components/api-url-editor/-/api-url-editor-4.0.3.tgz", - "integrity": "sha512-9x8GejN+MTRx84DmZ788Dv/LyQ4Azkm0oezNcYQrBTjJj2UG13lnZAu8fsZL+tmbcw3LGvuKxX/Bta+MnynIwQ==", - "dev": true, + "@comunica/actor-http-memento": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-http-memento/-/actor-http-memento-1.19.0.tgz", + "integrity": "sha512-52VItaw2lDbOMiMVI+o94k604M1Ii6KNL/FfBv6/IhjbVugrfP9RzLFDxQMFcChPvJSqUXARpYioQAHswhhfIw==", "requires": { - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@anypoint-web-components/anypoint-input": "^0.2.6", - "@anypoint-web-components/validatable-mixin": "^1.0.2", - "@api-components/api-view-model-transformer": "^4.1.0", - "lit-element": "^2.0.1", - "lit-html": "^1.1.2" + "@types/parse-link-header": "^1.0.0", + "cross-fetch": "^3.0.5", + "parse-link-header": "^1.0.1" } }, - "@api-components/api-url-params-editor": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@api-components/api-url-params-editor/-/api-url-params-editor-4.1.0.tgz", - "integrity": "sha512-8VBFHU8sokvU1PFZKZZXQXzgTpnYBPbHATSm56hBuXNxcRbaMr2pA+QxsELFUfSDb3rb1rbBQ7Qhij69ZQYJdg==", - "dev": true, + "@comunica/actor-http-native": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-http-native/-/actor-http-native-1.19.0.tgz", + "integrity": "sha512-j7HsxDRcVjywPvh3ur1qx5WRS+UbT503jR+8lszR045h3ODTLX5PeCMh96Eq4dPkbVp22vkGqTFXux38dYRBSw==", "requires": { - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/arc-marked": "^1.0.6", - "@advanced-rest-client/events-target-mixin": "^3.1.1", - "@advanced-rest-client/markdown-styles": "^3.1.2", - "@anypoint-web-components/anypoint-button": "^1.0.15", - "@anypoint-web-components/anypoint-checkbox": "^1.0.2", - "@anypoint-web-components/anypoint-dropdown-menu": "^0.1.14", - "@anypoint-web-components/anypoint-input": "^0.2.14", - "@anypoint-web-components/anypoint-item": "^1.0.5", - "@anypoint-web-components/anypoint-listbox": "^1.0.4", - "@anypoint-web-components/validatable-mixin": "^1.0.2", - "@api-components/api-form-mixin": "^3.1.0", - "@api-components/api-property-form-item": "^3.0.12", - "@polymer/iron-collapse": "^3.0.0", - "@polymer/iron-form": "^3.0.0", - "lit-element": "^2.3.1", - "lit-html": "^1.2.1" + "@types/parse-link-header": "^1.0.0", + "cross-fetch": "^3.0.5", + "follow-redirects": "^1.5.1", + "parse-link-header": "^1.0.1" } }, - "@api-components/api-view-model-transformer": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@api-components/api-view-model-transformer/-/api-view-model-transformer-4.1.1.tgz", - "integrity": "sha512-cb5CCka8M5m3eaXSBeRFFLEwCQYmp28c4/mPFP/cQ4wqZxk9IPfGpSHh6z52TIC//WkDmp7097fnMFy27EBSUQ==", - "dev": true, + "@comunica/actor-http-proxy": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-http-proxy/-/actor-http-proxy-1.19.0.tgz", + "integrity": "sha512-ndB9/HOHnwbgx1c917LnUTiUoY3oRqZtw1M6YmaACGUuziqGXQAm+ZgtwtT8BzoWd9YFODyJfwuNSaEo1da4fg==" + }, + "@comunica/actor-init-sparql": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/@comunica/actor-init-sparql/-/actor-init-sparql-1.19.1.tgz", + "integrity": "sha512-UhPQnsaqTCV2NrXioXso16o+WzDFJ1OYVYy4OcsIc/jboBsu4mkQB8UWueHhmcxbM2rjeHfkZYYvU3qPz3yo9A==", + "requires": { + "@comunica/actor-abstract-bindings-hash": "^1.19.0", + "@comunica/actor-abstract-mediatyped": "^1.19.0", + "@comunica/actor-http-memento": "^1.19.0", + "@comunica/actor-http-native": "^1.19.0", + "@comunica/actor-http-proxy": "^1.19.0", + "@comunica/actor-optimize-query-operation-join-bgp": "^1.19.0", + "@comunica/actor-query-operation-ask": "^1.19.0", + "@comunica/actor-query-operation-bgp-empty": "^1.19.0", + "@comunica/actor-query-operation-bgp-left-deep-smallest": "^1.19.0", + "@comunica/actor-query-operation-bgp-single": "^1.19.0", + "@comunica/actor-query-operation-construct": "^1.19.0", + "@comunica/actor-query-operation-describe-subject": "^1.19.0", + "@comunica/actor-query-operation-distinct-hash": "^1.19.0", + "@comunica/actor-query-operation-extend": "^1.19.0", + "@comunica/actor-query-operation-filter-sparqlee": "^1.19.0", + "@comunica/actor-query-operation-from-quad": "^1.19.0", + "@comunica/actor-query-operation-group": "^1.19.0", + "@comunica/actor-query-operation-join": "^1.19.0", + "@comunica/actor-query-operation-leftjoin-left-deep": "^1.19.0", + "@comunica/actor-query-operation-leftjoin-nestedloop": "^1.19.0", + "@comunica/actor-query-operation-minus": "^1.19.0", + "@comunica/actor-query-operation-orderby-sparqlee": "^1.19.0", + "@comunica/actor-query-operation-path-alt": "^1.19.0", + "@comunica/actor-query-operation-path-inv": "^1.19.0", + "@comunica/actor-query-operation-path-link": "^1.19.0", + "@comunica/actor-query-operation-path-nps": "^1.19.0", + "@comunica/actor-query-operation-path-one-or-more": "^1.19.0", + "@comunica/actor-query-operation-path-seq": "^1.19.0", + "@comunica/actor-query-operation-path-zero-or-more": "^1.19.0", + "@comunica/actor-query-operation-path-zero-or-one": "^1.19.0", + "@comunica/actor-query-operation-project": "^1.19.0", + "@comunica/actor-query-operation-quadpattern": "^1.19.0", + "@comunica/actor-query-operation-reduced-hash": "^1.19.0", + "@comunica/actor-query-operation-service": "^1.19.0", + "@comunica/actor-query-operation-slice": "^1.19.0", + "@comunica/actor-query-operation-sparql-endpoint": "^1.19.0", + "@comunica/actor-query-operation-union": "^1.19.0", + "@comunica/actor-query-operation-values": "^1.19.0", + "@comunica/actor-rdf-dereference-http-parse": "^1.19.0", + "@comunica/actor-rdf-join-multi-smallest": "^1.19.0", + "@comunica/actor-rdf-join-nestedloop": "^1.19.0", + "@comunica/actor-rdf-join-symmetrichash": "^1.19.0", + "@comunica/actor-rdf-metadata-all": "^1.19.0", + "@comunica/actor-rdf-metadata-extract-hydra-controls": "^1.19.0", + "@comunica/actor-rdf-metadata-extract-hydra-count": "^1.19.0", + "@comunica/actor-rdf-metadata-extract-sparql-service": "^1.19.0", + "@comunica/actor-rdf-metadata-primary-topic": "^1.19.0", + "@comunica/actor-rdf-parse-html": "^1.19.0", + "@comunica/actor-rdf-parse-html-microdata": "^1.19.0", + "@comunica/actor-rdf-parse-html-rdfa": "^1.19.0", + "@comunica/actor-rdf-parse-html-script": "^1.19.0", + "@comunica/actor-rdf-parse-jsonld": "^1.19.0", + "@comunica/actor-rdf-parse-n3": "^1.19.0", + "@comunica/actor-rdf-parse-rdfxml": "^1.19.0", + "@comunica/actor-rdf-parse-xml-rdfa": "^1.19.0", + "@comunica/actor-rdf-resolve-hypermedia-links-next": "^1.19.0", + "@comunica/actor-rdf-resolve-hypermedia-none": "^1.19.0", + "@comunica/actor-rdf-resolve-hypermedia-qpf": "^1.19.0", + "@comunica/actor-rdf-resolve-hypermedia-sparql": "^1.19.0", + "@comunica/actor-rdf-resolve-quad-pattern-federated": "^1.19.0", + "@comunica/actor-rdf-resolve-quad-pattern-hypermedia": "^1.19.0", + "@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source": "^1.19.0", + "@comunica/actor-rdf-serialize-jsonld": "^1.19.0", + "@comunica/actor-rdf-serialize-n3": "^1.19.0", + "@comunica/actor-sparql-parse-algebra": "^1.19.0", + "@comunica/actor-sparql-parse-graphql": "^1.19.0", + "@comunica/actor-sparql-serialize-json": "^1.19.0", + "@comunica/actor-sparql-serialize-rdf": "^1.19.0", + "@comunica/actor-sparql-serialize-simple": "^1.19.0", + "@comunica/actor-sparql-serialize-sparql-csv": "^1.19.0", + "@comunica/actor-sparql-serialize-sparql-json": "^1.19.0", + "@comunica/actor-sparql-serialize-sparql-tsv": "^1.19.0", + "@comunica/actor-sparql-serialize-sparql-xml": "^1.19.0", + "@comunica/actor-sparql-serialize-stats": "^1.19.0", + "@comunica/actor-sparql-serialize-table": "^1.19.0", + "@comunica/actor-sparql-serialize-tree": "^1.19.0", + "@comunica/bus-context-preprocess": "^1.19.0", + "@comunica/bus-http": "^1.19.0", + "@comunica/bus-http-invalidate": "^1.19.0", + "@comunica/bus-init": "^1.19.0", + "@comunica/bus-optimize-query-operation": "^1.19.0", + "@comunica/bus-query-operation": "^1.19.0", + "@comunica/bus-rdf-dereference": "^1.19.0", + "@comunica/bus-rdf-dereference-paged": "^1.19.0", + "@comunica/bus-rdf-join": "^1.19.0", + "@comunica/bus-rdf-metadata": "^1.19.0", + "@comunica/bus-rdf-metadata-extract": "^1.19.0", + "@comunica/bus-rdf-parse": "^1.19.0", + "@comunica/bus-rdf-parse-html": "^1.19.0", + "@comunica/bus-rdf-resolve-hypermedia": "^1.19.0", + "@comunica/bus-rdf-resolve-hypermedia-links": "^1.19.0", + "@comunica/bus-rdf-resolve-quad-pattern": "^1.19.0", + "@comunica/bus-rdf-serialize": "^1.19.0", + "@comunica/bus-sparql-parse": "^1.19.0", + "@comunica/bus-sparql-serialize": "^1.19.0", + "@comunica/core": "^1.19.0", + "@comunica/logger-pretty": "^1.19.1", + "@comunica/logger-void": "^1.19.0", + "@comunica/mediator-all": "^1.19.0", + "@comunica/mediator-combine-pipeline": "^1.19.0", + "@comunica/mediator-combine-union": "^1.19.0", + "@comunica/mediator-number": "^1.19.0", + "@comunica/mediator-race": "^1.19.0", + "@comunica/runner": "^1.19.0", + "@comunica/runner-cli": "^1.19.0", + "@types/minimist": "^1.2.0", + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "minimist": "^1.2.0", + "negotiate": "^1.0.1", + "rdf-quad": "^1.4.0", + "rdf-string": "^1.5.0", + "rdf-terms": "^1.6.2", + "sparqlalgebrajs": "^2.4.0", + "streamify-string": "^1.0.1" + } + }, + "@comunica/actor-init-sparql-rdfjs": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/@comunica/actor-init-sparql-rdfjs/-/actor-init-sparql-rdfjs-1.19.1.tgz", + "integrity": "sha512-wZKwfGzy+cQTY/5/a3RRbeiVxqe+rtgxadcOupY5igaNTGkNzCxKSBAntLzXDEMuMn9bWIzJDrUdZCo00bji2w==", + "requires": { + "@comunica/actor-abstract-mediatyped": "^1.19.0", + "@comunica/actor-init-sparql": "^1.19.1", + "@comunica/actor-query-operation-ask": "^1.19.0", + "@comunica/actor-query-operation-bgp-empty": "^1.19.0", + "@comunica/actor-query-operation-bgp-left-deep-smallest": "^1.19.0", + "@comunica/actor-query-operation-bgp-single": "^1.19.0", + "@comunica/actor-query-operation-construct": "^1.19.0", + "@comunica/actor-query-operation-describe-subject": "^1.19.0", + "@comunica/actor-query-operation-distinct-hash": "^1.19.0", + "@comunica/actor-query-operation-extend": "^1.19.0", + "@comunica/actor-query-operation-filter-sparqlee": "^1.19.0", + "@comunica/actor-query-operation-from-quad": "^1.19.0", + "@comunica/actor-query-operation-join": "^1.19.0", + "@comunica/actor-query-operation-leftjoin-nestedloop": "^1.19.0", + "@comunica/actor-query-operation-orderby-sparqlee": "^1.19.0", + "@comunica/actor-query-operation-path-alt": "^1.19.0", + "@comunica/actor-query-operation-path-inv": "^1.19.0", + "@comunica/actor-query-operation-path-link": "^1.19.0", + "@comunica/actor-query-operation-path-nps": "^1.19.0", + "@comunica/actor-query-operation-path-one-or-more": "^1.19.0", + "@comunica/actor-query-operation-path-seq": "^1.19.0", + "@comunica/actor-query-operation-path-zero-or-more": "^1.19.0", + "@comunica/actor-query-operation-path-zero-or-one": "^1.19.0", + "@comunica/actor-query-operation-project": "^1.19.0", + "@comunica/actor-query-operation-quadpattern": "^1.19.0", + "@comunica/actor-query-operation-service": "^1.19.0", + "@comunica/actor-query-operation-slice": "^1.19.0", + "@comunica/actor-query-operation-union": "^1.19.0", + "@comunica/actor-query-operation-values": "^1.19.0", + "@comunica/actor-rdf-join-nestedloop": "^1.19.0", + "@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source": "^1.19.0", + "@comunica/actor-rdf-serialize-jsonld": "^1.19.0", + "@comunica/actor-rdf-serialize-n3": "^1.19.0", + "@comunica/actor-sparql-parse-algebra": "^1.19.0", + "@comunica/actor-sparql-serialize-json": "^1.19.0", + "@comunica/actor-sparql-serialize-rdf": "^1.19.0", + "@comunica/actor-sparql-serialize-simple": "^1.19.0", + "@comunica/actor-sparql-serialize-sparql-json": "^1.19.0", + "@comunica/actor-sparql-serialize-sparql-xml": "^1.19.0", + "@comunica/bus-context-preprocess": "^1.19.0", + "@comunica/bus-init": "^1.19.0", + "@comunica/bus-query-operation": "^1.19.0", + "@comunica/bus-rdf-join": "^1.19.0", + "@comunica/bus-rdf-resolve-quad-pattern": "^1.19.0", + "@comunica/bus-rdf-serialize": "^1.19.0", + "@comunica/bus-sparql-parse": "^1.19.0", + "@comunica/bus-sparql-serialize": "^1.19.0", + "@comunica/core": "^1.19.0", + "@comunica/mediator-combine-pipeline": "^1.19.0", + "@comunica/mediator-combine-union": "^1.19.0", + "@comunica/mediator-number": "^1.19.0", + "@comunica/mediator-race": "^1.19.0", + "@comunica/runner": "^1.19.0", + "@comunica/runner-cli": "^1.19.0" + } + }, + "@comunica/actor-optimize-query-operation-join-bgp": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-optimize-query-operation-join-bgp/-/actor-optimize-query-operation-join-bgp-1.19.0.tgz", + "integrity": "sha512-DhS17kOobLVHlHNRmJp5R1H2K53Imd8Xw+6Y8lPz9E1OHoEbfeNMxKxGgA0ggtUR5Vv7NUv7QpMW7YpHo5TdVg==", "requires": { - "@advanced-rest-client/events-target-mixin": "^3.0.0", - "@api-components/amf-helper-mixin": "^4.1.1", - "@api-components/api-example-generator": "^4.2.2", - "lit-element": "^2.2.1" + "sparqlalgebrajs": "^2.4.0" } }, - "@api-components/http-method-label": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@api-components/http-method-label/-/http-method-label-3.1.1.tgz", - "integrity": "sha512-LgiM14XitMZYk+7w7A77mIClTtFT1p4zTxVv3rqCmLNrh1jisYiB8o55W4Dxna3rfFlglVpp0vjSWn9LIc0rBQ==", - "dev": true, + "@comunica/actor-query-operation-ask": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-ask/-/actor-query-operation-ask-1.19.0.tgz", + "integrity": "sha512-6QNOOGUsT630LVF7QelPphJT12FZJgf/3t4dfCzdxOdjInFppd8j3aENg+Ie5FWInpFUjx0i5uWuYLKpf4JuCQ==", "requires": { - "lit-element": "^2.2.1", - "lit-html": "^1.1.2" + "sparqlalgebrajs": "^2.4.0" } }, - "@api-components/raml-aware": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@api-components/raml-aware/-/raml-aware-3.0.0.tgz", - "integrity": "sha512-lWIjd8Wq6tYJmF8ZXyUgQdGq+vhXP7pKY/QcPQdKOn2IXb4/gqTglebtXnxjME41+uKSPQoMSKTEVT/PwX93qQ==", - "dev": true + "@comunica/actor-query-operation-bgp-empty": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-bgp-empty/-/actor-query-operation-bgp-empty-1.19.0.tgz", + "integrity": "sha512-sVsooRKXWevZR3dweW8GVd1i4BWVIVBstPmMRIvDTNdCNgL9y/WOxtZKSqcSv83jWb8xFXZgu97PbDIc5c5GJg==", + "requires": { + "asynciterator": "^3.0.3", + "rdf-string": "^1.5.0", + "rdf-terms": "^1.6.2", + "sparqlalgebrajs": "^2.4.0" + } }, - "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", - "dev": true, + "@comunica/actor-query-operation-bgp-left-deep-smallest": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-bgp-left-deep-smallest/-/actor-query-operation-bgp-left-deep-smallest-1.19.0.tgz", + "integrity": "sha512-1FqYwxQya4aabm9ocIyJbt4bUxMkNGIWcmGLNp8FVBPx+urlX2HaXVFtuIw24qc/LMs5dL8aYCn5v/ZEToI1lw==", "requires": { - "@babel/highlight": "^7.8.3" + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "rdf-string": "^1.5.0", + "rdf-terms": "^1.6.2", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/compat-data": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.9.6.tgz", - "integrity": "sha512-5QPTrNen2bm7RBc7dsOmcA5hbrS4O2Vhmk5XOL4zWW/zD/hV0iinpefDlkm+tBBy8kDtFaaeEvmAqt+nURAV2g==", - "dev": true, + "@comunica/actor-query-operation-bgp-single": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-bgp-single/-/actor-query-operation-bgp-single-1.19.0.tgz", + "integrity": "sha512-qgEHT7fNIBo/gtJVN7rqujeKUe/vnJMvAMAOsz7uRVwnhou7c8kx7Pdnx9WIoVhrgXuurXGAWrnVrmYLQAq8lQ==", "requires": { - "browserslist": "^4.11.1", - "invariant": "^2.2.4", - "semver": "^5.5.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/core": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.6.tgz", - "integrity": "sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.6", - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helpers": "^7.9.6", - "@babel/parser": "^7.9.6", - "@babel/template": "^7.8.6", - "@babel/traverse": "^7.9.6", - "@babel/types": "^7.9.6", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.13", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "@comunica/actor-query-operation-construct": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-construct/-/actor-query-operation-construct-1.19.0.tgz", + "integrity": "sha512-l99lU0dgzYjrtjqK9kBvWMXaHu4AO+do55Q/p2ygKiqlEscy+YmVZ4lQIcTXToelGjLkaEQwV4OABapGGU/vpA==", + "requires": { + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "rdf-data-factory": "^1.0.3", + "rdf-terms": "^1.6.2", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/generator": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.6.tgz", - "integrity": "sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ==", - "dev": true, + "@comunica/actor-query-operation-describe-subject": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-describe-subject/-/actor-query-operation-describe-subject-1.19.0.tgz", + "integrity": "sha512-tDpF/1ofq8+ZRM6xySgpet+CPkvzoSFqROpowiDKgylGCGJ65PIV4pSh/Q2oRL2zz0UVXiBjTUpSmORt0c1ygg==", "requires": { - "@babel/types": "^7.9.6", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "@comunica/actor-query-operation-union": "^1.19.0", + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "rdf-data-factory": "^1.0.3", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-annotate-as-pure": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz", - "integrity": "sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==", - "dev": true, + "@comunica/actor-query-operation-distinct-hash": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-distinct-hash/-/actor-query-operation-distinct-hash-1.19.0.tgz", + "integrity": "sha512-HO+vK0NPFGNixu5GaZZ+PdGn3vOb97b3j4gKMO/wcINTsE+D01jtTS2turxSJcYIcQot8xMLSbBfTS89OFWB7g==", "requires": { - "@babel/types": "^7.8.3" + "@comunica/actor-abstract-bindings-hash": "^1.19.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz", - "integrity": "sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==", - "dev": true, + "@comunica/actor-query-operation-extend": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-extend/-/actor-query-operation-extend-1.19.0.tgz", + "integrity": "sha512-puuYrdI25eRSsa/Yukrxfdhjl9oDlC0tdovCdMkhqJ6rjJZ7uCSd6c6t5te3JlOCGgf0plrApwR5zKsd1bl1aw==", "requires": { - "@babel/helper-explode-assignable-expression": "^7.8.3", - "@babel/types": "^7.8.3" + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0", + "sparqlee": "^1.6.0" } }, - "@babel/helper-compilation-targets": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.9.6.tgz", - "integrity": "sha512-x2Nvu0igO0ejXzx09B/1fGBxY9NXQlBW2kZsSxCJft+KHN8t9XWzIvFxtPHnBOAXpVsdxZKZFbRUC8TsNKajMw==", - "dev": true, + "@comunica/actor-query-operation-filter-sparqlee": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-filter-sparqlee/-/actor-query-operation-filter-sparqlee-1.19.0.tgz", + "integrity": "sha512-aregYntISypWfgYLJYVZcMUnSPrcVS0rqe/etZcCIWKiplrQ2uvzB1Gk0h1pIBqN5Z/C0GsYXTToTcyU1767Wg==", "requires": { - "@babel/compat-data": "^7.9.6", - "browserslist": "^4.11.1", - "invariant": "^2.2.4", - "levenary": "^1.1.1", - "semver": "^5.5.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "sparqlalgebrajs": "^2.4.0", + "sparqlee": "^1.6.0" } }, - "@babel/helper-create-regexp-features-plugin": { - "version": "7.8.8", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz", - "integrity": "sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==", - "dev": true, + "@comunica/actor-query-operation-from-quad": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-from-quad/-/actor-query-operation-from-quad-1.19.0.tgz", + "integrity": "sha512-shGWdBnzosx4wtV3JVoap0gGKJnxWwcrLPEvO5RUsXPW9glCrsXV9LUszJdWRxGqXO8TbCIjSbu7hVdpAwvvFA==", "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-regex": "^7.8.3", - "regexpu-core": "^4.7.0" + "@types/rdf-js": "*", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-define-map": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz", - "integrity": "sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==", - "dev": true, + "@comunica/actor-query-operation-group": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-group/-/actor-query-operation-group-1.19.0.tgz", + "integrity": "sha512-bGVyzmdDJtFgrGsaTOKZpl0CE70mx4UxTuI24J1I4GKFb+1zwx0qNELLhTeMCnnONCoq9b/NA3Xnqz9XLvJVzA==", "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/types": "^7.8.3", - "lodash": "^4.17.13" + "@comunica/actor-abstract-bindings-hash": "^1.19.0", + "asynciterator": "^3.0.3", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0", + "sparqlee": "^1.6.0" } }, - "@babel/helper-explode-assignable-expression": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz", - "integrity": "sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==", - "dev": true, + "@comunica/actor-query-operation-join": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-join/-/actor-query-operation-join-1.19.0.tgz", + "integrity": "sha512-vm0yXUKBKOzM8Zy9HG5ajFbYhFCS2uG4Zzc1l9JP0oWmcOkYDRmXyntRVXQsxIThOjFOLWZKy+Rk9TdFj7AOCQ==", "requires": { - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-function-name": { - "version": "7.9.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz", - "integrity": "sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==", - "dev": true, + "@comunica/actor-query-operation-leftjoin-left-deep": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-leftjoin-left-deep/-/actor-query-operation-leftjoin-left-deep-1.19.0.tgz", + "integrity": "sha512-hvuNFmPlRHIh9+PbQzh7RWMAx8fH5BOJ21ZnE1jV7YGseJfCv7jEAV9GgxNgQTKBwchyGHoGLWmNMuRyekWBwQ==", "requires": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.9.5" + "@comunica/bus-rdf-join": "^1.19.0", + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-get-function-arity": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", - "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", - "dev": true, + "@comunica/actor-query-operation-leftjoin-nestedloop": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-leftjoin-nestedloop/-/actor-query-operation-leftjoin-nestedloop-1.19.0.tgz", + "integrity": "sha512-1ZWNv8dmJHMKyKz0CWhuDfLxeT+PH1PLI2HsAKA8NOr7YH2Cxz1NkyxfiPUTWugSjYATnD2CVlvLTxaxcH9aqg==", "requires": { - "@babel/types": "^7.8.3" + "asynciterator": "^3.0.3", + "sparqlalgebrajs": "^2.4.0", + "sparqlee": "^1.6.0" } }, - "@babel/helper-hoist-variables": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz", - "integrity": "sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==", - "dev": true, + "@comunica/actor-query-operation-minus": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-minus/-/actor-query-operation-minus-1.19.0.tgz", + "integrity": "sha512-3IfTV34agULQBX+U8FgW/XqCA7b+mYyVs2Sh2hKj9qShI99KFzUql6tQJIKrP2pwRqTfIgeyZ10Ox1y6BVX8pQ==", "requires": { - "@babel/types": "^7.8.3" + "@comunica/actor-abstract-bindings-hash": "^1.19.0", + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-member-expression-to-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", - "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", - "dev": true, + "@comunica/actor-query-operation-orderby-sparqlee": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-orderby-sparqlee/-/actor-query-operation-orderby-sparqlee-1.19.0.tgz", + "integrity": "sha512-tnBRva1vYOxoCwvQJW2t996NO7qjxJKp5AqEkFfJuWejvFb4fMvGXP8/ifPecDWsrGa+GE4AldOqDj5OuOET4w==", "requires": { - "@babel/types": "^7.8.3" + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0", + "sparqlee": "^1.6.0" } }, - "@babel/helper-module-imports": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", - "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", - "dev": true, + "@comunica/actor-query-operation-path-alt": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-path-alt/-/actor-query-operation-path-alt-1.19.0.tgz", + "integrity": "sha512-MhDa1TTalNcCVCrKpq9OORHNJ+ROtUm2dSRddtx+HYXbyRIKCsfcn1kfVUQTUwle55wZyWUQVSOJd0ijnyn6qw==", "requires": { - "@babel/types": "^7.8.3" + "@comunica/actor-abstract-path": "^1.19.0", + "asynciterator": "^3.0.3", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-module-transforms": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", - "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==", - "dev": true, + "@comunica/actor-query-operation-path-inv": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-path-inv/-/actor-query-operation-path-inv-1.19.0.tgz", + "integrity": "sha512-SOh8Yz0aSq3HUTV++/Kji7LPRh3+e8yDscrMT/mAd+O7b7gjANbGXmNQ7vuBogZB3NmTUK5fupzKEEEm+/sAUg==", "requires": { - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.6", - "@babel/helper-simple-access": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/template": "^7.8.6", - "@babel/types": "^7.9.0", - "lodash": "^4.17.13" + "@comunica/actor-abstract-path": "^1.19.0" } }, - "@babel/helper-optimise-call-expression": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", - "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", - "dev": true, + "@comunica/actor-query-operation-path-link": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-path-link/-/actor-query-operation-path-link-1.19.0.tgz", + "integrity": "sha512-PPvyhrBlxfmIbUQtpDqIzsuoTHxnLdb0IOQdfO/WbgOSSaHLYqZ1nTiolMTsK4T8z/i/N5p6+qktv2dK3zl9Zw==", "requires": { - "@babel/types": "^7.8.3" + "@comunica/actor-abstract-path": "^1.19.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-plugin-utils": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", - "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", - "dev": true + "@comunica/actor-query-operation-path-nps": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-path-nps/-/actor-query-operation-path-nps-1.19.0.tgz", + "integrity": "sha512-yWiNF+ojzYPHgVe8b3CtEeQi8HknW+Pe6MtRNsJvB5nHUbfuCKrnGv7TgCDEUzcg9WTwVpKmTyqBhG/YI1rQAw==", + "requires": { + "@comunica/actor-abstract-path": "^1.19.0", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0" + } }, - "@babel/helper-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", - "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==", - "dev": true, + "@comunica/actor-query-operation-path-one-or-more": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-path-one-or-more/-/actor-query-operation-path-one-or-more-1.19.0.tgz", + "integrity": "sha512-BR4APIg0ztfuYjJTFNLuQnDciiZ+wlkJdMia3DRBuQw3B/5oQSaZcfO4ShZPdjj1ovcn89VlOucJ+EOndsTQqQ==", "requires": { - "lodash": "^4.17.13" + "@comunica/actor-abstract-path": "^1.19.0", + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-remap-async-to-generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz", - "integrity": "sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==", - "dev": true, + "@comunica/actor-query-operation-path-seq": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-path-seq/-/actor-query-operation-path-seq-1.19.0.tgz", + "integrity": "sha512-+YKZDUfwXDqsLUnBBuMZr7y7/IRiDR0LmYFOkID382dE+aRGwFurrWx+shiTU76tzmyw664Hz1h4HuW8DqZI/w==", "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-wrap-function": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@comunica/actor-abstract-path": "^1.19.0", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-replace-supers": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.9.6.tgz", - "integrity": "sha512-qX+chbxkbArLyCImk3bWV+jB5gTNU/rsze+JlcF6Nf8tVTigPJSI1o1oBow/9Resa1yehUO9lIipsmu9oG4RzA==", - "dev": true, + "@comunica/actor-query-operation-path-zero-or-more": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-path-zero-or-more/-/actor-query-operation-path-zero-or-more-1.19.0.tgz", + "integrity": "sha512-mn8lXfXGyAMhgE/ZNapQCEGJuESjeZxjkFkuX3Xm/ZilkD1OhixKfEkvbMtZUT1Qm2Rt+5n2nzAQoYzOUq0qJw==", "requires": { - "@babel/helper-member-expression-to-functions": "^7.8.3", - "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/traverse": "^7.9.6", - "@babel/types": "^7.9.6" + "@comunica/actor-abstract-path": "^1.19.0", + "asynciterator": "^3.0.3", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-simple-access": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", - "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", - "dev": true, + "@comunica/actor-query-operation-path-zero-or-one": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-path-zero-or-one/-/actor-query-operation-path-zero-or-one-1.19.0.tgz", + "integrity": "sha512-oZ2yCFOVtwA6O2CJ2gukHIv3tg0uNMCHTyRA0M4jSv/+Y84nAVrw6+yFy5d9J9LDI6GdYObn1MWCcgDcQCnDMQ==", "requires": { - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" + "@comunica/actor-abstract-path": "^1.19.0", + "asynciterator": "^3.0.3", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-split-export-declaration": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", - "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", - "dev": true, + "@comunica/actor-query-operation-project": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-project/-/actor-query-operation-project-1.19.0.tgz", + "integrity": "sha512-krrES8KIlTEuISBYdtzCyS1coO2FQT5v9xIHLjNDWzZavAqWRhJMq244UcLGgeR71bhZ8+xpYKkkvqF9gXAdjQ==", "requires": { - "@babel/types": "^7.8.3" + "@comunica/data-factory": "^1.17.0", + "rdf-data-factory": "^1.0.3", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helper-validator-identifier": { - "version": "7.9.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", - "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", - "dev": true + "@comunica/actor-query-operation-quadpattern": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-quadpattern/-/actor-query-operation-quadpattern-1.19.0.tgz", + "integrity": "sha512-QvJnvTKe9f5iTgpkuj4O7F5M9b0Ni6dCbFgMb5RNsjzw+VQ2cNHARFAXEyLvxl5f62Tsodx1/BmrbZskgxPkeg==", + "requires": { + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "rdf-string": "^1.5.0", + "rdf-terms": "^1.6.2", + "sparqlalgebrajs": "^2.4.0" + } }, - "@babel/helper-wrap-function": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", - "integrity": "sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==", - "dev": true, + "@comunica/actor-query-operation-reduced-hash": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-reduced-hash/-/actor-query-operation-reduced-hash-1.19.0.tgz", + "integrity": "sha512-LsL/Xd0eBDtFqqkFr9iPmRHwAK2x+4I2F9gZGafOr8RRB3oRz29SBuV3d8oVyHfgfVnCYnSKbN8rZjGb7reLQQ==", "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@comunica/actor-abstract-bindings-hash": "^1.19.0", + "@types/lru-cache": "^5.1.0", + "lru-cache": "^6.0.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/helpers": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.6.tgz", - "integrity": "sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw==", - "dev": true, + "@comunica/actor-query-operation-service": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-service/-/actor-query-operation-service-1.19.0.tgz", + "integrity": "sha512-B8pW5x47jjZpG7w4o+aZPbAhn9QEn8OVxpHvKjAyyZBvLjAgNA9Vij6gUl2unNc25bIzn3qbG88H5raZU0qOaQ==", "requires": { - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.9.6", - "@babel/types": "^7.9.6" + "@comunica/bus-rdf-resolve-quad-pattern": "^1.19.0", + "asynciterator": "^3.0.3", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/highlight": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", - "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", - "dev": true, + "@comunica/actor-query-operation-slice": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-slice/-/actor-query-operation-slice-1.19.0.tgz", + "integrity": "sha512-s4kv92Y0evPOm3bk7W0m1uacikrqVDyx9fp/bEIkDsgJsyU6oOq4XNSzh0Qm9WRQl8viQkQHnc5YnTy7hljPjg==", "requires": { - "@babel/helper-validator-identifier": "^7.9.0", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "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" - } - }, - "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" - } - } + "asynciterator": "^3.0.3", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/parser": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.6.tgz", - "integrity": "sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q==", - "dev": true + "@comunica/actor-query-operation-sparql-endpoint": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-sparql-endpoint/-/actor-query-operation-sparql-endpoint-1.19.0.tgz", + "integrity": "sha512-ZEtVq1HvDOzvWmblrneDiw4FdofDbIhhcShz0M0oNpb7lGyBDwLPLMezKjR7wNcEptCqli1XCJ2U/PDk596p9g==", + "requires": { + "@comunica/bus-rdf-resolve-quad-pattern": "^1.19.0", + "@comunica/utils-datasource": "^1.19.0", + "@types/rdf-js": "*", + "arrayify-stream": "^1.0.0", + "asynciterator": "^3.0.3", + "fetch-sparql-endpoint": "^1.7.0", + "rdf-string": "^1.5.0", + "rdf-terms": "^1.6.2", + "sparqlalgebrajs": "^2.4.0" + } }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz", - "integrity": "sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==", - "dev": true, + "@comunica/actor-query-operation-union": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-union/-/actor-query-operation-union-1.19.0.tgz", + "integrity": "sha512-CID8/Zs18faH6ga5snKO/yyZZX6v149xwx8rVuBWRVx8G3gjRVQNZV5NlzJpm5w0mUgvMch1h5DKg7UxNz+PXQ==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-remap-async-to-generator": "^7.8.3", - "@babel/plugin-syntax-async-generators": "^7.8.0" + "asynciterator": "^3.0.3", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/plugin-proposal-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz", - "integrity": "sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w==", - "dev": true, + "@comunica/actor-query-operation-values": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-query-operation-values/-/actor-query-operation-values-1.19.0.tgz", + "integrity": "sha512-TxFZ3V1jD8MlQBVziWIiJq23tjt99a0pXOmjvLPc+g2d+QJ8UNpczHLFlBPGhoMlAxogl902KrQa0CffZK/AIA==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-dynamic-import": "^7.8.0" + "asynciterator": "^3.0.3", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/plugin-proposal-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz", - "integrity": "sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q==", - "dev": true, + "@comunica/actor-rdf-dereference-http-parse": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-dereference-http-parse/-/actor-rdf-dereference-http-parse-1.19.0.tgz", + "integrity": "sha512-5aDwZ+Wz/vFhAJm0PXgsYWAgjOMNgNtgg13w4O1trsfgrd+rBrO4E6VUORkBns57CkAEfRM4rbVgQECaCsmOag==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.0" + "cross-fetch": "^3.0.5", + "relative-to-absolute-iri": "^1.0.5" } }, - "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==", - "dev": true, + "@comunica/actor-rdf-join-multi-smallest": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-join-multi-smallest/-/actor-rdf-join-multi-smallest-1.19.0.tgz", + "integrity": "sha512-CoIOue30sZllGw/V44vig2EOj7oyN9JGrl2weF0GsZxOA99s9DP5LnGLiJNrCu5SGLxqVd9NjLAldIqna6snZw==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + "@comunica/bus-query-operation": "^1.19.0", + "@comunica/mediatortype-iterations": "^1.19.0" } }, - "@babel/plugin-proposal-numeric-separator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz", - "integrity": "sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ==", - "dev": true, + "@comunica/actor-rdf-join-nestedloop": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-join-nestedloop/-/actor-rdf-join-nestedloop-1.19.0.tgz", + "integrity": "sha512-noTmMdPP5M3H85YfHLO4j1eANd4PWGgeJnExpl9sN/ZwviCeL/QYYQN41RLDg1X6YsH44mB2qeaR/TZH2b94JA==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3" + "asyncjoin": "^1.0.1" } }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.6.tgz", - "integrity": "sha512-Ga6/fhGqA9Hj+y6whNpPv8psyaK5xzrQwSPsGPloVkvmH+PqW1ixdnfJ9uIO06OjQNYol3PMnfmJ8vfZtkzF+A==", - "dev": true, + "@comunica/actor-rdf-join-symmetrichash": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-join-symmetrichash/-/actor-rdf-join-symmetrichash-1.19.0.tgz", + "integrity": "sha512-katUVoQ7JQkiTemaxx4QSnDpia6DO1WNVWv7H26263mKvjyQqHD1xjVj1yY4+hzqKwB6K7U/dJBCQSF8IygHBw==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-transform-parameters": "^7.9.5" + "asyncjoin": "^1.0.1" } }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==", - "dev": true, + "@comunica/actor-rdf-metadata-all": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-metadata-all/-/actor-rdf-metadata-all-1.19.0.tgz", + "integrity": "sha512-AdoHLGtaEpGFWt+tFUoxU5uYGNcbMCBinfHJ7+a/DYfYAc0FqxaFmULNK7yyXt4mNffw66/IRTfwFcCVJ3SXDw==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + "@types/rdf-js": "*" } }, - "@babel/plugin-proposal-optional-chaining": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz", - "integrity": "sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==", - "dev": true, + "@comunica/actor-rdf-metadata-extract-hydra-controls": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-metadata-extract-hydra-controls/-/actor-rdf-metadata-extract-hydra-controls-1.19.0.tgz", + "integrity": "sha512-/oV67A0tw59RNEhfWDkuOQbhlP01EjdeQ9lJc3piKKejbuadhT8ld+P3pWAePFCqv/hZFU2W+yG/6EBdl71AXQ==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.0" + "@types/rdf-js": "*", + "@types/uritemplate": "^0.3.4", + "uritemplate": "0.3.4" } }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.8.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz", - "integrity": "sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A==", - "dev": true, + "@comunica/actor-rdf-metadata-extract-hydra-count": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-metadata-extract-hydra-count/-/actor-rdf-metadata-extract-hydra-count-1.19.0.tgz", + "integrity": "sha512-ryiXGbwj7XeTW2yUS6dCI328p4AFtwoA/mhr/O9L+Yrcfdq+OrVoL5BepO4KlDflTXeZg/Q/JDtYmfHsojnAWA==" + }, + "@comunica/actor-rdf-metadata-extract-sparql-service": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-metadata-extract-sparql-service/-/actor-rdf-metadata-extract-sparql-service-1.19.0.tgz", + "integrity": "sha512-MDqStl+jdSMgd3qlaY5dZkOBJvEwetqrhm9MRIfqiaoSwOm0f465YKjcr4TkI/n4ziBGBtUbcWA+1qlM5Gdg7Q==", "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.8", - "@babel/helper-plugin-utils": "^7.8.3" + "relative-to-absolute-iri": "^1.0.5" } }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, + "@comunica/actor-rdf-metadata-primary-topic": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-metadata-primary-topic/-/actor-rdf-metadata-primary-topic-1.19.0.tgz", + "integrity": "sha512-muWT4IbwhvhKcaT1zWEeM4kOmx2M/6HQwBvmIEh5kO/j1XDwChs2D3yPv18g0aAyTAEDS22sNpX9LNfWn1CaKg==", "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "@types/rdf-js": "*" } }, - "@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, + "@comunica/actor-rdf-parse-html": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-parse-html/-/actor-rdf-parse-html-1.19.0.tgz", + "integrity": "sha512-oxaS7cNkk3LZY7mKHnsLlUYZtCrBVt1w+dkgR9Hw/X2o5vet29W2dovYfOMeseSZJW9SOTQWDnQesvdMUgl2Tg==", "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "@comunica/bus-rdf-parse-html": "^1.19.0", + "@types/rdf-js": "*", + "htmlparser2": "^6.0.0" } }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, + "@comunica/actor-rdf-parse-html-microdata": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-parse-html-microdata/-/actor-rdf-parse-html-microdata-1.19.0.tgz", + "integrity": "sha512-IG0ZWdyQ8RP+cPjcoEnQePDgWmJa3isX3h1pO2WVOgAF9ih7wOimXl20++SGq/KlrtcMFFwM1qNlUE67RuaI6w==", "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "microdata-rdf-streaming-parser": "^1.1.0" } }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, + "@comunica/actor-rdf-parse-html-rdfa": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-parse-html-rdfa/-/actor-rdf-parse-html-rdfa-1.19.0.tgz", + "integrity": "sha512-Wzq7VZ1sqR+Dx4omKpuGyf+Ep01uh1cOPQfNNH98Nhnu4hfvN2O3+LMT9oN9xE/IlYA0CsgOJbvIthJCN7kiBw==", "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "rdfa-streaming-parser": "^1.4.0" } }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz", - "integrity": "sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw==", - "dev": true, + "@comunica/actor-rdf-parse-html-script": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-parse-html-script/-/actor-rdf-parse-html-script-1.19.0.tgz", + "integrity": "sha512-rvcYPzng1gFij6GtI7O7QNuL/9EyJ9wXeq4D+lt3tNbptw1KeK+vQZrEa8odCdfZsiGMzj0JpgsmySvux6VtNg==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@comunica/bus-rdf-parse-html": "^1.19.0", + "@types/rdf-js": "*", + "relative-to-absolute-iri": "^1.0.5" } }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, + "@comunica/actor-rdf-parse-jsonld": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-parse-jsonld/-/actor-rdf-parse-jsonld-1.19.0.tgz", + "integrity": "sha512-0I2wmsJlmurort2sSJh3kPm4NXYQqpmWBIkWzUGRuFJv5pAWd0AqnZpleuoM3GdaFdVtMbO3Pa4oBLBIVHfg2Q==", "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "@types/rdf-js": "*", + "jsonld-context-parser": "^2.1.1", + "jsonld-streaming-parser": "^2.1.1", + "stream-to-string": "^1.2.0" } }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, + "@comunica/actor-rdf-parse-n3": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-parse-n3/-/actor-rdf-parse-n3-1.19.0.tgz", + "integrity": "sha512-JkbLLym/dTT0qqBWtIw8wXAJQI6Gxa9aETCgu4slsZRTizUNHpCh/nkQBGMsL+gufTDUPazKEKdwdKDQuwY1VA==", "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "@types/n3": "^1.4.4", + "n3": "^1.6.3" } }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, + "@comunica/actor-rdf-parse-rdfxml": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-parse-rdfxml/-/actor-rdf-parse-rdfxml-1.19.0.tgz", + "integrity": "sha512-3ZqtJu7TKD43eaKZltbWwz/g4Zf5yy/qV+bzmUwa1+3TTAnunZqltf0HbcrVvwPI7l/HXSrpE/UbR6sW8Zy8Qg==", "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "rdfxml-streaming-parser": "^1.4.0" } }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz", - "integrity": "sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g==", - "dev": true, + "@comunica/actor-rdf-parse-xml-rdfa": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-parse-xml-rdfa/-/actor-rdf-parse-xml-rdfa-1.19.0.tgz", + "integrity": "sha512-pYj71b7Vcoistyalwh5qzvS+jeHkOqaDbRyOmfJMtRjfaWTWg5gHfG0Y4gYjK+14kuo5QGzn5vT7O3jWqef6jA==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "rdfa-streaming-parser": "^1.3.0" } }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz", - "integrity": "sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==", - "dev": true, + "@comunica/actor-rdf-resolve-hypermedia-links-next": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-resolve-hypermedia-links-next/-/actor-rdf-resolve-hypermedia-links-next-1.19.0.tgz", + "integrity": "sha512-Qw4lcptSRU/kSb7eIORUht34Qp3hCYh10jlzL0hxpnjtqDgJJ+r6saRciaaLCNgzzCFq7vkGYlmOKyglevuKew==" + }, + "@comunica/actor-rdf-resolve-hypermedia-none": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-resolve-hypermedia-none/-/actor-rdf-resolve-hypermedia-none-1.19.0.tgz", + "integrity": "sha512-1aigDraPw1JWbI5W6vplnP7T245wRNZ2fYLvnNve9zFUvPMjGzwKvekzq32Er+5bI0hOCXMJRfXyJxlvo/XC7Q==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source": "^1.19.0", + "@types/rdf-js": "*", + "rdf-store-stream": "^1.0.1" } }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz", - "integrity": "sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==", - "dev": true, + "@comunica/actor-rdf-resolve-hypermedia-qpf": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-resolve-hypermedia-qpf/-/actor-rdf-resolve-hypermedia-qpf-1.19.0.tgz", + "integrity": "sha512-wBpmCcAZ2f/28YW3/Vf0bhKRQBBHMe3glFwNC8EDW06sL1fddu/Tgm2MwQ1f9juOcl1SW7UTiRpax6C6vRi24g==", "requires": { - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-remap-async-to-generator": "^7.8.3" + "@comunica/bus-rdf-dereference": "^1.19.0", + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "rdf-data-factory": "^1.0.3", + "rdf-string": "^1.5.0", + "rdf-terms": "^1.6.2" } }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz", - "integrity": "sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==", - "dev": true, + "@comunica/actor-rdf-resolve-hypermedia-sparql": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-resolve-hypermedia-sparql/-/actor-rdf-resolve-hypermedia-sparql-1.19.0.tgz", + "integrity": "sha512-e9gdJoCCbsxmFHsvZ8d/Fw0JvGRFZtI2+5LmGpd1uy2inQCLr3PA5ds4uq38EpoeaBuGFOB4fJf9dWalLlmxRg==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@comunica/actor-rdf-resolve-quad-pattern-sparql-json": "^1.19.0", + "@comunica/bus-query-operation": "^1.19.0", + "@comunica/bus-rdf-resolve-quad-pattern": "^1.19.0", + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "rdf-data-factory": "^1.0.3", + "rdf-terms": "^1.6.2", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/plugin-transform-block-scoping": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz", - "integrity": "sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==", - "dev": true, + "@comunica/actor-rdf-resolve-quad-pattern-federated": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-resolve-quad-pattern-federated/-/actor-rdf-resolve-quad-pattern-federated-1.19.0.tgz", + "integrity": "sha512-6i1rZtnaDq/lfZlfVH0Ou/WAtQJ+HjqkEbvESYDem/jWMkVJVu7n+BlQ7BGoZljJm5rtc3KFZvG/7ienOBUJkg==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "lodash": "^4.17.13" + "@comunica/data-factory": "^1.17.0", + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "rdf-data-factory": "^1.0.3", + "rdf-terms": "^1.6.2", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/plugin-transform-classes": { - "version": "7.9.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.5.tgz", - "integrity": "sha512-x2kZoIuLC//O5iA7PEvecB105o7TLzZo8ofBVhP79N+DO3jaX+KYfww9TQcfBEZD0nikNyYcGB1IKtRq36rdmg==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-define-map": "^7.8.3", - "@babel/helper-function-name": "^7.9.5", - "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.6", - "@babel/helper-split-export-declaration": "^7.8.3", - "globals": "^11.1.0" + "@comunica/actor-rdf-resolve-quad-pattern-hypermedia": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-resolve-quad-pattern-hypermedia/-/actor-rdf-resolve-quad-pattern-hypermedia-1.19.0.tgz", + "integrity": "sha512-VjRa+LtFmnjntJ1ln8exDMp6z2Oe5eptE/jee9noDtxk8RVYna+4oiqdb91a292DceiHtGRvxFIK6o39JiVIyg==", + "requires": { + "@comunica/bus-rdf-metadata": "^1.19.0", + "@comunica/bus-rdf-metadata-extract": "^1.19.0", + "@comunica/utils-datasource": "^1.19.0", + "@types/lru-cache": "^5.1.0", + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "lru-cache": "^6.0.0", + "rdf-data-factory": "^1.0.3", + "rdf-string": "^1.5.0", + "rdf-terms": "^1.6.2", + "sparqlalgebrajs": "^2.4.0" + } + }, + "@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-resolve-quad-pattern-rdfjs-source/-/actor-rdf-resolve-quad-pattern-rdfjs-source-1.19.0.tgz", + "integrity": "sha512-D6rUWPJjb40mSWq7Z2Jgp6I0P8guSWQVb7J9eY8ldLsg4zkZdEhKtTkz0Kjre/Oz0X//q9xyyXPBk5aI9pa+yQ==", + "requires": { + "@types/rdf-js": "*", + "asynciterator": "^3.0.3" } }, - "@babel/plugin-transform-computed-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz", - "integrity": "sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==", - "dev": true, + "@comunica/actor-rdf-resolve-quad-pattern-sparql-json": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-resolve-quad-pattern-sparql-json/-/actor-rdf-resolve-quad-pattern-sparql-json-1.19.0.tgz", + "integrity": "sha512-t6CF04+dJ4/kgKsYkazTeFsb+UUSc0SbRGcv4EABg5LIzH8u2gCbp6rgxAGPoyKY8PoglfdQPiz8DRPnSQue+g==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "rdf-data-factory": "^1.0.3", + "rdf-terms": "^1.6.2", + "sparqlalgebrajs": "^2.4.0", + "sparqljson-parse": "^1.6.0" } }, - "@babel/plugin-transform-destructuring": { - "version": "7.9.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.9.5.tgz", - "integrity": "sha512-j3OEsGel8nHL/iusv/mRd5fYZ3DrOxWC82x0ogmdN/vHfAP4MYw+AFKYanzWlktNwikKvlzUV//afBW5FTp17Q==", - "dev": true, + "@comunica/actor-rdf-serialize-jsonld": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-serialize-jsonld/-/actor-rdf-serialize-jsonld-1.19.0.tgz", + "integrity": "sha512-LviscmjBVBeaav2eMC4OW9JMmCU+AcqNYCorChfMEIiJjA4NJ9kJuXBUr5LDrwrt2J+tV+nzFpeoSIKUCuvGxg==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "jsonld-streaming-serializer": "^1.2.0" } }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz", - "integrity": "sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==", - "dev": true, + "@comunica/actor-rdf-serialize-n3": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-rdf-serialize-n3/-/actor-rdf-serialize-n3-1.19.0.tgz", + "integrity": "sha512-1qNecAaMqYw2ZtWiblgmrPkQSRLAAeVE5l/fUQGlhFiFQRc3eW7hBo+UJxRoI4tzcWlsC9KXpn+4VDBXNePGpw==", "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@types/n3": "^1.4.4", + "@types/rdf-js": "*", + "n3": "^1.6.3", + "rdf-string": "^1.5.0" } }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz", - "integrity": "sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ==", - "dev": true, + "@comunica/actor-sparql-parse-algebra": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-sparql-parse-algebra/-/actor-sparql-parse-algebra-1.19.0.tgz", + "integrity": "sha512-lOVZMJD/IHElK0IgrCc4KEetJoxADjsXWBtarJPzE/tLG4YIqPO8cWZP8/qMnXr0h5MVQ5RViVWxlZ9ApZ5+NQ==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@types/sparqljs": "^3.0.0", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0", + "sparqljs": "^3.1.1" } }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz", - "integrity": "sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==", - "dev": true, + "@comunica/actor-sparql-parse-graphql": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-sparql-parse-graphql/-/actor-sparql-parse-graphql-1.19.0.tgz", + "integrity": "sha512-WFx1xxp01N51olVCx3amdjjHCQykPSfbzyUu7v2NwEtQ+K0W5wgHf/tG0bEPRU+BDmLcidosRYq7RMMS57wk/A==", "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "graphql-to-sparql": "^2.2.0" } }, - "@babel/plugin-transform-for-of": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz", - "integrity": "sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==", - "dev": true, + "@comunica/actor-sparql-serialize-json": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-sparql-serialize-json/-/actor-sparql-serialize-json-1.19.0.tgz", + "integrity": "sha512-R3t7K3CdAcJXA6ftj8gIuU5cn/HOM8znE+cIqYWliyVMZYBOf3qkYT1A3x9aCIhekBuu8k2wiGQfMSF6M5ZVNA==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@types/rdf-js": "*", + "rdf-string": "^1.5.0" } }, - "@babel/plugin-transform-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz", - "integrity": "sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ==", - "dev": true, + "@comunica/actor-sparql-serialize-rdf": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-sparql-serialize-rdf/-/actor-sparql-serialize-rdf-1.19.0.tgz", + "integrity": "sha512-otHLu0ago5u4AALQMlZgUFk0SZl0BRdwVjBlWH7tRnpTv1PKBp0kRbEVg59SPwo5eCgvi7zkjfvXckY3sSWOAw==" + }, + "@comunica/actor-sparql-serialize-simple": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-sparql-serialize-simple/-/actor-sparql-serialize-simple-1.19.0.tgz", + "integrity": "sha512-Kn33Aub+GriIGy0sIrx2IjUpAWRc0z3Dc2ejtdYHFeiHZz9zioCboAVLBa6bris5Bs3chkNuX9r405e2PsxVkw==", "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@types/rdf-js": "*" } }, - "@babel/plugin-transform-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz", - "integrity": "sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==", - "dev": true, + "@comunica/actor-sparql-serialize-sparql-csv": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-sparql-serialize-sparql-csv/-/actor-sparql-serialize-sparql-csv-1.19.0.tgz", + "integrity": "sha512-qYhyfNreI2kvpLTl4d0KA/pAVRx4P1VmdTJpby3dN7w6NuwLsjJB9U0uQkmwS0BSlSxLtNghe6AT4aT+PmRSNQ==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@comunica/bus-query-operation": "^1.19.0", + "@types/rdf-js": "*" } }, - "@babel/plugin-transform-member-expression-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz", - "integrity": "sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA==", - "dev": true, + "@comunica/actor-sparql-serialize-sparql-json": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-sparql-serialize-sparql-json/-/actor-sparql-serialize-sparql-json-1.19.0.tgz", + "integrity": "sha512-2pwLQcc5JOGt4NTE45nLj6xs2IW7MBlhdSvJEj4L8JNs4Q2uFhORyAorACLqQkuz6wgYf8ywwvrAj8Qm86hg7Q==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@types/rdf-js": "*" } }, - "@babel/plugin-transform-modules-amd": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.6.tgz", - "integrity": "sha512-zoT0kgC3EixAyIAU+9vfaUVKTv9IxBDSabgHoUCBP6FqEJ+iNiN7ip7NBKcYqbfUDfuC2mFCbM7vbu4qJgOnDw==", - "dev": true, + "@comunica/actor-sparql-serialize-sparql-tsv": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-sparql-serialize-sparql-tsv/-/actor-sparql-serialize-sparql-tsv-1.19.0.tgz", + "integrity": "sha512-97GKcXCIHDNz+q+PmZh2zA5Ue7jcvKYRls2RVi5gF0E9iV85SIFsMzKYwQb5hGRvXgVsfDJQTX0bfTCWLBXPOQ==", "requires": { - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.3" + "@comunica/bus-query-operation": "^1.19.0", + "@types/rdf-js": "*", + "rdf-string-ttl": "^1.1.0" } }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.6.tgz", - "integrity": "sha512-7H25fSlLcn+iYimmsNe3uK1at79IE6SKW9q0/QeEHTMC9MdOZ+4bA+T1VFB5fgOqBWoqlifXRzYD0JPdmIrgSQ==", - "dev": true, + "@comunica/actor-sparql-serialize-sparql-xml": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-sparql-serialize-sparql-xml/-/actor-sparql-serialize-sparql-xml-1.19.0.tgz", + "integrity": "sha512-ELXSELyf2wm5qwo+x2lW+Ckj3x9RtDpLbYCnluOJzDrc9yR4prhIgXL8FK08IMsKgWlHUiqy92CbtuWBdWnUZg==", "requires": { - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-simple-access": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.3" + "@types/rdf-js": "*", + "@types/xml": "^1.0.2", + "xml": "^1.0.1" } }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.6.tgz", - "integrity": "sha512-NW5XQuW3N2tTHim8e1b7qGy7s0kZ2OH3m5octc49K1SdAKGxYxeIx7hiIz05kS1R2R+hOWcsr1eYwcGhrdHsrg==", - "dev": true, + "@comunica/actor-sparql-serialize-stats": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-sparql-serialize-stats/-/actor-sparql-serialize-stats-1.19.0.tgz", + "integrity": "sha512-q3cBXzBtH1kebppNe8uVdzLkWWCICskWMVAhImgpmn3FVY8L9SRyxhLLdWsJA6mJ/Jx/0EkUptDkdEsI77EhkA==", "requires": { - "@babel/helper-hoist-variables": "^7.8.3", - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.3" + "@types/rdf-js": "*" } }, - "@babel/plugin-transform-modules-umd": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz", - "integrity": "sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ==", - "dev": true, + "@comunica/actor-sparql-serialize-table": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-sparql-serialize-table/-/actor-sparql-serialize-table-1.19.0.tgz", + "integrity": "sha512-rXLSm8RgoWJGC9ZcJ05VynZRkgEY4vF1QvLiiZIoArL/jEwJ736Z/J4xUDP0WOHk+enogqSyI+GZ9omGGy4peQ==", "requires": { - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3" + "@types/rdf-js": "*", + "rdf-terms": "^1.6.2" } }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz", - "integrity": "sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==", - "dev": true, + "@comunica/actor-sparql-serialize-tree": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/actor-sparql-serialize-tree/-/actor-sparql-serialize-tree-1.19.0.tgz", + "integrity": "sha512-2zzmS5/pHWXsXrSBuAp9GC2gkS3zSECqlbnPVsGP3fDxq4DND6reM01QRDo+X2pTDmIkfizClnTsOUMujTtlrQ==", "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3" + "@types/rdf-js": "*", + "sparqljson-to-tree": "^2.0.0" } }, - "@babel/plugin-transform-new-target": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz", - "integrity": "sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw==", - "dev": true, + "@comunica/bus-context-preprocess": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-context-preprocess/-/bus-context-preprocess-1.19.0.tgz", + "integrity": "sha512-8Ldmekq6TFuM+ZavgSTOGMda+BwtdrOW5+4llNhtALjNW+dOX2evQAxJTGKvAN9A4xM3JgV2umwpmsr552bx9Q==" + }, + "@comunica/bus-http": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-http/-/bus-http-1.19.0.tgz", + "integrity": "sha512-tbhB68Fj4b8WO+/38vVBvxV/E0W3d2yca5cANbCmdfrlO/TZXQ2JVD+1ylxR0uZiHXSHvClwGE7nSExBrE7gtw==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "is-stream": "^2.0.0", + "web-streams-node": "^0.4.0" } }, - "@babel/plugin-transform-object-super": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz", - "integrity": "sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==", - "dev": true, + "@comunica/bus-http-invalidate": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-http-invalidate/-/bus-http-invalidate-1.19.0.tgz", + "integrity": "sha512-BT/6dFMDfXctqYoQJc6MW4y7PhmgizZxMAy0ZBeSb9+hIJFTCo4Hs+YIldmDbeF/S81lMOXMNcj/JTqAQFcdog==" + }, + "@comunica/bus-init": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-init/-/bus-init-1.19.0.tgz", + "integrity": "sha512-QRsKQBa1dNJ55s5BiKcWzjXJPfKHx0HaS/ZQClusxQJkKqYJHcMw2KdQjlxYV5vxEowKAXKISMxdhtqPvpUBvA==" + }, + "@comunica/bus-optimize-query-operation": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-optimize-query-operation/-/bus-optimize-query-operation-1.19.0.tgz", + "integrity": "sha512-GR+6VBOGzA4CbTiDdzo9nn6/Me7cyJdJewxmLyw3ElAbgE4Bdk26rQm/A/lGBLa8MRx62nW3tDW6LAt5ZY0N3w==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.3" + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/plugin-transform-parameters": { - "version": "7.9.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.5.tgz", - "integrity": "sha512-0+1FhHnMfj6lIIhVvS4KGQJeuhe1GI//h5uptK4PvLt+BGBxsoUJbd3/IW002yk//6sZPlFgsG1hY6OHLcy6kA==", - "dev": true, + "@comunica/bus-query-operation": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-query-operation/-/bus-query-operation-1.19.0.tgz", + "integrity": "sha512-6jQ/q7nRZHhg3VRfUCiGbElo1vsJF4NEcZRLAXynA2H+1Sfn5jaZcRYRIVXh9/mBQJSOT+sRDYQ9q8SRZ4OqIQ==", "requires": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "immutable": "^3.8.2", + "rdf-string": "^1.5.0", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/plugin-transform-property-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz", - "integrity": "sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==", - "dev": true, + "@comunica/bus-rdf-dereference": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-rdf-dereference/-/bus-rdf-dereference-1.19.0.tgz", + "integrity": "sha512-m5ByPgL3t1PYwiXSgzaGSH9WQCqIIoDlKHhAqtfe9bhxDFmpw1LWBeCj6TVxC9V6yn76Uc7klVhC7+3AEi8PEQ==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@types/rdf-js": "*" } }, - "@babel/plugin-transform-regenerator": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz", - "integrity": "sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==", - "dev": true, + "@comunica/bus-rdf-dereference-paged": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-rdf-dereference-paged/-/bus-rdf-dereference-paged-1.19.0.tgz", + "integrity": "sha512-iQ37XmOfDc0r67zm5lwEpVvxGgpD4uKRhb3R/1c4wdI5SBBbgF8Giwt9TgV/4aEeXNeWCmluBpB1E8SDpATHBw==", "requires": { - "regenerator-transform": "^0.14.2" + "@types/rdf-js": "*", + "asynciterator": "^3.0.3" } }, - "@babel/plugin-transform-reserved-words": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz", - "integrity": "sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A==", - "dev": true, + "@comunica/bus-rdf-join": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-rdf-join/-/bus-rdf-join-1.19.0.tgz", + "integrity": "sha512-5NheasPmqkVgCVhsmX0BElMu9eYqRoJ1sjyTLiN9XLw9ui9kmFuk9+9jmWh7VHK17a/zTbcxbpCptZiRCtUkQQ==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@types/rdf-js": "*", + "asynciterator": "^3.0.3" } }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz", - "integrity": "sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==", - "dev": true, + "@comunica/bus-rdf-metadata": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-rdf-metadata/-/bus-rdf-metadata-1.19.0.tgz", + "integrity": "sha512-nwN7JhCsRHILHKfuRbiaqadW0ngfn1YOqgnZuqn0fWIulFEgcsGTIQlU7IRiLF5TjlX4WVaIqa4ZInyphU5/UA==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@types/rdf-js": "*" } }, - "@babel/plugin-transform-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz", - "integrity": "sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==", - "dev": true, + "@comunica/bus-rdf-metadata-extract": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-rdf-metadata-extract/-/bus-rdf-metadata-extract-1.19.0.tgz", + "integrity": "sha512-dh1PFzhvJuTjD3c42CsPCq7ybDjerSFhW2UtWMfBxZT5Aoo6cSdHRQPjc4crrFjgrBhSfmRNs/wyJ0vAcbwaMA==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@types/rdf-js": "*", + "graphql-ld": "^1.2.0", + "rdf-store-stream": "^1.0.1", + "sparqlalgebrajs": "^2.4.0", + "stream-to-string": "^1.2.0" } }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz", - "integrity": "sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==", - "dev": true, + "@comunica/bus-rdf-parse": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-rdf-parse/-/bus-rdf-parse-1.19.0.tgz", + "integrity": "sha512-j/1QCVxSmpJPk56rbK2Q3W/jCd2jPIxnBSPFz+2OQ6vXvKojHIx7j5jI18aFhSfQcxEX1LRoSbXAjS7PzKWByQ==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-regex": "^7.8.3" + "@comunica/actor-abstract-mediatyped": "^1.19.0", + "@types/rdf-js": "*" } }, - "@babel/plugin-transform-template-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz", - "integrity": "sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==", - "dev": true, + "@comunica/bus-rdf-parse-html": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-rdf-parse-html/-/bus-rdf-parse-html-1.19.0.tgz", + "integrity": "sha512-UZ5brAVi7LlEw2kdjoVjc4191BoRVby9DIV/fiIADL2L0ALmt2YpoMEaIefHzKAxdgT3rUDkQMvJWFoQBKjw3Q==", "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@types/rdf-js": "*" } }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz", - "integrity": "sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==", - "dev": true, + "@comunica/bus-rdf-resolve-hypermedia": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-rdf-resolve-hypermedia/-/bus-rdf-resolve-hypermedia-1.19.0.tgz", + "integrity": "sha512-28fzT3ALRHo4psmlPjUfNrZYWJJICeGqTED0kkjn3KsBh20kKeb1vjthMHLHr5AttgCsRYeZ5Tz7rWr20cb62g==", "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@comunica/bus-rdf-resolve-quad-pattern": "^1.19.0", + "@types/rdf-js": "*", + "asynciterator": "^3.0.3" } }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz", - "integrity": "sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==", - "dev": true, + "@comunica/bus-rdf-resolve-hypermedia-links": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-rdf-resolve-hypermedia-links/-/bus-rdf-resolve-hypermedia-links-1.19.0.tgz", + "integrity": "sha512-TfziR8qyOCvsWppzMuUhShSY6m1rwurULFEof/nLEU/SCXm7GDG4JwKA/PTRxERGqFRkhT5RW5K3EkgC81yRGw==" + }, + "@comunica/bus-rdf-resolve-quad-pattern": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-rdf-resolve-quad-pattern/-/bus-rdf-resolve-quad-pattern-1.19.0.tgz", + "integrity": "sha512-Zp2377J63MfxpSG822KFzlnU3dQOgouzcniIPsKVx03EU2OAyo41DbBZ5WyorDMLIiT9hkrpXFBLUHk0WwcTfw==", "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@types/rdf-js": "*", + "asynciterator": "^3.0.3", + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/preset-env": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.6.tgz", - "integrity": "sha512-0gQJ9RTzO0heXOhzftog+a/WyOuqMrAIugVYxMYf83gh1CQaQDjMtsOpqOwXyDL/5JcWsrCm8l4ju8QC97O7EQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.9.6", - "@babel/helper-compilation-targets": "^7.9.6", - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-proposal-async-generator-functions": "^7.8.3", - "@babel/plugin-proposal-dynamic-import": "^7.8.3", - "@babel/plugin-proposal-json-strings": "^7.8.3", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-proposal-numeric-separator": "^7.8.3", - "@babel/plugin-proposal-object-rest-spread": "^7.9.6", - "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", - "@babel/plugin-proposal-optional-chaining": "^7.9.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", - "@babel/plugin-syntax-async-generators": "^7.8.0", - "@babel/plugin-syntax-dynamic-import": "^7.8.0", - "@babel/plugin-syntax-json-strings": "^7.8.0", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", - "@babel/plugin-syntax-numeric-separator": "^7.8.0", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.0", - "@babel/plugin-syntax-top-level-await": "^7.8.3", - "@babel/plugin-transform-arrow-functions": "^7.8.3", - "@babel/plugin-transform-async-to-generator": "^7.8.3", - "@babel/plugin-transform-block-scoped-functions": "^7.8.3", - "@babel/plugin-transform-block-scoping": "^7.8.3", - "@babel/plugin-transform-classes": "^7.9.5", - "@babel/plugin-transform-computed-properties": "^7.8.3", - "@babel/plugin-transform-destructuring": "^7.9.5", - "@babel/plugin-transform-dotall-regex": "^7.8.3", - "@babel/plugin-transform-duplicate-keys": "^7.8.3", - "@babel/plugin-transform-exponentiation-operator": "^7.8.3", - "@babel/plugin-transform-for-of": "^7.9.0", - "@babel/plugin-transform-function-name": "^7.8.3", - "@babel/plugin-transform-literals": "^7.8.3", - "@babel/plugin-transform-member-expression-literals": "^7.8.3", - "@babel/plugin-transform-modules-amd": "^7.9.6", - "@babel/plugin-transform-modules-commonjs": "^7.9.6", - "@babel/plugin-transform-modules-systemjs": "^7.9.6", - "@babel/plugin-transform-modules-umd": "^7.9.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", - "@babel/plugin-transform-new-target": "^7.8.3", - "@babel/plugin-transform-object-super": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.9.5", - "@babel/plugin-transform-property-literals": "^7.8.3", - "@babel/plugin-transform-regenerator": "^7.8.7", - "@babel/plugin-transform-reserved-words": "^7.8.3", - "@babel/plugin-transform-shorthand-properties": "^7.8.3", - "@babel/plugin-transform-spread": "^7.8.3", - "@babel/plugin-transform-sticky-regex": "^7.8.3", - "@babel/plugin-transform-template-literals": "^7.8.3", - "@babel/plugin-transform-typeof-symbol": "^7.8.4", - "@babel/plugin-transform-unicode-regex": "^7.8.3", - "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.9.6", - "browserslist": "^4.11.1", - "core-js-compat": "^3.6.2", - "invariant": "^2.2.2", - "levenary": "^1.1.1", - "semver": "^5.5.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "@comunica/bus-rdf-serialize": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-rdf-serialize/-/bus-rdf-serialize-1.19.0.tgz", + "integrity": "sha512-VuzUAbZWA5YL1SD+aF0HJKCHiup2bZTD9TlYfx/NSWQOXzu2Ig2cqER++Dg/+1vU/VkzRVTTReARnDvRUMfjlg==", + "requires": { + "@comunica/actor-abstract-mediatyped": "^1.19.0", + "@types/rdf-js": "*" } }, - "@babel/preset-modules": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", - "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", - "dev": true, + "@comunica/bus-sparql-parse": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-sparql-parse/-/bus-sparql-parse-1.19.0.tgz", + "integrity": "sha512-kDVg/4Z3ZiHRYh1TzaqroQP/m7zRUdOyA2+PH7sqEAiNSRUOTH2qIVCw9WcljghfG3K1MzSQW8fw3CiGKFm8jw==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" + "sparqlalgebrajs": "^2.4.0" } }, - "@babel/runtime": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz", - "integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==", - "dev": true, + "@comunica/bus-sparql-serialize": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/bus-sparql-serialize/-/bus-sparql-serialize-1.19.0.tgz", + "integrity": "sha512-KJsiJDCqicLPLUSCYNUtEKKT3mUQ/MehMpmq3la3jwioqxShTE3VO+RXOGdDVOqILAU2xLVzzRRT9t8pQk/h7A==", "requires": { - "regenerator-runtime": "^0.13.4" + "@comunica/actor-abstract-mediatyped": "^1.19.0" } }, - "@babel/template": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", - "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", - "dev": true, + "@comunica/core": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/core/-/core-1.19.0.tgz", + "integrity": "sha512-/G9rNRL8KdvSuxnWObUhA0+sbcHCFejTrj0vnHaf/QZtqEO0b238QzoS9swwP1PdzPdR1R6TJ2ikr8AcVZyd9g==", "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.6", - "@babel/types": "^7.8.6" + "immutable": "^3.8.2" } }, - "@babel/traverse": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.6.tgz", - "integrity": "sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg==", - "dev": true, + "@comunica/data-factory": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@comunica/data-factory/-/data-factory-1.17.0.tgz", + "integrity": "sha512-AjU4kpIWq5Rx7MN/uGlmrAHCvPri2I6GMc+zUL7URMlj8veOk1R9w7ol5Z3mtpB65NhYQJtB4D9riff30b6/lw==", "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.6", - "@babel/helper-function-name": "^7.9.5", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.9.6", - "@babel/types": "^7.9.6", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" + "@types/rdf-js": "*" } }, - "@babel/types": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz", - "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==", - "dev": true, + "@comunica/logger-pretty": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/@comunica/logger-pretty/-/logger-pretty-1.19.1.tgz", + "integrity": "sha512-zZGimKhbX98GRAncMJ8yg+pEuxo+xOGxLrhB9lI0Fa+NmM2ygTlHYDKlrdb3xheGu9Y3Jllias980DqUeSDRIQ==" + }, + "@comunica/logger-void": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/logger-void/-/logger-void-1.19.0.tgz", + "integrity": "sha512-W+/pJBIvtmXVyXNDmChbT+sZuRDQeAWLp5KTUq3+5xCeJVoe+qQWOwebPSmA0VVmYQ5cqvMbGOY2dVcNyhiZbw==" + }, + "@comunica/mediator-all": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/mediator-all/-/mediator-all-1.19.0.tgz", + "integrity": "sha512-9xyEZUfnTdw4PW6rKFm47G/6Eq9DdTPeijgMK/JOrf0B6goIuPZNl8uKmlbMky44JD9svHFXcEHNwTPQvYyT/Q==" + }, + "@comunica/mediator-combine-pipeline": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/mediator-combine-pipeline/-/mediator-combine-pipeline-1.19.0.tgz", + "integrity": "sha512-H7HPjgYH/rM5gurXcZKW0rn6ANGQLCtEL34zNFK5wFBoKUWbOrHvfp6tiQ/Ydz2yuTIsP4ROy9z7SoMzgYPYRQ==" + }, + "@comunica/mediator-combine-union": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/mediator-combine-union/-/mediator-combine-union-1.19.0.tgz", + "integrity": "sha512-oNI9LjgJWu9O/sy3IEI78l16Y+I0yJx/mLhKyArDdh4ZgLeS4/7xtfWNFn9xs+1jMbKFBRtZwZe8M2qV0AAiWg==" + }, + "@comunica/mediator-number": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/mediator-number/-/mediator-number-1.19.0.tgz", + "integrity": "sha512-WN8MN64j0hOf1hEuiKGnagW6+m3nIcJWESZN3Y99jepIHxcBwy1XKmLoMK3qIIMPgBOOXFiTrZJQi9QZKJYtig==" + }, + "@comunica/mediator-race": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/mediator-race/-/mediator-race-1.19.0.tgz", + "integrity": "sha512-cW/wqjuC5qxeTL2EUcPDmvHr4ve1AE3faNFyQRrB3+BMB0K3ZnPfBvaajRBmgSIIb8jyxBQXRGcIxAv/RtURlg==" + }, + "@comunica/mediatortype-iterations": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/mediatortype-iterations/-/mediatortype-iterations-1.19.0.tgz", + "integrity": "sha512-7gn/f9qTTx9a9bhILFMkDlixdhTAFg982r/QQkLSWdqBoqpbEjw0Oqcm1hB40W3sZOLxrtnVL0BepOb1ol+f4w==" + }, + "@comunica/runner": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/runner/-/runner-1.19.0.tgz", + "integrity": "sha512-SQh2JF3l76h3tmHG8rhxkOHJvd0mPEwnYvTb/x4EAc53a0q/8ls5WmIKfyiG0nQNUI+iCnn3UwZgOEOZ4c6+dw==", "requires": { - "@babel/helper-validator-identifier": "^7.9.5", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" + "componentsjs": "^4.0.3" + } + }, + "@comunica/runner-cli": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/runner-cli/-/runner-cli-1.19.0.tgz", + "integrity": "sha512-ZXqREXUP3TbGAz9FkEiLyGYM9Z7TwoUYjc9Phwbad02eXtDTWobUZWgohsQxkKNT/DRd6GcTtmLyiAeD9zJmGA==", + "requires": { + "@comunica/runner": "^1.19.0" + } + }, + "@comunica/utils-datasource": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@comunica/utils-datasource/-/utils-datasource-1.19.0.tgz", + "integrity": "sha512-3a/Zuq3wtyLj/AAOqmjHxXPfRXLanCuPoWB+wea2VvfjO6w+ZhUm+HmEcSdM6+BHM9+ReOrTONY6Q88kiKGxLg==", + "requires": { + "@comunica/bus-rdf-resolve-quad-pattern": "^1.19.0", + "asynciterator": "^3.0.3" + } + }, + "@dabh/diagnostics": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.2.tgz", + "integrity": "sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q==", + "requires": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" } }, "@develar/schema-utils": { @@ -3547,9 +4061,9 @@ }, "dependencies": { "ajv": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "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", @@ -3559,30 +4073,40 @@ } }, "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "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 } } }, "@electron/get": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.12.2.tgz", - "integrity": "sha512-vAuHUbfvBQpYTJ5wB7uVIDq5c/Ry0fiTBMs7lnEYAo/qXXppIVcWdfBr57u6eRnKdVso7KSiH6p/LbQAG6Izrg==", + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.12.3.tgz", + "integrity": "sha512-NFwSnVZQK7dhOYF1NQCt+HGqgL1aNdj0LUSx75uCqnZJqyiWCVdAMFV4b4/kC8HjUJAnsvdSEmjEt4G2qNQ9+Q==", "dev": true, "requires": { "debug": "^4.1.1", "env-paths": "^2.2.0", + "filenamify": "^4.1.0", "fs-extra": "^8.1.0", "global-agent": "^2.0.2", "global-tunnel-ng": "^2.7.1", "got": "^9.6.0", "progress": "^2.0.3", - "sanitize-filename": "^1.6.2", + "semver": "^6.2.0", "sumchecker": "^3.0.1" }, "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -3603,6 +4127,18 @@ "graceful-fs": "^4.1.6" } }, + "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 + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -3611,10 +4147,332 @@ } } }, + "@emmetio/extract-abbreviation": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@emmetio/extract-abbreviation/-/extract-abbreviation-0.1.6.tgz", + "integrity": "sha512-Ce3xE2JvTSEbASFbRbA1gAIcMcZWdS2yUYRaQbeM0nbOzaZrUYfa3ePtcriYRZOZmr+CkKA+zbjhvTpIOAYVcw==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz", + "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "lodash": "^4.17.20", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "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" + } + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "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 + }, + "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 + } + } + }, + "@github/time-elements": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@github/time-elements/-/time-elements-3.1.1.tgz", + "integrity": "sha512-95TquDedxMpNb8BUrVIt9NEfdNBw4DRjdcECDPx4Ix6gkksI2npKRJBOV9XJMYjEIBo50iAiJzUuwL/fh3ptFw==", + "dev": true + }, + "@material/animation": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/animation/-/animation-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-m3eUpFRwxcP1tEWJlIH5q77YGSYEe5ITRw5OtyDvxU7ZzF0xKJbBeauQEdCmyig9UvK+J7jUUnCgkT/t/ldLtw==", + "dev": true, + "requires": { + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "@material/base": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/base/-/base-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-r98qY6EsPx6BlzT0Pj+H+BTI7r76GEX/zZPgajxZjbPAJSeeK+uCh69Dmhf63meLKaFkKgvLwH5udKJLMqqjpQ==", + "dev": true, + "requires": { + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "@material/button": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/button/-/button-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-ZjBDrGy2kKPmlIYaL99/C1D0t+MCIkP3Pcj9Y1RxxYdayvP+o8evkBUz5IRtg5NpW4o1X89x8RfF/JmLJZrdYw==", + "dev": true, + "requires": { + "@material/density": "9.0.0-canary.1c156d69d.0", + "@material/elevation": "9.0.0-canary.1c156d69d.0", + "@material/feature-targeting": "9.0.0-canary.1c156d69d.0", + "@material/ripple": "9.0.0-canary.1c156d69d.0", + "@material/rtl": "9.0.0-canary.1c156d69d.0", + "@material/shape": "9.0.0-canary.1c156d69d.0", + "@material/theme": "9.0.0-canary.1c156d69d.0", + "@material/touch-target": "9.0.0-canary.1c156d69d.0", + "@material/typography": "9.0.0-canary.1c156d69d.0" + } + }, + "@material/density": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/density/-/density-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-Y87bUpTsXNDOi1q5NVRBxIyTUAFda1PP1Z9HOvgpV19n7/F6YLrttLGcOFSRFfx9btUKf4EddctBzwzBrF71TQ==", + "dev": true + }, + "@material/dom": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/dom/-/dom-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-AwiQDzquolB7rqy8k4+QMVQ8Njb6k0CT+otJ/UNJbj0qNVXZB4njVaWRWrWCt70hYp1rG0cRNkZ01ZJDqABUFw==", + "dev": true, + "requires": { + "@material/feature-targeting": "9.0.0-canary.1c156d69d.0", + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "@material/elevation": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/elevation/-/elevation-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-ojX0+nRNkfJssFA/EXhwglDwW48xll1OPCVy8jJrRfvIasRHiIJBeRdnlU5BL4qxDJHaEoOfEMmVQP/Aj504Qw==", + "dev": true, + "requires": { + "@material/animation": "9.0.0-canary.1c156d69d.0", + "@material/base": "9.0.0-canary.1c156d69d.0", + "@material/feature-targeting": "9.0.0-canary.1c156d69d.0", + "@material/theme": "9.0.0-canary.1c156d69d.0" + } + }, + "@material/feature-targeting": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/feature-targeting/-/feature-targeting-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-HWd0+GMnkVB3anmUc9+MeWCNoogAbb4U7ihzwq7lzLCQyC+i/kunppkUVV7DhL3ZVl1O6zIw1eAT+dgQpN8x4Q==", + "dev": true + }, + "@material/icon-button": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/icon-button/-/icon-button-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-HSt3rCnG+ktAYG9R2obzwqHoZtsaNRAXe7jEyq4FK1cjucO0MLPEUKFFEOE7tPwRylNzNkzysjL6gTj6wZPsCQ==", + "dev": true, + "requires": { + "@material/base": "9.0.0-canary.1c156d69d.0", + "@material/density": "9.0.0-canary.1c156d69d.0", + "@material/feature-targeting": "9.0.0-canary.1c156d69d.0", + "@material/ripple": "9.0.0-canary.1c156d69d.0", + "@material/rtl": "9.0.0-canary.1c156d69d.0", + "@material/theme": "9.0.0-canary.1c156d69d.0", + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "@material/mwc-base": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@material/mwc-base/-/mwc-base-0.20.0.tgz", + "integrity": "sha512-q35jN1TGBts3LzKk2RVtgBpLDfBfRrx2hJ4GEVAeJsEGiO5CZrCD0bPlZSRTammzQBbDAh7szvhMiWo0TkRaWw==", + "dev": true, + "requires": { + "@material/base": "=9.0.0-canary.1c156d69d.0", + "@material/dom": "=9.0.0-canary.1c156d69d.0", + "lit-element": "^2.3.0", + "tslib": "^2.0.1" + } + }, + "@material/mwc-snackbar": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@material/mwc-snackbar/-/mwc-snackbar-0.20.0.tgz", + "integrity": "sha512-cJ8d09vhKTxtNl2oBaa/kZr4sF2IJfuS2ss8HkkGm+AMRB8S+VAgNfAXptGalcEWcY0dMFONdcVkb3FejHjVEg==", + "dev": true, + "requires": { + "@material/mwc-base": "^0.20.0", + "@material/snackbar": "=9.0.0-canary.1c156d69d.0", + "lit-element": "^2.3.0", + "lit-html": "^1.1.2", + "tslib": "^2.0.1" + } + }, + "@material/ripple": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/ripple/-/ripple-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-F1e/LQmYHQFORM/C3hchmANnRwJCXlc7Cp7W+VGpvJdtdzYlTd8DKKcShuOozxUQOjutbNf+Ql8gpZIdYRQaoQ==", + "dev": true, + "requires": { + "@material/animation": "9.0.0-canary.1c156d69d.0", + "@material/base": "9.0.0-canary.1c156d69d.0", + "@material/dom": "9.0.0-canary.1c156d69d.0", + "@material/feature-targeting": "9.0.0-canary.1c156d69d.0", + "@material/theme": "9.0.0-canary.1c156d69d.0", + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "@material/rtl": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/rtl/-/rtl-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-ICx0trLFna0M1Ina/1Nat9aSiB64o7VMs8wyCcidX//n7qFDOb0AtU9h2IB+lvX/UmPZVsDAoaL8iVm6RAqygg==", + "dev": true, + "requires": { + "@material/theme": "9.0.0-canary.1c156d69d.0" + } + }, + "@material/shape": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/shape/-/shape-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-3NPm+LNFfY4xsiwy/jo+kY3WIFDwlVyJhq+eimjZ9vpG7STBPyzi1LpiPKvsrk0rmvsy3M0c1alM8E+BQ5+UAg==", + "dev": true, + "requires": { + "@material/feature-targeting": "9.0.0-canary.1c156d69d.0", + "@material/rtl": "9.0.0-canary.1c156d69d.0", + "@material/theme": "9.0.0-canary.1c156d69d.0" + } + }, + "@material/snackbar": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/snackbar/-/snackbar-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-lLo+SwQx32xyPRomERUiupPyNFwTrDGUJVEEjtgXlIyb+CrHQXd4crZnuZroACVCZcMMe1oXIGa3lif/SsPqwQ==", + "dev": true, + "requires": { + "@material/animation": "9.0.0-canary.1c156d69d.0", + "@material/base": "9.0.0-canary.1c156d69d.0", + "@material/button": "9.0.0-canary.1c156d69d.0", + "@material/dom": "9.0.0-canary.1c156d69d.0", + "@material/elevation": "9.0.0-canary.1c156d69d.0", + "@material/feature-targeting": "9.0.0-canary.1c156d69d.0", + "@material/icon-button": "9.0.0-canary.1c156d69d.0", + "@material/ripple": "9.0.0-canary.1c156d69d.0", + "@material/rtl": "9.0.0-canary.1c156d69d.0", + "@material/shape": "9.0.0-canary.1c156d69d.0", + "@material/theme": "9.0.0-canary.1c156d69d.0", + "@material/typography": "9.0.0-canary.1c156d69d.0", + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "@material/theme": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/theme/-/theme-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-r1610TPwUplt4FHMk7cR06Oz1jU/G31wBIh4Frs/YIB0ZonVlI5cZdIkG0IFtNt9ZYWoDwfP/1nQBxdqrDPPhg==", + "dev": true, + "requires": { + "@material/feature-targeting": "9.0.0-canary.1c156d69d.0" + } + }, + "@material/touch-target": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/touch-target/-/touch-target-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-AFymS9cb152a2hEwTc80dVKA0ccNCyMAQNpvB6fEopPMLjO4Hrsu4fIHVyZF5xnz3k/iG59Y6vreHQdHKFGyUw==", + "dev": true, + "requires": { + "@material/base": "9.0.0-canary.1c156d69d.0", + "@material/feature-targeting": "9.0.0-canary.1c156d69d.0" + } + }, + "@material/typography": { + "version": "9.0.0-canary.1c156d69d.0", + "resolved": "https://registry.npmjs.org/@material/typography/-/typography-9.0.0-canary.1c156d69d.0.tgz", + "integrity": "sha512-+JgMe2fIP+lVh4l5qXfjH9/JWd+LnfDEiVr2clWHgAc3pc2LQm6VVgUbNkrX3yeWql0x7I/inGfQovza8BeYAw==", + "dev": true, + "requires": { + "@material/feature-targeting": "9.0.0-canary.1c156d69d.0", + "@material/theme": "9.0.0-canary.1c156d69d.0" + } + }, "@open-wc/dedupe-mixin": { - "version": "1.2.17", - "resolved": "https://registry.npmjs.org/@open-wc/dedupe-mixin/-/dedupe-mixin-1.2.17.tgz", - "integrity": "sha512-9A3WohqNxEloJa4y1DuBL5zH12cNRNW1vsrkiaLMnOGuQdhibs2XY1oliudsKpvIeNjDXRVRPUdIIzn65BypCw==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@open-wc/dedupe-mixin/-/dedupe-mixin-1.3.0.tgz", + "integrity": "sha512-UfdK1MPnR6T7f3svzzYBfu3qBkkZ/KsPhcpc3JYhsUY4hbpwNF9wEQtD4Z+/mRqMTJrKg++YSxIxE0FBhY3RIw==" + }, + "@open-wc/eslint-config": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@open-wc/eslint-config/-/eslint-config-4.2.0.tgz", + "integrity": "sha512-+HyzbR2tJ+8KSbv/ytxMk5SIcO306ilVQtNchcN71SnHsNSE2dWnFOMy9cG2rYZ9zjx7RXgmEiS/2ta/RdMQ5A==", + "dev": true, + "requires": { + "eslint": "^7.6.0", + "eslint-config-airbnb-base": "^14.0.0", + "eslint-plugin-html": "^6.0.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-lit": "^1.2.0", + "eslint-plugin-lit-a11y": "^1.0.1", + "eslint-plugin-no-only-tests": "^2.4.0", + "eslint-plugin-wc": "^1.2.0" + } }, "@pika/cli": { "version": "0.2.0", @@ -3654,16 +4512,6 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } } } }, @@ -3718,25 +4566,6 @@ "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" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } } } }, @@ -3756,8 +4585,7 @@ "@polymer/font-roboto": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@polymer/font-roboto/-/font-roboto-3.0.2.tgz", - "integrity": "sha512-tx5TauYSmzsIvmSqepUPDYbs4/Ejz2XbZ1IkD7JEGqkdNUJlh+9KU85G56Tfdk/xjEZ8zorFfN09OSwiMrIQWA==", - "dev": true + "integrity": "sha512-tx5TauYSmzsIvmSqepUPDYbs4/Ejz2XbZ1IkD7JEGqkdNUJlh+9KU85G56Tfdk/xjEZ8zorFfN09OSwiMrIQWA==" }, "@polymer/font-roboto-local": { "version": "3.0.2", @@ -3766,10 +4594,9 @@ "dev": true }, "@polymer/iron-a11y-announcer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@polymer/iron-a11y-announcer/-/iron-a11y-announcer-3.0.2.tgz", - "integrity": "sha512-LqnMF39mXyxSSRbTHRzGbcJS8nU0NVTo2raBOgOlpxw5yfGJUVcwaTJ/qy5NtWCZLRfa4suycf0oAkuUjHTXHQ==", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@polymer/iron-a11y-announcer/-/iron-a11y-announcer-3.1.0.tgz", + "integrity": "sha512-lc5i4NKB8kSQHH0Hwu8WS3ym93m+J69OHJWSSBxwd17FI+h2wmgxDzeG9LI4ojMMck17/uc2pLe7g/UHt5/K/A==", "requires": { "@polymer/polymer": "^3.0.0" } @@ -3778,7 +4605,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/@polymer/iron-a11y-keys-behavior/-/iron-a11y-keys-behavior-3.0.1.tgz", "integrity": "sha512-lnrjKq3ysbBPT/74l0Fj0U9H9C35Tpw2C/tpJ8a+5g8Y3YJs1WSZYnEl1yOkw6sEyaxOq/1DkzH0+60gGu5/PQ==", - "dev": true, "requires": { "@polymer/polymer": "^3.0.0" } @@ -3787,29 +4613,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/@polymer/iron-ajax/-/iron-ajax-3.0.1.tgz", "integrity": "sha512-7+TPEAfWsRdhj1Y8UeF1759ktpVu+c3sG16rJiUC3wF9+woQ9xI1zUm2d59i7Yc3aDEJrR/Q8Y262KlOvyGVNg==", - "dev": true, - "requires": { - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/iron-behaviors": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/iron-behaviors/-/iron-behaviors-3.0.1.tgz", - "integrity": "sha512-IMEwcv1lhf1HSQxuyWOUIL0lOBwmeaoSTpgCJeP9IBYnuB1SPQngmfRuHKgK6/m9LQ9F9miC7p3HeQQUdKAE0w==", - "dev": true, - "requires": { - "@polymer/iron-a11y-keys-behavior": "^3.0.0-pre.26", - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/iron-checked-element-behavior": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/iron-checked-element-behavior/-/iron-checked-element-behavior-3.0.1.tgz", - "integrity": "sha512-aDr0cbCNVq49q+pOqa6CZutFh+wWpwPMLpEth9swx+GkAj+gCURhuQkaUYhIo5f2egDbEioR1aeHMnPlU9dQZA==", - "dev": true, "requires": { - "@polymer/iron-form-element-behavior": "^3.0.0-pre.26", - "@polymer/iron-validatable-behavior": "^3.0.0-pre.26", "@polymer/polymer": "^3.0.0" } }, @@ -3827,7 +4631,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/@polymer/iron-fit-behavior/-/iron-fit-behavior-3.0.2.tgz", "integrity": "sha512-JndryJYbBR3gSN5IlST4rCHsd01+OyvYpRO6z5Zd3C6u5V/m07TwAtcf3aXwZ8WBNt2eLG28OcvdSO7XR2v2pg==", - "dev": true, "requires": { "@polymer/polymer": "^3.0.0" } @@ -3836,27 +4639,16 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/@polymer/iron-flex-layout/-/iron-flex-layout-3.0.1.tgz", "integrity": "sha512-7gB869czArF+HZcPTVSgvA7tXYFze9EKckvM95NB7SqYF+NnsQyhoXgKnpFwGyo95lUjUW9TFDLUwDXnCYFtkw==", - "dev": true, - "requires": { - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/iron-form": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/iron-form/-/iron-form-3.0.1.tgz", - "integrity": "sha512-JwSQXHjYALsytCeBkXlY8aRwqgZuYIqzOk3iHuugb1RXOdZ7MZHyJhMDVBbscHjxqPKu/KaVzAjrcfwNNafzEA==", - "dev": true, "requires": { - "@polymer/iron-ajax": "^3.0.0-pre.26", "@polymer/polymer": "^3.0.0" } }, - "@polymer/iron-form-element-behavior": { + "@polymer/iron-form": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/iron-form-element-behavior/-/iron-form-element-behavior-3.0.1.tgz", - "integrity": "sha512-G/e2KXyL5AY7mMjmomHkGpgS0uAf4ovNpKhkuUTRnMuMJuf589bKqE85KN4ovE1Tzhv2hJoh/igyD6ekHiYU1A==", - "dev": true, + "resolved": "https://registry.npmjs.org/@polymer/iron-form/-/iron-form-3.0.1.tgz", + "integrity": "sha512-JwSQXHjYALsytCeBkXlY8aRwqgZuYIqzOk3iHuugb1RXOdZ7MZHyJhMDVBbscHjxqPKu/KaVzAjrcfwNNafzEA==", "requires": { + "@polymer/iron-ajax": "^3.0.0-pre.26", "@polymer/polymer": "^3.0.0" } }, @@ -3864,7 +4656,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/@polymer/iron-icon/-/iron-icon-3.0.1.tgz", "integrity": "sha512-QLPwirk+UPZNaLnMew9VludXA4CWUCenRewgEcGYwdzVgDPCDbXxy6vRJjmweZobMQv/oVLppT2JZtJFnPxX6g==", - "dev": true, "requires": { "@polymer/iron-flex-layout": "^3.0.0-pre.26", "@polymer/iron-meta": "^3.0.0-pre.26", @@ -3875,7 +4666,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/@polymer/iron-iconset-svg/-/iron-iconset-svg-3.0.1.tgz", "integrity": "sha512-XNwURbNHRw6u2fJe05O5fMYye6GSgDlDqCO+q6K1zAnKIrpgZwf2vTkBd5uCcZwsN0FyCB3mvNZx4jkh85dRDw==", - "dev": true, "requires": { "@polymer/iron-meta": "^3.0.0-pre.26", "@polymer/polymer": "^3.0.0" @@ -3890,23 +4680,10 @@ "@polymer/polymer": "^3.0.0" } }, - "@polymer/iron-menu-behavior": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@polymer/iron-menu-behavior/-/iron-menu-behavior-3.0.2.tgz", - "integrity": "sha512-8dpASkFNBIkxAJWsFLWIO1M7tKM0+wKs3PqdeF/dDdBciwoaaFgC2K1XCZFZnbe2t9/nJgemXxVugGZAWpYCGg==", - "dev": true, - "requires": { - "@polymer/iron-a11y-keys-behavior": "^3.0.0-pre.26", - "@polymer/iron-flex-layout": "^3.0.0-pre.26", - "@polymer/iron-selector": "^3.0.0-pre.26", - "@polymer/polymer": "^3.0.0" - } - }, "@polymer/iron-meta": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@polymer/iron-meta/-/iron-meta-3.0.1.tgz", "integrity": "sha512-pWguPugiLYmWFV9UWxLWzZ6gm4wBwQdDy4VULKwdHCqR7OP7u98h+XDdGZsSlDPv6qoryV/e3tGHlTIT0mbzJA==", - "dev": true, "requires": { "@polymer/polymer": "^3.0.0" } @@ -3915,7 +4692,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@polymer/iron-overlay-behavior/-/iron-overlay-behavior-3.0.3.tgz", "integrity": "sha512-Q/Fp0+uOQQ145ebZ7T8Cxl4m1tUKYjyymkjcL2rXUm+aDQGb1wA1M1LYxUF5YBqd+9lipE0PTIiYwA2ZL/sznA==", - "dev": true, "requires": { "@polymer/iron-a11y-keys-behavior": "^3.0.0-pre.26", "@polymer/iron-fit-behavior": "^3.0.0-pre.26", @@ -3927,7 +4703,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/@polymer/iron-range-behavior/-/iron-range-behavior-3.0.1.tgz", "integrity": "sha512-+jtL9v45M/T1RJleWyQaNH84S9/mIIR+AjNbYIttbKGp1eG+98j8MDWe7LXNtg79V2LQnE/+VS82cBeELyGVeg==", - "dev": true, "requires": { "@polymer/polymer": "^3.0.0" } @@ -3936,7 +4711,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/@polymer/iron-resizable-behavior/-/iron-resizable-behavior-3.0.1.tgz", "integrity": "sha512-FyHxRxFspVoRaeZSWpT3y0C9awomb4tXXolIJcZ7RvXhMP632V5lez+ch5G5SwK0LpnAPkg35eB0LPMFv+YMMQ==", - "dev": true, "requires": { "@polymer/polymer": "^3.0.0" } @@ -3950,146 +4724,10 @@ "@polymer/polymer": "^3.0.0" } }, - "@polymer/iron-selector": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/iron-selector/-/iron-selector-3.0.1.tgz", - "integrity": "sha512-sBVk2uas6prW0glUe2xEJJYlvxmYzM40Au9OKbfDK2Qekou/fLKcBRyIYI39kuI8zWRaip8f3CI8qXcUHnKb1A==", - "dev": true, - "requires": { - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/iron-test-helpers": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/iron-test-helpers/-/iron-test-helpers-3.0.1.tgz", - "integrity": "sha512-2R7dnGcW2eg95i7LhYWWUO4AlAk6qXsPnKoyeN2R1t0km0ECMx0jjwqeLwCo8/7LwuVPZSiarI4DK7jyU7fJLQ==", - "dev": true, - "requires": { - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/iron-validatable-behavior": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/iron-validatable-behavior/-/iron-validatable-behavior-3.0.1.tgz", - "integrity": "sha512-wwpYh6wOa4fNI+jH5EYKC7TVPYQ2OfgQqocWat7GsNWcsblKYhLYbwsvEY5nO0n2xKqNfZzDLrUom5INJN7msQ==", - "dev": true, - "requires": { - "@polymer/iron-meta": "^3.0.0-pre.26", - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/neon-animation": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/neon-animation/-/neon-animation-3.0.1.tgz", - "integrity": "sha512-cDDc0llpVCe0ATbDS3clDthI54Bc8YwZIeTGGmBJleKOvbRTUC5+ssJmRL+VwVh+VM5FlnQlx760ppftY3uprg==", - "dev": true, - "requires": { - "@polymer/iron-resizable-behavior": "^3.0.0-pre.26", - "@polymer/iron-selector": "^3.0.0-pre.26", - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/paper-behaviors": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/paper-behaviors/-/paper-behaviors-3.0.1.tgz", - "integrity": "sha512-6knhj69fPJejv8qR0kCSUY+Q0XjaUf0OSnkjRjmTJPAwSrRYtgqE+l6P1FfA+py1X/cUjgne9EF5rMZAKJIg1g==", - "dev": true, - "requires": { - "@polymer/iron-behaviors": "^3.0.0-pre.26", - "@polymer/iron-checked-element-behavior": "^3.0.0-pre.26", - "@polymer/paper-ripple": "^3.0.0-pre.26", - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/paper-button": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/paper-button/-/paper-button-3.0.1.tgz", - "integrity": "sha512-JRNBc+Oj9EWnmyLr7FcCr8T1KAnEHPh6mosln9BUdkM+qYaYsudSICh3cjTIbnj6AuF5OJidoLkM1dlyj0j6Zg==", - "dev": true, - "requires": { - "@polymer/iron-flex-layout": "^3.0.0-pre.26", - "@polymer/paper-behaviors": "^3.0.0-pre.27", - "@polymer/paper-styles": "^3.0.0-pre.26", - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/paper-dialog": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/paper-dialog/-/paper-dialog-3.0.1.tgz", - "integrity": "sha512-KvglYbEq7AWJvui2j6WKLnOvgVMeGjovAydGrPRj7kVzCiD49Eq/hpYFJTRV5iDcalWH+mORUpw+jrFnG9+Kgw==", - "dev": true, - "requires": { - "@polymer/iron-overlay-behavior": "^3.0.0-pre.27", - "@polymer/neon-animation": "^3.0.0-pre.26", - "@polymer/paper-dialog-behavior": "^3.0.0-pre.26", - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/paper-dialog-behavior": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/paper-dialog-behavior/-/paper-dialog-behavior-3.0.1.tgz", - "integrity": "sha512-wbI4kCK8le/9MHT+IXzvHjoatxf3kd3Yn0tgozAiAwfSZ7N4Ubpi5MHrK0m9S9PeIxKokAgBYdTUrezSE5378A==", - "dev": true, - "requires": { - "@polymer/iron-overlay-behavior": "^3.0.0-pre.27", - "@polymer/paper-styles": "^3.0.0-pre.26", - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/paper-fab": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/paper-fab/-/paper-fab-3.0.1.tgz", - "integrity": "sha512-LO8ckgd72MnAtC1WiPd5CFR27WC/dEuY/lOIQuHYdEjwI62+iiV7Bmr7uoQ9wvvV71qMFdMIOyq/03KklsuAzw==", - "dev": true, - "requires": { - "@polymer/iron-flex-layout": "^3.0.0-pre.26", - "@polymer/iron-icon": "^3.0.0-pre.26", - "@polymer/paper-behaviors": "^3.0.0-pre.27", - "@polymer/paper-styles": "^3.0.0-pre.26", - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/paper-icon-button": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@polymer/paper-icon-button/-/paper-icon-button-3.0.2.tgz", - "integrity": "sha512-kOdxQgnKL097bggFF6PWvsBYuWg+MCcoHoTHX6bh/MuZoWFZNjrFntFqwuB4oEbpjCpfm4moA33muPJFj7CihQ==", - "dev": true, - "requires": { - "@polymer/iron-icon": "^3.0.0-pre.26", - "@polymer/paper-behaviors": "^3.0.0-pre.27", - "@polymer/paper-styles": "^3.0.0-pre.26", - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/paper-item": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/paper-item/-/paper-item-3.0.1.tgz", - "integrity": "sha512-KTk2N+GsYiI/HuubL3sxebZ6tteQbBOAp4QVLAnbjSPmwl+mJSDWk+omuadesU0bpkCwaWVs3fHuQsmXxy4pkw==", - "dev": true, - "requires": { - "@polymer/iron-behaviors": "^3.0.0-pre.26", - "@polymer/iron-flex-layout": "^3.0.0-pre.26", - "@polymer/paper-styles": "^3.0.0-pre.26", - "@polymer/polymer": "^3.0.0" - } - }, - "@polymer/paper-listbox": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@polymer/paper-listbox/-/paper-listbox-3.0.1.tgz", - "integrity": "sha512-vMLWFpYcggAPmEDBmK+96fFefacOG3GLB1EguTn8+ZkqI+328hNfw1MzHjH68rgCIIUtjmm+9qgB1Sy/MN0a/A==", - "dev": true, - "requires": { - "@polymer/iron-behaviors": "^3.0.0-pre.26", - "@polymer/iron-menu-behavior": "^3.0.0-pre.26", - "@polymer/paper-styles": "^3.0.0-pre.26", - "@polymer/polymer": "^3.0.0" - } - }, "@polymer/paper-progress": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@polymer/paper-progress/-/paper-progress-3.0.1.tgz", "integrity": "sha512-5nguG+tmnyoaWKVNG8Smtno2uLSPBgEsT3f20JY8yJTjUBYWaqa8E3l5RLkTRXgA4x9OnvLb8/CdlQWXQIogBg==", - "dev": true, "requires": { "@polymer/iron-flex-layout": "^3.0.0-pre.26", "@polymer/iron-range-behavior": "^3.0.0-pre.26", @@ -4101,7 +4739,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/@polymer/paper-ripple/-/paper-ripple-3.0.2.tgz", "integrity": "sha512-DnLNvYIMsiayeICroYxx6Q6Hg1cUU8HN2sbutXazlemAlGqdq80qz3TIaVdbpbt/pvjcFGX2HtntMlPstCge8Q==", - "dev": true, "requires": { "@polymer/iron-a11y-keys-behavior": "^3.0.0-pre.26", "@polymer/polymer": "^3.0.0" @@ -4121,7 +4758,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/@polymer/paper-styles/-/paper-styles-3.0.1.tgz", "integrity": "sha512-y6hmObLqlCx602TQiSBKHqjwkE7xmDiFkoxdYGaNjtv4xcysOTdVJsDR/R9UHwIaxJ7gHlthMSykir1nv78++g==", - "dev": true, "requires": { "@polymer/font-roboto": "^3.0.1", "@polymer/iron-flex-layout": "^3.0.0-pre.26", @@ -4132,7 +4768,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/@polymer/paper-toast/-/paper-toast-3.0.1.tgz", "integrity": "sha512-pizuogzObniDdICUc6dSLrnDt2VzzoRne1gCmbD6sfOATVv5tc8UfrqhA2iHngbNBEbniBiciS3iogdp5KTVUQ==", - "dev": true, "requires": { "@polymer/iron-a11y-announcer": "^3.0.0-pre.26", "@polymer/iron-fit-behavior": "^3.0.0-pre.26", @@ -4144,7 +4779,6 @@ "version": "3.4.1", "resolved": "https://registry.npmjs.org/@polymer/polymer/-/polymer-3.4.1.tgz", "integrity": "sha512-KPWnhDZibtqKrUz7enIPOiO4ZQoJNOuLwqrhV2MXzIt3VVnUVJVG5ORz4Z2sgO+UZ+/UZnPD0jqY+jmw/+a9mQ==", - "dev": true, "requires": { "@webcomponents/shadycss": "^1.9.1" } @@ -4166,9 +4800,9 @@ "dev": true }, "@sinonjs/commons": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.0.tgz", - "integrity": "sha512-wEj54PfsZ5jGSwMX68G8ZXFawcSglQSXqCftWX3ec8MDUzQdHgcKvw97awHbY0efQEL5iKUOAmmVtoYgmrSG4Q==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.2.tgz", + "integrity": "sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw==", "dev": true, "requires": { "type-detect": "4.0.8" @@ -4183,20 +4817,10 @@ "@sinonjs/commons": "^1.7.0" } }, - "@sinonjs/formatio": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", - "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^5.0.2" - } - }, "@sinonjs/samsam": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.0.3.tgz", - "integrity": "sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", + "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", @@ -4219,26 +4843,85 @@ "defer-to-connect": "^1.0.1" } }, - "@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==" + "@types/cacheable-request": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.1.tgz", + "integrity": "sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ==", + "dev": true, + "requires": { + "@types/http-cache-semantics": "*", + "@types/keyv": "*", + "@types/node": "*", + "@types/responselike": "*" + } + }, + "@types/chai": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.14.tgz", + "integrity": "sha512-G+ITQPXkwTrslfG5L/BksmbLUA0M1iybEsmCWPqzSxsRRhJZimBKJkoMi8fr/CPygPTj4zO5pJH7I2/cm9M7SQ==", + "dev": true + }, + "@types/codemirror": { + "version": "0.0.100", + "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.100.tgz", + "integrity": "sha512-4jGmu1T8vpQrJCe8cbe3KveiJmK2UAt3rZO2qE2sPoMhGLuwW0cMzFYJLyXebbRJg5G3RbuUXLip1IHPUESkFA==", + "requires": { + "@types/tern": "*" + } }, "@types/debug": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.5.tgz", "integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==" }, + "@types/esm": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@types/esm/-/esm-3.2.0.tgz", + "integrity": "sha512-aXemgVPnF1s0PQin04Ei8zTWaNwUdc4pmhZDg8LBW6QEl9kBWVItAUOLGUY5H5xduAmbL1pLGH1X/PN0+4R9tg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/estree": { - "version": "0.0.44", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.44.tgz", - "integrity": "sha512-iaIVzr+w2ZJ5HkidlZ3EJM8VTZb2MJLCjw3V+505yVts0gRC4UMvjw0d1HPtGqI/HQC/KdsYtayfzl+AXY2R8g==", - "dev": true + "version": "0.0.46", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.46.tgz", + "integrity": "sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg==" }, "@types/fs-extra": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.1.1.tgz", - "integrity": "sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w==", + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.6.tgz", + "integrity": "sha512-ecNRHw4clCkowNOBJH1e77nvbPxHYnWIXMv1IAoG/9+MYGkgoyr3Ppxr7XYFNL41V422EDhyV4/4SSK8L2mlig==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/http-cache-semantics": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz", + "integrity": "sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A==", + "dev": true + }, + "@types/http-link-header": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/http-link-header/-/http-link-header-1.0.2.tgz", + "integrity": "sha512-rWvCGMtwx+01LFVpLbSYagloSMgqDwfzLSx9JcwUEkJWo4oDBKihp6X92Ff5tIS4VE5ojV4wH6iMnAnr/TZhhg==", + "requires": { + "@types/node": "*" + } + }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, + "@types/keyv": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.1.tgz", + "integrity": "sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw==", + "dev": true, "requires": { "@types/node": "*" } @@ -4248,6 +4931,16 @@ "resolved": "https://registry.npmjs.org/@types/lockfile/-/lockfile-1.0.1.tgz", "integrity": "sha512-65WZedEm4AnOsBDdsapJJG42MhROu3n4aSSiu87JXF/pSdlubxZxp3S1yz3kTfkJ2KBPud4CpjoHVAptOm9Zmw==" }, + "@types/lru-cache": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.0.tgz", + "integrity": "sha512-RaE0B+14ToE4l6UqdarKPnXwVDuigfFv+5j9Dze/Nqr23yyuqdNvzcZi3xB+3Agvi5R4EOgAksfv3lXX4vBt9w==" + }, + "@types/minimist": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", + "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==" + }, "@types/minipass": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@types/minipass/-/minipass-2.2.0.tgz", @@ -4256,20 +4949,262 @@ "@types/node": "*" } }, + "@types/mocha": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.0.tgz", + "integrity": "sha512-/Sge3BymXo4lKc31C8OINJgXLaw+7vL1/L1pGiBNpGrBiT8FQiaFpSYV0uhTaG4y78vcMBTMFsWaHDvuD+xGzQ==", + "dev": true + }, + "@types/n3": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@types/n3/-/n3-1.4.4.tgz", + "integrity": "sha512-xsWfwyDh0uAH0CXvwqe9vb2UEDafMjRez/pB7yZwbWpd9Olw2wdxaL32FtdHjmmFE6b9i+j249JfRyZnvWkoqg==", + "requires": { + "@types/node": "*", + "@types/rdf-js": "*" + } + }, "@types/node": { - "version": "14.0.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz", - "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==" + "version": "14.14.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz", + "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==" }, "@types/node-fetch": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz", - "integrity": "sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==", + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.8.tgz", + "integrity": "sha512-fbjI6ja0N5ZA8TV53RUqzsKNkl9fv8Oj3T7zxW7FGv1GSH7gwJaNF8dzCjrqKaxKeUpTz4yT1DaJFq/omNpGfw==", "requires": { "@types/node": "*", "form-data": "^3.0.0" } }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "@types/parse-link-header": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-link-header/-/parse-link-header-1.0.0.tgz", + "integrity": "sha512-fCA3btjE7QFeRLfcD0Sjg+6/CnmC66HpMBoRfRzd2raTaWMJV21CCZ0LO8MOqf8onl5n0EPfjq4zDhbyX8SVwA==" + }, + "@types/parse5": { + "version": "2.2.34", + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-2.2.34.tgz", + "integrity": "sha1-44cKEOgnNacg9i1x3NGDunjvOp0=", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/pouchdb": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@types/pouchdb/-/pouchdb-6.4.0.tgz", + "integrity": "sha512-eGCpX+NXhd5VLJuJMzwe3L79fa9+IDTrAG3CPaf4s/31PD56hOrhDJTSmRELSXuiqXr6+OHzzP0PldSaWsFt7w==", + "dev": true, + "requires": { + "@types/pouchdb-adapter-cordova-sqlite": "*", + "@types/pouchdb-adapter-fruitdown": "*", + "@types/pouchdb-adapter-http": "*", + "@types/pouchdb-adapter-idb": "*", + "@types/pouchdb-adapter-leveldb": "*", + "@types/pouchdb-adapter-localstorage": "*", + "@types/pouchdb-adapter-memory": "*", + "@types/pouchdb-adapter-node-websql": "*", + "@types/pouchdb-adapter-websql": "*", + "@types/pouchdb-browser": "*", + "@types/pouchdb-core": "*", + "@types/pouchdb-http": "*", + "@types/pouchdb-mapreduce": "*", + "@types/pouchdb-node": "*", + "@types/pouchdb-replication": "*" + } + }, + "@types/pouchdb-adapter-cordova-sqlite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/pouchdb-adapter-cordova-sqlite/-/pouchdb-adapter-cordova-sqlite-1.0.0.tgz", + "integrity": "sha512-NsqpEYKunBS/BPvttlOVQ5Me6LdU6UYZB0Qak3XS/AvLeIRdF61MZ/czSuL/ozydYr6bikewt6dvlpCK1HWG9Q==", + "dev": true, + "requires": { + "@types/pouchdb-core": "*" + } + }, + "@types/pouchdb-adapter-fruitdown": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/pouchdb-adapter-fruitdown/-/pouchdb-adapter-fruitdown-6.1.3.tgz", + "integrity": "sha512-Wz1Z1JLOW1hgmFQjqnSkmyyfH7by/iWb4abKn684WMvQfmxx6BxKJpJ4+eulkVPQzzgMMSgU1MpnQOm9FgRkbw==", + "dev": true, + "requires": { + "@types/pouchdb-core": "*" + } + }, + "@types/pouchdb-adapter-http": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/pouchdb-adapter-http/-/pouchdb-adapter-http-6.1.3.tgz", + "integrity": "sha512-9Z4TLbF/KJWy/D2sWRPBA+RNU0odQimfdvlDX+EY7rGcd3aVoH8qjD/X0Xcd/0dfBH5pKrNIMFFQgW/TylRCmA==", + "dev": true, + "requires": { + "@types/pouchdb-core": "*" + } + }, + "@types/pouchdb-adapter-idb": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/pouchdb-adapter-idb/-/pouchdb-adapter-idb-6.1.3.tgz", + "integrity": "sha512-K4G9pmHkR2JyL8d6cllIEix2dtQFVIJyDcgoT7ctrbIyyhT4kRjieGc3O7tzIhm1bv7W2qz1aResO9lq7qjKVQ==", + "dev": true, + "requires": { + "@types/pouchdb-core": "*" + } + }, + "@types/pouchdb-adapter-leveldb": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/pouchdb-adapter-leveldb/-/pouchdb-adapter-leveldb-6.1.3.tgz", + "integrity": "sha512-ex8NFqQGFwEpFi7AaZ5YofmuemfZNsL3nTFZBUCAKYMBkazQij1pe2ILLStSvJr0XS0qxgXjCEW19T5Wqiiskg==", + "dev": true, + "requires": { + "@types/pouchdb-core": "*" + } + }, + "@types/pouchdb-adapter-localstorage": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/pouchdb-adapter-localstorage/-/pouchdb-adapter-localstorage-6.1.3.tgz", + "integrity": "sha512-oor040tye1KKiGLWYtIy7rRT7C2yoyX3Tf6elEJRpjOA7Ja/H8lKc4LaSh9ATbptIcES6MRqZDxtp7ly9hsW3Q==", + "dev": true, + "requires": { + "@types/pouchdb-core": "*" + } + }, + "@types/pouchdb-adapter-memory": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/pouchdb-adapter-memory/-/pouchdb-adapter-memory-6.1.3.tgz", + "integrity": "sha512-gVbsIMzDzgZYThFVT4eVNsmuZwVm/4jDxP1sjlgc3qtDIxbtBhGgyNfcskwwz9Zu5Lv1avkDsIWvcxQhnvRlHg==", + "dev": true, + "requires": { + "@types/pouchdb-core": "*" + } + }, + "@types/pouchdb-adapter-node-websql": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/pouchdb-adapter-node-websql/-/pouchdb-adapter-node-websql-6.1.3.tgz", + "integrity": "sha512-F/P+os6Jsa7CgHtH64+Z0HfwIcj0hIRB5z8gNhF7L7dxPWoAfkopK5H2gydrP3sQrlGyN4WInF+UJW/Zu1+FKg==", + "dev": true, + "requires": { + "@types/pouchdb-adapter-websql": "*", + "@types/pouchdb-core": "*" + } + }, + "@types/pouchdb-adapter-websql": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/pouchdb-adapter-websql/-/pouchdb-adapter-websql-6.1.3.tgz", + "integrity": "sha512-0AsCWnliwg/3PKj5NAoFuzpnMQKXGBOl+6q8aNxK3N9Tq3SbV91QhgW/mdJsOdqSOw0EBudkGdE6/CZlrgeLpw==", + "dev": true, + "requires": { + "@types/pouchdb-core": "*" + } + }, + "@types/pouchdb-browser": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/pouchdb-browser/-/pouchdb-browser-6.1.3.tgz", + "integrity": "sha512-EdYowrWxW9SWBMX/rux2eq7dbHi5Zeyzz+FF/IAsgQKnUxgeCO5VO2j4zTzos0SDyJvAQU+EYRc11r7xGn5tvA==", + "dev": true, + "requires": { + "@types/pouchdb-adapter-http": "*", + "@types/pouchdb-adapter-idb": "*", + "@types/pouchdb-adapter-websql": "*", + "@types/pouchdb-core": "*", + "@types/pouchdb-mapreduce": "*", + "@types/pouchdb-replication": "*" + } + }, + "@types/pouchdb-core": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@types/pouchdb-core/-/pouchdb-core-7.0.6.tgz", + "integrity": "sha512-MCTtOA3buNN+YVkCWFaojWzP6SsESLRp5uXtXcZE8aUm8RNM/hrVun+RVmzP4NTIGBjKQgO9U9X/bTd9k0jsXA==", + "dev": true, + "requires": { + "@types/debug": "*", + "@types/node-fetch": "*", + "@types/pouchdb-find": "*" + } + }, + "@types/pouchdb-find": { + "version": "6.3.6", + "resolved": "https://registry.npmjs.org/@types/pouchdb-find/-/pouchdb-find-6.3.6.tgz", + "integrity": "sha512-qXgkYfmwUIMCtFcX959ywYyFYJp23Er3btfWNwm1wyYpPK9uuJD8Zh7OmcyFLzWKZG7c8eLHVvGGOp4NysHjDg==", + "dev": true, + "requires": { + "@types/pouchdb-core": "*" + } + }, + "@types/pouchdb-http": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/pouchdb-http/-/pouchdb-http-6.1.3.tgz", + "integrity": "sha512-0e9E5SqNOyPl/3FnEIbENssB4FlJsNYuOy131nxrZk36S+y1R/6qO7ZVRypWpGTqBWSuVd7gCsq2UDwO/285+w==", + "dev": true, + "requires": { + "@types/pouchdb-adapter-http": "*", + "@types/pouchdb-core": "*" + } + }, + "@types/pouchdb-mapreduce": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@types/pouchdb-mapreduce/-/pouchdb-mapreduce-6.1.4.tgz", + "integrity": "sha512-c8cZ8E9zEl7ZMcrE5jaF2qOm+cxQ01+B0NG9oGHVX3Mj5G8m4oIBAUELJmJw9LvEq3r9nXXn6g9TvvN8NiRalg==", + "dev": true, + "requires": { + "@types/pouchdb-core": "*" + } + }, + "@types/pouchdb-node": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/pouchdb-node/-/pouchdb-node-6.1.3.tgz", + "integrity": "sha512-rZb3eWGLKJo4LBhUIJLofyoric/5wKYI6HVUld8CfDWeVZgYVUJ/GEw/vXuqXsbgbsaNyk6XeU9461ULBt+0qg==", + "dev": true, + "requires": { + "@types/pouchdb-adapter-http": "*", + "@types/pouchdb-adapter-leveldb": "*", + "@types/pouchdb-core": "*", + "@types/pouchdb-mapreduce": "*", + "@types/pouchdb-replication": "*" + } + }, + "@types/pouchdb-replication": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@types/pouchdb-replication/-/pouchdb-replication-6.4.2.tgz", + "integrity": "sha512-BbuwkCv6nu8RUVjymUvhSw/Oo+VOCWyUpio3ujOoxhVdef/JZ5AUjsotgKWHiG0OtkZ8O5oCbAx5uH1Zf6w9XA==", + "dev": true, + "requires": { + "@types/pouchdb-core": "*", + "@types/pouchdb-find": "*" + } + }, + "@types/puppeteer": { + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/@types/puppeteer/-/puppeteer-5.4.2.tgz", + "integrity": "sha512-yjbHoKjZFOGqA6bIEI2dfBE5UPqU0YGWzP+ipDVP1iGzmlhksVKTBVZfT3Aj3wnvmcJ2PQ9zcncwOwyavmafBw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/puppeteer-core": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@types/puppeteer-core/-/puppeteer-core-5.4.0.tgz", + "integrity": "sha512-yqRPuv4EFcSkTyin6Yy17pN6Qz2vwVwTCJIDYMXbE3j8vTPhv0nCQlZOl5xfi0WHUkqvQsjAR8hAfjeMCoetwg==", + "dev": true, + "requires": { + "@types/puppeteer": "*" + } + }, + "@types/rdf-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/rdf-js/-/rdf-js-4.0.1.tgz", + "integrity": "sha512-S+28+3RoFI+3arls7dS813gYnhb2HiyLX+gs00rgIvCzHU93DaYajhx4tyT+XEO8SjtzZw90OF4OVdYXBwbvkQ==", + "requires": { + "@types/node": "*" + } + }, "@types/resolve": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", @@ -4279,58 +5214,231 @@ "@types/node": "*" } }, - "@types/semver": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.2.0.tgz", - "integrity": "sha512-TbB0A8ACUWZt3Y6bQPstW9QNbhNeebdgLX4T/ZfkrswAfUzRiXrgd9seol+X379Wa589Pu4UEx9Uok0D4RjRCQ==", + "@types/responselike": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", + "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", + "dev": true, "requires": { "@types/node": "*" } }, + "@types/semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==" + }, + "@types/spark-md5": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/spark-md5/-/spark-md5-3.0.2.tgz", + "integrity": "sha512-82E/lVRaqelV9qmRzzJ1PKTpyrpnT7mwdneKNJB9hUtypZDMggloDfFUCIqRRx3lYRxteCwXSq9c+W71Vf0QnQ==" + }, + "@types/sparqljs": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/sparqljs/-/sparqljs-3.1.1.tgz", + "integrity": "sha512-S/+x6MDEBzVlLvBhsH/r6UvD3I0jXYpWiahCNkcmd8Dli6brxAiTorQ1ZKIGpPgP1tmZrmuQ075Fi7KIrrMXDA==", + "requires": { + "@types/rdf-js": "*" + } + }, "@types/tar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/tar/-/tar-4.0.3.tgz", - "integrity": "sha512-Z7AVMMlkI8NTWF0qGhC4QIX0zkV/+y0J8x7b/RsHrN0310+YNjoJd8UrApCiGBCWtKjxS9QhNqLi2UJNToh5hA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/tar/-/tar-4.0.4.tgz", + "integrity": "sha512-0Xv+xcmkTsOZdIF4yCnd7RkOOyfyqPaqJ7RZFKnwdxfDbkN3eAAE9sHl8zJFqBz4VhxolW9EErbjR1oyH7jK2A==", "requires": { "@types/minipass": "*", "@types/node": "*" } }, + "@types/tern": { + "version": "0.23.3", + "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.3.tgz", + "integrity": "sha512-imDtS4TAoTcXk0g7u4kkWqedB3E4qpjXzCpD2LU5M5NAXHzCDsypyvXSaG7mM8DKYkCRa7tFp4tS/lp/Wo7Q3w==", + "requires": { + "@types/estree": "*" + } + }, + "@types/uritemplate": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@types/uritemplate/-/uritemplate-0.3.4.tgz", + "integrity": "sha512-1D8mJEeQEXynoPQKJkneIK+tXaM2Qnk6c80RBQPV/O2ToypI4mlqXy5jojnYKjTX2Q+EMNMOWt0wNdLbb2MUpA==" + }, "@types/url-join": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/url-join/-/url-join-4.0.0.tgz", "integrity": "sha512-awrJu8yML4E/xTwr2EMatC+HBnHGoDxc2+ImA9QyeUELI1S7dOCIZcyjki1rkwoA8P2D2NVgLAJLjnclkdLtAw==" }, - "@types/webdriverio": { - "version": "4.13.3", - "resolved": "https://registry.npmjs.org/@types/webdriverio/-/webdriverio-4.13.3.tgz", - "integrity": "sha512-AfSQM1xTO9Ax+u9uSQPDuw69DQ0qA2RMoKHn86jCgWNcwKVUjGMSP4sfSl3JOfcZN8X/gWvn7znVPp2/g9zcJA==", - "dev": true, + "@types/uuid": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.0.tgz", + "integrity": "sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ==" + }, + "@types/which": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@types/which/-/which-1.3.2.tgz", + "integrity": "sha512-8oDqyLC7eD4HM307boe2QWKyuzdzWBj56xI/imSl2cpL+U3tCMaTAkMJ4ee5JBZ/FsOJlvRGeIShiZDAl1qERA==", + "dev": true + }, + "@types/xml": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/xml/-/xml-1.0.5.tgz", + "integrity": "sha512-h3PVM7waRi2UeoaY2BhpLGvettU/3vfCbsjXMV/9Ex5WjvIy82J8Qfp1xiPxM4kTSOLdFFpjRwQ7YY7XJeKBvg==", "requires": { "@types/node": "*" } }, "@types/yargs": { - "version": "15.0.5", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.5.tgz", - "integrity": "sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w==", + "version": "15.0.13", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz", + "integrity": "sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ==", "dev": true, "requires": { "@types/yargs-parser": "*" } }, "@types/yargs-parser": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-15.0.0.tgz", - "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==", + "version": "20.2.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz", + "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", "dev": true }, - "@webcomponents/shadycss": { - "version": "1.9.6", - "resolved": "https://registry.npmjs.org/@webcomponents/shadycss/-/shadycss-1.9.6.tgz", - "integrity": "sha512-5fFjvP0jQJZoXK6YzYeYcIDGJ5oEsdjr1L9VaYLw5yxNd4aRz4srMpwCwldeNG0A6Hvr9igbG7fCsBeiiCXd7A==", + "@types/yauzl": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.1.tgz", + "integrity": "sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA==", + "dev": true, + "optional": true, + "requires": { + "@types/node": "*" + } + }, + "@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 + }, + "@wdio/config": { + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/@wdio/config/-/config-6.12.1.tgz", + "integrity": "sha512-V5hTIW5FNlZ1W33smHF4Rd5BKjGW2KeYhyXDQfXHjqLCeRiirZ9fABCo9plaVQDnwWSUMWYaAaIAifV82/oJCQ==", + "dev": true, + "requires": { + "@wdio/logger": "6.10.10", + "deepmerge": "^4.0.0", + "glob": "^7.1.2" + } + }, + "@wdio/logger": { + "version": "6.10.10", + "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-6.10.10.tgz", + "integrity": "sha512-2nh0hJz9HeZE0VIEMI+oPgjr/Q37ohrR9iqsl7f7GW5ik+PnKYCT9Eab5mR1GNMG60askwbskgGC1S9ygtvrSw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "loglevel": "^1.6.0", + "loglevel-plugin-prefix": "^0.8.4", + "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" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "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 + }, + "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 + }, + "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" + } + }, + "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" + } + } + } + }, + "@wdio/protocols": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-6.12.0.tgz", + "integrity": "sha512-UhTBZxClCsM3VjaiDp4DoSCnsa7D1QNmI2kqEBfIpyNkT3GcZhJb7L+nL0fTkzCwi7+/uLastb3/aOwH99gt0A==", "dev": true }, + "@wdio/repl": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@wdio/repl/-/repl-6.11.0.tgz", + "integrity": "sha512-FxrFKiTkFyELNGGVEH1uijyvNY7lUpmff6x+FGskFGZB4uSRs0rxkOMaEjxnxw7QP1zgQKr2xC7GyO03gIGRGg==", + "dev": true, + "requires": { + "@wdio/utils": "6.11.0" + } + }, + "@wdio/utils": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-6.11.0.tgz", + "integrity": "sha512-vf0sOQzd28WbI26d6/ORrQ4XKWTzSlWLm9W/K/eJO0NASKPEzR+E+Q2kaa+MJ4FKXUpjbt+Lxfo+C26TzBk7tg==", + "dev": true, + "requires": { + "@wdio/logger": "6.10.10" + } + }, + "@webcomponents/shadycss": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/@webcomponents/shadycss/-/shadycss-1.10.2.tgz", + "integrity": "sha512-9Iseu8bRtecb0klvv+WXZOVZatsRkbaH7M97Z+f+Pt909R4lDfgUODAnra23DOZTpeMTAkVpf4m/FZztN7Ox1A==" + }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, "JSV": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/JSV/-/JSV-4.0.2.tgz", @@ -4340,7 +5448,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dev": true, "requires": { "event-target-shim": "^5.0.0" } @@ -4349,7 +5456,6 @@ "version": "6.2.3", "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, "requires": { "buffer": "^5.5.0", "immediate": "^3.2.3", @@ -4359,35 +5465,47 @@ }, "dependencies": { "immediate": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", - "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=", - "dev": true + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", + "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==" } } }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "dev": true, - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, "acorn": { "version": "5.7.4", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", - "dev": true + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==" }, "acorn-jsx": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", - "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true + }, + "agent-base": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz", + "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==", "dev": true }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "dependencies": { + "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 + } + } + }, "ajv": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", @@ -4400,30 +5518,35 @@ } }, "ajv-keywords": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", - "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true }, "amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" }, "amf-client-js": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/amf-client-js/-/amf-client-js-4.1.1.tgz", - "integrity": "sha512-O7OE/VAw2TxpTNKfv1ILphneMquw9L8y2PUJHzw7HNS5pdjrayLpQWDutQ1GtILdnblUkUmNyF/9EFNd5AVEWg==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/amf-client-js/-/amf-client-js-4.6.0.tgz", + "integrity": "sha512-hep/WF+qDsVVbCsdNOYjtlWGB60bLhEkfLpZXYjJDB6sYfI2E9rYouUlir3qtGDjuczVCI5HaDoLB5Vjpz6GRA==", "requires": { "ajv": "6.5.2", - "amf-shacl-node": "1.1.1" + "amf-shacl-node": "2.0.0" } }, "amf-shacl-node": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/amf-shacl-node/-/amf-shacl-node-1.1.1.tgz", - "integrity": "sha512-CoW08R+Y5VluBhC0IT11yJMJqVfuYVa8JHKopL4sXXCgTjtKikn1dyfOmY/b/u0WVKmx787JVDb/HnTzOEVoiA==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/amf-shacl-node/-/amf-shacl-node-2.0.0.tgz", + "integrity": "sha512-38GcUBN7VFzpJHDWeEKZ5bcosGA1/Ur6egUrno+Uprgf/8aXeX0LumkG64sExQPrFQ649Ku3wfgWe+le4bUNVw==", + "requires": { + "@comunica/actor-init-sparql-rdfjs": "^1.10.0", + "jsonld-streaming-serializer": "^1.1.0", + "lru-cache": "^6.0.0", + "n3": "^1.3.5" + } }, "ansi-align": { "version": "3.0.0", @@ -4481,26 +5604,16 @@ "dev": true }, "ansi-escapes": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", - "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", - "dev": true, - "requires": { - "type-fest": "^0.11.0" - }, - "dependencies": { - "type-fest": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", - "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", - "dev": true - } - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true }, "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true }, "ansi-styles": { "version": "1.0.0", @@ -4517,33 +5630,54 @@ "picomatch": "^2.0.4" } }, + "api-console": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/api-console/-/api-console-6.4.1.tgz", + "integrity": "sha512-S+29eCvfO60SpuxupN2zLTPxy1maLdaWdIewuFV51FO6tjvo6Z4PoYqrJ09EPDGpW9tc3+E9hDpaMzfaT6poZg==", + "dev": true, + "requires": { + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/oauth-authorization": "^5.0.4", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@api-components/amf-helper-mixin": "^4.3.4", + "@api-components/api-console-ext-comm": "^3.0.0", + "@api-components/api-documentation": "^6.0.1", + "@api-components/api-navigation": "^4.2.5", + "@api-components/api-request": "^0.1.3", + "@polymer/app-layout": "^3.1.0", + "@polymer/iron-media-query": "^3.0.0", + "@polymer/paper-toast": "^3.0.0", + "lit-element": "^2.3.1", + "lit-html": "^1.2.1" + } + }, "app-builder-bin": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-3.5.9.tgz", - "integrity": "sha512-NSjtqZ3x2kYiDp3Qezsgukx/AUzKPr3Xgf9by4cYt05ILWGAptepeeu0Uv+7MO+41o6ujhLixTou8979JGg2Kg==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-3.5.10.tgz", + "integrity": "sha512-Jd+GW68lR0NeetgZDo47PdWBEPdnD+p0jEa7XaxjRC8u6Oo/wgJsfKUkORRgr2NpkD19IFKN50P6JYy04XHFLQ==", "dev": true }, "app-builder-lib": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-22.6.1.tgz", - "integrity": "sha512-ENL7r+H7IBfDb4faeLASgndsXrAT7AV7m7yJjcpbFDXYma6an7ZWGFIvR0HJrsfiC5TIB8kdLJ/aMSImrrSi/Q==", + "version": "22.9.1", + "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-22.9.1.tgz", + "integrity": "sha512-KfXim/fiNwFW2SKffsjEMdAU7RbbEXn62x5YyXle1b4j9X/wEHW9iwox8De6y0hJdR+/kCC/49lI+VgNwLhV7A==", "dev": true, "requires": { "7zip-bin": "~5.0.3", "@develar/schema-utils": "~2.6.5", "async-exit-hook": "^2.0.1", "bluebird-lst": "^1.0.9", - "builder-util": "22.6.1", - "builder-util-runtime": "8.7.0", + "builder-util": "22.9.1", + "builder-util-runtime": "8.7.2", "chromium-pickle-js": "^0.2.0", - "debug": "^4.1.1", - "ejs": "^3.1.2", - "electron-publish": "22.6.1", - "fs-extra": "^9.0.0", - "hosted-git-info": "^3.0.4", + "debug": "^4.3.0", + "ejs": "^3.1.5", + "electron-publish": "22.9.1", + "fs-extra": "^9.0.1", + "hosted-git-info": "^3.0.5", "is-ci": "^2.0.0", "isbinaryfile": "^4.0.6", - "js-yaml": "^3.13.1", + "js-yaml": "^3.14.0", "lazy-val": "^1.0.4", "minimatch": "^3.0.4", "normalize-package-data": "^2.5.0", @@ -4553,64 +5687,93 @@ "temp-file": "^3.3.7" }, "dependencies": { - "builder-util-runtime": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.7.0.tgz", - "integrity": "sha512-G1AqqVM2vYTrSFR982c1NNzwXKrGLQjVjaZaWQdn4O6Z3YKjdMDofw88aD9jpyK9ZXkrCxR0tI3Qe9wNbyTlXg==", + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "debug": "^4.1.1", - "sax": "^1.2.4" + "ms": "2.1.2" } }, "hosted-git-info": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.4.tgz", - "integrity": "sha512-4oT62d2jwSDBbLLFLZE+1vPuQ1h8p9wjrJ8Mqx5TjsyWmBMV5B13eJqn8pvluqubLf3cJPTfiYCIwNwDNmzScQ==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", + "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", "dev": true, "requires": { - "lru-cache": "^5.1.1" + "lru-cache": "^6.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 } } }, "archiver": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-2.1.1.tgz", - "integrity": "sha1-/2YrSnggFJSj7lRNOjP+dJZQnrw=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.2.0.tgz", + "integrity": "sha512-QEAKlgQuAtUxKeZB9w5/ggKXh21bZS+dzzuQ0RPBC20qtDCbTyzqmisoeJP46MP39fg4B4IcyvR+yeyEBdblsQ==", "dev": true, "requires": { - "archiver-utils": "^1.3.0", - "async": "^2.0.0", + "archiver-utils": "^2.1.0", + "async": "^3.2.0", "buffer-crc32": "^0.2.1", - "glob": "^7.0.0", - "lodash": "^4.8.0", - "readable-stream": "^2.0.0", - "tar-stream": "^1.5.0", - "zip-stream": "^1.2.0" + "readable-stream": "^3.6.0", + "readdir-glob": "^1.0.0", + "tar-stream": "^2.1.4", + "zip-stream": "^4.0.4" } }, "archiver-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", - "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", "dev": true, "requires": { - "glob": "^7.0.0", - "graceful-fs": "^4.1.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", "lazystream": "^1.0.0", - "lodash": "^4.8.0", - "normalize-path": "^2.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", "readable-stream": "^2.0.0" }, "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "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 + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "safe-buffer": "~5.1.0" } } } @@ -4633,8 +5796,17 @@ "argsarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/argsarray/-/argsarray-0.0.1.tgz", - "integrity": "sha1-bnIHtOzbObCviDA/pa4ivajfYcs=", - "dev": true + "integrity": "sha1-bnIHtOzbObCviDA/pa4ivajfYcs=" + }, + "aria-query": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", + "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.10.2", + "@babel/runtime-corejs3": "^7.10.2" + } }, "array-find-index": { "version": "1.0.2", @@ -4642,33 +5814,35 @@ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", "dev": true }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, "array-includes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", - "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.2.tgz", + "integrity": "sha512-w2GspexNQpx+PutG3QpT437/BenZBj0M/MZGn5mzv/MofYqo0xmRHzn4lFsoDlWJ+THYsGJmFlW68WlDFx7VRw==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", + "es-abstract": "^1.18.0-next.1", + "get-intrinsic": "^1.0.1", "is-string": "^1.0.5" } }, "array.prototype.flat": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", - "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "es-abstract": "^1.18.0-next.1" } }, + "arrayify-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/arrayify-stream/-/arrayify-stream-1.0.0.tgz", + "integrity": "sha512-RP80ep76Lbew2wWN5ogrl2NluTnBVYYh2K3NNCcWfcmmUB7nBcNBctiJeEZAixp3I1vQ9H88iHZ9MbHSdkuupQ==" + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -4693,22 +5867,18 @@ "ast-types": { "version": "0.9.6", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz", - "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=", - "dev": true + "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=" }, "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "requires": { - "lodash": "^4.17.14" - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" }, "async-exit-hook": { "version": "2.0.1", @@ -4716,6 +5886,19 @@ "integrity": "sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==", "dev": true }, + "asynciterator": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/asynciterator/-/asynciterator-3.0.3.tgz", + "integrity": "sha512-mNvEwsk6DN7+co9T2be/Eor0kKQGIXCoGg27v7vsCLlFdSXlboH06UGCy9cfEh2qAfDdgsEpmDn6y59f3+ZvgA==" + }, + "asyncjoin": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/asyncjoin/-/asyncjoin-1.0.2.tgz", + "integrity": "sha512-q5p5mqVXiL7KD6ihJad+6vaLHEQ73u5K5UyKerVGRA3Ec4AuhaoxpRU/qtQiV1eK2gMiO9T4OMSIG90hY1Fl+g==", + "requires": { + "asynciterator": "^3.0.0" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -4732,11 +5915,15 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, + "atomically": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/atomically/-/atomically-1.7.0.tgz", + "integrity": "sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w==" + }, "attempt-x": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/attempt-x/-/attempt-x-1.1.3.tgz", - "integrity": "sha512-y/+ek8IjxVpTbj/phC87jK5YRhlP5Uu7FlQdCmYuut1DTjNruyrGqUWi5bcX1VKsQX1B0FX16A1hqHomKpHv3A==", - "dev": true + "integrity": "sha512-y/+ek8IjxVpTbj/phC87jK5YRhlP5Uu7FlQdCmYuut1DTjNruyrGqUWi5bcX1VKsQX1B0FX16A1hqHomKpHv3A==" }, "aws-sign2": { "version": "0.7.0", @@ -4745,9 +5932,21 @@ "dev": true }, "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", - "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "axe-core": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.1.1.tgz", + "integrity": "sha512-5Kgy8Cz6LPC9DJcNb3yjAXTu3XihQgEdnIg50c//zOC/MyLP0Clg+Y8Sh9ZjjnvBrDZU4DgXS9C3T9r4/scGZQ==", + "dev": true + }, + "axobject-query": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", + "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", "dev": true }, "babel-eslint": { @@ -4762,39 +5961,23 @@ "@babel/types": "^7.7.0", "eslint-visitor-keys": "^1.0.0", "resolve": "^1.12.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "babel-plugin-dynamic-import-node": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", - "dev": true, - "requires": { - "object.assign": "^4.1.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "core-js": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", - "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - } + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" } }, "balanced-match": { @@ -4805,14 +5988,12 @@ "base62": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/base62/-/base62-1.2.8.tgz", - "integrity": "sha512-V6YHUbjLxN1ymqNLb1DPHoU1CpfdL7d2YTIp5W3U4hhoG4hhxNmsFDs66M9EXxBiSEke5Bt5dwdfMwwZF70iLA==", - "dev": true + "integrity": "sha512-V6YHUbjLxN1ymqNLb1DPHoU1CpfdL7d2YTIp5W3U4hhoG4hhxNmsFDs66M9EXxBiSEke5Bt5dwdfMwwZF70iLA==" }, "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", - "dev": true + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "bcrypt-pbkdf": { "version": "1.0.2", @@ -4838,19 +6019,20 @@ } }, "binary-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, "bl": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", + "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", "dev": true, "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" } }, "bluebird": { @@ -4875,45 +6057,10 @@ } } }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "dev": true, - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "boolean": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.0.1.tgz", - "integrity": "sha512-HRZPIjPcbwAVQvOTxR4YE3o8Xs98NqbbL1iEZDCz7CL8ql0Lt5iOyJFxfnAB0oFs8Oh02F/lLlg30Mexv46LjA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.0.2.tgz", + "integrity": "sha512-RwywHlpCRc3/Wh81MiCKun4ydaIFyW5Ea6JbL6sRCVx5q5irDw7pMXBUFYF/jArQ6YrG36q0kpovc9P/Kd3I4g==", "dev": true, "optional": true }, @@ -4934,15 +6081,20 @@ }, "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==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, "chalk": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", @@ -4975,9 +6127,9 @@ "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==", + "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" @@ -5016,119 +6168,45 @@ "dev": true }, "browserslist": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz", - "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==", + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.1.tgz", + "integrity": "sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001043", - "electron-to-chromium": "^1.3.413", - "node-releases": "^1.1.53", - "pkg-up": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - } + "caniuse-lite": "^1.0.30001173", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.634", + "escalade": "^3.1.1", + "node-releases": "^1.1.69" } }, "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, "buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", "dev": true }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true - }, "buffer-from": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", - "dev": true + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-0.1.1.tgz", + "integrity": "sha1-V7GLHaChnsBvM4N6UnWiQjUb114=", + "requires": { + "is-array-buffer-x": "^1.0.13" + } }, "buffer-indexof-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.1.tgz", - "integrity": "sha1-qfuAbOgUXVQoUQznLyeLs2OmOL8=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", + "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==" }, "buffers": { "version": "0.1.1", @@ -5136,51 +6214,40 @@ "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=" }, "builder-util": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-22.6.1.tgz", - "integrity": "sha512-A9cF+bSHqRTSKIUHEyE92Tl0Uh12N7yZRH9bccIL3gRUwtp6ulF28LsjNIWTSQ1clZo2M895cT5PCrKzjPQFVg==", + "version": "22.9.1", + "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-22.9.1.tgz", + "integrity": "sha512-5hN/XOaYu4ZQUS6F+5CXE6jTo+NAnVqAxDuKGSaHWb9bejfv/rluChTLoY3/nJh7RFjkoyVjvFJv7zQDB1QmHw==", "dev": true, "requires": { "7zip-bin": "~5.0.3", "@types/debug": "^4.1.5", - "@types/fs-extra": "^8.1.0", - "app-builder-bin": "3.5.9", + "@types/fs-extra": "^9.0.1", + "app-builder-bin": "3.5.10", "bluebird-lst": "^1.0.9", - "builder-util-runtime": "8.7.0", - "chalk": "^4.0.0", - "debug": "^4.1.1", - "fs-extra": "^9.0.0", + "builder-util-runtime": "8.7.2", + "chalk": "^4.1.0", + "debug": "^4.3.0", + "fs-extra": "^9.0.1", "is-ci": "^2.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^3.14.0", "source-map-support": "^0.5.19", "stat-mode": "^1.0.0", "temp-file": "^3.3.7" }, "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==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, - "builder-util-runtime": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.7.0.tgz", - "integrity": "sha512-G1AqqVM2vYTrSFR982c1NNzwXKrGLQjVjaZaWQdn4O6Z3YKjdMDofw88aD9jpyK9ZXkrCxR0tI3Qe9wNbyTlXg==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "sax": "^1.2.4" - } - }, "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -5202,16 +6269,31 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "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 }, + "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 + }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "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" @@ -5220,24 +6302,39 @@ } }, "builder-util-runtime": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.6.2.tgz", - "integrity": "sha512-9QnIBISfhgQ2BxtRLidVqf/v5HD73vSKZDllpUmGd2L6VORGQk7cZAPmPtw4HQM3gPBelyVJ5yIjMNZ8xjmd1A==", + "version": "8.7.2", + "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.7.2.tgz", + "integrity": "sha512-xBqv+8bg6cfnzAQK1k3OGpfaHg+QkPgIgpEkXNhouZ0WiUkyZCftuRc2LYzQrLucFywpa14Xbc6+hTbpq83yRA==", "requires": { "debug": "^4.1.1", "sax": "^1.2.4" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } } }, "builtin-modules": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", - "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", "dev": true }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", "dev": true }, "cacheable-request": { @@ -5266,8 +6363,17 @@ "cached-constructors-x": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/cached-constructors-x/-/cached-constructors-x-1.0.2.tgz", - "integrity": "sha512-7lKwmwXweW6E/31RHAJemLtZPfb2xvcABXknFF4b/dNYv4DbSGTgQHckXLQkNw6BB4HKFYW6mJgsNjADAy1ehw==", - "dev": true + "integrity": "sha512-7lKwmwXweW6E/31RHAJemLtZPfb2xvcABXknFF4b/dNYv4DbSGTgQHckXLQkNw6BB4HKFYW6mJgsNjADAy1ehw==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } }, "callsites": { "version": "3.1.0", @@ -5276,9 +6382,9 @@ "dev": true }, "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==" }, "camelcase-keys": { "version": "2.1.0", @@ -5299,11 +6405,16 @@ } }, "caniuse-lite": { - "version": "1.0.30001066", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001066.tgz", - "integrity": "sha512-Gfj/WAastBtfxLws0RCh2sDbTK/8rJuSeZMecrSkNGYxPcv7EzblmDGfWQCFEQcSqYE2BRgQiJh8HOD07N5hIw==", + "version": "1.0.30001181", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001181.tgz", + "integrity": "sha512-m5ul/ARCX50JB8BSNM+oiPmQrR5UmngaQ3QThTTp5HcIIQGP/nPBs82BYLE+tigzm3VW+F4BJIhUyaVtEweelQ==", "dev": true }, + "canonicalize": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/canonicalize/-/canonicalize-1.0.5.tgz", + "integrity": "sha512-mAjKJPIyP0xqqv6IAkvso07StOmz6cmGtNDg3pXCSzXVZOqka7StIkAhJl/zHOi4M2CgpYfD6aeRWbnrmtvBEA==" + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -5342,6 +6453,12 @@ "strip-ansi": "~0.1.0" } }, + "chance": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.7.tgz", + "integrity": "sha512-bua/2cZEfzS6qPm0vi3JEvGNbriDLcMj9lKxCQOjUcCJRcyjA7umP0zZm6bKWWlBN04vA0L99QGH/CZQawr0eg==", + "dev": true + }, "chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", @@ -5351,8 +6468,7 @@ "charenc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=", - "dev": true + "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=" }, "check-error": { "version": "1.0.2", @@ -5361,19 +6477,19 @@ "dev": true }, "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", "dev": true, "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.1", + "fsevents": "~2.1.2", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" + "readdirp": "~3.5.0" } }, "chownr": { @@ -5381,6 +6497,20 @@ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" }, + "chrome-launcher": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.13.4.tgz", + "integrity": "sha512-nnzXiDbGKjDSK6t2I+35OAPBy5Pw/39bgkb/ZAFwMhwJbdYBp6aH+vW28ZgtjdU890Q7D+3wN/tB8N66q5Gi2A==", + "dev": true, + "requires": { + "@types/node": "*", + "escape-string-regexp": "^1.0.5", + "is-wsl": "^2.2.0", + "lighthouse-logger": "^1.0.0", + "mkdirp": "^0.5.3", + "rimraf": "^3.0.2" + } + }, "chromium-pickle-js": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz", @@ -5393,27 +6523,80 @@ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, - "cli-boxes": { + "clean-stack": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz", - "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w==", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", "dev": true }, "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "^3.1.0" + "restore-cursor": "^2.0.0" } }, "cli-spinners": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.3.0.tgz", - "integrity": "sha512-Xs2Hf2nzrvJMFKimOR7YR0QwZ8fc0u98kdtwN1eNAZzNQgH3vK2pXzff6GJtKh7S5hoJ87ECiAiZFS2fb5Ii2w==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz", + "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==", "dev": true }, + "cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "requires": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.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 + }, + "slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + } + } + }, "cli-width": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", @@ -5433,19 +6616,21 @@ } }, "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "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": "^6.2.0" + "wrap-ansi": "^7.0.0" }, "dependencies": { "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" } @@ -5453,16 +6638,15 @@ } }, "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", "dev": true }, "clone-buffer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", - "dev": true + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=" }, "clone-response": { "version": "1.0.2", @@ -5473,16 +6657,10 @@ "mimic-response": "^1.0.0" } }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, "codemirror": { - "version": "5.54.0", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.54.0.tgz", - "integrity": "sha512-Pgf3surv4zvw+KaW3doUU7pGjF0BPU8/sj7eglWJjzni46U/DDW8pu3nZY0QgQKUcICDXRkq8jZmq0y6KhxM3Q==" + "version": "5.59.2", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.59.2.tgz", + "integrity": "sha512-/D5PcsKyzthtSy2NNKCyJi3b+htRkoKv3idswR/tR6UAvMNKA7SrmyZy6fOONJxSRs1JlUWEDAbxqfdArbK8iA==" }, "color": { "version": "3.0.0", @@ -5507,18 +6685,19 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", + "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", "requires": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" } }, - "colornames": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/colornames/-/colornames-1.1.1.tgz", - "integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y=" + "colorette": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", + "dev": true }, "colors": { "version": "1.4.0", @@ -5545,14 +6724,12 @@ "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "commoner": { "version": "0.10.8", "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz", "integrity": "sha1-NPw2cs0kOT6LtH5wyqApOBH08sU=", - "dev": true, "requires": { "commander": "^2.5.0", "detective": "^4.3.1", @@ -5569,7 +6746,6 @@ "version": "5.0.15", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, "requires": { "inflight": "^1.0.4", "inherits": "2", @@ -5580,27 +6756,42 @@ } } }, + "compare-versions": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", + "dev": true + }, + "componentsjs": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/componentsjs/-/componentsjs-4.0.6.tgz", + "integrity": "sha512-MPvKSLVo4SX3PafGMqKPzV+i8JdivYXuaJb2CsEF86TUgniXX3i661D0MDBwMWnd0LXWbI1sNq0kKJBKrL/wBw==", + "requires": { + "@types/minimist": "^1.2.0", + "@types/node": "^14.14.7", + "@types/rdf-js": "*", + "@types/semver": "^7.3.4", + "jsonld-context-parser": "^2.1.1", + "minimist": "^1.2.0", + "rdf-data-factory": "^1.0.4", + "rdf-object": "^1.8.0", + "rdf-parse": "^1.7.0", + "rdf-quad": "^1.5.0", + "rdf-terms": "^1.6.2", + "semver": "^7.3.2", + "winston": "^3.3.3" + } + }, "compress-commons": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", - "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.0.2.tgz", + "integrity": "sha512-qhd32a9xgzmpfoga1VQEiLEwdKZ6Plnpx5UCgIsf89FSolyJ7WnifY4Gtjgv5WR6hWAyRaHxC5MiEhU/38U70A==", "dev": true, "requires": { - "buffer-crc32": "^0.2.1", - "crc32-stream": "^2.0.0", - "normalize-path": "^2.0.0", - "readable-stream": "^2.0.0" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.1", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" } }, "concat-map": { @@ -5618,29 +6809,67 @@ "inherits": "^2.0.3", "readable-stream": "^2.2.2", "typedarray": "^0.0.6" + }, + "dependencies": { + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "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 + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "conf": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/conf/-/conf-6.2.4.tgz", - "integrity": "sha512-GjgyPRLo1qK1LR9RWAdUagqo+DP18f5HWCFk4va7GS+wpxQTOzfuKTwKOvGW2c01/YXNicAyyoyuSddmdkBzZQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/conf/-/conf-7.1.2.tgz", + "integrity": "sha512-r8/HEoWPFn4CztjhMJaWNAe5n+gPUCSaJ0oufbqDLFKsA1V8JjAG7G+p0pgoDFAws9Bpk2VtVLLXqOBA7WxLeg==", "requires": { - "ajv": "^6.10.2", - "debounce-fn": "^3.0.1", - "dot-prop": "^5.0.0", + "ajv": "^6.12.2", + "atomically": "^1.3.1", + "debounce-fn": "^4.0.0", + "dot-prop": "^5.2.0", "env-paths": "^2.2.0", - "json-schema-typed": "^7.0.1", - "make-dir": "^3.0.0", + "json-schema-typed": "^7.0.3", + "make-dir": "^3.1.0", "onetime": "^5.1.0", - "pkg-up": "^3.0.1", - "semver": "^6.2.0", - "write-file-atomic": "^3.0.0" + "pkg-up": "^3.1.0", + "semver": "^7.3.2" }, "dependencies": { "ajv": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -5649,14 +6878,9 @@ } }, "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "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==" } } }, @@ -5685,27 +6909,18 @@ "xdg-basedir": "^4.0.0" } }, + "confusing-browser-globals": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", + "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", + "dev": true + }, "contains-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "dev": true, - "requires": { - "safe-buffer": "5.1.2" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, "convert-source-map": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", @@ -5713,34 +6928,30 @@ "dev": true, "requires": { "safe-buffer": "~5.1.1" + }, + "dependencies": { + "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 + } } }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, "core-js": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", - "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.3.tgz", + "integrity": "sha512-KPYXeVZYemC2TkNEkX/01I+7yd+nX3KddKwZ1Ww7SKWdI2wQprSgLmrTddT8nw92AjEklTsPBoSdQBhbI1bQ6Q==", "dev": true, "optional": true }, "core-js-compat": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz", - "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.3.tgz", + "integrity": "sha512-1sCb0wBXnBIL16pfFG1Gkvei6UzvKyTNYpiC41yrdjEv0UoJoq9E/abTMzyYJ6JpTkAj15dLjbqifIzEBDVvog==", "dev": true, "requires": { - "browserslist": "^4.8.5", + "browserslist": "^4.16.1", "semver": "7.0.0" }, "dependencies": { @@ -5752,79 +6963,93 @@ } } }, + "core-js-pure": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.8.3.tgz", + "integrity": "sha512-V5qQZVAr9K0xu7jXg1M7qTEwuxUgqr7dUOezGaNa7i+Xn9oXAU/d1fzqD9ObuwpVQOaorO5s70ckyi1woP9lVA==", + "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=" }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "cosmiconfig": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", + "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", "dev": true, "requires": { - "object-assign": "^4", - "vary": "^1" + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" }, "dependencies": { - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true } } }, - "crc": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", - "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", + "crc-32": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", + "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==", "dev": true, "requires": { - "buffer": "^5.1.0" + "exit-on-epipe": "~1.0.1", + "printj": "~1.1.0" } }, "crc32-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", - "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.1.tgz", + "integrity": "sha512-FN5V+weeO/8JaXsamelVYO1PHyeCsuL3HcG4cqsj0ceARcocxalaShCsohZMSAF+db7UYFwBy1rARK/0oFItUw==", "dev": true, "requires": { - "crc": "^3.4.4", - "readable-stream": "^2.0.0" + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + } + }, + "cross-fetch": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.0.6.tgz", + "integrity": "sha512-KBPUbqgFjzWlVcURG+Svp9TlhA5uliYtiNx/0r8nv0pdypeQCRJ9IaSIc3q/x3q8t3F75cHuwxVql1HFGHCNJQ==", + "requires": { + "node-fetch": "2.6.1" } }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "crypt": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=", - "dev": true - }, - "crypto-js": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", - "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==" + "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=" }, "crypto-random-string": { "version": "2.0.0", @@ -5838,34 +7063,11 @@ "integrity": "sha1-aEbccl6lCKhqwMnEQc0uyUTe82Y=", "dev": true }, - "css": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", - "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "source-map": "^0.6.1", - "source-map-resolve": "^0.5.2", - "urix": "^0.1.0" - }, - "dependencies": { - "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 - } - } - }, - "css-parse": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-2.0.0.tgz", - "integrity": "sha1-pGjuZnwW2BzPBcWMONKpfHgNv9Q=", - "dev": true, - "requires": { - "css": "^2.0.0" - } + "css-shorthand-properties": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/css-shorthand-properties/-/css-shorthand-properties-1.1.1.tgz", + "integrity": "sha512-Md+Juc7M3uOdbAFwOYlTrccIZ7oCFuzrhKYQjdeUEW/sE1hv17Jp/Bws+ReOPpGVBTYCBoYo+G17V5Qo8QQ75A==", + "dev": true }, "css-value": { "version": "0.0.1", @@ -5891,33 +7093,42 @@ "assert-plus": "^1.0.0" } }, + "date-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz", + "integrity": "sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==", + "dev": true, + "requires": { + "time-zone": "^1.0.0" + } + }, "debounce-fn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/debounce-fn/-/debounce-fn-3.0.1.tgz", - "integrity": "sha512-aBoJh5AhpqlRoHZjHmOzZlRx+wz2xVwGL9rjs+Kj0EWUrL4/h4K7OD176thl2Tdoqui/AaA4xhHrNArGLAaI3Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/debounce-fn/-/debounce-fn-4.0.0.tgz", + "integrity": "sha512-8pYCQiL9Xdcg0UPSD3d+0KMlOjp+KGU5EPwYddgzQ7DATsg4fuUDjQtsYLmWjnk2obnNHgV3vE2Y4jejSOJVBQ==", "requires": { - "mimic-fn": "^2.1.0" + "mimic-fn": "^3.0.0" } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "ms": "^2.1.1" + "ms": "2.0.0" } }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, + "decimal.js": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.1.tgz", + "integrity": "sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw==" + }, "decompress-response": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", @@ -5927,6 +7138,12 @@ "mimic-response": "^1.0.0" } }, + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -5949,9 +7166,9 @@ "dev": true }, "deepmerge": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.0.1.tgz", - "integrity": "sha512-VIPwiMJqJ13ZQfaCsIFnp5Me9tnjURiaIFxfz7EH0Ci0dTSQpZtSLrqOicXqEd/z2r+z+Klk9GzmnRsgpgbOsQ==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true }, "defaults": { @@ -5961,6 +7178,14 @@ "dev": true, "requires": { "clone": "^1.0.2" + }, + "dependencies": { + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + } } }, "defer-to-connect": { @@ -5973,7 +7198,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", - "dev": true, "requires": { "abstract-leveldown": "~6.2.1", "inherits": "^2.0.3" @@ -5991,8 +7215,7 @@ "defined": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" }, "delayed-stream": { "version": "1.0.0", @@ -6006,18 +7229,6 @@ "dev": true, "optional": true }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, "detect-indent": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.0.0.tgz", @@ -6035,7 +7246,6 @@ "version": "4.7.1", "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", - "dev": true, "requires": { "acorn": "^5.2.1", "defined": "^1.0.0" @@ -6047,43 +7257,56 @@ "integrity": "sha1-WiBc48Ky73e2I41roXnrdMag6Bg=", "dev": true }, - "diagnostics": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz", - "integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==", + "devtools": { + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/devtools/-/devtools-6.12.1.tgz", + "integrity": "sha512-JyG46suEiZmld7/UVeogkCWM0zYGt+2ML/TI+SkEp+bTv9cs46cDb0pKF3glYZJA7wVVL2gC07Ic0iCxyJEnCQ==", + "dev": true, "requires": { - "colorspace": "1.1.x", - "enabled": "1.0.x", - "kuler": "1.0.x" + "@wdio/config": "6.12.1", + "@wdio/logger": "6.10.10", + "@wdio/protocols": "6.12.0", + "@wdio/utils": "6.11.0", + "chrome-launcher": "^0.13.1", + "edge-paths": "^2.1.0", + "puppeteer-core": "^5.1.0", + "ua-parser-js": "^0.7.21", + "uuid": "^8.0.0" } }, + "devtools-protocol": { + "version": "0.0.818844", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.818844.tgz", + "integrity": "sha512-AD1hi7iVJ8OD0aMLQU5VK0XH9LDlA1+BcPIgrAxPfaibx2DbWucuyOhc4oyQCbnvDDO68nN6/LcKfqTP343Jjg==", + "dev": true + }, "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, "dmg-builder": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-22.6.1.tgz", - "integrity": "sha512-jUTN0acP15puzevtQASj7QEPgUGpedWSuSnOwR/++JbeYRTwU2oro09h/KZnaeMcxgxjdmT3tYLJeY1XUfPbRg==", + "version": "22.9.1", + "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-22.9.1.tgz", + "integrity": "sha512-jc+DAirqmQrNT6KbDHdfEp8D1kD0DBTnsLhwUR3MX+hMBun5bT134LQzpdK0GKvd22GqF8L1Cz/NOgaVjscAXQ==", "dev": true, "requires": { - "app-builder-lib": "22.6.1", - "builder-util": "22.6.1", - "fs-extra": "^9.0.0", - "iconv-lite": "^0.5.1", - "js-yaml": "^3.13.1", + "app-builder-lib": "22.9.1", + "builder-util": "22.9.1", + "fs-extra": "^9.0.1", + "iconv-lite": "^0.6.2", + "js-yaml": "^3.14.0", "sanitize-filename": "^1.6.3" }, "dependencies": { "iconv-lite": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.1.tgz", - "integrity": "sha512-ONHr16SQvKZNSqjQT9gy5z24Jw+uqfO02/ngBSBoqChZ+W8qXX7GPRa1RoUnzGADw8K63R1BXUMzarCVQBpY8Q==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", + "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" } } } @@ -6106,51 +7329,67 @@ } }, "dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "dev": true, + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.2.0.tgz", + "integrity": "sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA==", "requires": { "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", "entities": "^2.0.0" } }, + "dom5": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dom5/-/dom5-3.0.1.tgz", + "integrity": "sha512-JPFiouQIr16VQ4dX6i0+Hpbg3H2bMKPmZ+WZgBOSSvOPx9QHwwY8sPzeM2baUtViESYto6wC2nuZOMC/6gulcA==", + "dev": true, + "requires": { + "@types/parse5": "^2.2.34", + "clone": "^2.1.0", + "parse5": "^4.0.0" + }, + "dependencies": { + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "dev": true + } + } + }, "domelementtype": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", - "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==", - "dev": true + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", + "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==" }, "domhandler": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.0.0.tgz", - "integrity": "sha512-eKLdI5v9m67kbXQbJSNn1zjh0SDzvzWVWtX+qEI3eMjZw8daH9k8rlj1FZY9memPwjiskQFbe7vHVVJIAqoEhw==", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz", + "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==", "requires": { - "domelementtype": "^2.0.1" + "domelementtype": "^2.1.0" } }, "dompurify": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.11.tgz", - "integrity": "sha512-qVoGPjIW9IqxRij7klDQQ2j6nSe4UNWANBhZNLnsS7ScTtLb+3YdxkRY8brNTpkUiTtcXsCJO+jS0UCDfenLuA==", + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.6.tgz", + "integrity": "sha512-7b7ZArhhH0SP6W2R9cqK6RjaU82FZ2UPM7RO8qN1b1wyvC/NY1FNWcX1Pu00fFOAnzEORtwXe4bPaClg6pUybQ==", "dev": true }, "domutils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.1.0.tgz", - "integrity": "sha512-CD9M0Dm1iaHfQ1R/TI+z3/JWp/pgub0j4jIQKH89ARR4ATAV2nbaOQS5XxU9maJP5jHaPdDDQSEHuE2UmpUTKg==", - "dev": true, + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.4.4.tgz", + "integrity": "sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==", "requires": { - "dom-serializer": "^0.2.1", + "dom-serializer": "^1.0.1", "domelementtype": "^2.0.1", - "domhandler": "^3.0.0" + "domhandler": "^4.0.0" } }, "dot-prop": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", - "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", "requires": { "is-obj": "^2.0.0" } @@ -6170,8 +7409,7 @@ "double-ended-queue": { "version": "2.1.0-0", "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", - "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=", - "dev": true + "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=" }, "duplexer2": { "version": "0.1.4", @@ -6179,6 +7417,35 @@ "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", "requires": { "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "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==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "duplexer3": { @@ -6197,25 +7464,29 @@ "safer-buffer": "^2.1.0" } }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true + "edge-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/edge-paths/-/edge-paths-2.2.1.tgz", + "integrity": "sha512-AI5fC7dfDmCdKo3m5y7PkYE8m6bMqR6pvVpgtrZkkhcJXFLelUgkjrhk3kXXx8Kbw2cRaTT4LkOR7hqf39KJdw==", + "dev": true, + "requires": { + "@types/which": "^1.3.2", + "which": "^2.0.2" + } }, "ejs": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.3.tgz", - "integrity": "sha512-wmtrUGyfSC23GC/B1SMv2ogAUgbQEtDmTIhfqielrG5ExIM9TP4UoYdi90jLF1aTcsWCJNEO0UrgKzP0y3nTSg==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.5.tgz", + "integrity": "sha512-dldq3ZfFtgVTJMLjOe+/3sROTzALlL9E34V4/sDtUd/KlBSS0s6U1/+WPE1B4sj9CXHJpL1M6rhNJnc9Wbal9w==", "dev": true, "requires": { "jake": "^10.6.1" } }, "electron": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-8.3.0.tgz", - "integrity": "sha512-XRjiIJICZCgUr2vKSUI2PTkfP0gPFqCtqJUaTJSfCTuE3nTrxBKOUNeRMuCzEqspKkpFQU3SB3MdbMSHmZARlQ==", + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/electron/-/electron-11.2.1.tgz", + "integrity": "sha512-Im1y29Bnil+Nzs+FCTq01J1OtLbs+2ZGLLllaqX/9n5GgpdtDmZhS/++JHBsYZ+4+0n7asO+JKQgJD+CqPClzg==", "dev": true, "requires": { "@electron/get": "^1.0.1", @@ -6224,59 +7495,48 @@ }, "dependencies": { "@types/node": { - "version": "12.12.42", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.42.tgz", - "integrity": "sha512-R/9QdYFLL9dE9l5cWWzWIZByVGFd7lk7JVOJ7KD+E1SJ4gni7XJRLz9QTjyYQiHIqEAgku9VgxdLjMlhhUaAFg==", + "version": "12.19.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.15.tgz", + "integrity": "sha512-lowukE3GUI+VSYSu6VcBXl14d61Rp5hA1D+61r16qnwC0lYNSqdxcvRh0pswejorHfS+HgwBasM8jLXz0/aOsw==", "dev": true } } }, "electron-builder": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-22.6.1.tgz", - "integrity": "sha512-3/VNg9GfXKHM53TilFtfF1+bsAR8THK1XHgeqCpsiequa02J9jTPc/DhpCUKQPkrs6/EIGxP7uboop7XYoew0Q==", + "version": "22.9.1", + "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-22.9.1.tgz", + "integrity": "sha512-GXPt8l5Mxwm1QKYopUM6/Tdh9W3695G6Ax+IFyj5pQ51G4SD5L1uq4/RkPSsOgs3rP7jNSV6g6OfDzdtVufPdA==", "dev": true, "requires": { "@types/yargs": "^15.0.5", - "app-builder-lib": "22.6.1", + "app-builder-lib": "22.9.1", "bluebird-lst": "^1.0.9", - "builder-util": "22.6.1", - "builder-util-runtime": "8.7.0", - "chalk": "^4.0.0", - "dmg-builder": "22.6.1", - "fs-extra": "^9.0.0", + "builder-util": "22.9.1", + "builder-util-runtime": "8.7.2", + "chalk": "^4.1.0", + "dmg-builder": "22.9.1", + "fs-extra": "^9.0.1", "is-ci": "^2.0.0", "lazy-val": "^1.0.4", "read-config-file": "6.0.0", "sanitize-filename": "^1.6.3", - "update-notifier": "^4.1.0", - "yargs": "^15.3.1" + "update-notifier": "^4.1.1", + "yargs": "^16.0.3" }, "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==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, - "builder-util-runtime": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.7.0.tgz", - "integrity": "sha512-G1AqqVM2vYTrSFR982c1NNzwXKrGLQjVjaZaWQdn4O6Z3YKjdMDofw88aD9jpyK9ZXkrCxR0tI3Qe9wNbyTlXg==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "sax": "^1.2.4" - } - }, "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -6305,9 +7565,9 @@ "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==", + "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" @@ -6316,259 +7576,280 @@ } }, "electron-chromedriver": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/electron-chromedriver/-/electron-chromedriver-8.0.0.tgz", - "integrity": "sha512-d0210ExhkGOwYLXFZHQR6LISZ8UbMqXWLwjTe8Cdh44XlO4z4+6DWQfM0p7aB2Qak/An6tN732Yl98wN1ylZww==", - "dev": true, - "requires": { - "electron-download": "^4.1.1", - "extract-zip": "^1.6.7" - } - }, - "electron-download": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-4.1.1.tgz", - "integrity": "sha512-FjEWG9Jb/ppK/2zToP+U5dds114fM1ZOJqMAR4aXXL5CvyPE9fiqBK/9YcwC9poIFQTEJk/EM/zyRwziziRZrg==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/electron-chromedriver/-/electron-chromedriver-11.0.0.tgz", + "integrity": "sha512-ayMJPBbB4puU0SqYbcD9XvF3/7GWIhqKE1n5lG2/GQPRnrZkNoPIilsrS0rQcD50Xhl69KowatDqLhUznZWtbA==", "dev": true, "requires": { - "debug": "^3.0.0", - "env-paths": "^1.0.0", - "fs-extra": "^4.0.1", - "minimist": "^1.2.0", - "nugget": "^2.0.1", - "path-exists": "^3.0.0", - "rc": "^1.2.1", - "semver": "^5.4.1", - "sumchecker": "^2.0.2" + "@electron/get": "^1.12.2", + "extract-zip": "^2.0.0" }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, - "env-paths": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz", - "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=", - "dev": true - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "sumchecker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-2.0.2.tgz", - "integrity": "sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4=", + "extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, "requires": { - "debug": "^2.2.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" } }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "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 } } }, + "electron-is-dev": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-1.2.0.tgz", + "integrity": "sha512-R1oD5gMBPS7PVU8gJwH6CtT0e6VSoD0+SzSnYpNm+dBkcijgA+K7VAMHDfnRq/lkKPZArpzplTW6jfiMYosdzw==", + "dev": true + }, "electron-log": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/electron-log/-/electron-log-4.2.0.tgz", - "integrity": "sha512-Yy1X8iZEzoBA8pu5b7YU07dRHi1GPM9C5jLEOn87Uqtdc9rbe6KbvvQ/AAAtGvn4/GC3azRW/eeiSI4ZF+Hm2A==" + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/electron-log/-/electron-log-4.3.1.tgz", + "integrity": "sha512-S/0CMjYjgyWUsZ3d27VvErPaI5W4oILp4jfeCuN4DhDqrJW6jKRUD2PxFfTdeZEIjM7+fttGg7A61rPcAcZC1w==" }, "electron-mocha": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/electron-mocha/-/electron-mocha-8.2.2.tgz", - "integrity": "sha512-kMXj+1TzQQODP0osIAg82YpwOsfRKx0xV+F5AxV+3UP54CIPwxaeZYC6pQoEVZBRKyPbcrhQzl8ar+6uGMvaUA==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/electron-mocha/-/electron-mocha-10.0.0.tgz", + "integrity": "sha512-eCIAPlhSi10wPcwYnZWxRAKoEGKX+UQyco3gjWcWPD6csfwCLT5CTvA1bId8Q8Gb0ss8Rj8y8kuK9eLCJtr0DQ==", "dev": true, "requires": { "ansi-colors": "^4.1.1", "electron-window": "^0.8.0", - "fs-extra": "^9.0.0", - "log-symbols": "^3.0.0", - "mocha": "^7.1.2", + "fs-extra": "^9.0.1", + "log-symbols": "^4.0.0", + "mocha": "^8.2.1", "which": "^2.0.2", - "yargs": "^15.3.1" + "yargs": "^16.1.1" }, "dependencies": { "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==", + "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": "^1.9.0" + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "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": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "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 + }, + "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 + }, "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", "dev": true, "requires": { - "chalk": "^2.4.2" + "chalk": "^4.0.0" } }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "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": { - "isexe": "^2.0.0" + "has-flag": "^4.0.0" } } } }, "electron-notarize": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/electron-notarize/-/electron-notarize-0.3.0.tgz", - "integrity": "sha512-tuDw8H0gcDOalNLv6RM2CwGvUXU60MPGZRDEmd0ppX+yP5XqL8Ec2DuXyz9J7WQSA3aRCfzIgH8C5CAivDYWMw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/electron-notarize/-/electron-notarize-1.0.0.tgz", + "integrity": "sha512-dsib1IAquMn0onCrNMJ6gtEIZn/azG8hZMCYOuZIMVMUeRMgBYHK1s5TK9P8xAcrAjh/2aN5WYHzgVSWX314og==", "dev": true, "requires": { "debug": "^4.1.1", - "fs-extra": "^8.1.0" + "fs-extra": "^9.0.1" }, "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "ms": "2.1.2" } }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "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 } } }, "electron-prompt": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/electron-prompt/-/electron-prompt-1.5.1.tgz", - "integrity": "sha512-rB5eZWIFXG+GWGbTtm/zDleihFmx7EAibSv04r/EM/fwV7jNzPfLfA86e+lSmYa5ZTFnS5mSQNiZD1YYJWJjXw==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/electron-prompt/-/electron-prompt-1.6.1.tgz", + "integrity": "sha512-b/Gh8CZwuECMOa7BC7C1hVJRRPAXQiQaH0KWDR+whnet0Ff0X/8dhLOKkykttclfyL75LgmhalDp2QoR032r/Q==", "requires": { "doc-ready": "^1.0.4" } }, "electron-publish": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-22.6.1.tgz", - "integrity": "sha512-/MkS47ospdSfAFW5Jp52OzYou14HhGJpZ51uAc3GJ5rCfACeqpimC/n1ajRLE3hcXxTWfd3t9MCuClq5jrUO5w==", + "version": "22.9.1", + "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-22.9.1.tgz", + "integrity": "sha512-ducLjRJLEeU87FaTCWaUyDjCoLXHkawkltP2zqS/n2PyGke54ZIql0tBuUheht4EpR8AhFbVJ11spSn1gy8r6w==", "dev": true, "requires": { - "@types/fs-extra": "^8.1.0", + "@types/fs-extra": "^9.0.1", "bluebird-lst": "^1.0.9", - "builder-util": "22.6.1", - "builder-util-runtime": "8.7.0", - "chalk": "^4.0.0", - "fs-extra": "^9.0.0", + "builder-util": "22.9.1", + "builder-util-runtime": "8.7.2", + "chalk": "^4.1.0", + "fs-extra": "^9.0.1", "lazy-val": "^1.0.4", - "mime": "^2.4.5" + "mime": "^2.4.6" }, "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==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, - "builder-util-runtime": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.7.0.tgz", - "integrity": "sha512-G1AqqVM2vYTrSFR982c1NNzwXKrGLQjVjaZaWQdn4O6Z3YKjdMDofw88aD9jpyK9ZXkrCxR0tI3Qe9wNbyTlXg==", + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { - "debug": "^4.1.1", - "sax": "^1.2.4" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "chalk": { + "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 + }, + "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "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" + } + } + } + }, + "electron-reloader": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/electron-reloader/-/electron-reloader-1.2.0.tgz", + "integrity": "sha512-xLExyxtf7hICsoh8o+ylWQlmNE2scfTaYvUuyOYU9bWvj/Hlk5LqAnZE4nsT0LNKF1o7mrnAgixj/TJq8RV+Zw==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "chokidar": "^3.5.0", + "date-time": "^3.1.0", + "electron-is-dev": "^1.2.0", + "find-up": "^5.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" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, + "chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.3.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -6584,16 +7865,66 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "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" + } + }, + "fsevents": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz", + "integrity": "sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==", + "dev": true, + "optional": true + }, "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 }, + "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" + } + }, + "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-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" + } + }, + "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 + }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "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" @@ -6602,58 +7933,32 @@ } }, "electron-store": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/electron-store/-/electron-store-5.1.1.tgz", - "integrity": "sha512-FLidOVE8JVCdJXHd7xY/JojKJ2r2WNmWt0O/LlX2LuSVV7dkG2RSy2/Gm2LFw8OKDfrNBd9c/s4X1ikMrJEUKg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/electron-store/-/electron-store-6.0.1.tgz", + "integrity": "sha512-8rdM0XEmDGsLuZM2oRABzsLX+XmD5x3rwxPMEPv0MrN9/BWanyy3ilb2v+tCrKtIZVF3MxUiZ9Bfqe8e0popKQ==", "requires": { - "conf": "^6.2.1", - "type-fest": "^0.7.1" + "conf": "^7.1.2", + "type-fest": "^0.16.0" } }, "electron-to-chromium": { - "version": "1.3.451", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.451.tgz", - "integrity": "sha512-2fvco0F2bBIgqzO8GRP0Jt/91pdrf9KfZ5FsmkYkjERmIJG585cFeFZV4+CO6oTmU3HmCTgfcZuEa7kW8VUh3A==", + "version": "1.3.649", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.649.tgz", + "integrity": "sha512-ojGDupQ3UMkvPWcTICe4JYe17+o9OLiFMPoduoR72Zp2ILt1mRVeqnxBEd6s/ptekrnsFU+0A4lStfBe/wyG/A==", "dev": true }, "electron-updater": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-4.2.5.tgz", - "integrity": "sha512-ir8SI3capF5pN4LTQY79bP7oqiBKjgtdDW378xVId5VcGUZ+Toei2j+fgx1mq3y4Qg19z4HqLxEZ9FqMD0T0RA==", - "requires": { - "@types/semver": "^7.1.0", - "builder-util-runtime": "8.6.2", - "fs-extra": "^8.1.0", - "js-yaml": "^3.13.1", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-4.3.5.tgz", + "integrity": "sha512-5jjN7ebvfj1cLI0VZMdCnJk6aC4bP+dy7ryBf21vArR0JzpRVk0OZHA2QBD+H5rm6ZSeDYHOY6+8PrMEqJ4wlQ==", + "requires": { + "@types/semver": "^7.3.1", + "builder-util-runtime": "8.7.2", + "fs-extra": "^9.0.1", + "js-yaml": "^3.14.0", "lazy-val": "^1.0.4", "lodash.isequal": "^4.5.0", - "pako": "^1.0.11", - "semver": "^7.1.3" - }, - "dependencies": { - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - } + "semver": "^7.3.2" } }, "electron-window": { @@ -6682,18 +7987,6 @@ "path-exists": "^3.0.0" }, "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -6702,152 +7995,53 @@ "requires": { "color-convert": "^1.9.0" } - }, - "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" - } - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + }, + "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": { - "mimic-fn": "^1.0.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" + "ms": "2.1.2" } }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { - "ansi-regex": "^4.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - } + "graceful-fs": "^4.1.6" } }, + "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 + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -6859,27 +8053,25 @@ "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==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "enabled": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz", - "integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=", - "requires": { - "env-variable": "0.0.x" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true + "dev": true, + "optional": true }, "encoding-down": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz", "integrity": "sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw==", - "dev": true, "requires": { "abstract-leveldown": "^6.2.1", "inherits": "^2.0.3", @@ -6900,32 +8092,33 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/end-stream/-/end-stream-0.1.0.tgz", "integrity": "sha1-MgA/P0OKKwFDFoE3+PpumGbIHtU=", - "dev": true, "requires": { "write-stream": "~0.4.3" } }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, "entities": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.2.tgz", - "integrity": "sha512-dmD3AvJQBUjKpcNkoqr+x+IF0SdRtPz9Vk0uTy4yWqga9ibB6s4v++QFWNohjiUGoMlF552ZvNyXDxz5iW0qmw==", - "dev": true + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" }, "env-paths": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==" }, - "env-variable": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.6.tgz", - "integrity": "sha512-bHz59NlBbtS0NhftmR8+ExBEekE7br0e01jw+kk0NDro7TtZzBYZ5ScGPs3OmwnpyfHTHOtr1Y6uedCdrIldtg==" - }, "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", "requires": { "prr": "~1.0.1" } @@ -6948,22 +8141,25 @@ } }, "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "version": "1.18.0-next.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz", + "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==", "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.1", + "object-inspect": "^1.9.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.3", + "string.prototype.trimstart": "^1.0.3" } }, "es-to-primitive": { @@ -6981,27 +8177,12 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/es3ify/-/es3ify-0.2.2.tgz", "integrity": "sha1-Xa4+ZQ5b42hLiAZlE9Uo0JJimGI=", - "dev": true, "requires": { "esprima": "^2.7.1", "jstransform": "~11.0.0", "through": "~2.3.4" - }, - "dependencies": { - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - } } }, - "es6-denodeify": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-denodeify/-/es6-denodeify-0.1.5.tgz", - "integrity": "sha1-MdTV/pxVA+ElRgQ5MQ4WoqPznB8=", - "dev": true - }, "es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", @@ -7009,18 +8190,18 @@ "dev": true, "optional": true }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, "escape-goat": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", "dev": true }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -7028,54 +8209,54 @@ "dev": true }, "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz", + "integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^0.3.0", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.2.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "file-entry-cache": "^6.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", "globals": "^12.1.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", + "levn": "^0.4.1", + "lodash": "^4.17.20", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { "ajv": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "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", @@ -7084,110 +8265,112 @@ "uri-js": "^4.2.2" } }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "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==", + "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": "^1.9.0" + "color-convert": "^2.0.1" } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "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 }, - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "ms": "2.1.2" } }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "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 + }, + "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 + }, + "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 }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "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": "^4.1.0" + "ansi-regex": "^5.0.0" } }, - "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 + "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" + } } } }, - "eslint-config-google": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/eslint-config-google/-/eslint-config-google-0.14.0.tgz", - "integrity": "sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw==", - "dev": true - }, - "eslint-config-prettier": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz", - "integrity": "sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==", + "eslint-config-airbnb-base": { + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", + "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", "dev": true, "requires": { - "get-stdin": "^6.0.0" + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" } }, + "eslint-config-prettier": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz", + "integrity": "sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg==", + "dev": true + }, "eslint-import-resolver-node": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz", - "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", + "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", "dev": true, "requires": { "debug": "^2.6.9", "resolve": "^1.13.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } } }, "eslint-module-utils": { @@ -7198,63 +8381,61 @@ "requires": { "debug": "^2.6.9", "pkg-dir": "^2.0.0" + } + }, + "eslint-plugin-html": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.1.1.tgz", + "integrity": "sha512-JSe3ZDb7feKMnQM27XWGeoIjvP4oWQMJD9GZ6wW67J7/plVL87NK72RBwlvfc3tTZiYUchHhxAwtgEd1GdofDA==", + "dev": true, + "requires": { + "htmlparser2": "^5.0.1" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "domhandler": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.3.0.tgz", + "integrity": "sha512-J1C5rIANUbuYK+FuFL98650rihynUOEzRLxW+90bKZRWB6A1X1Tf82GxR1qAWLyfNPRvjqfip3Q5tdYlmAa9lA==", "dev": true, "requires": { - "ms": "2.0.0" + "domelementtype": "^2.0.1" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "htmlparser2": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-5.0.1.tgz", + "integrity": "sha512-vKZZra6CSe9qsJzh0BjBGXo8dvzNsq/oGvsjfRdOrrryfeD9UOBEEQdeoqCRmKZchF5h2zOBMQ6YuQ0uRUmdbQ==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^3.3.0", + "domutils": "^2.4.2", + "entities": "^2.0.0" + } } } }, - "eslint-plugin-html": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.0.2.tgz", - "integrity": "sha512-Ik/z32UteKLo8GEfwNqVKcJ/WOz/be4h8N5mbMmxxnZ+9aL9XczOXQFz/bGu+nAGVoRg8CflldxJhONFpqlrxw==", - "dev": true, - "requires": { - "htmlparser2": "^4.1.0" - } - }, "eslint-plugin-import": { - "version": "2.20.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz", - "integrity": "sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==", + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", + "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", "dev": true, "requires": { - "array-includes": "^3.0.3", - "array.prototype.flat": "^1.2.1", + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", "contains-path": "^0.1.0", "debug": "^2.6.9", "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.2", - "eslint-module-utils": "^2.4.1", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.0", "has": "^1.0.3", "minimatch": "^3.0.4", - "object.values": "^1.1.0", + "object.values": "^1.1.1", "read-pkg-up": "^2.0.0", - "resolve": "^1.12.0" + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, "doctrine": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", @@ -7264,15 +8445,65 @@ "esutils": "^2.0.2", "isarray": "^1.0.0" } + } + } + }, + "eslint-plugin-lit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-lit/-/eslint-plugin-lit-1.3.0.tgz", + "integrity": "sha512-fy6Lr5vYI3kvCYaDXA20lwyKAp1keS9UjR5ntj8U2TeV+1yUta3S7xxXe+rABKRPbcNzi1ZvQLE1LmNKc9yr4Q==", + "dev": true, + "requires": { + "parse5": "^6.0.1", + "parse5-htmlparser2-tree-adapter": "^6.0.1", + "requireindex": "^1.2.0" + } + }, + "eslint-plugin-lit-a11y": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-lit-a11y/-/eslint-plugin-lit-a11y-1.0.1.tgz", + "integrity": "sha512-c+GgGSXb9HMgbzJGp0yl+msHk2rBXcA7KwbobbLonSXdHm6ln7zRwAEj4i7527FOaCKkhxiN6RXfOJcZT1/Bow==", + "dev": true, + "requires": { + "aria-query": "^4.2.2", + "axe-core": "^4.0.2", + "axobject-query": "^2.2.0", + "dom5": "^3.0.1", + "emoji-regex": "^9.0.0", + "eslint": "^7.6.0", + "eslint-rule-extender": "0.0.1", + "intl-list-format": "^1.0.3", + "parse5": "^5.1.1", + "parse5-htmlparser2-tree-adapter": "^6.0.0", + "requireindex": "~1.1.0" + }, + "dependencies": { + "emoji-regex": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.1.tgz", + "integrity": "sha512-117l1H6U4X3Krn+MrzYrL57d5H7siRHWraBs7s+LjRuFK7Fe7hJqnJ0skWlinqsycVLU5YAo6L8CsEYQ0V5prg==", + "dev": true }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "dev": true + }, + "requireindex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.1.0.tgz", + "integrity": "sha1-5UBLgVV+91225JxacgBIk/4D4WI=", "dev": true } } }, + "eslint-plugin-no-only-tests": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.4.0.tgz", + "integrity": "sha512-azP9PwQYfGtXJjW273nIxQH9Ygr+5/UyeW2wEjYoDtVYPI+WPKwbj0+qcAKYUXFZLRumq4HKkFaoDBAwBoXImQ==", + "dev": true + }, "eslint-plugin-wc": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/eslint-plugin-wc/-/eslint-plugin-wc-1.2.0.tgz", @@ -7283,29 +8514,43 @@ "validate-element-name": "^2.1.1" } }, + "eslint-rule-extender": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/eslint-rule-extender/-/eslint-rule-extender-0.0.1.tgz", + "integrity": "sha512-F0j1Twve3lamL3J0rRSVAynlp58sDPG39JFcQrM+u9Na7PmCgiPHNODh6YE9mduaGcsn3NBqbf6LZRj0cLr8Ng==", + "dev": true + }, "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "eslint-visitor-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", - "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", "dev": true }, "esm": { @@ -7316,32 +8561,37 @@ "esmangle-evaluator": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/esmangle-evaluator/-/esmangle-evaluator-1.0.1.tgz", - "integrity": "sha1-Yg2GbvSGGzMR91dm1SqFcrs8YzY=", - "dev": true + "integrity": "sha1-Yg2GbvSGGzMR91dm1SqFcrs8YzY=" }, "espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "requires": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" }, "dependencies": { "acorn": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", - "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "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==" + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" }, "esquery": { "version": "1.3.1", @@ -7353,20 +8603,28 @@ }, "dependencies": { "estraverse": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", - "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", "dev": true } } }, "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, "estraverse": { @@ -7387,17 +8645,10 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, "event-target-shim": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "dev": true + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" }, "eventie": { "version": "1.0.6", @@ -7419,156 +8670,13 @@ "p-finally": "^2.0.0", "signal-exit": "^3.0.2", "strip-final-newline": "^2.0.0" - }, - "dependencies": { - "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" - } - }, - "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 - }, - "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 - }, - "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 - }, - "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" - } - } - } - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "dev": true, - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } } }, - "express-session": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.17.1.tgz", - "integrity": "sha512-UbHwgqjxQZJiWRTMyhvWGvjBQduGCSBDhhZXYenziMFjxst5rMV+aJZ6hKPHZnPyHGsrqRICxtX8jtEbm/z36Q==", - "dev": true, - "requires": { - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-headers": "~1.0.2", - "parseurl": "~1.3.3", - "safe-buffer": "5.2.0", - "uid-safe": "~2.1.5" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", - "dev": true - } - } + "exit-on-epipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", + "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==", + "dev": true }, "extend": { "version": "3.0.2", @@ -7608,23 +8716,6 @@ "debug": "^2.6.9", "mkdirp": "^0.5.4", "yauzl": "^2.10.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } } }, "extsprintf": { @@ -7637,7 +8728,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", "integrity": "sha1-wY0k71CRF0pJfzGM0ksCaiXN2rQ=", - "dev": true, "requires": { "acorn": "^1.0.3", "foreach": "^2.0.5", @@ -7648,14 +8738,12 @@ "acorn": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", - "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=", - "dev": true + "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=" }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" } } }, @@ -7690,36 +8778,51 @@ } }, "fecha": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz", - "integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.0.tgz", + "integrity": "sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg==" }, "fetch-cookie": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-0.7.3.tgz", - "integrity": "sha512-rZPkLnI8x5V+zYAiz8QonAHsTb4BY+iFowFBI1RFn0zrO343AVp9X7/yUj/9wL6Ef/8fLls8b/vGtzUvmyAUGA==", - "dev": true, + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-0.10.1.tgz", + "integrity": "sha512-beB+VEd4cNeVG1PY+ee74+PkuCQnik78pgLi5Ah/7qdUfov8IctU0vLUbBT8/10Ma5GMBeI4wtxhGrEfKNYs2g==", + "requires": { + "tough-cookie": "^2.3.3 || ^3.0.1 || ^4.0.0" + } + }, + "fetch-sparql-endpoint": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/fetch-sparql-endpoint/-/fetch-sparql-endpoint-1.9.0.tgz", + "integrity": "sha512-iACwPeKhvy5aM2rbzdnKOUWHLM3tW+odZ88pdPG+xCXSTGMtWBI8FP8fqgHcZsxNq9NfRU7+pMsMsU5JCNabCA==", "requires": { - "es6-denodeify": "^0.1.1", - "tough-cookie": "^2.3.3" + "cross-fetch": "^3.0.6", + "is-stream": "^2.0.0", + "minimist": "^1.2.0", + "n3": "^1.6.3", + "rdf-string": "^1.5.0", + "sparqljs": "^3.1.2", + "sparqljson-parse": "^1.6.0", + "sparqlxml-parse": "^1.4.0", + "stream-to-string": "^1.1.0", + "web-streams-node": "^0.4.0" } }, "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz", + "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "filelist": { @@ -7731,6 +8834,23 @@ "minimatch": "^3.0.4" } }, + "filename-reserved-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", + "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", + "dev": true + }, + "filenamify": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-4.2.0.tgz", + "integrity": "sha512-pkgE+4p7N1n7QieOopmn3TqJaefjdWXwEkj2XLZJLKfOgcQKkn11ahvGNgTD8mLggexLiDFQxeTs14xVU22XPA==", + "dev": true, + "requires": { + "filename-reserved-regex": "^2.0.0", + "strip-outer": "^1.0.1", + "trim-repeated": "^1.0.0" + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -7740,38 +8860,6 @@ "to-regex-range": "^5.0.1" } }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -7780,56 +8868,51 @@ "locate-path": "^3.0.0" } }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "find-versions": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz", + "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==", "dev": true, "requires": { - "is-buffer": "~2.0.3" - }, - "dependencies": { - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - } + "semver-regex": "^3.1.2" } }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - }, - "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - } + "flatted": "^3.1.0", + "rimraf": "^3.0.2" } }, "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, + "fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" + }, + "follow-redirects": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz", + "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==" + }, "foreach": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" }, "forever-agent": { "version": "0.6.1", @@ -7847,18 +8930,6 @@ "mime-types": "^2.1.12" } }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, "fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", @@ -7866,14 +8937,14 @@ "dev": true }, "fs-extra": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.0.tgz", - "integrity": "sha512-pmEYSk3vYsG/bF651KPUXZ+hvjpgWYw/Gc7W9NFUe3ZVLczKKWIij3IKpOrQcdw4TILtibFslZ0UmR8Vvzig4g==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "requires": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", - "universalify": "^1.0.0" + "universalify": "^2.0.0" } }, "fs-minipass": { @@ -7905,6 +8976,16 @@ "inherits": "~2.0.0", "mkdirp": ">=0.5 0", "rimraf": "2" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + } } }, "function-bind": { @@ -7919,25 +9000,17 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, - "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "requires": { - "globule": "^1.0.0" - } - }, "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==", + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "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==" + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true }, "get-func-name": { "version": "2.0.0", @@ -7945,16 +9018,39 @@ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, + "get-intrinsic": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.0.tgz", + "integrity": "sha512-M11rgtQp5GZMZzDL7jLTNxbDfurpzuau5uqRWDPvlHjfvg3TdScAZo96GLvhMjImrmR8uAt0FS2RLoMrfWGKlg==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-own-enumerable-property-symbols": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", + "dev": true + }, + "get-port": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", + "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==", + "dev": true + }, "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", "dev": true }, "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "requires": { "pump": "^3.0.0" @@ -7992,28 +9088,36 @@ } }, "global-agent": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-2.1.8.tgz", - "integrity": "sha512-VpBe/rhY6Rw2VDOTszAMNambg+4Qv8j0yiTNDYEXXXxkUNGWLHp8A3ztK4YDBbFNcWF4rgsec6/5gPyryya/+A==", + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-2.1.12.tgz", + "integrity": "sha512-caAljRMS/qcDo69X9BfkgrihGUgGx44Fb4QQToNQjsiWh+YlQ66uqYVAdA8Olqit+5Ng0nkz09je3ZzANMZcjg==", "dev": true, "optional": true, "requires": { - "boolean": "^3.0.0", - "core-js": "^3.6.4", + "boolean": "^3.0.1", + "core-js": "^3.6.5", "es6-error": "^4.1.1", - "matcher": "^2.1.0", - "roarr": "^2.15.2", - "semver": "^7.1.2", - "serialize-error": "^5.0.0" + "matcher": "^3.0.0", + "roarr": "^2.15.3", + "semver": "^7.3.2", + "serialize-error": "^7.0.1" } }, "global-dirs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", - "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz", + "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==", "dev": true, "requires": { - "ini": "^1.3.5" + "ini": "1.3.7" + }, + "dependencies": { + "ini": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", + "dev": true + } } }, "global-tunnel-ng": { @@ -8030,10 +9134,21 @@ } }, "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 + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + }, + "dependencies": { + "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 + } + } }, "globalthis": { "version": "1.0.1", @@ -8045,17 +9160,6 @@ "define-properties": "^1.1.3" } }, - "globule": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz", - "integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==", - "dev": true, - "requires": { - "glob": "~7.1.1", - "lodash": "~4.17.12", - "minimatch": "~3.0.2" - } - }, "good-listener": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", @@ -8107,6 +9211,36 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, + "graphql": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.5.0.tgz", + "integrity": "sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA==" + }, + "graphql-ld": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/graphql-ld/-/graphql-ld-1.2.0.tgz", + "integrity": "sha512-CEYmJcFCW7EumwOFdTVqo5cEv53VJLll5rNWQ29YOWLM6HKLzuWB+TBf40I4Eub+xai1Q7oFD9xguhq/rg9oaw==", + "requires": { + "@types/rdf-js": "*", + "graphql-to-sparql": "^2.2.0", + "jsonld-context-parser": "^2.1.0", + "sparqlalgebrajs": "^2.4.0", + "sparqljson-to-tree": "^2.1.0" + } + }, + "graphql-to-sparql": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/graphql-to-sparql/-/graphql-to-sparql-2.2.0.tgz", + "integrity": "sha512-RHe8mpmYtUreOLhvjbgwJKNGwQsvDyMdHNj+x4REgX7V02QSZvbpHE2IG6c0TO1DjbLRNUK7/2pRUhfq8FDLeA==", + "requires": { + "@types/rdf-js": "*", + "graphql": "^15.0.0", + "jsonld-context-parser": "^2.0.2", + "minimist": "^1.2.0", + "rdf-data-factory": "^1.0.3", + "sparqlalgebrajs": "^2.4.0" + } + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -8120,19 +9254,19 @@ "dev": true }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "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.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" }, "dependencies": { "ajv": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "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", @@ -8142,9 +9276,9 @@ } }, "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "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 } } @@ -8190,7 +9324,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/has-own-property-x/-/has-own-property-x-3.2.0.tgz", "integrity": "sha512-HtRQTYpRFz/YVaQ7jh2mU5iorMAxFcML9FNOLMI1f8VNJ2K0hpOlXoi1a+nmVl6oUcGnhd6zYOFAVe7NUFStyQ==", - "dev": true, "requires": { "cached-constructors-x": "^1.0.0", "to-object-x": "^1.5.0", @@ -8200,20 +9333,17 @@ "has-symbol-support-x": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", - "dev": true + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" }, "has-symbols": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" }, "has-to-string-tag-x": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "dev": true, "requires": { "has-symbol-support-x": "^1.4.1" } @@ -8224,6 +9354,15 @@ "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", "dev": true }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -8237,82 +9376,242 @@ "dev": true }, "htmlparser2": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.0.0.tgz", + "integrity": "sha512-numTQtDZMoh78zJpaNdJ9MXb2cv5G3jwUoe3dMQODubZvLoGvTE/Ofp6sHvH8OGKcN/8A47pGLi/k58xHP/Tfw==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.4.4", + "entities": "^2.0.0" + } + }, + "http-cache-semantics": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz", - "integrity": "sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q==", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, + "http-link-header": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.0.3.tgz", + "integrity": "sha512-nARK1wSKoBBrtcoESlHBx36c1Ln/gnbNQi1eB6MeTUefJIT3NvUOsV15bClga0k38f0q/kN5xxrGSDS3EFnm9w==" + }, + "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" + } + }, + "http2-wrapper": { + "version": "1.0.0-beta.5.2", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.0-beta.5.2.tgz", + "integrity": "sha512-xYz9goEyBnC8XwXDTuC/MZ6t+MrKVQZOk4s7+PaDkwIsQd8IwqvM+0M6bA/2lvG8GHXcPdf+MejTUeO2LCPCeQ==", "dev": true, "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^3.0.0", - "domutils": "^2.0.0", - "entities": "^2.0.0" + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" } }, - "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", - "dev": true - }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "https-proxy-agent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", + "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==", "dev": true, "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" + "agent-base": "5", + "debug": "4" }, "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "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 } } }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, + "husky": { + "version": "4.3.8", + "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.8.tgz", + "integrity": "sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow==", "dev": true, "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "chalk": "^4.0.0", + "ci-info": "^2.0.0", + "compare-versions": "^3.6.0", + "cosmiconfig": "^7.0.0", + "find-versions": "^4.0.0", + "opencollective-postinstall": "^2.0.2", + "pkg-dir": "^5.0.0", + "please-upgrade-node": "^3.2.0", + "slash": "^3.0.0", + "which-pm-runs": "^1.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" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "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 + }, + "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" + } + }, + "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 + }, + "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" + } + }, + "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-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" + } + }, + "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 + }, + "pkg-dir": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", + "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", + "dev": true, + "requires": { + "find-up": "^5.0.0" + } + }, + "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" + } + } } }, "i18n": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/i18n/-/i18n-0.10.0.tgz", - "integrity": "sha512-lCSpIm/ZLUCQMAv+UAjSEYzPq96KG7fIx6o1mNQ0MuTBzXpPgd31t4WLzbPG10nKTLJzj9176dgOG7C0wUquSA==", + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/i18n/-/i18n-0.13.2.tgz", + "integrity": "sha512-PB65bHhQESMBIl/xVNChEAzoxZ5W6FrZ1H9Ma/YcPeSfE7VS9b0sqwBPusa0CfzSKUPSl+uMhRIgyv3jkE7XNw==", "requires": { - "debug": "*", - "make-plural": "^6.2.1", + "debug": "^4.1.1", + "make-plural": "^6.2.2", "math-interval-parser": "^2.0.1", "messageformat": "^2.3.0", "mustache": "^4.0.1", "sprintf-js": "^1.1.2" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } } }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } }, "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", - "dev": true + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "ignore": { "version": "4.0.6", @@ -8323,13 +9622,17 @@ "immediate": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", - "dev": true + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + }, + "immutable": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", + "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=" }, "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -8345,7 +9648,8 @@ "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true }, "indent-string": { "version": "2.1.0", @@ -8359,8 +9663,7 @@ "infinity-x": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/infinity-x/-/infinity-x-1.0.2.tgz", - "integrity": "sha512-2Ioz+exrAwlHxFBaDHQIbvUyjKFt0YjIal34/agfzx738aT1zBQwSU5A8Zgb1IQ2r24BtXrkeZZusxE40MyZaQ==", - "dev": true + "integrity": "sha512-2Ioz+exrAwlHxFBaDHQIbvUyjKFt0YjIal34/agfzx738aT1zBQwSU5A8Zgb1IQ2r24BtXrkeZZusxE40MyZaQ==" }, "inflight": { "version": "1.0.6", @@ -8377,159 +9680,123 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "inline-process-browser": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-1.0.0.tgz", "integrity": "sha1-RqYbFT3TybFiSxoAYm7bT39BTyI=", - "dev": true, "requires": { "falafel": "^1.0.1", "through2": "^0.6.5" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } - } } }, "inquirer": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", - "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", "dev": true, "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^3.0.0", - "cli-cursor": "^3.1.0", + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.15", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.5.3", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", "through": "^2.3.6" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "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==", + "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": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" + "color-convert": "^1.9.0" } }, "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "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==", + "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": { - "color-name": "~1.1.4" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "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 - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } } }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "has-flag": "^4.0.0" + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } } } } }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "intl-list-format": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/intl-list-format/-/intl-list-format-1.0.3.tgz", + "integrity": "sha512-VNF1Mh0K1xALXkz/5QsK1gfKRvEQO/jWaniTGAzQvbzGr5uyGDskQrRjnf6Qnbc9/JRbNE8BQtTg6iWuFrZorw==", "dev": true }, "is-array-buffer-x": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/is-array-buffer-x/-/is-array-buffer-x-1.7.0.tgz", "integrity": "sha512-ufSZRMY2WZX5xyNvk0NOZAG7cgi35B/sGQDGqv8w0X7MoQ2GC9vedanJhuYTPaC4PUCqLQsda1w7NF+dPZmAJw==", - "dev": true, "requires": { "attempt-x": "^1.1.0", "has-to-string-tag-x": "^1.4.1", @@ -8555,8 +9822,7 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-builtin-module": { "version": "3.0.0", @@ -8568,9 +9834,9 @@ } }, "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", "dev": true }, "is-ci": { @@ -8582,10 +9848,24 @@ "ci-info": "^2.0.0" } }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + }, + "is-docker": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", + "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", "dev": true }, "is-electron-renderer": { @@ -8604,7 +9884,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-falsey-x/-/is-falsey-x-1.0.3.tgz", "integrity": "sha512-RWjusR6LXAhGa0Vus7aD1rwJuJwdJsvG3daAVMDvOAgvGuGm4eilNgoSuXhpv2/2qpLDvioAKTNb3t3XYidCNg==", - "dev": true, "requires": { "to-boolean-x": "^1.0.2" } @@ -8619,7 +9898,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/is-finite-x/-/is-finite-x-3.0.4.tgz", "integrity": "sha512-wdSI5zk/Pl21HzGcLWFoFzuDa8gsgcqhwZGAZryL2eU7RKf7+g+q4jL2gGItrBs/YtspkjOrJ4JxXNZqquoAWA==", - "dev": true, "requires": { "infinity-x": "^1.0.1", "is-nan-x": "^1.0.2" @@ -8628,13 +9906,13 @@ "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==" + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true }, "is-function-x": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/is-function-x/-/is-function-x-3.3.0.tgz", "integrity": "sha512-SreSSU1dlgYaXR5c0mm4qJHKYHIiGiEY+7Cd8/aRLLoMP/VvofD2XcWgBnP833ajpU5XzXbUSpfysnfKZLJFlg==", - "dev": true, "requires": { "attempt-x": "^1.1.1", "has-to-string-tag-x": "^1.4.1", @@ -8649,8 +9927,7 @@ "is-primitive": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" } } }, @@ -8667,7 +9944,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-index-x/-/is-index-x-1.1.0.tgz", "integrity": "sha512-qULKLMepQLGC8rSVdi8uF2vI4LiDrU9XSDg1D+Aa657GIB7GV1jHpga7uXgQvkt/cpQ5mVBHUFTpSehYSqT6+A==", - "dev": true, "requires": { "math-clamp-x": "^1.2.0", "max-safe-integer": "^1.0.1", @@ -8695,14 +9971,18 @@ "is-nan-x": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-nan-x/-/is-nan-x-1.0.3.tgz", - "integrity": "sha512-WenNBLVGSZID8shogsB++42vF7gvotCfneXM9KMCAKwNPXa8VfAu/RWwpqvnK7dLOP4Z7uitocb0TZ6rAiOccA==", + "integrity": "sha512-WenNBLVGSZID8shogsB++42vF7gvotCfneXM9KMCAKwNPXa8VfAu/RWwpqvnK7dLOP4Z7uitocb0TZ6rAiOccA==" + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", "dev": true }, "is-nil-x": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/is-nil-x/-/is-nil-x-1.4.2.tgz", "integrity": "sha512-9aDY7ir7IGb5HlgqL+b38v2YMxf8S7MEHHxjHGzUhijg2crq47RKdxL37bS6dU0VN87wy2IBZP4akgQtIXmyvg==", - "dev": true, "requires": { "lodash.isnull": "^3.0.0", "validate.io-undefined": "^1.0.3" @@ -8729,7 +10009,6 @@ "version": "1.7.1", "resolved": "https://registry.npmjs.org/is-object-like-x/-/is-object-like-x-1.7.1.tgz", "integrity": "sha512-89nz+kESAW2Y7udq+PdRX/dZnRN2WP1b19Gdv4OYE1Xjoekn1xf31l0ZPzT40qdPD7I2nveNFm9rxxI0vmnGHA==", - "dev": true, "requires": { "is-function-x": "^3.3.0", "is-primitive": "^3.0.0" @@ -8741,6 +10020,12 @@ "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", "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-potential-custom-element-name": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz", @@ -8750,51 +10035,46 @@ "is-primitive": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-3.0.1.tgz", - "integrity": "sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w==", - "dev": true + "integrity": "sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w==" }, "is-reference": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz", - "integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dev": true, "requires": { - "@types/estree": "0.0.39" - }, - "dependencies": { - "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - } + "@types/estree": "*" } }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", "dev": true, "requires": { - "has": "^1.0.3" + "has-symbols": "^1.0.1" } }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", + "dev": true + }, "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "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==" }, "is-string": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", - "dev": true + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==" }, "is-symbol": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, "requires": { "has-symbols": "^1.0.1" } @@ -8802,7 +10082,8 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true }, "is-utf8": { "version": "0.2.1", @@ -8810,6 +10091,15 @@ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + }, "is-yarn-global": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", @@ -8840,9 +10130,9 @@ "dev": true }, "jake": { - "version": "10.7.1", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.7.1.tgz", - "integrity": "sha512-FUkLZXms1LSTQop5EJBdXVzbM0q6yYWMM4vo/TiLQeHJ4UMJVO8DBTZFiAgMBJctin9q92xnr2vdH7Wrpn7tTQ==", + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.2.tgz", + "integrity": "sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A==", "dev": true, "requires": { "async": "0.9.x", @@ -8901,9 +10191,12 @@ } }, "jexl": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/jexl/-/jexl-2.2.2.tgz", - "integrity": "sha512-HYDGbiZtGLbaxp1b0S7Nqbtegu5zhxaUBzsrMIpoEJDNr1M8lSuowpO7ziXldc/+wGGvwkZYQSS8mW2cPpiGgA==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/jexl/-/jexl-2.3.0.tgz", + "integrity": "sha512-ecqln4kTWNkMwbFvTukOMDq1jy1GcPzvshhMp/s4pxU86xdLDq7HbDRa87DfMfbSAOS8V6EwvCdfs0S+w/iycA==", + "requires": { + "@babel/runtime": "^7.10.2" + } }, "js-levenshtein-esm": { "version": "1.2.0", @@ -8918,12 +10211,19 @@ "dev": true }, "js-yaml": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", - "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + } } }, "jsbn": { @@ -8944,6 +10244,12 @@ "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", "dev": true }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -8964,7 +10270,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, "requires": { "jsonify": "~0.0.0" } @@ -8982,28 +10287,76 @@ "dev": true }, "json5": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", - "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "dev": true, "requires": { - "minimist": "^1.2.5" + "minimist": "^1.2.0" } }, + "jsonc-parser": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-1.0.3.tgz", + "integrity": "sha512-hk/69oAeaIzchq/v3lS50PXuzn5O2ynldopMC+SWBql7J2WtdptfB9dy8Y7+Og5rPkTCpn83zTiO8FMcqlXJ/g==", + "dev": true + }, "jsonfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", - "integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "requires": { "graceful-fs": "^4.1.6", - "universalify": "^1.0.0" + "universalify": "^2.0.0" } }, "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, + "jsonld-context-parser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/jsonld-context-parser/-/jsonld-context-parser-2.1.1.tgz", + "integrity": "sha512-7yKhnwFaiCnDPUZYQuAWyT0zZBfOKZDyjtqFVNbXrYRkboU+m55UsastsfXbo7qNroTGdFiEyxHEHDEfBC0P4Q==", + "requires": { + "@types/http-link-header": "^1.0.1", + "@types/node": "^13.1.0", + "canonicalize": "^1.0.1", + "cross-fetch": "^3.0.6", + "http-link-header": "^1.0.2", + "relative-to-absolute-iri": "^1.0.5" + }, + "dependencies": { + "@types/node": { + "version": "13.13.40", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.40.tgz", + "integrity": "sha512-eKaRo87lu1yAXrzEJl0zcJxfUMDT5/mZalFyOkT44rnQps41eS2pfWzbaulSPpQLFNy29bFqn+Y5lOTL8ATlEQ==" + } + } + }, + "jsonld-streaming-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jsonld-streaming-parser/-/jsonld-streaming-parser-2.2.0.tgz", + "integrity": "sha512-uaBP4sSFqYuupkfsQhRj7U/0KEFTqxElaUPn3CtYGEOsjvqCEexTkrVI7fPLoDERMIC2UfbzdHuN6rmESFGzgw==", + "requires": { + "@types/http-link-header": "^1.0.1", + "@types/rdf-js": "*", + "canonicalize": "^1.0.1", + "http-link-header": "^1.0.2", + "jsonld-context-parser": "^2.0.1", + "jsonparse": "^1.3.1", + "rdf-data-factory": "^1.0.2" + } + }, + "jsonld-streaming-serializer": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/jsonld-streaming-serializer/-/jsonld-streaming-serializer-1.2.0.tgz", + "integrity": "sha512-66uJz15dxuUFiVKbji5eV4h+1F3XTKnOhZjK9Plx0zyL1CkG5/zhCK4U1wPTg0nUhSUODZ+jAtuRoD4zdZjKYA==", + "requires": { + "@types/rdf-js": "*", + "jsonld-context-parser": "^2.0.0" + } }, "jsonlint": { "version": "1.6.3", @@ -9014,6 +10367,11 @@ "nomnom": "^1.5.x" } }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -9027,16 +10385,15 @@ } }, "jsrsasign": { - "version": "8.0.15", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.15.tgz", - "integrity": "sha512-6UKHqnNs5lYROn03wf1BTw7DQx5tW616DTigjbo0JHV97D3HzIqYmPVCBSNsfEfQOrfpFqmPZJvaC3cMNOT0Yw==", + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.1.5.tgz", + "integrity": "sha512-xlCtvZ+S2fPnw6YQyPkgMZ1dgMJ02bmK5Rt1umpo/KThBP6Zzq9awzXU71NEw1NYxXmLFnjorpQYKLZzMdF3lg==", "dev": true }, "jstransform": { "version": "11.0.3", "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-11.0.3.tgz", "integrity": "sha1-CaeJk+CuTU70SH9hVakfYZDLQiM=", - "dev": true, "requires": { "base62": "^1.1.0", "commoner": "^0.10.1", @@ -9048,15 +10405,14 @@ "esprima-fb": { "version": "15001.1.0-dev-harmony-fb", "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz", - "integrity": "sha1-MKlHMDxrjV6VW+4rmbHSMyBqaQE=", - "dev": true + "integrity": "sha1-MKlHMDxrjV6VW+4rmbHSMyBqaQE=" } } }, "just-extend": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", - "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.1.tgz", + "integrity": "sha512-aWgeGFW67BP3e5181Ep1Fv2v8z//iBJfrvyTnq8wG86vEESwmonn1zPBJ0VfmT9CJq2FIT0VsETtrNFm2a+SHA==", "dev": true }, "keyv": { @@ -9069,12 +10425,9 @@ } }, "kuler": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-1.0.1.tgz", - "integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==", - "requires": { - "colornames": "^1.1.1" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, "latest-version": { "version": "5.1.0", @@ -9097,37 +10450,67 @@ "dev": true, "requires": { "readable-stream": "^2.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "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 + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "level": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/level/-/level-6.0.0.tgz", - "integrity": "sha512-3oAi7gXLLNr7pHj8c4vbI6lHkXf35m8qb7zWMrNTrOax6CXBVggQAwL1xnC/1CszyYrW3BsLXsY5TMgTxtKfFA==", - "dev": true, + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/level/-/level-6.0.1.tgz", + "integrity": "sha512-psRSqJZCsC/irNhfHzrVZbmPYXDcEYhA5TVNwr+V92jF44rbf86hqGp8fiT702FyiArScYIlPSBTDUASCVNSpw==", "requires": { "level-js": "^5.0.0", "level-packager": "^5.1.0", - "leveldown": "^5.4.0", - "opencollective-postinstall": "^2.0.0" + "leveldown": "^5.4.0" } }, "level-codec": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.1.tgz", - "integrity": "sha512-ajFP0kJ+nyq4i6kptSM+mAvJKLOg1X5FiFPtLG9M5gCEZyBmgDi3FkDrvlMkEzrUn1cWxtvVmrvoS4ASyO/q+Q==", - "dev": true + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", + "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", + "requires": { + "buffer": "^5.6.0" + } }, "level-concat-iterator": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "dev": true + "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==" }, "level-errors": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, "requires": { "errno": "~0.1.1" } @@ -9136,31 +10519,16 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", - "dev": true, "requires": { "inherits": "^2.0.4", "readable-stream": "^3.4.0", "xtend": "^4.0.2" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } } }, "level-js": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/level-js/-/level-js-5.0.2.tgz", "integrity": "sha512-SnBIDo2pdO5VXh02ZmtAyPP6/+6YTJg2ibLtl9C34pWvmtMEmRTWpra+qO/hifkUtBTOtfx6S9vLDjBsBK4gRg==", - "dev": true, "requires": { "abstract-leveldown": "~6.2.3", "buffer": "^5.5.0", @@ -9172,32 +10540,15 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz", "integrity": "sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ==", - "dev": true, "requires": { "encoding-down": "^6.3.0", "levelup": "^4.3.2" - }, - "dependencies": { - "levelup": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", - "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", - "dev": true, - "requires": { - "deferred-leveldown": "~5.3.0", - "level-errors": "~2.0.0", - "level-iterator-stream": "~4.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - } } }, "level-supports": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "dev": true, "requires": { "xtend": "^4.0.2" } @@ -9206,16 +10557,14 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/level-write-stream/-/level-write-stream-1.0.0.tgz", "integrity": "sha1-P3+7Z5pVE3wP6zA97nZuEu4Twdw=", - "dev": true, "requires": { "end-stream": "~0.1.0" } }, "leveldown": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-5.4.1.tgz", - "integrity": "sha512-3lMPc7eU3yj5g+qF1qlALInzIYnkySIosR1AsUKFjL9D8fYbTLuENBAeDRZXIG4qeWOAyqRItOoLu2v2avWiMA==", - "dev": true, + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-5.6.0.tgz", + "integrity": "sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ==", "requires": { "abstract-leveldown": "~6.2.1", "napi-macros": "~2.0.0", @@ -9223,95 +10572,286 @@ } }, "levelup": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.1.0.tgz", - "integrity": "sha512-+Qhe2/jb5affN7BeFgWUUWVdYoGXO2nFS3QLEZKZynnQyP9xqA+7wgOz3fD8SST2UKpHQuZgjyJjTcB2nMl2dQ==", - "dev": true, + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", + "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", "requires": { - "deferred-leveldown": "~5.1.0", + "deferred-leveldown": "~5.3.0", "level-errors": "~2.0.0", "level-iterator-stream": "~4.0.0", + "level-supports": "~1.0.0", "xtend": "~4.0.0" + } + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", + "requires": { + "immediate": "~3.0.5" + } + }, + "lighthouse-logger": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.2.0.tgz", + "integrity": "sha512-wzUvdIeJZhRsG6gpZfmSCfysaxNEr43i+QT+Hie94wvHDKFLi4n7C2GqZ4sTC+PH5b5iktmXJvU87rWvhP3lHw==", + "dev": true, + "requires": { + "debug": "^2.6.8", + "marky": "^1.2.0" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "lint-staged": { + "version": "10.5.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.5.3.tgz", + "integrity": "sha512-TanwFfuqUBLufxCc3RUtFEkFraSPNR3WzWcGF39R3f2J7S9+iF9W0KTVLfSy09lYGmZS5NDCxjNvhGMSJyFCWg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "cli-truncate": "^2.1.0", + "commander": "^6.2.0", + "cosmiconfig": "^7.0.0", + "debug": "^4.2.0", + "dedent": "^0.7.0", + "enquirer": "^2.3.6", + "execa": "^4.1.0", + "listr2": "^3.2.2", + "log-symbols": "^4.0.0", + "micromatch": "^4.0.2", + "normalize-path": "^3.0.0", + "please-upgrade-node": "^3.2.0", + "string-argv": "0.3.1", + "stringify-object": "^3.3.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.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "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 + }, + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^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 + }, + "log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "dev": true, + "requires": { + "chalk": "^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 + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "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" + } + } + } + }, + "listenercount": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", + "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=" + }, + "listr2": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.3.0.tgz", + "integrity": "sha512-G9IFI/m65icgVlifS0wMQnvn35/8VJGzEb3crpE4NnaegQYQOn/wP7yqi9TTJQ/eoxme4UaPbffBK1XqKP/DOg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "cli-truncate": "^2.1.0", + "figures": "^3.2.0", + "indent-string": "^4.0.0", + "log-update": "^4.0.0", + "p-map": "^4.0.0", + "rxjs": "^6.6.3", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" }, "dependencies": { - "abstract-leveldown": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.0.3.tgz", - "integrity": "sha512-jzewKKpZbaYUa6HTThnrl+GrJhzjEAeuc7hTVpZdzg7kupXZFoqQDFwyOwLNbmJKJlmzw8yiipMPkDiuKkT06Q==", + "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.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { - "level-concat-iterator": "~2.0.0", - "xtend": "~4.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "deferred-leveldown": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.1.0.tgz", - "integrity": "sha512-PvDY+BT2ONu2XVRgxHb77hYelLtMYxKSGuWuJJdVRXh9ntqx9GYTFJno/SKAz5xcd+yjQwyQeIZrUPjPvA52mg==", + "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 + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "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 + }, + "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 + }, + "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": { - "abstract-leveldown": "~6.0.0", - "inherits": "^2.0.3" + "has-flag": "^4.0.0" } } } }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true - }, - "levenary": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", - "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", - "dev": true, - "requires": { - "leven": "^3.1.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "lie": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", - "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", - "dev": true, - "requires": { - "immediate": "~3.0.5" - } - }, - "listenercount": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", - "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=" - }, "lit-element": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-2.3.1.tgz", - "integrity": "sha512-tOcUAmeO3BzwiQ7FGWdsshNvC0HVHcTFYw/TLIImmKwXYoV0E7zCBASa8IJ7DiP4cen/Yoj454gS0qqTnIGsFA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-2.4.0.tgz", + "integrity": "sha512-pBGLglxyhq/Prk2H91nA0KByq/hx/wssJBQFiYqXhGDvEnY31PRGYf1RglVzyLeRysu0IHm2K0P196uLLWmwFg==", "requires": { "lit-html": "^1.1.1" } }, "lit-html": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-1.2.1.tgz", - "integrity": "sha512-GSJHHXMGLZDzTRq59IUfL9FCdAlGfqNp/dEa7k7aBaaWD+JKaCjsAk9KYm2V12ItonVaYx2dprN66Zdm1AuBTQ==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-1.3.0.tgz", + "integrity": "sha512-0Q1bwmaFH9O14vycPHw8C/IeHMk/uSDldVLIefu/kfbTBGIc44KGH6A8p1bDfxUfHdc8q6Ct7kQklWoHgr4t1Q==" }, "live-plugin-manager": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/live-plugin-manager/-/live-plugin-manager-0.14.1.tgz", - "integrity": "sha512-bRFh5xn1PEYrwxoOhQ4k8gsh8eh4cRMbXmV/YefV4Xs2E6wuXLF+e51gsXjyim7DquEWsiFuoKK+RSQ387PuHA==", + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/live-plugin-manager/-/live-plugin-manager-0.15.1.tgz", + "integrity": "sha512-nhQmx0JEq7blNtQh3+w6to9x4tU1geY2RUQcvFvCJA1V2RnLjLC9dQlj1Hhr5tu8OpMDfeZkA9OIZyIs26q85Q==", "requires": { "@types/debug": "^4.1.5", "@types/fs-extra": "^8.1.0", @@ -9327,6 +10867,29 @@ "semver": "^7.3.2", "tar": "^6.0.1", "url-join": "^4.0.1" + }, + "dependencies": { + "@types/fs-extra": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.1.1.tgz", + "integrity": "sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w==", + "requires": { + "@types/node": "*" + } + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } } }, "load-json-file": { @@ -9359,9 +10922,16 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true }, "lodash.defaults": { "version": "4.2.0", @@ -9369,6 +10939,18 @@ "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", "dev": true }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", @@ -9383,7 +10965,18 @@ "lodash.isnull": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lodash.isnull/-/lodash.isnull-3.0.0.tgz", - "integrity": "sha1-+vvlnqHcon7teGU0A53YTC4HxW4=", + "integrity": "sha1-+vvlnqHcon7teGU0A53YTC4HxW4=" + }, + "lodash.isobject": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz", + "integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", "dev": true }, "lodash.merge": { @@ -9392,6 +10985,23 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=", + "dev": true + }, + "lodash.uniqwith": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz", + "integrity": "sha1-egy/ZfQ7WShiWp1NDcVLGMrcfvM=" + }, + "lodash.zip": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", + "integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=", + "dev": true + }, "log-symbols": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", @@ -9443,26 +11053,128 @@ } } }, + "log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + } + }, + "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" + } + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.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 + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "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" + } + }, + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + }, + "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" + } + } + } + }, "logform": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.1.2.tgz", - "integrity": "sha512-+lZh4OpERDBLqjiwDLpAWNQu6KMjnlXH2ByZwCuSqVPJletw0kTWJf5CgSNAUKn1KUkv3m2cUz/LK8zyEy7wzQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", + "integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==", "requires": { "colors": "^1.2.1", "fast-safe-stringify": "^2.0.4", - "fecha": "^2.3.3", + "fecha": "^4.2.0", "ms": "^2.1.1", "triple-beam": "^1.3.0" + }, + "dependencies": { + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } } }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } + "loglevel": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.1.tgz", + "integrity": "sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==", + "dev": true + }, + "loglevel-plugin-prefix": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/loglevel-plugin-prefix/-/loglevel-plugin-prefix-0.8.4.tgz", + "integrity": "sha512-WpG9CcFAOjz/FtNht+QJeGpvVl/cdR6P0z6OcXSkr8wFJOsV2GRj2j10JLfjuA4aYkcKCNIEqRGCyTife9R8/g==", + "dev": true }, "loud-rejection": { "version": "1.6.0", @@ -9481,33 +11193,22 @@ "dev": true }, "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "requires": { - "yallist": "^3.0.2" - }, - "dependencies": { - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - } + "yallist": "^4.0.0" } }, "ltgt": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", - "dev": true + "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" }, "lunr": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/lunr/-/lunr-0.7.1.tgz", - "integrity": "sha1-taLP+ZVVt4k/XxpKF68/Y4NzxLs=", - "dev": true + "integrity": "sha1-taLP+ZVVt4k/XxpKF68/Y4NzxLs=" }, "magic-string": { "version": "0.25.7", @@ -9534,9 +11235,9 @@ } }, "make-plural": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-6.2.1.tgz", - "integrity": "sha512-AmkruwJ9EjvyTv6AM8MBMK3TAeOJvhgTv5YQXzF0EP2qawhpvMjDpHvsdOIIT0Vn+BB0+IogmYZ1z+Ulm/m0Fg==" + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-6.2.2.tgz", + "integrity": "sha512-8iTuFioatnTTmb/YJjywkVIHLjcwkFD9Ms0JpxjEm9Mo8eQYkh1z+55dwv4yc1jQ8ftVBxWQbihvZL1DfzGGWA==" }, "map-obj": { "version": "1.0.1", @@ -9550,20 +11251,26 @@ "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", "dev": true }, + "marky": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.1.tgz", + "integrity": "sha512-md9k+Gxa3qLH6sUKpeC2CNkJK/Ld+bEz5X96nYwloqphQE0CKCVEKco/6jxEZixinqNdz5RFi/KaCyfbMDMAXQ==", + "dev": true + }, "matcher": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-2.1.0.tgz", - "integrity": "sha512-o+nZr+vtJtgPNklyeUKkkH42OsK8WAfdgaJE2FNxcjLPg+5QbeEoT6vRj8Xq/iv18JlQ9cmKsEu0b94ixWf1YQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", + "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", "dev": true, "optional": true, "requires": { - "escape-string-regexp": "^2.0.0" + "escape-string-regexp": "^4.0.0" }, "dependencies": { "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "optional": true } @@ -9573,7 +11280,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/math-clamp-x/-/math-clamp-x-1.2.0.tgz", "integrity": "sha512-tqpjpBcIf9UulApz3EjWXqTZpMlr2vLN9PryC9ghoyCuRmqZaf3JJhPddzgQpJnKLi2QhoFnvKBFtJekAIBSYg==", - "dev": true, "requires": { "to-number-x": "^2.0.0" } @@ -9587,7 +11293,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/math-sign-x/-/math-sign-x-3.0.0.tgz", "integrity": "sha512-OzPas41Pn4d16KHnaXmGxxY3/l3zK4OIXtmIwdhgZsxz4FDDcNnbrABYPg2vGfxIkaT9ezGnzDviRH7RfF44jQ==", - "dev": true, "requires": { "is-nan-x": "^1.0.1", "to-number-x": "^2.0.0" @@ -9596,26 +11301,18 @@ "max-safe-integer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/max-safe-integer/-/max-safe-integer-1.0.1.tgz", - "integrity": "sha1-84BgvixWPYwC5tSK85Ei/YO29BA=", - "dev": true + "integrity": "sha1-84BgvixWPYwC5tSK85Ei/YO29BA=" }, "md5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", - "integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=", - "dev": true, + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", + "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", "requires": { - "charenc": "~0.0.1", - "crypt": "~0.0.1", - "is-buffer": "~1.1.1" + "charenc": "0.0.2", + "crypt": "0.0.2", + "is-buffer": "~1.1.6" } }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, "meow": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", @@ -9715,12 +11412,6 @@ } } }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -9757,35 +11448,71 @@ "resolved": "https://registry.npmjs.org/messageformat-parser/-/messageformat-parser-4.1.3.tgz", "integrity": "sha512-2fU3XDCanRqeOCkn7R5zW5VQHWf+T3hH65SzuqRvjatBK7r4uyFa5mEX+k6F9Bd04LVM5G4/BHBTUJsOdW7uyg==" }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true + "microdata-rdf-streaming-parser": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/microdata-rdf-streaming-parser/-/microdata-rdf-streaming-parser-1.1.0.tgz", + "integrity": "sha512-nvPEFzG4vZWzWJP2x8Ax7mJmdrFkSYrfhdTUDHLtXYZJVl8Ip7ScHUPLkUfX+Ci4g7sOdgHsotkxuccnlxtCAg==", + "requires": { + "@types/rdf-js": "*", + "htmlparser2": "^5.0.0", + "rdf-data-factory": "^1.0.2", + "relative-to-absolute-iri": "^1.0.2" + }, + "dependencies": { + "domhandler": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.3.0.tgz", + "integrity": "sha512-J1C5rIANUbuYK+FuFL98650rihynUOEzRLxW+90bKZRWB6A1X1Tf82GxR1qAWLyfNPRvjqfip3Q5tdYlmAa9lA==", + "requires": { + "domelementtype": "^2.0.1" + } + }, + "htmlparser2": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-5.0.1.tgz", + "integrity": "sha512-vKZZra6CSe9qsJzh0BjBGXo8dvzNsq/oGvsjfRdOrrryfeD9UOBEEQdeoqCRmKZchF5h2zOBMQ6YuQ0uRUmdbQ==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^3.3.0", + "domutils": "^2.4.2", + "entities": "^2.0.0" + } + } + } + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } }, "mime": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.5.tgz", - "integrity": "sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.0.tgz", + "integrity": "sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag==", "dev": true }, "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==" }, "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", "requires": { - "mime-db": "1.44.0" + "mime-db": "1.45.0" } }, "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", + "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==" }, "mimic-response": { "version": "1.0.1", @@ -9793,6 +11520,11 @@ "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -9815,9 +11547,9 @@ } }, "minizlib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.0.tgz", - "integrity": "sha512-EzTZN/fjSvifSX0SlqUERCN39o6T40AMarPbv0MrarSFtIITCBh7bi+dU8nxGFHuqs9jdIAeoYoKuQAAASsPPA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "requires": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -9831,79 +11563,68 @@ "minimist": "^1.2.5" } }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, "mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.1.tgz", + "integrity": "sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==", "dev": true, "requires": { - "ansi-colors": "3.2.3", + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", + "chokidar": "3.4.3", + "debug": "4.2.0", + "diff": "4.0.2", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", "growl": "1.10.5", "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", + "js-yaml": "3.14.0", + "log-symbols": "4.0.0", "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", + "ms": "2.1.2", + "nanoid": "3.1.12", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "7.2.0", + "which": "2.0.2", "wide-align": "1.1.3", + "workerpool": "6.0.2", "yargs": "13.3.2", "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" + "yargs-unparser": "2.0.0" }, "dependencies": { - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true - }, "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "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==", + "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": "^1.9.0" + "color-convert": "^2.0.1" } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "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" - } - } + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, "cliui": { @@ -9917,13 +11638,28 @@ "wrap-ansi": "^5.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 + }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "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.1" + "ms": "2.1.2" } }, "emoji-regex": { @@ -9932,20 +11668,34 @@ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "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 + }, + "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 + }, + "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": { - "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" + "locate-path": "^6.0.0", + "path-exists": "^4.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 + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -9953,30 +11703,72 @@ "dev": true }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" } }, + "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" + } + }, "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", "dev": true, "requires": { - "chalk": "^2.4.2" + "chalk": "^4.0.0" } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "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-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" + } + }, + "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 }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -9997,19 +11789,13 @@ "ansi-regex": "^4.1.0" } }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "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": "^3.0.0" + "has-flag": "^4.0.0" } }, "wrap-ansi": { @@ -10021,8 +11807,40 @@ "ansi-styles": "^3.2.0", "string-width": "^3.0.0", "strip-ansi": "^5.0.0" + }, + "dependencies": { + "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" + } + }, + "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 + } } }, + "y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "dev": true + }, "yargs": { "version": "13.3.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", @@ -10039,24 +11857,65 @@ "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } } } } }, + "monaco-editor": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.21.3.tgz", + "integrity": "sha512-9N7wATLpi+googstvtm6IKg97vPQ77FDYEpkow5tLriM/VJ0DaTRyUP4UVzcoH7KlPDX+e/rE7/imcOUeGkT6g==", + "dev": true + }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "multiline": { "version": "2.0.0", @@ -10076,27 +11935,40 @@ } }, "mustache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.0.1.tgz", - "integrity": "sha512-yL5VE97+OXn4+Er3THSmTdCFCtx5hHWzrolvH+JObZnUYwuaG7XV+Ch4fR2cIrcYI0tFHxS7iyFYl14bW8y2sA==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.1.0.tgz", + "integrity": "sha512-0FsgP/WVq4mKyjolIyX+Z9Bd+3WS8GOwoUTyKXT5cTYMGeauNTi2HPCwERqseC1IHAy0Z7MDZnJBfjabd4O8GQ==" }, "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, + "n3": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.8.0.tgz", + "integrity": "sha512-/PEmoB3UJrG6aXGZenDHFBJtmPp2rtfB2YLzAm2dU9stInD+ztvy4fKv5fv2ggsrSlpu7BYDTsz/c6S391uuEg==", + "requires": { + "queue-microtask": "^1.1.2", + "readable-stream": "^3.6.0" + } + }, "nan-x": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nan-x/-/nan-x-1.0.2.tgz", - "integrity": "sha512-dndRmy03JQEN+Nh6WjQl7/OstIozeEmrtWe4TE7mEqJ8W8oMD8m2tHjsLPWt//e3hLAeRSbs4pxMyc5pk/nCkQ==", + "integrity": "sha512-dndRmy03JQEN+Nh6WjQl7/OstIozeEmrtWe4TE7mEqJ8W8oMD8m2tHjsLPWt//e3hLAeRSbs4pxMyc5pk/nCkQ==" + }, + "nanoid": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", + "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", "dev": true }, "napi-macros": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", - "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==", - "dev": true + "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==" }, "natural-compare": { "version": "1.4.0", @@ -10104,22 +11976,15 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true + "negotiate": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/negotiate/-/negotiate-1.0.1.tgz", + "integrity": "sha1-NayLVnL3sF+qEL8CYTQusRIDcP0=" }, "nise": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.3.tgz", - "integrity": "sha512-EGlhjm7/4KvmmE6B/UFsKh7eHykRl9VH+au8dduHLCyWUO/hr7+N+WtTvDUwc9zHuM1IaIJs/0lQ6Ag1jDkQSg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz", + "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0", @@ -10127,58 +11992,22 @@ "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", "path-to-regexp": "^1.7.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "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-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } } }, "node-fetch": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", - "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" }, "node-gyp-build": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.1.1.tgz", - "integrity": "sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ==", - "dev": true + "integrity": "sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ==" }, "node-releases": { - "version": "1.1.56", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.56.tgz", - "integrity": "sha512-EVo605FhWLygH8a64TjgpjyHYOihkxECwX1bHHr8tETJKWEiWS2YJjPbvsX2jFjnjTNEgBCmk9mLjKG1Mf11cw==", + "version": "1.1.70", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.70.tgz", + "integrity": "sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw==", "dev": true }, "nomnom": { @@ -10220,7 +12049,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-space-x/-/normalize-space-x-3.0.0.tgz", "integrity": "sha512-tbCJerqZCCHPst4rRKgsTanLf45fjOyeAU5zE3mhDxJtFJKt66q39g2XArWhXelgTFVib8mNBUm6Wrd0LxYcfQ==", - "dev": true, "requires": { "cached-constructors-x": "^1.0.0", "trim-x": "^3.0.0", @@ -10253,12 +12081,6 @@ } } }, - "npm-install-package": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/npm-install-package/-/npm-install-package-2.1.0.tgz", - "integrity": "sha1-1+/jz816sAYUuJbqUxGdyaslkSU=", - "dev": true - }, "npm-run-path": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", @@ -10266,59 +12088,8 @@ "dev": true, "requires": { "path-key": "^3.0.0" - }, - "dependencies": { - "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 - } - } - }, - "ntlm": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ntlm/-/ntlm-0.1.3.tgz", - "integrity": "sha1-O4FOvFMKHmzXEtzwz1kBVZMRlcE=" - }, - "nugget": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", - "integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=", - "dev": true, - "requires": { - "debug": "^2.1.3", - "minimist": "^1.1.0", - "pretty-bytes": "^1.0.2", - "progress-stream": "^1.1.0", - "request": "^2.45.0", - "single-line-log": "^1.1.2", - "throttleit": "0.0.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } } }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -10328,14 +12099,12 @@ "object-assign": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", - "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=", - "dev": true + "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=" }, "object-get-own-property-descriptor-x": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/object-get-own-property-descriptor-x/-/object-get-own-property-descriptor-x-3.2.0.tgz", "integrity": "sha512-Z/0fIrptD9YuzN+SNK/1kxAEaBcPQM4gSrtOSMSi9eplnL/AbyQcAyAlreAoAzmBon+DQ1Z+AdhxyQSvav5Fyg==", - "dev": true, "requires": { "attempt-x": "^1.1.0", "has-own-property-x": "^3.1.1", @@ -10352,72 +12121,57 @@ "is-primitive": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" } } }, "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" } }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "object.entries": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.3.tgz", + "integrity": "sha512-ym7h7OZebNS96hn5IJeyUmaWhaSM4SVtAPPfNLQEI2MYWCO2egsITb9nab2+i/Pwibx+R0mtn+ltKJXRSeTMGg==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "es-abstract": "^1.18.0-next.1", + "has": "^1.0.3" } }, "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.2.tgz", + "integrity": "sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", + "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" } }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -10427,54 +12181,46 @@ } }, "one-time": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz", - "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=" - }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", "requires": { - "mimic-fn": "^2.1.0" + "fn.name": "1.x.x" } }, - "opencollective-postinstall": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", - "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", - "dev": true - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" + "mimic-fn": "^2.1.0" }, "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" } } }, + "opencollective-postinstall": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==", + "dev": true + }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, "ora": { @@ -10517,15 +12263,6 @@ "supports-color": "^5.3.0" } }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", @@ -10535,31 +12272,6 @@ "chalk": "^2.0.1" } }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", @@ -10605,6 +12317,15 @@ "p-limit": "^2.0.0" } }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "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", @@ -10630,11 +12351,6 @@ } } }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" - }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -10648,7 +12364,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/parse-int-x/-/parse-int-x-2.0.0.tgz", "integrity": "sha512-NIMm52gmd1+0qxJK8lV3OZ4zzWpRH1xcz9xCHXl+DNzddwUdS4NEtd7BmTeK7iCIXoaK5e6BoDMHgieH2eNIhg==", - "dev": true, "requires": { "cached-constructors-x": "^1.0.0", "nan-x": "^1.0.0", @@ -10665,12 +12380,29 @@ "error-ex": "^1.2.0" } }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "parse-link-header": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-link-header/-/parse-link-header-1.0.1.tgz", + "integrity": "sha1-vt/g0hGK64S+deewJUGeyKYRQKc=", + "requires": { + "xtend": "~4.0.1" + } + }, + "parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", "dev": true }, + "parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dev": true, + "requires": { + "parse5": "^6.0.1" + } + }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -10682,9 +12414,9 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "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": { @@ -10694,10 +12426,21 @@ "dev": true }, "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true + "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" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } }, "path-type": { "version": "2.0.0", @@ -10709,9 +12452,9 @@ } }, "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, "pend": { @@ -10815,51 +12558,66 @@ "find-up": "^3.0.0" } }, - "pouchdb": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-7.2.1.tgz", - "integrity": "sha512-AoDPdr6tFqj3xs7oiD2oioYj5MMu87c3UemRHZ/p++BwU+ZsKn5jpnL09OvWTLvMvaICGAOufiaUzmM1/KKoKQ==", + "please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", "dev": true, + "requires": { + "semver-compare": "^1.0.0" + } + }, + "pouchdb": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-7.2.2.tgz", + "integrity": "sha512-5gf5nw5XH/2H/DJj8b0YkvG9fhA/4Jt6kL0Y8QjtztVjb1y4J19Rg4rG+fUbXu96gsUrlyIvZ3XfM0b4mogGmw==", "requires": { "abort-controller": "3.0.0", "argsarray": "0.0.1", - "buffer-from": "1.1.0", + "buffer-from": "1.1.1", "clone-buffer": "1.0.0", "double-ended-queue": "2.1.0-0", - "fetch-cookie": "0.7.3", - "immediate": "3.0.6", + "fetch-cookie": "0.10.1", + "immediate": "3.3.0", "inherits": "2.0.4", - "level": "6.0.0", - "level-codec": "9.0.1", + "level": "6.0.1", + "level-codec": "9.0.2", "level-write-stream": "1.0.0", - "leveldown": "5.4.1", - "levelup": "4.1.0", + "leveldown": "5.6.0", + "levelup": "4.4.0", "ltgt": "2.2.1", - "node-fetch": "2.4.1", - "readable-stream": "1.0.33", - "spark-md5": "3.0.0", - "through2": "3.0.1", - "uuid": "3.3.3", + "node-fetch": "2.6.0", + "readable-stream": "1.1.14", + "spark-md5": "3.0.1", + "through2": "3.0.2", + "uuid": "8.1.0", "vuvuzela": "1.0.3" }, "dependencies": { + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "immediate": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", + "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==" + }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "node-fetch": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.4.1.tgz", - "integrity": "sha512-P9UbpFK87NyqBZzUuDBDz4f6Yiys8xm8j7ACDbi6usvFm6KItklQUKjeoqTrYS/S1k6I8oaOC2YLLDr/gg26Mw==", - "dev": true + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" }, "readable-stream": { - "version": "1.0.33", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.33.tgz", - "integrity": "sha1-OjYN1mwbHX/UcFOJhg7aHQ9hEmw=", - "dev": true, + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", @@ -10870,14 +12628,41 @@ "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + } + } }, "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", - "dev": true + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz", + "integrity": "sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg==" } } }, @@ -10885,39 +12670,24 @@ "version": "6.4.3", "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-6.4.3.tgz", "integrity": "sha512-eRKH/1eiZwrqNdAR3CL1XIIkq04I9hHIABHwIRboz1LjBSchKmaf4ZDngiWGDvRYT9Gl/MogGDGOk1WRMoV4wg==", - "dev": true, "requires": { "buffer-from": "0.1.1" - }, - "dependencies": { - "buffer-from": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-0.1.1.tgz", - "integrity": "sha1-V7GLHaChnsBvM4N6UnWiQjUb114=", - "dev": true, - "requires": { - "is-array-buffer-x": "^1.0.13" - } - } } }, "pouchdb-collate": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pouchdb-collate/-/pouchdb-collate-1.2.0.tgz", - "integrity": "sha1-yuO4MPyhJLf5fSMEbk+qMR7Dgow=", - "dev": true + "integrity": "sha1-yuO4MPyhJLf5fSMEbk+qMR7Dgow=" }, "pouchdb-collections": { "version": "6.4.3", "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-6.4.3.tgz", - "integrity": "sha512-uWb9+hvjiijeyrCeEz/FUND1oj0AQK/f166egBOTofNlAwQLNrJUTn+uJ34b3NODAmKhg7+ZeDVvnl9D2pijuQ==", - "dev": true + "integrity": "sha512-uWb9+hvjiijeyrCeEz/FUND1oj0AQK/f166egBOTofNlAwQLNrJUTn+uJ34b3NODAmKhg7+ZeDVvnl9D2pijuQ==" }, "pouchdb-errors": { "version": "6.4.3", "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-6.4.3.tgz", "integrity": "sha512-EU83ZZJjorwGL9DQZ9HAILY8D+ulX2RYVMtsCfIuzaIJEUrHh/dhSIy5854n42NBOUWug3gFDyO58w5k+64HTQ==", - "dev": true, "requires": { "inherits": "2.0.3" }, @@ -10925,22 +12695,19 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" } } }, "pouchdb-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/pouchdb-extend/-/pouchdb-extend-0.1.2.tgz", - "integrity": "sha1-0c5RG/cE7S4p979CikFqz/+hJLg=", - "dev": true + "integrity": "sha1-0c5RG/cE7S4p979CikFqz/+hJLg=" }, "pouchdb-mapreduce-utils": { "version": "6.4.3", "resolved": "https://registry.npmjs.org/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-6.4.3.tgz", "integrity": "sha512-gbxX6h+nOKPDv2eYZznUthHiZ1Ml1xViE8DalEy6+fPzCba6CZ6dTKGZoFrBg4oLF3Wc+cUNX9Uk8cezVMGOhA==", - "dev": true, "requires": { "argsarray": "0.0.1", "inherits": "2.0.3", @@ -10951,8 +12718,7 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" } } }, @@ -10960,17 +12726,22 @@ "version": "6.4.3", "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-6.4.3.tgz", "integrity": "sha512-EnToEO+JLJA5bHDYWs42B8hU9Q1TckVozQjTSXL/pDXKXLATuVEKHNq8F/4lrpxblpngx4Zt8z2Luwu0etLSqw==", - "dev": true, "requires": { "pouchdb-binary-utils": "6.4.3", "spark-md5": "3.0.0" + }, + "dependencies": { + "spark-md5": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.0.tgz", + "integrity": "sha1-NyIifFTi+vJLHcbZM8wUTm9xv+8=" + } } }, "pouchdb-promise": { "version": "5.4.4", "resolved": "https://registry.npmjs.org/pouchdb-promise/-/pouchdb-promise-5.4.4.tgz", "integrity": "sha1-3SigRxl+Ent+33m5yje7xC8EZmU=", - "dev": true, "requires": { "lie": "3.0.4" }, @@ -10979,7 +12750,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/lie/-/lie-3.0.4.tgz", "integrity": "sha1-vHrh6+fxyN45r9zU94kHa0ew9jQ=", - "dev": true, "requires": { "es3ify": "^0.2.2", "immediate": "~3.0.5", @@ -10993,7 +12763,6 @@ "version": "6.4.3", "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-6.4.3.tgz", "integrity": "sha512-22QXh743YXl/afheeumrUKsO/0Q4Q8bvoboFp/1quXq//BDJa9nv55WUZX0l05t3VPW+nD/pse2FzU9cs3nEag==", - "dev": true, "requires": { "argsarray": "0.0.1", "clone-buffer": "1.0.0", @@ -11008,14 +12777,12 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "pouchdb-promise": { "version": "6.4.3", "resolved": "https://registry.npmjs.org/pouchdb-promise/-/pouchdb-promise-6.4.3.tgz", "integrity": "sha512-ruJaSFXwzsxRHQfwNHjQfsj58LBOY1RzGzde4PM5CWINZwFjCQAhZwfMrch2o/0oZT6d+Xtt0HTWhq35p3b0qw==", - "dev": true, "requires": { "lie": "3.1.1" } @@ -11023,15 +12790,14 @@ "uuid": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "dev": true + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" } } }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "prepend-http": { @@ -11040,28 +12806,16 @@ "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true }, - "pretty-bytes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", - "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1", - "meow": "^3.1.0" - }, - "dependencies": { - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - } - } + "printj": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz", + "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==", + "dev": true }, "prismjs": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.20.0.tgz", - "integrity": "sha512-AEDjSrVNkynnw6A+B1DsFkd6AVdTnp+/WoUixFRULlCLZVRZlVQMVWio/16jv7G1FscUxQxOQhWwApgbnxr6kQ==", + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.23.0.tgz", + "integrity": "sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA==", "dev": true, "requires": { "clipboard": "^2.0.0" @@ -11070,8 +12824,7 @@ "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" }, "process-nextick-args": { "version": "2.0.1", @@ -11084,72 +12837,15 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "progress-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz", - "integrity": "sha1-LNPP6jO6OonJwSHsM0er6asSX3c=", - "dev": true, - "requires": { - "speedometer": "~0.1.2", - "through2": "~0.2.3" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "through2": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", - "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", - "dev": true, - "requires": { - "readable-stream": "~1.1.9", - "xtend": "~2.1.1" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } - } - } + "promise-polyfill": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-1.1.6.tgz", + "integrity": "sha1-zQTv9G9clcOn0EVZHXm14+AfEtc=" }, "property-is-enumerable-x": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/property-is-enumerable-x/-/property-is-enumerable-x-1.1.0.tgz", "integrity": "sha512-22cKy3w3OpRswU6to9iKWDDlg+F9vF2REcwGlGW23jyLjHb1U/jJEWA44sWupOnkhGfDgotU6Lw+N2oyhNi+5A==", - "dev": true, "requires": { "to-object-x": "^1.4.1", "to-property-key-x": "^2.0.1" @@ -11162,27 +12858,21 @@ "dev": true, "optional": true }, - "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.1" - } + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" }, "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 + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, "pump": { "version": "3.0.0", @@ -11200,54 +12890,135 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "pupa": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz", - "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", "dev": true, "requires": { "escape-goat": "^2.0.0" } }, + "puppeteer-core": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-5.5.0.tgz", + "integrity": "sha512-tlA+1n+ziW/Db03hVV+bAecDKse8ihFRXYiEypBe9IlLRvOCzYFG6qrCMBYK34HO/Q/Ecjc+tvkHRAfLVH+NgQ==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "devtools-protocol": "0.0.818844", + "extract-zip": "^2.0.0", + "https-proxy-agent": "^4.0.0", + "node-fetch": "^2.6.1", + "pkg-dir": "^4.2.0", + "progress": "^2.0.1", + "proxy-from-env": "^1.0.0", + "rimraf": "^3.0.2", + "tar-fs": "^2.0.0", + "unbzip2-stream": "^1.3.3", + "ws": "^7.2.3" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "requires": { + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + } + }, + "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" + } + }, + "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 + }, + "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 + }, + "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" + } + } + } + }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" }, "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "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 }, - "random-bytes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", - "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=", - "dev": true + "queue-microtask": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz", + "integrity": "sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==" }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "dev": true }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "safe-buffer": "^5.1.0" } }, "rc": { @@ -11270,6 +13041,147 @@ } } }, + "rdf-data-factory": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/rdf-data-factory/-/rdf-data-factory-1.0.4.tgz", + "integrity": "sha512-ZIIwEkLcV7cTc+atvQFzAETFVRHz1BRe/MhdkZqYse8vxskErj8/bF/Ittc3B5c0GTyw6O3jVF2V7xBRGyRoSQ==", + "requires": { + "@types/rdf-js": "*" + } + }, + "rdf-literal": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/rdf-literal/-/rdf-literal-1.2.0.tgz", + "integrity": "sha512-N7nyfp/xzoiUuJt0xZ80BvBGkCPwWejgVDkCxWDSuooXKSows4ToW+KouYkMHLcoFzGg1Rlw2lk6btjMJg5aSA==", + "requires": { + "@types/rdf-js": "*", + "rdf-data-factory": "^1.0.1" + } + }, + "rdf-object": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/rdf-object/-/rdf-object-1.8.0.tgz", + "integrity": "sha512-/yq5vk8eqspZwIcK1BS3wPcmv4kinooaPX5SRDpCnthCjOcDiyNgPnfXqMt5OpDWhykDkNJeTCvqQifFqZRPyw==", + "requires": { + "jsonld-context-parser": "^2.0.2", + "rdf-data-factory": "^1.0.3", + "rdf-string": "^1.5.0", + "streamify-array": "^1.0.1" + } + }, + "rdf-parse": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/rdf-parse/-/rdf-parse-1.7.0.tgz", + "integrity": "sha512-P3meLRU9OkZZz9OYq26VeRrxIDrzEBNAScAWcTX1tsf4Z85WTLhiwP5jC+OZBSzRSlybkkb6EYSVA1M4eykiBg==", + "requires": { + "@comunica/actor-http-native": "~1.19.0", + "@comunica/actor-rdf-parse-html": "~1.19.0", + "@comunica/actor-rdf-parse-html-microdata": "~1.19.0", + "@comunica/actor-rdf-parse-html-rdfa": "~1.19.0", + "@comunica/actor-rdf-parse-html-script": "~1.19.0", + "@comunica/actor-rdf-parse-jsonld": "~1.19.0", + "@comunica/actor-rdf-parse-n3": "~1.19.0", + "@comunica/actor-rdf-parse-rdfxml": "~1.19.0", + "@comunica/actor-rdf-parse-xml-rdfa": "~1.19.0", + "@comunica/bus-http": "~1.19.0", + "@comunica/bus-init": "~1.19.0", + "@comunica/bus-rdf-parse": "~1.19.0", + "@comunica/bus-rdf-parse-html": "~1.19.0", + "@comunica/core": "~1.19.0", + "@comunica/mediator-combine-union": "~1.19.0", + "@comunica/mediator-number": "~1.19.0", + "@comunica/mediator-race": "~1.19.0", + "@types/rdf-js": "*", + "stream-to-string": "^1.2.0" + } + }, + "rdf-quad": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/rdf-quad/-/rdf-quad-1.5.0.tgz", + "integrity": "sha512-LnCYx8XbRVW1wr6UiZPSy2Tv7bXAtEwuyck/68dANhFu8VMnGS+QfUNP3b9YI6p4Bfd/fyDx5E3x81IxGV6BzA==", + "requires": { + "rdf-data-factory": "^1.0.1", + "rdf-literal": "^1.2.0", + "rdf-string": "^1.5.0" + } + }, + "rdf-store-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/rdf-store-stream/-/rdf-store-stream-1.1.0.tgz", + "integrity": "sha512-JWvQUv/1yja1TiEzhS1PTactSER9ORjM/6TV8z3KdGWpeQOs9TeUgLzx5PLXSRePFZ8GKNTkG5dD+wC6Yh3sbQ==", + "requires": { + "@types/rdf-js": "*", + "n3": "^1.6.3" + } + }, + "rdf-string": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/rdf-string/-/rdf-string-1.5.0.tgz", + "integrity": "sha512-3TEJuDIKUADgZrfcZG+zAN4GfVA1Ei2sKA7Z7QVHkAE36wWoRGPJbGihPQMldgzvy9lG2nzZU+CXz+6oGSQNsQ==", + "requires": { + "rdf-data-factory": "^1.0.0" + } + }, + "rdf-string-ttl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/rdf-string-ttl/-/rdf-string-ttl-1.1.0.tgz", + "integrity": "sha512-c+CYNhrOhYF3sRuyBuwxSPRdyBDJOm6mX3FhIKrvPsAKmYE8uVtXuBoAiORc/UW7zYoM+CKmqtgkiFsqOz+6Jg==", + "requires": { + "rdf-data-factory": "^1.0.2" + } + }, + "rdf-terms": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/rdf-terms/-/rdf-terms-1.6.2.tgz", + "integrity": "sha512-dASpdYHYLEwzN9iSymJie1WUj6VHXy1By8Am4g2rJlhTfVvNitsJpDY+A3X2QehlGhCaWjHMzXS4q/JKNPI80A==", + "requires": { + "lodash.uniqwith": "^4.5.0", + "rdf-data-factory": "^1.0.1" + } + }, + "rdfa-streaming-parser": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/rdfa-streaming-parser/-/rdfa-streaming-parser-1.4.0.tgz", + "integrity": "sha512-tx2rsBpK7MhpuvuMFdpoIfH8t8ij/traX6+hiFe4WV648eWlcYKURLVdWwqqPkF4qwnT1PH8mqBpBY7CNpbjvg==", + "requires": { + "@types/rdf-js": "*", + "htmlparser2": "^5.0.0", + "rdf-data-factory": "^1.0.2", + "relative-to-absolute-iri": "^1.0.2" + }, + "dependencies": { + "domhandler": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.3.0.tgz", + "integrity": "sha512-J1C5rIANUbuYK+FuFL98650rihynUOEzRLxW+90bKZRWB6A1X1Tf82GxR1qAWLyfNPRvjqfip3Q5tdYlmAa9lA==", + "requires": { + "domelementtype": "^2.0.1" + } + }, + "htmlparser2": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-5.0.1.tgz", + "integrity": "sha512-vKZZra6CSe9qsJzh0BjBGXo8dvzNsq/oGvsjfRdOrrryfeD9UOBEEQdeoqCRmKZchF5h2zOBMQ6YuQ0uRUmdbQ==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^3.3.0", + "domutils": "^2.4.2", + "entities": "^2.0.0" + } + } + } + }, + "rdfxml-streaming-parser": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/rdfxml-streaming-parser/-/rdfxml-streaming-parser-1.4.0.tgz", + "integrity": "sha512-/FKDCq4tuSWz8PZaaPxqIQpenEvRR3Gsqllqg4VmdPFN6WiWfbaD244cKASfXfQHt9Bw7tLsLHsmtA1isIPBCg==", + "requires": { + "@types/rdf-js": "*", + "rdf-data-factory": "^1.0.2", + "relative-to-absolute-iri": "^1.0.0", + "sax": "^1.2.4" + } + }, "read-config-file": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-6.0.0.tgz", @@ -11281,6 +13193,17 @@ "js-yaml": "^3.13.1", "json5": "^2.1.2", "lazy-val": "^1.0.4" + }, + "dependencies": { + "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" + } + } } }, "read-pkg": { @@ -11350,33 +13273,42 @@ } }, "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readable-stream-node-to-web": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/readable-stream-node-to-web/-/readable-stream-node-to-web-1.0.1.tgz", + "integrity": "sha1-i3YU+qFGXr+g2pucpjA/onBzt88=" + }, + "readdir-glob": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.1.tgz", + "integrity": "sha512-91/k1EzZwDx6HbERR+zucygRFfiPl2zkIYZtv3Jjr6Mn7SkKcVct8aVO+sSRiGMc6fLf72du3d92/uY63YPdEA==", + "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "minimatch": "^3.0.4" } }, "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, "requires": { - "picomatch": "^2.0.4" + "picomatch": "^2.2.1" } }, "recast": { "version": "0.11.23", "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz", "integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=", - "dev": true, "requires": { "ast-types": "0.9.6", "esprima": "~3.1.0", @@ -11387,14 +13319,12 @@ "esprima": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" } } }, @@ -11409,9 +13339,9 @@ } }, "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", "dev": true }, "regenerate-unicode-properties": { @@ -11424,31 +13354,29 @@ } }, "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", - "dev": true + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" }, "regenerator-transform": { - "version": "0.14.4", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", - "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", "dev": true, "requires": { - "@babel/runtime": "^7.8.4", - "private": "^0.1.8" + "@babel/runtime": "^7.8.4" } }, "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true }, "regexpu-core": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", - "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", "dev": true, "requires": { "regenerate": "^1.4.0", @@ -11460,9 +13388,9 @@ } }, "registry-auth-token": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz", - "integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", "dev": true, "requires": { "rc": "^1.2.8" @@ -11484,9 +13412,9 @@ "dev": true }, "regjsparser": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", - "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.6.tgz", + "integrity": "sha512-jjyuCp+IEMIm3N1H1LLTJW1EISEJV9+5oHdEyrt43Pg9cDSb6rrLZei2cVWpl0xTjmmlpec/lEQGYgM7xfpGCQ==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -11500,11 +13428,10 @@ } } }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true + "relative-to-absolute-iri": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/relative-to-absolute-iri/-/relative-to-absolute-iri-1.0.6.tgz", + "integrity": "sha512-Xw5/Zx6iWSCMJUXwXVOjySjH8Xli4hVFL9QQFvkl1qEmFBG94J+QUI9emnoctOCD3285f1jNV+QWV9eDYwIdfQ==" }, "repeating": { "version": "2.0.1", @@ -11519,7 +13446,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/replace-comments-x/-/replace-comments-x-2.0.0.tgz", "integrity": "sha512-+vMP4jqU+8HboLWms6YMNEiaZG5hh1oR6ENCnGYDF/UQ7aYiJUK/8tcl3+KZAHRCKKa3gqzrfiarlUBHQSgRlg==", - "dev": true, "requires": { "require-coercible-to-string-x": "^1.0.0", "to-string-x": "^1.4.2" @@ -11564,11 +13490,15 @@ "mime-types": "^2.1.12" } }, - "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 + "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" + } }, "uuid": { "version": "3.4.0", @@ -11582,7 +13512,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/require-coercible-to-string-x/-/require-coercible-to-string-x-1.0.2.tgz", "integrity": "sha512-GZ3BSCL0n/zhho8ITganW9FGPh0Kxhq71nCjck8Qau/30Wf4Po8a3XpQdzEMFiXCwZ/0m0E3lKSdSG8gkcIofQ==", - "dev": true, "requires": { "require-object-coercible-x": "^1.4.3", "to-string-x": "^1.4.5" @@ -11591,43 +13520,57 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "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==" + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true }, "require-object-coercible-x": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/require-object-coercible-x/-/require-object-coercible-x-1.4.3.tgz", "integrity": "sha512-5wEaS+NIiU5HLJQTqBQ+6XHtX7yplUS374j/H/nRDlc7rMWfENqp026jnUHWAOCZ+ekixkXuFHEnTF28oqqVLA==", - "dev": true, "requires": { "is-nil-x": "^1.4.2" } }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "dev": true, "requires": { + "is-core-module": "^2.1.0", "path-parse": "^1.0.6" } }, + "resolve-alpn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.0.0.tgz", + "integrity": "sha512-rTuiIEqFmGxne4IovivKSDzld2lWW9QCjqv80SYjPgf+gS35eaCAjaP54CCwGAwBtnCsvNLYtqxe1Nw+i6JEmA==", + "dev": true + }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, "responselike": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", @@ -11637,38 +13580,64 @@ "lowercase-keys": "^1.0.0" } }, + "resq": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resq/-/resq-1.10.0.tgz", + "integrity": "sha512-hCUd0xMalqtPDz4jXIqs0M5Wnv/LZXN8h7unFOo4/nvExT9dDPbhwd3udRxLlp0HgBnHcV009UlduE9NZi7A6w==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1" + } + }, "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "^5.1.0", + "onetime": "^2.0.0", "signal-exit": "^3.0.2" + }, + "dependencies": { + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + } } }, "rgb2hex": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/rgb2hex/-/rgb2hex-0.1.10.tgz", - "integrity": "sha512-vKz+kzolWbL3rke/xeTE2+6vHmZnNxGyDnaVW4OckntAIcc7DcZzWkQSfxMDwqHS8vhgySnIFyBUH7lIk6PxvQ==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/rgb2hex/-/rgb2hex-0.2.3.tgz", + "integrity": "sha512-clEe0m1xv+Tva1B/TOepuIcvLAxP0U+sCDfgt1SX1HmI2Ahr5/Cd/nzJM1e78NKVtWdoo0s33YehpFA8UfIShQ==", "dev": true }, "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "requires": { "glob": "^7.1.3" } }, "roarr": { - "version": "2.15.3", - "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.3.tgz", - "integrity": "sha512-AEjYvmAhlyxOeB9OqPUzQCo3kuAkNfuDk/HqWbZdFsqDFpapkTjiw+p4svNEoRLvuqNTxqfL+s+gtD4eDgZ+CA==", + "version": "2.15.4", + "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz", + "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==", "dev": true, "optional": true, "requires": { - "boolean": "^3.0.0", + "boolean": "^3.0.1", "detect-node": "^2.0.4", "globalthis": "^1.0.1", "json-stringify-safe": "^5.0.1", @@ -11688,9 +13657,9 @@ }, "dependencies": { "acorn": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", - "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true } } @@ -11751,15 +13720,15 @@ } }, "rollup-plugin-terser": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.3.0.tgz", - "integrity": "sha512-XGMJihTIO3eIBsVGq7jiNYOdDMb3pVxuzY0uhOE/FM4x/u9nQgr3+McsjzqBn3QfHIpNSZmFnpoKAwHBEcsT7g==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.3.1.tgz", + "integrity": "sha512-1pkwkervMJQGFYvM9nscrUoncPwiKR/K+bHdjv6PFgRo3cgPHoRT83y2Aa3GvINj4539S15t/tpFPb775TDs6w==", "dev": true, "requires": { "@babel/code-frame": "^7.5.5", "jest-worker": "^24.9.0", "rollup-pluginutils": "^2.8.2", - "serialize-javascript": "^2.1.2", + "serialize-javascript": "^4.0.0", "terser": "^4.6.2" } }, @@ -11778,40 +13747,32 @@ "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", "dev": true }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "dev": true, - "requires": { - "rx-lite": "*" - } - }, "rxjs": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", - "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", "dev": true, "requires": { "tslib": "^1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } } }, "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==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sanitize-filename": { "version": "1.6.3", @@ -11827,11 +13788,19 @@ "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, + "sax-stream": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax-stream/-/sax-stream-1.3.0.tgz", + "integrity": "sha512-tcfsAAICAkyNNe4uiKtKmLKxx3C7qPAej13UUoN+7OLYq/P5kHGahZtJhhMVM3fIMndA6TlYHWFlFEzFkv1VGg==", + "requires": { + "debug": "~2", + "sax": "~1" + } + }, "scope-eval": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/scope-eval/-/scope-eval-0.0.3.tgz", - "integrity": "sha1-Fm8szR83VEKd7FEYBVAfnWkjtew=", - "dev": true + "integrity": "sha1-Fm8szR83VEKd7FEYBVAfnWkjtew=" }, "select": { "version": "1.1.2", @@ -11841,16 +13810,18 @@ "optional": true }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } }, "semver-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true, - "optional": true + "dev": true }, "semver-diff": { "version": "3.1.1", @@ -11869,124 +13840,64 @@ } } }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "statuses": "~1.5.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } + "semver-regex": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.2.tgz", + "integrity": "sha512-bXWyL6EAKOJa81XG1OZ/Yyuq+oT0b2YLlxx7c+mrdYPaPbnj6WgVULXhinMIeZGufuUBu/eVRqXEhiv4imfwxA==", + "dev": true }, "serialize-error": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-5.0.0.tgz", - "integrity": "sha512-/VtpuyzYf82mHYTtI4QKtwHa79vAdU5OQpNPAmE/0UDdlGT0ZxHwC+J6gXkw29wwoVI8fMPsfcVHOwXtUQYYQA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", + "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", "dev": true, "optional": true, "requires": { - "type-fest": "^0.8.0" + "type-fest": "^0.13.1" }, "dependencies": { "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", "dev": true, "optional": true } } }, "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", - "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", - "dev": true - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "dev": true, "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" + "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=" + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", - "dev": true - }, "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "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": "^1.0.0" + "shebang-regex": "^3.0.0" } }, "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "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": { @@ -12002,73 +13913,20 @@ "is-arrayish": "^0.3.1" } }, - "single-line-log": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz", - "integrity": "sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q=", - "dev": true, - "requires": { - "string-width": "^1.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, "sinon": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz", - "integrity": "sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A==", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", + "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.2", + "@sinonjs/commons": "^1.8.1", "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.0.3", + "@sinonjs/samsam": "^5.3.1", "diff": "^4.0.2", - "nise": "^4.0.1", + "nise": "^4.0.4", "supports-color": "^7.1.0" }, "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -12076,9 +13934,9 @@ "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==", + "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" @@ -12086,30 +13944,45 @@ } } }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "dependencies": { "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==", + "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": "^1.9.0" + "color-convert": "^2.0.1" } }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "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 } } @@ -12118,24 +13991,10 @@ "version": "0.4.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, "requires": { "amdefine": ">=0.0.4" } }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, "source-map-support": { "version": "0.5.19", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", @@ -12146,6 +14005,12 @@ "source-map": "^0.6.0" }, "dependencies": { + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -12154,12 +14019,6 @@ } } }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, "sourcemap-codec": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", @@ -12167,10 +14026,100 @@ "dev": true }, "spark-md5": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.0.tgz", - "integrity": "sha1-NyIifFTi+vJLHcbZM8wUTm9xv+8=", - "dev": true + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.1.tgz", + "integrity": "sha512-0tF3AGSD1ppQeuffsLDIOWlKUd3lS92tFxcsrh5Pe3ZphhnoK+oXIBTzOAThZCiuINZLvpiLH/1VS1/ANEJVig==" + }, + "sparqlalgebrajs": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/sparqlalgebrajs/-/sparqlalgebrajs-2.4.0.tgz", + "integrity": "sha512-6glKn1uWBsdPuQ4D+4r5m8mgWZoMfiNgip4uyblULTmgISqcbsQzrlrIhWQoZSX95QLLlWlYJufhelQAIRAWKg==", + "requires": { + "fast-deep-equal": "^3.1.1", + "minimist": "^1.2.5", + "rdf-data-factory": "^1.0.0", + "rdf-string": "^1.5.0", + "sparqljs": "^3.1.1" + }, + "dependencies": { + "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==" + } + } + }, + "sparqlee": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/sparqlee/-/sparqlee-1.6.0.tgz", + "integrity": "sha512-jbPhD5FcRp2rORkZZ9L8kM4HAx7N9RQl6YbpvyQYcxjjvMtgZ1OL0OiSbmKy/ixt74ycXjNRYK5IWfL3sdH+NA==", + "requires": { + "@types/rdf-js": "^4.0.0", + "@types/spark-md5": "^3.0.2", + "@types/uuid": "^8.0.0", + "decimal.js": "^10.2.0", + "hash.js": "^1.1.7", + "immutable": "^3.8.2", + "rdf-data-factory": "^1.0.3", + "rdf-string": "^1.5.0", + "relative-to-absolute-iri": "^1.0.6", + "spark-md5": "^3.0.1", + "sparqlalgebrajs": "^2.4.0", + "uuid": "^8.0.0" + } + }, + "sparqljs": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/sparqljs/-/sparqljs-3.2.0.tgz", + "integrity": "sha512-Sc0oVe0yexum9i2y+KYuD96s3j8iewgYok5ooLstXP9KiShKgeDAhcWupMmnGr+YLpDpCrEqRhkiQ2LxQOfX4w==", + "requires": { + "rdf-data-factory": "^1.0.4" + } + }, + "sparqljson-parse": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/sparqljson-parse/-/sparqljson-parse-1.6.0.tgz", + "integrity": "sha512-alIiURVr3AXIGU6fjuh5k6fwINwGKBQu5QnN9TEpoyIRvukKxZLQE07AHsw/Wxhkxico81tPf8nJTx7H1ira5A==", + "requires": { + "@types/node": "^13.1.0", + "@types/rdf-js": "*", + "JSONStream": "^1.3.3", + "rdf-data-factory": "^1.0.2" + }, + "dependencies": { + "@types/node": { + "version": "13.13.40", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.40.tgz", + "integrity": "sha512-eKaRo87lu1yAXrzEJl0zcJxfUMDT5/mZalFyOkT44rnQps41eS2pfWzbaulSPpQLFNy29bFqn+Y5lOTL8ATlEQ==" + } + } + }, + "sparqljson-to-tree": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sparqljson-to-tree/-/sparqljson-to-tree-2.1.0.tgz", + "integrity": "sha512-LwEMlrvjzEigatJ8iw1RKGWL9dKmATQNbTEXyadzsOQxbBhJNaGk8G9/WPCcVj2zlCPKGMysfNGb4UfvwHKeSw==", + "requires": { + "rdf-literal": "^1.2.0", + "sparqljson-parse": "^1.6.0" + } + }, + "sparqlxml-parse": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/sparqlxml-parse/-/sparqlxml-parse-1.4.0.tgz", + "integrity": "sha512-hKYsRw+KHIF4QXpMtybCSkfVhoQmTdUrUe5WkYnlyyw+3aeskIDnd97TPQi7MNSok2aim02osqkHvWQFNGXm3A==", + "requires": { + "@types/node": "^13.1.0", + "@types/rdf-js": "*", + "rdf-data-factory": "^1.0.2", + "sax-stream": "^1.2.3" + }, + "dependencies": { + "@types/node": { + "version": "13.13.40", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.40.tgz", + "integrity": "sha512-eKaRo87lu1yAXrzEJl0zcJxfUMDT5/mZalFyOkT44rnQps41eS2pfWzbaulSPpQLFNy29bFqn+Y5lOTL8ATlEQ==" + } + } }, "spdx-correct": { "version": "3.1.1", @@ -12199,31 +14148,24 @@ } }, "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", "dev": true }, "spectron": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/spectron/-/spectron-10.0.1.tgz", - "integrity": "sha512-eMAOr7ovYf+e6+DhkoxVWAMRfZvLJMjtZKwWYkL56fv3Ij6rxhYLjOxybKj0phgMYZ7o2cX5zu2NoyiUM756CA==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/spectron/-/spectron-13.0.0.tgz", + "integrity": "sha512-7RPa6Fp8gqL4V0DubobnqIRFHIijkpjg6MFHcJlxoerWyvLJd+cQvOh756XpB1Z/U3DyA9jPcS+HE2PvYRP5+A==", "dev": true, "requires": { - "@types/webdriverio": "^4.8.0", "dev-null": "^0.1.1", - "electron-chromedriver": "^8.0.0", - "request": "^2.87.0", - "split": "^1.0.0", - "webdriverio": "^4.13.0" + "electron-chromedriver": "^11.0.0", + "request": "^2.88.2", + "split": "^1.0.1", + "webdriverio": "^6.9.1" } }, - "speedometer": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz", - "integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0=", - "dev": true - }, "split": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", @@ -12266,16 +14208,35 @@ "integrity": "sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==", "dev": true }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "stream-to-string": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/stream-to-string/-/stream-to-string-1.2.0.tgz", + "integrity": "sha512-8drZlFIKBHSMdX9GCWv8V9AAWnQcTqw0iAI6/GC7UJ0H0SwKeFKjOoZfGY1tOU00GGU7FYZQoJ/ZCUEoXhD7yQ==", + "requires": { + "promise-polyfill": "^1.1.6" + } + }, + "streamify-array": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/streamify-array/-/streamify-array-1.0.1.tgz", + "integrity": "sha512-ZnswaBcC6B1bhPLSQOlC6CdaDUSzU0wr2lvvHpbHNms8V7+DLd8uEAzDAWpsjxbFkijBHhuObFO/qqu52DZUMA==" + }, + "streamify-string": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/streamify-string/-/streamify-string-1.0.1.tgz", + "integrity": "sha1-niIN4z4cR13TDgIG9bGBXMbJUls=" + }, + "string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", "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", @@ -12286,6 +14247,7 @@ "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" } @@ -12293,53 +14255,50 @@ } }, "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", + "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, - "string.prototype.trimleft": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", - "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "string.prototype.trimstart": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", + "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimstart": "^1.0.0" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, - "string.prototype.trimright": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", - "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", - "dev": true, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimend": "^1.0.0" + "safe-buffer": "~5.2.0" } }, - "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "stringify-object": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + }, + "dependencies": { + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + } } }, "strip-ansi": { @@ -12366,22 +14325,23 @@ "dev": true, "requires": { "get-stdin": "^4.0.1" - }, - "dependencies": { - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - } } }, "strip-json-comments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", - "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", + "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 }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, "sumchecker": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz", @@ -12389,6 +14349,23 @@ "dev": true, "requires": { "debug": "^4.1.0" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "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 + } } }, "supports-color": { @@ -12401,84 +14378,52 @@ } }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" }, "dependencies": { "ajv": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.3.tgz", + "integrity": "sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" } }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "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 }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } } } }, "tar": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.2.tgz", - "integrity": "sha512-Glo3jkRtPcvpDlAs/0+hozav78yoXKFr+c4wgw62NNMO3oo4AaJdCo21Uu7lcwr55h39W2XD1LMERc64wtbItg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz", + "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==", "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", "minipass": "^3.0.0", - "minizlib": "^2.1.0", + "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, @@ -12490,19 +14435,37 @@ } } }, + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + }, + "dependencies": { + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + } + } + }, "tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" } }, "temp-file": { @@ -12544,15 +14507,15 @@ } }, "term-size": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz", - "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", "dev": true }, "terser": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.7.0.tgz", - "integrity": "sha512-Lfb0RiZcjRDXCC3OSHJpEkxJ9Qeqs6mp2v4jf2MHfy8vGERmVDuvjXdd/EnP5Deme5F2yBRBymKmKHCBg2echw==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", "dev": true, "requires": { "commander": "^2.20.0", @@ -12579,27 +14542,49 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=", - "dev": true - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "through2": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", - "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", - "dev": true, + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "requires": { - "readable-stream": "2 || 3" + "readable-stream": ">=1.0.33-1 <1.1.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } } }, + "time-zone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", + "integrity": "sha1-mcW/VZWJZq9tBtg73zgA3IL67F0=", + "dev": true + }, "tiny-emitter": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", @@ -12608,24 +14593,25 @@ "optional": true }, "tmp": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", - "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "requires": { + "rimraf": "^3.0.0" + } + }, + "tmp-promise": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.2.tgz", + "integrity": "sha512-OyCLAKU1HzBjL6Ev3gxUeraJNlbNingmi8IrHHEsYH8LTmEuhvYfqvhn2F/je+mjf4N58UmZ96OMEy1JanSCpA==", "requires": { - "rimraf": "^2.6.3" + "tmp": "^0.2.0" } }, "to-boolean-x": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-boolean-x/-/to-boolean-x-1.0.3.tgz", - "integrity": "sha512-kQiMyJUgFprL8J+0CfgJuaSFKJMs3EvFe27/6aj/hVzVZT0HY4aA1QjPldLNxzBmjhLcapp7CctYHuD8QqtS3g==", - "dev": true - }, - "to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", - "dev": true + "integrity": "sha512-kQiMyJUgFprL8J+0CfgJuaSFKJMs3EvFe27/6aj/hVzVZT0HY4aA1QjPldLNxzBmjhLcapp7CctYHuD8QqtS3g==" }, "to-fast-properties": { "version": "2.0.0", @@ -12637,7 +14623,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/to-integer-x/-/to-integer-x-3.0.0.tgz", "integrity": "sha512-794L2Lpwjtynm7RxahJi2YdbRY75gTxUW27TMuN26UgwPkmJb/+HPhkFEFbz+E4vNoiP0dxq5tq5fkXoXLaK/w==", - "dev": true, "requires": { "is-finite-x": "^3.0.2", "is-nan-x": "^1.0.1", @@ -12649,7 +14634,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-number-x/-/to-number-x-2.0.0.tgz", "integrity": "sha512-lGOnCoccUoSzjZ/9Uen8TC4+VFaQcFGhTroWTv2tYWxXgyJV1zqAZ8hEIMkez/Eo790fBMOjidTnQ/OJSCvAoQ==", - "dev": true, "requires": { "cached-constructors-x": "^1.0.0", "nan-x": "^1.0.0", @@ -12662,7 +14646,6 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/to-object-x/-/to-object-x-1.5.0.tgz", "integrity": "sha512-AKn5GQcdWky+s20vjWkt+Wa6y3dxQH3yQyMBhOfBOPldUwqwhgvlqcIg5H092ntNc+TX8/Cxzs1kMHH19pyCnA==", - "dev": true, "requires": { "cached-constructors-x": "^1.0.0", "require-object-coercible-x": "^1.4.1" @@ -12672,7 +14655,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/to-primitive-x/-/to-primitive-x-1.1.0.tgz", "integrity": "sha512-gyMY0gi3wjK3e4MUBKqv9Zl8QGcWguIkaUr2VJmoBEsOpDcpDZSEyljR773eVG4maS48uX7muLkoQoh/BA82OQ==", - "dev": true, "requires": { "has-symbol-support-x": "^1.4.1", "is-date-object": "^1.0.1", @@ -12687,8 +14669,7 @@ "is-primitive": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" } } }, @@ -12696,7 +14677,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/to-property-key-x/-/to-property-key-x-2.0.2.tgz", "integrity": "sha512-YISLpZFYIazNm0P8hLsKEEUEZ3m8U3+eDysJZqTu3+B9tQp+2TrMpaEGT8Agh4fZ5LSoums60/glNEzk5ozqrg==", - "dev": true, "requires": { "has-symbol-support-x": "^1.4.1", "to-primitive-x": "^1.1.0", @@ -12722,7 +14702,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/to-string-symbols-supported-x/-/to-string-symbols-supported-x-1.0.2.tgz", "integrity": "sha512-3MRqhIhSNVDsVAk4M6WNcuBZrAQe54W13xrXX6RzxXS+pA4nj6DQ96RegQS5z9BSNyYbFsBsPvMVDIpP+a/5RA==", - "dev": true, "requires": { "cached-constructors-x": "^1.0.2", "has-symbol-support-x": "^1.4.2", @@ -12733,7 +14712,6 @@ "version": "1.4.3", "resolved": "https://registry.npmjs.org/to-string-tag-x/-/to-string-tag-x-1.4.3.tgz", "integrity": "sha512-5+0EZ6dOVt/XArXmkooxPzWxmOR081HM/uXitUow7h11WYg5pPo15uYqDWuqO7ZY+O3Atn/dG26wcJCK+mFevg==", - "dev": true, "requires": { "lodash.isnull": "^3.0.0", "validate.io-undefined": "^1.0.3" @@ -12743,26 +14721,26 @@ "version": "1.4.5", "resolved": "https://registry.npmjs.org/to-string-x/-/to-string-x-1.4.5.tgz", "integrity": "sha512-5xzlZDyDa9BUWNjNzZzHgKQ95PnV7qjvEhbqpFaj1ixaHgfJXOFaa3xdMJ+WLYd4hhaMJaxt8Pt5uKaWXfruXA==", - "dev": true, "requires": { "cached-constructors-x": "^1.0.0", "is-symbol": "^1.0.1" } }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", - "dev": true - }, "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, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + }, + "dependencies": { + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + } } }, "traverse": { @@ -12774,7 +14752,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/trim-left-x/-/trim-left-x-3.0.0.tgz", "integrity": "sha512-+m6cqkppI+CxQBTwWEZliOHpOBnCArGyMnS1WCLb6IRgukhTkiQu/TNEN5Lj2eM9jk8ewJsc7WxFZfmwNpRXWQ==", - "dev": true, "requires": { "cached-constructors-x": "^1.0.0", "require-coercible-to-string-x": "^1.0.0", @@ -12787,11 +14764,19 @@ "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "dev": true }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, "trim-right-x": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/trim-right-x/-/trim-right-x-3.0.0.tgz", "integrity": "sha512-iIqEsWEbWVodqdixJHi4FoayJkUxhoL4AvSNGp4FF4FfQKRPGizt8++/RnyC9od75y7P/S6EfONoVqP+NddiKA==", - "dev": true, "requires": { "cached-constructors-x": "^1.0.0", "require-coercible-to-string-x": "^1.0.0", @@ -12802,7 +14787,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/trim-x/-/trim-x-3.0.0.tgz", "integrity": "sha512-w8s38RAUScQ6t3XqMkS75iz5ZkIYLQpVnv2lp3IuTS36JdlVzC54oe6okOf4Wz3UH4rr3XAb2xR3kR5Xei82fw==", - "dev": true, "requires": { "trim-left-x": "^3.0.0", "trim-right-x": "^3.0.0" @@ -12822,10 +14806,22 @@ "utf8-byte-length": "^1.0.1" } }, + "tsconfig-paths": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", + "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", "dev": true }, "tunnel": { @@ -12851,12 +14847,12 @@ "dev": true }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-detect": { @@ -12866,19 +14862,9 @@ "dev": true }, "type-fest": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", - "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==" - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.16.0.tgz", + "integrity": "sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==" }, "typedarray": { "version": "0.0.6", @@ -12890,17 +14876,61 @@ "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" } }, - "uid-safe": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", - "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", + "typescript": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", + "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", + "dev": true + }, + "typescript-lit-html-plugin": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/typescript-lit-html-plugin/-/typescript-lit-html-plugin-0.9.0.tgz", + "integrity": "sha512-Ux2I1sPpt2akNbRZiBAND9oA8XNE2BuVmDwsb7rZshJ9T8/Na2rICE5Tnuj9dPHdFUATdOGjVEagn1/v8T4gCQ==", + "dev": true, + "requires": { + "typescript-styled-plugin": "^0.13.0", + "typescript-template-language-service-decorator": "^2.2.0", + "vscode-html-languageservice": "^2.1.10", + "vscode-languageserver-types": "^3.13.0" + } + }, + "typescript-styled-plugin": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/typescript-styled-plugin/-/typescript-styled-plugin-0.13.0.tgz", + "integrity": "sha512-GGMzv/JAd4S8mvWgHZslvW2G1HHrdurrp93oSR4h85SM8e5at7+KCqHsZICiTaL+iN25YGkJqoaZe4XklA76rg==", + "dev": true, + "requires": { + "typescript-template-language-service-decorator": "^2.0.0", + "vscode-css-languageservice": "^3.0.12", + "vscode-emmet-helper": "1.2.11", + "vscode-languageserver-types": "^3.13.0" + } + }, + "typescript-template-language-service-decorator": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/typescript-template-language-service-decorator/-/typescript-template-language-service-decorator-2.2.0.tgz", + "integrity": "sha512-xiolqt1i7e22rpqMaprPgSFVgU64u3b9n6EJlAaUYE61jumipKAdI1+O5khPlWslpTUj80YzjUKjJ2jxT0D74w==", + "dev": true + }, + "ua-parser-js": { + "version": "0.7.23", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.23.tgz", + "integrity": "sha512-m4hvMLxgGHXG3O3fQVAyyAQpZzDOvwnhOTjYz5Xmr7r/+LpkNy3vJXdVRWgd1TkAb7NGROZuSy96CrlNVjA7KA==", + "dev": true + }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "dev": true, "requires": { - "random-bytes": "~1.0.0" + "buffer": "^5.2.1", + "through": "^2.3.8" } }, "underscore": { @@ -12939,8 +14969,7 @@ "uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" }, "unique-string": { "version": "2.0.0", @@ -12952,21 +14981,14 @@ } }, "universalify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", - "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==" - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" }, "unreachable-branch-transform": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/unreachable-branch-transform/-/unreachable-branch-transform-0.3.0.tgz", "integrity": "sha1-2ZzExudG0mSSiEW2EdtUsPNHTKo=", - "dev": true, "requires": { "esmangle-evaluator": "^1.0.0", "recast": "^0.10.1", @@ -12976,38 +14998,17 @@ "ast-types": { "version": "0.8.15", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.15.tgz", - "integrity": "sha1-ju8IJ/BN/w7IhXupJavj/qYZTlI=", - "dev": true + "integrity": "sha1-ju8IJ/BN/w7IhXupJavj/qYZTlI=" }, "esprima-fb": { "version": "15001.1001.0-dev-harmony-fb", "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1001.0-dev-harmony-fb.tgz", - "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=", - "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 - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } + "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=" }, "recast": { "version": "0.10.43", "resolved": "https://registry.npmjs.org/recast/-/recast-0.10.43.tgz", "integrity": "sha1-uV1Q9tYHYaX2JS4V2AZ4FoSRzn8=", - "dev": true, "requires": { "ast-types": "0.8.15", "esprima-fb": "~15001.1001.0-dev-harmony-fb", @@ -13018,24 +15019,7 @@ "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" - } + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" } } }, @@ -13054,12 +15038,41 @@ "listenercount": "~1.0.1", "readable-stream": "~2.3.6", "setimmediate": "~1.0.4" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "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==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "update-notifier": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz", - "integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", + "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==", "dev": true, "requires": { "boxen": "^4.2.0", @@ -13078,12 +15091,11 @@ }, "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==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -13119,9 +15131,9 @@ "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==", + "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" @@ -13130,36 +15142,17 @@ } }, "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "requires": { "punycode": "^2.1.0" } }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } + "uritemplate": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/uritemplate/-/uritemplate-0.3.4.tgz", + "integrity": "sha1-BdCoU/+8iw9Jqj1NKtd3sNHuBww=" }, "url-join": { "version": "4.0.1", @@ -13186,21 +15179,15 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, "uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==" + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, "v8-compile-cache": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", - "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", + "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", "dev": true }, "validate-element-name": { @@ -13227,14 +15214,7 @@ "validate.io-undefined": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/validate.io-undefined/-/validate.io-undefined-1.0.3.tgz", - "integrity": "sha1-fif8uzFbhB54JDQxiXZxkp4gt/Q=", - "dev": true - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true + "integrity": "sha1-fif8uzFbhB54JDQxiXZxkp4gt/Q=" }, "verror": { "version": "1.10.0", @@ -13247,11 +15227,60 @@ "extsprintf": "^1.2.0" } }, + "vscode-css-languageservice": { + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-3.0.13.tgz", + "integrity": "sha512-RWkO/c/A7iXhHEy3OuEqkCqavDjpD4NF2Ca8vjai+ZtEYNeHrm1ybTnBYLP4Ft1uXvvaaVtYA9HrDjD6+CUONg==", + "dev": true, + "requires": { + "vscode-languageserver-types": "^3.13.0", + "vscode-nls": "^4.0.0" + } + }, + "vscode-emmet-helper": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/vscode-emmet-helper/-/vscode-emmet-helper-1.2.11.tgz", + "integrity": "sha512-ms6/Z9TfNbjXS8r/KgbGxrNrFlu4RcIfVJxTZ2yFi0K4gn+Ka9X1+8cXvb5+5IOBGUrOsPjR0BuefdDkG+CKbQ==", + "dev": true, + "requires": { + "@emmetio/extract-abbreviation": "0.1.6", + "jsonc-parser": "^1.0.0", + "vscode-languageserver-types": "^3.6.0-next.1" + } + }, + "vscode-html-languageservice": { + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-2.1.12.tgz", + "integrity": "sha512-mIb5VMXM5jI97HzCk2eadI1K//rCEZXte0wBqA7PGXsyJH4KTyJUaYk9MR+mbfpUl2vMi3HZw9GUOLGYLc6l5w==", + "dev": true, + "requires": { + "vscode-languageserver-types": "^3.13.0", + "vscode-nls": "^4.0.0", + "vscode-uri": "^1.0.6" + } + }, + "vscode-languageserver-types": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz", + "integrity": "sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==", + "dev": true + }, + "vscode-nls": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-4.1.2.tgz", + "integrity": "sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw==", + "dev": true + }, + "vscode-uri": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.8.tgz", + "integrity": "sha512-obtSWTlbJ+a+TFRYGaUumtVwb+InIUVI0Lu0VBUAPmj2cU5JutEXg3xUE0c2J5Tcy7h2DEKVJBFi+Y9ZSFzzPQ==", + "dev": true + }, "vuvuzela": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/vuvuzela/-/vuvuzela-1.0.3.tgz", - "integrity": "sha1-O+FF5YJxxzylUnndhR8SpoIRSws=", - "dev": true + "integrity": "sha1-O+FF5YJxxzylUnndhR8SpoIRSws=" }, "wcwidth": { "version": "1.0.1", @@ -13262,248 +15291,202 @@ "defaults": "^1.0.3" } }, - "wdio-dot-reporter": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/wdio-dot-reporter/-/wdio-dot-reporter-0.0.10.tgz", - "integrity": "sha512-A0TCk2JdZEn3M1DSG9YYbNRcGdx/YRw19lTiRpgwzH4qqWkO/oRDZRmi3Snn4L2j54KKTfPalBhlOtc8fojVgg==", - "dev": true + "web-streams-node": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/web-streams-node/-/web-streams-node-0.4.0.tgz", + "integrity": "sha512-u+PBQs8DFaBrN/bxCLFn21tO/ZP7EM3qA4FGzppoUCcZ5CaMbKOsN8uOp27ylVEsfrxcR2tsF6gWHI5M8bN73w==", + "requires": { + "is-stream": "^1.1.0", + "readable-stream-node-to-web": "^1.0.1", + "web-streams-ponyfill": "^1.4.1" + }, + "dependencies": { + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + } + } }, - "web-animations-js": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/web-animations-js/-/web-animations-js-2.3.2.tgz", - "integrity": "sha512-TOMFWtQdxzjWp8qx4DAraTWTsdhxVSiWa6NkPFSaPtZ1diKUxTn4yTix73A1euG1WbSOMMPcY51cnjTIHrGtDA==", - "dev": true + "web-streams-ponyfill": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/web-streams-ponyfill/-/web-streams-ponyfill-1.4.2.tgz", + "integrity": "sha512-LCHW+fE2UBJ2vjhqJujqmoxh1ytEDEr0dPO3CabMdMDJPKmsaxzS90V1Ar6LtNE5VHLqxR4YMEj1i4lzMAccIA==" }, - "webdriverio": { - "version": "4.14.4", - "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-4.14.4.tgz", - "integrity": "sha512-Knp2vzuzP5c5ybgLu+zTwy/l1Gh0bRP4zAr8NWcrStbuomm9Krn9oRF0rZucT6AyORpXinETzmeowFwIoo7mNA==", - "dev": true, - "requires": { - "archiver": "~2.1.0", - "babel-runtime": "^6.26.0", - "css-parse": "^2.0.0", - "css-value": "~0.0.1", - "deepmerge": "~2.0.1", - "ejs": "~2.5.6", - "gaze": "~1.1.2", - "glob": "~7.1.1", - "grapheme-splitter": "^1.0.2", - "inquirer": "~3.3.0", - "json-stringify-safe": "~5.0.1", - "mkdirp": "~0.5.1", - "npm-install-package": "~2.1.0", - "optimist": "~0.6.1", - "q": "~1.5.0", - "request": "^2.83.0", - "rgb2hex": "^0.1.9", - "safe-buffer": "~5.1.1", - "supports-color": "~5.0.0", - "url": "~0.11.0", - "wdio-dot-reporter": "~0.0.8", - "wgxpath": "~1.0.0" + "webdriver": { + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-6.12.1.tgz", + "integrity": "sha512-3rZgAj9o2XHp16FDTzvUYaHelPMSPbO1TpLIMUT06DfdZjNYIzZiItpIb/NbQDTPmNhzd9cuGmdI56WFBGY2BA==", + "dev": true, + "requires": { + "@wdio/config": "6.12.1", + "@wdio/logger": "6.10.10", + "@wdio/protocols": "6.12.0", + "@wdio/utils": "6.11.0", + "got": "^11.0.2", + "lodash.merge": "^4.6.1" }, "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "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" - } - }, - "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": { - "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" - } - } - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "ejs": { - "version": "2.5.9", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.9.tgz", - "integrity": "sha512-GJCAeDBKfREgkBtgrYSf9hQy9kTb3helv0zGdzqhM7iAkW8FA/ZF97VQDbwFiwIT8MQLLOe5VlPZOEvZAqtUAQ==", - "dev": true - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "@sindresorhus/is": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.0.tgz", + "integrity": "sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ==", "dev": true }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "@szmarczak/http-timer": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.5.tgz", + "integrity": "sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ==", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "defer-to-connect": "^2.0.0" } }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "cacheable-request": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.1.tgz", + "integrity": "sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw==", "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^2.0.0" + } + }, + "decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "mimic-response": "^3.1.0" } }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "defer-to-connect": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.0.tgz", + "integrity": "sha512-bYL2d05vOSf1JEZNx5vSAtPuBMkX8K9EUutg7zlKvTqKXHt7RhWJFbmd7qakVuf13i+IkGmp6FwSsONOf6VYIg==", + "dev": true + }, + "got": { + "version": "11.8.1", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.1.tgz", + "integrity": "sha512-9aYdZL+6nHmvJwHALLwKSUZ0hMwGaJGYv3hoPLPgnT8BoBXm1SjnZeky+91tfwJaDzun2s4RsBRy48IEYv2q2Q==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.1", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" } }, - "supports-color": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.0.1.tgz", - "integrity": "sha512-7FQGOlSQ+AQxBNXJpVDj8efTA/FtyB5wcNE1omXXJ0cq6jm1jjDwuROlYDbnzHqdNPqliWFhcioCWSyav+xBnA==", + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "keyv": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.0.3.tgz", + "integrity": "sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA==", "dev": true, "requires": { - "has-flag": "^2.0.0" - }, - "dependencies": { - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - } + "json-buffer": "3.0.1" } }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + }, + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true + }, + "p-cancelable": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.0.0.tgz", + "integrity": "sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg==", + "dev": true + }, + "responselike": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", + "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", "dev": true, "requires": { - "os-tmpdir": "~1.0.2" + "lowercase-keys": "^2.0.0" } } } }, - "wgxpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wgxpath/-/wgxpath-1.0.0.tgz", - "integrity": "sha1-7vikudVYzEla06mit1FZfs2a9pA=", - "dev": true + "webdriverio": { + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-6.12.1.tgz", + "integrity": "sha512-Nx7ge0vTWHVIRUbZCT+IuMwB5Q0Q5nLlYdgnmmJviUKLuc3XtaEBkYPTbhHWHgSBXsPZMIc023vZKNkn+6iyeQ==", + "dev": true, + "requires": { + "@types/puppeteer-core": "^5.4.0", + "@wdio/config": "6.12.1", + "@wdio/logger": "6.10.10", + "@wdio/repl": "6.11.0", + "@wdio/utils": "6.11.0", + "archiver": "^5.0.0", + "atob": "^2.1.2", + "css-shorthand-properties": "^1.1.1", + "css-value": "^0.0.1", + "devtools": "6.12.1", + "fs-extra": "^9.0.1", + "get-port": "^5.1.1", + "grapheme-splitter": "^1.0.2", + "lodash.clonedeep": "^4.5.0", + "lodash.isobject": "^3.0.2", + "lodash.isplainobject": "^4.0.6", + "lodash.zip": "^4.2.0", + "minimatch": "^3.0.4", + "puppeteer-core": "^5.1.0", + "resq": "^1.9.1", + "rgb2hex": "0.2.3", + "serialize-error": "^8.0.0", + "webdriver": "6.12.1" + }, + "dependencies": { + "serialize-error": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.0.1.tgz", + "integrity": "sha512-r5o60rWFS+8/b49DNAbB+GXZA0SpDpuWE758JxDKgRTga05r3U5lwyksE91dYKDhXSmnu36RALj615E6Aj5pSg==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } }, "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "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" @@ -13512,13 +15495,19 @@ "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", + "dev": true }, "white-space-x": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/white-space-x/-/white-space-x-3.0.1.tgz", - "integrity": "sha512-BwMFXQNPna/4RsNPOgldVYn+FkEv+lc3wUiFzuaW6Z2DH/oSk1UrRD6SBqDgWQO4JU+aBq3PVuPD9Vz0j7mh0w==", - "dev": true + "integrity": "sha512-BwMFXQNPna/4RsNPOgldVYn+FkEv+lc3wUiFzuaW6Z2DH/oSk1UrRD6SBqDgWQO4JU+aBq3PVuPD9Vz0j7mh0w==" }, "wide-align": { "version": "1.1.3", @@ -13572,58 +15561,76 @@ } }, "winston": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.2.1.tgz", - "integrity": "sha512-zU6vgnS9dAWCEKg/QYigd6cgMVVNwyTzKs81XZtTFuRwJOcDdBg7AU0mXVyNbs7O5RH2zdv+BdNZUlx7mXPuOw==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", + "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", "requires": { - "async": "^2.6.1", - "diagnostics": "^1.1.1", - "is-stream": "^1.1.0", - "logform": "^2.1.1", - "one-time": "0.0.4", - "readable-stream": "^3.1.1", + "@dabh/diagnostics": "^2.0.2", + "async": "^3.1.0", + "is-stream": "^2.0.0", + "logform": "^2.2.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", - "winston-transport": "^4.3.0" + "winston-transport": "^4.4.0" + } + }, + "winston-transport": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.0.tgz", + "integrity": "sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==", + "requires": { + "readable-stream": "^2.3.7", + "triple-beam": "^1.2.0" }, "dependencies": { "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "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==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "safe-buffer": "~5.1.0" } } } }, - "winston-transport": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.3.0.tgz", - "integrity": "sha512-B2wPuwUi3vhzn/51Uukcao4dIduEiPOcOt9HJ3QeaXgkJ5Z7UwpBzxS4ZGNHtrxrUvTwemsQiSys0ihOf8Mp1A==", - "requires": { - "readable-stream": "^2.3.6", - "triple-beam": "^1.2.0" - } - }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "workerpool": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz", + "integrity": "sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==", "dev": true }, "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==", + "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", @@ -13631,11 +15638,11 @@ }, "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==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -13643,6 +15650,7 @@ "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" } @@ -13650,12 +15658,14 @@ "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==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "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" } @@ -13667,19 +15677,11 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, "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", @@ -13691,7 +15693,6 @@ "version": "0.4.3", "resolved": "https://registry.npmjs.org/write-stream/-/write-stream-0.4.3.tgz", "integrity": "sha1-g8yMA0fQr2BXqThitOOuAd5cgcE=", - "dev": true, "requires": { "readable-stream": "~0.0.2" }, @@ -13699,199 +15700,107 @@ "readable-stream": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-0.0.4.tgz", - "integrity": "sha1-8y124/uGM0SlSNeZIwBxc2ZbO40=", - "dev": true + "integrity": "sha1-8y124/uGM0SlSNeZIwBxc2ZbO40=" } } }, + "ws": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.2.tgz", + "integrity": "sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA==", + "dev": true + }, "xdg-basedir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, + "xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "dev": true }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, + "yaml": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", + "dev": true + }, "yargs": { - "version": "15.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", - "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", + "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", - "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.1" + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" }, "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==", - "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==", - "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==", - "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==" + "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-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } } }, "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "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": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "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" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "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 - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.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": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } } } }, @@ -13905,16 +15814,21 @@ "fd-slicer": "~1.1.0" } }, + "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 + }, "zip-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", - "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.0.4.tgz", + "integrity": "sha512-a65wQ3h5gcQ/nQGWV1mSZCEzCML6EK/vyVPcrPNynySP1j3VBbQKh3nhC8CbORb+jfl2vXvh56Ul5odP1bAHqw==", "dev": true, "requires": { - "archiver-utils": "^1.3.0", - "compress-commons": "^1.2.0", - "lodash": "^4.8.0", - "readable-stream": "^2.0.0" + "archiver-utils": "^2.1.0", + "compress-commons": "^4.0.2", + "readable-stream": "^3.6.0" } } } diff --git a/package.json b/package.json index f589a82a..f57e9dc2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "advanced-rest-client", "description": "The Advanced REST Client desktop application.", - "version": "16.0.0-aplha.5", + "version": "16.0.0-alpha.6", "homepage": "https://advancedrestclient.com", "license": "Apache-2.0", "author": { @@ -12,18 +12,17 @@ "url": "https://github.com/advanced-rest-client/arc-electron" }, "scripts": { - "start": "electron . --inspect --debug --debug-level=\"silly\" --skip-app-update --skip-themes-update --workspace-path=\"~/arc-dev/workspace\" --settings-file=\"~/arc-dev/dev-settings.json\" --themes-path=\"~/arc-dev/themes\"", + "start": "electron . --dev --debug-level=\"silly\" --skip-app-update --skip-themes-update --with-devtools --workspace-path=\"~/arc-dev/workspace\" --settings-file=\"~/arc-dev/dev-settings.json\" --state-file=\"~/arc-dev/dev-state.json\" --themes-path=\"~/arc-dev/themes-esm\"", "start:api": "node dev-api/api.js", "postinstall": "electron-builder install-app-deps", "prepare": "node tasks/prepare-app.js && pika-web", - "test": "npm run test:main && npm run test:renderer && npm run test:app", - "test:main": "NODE_ENV=test ELECTRON_PATH=node_modules/.bin/electron electron-mocha test/**/*.main.spec.js scripts/packages/**/*.main.spec.js", - "test:renderer": "NODE_ENV=test ELECTRON_PATH='node_modules/.bin/electron' electron-mocha --renderer --require-main 'test/renderer-setup-paths.js' scripts/packages/**/*.renderer.spec.js", + "test": "npm run test:main && npm run test:renderer", + "test:main": "NODE_ENV=test ELECTRON_PATH=node_modules/.bin/electron electron-mocha test/**/*.main.spec.js", + "test:renderer": "NODE_ENV=test ELECTRON_PATH='node_modules/.bin/electron' electron-mocha --renderer --require-main 'test/renderer-setup-environment.js' test/**/*.renderer.spec.js", "test:renderer:watch": "NODE_ENV=test ELECTRON_PATH='node_modules/.bin/electron' electron-mocha --watch --renderer --require-main 'test/renderer-setup-paths.js' scripts/packages/**/*.renderer.spec.js", "test:app": "NODE_ENV=test ELECTRON_PATH=node_modules/.bin/electron mocha test/**/*.app.spec.js --timeout 10000", - "test:win:all": "npm run test-win-main && npm run test:win:renderer && npm run test:win:app", - "test:win:main": "node node_modules/.bin/electron-mocha test/**/*.main.spec.js scripts/packages/**/*.main.spec.js", - "test:win:renderer": "node node_modules/.bin/electron-mocha --renderer scripts/packages/**/*.renderer.spec.js", + "test:win:all": "npm run test-win-main && npm run test:win:app", + "test:win:main": "node node_modules/.bin/electron-mocha test/**/*.main.spec.js", "test:win:app": "node node_modules/.bin/mocha test/**.app.spec.js", "build-l": "npx electron-builder -l", "build-w": "npx electron-builder -w", @@ -33,77 +32,116 @@ "start-drive": "electron . --inspect --debug --debug-level=\"silly\" --with-devtools --workspace-path=\"~/arc-dev/workspace\" --settings-file=\"~/arc-dev/dev-settings.json\" --themes-path=\"~/arc-dev/themes\" arc-file://drive/open/1_PAI-CGHqi_pZCV8ZZ_9_N-LGMjkAYzn", "resetmodules": "rm -rf node_modules/ && rm -rf web_modules/ && rm package-lock.json && npm i" }, - "main": "main.js", + "main": "src/io/main.js", "devDependencies": { - "@advanced-rest-client/about-arc-electron": "^4.0.0", - "@advanced-rest-client/arc-app-mixin": "^5.0.1", - "@advanced-rest-client/arc-definitions": "^3.0.0", - "@advanced-rest-client/arc-icons": "^3.0.5", - "@advanced-rest-client/arc-info-messages": "^3.0.0", - "@advanced-rest-client/arc-onboarding": "^3.0.1", - "@advanced-rest-client/client-certificates-panel": "^1.0.4", - "@advanced-rest-client/eslint-config": "^1.1.5", - "@advanced-rest-client/exchange-search-panel": "^3.0.3", - "@advanced-rest-client/host-rules-editor": "^3.0.0", - "@advanced-rest-client/rest-apis-list-panel": "^3.0.0", - "@advanced-rest-client/themes-panel": "^3.0.0", - "@anypoint-web-components/anypoint-dialog": "^0.1.1", - "@api-components/api-candidates-dialog": "^3.0.0", - "@api-components/api-documentation": "^4.1.2", - "@api-components/api-navigation": "^4.1.1", + "@advanced-rest-client/arc-cookies": "^0.1.0", + "@advanced-rest-client/arc-definitions": "^3.1.1", + "@advanced-rest-client/arc-environment": "^0.1.2", + "@advanced-rest-client/arc-headers": "^0.1.7", + "@advanced-rest-client/arc-icons": "^3.2.2", + "@advanced-rest-client/arc-ie": "^1.0.3", + "@advanced-rest-client/arc-menu": "^4.0.3", + "@advanced-rest-client/arc-models": "^4.2.8", + "@advanced-rest-client/arc-request-ui": "^0.1.8", + "@advanced-rest-client/arc-settings": "^0.1.2", + "@advanced-rest-client/bottom-sheet": "^3.2.2", + "@advanced-rest-client/client-certificates": "^0.1.0", + "@advanced-rest-client/exchange-search-panel": "^4.0.0", + "@advanced-rest-client/monaco-support": "^1.0.1", + "@advanced-rest-client/pouchdb-quick-search": "^2.0.3", + "@advanced-rest-client/request-engine": "^0.1.10", + "@advanced-rest-client/requests-list": "^0.1.8", + "@anypoint-web-components/anypoint-button": "^1.1.1", + "@anypoint-web-components/anypoint-dialog": "^0.1.6", + "@anypoint-web-components/anypoint-item": "^1.1.0", + "@anypoint-web-components/anypoint-switch": "^0.1.4", + "@open-wc/dedupe-mixin": "^1.3.0", + "@open-wc/eslint-config": "^4.1.0", "@pika/web": "^0.6.1", - "@polymer/app-layout": "^3.1.0", "@polymer/font-roboto-local": "^3.0.2", - "@polymer/iron-media-query": "^3.0.1", - "@polymer/iron-test-helpers": "^3.0.1", + "@types/chai": "^4.2.14", + "@types/esm": "^3.2.0", + "@types/fs-extra": "^9.0.6", + "@types/mocha": "^8.2.0", + "@types/pouchdb": "^6.4.0", + "api-console": "^6.4.0", "babel-eslint": "^10.1.0", - "body-parser": "^1.19.0", "chai": "^4.2.0", - "cors": "^2.8.5", + "chance": "^1.1.7", "dotenv": "^8.2.0", - "electron": "^8.3.0", - "electron-builder": "^22.6.1", - "electron-mocha": "^8.2.2", - "electron-notarize": "^0.3.0", + "electron": "^11.2.1", + "electron-builder": "^22.9.1", + "electron-mocha": "^10.0.0", + "electron-notarize": "^1.0.0", + "electron-reloader": "^1.2.0", "electron-windows-store": "^2.1.0", - "eslint-config-google": "^0.14.0", - "esm": "^3.2.25", - "express": "^4.17.1", - "express-session": "^1.17.1", - "glob": "^7.1.6", - "lit-element": "^2.3.1", - "mocha": "^7.2.0", - "sinon": "^9.0.2", - "spectron": "^10.0.1", - "web-animations-js": "^2.3.2" + "eslint": "^7.18.0", + "eslint-config-prettier": "^7.2.0", + "husky": "^4.3.8", + "lint-staged": "^10.5.1", + "lit-element": "^2.4.0", + "mocha": "^8.2.1", + "monaco-editor": "^0.21.3", + "pouchdb": "^7.2.2", + "sinon": "^9.2.4", + "spectron": "^13.0.0", + "typescript": "^4.1.3", + "typescript-lit-html-plugin": "^0.9.0" }, "dependencies": { - "@advanced-rest-client/arc-electron-payload-processor": "^0.4.0", - "@advanced-rest-client/code-mirror-hint": "^3.0.2", - "@advanced-rest-client/code-mirror-linter": "^3.0.0", - "@advanced-rest-client/electron-amf-service": "^4.0.0", - "@advanced-rest-client/electron-drive": "^0.5.0", - "@advanced-rest-client/electron-oauth2": "^3.0.0", - "@advanced-rest-client/electron-request": "^2.4.0", - "@advanced-rest-client/electron-session-state": "^3.0.0", - "amf-client-js": "^4.0.6", - "camelcase": "^5.3.1", - "codemirror": "^5.52.2", - "crypto-js": "^3.3.0", - "electron-log": "^4.1.1", - "electron-prompt": "^1.5.0", - "electron-updater": "4.2.5", - "fs-extra": "^9.0.0", - "jexl": "^2.2.2", + "@advanced-rest-client/arc-events": "^0.2.13", + "@advanced-rest-client/arc-types": "^0.2.49", + "@advanced-rest-client/electron-amf-service": "^5.0.0", + "@advanced-rest-client/electron-oauth2": "^5.0.1", + "@advanced-rest-client/electron-request": "^3.1.1", + "@advanced-rest-client/google-drive-browser": "^4.0.0", + "@advanced-rest-client/host-rules-editor": "^4.0.0", + "camelcase": "^6.2.0", + "electron-log": "^4.3.1", + "electron-prompt": "^1.6.1", + "electron-updater": "^4.3.5", + "esm": "^3.2.25", + "fs-extra": "^9.1.0", + "jexl": "^2.3.0", "jsonlint": "^1.6.3", - "live-plugin-manager": "^0.14.1", + "live-plugin-manager": "^0.15.1", "mime-types": "^2.1.27", - "node-fetch": "^2.6.0", - "ntlm": "^0.1.3", - "semver": "^7.1.3", - "uuid": "^7.0.2", - "winston": "^3.2.1", - "yargs": "^15.3.1" + "node-fetch": "^2.6.1", + "uuid": "^8.3.2", + "winston": "^3.3.3" + }, + "eslintConfig": { + "extends": [ + "@open-wc/eslint-config", + "eslint-config-prettier" + ], + "ignorePatterns": [ + "**/*.d.ts" + ], + "parser": "babel-eslint", + "overrides": [ + { + "files": [ + "**/*.js" + ], + "rules": { + "no-plusplus": "off", + "no-continue": "off", + "class-methods-use-this": "off", + "import/no-extraneous-dependencies": "off" + } + } + ] + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint --fix" + ] }, "build": { "appId": "com.mulesoft.arc", @@ -168,6 +206,9 @@ ] }, "linux": { + "publish": [ + "github" + ], "category": "Development", "target": [ { @@ -251,57 +292,138 @@ }, "@pika/web": { "webDependencies": [ - "jexl/lib/Jexl.js", + "jexl/dist/Jexl.js", + "pouchdb/dist/pouchdb.js", + "@open-wc/dedupe-mixin/index.js", + "@open-wc/dedupe-mixin/index.d.ts", + "lit-html/lit-html.js", + "lit-html/lit-html.d.ts", + "lit-html/directives/class-map.js", + "lit-html/directives/class-map.d.ts", + "lit-html/directives/style-map.js", + "lit-html/directives/style-map.d.ts", "lit-element/lit-element.js", - "@polymer/paper-toast/paper-toast.js", - "@polymer/iron-test-helpers/iron-test-helpers.js", - "@advanced-rest-client/arc-icons/ArcIcons.js", - "@advanced-rest-client/arc-messages-service/arc-messages-service.js", - "@advanced-rest-client/arc-messages-service/arc-messages-service-worker.js", - "@advanced-rest-client/arc-info-messages/arc-info-messages.js", - "@advanced-rest-client/exchange-search-panel/exchange-search-panel.js", - "@advanced-rest-client/host-rules-editor/host-rules-editor.js", - "@advanced-rest-client/about-arc-electron/about-arc-electron.js", - "@advanced-rest-client/arc-app-mixin/arc-app-mixin.js", - "@advanced-rest-client/arc-app-mixin/AppStyles.js", - "@advanced-rest-client/themes-panel/themes-panel.js", - "@advanced-rest-client/variables-preview-overlay/variables-preview-overlay.js", - "@advanced-rest-client/arc-request-workspace/arc-request-workspace.js", - "@advanced-rest-client/project-details/project-details.js", - "@advanced-rest-client/cookie-manager/cookie-manager.js", - "@advanced-rest-client/arc-settings-panel/arc-settings-panel.js", - "@advanced-rest-client/websocket-panel/websocket-panel.js", - "@advanced-rest-client/google-drive-browser/google-drive-browser.js", - "@advanced-rest-client/import-panel/import-panel.js", - "@advanced-rest-client/export-panel/export-panel.js", - "@advanced-rest-client/history-panel/history-panel.js", - "@advanced-rest-client/saved-requests-panel/saved-requests-panel.js", - "@advanced-rest-client/variables-drawer-editor/variables-drawer-editor.js", - "@advanced-rest-client/arc-menu/arc-menu.js", - "@api-components/api-candidates-dialog/api-candidates-dialog.js", - "@api-components/raml-aware/raml-aware.js", - "@api-components/api-documentation/api-documentation.js", - "@api-components/api-navigation/api-navigation.js", - "@api-components/amf-helper-mixin/amf-helper-mixin.js", - "@advanced-rest-client/arc-file-drop-mixin/arc-file-drop-mixin.js", - "@advanced-rest-client/arc-electron-payload-processor/payload-processor-esm.js", + "lit-element/lit-element.d.ts", + "lit-element/lib/*", "@polymer/font-roboto-local/roboto.js", - "@polymer/paper-spinner/paper-spinner.js", - "web-animations-js/web-animations.min.js", - "pouchdb/dist/pouchdb.js", - "@advanced-rest-client/pouchdb-quick-search/dist/pouchdb.quick-search.min.js", + "@polymer/font-roboto-local/fonts/roboto/*", "marked/lib/marked.js", - "@anypoint-web-components/anypoint-button/anypoint-icon-button.js", - "@anypoint-web-components/anypoint-input/anypoint-input.js", - "@anypoint-web-components/anypoint-item/anypoint-item.js", - "lit-html/directives/repeat.js", - "@advanced-rest-client/arc-onboarding/arc-onboarding.js", - "@advanced-rest-client/rest-apis-list-panel/rest-apis-list-panel.js", - "@advanced-rest-client/client-certificates-panel/client-certificates-panel.js", - "@advanced-rest-client/client-certificates-panel/certificate-import.js", - "@advanced-rest-client/arc-models/client-certificate-model.js", + "@anypoint-web-components/anypoint-dialog/index.js", + "@anypoint-web-components/anypoint-dialog/index.d.ts", "@anypoint-web-components/anypoint-dialog/anypoint-dialog.js", - "@anypoint-web-components/anypoint-dialog/anypoint-dialog-scrollable.js" + "@anypoint-web-components/anypoint-dialog/anypoint-dialog.d.ts", + "@anypoint-web-components/anypoint-dialog/anypoint-dialog-scrollable.js", + "@anypoint-web-components/anypoint-dialog/anypoint-dialog-scrollable.d.ts", + "@anypoint-web-components/anypoint-dialog/src/*", + "@anypoint-web-components/anypoint-button/anypoint-button.js", + "@anypoint-web-components/anypoint-button/anypoint-button.d.ts", + "@anypoint-web-components/anypoint-button/anypoint-icon-button.js", + "@anypoint-web-components/anypoint-button/anypoint-icon-button.d.ts", + "@anypoint-web-components/anypoint-button/src/*", + "@anypoint-web-components/anypoint-input/*.js", + "@anypoint-web-components/anypoint-input/*.d.ts", + "@anypoint-web-components/anypoint-input/src/*", + "@anypoint-web-components/anypoint-dropdown-menu/*.js", + "@anypoint-web-components/anypoint-dropdown-menu/*.d.ts", + "@anypoint-web-components/anypoint-dropdown-menu/src/*", + "@anypoint-web-components/anypoint-listbox/*.js", + "@anypoint-web-components/anypoint-listbox/*.d.ts", + "@anypoint-web-components/anypoint-listbox/src/*", + "@anypoint-web-components/anypoint-item/*.js", + "@anypoint-web-components/anypoint-item/*.d.ts", + "@anypoint-web-components/anypoint-item/src/*", + "@advanced-rest-client/arc-icons/arc-icon.js", + "@advanced-rest-client/arc-icons/arc-icon.d.ts", + "@advanced-rest-client/arc-icons/src/ARCIconElement.js", + "@advanced-rest-client/arc-icons/src/ARCIconElement.d.ts", + "@advanced-rest-client/arc-events/index.js", + "@advanced-rest-client/arc-events/index.d.ts", + "@advanced-rest-client/arc-events/src/*", + "@advanced-rest-client/arc-events/src/**", + "@advanced-rest-client/monaco-support/index.js", + "@advanced-rest-client/arc-request-ui/*.js", + "@advanced-rest-client/arc-request-ui/*.d.ts", + "@advanced-rest-client/arc-request-ui/src/*", + "@advanced-rest-client/arc-request-ui/src/**", + "@advanced-rest-client/pouchdb-quick-search/dist/pouchdb.quick-search.min.js", + "@advanced-rest-client/arc-ie/*.js", + "@advanced-rest-client/arc-ie/*.d.ts", + "@advanced-rest-client/arc-ie/src/*", + "@advanced-rest-client/arc-ie/src/**", + "@advanced-rest-client/arc-models/*.js", + "@advanced-rest-client/arc-models/*.d.ts", + "@advanced-rest-client/arc-models/src/*", + "@advanced-rest-client/arc-models/src/**", + "@advanced-rest-client/arc-menu/*.js", + "@advanced-rest-client/arc-menu/*.d.ts", + "@advanced-rest-client/arc-menu/src/*", + "@advanced-rest-client/arc-menu/src/**", + "@advanced-rest-client/requests-list/*.js", + "@advanced-rest-client/requests-list/*.d.ts", + "@advanced-rest-client/requests-list/src/*", + "@advanced-rest-client/requests-list/src/**", + "@advanced-rest-client/client-certificates/*.js", + "@advanced-rest-client/client-certificates/*.d.ts", + "@advanced-rest-client/client-certificates/src/*", + "@advanced-rest-client/client-certificates/src/**", + "@advanced-rest-client/request-engine/*.js", + "@advanced-rest-client/request-engine/*.d.ts", + "@advanced-rest-client/request-engine/src/*", + "@advanced-rest-client/request-engine/src/**", + "@advanced-rest-client/arc-environment/*.js", + "@advanced-rest-client/arc-environment/*.d.ts", + "@advanced-rest-client/arc-environment/src/*", + "@advanced-rest-client/arc-environment/src/**", + "@advanced-rest-client/arc-cookies/*.js", + "@advanced-rest-client/arc-cookies/*.d.ts", + "@advanced-rest-client/arc-cookies/src/*.js", + "@advanced-rest-client/arc-cookies/src/*.d.ts", + "@advanced-rest-client/arc-settings/*.js", + "@advanced-rest-client/arc-settings/*.d.ts", + "@advanced-rest-client/arc-settings/src/*.js", + "@advanced-rest-client/arc-settings/src/*.d.ts", + "@advanced-rest-client/arc-headers/*.js", + "@advanced-rest-client/arc-headers/*.d.ts", + "@advanced-rest-client/arc-headers/src/*.js", + "@advanced-rest-client/arc-headers/src/*.d.ts", + "@advanced-rest-client/authorization-method/auth-dialog-basic.js", + "@advanced-rest-client/authorization-method/auth-dialog-ntlm.js", + "@advanced-rest-client/bottom-sheet/*.js", + "@advanced-rest-client/bottom-sheet/*.d.ts", + "@advanced-rest-client/bottom-sheet/src/*.js", + "@advanced-rest-client/bottom-sheet/src/*.d.ts", + "@advanced-rest-client/host-rules-editor/*.js", + "@advanced-rest-client/host-rules-editor/*.d.ts", + "@advanced-rest-client/host-rules-editor/src/*.js", + "@advanced-rest-client/host-rules-editor/src/*.d.ts", + "@anypoint-web-components/anypoint-switch/*.js", + "@anypoint-web-components/anypoint-switch/*.d.ts", + "@anypoint-web-components/anypoint-switch/src/*.js", + "@anypoint-web-components/anypoint-switch/src/*.d.ts", + "@advanced-rest-client/google-drive-browser/*.js", + "@advanced-rest-client/google-drive-browser/*.d.ts", + "@advanced-rest-client/google-drive-browser/src/*.js", + "@advanced-rest-client/google-drive-browser/src/*.d.ts", + "@api-components/api-navigation/*.js", + "@api-components/api-navigation/*.d.ts", + "@api-components/api-navigation/src/*.js", + "@api-components/api-navigation/src/*.d.ts", + "@api-components/api-documentation/*.js", + "@api-components/api-documentation/*.d.ts", + "@api-components/api-documentation/src/*.js", + "@api-components/api-documentation/src/*.d.ts", + "@api-components/api-request-panel/*.js", + "@api-components/api-request-panel/*.d.ts", + "@api-components/api-request-panel/src/*.js", + "@api-components/api-request-panel/src/*.d.ts", + "@api-components/amf-helper-mixin/*.js", + "@api-components/amf-helper-mixin/*.d.ts", + "@api-components/amf-helper-mixin/src/*.js", + "@api-components/amf-helper-mixin/src/*.d.ts", + "@advanced-rest-client/exchange-search-panel/*.js", + "@advanced-rest-client/exchange-search-panel/*.d.ts", + "@advanced-rest-client/exchange-search-panel/src/*.js", + "@advanced-rest-client/exchange-search-panel/src/*.d.ts" ] } } diff --git a/restful-apis-getting-started.md b/restful-apis-getting-started.md deleted file mode 100644 index 44649e3d..00000000 --- a/restful-apis-getting-started.md +++ /dev/null @@ -1,118 +0,0 @@ ---- -description: This page is a starting guide for working with RESTtul APIs ---- - -# RESTful APIs getting started - -## API - -An API or Application Programming Interface, is a way of how one system talk to another. It is how Instagram application on your phone talks to backend server to request for data. Without a common interface that both systems understands \(server understand the shape of the data to send and the client understand how to use the data\) applications wouldn't be able to talk to each other. - -## REST API - -**RE**presentational **S**tate **T**ransfer is one of architectures of an API. The REST API is all about a **resource** \(some data stored somehow on the server\(s\)\) and the way how this resource is being transferred to/from the client and what operations are permitted on a resource. - -In RESTful APIs there are endpoints that provides an access to a resource. An **endpoint** is an [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) under which a data may or may not exist. An operation that can be performed on an endpoint is the **method**, also sometimes called the verb. There is a list of well defined methods and each of them has different semantic meaning. - -{% hint style="info" %} -A method is not defined by REST API but rather by underlying HTTP protocol. APIs just use those methods to provide a way to get or modify the data on the server. -{% endhint %} - -**POST** method semantically means that this operation creates a new entity \(new data\). - -**GET** method means requesting current state of the data. GET request can be about requesting a list of resources \(like getting a list of Instagram posts\) or about requesting a single resource \(requesting for a single Instagram post\). - -**PUT** operation semantically means updating the whole resource with the data that are transmitted in the request message payload. - -**PATCH** is similar to PUT but it means to update only this part of the resource that is defined in the request payload. Other properties are unchanged. - -**DELETE** method removes the data from the system. - -There are more well defined methods that you can use with your API. Read more about it on [MDN pages](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods). - -## HTTP Request - -Each API methods can be invoked by making a HTTP \(in most cases\) connection to a server and by sending specially prepared message that every HTTP server understands. - -The core Advanced REST Client role is to provide an UI for you to provide only relevant data to communicate with the server and it takes care of generating valid HTTP message. It also reads the response from the server and presents it in a meaningful way to you so you don't waste your time decoding HTTP messages. - -An HTTP message is consistent of 3 parts: start line, headers, and the message. The value of each part may vary depending on the request method. - -The **start line** describes the **requests**. It contains method name, the path to access the resource \(the endpoint\) and the protocol version. - -```http -GET /endpoint HTTP/1.1 -``` - -Optional **headers** part of the message contains a list of meta information that describes the request or the client. There is a list of predefined request headers that every HTTP server understands. It is also possible to use custom headers but only some servers will understand it. - -Each line in the headers part of the message represent a single header. A header starts with a name, then the value separator - a colon - and after that the value of the header. - -An example headers part: - -```http -Host: httpbin.org -Content-Type: application/json -user-agent: advanced-rest-client -accept: */* -content-length: 110459 -``` - -{% hint style="info" %} -Header names are case insensitive per HTTP specification. Clients have no obligation to transform headers into specific form. Headers in the example above are valid even though only some of them starts with capital letter. -{% endhint %} - -Each of the headers has a meaning and the server use the values to properly process the request. Read more about request headers on [MDN request headers reference](https://developer.mozilla.org/en-US/docs/Glossary/Request_header) page. - -Optional **payload** or **body** part is the resource or data being transferred to the server. The body part must be separated from the previous part with an empty line. The body can be anything: an image, a text, some other binary data, or combination of them. - -{% hint style="danger" %} -Technically in some situations it is possible to add a body part to GET and HEAD messages but most popular clients \(including all HTTP clients in the web\) disallow setting the body for this two methods. HTTP specification does not specify body for those requests and there's no default behavior. -{% endhint %} - -Full example of a HTTP message - -```http -POST /post HTTP/1.1 -Host: httpbin.org -Content-Type: application/json -content-length: 23 - -{ - "data": "value" -} -``` - -## HTTP Response - -A HTTP response, the one that is sent from the server back to the client, is very similar to HTTP request. The two differences is that the start line is formatted differently and it has different set of headers \(called [response headers](https://developer.mozilla.org/en-US/docs/Glossary/Response_header)\). - -The start line consists of HTTP version, status code, and optional status message. - -```http -HTTP/1.1 200 OK -``` - -Status code is one of pre-defined by HTTP transport specification codes. And so: - -* codes of group 100 \(1xx\) are used when a communication protocol is being negotiated; only HTTP client and server cares about this group -* codes of group 200 \(2xx\) indicates a success of the request -* codes of group 300 \(3xx\) indicates a redirect of some sort \(resource location changed, there are multiple choices of a response, etc\) -* codes of group 400 \(4xx\) indicates client errors \(client not authorized, resource does not exists, etc\) -* codes of group 500 \(5xx\) indicates server errors - -Read more about response status code, with the full list of predefined codes, on [MDN status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) page. - -The most common status codes are: - -* **200** - Successful request. If the request method is GET it means that the message part contains requested data -* **201** - Created - When a request method was POST it indicates that the data entity has been created -* **301** - The resource has been moved permanently to another location \(endpoint\) -* **307** - The resource has been moved temporarily to another location \(endpoint\) -* **401** - Unauthorized access to the resource. It usually means that authorization data are missing, invalid, or expired. -* **404** - Resource not found under given URI -* **500** - A server encountered a problem which resulted in exception; the request processing was aborted -* **503** - The server is not yet ready to accept connections. - -ARC shows additional non-standard status code: 0 \(zero\). It is reported when the application wasn't able to establish a connection to the server. There may be multiple reasons for that but most commonly is either URL is invalid \(check host name spelling\) or the server is down. Less common: DNS cannot find the domain or is down. - diff --git a/scripts/main/app-defaults.js b/scripts/main/app-defaults.js deleted file mode 100644 index 1055ba1c..00000000 --- a/scripts/main/app-defaults.js +++ /dev/null @@ -1,22 +0,0 @@ -const { ThemeDefaults } = require('./defaults/theme-defaults'); -const { WorkspaceDefaults } = require('./defaults/workspace-defaults'); -/** - * Class responsible for keeping application base environment stable. - * - * It copies default resources to it's default locations and sets up - * the application environment. - */ -class AppDefaults { - /** - * Prepares environemt files while opening the application. - * Copies application themes to themes location. - * @return {Promise} - */ - async prepareEnvironment() { - const td = new ThemeDefaults(); - await td.prepareEnvironment(); - const wd = new WorkspaceDefaults(); - await wd.prepareEnvironment(); - } -} -exports.AppDefaults = AppDefaults; diff --git a/scripts/main/app-menu-service.js b/scripts/main/app-menu-service.js deleted file mode 100644 index 4000baca..00000000 --- a/scripts/main/app-menu-service.js +++ /dev/null @@ -1,173 +0,0 @@ -const { BrowserWindow, ipcMain } = require('electron'); -const path = require('path'); -const url = require('url'); -const log = require('./logger'); -/** - * Application menu by default is embedded in main application window. - * User has an option to pop up menu to a new window. This class handles - * events from the renderer process to make it possible. - */ -class AppMenuService { - /** - * @param {ArcEnvironment} app - */ - constructor(app) { - this.app = app; - this.menuWindows = new Map(); - - this._popupAppMenuHandler = this._popupAppMenuHandler.bind(this); - this.__windowClosed = this.__windowClosed.bind(this); - this._popupNavHandler = this._popupNavHandler.bind(this); - } - - listen() { - log.debug('Listening for menu popup events'); - ipcMain.on('popup-app-menu', this._popupAppMenuHandler); - ipcMain.on('popup-app-menu-nav', this._popupNavHandler); - } - /** - * Handler for `popup-app-menu` event dispatched by ARC windows. - * @param {Event} e - * @param {String} type Menu type - * @param {?Object} sizing `width` and `height` - */ - _popupAppMenuHandler(e, type, sizing) { - log.debug('Handling menu popup event from app window.'); - if (this.menuWindows.has(type)) { - log.debug('Showing existing window.'); - const menu = this.menuWindows.get(type); - menu.show(); - return; - } - this.createMenuWindow(type, sizing); - } - /** - * Creates menu window object. - * If the `type` already exists then nothing happens. - * @param {String} type Menu type - * @param {Object} sizing `width` and `height` - */ - createMenuWindow(type, sizing) { - if (this.menuWindows.has(type)) { - return; - } - log.debug('Creating menu popup window for type: ' + type); - const bw = this.__getNewWindow(type, sizing); - this.menuWindows.set(type, bw); - this.__loadPage(type, bw); - this.__attachListeners(bw); - this.app.wm.notifyAll('popup-app-menu-opened', type); - } - - /** - * Creates new menu window. - * - * @param {String} type - * @param {?Object} sizing - * @return {BrowserWindow} Created window. - */ - __getNewWindow(type, sizing) { - const width = sizing && sizing.width ? sizing.width : 320; - const height = sizing && sizing.height ? sizing.height : 800; - const menuWindow = new BrowserWindow({ - width, - height, - backgroundColor: '#00A2DF', - show: true, - webPreferences: { - partition: 'persist:arc-window', - nativeWindowOpen: true, - nodeIntegration: false, - contextIsolation: false, - preload: path.join(__dirname, '..', '..', 'src', 'arc-menu-window', 'app-menu-preload.js') - } - }); - menuWindow.removeMenu(); - menuWindow.__menuType = type; - return menuWindow; - } - /** - * Creates application URL and loads app into the window. - * @param {String} type - * @param {BrowserWindow} bw - */ - __loadPage(type, bw) { - const dest = path.join(__dirname, '..', '..', 'src', 'arc-menu-window', 'arc-menu-window.html'); - const full = url.format({ - pathname: dest, - protocol: 'file:', - slashes: true, - query: { - type - } - }); - bw.loadURL(full); - } - - __attachListeners(bw) { - bw.addListener('closed', this.__windowClosed); - } - - __dettachListeners(bw) { - bw.removeListener('closed', this.__windowClosed); - } - /** - * Handler for the BrowserWindow `closed` event. - * - * @param {Event} e Event emitted by the window. - */ - __windowClosed(e) { - const bw = e.sender; - const type = bw.__menuType; - this.__dettachListeners(bw); - this.menuWindows.delete(type); - this.app.wm.notifyAll('popup-app-menu-closed', type); - } - /** - * Handler for an event dispatched by popup menu when navigation action was - * performed. - * @param {Event} e - * @param {Object} detail Event detail - */ - _popupNavHandler(e, detail) { - log.debug('Handling popup menu event from the menu.'); - if (!this.app.wm.hasWindow) { - log.warn('Popup menu event handled without menu window registered.'); - return; - } - let win = this.app.wm.lastFocused; - if (!win) { - win = this.app.wm.lastActive; - } - if (!win) { - log.warn('Unable to perform navigation. No active window found.'); - return; - } - log.debug('Sending navigate event to the renderer process.'); - win.webContents.send('app-navigate', detail); - } - /** - * Removes all generated menu windows. - */ - clear() { - log.debug('Removing all menu popup windows.'); - for (const win of this.menuWindows.values()) { - win.destroy(); - } - } - /** - * Toggles entitre menu window. - */ - togglePopupMenu() { - log.debug('Toggling menu popup window.'); - const win = this.menuWindows.get('*'); - if (win) { - win.destroy(); - } else { - this.clear(); - this.createMenuWindow('*'); - } - } -} - -module.exports.AppMenuService = AppMenuService; diff --git a/scripts/main/app-prompts.js b/scripts/main/app-prompts.js deleted file mode 100644 index 85e3399a..00000000 --- a/scripts/main/app-prompts.js +++ /dev/null @@ -1,48 +0,0 @@ -const { dialog, ipcMain } = require('electron'); -const log = require('./logger'); -/** - * Class responsible for displaying system dialogs and - * to sends back resutls to the sender. - */ -class AppPrompts { - /** - * Listens for the application events. - */ - listen() { - ipcMain.handle('save-dialog', this._saveDialogHandler.bind(this)); - } - /** - * Hasnles save action dialog. Opens "save as..." dialog and returns - * the result to the app. - * - * @param {Event} e Event emitted by the BrowserWindow - * @param {Object} args Prompt dialog options: - * - file {String} - File name to suggest to the user. - * @return {Promise} - */ - _saveDialogHandler(e, args={}) { - log.debug('Save dialog requested', args); - const options = { - title: 'Save to file' - }; - if (args.file) { - options.defaultPath = args.file; - } - return dialog.showSaveDialog(options); - } - /** - * A dialog that renders error message about missing workspace file. - * @param {String} file Requested workspace file location. - * @return {Promise} - */ - static async workspaceMissing(file) { - let message = 'Workspace file cannot be located. Probably it was deleted or'; - message += ' renamed.\n\n'; - message += 'Requested file: ' + file; - return await dialog.showMessageBox({ - type: 'error', - message - }); - } -} -exports.AppPrompts = AppPrompts; diff --git a/scripts/main/arc-base.js b/scripts/main/arc-base.js deleted file mode 100644 index 2235cfd6..00000000 --- a/scripts/main/arc-base.js +++ /dev/null @@ -1,134 +0,0 @@ -const log = require('./logger'); -const EventEmitter = require('events'); -/** - * Base class for other classes containing utility functions. - */ -class ArcBase extends EventEmitter { - /** - * @constructor - */ - constructor() { - super(); - this._ipcRequestId = 0; - this._promises = []; - this._debouncers = []; - this._ipcPromiseCallback = this._ipcPromiseCallback.bind(this); - } - /** - * Finds an index of a debounce function by it's name. - * - * @param {String} name Name of the debouncer. - * @return {Number} Index of the debouncer. `-1` if not found. - */ - _debounceIndex(name) { - return this._debouncers.findIndex((item) => item.name === name); - } - /** - * Prohibits execution of a task for some `time`. - * - * The task is executed at the end of this time. - * - * ``` - * this.debounce('ajax-call', function() { - * this.makeAjaxCall(); - * }, 2000); - * ``` - * - * @param {String} name Name of the task - * @param {Function} callback A function to call. - * @param {Number} time Number of milliseconds after which the task - * is executed. - */ - debounce(name, callback, time) { - if (!this._debouncers) { - this._debouncers = []; - } - const index = this._debounceIndex(name); - if (index !== -1) { - return; - } - const cancelId = setTimeout(() => { - const index = this._debounceIndex(name); - this._debouncers.splice(index, 1); - callback.call(this); - }, time); - - this._debouncers.push({ - name: name, - id: cancelId - }); - } - /** - * Cancels previously set debounce timer. - * - * @param {String} name Name of the task - */ - cancelDebounce(name) { - const index = this._debounceIndex(name); - if (index === -1) { - return; - } - const debounce = this._debouncers[index]; - clearTimeout(debounce.id); - this._debouncers.splice(index, 1); - } - /** - * Generates ID for the next IPC call with a promise. - * - * @return {Number} ID of the IPC call - */ - nextIpcRequestId() { - return ++this._ipcRequestId; - } - /** - * Appends new Promise object to the list of promises. - * - * @param {Number} id ID of the IPC call - * @return {Promise} Generated Promise object. - */ - appendPromise(id) { - const p = new Promise((resolve, reject) => { - const obj = { - id, - resolve, - reject - }; - this._promises.push(obj); - }); - return p; - } - /** - * Callback function for IPC main event. - * - * @param {String} e - * @param {String} id Id if generated promise. - * @param {Boolean} isError Determines if resolved is error. - * @param {?Array} args Arguments from the main process. - */ - _ipcPromiseCallback(e, id, isError, ...args) { - log.debug('Received IPC response for id', id, ', is error? ', isError, args); - const index = this._promises.findIndex((p) => p.id === id); - if (index === -1) { - log.error('IPC promise for id', id, ' not found'); - throw new Error('Promise not found'); - } - const promise = this._promises[index]; - this._promises.splice(index, 1); - if (isError) { - log.debug('Rejecting IPC promise'); - if (args.length === 1) { - promise.reject(...args); - } else { - promise.reject(args); - } - } else { - log.debug('Resolving IPC promise'); - if (args.length === 1) { - promise.resolve(...args); - } else { - promise.resolve(args); - } - } - } -} -exports.ArcBase = ArcBase; diff --git a/scripts/main/arc-environment.js b/scripts/main/arc-environment.js deleted file mode 100644 index fdbc3daa..00000000 --- a/scripts/main/arc-environment.js +++ /dev/null @@ -1,333 +0,0 @@ -const { ipcMain, app, shell, nativeTheme } = require('electron'); -const { PreferencesManager } = require('../packages/arc-preferences/main'); -const { ArcMainMenu } = require('./main-menu'); -const { AppMenuService } = require('./app-menu-service'); -const { DriveExport } = require('@advanced-rest-client/electron-drive'); -const { SessionManager } = require('@advanced-rest-client/electron-session-state/main'); -const { ContentSearchService } = require('../packages/search-service/main'); -const { ThemeManager } = require('../packages/themes-manager/main/'); -const { ArcWindowsManager } = require('./windows-manager'); -const { UpdateStatus } = require('./update-status'); -const { AppPrompts } = require('./app-prompts'); -const { Oauth2Identity } = require('@advanced-rest-client/electron-oauth2'); -const { ThemesProtocolHandler } = require('./theme-protocol'); -const { EsmProtocolHandler } = require('./esm-protocol'); -const { AssetImport } = require('./asset-import'); -const log = require('./logger'); -const fs = require('fs-extra'); - -class ArcEnvironment { - constructor(params = {}) { - this.initParams = params; - this.isDebug = params.isDebug || false; - this.withDevtools = params.withDevtools || false; - this._initializeConfiguration(params); - this._initializeWindowsManager(params); - this._initializeMenu(); - this._initializeUpdateStatus(); - this._initializeGoogleDriveIntegration(); - this._initializeSessionManager(); - this._initializeApplicationMenu(); - this._initializeAppPrompts(); - this._initializeThemes(); - Oauth2Identity.listen(); - - // Remote commands protocol - if (params.port) { - this._initializeCommunicationProtocol(params.port); - } - - // The most general events - ipcMain.on('open-external-url', this._externalUrlHandler.bind(this)); - } - - async loadEnvironment() { - log.debug('Loading user configuration.'); - const settings = await this.config.load(); - log.debug('User configuration ready.'); - this._postConfig(settings); - } - - registerHandlers() { - log.debug('Initializing themes protocol'); - const tp = new ThemesProtocolHandler(); - tp.register(); - this.themesProtocol = tp; - const mp = new EsmProtocolHandler(); - mp.register(); - this.modulesProtocol = mp; - } - - open(params) { - if (!params || typeof params === 'string') { - this.wm.open(params); - } else { - this.wm.openWithAction(params); - } - } - - _postConfig(config) { - if (config.popupMenuExperimentEnabled) { - log.info('Enabling menu popup experiment.'); - this.menu.enableAppMenuPopup(); - } - if (!this.isDebug) { - this.us.start(config, this.initParams.skipAppUpdate); - } - } - - _initializeConfiguration(params) { - this.config = new PreferencesManager(params); - this.config.on('settings-changed', (name, value) => { - this.wm.notifyAll('app-preference-updated', [name, value]); - this._settingsChanged(name, value); - }); - this.config.observe(); - } - - _initializeCommunicationProtocol(port) { - if (isNaN(port)) { - log.warn('The port ' + port + ' is not a number. Skipping.'); - return; - } - port = Number(port); - const { CommunicationProtocol } = require('../packages/communication-protocol/main'); - this.comm = new CommunicationProtocol(port); - this.comm.start(); - } - - _initializeMenu() { - log.debug('Initializing application menu (system menu).'); - this.menu = new ArcMainMenu(); - this.menu.build(); - log.debug('Listening for system menu events.'); - this.menu.on('menu-action', (action, win) => { - ContentSearchService.searchRequested(action, win); - this.us.menuActionHandler(action, win); - this._menuHandler(action, win); - }); - this.menu.loadWorkspaceHistory(); - this.menu.on('open-workspace', (filePath) => this.openWorkspace(filePath)); - } - - _initializeApplicationMenu() { - log.debug('Initializing app menu service (popup listener).'); - const instance = new AppMenuService(this); - instance.listen(); - this.appMenuService = instance; - } - - _initializeGoogleDriveIntegration() { - log.debug('Initializing Google Drive integration.'); - this.gdrive = new DriveExport(DriveExport.arcDefaults); - this.gdrive.listen(); - } - - _initializeSessionManager() { - log.debug('Initializing session manager.'); - this.sm = new SessionManager({ appUrls: [ - 'https://advancedrestclient-1155.appspot.com', - 'advancedrestclient.com' - ] }); - this.sm.listen(); - this.sm.on('cookie-changed', (cookies) => - this.wm.notifyAll('cookie-changed', [cookies])); - } - - _initializeWindowsManager(params) { - log.debug('Initializing windows manager.'); - this.wm = new ArcWindowsManager(params); - this.wm.listen(); - } - - _initializeUpdateStatus() { - log.info('Initializing update manager.'); - this.us = new UpdateStatus(); - this.us.listen(); - this.us.on('status-changed', (type) => { - this.menu.updateStatusChnaged(type); - }); - this.us.on('notify-windows', (type, arg) => { - this.wm.notifyAll(type, arg); - }); - } - - _initializeAppPrompts() { - this.prompts = new AppPrompts(); - this.prompts.listen(); - } - - _initializeThemes() { - this.themes = new ThemeManager(this, this.initParams.skipThemesUpdate); - this.themes.listen(); - nativeTheme.on('updated', this._osThemeUpdated.bind(this)); - } - - _osThemeUpdated() { - this.wm.notifyAll('system-theme-changed', nativeTheme.shouldUseDarkColors); - } - - /** - * Handler for settings change. - * @param {String} name Changed property name - * @param {any} value Changed value - */ - _settingsChanged(name, value) { - switch (name) { - case 'popupMenuExperimentEnabled': - if (this.menu) { - if (value) { - this.menu.enableAppMenuPopup(); - } else { - this.menu.disableAppMenuPopup(); - } - } - break; - case 'releaseChannel': - this.us.updateReleaseChannel(value); - break; - } - } - - /** - * Event handler for menu actions. - * - * @param {String} action Action type to perform - * @param {BrowserWindow} win - */ - _menuHandler(action, win) { - log.debug('Handing menu command: ' + action); - if (action.indexOf('application') === 0) { - this._handleApplicationAction(action.substr(12), win); - return; - } - if (action.indexOf('request') === 0) { - win.webContents.send('request-action', action.substr(8)); - return; - } - log.warn('Menu command not handled: ' + action); - } - /** - * Handles `application` group of commands - * - * @param {String} action Application action. - * @param {BrowserWindow} win Target window. - */ - _handleApplicationAction(action, win) { - const windowCommand = 'command'; - switch (action) { - case 'quit': - log.debug('Quiting the app.'); - app.quit(); - break; - case 'new-window': - log.debug('Opening new window.'); - this.wm.open(); - break; - case 'task-manager': - log.debug('Opening task manager.'); - this.wm.openTaskManager(); - break; - case 'open-file': - AssetImport.openAssetDialog(win); - break; - case 'open-privacy-policy': - case 'open-documentation': - case 'open-faq': - case 'open-discussions': - case 'report-issue': - case 'search-issues': - case 'web-session-help': - { - log.debug('Running help action.'); - const { HelpManager } = require('./help-manager'); - HelpManager.helpWith(action); - } - break; - case 'popup-menu': - log.debug('Toggling popup menu.'); - this.appMenuService.togglePopupMenu(); - break; - case 'import-workspace': - this._importWorkspaceHandler(win); - break; - case 'clear-workspace-history': - this.clearWorkspaceHistory(); - break; - default: - log.debug('Sending action to the UI thred.', action); - win.webContents.send(windowCommand, action); - } - } - - /** - * Handles opening an URL in a browser action. - * @param {Event} e - * @param {String} url The URL to open. - */ - _externalUrlHandler(e, url) { - if (!url) { - return; - } - log.debug('Opening external URL: ' + url); - shell.openExternal(url); - } - - allClosedHandler() { - log.debug('All windows are now closed.'); - if (process.platform !== 'darwin') { - log.debug('Quiting main thread.'); - app.quit(); - } else { - log.debug('Keeping main thread running.'); - } - } - - /** - * On OS X it's common to re-create a window in the app when the - * dock icon is clicked and there are no other windows open. - */ - async activateHandler() { - log.debug('Activating window.'); - if (!this.wm.hasWindow) { - await this.wm.open(); - } else { - this.wm.restoreLast(); - } - } - /** - * An application menu handler for open workspace from file. - * @param {BrowserWindow} win Window from where the request came from - * @return {Promise} - */ - async _importWorkspaceHandler(win) { - const path = await AssetImport.openWorkspaceFile(win); - if (path) { - log.info('Opening workspace file in a new window.'); - await this.wm.openWorkspace(path); - await this.menu.appendWorkspaceHistory(path); - } - } - /** - * Clears workspace history list in the workspace menu. - * - * @return {Promise} - */ - async clearWorkspaceHistory() { - await this.menu.clearWorkspaceHistory(); - } - /** - * Opens workspace from file - * @param {String} filePath Workspace file location. - * @return {Promise} - */ - async openWorkspace(filePath) { - const exists = await fs.exists(filePath); - if (!exists) { - AppPrompts.workspaceMissing(filePath); - } else { - await this.wm.openWorkspace(filePath); - }; - } -} -module.exports.ArcEnvironment = ArcEnvironment; diff --git a/scripts/main/arc-paths.js b/scripts/main/arc-paths.js deleted file mode 100644 index ed9fb410..00000000 --- a/scripts/main/arc-paths.js +++ /dev/null @@ -1,149 +0,0 @@ -const { app } = require('electron'); -const path = require('path'); -const fs = require('fs-extra'); -const log = require('./logger'); - -class ArcPaths { - /** - * Resolves file path to correct path if it's starts with `~`. - * - * @param {String} file Settings file path - * @return {String} Path to the file. - */ - _resolvePath(file) { - if (file[0] === '~') { - file = app.getPath('home') + file.substr(1); - } - return file; - } - - get settingsFile() { - return this._settingsFile; - } - - setSettingsFile(file) { - if (file) { - file = this._resolvePath(file); - const dir = path.dirname(file); - try { - fs.ensureDirSync(dir); - this._settingsFile = file; - } catch (_) { - log.error(`Insufficient permission to settings file folder "${dir}".`); - } - } - if (!this._settingsFile) { - this._settingsFile = path.join(process.env.ARC_HOME, 'settings.json'); - } - process.env.ARC_SETTINGS_FILE = this._settingsFile; - log.debug('ARC settings is set to: ' + process.env.ARC_SETTINGS_FILE); - } - - getAppDirectory() { - switch (process.platform) { - case 'darwin': - return process.execPath.substring(0, process.execPath.indexOf('.app') + 4); - case 'linux': - case 'win32': - return path.join(process.execPath, '..'); - } - } - - hasWriteAccess(dir) { - const testFilePath = path.join(dir, 'write.test'); - try { - fs.writeFileSync(testFilePath, new Date().toISOString(), { flag: 'w+' }); - fs.unlinkSync(testFilePath); - return true; - } catch (err) { - return false; - } - } - - setHome() { - const portableHomePath = path.join(this.getAppDirectory(), '..', '.arc'); - if (fs.pathExistsSync(portableHomePath)) { - if (this.hasWriteAccess(portableHomePath)) { - process.env.ARC_HOME = portableHomePath; - } else { - log.error(`Insufficient permission to portable ARC home "${portableHomePath}".`); - } - } - if (!process.env.ARC_HOME) { - process.env.ARC_HOME = app.getPath('userData'); - } - log.debug('ARC home is set to: ' + process.env.ARC_HOME); - } - - get themesBasePath() { - return this._themesBasePath; - } - - get themesSettings() { - return this._themesSettings; - } - - setThemesPath(themesPath, themesSettingsFile) { - if (themesPath) { - themesPath = this._resolvePath(themesPath); - try { - fs.ensureDirSync(themesPath); - this._themesBasePath = themesPath; - } catch (_) { - log.error(`Insufficient permission to themes installation location "${themesPath}".`); - } - } - if (!this._themesBasePath) { - this._themesBasePath = path.join(process.env.ARC_HOME, 'themes-esm'); - } - if (!themesSettingsFile) { - themesSettingsFile = 'themes-info.json'; - } - this._themesSettings = path.join(this._themesBasePath, themesSettingsFile); - process.env.ARC_THEMES = this._themesBasePath; - process.env.ARC_THEMES_SETTINGS = this._themesSettings; - log.debug('ARC themes path is set to: ' + process.env.ARC_THEMES); - log.debug('ARC themes DB is set to: ' + process.env.ARC_THEMES_SETTINGS); - } - - get workspacePath() { - return this._workspacePath; - } - - setWorkspacePath(workspacePath) { - if (workspacePath) { - workspacePath = this._resolvePath(workspacePath); - try { - this._workspacePath = workspacePath; - } catch (_) { - log.error(`Insufficient permission to themes installation location "${workspacePath}".`); - } - } - if (!this._workspacePath) { - this._workspacePath = path.join(process.env.ARC_HOME, 'workspace'); - } - process.env.ARC_WORKSPACE_PATH = this._workspacePath; - log.debug('ARC workspace path is set to: ' + process.env.ARC_WORKSPACE_PATH); - } -} - -const paths = new ArcPaths(); - -module.exports = { - setSettingsFile: (file) => paths.setSettingsFile(file), - setThemesPath: (themesPath, themesSettingsFil) => paths.setThemesPath(themesPath, themesSettingsFil), - setHome: () => paths.setHome(), - setWorkspacePath: (workspacePath) => paths.setWorkspacePath(workspacePath), - get workspacePath() { - return paths.workspacePath; - }, - get themesSettings() { - return paths.themesSettings; - }, - get themesBasePath() { - return paths.themesBasePath; - }, - get settingsFile() { - return paths.settingsFile; - } -}; diff --git a/scripts/main/arc-session-recorder.js b/scripts/main/arc-session-recorder.js deleted file mode 100644 index 4959c579..00000000 --- a/scripts/main/arc-session-recorder.js +++ /dev/null @@ -1,50 +0,0 @@ -const { ArcMeta } = require('../packages/arc-preferences/main'); -const _fetch = require('node-fetch'); -const log = require('./logger'); -/** - * Session recorder. - * - * @deprecated - * This class is useless. No one reads the data. There's no enough - * will to do something useful for the app or users with it. - * The ARC analytics service will be closed eventually. - */ -class ArcSessionRecorder { - /** - * @constructor - */ - constructor() { - this.meta = new ArcMeta(); - this.endpoint = 'https://api.advancedrestclient.com/v1/analytics/record'; - } - /** - * Pings the server to record the session. - * @return {Promise} - */ - async record() { - try { - const id = await this.meta.getAninimizedId(); - await this._postSession(id); - } catch (cause) { - log.error('Unable to record the session', cause.message); - } - } - /** - * Posts session data to the analytics server. - * - * @param {String} aid Anonymous app id. - * @return {Promise} - */ - async _postSession(aid) { - const d = new Date(); - const data = { - aid, - tz: d.getTimezoneOffset() - }; - return await _fetch(this.endpoint, { - method: 'POST', - body: JSON.stringify(data) - }); - } -} -exports.ArcSessionRecorder = ArcSessionRecorder; diff --git a/scripts/main/asset-import.js b/scripts/main/asset-import.js deleted file mode 100644 index 16b935b7..00000000 --- a/scripts/main/asset-import.js +++ /dev/null @@ -1,46 +0,0 @@ -const { dialog } = require('electron'); -const log = require('./logger'); - -class AssetImport { - /** - * Opens a dialog to open a file and notifies the window about new content. - * - * @param {BrowserWindow} bWindow - */ - static openAssetDialog(bWindow) { - log.debug('Opening file import dialog.'); - dialog.showOpenDialog(bWindow, { - title: 'Select file to import', - buttonLabel: 'Import', - properties: ['openFile'], - filters: [ - { name: 'All supported files', extensions: ['arc', 'json', 'raml', 'yaml', 'zip'] } - ] - }, (filePaths) => { - if (!filePaths || !filePaths[0]) { - log.debug('Import dialog was canceled.'); - return; - } - log.debug('Sending file path to open in UI thread: ' + filePaths[0]); - bWindow.webContents.send('command', 'process-external-file', filePaths[0]); - }); - } - - static openWorkspaceFile(bWindow) { - log.debug('Opening workspace import dialog.'); - return new Promise((resolve) => { - dialog.showOpenDialog(bWindow, { - title: 'Select workspace file to open', - buttonLabel: 'Open', - properties: ['openFile'], - filters: [ - { name: 'All supported files', extensions: ['arc', 'json'] } - ] - }, (filePaths) => { - const loc = filePaths && filePaths[0]; - resolve(loc); - }); - }); - } -} -module.exports.AssetImport = AssetImport; diff --git a/scripts/main/esm-protocol.js b/scripts/main/esm-protocol.js deleted file mode 100644 index 2a95d331..00000000 --- a/scripts/main/esm-protocol.js +++ /dev/null @@ -1,83 +0,0 @@ -const { session, protocol } = require('electron'); -const path = require('path'); -const fs = require('fs'); -const log = require('./logger'); -const mime = require('mime-types'); -/** - * A class responsible for handling `web-module:` protocol. - * - * Components protocol is used to load ES modules with correct mime types. - * - * Example usage in the renderer process: - * - * ``` - * - * ``` - * - * This checks for existing component in following order: - * - ./bower_components/{url} (application main components) - * - {applicationUserDataDir}/{url} (application modules installation root) - * - {url} (filesyste) - * - * If the component does not exists then it throws an error. - */ -class EsmProtocolHandler { - constructor() { - this._requestHandler = this._requestHandler.bind(this); - /** - * Base path to the themes folder. - * @type {String} - */ - this.basePath = path.join(__dirname, '..', '..'); - } - - /** - * Registers the protocol handler. - * This must be called after the `ready` event. - */ - register() { - log.debug('Registering components protocol'); - session.fromPartition('persist:arc-window') - .protocol - .registerBufferProtocol('web-module', this._requestHandler); - session.fromPartition('persist:arc-task-manager') - .protocol - .registerBufferProtocol('web-module', this._requestHandler); - protocol - .registerBufferProtocol('web-module', this._requestHandler); - } - - _requestHandler(request, respond) { - const url = new URL(request.url); - let location = this._findFile(url.pathname); - location = decodeURI(location); - log.debug(`Loading: ${location}`); - fs.readFile(location, (error, data) => { - if (error) { - log.error(error); - // The file or directory cannot be found. - // NET_ERROR(FILE_NOT_FOUND, -6) - respond(-6); - } else { - const mimeType = mime.lookup(location) || 'application/octet-stream'; - respond({ - mimeType, - data - }); - } - }); - } - - _findFile(filepath) { - const prefixes = ['src', 'web_modules', 'node_modules']; - for (let i = 0, len = prefixes.length; i { - this[item](); - }); - } catch (cause) { - this._menuLoaded = false; - const message = 'Menu template file was not found.'; - log.error(message); - log.error(cause); - } - } - /** - * Called when update status has changed from auto updated. - * @param {Object} status Data associated with the event. - * First item in the array is event type. Resto of items are avent arguments. - */ - updateStatusChnaged(status) { - if (!this._menuLoaded) { - return; - } - const name = this._platformToName(process.platform); - this['_' + name + 'UpdateStatusChnaged'](status); - } - /** - * Handles Darwin update status change. - * @param {Object} status Data associated with the event. - * First item in the array is event type. Resto of items are avent arguments. - */ - _darwinUpdateStatusChnaged(status) { - const items = this.topMenu.items[0].submenu; - switch (status) { - case 'checking-for-update': - items.items[2].visible = false; - items.items[3].visible = false; - items.items[4].visible = true; - items.items[5].visible = false; - break; - case 'download-progress': - items.items[2].visible = false; - items.items[3].visible = false; - items.items[4].visible = false; - items.items[5].visible = true; - break; - case 'not-available': - items.items[2].visible = false; - items.items[3].visible = true; - items.items[4].visible = false; - items.items[5].visible = false; - break; - case 'update-downloaded': - items.items[2].visible = true; - items.items[3].visible = false; - items.items[4].visible = false; - items.items[5].visible = false; - break; - } - } - /** - * Handles Windows update status change. - * @param {Object} status Data associated with the event. - * First item in the array is event type. Resto of items are avent arguments. - */ - _winUpdateStatusChnaged(status) { - const items = this.topMenu.items[6].submenu; - switch (status) { - case 'checking-for-update': - items.items[1].visible = false; - items.items[2].visible = false; - items.items[3].visible = true; - items.items[4].visible = false; - break; - case 'download-progress': - items.items[1].visible = false; - items.items[2].visible = false; - items.items[3].visible = false; - items.items[4].visible = true; - break; - case 'not-available': - items.items[1].visible = false; - items.items[2].visible = true; - items.items[3].visible = false; - items.items[4].visible = false; - break; - case 'update-downloaded': - items.items[1].visible = true; - items.items[2].visible = false; - items.items[3].visible = false; - items.items[4].visible = false; - break; - } - } - /** - * Handles Linux update status change. - * @param {Object} status Data associated with the event. - * First item in the array is event type. Resto of items are avent arguments. - */ - _linuxUpdateStatusChnaged(status) { - const items = this.topMenu.items[6].submenu; - switch (status) { - case 'checking-for-update': - items.items[3].visible = false; - items.items[4].visible = false; - items.items[5].visible = true; - items.items[6].visible = false; - break; - case 'download-progress': - items.items[3].visible = false; - items.items[4].visible = false; - items.items[5].visible = false; - items.items[6].visible = true; - break; - case 'not-available': - items.items[3].visible = false; - items.items[4].visible = true; - items.items[5].visible = false; - items.items[6].visible = false; - break; - case 'update-downloaded': - items.items[3].visible = true; - items.items[4].visible = false; - items.items[5].visible = false; - items.items[6].visible = false; - break; - } - } - /** - * Handler for the menu item click event. Emmits `menu-action`. - * - * @param {String} command Command associated with the menu. - * @param {Object} menuItem Clicked menu item. - * @param {BrowserWindow} browserWindow Target window. - */ - _itemAction(command, menuItem, browserWindow) { - log.info('Main menu action detected: ' + command); - this.emit('menu-action', command, browserWindow); - } - /** - * Creates a menu definition from ARC's internal template. - * @param {[type]} template [description] - */ - _createFromTemplate(template) { - log.info('Creating menu instance'); - this._createMainMenu(template.menu); - // TODO: Context menus. - } - /** - * Creates application menu. - * @param {Array} template Menu template model. - */ - _createMainMenu(template) { - template.forEach((data) => { - const item = this._createMenuItem(data); - this.topMenu.append(item); - }); - } - /** - * Creates a menu item from menu definition model. - * @param {Object} options Menu item model. - * @return {MenuItem} Created menu item. - */ - _createMenuItem(options) { - if (options.command) { - options.click = this._itemAction.bind(this, options.command); - delete options.command; - } - if (options.submenu) { - options.submenu = this._createSubMenu(options.submenu); - } - if (options.label === 'VERSION') { - options.label = 'Version: ' + app.getVersion(); - } - return new MenuItem(options); - } - /** - * Creates a sub mennu for menu item. - * @param {Array} submenu Menu data model - * @return {Menu} Menu item to be appended to another menu item. - */ - _createSubMenu(submenu) { - const menu = new Menu(); - submenu.forEach((item) => menu.append(this._createMenuItem(item))); - return menu; - } - /** - * Gets menu template depending on the platform. - * @return {Promise} Promise resolved to JS object of menu template - * definition. - */ - async _getTemplate() { - const name = this._platformToName(process.platform) + '.json'; - const file = path.join(__dirname, '..', '..', 'menus', name); - log.info('Menu template location', file); - return await fs.readJson(file); - } - /** - * Returns common names for the platform. - * @return {String} Either `darwin`, `win` or `linux` - */ - _platformToName() { - switch (process.platform) { - case 'darwin': return process.platform; - case 'win32': return 'win'; - default: return 'linux'; - } - } - /** - * @return {Array} List of menu items representing (in order) - * separator and popup menu item. - */ - getPopupMenuItem() { - let i; - let j; - switch (process.platform) { - case 'darwin': - i = 4; - j = 5; - break; - case 'win32': - i = 3; - j = 4; - break; - default: - i = 3; - j = 4; - } - const menu = this.topMenu.items[i]; - if (!menu) { - return; - } - const items = menu.submenu.items; - return [items[j], items[j + 1]]; - } - - enableAppMenuPopup() { - const items = this.getPopupMenuItem(); - if (!items) { - if (!this.pendingActions) { - this.pendingActions = []; - } - this.pendingActions.push('enableAppMenuPopup'); - return; - } - items[0].visible = true; - items[1].visible = true; - } - - disableAppMenuPopup() { - const items = this.getPopupMenuItem(); - if (!items) { - if (!this.pendingActions) { - this.pendingActions = []; - } - this.pendingActions.push('disableAppMenuPopup'); - return; - } - items[0].visible = false; - items[1].visible = false; - } - /** - * Appends an item to the list of workspace history items. - * @param {String} filePath Location of the workspace file. - * @return {Promise} - */ - async appendWorkspaceHistory(filePath) { - await this.history.addEntry(filePath) - await this._appendHistoryEntry(filePath); - } - /** - * Clears list of workspace history. - * Persists the state in the settings file. - * @return {Promise} - */ - async clearWorkspaceHistory() { - await this.history.clearHistory(); - await this._clearWorkspaceHistory(); - } - /** - * Loads workspace history list and creates menu entries. - * @return {Promise} - */ - async loadWorkspaceHistory() { - const entries = await this.history.loadEntries(); - if (!entries) { - return; - } - return await this._createWorkspaceHistory(entries); - } - /** - * Iterates over the argument and creates menu entries from it. - * @param {Array} entries List of history entries. - */ - _createWorkspaceHistory(entries) { - for (let i = 0, len = entries.length; i < len; i++) { - const filePath = entries[i].file; - // Untrusted source - if (typeof filePath !== 'string') { - continue; - } - this._appendHistoryEntry(filePath); - } - } - /** - * @return {Menu} A reference to workspace history submenu. - */ - getWorkspaceHistoryMenu() { - // linux: 5, win: 5, osx: 6 - const index = process.platform === 'darwin' ? 6 : 5; - const workspaceMenu = this.topMenu.items[index]; - const historyMenu = workspaceMenu.submenu.items[3]; - return historyMenu.submenu; - } - /** - * Appends history entry item to the history menu. - * @param {String} filePath A path to the workspace file. - */ - _appendHistoryEntry(filePath) { - const menu = this.getWorkspaceHistoryMenu(); - const items = menu.items; - if (items[2].visible) { - items[2].visible = false; - } - const options = { - label: filePath, - after: 'no-history-entry', - click: this._workspaceHistoryAction - }; - const item = new MenuItem(options); - menu.append(item); - } - /** - * A handler for menu item click action. - * @param {MenuItem} menuItem Instance of the menu item - */ - _workspaceHistoryAction(menuItem) { - this.emit('open-workspace', menuItem.label); - this.history.addEntry(menuItem.label); - } - /** - * Removes all workspace history entries from the menu. - */ - _clearWorkspaceHistory() { - const menu = this.getWorkspaceHistoryMenu(); - const items = Array.from(menu.items); - menu.clear(); - if (!items[2].visible) { - items[2].visible = true; - } - for (let i = 0; i < 3; i++) { - menu.append(items[i]); - } - } -} -exports.ArcMainMenu = ArcMainMenu; diff --git a/scripts/main/models/theme-info.js b/scripts/main/models/theme-info.js deleted file mode 100644 index ac7f2fe2..00000000 --- a/scripts/main/models/theme-info.js +++ /dev/null @@ -1,18 +0,0 @@ -const { ArcPreferences } = require('../../packages/arc-preferences'); -/** - * A preferences class to store and read theme info file. - */ -class ThemeInfo extends ArcPreferences { - constructor() { - super({ - file: process.env.ARC_THEMES_SETTINGS - }); - } - - async defaultSettings() { - return { - themes: [] - }; - } -} -module.exports.ThemeInfo = ThemeInfo; diff --git a/scripts/main/start.js b/scripts/main/start.js deleted file mode 100644 index 7d8d610a..00000000 --- a/scripts/main/start.js +++ /dev/null @@ -1,154 +0,0 @@ -const { app, protocol } = require('electron'); -const arcPaths = require('./arc-paths'); -const { AppOptions } = require('./app-options'); -const log = require('./logger'); -const { ArcEnvironment } = require('./arc-environment'); -const { PreferencesManager } = require('../packages/arc-preferences/main'); -const { AppDefaults } = require('./app-defaults'); -// const temp = require('temp').track(); - -function getConfig(settingsFile) { - const config = new PreferencesManager({ - file: settingsFile - }); - return config.loadSync(); -} - -app.allowRendererProcessReuse = true; - -module.exports = function(startTime) { - global.shellStartTime = startTime; - - process.on('uncaughtException', function(error = {}) { - if (error.message) { - log.error(error.message); - } - if (error.stack) { - log.error(error.stack); - } - }); - - process.on('unhandledRejection', function(error = {}) { - if (error.message) { - log.error(error.message); - } - - if (error.stack) { - log.error(error.stack); - } - }); - - app.commandLine.appendSwitch('enable-experimental-web-platform-features'); - - const startupOptions = new AppOptions(); - startupOptions.parse(); - if (startupOptions.debug) { - log.level = startupOptions.debugLevel || 'warn'; - } - const initOptions = startupOptions.getOptions(); - if (!initOptions.open) { - initOptions.open = []; - } - - if (initOptions.userDataDir) { - app.setPath('userData', initOptions.userDataDir); - } - // } else if (initOptions.test) { - // app.setPath('userData', temp.mkdirSync('arc-test-data')); - // } - - // Standard scheme must be registered before the app is ready - protocol.registerSchemesAsPrivileged([ - { scheme: 'web-module', privileges: { standard: true, secure: true } }, - { scheme: 'themes', privileges: { standard: true, secure: true } } - ]); - - log.debug('Setting up the environment'); - arcPaths.setHome(); - arcPaths.setSettingsFile(initOptions.settingsFile); - arcPaths.setWorkspacePath(initOptions.workspacePath); - arcPaths.setThemesPath(initOptions.themesPath); - - // Overrides initial user path to processed by arcPaths - initOptions.workspacePath = arcPaths.workspacePath; - initOptions.settingsFile = arcPaths.settingsFile; - initOptions.themesPath = arcPaths.themesBasePath; - initOptions.componentsPath = arcPaths.componentsPath; - - const currentConfig = getConfig(arcPaths.settingsFile); - const colorProfile = currentConfig.colorProfile; - if (colorProfile && colorProfile !== 'default') { - app.commandLine.appendSwitch('force-color-profile', colorProfile); - } - - // This prevents Win10 from showing dupe items in the taskbar - app.setAppUserModelId('com.squirrel.arc.' + process.arch); - - function addUrlToOpen(event, url) { - event.preventDefault(); - log.debug('Received URL to open: ' + url); - const fileData = url.substr(11); - const parts = fileData.split('/'); - switch (parts[0]) { - case 'drive': - // arc-file://drive/open/file-id - // arc-file://drive/create/file-id - initOptions.open.push('/request/drive/' + parts[1] + '/' + parts[2]); - break; - } - } - const protocolResult = app.setAsDefaultProtocolClient('arc-file'); - if (protocolResult) { - log.debug('Registered arc-file protocol'); - } else { - log.warn('Unable to register arc-file protocol'); - } - app.on('open-url', addUrlToOpen); - app.once('ready', function() { - global.appReadyTime = Date.now(); - log.debug('Electron ready time: ' + (global.appReadyTime - global.shellStartTime) + 'ms'); - app.removeListener('open-url', addUrlToOpen); - const defaults = new AppDefaults(); - defaults.prepareEnvironment() - .then(() => { - global.arc = new ArcEnvironment(initOptions, initOptions.open); - global.arc.registerHandlers(); - return global.arc.loadEnvironment(); - }) - .then(() => { - global.appLoadingTime = Date.now(); - log.debug('App init time: ' + (global.appLoadingTime - global.appReadyTime)); - global.arc.open(initOptions.openProtocolFile); - }); - }); - - app.on('window-all-closed', () => { - if (!global.arc) { - return; - } - global.arc.allClosedHandler(); - }); - - app.on('activate', () => { - if (!global.arc) { - return; - } - global.arc.activateHandler(); - }); - - // Unit testing - if (process.env.NODE_ENV === 'test' || initOptions.test) { - app.testsInterface = function(action, ...args) { - switch (action) { - case 'get-application-settings-file-location': - return global.arc.wm.startupOptions.settingsFile; - case 'get-application-workspace-state-file-location': - return global.arc.wm.startupOptions.workspacePath; - case 'get-preferences-settings-location': - return global.arc.prefs.settingsFile; - case 'get-global-app': - return global.arc; - } - }; - } -}; diff --git a/scripts/main/test-interface.js b/scripts/main/test-interface.js deleted file mode 100644 index 30f40375..00000000 --- a/scripts/main/test-interface.js +++ /dev/null @@ -1,18 +0,0 @@ -const { RemoteApi } = require('../packages/communication-protocol/main/remote-api'); -const remote = new RemoteApi(); -module.exports = function(app, arcApp) { - app.testsInterface = function(action, ...args) { - switch (action) { - case 'get-application-settings-file-location': - return arcApp.wm.startupOptions.settingsFile; - case 'get-application-workspace-state-file-location': - return arcApp.wm.startupOptions.workspacePath; - case 'get-preferences-settings-location': - return arcApp.prefs.settingsFile; - case 'update-request-object': - return remote.updateRequest(args[0], args[1]); - case 'create-new-tab': - return remote.newTab(); - } - }; -}; diff --git a/scripts/main/theme-protocol.js b/scripts/main/theme-protocol.js deleted file mode 100644 index b32a43f9..00000000 --- a/scripts/main/theme-protocol.js +++ /dev/null @@ -1,130 +0,0 @@ -const { session } = require('electron'); -const path = require('path'); -const log = require('./logger'); -const fs = require('fs-extra'); -/** - * A class responsible for handling `themes:` protocol. - * - * Theme protocol is used to load theme file from themes installation location - * by using only theme id. - * - * Example usage in the renderer process: - * - * ``` - * - * ``` - * - * This will load ARC's default theme. - * - * If the location represents a path then then file will be loaded from this - * location. - * - * ``` - * - * ``` - */ -class ThemesProtocolHandler { - constructor() { - this._requestHandler = this._requestHandler.bind(this); - } - /** - * Registers the protocol handler. - * This must be called after the `ready` event. - */ - register() { - log.debug('Registering themes protocol'); - session.fromPartition('persist:arc-window') - .protocol - .registerStringProtocol('themes', this._requestHandler); - session.fromPartition('persist:arc-task-manager') - .protocol - .registerStringProtocol('themes', this._requestHandler); - } - - _requestHandler(request, callback) { - let url = request.url.substr(9); - log.silly('ThemesProtocolHandler::_requestHandler::' + url); - try { - fs.accessSync(url, fs.constants.R_OK | fs.constants.X_OK); - return this._loadFileTheme(url, callback); - } catch (_) { - // .. - } - if (url === 'dd1b715f-af00-4ee8-8b0c-2a262b3cf0c8') { - url = 'advanced-rest-client/arc-electron-default-theme'; - } - return this._loadInstalledTheme(url, callback); - } - - async _loadInstalledTheme(location, callback) { - log.info(`loading theme ${location}`); - try { - const config = await this._loadThemeInfo(); - const { themes } = config; - log.debug('Got themes list'); - if (location.indexOf('advanced-rest-client/') === 0) { - location = '@' + location; - } - const theme = this._findThemeInfo(location, themes); - if (!theme) { - log.error('Theme info not found'); - callback(-6); - return; - } - const file = path.join(process.env.ARC_THEMES, theme.mainFile); - log.silly('Theme found. Reading theme file: ' + file); - const data = await fs.readFile(file, 'utf8'); - if (data) { - log.silly('Sending theme file to renderer.'); - callback({ - data, - mimeType: 'text/css', - charset: 'utf8' - }); - } else { - log.error('Theme file is empty'); - callback(-6); - } - } catch (e) { - log.error('Unable to load theme'); - log.error(e.message); - callback(-6); - } - } - - _loadFileTheme(location, callback) { - log.silly('ThemesProtocolHandler::loading theme from ' + location); - return fs.readFile(location, 'utf8') - .then((data) => { - callback({ - data, - mimeType: 'text/css', - charset: 'utf8' - }); - }) - .catch((cause) => { - log.error('Unable to load theme'); - log.error(cause); - callback(-6); - return; - }); - } - - async _loadThemeInfo() { - try { - return await fs.readJson(process.env.ARC_THEMES_SETTINGS); - } catch (_) { - log.warn('Theme file not found', process.env.ARC_THEMES_SETTINGS); - return {}; - } - } - - _findThemeInfo(id, themes) { - if (!themes || !themes.length) { - return; - } - return themes.find((item) => item._id === id || item.name === id); - } -} - -module.exports.ThemesProtocolHandler = ThemesProtocolHandler; diff --git a/scripts/main/update-status.js b/scripts/main/update-status.js deleted file mode 100644 index 9e751446..00000000 --- a/scripts/main/update-status.js +++ /dev/null @@ -1,290 +0,0 @@ -const { ArcBase } = require('./arc-base'); -const { autoUpdater } = require('electron-updater'); -const { dialog, nativeImage, ipcMain } = require('electron'); -const log = require('./logger'); -const path = require('path'); - -/** - * A module to check for updates. - * - * UpdateInfo model: - * - version {String} - The version. - * - files {Array} - * - releaseName {String} - The release name. - * - releaseNotes {String} - The release notes. - * - releaseDate {String} - The release date. - * - stagingPercentage {Number} - The staged rollout percentage, 0-100. - */ -class UpdateStatus extends ArcBase { - /** - * @constructor - * - * @param {ArcEnvironment} app - */ - constructor() { - super(); - this.state = 0; - this.lastInfoObject = undefined; - this._ensureScope(); - this._addListeners(); - } - /** - * Listens for event related to auto-update. - */ - listen() { - ipcMain.on('check-for-update', this._checkUpdateHandler.bind(this)); - ipcMain.on('install-update', this.installUpdate); - } - /** - * Handler for `check-for-update` event dispatech by the rendere. - * Calls `check()` with option to not notify the user about the update - */ - _checkUpdateHandler() { - this.check({ - notify: false - }); - } - /** - * Event handler for menu actions. - * - * @param {String} action Menu action - */ - menuActionHandler(action) { - if (action.indexOf('application') === -1) { - return; - } - switch (action) { - case 'application:install-update': - this.installUpdate(); - break; - case 'application:check-for-update': - this.check({ - notify: true - }); - break; - } - } - /** - * Checks if `channel` is a valid channel signature. - * @param {String} channel - * @return {Boolean} - */ - isValidChannel(channel) { - return ['beta', 'alpha', 'latest'].indexOf(channel) !== -1; - } - /** - * Checks for app update. - * This function **must** be called after the app ready event. - * - * @param {Object} settings Current application configuration. - * @param {Boolean} skipAppUpdate When set it skips application update check - */ - start(settings, skipAppUpdate) { - log.info('Initializing Auto Updater.'); - if (settings.releaseChannel) { - if (this.isValidChannel(settings.releaseChannel)) { - log.info('Setting auto updater channel to ' + settings.releaseChannel); - autoUpdater.channel = settings.releaseChannel; - } - } - if (settings.autoUpdate === false) { - log.debug('Auto Updater is disabled. Manual requests will still download the update.'); - autoUpdater.autoDownload = false; - return; - } - if (!skipAppUpdate) { - setTimeout(() => this.check(), 5000); - } - } - /** - * Sets the channel value on auto updater - * @param {String} channel Channel name - */ - updateReleaseChannel(channel) { - if (this.isValidChannel(channel)) { - log.debug('Setting release channel to' + channel); - autoUpdater.channel = channel; - } else { - log.warn('Channel ' + channel + ' is not valid application release channel.'); - } - } - /** - * Creates scoped event handlers for all events used in this class. - */ - _ensureScope() { - this._checkingHandler = this._checkingHandler.bind(this); - this._updateAvailableHandler = this._updateAvailableHandler.bind(this); - this._updateNotAvailableHandler = - this._updateNotAvailableHandler.bind(this); - this._updateErrorHandler = this._updateErrorHandler.bind(this); - this._downloadProgressHandler = this._downloadProgressHandler.bind(this); - this._downloadReadyHandler = this._downloadReadyHandler.bind(this); - this.installUpdate = this.installUpdate.bind(this); - this.check = this.check.bind(this); - } - /** - * Adds auto-update library event listeners. - */ - _addListeners() { - // Auto updater - autoUpdater.on('checking-for-update', this._checkingHandler); - autoUpdater.on('update-available', this._updateAvailableHandler); - autoUpdater.on('update-not-available', this._updateNotAvailableHandler); - autoUpdater.on('error', this._updateErrorHandler); - autoUpdater.on('download-progress', this._downloadProgressHandler); - autoUpdater.on('update-downloaded', this._downloadReadyHandler); - } - /** - * Checks for update. - * - * @param {?Object} opts Options for checking for an update. - */ - check(opts) { - opts = opts || {}; - this.lastOptions = opts; - log.info('Checking for application update.'); - autoUpdater.checkForUpdates(); - } - /** - * Emitted when checking if an update has started. - */ - _checkingHandler() { - this.state = 1; - this.lastInfoObject = undefined; - this.emit('notify-windows', 'checking-for-update'); - this.emit('status-changed', 'checking-for-update'); - } - /** - * Emitted when there is an available update. The update is downloaded - * automatically. - * - * @param {UpdateInfo} info Update info object. See class docs for details. - */ - _updateAvailableHandler(info) { - log.debug('Update available.', info); - this.state = 2; - this.lastInfoObject = info; - this.emit('notify-windows', 'update-available', info); - this.emit('status-changed', 'download-progress'); - if (!this.lastOptions.notify) { - return; - } - this._updateAvailableDialog(); - } - /** - * Emitted when there is no available update. - * - * @param {UpdateInfo} info Update info object. See class docs for details. - */ - _updateNotAvailableHandler(info) { - log.debug('Update not available.', info); - this.state = 3; - this.lastInfoObject = info; - this.emit('notify-windows', 'update-not-available', info); - this.emit('status-changed', 'not-available'); - this._notifyUser('No update available.', - info.version + ' is the latest version.'); - } - /** - * Emitted when there is an error while updating. - * - * @param {Error} error Error from the library. - */ - _updateErrorHandler(error) { - log.error('Update error', error); - this.state = 4; - this.lastInfoObject = error; - this.emit('notify-windows', 'autoupdate-error', { - message: error.message, - code: error.code - }); - this.emit('status-changed', 'not-available'); - if (error && error.code && error.code === 8) { - let message = 'Unable to update the application when it runs in'; - message += ' read-only mode. Move the application to the Applications'; - message += ' folder first and try again.'; - this._notifyUser('Update error', message, true); - } else { - this._notifyUser('Update error', error.message, true); - } - } - /** - * Emitted on progress. - * - * @param {Object} progressObj Progress info data. Contains `progress` - * property whoich has following properties: - * - bytesPerSecond - * - percent - * - total - * - transferred - */ - _downloadProgressHandler(progressObj) { - log.debug('Update download progress', progressObj); - this.state = 5; - this.lastInfoObject = progressObj; - this.emit('notify-windows', 'download-progress', progressObj); - } - /** - * Emmited when new version is downloaded. - * - * @param {UpdateInfo} info Update info object. See class docs for details. - */ - _downloadReadyHandler(info) { - log.debug('Update download ready', info); - this.state = 6; - this.lastInfoObject = info; - this.emit('notify-windows', 'update-downloaded', info); - this.emit('status-changed', 'update-downloaded'); - if (this.lastOptions.notify) { - setImmediate(() => autoUpdater.quitAndInstall()); - } - } - /** - * Quits the application and installs new update. - */ - installUpdate() { - log.info('Initializing update process (quit & install)'); - autoUpdater.quitAndInstall(); - } - /** - * Notofies user about update event. - * - * @param {String} message Message to display. - * @param {String} detail MacOS only. Additional detail message. - * @param {Boolean} isError Should be true when notifying about error. - */ - _notifyUser(message, detail, isError) { - this.lastOptions = this.lastOptions || {}; - if (!this.lastOptions.notify) { - return; - } - const dialogOpts = { - type: isError ? 'error' : 'info', - title: 'ARC updater', - message: message, - detail: detail - }; - if (!isError) { - const imgPath = path.join(__dirname, '..', '..', 'assets', 'icon.iconset', - 'icon_512x512.png'); - dialogOpts.icon = nativeImage.createFromPath(imgPath); - } - dialog.showMessageBox(dialogOpts); - } - - _updateAvailableDialog() { - let msg = 'Application update is available. '; - msg += 'Do you want to install it now?'; - dialog.showMessageBox({ - type: 'info', - title: 'Application update', - message: msg, - buttons: ['Yes', 'No'] - }, (buttonIndex) => { - if (buttonIndex === 0) { - autoUpdater.downloadUpdate(); - } - }); - } -} -exports.UpdateStatus = UpdateStatus; diff --git a/scripts/main/windows-manager.js b/scripts/main/windows-manager.js deleted file mode 100644 index 648fc563..00000000 --- a/scripts/main/windows-manager.js +++ /dev/null @@ -1,539 +0,0 @@ -const { BrowserWindow, dialog, ipcMain, nativeTheme } = require('electron'); -const path = require('path'); -const url = require('url'); -const { ArcSessionControl } = require('../packages/arc-preferences/main'); -const { ArcSessionRecorder } = require('./arc-session-recorder'); -const { ContextActions } = require('../packages/context-actions/main'); -const log = require('./logger'); -/** - * A class that manages opened app windows. - */ -class ArcWindowsManager { - /** - * @param {Object} startupOptions Application startup object. See - * `AppOptions` for more details. - */ - constructor(startupOptions) { - this.startupOptions = startupOptions || {}; - this.windows = []; - // Task manager window reference. - this._tmWin = undefined; - this.__windowClosed = this.__windowClosed.bind(this); - this.__windowMoved = this.__windowMoved.bind(this); - this.__windowResized = this.__windowResized.bind(this); - this.__windowFocused = this.__windowFocused.bind(this); - this.__windowOpenedPopup = this.__windowOpenedPopup.bind(this); - this._settingChangedHandler = this._settingChangedHandler.bind(this); - this.recorder = new ArcSessionRecorder(); - this.contextActions = new ContextActions(); - /** - * Pointer to last focused window. - * @type {BrowserWindow} - */ - this._lastFocused = undefined; - } - /** - * @return {Boolean} True if has at leas one window. - */ - get hasWindow() { - return this.windows.length > 0; - } - /** - * @return {BrowserWindow|undefined} Reference to last focused browser window - * or undefined if the window is destroyed or undefined. - */ - get lastFocused() { - if (!this._lastFocused) { - return null; - } - if (this._lastFocused.isDestroyed()) { - this._lastFocused = undefined; - return null; - } - return this._lastFocused; - } - /** - * @return {BrowserWindow} Returns reference to last created and still active - * window object. - */ - get lastActive() { - const ws = this.windows; - if (!ws || !ws.length) { - return null; - } - for (let i = ws.length - 1; i >= 0; i--) { - if (!ws[i].isDestroyed()) { - return ws[i]; - } - } - return null; - } - /** - * Restores latest window is any present. - */ - restoreLast() { - const win = this.lastActive; - if (win) { - win.show(); - } else { - this.open(); - } - } - /** - * Listens for relevant for this class events from the renderer. - */ - listen() { - ipcMain.on('window-reloading', this.__windowReloading.bind(this)); - ipcMain.on('new-window', this._windowOpenHandler.bind(this)); - ipcMain.on('toggle-devtools', this._toggleDevToolsHandler.bind(this)); - ipcMain.on('reload-app-required', this._reloadRequiredHandler.bind(this)); - ipcMain.on('settings-changed', this._settingChangedHandler); - ipcMain.on('window-state-request', this._winStateRequestHandler.bind(this)); - } - /** - * A handler for new window open event. Calls `open()` function. - */ - _windowOpenHandler() { - this.open(); - } - /** - * Handler for `toggle-devtools` event. Opens devtools on sender. - * - * @param {Event} e Event emmited by renderer process. - */ - _toggleDevToolsHandler(e) { - e.sender.webContents.toggleDevTools(); - } - /** - * Handler for the `reload-app-required` event emitted by renderer. - * Displays "reload" dialog and reloads the app if required. - * - * @param {Event} e Event emmited by renderer process. - * @param {?String} message Message to display to the user. - */ - _reloadRequiredHandler(e, message) { - log.debug('[WM] Rendering window reload required dialog.'); - message = message || 'To complete this action reload the application.'; - const win = BrowserWindow.fromWebContents(e.sender); - dialog.showMessageBox(win, { - type: 'info', - buttons: ['Reload', 'Later'], - defaultId: 0, - cancelId: 1, - title: 'Reload Advanced REST Client?', - message: message, - }, (response) => { - if (response === 0) { - this.reloadWindows(); - } - }); - } - /** - * Notifies all opened windows with event data. - * - * @param {String} type Event type (channel name) - * @param {?Array|any} args List of arguments or a single argument - */ - notifyAll(type, args) { - log.debug('[WM] Notyfying all windows with type: ' + type); - if (!args) { - args = []; - } - this.windows.forEach((win, index) => { - if (win.isDestroyed()) { - this.windows.splice(index, 1); - return; - } - if (args instanceof Array) { - win.webContents.send(type, ...args); - } else { - win.webContents.send(type, args); - } - }); - } - /** - * Notifies all opened windows with event data - * except for a window represented by a WebContents. - * - * @param {String} type Event type (channel name) - * @param {?Array} args List of arguments. - * @param {WebContents} wc Window that should not receive - * notification. - */ - notifyAllBut(type, args, wc) { - this.windows.forEach((win, index) => { - if (win.isDestroyed()) { - this.windows.splice(index, 1); - return; - } - if (win.webContents.id === wc.id) { - return; - } - win.webContents.send(type, args); - }); - } - - _windowsSortIndex(a, b) { - if (a.__arcIndex > b.__arcIndex) { - return 1; - } - if (a.__arcIndex < b.__arcIndex) { - return -1; - } - return 0; - } - - _getWindowIndex() { - const wins = this.windows; - if (!wins.length) { - return 0; - } - wins.sort(this._windowsSortIndex); - const len = wins.length; - for (let i = 0; i < len; i++) { - if (wins[i].__arcIndex !== i) { - return i; - } - } - return len; - } - /** - * Opens a new application window. - * - * @param {?String} path Application path to open (ARC's router path). - * @return {Promise} Resolved promise when the window is ready. - */ - open(path) { - log.debug('[WM] Opening new window' + (path ? ': ' + path : '')); - const index = this._getWindowIndex(); - log.debug('Generated index for the window: ' + index); - const session = new ArcSessionControl(index); - return session.load() - .then((data) => { - const win = this.__getNewWindow(index, data); - win.__arcSession = session; - this.__attachListeners(win); - this.windows.push(win); - this.__loadPage(win, path); - if (this.startupOptions.withDevtools) { - win.webContents.openDevTools(); - } - setTimeout(() => { - this.recorder.record(); - }); - return win; - }); - } - /** - * Opens ARC application window with path set to file action. - * - * @param {Object} options Action configuration. - * @return {Promise} - */ - openWithAction(options) { - if (!options) { - log.error('openWithAction called without argument.'); - return; - } - log.debug('[WM] Opening new window with action ' + options.source + ' ' + options.action); - const path = 'file-protocol-action/' + options.source + '/' + options.action + '/' + options.id; - return this.open(path); - } - /** - * Opens ARC application window and sets startup option for workspace file - * passed as an argument to the function. - * - * @param {String} workspaceFile A worksace file to use. - * @return {Promise} - */ - async openWorkspace(workspaceFile) { - const win = await this.open(); - win.startupOptions = win.startupOptions || {}; - win.startupOptions.workspaceFile = workspaceFile; - } - /** - * Opens task manager window. If the window is already created it tries to - * brings it to front. - */ - openTaskManager() { - if (this._tmWin) { - if (this._tmWin.isMinimized()) { - this._tmWin.restore(); - } - this._tmWin.focus(); - return; - } - log.debug('[WM] Opening task manager'); - const win = new BrowserWindow({ - backgroundColor: '#00A2DF', - webPreferences: { - partition: 'persist:arc-task-manager', - nativeWindowOpen: false, - nodeIntegration: false, - contextIsolation: false, - preload: path.join(__dirname, '..', '..', 'src', 'arc-task-manager', 'task-manager-preload.js') - } - }); - // win.webContents.openDevTools(); - const dest = path.join(__dirname, '..', '..', 'src', 'arc-task-manager', 'arc-task-manager.html'); - const full = url.format({ - pathname: dest, - protocol: 'file:', - slashes: true - }); - win.loadURL(full); - win.on('closed', () => { - this._tmWin = null; - }); - win.removeMenu(); - this._tmWin = win; - } - /** - * Creates new Application window. - * - * @param {Number} index Index of the window. - * @param {Object} session Session control data object. - * @return {BrowserWindow} Created window. - */ - __getNewWindow(index, session) { - const mainWindow = new BrowserWindow({ - width: session.size.width, - height: session.size.height, - x: session.position.x, - y: session.position.y, - backgroundColor: '#00A2DF', - show: false, - webPreferences: { - partition: 'persist:arc-window', - nativeWindowOpen: true, - nodeIntegration: false, - contextIsolation: false, - preload: path.join(__dirname, '..', 'renderer', 'preload.js') - } - }); - mainWindow.__arcIndex = index; - return mainWindow; - } - /** - * Loads application for a path. - * - * @param {BrowserWindow} win Window to load the app to. - * @param {String} appPath ARC internal routing path. - */ - __loadPage(win, appPath) { - win._startPath = appPath; - const dest = path.join(__dirname, '..', '..', 'app.html'); - const full = url.format({ - pathname: dest, - protocol: 'file:', - slashes: true - }); - log.debug('Loading page: ' + full); - win.loadURL(full); - } - /** - * Creates a startup options info object to be passed to - * starting application window. - * - * @param {Event} ev - */ - _winStateRequestHandler(ev) { - const contents = ev.sender; - const win = this.windows.find((item) => { - if (item.isDestroyed()) { - return false; - } - return item.webContents.id === contents.id; - }); - const workspaceOptions = {}; - if (win) { - workspaceOptions.index = win.__arcIndex; - if (win.startupOptions && win.startupOptions.workspaceFile) { - workspaceOptions.workspaceFile = win.startupOptions.workspaceFile; - } - } - const cnf = { - workspaceFile: this._computeWorkspaceFile(workspaceOptions), - darkMode: nativeTheme.shouldUseDarkColors - }; - if (win) { - cnf.startPath = win._startPath; - this.contextActions.registerDefaultActions(win.webContents); - } - log.debug('Sending window state info'); - log.debug(JSON.stringify(cnf, null, 2)); - contents.send('window-state-info', cnf); - } - - _computeWorkspaceFile(opts) { - if (opts.workspaceFile) { - return opts.workspaceFile; - } - let file = 'workspace'; - if (opts.index) { - file += `.${opts.index}`; - } - file += '.json'; - return path.join(process.env.ARC_WORKSPACE_PATH, file); - } - /** - * Attaches listeners to the window object. - * - * @param {BrowserWindow} win Window to attach listeners to. - */ - __attachListeners(win) { - win.addListener('closed', this.__windowClosed); - win.addListener('move', this.__windowMoved); - win.addListener('resize', this.__windowResized); - win.addListener('focus', this.__windowFocused); - win.once('ready-to-show', this.__readyShowHandler.bind(this)); - win.webContents.on('new-window', this.__windowOpenedPopup); - } - /** - * Finds window index position in windows array. - * - * @param {BrowserWindow} win Window to search - * @return {Number} Window position or `-1` if not found. - */ - _findWindowImdex(win) { - const noId = win.isDestroyed(); - return this.windows.findIndex((item) => { - if (item.isDestroyed()) { - return win === item; - } - if (noId) { - return false; - } - return item.id === win.id; - }); - } - /** - * Handler for the BrowserWindow `closed` event. - * Removes the window from the windows array. - * - * @param {Event} e Event emitted by the window. - */ - __windowClosed(e) { - if (this._lastFocused === e.sender) { - this._lastFocused = undefined; - } - const index = this._findWindowImdex(e.sender); - if (index === -1) { - return; - } - this.windows.splice(index, 1); - } - /** - * Handler for the BrowserWindow `move` event. - * Stores session value for window position. - * - * @param {Event} e Event emitted by the window. - */ - __windowMoved(e) { - const win = e.sender; - const pos = win.getPosition(); - win.__arcSession.updatePosition(pos[0], pos[1]); - } - /** - * Handler for the BrowserWindow `resize` event. - * Stores session value for window position. - * - * @param {Event} e Event emitted by the window. - */ - __windowResized(e) { - const win = e.sender; - const size = win.getSize(); - win.__arcSession.updateSize(size[0], size[1]); - } - /** - * Handler for the focus event on the BrowserWindow object. - * Sets `_lastFocused` property. - * @param {Event} e - */ - __windowFocused(e) { - this._lastFocused = e.sender; - } - /** - * Handler for BrowserWindow `ready-to-show` event. - * Passes startup options to the window and shows it. - * - * @param {Event} e Event emitted by the window. - */ - __readyShowHandler(e) { - log.debug('[WM] Window is ready to show'); - e.sender.show(); - } - /** - * Adds the `did-finish-load` event to reset the window when it's reloaded. - * - * @param {Event} e Event emitted by the window. - */ - __windowReloading(e) { - log.debug('[WM] Window is reloading'); - const contents = e.sender; - const win = this.windows.find((item) => { - if (item.isDestroyed()) { - return false; - } - return item.id === contents.id; - }); - if (win) { - delete win._startPath; - } - } - /** - * Handler for the `new-window` event emitted by the window object. - * Opens new chrome tab with requested content. - * - * @param {Event} event Emitted event. - * @param {String} url Requested URL - * @param {String} frameName - */ - __windowOpenedPopup(event, url, frameName/* , disposition, options*/) { - if (frameName !== 'modal') { - return; - } - event.preventDefault(); - // Object.assign(options, { - // modal: true, - // parent: event.sender, - // width: 100, - // height: 100 - // }); - // event.newGuest = new BrowserWindow(options); - const { shell } = require('electron'); - shell.openExternal(url); - } - /** - * Reloads all not destroyed wondows. - */ - reloadWindows() { - log.debug('[WM] Reloading all windows.'); - this.windows.forEach((win, index) => { - if (win.isDestroyed()) { - this.windows.splice(index, 1); - return; - } - win.reload(); - }); - } - /** - * A handler for a `settigs-changed` from a renderer process. - * It informs other windows about the change so all - * windows can consume the same change. - * - * @param {Event} event - * @param {String} key - * @param {String|Number|Boolean|Object} value - * @param {String} area - */ - _settingChangedHandler(event, key, value, area) { - this.notifyAllBut('settings-changed', { - key: key, - value: value, - area: area - }, event.sender); - } -} - -exports.ArcWindowsManager = ArcWindowsManager; diff --git a/scripts/packages/arc-preferences/README.md b/scripts/packages/arc-preferences/README.md deleted file mode 100644 index 4ed96f1a..00000000 --- a/scripts/packages/arc-preferences/README.md +++ /dev/null @@ -1,260 +0,0 @@ -# arc-preferences - -A module to be used in ARC Electron app to support application preferences. - -Currently it supports: - -- application settings -- workspace state - -It contains classes to work in both main and renderer process. - -## Main process - -When the application is initialized, ARC is to initialize `PreferencesManager` -class from `main/preferences-manager`. It listens for renderer ipc events -dispatched by `ArcPreferencesProxy` class. - -```javascript -const mgr = new PreferencesManager(); -mgr.observe(); -``` - -The class listens for `read-app-preferences` and `update-app-preference` -events from the renderer process. - -### Reading settings from renderer using web custom events - -```javascript -const {ArcPreferencesProxy} = require('./arc-preferences/renderer'); -const proxy = new ArcPreferencesProxy(); -proxy.observe(); - -const e = new CustomEvent('settings-read', { - bubbles: true, - composed: true, // assuming custom element - cancelable: true, - detail: {} // must be set! -}); -this.dispatchEvent(e); // assuming custom element - -if (e.defaultPrevented) { - e.detail.result.then((settings) => console.log(settings)); -} -``` - -### Saving settings from renderer using web custom events - -```javascript -const {ArcPreferencesProxy} = require('./arc-preferences/renderer'); -const proxy = new ArcPreferencesProxy(); -proxy.observe(); - -const e = new CustomEvent('settings-changed', { - bubbles: true, - composed: true, // assuming custom element - cancelable: true, - detail: { - name: 'my-setting', - value: 'my-value' - } -}); -this.dispatchEvent(e); // assuming custom element - -if (e.defaultPrevented) { - e.detail.result.then((settings) => console.log('Settings saved')); -} -``` - -When settings are updates every browser window receives `app-preference-updated` -event from the main page on the ipc main bus and the proxy dispatches non cancelable -`settings-changed` custom event. Therefore once the proxy is initialized the -components / application should just listen to this event to know if a setting -changed. - -## Renderer process - -### Preferences read and save - -By design there's no direct class to manipulate the settings file. The app works -with single settings file and there can be more than one window opened. -To ensure that each window has the same set of settings all storing / restoring -logic is in main process in `PreferencesManager` class. - -Renderer process must use `ArcPreferencesProxy` class to communicate with main -process to operate on the data. - -Preferred way to handle settings is by using custom events. - -First initialize the proxy somewhere in the application logic. -```javascript -const {ArcPreferencesProxy} = require('./arc-preferences/renderer'); -const proxy = new ArcPreferencesProxy(); -proxy.observe(); -``` - -Once the proxy observers for custom events it's ready to use event's API: - -```javascript -const e = new CustomEvent('settings-read', { - bubbles: true, - composed: true, // assuming custom element - cancelable: true, - detail: {} // must be set! -}); -this.dispatchEvent(e); // assuming custom element - -if (e.defaultPrevented) { - e.detail.result.then((settings) => console.log(settings)); -} -``` - -Or to update settings: - -```javascript -const e = new CustomEvent('settings-changed', { - bubbles: true, - composed: true, // assuming custom element - cancelable: true, - detail: { - name: 'my-setting', - value: 'my-value' - } -}); -this.dispatchEvent(e); // assuming custom element - -if (e.defaultPrevented) { - e.detail.result.then((settings) => console.log('Settings saved')); -} -``` - -Because all windows are notified about the change the app should listen for -`settings-changed` custom event. If the event is non-cancelable it means that -the change has been saved to the file. - -``` -window.addEventListener('settings-changed', (e) => { - if (e.cancelable) { - // This is request for change. It still can be canceled for any reason. - return; - } - console.log('Setting changed', e.detail.name, e.detail.value); -}); -``` - -### Workspace state - -This module also support workspace state. It allows to read and update a state -of specific window. - -```javascript -const {WorkspaceManager} = require('./arc-preferences/renderer'); -const manager = new WorkspaceManager(0); -manager.observe(); -``` - -The first argument tells which state to restore. It is an index of the window -being opened. By default it's `0`. The application should inform created window -about its index so it restores appropriate state. For better experience each window -should support it's own state. - -#### Reading workspace state - -```javascript -const e = new CustomEvent('workspace-state-read', { - bubbles: true, - composed: true, // assuming custom element - cancelable: true, - detail: {} // must be set! -}); -this.dispatchEvent(e); // assuming custom element -if (e.defaultPrevented) { - e.detail.result.then((state) => console.log(state)); -} -``` - -If the state file does not exist it returns default values. - -#### Updating workspace state - -```javascript -const e = new CustomEvent('workspace-state-store', { - bubbles: true, - composed: true, // assuming custom element - cancelable: true, - detail: { - value: { - selected: 1, - requests: [{}], - environmetn: 0 - } - } -}); -this.dispatchEvent(e); // assuming custom element -if (e.defaultPrevented) { - e.detail.result.then((state) => console.log(state)); -} -``` - - -## Application meta data (main process) - -When first run the app creates a meta data file. The file contains -`appId` which is `uuid` version 4 string and `aid` which is `uuid` version 5. - -The `appId` property can be used to identify specific instance of the application. -This can be used to synchronize data between the instance and any application server. - -The `aid` is anonymised application id that only can be used with analytics -suite. This property cannot be used anywhere else to ensure that any anaytics data -cannot be connected to specific instance. - -### Usage - -``` -const {ArcMeta} = require('./arc-preferences/main'); -const meta = new ArcMeta(); -meta.getAppId() -.then((appId) => { - // appId is persistent and can be used to identify the app instance -}); - -meta.getAninimizedId() -.then((aid) => { - // aid can be only used to record a user session. -}); -``` - -## Session control (window meta) - -The `ArcSessionControl` updates opened application window state to the state file. -It includes window position and size. - -### Example usage - -```javascript -const {ArcSessionControl} = require('./arc-preferences/main'); -const session = new ArcSessionControl(1); // index of the window. -return session.load() -.then((state) => { - const win = new BrowserWindow({ - width: state.size.width, - height: state.size.height, - x: state.position.x, - y: state.position.y, - }); - session.trackWindow(win); - win.arcSession = session; - win.addListener('closed', () => { - win.arcSession.untrackWindow(); - }); -}) -``` - -The constructor takes window index as an argument. Each window has it's own -state file that keeps its size and position. - -The application can call `updatePosition()` and `updateSize()` function by it's -own. The class provides the `trackWindow()` function that tracks both `resize` -and `move` events of the window object. **when using this function** clear -event listeners when the window is closed or it will newer get garbage collected. diff --git a/scripts/packages/arc-preferences/index.js b/scripts/packages/arc-preferences/index.js deleted file mode 100644 index 12b87717..00000000 --- a/scripts/packages/arc-preferences/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.ArcPreferences = require('./lib/preferences').ArcPreferences; diff --git a/scripts/packages/arc-preferences/lib/preferences.js b/scripts/packages/arc-preferences/lib/preferences.js deleted file mode 100644 index 96bb5ffc..00000000 --- a/scripts/packages/arc-preferences/lib/preferences.js +++ /dev/null @@ -1,169 +0,0 @@ -const EventEmitter = require('events'); -const electron = require('electron'); -const path = require('path'); -const fs = require('fs-extra'); -const log = require('electron-log'); -/** - * A module responsible for storing / restoring user settings. - * This works with any file and is not mean to work specifically with - * ARC settings file. Extending this class you'll get access to most common - * methods when working with files. - * - * By default files are stored in user's application data directory. It can be - * changed by passing `file` property to the constructor. - */ -class ArcPreferences extends EventEmitter { - /** - * @constructor - * - * @param {?Object} opts - Initialization options: - * - file - Path to a settings file. It overrides other settings and - * uses this file as a final store. - * - fileName - A name for the settings file. By default it's `settings.json` - * - filePath - Path to the preferences file. By default it's system's - * application directory for user profile. - * - appendFilePath - If true it appends `filePath` to the default path. - */ - constructor(opts) { - super(); - // Current read settings. - this.__settings = undefined; - /** - * The application directory where user settings are stored. - * @type {String} - */ - this.userSettingsDir = process.env.ARC_HOME; - /** - * Full path to the preferences file where the data is stored. - * @type {String} - */ - this.settingsFile = undefined; - this._setupPaths(opts); - } - /** - * Setups paths to settings files. - * - * @param {?Object} opts See constructor for description. - */ - _setupPaths(opts) { - if (!opts) { - opts = {}; - } - if (opts.file) { - this.settingsFile = this._resolvePath(opts.file); - } else { - if (!opts.fileName && !opts.filePath) { - this.settingsFile = process.env.ARC_SETTINGS_FILE; - } else { - const file = opts.fileName || 'settings.json'; - let dir; - if (opts.filePath) { - if (opts.appendFilePath) { - dir = path.join(this.userSettingsDir, opts.filePath); - } else { - dir = this._resolvePath(opts.filePath); - } - } else { - dir = this.userSettingsDir; - } - this.userSettingsDir = dir; - this.settingsFile = path.join(dir, file); - } - } - } - /** - * Resolves file path to correct path if it's starts with `~`. - * - * @param {String} file Settings file path - * @return {String} Path to the file. - */ - _resolvePath(file) { - if (file[0] === '~') { - const app = (electron.app || electron.remote.app); - file = app.getPath('home') + file.substr(1); - } - return file; - } - /** - * Ensures that the file exists and reads it's content as JSON. - * @param {String} file Path to a file - * @return {Promise} Promise resolved to file content or empty object. - */ - async _restoreFile(file) { - await fs.ensureFile(file); - return await fs.readJson(file, { throws: false }); - } - /** - * Stores JSON `data` in `file`. - * - * @param {String} file Path to a file. - * @param {Object} data JavaScript object to store. - * @return {Promise} Promise resolved when the `file` is updated. - */ - async _storeFile(file, data) { - return await fs.outputJson(file, data); - } - /** - * Loads current settings from settings file. - * - * @return {Promise} Promise resolved to a settings file. - */ - async load() { - if (this.__settings) { - return this.__settings; - } - try { - const data = await this._restoreFile(this.settingsFile); - return this._processSettings(data); - } catch (e) { - log.warn(e); - return this._processSettings(); - } - } - - loadSync() { - let data; - try { - fs.ensureFileSync(this.settingsFile); - data = fs.readJsonSync(this.settingsFile, { throws: false }); - } catch (_) { - // ... - } - if (!data) { - data = {}; - } else { - this.__settings = data; - } - return data; - } - /** - * Processes data from settings file. Creates default settings if settings - * file do not exists. - * - * @param {?Object} data Settings read from the settings file. - * @return {Promise} Settings for the app. - */ - async _processSettings(data) { - if (!data || !Object.keys(data).length) { - if (typeof this.defaultSettings === 'function') { - const settings = await this.defaultSettings(); - this.__settings = settings; - await this.store(); - return settings; - } else { - return {}; - } - } - this.__settings = data; - return data; - } - /** - * Stores current settings to file. - * - * @return {Promise} Promise resolved when the settings are stored. - */ - async store() { - return await this._storeFile(this.settingsFile, this.__settings); - } -} -exports.ArcPreferences = ArcPreferences; diff --git a/scripts/packages/arc-preferences/main/arc-meta.js b/scripts/packages/arc-preferences/main/arc-meta.js deleted file mode 100644 index 9ba5e5a3..00000000 --- a/scripts/packages/arc-preferences/main/arc-meta.js +++ /dev/null @@ -1,61 +0,0 @@ -const { ArcPreferences } = require('../lib/preferences'); -const { v4: uuidv4, v5: uuidv5 } = require('uuid'); -/** - * ARC metadata - * - * Type: `Object` - * Properties: - * - `appId` {String} Generated application ID that can be used to - * link user data - * - `aid` {String} Aninimized Id that can be used to link this app - * with analytics - * account like Google Analytics. **This property is never stored outside local - * filesystem or analytics server which doesn't allow connect this information - * with specific app instance** - */ -class ArcMeta extends ArcPreferences { - /** - * @constructor - */ - constructor() { - super({ - fileName: 'app-meta.json' - }); - } - /** - * Returns generated application ID. - * - * @return {Promse} Promise resolved to the application ID. - */ - getAppId() { - return this.load() - .then((meta) => meta.appId); - } - /** - * To ensure anynomous app usage reporting the app is using generated UUID - * from the instance ID. Both are not stored together anywhere outside user's - * local filesystem. - * - * @return {Promse} Promise resolved to the application anonymized ID. - */ - getAninimizedId() { - return this.load() - .then((meta) => meta.aid); - } - /** - * Creates default metadata for ARC. - * - * - * @return {Promise} Generated metadata object - */ - defaultSettings() { - const appId = uuidv4(); - const aid = uuidv5('arc-electron', appId); - const result = { - appId: appId, - aid: aid - }; - return Promise.resolve(result); - } -} -exports.ArcMeta = ArcMeta; diff --git a/scripts/packages/arc-preferences/main/index.js b/scripts/packages/arc-preferences/main/index.js deleted file mode 100644 index ae81fb74..00000000 --- a/scripts/packages/arc-preferences/main/index.js +++ /dev/null @@ -1,3 +0,0 @@ -exports.PreferencesManager = require('./preferences-manager').PreferencesManager; -exports.ArcMeta = require('./arc-meta').ArcMeta; -exports.ArcSessionControl = require('./session-control').ArcSessionControl; diff --git a/scripts/packages/arc-preferences/main/preferences-manager.js b/scripts/packages/arc-preferences/main/preferences-manager.js deleted file mode 100644 index 4aa69ab3..00000000 --- a/scripts/packages/arc-preferences/main/preferences-manager.js +++ /dev/null @@ -1,100 +0,0 @@ -const {ArcPreferences} = require('../lib/preferences'); -const {ipcMain} = require('electron'); -const log = require('electron-log'); -/** - * A class handling queries from any application window (renderer) to read - * or store application preferences. - */ -class PreferencesManager extends ArcPreferences { - /** - * @param {?Object} opts - Initialization options: - * - file - Path to a settings file. It overrides other settings and - * uses this file as a final store. - * - fileName - A name for the settings file. By default it's `settings.json` - * - filePath - Path to the preferences file. By default it's system's - * application directory for user profile. - */ - constructor(opts) { - super(opts); - this._readHandler = this._readHandler.bind(this); - this._changeHandler = this._changeHandler.bind(this); - } - /** - * Listens for application events related to preferences management. - */ - observe() { - ipcMain.on('read-app-preferences', this._readHandler); - ipcMain.on('update-app-preference', this._changeHandler); - } - /** - * Handler for the IPC `read-app-preferences` event - * @param {Event} event - * @param {?String} id Optional ID send back with the `app-preferences` event - * response - */ - _readHandler(event, id) { - this.load() - .then((settings) => { - event.sender.send('app-preferences', settings, id); - }) - .catch((cause) => { - log.error(cause); - console.error(cause); - event.sender.send('app-preferences', {}, id); - }); - } - /** - * Handler for the IPC `update-app-preference` event - * @param {Event} event - * @param {String} name Preference name - * @param {any} value Preference value - */ - _changeHandler(event, name, value) { - let p; - if (!this.__settings) { - p = this.load(); - } else { - p = Promise.resolve(); - } - p.then(() => { - this.__settings[name] = value; - return this.store(); - }) - .then(() => this._informChange(name, value)) - .catch((cause) => { - log.error(cause); - console.error(cause); - event.sender.send('app-preference-update-error', name, cause.message); - }); - } - /** - * Informs all available windows about the change in the preferences. - * @param {String} name Preference name - * @param {String} value New value - */ - _informChange(name, value) { - this.emit('settings-changed', name, value); - // const windows = BrowserWindow.getAllWindows(); - // for (let i = 0, len = windows.length; i < len; i++) { - // windows[i].webContents.send('app-preference-updated', name, value); - // } - } - /** - * Creates default settings object. - * - * @return {Object} Default settings object. - */ - defaultSettings() { - return Promise.resolve({ - appVariablesEnabled: true, - systemVariablesEnabled: true, - historyEnabled: true, - requestDefaultTimeout: 45, - autoUpdate: true, - telemetry: true, - viewListType: 'default', - followRedirects: true - }); - } -} -module.exports.PreferencesManager = PreferencesManager; diff --git a/scripts/packages/arc-preferences/main/session-control.js b/scripts/packages/arc-preferences/main/session-control.js deleted file mode 100644 index 092f4b36..00000000 --- a/scripts/packages/arc-preferences/main/session-control.js +++ /dev/null @@ -1,220 +0,0 @@ -const {ArcPreferences} = require('../lib/preferences'); -/** - * A class responsible for managing browser window state. - * - * Stored object format: - * - * ``` - * { - * "size": { // latest used window size - * "width": Number // width of the window - * "height": Number // height of the window - * }, - * "position": { - * "x": Number, - * "y": Number - * } - * } - * ``` - */ -class ArcSessionControl extends ArcPreferences { - /** - * @constructor - * @param {?Number} windowNumber ID of the window opened for this session. - * Default to `0`. - */ - constructor(windowNumber) { - if (!windowNumber) { - windowNumber = 0; - } - super({ - filePath: 'sessions', - appendFilePath: true, - fileName: windowNumber + '.json' - }); - this.id = windowNumber; - this._defaultWidth = 1200; - this._defaultHeight = 800; - /** - * Store data debounce timer. - * By default it's 500 ms. - * @type {Number} - */ - this.storeDebounce = 500; - /** - * A reference to a BrowserWindow object that is being tracked. - * @type {BrowserWindow} - */ - this.window = undefined; - this._movedHandler = this._movedHandler.bind(this); - this._resizedHandler = this._resizedHandler.bind(this); - } - /** - * Starts tracking a window for move and resize events to call corresponding - * save functions. - * Note, when the window is distroyed call `untrackWindow` or it will cause - * a memory leak. - * @param {BrowserWindow} win - */ - trackWindow(win) { - this.untrackWindow(); - this.window = win; - win.addListener('move', this._movedHandler); - win.addListener('resize', this._resizedHandler); - } - /** - * Untracks events from currently tracked window. - */ - untrackWindow() { - if (!this.window) { - return; - } - this.window.removeListener('move', this._movedHandler); - this.window.removeListener('resize', this._resizedHandler); - this.window = undefined; - } - - /** - * Stores current settings with a debouncer. - */ - _storeDebounce() { - if (this.__storingDebouncer) { - return; - } - this.__storingDebouncer = true; - setTimeout(() => { - this.__storingDebouncer = false; - this.store(); - }, this.storeDebounce); - } - - /** - * Updates width and height of the window. - * This task is debounced so it's safe to call it more than once in a short - * period of time. - * - * @param {Number} width Width of the window. - * @param {Number} height Heigth of the window. - */ - updateSize(width, height) { - if (!this.__settings) { - this.__settings = {}; - } - if (!this.__settings.size) { - this.__settings.size = {}; - } - this.__settings.size.width = width; - this.__settings.size.height = height; - this._storeDebounce(); - } - /** - * Updates `x` and `y` position of the window. - * - * This task is debounced so it's safe to call it more than once. - * - * @param {Number} x The x position of the window on screen. - * @param {Number} y The y position of the window on screen. - */ - updatePosition(x, y) { - if (!this.__settings) { - this.__settings = {}; - } - if (!this.__settings.position) { - this.__settings.position = {}; - } - this.__settings.position.x = x; - this.__settings.position.y = y; - this._storeDebounce(); - } - /** - * Overrides parent class `_processSettings` to ensure that values - * are correct. - * @param {Object} data Restored data - * @return {Promise} - */ - _processSettings(data) { - const result = { - size: this._readAppScreenSize(data), - position: this._readAppScreenPosition(data) - }; - return Promise.resolve(result); - } - /** - * Reads application screen size from restored data. Setsa defaults - * if any property is missing. - * - * @param {Object} data Restored data - * @return {Object} Data to use - */ - _readAppScreenSize(data) { - const result = {}; - if (data && data.size) { - result.width = this._numberValue(data.size.width, this._defaultWidth); - result.height = this._numberValue(data.size.height, this._defaultHeight); - } else { - result.width = this._defaultWidth; - result.height = this._defaultHeight; - } - return result; - } - /** - * Reads application screen position from restored data. Setsa defaults - * if any property is missing. - * - * @param {Object} data Restored data - * @return {Object} Data to use - */ - _readAppScreenPosition(data) { - let result = {}; - if (data && data.position) { - result.x = this._numberValue(data.position.x); - result.y = this._numberValue(data.position.y); - } else { - result.x = undefined; - result.y = undefined; - } - return result; - } - /** - * Creates a numeric value from read option. - * @param {String|Number} value Read value. - * @param {Number} defaultValue The value if missing. - * @return {Number} Numeric value. - */ - _numberValue(value, defaultValue) { - if (!value && value !== 0) { - return defaultValue; - } - value = Number(value); - if (value !== value) { - return defaultValue; - } - if (value < 0) { - return 0; - } - return value; - } - /** - * Handler for the BrowserWindow `move` event. - * Stores session value for window position. - * - * @param {Event} e Event emitted by the window. - */ - _movedHandler(e) { - const win = e.sender; - const pos = win.getPosition(); - this.updatePosition(pos[0], pos[1]); - } - /** - * Handler for the BrowserWindow `resize` event. - * Stores session value for window position. - * - * @param {Event} e Event emitted by the window. - */ - _resizedHandler(e) { - const win = e.sender; - const size = win.getSize(); - this.updateSize(size[0], size[1]); - } -} -exports.ArcSessionControl = ArcSessionControl; diff --git a/scripts/packages/arc-preferences/renderer/index.js b/scripts/packages/arc-preferences/renderer/index.js deleted file mode 100644 index 3081295c..00000000 --- a/scripts/packages/arc-preferences/renderer/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.ArcPreferencesProxy = require('./preferences-proxy').ArcPreferencesProxy; -exports.WorkspaceManager = require('./workspace-manager').WorkspaceManager; diff --git a/scripts/packages/arc-preferences/renderer/preferences-proxy.js b/scripts/packages/arc-preferences/renderer/preferences-proxy.js deleted file mode 100644 index bac82fe8..00000000 --- a/scripts/packages/arc-preferences/renderer/preferences-proxy.js +++ /dev/null @@ -1,159 +0,0 @@ -const { ipcRenderer } = require('electron'); -/** - * Class that provides access to user settings file in the renderer process. - */ -class ArcPreferencesProxy { - /** - * @constructor - */ - constructor() { - this._readHandler = this._readHandler.bind(this); - this._changeHandler = this._changeHandler.bind(this); - this._mainPrefsHandler = this._mainPrefsHandler.bind(this); - this._mainChangedHandler = this._mainChangedHandler.bind(this); - this.promises = []; - this.lastRequestId = 0; - } - /** - * Observers window and IPC events which makes this class work. - */ - observe() { - window.addEventListener('settings-read', this._readHandler); - window.addEventListener('settings-changed', this._changeHandler); - ipcRenderer.on('app-preference-updated', this._mainChangedHandler); - ipcRenderer.on('app-preferences', this._mainPrefsHandler); - } - /** - * Stop observing window and IPC events - */ - unobserve() { - window.removeEventListener('settings-read', this._readHandler); - window.removeEventListener('settings-changed', this._changeHandler); - ipcRenderer.removeListener('app-preference-updated', this._mainChangedHandler); - ipcRenderer.removeListener('app-preferences', this._mainPrefsHandler); - } - /** - * Handler for the `settings-read` custom event. Reads current settings. - * It set's the `result` property on event's detail object with the - * promise from calling `load()` function. - * - * @param {CustomEvent} e Custom event - */ - _readHandler(e) { - e.preventDefault(); - e.stopPropagation(); - e.detail.result = this.load(); - } - /** - * Loads application settings from the main thread. - * @return {Promise} - */ - load() { - return new Promise((resolve) => { - const id = (++this.lastRequestId); - this.promises.push({ - type: 'read', - resolve, - id - }); - ipcRenderer.send('read-app-preferences', id); - }); - } - /** - * A handler for app-preferences event from the main process. - * The event is dispatched to the window that requested this information - * so the corresponding promise can be fulfilled. - * - * The implementation is in ../main/preferences-manager.js file. - * - * @param {Event} e - * @param {Object} settings Restored application settings. - * @param {String} id The id used to request the data - */ - _mainPrefsHandler(e, settings, id) { - if (!id) { - return; - } - let p; - for (let i = 0, len = this.promises.length; i < len; i++) { - if (this.promises[i].id === id) { - p = this.promises[i]; - this.promises.splice(i, 1); - break; - } - } - if (p) { - p.resolve(settings); - } - } - /** - * A handler for window `settings-changed` custom event. - * Sends the intent to the main proces to update preferences. - * @param {CustomEvent} e - */ - _changeHandler(e) { - if (!e.cancelable) { - return; - } - e.preventDefault(); - e.stopPropagation(); - const { name } = e.detail; - if (!name) { - e.detail.result = Promise.reject(new Error('Name is not set.')); - return; - } - e.detail.result = this.store(name, e.detail.value); - } - - /** - * Updates the data and stores it in the settings file. - * @param {String} name Property name - * @param {?any} value Property value - * @return {Promise} Promise resolved when the changes has been commited to - * the file. - */ - store(name, value) { - return new Promise((resolve) => { - this.promises.push({ - type: 'store', - resolve, - name - }); - ipcRenderer.send('update-app-preference', name, value); - }); - } - - /** - * Handler for `app-preference-updated` main process event. - * The event is dispatched each time a preference change. - * - * If corresponding promise exists it will resolve it. - * It always dispatches `app-preference-updated` custom event. - * - * @param {Event} e - * @param {String} name Name of changed property - * @param {any} value - */ - _mainChangedHandler(e, name, value) { - let p; - for (let i = 0, len = this.promises.length; i < len; i++) { - const item = this.promises[i]; - if (item.type === 'store' && item.name === name) { - p = item; - this.promises.splice(i, 1); - break; - } - } - if (p) { - p.resolve(); - } - document.body.dispatchEvent(new CustomEvent('settings-changed', { - bubbles: true, - detail: { - name, - value, - } - })); - } -} -exports.ArcPreferencesProxy = ArcPreferencesProxy; diff --git a/scripts/packages/arc-preferences/renderer/workspace-manager.js b/scripts/packages/arc-preferences/renderer/workspace-manager.js deleted file mode 100644 index d63b05e7..00000000 --- a/scripts/packages/arc-preferences/renderer/workspace-manager.js +++ /dev/null @@ -1,218 +0,0 @@ -const { ArcPreferences } = require('../lib/preferences'); -const { PayloadProcessor } = require( - '@advanced-rest-client/arc-electron-payload-processor'); -const log = require('electron-log'); -/** - * A class handling queries from any application window (renderer) to read - * or store application preferences. - */ -class WorkspaceManager extends ArcPreferences { - /** - * @param {String} workspaceFile Location of the workspace state file to use. - */ - constructor(workspaceFile) { - super({ - file: workspaceFile - }); - log.info('State file is ', this.settingsFile); - /** - * Store data debounce timer. - * By default it's 500 ms. - * @type {Number} - */ - this.storeDebounce = 500; - this._readHandler = this._readHandler.bind(this); - this._changeHandler = this._changeHandler.bind(this); - } - /** - * Observers window custom events - */ - observe() { - window.addEventListener('workspace-state-read', this._readHandler); - window.addEventListener('workspace-state-store', this._changeHandler); - } - /** - * Removed web event listeners from ythe window object - */ - unobserve() { - window.removeEventListener('workspace-state-read', this._readHandler); - window.removeEventListener('workspace-state-store', this._changeHandler); - } - /** - * Generates the default settings. It is used by the parten class when - * settings are not avaiolable. - * @return {Promise} - */ - defaultSettings() { - return Promise.resolve({ - requests: [], - selected: 0, - environment: 'default' - }); - } - /** - * Handler for web `workspace-state-read` custom event. - * @param {CustomEvent} e - */ - _readHandler(e) { - if (e.defaultPrevented) { - return; - } - e.preventDefault(); - e.stopPropagation(); - e.detail.result = this.restore(); - } - /** - * Handler for web `workspace-state-store` custom event. - * @param {CustomEvent} e - */ - _changeHandler(e) { - if (e.defaultPrevented) { - return; - } - e.preventDefault(); - e.stopPropagation(); - if (!e.detail.value) { - const message = 'workspace-state-store event has no value'; - log.warn(message); - return; - } - this.__settings = e.detail.value; - this.storeWorkspace(); - } - /** - * Restores state file. - * - * @return {Promise} Promise resolved to content of the file. - */ - async restore() { - log.info('Restoring workspace data from', this.settingsFile); - try { - const data = await this.load(); - log.info('Restored workspace data from', this.settingsFile); - this.initialized = true; - this._processRestoredPayload(data); - return data; - } catch (cause) { - log.warn('Unable to restore workspace data'); - log.warn(cause); - this.initialized = true; - return {}; - } - } - /** - * Stores current data to state file. - * - * This task is async and delayed - * - * @param {Object} data Store file contents - */ - storeWorkspace() { - if (!this.initialized) { - return; - } - if (this.__storeDebouncer) { - return; - } - this.__storeDebouncer = true; - setTimeout(() => { - this.__storeDebouncer = false; - this._doStoreWorkspace(); - }, this.storeDebounce); - } - - async _doStoreWorkspace() { - log.info('Storing workspace data to', this.settingsFile); - try { - await this.store(); - } catch (cause) { - log.error('Unable to store workspace data to ' + this.settingsFile); - log.error(cause); - } - } - /** - * Updates state of the request entries. - * - * @param {Object} requests List of ARC requests objects. - * @return {Promise} Promise resolved when data is saved. - */ - async updateRequestsSate(requests) { - if (!this.initialized) { - return; - } - log.info('Updating workspace request data...'); - if (!this.__settings) { - this.__settings = {}; - } - const data = await this._processRequests(requests); - this.__settings.requests = data; - this.storeWorkspace(); - } - /** - * Updates selected request data. - * - * @param {Number} selected Selected request - */ - updateSelected(selected) { - if (!this.initialized) { - return; - } - log.info('Updating workspace selection data...'); - if (!this.__settings) { - this.__settings = {}; - } - this.__settings.selected = selected; - this.storeWorkspace(); - } - /** - * Processes requests payloads and transforms them to string if needed. - * - * @param {Array} requests List of ARC requests - * @param {?Number} index Index of processed request - * @param {?Array} result Result of processing. - * @return {Promise} Promise resolved when all requests has been processed. - * Resolved promise contains the copy of request objects. - */ - async _processRequests(requests, index, result) { - index = index || 0; - result = result || []; - const item = requests[index]; - if (!item) { - return result; - } - const request = await PayloadProcessor.payloadToString(item); - /* eslint-disable-next-line require-atomic-updates */ - result[index] = request; - index++; - return await this._processRequests(requests, index, result); - } - /** - * When restoring data it processes requests payload data. - * @param {Object} state - */ - _processRestoredPayload(state) { - if (!state || !state.requests || !state.requests.length) { - return; - } - for (let i = 0, len = state.requests.length; i < len; i++) { - if (state.requests[i].multipart) { - try { - state.requeststs[i].payload = PayloadProcessor.restoreMultipart( - state.requests[i].multipart); - delete state.requests[i].multipart; - } catch (_) { - // ... - } - } else if (state.requests[i].blob) { - try { - state.requeststs[i].payload = PayloadProcessor._dataURLtoBlob( - state.requests[i].blob); - delete state.requests[i].blob; - } catch (_) { - // ... - } - } - } - } -} -module.exports.WorkspaceManager = WorkspaceManager; diff --git a/scripts/packages/arc-preferences/spec/arc-meta.main.spec.js b/scripts/packages/arc-preferences/spec/arc-meta.main.spec.js deleted file mode 100644 index 57a7d03d..00000000 --- a/scripts/packages/arc-preferences/spec/arc-meta.main.spec.js +++ /dev/null @@ -1,84 +0,0 @@ -const assert = require('chai').assert; -const fs = require('fs-extra'); -const {ArcMeta} = require('../main'); -const testPaths = require('../../../../test/setup-paths'); - -describe('ArcMeta class - main process', function() { - const basePath = testPaths.getBasePath(); - after(() => fs.remove(basePath)); - - describe('File path', function() { - it('Sets correct file path', function() { - const instance = new ArcMeta(); - assert.notEqual(instance.settingsFile.indexOf('app-meta.json'), -1); - }); - }); - - describe('Reading data', function() { - let instance; - after(() => fs.remove(instance.settingsFile)); - - beforeEach(() => { - instance = new ArcMeta(); - }); - - it('Creates the settings', (done) => { - instance.load() - .then((meta) => { - // load settings has `catch` function. - setTimeout(() => { - assert.typeOf(meta, 'object', 'Returns is an object'); - assert.typeOf(meta.appId, 'string', 'appId is set'); - assert.typeOf(meta.aid, 'string', 'aid is set'); - done(); - }, 1); - }); - }); - - it('Created data is persistent', (done) => { - let createdAppId; - let createdAid; - instance.load() - .then((meta) => { - createdAppId = meta.appId; - createdAid = meta.aid; - const other = new ArcMeta(); - return other.load(); - }) - .then((meta) => { - setTimeout(() => { - assert.equal(meta.appId, createdAppId); - assert.equal(meta.aid, createdAid); - done(); - }, 1); - }); - }); - - const data = { - appId: 'appid-test', - aid: 'aid-test' - }; - - it('getAppId() returns the id', (done) => { - fs.outputJson(instance.settingsFile, data) - .then(() => instance.getAppId()) - .then((appId) => { - setTimeout(() => { - assert.equal(appId, data.appId); - done(); - }, 1); - }); - }); - - it('getAninimizedId() returns the id', (done) => { - fs.outputJson(instance.settingsFile, data) - .then(() => instance.getAninimizedId()) - .then((aid) => { - setTimeout(() => { - assert.equal(aid, data.aid); - done(); - }, 1); - }); - }); - }); -}); diff --git a/scripts/packages/arc-preferences/spec/preferences-manager.main.spec.js b/scripts/packages/arc-preferences/spec/preferences-manager.main.spec.js deleted file mode 100644 index 213f2677..00000000 --- a/scripts/packages/arc-preferences/spec/preferences-manager.main.spec.js +++ /dev/null @@ -1,110 +0,0 @@ -const assert = require('chai').assert; -const path = require('path'); -const fs = require('fs-extra'); -const {PreferencesManager} = require('../main'); - -describe('PreferencesManager class - main process', function() { - const file = path.join('test', 'test.json'); - - describe('Reading preferences', function() { - after(() => { - return fs.remove(file); - }); - const id = 'test-id'; - const data = { - test: true - }; - - it('Responds with app-preferences event', function(done) { - const instance = new PreferencesManager({ - file: file - }); - instance._readHandler({ - sender: { - send: function(type, data, _id) { - setTimeout(() => { - assert.equal(type, 'app-preferences', 'Type is set'); - assert.deepEqual(data, { - appVariablesEnabled: true, - systemVariablesEnabled: true, - historyEnabled: true, - requestDefaultTimeout: 45, - autoUpdate: true, - telemetry: true, - viewListType: 'default', - followRedirects: true - }, 'Data has default values'); - assert.equal(_id, id, 'Returns the same id'); - done(); - }, 1); - } - } - }, id); - }); - - it('Responds with data if exists', function(done) { - const instance = new PreferencesManager({ - file: file - }); - fs.outputJson(file, data) - .then(() => { - instance._readHandler({ - sender: { - send: function(type, _data) { - setTimeout(() => { - assert.deepEqual(data, _data, 'Data is set'); - done(); - }, 1); - } - } - }, id); - }); - }); - }); - - describe('Updating preferences', function() { - after(() => { - return fs.remove(file); - }); - const name = 'test-name'; - const value = 'test-value'; - - it('Updates settings', (done) => { - const instance = new PreferencesManager({ - file: file - }); - const timeout = setTimeout(() => { - assert.equal(instance.__settings[name], value, 'Value set on the instance'); - fs.readJson(file) - .then((data) => { - assert.equal(data[name], value, 'Value stored in file'); - done(); - }); - }, 500); - instance._changeHandler({ - sender: { - send: function(type, name, message) { - clearTimeout(timeout); - done(new Error(message)); - } - } - }, name, value); - }); - - it('Notifies the change', (done) => { - const instance = new PreferencesManager({ - file: file - }); - instance.once('settings-changed', (n, v) => { - assert.equal(n, name); - assert.equal(v, value); - done(); - }); - instance._changeHandler({ - sender: { - send: function() {} - } - }, name, value); - }); - }); -}); diff --git a/scripts/packages/arc-preferences/spec/preferences-proxy.renderer.spec.js b/scripts/packages/arc-preferences/spec/preferences-proxy.renderer.spec.js deleted file mode 100644 index 53a81c19..00000000 --- a/scripts/packages/arc-preferences/spec/preferences-proxy.renderer.spec.js +++ /dev/null @@ -1,137 +0,0 @@ -const { assert } = require('chai'); -const { ArcPreferencesProxy } = require('../renderer'); - -describe('ArcPreferencesProxy class - renderer process', function() { - function fire(type, detail) { - const e = new CustomEvent(type, { - bubbles: true, - cancelable: true, - detail - }); - document.body.dispatchEvent(e); - return e; - } - - describe('Reading data via web event', function() { - let instance; - beforeEach(() => { - instance = new ArcPreferencesProxy(); - instance.observe(); - }); - - afterEach(() => { - instance.unobserve(); - }); - - it('Handles the event', function() { - const e = fire('settings-read', {}); - assert.isTrue(e.defaultPrevented, 'Event is canceled'); - assert.ok(e.detail.result, 'Has promise on detail'); - }); - - it('Handler increases request id counter', function() { - fire('settings-read', {}); - assert.equal(instance.lastRequestId, 1); - }); - - it('Handler adds promise', function() { - fire('settings-read', {}); - const p = instance.promises[0]; - assert.typeOf(p, 'object'); - assert.equal(p.type, 'read'); - assert.equal(p.id, instance.lastRequestId); - assert.typeOf(p.resolve, 'function'); - }); - - it('Handler resolves the promise when ready', function() { - const e = fire('settings-read', {}); - const data = { test: true }; - setTimeout(() => { - instance._mainPrefsHandler({}, data, 1); - }, 1); - return e.detail.result - .then((settings) => { - assert.deepEqual(settings, data); - }); - }); - - it('Handler clears the promise when ready', function() { - const e = fire('settings-read', {}); - const data = { test: true }; - setTimeout(() => { - instance._mainPrefsHandler({}, data, 1); - }, 1); - return e.detail.result - .then(() => { - assert.lengthOf(instance.promises, 0); - }); - }); - }); - - describe('Storing data via web event', function() { - let instance; - const name = 'test-name'; - const value = 'test-value'; - beforeEach(() => { - instance = new ArcPreferencesProxy(); - instance.observe(); - }); - - afterEach(() => { - instance.unobserve(); - }); - - it('Handles the event', function() { - const e = fire('settings-changed', { name, value }); - assert.isTrue(e.defaultPrevented, 'Event is canceled'); - assert.ok(e.detail.result, 'Has promise on detail'); - }); - - it('Do not increase request ID', function() { - fire('settings-changed', { name, value }); - assert.equal(instance.lastRequestId, 0); - }); - - it('Handler adds promise', function() { - fire('settings-changed', { name, value }); - const p = instance.promises[0]; - assert.typeOf(p, 'object'); - assert.equal(p.type, 'store'); - assert.equal(p.name, name); - assert.typeOf(p.resolve, 'function'); - }); - - it('Handler resolves the promise when ready', function() { - const e = fire('settings-changed', { name, value }); - setTimeout(() => { - instance._mainChangedHandler({}, name, value); - }, 1); - return e.detail.result; - }); - - it('Handler clears the promise when ready', function() { - const e = fire('settings-changed', { name, value }); - setTimeout(() => { - instance._mainChangedHandler({}, name, value); - }, 1); - return e.detail.result - .then(() => { - assert.lengthOf(instance.promises, 0); - }); - }); - - it('dispatches non-cancelable settings-changed event', function(done) { - fire('settings-changed', { name, value }); - document.body.addEventListener('settings-changed', function f(e) { - document.body.removeEventListener('settings-changed', f); - assert.isFalse(e.cancelable, 'Event is not cancelable'); - assert.equal(e.detail.name, name, 'Name is set'); - assert.equal(e.detail.value, value, 'Value is set'); - done(); - }); - setTimeout(() => { - instance._mainChangedHandler({}, name, value); - }, 1); - }); - }); -}); diff --git a/scripts/packages/arc-preferences/spec/preferences.main.spec.js b/scripts/packages/arc-preferences/spec/preferences.main.spec.js deleted file mode 100644 index ff9d7243..00000000 --- a/scripts/packages/arc-preferences/spec/preferences.main.spec.js +++ /dev/null @@ -1,239 +0,0 @@ -const assert = require('chai').assert; -const path = require('path'); -const fs = require('fs-extra'); -const {ArcPreferences} = require('../'); -const testPaths = require('../../../../test/setup-paths'); - -describe('ArcPreferences class - main process', function() { - const basePath = testPaths.getBasePath(); - const file = path.join(basePath, 'test.json'); - - after(() => fs.remove(basePath)); - - describe('Setting up paths', function() { - it('Sets default paths', function() { - const instance = new ArcPreferences(); - assert.typeOf(instance.userSettingsDir, 'string'); - assert.typeOf(instance.settingsFile, 'string'); - }); - - it('Default file is settings.json', function() { - const instance = new ArcPreferences(); - assert.notEqual(instance.settingsFile.indexOf('settings.json'), -1); - }); - - it('Accepts "file" option', function() { - const data = 'path/to/a/file.json'; - const instance = new ArcPreferences({ - file: data - }); - assert.equal(instance.settingsFile, data); - }); - - it('Accepts "fileName" option', function() { - const data = 'other-file.json'; - const instance = new ArcPreferences({ - fileName: data - }); - assert.notEqual(instance.settingsFile.indexOf(data), -1); - }); - - it('Accepts "filePath" option', function() { - const data = path.join('path', 'to', 'a', 'file'); - const instance = new ArcPreferences({ - filePath: data - }); - assert.equal(instance.settingsFile, path.join(data, 'settings.json')); - }); - - it('Accepts "filePath" and "fileName" option', function() { - const p = path.join('path', 'to', 'a'); - const f = 'file.json'; - const instance = new ArcPreferences({ - filePath: p, - fileName: f - }); - assert.equal(instance.settingsFile, path.join('path', 'to', 'a', 'file.json')); - }); - - it('File overrides other options', function() { - const p = path.join('path', 'to', 'a'); - const f = 'file.json'; - const data = path.join('path', 'to', 'a', 'file.json'); - const instance = new ArcPreferences({ - filePath: p, - fileName: f, - file: data - }); - assert.equal(instance.settingsFile, data); - }); - - it('Appends filePath to application dir', function() { - const app = require('electron').app; - const ud = app.getPath('userData'); - const p = path.join('added', 'path'); - const f = 'file.json'; - const instance = new ArcPreferences({ - filePath: p, - fileName: f, - appendFilePath: true - }); - assert.equal(instance.userSettingsDir, path.join(ud, p)); - assert.equal(instance.settingsFile, path.join(ud, p, f)); - }); - }); - - describe('_resolvePath()', function() { - let instance; - before(() => { - instance = new ArcPreferences(); - }); - - it('Resolves ~ as home dir', function() { - const data = '~/path'; - const result = instance._resolvePath(data); - assert.notEqual(result, data); - assert.equal(result.indexOf('~'), -1); - assert.notEqual(result.indexOf('/path'), -1); - }); - - it('Returns the same path', function() { - const data = path.join('path', 'to', 'a', 'file.json'); - const result = instance._resolvePath(data); - assert.equal(result, data); - }); - }); - - describe('_restoreFile()', function() { - afterEach(() => { - return fs.remove(file); - }); - - it('Creates the file', function() { - const instance = new ArcPreferences(); - return instance._restoreFile(file) - .then(() => fs.pathExists(file)) - .then((exists) => assert.isTrue(exists)); - }); - - it('Reads file content', () => { - const data = { - test: true, - _restoreFile: true - }; - const instance = new ArcPreferences(); - return fs.outputJson(file, data) - .then(() => instance._restoreFile(file)) - .then((content) => { - assert.deepEqual(content, data); - }); - }); - }); - - describe('_storeFile()', () => { - const data = { - test: true, - _storeFile: true - }; - - afterEach(() => { - return fs.remove(file); - }); - - it('Creates the file', function() { - const instance = new ArcPreferences(); - return instance._storeFile(file, data) - .then(() => fs.pathExists(file)) - .then((exists) => assert.isTrue(exists)); - }); - - it('Writes to the file', function() { - const instance = new ArcPreferences(); - return instance._storeFile(file, data) - .then(() => fs.readJson(file)) - .then((content) => { - assert.deepEqual(content, data); - }); - }); - }); - - describe('load()', function() { - const data = { - test: true, - load: true - }; - - afterEach(() => { - return fs.remove(file); - }); - - it('Returns empty data for non existing file', function() { - const instance = new ArcPreferences({ - file - }); - return instance.load() - .then((content) => { - assert.deepEqual(content, {}); - }); - }); - - it('Returns defaultSettings for non existing file', function() { - const instance = new ArcPreferences({ - file - }); - instance.defaultSettings = function() { - return Promise.resolve(data); - }; - return instance.load() - .then((content) => { - assert.deepEqual(content, data); - }); - }); - - it('Creates the file with default data', function() { - const instance = new ArcPreferences({ - file - }); - instance.defaultSettings = function() { - return Promise.resolve(data); - }; - return instance.load() - .then(() => fs.readJson(file)) - .then((content) => { - assert.deepEqual(content, data); - }); - }); - - it('Sets up "__settings"', function() { - const instance = new ArcPreferences({ - file - }); - instance.defaultSettings = function() { - return Promise.resolve(data); - }; - return instance.load() - .then(() => { - assert.deepEqual(instance.__settings, data); - }); - }); - - it('Returns "__settings" when available', function() { - const instance = new ArcPreferences({ - file - }); - instance.defaultSettings = function() { - return Promise.resolve(data); - }; - let settings; - return instance.load() - .then(() => { - settings = instance.__settings; - settings.testValue = true; - return instance.load(); - }) - .then((content) => { - assert.deepEqual(content, settings); - }); - }); - }); -}); diff --git a/scripts/packages/arc-preferences/spec/preferences.renderer.spec.js b/scripts/packages/arc-preferences/spec/preferences.renderer.spec.js deleted file mode 100644 index 92755786..00000000 --- a/scripts/packages/arc-preferences/spec/preferences.renderer.spec.js +++ /dev/null @@ -1,213 +0,0 @@ -const assert = require('chai').assert; -const path = require('path'); -const fs = require('fs-extra'); -const {ArcPreferences} = require('../'); - -describe('ArcPreferences class - renderer process', function() { - const file = path.join('test', 'test.json'); - before(() => { - process.env.ARC_HOME = '~/test'; - }); - - describe('Setting up paths', function() { - it('Accepts "file" option', function() { - const data = 'path/to/a/file.json'; - const instance = new ArcPreferences({ - file: data - }); - assert.equal(instance.settingsFile, data); - }); - - it('Accepts "fileName" option', function() { - const data = 'other-file.json'; - const instance = new ArcPreferences({ - fileName: data - }); - assert.notEqual(instance.settingsFile.indexOf(data), -1); - }); - - it('Accepts "filePath" option', function() { - const data = 'path/to/a/file/'; - const instance = new ArcPreferences({ - filePath: data - }); - assert.equal(instance.settingsFile, data + 'settings.json'); - }); - - it('Accepts "filePath" and "fileName" option', function() { - const p = 'path/to/a'; - const f = 'file.json'; - const instance = new ArcPreferences({ - filePath: p, - fileName: f - }); - assert.equal(instance.settingsFile, 'path/to/a/file.json'); - }); - - it('File overrides other options', function() { - const p = 'path/to/a'; - const f = 'file.json'; - const data = 'path/to/a/file.json'; - const instance = new ArcPreferences({ - filePath: p, - fileName: f, - file: data - }); - assert.equal(instance.settingsFile, data); - }); - }); - - describe('_resolvePath()', function() { - let instance; - before(() => { - instance = new ArcPreferences(); - }); - - it('Resolves ~ as home dir', function() { - const data = '~/path'; - const result = instance._resolvePath(data); - assert.notEqual(result, data); - assert.equal(result.indexOf('~'), -1); - assert.notEqual(result.indexOf('/path'), -1); - }); - - it('Returns the same path', function() { - const data = 'path/to/a/file.json'; - const result = instance._resolvePath(data); - assert.equal(result, data); - }); - }); - - describe('_restoreFile()', function() { - after(() => { - return fs.remove(file); - }); - - it('Creates the file', function() { - const instance = new ArcPreferences(); - return instance._restoreFile(file) - .then(() => fs.pathExists(file)) - .then((exists) => assert.isTrue(exists)); - }); - - it('Reads file content', () => { - const data = { - test: true, - _restoreFile: true - }; - const instance = new ArcPreferences(); - return fs.outputJson(file, data) - .then(() => instance._restoreFile(file)) - .then((content) => { - assert.deepEqual(content, data); - }); - }); - }); - - describe('_storeFile()', () => { - const data = { - test: true, - _storeFile: true - }; - - after(() => { - return fs.remove(file); - }); - - it('Creates the file', function() { - const instance = new ArcPreferences(); - return instance._storeFile(file, data) - .then(() => fs.pathExists(file)) - .then((exists) => assert.isTrue(exists)); - }); - - it('Writes to the file', function() { - const instance = new ArcPreferences(); - return instance._storeFile(file, data) - .then(() => fs.readJson(file)) - .then((content) => { - assert.deepEqual(content, data); - }); - }); - }); - - describe('load()', function() { - const data = { - test: true, - load: true - }; - - after(() => { - return fs.remove(file); - }); - - it('Returns empty data for non existing file', function() { - const instance = new ArcPreferences({ - file - }); - return instance.load() - .then((content) => { - assert.deepEqual(content, {}); - }); - }); - - it('Returns defaultSettings for non existing file', function() { - const instance = new ArcPreferences({ - file - }); - instance.defaultSettings = function() { - return Promise.resolve(data); - }; - return instance.load() - .then((content) => { - assert.deepEqual(content, data); - }); - }); - - it('Creates the file with default data', function() { - const instance = new ArcPreferences({ - file - }); - instance.defaultSettings = function() { - return Promise.resolve(data); - }; - return instance.load() - .then(() => fs.readJson(file)) - .then((content) => { - assert.deepEqual(content, data); - }); - }); - - it('Sets up "__settings"', function() { - const instance = new ArcPreferences({ - file - }); - instance.defaultSettings = function() { - return Promise.resolve(data); - }; - return instance.load() - .then(() => { - assert.deepEqual(instance.__settings, data); - }); - }); - - it('Returns "__settings" when available', function() { - const instance = new ArcPreferences({ - file - }); - instance.defaultSettings = function() { - return Promise.resolve(data); - }; - let settings; - return instance.load() - .then(() => { - settings = instance.__settings; - settings.testValue = true; - return instance.load(); - }) - .then((content) => { - assert.deepEqual(content, settings); - }); - }); - }); -}); diff --git a/scripts/packages/arc-preferences/spec/session-control.main.spec.js b/scripts/packages/arc-preferences/spec/session-control.main.spec.js deleted file mode 100644 index 2e33bfa2..00000000 --- a/scripts/packages/arc-preferences/spec/session-control.main.spec.js +++ /dev/null @@ -1,264 +0,0 @@ -const assert = require('chai').assert; -const fs = require('fs-extra'); -const path = require('path'); -const {ArcSessionControl} = require('../main'); - -describe('ArcSessionControl class - main process', function() { - describe('Initialization', function() { - it('Sets "id" property', function() { - const instance = new ArcSessionControl(1); - assert.equal(instance.id, 1); - }); - - it('Sets "settingsFile" path with "sessions" directory', () => { - const instance = new ArcSessionControl(0); - const compare = path.join('sessions', '0.json'); - assert.notEqual(instance.settingsFile.indexOf(compare), -1); - }); - - it('"settingsFile" is in app directory', () => { - const instance = new ArcSessionControl(0); - const app = require('electron').app; - const ud = app.getPath('userData'); - const compare = path.join(ud, 'sessions', '0.json'); - assert.equal(instance.settingsFile, compare); - }); - }); - - describe('_numberValue()', function() { - let instance; - before(() => { - instance = new ArcSessionControl(0); - }); - - it('Accepts numeric value', function() { - const result = instance._numberValue(5, 1); - assert.equal(result, 5); - }); - - it('Accepts string numeric value', function() { - const result = instance._numberValue('5', 1); - assert.equal(result, 5); - }); - - it('Accepts default value for undefined', function() { - const result = instance._numberValue(undefined, 1); - assert.equal(result, 1); - }); - - it('Accepts default value for NaN', function() { - const result = instance._numberValue('undefined', 1); - assert.equal(result, 1); - }); - }); - - describe('_readAppScreenSize()', function() { - let instance; - before(() => { - instance = new ArcSessionControl(2); - }); - - it('Returns defaults when no argument', function() { - const result = instance._readAppScreenSize(); - assert.typeOf(result, 'object'); - assert.equal(result.width, instance._defaultWidth); - assert.equal(result.height, instance._defaultHeight); - }); - - it('Returns defaults when argument is missing size', function() { - const result = instance._readAppScreenSize({}); - assert.typeOf(result, 'object'); - assert.equal(result.width, instance._defaultWidth); - assert.equal(result.height, instance._defaultHeight); - }); - - it('Returns defaults when size is incorrect', function() { - const result = instance._readAppScreenSize({ - size: { - width: 'width', - height: 'height' - } - }); - assert.typeOf(result, 'object'); - assert.equal(result.width, instance._defaultWidth); - assert.equal(result.height, instance._defaultHeight); - }); - - it('Returns 0s for negative values', function() { - const result = instance._readAppScreenSize({ - size: { - width: -5, - height: -10 - } - }); - assert.typeOf(result, 'object'); - assert.equal(result.width, 0); - assert.equal(result.height, 0); - }); - - it('Returns stored values as numbers', function() { - const result = instance._readAppScreenSize({ - size: { - width: '5', - height: '10' - } - }); - assert.typeOf(result, 'object'); - assert.equal(result.width, 5); - assert.equal(result.height, 10); - }); - }); - - describe('_readAppScreenPosition()', function() { - let instance; - before(() => { - instance = new ArcSessionControl(2); - }); - - it('Returns defaults when no argument', function() { - const result = instance._readAppScreenPosition(); - assert.typeOf(result, 'object'); - assert.isUndefined(result.x); - assert.isUndefined(result.y); - }); - - it('Returns defaults when argument is missing position', function() { - const result = instance._readAppScreenPosition({}); - assert.typeOf(result, 'object'); - assert.isUndefined(result.x); - assert.isUndefined(result.y); - }); - - it('Returns defaults when position is incorrect', function() { - const result = instance._readAppScreenPosition({ - position: { - x: 'x', - y: 'y' - } - }); - assert.typeOf(result, 'object'); - assert.isUndefined(result.x); - assert.isUndefined(result.y); - }); - - it('Returns defaults for negative values', function() { - const result = instance._readAppScreenPosition({ - position: { - x: -5, - y: -10 - } - }); - assert.typeOf(result, 'object'); - assert.equal(result.x, 0); - assert.equal(result.y, 0); - }); - - it('Returns stored values as numbers', function() { - const result = instance._readAppScreenPosition({ - position: { - x: '5', - y: '10' - } - }); - assert.typeOf(result, 'object'); - assert.equal(result.x, 5); - assert.equal(result.y, 10); - }); - }); - - describe('Reading data', function() { - let instance; - beforeEach(() => { - instance = new ArcSessionControl(2); - }); - - afterEach(() => { - return fs.remove(instance.settingsFile); - }); - - it('Returns default data', (done) => { - instance.load() - .then((data) => { - setTimeout(() => { - const size = data.size; - const position = data.position; - assert.typeOf(size, 'object'); - assert.equal(size.width, instance._defaultWidth); - assert.equal(size.height, instance._defaultHeight); - assert.typeOf(position, 'object'); - assert.isUndefined(position.x); - assert.isUndefined(position.y); - done(); - }, 1); - }); - }); - }); - - describe('updateSize()', function() { - let instance; - beforeEach(() => { - instance = new ArcSessionControl(2); - instance.storeDebounce = 1; - }); - - afterEach(() => { - return fs.remove(instance.settingsFile); - }); - - it('Updates __settings object', (done) => { - instance.updateSize(1, 2); - assert.equal(instance.__settings.size.width, 1); - assert.equal(instance.__settings.size.height, 2); - setTimeout(() => done(), 2); - }); - - it('Saves values to the file', (done) => { - instance.updateSize(1, 2); - setTimeout(() => { - fs.readJson(instance.settingsFile) - .then((data) => { - assert.equal(data.size.width, 1); - assert.equal(data.size.height, 2); - done(); - }) - .catch((cause) => { - done(cause); - }); - }, 15); - }); - }); - - describe('updatePosition()', function() { - let instance; - beforeEach(() => { - instance = new ArcSessionControl(2); - instance.storeDebounce = 1; - }); - - afterEach(() => { - return fs.remove(instance.settingsFile); - }); - - it('Updates __settings object', (done) => { - instance.updatePosition(1, 2); - assert.equal(instance.__settings.position.x, 1); - assert.equal(instance.__settings.position.y, 2); - setTimeout(() => done(), 2); - }); - - it('Saves values to the file', (done) => { - instance.updatePosition(1, 2); - setTimeout(() => { - fs.readJson(instance.settingsFile) - .then((data) => { - assert.equal(data.position.x, 1); - assert.equal(data.position.y, 2); - done(); - }) - .catch((cause) => { - done(cause); - }); - }, 15); - }); - }); -}); diff --git a/scripts/packages/arc-preferences/spec/workspace-manager.renderer.spec.js b/scripts/packages/arc-preferences/spec/workspace-manager.renderer.spec.js deleted file mode 100644 index ed79783b..00000000 --- a/scripts/packages/arc-preferences/spec/workspace-manager.renderer.spec.js +++ /dev/null @@ -1,118 +0,0 @@ -const assert = require('chai').assert; -const path = require('path'); -const fs = require('fs-extra'); -const {WorkspaceManager} = require('../renderer'); - -describe('ArcPreferencesProxy class - renderer process', function() { - function fire(type, detail) { - const e = new CustomEvent(type, { - bubbles: true, - cancelable: true, - detail - }); - document.body.dispatchEvent(e); - return e; - } - const file = path.join('test', 'workspace.json'); - const defaultSate = { - requests: [], - selected: 0, - environment: 'default' - }; - - describe('Web events', function() { - describe('Read event', function() { - const type = 'workspace-state-read'; - let instance; - beforeEach(() => { - instance = new WorkspaceManager(file); - instance.observe(); - }); - afterEach(() => { - instance.unobserve(); - return fs.remove(file); - }); - - it('Cancels the custom event', function(done) { - const e = fire(type, {}); - e.detail.result - .then(() => { - setTimeout(() => { - assert.isTrue(e.defaultPrevented); - done(); - }, 1); - }); - }); - - it('Returns default worspace state', function(done) { - const e = fire(type, {}); - e.detail.result - .then((data) => { - setTimeout(() => { - assert.deepEqual(data, defaultSate); - done(); - }, 1); - }); - }); - - it('Returns file contents', function(done) { - const data = {test: true}; - fs.outputJson(file, data) - .then(() => { - const e = fire(type, {}); - return e.detail.result; - }) - .then((state) => { - setTimeout(() => { - assert.deepEqual(state, data); - done(); - }, 1); - }); - }); - }); - - describe('Store event', function() { - const type = 'workspace-state-store'; - const data = { - workspaceTest: true - }; - let instance; - beforeEach(() => { - instance = new WorkspaceManager(file); - instance.observe(); - instance.initialized = true; - instance.storeDebounce = 1; - }); - afterEach(() => { - instance.unobserve(); - return fs.remove(file); - }); - - it('Cancels custom event', function(done) { - const e = fire(type, {value: data}); - assert.isTrue(e.defaultPrevented); - setTimeout(() => done(), instance.storeDebounce + 1); - }); - - it('Updates "__settings" object', function(done) { - fire(type, {value: data}); - assert.deepEqual(instance.__settings, data); - setTimeout(() => done(), instance.storeDebounce + 1); - }); - - it('Stores data in file after storeDebounce time', function(done) { - fire(type, {value: data}); - setTimeout(() => { - fs.readJson(file) - .then((state) => { - assert.deepEqual(state, data); - done(); - }) - .catch((cause) => { - done(cause); - }); - }, 150); - }); - }); - }); -}); diff --git a/scripts/packages/communication-protocol/main/index.js b/scripts/packages/communication-protocol/main/index.js deleted file mode 100644 index 11eff048..00000000 --- a/scripts/packages/communication-protocol/main/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.CommunicationProtocol = require('./protocol').CommunicationProtocol; diff --git a/scripts/packages/communication-protocol/main/protocol.js b/scripts/packages/communication-protocol/main/protocol.js deleted file mode 100644 index 638db198..00000000 --- a/scripts/packages/communication-protocol/main/protocol.js +++ /dev/null @@ -1,85 +0,0 @@ -const net = require('net'); -const log = require('../../../main/logger'); -const { RemoteApi } = require('./remote-api'); -const argv = require('yargs'); -/** - * A class that allow to connect to the application via HTTP server and - * send instructions to the app so it can be controlled externally. - */ -class CommunicationProtocol { - /** - * @param {Number} port A port number to create a communication server. - */ - constructor(port) { - this.port = port; - this.api = new RemoteApi(); - this._clients = []; - this._connectedHandler = this._connectedHandler.bind(this); - this.nl = '\n'; - } - - start() { - log.debug('Initializing remote protocol on port ' + this.port); - const server = net.createServer(this._connectedHandler); - server.on('error', (err) => { - log.error(err); - }); - server.listen(this.port, () => { - console.log('server bound'); - }); - } - - _connectedHandler(client) { - log.debug('[ARC-REMOTE] Accepting client.'); - this._clients.push(client); - - client.on('end', () => this._removeClient(client)); - client.on('error', () => this._removeClient(client, true)); - client.on('data', (message) => this._processMessage(client, message)); - - client.write('arc-client-ready' + this.nl); - } - - _removeClient(client, disconnect) { - log.debug('[ARC-REMOTE] Removing client.'); - for (let i = 0, len = this._clients.length; i < len; i++) { - if (this._clients[i] === client) { - if (disconnect && !client.destroyed) { - client.destroy(); - } - this._clients.splice(i, 1); - return; - } - } - } - - _processMessage(client, message) { - if (typeof message !== 'string') { - message = message.toString(); - } - const params = argv(message).argv; - const command = params._[0]; - Object.keys(params).forEach((key) => { - if (key === '_' || key === '$0' || typeof params[key] !== 'string') { - return; - } - let value = params[key]; - if (value[0] === '"' && value[value.length - 1] === '"') { - value = value.substr(1, value.length - 1); - params[key] = value; - } - }); - switch (command) { - case 'get-application-settings-file-location': - // either default or user set file. - client.write(global.arc.prefs.settingsFile + this.nl); - break; - case 'create-new-tab': - return this.api.newTab(params); - default: - log.warn('[ARC-REMOTE] Skiping unknown message: ' + message); - client.write('unknown-command' + this.nl); - } - } -} -exports.CommunicationProtocol = CommunicationProtocol; diff --git a/scripts/packages/communication-protocol/main/remote-api.js b/scripts/packages/communication-protocol/main/remote-api.js deleted file mode 100644 index 97ee651d..00000000 --- a/scripts/packages/communication-protocol/main/remote-api.js +++ /dev/null @@ -1,172 +0,0 @@ -const log = require('../../../main/logger'); -const { BrowserWindow, ipcMain } = require('electron'); -const { ArcBase } = require('../../../main/arc-base'); -/** - * A class responsible for handling remote API operations. - */ -class RemoteApi extends ArcBase { - /** - * Returns focused, first available or newly created window (in that order). - * New window is started when there's no winow opened. - * - * @return {Promise} Promise resolved to a BrowserWindow object. - */ - getActiveWindow() { - log.debug('Getting active window...'); - const win = BrowserWindow.getFocusedWindow(); - if (win) { - return Promise.resolve(win); - } - log.debug('Focused window not found. Getting any first window.'); - const wins = BrowserWindow.getAllWindows(); - if (wins && wins.length) { - return Promise.resolve(wins[0]); - } - log.debug('No windows found. Creating a window.'); - return global.arc.wm.open(); - } - - /** - * Allows to update a request object in active window and specific tab. - * By defaulty currently selected tab is used. - * If there's no winowd new one is be created. If any window isn't focused - * first window is used. - * - * @param {Object} requestObj ARC request object - * @param {?Number} tab Tab index in the window. - * @return {Promise} Promise resolved when the command was sent to the window. - */ - updateRequest(requestObj, tab) { - log.debug('[RemoteApi] Updating tab request', tab); - return this.getActiveWindow() - .then((win) => { - log.debug('Updating request in active window. Update tab is', tab); - win.webContents.send('request-action', 'update-request', requestObj, tab); - }); - } - - /** - * Opens a new tab currently focused window or first window of the list of - * opened windows, or creates a new window if can't determine current window. - * - * @return {Promise} Promise resolved when command was sent to window - */ - newTab() { - log.debug('[RemoteApi] Creating new tab'); - return this.getActiveWindow() - .then((win) => { - win.webContents.send('request-action', 'new-tab'); - }); - } - /** - * Returns a number of tabs for given window index. - * Currently focused or first window is used if the index is not provided. - * - * @param {?Number} windowIndex The index of the window - * @return {Promise} Promise resolved to number of tabs. - */ - getTabsCount(windowIndex) { - log.debug('[RemoteApi] Counting tabs in window', windowIndex); - let p; - if (typeof windowIndex === 'number') { - const win = BrowserWindow.getAllWindows()[windowIndex]; - if (!win) { - log.warn('[RemoteApi] Window ' + windowIndex + ' not found'); - return Promise.reject(new Error('Window for given index does not exists')); - } - p = Promise.resolve(win); - } else { - p = this.getActiveWindow(); - } - return p - .then((win) => this.getTabsCountForWindow(win)); - } - /** - * Returns a number of tabs for given window object. - * - * @param {BrowserWindow} win The window object - * @return {Promise} Promise resolved to number of tabs. - */ - getTabsCountForWindow(win) { - const id = this.nextIpcRequestId(); - const p = this.appendPromise(id); - ipcMain.once('current-tabs-count', this._ipcPromiseCallback); - win.webContents.send('command', 'get-tabs-count', id); - return p; - } - - /** - * Sets a tab active for given window. - * Active window is used if the index is not provided. - * - * @param {Number} tabIndex Index of the tab to set active. - * @param {?Number} windowIndex The index of the window - * @return {Promise} Promise resolved when command was send. - */ - activateTab(tabIndex, windowIndex) { - log.debug('[RemoteApi] Setting tab ' + tabIndex + ' active on window ' + windowIndex); - let p; - if (typeof windowIndex === 'number') { - const win = BrowserWindow.getAllWindows()[windowIndex]; - if (!win) { - log.warn('[RemoteApi] Window ' + windowIndex + ' not found'); - return Promise.reject(new Error('Window for given index does not exists')); - } - p = Promise.resolve(win); - } else { - p = this.getActiveWindow(); - } - return p - .then((win) => this.activateTabForWindow(tabIndex, win)); - } - /** - * Activates request tab in given window. - * - * @param {Number} tabIndex Index of the tab to set active. - * @param {BrowserWindow} win Window to use as a command target. - * @return {Promise} - */ - activateTabForWindow(tabIndex, win) { - const id = this.nextIpcRequestId(); - const p = this.appendPromise(id); - ipcMain.once('tab-activated', this._ipcPromiseCallback); - win.webContents.send('command', 'activate-tab', id, tabIndex); - return p; - } - /** - * Returns request data for given tab and window id. - * @param {Number} tabIndex Index of the tab to get the data from. - * @param {?Number} windowIndex The index of the window - * @return {Promise} A promise resolved to the ARC request object. - */ - getRequest(tabIndex, windowIndex) { - log.debug('[RemoteApi] Reading request data from tab ' + tabIndex + ' active on window ' + windowIndex); - let p; - if (typeof windowIndex === 'number') { - const win = BrowserWindow.getAllWindows()[windowIndex]; - if (!win) { - log.warn('[RemoteApi] Window ' + windowIndex + ' not found'); - return Promise.reject(new Error('Window for given index does not exists')); - } - p = Promise.resolve(win); - } else { - p = this.getActiveWindow(); - } - return p - .then((win) => this.getRequestForWindow(tabIndex, win)); - } - /** - Returns request data for given tab id and window. - * @param {Number} tabIndex Index of the tab to get the data from. - * @param {BrowserWindow} win Target window. - * @return {Promise} A promise resolved to the ARC request object. - */ - getRequestForWindow(tabIndex, win) { - const id = this.nextIpcRequestId(); - const p = this.appendPromise(id); - ipcMain.once('request-data', this._ipcPromiseCallback); - win.webContents.send('command', 'get-request-data', id, tabIndex); - return p; - } -} -exports.RemoteApi = RemoteApi; diff --git a/scripts/packages/context-actions/main/context-actions.js b/scripts/packages/context-actions/main/context-actions.js deleted file mode 100644 index d44e7e70..00000000 --- a/scripts/packages/context-actions/main/context-actions.js +++ /dev/null @@ -1,69 +0,0 @@ -const log = require('../../../main/logger'); -/** - * A class responsible for gathering information about registered context menu - * actions and creating a configuration for opened windows. - */ -class ContextActions { - /** - * Registers application default actions on the window object. - * - * @param {Object} webContents A web contents object of the renderer process - */ - registerDefaultActions(webContents) { - log.debug('Registering window default context menu actions'); - this._addCloseTab(webContents); - this._addCloseAllTabs(webContents); - this._addCloseOtherTabs(webContents); - this._addDuplicateTab(webContents); - } - /** - * Adds default action to close request workspace tab. - * - * @param {Object} webContents - */ - _addCloseTab(webContents) { - webContents.send('register-context-action', { - label: 'Close tab', - selector: 'anypoint-tab > span.tab-name', - action: 'request-panel-close-tab' - }); - } - /** - * Adds default action to close all request workspace tab. - * - * @param {Object} webContents - */ - _addCloseAllTabs(webContents) { - webContents.send('register-context-action', { - label: 'Close all tabs', - selector: 'anypoint-tab > span.tab-name', - action: 'request-panel-close-all-tabs' - }); - } - /** - * Adds default action to close all request workspace tab. - * - * @param {Object} webContents - */ - _addCloseOtherTabs(webContents) { - webContents.send('register-context-action', { - label: 'Close other tabs', - selector: 'anypoint-tab > span.tab-name', - action: 'request-panel-close-other-tabs' - }); - } - - /** - * Adds default action to close all request workspace tab. - * - * @param {Object} webContents - */ - _addDuplicateTab(webContents) { - webContents.send('register-context-action', { - label: 'Duplicate tab', - selector: 'anypoint-tab > span.tab-name', - action: 'request-panel-duplicate-tab' - }); - } -} -exports.ContextActions = ContextActions; diff --git a/scripts/packages/context-actions/main/index.js b/scripts/packages/context-actions/main/index.js deleted file mode 100644 index 2a2d131f..00000000 --- a/scripts/packages/context-actions/main/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.ContextActions = require('./context-actions').ContextActions; diff --git a/scripts/packages/context-actions/renderer/context-menu.js b/scripts/packages/context-actions/renderer/context-menu.js deleted file mode 100644 index 3e55c6c5..00000000 --- a/scripts/packages/context-actions/renderer/context-menu.js +++ /dev/null @@ -1,276 +0,0 @@ -const ipc = require('electron').ipcRenderer; -const log = require('electron-log'); -/** - * A class responsible to render and handle actions related to context menu. - */ -class ArcContextMenu { - /** - * @constructor - */ - constructor() { - this.contextActions = []; - this._registerAction = this._registerAction.bind(this); - this._unregisterContextAction = this._unregisterContextAction.bind(this); - this._contextMenuHandler = this._contextMenuHandler.bind(this); - this._selectionHandler = this._selectionHandler.bind(this); - this._clickHandler = this._clickHandler.bind(this); - } - /** - * Reference to the main application window. - * - * @return {HtmlElement} - */ - get app() { - return document.getElementById('app'); - } - /** - * Listens for main process and window events. - */ - listenMainEvents() { - ipc.on('register-context-action', this._registerAction); - ipc.on('unregister-context-action', this._unregisterContextAction); - window.addEventListener('contextmenu', this._contextMenuHandler); - document.body.addEventListener('click', this._clickHandler); - } - /** - * Handler for `register-context-action` main process event. - * - * @param {EventEmitter} e - * @param {Object} action - */ - _registerAction(e, action) { - this.addAction(action); - } - /** - * Registers an action. - * @param {Object} action Description of the action. Each action has to contain - * the following propertues: - * - `label` String, laber to render in the context menu. - * - `selector` String, CSS selector to match the action. - * - `action` String Action name. If the module that adds the action is main - * process mo0dule it must prefix the action with `'main:`, then listen for - * `context-action:[action-name]` on the ipcMain. If the module works in the - * renderer process then it must prefix the action with `renderer:`, then - * handle a CustomEvent on the window object that is of a type of `context-action:[action-name]`. - * No additional arguments are provided for the event. - * @throws {Error} An error when the argument is invalid. - */ - addAction(action) { - if (!this._valid(action)) { - throw new Error('The context menu action is Not valid.'); - } - this.contextActions.push(action); - } - /** - * Removes previously registered action. - * @param {String|Object} action An action object used to register an action - * or action's action property value. - * @return {Boolean} True if the action has been removed. - * @throws {Error} An error when the argument is invalid. - */ - removeAction(action) { - if (!action) { - throw new Error('The "action" argument is required'); - } - if (typeof action !== 'string') { - if (!this._valid(action)) { - throw new Error('The "action" argument is invalid'); - } - action = action.action; - } - const index = this.contextActions.findIndex((i) => i.action === action); - if (index === -1) { - log.debug('Context menu action ' + action + ' is not registered.'); - return false; - } - this.contextActions.splice(index, 1); - return true; - } - /** - * Tests if passed action is a valid context action. - * - * @param {Object} action - * @return {Boolean} - */ - _valid(action) { - if (!action || !action.label || !action.selector || !action.action) { - return false; - } - return true; - } - /** - * A handler for `contextmenu` event dispatched when the user right click on - * an element. - * If the target element matches any selector of registered actions it will - * be added to the list of results to dropdown menu. - * - * @param {MouseEvent} e - */ - _contextMenuHandler(e) { - this.removeActions(); - const target = e.composedPath()[0]; - if (!target) { - return; - } - const actions = []; - for (let i = 0, len = this.contextActions.length; i < len; i++) { - const data = this.contextActions[i]; - if (target.matches(data.selector)) { - actions.push(data); - } - } - if (actions.length) { - this._lastTarget = target; - const { x, y } = e; - this.renderActions(actions, { x, y }); - } - } - /** - * Unregisters context action. - * - * @param {EventEmitter} e - * @param {Object} action - */ - _unregisterContextAction(e, action) { - this.removeAction(action); - } - /** - * Renders context menu actions. - * - * @param {Array} actions List of actions to render - * @param {Object} xy An object with `x` and `y` coordinates of click. - */ - renderActions(actions, xy) { - this.removeActions(); - const box = document.createElement('anypoint-listbox'); - box.addEventListener('selected-changed', this._selectionHandler); - actions.forEach((action) => { - const item = document.createElement('anypoint-item'); - item.innerText = action.label; - item.dataset.action = action.action; - box.appendChild(item); - }); - this._currentMenu = box; - this._currentActions = actions; - box.className = 'arc-context-menu'; - box.style.top = xy.y + 'px'; - box.style.left = xy.x + 'px'; - document.body.appendChild(box); - } - /** - * Removes context menu view from the document. - */ - removeActions() { - if (!this._currentMenu) { - return; - } - this._currentMenu.removeEventListener('selected-changed', - this._selectionHandler); - document.body.removeChild(this._currentMenu); - this._currentMenu = undefined; - this._currentActions = undefined; - } - /** - * Handler for menu selection. - * - * @param {CustomEvent} e - */ - _selectionHandler(e) { - const action = this._currentActions[e.detail.value]; - this.removeActions(); - if (!action) { - this._lastTarget = undefined; - return; - } - this._handleAction(action); - } - /** - * Handles application default actions when calling main process is not - * needed. - * - * @param {Object} action Action definition - */ - _handleAction(action) { - switch (action.action) { - case 'request-panel-close-tab': - this.app.closeWorkspaceTab(this._getTabClickIndex()); - break; - case 'request-panel-close-all-tabs': - this.app.closeAllWorkspaceTabs(); - break; - case 'request-panel-close-other-tabs': - this.app.closeOtherWorkspaceTabs(this._getTabClickIndex()); - break; - case 'request-panel-duplicate-tab': - this.app.duplicateWorkspaceTab(this._getTabClickIndex()); - break; - default: - this._handleDefaultAction(action.action); - break; - } - } - - _handleDefaultAction(action) { - const rIndex = action.indexOf('renderer:'); - if (rIndex === 0) { - const actionName = action.substr(9); - this._dispatchRendererAction(actionName); - return; - } - const mIndex = action.indexOf('main:'); - if (mIndex === 0) { - const actionName = action.substr(5); - this._dispatchMainAction(actionName); - return; - } - log.warn('Unknown context menu action: ' + action); - } - /** - * Dispatches web custom event with type as a comination of `context-action:` - * and `action`. Module that requested the action should listen on the - * window object for the event. - * @param {String} action Registered action name. - */ - _dispatchRendererAction(action) { - const eventNamed = 'context-action:' + action; - document.body.dispatchEvent(new CustomEvent(eventNamed, { - bubbles: true, - cancelable: true - })); - } - /** - * Dispatches IPC event to the main process with name as a comination of `context-action:` - * and `action`. Module that requested the action should listen on ipcMain instance - * for the event. - * @param {String} action Registered action name. - */ - _dispatchMainAction(action) { - const eventNamed = 'context-action:' + action; - ipc.send(eventNamed); - } - /** - * Gets an index of the tab which is the source of one of the pre-build actions. - * @return {Number} An index of the tab - */ - _getTabClickIndex() { - const tab = this._lastTarget.parentElement; - return Array.from(tab.parentElement.children).indexOf(tab); - } - /** - * Closes menu action. - * - * @param {MouseEvent} e - */ - _clickHandler(e) { - if (!this._currentMenu) { - return; - } - const path = e.composedPath(); - const inside = path.some((item) => item === this._currentMenu); - if (!inside) { - this.removeActions(); - this._lastTarget = undefined; - } - } -} -exports.ArcContextMenu = ArcContextMenu; diff --git a/scripts/packages/context-actions/renderer/index.js b/scripts/packages/context-actions/renderer/index.js deleted file mode 100644 index 5fa24b03..00000000 --- a/scripts/packages/context-actions/renderer/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.ArcContextMenu = require('./context-menu').ArcContextMenu; diff --git a/scripts/packages/context-actions/spec/context-menu.renderer.spec.js b/scripts/packages/context-actions/spec/context-menu.renderer.spec.js deleted file mode 100644 index 42d174d3..00000000 --- a/scripts/packages/context-actions/spec/context-menu.renderer.spec.js +++ /dev/null @@ -1,439 +0,0 @@ -const { assert } = require('chai'); -const { ArcContextMenu } = require('../renderer'); -const sinon = require('sinon'); - -describe('ArcContextMenu', function() { - before(function() { - const app = document.createElement('div'); - app.id = 'app'; - app.closeWorkspaceTabCalledCount = 0; - app.closeWorkspaceTab = function() { - app.closeWorkspaceTabCalledCount++; - }; - app.closeAllWorkspaceTabsCalledCount = 0; - app.closeAllWorkspaceTabs = function() { - app.closeAllWorkspaceTabsCalledCount++; - }; - app.closeOtherWorkspaceTabsCalledCount = 0; - app.closeOtherWorkspaceTabs = function() { - app.closeOtherWorkspaceTabsCalledCount++; - }; - app.duplicateWorkspaceTabCalledCount = 0; - app.duplicateWorkspaceTab = function() { - app.duplicateWorkspaceTabCalledCount++; - }; - document.body.appendChild(app); - - const target = document.createElement('p'); - target.className = 'target-class'; - document.body.appendChild(target); - - const nonTarget = document.createElement('p'); - nonTarget.className = 'non-target-class'; - document.body.appendChild(nonTarget); - }); - - describe('listenMainEvents()', () => { - let instance; - before(function() { - instance = new ArcContextMenu(); - }); - - it('Registers contextmenu listener', () => { - const stub = sinon.stub(instance, '_contextMenuHandler'); - instance.listenMainEvents(); - const e = new MouseEvent('contextmenu', { - bubbles: true, - clientX: 100, - clientY: 100 - }); - document.body.dispatchEvent(e); - assert.isTrue(stub.called); - }); - - it('Registers click listener', () => { - const stub = sinon.stub(instance, '_clickHandler'); - instance.listenMainEvents(); - const e = new MouseEvent('click', { - view: window, - bubbles: true, - cancelable: true, - clientX: 100, - clientY: 100 - }); - document.body.dispatchEvent(e); - assert.isTrue(stub.called); - }); - }); - - describe('app()', () => { - let instance; - before(function() { - instance = new ArcContextMenu(); - }); - - it('Returns an element', () => { - const result = instance.app; - assert.ok(result); - }); - }); - - describe('_valid()', function() { - let instance; - before(function() { - instance = new ArcContextMenu(); - }); - - it('Returns false if no argument', () => { - const result = instance._valid(); - assert.isFalse(result); - }); - - it('Returns false if no label', () => { - const result = instance._valid({ - selector: 'a', - action: 'test' - }); - assert.isFalse(result); - }); - - it('Returns false if no selector', () => { - const result = instance._valid({ - label: 'a', - action: 'test' - }); - assert.isFalse(result); - }); - - it('Returns false if no action', () => { - const result = instance._valid({ - label: 'a', - selector: 'a' - }); - assert.isFalse(result); - }); - - it('Returns true when valid', () => { - const result = instance._valid({ - label: 'a', - selector: 'a', - action: 'test' - }); - assert.isTrue(result); - }); - }); - - describe('addAction()', () => { - let instance; - before(function() { - instance = new ArcContextMenu(); - }); - - it('Registers valid action', () => { - const action = { - label: 'a', - selector: 'b', - action: 'c' - }; - instance.addAction(action); - assert.lengthOf(instance.contextActions, 1); - assert.deepEqual(instance.contextActions[0], action); - }); - - it('Throws error when no argument', () => { - assert.throws(() => { - instance.addAction(); - }); - }); - - it('Throws error when argument is invalid', () => { - assert.throws(() => { - instance.addAction({ - label: 'a', - selector: 'a' - }); - }); - }); - }); - - describe('removeAction()', () => { - let instance; - before(function() { - instance = new ArcContextMenu(); - }); - - const action = { - label: 'a', - selector: 'b', - action: 'c' - }; - - it('Removes previously registered action - object argument', () => { - instance.addAction(action); - assert.lengthOf(instance.contextActions, 1); - instance.removeAction(action); - assert.lengthOf(instance.contextActions, 0); - }); - - it('Removes previously registered action - string argument', () => { - instance.addAction(action); - assert.lengthOf(instance.contextActions, 1); - instance.removeAction(action.action); - assert.lengthOf(instance.contextActions, 0); - }); - - it('Returns true if the action is removed', () => { - instance.addAction(action); - assert.lengthOf(instance.contextActions, 1); - const result = instance.removeAction(action.action); - assert.isTrue(result); - }); - - it('Returns false if the action is not removed', () => { - const result = instance.removeAction(action.action); - assert.isFalse(result); - }); - - it('Throws error when no argument', () => { - assert.throws(() => { - instance.removeAction(); - }); - }); - - it('Throws error when argument is invalid', () => { - assert.throws(() => { - instance.removeAction({ - label: 'a', - selector: 'a' - }); - }); - }); - }); - - describe('_contextMenuHandler()', () => { - let instance; - beforeEach(function() { - instance = new ArcContextMenu(); - instance.addAction({ - label: 'x', - selector: '.target-class', - action: 'test-action' - }); - }); - - after(() => { - const nodes = document.body.querySelectorAll('anypoint-listbox'); - if (nodes.length) { - for (let i = 0; i < nodes.length; i++) { - nodes[i].parentNode.removeChild(nodes[i]); - } - } - }); - - function getTargetEvent() { - return { - composedPath: function() { - return [document.body.querySelector('.target-class')]; - }, - x: 1, - y: 2 - }; - } - - function getNonTargetEvent() { - return { - composedPath: function() { - return [document.body.querySelector('.non-target-class')]; - }, - x: 1, - y: 2 - }; - } - - function getNoTargetEvent() { - return { - composedPath: function() { - return []; - }, - x: 1, - y: 2 - }; - } - - it('Calls renderActions() when event target matches action', () => { - const stub = sinon.stub(instance, 'renderActions'); - instance._contextMenuHandler(getTargetEvent()); - assert.isTrue(stub.called); - stub.restore(); - }); - - it('renderActions() receives list of action', () => { - let actions; - instance.renderActions = (arg) => actions = arg; - instance._contextMenuHandler(getTargetEvent()); - assert.typeOf(actions, 'array'); - assert.lengthOf(actions, 1); - }); - - it('renderActions() receives click location', () => { - let pos; - instance.renderActions = (v, arg) => pos = arg; - instance._contextMenuHandler(getTargetEvent()); - assert.typeOf(pos, 'object'); - assert.equal(pos.x, 1); - assert.equal(pos.y, 2); - }); - - it('Do not calls renderActions() when event target do not match', () => { - const stub = sinon.stub(instance, 'renderActions'); - instance._contextMenuHandler(getNonTargetEvent()); - assert.isFalse(stub.called); - stub.restore(); - }); - - it('Do not calls renderActions() when no target', () => { - const stub = sinon.stub(instance, 'renderActions'); - instance._contextMenuHandler(getNoTargetEvent()); - assert.isFalse(stub.called); - stub.restore(); - }); - - it('Sets _lastTarget property', () => { - instance._contextMenuHandler(getTargetEvent()); - assert.ok(instance._lastTarget); - }); - }); - - describe('renderActions()', () => { - let instance; - const pos = { x: 1, y: 2 }; - beforeEach(function() { - instance = new ArcContextMenu(); - }); - - afterEach(() => { - const nodes = document.body.querySelectorAll('anypoint-listbox'); - if (nodes.length) { - for (let i = 0; i < nodes.length; i++) { - nodes[i].parentNode.removeChild(nodes[i]); - } - } - }); - - function getActions() { - return [{ - label: 'aL', - action: 'aA' - }, { - label: 'bL', - action: 'bA' - }]; - } - - it('Adds anypoint-listbox to the DOM', () => { - instance.renderActions(getActions(), pos); - const node = document.body.querySelector('anypoint-listbox'); - assert.ok(node); - }); - - it('Renders all actions', () => { - instance.renderActions(getActions(), pos); - const nodes = document.body.querySelectorAll('anypoint-listbox anypoint-item'); - assert.lengthOf(nodes, 2); - }); - - it('Sets data-action on action item', () => { - instance.renderActions(getActions(), pos); - const node = document.body.querySelector('anypoint-listbox anypoint-item'); - assert.equal(node.dataset.action, 'aA'); - }); - - it('Renders item label', () => { - instance.renderActions(getActions(), pos); - const node = document.body.querySelector('anypoint-listbox anypoint-item'); - assert.equal(node.innerText, 'aL'); - }); - - it('Sets _currentMenu porperty', () => { - instance.renderActions(getActions(), pos); - const node = document.body.querySelector('anypoint-listbox'); - assert.isTrue(node === instance._currentMenu); - }); - - it('Sets _currentActions porperty', () => { - instance.renderActions(getActions(), pos); - assert.deepEqual(instance._currentActions, getActions()); - }); - - it('anypoint-listbox has global calss name', () => { - instance.renderActions(getActions(), pos); - assert.equal(instance._currentMenu.className, 'arc-context-menu'); - }); - - it('anypoint-listbox has top position', () => { - instance.renderActions(getActions(), pos); - assert.equal(instance._currentMenu.style.top, '2px'); - }); - - it('anypoint-listbox has left position', () => { - instance.renderActions(getActions(), pos); - assert.equal(instance._currentMenu.style.left, '1px'); - }); - - it('Removes any previously added context menu', () => { - instance.renderActions(getActions(), pos); - instance.renderActions(getActions(), pos); - const nodes = document.body.querySelectorAll('anypoint-listbox'); - assert.lengthOf(nodes, 1); - }); - }); - - describe('removeActions()', () => { - let instance; - const pos = { x: 1, y: 2 }; - function getActions() { - return [{ - label: 'aL', - action: 'aA' - }, { - label: 'bL', - action: 'bA' - }]; - } - - beforeEach(function() { - instance = new ArcContextMenu(); - }); - - afterEach(() => { - const node = document.body.querySelector('anypoint-listbox'); - if (node) { - node.parentNode.removeChild(node); - } - }); - - it('Does nothing when no menu', () => { - assert.isUndefined(instance._currentMenu); - instance.removeActions(); - }); - - it('Removes context menu from the DOM', () => { - instance.renderActions(getActions(), pos); - instance.removeActions(); - const node = document.body.querySelector('anypoint-listbox'); - assert.notOk(node); - }); - - it('Removes _currentMenu property', () => { - instance.renderActions(getActions(), pos); - instance.removeActions(); - assert.isUndefined(instance._currentMenu); - }); - - it('Removes _currentActions property', () => { - instance.renderActions(getActions(), pos); - instance.removeActions(); - assert.isUndefined(instance._currentActions); - }); - }); -}); diff --git a/scripts/packages/encryption/renderer/encryption.js b/scripts/packages/encryption/renderer/encryption.js deleted file mode 100644 index 745c8144..00000000 --- a/scripts/packages/encryption/renderer/encryption.js +++ /dev/null @@ -1,95 +0,0 @@ -const prompt = require('electron-prompt'); -/** - * A class that handles `encryption-*` web events in the renderer process - * and performs data encryption/decryption. - * - * TODO: consider spawning another process for data encryption / decryption. - * Compare gain/loss on running encryption/decryption in separate process - * and check whether data passing from process to another process is more costly. - */ -class EncryptionService { - constructor() { - this._decodeHandler = this._decodeHandler.bind(this); - this._encodeHandler = this._encodeHandler.bind(this); - } - - listen() { - window.addEventListener('encryption-decode', this._decodeHandler); - window.addEventListener('encryption-encode', this._encodeHandler); - } - - unlisten() { - window.removeEventListener('encryption-decode', this._decodeHandler); - window.removeEventListener('encryption-encode', this._encodeHandler); - } - - _decodeHandler(e) { - const { method } = e.detail; - e.preventDefault(); - e.detail.result = this.decode(method, e.detail); - } - - _encodeHandler(e) { - const { method } = e.detail; - e.preventDefault(); - e.detail.result = this.encode(method, e.detail); - } - - async encode(method, opts) { - switch (method) { - case 'aes': return await this.encodeAes(opts.data, opts.passphrase); - default: throw new Error(`Unknown encryption method`); - } - } - - async encodeAes(data, passphrase) { - // see https://gist.github.com/chrisveness/43bcda93af9f646d083fad678071b90a - const pwUtf8 = new TextEncoder().encode(passphrase); - const pwHash = await crypto.subtle.digest('SHA-256', pwUtf8); - const iv = crypto.getRandomValues(new Uint8Array(12)); - const alg = { name: 'AES-GCM', iv: iv }; - const key = await crypto.subtle.importKey('raw', pwHash, alg, false, ['encrypt']); - const ptUint8 = new TextEncoder().encode(data); - const ctBuffer = await crypto.subtle.encrypt(alg, key, ptUint8); - const ctArray = Array.from(new Uint8Array(ctBuffer)); - const ctStr = ctArray.map(byte => String.fromCharCode(byte)).join(''); - const ctBase64 = btoa(ctStr); - const ivHex = Array.from(iv).map(b => ('00' + b.toString(16)).slice(-2)).join(''); - return ivHex+ctBase64; - } - - async decode(method, opts) { - switch (method) { - case 'aes': return await this.decodeAes(opts.data, opts.passphrase); - default: throw new Error(`Unknown decryption method`); - } - } - - async decodeAes(ciphertext, passphrase) { - if (passphrase === undefined) { - const win = require('electron').remote.getCurrentWindow(); - passphrase = await prompt({ - title: 'File password', - label: 'Enter password to open the file', - }, win); - if (passphrase === null) { - throw new Error('Password is required to open the file.'); - } - } - try { - const pwUtf8 = new TextEncoder().encode(passphrase); - const pwHash = await crypto.subtle.digest('SHA-256', pwUtf8); - const iv = ciphertext.slice(0,24).match(/.{2}/g).map(byte => parseInt(byte, 16)); - const alg = { name: 'AES-GCM', iv: new Uint8Array(iv) }; - const key = await crypto.subtle.importKey('raw', pwHash, alg, false, ['decrypt']); - const ctStr = atob(ciphertext.slice(24)); - const ctUint8 = new Uint8Array(ctStr.match(/[\s\S]/g).map(ch => ch.charCodeAt(0))); - const plainBuffer = await crypto.subtle.decrypt(alg, key, ctUint8); - const plaintext = new TextDecoder().decode(plainBuffer); - return plaintext; - } catch (_) { - throw new Error('Invalid password.'); - } - } -} -exports.EncryptionService = EncryptionService; diff --git a/scripts/packages/encryption/renderer/index.js b/scripts/packages/encryption/renderer/index.js deleted file mode 100644 index dae97265..00000000 --- a/scripts/packages/encryption/renderer/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.EncryptionService = require('./encryption').EncryptionService; diff --git a/scripts/packages/encryption/spec/encryption.renderer.spec.js b/scripts/packages/encryption/spec/encryption.renderer.spec.js deleted file mode 100644 index 8cf5fe14..00000000 --- a/scripts/packages/encryption/spec/encryption.renderer.spec.js +++ /dev/null @@ -1,62 +0,0 @@ -const { assert } = require('chai'); -const { EncryptionService } = require('../renderer'); - -describe('EncryptionService', function() { - describe('Encrypting content', () => { - let instance; - before(() => { - instance = new EncryptionService(); - instance.listen(); - }); - - after(() => { - instance.unlisten(); - }); - - it('encodes a content using AES.encrypt', async () => { - const e = new CustomEvent('encryption-encode', { - bubbles: true, - cancelable: true, - detail: { - method: 'aes', - data: 'test-data', - passphrase: 'test' - } - }); - document.body.dispatchEvent(e); - const result = await e.detail.result; - assert.typeOf(result, 'string'); - assert.notEqual(result, 'test-data'); - }); - }); - - - describe('Decrypting content', () => { - const encoded = '0f8edad5305cbd4012369ed0IbNBdWOJpsToD8EMUJi+B6XfefpULsPuBA=='; - let instance; - before(() => { - instance = new EncryptionService(); - instance.listen(); - }); - - after(() => { - instance.unlisten(); - }); - - it('decodes a content using AES.decrypt and provided password', async () => { - const e = new CustomEvent('encryption-decode', { - bubbles: true, - cancelable: true, - detail: { - method: 'aes', - data: encoded, - passphrase: 'test' - } - }); - document.body.dispatchEvent(e); - const result = await e.detail.result; - assert.typeOf(result, 'string'); - assert.equal(result, 'test-data'); - }); - }); -}); diff --git a/scripts/packages/plugin-manager/README.md b/scripts/packages/plugin-manager/README.md deleted file mode 100644 index 729c3f40..00000000 --- a/scripts/packages/plugin-manager/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# ARC Electron plug-in manager - -Manages ARC application plug-ins. - -Currently only themes manager is supported. - -## Usage - -``` -$ npm i @advanced-rest-client/arc-electron-plugin-manager -``` - -In the main process: - -```javascript -const {ThemePluginsManager} = require('@advanced-rest-client/arc-electron-plugin-manager/main'); - -const manager = new ThemePluginsManager(); - -// installing themes -await manager.inastall('npm-package-name', 'version'); -await manager.inastall('github-owner/github-repo', 'branch/tag/hash'); -await manager.inastall('/my/local/package'); - -// Uninstalling themes -await manager.uninstall('npm-package-name'); -await manager.uninstall('github-owner/github-repo'); -await manager.uninstall('/my/local/package'); - -// Check for an update of a specific package -const into = await manager.checkUpdateAvailable('npm-package-name'); -if (info) { - // update available. -} - -// Check for any update -const infoMap = await manager.checkForUpdates(); -if (Object.keys(infoMap).length) { - // updates are available -} - -// Update list of packages -await manager.update(infoMap); -``` diff --git a/scripts/packages/plugin-manager/index.js b/scripts/packages/plugin-manager/index.js deleted file mode 100644 index 024b96d4..00000000 --- a/scripts/packages/plugin-manager/index.js +++ /dev/null @@ -1,2 +0,0 @@ -const mainInterface = require('./main'); -exports.PluginsManager = mainInterface.SourcesManager; diff --git a/scripts/packages/plugin-manager/main/index.js b/scripts/packages/plugin-manager/main/index.js deleted file mode 100644 index 71ef3a45..00000000 --- a/scripts/packages/plugin-manager/main/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.ThemePluginsManager = require('./theme-plugins-manager').ThemePluginsManager; diff --git a/scripts/packages/plugin-manager/main/theme-plugins-manager.js b/scripts/packages/plugin-manager/main/theme-plugins-manager.js deleted file mode 100644 index 8bfdde78..00000000 --- a/scripts/packages/plugin-manager/main/theme-plugins-manager.js +++ /dev/null @@ -1,381 +0,0 @@ -const { app } = require('electron'); -const path = require('path'); -const log = require('../../../main/logger'); -const fs = require('fs-extra'); -const { ThemeInfo } = require('../../../main/models/theme-info'); -const { PluginManager } = require('live-plugin-manager'); -const semver = require('semver'); -/** - * This is the main process interface. - * - * Manages themes packages. Installs, uninstalls and updates themes from it's - * repository or npm registry. - */ -class ThemePluginsManager { - /** - * Creates, if needed, the PluginManager and returns it. - * @return {PluginManager} - */ - get pluginManager() { - if (!this.__pluginManager) { - this.__pluginManager = new PluginManager({ - cwd: process.env.ARC_THEMES, - pluginsPath: process.env.ARC_THEMES - }); - } - return this.__pluginManager; - } - /** - * Creates a model for theme info file. - * @return {ThemeInfo} - */ - get themeInfo() { - return new ThemeInfo(); - } - - /** - * Resolves file path to correct path if it's starts with `~`. - * - * @param {String} file Settings file path - * @return {String} Path to the file. - */ - resolvePath(file) { - if (file && file[0] === '~') { - file = app.getPath('home') + file.substr(1); - } - return file; - } - /** - * Installs a theme package to the themes directory. - * @param {String} name NPM name or Github repo. Local paths are symlink - * to target location. - * @param {String} version Theme version to install. - * @return {Promise} - */ - async install(name, version) { - let message = 'Installing theme: ' + name; - if (version) { - message += ', version ' + version; - } - log.info(message); - let info = await this._installPackage(name, version); - info = await this._createThemeInfo(name, info); - return await this._addThemeEntry(info); - } - /** - * Implementation of installation process. - * If the `name` argument represents a pato to a directory then - * local installation is performed. PluginManager is used otherwise. - * @param {String} name NPM name or Github repo. Local paths are symlink - * to target location. - * @param {String} version Theme version to install. - * @return {Promise} Promise resolved to theme info object - */ - _installPackage(name, version) { - try { - fs.accessSync(name, fs.constants.R_OK | fs.constants.X_OK); - return this._installLocalPackage(name); - } catch (_) { - return this._installRemotePackage(name, version); - } - } - /** - * Creates a symlink from a local package to themes directory. - * @param {String} name Package location. - * @return {Promise} Promise resolved to theme info object - */ - _installLocalPackage(name) { - log.info('Installing theme from local sources...'); - const info = { - isSymlink: true - }; - return fs.readJson(path.join(name, 'package.json')) - .catch(() => { - throw new Error('Unable to read package.json file of the theme.'); - }) - .then((pkg) => { - info.name = pkg.name; - info.version = pkg.version; - info.location = path.join(process.env.ARC_THEMES, pkg.name); - if (pkg.main) { - info.mainFile = path.join(info.location, pkg.main); - } else { - info.mainFile = path.join(info.location, path.basename(name)); - } - return this._ensureSymlinkPath(info.location); - }) - .then(() => fs.symlink(path.resolve(name), path.resolve(info.location), 'dir')) - .then(() => { - log.info('Installation complete.'); - return info; - }); - } - /** - * Ensures the path to create a symlint is created. - * @param {String} location Symlink location - * @return {Promise} - */ - _ensureSymlinkPath(location) { - location = path.dirname(location); - return fs.ensureDir(location); - } - /** - * Uses PluginManager to install package from npm or GitHub. - * @param {String} name NPM name or Github repo. Local paths are symlink - * to target location. - * @param {String} version Theme version to install. - * @return {Promise} Promise resolved to theme info object - */ - _installRemotePackage(name, version) { - log.info('Installing theme from remote sources...'); - return this.pluginManager.install( - ...this._prepareSourceAndVersion(name, version)); - } - /** - * Uninstalls package and removes it from the registry file. - * @param {String} name Name of the package. - * @return {Promise} - */ - async uninstall(name) { - log.info('Uninstalling theme ' + name); - await this._uninstallPackage(name); - await this._removeThemeEntry(name); - } - /** - * Implementation of removing process. - * @param {String} name NPM name or Github repo. Local paths are symlink - * to target location. - * @return {Promise} Promise resolved to theme info object - */ - async _uninstallPackage(name) { - const info = await this.getInfo(name); - if (!info) { - throw new Error(`Package ${name} is not installed.`); - } - if (info.isSymlink) { - await fs.remove(info.location); - } else { - await this.pluginManager.uninstall(info.name); - } - return info; - } - /** - * Updates themes from passed list. - * @param {Array} data A list of objects with `name` and `version` - * proeprtires. - * @return {Promise} - */ - async update(data) { - const result = []; - for (let i = 0, len = data.length; i < len; i++) { - const { name, version } = data[i]; - try { - await this._installPackage(name, version); - await this._updateVersionInfo(name, version); - result[result.length] = { - error: false, - name - }; - } catch (e) { - result[result.length] = { - error: true, - message: e.message, - name - }; - } - } - return result; - } - /** - * Reads information from the theme registry abiut the theme. - * @param {String} name Name of the package (_id in info object). - * @return {Promise} Resolves to theme info object. - */ - async getInfo(name) { - const info = await this.themeInfo.load(); - const { themes } = info; - for (let i = 0, len = themes.length; i < len; i++) { - if (themes[i].name === name || themes[i]._id === name) { - return themes[i]; - } - } - } - /** - * Checks for updates to all installed packages. - * @return {Promise} Promise resolved to a map of package names and - * info objects downloaded from the remote server. Only packages with - * update available are returned. - */ - async checkForUpdates() { - const candidates = await this._getUpdateCandidates(); - const result = []; - for (let i = 0, len = candidates.length; i < len; i++) { - const item = candidates[i]; - const data = await this._processCandidateUpdateInfo(item); - if (data) { - result[result.length] = data; - } - } - return result; - } - - async _getUpdateCandidates() { - const now = Date.now(); - const info = await this.themeInfo.load(); - const { themes } = info; - const names = []; - themes.forEach((item) => { - if (item.isSymlink) { - return; - } - if (item.updateCheck) { - const delta = now - item.updateCheck; - if (delta < 7.2e+6) { - // 2 hours - return; - } - } - names[names.length] = { - name: item.name, - version: item.version - }; - }); - return names; - } - - async _processCandidateUpdateInfo(candidate) { - const { name, version } = candidate; - /* eslint-disable require-atomic-updates */ - let result; - try { - result = await this.checkUpdateAvailable(name, version); - await this._updateUpdateTime(name); - } catch (e) { - log.warn(`Unable to get theme package info ${e.message}`); - } - return result; - } - - async _updateUpdateTime(name) { - const store = this.themeInfo; - const info = await store.load(); - const { themes } = info; - for (let i = 0, len = themes.length; i < len; i++) { - if (themes[i].name === name || themes[i]._id === name) { - themes[i].updateCheck = Date.now(); - return await store.store(); - } - } - } - - async _updateVersionInfo(name, version) { - const store = this.themeInfo; - const info = await store.load(); - const { themes } = info; - for (let i = 0, len = themes.length; i < len; i++) { - if (themes[i].name === name || themes[i]._id === name) { - themes[i].version = version; - return await store.store(); - } - } - } - - async checkUpdateAvailable(name, version) { - const names = this._prepareSourceAndVersion(name, version); - const localInfo = await this.getInfo(name); - const remoteInfo = await this.pluginManager.queryPackage(names[0]); - if (!this._compareVersions(remoteInfo, localInfo)) { - return; - } - if (this._compareEngines(remoteInfo)) { - return remoteInfo; - } - } - - _compareVersions(remoteInfo, localInfo) { - return semver.gt(remoteInfo.version, localInfo.version); - } - - _compareEngines(remoteInfo) { - const engines = remoteInfo.engines; - if (!engines || !engines.arc) { - return true; - } - const engine = engines.arc; - const version = process.env.npm_package_version; - if (semver.validRange(engine)) { - return semver.satisfies(version, engine); - } - return true; - } - /** - * Processes source and version properties to produce right input for - * `live-plugin-manager` - * @param {String} source NPM name or Github repo - * @param {String} version Theme version to install. - * @return {Array} First item is the source and version the other. - */ - _prepareSourceAndVersion(source, version) { - if (source.indexOf('/') !== -1 && source[0] !== '@') { - if (!version) { - version = 'master'; - } - version = source + '#' + version; - } - return [source, version]; - } - /** - * Creates a theme info object from both `live-plugin-manager` install response - * and installed theme package file. - * @param {String} id - * @param {Object} info - * @return {Object} An object to be stored in theme info file. - */ - async _createThemeInfo(id, info) { - const result = { - _id: id, - name: info.name, - version: info.version, - location: info.location, - mainFile: info.mainFile, - title: info.name, - description: '', - isSymlink: info.isSymlink - }; - const pkg = await fs.readJson(path.join(info.location, 'package.json')); - if (pkg.themeTitle) { - result.title = pkg.themeTitle; - } - if (pkg.description) { - result.description = pkg.description; - } - return result; - } - /** - * Adds theme info object to themes registry file. - * @param {Object} info An object to add. - * @return {Promise} Promise resolve to the info object. - */ - async _addThemeEntry(info) { - const store = this.themeInfo; - const data = await store.load(); - const { themes } = data; - themes.push(info); - await store.store(); - return info; - } - - async _removeThemeEntry(name) { - const store = this.themeInfo; - const info = await store.load(); - const { themes } = info; - for (let i = 0, len = themes.length; i < len; i++) { - if (themes[i].name === name || themes[i]._id === name) { - themes.splice(i, 1); - return store.store(); - } - } - } -} - -module.exports.ThemePluginsManager = ThemePluginsManager; diff --git a/scripts/packages/plugin-manager/spec/readme.md b/scripts/packages/plugin-manager/spec/readme.md deleted file mode 100644 index e44534eb..00000000 --- a/scripts/packages/plugin-manager/spec/readme.md +++ /dev/null @@ -1 +0,0 @@ -tests are moved to /test/plugin-manager. diff --git a/scripts/packages/search-service/README.md b/scripts/packages/search-service/README.md deleted file mode 100644 index 33f1ae46..00000000 --- a/scripts/packages/search-service/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# ARC Electron content search service - -Creates a pop up window that mimics Chrome's search bar. - -## Usage - -In the main process: - -```javascript -const {ContentSearchService} = require('./search-service/main'); -const {ArcPreferences} = require('./arc-preferences'); -const startupOptions = {}; // Application start up options. -const prefs = new ArcPreferences(); - -// Required step, add common instance of preferences manager -ContentSearchService.prefsManager = prefs; -// Required step, listen for menu actions -ContentSearchService.listen(emmiter); -``` - -The `emmiter` is any object that emmits `menu-action` even with first argument -to be `application:find` and second argument is the window object. -ARC electron has menu manager that does this. - -In the renderer process: - -```javascript -const {WindowSearchService} = require('./search-service/renderer'); -const service = new WindowSearchService(); -service.listen(); -``` - -The `listen()` function listens for electron's `menu-action` event. -Event with `application:find` name will be handled by the service and add search -window to the current window (from which the menu action was invoked). - -This module works with Advanced REST Client application. It uses -`@advanced-rest-client/arc-electron-sources-manager` to determine source of -the web components import file for search window (hence use of preferences manager). - -Search file import contains HTML imports for the web components used in window. -Import file content should be as follows: - -```html - - - - - - - - - - - - -``` - -File location can be set in startup options in `searchFile` property. - -Set startup options when initializing the app: - -```javascript -... -ContentSearchService.prefsManager = prefs; -ContentSearchService.startupOptions = { - searchFile: path.join(__dirname, 'search-imports.html') -}; -ContentSearchService.listen(); -``` diff --git a/scripts/packages/search-service/index.js b/scripts/packages/search-service/index.js deleted file mode 100644 index 290a693d..00000000 --- a/scripts/packages/search-service/index.js +++ /dev/null @@ -1,2 +0,0 @@ -const mainInterface = require('./main'); -exports.ContentSearchService = mainInterface.ContentSearchService; diff --git a/scripts/packages/search-service/main/content-search-service.js b/scripts/packages/search-service/main/content-search-service.js deleted file mode 100644 index 7beb40cd..00000000 --- a/scripts/packages/search-service/main/content-search-service.js +++ /dev/null @@ -1,330 +0,0 @@ -const { BrowserWindow, ipcMain } = require('electron'); -const path = require('path'); -const url = require('url'); - -const instances = []; -/** - * A class that is responsible to controll content - * search behavior in the window. - */ -class ContentSearchService { - /** - * @constructor - * @param {BrowserWindow} win A window from where the request came from. - */ - constructor(win) { - this.win = win; - this.searchBar = undefined; - - this._resizeHandler = this._resizeHandler.bind(this); - this._moveHandler = this._moveHandler.bind(this); - this._closeHandler = this._closeHandler.bind(this); - this._appCloseHandler = this._appCloseHandler.bind(this); - this._searchChangedHandler = this._searchChangedHandler.bind(this); - this._searchNextHandler = this._searchNextHandler.bind(this); - this._searchPreviousHandler = this._searchPreviousHandler.bind(this); - this._searchResultHandler = this._searchResultHandler.bind(this); - - ContentSearchService.addService(this); - } - /** - * Event handler for menu actions. - * - * @param {String} action Menu action - * @param {BrowserWindow} win Owner window - */ - static searchRequested(action, win) { - if (action !== 'application:find') { - return; - } - if (win.webContents.getURL().indexOf('search-bar') !== -1) { - // ctrl+f from search bar. - return; - } - let srv = ContentSearchService.getService(win); - if (srv && srv.isOpened()) { - srv.focus(); - return; - } - if (!srv) { - srv = new ContentSearchService(win); - } - srv.open(); - } - /** - * Finds existing instance of search service for a window. - * - * @param {BrowserWindow} win Instance of the BrowserWindow. - * @return {ContentSearchService} Instance of the class or undefined. - */ - static getService(win) { - return instances.find((item) => item.win === win); - } - /** - * Adds instance of `ContentSearchService` to the list of active instances. - * It will do nothing if the instance already exists in the list. - * - * @param {ContentSearchService} srv Instance to add. - * @return {undefined} - */ - static addService(srv) { - const exists = !!ContentSearchService.getService(srv.win); - if (exists) { - return; - } - instances.push(srv); - } - /** - * Removes instance from cached instances - * @param {ContentSearchService} srv Service instance. - */ - static removeService(srv) { - const index = instances.find((item) => item.win === srv.win); - if (index === -1) { - return; - } - instances.splice(index, 1); - } - /** - * @return {Object} Bounds object for the window. - */ - get searchBarBounds() { - return { - width: 400, - height: 56 - }; - } - /** - * Opens the search window. - */ - open() { - const win = this._getWindow(); - this._loadUI(win); - this._listenSearchWindow(win); - this._listenAppWindow(); - this.searchBar = win; - win.webContents.once('did-finish-load', () => { - setTimeout(() => { - this.focus(); - }, 200); - }); - } - /** - * Creates a window to open. - * @return {BrowserWindow} Created window. - */ - _getWindow() { - const preload = path.join(__dirname, '..', 'renderer', 'search-preload.js'); - const win = new BrowserWindow({ - backgroundColor: '#ffffff', - show: false, - frame: false, - movable: false, - parent: this.win, - webPreferences: { - nodeIntegration: false, - contextIsolation: false, - preload - } - }); - // win.webContents.openDevTools(); - this._positionWindow(win); - return win; - } - /** - * Positions the search window accodring to main window. - * @param {BrowserWindow} win A window to be positioned. - */ - _positionWindow(win) { - const winBounds = this._computeBounds(this.searchBarBounds); - win.setBounds(winBounds); - } - /** - * Computes search window bounds object with position. - * - * @param {Object} winBounds Bounds object with window dimmensions. - * @return {Object} Updated bounds object with new dimensions and position. - */ - _computeBounds(winBounds) { - const rect = this.win.getBounds(); - const maxRight = rect.width + rect.x; - const x = maxRight - winBounds.width - 12; // padding - const maxTop = rect.y + 32; - winBounds.x = x; - winBounds.y = maxTop; - return winBounds; - } - /** - * Loads search bar UI in the window. - * @param {BrowserWindow} win An instance of the window object - */ - _loadUI(win) { - const dest = path.join(__dirname, '..', '..', '..', '..', 'src', 'search-bar', 'search-bar.html'); - const full = url.format({ - pathname: dest, - protocol: 'file:', - slashes: true - }); - win.loadURL(full); - } - /** - * Checks if any window is currently opened. - * - * @return {Boolean} True if the search bar is currently opened. - */ - isOpened() { - return !!this.searchBar; - } - /** - * Listens for relevant events from the renderer process. - * @param {BrowserWindow} win Window to listen for events on - */ - _listenSearchWindow(win) { - win.once('close', () => { - this._unlistenSearchWindow(); - this._unlistenAppWindow(); - this.win.webContents.send('search-bar-query-changed', ''); - }); - win.once('closed', () => { - this.searchBar = undefined; - }); - ipcMain.on('search-bar-close', this._closeHandler); - ipcMain.on('search-bar-query', this._searchChangedHandler); - ipcMain.on('search-bar-query-next', this._searchNextHandler); - ipcMain.on('search-bar-query-previous', this._searchPreviousHandler); - ipcMain.on('search-bar-search-result', this._searchResultHandler); - } - /** - * Unlistens renderer events. - */ - _unlistenSearchWindow() { - ipcMain.removeListener('search-bar-close', this._closeHandler); - ipcMain.removeListener('search-bar-query', this._searchChangedHandler); - ipcMain.removeListener('search-bar-query-next', this._searchNextHandler); - ipcMain.removeListener('search-bar-query-previous', - this._searchPreviousHandler); - ipcMain.removeListener('search-bar-search-result', - this._searchResultHandler); - } - /** - * Listens for application events from the main process. - */ - _listenAppWindow() { - this.win.on('resize', this._resizeHandler); - this.win.on('move', this._moveHandler); - this.win.on('close', this._appCloseHandler); - ipcMain.on('window-reloading', this._appCloseHandler); - } - /** - * Unlistens application events from the main process. - */ - _unlistenAppWindow() { - this.win.removeListener('resize', this._resizeHandler); - this.win.removeListener('move', this._moveHandler); - ipcMain.removeListener('window-reloading', this._appCloseHandler); - } - /** - * Focuses mouse on the search bar. - */ - focus() { - if (!this.isOpened()) { - return; - } - if (!this.searchBar.isVisible()) { - this.searchBar.show(); - } - // this.searchBar.focus(); - this.searchBar.webContents.send('focus-input'); - } - /** - * A handler for `move` event from the app window. - * Repositiones the search bar window. - */ - _moveHandler() { - if (!this.isOpened()) { - return; - } - this._positionWindow(this.searchBar); - } - /** - * A handler for the `resize` event from the app window. - * Repositiones the search bar window. - */ - _resizeHandler() { - if (!this.isOpened()) { - return; - } - this._positionWindow(this.searchBar); - } - /** - * Event handler for the application window close handler. - * Removes this service from cache, closes search bar (if any) - * amd removes window listeners. - * @param {Event} e Event sent from the app window. - */ - _appCloseHandler(e) { - if (e.sender !== this.win.webContents) { - return; - } - this.win.removeListener('close', this._appCloseHandler); - ContentSearchService.removeService(this); - if (this.isOpened()) { - this.searchBar.close(); - } - } - /** - * Handler for the close search bar event. - * @param {Event} e Event sent from the search bar window. - */ - _closeHandler(e) { - if (e.sender !== this.searchBar.webContents) { - return; - } - this.searchBar.close(); - } - /** - * Informs the view about search action. - * @param {Event} e Event sent from the search bar window. - * @param {String} query The search term. - */ - _searchChangedHandler(e, query) { - if (e.sender !== this.searchBar.webContents) { - return; - } - this.win.webContents.send('search-bar-query-changed', query); - } - /** - * A handler for search next action. - * @param {Event} e Event sent from the search bar window. - */ - _searchNextHandler(e) { - if (e.sender !== this.searchBar.webContents) { - return; - } - this.win.webContents.send('search-bar-query-next'); - } - /** - * A handler for search previous action. - * @param {Event} e Event sent from the search bar window. - */ - _searchPreviousHandler(e) { - if (e.sender !== this.searchBar.webContents) { - return; - } - this.win.webContents.send('search-bar-query-previous'); - } - /** - * A handler for search results event. - * Informs the search bar about number of results available. - * @param {Event} e Event sent from the search bar window. - * @param {Number} count Search results count - * @param {Number} selected Currently selected instance. - */ - _searchResultHandler(e, count, selected) { - if (e.sender !== this.win.webContents) { - return; - } - this.searchBar.webContents.send('search-count', count, selected); - } -} -exports.ContentSearchService = ContentSearchService; diff --git a/scripts/packages/search-service/main/index.js b/scripts/packages/search-service/main/index.js deleted file mode 100644 index 4627683e..00000000 --- a/scripts/packages/search-service/main/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.ContentSearchService = require('./content-search-service').ContentSearchService; diff --git a/scripts/packages/search-service/renderer/index.js b/scripts/packages/search-service/renderer/index.js deleted file mode 100644 index d7d406dd..00000000 --- a/scripts/packages/search-service/renderer/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.WindowSearchService = require('./window-search-service').WindowSearchService; diff --git a/scripts/packages/search-service/renderer/search-preload.js b/scripts/packages/search-service/renderer/search-preload.js deleted file mode 100644 index 02902c57..00000000 --- a/scripts/packages/search-service/renderer/search-preload.js +++ /dev/null @@ -1,8 +0,0 @@ -const { ipcRenderer: ipc } = require('electron'); -const { ArcPreferencesProxy } = require('../../arc-preferences/renderer'); -const { ThemeManager } = require('../../themes-manager/renderer'); -process.once('loaded', () => { - global.ipc = ipc; - global.ArcPreferencesProxy = ArcPreferencesProxy; - global.ThemeManager = ThemeManager; -}); diff --git a/scripts/packages/search-service/renderer/window-search-service.js b/scripts/packages/search-service/renderer/window-search-service.js deleted file mode 100644 index 3ba447fb..00000000 --- a/scripts/packages/search-service/renderer/window-search-service.js +++ /dev/null @@ -1,93 +0,0 @@ -const remote = require("electron").remote; -const ipcRenderer = require("electron").ipcRenderer; -/** - * Class responsible to control search action in a window. - */ -class WindowSearchService { - /** - * @constructor - */ - constructor() { - this.win = remote.getCurrentWindow(); - this._onPageFoundHandler = this._onPageFoundHandler.bind(this); - this._searchHandler = this._searchHandler.bind(this); - this._searchNextHandler = this._searchNextHandler.bind(this); - this._searchPreviousHandler = this._searchPreviousHandler.bind(this); - } - /** - * Listens for events from the main script. - * - * @return {undefined} - */ - listen() { - this.win.webContents.on("found-in-page", this._onPageFoundHandler); - ipcRenderer.on("search-bar-query-changed", this._searchHandler); - ipcRenderer.on("search-bar-query-next", this._searchNextHandler); - ipcRenderer.on("search-bar-query-previous", this._searchPreviousHandler); - } - /** - * Performs the search action on the opened window. - * @param {String} word Search term. - * @param {Object} opts Options passed to the `webContents.findInPage()` - * function. - */ - search(word, opts) { - if (!word) { - this.win.webContents.stopFindInPage("clearSelection"); - return; - } - this.win.webContents.findInPage(word, opts); - } - - /** - * Handler for the `found-in-page` event dispatched from the - * web contents of current window. - * The method signals number of matches found and index of current - * highlight. - * - * @param {Event} event Event dispatched by the web contents - * @param {Object} detail Event details. - */ - _onPageFoundHandler(event, detail) { - ipcRenderer.send( - "search-bar-search-result", - detail.matches, - detail.activeMatchOrdinal - ); - } - /** - * Handler for the search event. - * @param {Event} e Event from the main page. - * @param {String} query A search term to use with browser search. - */ - _searchHandler(e, query) { - if (this._lastSearch === query) { - this._searchNextHandler(); - return; - } - this._lastSearch = query; - const opts = {}; - this.search(query, opts); - } - /** - * Event handler for search next. - */ - _searchNextHandler() { - const opts = { - findNext: true, - forward: true - }; - this.search(this._lastSearch, opts); - } - /** - * Event handler for search previous. - */ - _searchPreviousHandler() { - const opts = { - findNext: true, - forward: false - }; - this.search(this._lastSearch, opts); - } -} -exports.WindowSearchService = WindowSearchService; diff --git a/scripts/packages/search-service/test/basic.main.spec.js b/scripts/packages/search-service/test/basic.main.spec.js deleted file mode 100644 index d3806b3a..00000000 --- a/scripts/packages/search-service/test/basic.main.spec.js +++ /dev/null @@ -1,34 +0,0 @@ -const assert = require('chai').assert; -const {BrowserWindow} = require('electron'); -const {ContentSearchService} = require('../main'); - -describe('ContentSearchService basic tests- main process', function() { - describe('get / set / remove service', function() { - let win; - before(() => { - win = new BrowserWindow({ - show: false - }); - }); - - it('getService returns undefined for no services', function() { - const result = ContentSearchService.getService(win); - assert.isUndefined(result); - }); - - it('getService returns service for existing one', function() { - const service = new ContentSearchService(win); - ContentSearchService.addService(service); - const result = ContentSearchService.getService(win); - assert.isTrue(result === service); - }); - - it('Removes the service', function() { - const service = new ContentSearchService(win); - ContentSearchService.addService(service); - ContentSearchService.removeService(service); - const result = ContentSearchService.getService(win); - assert.isUndefined(result); - }); - }); -}); diff --git a/scripts/packages/themes-manager/main/index.js b/scripts/packages/themes-manager/main/index.js deleted file mode 100644 index 89b63f45..00000000 --- a/scripts/packages/themes-manager/main/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.ThemeManager = require('./theme-manager').ThemeManager; diff --git a/scripts/packages/themes-manager/main/theme-manager.js b/scripts/packages/themes-manager/main/theme-manager.js deleted file mode 100644 index 4bb55ff6..00000000 --- a/scripts/packages/themes-manager/main/theme-manager.js +++ /dev/null @@ -1,197 +0,0 @@ -const { ipcMain: ipc } = require('electron'); -const { ThemeInfo } = require('../../../main/models/theme-info'); -const { ThemePluginsManager } = require('../../plugin-manager/main'); -const log = require('../../../main/logger'); - -class ThemeManager { - constructor(arcApp, skipUpdateChaeck) { - this.arcApp = arcApp; - /** - * ARC default theme ID - * @type {String} - */ - this.defaultTheme = 'advanced-rest-client/arc-electron-default-theme'; - this._listThemesHandler = this._listThemesHandler.bind(this); - this._themeInfoHandler = this._themeInfoHandler.bind(this); - this._activateHandler = this._activateHandler.bind(this); - this._installHandler = this._installHandler.bind(this); - this._uninstallHandler = this._uninstallHandler.bind(this); - - this.manager = new ThemePluginsManager(); - if (!skipUpdateChaeck) { - this._checkUpdates(); - } - } - /** - * Creates a model for theme info file. - * @return {ThemeInfo} - */ - get themeInfo() { - return new ThemeInfo(); - } - - /** - * Listens for the ipc events to suppot theme changes - */ - listen() { - ipc.on('theme-manager-list-themes', this._listThemesHandler); - ipc.on('theme-manager-active-theme-info', this._themeInfoHandler); - ipc.on('theme-manager-activate-theme', this._activateHandler); - ipc.on('theme-manager-install-theme', this._installHandler); - ipc.on('theme-manager-uninstall-theme', this._uninstallHandler); - } - /** - * Removes event listeners - */ - unlisten() { - ipc.removeListener('theme-manager-list-themes', this._listThemesHandler); - ipc.removeListener('theme-manager-active-theme-info', this._themeInfoHandler); - ipc.removeListener('theme-manager-activate-theme', this._activateHandler); - ipc.removeListener('theme-manager-install-theme', this._installHandler); - ipc.removeListener('theme-manager-uninstall-theme', this._uninstallHandler); - } - - /** - * A handler for the `theme-manager-list-themes` event from the renderer - * process. - * @param {Object} e - * @param {String} id - */ - _listThemesHandler(e, id) { - this.themeInfo.load() - .then((info) => { - const { themes } = info; - e.sender.send('theme-manager-themes-list', id, themes); - }) - .catch((cause) => this._handleError(e.sender, id, cause)); - } - - /** - * A handler for the `theme-manager-active-theme-info` event from the renderer - * process. - * @param {Object} e - * @param {String} id - */ - _themeInfoHandler(e, id) { - Promise.all([ - this.arcApp.config.load(), - this.themeInfo.load() - ]) - .then((result) => { - const [settings, themesInfo] = result; - const { themes } = themesInfo; - const themeId = settings.theme || this.defaultTheme; - let theme = this._findThemeInfo(themeId, themes); - if (!theme) { - if (themeId === this.defaultTheme) { - e.sender.send('theme-manager-error', id, { - message: 'Selected theme do not exists.' - }); - return; - } - theme = this._findThemeInfo(this.defaultTheme, themes); - if (!theme) { - e.sender.send('theme-manager-error', id, { - message: 'Default theme do not exists.' - }); - return; - } - } - e.sender.send('theme-manager-active-theme-info', id, theme); - }) - .catch((cause) => this._handleError(e.sender, id, cause)); - } - - _findThemeInfo(id, themes) { - if (!themes || !themes.length) { - return; - } - return themes.find((item) => item._id === id); - } - /** - * A handler for the `theme-manager-activate-theme` event from the renderer - * process. - * @param {Object} e - * @param {String} id - * @param {String} themeId - */ - async _activateHandler(e, id, themeId) { - try { - const settings = await this.arcApp.config.load(); - settings.theme = themeId; - await this.arcApp.config.store(); - e.sender.send('theme-manager-theme-activated', id, themeId); - } catch (cause) { - this._handleError(e.sender, id, cause); - } - } - - _installHandler(e, id, name) { - if (!name || typeof name !== 'string') { - e.sender.send('theme-manager-error', id, { message: 'The name is not valid.' }); - return; - } - const index = name.indexOf('#'); - let version; - if (index !== -1) { - version = name.substr(index + 1); - name = name.substr(0, index); - } - this.manager.install(name, version) - .then((info) => { - e.sender.send('theme-manager-theme-installed', id, info); - }) - .catch((cause) => this._handleError(e.sender, id, cause)); - } - - _uninstallHandler(e, id, name) { - if (!name || typeof name !== 'string') { - e.sender.send('theme-manager-error', id, { message: 'The name is not valid.' }); - return; - } - this.manager.uninstall(name) - .then((info) => { - e.sender.send('theme-manager-theme-installed', id, info); - }) - .catch((cause) => this._handleError(e.sender, id, cause)); - } - - _handleError(sender, id, cause) { - if (cause instanceof Error) { - cause = { - message: cause.message - }; - } - sender.send('theme-manager-error', id, cause); - } - - _checkUpdates() { - setTimeout(() => { - this.__updateCheck(); - }, 10000); - } - - async __updateCheck() { - log.debug('Checking for themes updates...'); - try { - const info = await this.manager.checkForUpdates(); - if (!info || !info.length) { - log.debug('Themes update not available.'); - return; - } - log.debug('Updating themes....'); - const result = await this.manager.update(info); - result.forEach((item) => { - if (!result.error) { - return; - } - const { name, message } = item; - log.info(`Theme ${name} update error: ${message}`); - }); - log.info('Themes updated. The change will be applied with next app reload.'); - } catch (e) { - log.error(e); - } - } -} -module.exports.ThemeManager = ThemeManager; diff --git a/scripts/packages/themes-manager/renderer/index.js b/scripts/packages/themes-manager/renderer/index.js deleted file mode 100644 index 89b63f45..00000000 --- a/scripts/packages/themes-manager/renderer/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.ThemeManager = require('./theme-manager').ThemeManager; diff --git a/scripts/packages/themes-manager/renderer/theme-manager.js b/scripts/packages/themes-manager/renderer/theme-manager.js deleted file mode 100644 index dd390522..00000000 --- a/scripts/packages/themes-manager/renderer/theme-manager.js +++ /dev/null @@ -1,294 +0,0 @@ -const { ipcRenderer: ipc } = require('electron'); -const log = require('electron-log'); -/** - * Theme manager class for renderer process. - * - * It listens for web and ipc events to manage themes. - */ -class ThemeManager { - constructor() { - this._listThemesHandler = this._listThemesHandler.bind(this); - this._activeThemeHandler = this._activeThemeHandler.bind(this); - this._activateHandler = this._activateHandler.bind(this); - this._installHandler = this._installHandler.bind(this); - this._uninstallHandler = this._uninstallHandler.bind(this); - this._errorHandler = this._errorHandler.bind(this); - this._ipcThemesListHandler = this._ipcThemesListHandler.bind(this); - this._ipcInfoHandler = this._ipcInfoHandler.bind(this); - this._ipcActivatedHandler = this._ipcActivatedHandler.bind(this); - this._ipcInstalledHandler = this._ipcInstalledHandler.bind(this); - this._ipcUninstalledHandler = this._ipcUninstalledHandler.bind(this); - this._promises = {}; - this._lastId = 0; - } - /** - * Listens for the ipc events to suppot theme changes - */ - listen() { - window.addEventListener('themes-list', this._listThemesHandler); - window.addEventListener('theme-active-info', this._activeThemeHandler); - window.addEventListener('theme-activate', this._activateHandler); - window.addEventListener('theme-install', this._installHandler); - window.addEventListener('theme-uninstall', this._uninstallHandler); - ipc.on('theme-manager-error', this._errorHandler); - ipc.on('theme-manager-themes-list', this._ipcThemesListHandler); - ipc.on('theme-manager-active-theme-info', this._ipcInfoHandler); - ipc.on('theme-manager-theme-activated', this._ipcActivatedHandler); - ipc.on('theme-manager-theme-installed', this._ipcInstalledHandler); - ipc.on('theme-manager-theme-uninstalled', this._ipcUninstalledHandler); - } - /** - * Removes event listeners - */ - unlisten() { - window.removeEventListener('themes-list', this._listThemesHandler); - window.removeEventListener('theme-active-info', this._activeThemeHandler); - window.removeEventListener('theme-activate', this._activateHandler); - window.removeEventListener('theme-install', this._installHandler); - window.removeEventListener('theme-uninstall', this._uninstallHandler); - ipc.removeListener('theme-manager-error', this._errorHandler); - ipc.removeListener('theme-manager-themes-list', this._ipcThemesListHandler); - ipc.removeListener('theme-manager-active-theme-info', this._ipcInfoHandler); - ipc.removeListener('theme-manager-theme-activated', this._ipcActivatedHandler); - ipc.removeListener('theme-manager-theme-installed', this._ipcInstalledHandler); - ipc.removeListener('theme-manager-theme-uninstalled', this._ipcUninstalledHandler); - } - /** - * Handler for the `themes-list` custom event from theme panel. - * - * @param {CustomEvent} e - */ - _listThemesHandler(e) { - e.preventDefault(); - e.detail.result = this.listThemes(); - } - /** - * Lists installed themes in the application. - * @return {Promise} A promise resolved to the theme info array - */ - listThemes() { - const id = (++this._lastId); - ipc.send('theme-manager-list-themes', id); - return new Promise((resolve, reject) => { - this._promises[id] = { resolve, reject }; - }); - } - /** - * Handler for the `theme-active-info` custom event from theme panel. - * - * @param {CustomEvent} e - */ - _activeThemeHandler(e) { - e.preventDefault(); - e.detail.result = this.readActiveThemeInfo(); - } - /** - * Reads information about current theme. - * @return {Promise} A promise resolved to the theme info - */ - readActiveThemeInfo() { - const id = (++this._lastId); - ipc.send('theme-manager-active-theme-info', id); - return new Promise((resolve, reject) => { - this._promises[id] = { resolve, reject }; - }); - } - - /** - * Activates the theme selected by the user. - * - * @param {CustomEvent} e - */ - _activateHandler(e) { - e.preventDefault(); - const id = e.detail.theme; - e.detail.result = this.activate(id); - } - /** - * Activates the theme. It stores theme id in user preferences and loads the - * theme. - * @param {String} themeId Theme ID to activate - * @return {Promise} Promise resolved when theme is avtivated - */ - activate(themeId) { - const requestid = (++this._lastId); - ipc.send('theme-manager-activate-theme', requestid, themeId); - return new Promise((resolve, reject) => { - this._promises[requestid] = { resolve, reject }; - }); - } - - _installHandler(e) { - e.preventDefault(); - const name = e.detail.name; - e.detail.result = this.installTheme(name); - } - - installTheme(name) { - if (!name) { - return Promise.reject(new Error('Name is required')); - } - const requestid = (++this._lastId); - ipc.send('theme-manager-install-theme', requestid, name); - return new Promise((resolve, reject) => { - this._promises[requestid] = { resolve, reject }; - }); - } - - _uninstallHandler(e) { - e.preventDefault(); - const name = e.detail.name; - e.detail.result = this.uninstallTheme(name); - } - - uninstallTheme(name) { - if (!name) { - return Promise.reject(new Error('Name is required')); - } - const requestid = (++this._lastId); - ipc.send('theme-manager-uninstall-theme', requestid, name); - return new Promise((resolve, reject) => { - this._promises[requestid] = { resolve, reject }; - }); - } - - /** - * Loads theme file and activates it. - * @param {String} themeId ID of installed theme of location of theme file. - * - * @param {Boolean} noFallback By default the manager will try to revert to default - * theme when passed theme cannot be loaded. When this opttion is set then - * it will throw error instead of loading default theme. - * @return {Promise} - */ - async loadTheme(themeId, noFallback) { - const defaultTheme = 'advanced-rest-client/arc-electron-default-theme'; - if (!themeId || themeId === 'dd1b715f-af00-4ee8-8b0c-2a262b3cf0c8') { - themeId = defaultTheme; - } else if (themeId === '859e0c71-ce8b-44df-843b-bca602c13d06') { - themeId = 'advanced-rest-client/arc-electron-anypoint-theme'; - } - try { - return await this._loadTheme(themeId); - } catch (cause) { - if (!noFallback && themeId !== defaultTheme) { - return await this._loadTheme(defaultTheme); - } - throw cause; - } - } - - async _loadTheme(themeId) { - const nodes = document.head.querySelectorAll('link[rel="stylesheet"]'); - for (let i = nodes.length - 1; i >= 0; i--) { - const href = nodes[i].href; - if (href && href.indexOf('themes:') === 0) { - nodes[i].parentNode.removeChild(nodes[i]); - } - } - const link = document.createElement('link'); - link.setAttribute('rel', 'stylesheet'); - link.setAttribute('type', 'text/css'); - link.setAttribute('href', 'themes://' + themeId); - document.head.appendChild(link); - } - /** - * Gets and removes promise from the pending list. - * @param {String} id Request ID. - * @return {Object|undefined} - */ - _getPromise(id) { - const p = this._promises[id]; - if (!p) { - return; - } - delete this._promises[id]; - return p; - } - /** - * Handler for the error message from the main IPC. - * @param {Object} e - * @param {String} id Request id - * @param {Object} cause Error object with "message". - */ - _errorHandler(e, id, cause) { - const p = this._getPromise(id); - if (!p) { - log.error(cause); - return; - } - p.reject(cause); - } - /** - * Handler for `theme-manager-themes-list` event from the main IPC. - * @param {Object} e - * @param {String} id Request id - * @param {Array} list List of installed themes - */ - _ipcThemesListHandler(e, id, list) { - const p = this._getPromise(id); - if (!p) { - log.error(`ThemeManager: Pending request ${id} do not exist.`); - return; - } - p.resolve(list); - } - /** - * Handler for `theme-manager-active-theme-info` event from the main IPC. - * @param {Object} e - * @param {String} id Request id - * @param {Object} info Theme meta data - */ - _ipcInfoHandler(e, id, info) { - const p = this._getPromise(id); - if (!p) { - log.error(`ThemeManager: Pending request ${id} do not exist.`); - return; - } - p.resolve(info); - } - /** - * Handler for `theme-manager-theme-activated` event from the main IPC. - * @param {Object} e - * @param {String} id Request id - * @param {String} themeId ID of activated theme. - */ - async _ipcActivatedHandler(e, id, themeId) { - const p = this._getPromise(id); - if (p) { - p.resolve(); - } - // this.requireReload(); - await this.loadTheme(themeId); - document.body.dispatchEvent(new CustomEvent('theme-activated', { - bubbles: true, - detail: themeId - })); - } - - _ipcInstalledHandler(e, id, info) { - const p = this._getPromise(id); - if (!p) { - log.error(`ThemeManager: Pending request ${id} do not exist.`); - return; - } - p.resolve(info); - } - - _ipcUninstalledHandler(id) { - const p = this._getPromise(id); - if (!p) { - log.error(`ThemeManager: Pending request ${id} do not exist.`); - return; - } - p.resolve(); - } - /** - * Dispatches `reload-app-required` event to the main process. - */ - requireReload() { - const message = 'Theme change requires application reload.'; - ipc.send('reload-app-required', message); - } -} -module.exports.ThemeManager = ThemeManager; diff --git a/scripts/renderer/filesystem-proxy.js b/scripts/renderer/filesystem-proxy.js deleted file mode 100644 index f5cffee5..00000000 --- a/scripts/renderer/filesystem-proxy.js +++ /dev/null @@ -1,91 +0,0 @@ -const { ipcRenderer: ipc } = require('electron'); -const fs = require('fs-extra'); -const path = require('path'); -/** - * This class is a proxy to access user filesystem from the renderer process. - * - * Node integration is disabled inside the application and scripts do not have - * acces to `fs` module. This class is loaded in the preload script and - * uses events API to store data in file. - * - * Also, data are not send to the IO thread as saving file is a blocking - * operation which could froze all application windows. If anything happens - * during IO operation it us better to crash single window. - */ -class FilesystemProxy { - constructor() { - this._exportHandler = this._exportHandler.bind(this); - } - - listen() { - window.addEventListener('file-data-save', this._exportHandler); - } - - unlisten() { - window.removeEventListener('file-data-save', this._exportHandler); - } - - _exportHandler(e) { - if (e.defaultPrevented) { - return; - } - e.preventDefault(); - const { content, file, options={} } = e.detail; - e.detail.result = this.exportFileData(content, options.contentType, file); - } - /** - * Requests a save file dialog and saves the data to selected path if not cancelled. - * This does nothing when dialog is canceled. - * - * @param {String|Object|Buffer} content Data to write - * @param {String=} mime Content media type. Currently only `application/json` is - * supported when the `content` is an object or an array. - * @param {String=} file Suggested file name - * @return {Promise} - */ - async exportFileData(content, mime, file) { - const opts = { - file - }; - const result = await ipc.invoke('save-dialog', opts) - const { filePath, canceled } = result; - if (canceled) { - return; - } - await this._writeContent(filePath, content, mime); - } - /** - * Writes content to a file - * @param {String} path Absolute path to a file - * @param {String|Object|Buffer} content Data to be written - * @param {String=} mime Content media type. - * @return {Promise} - */ - _writeContent(path, content, mime) { - if (typeof content !== 'string') { - content = this._prepareData(content, mime); - } - return fs.writeFile(path, content, 'utf8'); - } - - _prepareData(data, mime) { - switch (mime) { - case 'application/json': return JSON.stringify(data); - default: return String(data); - } - } - /** - * Allows to read file from user filesystem. - * @param {String} path File path to ready - * @return {Promise} - */ - readFile(path) { - return fs.readFile(path); - } - - extname(filePath) { - return path.extname(filePath); - } -} - -module.exports.FilesystemProxy = FilesystemProxy; diff --git a/scripts/renderer/import-file-preprocessor.js b/scripts/renderer/import-file-preprocessor.js deleted file mode 100644 index 8c23acf7..00000000 --- a/scripts/renderer/import-file-preprocessor.js +++ /dev/null @@ -1,81 +0,0 @@ -const fs = require('fs-extra'); -const path = require('path'); -class ImportFilePrePprocessor { - /** - * Recognizes file type and sends to appropriate parser. - * @param {String} filePath Location of the file. - * @return {Promise} - */ - async processFile(filePath) { - if (!filePath) { - throw new Error('Argument not set'); - } - const buffer = await fs.readFile(filePath); - const ext = path.extname(filePath); - if (this._isApiFile(ext)) { - return await this._notifyApiParser(buffer); - } - // Only JSON files left. It can be either ARC, Postam or OAS - return await this._discoverFile(buffer); - } - - _isApiFile(ext) { - const apiTypes = [ - '.zip', '.yaml', '.raml' - ]; - return apiTypes.indexOf(ext) !== -1; - } - - _dispatch(type, detail) { - const e = new CustomEvent(type, { - bubbles: true, - cancelable: true, - detail - }); - document.body.dispatchEvent(e); - return e; - } - - /** - * Dispatches `api-process-file` to parse API data usingseparate module. - * In ARC electron it is `@advanced-rest-client/electron-amf-service` - * node module. In other it might be other component. - * @param {File} file User file. - * @return {Promise} - */ - async _notifyApiParser(file) { - const e = this._dispatch('api-process-file', { - file - }); - if (!e.defaultPrevented) { - throw new Error('API processor not available'); - } - const api = await e.detail.result; - this._dispatch('api-data-ready', { - model: api.model, - type: api.type - }); - } - - async _discoverFile(buffer) { - const content = buffer.toString().trim(); - if (content[0] !== '{') { - throw new Error('Unsupported file.'); - } - let data; - try { - data = JSON.parse(content); - } catch (_) { - throw new Error('Unknown file format.'); - } - if (data.swagger) { - return await this._notifyApiParser(buffer); - } - - const e = this._dispatch('import-process-data', { - data - }); - return await e.detail.result; - } -} -module.exports.ImportFilePrePprocessor = ImportFilePrePprocessor; diff --git a/scripts/renderer/lib/payload-processor.js b/scripts/renderer/lib/payload-processor.js deleted file mode 100644 index 54dc0c90..00000000 --- a/scripts/renderer/lib/payload-processor.js +++ /dev/null @@ -1,196 +0,0 @@ -/** - * A helper class that processes payload before saving it to a - * datastore or file. - * It processes `FormData` and `Blob` payloads into string and restores - * them to original state. - */ -class PayloadProcessor { - /** - * @constructor - * - * @param {Object} arcRequest The ARC request object to operate on. - */ - constructor(arcRequest) { - this.request = arcRequest; - } - /** - * Transforms request pyload to string if needed. - * Note, this returns copy of the object if any transformation is applied. - * - * @return {Promise} Promise resolved when payload has been processed. - */ - payloadToString() { - if (!this.request.payload) { - return Promise.resolve(this.request); - } - if (this.request.payload instanceof FormData) { - const data = Object.assign({}, this.request); - if (!data.payload.entries) { - data.payload = undefined; - return Promise.resolve(data); - } - return this._createMultipartEntry(data.payload) - .then((entry) => { - data.payload = undefined; - data.multipart = entry; - return data; - }); - } else if (this.request.payload instanceof Blob) { - const data = Object.assign({}, this.request); - return this._blobToString(data.payload) - .then((str) => { - data.payload = undefined; - data.blob = str; - return data; - }); - } - return Promise.resolve(this.request); - } - - /** - * Computes `multipart` list value to replace FormData with array that can - * be stored in the datastore. - * - * @param {FormData} payload FormData object - * @return {Promise} Promise resolved to a form part representation. - */ - _createMultipartEntry(payload) { - const iterator = payload.entries(); - let textParts; - if (payload._arcMeta && payload._arcMeta.textParts) { - textParts = payload._arcMeta.textParts; - } - return this._computeFormDataEntry(iterator, textParts); - } - /** - * Recuresively iterates over form data and appends result of creating the - * part object to the `result` array. - * - * Each part entry contains `name` as a form part name, value as a string - * representation of the value and `isFile` to determine is the value is - * acttually a string or a file data. - * - * @param {Iterator} iterator FormData iterator - * @param {?Array} textParts From `_arcMeta` property. List of blobs - * that should be treated as text parts. - * @param {?Array} result An array where the results are appended to. - * It creates new result object when it's not passed. - * @return {Promise} A promise resolved to the `result` array. - */ - _computeFormDataEntry(iterator, textParts, result) { - result = result || []; - const item = iterator.next(); - if (item.done) { - return Promise.resolve(result); - } - const entry = item.value; - const name = entry[0]; - const value = entry[1]; - let promise; - let isBlob = false; - let isTextBlob = false; - if (value instanceof Blob) { - promise = this._blobToString(value); - if (textParts && textParts.indexOf(name) !== -1) { - isBlob = false; - isTextBlob = true; - } else { - isBlob = true; - } - } else { - promise = Promise.resolve(value); - } - return promise - .then((str) => { - const _part = { - name: name, - value: str, - isFile: isBlob - }; - if (isTextBlob) { - _part.isTextBlob = isTextBlob; - } - return _part; - }) - .then((part) => { - result.push(part); - return this._computeFormDataEntry(iterator, textParts, result); - }); - } - /** - * Converts blob data to base64 string. - * - * @param {Blob} blob File or blob object to be translated to string - * @return {Promise} Promise resolved to a base64 string data from the file. - */ - _blobToString(blob) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onloadend = function(e) { - resolve(e.target.result); - }; - reader.onerror = function() { - reject(new Error('Unable to convert blob to string.')); - }; - reader.readAsDataURL(blob); - }); - } - /** - * Restores FormData from ARC data model. - * - * @param {Array} model ARC model for multipart. - * @return {FormData} Restored form data - */ - restoreMultipart(model) { - const fd = new FormData(); - if (!model || !model.length) { - return fd; - } - fd._arcMeta = { - textParts: [] - }; - model.forEach((part) => { - const name = part.name; - let value; - if (part.isFile) { - try { - value = this._dataURLtoBlob(part.value); - } catch (e) { - value = ''; - } - } else { - value = part.value; - if (part.isTextBlob) { - fd._arcMeta.textParts.push(name); - try { - value = this._dataURLtoBlob(part.value); - } catch (e) { - value = ''; - } - } - } - fd.append(name, value); - }); - return fd; - } - - /** - * Converts dataurl string to blob - * - * @param {String} dataurl Data url from blob value. - * @return {Blob} Restored blob value - */ - _dataURLtoBlob(dataurl) { - const arr = dataurl.split(','); - const mime = arr[0].match(/:(.*?);/)[1]; - const bstr = atob(arr[1]); - let n = bstr.length; - const u8arr = new Uint8Array(n); - while (n--) { - u8arr[n] = bstr.charCodeAt(n); - } - return new Blob([u8arr], { type: mime }); - } -} - -exports.PayloadProcessor = PayloadProcessor; diff --git a/scripts/renderer/preload.js b/scripts/renderer/preload.js deleted file mode 100644 index 11a84f18..00000000 --- a/scripts/renderer/preload.js +++ /dev/null @@ -1,62 +0,0 @@ -const { ipcRenderer: ipc, clipboard } = require('electron'); -const { app } = require('electron').remote; -const log = require('electron-log'); -const Jexl = require('jexl'); -const prefix = '@advanced-rest-client/'; -const { ArcElectronDrive } = require(prefix + 'electron-drive/renderer'); -const { OAuth2Handler } = require(prefix + 'electron-oauth2/renderer'); -const { WorkspaceManager } = require('../packages/arc-preferences/renderer'); -const { ArcPreferencesProxy } = require('../packages/arc-preferences/renderer'); -const { ThemeManager } = require('../packages/themes-manager/renderer'); -const { SocketRequest, ElectronRequest } = require(prefix + 'electron-request'); -const { CookieBridge } = require(prefix + 'electron-session-state/renderer'); -const { ArcContextMenu } = require('../packages/context-actions/renderer'); -const { FilesystemProxy } = require('./filesystem-proxy'); -const { ElectronAmfService } = require('@advanced-rest-client/electron-amf-service'); -const { WindowSearchService } = require('../packages/search-service/renderer'); -const { EncryptionService } = require('../packages/encryption/renderer/encryption.js'); -const { UpgradeHelper } = require('./upgrade-helper'); -const { ImportFilePrePprocessor } = require('./import-file-preprocessor'); -const setImmediateFn = setImmediate; -const versions = process.versions; -const env = {}; -Object.keys(process.env).forEach((key) => { - if (key.indexOf('npm_') === 0 || key.indexOf('ARC_') === 0) { - return; - } - env[key] = process.env[key]; -}); - -process.once('loaded', () => { - if (process.env.NODE_ENV === 'test') { - global.electronRequire = require; - } - global.ipcRenderer = ipc; - global.ipc = ipc; - global.ArcElectronDrive = ArcElectronDrive; - global.OAuth2Handler = OAuth2Handler; - global.WorkspaceManager = WorkspaceManager; - global.ArcPreferencesProxy = ArcPreferencesProxy; - global.ThemeManager = ThemeManager; - global.ArcContextMenu = ArcContextMenu; - global.SocketRequest = SocketRequest; - global.ElectronRequest = ElectronRequest; - global.CookieBridge = CookieBridge; - global.log = log; - global.setImmediate = setImmediateFn; - global.FilesystemProxy = FilesystemProxy; - global.ElectronAmfService = ElectronAmfService; - global.WindowSearchService = WindowSearchService; - global.Jexl = Jexl; - global.UpgradeHelper = UpgradeHelper; - global.ImportFilePrePprocessor = ImportFilePrePprocessor; - global.EncryptionService = EncryptionService; - global.versionInfo = { - chrome: versions.chrome, - appVersion: app.getVersion() - }; - global.clipboard = clipboard; - global.process = { - env - }; -}); diff --git a/scripts/renderer/upgrade-helper.js b/scripts/renderer/upgrade-helper.js deleted file mode 100644 index cb5188b0..00000000 --- a/scripts/renderer/upgrade-helper.js +++ /dev/null @@ -1,124 +0,0 @@ -/** - * A class responsible for upgrading the app in the renderer process. - */ -class UpgradeHelper { - /* global versionInfo, ipc */ - constructor(upgrades) { - if (!(upgrades instanceof Array)) { - upgrades = undefined; - } - if (!upgrades) { - upgrades = []; - } - this.upgrades = upgrades; - } - /** - * Check if upgrades are required. - * @return {Boolean} True if there are upgrades required for this version of the app. - */ - upgradeRequired() { - const queue = this.getUpgrades(); - return queue.length > 0; - } - - getUpgrades() { - const ver = versionInfo.appVersion; - if (!ver) { - return false; - } - const queue = []; - - const parts = ver.split('.'); - const majorUpgrade = this.__getUpgrade(parts[0]); - if (majorUpgrade) { - queue[queue.length] = majorUpgrade; - } - - const minorUpgrade = this.__getUpgrade(parts[0] + parts[1]); - if (minorUpgrade) { - queue[queue.length] = minorUpgrade; - } - - const pathUpgrade = this.__getUpgrade(parts[0] + parts[1] + parts[2]); - if (pathUpgrade) { - queue[queue.length] = pathUpgrade; - } - - const fullv = ver.replace(/[.-]/g, ''); - if (fullv !== pathUpgrade) { - const channelUpgrade = this.__getUpgrade(fullv); - if (channelUpgrade) { - queue[queue.length] = channelUpgrade; - } - } - return queue; - } - - __getUpgrade(version) { - if (this.upgrades.indexOf(version) !== -1) { - return; - } - const fullName = 'upgrade' + version; - if (typeof this[fullName] === 'function') { - return { - version: version, - fn: fullName - }; - } - } - - upgrade(upgradeList) { - if (!upgradeList || !upgradeList.length) { - return Promise.resolve(); - } - const promises = []; - for (let i = 0, len = upgradeList.length; i < len; i++) { - const item = upgradeList[i]; - if (typeof this[item.fn] === 'function') { - const result = this[item.fn](); - if (result instanceof Promise) { - promises.push(result); - } - } - } - return Promise.all(promises) - .catch((cause) => { - console.error('Upgrade incloplete', cause); - }); - } - - /** - * Upgrade for version 13 includes: - * - datastore indexes upgrade - * - * @return {Promise} - */ - upgrade13() { - return this._upgrade13Indexes(); - } - - _upgrade13Indexes() { - const app = document.body.querySelector('arc-electron'); - if (!app) { - console.warn('Upgrade manager cannot find app.'); - return; - } - const indexer = app.shadowRoot.querySelector('url-indexer'); - console.info('Upgrading saved requests index....'); - return indexer.reindexSaved() - .then(() => { - console.info('Saved requests index ready'); - console.info('Upgrading history requests index....'); - return indexer.reindexHistory(); - }) - .then(() => { - console.info('History requests index ready'); - this.upgrades.push('13'); - ipc.send('update-app-preference', 'upgrades', this.upgrades); - }) - .catch((cause) => { - console.error('Requests index upgrade error', cause); - }); - } -} -module.exports.UpgradeHelper = UpgradeHelper; diff --git a/src/apic-electron/apic-electron.js b/src/apic-electron/apic-electron.js deleted file mode 100644 index 9acab3bc..00000000 --- a/src/apic-electron/apic-electron.js +++ /dev/null @@ -1,568 +0,0 @@ -/** -@license -Copyright 2018 The Advanced REST client authors -Licensed under the Apache License, Version 2.0 (the "License"); you may not -use this file except in compliance with the License. You may obtain a copy of -the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations under -the License. -*/ -import { LitElement, html } from '../../web_modules/lit-element/lit-element.js'; -import { AmfHelperMixin } from '../../web_modules/@api-components/amf-helper-mixin/amf-helper-mixin.js'; -import '../../web_modules/@api-components/api-documentation/api-documentation.js'; -import '../../web_modules/@api-components/api-navigation/api-navigation.js'; -import '../../web_modules/@polymer/paper-spinner/paper-spinner.js'; -import '../../web_modules/@polymer/paper-toast/paper-toast.js'; -import '../../web_modules/@api-components/raml-aware/raml-aware.js'; -import { ArcFileDropMixin } from '../../web_modules/@advanced-rest-client/arc-file-drop-mixin/arc-file-drop-mixin.js'; -import styles from './styles.js'; -/** - * It'a a wrapper for API console to render the console from unresolved - * AMF model. - * - * ARC stores unresolved ld+json model of AMF so it is possible to generate - * RAML/OAS files from it later. Before API console can be used with data model - * it has to be resolved. - * - * - * @customElement - * @demo demo/index.html - * @memberof ApiElements - */ -class ApicElectron extends ArcFileDropMixin(AmfHelperMixin(LitElement)) { - static get styles() { - return styles; - } - - _docsTemplate() { - const { - amf, - selected, - selectedType, - narrow, - scrollTarget, - apiProcessing - } = this; - return html` - - - `; - } - - _busyTemplate() { - if (!this.apiProcessing) { - return ''; - } - return html`
-

Preparing your API experience

- -
`; - } - - render() { - return html` - ${this._docsTemplate()} - ${this._busyTemplate()} - -
-

Drop API file here

-
`; - } - - static get properties() { - return { - /** - * Unresolved AMF model. - */ - unresolvedAmf: { type: String }, - /** - * API original type. - */ - apiType: { type: String }, - /** - * Resolved AMF model. - */ - amf: { type: Object }, - /** - * Passed to API console's `selected` property. - */ - selected: { type: String }, - /** - * Passed to API console's `selectedType` property. - */ - selectedType: { type: String }, - narrow: { type: Boolean }, - scrollTarget: { type: Object }, - - baseUri: { type: String }, - - apiVersion: { type: String, notify: true }, - - apiInfo: { type: Object, notify: true }, - - versions: { type: Array, notify: true }, - - multiVersion: { type: Boolean, notify: true }, - - saved: { type: Boolean, notify: true }, - - canSave: { type: Boolean, notify: true }, - - versionSaved: { type: Boolean, notify: true, }, - /** - * When set the API is being processed. - */ - apiProcessing: { type: Boolean, notify: true } - }; - } - - get unresolvedAmf() { - return this._unresolvedAmf; - } - - set unresolvedAmf(value) { - const old = this._unresolvedAmf; - if (old === value) { - return; - } - this._unresolvedAmf = value; - this._unprocessedChanged(); - } - - get apiType() { - return this._apiType; - } - - set apiType(value) { - const old = this._apiType; - if (old === value) { - return; - } - this._apiType = value; - this._unprocessedChanged(); - } - - constructor() { - super(); - this._indexChangeHandler = this._indexChangeHandler.bind(this); - /* global log */ - this.log = log; - } - - connectedCallback() { - if (super.connectedCallback) { - super.connectedCallback(); - } - window.addEventListener('api-index-changed', this._indexChangeHandler); - // window.addEventListener('api-version-deleted', this._indexChangeHandler); - } - - disconnectedCallback() { - if (super.disconnectedCallback) { - super.disconnectedCallback(); - } - window.removeEventListener('api-index-changed', this._indexChangeHandler); - } - - updated(changedProperties) { - const props = ApicElectron.properties; - changedProperties.forEach((old, key) => { - const def = props[key] || {}; - if (def.notify) { - this.dispatchEvent(new CustomEvent(`${key.toLowerCase()}-changed`, { - detail: { - value: this[key] - } - })); - } - }); - } - - _unprocessedChanged() { - const { unresolvedAmf, apiType } = this; - if (!unresolvedAmf || typeof unresolvedAmf !== 'string' || !apiType) { - this.amf = undefined; - return; - } - if (this.__processingResolve) { - clearTimeout(this.__processingResolve); - } - this.__processingResolve = setTimeout(() => { - this.__processingResolve = undefined; - this._processApi(unresolvedAmf, apiType); - }); - } - - async _processApi(unresolvedAmf, type) { - this.apiProcessing = true; - const e = this._dispatchResolve(unresolvedAmf, type); - - try { - const model = await e.detail.result; - this.amf = JSON.parse(model); - this._resolvedAmfChanged(); - } catch (e) { - this._notifyError(e.message); - } - this.apiProcessing = false; - } - - _dispatchResolve(model, type) { - const e = new CustomEvent('api-resolve-model', { - bubbles: true, - composed: true, - cancelable: true, - detail: { - model, - type - } - }); - this.dispatchEvent(e); - return e; - } - - _notifyError(message) { - const toast = this.shadowRoot.querySelector('#errorToast'); - toast.text = message; - toast.opened = true; - } - - _resolvedAmfChanged() { - const { amf } = this; - this.baseUri = this._computeBaseUri(amf); - this._baseUriChanged(); - this.apiVersion = this._getApiVersion(amf); - this.canSave = this._computeCanSave(this.baseUri, this.apiVersion); - } - - _compteVersionProperties() { - this.versions = this._computeVersionsList(); - this.multiVersion = this._computeIsMultiVersion(this.versions); - this.versionSaved = this._computeIsVersionSaved(this.versions, this.apiVersion); - } - /** - * Computes model's base Uri - * @param {Object|Array} model AMF data model - * @return {String} - */ - _computeBaseUri(model) { - if (!model) { - return; - } - const server = this._computeServer(model); - const protocols = this._computeProtocols(model); - return this._getAmfBaseUri(server, protocols); - } - - _getApiVersion(amf) { - let version = this._computeApiVersion(amf); - if (!version) { - version = '1'; - } - return String(version); - } - - async _baseUriChanged() { - const { baseUri } = this; - this.saved = false; - this.apiInfo = undefined; - if (!baseUri) { - return; - } - try { - const apiInfo = await this._getApiInfo(baseUri); - const saved = !!apiInfo; - this.saved = saved; - if (saved) { - this.apiInfo = apiInfo; - // this._compteVersionProperties(); - } - } catch (cause) { - this.log.error(cause); - } - this._compteVersionProperties(); - } - - _computeCanSave(baseUri, apiVersion) { - if (!baseUri || !apiVersion) { - return false; - } - return true; - } - - _getApiInfo(baseUri) { - const e = new CustomEvent('api-index-read', { - detail: { - baseUri - }, - bubbles: true, - cancelable: true, - composed: true - }); - this.dispatchEvent(e); - if (!e.defaultPrevented) { - return Promise.reject(new Error('APIs model is not in the DOM')); - } - return e.detail.result; - } - - _computeIsVersionSaved(versions, apiVersion) { - if (!versions || !versions.length || !apiVersion) { - return; - } - return versions.indexOf(apiVersion) !== -1; - } - - _computeIsMultiVersion(versions) { - if (!versions) { - return false; - } - return versions.length > 1; - } - /** - * Opens previously saved API. - * @param {String} id API database ID - * @param {?String} version API version. Default to latest version - * @return {Prommise} Promise resolved when API unresolved data are set. - * Note, property change observers will run model resolving API when - * unresolved model and type is set. - */ - async open(id, version) { - this.unresolvedAmf = undefined; - this.amf = undefined; - this.apiProcessing = true; - try { - const result = await this.getApi(id, version); - let api = result.api; - if (api && typeof api !== 'string') { - api = JSON.stringify(api); - } - this.unresolvedAmf = api; - this.apiType = result.type; - this.apiProcessing = false; - } catch (e) { - this.apiProcessing = false; - this.log.error(e); - throw e; - } - } - - async save() { - if (!this.amf) { - throw new Error('AMF model not set'); - } - if (!this.canSave) { - throw new Error('API version is missing.'); - } - const apiInfo = this.apiInfo; - if (!apiInfo) { - return await this._saveApi(); - } - return await this._saveVersion(Object.assign({}, apiInfo)); - } - - async _saveApi() { - const baseUri = this.baseUri; - if (!baseUri) { - throw new Error('API base URI is missing.'); - } - const webApi = this._computeWebApi(this.amf); - const title = this._getValue(webApi, this.ns.schema.schemaName); - if (!title) { - throw new Error('API title is missing.'); - } - const info = { - _id: baseUri, - title, - order: 0, - type: this.apiType - }; - return await this._saveVersion(info); - } - - async _saveVersion(apiInfo) { - const version = this.apiVersion; - if (!version) { - throw new Error('API version is missing.'); - } - await this._updateVersionInfo(apiInfo, version); - this._compteVersionProperties(); - return await this._updateDataObject(apiInfo._id, version); - } - - async _updateVersionInfo(apiInfo, version) { - if (!(apiInfo.versions instanceof Array)) { - apiInfo.versions = []; - } else { - apiInfo.versions = Array.from(apiInfo.versions); - } - if (apiInfo.versions.indexOf(version) === -1) { - apiInfo.versions.push(version); - } - apiInfo.latest = version; - if (!this.apiInfo) { - this.apiInfo = apiInfo; - } - const e = new CustomEvent('api-index-changed', { - detail: { - apiInfo - }, - bubbles: true, - cancelable: true, - composed: true - }); - this.dispatchEvent(e); - if (!e.defaultPrevented) { - throw new Error('APIs model is not in the DOM'); - } - return await e.detail.result; - } - - async _updateDataObject(id, version) { - const e = new CustomEvent('api-data-changed', { - detail: { - indexId: id, - version, - data: this.unresolvedAmf - }, - bubbles: true, - cancelable: true, - composed: true - }); - this.dispatchEvent(e); - if (!e.defaultPrevented) { - throw new Error('APIs model is not in the DOM'); - } - return await e.detail.result; - } - - _indexChangeHandler(e) { - if (e.cancelable || !this.apiInfo) { - return; - } - const changed = e.detail.apiInfo; - if (this.apiInfo._id !== changed._id) { - return; - } - this.apiInfo = changed; - if (!this.saved) { - this.saved = true; - } - this._compteVersionProperties(); - } - /** - * Requests to delete current API from the data store. - * It removes all versions of the API data and then the API index. - * @return {Promise} - */ - async delete() { - if (!this.saved) { - throw new Error('This API is not yet saved'); - } - const info = this.apiInfo; - if (!info) { - throw new Error('API data not restored'); - } - const e = new CustomEvent('api-deleted', { - detail: { - id: info._id - }, - bubbles: true, - cancelable: true, - composed: true - }); - this.dispatchEvent(e); - if (!e.defaultPrevented) { - throw new Error('APIs model is not in the DOM'); - } - return await e.detail.result; - } - /** - * Removes given version of the API. - * - * @param {String} version - * @return {Promise} - */ - async deleteVersion(version) { - if (!this.saved) { - throw new Error('This API is not yet saved'); - } - const info = this.apiInfo; - if (!info) { - throw new Error('API data not restored'); - } - const e = new CustomEvent('api-version-deleted', { - detail: { - id: info._id, - version - }, - bubbles: true, - cancelable: true, - composed: true - }); - this.dispatchEvent(e); - if (!e.defaultPrevented) { - throw new Error('APIs model is not in the DOM'); - } - return await e.detail.result; - } - - async getApi(id, version) { - if (!id) { - throw new Error('No API id given'); - } - const doc = await this._getApiInfo(id); - const type = doc.type; - if (!version) { - version = doc.latest; - } - const api = await this._requestApiVersion(id + '|' + version); - return { - api, - type - }; - } - - async _requestApiVersion(versionId) { - const e = new CustomEvent('api-data-read', { - detail: { - id: versionId - }, - bubbles: true, - cancelable: true, - composed: true - }); - this.dispatchEvent(e); - if (!e.defaultPrevented) { - throw new Error('APIs model is not in the DOM'); - } - const doc = await e.detail.result; - return doc.data; - } - - _computeVersionsList() { - const { apiInfo } = this; - if (!apiInfo) { - return; - } - if (!apiInfo.versions) { - apiInfo.versions = []; - } - return apiInfo.versions; - } -} -window.customElements.define('apic-electron', ApicElectron); diff --git a/src/apic-electron/styles.js b/src/apic-electron/styles.js deleted file mode 100644 index 2e24d4df..00000000 --- a/src/apic-electron/styles.js +++ /dev/null @@ -1,49 +0,0 @@ -import { css } from '../../web_modules/lit-element/lit-element.js'; - -export default css` -:host { - display: block; -}; - -paper-spinner { - margin-left: 8px; -} - -.error-toast { - background-color: var(--warning-primary-color, #FF7043); - color: var(--warning-contrast-color, #fff); -} - -[hidden] { - display: none !important; -} - -.loader { - height: 100%; - font-size: 16px; - display: flex; - flex-direction: column; - vertical-align: column; - align-items: center; - justify-content: center; - min-height: inherit; -} - -.drop-target { - display: none; -} - -:host([dragging]) .drop-target { - display: block; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - display: flex; - vertical-align: column; - align-items: center; - background-color: #fff; - border: 4px var(--drop-file-importer-header-background-color, var(--primary-color)) solid; -} -`; diff --git a/src/app/ApplicationPage.js b/src/app/ApplicationPage.js new file mode 100644 index 00000000..0d24800c --- /dev/null +++ b/src/app/ApplicationPage.js @@ -0,0 +1,33 @@ +/* eslint-disable class-methods-use-this */ +import { ReactiveMixin } from './mixins/ReactiveMixin.js'; +import { RenderableMixin } from './mixins/RenderableMixin.js'; +import './arc-alert-dialog.js'; + +/** + * A base class for pages build outside the LitElement. It uses `lit-html` + * as the template renderer. + * + * The implementation (extending this class) should override the `appTemplate()` + * function that returns the `TemplateResult` from the `lit-html` library. + * + * To reflect the changed state call the `render()` function. The function schedules + * a micro task (through `requestAnimationFrame`) to call the render function on the template. + * + * More useful option is to use the `initObservableProperties()` function that accepts a list + * of properties set on the base class that once set triggers the render function. The setter checks + * whether the a value actually changed. It works well for primitives but it won't work as expected + * for complex types. + */ +export class ApplicationPage extends RenderableMixin(ReactiveMixin(EventTarget)) { + /** + * Creates a modal dialog with the error details. + * @param {string} message The message to render + */ + reportCriticalError(message) { + const dialog = document.createElement('arc-alert-dialog'); + dialog.message = message; + dialog.modal = true; + dialog.open(); + document.body.appendChild(dialog); + } +} diff --git a/src/app/README.md b/src/app/README.md new file mode 100644 index 00000000..54d1ffc1 --- /dev/null +++ b/src/app/README.md @@ -0,0 +1,3 @@ +# Advanced REST Client front-end + +This folder contains the entire front end application. It contains logic for the pages, and utility components. diff --git a/src/app/about.html b/src/app/about.html new file mode 100644 index 00000000..540a7abf --- /dev/null +++ b/src/app/about.html @@ -0,0 +1,15 @@ + + + + + + + Advanced REST Client by MuleSoft + + + + +
+ + + diff --git a/src/app/analytics-consent.html b/src/app/analytics-consent.html new file mode 100644 index 00000000..958d158a --- /dev/null +++ b/src/app/analytics-consent.html @@ -0,0 +1,44 @@ + + + + + + + Advanced REST Client by MuleSoft + + + + +
+ + + diff --git a/src/app/api-console.html b/src/app/api-console.html new file mode 100644 index 00000000..a345fc82 --- /dev/null +++ b/src/app/api-console.html @@ -0,0 +1,33 @@ + + + + + + + Advanced REST Client by MuleSoft + + + + + + + + + + + + + + + +
+ + + + + + + + diff --git a/src/app/app.html b/src/app/app.html new file mode 100644 index 00000000..9a31a62c --- /dev/null +++ b/src/app/app.html @@ -0,0 +1,50 @@ + + + + + + + Advanced REST Client by MuleSoft + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +

Enter password

+ + + +
+ Cancel + OK +
+
+ + diff --git a/src/app/arc-alert-dialog.d.ts b/src/app/arc-alert-dialog.d.ts new file mode 100644 index 00000000..5ad7ab03 --- /dev/null +++ b/src/app/arc-alert-dialog.d.ts @@ -0,0 +1,7 @@ +import { ArcAlertDialogElement } from './scripts/common/ArcAlertDialogElement'; + +declare global { + interface HTMLElementTagNameMap { + "arc-alert-dialog": ArcAlertDialogElement; + } +} diff --git a/src/app/arc-alert-dialog.js b/src/app/arc-alert-dialog.js new file mode 100644 index 00000000..c755dd07 --- /dev/null +++ b/src/app/arc-alert-dialog.js @@ -0,0 +1,3 @@ +import { ArcAlertDialogElement } from './scripts/common/ArcAlertDialogElement.js'; + +customElements.define('arc-alert-dialog', ArcAlertDialogElement); diff --git a/src/app/data-migration.html b/src/app/data-migration.html new file mode 100644 index 00000000..644177d2 --- /dev/null +++ b/src/app/data-migration.html @@ -0,0 +1,15 @@ + + + + + + + Advanced REST Client by MuleSoft + + + + +
+ + + diff --git a/src/app/drive-picker.html b/src/app/drive-picker.html new file mode 100644 index 00000000..77292844 --- /dev/null +++ b/src/app/drive-picker.html @@ -0,0 +1,15 @@ + + + + + + + Advanced REST Client by MuleSoft + + + + +
+ + + diff --git a/src/app/license.html b/src/app/license.html new file mode 100644 index 00000000..a357f937 --- /dev/null +++ b/src/app/license.html @@ -0,0 +1,187 @@ + + + + + + + Advanced REST Client by MuleSoft + + + + + +
+
+
+ Advanced Rest Client +
+

The Advanced REST Client is an open source project and everyone can use it or part of it. However, depending on your project type the license vary.

+

For open source and free software you can use this software on Apache 2.0 license.

+

For commercial or non open source projects you can use this software on CC-BY 4.0 license.

+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
+
+ +
+ CodeMirror +
+
+Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the +"Software"), to deal +in the Software without restriction, including without limitation +the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be +included in +all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN +THE SOFTWARE. +Please note that some subdirectories of the CodeMirror distribution +include their own LICENSE files, and are released under different +licences. +
+
+ +
+ LitElement +
+
+BSD 3-Clause License + +Copyright (c) 2017, The Polymer Authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
+
+ +
+ LitElement +
+
+MIT LICENSE + +Copyright (c) 2012 Lea Verou + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +
+
+ +
+ Electron +
+
+Copyright (c) 2013-2020 GitHub Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +
+
+ +
+
+ + diff --git a/src/app/mixins/FileDropMixin.d.ts b/src/app/mixins/FileDropMixin.d.ts new file mode 100644 index 00000000..e62a4bfc --- /dev/null +++ b/src/app/mixins/FileDropMixin.d.ts @@ -0,0 +1,48 @@ +import { TemplateResult } from "lit-html"; + +export declare const dragEnterHandler: unique symbol; +export declare const dragLeaveHandler: unique symbol; +export declare const dragOverHandler: unique symbol; +export declare const dropHandler: unique symbol; + +declare function FileDropMixin {}>(base: T): T & FileDropMixinConstructor; +interface FileDropMixinConstructor { + new(...args: any[]): FileDropMixin; +} + +/** + * Adds methods to accept files via drag and drop. + * The mixin register the dnd events on the body element. When an object is dragged over the window it adds + * this `drop-target` class to the `body` element. + * + * The mixin also assumes that when the `drop-target` is set then the `drop-info` overlay is rendered. + * However, it does not change the logic if the element is not in the DOM. + * Use the provided `dropTargetTemplate()` function to generate template for the drag info. + * + * The class implementing this mixin should override the `processDroppedFiles(files)` method + * to process the incoming files. + * + * @mixin + */ +declare interface FileDropMixin { + /** + * Processes dropped to the page files + * @param files The list of dropped files + */ + processDroppedFiles(files: FileList): Promise; + /** + * @return The template for the drop file message + */ + dropTargetTemplate(): TemplateResult; + + [dragEnterHandler](e: DragEvent): void; + + [dragLeaveHandler](e: DragEvent): void; + + [dragOverHandler](e: DragEvent): void; + + [dropHandler](e: DragEvent): void; +} + +export {FileDropMixinConstructor}; +export {FileDropMixin}; \ No newline at end of file diff --git a/src/app/mixins/FileDropMixin.js b/src/app/mixins/FileDropMixin.js new file mode 100644 index 00000000..7eb2a974 --- /dev/null +++ b/src/app/mixins/FileDropMixin.js @@ -0,0 +1,136 @@ +/* eslint-disable class-methods-use-this */ +import { dedupeMixin } from '../../../web_modules/@open-wc/dedupe-mixin/index.js'; +import { html } from '../../../web_modules/lit-html/lit-html.js'; +import '../../../web_modules/@advanced-rest-client/arc-icons/arc-icon.js'; + +/** @typedef {import('lit-html').TemplateResult} TemplateResult */ + +export const dragEnterHandler = Symbol('dragEnterHandler'); +export const dragLeaveHandler = Symbol('dragLeaveHandler'); +export const dragOverHandler = Symbol('dragOverHandler'); +export const dropHandler = Symbol('dropHandler'); + +/** + * @param {new (...args: any[]) => any} base + */ +const mxFunction = (base) => { + class FileDropMixinImpl extends base { + constructor() { + super(); + this[dragEnterHandler] = this[dragEnterHandler].bind(this); + this[dragLeaveHandler] = this[dragLeaveHandler].bind(this); + this[dragOverHandler] = this[dragOverHandler].bind(this); + this[dropHandler] = this[dropHandler].bind(this); + + this.dropTargetActive = false; + + document.body.addEventListener('dragenter', this[dragEnterHandler]); + document.body.addEventListener('dragleave', this[dragLeaveHandler]); + document.body.addEventListener('dragover', this[dragOverHandler]); + document.body.addEventListener('drop', this[dropHandler]); + } + + /** + * Processes dropped to the page files + * @param {FileList} files The list of dropped files + * @abstract This is to be implemented by the platform bindings + */ + // eslint-disable-next-line no-unused-vars + async processDroppedFiles(files) { + // ... + } + + /** + * @return {TemplateResult} The template for the drop file message + */ + dropTargetTemplate() { + return html` +
+ +

Drop the file here

+
+ `; + } + + /** + * @param {DragEvent} e + */ + [dragEnterHandler](e) { + if (![...e.dataTransfer.types].includes('Files')) { + return; + } + e.preventDefault(); + document.body.classList.add('drop-target'); + this.dropTargetActive = true; + e.dataTransfer.effectAllowed = 'copy'; + } + + /** + * @param {DragEvent} e + */ + [dragLeaveHandler](e) { + if (![...e.dataTransfer.types].includes('Files')) { + return; + } + const node = /** @type HTMLElement */ (e.target); + if (node.nodeType !== Node.ELEMENT_NODE) { + return; + } + if (node !== document.body && !node.classList.contains('drop-info')) { + return; + } + e.preventDefault(); + document.body.classList.remove('drop-target'); + this.dropTargetActive = false; + } + + /** + * @param {DragEvent} e + */ + [dragOverHandler](e) { + if (![...e.dataTransfer.types].includes('Files')) { + return; + } + const node = /** @type HTMLElement */ (e.target); + if (node.nodeType !== Node.ELEMENT_NODE) { + return; + } + if (node !== document.body && !node.classList.contains('drop-info')) { + return; + } + e.preventDefault(); + document.body.classList.add('drop-target'); + this.dropTargetActive = true; + } + + /** + * @param {DragEvent} e + */ + [dropHandler](e) { + if (![...e.dataTransfer.types].includes('Files')) { + return; + } + e.preventDefault(); + document.body.classList.remove('drop-target'); + this.dropTargetActive = false; + this.processDroppedFiles(e.dataTransfer.files); + } + } + return FileDropMixinImpl; +} + +/** + * Adds methods to accept files via drag and drop. + * The mixin register the dnd events on the body element. When an object is dragged over the window it adds + * this `drop-target` class to the `body` element. Additionally it sets the `dropTargetActive` property. + * + * The mixin also assumes that when the `drop-target` is set then the `drop-info` overlay is rendered. + * However, it does not change the logic if the element is not in the DOM. + * Use the provided `dropTargetTemplate()` function to generate template for the drag info. + * + * The class implementing this mixin should override the `processDroppedFiles(files)` method + * to process the incoming files. + * + * @mixin + */ +export const FileDropMixin = dedupeMixin(mxFunction); diff --git a/src/app/mixins/ReactiveMixin.d.ts b/src/app/mixins/ReactiveMixin.d.ts new file mode 100644 index 00000000..65bc73d3 --- /dev/null +++ b/src/app/mixins/ReactiveMixin.d.ts @@ -0,0 +1,47 @@ +export declare const setObservableProperty: unique symbol; + +declare function ReactiveMixin {}>(base: T): T & ReactiveMixinConstructor; +interface ReactiveMixinConstructor { + new(...args: any[]): ReactiveMixin; +} + +/** + * Adds methods to register reactive properties, the properties + * that trigger the `render()` function once changed. + * + * Use the `initObservableProperties()` function that accepts a list + * of properties set on the base class that once set triggers the render function. The setter checks + * whether the a value actually changed. It works well for primitives but it won't work as expected + * for complex types. + * + * ## Example + * + * ```javascript + * constructor() { + * super(); + * this.initObservableProperties('prop1', 'prop2', 'prop3'); + * this.prop1 = 'test'; // <- this triggers the render() function + * } + * ``` + * + * @mixin + */ +declare interface ReactiveMixin { + /** + * Creates setters and getters to properties defined in the passed list of properties. + * Property setter will trigger render function. + * + * @param props List of properties to initialize. + */ + initObservableProperties(...props: string[]): void; + + [setObservableProperty](prop: string, value: any): void; + + /** + * The main render function. This is to be implemented by the mixin consumer. + */ + render(): void; +} + +export {ReactiveMixinConstructor}; +export {ReactiveMixin}; \ No newline at end of file diff --git a/src/app/mixins/ReactiveMixin.js b/src/app/mixins/ReactiveMixin.js new file mode 100644 index 00000000..0e2f81dd --- /dev/null +++ b/src/app/mixins/ReactiveMixin.js @@ -0,0 +1,85 @@ +import { dedupeMixin } from '../../../web_modules/@open-wc/dedupe-mixin/index.js'; + +export const setObservableProperty = Symbol('setObservableProperty'); + +const valuesMap = new WeakMap(); + +/** + * @param {new (...args: any[]) => any} base + */ +const mxFunction = (base) => { + class ReactiveMixinImpl extends base { + /** + * Creates setters and getters to properties defined in the passed list of properties. + * Property setter will trigger render function. + * + * @param {...string} props List of properties to initialize. + * @returns {void} + */ + initObservableProperties(...props) { + props.forEach((item) => { + Object.defineProperty(this, item, { + get() { + const map = valuesMap.get(this); + return map[item]; + }, + set(newValue) { + this[setObservableProperty](item, newValue); + }, + enumerable: true, + configurable: true, + }); + }); + } + + /** + * @param {string} prop + * @param {any} value + * @returns {void} + */ + [setObservableProperty](prop, value) { + let map = valuesMap.get(this); + if (!map) { + map = {}; + valuesMap.set(this, map); + } + if (map[prop] === value) { + return; + } + map[prop] = value; + this.render(); + } + + /** + * The main render function. This is to be implemented by the mixin consumer. + * @returns {void} + */ + render() { + // nothing + } + } + return ReactiveMixinImpl; +} + +/** + * Adds methods to register reactive properties, the properties + * that trigger the `render()` function once changed. + * + * Use the `initObservableProperties()` function that accepts a list + * of properties set on the base class that once set triggers the render function. The setter checks + * whether the a value actually changed. It works well for primitives but it won't work as expected + * for complex types. + * + * ## Example + * + * ```javascript + * constructor() { + * super(); + * this.initObservableProperties('prop1', 'prop2', 'prop3'); + * this.prop1 = 'test'; // <- this triggers the render() function + * } + * ``` + * + * @mixin + */ +export const ReactiveMixin = dedupeMixin(mxFunction); diff --git a/src/app/mixins/RenderableMixin.d.ts b/src/app/mixins/RenderableMixin.d.ts new file mode 100644 index 00000000..46332a18 --- /dev/null +++ b/src/app/mixins/RenderableMixin.d.ts @@ -0,0 +1,55 @@ +import { TemplateResult } from 'lit-html/lit-html.js'; + +export declare const renderingValue: unique symbol; +export declare const renderPage: unique symbol; + +declare function RenderableMixin {}>(base: T): T & RenderableMixinConstructor; +interface RenderableMixinConstructor { + new(...args: any[]): RenderableMixin; +} + +/** + * Adds methods that helps with asynchronous template rendering. + * + * @mixin + */ +declare interface RenderableMixin { + /** + * True when rendering debouncer is running. + */ + readonly rendering: boolean; + + [renderingValue]: boolean; + firstRendered: boolean; + + /** + * A promise resolved when the render finished. + */ + updateComplete: Promise; + + /** + * Helper function to be overridden by child classes. It is called when the view + * is rendered for the first time. + */ + firstRender(): void; + + /** + * This to be used by the child classes to render page template. + * @returns {} Application page template + */ + appTemplate(): TemplateResult; + + /** + * The main render function. Sub classes should not override this method. + * Override `[renderPage]()` instead. + * + * The function calls `[renderPage]()` in a micro task so it is safe to call this + * multiple time in the same event loop. + */ + render(): void; + + [renderPage](): void; +} + +export {RenderableMixinConstructor}; +export {RenderableMixin}; \ No newline at end of file diff --git a/src/app/mixins/RenderableMixin.js b/src/app/mixins/RenderableMixin.js new file mode 100644 index 00000000..e54458ba --- /dev/null +++ b/src/app/mixins/RenderableMixin.js @@ -0,0 +1,124 @@ +/* eslint-disable class-methods-use-this */ +import { dedupeMixin } from '../../../web_modules/@open-wc/dedupe-mixin/index.js'; +import { html, render } from '../../../web_modules/lit-html/lit-html.js'; + +/** @typedef {import('lit-html').TemplateResult} TemplateResult */ + +export const renderingValue = Symbol('renderingValue'); +export const renderPage = Symbol('renderPage'); +export const setUpdatePromise = Symbol('setUpdatePromise'); +export const updateResolver = Symbol('updateResolver'); +export const hasPendingUpdatePromise = Symbol('hasPendingUpdatePromise'); +export const resolveUpdatePromise = Symbol('resolveUpdatePromise'); + +/** + * @param {new (...args: any[]) => EventTarget} base + */ +const mxFunction = (base) => { + class RenderableMixin extends base { + + /** + * True when rendering debouncer is running. + */ + get rendering() { + return this[renderingValue]; + } + + constructor() { + super(); + /** + * Determines whether the initial render had run and the `firstRender()` + * function was called. + * + * @type {boolean} + * @default false + */ + this.firstRendered = false; + + this[renderingValue] = false; + + /** + * @type {Promise} A promise resolved when the render finished. + */ + this.updateComplete = undefined; + + this[setUpdatePromise](); + } + + /** + * Helper function to be overridden by child classes. It is called when the view + * is rendered for the first time. + */ + firstRender() { + } + + /** + * A function called when the template has been rendered + */ + updated() {} + + /** + * This to be used by the child classes to render page template. + * @returns {TemplateResult} Application page template + */ + appTemplate() { + return html``; + } + + /** + * The main render function. Sub classes should not override this method. + * Override `[renderPage]()` instead. + * + * The function calls `[renderPage]()` in a micro task so it is safe to call this + * multiple time in the same event loop. + */ + render() { + if (this.rendering) { + return; + } + this[renderingValue] = true; + if (!this[hasPendingUpdatePromise]) { + this[setUpdatePromise](); + } + requestAnimationFrame(() => { + this[renderingValue] = false; + this[renderPage](); + }); + } + + [renderPage]() { + if (!this.firstRendered) { + this.firstRendered = true; + setTimeout(() => this.firstRender()); + } + render(this.appTemplate(), document.querySelector('#app'), { eventContext: this }); + this[resolveUpdatePromise](); + this.updated(); + } + + [setUpdatePromise]() { + this.updateComplete = new Promise((resolve) => { + this[updateResolver] = resolve; + this[hasPendingUpdatePromise] = true; + }); + } + + [resolveUpdatePromise]() { + if (!this[hasPendingUpdatePromise]) { + return; + } + this[hasPendingUpdatePromise] = false; + this[updateResolver](); + } + } + return RenderableMixin; +} + +/** + * Adds methods that helps with asynchronous template rendering. + * + * The application page content is rendered into the `#app` container. + * + * @mixin + */ +export const RenderableMixin = dedupeMixin(mxFunction); diff --git a/src/app/popup-menu.html b/src/app/popup-menu.html new file mode 100644 index 00000000..76ed45ba --- /dev/null +++ b/src/app/popup-menu.html @@ -0,0 +1,17 @@ + + + + + + + Advanced REST Client by MuleSoft + + + + + + +
+ + + diff --git a/src/app/scripts/AboutDialog.js b/src/app/scripts/AboutDialog.js new file mode 100644 index 00000000..83b375b0 --- /dev/null +++ b/src/app/scripts/AboutDialog.js @@ -0,0 +1,396 @@ +/* eslint-disable no-param-reassign */ +import { ApplicationPage } from '../ApplicationPage.js'; +import { html } from '../../../web_modules/lit-html/lit-html.js'; +import '../../../web_modules/@polymer/font-roboto-local/roboto.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-dropdown-menu/anypoint-dropdown-menu.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-listbox/anypoint-listbox.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-item/anypoint-item.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-item/anypoint-item-body.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-button/anypoint-button.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-switch/anypoint-switch.js'; +import '../../../web_modules/@advanced-rest-client/arc-icons/arc-icon.js'; + +/** @typedef {import('lit-html').TemplateResult} TemplateResult */ +/** @typedef {import('electron-updater').UpdateInfo} UpdateInfo */ +/** @typedef {import('@advanced-rest-client/arc-types').Config.ARCConfig} ARCConfig */ +/** @typedef {import('@anypoint-web-components/anypoint-switch').AnypointSwitch} AnypointSwitch */ + +/* global PreferencesProxy, ThemeManager, logger, ipc, PreferencesProxy */ + +const checkingUpdateHandler = Symbol('checkingUpdateHandler'); +const updateAvailableHandler = Symbol('updateAvailableHandler'); +const updateNotAvailableHandler = Symbol('updateNotAvailableHandler'); +const updateErrorHandler = Symbol('updateErrorHandler'); +const downloadingHandler = Symbol('downloadingHandler'); +const downloadedHandler = Symbol('downloadedHandler'); + +class AboutDialog extends ApplicationPage { + settings = new PreferencesProxy(); + + themeProxy = new ThemeManager(); + + get updateDownloaded() { + return this.updateStatePage === 3; + } + + get updateProgress() { + return [1, 2, 3].indexOf(this.updateStatePage) !== -1; + } + + get isError() { + return this.updateStatePage === 4; + } + + get updateLabel() { + switch (this.updateStatePage) { + case 1: return html`Checking for update...`; + case 2: return html`Downloading update...`; + case 3: return html`Ready to install`; + case 4: return html`Update error`; + default: return html`ARC is up to date `; + } + } + + constructor() { + super(); + + this.initObservableProperties( + 'autoUpdate', 'updateStatePage', 'errorMessage', 'releaseChannel', 'errorCode', + 'compatibility', 'upgradeInfo' + ); + this.compatibility = false; + + /** + * page of the update status label + */ + this.updateStatePage = 0; + /** + * State of auto update setting. + */ + this.autoUpdate = false; + /** + * Associated message with current error code. + * @type {string} + */ + this.errorMessage = undefined; + /** + * @type {string} + */ + this.errorCode = undefined; + /** + * Current release channel. + * @type {string} + */ + this.releaseChannel = 'latest'; + /** + * Current release channel. + * @type {UpdateInfo} + */ + this.upgradeInfo = undefined; + /** + * Enables compatibility with Anypoint platform + */ + this.compatibility = false; + } + + async initialize() { + await this.loadTheme(); + let cnf = /** @type ARCConfig */ ({}); + try { + cnf = await this.settings.read(); + } catch (e) { + this.reportCriticalError(e); + throw e; + } + const { updater={} } = cnf; + const { auto, channel } = updater; + this.releaseChannel = channel || 'latest'; + this.autoUpdate = auto; + this.listen(); + this.render(); + } + + /** + * Loads the current theme. + */ + async loadTheme() { + const info = await this.themeProxy.readActiveThemeInfo(); + const theme = info && info.name; + try { + await this.themeProxy.loadTheme(theme); + this.compatibility = theme === ThemeManager.anypointTheme; + } catch (e) { + logger.error(e); + } + } + + listen() { + ipc.on('checking-for-update', this[checkingUpdateHandler].bind(this)); + ipc.on('update-available', this[updateAvailableHandler].bind(this)); + ipc.on('update-not-available', this[updateNotAvailableHandler].bind(this)); + ipc.on('autoupdate-error', this[updateErrorHandler].bind(this)); + ipc.on('download-progress', this[downloadingHandler].bind(this)); + ipc.on('update-downloaded', this[downloadedHandler].bind(this)); + } + + [checkingUpdateHandler]() { + this.updateStatePage = 1; + } + + /** + * @param {*} e + * @param {UpdateInfo} info + */ + [updateAvailableHandler](e, info) { + this.upgradeInfo = info; + if (this.updateStatePage !== 2) { + this.updateStatePage = 2; + } + } + + [updateNotAvailableHandler]() { + this.updateStatePage = 0; + } + + /** + * @param {*} e + * @param {*} err + */ + [updateErrorHandler](e, err) { + this.updateStatePage = 4; + this.createErrorMessage(err.code, err.message); + this.errorCode = err.code || undefined; + } + + [downloadingHandler]() { + if (this.updateStatePage !== 2) { + this.updateStatePage = 2; + } + } + + [downloadedHandler]() { + this.updateStatePage = 3; + } + + /** + * @param {string=} code + * @param {string=} message + */ + createErrorMessage(code, message) { + switch (code) { + case 'ERR_UPDATER_INVALID_RELEASE_FEED': + message = 'Unable to parse releases feed.'; + break; + case 'ERR_UPDATER_NO_PUBLISHED_VERSIONS': + message = 'Unable to find published version.'; + break; + case 'ERR_UPDATER_CHANNEL_FILE_NOT_FOUND': + message = 'Cannot find latest release information for this platform.'; + break; + case 'ERR_UPDATER_LATEST_VERSION_NOT_FOUND': + message = 'Unable to find latest version on GitHub.'; + break; + default: + message = message || 'Unknown error ocurred.'; + } + this.errorMessage = message; + } + + async updateCheck() { + // ipc.send('check-for-update'); + try { + await ipc.invoke('check-for-update'); + } catch (e) { + this.createErrorMessage(null, e.message); + this.updateStatePage = 4; + } + } + + updateInstall() { + ipc.send('install-update'); + } + + /** + * @param {MouseEvent} e + */ + linkHandler(e) { + e.preventDefault(); + e.stopPropagation(); + const anchor = /** @type HTMLAnchorElement */ (e.target); + ipc.send('open-external-url', anchor.href); + } + + /** + * Checks if `channel` is a valid channel signature. + * @param {string} channel + * @returns {boolean} + */ + isValidChannel(channel) { + return ['beta', 'alpha', 'latest'].indexOf(channel) !== -1; + } + + /** + * @param {Event} e + */ + autoChangeHandler(e) { + const button = /** @type AnypointSwitch */ (e.target); + if (this.autoUpdate === undefined && button.checked === false) { + this.autoUpdate = button.checked; + return; + } + if (button.checked === this.autoUpdate) { + return; + } + this.autoUpdate = button.checked; + this.settings.update('updater.auto', button.checked); + } + + /** + * @param {CustomEvent} e + */ + releaseChannelHandler(e) { + this.releaseChannel = e.detail.value; + this.settings.update('updater.channel', e.detail.value); + } + + appTemplate() { + return html` +
+ ${this.titleTemplate()} + ${this.updatesSettingsTemplate()} + ${this.errorTemplate()} + ${this.authorTemplate()} +
+ `; + } + + titleTemplate() { + const { versionInfo } = window; + return html`
+
+
+ +
+
+

Advanced REST Client

+
+
+
+

Version: ${versionInfo.appVersion}

+ + Release notes + + +
+
`; + } + + updatesSettingsTemplate() { + const { + updateProgress, + updateDownloaded, + compatibility, + autoUpdate, + updateLabel, + } = this; + return html` +
+
+ ${updateLabel} + ${updateDownloaded ? + html`Restart and install` : + html`Check for updates`} +
+
+ + Automatically download and install updates + +
+ ${this.channelsTemplate()} +
`; + } + + channelsTemplate() { + const { + compatibility, + releaseChannel + } = this; + return html`
+ + + + + +
Stable
+
Default channel. Tested and targeted for production environment.
+
+
+ + +
Beta
+
Next release. Tested but may contain bugs.
+
+
+ + +
Unstable
+
Development version. May not be fully tested and contain bugs!
+
+
+
+
+
`; + } + + errorTemplate() { + if (!this.isError) { + return ''; + } + const { errorMessage, errorCode } = this; + return html` +
+

${errorMessage}

+ ${errorCode ? html`

${errorCode}

` : ''} +
`; + } + + authorTemplate() { + return html` +
+

Coded by Pawel Psztyc.

+
+ With great support of MuleSoft, a Salesforce company. +
+
+ `; + } +} +const page = new AboutDialog(); +page.initialize(); diff --git a/src/app/scripts/AnalyticsConsent.js b/src/app/scripts/AnalyticsConsent.js new file mode 100644 index 00000000..8890fa2f --- /dev/null +++ b/src/app/scripts/AnalyticsConsent.js @@ -0,0 +1,121 @@ +import { ApplicationPage } from '../ApplicationPage.js'; +import { html } from '../../../web_modules/lit-html/lit-html.js'; +import '../../../web_modules/@polymer/font-roboto-local/roboto.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-dropdown-menu/anypoint-dropdown-menu.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-listbox/anypoint-listbox.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-item/anypoint-item.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-item/anypoint-item-body.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-button/anypoint-button.js'; + +/** @typedef {import('lit-html').TemplateResult} TemplateResult */ + +/* global PreferencesProxy, ThemeManager, logger, ipc */ + + +class AnalyticsConsent extends ApplicationPage { + settings = new PreferencesProxy(); + + themeProxy = new ThemeManager(); + + constructor() { + super(); + + this.selected = 0; + } + + async initialize() { + await this.loadTheme(); + this.render(); + } + + /** + * Loads the current theme. + */ + async loadTheme() { + const info = await this.themeProxy.readActiveThemeInfo(); + const theme = info && info.name; + try { + await this.themeProxy.loadTheme(theme); + } catch (e) { + logger.error(e); + } + } + + selectionHandler(e) { + this.selected = e.target.selected; + } + + async saveState() { + const cnf = await this.settings.read(); + cnf.privacy = cnf.privacy || {}; + cnf.privacy.telemetry = false; + if (this.selected === 1) { + cnf.privacy.exceptionsOnly = true; + } else { + cnf.privacy.exceptionsOnly = false; + } + if (this.selected === 0) { + cnf.privacy.telemetry = true; + } + await this.settings.update('privacy.telemetry', cnf.privacy.telemetry); + await this.settings.update('privacy.exceptionsOnly', cnf.privacy.exceptionsOnly); + ipc.send('telemetry-set'); + } + + appTemplate() { + return html` + ${this.headerTemplate()} +
+
+

Welcome to Advanced REST Client!

+

Your privacy is important to us. You can limit or completely disable anonymous usage statistics for the application.

+

The analytics data are processed for usage analysis which helps us make design and development decisions. We do not share this data with anyone.

+

You can read our privacy statement in the Privacy policy document.

+ +
+ + + + + +
Limited usage statistics
+
Opened screen names, few actions triggered, exceptions.
+
+
+ + +
Exceptions only
+
Only collected when an exception occurs. No user data is included.
+
+
+ + +
No consent
+
It makes us sad but we respect your decision.
+
+
+
+
+

You can always change it later in the application settings.

+
+ +
+ Save and open the application +
+
+
+ `; + } + + /** + * @returns {TemplateResult|string} The template for the header + */ + headerTemplate() { + return html` +
+ API Client by MuleSoft. +
`; + } +} +const page = new AnalyticsConsent(); +page.initialize(); diff --git a/src/app/scripts/GoogleDrivePicker.js b/src/app/scripts/GoogleDrivePicker.js new file mode 100644 index 00000000..d776a90f --- /dev/null +++ b/src/app/scripts/GoogleDrivePicker.js @@ -0,0 +1,144 @@ +import { ApplicationPage } from '../ApplicationPage.js'; +import { html } from '../../../web_modules/lit-html/lit-html.js'; +import '../../../web_modules/@advanced-rest-client/google-drive-browser/google-drive-browser.js'; + +/** @typedef {import('lit-html').TemplateResult} TemplateResult */ +/** @typedef {import('@advanced-rest-client/electron-oauth2/renderer/OAuth2Handler').OAuth2Handler} OAuth2Handler */ +/** @typedef {import('@advanced-rest-client/arc-types').Authorization.OAuth2Authorization} OAuth2Authorization */ + +/* global ThemeManager, logger, OAuth2Handler, GoogleDriveProxy */ + +export class GoogleDrivePickerScreen extends ApplicationPage { + /** + * @returns {OAuth2Authorization} + */ + get oauthConfig() { + return { + clientId: '1076318174169-u4a5d3j2v0tbie1jnjgsluqk1ti7ged3.apps.googleusercontent.com', + authorizationUri: 'https://accounts.google.com/o/oauth2/v2/auth', + redirectUri: 'https://auth.advancedrestclient.com/oauth2', + scopes: [ + 'https://www.googleapis.com/auth/drive.file', + 'https://www.googleapis.com/auth/drive.install', + ], + } + } + + themeProxy = new ThemeManager(); + + oauth2Proxy = new OAuth2Handler(); + + gDrive = new GoogleDriveProxy(); + + constructor() { + super(); + + this.initObservableProperties( + 'compatibility', 'initializing', 'loadingStatus', 'driveToken', + ); + this.compatibility = false; + /** + * @type {boolean} Whether the project is being restored from the metadata store. + */ + this.initializing = true; + /** + * @type {string} A loading state information. + */ + this.loadingStatus = 'Initializing application...'; + + this.logger = logger; + /** + * @type {string} + */ + this.driveToken = undefined; + } + + async initialize() { + this.listen(); + await this.loadTheme(); + this.requestGoogleDriveToken(); + this.initializing = false; + } + + listen() { + this.themeProxy.listen(); + this.oauth2Proxy.listen(); + window.addEventListener('themeactivated', (e) => { + // @ts-ignore + this.compatibility = e.detail === ThemeManager.anypointTheme; + }); + } + + /** + * Loads the current theme. + */ + async loadTheme() { + const info = await this.themeProxy.readActiveThemeInfo(); + const theme = info && info.name; + try { + await this.themeProxy.loadTheme(theme); + } catch (e) { + this.logger.error(e); + } + } + + async requestGoogleDriveToken() { + const cnf = this.oauthConfig; + cnf.interactive = true; + const auth = await this.oauth2Proxy.requestToken(cnf); + if (!auth) { + return; + } + this.driveToken = auth.accessToken; + } + + /** + * @param {CustomEvent} e + */ + drivePickHandler(e) { + const id = e.detail; + this.gDrive.notifyParentFilePicked(id); + } + + appTemplate() { + const { initializing } = this; + if (initializing) { + return this.loaderTemplate(); + } + return html` +
+ ${this.googleDriveTemplate()} +
+ `; + } + + /** + * @returns {TemplateResult} A template for the loader + */ + loaderTemplate() { + return html` +
+

Preparing Google Drive Picker

+

${this.loadingStatus}

+
+ `; + } + + /** + * @returns {TemplateResult|string} The template for the host rules mapping element + */ + googleDriveTemplate() { + const { compatibility } = this; + // mimeType="application/restclient+data" + return html` + + `; + } +} + +const page = new GoogleDrivePickerScreen(); +page.initialize(); diff --git a/src/app/scripts/apic/ApiConsole.js b/src/app/scripts/apic/ApiConsole.js new file mode 100644 index 00000000..67d711ee --- /dev/null +++ b/src/app/scripts/apic/ApiConsole.js @@ -0,0 +1,701 @@ +import '../pouchdb.js'; +import marked from '../../../../web_modules/marked/lib/marked.js'; +import { ApplicationPage } from '../../ApplicationPage.js'; +import { findRoute, navigate, navigatePage } from '../lib/route.js'; +import { classMap } from '../../../../web_modules/lit-html/directives/class-map.js'; +import { styleMap } from '../../../../web_modules/lit-html/directives/style-map.js'; +import { html } from '../../../../web_modules/lit-html/lit-html.js'; +import { AmfHelperMixin } from '../../../../web_modules/@api-components/amf-helper-mixin/index.js'; +import { ArcModelEvents } from '../../../../web_modules/@advanced-rest-client/arc-models/index.js'; +import { ConfigEventTypes } from '../../../../web_modules/@advanced-rest-client/arc-events/index.js'; +import '../../../../web_modules/@polymer/font-roboto-local/roboto.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/history-data-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/auth-data-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/host-rules-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/rest-api-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/url-indexer.js'; +import '../../../../web_modules/@api-components/api-navigation/api-navigation.js'; +import '../../../../web_modules/@api-components/api-documentation/api-documentation.js'; +import { ConsoleRequest } from './ConsoleRequest.js'; + +// @ts-ignore +window.marked = marked; + +/** @typedef {import('lit-html').TemplateResult} TemplateResult */ +/** @typedef {import('@advanced-rest-client/arc-types').RestApi.ARCRestApiIndex} ARCRestApiIndex */ +/** @typedef {import('@advanced-rest-client/arc-types').Config.ARCConfig} ARCConfig */ +/** @typedef {import('@advanced-rest-client/arc-events').ConfigStateUpdateEvent} ConfigStateUpdateEvent */ +/** @typedef {import('../../../preload/PreferencesProxy').PreferencesProxy} PreferencesProxy */ +/** @typedef {import('../../../preload/ThemeManager').ThemeManager} ThemeManager */ +/** @typedef {import('../../../preload/FilesystemProxy').FilesystemProxy} FilesystemProxy */ +/** @typedef {import('../../../preload/ApplicationSearchProxy').ApplicationSearchProxy} ApplicationSearchProxy */ +/** @typedef {import('../../../types').ArcAppInitOptions} ArcAppInitOptions */ +/** @typedef {import('../../../../web_modules/@anypoint-web-components/anypoint-listbox').AnypointListbox} AnypointListbox */ + +/* global PreferencesProxy, ThemeManager, logger, FilesystemProxy, ApplicationSearchProxy, ElectronAmfService */ + +const unhandledRejectionHandler = Symbol('unhandledRejectionHandler'); +const navigationTemplate = Symbol('navigationTemplate'); +const navResizeMousedown = Symbol('navResizeMousedown'); +const resizeMouseUp = Symbol('resizeMouseUp'); +const resizeMouseMove = Symbol('resizeMouseMove'); +const isResizing = Symbol('isResizing'); +const pageTemplate = Symbol('isResizing'); +const mainBackHandler = Symbol('mainBackHandler'); +const apiVersionMenuHandler = Symbol('apiVersionMenuHandler'); +const configStateChangeHandler = Symbol('configStateChangeHandler'); + +export class ApiConsoleApplication extends AmfHelperMixin(ApplicationPage) { + static get routes() { + return [ + { + name: 'open', + pattern: 'open/(?[^/]*)/(?[^/]*)' + }, + { + name: 'open', + pattern: 'open/(?[^/]*)/(?[^/]*)/(?[^/]*)' + }, + { + name: 'api-console', + pattern: 'docs/?' + }, + ]; + } + + settings = new PreferencesProxy(); + + themeProxy = new ThemeManager(); + + fs = new FilesystemProxy(); + + search = new ApplicationSearchProxy(); + + /** + * Responsible for processing API data and producing AMF model consumed by the API Console. + */ + apiParser = new ElectronAmfService(); + + requestFactory = new ConsoleRequest(); + + constructor() { + super(); + + this.initObservableProperties( + 'route', 'initializing', 'loadingStatus', 'compatibility', + 'amfType', 'selectedShape', 'selectedShapeType', + 'navigationWidth', 'isStored', + 'indexItem', 'apiVersion', + ); + + /** + * @type {boolean} Whether the project is being restored from the metadata store. + */ + this.initializing = true; + /** + * @type {string} A loading state information. + */ + this.loadingStatus = 'Initializing application...'; + this.logger = logger; + + /** + * A flag to determine whether the current API is stored in the application data store. + * When set to true it renders controls to store the API data. + */ + this.isStored = false; + + /** + * @type {ARCRestApiIndex} + */ + this.indexItem = undefined; + + window.onunhandledrejection = this[unhandledRejectionHandler].bind(this); + this.oauth2RedirectUri = 'http://auth.advancedrestclient.com/arc.html'; + this.compatibility = false; + } + + async initialize() { + this.listen(); + let cnf = {}; + try { + cnf = await this.settings.read(); + } catch (e) { + this.reportCriticalError(e); + throw e; + } + this.config = cnf; + this.setConfigVariables(cnf); + await this.loadTheme(); + await this.afterInitialization(); + this.initializing = false; + } + + /** + * Sets local variables from the config object + * @param {ARCConfig} cnf + */ + setConfigVariables(cnf) { + if (cnf.request) { + if (typeof cnf.request.timeout === 'number') { + this.requestFactory.requestTimeout = cnf.request.timeout; + } + if (typeof cnf.request.validateCertificates === 'boolean') { + this.requestFactory.validateCertificates = cnf.request.validateCertificates; + } + if (typeof cnf.request.nativeTransport === 'boolean') { + this.requestFactory.nativeTransport = cnf.request.nativeTransport; + } + } + } + + listen() { + this.settings.observe(); + this.themeProxy.listen(); + this.fs.listen(); + this.search.listen(); + this.requestFactory.listen(); + window.addEventListener(ConfigEventTypes.State.update, this[configStateChangeHandler].bind(this)); + window.addEventListener('mousemove', this[resizeMouseMove].bind(this)); + window.addEventListener('mouseup', this[resizeMouseUp].bind(this)); + window.addEventListener('themeactivated', (e) => { + // @ts-ignore + this.compatibility = e.detail === ThemeManager.anypointTheme; + }); + } + + /** + * Tasks to be performed after the application is initialized. + */ + async afterInitialization() { + window.onpopstate = () => { + this.onRoute(); + } + requestAnimationFrame(() => this.onRoute()); + } + + /** + * Loads the current theme. + */ + async loadTheme() { + const info = await this.themeProxy.readActiveThemeInfo(); + const theme = info && info.name; + try { + await this.themeProxy.loadTheme(theme); + } catch (e) { + this.logger.error(e); + } + } + + /** + * @param {PromiseRejectionEvent} e + */ + [unhandledRejectionHandler](e) { + /* eslint-disable-next-line no-console */ + console.error(e); + this.reportCriticalError(e.reason); + } + + /** + * @param {ConfigStateUpdateEvent} e + */ + [configStateChangeHandler](e) { + const { key, value } = e.detail; + if (key === 'request.timeout') { + this.requestFactory.requestTimeout = value; + } else if (key === 'request.validateCertificates') { + this.requestFactory.validateCertificates = value; + } else if (key === 'request.nativeTransport') { + this.requestFactory.nativeTransport = value; + } + } + + /** + * Called when route change + */ + onRoute() { + const url = new URL(window.location.href); + const path = url.hash.replace('#', ''); + // @ts-ignore + const { routes } = this.constructor; + const result = findRoute(routes, path); + if (!result) { + return; + } + const { name } = result.route; + this.route = name; + if (name === 'open') { + this.openApi(result.params.type, result.params.id, result.params.version); + } + } + + /** + * Opens an API from the given source + * @param {string} source Either `file` or `db` + * @param {string} id The id of the API to open + * @param {string=} version The version of the API to open. + * @returns {Promise} + */ + async openApi(source, id, version) { + if (source === 'file') { + await this.restoreFromTmpFile(id); + } else if (source === 'db') { + await this.restoreFromDataStore(id, version); + } + } + + /** + * Restores an API that has been stored in a temporary file to move the data + * between the main application page and API Console. + * @param {string} id The id of the generated file + */ + async restoreFromTmpFile(id) { + this.initializing = true; + this.loadingStatus = 'Reading API model from a temporary file'; + this.isStored = false; + try { + const result = await this.fs.restoreApicModelTmp(id); + const unresolved = result.model; + this.unresolvedModel = unresolved; + this.amfType = result.type; + this.loadingStatus = 'Resolving API graph model'; + const resolved = await this.apiParser.resolveAPiConsole(unresolved, result.type.type); + this.amf = JSON.parse(resolved); + this.loadingStatus = 'Finishing up'; + this.processUnsavedModel(this.amf); + this.resetSelection(); + } catch (e) { + this.reportCriticalError(e.message); + } + this.initializing = false; + } + + /** + * Computes variables used to determine whether the API can be stored in the data store. + * @param {any} amf The resolved AMF model. + */ + async processUnsavedModel(amf) { + this.baseUri = this._computeBaseUri(amf); + this.apiVersion = this._getApiVersion(amf); + this.canSave = this._computeCanSave(this.baseUri, this.apiVersion); + try { + this.indexItem = await ArcModelEvents.RestApi.read(document.body, this.baseUri); + if (this.indexItem.versions.includes(this.apiVersion)) { + this.isStored = true; + } + } catch (e) { + this.indexItem = undefined; + } + } + + /** + * Computes model's base Uri + * @param {any} model AMF data model + * @returns {string|undefined} + */ + _computeBaseUri(model) { + if (!model) { + return undefined; + } + const server = this._computeServer(model); + const protocols = this._computeProtocols(model); + return this._getAmfBaseUri(server, protocols); + } + + /** + * Computes API's version + * @param {any} amf AMF data model + * @returns {string|undefined} + */ + _getApiVersion(amf) { + let version = this._computeApiVersion(amf); + if (!version) { + version = '1'; + } + return String(version); + } + + /** + * @param {string} baseUri + * @param {string} apiVersion + * @returns {boolean} True when this model can be stored in the data store. + */ + _computeCanSave(baseUri, apiVersion) { + if (!baseUri || !apiVersion) { + return false; + } + return true; + } + + /** + * Restores API Console from the local data store. + * @param {string} id The data store id of the API + * @param {string=} version The version of the API to open. + */ + async restoreFromDataStore(id, version) { + this.isStored = true; + this.canSave = false; + this.initializing = true; + try { + this.loadingStatus = 'Reading data from the data store'; + this.indexItem = await ArcModelEvents.RestApi.read(document.body, id); + const data = await ArcModelEvents.RestApi.dataRead(document.body, `${id}|${version}`); + this.loadingStatus = 'Resolving API graph model'; + const resolved = await this.apiParser.resolveAPiConsole(data.data, this.indexItem.type); + this.loadingStatus = 'Finishing up'; + this.amf = JSON.parse(resolved); + this.apiVersion = version; + this.resetSelection(); + } catch (e) { + this.indexItem = undefined; + this.reportCriticalError('Unable to find the API.'); + } + this.initializing = false; + } + + /** + * @param {MouseEvent} e + */ + [navResizeMousedown](e) { + this[isResizing] = true; + e.preventDefault(); + } + + /** + * @param {MouseEvent} e + */ + [resizeMouseUp](e) { + if (!this[isResizing]) { + return; + } + this[isResizing] = false; + e.preventDefault(); + } + + /** + * @param {MouseEvent} e + */ + [resizeMouseMove](e) { + if (!this[isResizing]) { + return; + } + const { pageX } = e; + if (pageX < 100) { + return; + } + if (pageX > window.innerWidth - 100) { + return; + } + this.navigationWidth = pageX; + } + + [mainBackHandler]() { + navigatePage('app.html'); + } + + /** + * Handler for the navigation event dispatched by the `api-navigation` + * component. + * + * @param {CustomEvent} e + */ + _apiNavigationOcurred(e) { + const { selected, type } = e.detail; + // const isPassive = passive === true; + // if (!isPassive && this.page !== 'docs') { + // this.closeTryIt(); + // } + this.selectedShape = selected; + this.selectedShapeType = type; + } + + /** + * Computes value of `apiTitle` property. + * + * @param {Object} shape Shape of AMF model. + * @return {String|undefined} Description if defined. + */ + _computeApiTitle(shape) { + return /** @type string */ (this._getValue(shape, this.ns.aml.vocabularies.core.name)); + } + + /** + * Resets current selection to "summary" page + */ + resetSelection() { + if (this.route !== 'docs') { + this.route = 'docs'; + } + this.selectedShapeType = 'summary'; + this.selectedShape = 'summary'; + } + + async saveApi() { + const { baseUri, apiVersion, amfType } = this; + let { indexItem } = this; + const webApi = this._computeWebApi(this.amf); + const title = this._computeApiTitle(webApi); + if (!title) { + throw new Error('API title is missing.'); + } + if (indexItem) { + indexItem.versions.push(apiVersion); + indexItem.latest = apiVersion; + } else { + indexItem = { + _id: baseUri, + title, + order: 0, + latest: apiVersion, + versions: [apiVersion], + type: amfType.type, + } + } + const record = await ArcModelEvents.RestApi.update(document.body, indexItem); + this.indexItem = record.item; + this.isStored = true; + await ArcModelEvents.RestApi.dataUpdate(document.body, { + data: this.unresolvedModel, + indexId: baseUri, + version: apiVersion, + amfVersion: '4.5.1', + }); + } + + /** + * @param {Event} e + */ + async _apiActionMenuChanged(e) { + const list = /** @type AnypointListbox */ (e.target); + const { selected, selectedItem } = list; + if (selected === undefined || selected === -1) { + return; + } + const { action } = selectedItem.dataset; + switch (action) { + case 'delete': this.delete(); break; + case 'delete-version': this.deleteVersion(); break; + default: + } + } + + async delete() { + const { indexItem } = this; + await ArcModelEvents.RestApi.delete(document.body, indexItem._id); + navigatePage('app.html'); + } + + async deleteVersion() { + const { indexItem, apiVersion } = this; + await ArcModelEvents.RestApi.versionDelete(document.body, indexItem._id, apiVersion); + navigatePage('app.html'); + } + + /** + * Changes the API version after selecting a different version of the same API. + * @param {Event} e + */ + async [apiVersionMenuHandler](e) { + const list = /** @type AnypointListbox */ (e.target); + const { selected } = list; + navigate('open', 'db', this.indexItem._id, String(selected)); + } + + appTemplate() { + const { initializing } = this; + if (initializing) { + return this.loaderTemplate(); + } + return html` +
+ ${this[navigationTemplate]()} + ${this[pageTemplate]()} +
+ `; + } + + /** + * @returns {TemplateResult} A template for the loader + */ + loaderTemplate() { + return html` +
+

Preparing API data

+

${this.loadingStatus}

+
+ `; + } + + apiNavigationTemplate() { + return html` + + `; + } + + /** + * @returns {TemplateResult} The template for the application main navigation + */ + [navigationTemplate]() { + const { navigationWidth } = this; + const hasWidth = typeof navigationWidth === 'number'; + const classes = { + 'auto-width': hasWidth, + }; + const styles = { + width: '', + }; + if (hasWidth) { + styles.width = `${navigationWidth}px`; + } + return html` + + `; + } + + /** + * @returns {TemplateResult} The template for the page content + */ + [pageTemplate]() { + return html` +
+ ${this.headerTemplate()} + ${this.docsTemplate()} +
+ `; + } + + /** + * @returns {TemplateResult|string} The template for the header + */ + headerTemplate() { + return html` +
+ + + + API Console by MuleSoft. + + ${this.saveButtonTemplate()} + ${this.apiVersionsTemplate()} + ${this.apiMenuTemplate()} +
`; + } + + /** + * @returns {TemplateResult} The template for the main documentation section + */ + docsTemplate() { + const { + compatibility, + selectedShape, + selectedShapeType, + oauth2RedirectUri, + } = this; + return html` + + `; + } + + saveButtonTemplate() { + const { canSave, isStored } = this; + if (!canSave || isStored) { + return ''; + } + const label = this.indexItem ? 'Save version' : 'Save API'; + return html` + ${label} + `; + } + + apiMenuTemplate() { + const { isStored, indexItem } = this; + if (!isStored) { + return ''; + } + const hasMultiVersion = !!indexItem && Array.isArray(indexItem.versions) && !!indexItem.versions.length; + return html` + + + + + + Delete API + ${hasMultiVersion ? html`Delete version` : ''} + + + + + `; + } + + apiVersionsTemplate() { + const { isStored, indexItem } = this; + if (!isStored) { + return ''; + } + const hasMultiVersion = !!indexItem && Array.isArray(indexItem.versions) && !!indexItem.versions.length; + if (!hasMultiVersion) { + return ''; + } + return html` + + + + ${indexItem.versions.map((item) => html` + ${item} + `)} + + + `; + } +} + +const page = new ApiConsoleApplication(); +page.initialize(); diff --git a/src/app/scripts/apic/ConsoleRequest.js b/src/app/scripts/apic/ConsoleRequest.js new file mode 100644 index 00000000..beb155d8 --- /dev/null +++ b/src/app/scripts/apic/ConsoleRequest.js @@ -0,0 +1,293 @@ +/* eslint-disable no-param-reassign */ +/* eslint-disable no-console */ +import { RequestFactory } from '../../../../web_modules/@advanced-rest-client/request-engine/index.js'; +import { TransportEventTypes, TransportEvents } from '../../../../web_modules/@advanced-rest-client/arc-events/index.js'; +import { ArcModelEvents } from '../../../../web_modules/@advanced-rest-client/arc-models/index.js'; +import jexl from '../../../../web_modules/jexl/dist/Jexl.js'; + +/** @typedef {import('@advanced-rest-client/arc-events').ApiTransportEvent} ApiTransportEvent */ +/** @typedef {import('@advanced-rest-client/arc-types').ArcRequest.ArcBaseRequest} ArcBaseRequest */ +/** @typedef {import('@advanced-rest-client/arc-types').ArcRequest.TransportRequest} TransportRequest */ +/** @typedef {import('@advanced-rest-client/arc-types').ArcRequest.RequestConfig} RequestConfig */ +/** @typedef {import('@advanced-rest-client/arc-types').ArcResponse.Response} Response */ +/** @typedef {import('@advanced-rest-client/arc-types').ArcResponse.ErrorResponse} ErrorResponse */ +/** @typedef {import('@advanced-rest-client/electron-request').RequestOptions} RequestOptions */ +/** @typedef {import('@api-components/api-request/src/types').ApiConsoleRequest} ApiConsoleRequest */ +/** @typedef {import('@api-components/api-request/src/types').ApiConsoleResponse} ApiConsoleResponse */ + +/* global ElectronRequest, SocketRequest, logger */ + +const loadHandler = Symbol('loadHandler'); +const errorHandler = Symbol('errorHandler'); +const prepareRequest = Symbol('prepareRequest'); +const prepareNativeRequest = Symbol('prepareNativeRequest'); +const prepareArcRequest = Symbol('prepareArcRequest'); +const makeConnection = Symbol('makeConnection'); +const transportRequestHandler = Symbol('transportRequestHandler'); +const makeRequestHandler = Symbol('makeRequestHandler'); +const abortRequestHandler = Symbol('abortRequestHandler'); +const removeConnectionHandlers = Symbol('removeConnectionHandlers'); + +export class ConsoleRequest { + constructor() { + this.factory = new RequestFactory(window, jexl); + /** + * @type {number} + */ + this.requestTimeout = undefined; + /** + * @type {boolean} + */ + this.nativeTransport = undefined; + /** + * @type {boolean} + */ + this.validateCertificates = undefined; + /** + * @type {Map} + */ + this.connections = new Map(); + + this[loadHandler] = this[loadHandler].bind(this); + this[errorHandler] = this[errorHandler].bind(this); + } + + listen() { + window.addEventListener('api-request', this[makeRequestHandler].bind(this)); + window.addEventListener('abort-api-request', this[abortRequestHandler].bind(this)); + window.addEventListener(TransportEventTypes.transport, this[transportRequestHandler].bind(this)); + } + + /** + * @param {CustomEvent} e + */ + async [makeRequestHandler](e) { + const consoleRequest = /** @type any */ (e.detail); + // this event is significant, even though it is handled by the same class. + TransportEvents.transport(document.body, consoleRequest.id, consoleRequest); + } + + /** + * @param {ApiTransportEvent} e + */ + async [transportRequestHandler](e) { + const transportRequest = /** @type any */ (e.detail); + const { id, request } = transportRequest; + await this.run(id, request); + } + + /** + * @param {string} id + * @param {ApiConsoleRequest} request + */ + async run(id, request) { + const config = this.prepareRequestOptions(); + const baseRequest = this.translateRequest(request); + // the request can proceed without hosts + try { + const hosts = await ArcModelEvents.HostRules.list(document.body); + if (hosts && hosts.items) { + config.hosts = hosts.items; + } + } catch (e) { + logger.error(e); + } + logger.info(`The config passed to the request factory:`, config); + try { + const connection = await this[prepareRequest](id, baseRequest, config); + await this[makeConnection](connection); + } catch (e) { + logger.error(e); + this[errorHandler](e, id); + } + } + + [abortRequestHandler](e) { + const { id } = e.detail; + this.factory.abort(id); + const info = this.connections.get(id); + info.connection.abort(); + } + + /** + * @returns {RequestOptions} + */ + prepareRequestOptions() { + const result = /** @type RequestOptions */ ({}); + result.logger = logger; + if (typeof this.requestTimeout === 'number') { + result.timeout = this.requestTimeout; + } + if (result.timeout) { + result.timeout *= 1000; + } else { + result.timeout = 0; + } + + if (typeof result.validateCertificates === 'undefined' && typeof this.validateCertificates === 'boolean') { + result.validateCertificates = this.validateCertificates; + } + return result; + } + + /** + * @param {ApiConsoleRequest} init + * @returns {ArcBaseRequest} + */ + translateRequest(init) { + const result = /** @type ArcBaseRequest */ ({ + url: init.url, + method: init.method, + headers: init.headers, + payload: init.payload, + auth: init.auth, + }); + return result; + } + + /** + * @param {string} id + * @param {ArcBaseRequest} request + * @param {RequestOptions} opts + * @returns {SocketRequest|ElectronRequest} + */ + [prepareRequest](id, request, opts) { + return this.nativeTransport ? this[prepareNativeRequest](id, request, opts) : this[prepareArcRequest](id, request, opts); + } + + /** + * @param {string} id + * @param {ArcBaseRequest} request + * @param {RequestOptions} opts + * @returns {ElectronRequest} + */ + [prepareNativeRequest](id, request, opts) { + const conn = new ElectronRequest(request, id, opts); + this.connections.set(id, { + connection: conn, + aborted: false, + request, + }); + conn.on('load', this[loadHandler]); + conn.on('error', this[errorHandler]); + return conn; + } + + /** + * @param {string} id + * @param {ArcBaseRequest} request + * @param {RequestOptions} opts + * @returns {SocketRequest} + */ + [prepareArcRequest](id, request, opts) { + const conn = new SocketRequest(request, id, opts); + this.connections.set(id, { + connection: conn, + aborted: false, + request, + }); + conn.on('load', this[loadHandler]); + conn.on('error', this[errorHandler]); + return conn; + } + + /** + * @param {SocketRequest|ElectronRequest} connection + */ + async [makeConnection](connection) { + try { + await connection.send(); + } catch (cause) { + this[errorHandler](cause, connection.id); + } + } + + /** + * @param {string} id + * @param {Response} response + * @param {TransportRequest} transport + */ + async [loadHandler](id, response, transport) { + const info = this.connections.get(id); + this.connections.delete(id); + if (!info || info.aborted) { + return; + } + this[removeConnectionHandlers](info.connection); + const fr = { + id, + request: info.request, + } + try { + // @ts-ignore + await this.factory.processResponse(fr, transport, response, { + evaluateVariables: false, + evaluateSystemVariables: false, + }); + } catch (e) { + // ... + } + const resp = /** @type ApiConsoleResponse */ ({ + id, + isError: false, + loadingTime: response.loadingTime, + request: transport, + response: { + status: response.status, + statusText: response.statusText, + headers: response.headers, + payload: response.payload, + } + }); + this._notifyResponse(resp); + } + + /** + * @param {Error} error + * @param {string} id + * @param {TransportRequest=} transport + * @param {ErrorResponse=} response + */ + [errorHandler](error, id, transport, response) { + const info = this.connections.get(id); + this.connections.delete(id); + if (!info || info.aborted) { + return; + } + this[removeConnectionHandlers](info.connection); + const result = { + id, + request: info.request, + isError: true, + error, + loadingTime: 0, + response: response || { + status: 0, + }, + }; + // @ts-ignore + this._notifyResponse(result); + } + + /** + * @param {SocketRequest|ElectronRequest} connection + */ + [removeConnectionHandlers](connection) { + connection.removeAllListeners('load'); + connection.removeAllListeners('error'); + } + + /** + * Dispatches `api-response` custom event. + * + * @param {ApiConsoleResponse} detail Request and response data. + */ + _notifyResponse(detail) { + const e = new CustomEvent('api-response', { + bubbles: true, + composed: true, + detail + }); + document.body.dispatchEvent(e); + } +} diff --git a/src/app/scripts/app.js b/src/app/scripts/app.js new file mode 100644 index 00000000..443442f4 --- /dev/null +++ b/src/app/scripts/app.js @@ -0,0 +1,9 @@ +import './pouchdb.js'; +import { AdvancedRestClientApplication } from './arc/AdvancedRestClientApplication.js'; +import marked from '../../../web_modules/marked/lib/marked.js'; + +// @ts-ignore +window.marked = marked; + +const page = new AdvancedRestClientApplication(); +page.initialize(); diff --git a/src/app/scripts/arc/AdvancedRestClientApplication.js b/src/app/scripts/arc/AdvancedRestClientApplication.js new file mode 100644 index 00000000..5632f116 --- /dev/null +++ b/src/app/scripts/arc/AdvancedRestClientApplication.js @@ -0,0 +1,1759 @@ +/* eslint-disable no-unused-vars */ +import { ApplicationPage } from '../../ApplicationPage.js'; +import { findRoute, navigate, navigatePage } from '../lib/route.js'; +import { html } from '../../../../web_modules/lit-html/lit-html.js'; +import { MonacoLoader } from '../../../../web_modules/@advanced-rest-client/monaco-support/index.js'; +import { ArcNavigationEventTypes, ProjectActions, ConfigEventTypes, DataImportEventTypes, WorkspaceEvents, ImportEvents, WorkspaceEventTypes, ArcNavigationEvents, RestApiEventTypes } from '../../../../web_modules/@advanced-rest-client/arc-events/index.js'; +import { ArcModelEvents, ArcModelEventTypes, ImportFactory, ImportNormalize, isSingleRequest } from '../../../../web_modules/@advanced-rest-client/arc-models/index.js'; +import { ModulesRegistry, RequestCookies } from '../../../../web_modules/@advanced-rest-client/request-engine/index.js'; +import { classMap } from '../../../../web_modules/lit-html/directives/class-map.js'; +import { styleMap } from '../../../../web_modules/lit-html/directives/style-map.js'; +import '../../arc-alert-dialog.js'; +import '../../../../web_modules/@polymer/font-roboto-local/roboto.js'; +import '../../../../web_modules/@advanced-rest-client/arc-request-ui/arc-request-workspace.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/project-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/url-history-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/websocket-url-history-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/history-data-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/client-certificate-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/variables-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/auth-data-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/request-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/host-rules-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/rest-api-model.js'; +import '../../../../web_modules/@advanced-rest-client/arc-models/url-indexer.js'; +import '../../../../web_modules/@advanced-rest-client/arc-menu/arc-menu.js'; +import '../../../../web_modules/@advanced-rest-client/requests-list/history-panel.js'; +import '../../../../web_modules/@advanced-rest-client/requests-list/saved-panel.js'; +import '../../../../web_modules/@advanced-rest-client/client-certificates/client-certificates-panel.js'; +import '../../../../web_modules/@advanced-rest-client/arc-ie/arc-data-export.js'; +import '../../../../web_modules/@advanced-rest-client/arc-ie/arc-export-form.js'; +import '../../../../web_modules/@advanced-rest-client/arc-ie/arc-data-import.js'; +import '../../../../web_modules/@advanced-rest-client/arc-ie/import-data-inspector.js'; +import '../../../../web_modules/@advanced-rest-client/arc-environment/variables-overlay.js'; +import '../../../../web_modules/@advanced-rest-client/arc-cookies/cookie-manager.js'; +import '../../../../web_modules/@advanced-rest-client/arc-settings/arc-settings.js'; +import '../../../../web_modules/@advanced-rest-client/arc-request-ui/request-meta-details.js'; +import '../../../../web_modules/@advanced-rest-client/arc-request-ui/request-meta-editor.js'; +import '../../../../web_modules/@advanced-rest-client/bottom-sheet/bottom-sheet.js'; +import '../../../../web_modules/@advanced-rest-client/arc-icons/arc-icon.js'; +import '../../../../web_modules/@anypoint-web-components/anypoint-input/anypoint-masked-input.js'; +import '../../../../web_modules/@advanced-rest-client/host-rules-editor/host-rules-editor.js'; +import '../../../../web_modules/@api-components/api-navigation/api-navigation.js'; +import '../../../../web_modules/@advanced-rest-client/exchange-search-panel/exchange-search-panel.js'; +// import '../../../../web_modules/@api-components/api-request-panel/api-request-panel.js'; +// import '../../../../web_modules/@api-components/api-documentation/api-documentation.js'; +import { Request } from './Request.js'; +import { ContextMenu } from '../context-menu/ContextMenu.js'; +import { ContextMenuStyles } from '../context-menu/ContextMenu.styles.js'; +import ContextMenuCommands from './ArcContextMenuCommands.js'; +import { getTabClickIndex } from './Utils.js'; + +// @ts-ignore +document.adoptedStyleSheets = document.adoptedStyleSheets.concat(ContextMenuStyles.styleSheet); + +/* global PreferencesProxy, OAuth2Handler, WindowManagerProxy, ThemeManager, logger, EncryptionService, WorkspaceManager, ipc, CookieBridge, ImportFilePreProcessor, FilesystemProxy, ApplicationSearchProxy, AppStateProxy, GoogleDriveProxy, ElectronAmfService, GoogleAnalytics */ + +/** @typedef {import('../../../preload/PreferencesProxy').PreferencesProxy} PreferencesProxy */ +/** @typedef {import('../../../preload/WindowProxy').WindowProxy} WindowManagerProxy */ +/** @typedef {import('../../../preload/ThemeManager').ThemeManager} ThemeManager */ +/** @typedef {import('../../../preload/EncryptionService').EncryptionService} EncryptionService */ +/** @typedef {import('../../../preload/WorkspaceManager').WorkspaceManager} WorkspaceManager */ +/** @typedef {import('../../../preload/ImportFilePreProcessor').ImportFilePreProcessor} ImportFilePreProcessor */ +/** @typedef {import('../../../preload/FilesystemProxy').FilesystemProxy} FilesystemProxy */ +/** @typedef {import('../../../preload/ApplicationSearchProxy').ApplicationSearchProxy} ApplicationSearchProxy */ +/** @typedef {import('../../../types').ArcAppInitOptions} ArcAppInitOptions */ +/** @typedef {import('lit-html').TemplateResult} TemplateResult */ +/** @typedef {import('@advanced-rest-client/electron-oauth2/renderer/OAuth2Handler').OAuth2Handler} OAuth2Handler */ +/** @typedef {import('@advanced-rest-client/arc-types').Config.ARCConfig} ARCConfig */ +/** @typedef {import('@advanced-rest-client/arc-types').ArcState.ARCState} ARCState */ +/** @typedef {import('@advanced-rest-client/arc-events').ARCRequestNavigationEvent} ARCRequestNavigationEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').ARCProjectNavigationEvent} ARCProjectNavigationEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').ARCRestApiNavigationEvent} ARCRestApiNavigationEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').ARCMenuPopupEvent} ARCMenuPopupEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').ARCNavigationEvent} ARCNavigationEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').ARCExternalNavigationEvent} ARCExternalNavigationEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').ConfigStateUpdateEvent} ConfigStateUpdateEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').ArcImportInspectEvent} ArcImportInspectEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').WorkspaceAppendRequestEvent} WorkspaceAppendRequestEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').WorkspaceAppendExportEvent} WorkspaceAppendExportEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').RestApiProcessFileEvent} RestApiProcessFileEvent */ +/** @typedef {import('@advanced-rest-client/arc-models').IndexableRequest} IndexableRequest */ +/** @typedef {import('@advanced-rest-client/arc-models').ARCEnvironmentStateSelectEvent} ARCEnvironmentStateSelectEvent */ +/** @typedef {import('../../../../web_modules/@advanced-rest-client/arc-request-ui').ArcRequestWorkspaceElement} ArcRequestWorkspaceElement */ +/** @typedef {import('../../../../web_modules/@advanced-rest-client/arc-menu').ArcMenuElement} ArcMenuElement */ +/** @typedef {import('../context-menu/interfaces').ExecuteOptions} ExecuteOptions */ +/** @typedef {import('@advanced-rest-client/arc-types').Authorization.OAuth2Authorization} OAuth2Authorization */ +/** @typedef {import('@advanced-rest-client/electron-amf-service/types').ApiParseResult} ApiParseResult */ +/** @typedef {import('@advanced-rest-client/exchange-search-panel/src/types').ExchangeAsset} ExchangeAsset */ + +const unhandledRejectionHandler = Symbol('unhandledRejectionHandler'); +const headerTemplate = Symbol('headerTemplate'); +const pageTemplate = Symbol('pageTemplate'); +const workspaceTemplate = Symbol('workspaceTemplate'); +const navigationTemplate = Symbol('navigationTemplate'); +const navigateRequestHandler = Symbol('navigateRequestHandler'); +const navigateHandler = Symbol('navigateHandler'); +const navigateProjectHandler = Symbol('navigateProjectHandler'); +const navigateRestApiHandler = Symbol('navigateRestApiHandler'); +const popupMenuHandler = Symbol('popupMenuHandler'); +const mainBackHandler = Symbol('mainBackHandler'); +const historyPanelTemplate = Symbol('historyPanelTemplate'); +const savedPanelTemplate = Symbol('savedPanelTemplate'); +const clientCertScreenTemplate = Symbol('clientCertScreenTemplate'); +const commandHandler = Symbol('commandHandler'); +const requestActionHandler = Symbol('requestActionHandler'); +const configStateChangeHandler = Symbol('configStateChangeHandler'); +const systemThemeChangeHandler = Symbol('systemThemeChangeHandler'); +const popupMenuOpenedHandler = Symbol('popupMenuOpenedHandler'); +const popupMenuClosedHandler = Symbol('popupMenuClosedHandler'); +const environmentTemplate = Symbol('environmentTemplate'); +const environmentSelectorHandler = Symbol('environmentSelectorHandler'); +const environmentSelectorKeyHandler = Symbol('environmentSelectorKeyHandler'); +const dataImportScreenTemplate = Symbol('dataImportScreenTemplate'); +const dataExportScreenTemplate = Symbol('dataExportScreenTemplate'); +const cookieManagerScreenTemplate = Symbol('cookieManagerScreenTemplate'); +const settingsScreenTemplate = Symbol('settingsScreenTemplate'); +const fileImportHandler = Symbol('fileImportHandler'); +const importInspectorTemplate = Symbol('importInspectorTemplate'); +const dataInspectHandler = Symbol('dataInspectHandler'); +const inspectDataValue = Symbol('inspectDataValue'); +const importDataHandler = Symbol('importDataHandler'); +const notifyIndexer = Symbol('notifyIndexer'); +const workspaceAppendRequestHandler = Symbol('workspaceAppendRequestHandler'); +const workspaceAppendExportHandler = Symbol('workspaceAppendExportHandler'); +const environmentSelectedHandler = Symbol('environmentSelectedHandler'); +const navMinimizedHandler = Symbol('navMinimizedHandler'); +const navResizeMousedown = Symbol('navResizeMousedown'); +const resizeMouseUp = Symbol('resizeMouseUp'); +const resizeMouseMove = Symbol('resizeMouseMove'); +const isResizing = Symbol('isResizing'); +const mainNavigateHandler = Symbol('mainNavigateHandler'); +const variablesEnabledValue = Symbol('variablesEnabledValue'); +const systemVariablesEnabledValue = Symbol('systemVariablesEnabledValue'); +const requestDetailTemplate = Symbol('requestDetailTemplate'); +const requestMetaTemplate = Symbol('requestMetaTemplate'); +const sheetClosedHandler = Symbol('sheetClosedHandler'); +const metaRequestHandler = Symbol('metaRequestHandler'); +const requestMetaCloseHandler = Symbol('requestMetaCloseHandler'); +const externalNavigationHandler = Symbol('externalNavigationHandler'); +const contextCommandHandler = Symbol('contextCommandHandler'); +const hostRulesTemplate = Symbol('hostRulesTemplate'); +const processApplicationState = Symbol('processApplicationState'); +const drivePickHandler = Symbol('drivePickHandler'); +const processApiFileHandler = Symbol('processApiFileHandler'); +const arcNavigationTemplate = Symbol('arcNavigationTemplate'); +const exchangeSearchTemplate = Symbol('exchangeSearchTemplate'); +const exchangeSelectionHandler = Symbol('exchangeSelectionHandler'); + +/** + * A routes that does not go through the router and should not be remembered in the history. + */ +const HiddenRoutes = ['data-inspect']; + +export class AdvancedRestClientApplication extends ApplicationPage { + /** + * @returns {OAuth2Authorization} + */ + get oauthConfig() { + return { + clientId: '1076318174169-u4a5d3j2v0tbie1jnjgsluqk1ti7ged3.apps.googleusercontent.com', + authorizationUri: 'https://accounts.google.com/o/oauth2/v2/auth', + redirectUri: 'https://auth.advancedrestclient.com/oauth2', + scopes: [ + 'https://www.googleapis.com/auth/drive.file', + 'https://www.googleapis.com/auth/drive.install', + ], + } + } + + static get routes() { + return [ + { + name: 'workspace', + pattern: 'workspace/' + }, + { + name: 'rest-projects', + pattern: 'rest-projects' + }, + { + name: 'exchange-search', + pattern: 'exchange-search' + }, + { + name: 'history', + pattern: 'history' + }, + { + name: 'saved', + pattern: 'saved' + }, + { + name: 'client-certificates', + pattern: 'client-certificates' + }, + { + name: 'data-import', + pattern: 'data-import' + }, + { + name: 'data-export', + pattern: 'data-export' + }, + { + name: 'cookie-manager', + pattern: 'cookie-manager' + }, + { + name: 'settings', + pattern: 'settings' + }, + { + name: 'hosts', + pattern: 'hosts' + }, + { + name: 'project', + pattern: 'project/(?[^/]*)/(?.*)' + }, + // { + // name: 'model', + // pattern: 'project/(?[^/]*)/module(?/.*)/model/(?.*)' + // }, { + // name: 'module', + // pattern: 'project/(?[^/]*)/module(?/.*)' + // }, + { + name: 'workspace', + pattern: '*' + }]; + } + + /** + * @type {ArcRequestWorkspaceElement} + */ + #workspace = undefined; + + #contextMenu = new ContextMenu(document.body); + + stateProxy = new AppStateProxy(); + + settings = new PreferencesProxy(); + + oauth2Proxy = new OAuth2Handler(); + + windowProxy = new WindowManagerProxy(); + + themeProxy = new ThemeManager(); + + encryption = new EncryptionService(); + + workspace = new WorkspaceManager(); + + cookieBridge = new CookieBridge(); + + fs = new FilesystemProxy(); + + search = new ApplicationSearchProxy(); + + requestFactory = new Request(); + + gDrive = new GoogleDriveProxy(); + + /** + * Responsible for processing API data and producing AMF model consumed by the API Console. + */ + apiParser = new ElectronAmfService(); + + ga = new GoogleAnalytics(); + + /** + * @returns {ArcRequestWorkspaceElement} + */ + get workspaceElement() { + if (!this.#workspace) { + this.#workspace = document.querySelector('arc-request-workspace'); + } + return this.#workspace; + } + + get variablesEnabled() { + return this[variablesEnabledValue]; + } + + set variablesEnabled(value) { + const old = this[variablesEnabledValue]; + if (old === value) { + return; + } + this[variablesEnabledValue] = value; + this.requestFactory.evaluateVariables = value; + this.render(); + } + + get systemVariablesEnabled() { + return this[systemVariablesEnabledValue]; + } + + set systemVariablesEnabled(value) { + const old = this[systemVariablesEnabledValue]; + if (old === value) { + return; + } + this[systemVariablesEnabledValue] = value; + const model = document.body.querySelector('variables-model'); + if (value) { + model.systemVariables = process.env; + } else { + model.systemVariables = undefined; + } + this.render(); + } + + constructor() { + super(); + + this.initObservableProperties( + 'route', 'initializing', 'loadingStatus', + 'compatibility', 'oauth2RedirectUri', + 'navigationDetached', 'updateState', 'hasAppUpdate', + 'popupMenuEnabled', 'draggableEnabled', 'historyEnabled', + 'listType', 'detailedSearch', 'currentEnvironment', + 'workspaceSendButton', 'workspaceProgressInfo', 'workspaceBodyEditor', 'workspaceAutoEncode', + 'navigationWidth', + 'requestDetailsOpened', 'requestMetaOpened', 'metaRequestId', 'metaRequestType', + ); + + /** + * @type {boolean} Whether the project is being restored from the metadata store. + */ + this.initializing = true; + + /** + * @type {ARCConfig} + */ + this.config = undefined; + + /** + * @type {string} A loading state information. + */ + this.loadingStatus = 'Initializing application...'; + this.logger = logger; + + + window.onunhandledrejection = this[unhandledRejectionHandler].bind(this); + + // todo: do the below when the application is already initialized. + + // this[navigationHandler] = this[navigationHandler].bind(this); + + // window.addEventListener(ModelingEventTypes.State.Navigation.change, this[navigationHandler]); + + this.oauth2RedirectUri = 'http://auth.advancedrestclient.com/arc.html'; + this.compatibility = false; + + /** + * A list of detached menu panels. + * @type {string[]} + */ + this.menuPopup = []; + /** + * When set the navigation element is detached from the main application window. + */ + this.navigationDetached = false; + + /** + * Whether application update is available. + */ + this.hasAppUpdate = false; + /** + * The current state of checking for update. + * @type {string} + */ + this.updateState = undefined; + + /** + * Whether the application menu can be detached to a new window. + */ + this.popupMenuEnabled = true; + /** + * Whether the application support request object drag and drop + */ + this.draggableEnabled = true; + + /** + * Whether the requests history is enabled. + */ + this.historyEnabled = true; + + /** + * The current setting for the list types view. + */ + this.listType = 'default'; + + /** + * Whether the history / saved search should perform slower but more detailed search + */ + this.detailedSearch = false; + + /** + * The name of the currently selected environment. Null for the default. + */ + this.currentEnvironment = null; + + /** + * Whether the application should process system variables. + */ + this.systemVariablesEnabled = true; + /** + * Enables variables processor. + */ + this[variablesEnabledValue] = true; + + this.workspaceSendButton = true; + this.workspaceProgressInfo = true; + this.workspaceBodyEditor = 'Monaco'; + this.workspaceAutoEncode = false; + + + this.requestDetailsOpened = false; + this.requestMetaOpened = false; + this.metaRequestId = undefined; + this.metaRequestType = undefined; + } + + async initialize() { + await this.ga.initialize(); + this.listen(); + this.windowProxy.initContextMenu(); + const init = this.collectInitOptions(); + this.initOptions = init; + + let cnf = {}; + try { + cnf = await this.settings.read(); + } catch (e) { + this.reportCriticalError(e); + throw e; + } + this.config = cnf; + this.setConfigVariables(cnf); + + await this.loadTheme(init.darkMode); + this.workspace.id = init.workspaceId; + let state = /** @type ARCState */(null); + try { + state = await this.stateProxy.read(); + } catch (e) { + state = { + kind: 'ARC#AppState', + }; + } + this[processApplicationState](state); + + await this.afterInitialization(); + await this.loadMonaco(); + this.initializing = false; + } + + /** + * Sets local variables from the config object + * @param {ARCConfig} cnf + */ + setConfigVariables(cnf) { + if (!!cnf.request || (cnf.request && typeof cnf.request.ignoreSessionCookies === 'boolean' && cnf.request.ignoreSessionCookies)) { + ModulesRegistry.register(ModulesRegistry.request, 'arc/request/cookies', RequestCookies.processRequestCookies, ['events']); + ModulesRegistry.register(ModulesRegistry.response, 'arc/response/cookies', RequestCookies.processResponseCookies, ['events']); + } + + if (cnf.history) { + if (typeof cnf.history.enabled === 'boolean') { + this.historyEnabled = cnf.history.enabled; + } + + if (typeof cnf.history.fastSearch === 'boolean') { + this.detailedSearch = !cnf.history.fastSearch; + } + } + + if (cnf.request) { + if (typeof cnf.request.timeout === 'number') { + this.requestFactory.requestTimeout = cnf.request.timeout; + } + if (typeof cnf.request.followRedirects === 'boolean') { + this.requestFactory.followRedirects = cnf.request.followRedirects; + } + if (typeof cnf.request.defaultHeaders === 'boolean') { + this.requestFactory.defaultHeaders = cnf.request.defaultHeaders; + } + if (typeof cnf.request.validateCertificates === 'boolean') { + this.requestFactory.validateCertificates = cnf.request.validateCertificates; + } + if (typeof cnf.request.nativeTransport === 'boolean') { + this.requestFactory.nativeTransport = cnf.request.nativeTransport; + } + if (typeof cnf.request.useSystemVariables === 'boolean') { + this.systemVariablesEnabled = cnf.request.useSystemVariables; + } + if (typeof cnf.request.useAppVariables === 'boolean') { + this.variablesEnabled = cnf.request.useAppVariables; + } + if (cnf.request.oauth2redirectUri) { + this.oauth2RedirectUri = cnf.request.oauth2redirectUri; + } + } + + if (cnf.view) { + if (typeof cnf.view.fontSize === 'number') { + document.body.style.fontSize = `${cnf.view.fontSize}px`; + } + if (typeof cnf.view.popupMenu === 'boolean') { + this.popupMenuEnabled = cnf.view.popupMenu; + } + if (typeof cnf.view.draggableEnabled === 'boolean') { + this.draggableEnabled = cnf.view.draggableEnabled; + } + if (typeof cnf.view.listType === 'string') { + this.listType = cnf.view.listType; + } + } + if (cnf.requestEditor) { + if (typeof cnf.requestEditor.sendButton === 'boolean') { + this.workspaceSendButton = cnf.requestEditor.sendButton; + } + if (typeof cnf.requestEditor.progressInfo === 'boolean') { + this.workspaceProgressInfo = cnf.requestEditor.progressInfo; + } + if (typeof cnf.requestEditor.bodyEditor === 'string') { + this.workspaceBodyEditor = cnf.requestEditor.bodyEditor; + } + if (typeof cnf.requestEditor.autoEncode === 'boolean') { + this.workspaceAutoEncode = cnf.requestEditor.autoEncode; + } + } + } + + /** + * @param {ARCState} state + */ + [processApplicationState](state) { + if (state.environment) { + if (state.environment.variablesEnvironment) { + // this.currentEnvironment = state.environment.variablesEnvironment; + ArcModelEvents.Environment.select(document.body, state.environment.variablesEnvironment); + } + } + } + + listen() { + this.settings.observe(); + this.oauth2Proxy.listen(); + this.themeProxy.listen(); + this.encryption.listen(); + this.workspace.listen(); + this.cookieBridge.listen(); + this.fs.listen(); + this.search.listen(); + this.requestFactory.listen(); + this.gDrive.listen(); + this.#contextMenu.connect(); + this.#contextMenu.registerCommands(ContextMenuCommands); + this.#contextMenu.registerCallback(this[contextCommandHandler].bind(this)); + + window.addEventListener(ArcNavigationEventTypes.navigateRequest, this[navigateRequestHandler].bind(this)); + window.addEventListener(ArcNavigationEventTypes.navigate, this[navigateHandler].bind(this)); + window.addEventListener(ArcNavigationEventTypes.navigateProject, this[navigateProjectHandler].bind(this)); + window.addEventListener(ArcNavigationEventTypes.navigateRestApi, this[navigateRestApiHandler].bind(this)); + window.addEventListener(ArcNavigationEventTypes.popupMenu, this[popupMenuHandler].bind(this)); + window.addEventListener(ArcNavigationEventTypes.navigateExternal, this[externalNavigationHandler].bind(this)); + window.addEventListener(WorkspaceEventTypes.appendRequest, this[workspaceAppendRequestHandler].bind(this)); + window.addEventListener(WorkspaceEventTypes.appendExport, this[workspaceAppendExportHandler].bind(this)); + window.addEventListener(ConfigEventTypes.State.update, this[configStateChangeHandler].bind(this)); + window.addEventListener(DataImportEventTypes.inspect, this[dataInspectHandler].bind(this)); + window.addEventListener(ArcModelEventTypes.Environment.State.select, this[environmentSelectedHandler].bind(this)); + window.addEventListener(RestApiEventTypes.processFile, this[processApiFileHandler].bind(this)); + window.addEventListener('mousemove', this[resizeMouseMove].bind(this)); + window.addEventListener('mouseup', this[resizeMouseUp].bind(this)); + window.addEventListener('themeactivated', (e) => { + // @ts-ignore + this.compatibility = e.detail === ThemeManager.anypointTheme; + }); + + ipc.on('command', this[commandHandler].bind(this)); + ipc.on('request-action', this[requestActionHandler].bind(this)); + ipc.on('system-theme-changed', this[systemThemeChangeHandler].bind(this)); + + ipc.on('popup-app-menu-opened', this[popupMenuOpenedHandler].bind(this)); + ipc.on('popup-app-menu-closed', this[popupMenuClosedHandler].bind(this)); + ipc.on('app-navigate', this[mainNavigateHandler].bind(this)); + ipc.on('google-drive-file-pick', this[drivePickHandler].bind(this)); + + ipc.on('checking-for-update', () => { + this.logger.info('Checking for application update'); + this.updateState = 'checking-for-update'; + }); + ipc.on('update-available', () => { + this.logger.info('Application update available.'); + this.updateState = 'update-available'; + }); + ipc.on('update-not-available', () => { + this.logger.info('Application update not available.'); + this.updateState = 'update-not-available'; + }); + ipc.on('autoupdate-error', (e, error) => { + this.updateState = 'autoupdate-error'; + this.logger.error(error); + }); + ipc.on('download-progress', (e, progressObj) => { + this.updateState = 'download-progress'; + this.logger.info(progressObj); + }); + ipc.on('update-downloaded', () => { + this.logger.info('Application update downloaded and ready to install.'); + this.updateState = 'update-downloaded'; + this.hasAppUpdate = true; + }); + } + + /** + * @returns {ArcAppInitOptions} The init options of this browser process. + */ + collectInitOptions() { + const search = new URLSearchParams(window.location.search); + const result = /** @type ArcAppInitOptions */ ({}); + const dt = search.get('darkMode'); + if (dt) { + result.darkMode = dt === 'true'; + } + const wId = search.get('workspaceId'); + if (wId) { + result.workspaceId = wId; + } + return result; + } + + /** + * Loads the current theme. + * @param {boolean} isDarkMode + */ + async loadTheme(isDarkMode) { + const settings = await this.themeProxy.readState(); + let theme; + if (isDarkMode && settings.systemPreferred) { + theme = ThemeManager.darkTheme; + } else { + const info = await this.themeProxy.readActiveThemeInfo(); + theme = info && info.name; + } + try { + await this.themeProxy.loadTheme(theme); + } catch (e) { + this.logger.error(e); + } + } + + /** + * Tasks to be performed after the application is initialized. + */ + async afterInitialization() { + window.onpopstate = () => { + this.onRoute(); + } + requestAnimationFrame(() => this.onRoute()); + } + + /** + * @param {PromiseRejectionEvent} e + */ + [unhandledRejectionHandler](e) { + /* eslint-disable-next-line no-console */ + console.error(e); + this.reportCriticalError(e.reason); + } + + async loadMonaco() { + const base = `../../../../node_modules/monaco-editor/`; + MonacoLoader.createEnvironment(base); + await MonacoLoader.loadMonaco(base); + await MonacoLoader.monacoReady(); + } + + /** + * Called when route change + */ + onRoute() { + const url = new URL(window.location.href); + const path = url.hash.replace('#', ''); + // @ts-ignore + const { routes } = this.constructor; + const result = findRoute(routes, path); + if (!result) { + return; + } + const { name } = result.route; + this.route = name; + this.ga.screenView(name); + } + + /** + * Closes a tab in the request workspace at the specified position + * @param {number} index + */ + closeWorkspaceTab(index) { + this.workspaceElement.removeRequest(index); + } + + /** + * Closes all tabs in the request workspace + */ + closeAllWorkspaceTabs() { + this.workspaceElement.clear(); + } + + /** + * Closes all tabs in the request workspace except for the given index. + * @param {number} index + */ + closeOtherWorkspaceTabs(index) { + // this.workspaceElement.removeRequest(); + } + + /** + * Duplicates a tab at the given index. + * @param {number} index + */ + duplicateWorkspaceTab(index) { + this.workspaceElement.duplicateTab(index); + } + + /** + * @param {ARCRequestNavigationEvent} e + */ + [navigateRequestHandler](e) { + const { requestId, requestType, action } = e; + if (action === 'open') { + this.workspaceElement.addByRequestId(requestType, requestId); + if (this.route !== 'workspace') { + navigate('workspace'); + } + return; + } + if (action === 'detail') { + this.requestMetaOpened = false; + this.requestDetailsOpened = true; + this.metaRequestId = requestId; + this.metaRequestType = requestType; + return; + } + if (action === 'edit') { + this.requestDetailsOpened = false; + this.requestMetaOpened = true; + this.metaRequestId = requestId; + this.metaRequestType = requestType; + } + } + + /** + * @param {ARCProjectNavigationEvent} e + */ + [navigateProjectHandler](e) { + const { id, action, route } = e; + if (route !== 'project') { + return; + } + if (action === ProjectActions.addWorkspace) { + this.workspaceElement.appendByProjectId(id); + } else if (action === ProjectActions.replaceWorkspace) { + this.workspaceElement.replaceByProjectId(id); + } else if (action === 'open') { + navigate(route, id, action); + } else { + // eslint-disable-next-line no-console + console.warn('Unhandled project event', id, action, route); + } + } + + /** + * @param {ARCRestApiNavigationEvent} e + */ + [navigateRestApiHandler](e) { + const { api, version } = e; + navigatePage('api-console.html', 'open', 'db', api, version); + } + + /** + * @param {ARCMenuPopupEvent} e + */ + [popupMenuHandler](e) { + const { menu } = e; + const element = document.querySelector('arc-menu'); + const rect = element.getBoundingClientRect(); + const sizing = { + height: rect.height, + width: rect.width + }; + ipc.send('popup-app-menu', menu, sizing); + } + + /** + * @param {ARCNavigationEvent} e + */ + [navigateHandler](e) { + const allowed = [ + 'rest-projects', + 'exchange-search', + 'history', + 'saved', + ]; + if (e.route === 'client-certificate-import') { + this.importingCertificate = true; + } else if (allowed.includes(e.route)) { + navigate(e.route); + } else { + // eslint-disable-next-line no-console + console.warn('Unhandled navigate event', e); + } + } + + /** + * @param {ARCExternalNavigationEvent} e + */ + [externalNavigationHandler](e) { + const { url, detail } = e; + const { purpose } = detail; + ipc.send('open-web-url', url, purpose); + } + + /** + * A handler for the main toolbar arrow back click. + * Always navigates to the workspace. + */ + [mainBackHandler]() { + navigate('workspace'); + } + + /** + * Handler for application command. + * + * @param {EventEmitter} e Node's event + * @param {string} action + * @param {...any} args + */ + [commandHandler](e, action, ...args) { + switch (action) { + case 'open-saved': navigate('saved'); break; + case 'open-history': navigate('history'); break; + case 'open-cookie-manager': navigate('cookie-manager'); break; + case 'open-hosts-editor': navigate('hosts'); break; + case 'open-themes': navigate('themes'); break; + case 'open-client-certificates': navigate('client-certificates'); break; + case 'open-requests-workspace': navigate('workspace'); break; + case 'open-web-socket': this.workspaceElement.addWsRequest(); break; + case 'process-external-file': this.processExternalFile(args[0]); break; + case 'import-data': navigate('data-import'); break; + case 'export-data': navigate('data-export'); break; + case 'show-settings': navigate('settings'); break; + case 'popup-menu': this.navigationDetached = !this.navigationDetached; break; + case 'export-workspace': this.exportWorkspace(); break; + case 'login-external-webservice': this.workspaceElement.openWebUrlInput(); break; + case 'open-workspace-details': this.workspaceElement.openWorkspaceDetails(); break; + default: + this.logger.warn(`Unhandled IO command ${action}`); + } + } + + /** + * Handles action performed in main thread (menu action) related to a request. + * + * @param {EventEmitter} e + * @param {string} action Action name to perform. + * @param {...any} args + */ + [requestActionHandler](e, action, ...args) { + if (this.route !== 'workspace') { + navigate('workspace'); + } + switch (action) { + case 'save': + this.workspaceElement.saveOpened(); + break; + case 'save-as': + this.workspaceElement.saveAsOpened(); + break; + case 'new-http-tab': + this.workspaceElement.addHttpRequest(); + break; + case 'new-websocket-tab': + this.workspaceElement.addWsRequest(); + break; + case 'send-current': + this.workspaceElement.sendCurrent(); + break; + case 'close-tab': + this.workspaceElement.closeActiveTab(); + break; + default: + this.logger.warn(`Unhandled IO request command ${action}`); + } + } + + /** + * @param {ExecuteOptions} args + */ + [contextCommandHandler](args) { + const { command } = args; + switch (command) { + case 'close-tab': this.workspaceElement.removeRequest(getTabClickIndex(args.target)); break; + case 'close-other-tabs': this.workspaceElement.closeAllTabs(getTabClickIndex(args.target)); break; + case 'close-all-tabs': this.workspaceElement.closeAllTabs(); break; + case 'duplicate-tab': this.workspaceElement.duplicateTab(getTabClickIndex(args.target)); break; + default: + } + } + + /** + * @param {ConfigStateUpdateEvent} e + */ + [configStateChangeHandler](e) { + const { key, value } = e.detail; + if (key === 'request.ignoreSessionCookies') { + if (value) { + ModulesRegistry.register(ModulesRegistry.request, 'arc/request/cookies', RequestCookies.processRequestCookies, ['events']); + ModulesRegistry.register(ModulesRegistry.response, 'arc/response/cookies', RequestCookies.processResponseCookies, ['events']); + } else { + ModulesRegistry.unregister(ModulesRegistry.request, 'arc/request/cookies'); + ModulesRegistry.unregister(ModulesRegistry.response, 'arc/response/cookies'); + } + } else if (key === 'view.popupMenu') { + this.popupMenuEnabled = value; + } else if (key === 'view.draggableEnabled') { + this.draggableEnabled = value; + } else if (key === 'request.timeout') { + this.requestFactory.requestTimeout = value; + } else if (key === 'request.followRedirects') { + this.requestFactory.followRedirects = value; + } else if (key === 'request.defaultHeaders') { + this.requestFactory.defaultHeaders = value; + } else if (key === 'request.validateCertificates') { + this.requestFactory.validateCertificates = value; + } else if (key === 'request.nativeTransport') { + this.requestFactory.nativeTransport = value; + } else if (key === 'request.oauth2redirectUri') { + this.oauth2RedirectUri = value; + } else if (key === 'view.listType') { + this.listType = value; + } else if (key === 'history.enabled') { + this.historyEnabled = value; + } else if (key === 'history.fastSearch') { + this.detailedSearch = !value; + } else if (key === 'request.useSystemVariables') { + this.systemVariablesEnabled = value; + } else if (key === 'request.useAppVariables') { + this.variablesEnabled = value; + } else if (key === 'requestEditor.sendButton') { + this.workspaceSendButton = value; + } else if (key === 'requestEditor.progressInfo') { + this.workspaceProgressInfo = value; + } else if (key === 'requestEditor.bodyEditor') { + this.workspaceBodyEditor = value; + } else if (key === 'requestEditor.autoEncode') { + this.workspaceAutoEncode = value; + } else if (key === 'view.fontSize') { + document.body.style.fontSize = `${value}px`; + } + } + + /** + * Handler for system theme change event dispatched by the IO thread. + * Updates theme depending on current setting. + * + * @param {any} e + * @param {Boolean} isDarkMode true when Electron detected dark mode + * @returns {Promise} + */ + async [systemThemeChangeHandler](e, isDarkMode) { + const theme = isDarkMode ? + '@advanced-rest-client/arc-electron-dark-theme' : + '@advanced-rest-client/arc-electron-default-theme'; + this.compatibility = false; + try { + await this.themeProxy.loadTheme(theme); + } catch (err) { + this.logger.error(err); + } + } + + /** + * @param {string} filePath + */ + async processExternalFile(filePath) { + const factory = new ImportFilePreProcessor(filePath); + try { + await factory.prepare(); + const isApiFile = await factory.isApiFile(); + if (isApiFile) { + const result = await this.apiParser.processBuffer(factory.buffer); + this.apiConsoleFromParser(result); + return; + } + const contents = factory.readContents(); + await this.processExternalData(contents); + } catch (cause) { + this.logger.error(cause); + this.reportCriticalError(cause); + } + } + + /** + * Process file contents after importing it to the application. + * @param {string} contents + */ + async processExternalData(contents) { + const decrypted = await this.decryptIfNeeded(contents); + const data = JSON.parse(decrypted); + if (data.swagger) { + const result = await this.apiParser.processBuffer(Buffer.from(contents)); + this.apiConsoleFromParser(result); + return; + } + const processor = new ImportNormalize(); + const normalized = await processor.normalize(data); + + if (isSingleRequest(normalized)) { + const insert = Array.isArray(normalized.requests) ? normalized.requests[0] : data; + WorkspaceEvents.appendRequest(document.body, insert); + return; + } + + if (normalized.loadToWorkspace) { + WorkspaceEvents.appendExport(document.body, normalized); + return; + } + this.route = 'data-inspect'; + this[inspectDataValue] = normalized; + this.render(); + } + + /** + * @param {ApiParseResult} result + */ + async apiConsoleFromParser(result) { + const id = await this.fs.storeApicModelTmp(result); + navigatePage('api-console.html', 'open', 'file', id); + } + + /** + * Processes incoming data and if encryption is detected then id processes + * the file for decryption. + * + * @param {string} content File content + * @return {Promise} The content of the file. + */ + async decryptIfNeeded(content) { + const headerIndex = content.indexOf('\n'); + const header = content.substr(0, headerIndex).trim(); + if (header === 'aes') { + const data = content.substr(headerIndex + 1); + // eslint-disable-next-line no-param-reassign + content = await this.encryption.decode('aes', data); + } + return content; + } + + [popupMenuOpenedHandler](e, type) { + this.menuToggleOption(type, true); + } + + [popupMenuClosedHandler](e, type) { + this.menuToggleOption(type, false); + } + + /** + * @param {string} type The menu name + * @param {boolean} value Whether the menu is rendered in an external window. + */ + menuToggleOption(type, value) { + if (type === '*') { + this.navigationDetached = value; + return; + } + const { menuPopup } = this; + if (value && !menuPopup.includes(type)) { + menuPopup.push(type); + this.render(); + } else if (!value && menuPopup.includes(type)) { + const index = menuPopup.indexOf(type); + menuPopup.splice(index, 1); + this.render(); + } + } + + /** + * @param {*} e + * @param {string} type + * @param {string[]} args + */ + [mainNavigateHandler](e, type, args) { + switch (type) { + // @ts-ignore + case 'request': ArcNavigationEvents.navigateRequest(document.body, ...args); break; + // @ts-ignore + case 'project': ArcNavigationEvents.navigateProject(document.body, ...args); break; + // @ts-ignore + case 'navigate': ArcNavigationEvents.navigate(document.body, ...args); break; + default: + } + } + + /** + * Calls ARC app to serialize workspace data and exports it to a file. + * @return {Promise} + */ + async exportWorkspace() { + const id = await this.workspace.changeStoreLocation(); + if (!id) { + return; + } + this.initOptions.workspaceId = id; + this.render(); + this.workspaceElement.store(); + } + + /** + * @param {Event} e + */ + [environmentSelectorHandler](e) { + const overlay = document.querySelector('variables-overlay'); + overlay.positionTarget = /** @type HTMLElement */ (e.target); + overlay.opened = true; + } + + /** + * @param {KeyboardEvent} e + */ + [environmentSelectorKeyHandler](e) { + if (['Space', 'Enter', 'ArrowDown'].includes(e.code)) { + this[environmentSelectorHandler](e); + } + } + + async [fileImportHandler]() { + const result = await this.fs.pickFile(); + if (result.canceled) { + return; + } + const [file] = result.filePaths; + this.processExternalFile(file); + } + + /** + * @param {ArcImportInspectEvent} e + */ + [dataInspectHandler](e) { + const { data } = e.detail; + this.route = 'data-inspect'; + this[inspectDataValue] = data; + this.render(); + } + + /** + * @param {CustomEvent} e + */ + async [importDataHandler](e) { + const { detail } = e; + const store = new ImportFactory(); + const result = await store.importData(detail); + + const { savedIndexes, historyIndexes } = store; + this[notifyIndexer](savedIndexes, historyIndexes); + ImportEvents.dataImported(this); + this[mainBackHandler](); + } + + /** + * Dispatches `url-index-update` event handled by `arc-models/url-indexer`. + * It will index URL data for search function. + * @param {IndexableRequest[]} saved List of saved requests indexes + * @param {IndexableRequest[]} history List of history requests indexes + */ + [notifyIndexer](saved, history) { + let indexes = []; + if (saved) { + indexes = indexes.concat(saved); + } + if (history) { + indexes = indexes.concat(history); + } + if (!indexes.length) { + return; + } + ArcModelEvents.UrlIndexer.update(this, indexes); + } + + /** + * @param {WorkspaceAppendRequestEvent} e + */ + [workspaceAppendRequestHandler](e) { + const { request } = e.detail; + this.workspaceElement.add(request); + navigate('workspace'); + } + + /** + * @param {WorkspaceAppendExportEvent} e + */ + [workspaceAppendExportHandler](e) { + const { requests, history } = e.detail.data; + const { workspaceElement } = this; + (requests || []).forEach((request) => workspaceElement.add(request)); + (history || []).forEach((request) => workspaceElement.add(request)); + navigate('workspace'); + } + + /** + * @param {ARCEnvironmentStateSelectEvent} e + */ + [environmentSelectedHandler](e) { + const { environment } = e.detail; + if (environment) { + this.currentEnvironment = environment.name; + this.stateProxy.update('environment.variablesEnvironment', environment._id); + } else { + this.currentEnvironment = null; + this.stateProxy.update('environment.variablesEnvironment', null); + } + } + + /** + * @param {Event} e + */ + [navMinimizedHandler](e) { + const menu = /** @type ArcMenuElement */ (e.target); + if (menu.minimized) { + menu.parentElement.classList.add('minimized'); + } else { + menu.parentElement.classList.remove('minimized'); + } + } + + /** + * @param {MouseEvent} e + */ + [navResizeMousedown](e) { + this[isResizing] = true; + e.preventDefault(); + } + + /** + * @param {MouseEvent} e + */ + [resizeMouseUp](e) { + if (!this[isResizing]) { + return; + } + this[isResizing] = false; + e.preventDefault(); + } + + /** + * @param {MouseEvent} e + */ + [resizeMouseMove](e) { + if (!this[isResizing]) { + return; + } + const { pageX } = e; + if (pageX < 100) { + return; + } + if (pageX > window.innerWidth - 100) { + return; + } + this.navigationWidth = pageX; + } + + [metaRequestHandler]() { + this.requestMetaOpened = true; + this.requestDetailsOpened = false; + } + + [requestMetaCloseHandler]() { + this.requestMetaOpened = false; + } + + [sheetClosedHandler](e) { + const prop = e.target.dataset.openProperty; + this[prop] = e.detail.value; + } + + /** + * @param {Electron.IpcRendererEvent} e + * @param {string} fileId + */ + async [drivePickHandler](e, fileId) { + try { + const result = await this.gDrive.getFile(fileId); + await this.processExternalData(result); + } catch (cause) { + this.logger.error(cause); + this.reportCriticalError(cause); + } + } + + /** + * @param {RestApiProcessFileEvent} e + */ + async [processApiFileHandler](e) { + const { file } = e; + const result = await this.apiParser.processApiFile(file); + this.apiConsoleFromParser(result); + } + + /** + * @param {CustomEvent} e + */ + async [exchangeSelectionHandler](e) { + const asset = /** @type ExchangeAsset */ (e.detail); + let file; + const types = ['fat-raml', 'raml', 'oas']; + for (let i = 0, len = asset.files.length; i < len; i++) { + if (types.indexOf(asset.files[i].classifier) !== -1) { + file = asset.files[i]; + break; + } + } + if (!file || !file.externalLink) { + this.reportCriticalError('RAML data not found in the asset.'); + return; + } + const { externalLink, mainFile, md5, packaging } = file; + try { + const result = await this.apiParser.processApiLink(externalLink, mainFile, md5, packaging); + this.apiConsoleFromParser(result); + } catch (cause) { + this.reportCriticalError(cause.message); + } + } + + appTemplate() { + const { initializing } = this; + if (initializing) { + return this.loaderTemplate(); + } + // @ts-ignore + const { appVersion } = window.versionInfo; + return html` + + +
+ ${this[navigationTemplate]()} + ${this[pageTemplate](this.route)} +
+ `; + } + + /** + * @returns {TemplateResult} A template for the loader + */ + loaderTemplate() { + return html` +
+

Preparing something spectacular

+

${this.loadingStatus}

+
+ `; + } + + /** + * @returns {TemplateResult} The template for the header + */ + [headerTemplate]() { + const { route } = this; + const isWorkspace = route === 'workspace'; + return html` +
+ ${isWorkspace ? '' : + html` + + + `} + API Client + + ${this[environmentTemplate]()} +
`; + } + + /** + * @returns {TemplateResult|string} The template for the environment selector and the overlay. + */ + [environmentTemplate]() { + const { compatibility, variablesEnabled } = this; + if (!variablesEnabled) { + return ''; + } + let { currentEnvironment } = this; + if (!currentEnvironment) { + // this can be `null` so default values won't work + currentEnvironment = 'Default'; + } + return html` +
+ Environment: ${currentEnvironment} + +
+ + + `; + } + + /** + * @returns {TemplateResult|string} The template for the application main navigation area + */ + [navigationTemplate]() { + if (this.navigationDetached) { + return ''; + } + const { navigationWidth } = this; + const hasWidth = typeof navigationWidth === 'number'; + const classes = { + 'auto-width': hasWidth, + }; + const styles = { + width: '', + }; + if (hasWidth) { + styles.width = `${navigationWidth}px`; + } + return html` + + `; + } + + /** + * @returns {TemplateResult} The template for the ARC navigation + */ + [arcNavigationTemplate]() { + const { compatibility, menuPopup, listType, historyEnabled, popupMenuEnabled, draggableEnabled } = this; + const hideHistory = menuPopup.includes('history-menu'); + const hideSaved = menuPopup.includes('saved-menu'); + const hideProjects = menuPopup.includes('projects-menu'); + const hideApis = menuPopup.includes('rest-api-menu'); + return html` + + `; + } + + /** + * @param {string} route The current route + * @returns {TemplateResult} The template for the page content + */ + [pageTemplate](route) { + return html` +
+ ${this[headerTemplate]()} + ${this[workspaceTemplate](route === 'workspace')} + ${this[historyPanelTemplate](route)} + ${this[savedPanelTemplate](route)} + ${this[clientCertScreenTemplate](route)} + ${this[dataImportScreenTemplate](route)} + ${this[dataExportScreenTemplate](route)} + ${this[cookieManagerScreenTemplate](route)} + ${this[settingsScreenTemplate](route)} + ${this[importInspectorTemplate](route)} + ${this[hostRulesTemplate](route)} + ${this[exchangeSearchTemplate](route)} + ${this[requestDetailTemplate]()} + ${this[requestMetaTemplate]()} +
+ `; + } + + /** + * @param {boolean} visible Whether the workspace is rendered in the view + * @returns + */ + [workspaceTemplate](visible) { + const { oauth2RedirectUri, compatibility, initOptions, workspaceSendButton, workspaceProgressInfo } = this; + // if (typeof cnf.requestEditor.bodyEditor === 'string') { + // this.workspaceBodyEditor = cnf.requestEditor.bodyEditor; + // } + // if (typeof cnf.requestEditor.autoEncode === 'boolean') { + // this.workspaceAutoEncode = cnf.requestEditor.autoEncode; + // } + return html` + + `; + } + + /** + * @param {string} route The current route + * @returns {TemplateResult|string} The template for the history screen + */ + [historyPanelTemplate](route) { + if (route !== 'history') { + return ''; + } + const { compatibility } = this; + if (!this.historyEnabled) { + return ''; + } + return html` + + `; + } + + /** + * @param {string} route The current route + * @returns {TemplateResult|string} The template for the history screen + */ + [savedPanelTemplate](route) { + if (route !== 'saved') { + return ''; + } + const { compatibility } = this; + return html` + + `; + } + + /** + * @param {string} route The current route + * @returns {TemplateResult|string} The template for client certificates screen + */ + [clientCertScreenTemplate](route) { + if (route !== 'client-certificates') { + return ''; + } + const { compatibility } = this; + return html` + `; + } + + /** + * @param {string} route The current route + * @returns {TemplateResult|string} The template for the data import screen + */ + [dataImportScreenTemplate](route) { + if (route !== 'data-import') { + return ''; + } + const { compatibility } = this; + return html` +
+

Data import

+

You can import ARC data from any previous version, Postman export and backup, and API specification (RAML or OAS)

+ Select file +
+ `; + } + + [importInspectorTemplate](route) { + if (route !== 'data-inspect') { + return ''; + } + const data = this[inspectDataValue]; + return html` + + `; + } + + /** + * @param {string} route The current route + * @returns {TemplateResult|string} The template for the data export screen + */ + [dataExportScreenTemplate](route) { + if (route !== 'data-export') { + return ''; + } + const { compatibility } = this; + return html` + + `; + } + + /** + * @param {string} route The current route + * @returns {TemplateResult|string} The template for the cookie manager + */ + [cookieManagerScreenTemplate](route) { + if (route !== 'cookie-manager') { + return ''; + } + const { compatibility } = this; + return html` + + `; + } + + /** + * @param {string} route The current route + * @returns {TemplateResult|string} The template for the application settings + */ + [settingsScreenTemplate](route) { + if (route !== 'settings') { + return ''; + } + const { compatibility } = this; + return html` + + `; + } + + /** + * @returns {TemplateResult} The template for the request metadata info dialog + */ + [requestDetailTemplate]() { + const { compatibility, requestDetailsOpened, metaRequestId, metaRequestType } = this; + return html` + + + `; + } + + /** + * @returns {TemplateResult} The template for the request metadata editor dialog + */ + [requestMetaTemplate]() { + const { compatibility, requestMetaOpened, metaRequestId, metaRequestType } = this; + return html` + + + `; + } + + /** + * @param {string} route The current route + * @returns {TemplateResult|string} The template for the host rules mapping element + */ + [hostRulesTemplate](route) { + if (route !== 'hosts') { + return ''; + } + const { compatibility } = this; + return html` + + `; + } + + /** + * @param {string} route The current route + * @returns {TemplateResult|string} The template for the host rules mapping element + */ + [exchangeSearchTemplate](route) { + if (route !== 'exchange-search') { + return ''; + } + const { compatibility } = this; + return html` + + `; + } +} diff --git a/src/app/scripts/arc/ArcContextMenuCommands.js b/src/app/scripts/arc/ArcContextMenuCommands.js new file mode 100644 index 00000000..6e274aeb --- /dev/null +++ b/src/app/scripts/arc/ArcContextMenuCommands.js @@ -0,0 +1,66 @@ +import { ArcModelEvents } from '../../../../web_modules/@advanced-rest-client/arc-models/index.js'; + +/** @typedef {import('../context-menu/interfaces').ContextMenuCommand} ContextMenuCommand */ + +/** + * A default set of context menu commands + */ +const commands = /** @type ContextMenuCommand[] */ ([ + { + selector: "workspace-tab > span.tab-name", + group: "main", + label: "Close", + title: 'Closes this tab', + icon: 'close', + command: 'close-tab', + }, + { + selector: "workspace-tab > span.tab-name", + group: "main", + label: "Close others", + title: 'Closes all other tabs', + // icon: 'close', + command: 'close-other-tabs', + }, + { + selector: "workspace-tab > span.tab-name", + group: "main", + label: "Close all", + title: 'Closes all opened tabs', + // icon: 'close', + command: 'close-all-tabs', + }, + { + selector: "workspace-tab > span.tab-name", + group: "edit", + label: "Duplicate", + title: 'Duplicate this tab', + icon: 'duplicate', + command: 'duplicate-tab', + }, + + // history / saved menu + { + selector: '.request-list-item[data-id] *', + group: "main", + label: "Delete", + title: 'Delete this request', + icon: 'deleteOutline', + execute: (args) => { + const { root, target } = args; + let parent = target.closest('history-menu,saved-menu,projects-menu,saved-panel,history-panel'); + if (!parent) { + parent = /** @type ShadowRoot */ (target.getRootNode()).host; + } + if (!parent) { + return; + } + // @ts-ignore + const { type } = parent; + const itemTarget = /** @type HTMLElement */ (target.closest('.request-list-item')); + ArcModelEvents.Request.delete(root, type, itemTarget.dataset.id); + }, + } +]); + +export default commands; diff --git a/src/app/scripts/arc/Request.js b/src/app/scripts/arc/Request.js new file mode 100644 index 00000000..3d349a82 --- /dev/null +++ b/src/app/scripts/arc/Request.js @@ -0,0 +1,420 @@ +/* eslint-disable no-param-reassign */ +/* eslint-disable no-console */ +import { RequestFactory, ModulesRegistry, RequestAuthorization, ResponseAuthorization } from '../../../../web_modules/@advanced-rest-client/request-engine/index.js'; +import { TransportEventTypes, TransportEvents } from '../../../../web_modules/@advanced-rest-client/arc-events/index.js'; +import { ArcModelEvents } from '../../../../web_modules/@advanced-rest-client/arc-models/index.js'; +import jexl from '../../../../web_modules/jexl/dist/Jexl.js'; + +ModulesRegistry.register(ModulesRegistry.request, '@advanced-rest-client/request-engine/request/request-authorization', RequestAuthorization, ['store']); +ModulesRegistry.register(ModulesRegistry.response, '@advanced-rest-client/request-engine/response/request-authorization', ResponseAuthorization, ['store', 'events']); + +/** @typedef {import('@advanced-rest-client/arc-events').ApiTransportEvent} ApiTransportEvent */ +/** @typedef {import('@advanced-rest-client/arc-types').ArcRequest.ArcBaseRequest} ArcBaseRequest */ +/** @typedef {import('@advanced-rest-client/arc-types').ArcRequest.TransportRequest} TransportRequest */ +/** @typedef {import('@advanced-rest-client/arc-types').ArcRequest.RequestConfig} RequestConfig */ +/** @typedef {import('@advanced-rest-client/arc-types').ArcResponse.Response} Response */ +/** @typedef {import('@advanced-rest-client/arc-types').ArcResponse.ErrorResponse} ErrorResponse */ +/** @typedef {import('@advanced-rest-client/electron-request').RequestOptions} RequestOptions */ + +/* global ElectronRequest, SocketRequest, logger */ + +const loadStartHandler = Symbol('loadStartHandler'); +const firstByteHandler = Symbol('firstByteHandler'); +const loadEndHandler = Symbol('loadEndHandler'); +const beforeRedirectHandler = Symbol('beforeRedirectHandler'); +const headersReceivedHandler = Symbol('headersReceivedHandler'); +const loadHandler = Symbol('loadHandler'); +const errorHandler = Symbol('errorHandler'); +const prepareRequest = Symbol('prepareRequest'); +const prepareNativeRequest = Symbol('prepareNativeRequest'); +const prepareArcRequest = Symbol('prepareArcRequest'); +const makeConnection = Symbol('makeConnection'); +const transportRequestHandler = Symbol('transportRequestHandler'); +const makeRequestHandler = Symbol('makeRequestHandler'); +const abortRequestHandler = Symbol('abortRequestHandler'); +const removeConnectionHandlers = Symbol('removeConnectionHandlers'); +const informStatus = Symbol('informStatus'); + +export class Request { + constructor() { + this.factory = new RequestFactory(window, jexl); + /** + * @type {number} + */ + this.requestTimeout = undefined; + /** + * @type {boolean} + */ + this.nativeTransport = undefined; + /** + * @type {boolean} + */ + this.validateCertificates = undefined; + /** + * @type {boolean} + */ + this.followRedirects = undefined; + /** + * @type {boolean} + */ + this.defaultHeaders = undefined; + /** + * @type {number} + */ + this.sentMessageLimit = undefined; + /** + * @type {boolean} + */ + this.evaluateVariables = true; + /** + * @type {boolean} + */ + this.evaluateSystemVariables = true; + + /** + * @type {Map} + */ + this.connections = new Map(); + + this[loadStartHandler] = this[loadStartHandler].bind(this); + this[firstByteHandler] = this[firstByteHandler].bind(this); + this[loadEndHandler] = this[loadEndHandler].bind(this); + this[beforeRedirectHandler] = this[beforeRedirectHandler].bind(this); + this[headersReceivedHandler] = this[headersReceivedHandler].bind(this); + this[loadHandler] = this[loadHandler].bind(this); + this[errorHandler] = this[errorHandler].bind(this); + } + + listen() { + window.addEventListener(TransportEventTypes.request, this[makeRequestHandler].bind(this)); + window.addEventListener(TransportEventTypes.abort, this[abortRequestHandler].bind(this)); + window.addEventListener(TransportEventTypes.transport, this[transportRequestHandler].bind(this)); + } + + async [makeRequestHandler](e) { + const transportRequest = e.detail; + const request = await this.factory.processRequest(transportRequest, { + evaluateVariables: this.evaluateVariables, + evaluateSystemVariables: this.evaluateSystemVariables, + }); + // this event is significant, even though it is handled by the same class. + TransportEvents.transport(document.body, request.id, request.request); + } + + /** + * @param {ApiTransportEvent} e + */ + async [transportRequestHandler](e) { + const transportRequest = e.detail; + const { config, id, request } = transportRequest; + await this.run(request, id, config); + } + + /** + * @param {ArcBaseRequest} request + * @param {string} id + * @param {RequestConfig=} config + */ + async run(request, id, config={ enabled: false }) { + const rConf = /** @type RequestConfig */ (request.config || {}); + const configInit = rConf.enabled ? rConf : /** @type RequestConfig */ ({}); + const finalConfig = this.prepareRequestOptions(config, configInit); + if (request.clientCertificate) { + finalConfig.clientCertificate = request.clientCertificate; + } + // the request can proceed without hosts + try { + const hosts = await ArcModelEvents.HostRules.list(document.body); + if (hosts && hosts.items) { + finalConfig.hosts = hosts.items; + } + } catch (e) { + logger.error(e); + } + logger.info(`The config passed to the request factory:`, finalConfig); + try { + const connection = await this[prepareRequest](id, request, finalConfig); + await this[makeConnection](connection); + } catch (e) { + logger.error(e); + this[errorHandler](e, id); + } + } + + [abortRequestHandler](e) { + const { id } = e.detail; + this.factory.abort(id); + const info = this.connections.get(id); + info.connection.abort(); + } + + /** + * @param {RequestConfig} primary + * @param {RequestConfig} secondary + * @returns {RequestOptions} + */ + prepareRequestOptions(primary, secondary) { + const result = /** @type RequestOptions */ ({ + ...secondary, + ...primary, + logger, + }); + delete result.enabled; + delete result.ignoreSessionCookies; + if (typeof result.timeout === 'undefined' && typeof this.requestTimeout === 'number') { + result.timeout = this.requestTimeout; + } + if (result.timeout) { + result.timeout *= 1000; + } else { + result.timeout = 0; + } + + if (typeof result.validateCertificates === 'undefined' && typeof this.validateCertificates === 'boolean') { + result.validateCertificates = this.validateCertificates; + } + if (typeof result.followRedirects === 'undefined' && typeof this.followRedirects === 'boolean') { + result.followRedirects = this.followRedirects; + } + if (typeof result.defaultHeaders === 'undefined' && typeof this.defaultHeaders === 'boolean') { + result.defaultHeaders = this.defaultHeaders; + } + if (typeof this.sentMessageLimit === 'number') { + result.sentMessageLimit = this.sentMessageLimit; + } + return result; + } + + /** + * @param {ArcBaseRequest} request + * @param {RequestOptions} opts + * @returns {SocketRequest|ElectronRequest} + */ + [prepareRequest](id, request, opts) { + return this.isNative(opts) ? this[prepareNativeRequest](id, request, opts) : this[prepareArcRequest](id, request, opts); + } + + /** + * @param {string} id + * @param {ArcBaseRequest} request + * @param {RequestOptions} opts + * @returns {ElectronRequest} + */ + [prepareNativeRequest](id, request, opts) { + const conn = new ElectronRequest(request, id, opts); + this.connections.set(id, { + connection: conn, + aborted: false, + request, + }); + conn.on('loadstart', this[loadStartHandler]); + conn.on('firstbyte', this[firstByteHandler]); + conn.on('loadend', this[loadEndHandler]); + conn.on('beforeredirect', this[beforeRedirectHandler]); + conn.on('headersreceived', this[headersReceivedHandler]); + conn.on('load', this[loadHandler]); + conn.on('error', this[errorHandler]); + return conn; + } + + /** + * @param {string} id + * @param {ArcBaseRequest} request + * @param {RequestOptions} opts + * @returns {SocketRequest} + */ + [prepareArcRequest](id, request, opts) { + const conn = new SocketRequest(request, id, opts); + this.connections.set(id, { + connection: conn, + aborted: false, + request, + }); + conn.on('loadstart', this[loadStartHandler]); + conn.on('firstbyte', this[firstByteHandler]); + conn.on('loadend', this[loadEndHandler]); + conn.on('beforeredirect', this[beforeRedirectHandler]); + conn.on('headersreceived', this[headersReceivedHandler]); + conn.on('load', this[loadHandler]); + conn.on('error', this[errorHandler]); + return conn; + } + + /** + * @param {RequestOptions} opts + * @returns {boolean} + */ + isNative(opts) { + if (typeof opts.nativeTransport === 'boolean') { + return opts.nativeTransport; + } + return !!this.nativeTransport; + } + + /** + * @param {SocketRequest|ElectronRequest} connection + */ + async [makeConnection](connection) { + try { + await connection.send(); + } catch (cause) { + this[errorHandler](cause, connection.id); + } + } + + /** + * @param {string} id + */ + [loadStartHandler](id) { + this[informStatus]('requestloadstart', id); + } + + /** + * @param {string} id + */ + [firstByteHandler](id) { + this[informStatus]('requestfirstbytereceived', id); + } + + /** + * @param {string} id + */ + [loadEndHandler](id) { + this[informStatus]('requestloadend', id); + } + + /** + * @param {string} id + * @param {any} + */ + [beforeRedirectHandler](id, detail) { + const info = this.connections.get(id); + if (!info || info.aborted) { + return; + } + const e = new CustomEvent('beforeredirect', { + composed: true, + bubbles: true, + cancelable: true, + detail: { + id, + url: detail.location, + } + }); + document.body.dispatchEvent(e); + if (e.defaultPrevented) { + detail.returnValue = false; + } + } + + /** + * @param {string} id + * @param {any} detail + */ + [headersReceivedHandler](id, detail) { + const info = this.connections.get(id); + if (!info || info.aborted) { + return; + } + const e = new CustomEvent('headersreceived', { + composed: true, + bubbles: true, + cancelable: true, + detail: { + id, + url: detail.location, + } + }); + document.body.dispatchEvent(e); + if (e.defaultPrevented) { + detail.returnValue = false; + } + } + + /** + * @param {string} id + * @param {Response} response + * @param {TransportRequest} transport + */ + async [loadHandler](id, response, transport) { + const info = this.connections.get(id); + this.connections.delete(id); + if (!info || info.aborted) { + return; + } + this[removeConnectionHandlers](info.connection); + const fr = { + id, + request: info.request, + } + try { + await this.factory.processResponse(fr, transport, response, { + evaluateVariables: this.evaluateVariables, + evaluateSystemVariables: this.evaluateSystemVariables, + }); + TransportEvents.response(document.body, id, info.request, transport, response); + } catch (e) { + const errorResponse = /** @type ErrorResponse */ ({ + error: e, + status: response.status, + headers: response.headers, + payload: response.payload, + statusText: response.statusText, + id: response.id, + }); + TransportEvents.response(document.body, id, info.request, transport, errorResponse); + } + } + + /** + * @param {Error} error + * @param {string} id + * @param {TransportRequest=} transport + * @param {ErrorResponse=} response + */ + [errorHandler](error, id, transport, response) { + const info = this.connections.get(id); + this.connections.delete(id); + if (!info || info.aborted) { + return; + } + this[removeConnectionHandlers](info.connection); + const errorResponse = response || { + error, + status: 0, + }; + + TransportEvents.response(document.body, id, info.request, transport, errorResponse); + } + + /** + * @param {SocketRequest|ElectronRequest} connection + */ + [removeConnectionHandlers](connection) { + connection.removeAllListeners('loadstart'); + connection.removeAllListeners('firstbyte'); + connection.removeAllListeners('loadend'); + connection.removeAllListeners('beforeredirect'); + connection.removeAllListeners('headersreceived'); + connection.removeAllListeners('load'); + connection.removeAllListeners('error'); + } + + /** + * @param {string} type + * @param {string} id + */ + [informStatus](type, id) { + const info = this.connections.get(id); + if (!info || info.aborted) { + return; + } + document.body.dispatchEvent(new CustomEvent(type, { + composed: true, + bubbles: true, + detail: { + id, + } + })); + } +} diff --git a/src/app/scripts/arc/Utils.js b/src/app/scripts/arc/Utils.js new file mode 100644 index 00000000..4eb6a8b6 --- /dev/null +++ b/src/app/scripts/arc/Utils.js @@ -0,0 +1,9 @@ +/** + * Gets an index of the tab which is the source of one of the pre-build actions. + * @param {Element} target + * @return {number} An index of the tab + */ +export function getTabClickIndex(target) { + const tab = target.closest('workspace-tab'); + return Array.from(tab.parentElement.children).filter((node) => node.localName === tab.localName).indexOf(tab); +} diff --git a/src/app/scripts/common/ArcAlertDialogElement.d.ts b/src/app/scripts/common/ArcAlertDialogElement.d.ts new file mode 100644 index 00000000..7d5df3a5 --- /dev/null +++ b/src/app/scripts/common/ArcAlertDialogElement.d.ts @@ -0,0 +1,27 @@ +import { LitElement, CSSResult, TemplateResult } from 'lit-element'; +import { AnypointDialogMixin } from '@anypoint-web-components/anypoint-dialog'; + +export declare const closedHandler: unique symbol; + +export class ArcAlertDialogElement extends AnypointDialogMixin(LitElement) { + static get styles(): CSSResult[]; + + /** + * @attribute + */ + message: string; + /** + * @attribute + */ + compatibility: boolean; + + constructor(); + + connectedCallback(): void; + + disconnectedCallback(): void; + + [closedHandler](): void; + + render(): TemplateResult; +} diff --git a/src/app/scripts/common/ArcAlertDialogElement.js b/src/app/scripts/common/ArcAlertDialogElement.js new file mode 100644 index 00000000..9816bbcf --- /dev/null +++ b/src/app/scripts/common/ArcAlertDialogElement.js @@ -0,0 +1,69 @@ +import { html, css, LitElement } from '../../../../web_modules/lit-element/lit-element.js'; +import { AnypointDialogMixin } from '../../../../web_modules/@anypoint-web-components/anypoint-dialog/index.js'; +import AnypointDialogStyles from '../../../../web_modules/@anypoint-web-components/anypoint-dialog/src/AnypointDialogInternalStyles.js'; +import '../../../../web_modules/@anypoint-web-components/anypoint-button/anypoint-button.js'; + +export const closedHandler = Symbol('closedHandler'); + +export class ArcAlertDialogElement extends AnypointDialogMixin(LitElement) { + static get styles() { + return [ + AnypointDialogStyles, + css` + :host { + background-color: #F44336; + } + + :host > h2, + :host > * { + color: #fff !important; + } + + .message { + font-family: monospace; + } + + anypoint-button { + color: #fff; + } + `, + ]; + } + + static get properties() { + return { + message: { type: String }, + }; + } + + constructor() { + super(); + this.message = undefined; + this.compatibility = false; + this[closedHandler] = this[closedHandler].bind(this); + } + + connectedCallback() { + super.connectedCallback(); + this.addEventListener('overlay-closed', this[closedHandler]); + } + + disconnectedCallback() { + super.disconnectedCallback(); + this.removeEventListener('overlay-closed', this[closedHandler]); + } + + [closedHandler]() { + this.parentNode.removeChild(this); + } + + render() { + return html` +

An error ocurred

+

${this.message}

+
+ Dismiss +
+ `; + } +} diff --git a/src/app/scripts/context-menu/ContextMenu.js b/src/app/scripts/context-menu/ContextMenu.js new file mode 100644 index 00000000..c3402b3b --- /dev/null +++ b/src/app/scripts/context-menu/ContextMenu.js @@ -0,0 +1,459 @@ +import '../../../../web_modules/@anypoint-web-components/anypoint-listbox/anypoint-listbox.js'; +import '../../../../web_modules/@anypoint-web-components/anypoint-item/anypoint-icon-item.js'; +import '../../../../web_modules/@advanced-rest-client/arc-icons/arc-icon.js'; +import { ContextMenuStore } from './ContextMenuStore.js'; + +/** @typedef {import('./interfaces').RegisteredCommand} RegisteredCommand */ +/** @typedef {import('./interfaces').ClickVector} ClickVector */ +/** @typedef {import('./interfaces').ContextMenuCommand} ContextMenuCommand */ +/** @typedef {import('./interfaces').ExecuteOptions} ExecuteOptions */ + +let index = 0; + +/** + * A plugin that adds content menu support to the visualization workspace. + * + * This is a base class and by its own it has no commands registered. Override this class + * to register own commands with the `registerCommand()` function. Child class must also + * override the `elementToTarget()` that translates click target to a registered in the commands + * name. Each command has the `target` that is used to recognize which command should be rendered. + * + * After the visualization workspace is initialized create an instance of this class + * and call `connect()` to register event listener. After the workspace is no longer rendered + * or when context change, call `disconnect()` to clean up listeners. + */ +export class ContextMenu { + #connectedValue = false; + + /** + * @returns {boolean} True when the plug-in is listening for the input events. + */ + get connected() { + return this.#connectedValue; + } + + /** + * The root target of this context menu + * @type {HTMLElement} + */ + workspace; + + /** + * A reference to the store initialized with this context menu + * @type {ContextMenuStore} + */ + store; + + /** + * List of registered commands. + * @type {RegisteredCommand[]} + */ + commands = []; + + /** + * @type {RegisteredCommand[]} + */ + currentCommands = undefined; + + /** + * @type {(HTMLElement|SVGElement)} + */ + currentTarget = undefined; + + /** + * @type {HTMLDivElement} + */ + currentMenu = undefined; + + /** + * @type {ClickVector} + */ + targetVector = undefined; + + /** + * @type {((args: ExecuteOptions) => void)} + */ + #callback = undefined; + + /** + * @param {HTMLElement} workspace The root element that is the click handler + */ + constructor(workspace) { + this.workspace = workspace; + this.store = new ContextMenuStore(this); + this.contextHandler = this.contextHandler.bind(this); + this.menuClickHandler = this.menuClickHandler.bind(this); + this.clickHandler = this.clickHandler.bind(this); + this.keydownHandler = this.keydownHandler.bind(this); + } + + /** + * Registers a callback function to be called when a menu item is activated. + * This function is only called when the `execute` function is not defined on the action and the `command` property is set. + * @param {((args: ExecuteOptions) => void)} callback The function with the value of the `command` property of the action. + */ + registerCallback(callback) { + this.#callback = callback; + } + + /** + * Starts listening on user events + * @returns {void} + */ + connect() { + this.workspace.addEventListener('contextmenu', this.contextHandler); + window.addEventListener('click', this.clickHandler); + window.addEventListener('keydown', this.keydownHandler); + this.connectedValue = true; + } + + /** + * Cleans up the listeners + * @returns {void} + */ + disconnect() { + this.workspace.removeEventListener('contextmenu', this.contextHandler); + window.removeEventListener('click', this.clickHandler); + window.removeEventListener('keydown', this.keydownHandler); + this.connectedValue = false; + } + + /** + * Handler for the context menu event. + * @param {MouseEvent} e + * @returns {void} + */ + contextHandler(e) { + this.destroy(); + const target = this.findTarget(e); + if (!target) { + return; + } + + // since the context menu has fixed position it doesn't matter what the context + // is as the menu is rendered over all element. + // The `readClickPosition()` is used to determine click target for the commands. + const clickVector = { + x: e.clientX, + y: e.clientY, + } + const targetVector = this.readClickPosition(e); + this.build(e, target, clickVector, targetVector); + } + + /** + * Reads {x,y} vector of the click from the pointer event. + * @param {MouseEvent} e + * @returns {ClickVector} + */ + readClickPosition(e) { + return { + x: e.clientX, + y: e.clientY, + } + } + + /** + * Finds the click target from the event + * @param {MouseEvent} e + * @returns {HTMLElement|SVGElement|undefined} + */ + findTarget(e) { + const target = e.composedPath()[0]; + return /** @type HTMLElement|SVGElement|undefined */ (target); + } + + /** + * Builds a menu for a specific target. + * + * @param {MouseEvent} e + * @param {HTMLElement|SVGElement} target The element that triggered the menu + * @param {ClickVector} placementVector + * @param {ClickVector} targetVector + * @returns {void} + */ + build(e, target, placementVector, targetVector) { + const commands = this.listCommands(target); + if (!commands.length) { + return; + } + e.preventDefault(); + e.stopPropagation(); + this.targetVector = targetVector; + const groups = this.groupCommands(commands); + this.currentCommands = commands; + this.currentTarget = target; + this.render(target, placementVector, groups); + target.setAttribute('active', ''); + } + + /** + * @param {HTMLElement|SVGElement} target The element that triggered the menu + * @param {ClickVector} vector The canvas position of where to place the menu. + * @param {RegisteredCommand[][]} groups The commands render + * @returns {void} + */ + render(target, vector, groups) { + const root = this.createContainer(); + const box = root.querySelector('anypoint-listbox'); + const size = groups.length; + groups.forEach((commands, i) => { + commands.forEach((command) => { + const item = this.createCommandItem(command, target); + box.append(item); + }); + if (i + 1 !== size) { + box.append(this.createCommandDivider()); + } + }); + this.currentMenu = root; + root.style.top = `${vector.y}px`; + root.style.left = `${vector.x}px`; + const { workspace } = this; + if (workspace.shadowRoot) { + this.workspace.shadowRoot.append(root); + } else { + this.workspace.append(root); + } + } + + /** + * Removes currently rendered menu. + * @returns {void} + */ + destroy() { + if (!this.currentMenu) { + return; + } + const items = /** @type NodeListOf */ (this.currentMenu.querySelectorAll('.item')); + items.forEach((item) => item.removeEventListener('click', this.menuClickHandler)); + this.currentTarget.removeAttribute('active'); + + this.currentCommands = undefined; + this.currentTarget = undefined; + this.targetVector = undefined; + + const { workspace } = this; + if (workspace.shadowRoot) { + this.workspace.shadowRoot.removeChild(this.currentMenu); + } else { + this.workspace.removeChild(this.currentMenu); + } + this.currentMenu = undefined; + } + + /** + * Maps an element to an internal target name. This should be overridden by the implementation. + * + * @param {HTMLElement|SVGElement} element The context click target + * @returns {string|undefined} The internal target name. + */ + elementToTarget(element) { + if (element === this.workspace) { + return 'root'; + } + return undefined; + } + + /** + * Registers multiple commands in a batch call. + * @param {ContextMenuCommand[]} commands The list of commands to register + * @returns {void} + */ + registerCommands(commands) { + commands.forEach((command) => this.registerCommand(command)); + } + + /** + * Registers a new command in the context menu. + * @param {ContextMenuCommand} command + * @returns {void} + */ + registerCommand(command) { + index += 1; + const cmd = { ...command, id: index }; + this.commands.push(cmd); + } + + /** + * Lists all commands that matches the target. + * + * @param {HTMLElement|SVGElement} target The build target + * @returns {RegisteredCommand[]} + */ + listCommands(target) { + const { commands } = this; + const result =/** @type RegisteredCommand[] */ ([]); + commands.forEach((cmd) => { + if (cmd.selector === '*' || target.matches(cmd.selector)) { + result.push(cmd); + } + }); + return result; + } + + /** + * Creates an ordered grouped list of commands + * + * @param {RegisteredCommand[]} commands The commands to group + * @returns {RegisteredCommand[][]} Ordered list of grouped commands. + */ + groupCommands(commands) { + const main = /** @type RegisteredCommand[] */ ([]); + const tmp = /** @type Map */ (new Map()); + commands.forEach((cmd) => { + const { group } = cmd; + if (!group || group === 'main') { + main.push(cmd); + } else { + if (!tmp.has(group)) { + tmp.set(group, []); + } + tmp.get(group).push(cmd); + } + }); + const result = /** @type RegisteredCommand[][] */ ([]); + if (main.length) { + result.push(main); + } + for (const item of tmp) { + result.push(item[1]); + } + return result; + } + + /** + * @return {HTMLDivElement} + */ + createContainer() { + const container = document.createElement('div'); + container.classList.add('context-menu'); + const list = document.createElement('anypoint-listbox'); + list.classList.add('listbox'); + container.append(list); + return container; + } + + /** + * @param {RegisteredCommand} command The command render + * @param {HTMLElement|SVGElement} target The element that triggered the menu + * @returns AnypointIconItem + */ + createCommandItem(command, target) { + const { label, title, icon, enabled, id } = command; + const item = document.createElement('anypoint-icon-item'); + item.classList.add('item'); + const labelElement = document.createElement('span'); + let disabled = false; + if (typeof enabled === 'function') { + disabled = !enabled({ + store: this.store, + target, + root: this.workspace, + }); + } + if (disabled) { + item.classList.add('disabled'); + } + if (title) { + item.title = title; + } + if (icon) { + const mi = this.createIcon(icon); + item.append(mi); + } else { + const mi = document.createElement('div'); + mi.slot = 'item-icon'; + mi.classList.add('menu-icon'); + item.append(mi); + } + labelElement.innerText = label; + item.append(labelElement); + item.addEventListener('click', this.menuClickHandler); + item.dataset.cmd = String(id); + return item; + } + + /** + * Creates an icon to be added to the menu item. + * @param {string} icon + * @returns {HTMLElement} + */ + createIcon(icon) { + const mi = document.createElement('arc-icon'); + // @ts-ignore + mi.icon = icon; + mi.slot = 'item-icon'; + mi.classList.add('menu-icon'); + return mi; + } + + /** + * Creates the menu items divider. + * @returns HTMLDivElement + */ + createCommandDivider() { + const item = document.createElement('div'); + item.classList.add('menu-divider'); + return item; + } + + /** + * Handles the click on the menu item. + * @param {MouseEvent} e + * @returns {void} + */ + menuClickHandler(e) { + const node = /** @type HTMLElement */ (e.currentTarget); + const id = Number(node.dataset.cmd); + if (Number.isNaN(id)) { + return; + } + const { currentCommands, currentTarget, targetVector } = this; + this.destroy(); + const command = currentCommands.find((item) => item.id === id); + if (!command) { + return; + } + const opts = { + store: this.store, + target: currentTarget, + root: this.workspace, + vector: targetVector, + command: command.command, + }; + if (this.#callback && command.command) { + this.#callback(opts); + } else { + command.execute(opts); + } + } + + /** + * Handles the click event on the document to close the menu is the click + * is outside the menu. + * @param {MouseEvent}e + * @returns {void} + */ + clickHandler(e) { + if (!this.currentMenu || e.defaultPrevented) { + return; + } + const elm = /** @type Element */ (e.target); + const inside = this.currentMenu.contains(elm); + if (!inside) { + this.destroy(); + } + } + + /** + * Closes the menu when ESC is pressed + * @param {KeyboardEvent} e + * @returns {void} + */ + keydownHandler(e) { + if (e.key === 'Escape' && this.currentMenu) { + this.destroy(); + } + } +} diff --git a/src/app/scripts/context-menu/ContextMenu.styles.js b/src/app/scripts/context-menu/ContextMenu.styles.js new file mode 100644 index 00000000..001c2e9a --- /dev/null +++ b/src/app/scripts/context-menu/ContextMenu.styles.js @@ -0,0 +1,41 @@ +import { css } from '../../../../web_modules/lit-element/lit-element.js'; + +export const ContextMenuStyles = css` +.context-menu { + position: fixed; + font-size: 1rem; + color: var(--context-menu-color, #000); + user-select: none; + z-index: 100; + --anypoint-item-icon-width: 32px; + --anypoint-item-min-height: 32px; +} + +.context-menu .listbox { + padding: 2px 0; + min-width: 160px; + border-radius: 4px; + box-shadow: var(--context-menu-shadow, var(--anypoint-dropdown-shadow)); + background-color: var(--context-menu-background-color, var(--primary-background-color)); +} + +.context-menu .item { + margin: 8px 0; +} + +.context-menu .item.disabled { + color: var(--context-menu-disabled-color, #9E9E9E); + pointer-events: none; +} + +.menu-divider { + height: 1px; + background-color: var(--context-menu-divider-color, rgba(0, 0, 0, 0.12)); + margin: 8px 0 8px 40px; +} + +.menu-icon { + width: 20px; + height: 20px; +} +`; diff --git a/src/app/scripts/context-menu/ContextMenuStore.js b/src/app/scripts/context-menu/ContextMenuStore.js new file mode 100644 index 00000000..e22b3298 --- /dev/null +++ b/src/app/scripts/context-menu/ContextMenuStore.js @@ -0,0 +1,52 @@ +/** @typedef {import('./ContextMenu').ContextMenu} ContextMenu */ + +export class ContextMenuStore { + /** + * Store's cache object when the menu items keeps their data. + * @type {Map} + */ + #cache = new Map(); + + /** + * The context menu instance. + */ + #menu; + + /** + * @param {ContextMenu} targetMenu The instance of the context menu that has this store. + */ + constructor(targetMenu) { + this.#menu = targetMenu; + } + + /** + * Sets a value in the store. + * + * @param {string} key The key under which to store the value + * @param value {any} The value to store. + * @returns {void} + */ + set(key, value) { + this.#cache.set(key, value); + } + + /** + * Reads a value from the state store. + * + * @param {string} key The key under which the value exists + * @returns {any|undefined} Stored value or undefined if not set. + */ + get(key) { + return this.#cache.get(key); + } + + /** + * Removes a value from the store. + * + * @param {string} key The key under which the value exists + * @returns {void} + */ + delete(key) { + this.#cache.delete(key); + } +} diff --git a/src/app/scripts/context-menu/interfaces.d.ts b/src/app/scripts/context-menu/interfaces.d.ts new file mode 100644 index 00000000..76cb8510 --- /dev/null +++ b/src/app/scripts/context-menu/interfaces.d.ts @@ -0,0 +1,97 @@ +import { ContextMenuStore } from './ContextMenuStore'; + +export declare interface ClickVector { + x: number; + y: number; +} + +export declare interface EnabledOptions { + /** + * The object store to be used to store menu item data. + */ + store: ContextMenuStore; + /** + * An instance of the element that triggered the command. + */ + target: HTMLElement|SVGElement; + /** + * The element with which this context menu was initialized with. + */ + root: HTMLElement; +} + +export declare interface ExecuteOptions { + /** + * The object store to be used to store menu item data. + */ + store: ContextMenuStore; + /** + * An instance of the element that triggered the command. + */ + target: HTMLElement|SVGElement; + /** + * The element with which this context menu was initialized with. + */ + root: HTMLElement; + /** + * The vector of the original click. + */ + vector: ClickVector; + /** + * The value of the `command` set on the command. + */ + command?: string; +} + +export declare interface ContextMenuCommand { + /** + * The name of the CSS selector that identifies the click target. + */ + selector: string; + /** + * The label to render. + */ + label: string; + /** + * Optional title to use + */ + title?: string; + /** + * The icon to render from the modeling-icons library. + * TODO: Make it also an `SVGTemplateResult` + */ + icon?: string; + /** + * A shortcut that triggers the command. + */ + shortcut?: string; + /** + * This value is not visualized. When set it creates a new group in the + * context menu in a way that they are separated with each other with + * a divider. + * + * @default main + */ + group?: string | 'main' | 'edit' | 'view'; + /** + * When set it is passed to the `execute` function and to the registered callback function. + */ + command?: string; + /** + * Whether the command is enabled or not. + * When not set it is assumed that the command is enabled. + * The function returns a value indicating whether the command is enabled. + */ + enabled?: ((args: EnabledOptions) => boolean); + /** + * The action to be executed when this command is activated + */ + execute?: ((args: ExecuteOptions) => void); +} + +export declare interface RegisteredCommand extends ContextMenuCommand { + /** + * The id of the registered command. + */ + id: number; +} diff --git a/src/app/scripts/data-migration.js b/src/app/scripts/data-migration.js new file mode 100644 index 00000000..8130bdaa --- /dev/null +++ b/src/app/scripts/data-migration.js @@ -0,0 +1,67 @@ +/* eslint-disable no-unused-vars */ +import { ApplicationPage } from '../ApplicationPage.js'; +import { html } from '../../../web_modules/lit-html/lit-html.js'; + +export class DataMigrationDialog extends ApplicationPage { + constructor() { + super(); + + this.initObservableProperties( + 'loadingStatus', 'error', 'stack' + ); + + this.loadingStatus = 'Checking the requirements...'; + this.error = false; + this.stack = ''; + } + + initialize() { + /** + * @param {MessageEvent} e + */ + window.onmessage = (e) => { + const { data } = e; + console.log('DATA', data); + if (data.loadingStatus) { + this.loadingStatus = data.loadingStatus; + } else if (data.error) { + const info = typeof data.error === 'string' ? JSON.parse(data.error) : data.error; + this.error = true; + this.loadingStatus = info.message; + this.stack = info.stack; + } + }; + } + + appTemplate() { + const { error } = this; + return error ? this.errorMessageTemplate() : this.loadingMessageTemplate(); + } + + loadingMessageTemplate() { + const { loadingStatus } = this; + return html` +
+ ARC logo +

Preparing something spectacular!

+

${loadingStatus}

+
+ `; + } + + errorMessageTemplate() { + const { loadingStatus, stack } = this; + return html` +
+ ARC logo +

Unthinkable happened!

+

Please, report an issue on the application GitHub page or contact us at arc@mulesoft.com for assistance.

+

${loadingStatus}

+

${stack}

+
+ `; + } +} + +const page = new DataMigrationDialog(); +page.initialize(); diff --git a/src/app/scripts/lib/route.js b/src/app/scripts/lib/route.js new file mode 100644 index 00000000..f2b13a95 --- /dev/null +++ b/src/app/scripts/lib/route.js @@ -0,0 +1,102 @@ +/** + * @typedef Route + * @property {string} name The name of the route + * @property {string} pattern The pattern to evaluate + */ +/** + * @typedef RouteResult + * @property {Route} route The matched route + * @property {object=} params Captured parameters + */ + +/** + * @param {string} value The pattern to evaluate + * @return {RegExp} + */ +function getPattern(value) { + return new RegExp(`^${value}$`); +} + +/** + * @param {string} uri The path value of the current URL. + * @param {string} pattern The pattern to evaluate + * @return {boolean} + */ +export function testRoute(uri, pattern) { + return getPattern(pattern).test(uri); +} + +/** + * @param {string} pattern The pattern to evaluate + * @param {string} uri The path value of the current URL. + * @return {object} + */ +export function parseParams(pattern, uri) { + const r = getPattern(pattern); + const match = r.exec(uri); + // @ts-ignore + const { groups } = match; + const result = {}; + if (groups) { + Object.keys(groups).forEach((key) => { + let value = /** @type String */ (groups[key]); + if (value[0] === '/') { + value = value.substr(1); + } + if (value.includes('/')) { + result[key] = value.split('/').map((i) => decodeURIComponent(i)); + } else { + result[key] = decodeURIComponent(value); + } + }); + } + return result +} + +/** + * @param {Route[]} routes List of routes to evaluate + * @param {string} path Current path + * @return {RouteResult|null} + */ +export function findRoute(routes, path) { + const activeRoute = routes.find((route) => route.pattern !== '*' && testRoute(path, route.pattern)); + if (activeRoute) { + const params = parseParams(activeRoute.pattern, path); + return { + route: activeRoute, + params, + } + } + const notFoundRoute = routes.find((route) => route.pattern === '*'); + if (notFoundRoute) { + return { + route: notFoundRoute, + }; + } + return null; +} + +/** + * Navigates to another page. + * + * @param {string} htmlFile The relative location of the target HTML file. + * @param {...string} route Optional route params to add to the has part of the url. + */ +export function navigatePage(htmlFile, ...route) { + const hash = route.map(encodeURIComponent).join('/'); + const url = new URL(htmlFile, window.location.href); + url.hash = hash; + window.location.href = url.toString(); +} + +/** + * Navigates to a route. + * + * @param {...string} route Optional route params to add to the has part of the url. + */ +export function navigate(...route) { + const hash = route.map(encodeURIComponent).join('/'); + const url = new URL(window.location.href); + url.hash = hash; + window.location.href = url.toString(); +} \ No newline at end of file diff --git a/src/app/scripts/popup-menu.js b/src/app/scripts/popup-menu.js new file mode 100644 index 00000000..db277cab --- /dev/null +++ b/src/app/scripts/popup-menu.js @@ -0,0 +1,195 @@ +/* eslint-disable no-unused-vars */ +import './pouchdb.js'; +import { ApplicationPage } from '../ApplicationPage.js'; +import { html } from '../../../web_modules/lit-html/lit-html.js'; +import { ArcNavigationEventTypes, ProjectActions, ConfigEventTypes } from '../../../web_modules/@advanced-rest-client/arc-events/index.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-dropdown-menu/anypoint-dropdown-menu.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-listbox/anypoint-listbox.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-item/anypoint-item.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-item/anypoint-icon-item.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-input/anypoint-input.js'; +import '../../../web_modules/@advanced-rest-client/arc-icons/arc-icon.js'; +import '../../../web_modules/@advanced-rest-client/arc-menu/history-menu.js'; +import '../../../web_modules/@advanced-rest-client/arc-menu/projects-menu.js'; +import '../../../web_modules/@advanced-rest-client/arc-menu/rest-api-menu.js'; +import '../../../web_modules/@advanced-rest-client/arc-menu/saved-menu.js'; +import '../../../web_modules/@advanced-rest-client/arc-menu/arc-menu.js'; +import '../../../web_modules/@advanced-rest-client/arc-models/project-model.js'; +import '../../../web_modules/@advanced-rest-client/arc-models/request-model.js'; +import '../../../web_modules/@advanced-rest-client/arc-models/rest-api-model.js'; + +/** @typedef {import('@advanced-rest-client/arc-events').ConfigStateUpdateEvent} ConfigStateUpdateEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').ARCRequestNavigationEvent} ARCRequestNavigationEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').ARCProjectNavigationEvent} ARCProjectNavigationEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').ARCNavigationEvent} ARCNavigationEvent */ +/** @typedef {import('lit-html').TemplateResult} TemplateResult */ + +/* global ThemeManager, PreferencesProxy, logger, ipc */ + +const configStateChangeHandler = Symbol('configStateChangeHandler'); +const navigateRequestHandler = Symbol('navigateRequestHandler'); +const navigateProjectHandler = Symbol('navigateProjectHandler'); +const navigateHandler = Symbol('navigateHandler'); + +class ArcMenuScreen extends ApplicationPage { + constructor() { + super(); + + this.initObservableProperties( + 'compatibility', 'listType', 'type', 'historyEnabled' + ); + this.compatibility = false; + /** + * @type {ThemeManager} + */ + this.themeProxy = new ThemeManager(); + /** + * @type {PreferencesProxy} + */ + this.settings = new PreferencesProxy(); + this.logger = logger; + this.type = ''; + this.historyEnabled = true; + } + + async initialize() { + const init = this.collectInitOptions(); + if (!init.type) { + this.reportCriticalError('Unknown menu type'); + return; + } + this.type = init.type; + this.themeProxy.listen(); + this.settings.observe(); + await this.loadTheme(); + window.addEventListener('themeactivated', (e) => { + // @ts-ignore + this.compatibility = e.detail === ThemeManager.anypointTheme; + }); + window.addEventListener(ConfigEventTypes.State.update, this[configStateChangeHandler].bind(this)); + const settings = await this.settings.read(); + if (settings.view && settings.view.listType) { + this.listType = settings.view.listType; + } + if (settings.history && typeof settings.history.enabled === 'boolean') { + this.historyEnabled = settings.history.enabled; + } + window.addEventListener(ArcNavigationEventTypes.navigateRequest, this[navigateRequestHandler].bind(this)); + window.addEventListener(ArcNavigationEventTypes.navigateProject, this[navigateProjectHandler].bind(this)); + window.addEventListener(ArcNavigationEventTypes.navigate, this[navigateHandler].bind(this)); + } + + /** + * Loads the current theme. + */ + async loadTheme() { + const info = await this.themeProxy.readActiveThemeInfo(); + try { + const id = info && info.name; + await this.themeProxy.loadTheme(id); + this.compatibility = id === ThemeManager.anypointTheme; + } catch (e) { + this.logger.error(e); + } + } + + /** + * @returns {any} The init options of this browser process. + */ + collectInitOptions() { + const search = new URLSearchParams(window.location.search); + const result = {}; + const dt = search.get('darkMode'); + if (dt) { + result.darkMode = dt === 'true'; + } + const type = search.get('type'); + if (type) { + result.type = type; + } + return result; + } + + /** + * @param {ConfigStateUpdateEvent} e + */ + [configStateChangeHandler](e) { + const { key, value } = e.detail; + if (key === 'view.listType') { + this.listType = value; + } if (key === 'history.enabled') { + this.historyEnabled = value; + } + } + + /** + * @param {ARCRequestNavigationEvent} e + */ + [navigateRequestHandler](e) { + const { requestId, requestType, action } = e; + ipc.send('popup-app-menu-nav', 'request', requestId, requestType, action); + + } + + /** + * @param {ARCProjectNavigationEvent} e + */ + [navigateProjectHandler](e) { + const { id, action, route } = e; + ipc.send('popup-app-menu-nav', 'project', id, action, route); + } + + /** + * @param {ARCNavigationEvent} e + */ + [navigateHandler](e) { + const allowed = [ + 'rest-projects', + 'exchange-search', + 'history', + 'saved', + ]; + if (allowed.includes(e.route)) { + ipc.send('popup-app-menu-nav', 'navigate', e.route); + } + } + + appTemplate() { + const { type } = this; + switch (type) { + case 'history-menu': return this.historyTemplate(); + case 'saved-menu': return this.savedTemplate(); + case 'projects-menu': return this.projectsTemplate(); + case 'rest-api-menu': return this.apiDocsTemplate(); + default: return this.allTemplate(); + } + } + + historyTemplate() { + const { listType } = this; + return html``; + } + + savedTemplate() { + const { listType } = this; + return html``; + } + + projectsTemplate() { + const { listType } = this; + return html``; + } + + apiDocsTemplate() { + const { listType } = this; + return html``; + } + + allTemplate() { + const { listType, historyEnabled } = this; + return html``; + } +} + +const instance = new ArcMenuScreen(); +instance.initialize(); diff --git a/src/app/scripts/pouchdb.js b/src/app/scripts/pouchdb.js new file mode 100644 index 00000000..8c0694cb --- /dev/null +++ b/src/app/scripts/pouchdb.js @@ -0,0 +1,3 @@ +import PouchDB from '../../../web_modules/pouchdb/dist/pouchdb.js'; + +window.PouchDB = PouchDB; diff --git a/src/app/scripts/search-bar.js b/src/app/scripts/search-bar.js new file mode 100644 index 00000000..7ab12f28 --- /dev/null +++ b/src/app/scripts/search-bar.js @@ -0,0 +1,186 @@ +/* eslint-disable no-unused-vars */ +import { ApplicationPage } from '../ApplicationPage.js'; +import { html } from '../../../web_modules/lit-html/lit-html.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-button/anypoint-button.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-input/anypoint-input.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-button/anypoint-icon-button.js'; +import '../../../web_modules/@advanced-rest-client/arc-icons/arc-icon.js'; + +/** @typedef {import('../../types').ArcAppInitOptions} ArcAppInitOptions */ +/** @typedef {import('lit-html').TemplateResult} TemplateResult */ +/* global ipc, ThemeManager */ + +const contentSearchInputHandler = Symbol('contentSearchInputHandler'); +const searchBarSuffixTemplate = Symbol('searchBarSuffixTemplate'); +const keydownHandler = Symbol('keydownHandler'); +const searchResultHandler = Symbol('searchResultHandler'); + +export class SearchBar extends ApplicationPage { + constructor() { + super(); + + this.initObservableProperties( + 'searchBarQuery', 'searchBarCount', 'searchBarOrdinal' + ); + /** + * @type {number} + */ + this.searchBarCount = undefined; + /** + * @type {number} + */ + this.searchBarOrdinal = undefined; + /** + * @type {string} + */ + this.searchBarQuery = undefined; + + this[searchResultHandler] = this[searchResultHandler].bind(this); + } + + async initialize() { + ipc.on('search-bar-found-in-page', this[searchResultHandler]); + const init = this.collectInitOptions(); + this.initOptions = init; + await this.loadTheme(); + this.render(); + } + + /** + * Loads the current theme. + */ + async loadTheme() { + const themeProxy = new ThemeManager(); + const info = await themeProxy.readActiveThemeInfo(); + try { + const id = info && info.name; + await themeProxy.loadTheme(id); + } catch (e) { + // this.logger.error(e); + } + } + + /** + * @returns {ArcAppInitOptions} The init options of this browser process. + */ + collectInitOptions() { + const search = new URLSearchParams(window.location.search); + const result = /** @type ArcAppInitOptions */ ({}); + const dt = search.get('darkMode'); + if (dt) { + result.darkMode = dt === 'true'; + } + return result; + } + + [searchResultHandler](e, matches, activeMatchOrdinal) { + this.searchBarCount = matches; + this.searchBarOrdinal = activeMatchOrdinal; + } + + [contentSearchInputHandler](e) { + const input = /** @type HTMLInputElement */ (e.target); + const { value } = input; + this.searchBarQuery = value; + if (value) { + ipc.send('search-bar-command', 'find', value); + } else { + ipc.send('search-bar-command', 'clear'); + } + } + + /** + * @param {KeyboardEvent} e + */ + [keydownHandler](e) { + if (e.code === 'Escape') { + e.preventDefault(); + e.stopPropagation(); + this.close(); + } else if (e.code === 'Enter') { + this.findNext(); + } + } + + findNext() { + const { searchBarQuery } = this; + if (!searchBarQuery) { + return; + } + const opts = { + findNext: true, + forward: true + }; + ipc.send('search-bar-command', 'find', searchBarQuery, opts); + } + + findPrevious() { + const { searchBarQuery } = this; + if (!searchBarQuery) { + return; + } + const opts = { + findNext: true, + forward: false + }; + ipc.send('search-bar-command', 'find', searchBarQuery, opts); + } + + close() { + window.close(); + } + + appTemplate() { + const { searchBarQuery } = this; + return html` + + ${this[searchBarSuffixTemplate]()} + + +
+ + + + + + + + + +
+ `; + } + + /** + * @returns {TemplateResult|string} The template for search bar counters, when has search results + */ + [searchBarSuffixTemplate]() { + const { searchBarQuery, searchBarCount=0, searchBarOrdinal=0 } = this; + if (!searchBarQuery) { + return ''; + } + return html`
${searchBarOrdinal}/${searchBarCount}
`; + } +} + +const page = new SearchBar(); +page.initialize(); diff --git a/src/app/scripts/themes.js b/src/app/scripts/themes.js new file mode 100644 index 00000000..727c8682 --- /dev/null +++ b/src/app/scripts/themes.js @@ -0,0 +1,313 @@ +/* eslint-disable no-unused-vars */ +import { ApplicationPage } from '../ApplicationPage.js'; +import { html } from '../../../web_modules/lit-html/lit-html.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-dropdown-menu/anypoint-dropdown-menu.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-listbox/anypoint-listbox.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-item/anypoint-item.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-item/anypoint-icon-item.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-input/anypoint-input.js'; +import '../../../web_modules/@anypoint-web-components/anypoint-switch/anypoint-switch.js'; +import '../../../web_modules/@advanced-rest-client/arc-icons/arc-icon.js'; + +/** @typedef {import('@advanced-rest-client/arc-types').Themes.InstalledTheme} InstalledTheme */ +/** @typedef {import('@anypoint-web-components/anypoint-listbox').AnypointListbox} AnypointListbox */ +/** @typedef {import('lit-html').TemplateResult} TemplateResult */ + +/* global ThemeManager, logger */ + +const defaultTheme = '@advanced-rest-client/arc-electron-default-theme'; + +export class ThemesScreen extends ApplicationPage { + /** + * @return {Boolean} `true` if selected theme is one of default themes. + */ + get isDefaultTheme() { + const { themes, activeTheme } = this; + if (!themes || !activeTheme || !themes.length) { + return true; + } + const item = themes.find((info) => info.name === activeTheme); + if (!item) { + return false; + } + if (typeof item.isDefault !== 'boolean') { + return false; + } + return item.isDefault; + } + + constructor() { + super(); + + this.initObservableProperties( + 'themes', 'activeTheme', 'installPending', 'compatibility', + 'systemPreferred', + ); + this.compatibility = false; + this.installPending = false; + this.systemPreferred = false; + /** + * @type {string} + */ + this.activeTheme = undefined; + /** + * @type {InstalledTheme[]} + */ + this.themes = undefined; + this.logger = logger; + this.manager = new ThemeManager(); + + this.installThemeName = ''; + } + + async initialize() { + await this.refresh(); + await this.loadTheme(); + this.render(); + } + + async refresh() { + const info = await this.manager.readState(); + if (!info) { + this.reportCriticalError('Unable to read application themes list.'); + return; + } + const { kind, themes, active, systemPreferred } = info; + if (kind !== 'ARC#ThemeInfo') { + this.reportCriticalError('Unknown themes settings format.'); + return; + } + this.themes = themes; + this.activeTheme = active || defaultTheme; + this.compatibility = this.activeTheme === '@advanced-rest-client/arc-electron-anypoint-theme'; + this.systemPreferred = systemPreferred || false; + } + + /** + * Loads the current theme. + */ + async loadTheme() { + const search = new URLSearchParams(window.location.search); + const dt = search.get('darkMode'); + const hasSystemDarkMode = dt === 'true'; + let theme = this.activeTheme; + if (hasSystemDarkMode && !this.systemPreferred) { + theme = ThemeManager.darkTheme; + } + try { + await this.manager.loadTheme(theme); + } catch (e) { + this.logger.error(e); + } + } + + /** + * Handler for the dropdown selection event. Activates the selected theme. + * @param {Event} e + */ + async _selectionHandler(e) { + const list = /** @type AnypointListbox */ (e.target); + const { selected } = list; + if (selected === this.activeTheme) { + return; + } + const index = this.themes.findIndex((i) => i.name === selected); + if (index === -1) { + return; + } + this.activeTheme = String(selected); + await this.manager.activate(this.activeTheme); + this.manager.loadTheme(this.activeTheme); + this.compatibility = this.activeTheme === '@advanced-rest-client/arc-electron-anypoint-theme'; + } + + _themeNameHandler(e) { + this.installThemeName = e.target.value; + } + + async _installHandler() { + const { installThemeName } = this; + if (!installThemeName) { + return; + } + this.installPending = true; + try { + await this.manager.installTheme(installThemeName); + await this.refresh(); + await this.manager.loadTheme(this.activeTheme); + } catch (e) { + this.reportCriticalError(e.message); + } + this.installPending = false; + } + + async _uninstallHandler() { + if (this.isDefaultTheme) { + this.reportCriticalError('Refusing to delete a default theme'); + return; + } + this.installPending = true; + try { + await this.manager.uninstallTheme(this.activeTheme); + await this.manager.activate(defaultTheme); + await this.refresh(); + await this.manager.loadTheme(this.activeTheme); + } catch (e) { + this.reportCriticalError(e.message); + } + this.installPending = false; + } + + async _ignoreSysPrefChange(e) { + const {checked} = e.target; + if (checked === this.systemPreferred) { + return; + } + this.systemPreferred = checked; + try { + await this.manager.setSystemPreferred(checked); + } catch (error) { + this.reportCriticalError(error.message); + this.systemPreferred = !checked; + } + } + + appTemplate() { + return html` + ${this.headerTemplate()} +
+ ${this.selectorTemplate()} + ${this.systemPrefsTemplate()} + ${this.addTemplate()} +
+ `; + } + + headerTemplate() { + return html`

Themes

`; + } + + /** + * @returns {TemplateResult} The template for the drop down selector with the remove option. + */ + selectorTemplate() { + return html` +
+
+ ${this.selectionDropdownTemplate()} + ${this.removeThemeTemplate()} +
+
`; + } + + /** + * @returns {TemplateResult} The template for the drop down selector. + */ + selectionDropdownTemplate() { + const { compatibility, activeTheme, themes=[] } = this; + return html` + + + + ${themes.map((item) => this.selectionItemTemplate(item))} + + `; + } + + /** + * @param {InstalledTheme} item + * @returns {TemplateResult} The template for the drop down item. + */ + selectionItemTemplate(item) { + const title = item.title || item.name; + return html` + + +
${title}
+ ${item.description ? html`
${item.description}
` : ''} +
+
+ `; + } + + /** + * @returns {TemplateResult|string} The template for the uninstall icon + */ + removeThemeTemplate() { + if (this.isDefaultTheme) { + return ''; + } + const { compatibility } = this; + return html` + + + `; + } + + systemPrefsTemplate() { + const { systemPreferred } = this; + return html` +
+ + System preferred theme + +
+ `; + } + + /** + * @returns {TemplateResult|string} The template for the install section + */ + addTemplate() { + const { compatibility, installPending } = this; + return html` +
+

Install theme

+

+ Install new theme by providing its NPM name, GitHub repository as + owner/name#branch, + or absolute path to the theme on your local filesystem. +

+
+ + + + Install +
+ +
+ `; + } +} + +const page = new ThemesScreen(); +page.initialize(); diff --git a/src/app/search-bar.html b/src/app/search-bar.html new file mode 100644 index 00000000..a174b8bf --- /dev/null +++ b/src/app/search-bar.html @@ -0,0 +1,14 @@ + + + + + + + Advanced REST Client by MuleSoft + + + +
+ + + diff --git a/src/app/styles/GoogleDrivePicker.css b/src/app/styles/GoogleDrivePicker.css new file mode 100644 index 00000000..170aebce --- /dev/null +++ b/src/app/styles/GoogleDrivePicker.css @@ -0,0 +1,3 @@ +google-drive-browser { + width: 100%; +} diff --git a/src/app/styles/about.css b/src/app/styles/about.css new file mode 100644 index 00000000..0651e628 --- /dev/null +++ b/src/app/styles/about.css @@ -0,0 +1,117 @@ +h1 { + font-size: var(--arc-font-display1-font-size); + font-weight: var(--arc-font-display1-font-weight); + letter-spacing: var(--arc-font-display1-letter-spacing); + line-height: var(--arc-font-display1-line-height); +} + +.title-section { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.hero { + display: flex; + flex-direction: row; + align-items: center; +} + +.logo { + width: 128px; + height: 128px; + display: block; +} + +.app-title { + margin-left: 24px; +} + +.version-meta { + display: flex; + flex-direction: row; + align-items: center; + font-size: 18px; + color: var(--about-arc-version-label-color, rgba(0, 0, 0, 0.74)); +} + +.version { + margin-right: 12px; + display: inline-block; + padding-right: 12px; + border-right: 1px var(--about-arc-version-section-border-right-color, rgba(0, 0, 0, 0.14)) solid; +} + +.version-meta a { + color: inherit; + text-decoration: inherit; +} + +.version-meta a:hover { + text-decoration: underline; +} + +.open-external-icon { + width: 16px; + height: 16px; +} + +.updates-section { + width: 100%; + max-width: 700px; + margin: 40px auto; + background-color: var(--about-arc-updates-section-background-color, #fff); + padding: 24px; + border: 1px var(--about-arc-updates-section-border-color, #e5e5e5) solid; +} + +.update-status { + display: flex; + flex-direction: row; + align-items: center; +} + +.update-message { + flex: 1; +} + +.heart { + color: var(--about-arc-updated-heart-color, #FF5722); + margin-left: 8px; +} + +.update-settings { + margin: 24px auto; +} + +.author-line { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + margin: 40px auto; +} + +.powered { + display: block; + width: 180px; + height: 39px; +} + +.error-code { + max-width: 360px; + margin: 20px auto; + background-color: var(--about-arc-error-code-background-color, #EF9A9A); + padding: 20px; + user-select: text; +} + +.release-channel { + margin-top: 40px; +} + +.channel-selector { + width: 100%; + margin: 0; +} diff --git a/src/app/styles/api-console.css b/src/app/styles/api-console.css new file mode 100644 index 00000000..39bcdfb2 --- /dev/null +++ b/src/app/styles/api-console.css @@ -0,0 +1,29 @@ +.menu-title { + background-color: var(--arc-menu-title-background-color); + color: var(--arc-menu-title-color); + height: 56px; + display: flex; + align-items: center; + border-bottom: 1px solid #e5e5e5; + padding: 20px; + box-sizing: border-box; +} + +.api-pages { + margin-left: 24px; +} + +nav { + display: flex; + flex-direction: column; +} + +api-navigation { + flex: 1; + overflow: auto; +} + +.api-version-selector { + --anypoint-dropdown-menu-background-color: var(--arc-toolbar-background); + --anypoint-dropdown-menu-label-color: var(--arc-toolbar-color); +} diff --git a/src/app/styles/app.css b/src/app/styles/app.css new file mode 100644 index 00000000..a5b45625 --- /dev/null +++ b/src/app/styles/app.css @@ -0,0 +1,56 @@ +main > .screen { + flex: 1; + height: 100vh; + overflow: hidden; + margin: 12px 20px; +} + +main > .screen.scroll { + overflow: auto; +} + +.environment-selector { + display: flex; + align-items: center; + cursor: pointer; + font-size: 1.2rem; +} + +.env-dropdown { + transform: rotate(90deg); + margin-left: 8px; +} + +variables-overlay { + color: initial; +} + +#passwordPrompt { + min-width: 460px; +} + +#passwordPrompt anypoint-masked-input { + width: auto; +} + +.bottom-sheet-container { + width: var(--bottom-sheet-width, 100%); + max-width: var(--bottom-sheet-max-width, 700px); + right: var(--bottom-sheet-right, 40px); + left: var(--bottom-sheet-left, auto); +} + +.arc-context-menu { + position: absolute; + color: var(--anypoint-listbox-color); + background-color: var(--anypoint-listbox-background-color, #FAFAFA); + box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.4); + z-index: 100; + padding: 8px 0; +} + +.arc-context-menu .context-item, +.arc-context-menu .context-item { + min-height: 40px; + padding-left: 32px; +} diff --git a/src/app/styles/common.css b/src/app/styles/common.css new file mode 100644 index 00000000..d0b678e3 --- /dev/null +++ b/src/app/styles/common.css @@ -0,0 +1,162 @@ +body, +html { + /* background-color: #F5F5F5; */ + height: 100%; + margin: 0; + padding: 0; + font-family: 'Roboto', 'Noto', sans-serif; + font-size: 16px; + user-select: none; + display: flex; + flex-direction: column; + margin: 0; + padding: 0; + background-color: #fff; +} + +#app { + display: flex; + flex-direction: column; + flex: 1; + height: 100%; + overflow: hidden; + box-sizing: border-box; +} + +.app-loader { + display: flex; + flex-direction: column; + flex: 1; + align-items: center; + justify-content: center; +} + +.app-loader .message { + font-size: 24px; + font-weight: 300; +} + +h2 { + font-size: var(--theme-h2-font-size, 56px); + font-weight: var(--theme-h2-font-weight, 200); + color: var(--theme-h1-color, currentColor); +} + +h2.title { + font-size: 1.25rem; + line-height: 2rem; + font-weight: 500; +} + +.title-line { + padding: 60px 0; + margin: 0; + text-align: center; +} + +header { + height: 56px; + background-color: var(--arc-toolbar-background); + color: var(--arc-toolbar-color); + display: flex; + flex-direction: row; + align-items: center; + border-bottom: 1px solid #e5e5e5; + padding: 20px; + box-sizing: border-box; +} + +main { + flex: 1; + display: flex; + flex-direction: column; + height: 100%; + overflow: auto; +} + +.content { + display: flex; + flex-direction: row; + height: 100%; + overflow: hidden; +} + +nav { + width: 360px; + position: relative; +} + +nav.minimized { + width: 56px !important; + border-right: 1px solid #e5e5e5; +} + +.nav-resize-rail { + background-color: transparent; + width: 8px; + right: -4px; + top: 0; + bottom: 0; + position: absolute; + cursor: col-resize; +} + +.page { + flex: 1; +} + +.full-page { + height: 100%; + width: 100%; +} + +.spacer { + flex: 1; + display: block; +} + +.drop-info, +.file-processing { + display: none; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(255, 255, 255, 0.84); + align-items: center; + justify-content: center; + flex-direction: column; +} + +.drop-info { + box-sizing: border-box; + border-width: 2px; + border-color: transparent; + border-style: dashed; +} + +.drop-target .drop-info, +.processing-domain .file-processing { + display: flex; +} + +.drop-target .drop-info { + border-color: var(--file-drop-zone-border-color-active, #8f1d5a); +} + +.drop-info > * { + pointer-events: none; +} + +.drop-icon { + width: 80px; + height: 80px; + color: #8f1d5a; +} + +.drop-message, +.processing-message { + font-size: 2rem; + font-weight: 300; +} diff --git a/src/app/styles/data-migration.css b/src/app/styles/data-migration.css new file mode 100644 index 00000000..42eaf8e5 --- /dev/null +++ b/src/app/styles/data-migration.css @@ -0,0 +1,14 @@ +.app-loader.error { + background-color: #F44336; + color: #fff; +} + +.error-stack { + white-space: pre; +} + +.error-message, +.error-stack, +.selectable { + user-select: text; +} diff --git a/src/app/styles/license.css b/src/app/styles/license.css new file mode 100644 index 00000000..2762f240 --- /dev/null +++ b/src/app/styles/license.css @@ -0,0 +1,9 @@ +summary { + padding: 1rem; + border-bottom: 1px #e5e5e5 solid; + margin-bottom: 12px; +} + +.preformatted { + white-space: pre-line; +} diff --git a/src/app/styles/popup-menu.css b/src/app/styles/popup-menu.css new file mode 100644 index 00000000..6e2a9599 --- /dev/null +++ b/src/app/styles/popup-menu.css @@ -0,0 +1,11 @@ +html, +body { + margin: 0; + padding: 0; +} + +body { + background-color: #fff; + font-family: Roboto, sans-serif; + font-size: 15px; +} diff --git a/src/app/styles/search-bar.css b/src/app/styles/search-bar.css new file mode 100644 index 00000000..3c5d5186 --- /dev/null +++ b/src/app/styles/search-bar.css @@ -0,0 +1,55 @@ +body, +html { + height: 100%; + font-family: 'Roboto', 'Noto', sans-serif; + font-size: 16px; + user-select: none; + margin: 0; + padding: 0; + background-color: var(--search-bar-background-color, #fff); + overflow: hidden; +} + +#app { + display: flex; + flex-direction: row; + align-items: center; + padding: 8px; + z-index: 100; + + --anypoint-input-border-color: transparent; + + /* border: 1px #e5e5e5 solid; + border-radius: 0 0 6px 6px; + box-shadow: var(--anypoint-dropdown-shadow); */ +} + +.counters { + color: var(--search-bar-counters-color, #9E9E9E); + font-size: 14px; +} + +.controls { + display: flex; + flex-direction: row; + align-items: center; + margin-left: 8px; + padding-left: 8px; +} + +anypoint-icon-button { + color: var(--search-bar-action-button-color, #616161); + width: 36px; + height: 36px; +} + +anypoint-input { + flex: 1; + width: auto; + margin: 0; +} + +.close-icon { + width: 20px; + height: 20px; +} diff --git a/src/app/styles/themes.css b/src/app/styles/themes.css new file mode 100644 index 00000000..53fc073f --- /dev/null +++ b/src/app/styles/themes.css @@ -0,0 +1,28 @@ +.themes-content { + max-width: 900px; + margin: 0 24px; +} + +.add-form { + display: flex; + flex-direction: row; + align-items: center; +} + +.add-form anypoint-input { + flex: 1; +} + +.selection-actions { + display: flex; + flex-direction: row; + align-items: center; +} + +.remove-theme { + margin-left: 8px; +} + +anypoint-dropdown-menu { + width: 600px; +} diff --git a/src/app/themes.html b/src/app/themes.html new file mode 100644 index 00000000..7640ac15 --- /dev/null +++ b/src/app/themes.html @@ -0,0 +1,15 @@ + + + + + + + ARC Themes selector + + + + +
+ + + diff --git a/src/arc-electron.js b/src/arc-electron.js deleted file mode 100644 index e6531281..00000000 --- a/src/arc-electron.js +++ /dev/null @@ -1,891 +0,0 @@ -import { LitElement, html } from '../web_modules/lit-element/lit-element.js'; -import { ArcAppMixin } from '../web_modules/@advanced-rest-client/arc-app-mixin/arc-app-mixin.js'; -import { Jexl } from '../web_modules/jexl/lib/Jexl.js'; -import { moreVert } from '../web_modules/@advanced-rest-client/arc-icons/ArcIcons.js'; -import PouchDB from '../web_modules/pouchdb/dist/pouchdb.js'; -import PouchQuickSearch from -'../web_modules/@advanced-rest-client/pouchdb-quick-search/dist/pouchdb.quick-search.min.js'; -import marked from '../web_modules/marked/lib/marked.js'; -import styles from '../web_modules/@advanced-rest-client/arc-app-mixin/AppStyles.js'; -import '../web_modules/@api-components/api-candidates-dialog/api-candidates-dialog.js'; -import '../web_modules/@advanced-rest-client/arc-models/client-certificate-model.js'; -import '../web_modules/@anypoint-web-components/anypoint-dialog/anypoint-dialog.js'; -import '../web_modules/@anypoint-web-components/anypoint-dialog/anypoint-dialog-scrollable.js'; -import '../web_modules/@advanced-rest-client/client-certificates-panel/certificate-import.js'; -import './electron-http-transport/electron-http-transport.js'; -import poweredIcon from './poweredby.js'; -window.PouchDB = PouchDB; -window.PouchQuickSearch = PouchQuickSearch; -window.PouchDB.plugin(window.PouchQuickSearch); -window.marked = marked; -window.Jexl = Jexl; -/* eslint-disable max-len */ -/** - * Main component for ARC electron app. - * - * @appliesMixin ArcAppMixin - */ -class ArcElectron extends ArcAppMixin(LitElement) { - static get styles() { - return styles; - } - - static get properties() { - return { - /** - * When true it is rendering API console view. - */ - isApiConsole: { type: Boolean }, - /** - * When set the certificates import panel is currently rendered. - * @type {Object} - */ - ccImportOpened: { type: Boolean }, - }; - } - - get apic() { - return this.shadowRoot.querySelector('#apic'); - } - - constructor() { - super(); - this._openExternalHandler = this._openExternalHandler.bind(this); - this._copyContentHandler = this._copyContentHandler.bind(this); - this._exchangeAssetHandler = this._exchangeAssetHandler.bind(this); - this._activeThemeHandler = this._activeThemeHandler.bind(this); - this._apiDataHandler = this._apiDataHandler.bind(this); - this._certCcImportHandler = this._certCcImportHandler.bind(this); - /* global log */ - this.log = log; - this.sysVars = process.env; - this.withEncrypt = true; - this.clientCertificateImport = true; - } - - connectedCallback() { - super.connectedCallback(); - window.addEventListener('open-external-url', this._openExternalHandler); - window.addEventListener('content-copy', this._copyContentHandler); - window.addEventListener('theme-activated', this._activeThemeHandler); - window.addEventListener('api-data-ready', this._apiDataHandler); - this.addEventListener('process-exchange-asset-data', this._exchangeAssetHandler); - window.addEventListener('client-certificate-import', this._certCcImportHandler); - } - - disconnectedCallback() { - super.disconnectedCallback(); - window.removeEventListener('open-external-url', this._openExternalHandler); - window.removeEventListener('content-copy', this._copyContentHandler); - window.removeEventListener('theme-activated', this._activeThemeHandler); - window.removeEventListener('api-data-ready', this._apiDataHandler); - window.removeEventListener('client-certificate-import', this._certCcImportHandler); - } - - _routeDataChanged() { - switch (this.page) { - case 'api-console': this._setupApiConsole(this.routeParams); break; - default: super._routeDataChanged(); - } - } - - async _pageChanged(page) { - let id; - let path; - let scope; - switch (page) { - case 'api-console': - await this._loadApic() - return; - case 'about': - id = 'about-arc-electron'; - path = 'about-arc-electron/about-arc-electron'; - scope = '@advanced-rest-client'; - break; - case 'exchange-search': - id = 'exchange-search-panel'; - path = 'exchange-search-panel/exchange-search-panel'; - scope = '@advanced-rest-client'; - break; - case 'rest-projects': - id = 'rest-apis-list-panel'; - path = 'rest-apis-list-panel/rest-apis-list-panel'; - scope = '@advanced-rest-client'; - break; - case 'themes-panel': - id = 'themes-panel'; - path = 'themes-panel/themes-panel'; - scope = '@advanced-rest-client'; - break; - case 'hosts-rules': - id = 'host-rules-editor'; - path = 'host-rules-editor/host-rules-editor'; - scope = '@advanced-rest-client'; - break; - case 'client-certificates': - id = 'client-certificates-panel'; - path = 'client-certificates-panel/client-certificates-panel'; - scope = '@advanced-rest-client'; - break; - } - if (id) { - const cls = window.customElements.get(id); - if (cls) { - return; - } - try { - await this._loadComponent(path, scope) - } catch (cmp) { - this._reportComponentLoadingError(cmp); - } - } else { - await super._pageChanged(page); - } - } - - _handleNavigation(e) { - const { detail } = e; - if (detail.base === 'api-console') { - this.page = detail.base; - this.routeParams = { id: detail.id }; - this._telemetryScreen(); - } else { - super._handleNavigation(e); - } - } - - _telemetryScreen() { - let screenName = this.page; - switch (this.page) { - case 'api-console': screenName = 'API Console'; break; - case 'themes-panel': screenName = 'Themes panel'; break; - case 'exchange-search': screenName = 'Exchange search'; break; - case 'hosts-rules': screenName = 'Hosts rules'; break; - case 'rest-projects': screenName = 'REST APIs list'; break; - case 'about': screenName = 'About'; break; - default: return super._telemetryScreen(); - } - this.dispatchEvent(new CustomEvent('send-analytics', { - composed: true, - cancelable: true, - bubbles: true, - detail: { - type: 'screenview', - name: screenName - } - })); - } - /** - * Navigates to themes panel - */ - openThemesPanel() { - this._dispatchNavigate({ - base: 'themes-panel' - }); - } - /** - * Opens the host rules editor. - */ - openHostRules() { - this._dispatchNavigate({ - base: 'hosts-rules' - }); - } - /** - * Navigates to Exchange search panel - */ - openExchangeSearch() { - this._dispatchNavigate({ - base: 'exchange-search' - }); - } - /** - * Navigates to about screen - */ - openAbout() { - this._dispatchNavigate({ - base: 'about' - }); - } - - _openWebUrlHandler(e) { - ipc.send('open-web-url', e.detail.url, e.detail.purpose); - } - - _requestAuthToken(interactive, scope) { - if (this.__requestingToken) { - return; - } - this.__requestingToken = true; - /* global ipc */ - ipc.send('oauth-2-get-token', { - interactive: interactive, - scopes: scope - }); - const context = this; - let rejected; - function resolved(sender, token) { - const tokenValue = token ? token.accessToken : undefined; - context.__requestingToken = false; - ipc.removeListener('oauth-2-token-ready', resolved); - ipc.removeListener('oauth-2-token-error', rejected); - context.dispatchEvent(new CustomEvent('google-signin-success', { - composed: true, - cancelable: true, - bubbles: true, - detail: { - scope: scope, - token: tokenValue - } - })); - context.driveAccessToken = tokenValue; - } - rejected = function() { - context.__requestingToken = false; - ipc.removeListener('oauth-2-token-ready', resolved); - ipc.removeListener('oauth-2-token-error', rejected); - context.dispatchEvent(new CustomEvent('google-signout', { - composed: true, - cancelable: true, - bubbles: true, - detail: { - scope: scope - } - })); - }; - ipc.on('oauth-2-token-ready', resolved); - ipc.on('oauth-2-token-error', rejected); - } - /** - * Handles `open-external-url` event from ARC components. - * @param {CustomEvent} e - */ - _openExternalHandler(e) { - e.preventDefault(); - /* global ipcRenderer */ - ipcRenderer.send('open-external-url', e.detail.url); - } - /** - * Handles new window open request. - */ - onNewWindow() { - ipcRenderer.send('new-window'); - } - /** - * Handles `clipboard-copy` event from ARC components. - * The `clipboard` api is loaded in the preload script. - * - * @param {CustomEvent} e - */ - _copyContentHandler(e) { - /* global clipboard */ - clipboard.writeText(e.detail.value); - e.preventDefault(); - } - /** - * Installs pading update. - */ - updateInstall() { - ipcRenderer.send('install-update'); - } - - notifyError(message) { - const toast = this.shadowRoot.querySelector('#errorToast'); - toast.text = message; - toast.opened = true; - } - /** - * Handler for `popup-menu`. Sends command to the IO process. - * IO process informs windows to hide the menu. - * @param {CustomEvent} e - */ - _popupMenuHandler(e) { - const { type } = e.detail; - let sizing; - const menu = this.shadowRoot.querySelector('arc-menu'); - if (menu) { - const rect = menu.getBoundingClientRect(); - sizing = { - height: rect.height, - width: rect.width - }; - } - ipcRenderer.send('popup-app-menu', type, sizing); - } - - processExternalFile(file) { - if (!file) { - throw new Error('"file" argument is required.'); - } - } - /** - * Opens onboarding element. - */ - openOnboarding() { - const node = this.shadowRoot.querySelector('arc-onboarding'); - node.opened = true; - } - - async _setupApiConsole(params) { - if (!params) { - return; - } - const { id, version } = params; - if (!id) { - return; - } - try { - await this._loadApic(); - // this.apiSelected = undefined; - // this.apiSelectedType = undefined; - this.isApiConsole = true; - await this.apic.open(id, version); - this.apiSelected = 'summary'; - this.apiSelectedType = 'summary'; - } catch (e) { - this.apiProcessing = false; - this.isApiConsole = false; - this.notifyError(e.message); - } - } - - async _loadApic() { - try { - this.page = 'api-console'; - await import('./apic-electron/apic-electron.js'); - this._loadingSources = false; - } catch (cause) { - this._loadingSources = false; - this._reportComponentLoadingError('apic-electron'); - throw cause; - } - } - - async _setApiData(api, type) { - await this._loadApic(); - const apic = this.apic; - apic.unresolvedAmf = api; - apic.apiType = type; - this.isApiConsole = (true); - this.apiSelected = undefined; - this.apiSelectedType = undefined; - setTimeout(() => { - this.apiSelected = 'summary'; - this.apiSelectedType = 'summary'; - }); - } - - async _exchangeAssetHandler(e) { - if (e.defaultPrevented) { - return; - } - e.preventDefault(); - const asset = e.detail; - let file; - const types = ['fat-raml', 'raml', 'oas']; - for (let i = 0, len = asset.files.length; i < len; i++) { - if (types.indexOf(asset.files[i].classifier) !== -1) { - file = asset.files[i]; - break; - } - } - if (!file || !file.externalLink) { - this.notifyError('RAML data not found in the asset.'); - return; - } - try { - await this._loadApic(); - const e = this._dispatchExchangeApiEvent(file); - if (!e.defaultPrevented) { - this.notifyError('API data processor not found.'); - return; - } - this.isApiConsole = true; - this.apiProcessing = true; - this._dispatchNavigate({ - base: 'api-console' - }); - const api = await e.detail.result; - this._setApiData(api.model, api.type.type); - } catch (cause) { - this.notifyError(cause.message); - } - } - - _dispatchExchangeApiEvent(file) { - const e = new CustomEvent('api-process-link', { - bubbles: true, - composed: true, - cancelable: true, - detail: { - url: file.externalLink, - mainFile: file.mainFile, - md5: file.md5, - packaging: file.packaging - } - }); - this.dispatchEvent(e); - return e; - } - - _apiVersionMenuChanged(e) { - const { value } = e.detail; - if (!value) { - return; - } - const id = this.apiInfo._id; - const params = { - id, - version: value - }; - this._setupApiConsole(params); - } - - /** - * Closes API console view - */ - closeApiConsole() { - this.isApiConsole = (false); - this.page = 'exchange-search'; - } - - /** - * Handler for the "back" icon click in main navigation. - */ - _backHandler() { - if (this.isApiConsole) { - this.isApiConsole = false; - } - super._backHandler(); - } - /** - * Saves current API. - */ - saveApi() { - this.apic.save(); - } - - async _apiActionMenuChanged(e) { - const selected = e.detail.value; - if (selected === undefined || selected === -1) { - return; - } - const { target } = e; - const item = target.selectedItem; - const action = item.dataset.action; - const apic = this.apic; - switch (action) { - case 'delete': - await apic.delete(); - break; - case 'delete-version': - await apic.deleteVersion(this.apiVersion); - break; - case 'save-oas': - apic.saveAs('oas'); - break; - case 'save-raml': - apic.saveAs('raml'); - break; - case 'upload-exchange': - this.log.info('Not yet supported.'); - break; - } - target.selected = undefined; - } - - _exchangeTokenHandler(e) { - e.detail.clientSecret = '5d02cE95028E4Dc08A40907a0A4883fC'; - } - - _apiPropertyHandler(e) { - const { value } = e.detail; - switch (e.type) { - case 'apiprocessing-changed': - this.apiProcessing = value; - break; - case 'apiversion-changed': - this.apiVersion = value; - break; - case 'apiinfo-changed': - this.apiInfo = value; - break; - case 'versions-changed': - this.apiVersions = value; - break; - case 'multiversion-changed': - this.apiMultiVersionVersion = value; - break; - case 'saved-changed': - this.apiIsSaved = value; - break; - case 'cansave-changed': - this.canSaveApi = value; - break; - case 'versionsaved-changed': - this.apiVersionSaved = value; - break; - } - this.requestUpdate(); - } - /** - * Initialized the tutorial if needed. - */ - async initTutorial() { - /* global versionInfo */ - const major = versionInfo.appVersion.split('.')[0]; - const cnf = this.config; - const passed = cnf.finishedOnboarding || []; - if (passed.indexOf(major) !== -1) { - return; - } - try { - await this._loadComponent('arc-onboarding/arc-onboarding', '@advanced-rest-client'); - } catch (cmp) { - this.log.error(`Unable to load ${cmp}`); - return; - } - const element = document.createElement('arc-onboarding'); - element.addEventListener('tutorial-close', this._finalizeTutorial.bind(this)); - element.dataset.major = major; - document.body.appendChild(element); - element.opened = true; - } - - _finalizeTutorial(e) { - const cnf = this.config; - const passed = cnf.finishedOnboarding || []; - passed.push(e.target.dataset.major); - const ev = new CustomEvent('settings-changed', { - bubbles: true, - composed: true, - cancelable: true, - detail: { - name: 'finishedOnboarding', - value: passed - } - }); - this.dispatchEvent(ev); - } - - _activeThemeHandler(e) { - if (e.detail === 'advanced-rest-client/arc-electron-anypoint-theme') { - if (!this.compatibility) { - this.compatibility = true; - } - } else { - if (this.compatibility) { - this.compatibility = false; - } - } - } - - async _apiDataHandler(e) { - const { model, type } = e.detail; - await this._setApiData(model, type.type); - this._dispatchNavigate({ - base: 'api-console' - }); - } - - _platformHelpersTemplate() { - return html` - ${this.importExportTemplate({ electron: true })} - ${this.appMessagesLogicTemplate('electron')} - `; - } - - /** - * Opens cliet cetrificates panel by setting `page` to `client-certificates`. - */ - openClientCertificates() { - this.page = 'client-certificates'; - } - - _certCcImportHandler() { - this.ccImportOpened = true; - } - - _closeCcImportHandler() { - this.ccImportOpened = false; - } - - render() { - return html` - ${this.applicationTemplate()} - ${this.apiCandidatedViewTemplate()} - ${this._ccImportDialogTemplate()} - - - `; - } - - _pageTemplate() { - const { - page - } = this; - - switch (page) { - case 'settings': return this.settingsViewTemplate({ hasExperiments: true, restApis: true }); - case 'about': return this.aboutViewTemplate(); - case 'api-console': return this.apicViewTemplate(); - case 'exchange-search': return this.exchangeViewTemplate(); - case 'rest-projects': return this.restApisViewTemplate({ explore: true }); - case 'hosts-rules': return this.hostsViewTemplate(); - case 'themes-panel': return this.themesViewTemplate(); - case 'client-certificates': return this.clientCertificatesTemplate(); - default: return super._pageTemplate(); - } - } - - aboutViewTemplate() { - const { - compatibility, - outlined - } = this; - return html` - `; - } - - apicViewTemplate() { - const { - compatibility, - outlined, - _oauth2redirectUri, - apiSelected, - apiSelectedType, - narrow, - _scrollTarget - } = this; - return html` - `; - } - - exchangeViewTemplate() { - const { - compatibility, - outlined, - _scrollTarget - } = this; - return html``; - } - - hostsViewTemplate() { - const { - compatibility, - outlined - } = this; - return html``; - } - - themesViewTemplate() { - const { - compatibility, - outlined - } = this; - return html``; - } - - requestLogicTemplate() { - const config = this.config || {}; - return html` - ${super.requestLogicTemplate()} - `; - } - - _appToolbarEnvTemplate() { - if (this.isApiConsole) { - return this._apiConsoleToolbarTemplate(); - } - return super._appToolbarEnvTemplate(); - } - - _apiConsoleToolbarTemplate() { - const { - apiIsSaved, - canSaveApi, - apiMultiVersionVersion, - apiVersionSaved, - compatibility, - outlined - } = this; - const renderSave = !apiIsSaved && !!canSaveApi; - const renderMultiVersion = !!apiIsSaved && !!apiMultiVersionVersion; - const apiVersions = this.apiVersions || []; - const renderSaveVersion = !!canSaveApi && !renderSave && !apiVersionSaved; - return html` - ${renderSave ? html` - Save API - ` : ''} - ${renderMultiVersion ? html` - - - - ${apiVersions.map((item) => html` - ${item} - `)} - - ` : ''} - ${renderSaveVersion ? html` - Save API version - ` : ''} - ${apiIsSaved ? html` - - - ${moreVert} - - - Delete API - ${apiMultiVersionVersion ? html` - Delete version - ` : ''} - - - - ` : ''} - `; - } - - menuTemplate() { - if (this.isApiConsole) { - return this.apicNavigationTemplate(); - } - return super.menuTemplate(); - } - - apicNavigationTemplate() { - const { - compatibility, - apiProcessing, - apiSelected, - apiSelectedType - } = this; - return html`
- - ${apiProcessing ? html`
-

Loading the API

-
` : ''} - -
`; - } - - apiCandidatedViewTemplate(opts={}) { - const { compatibility } = this; - return html``; - } - - clientCertificatesTemplate() { - return html``; - } - - _ccImportDialogTemplate() { - const { ccImportOpened } = this; - return html` - -

Import a certificate

- - - -
- `; - } -} -window.customElements.define('arc-electron', ArcElectron); diff --git a/src/arc-menu-window/app-menu-preload.js b/src/arc-menu-window/app-menu-preload.js deleted file mode 100644 index 7834b145..00000000 --- a/src/arc-menu-window/app-menu-preload.js +++ /dev/null @@ -1,8 +0,0 @@ -const { ipcRenderer: ipc } = require('electron'); -const { ThemeManager } = require('../../scripts/packages/themes-manager/renderer'); -const { ArcPreferencesProxy } = require('../../scripts/packages/arc-preferences/renderer'); -process.once('loaded', () => { - global.ipc = ipc; - global.ThemeManager = ThemeManager; - global.ArcPreferencesProxy = ArcPreferencesProxy; -}); diff --git a/src/arc-menu-window/arc-menu-window.html b/src/arc-menu-window/arc-menu-window.html deleted file mode 100644 index ee35c222..00000000 --- a/src/arc-menu-window/arc-menu-window.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - Advanced REST client - - - - - - - - - - - - - - diff --git a/src/arc-menu-window/arc-menu-window.js b/src/arc-menu-window/arc-menu-window.js deleted file mode 100644 index 372375f7..00000000 --- a/src/arc-menu-window/arc-menu-window.js +++ /dev/null @@ -1,3 +0,0 @@ -import '../../web_modules/@advanced-rest-client/arc-menu/arc-menu.js'; -import PouchDB from '../../web_modules/pouchdb/dist/pouchdb.js'; -window.PouchDB = PouchDB; diff --git a/src/arc-task-manager/arc-task-manager.html b/src/arc-task-manager/arc-task-manager.html deleted file mode 100644 index c294412e..00000000 --- a/src/arc-task-manager/arc-task-manager.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - Task manager - Advanced REST client - - - - - - - - - diff --git a/src/arc-task-manager/arc-task-manager.js b/src/arc-task-manager/arc-task-manager.js deleted file mode 100644 index a2aaca75..00000000 --- a/src/arc-task-manager/arc-task-manager.js +++ /dev/null @@ -1,477 +0,0 @@ -import { LitElement, html, css } from '../../web_modules/lit-element/lit-element.js'; -import '../../web_modules/@polymer/font-roboto-local/roboto.js'; -import { arrowDropDown, arrowDropUp } from - '../../web_modules/@advanced-rest-client/arc-icons/ArcIcons.js'; -import '../../web_modules/@anypoint-web-components/anypoint-item/anypoint-item.js'; -import { repeat } from '../../web_modules/lit-html/directives/repeat.js'; - -/* global appProcess, BrowserWindow, app */ -/** - * @customElement - * @polymer - * @demo demo/index.html - * @memberof ApiElements - */ -class ArcTaskManager extends LitElement { - static get styles() { - return css` - :host { - display: block; - background-color: #fff; - overflow: auto; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - font-size: 14px; - } - - .title { - flex: 1; - } - - .pid, - .cpu-usage, - .memory-working-size, - .memory-private-size, - .memory-shared-size { - padding-left: 8px; - padding-right: 8px; - text-align: right; - -webkit-user-select: text; - user-select: text; - } - - .cpu-usage { - width: 60px; - } - - .pid { - width: 60px; - } - - .memory-working-size, - .memory-private-size, - .memory-shared-size { - width: 90px; - } - - .th { - font-weight: 500; - display: flex; - flex-direction: row; - align-items: center; - height: 48px; - padding: 0 16px; - font-size: 13px; - } - - .th > div { - display: flex; - flex-direction: row; - align-items: center; - justify-content: flex-end; - cursor: pointer; - -webkit-user-select: none; - user-select: none; - } - - .th > div.title { - justify-content: flex-start; - } - - .th .label { - display: block; - height: 23px; - } - - div[ordered] { - /* padding-right: 0px; */ - } - - .icon { - width: 24px; - height: 24px; - display: inline-block; - fill: currentColor; - } - `; - } - - render() { - const { - orderTitle, - orderPid, - orderCpu, - orderMemWorkingSize, - orderMemPrivateSize, - orderDirection, - orderMemSharedSize - } = this; - return html` -
- ${this._columTemplate('title', 'title', 'Process', orderTitle, orderDirection)} - ${this._columTemplate('pid', 'pid', 'Pid', orderPid, orderDirection)} - ${this._columTemplate('cpu-usage', 'cpu-usage', 'CPU', orderCpu, orderDirection)} - ${this._columTemplate('memory-working-size', 'memory-working', 'Memory', orderMemWorkingSize, orderDirection)} - ${this._columTemplate('memory-private-size', 'memory-private', 'Private memory', - orderMemPrivateSize, orderDirection)} - ${this._columTemplate('memory-shared-size', 'memory-shared', 'Shared memory', orderMemSharedSize, orderDirection)} -
- ${this._itemsTemplate()}`; - } - - _columTemplate(cls, prop, label, ordered, dir) { - const icon = dir === 'asc' ? arrowDropDown : arrowDropUp; - return html`
- ${label} - ${ordered ? html`${icon}` : ''} -
`; - } - - _itemsTemplate() { - const items = this.items || []; - return html` - ${repeat(items, (i) => i.pid, (item) => html` - -
${item.title}
-
${item.pid}
-
${item.cpu.usage}
-
${item.memory.workingSetSize}
-
${item.memory.privateBytes}
-
${item.memory.sharedBytes}
-
- `)} - `; - } - - static get properties() { - return { - // List of items to display in the table. - items: { type: Array }, - // True if the window is active. - active: { type: Boolean }, - // True if ordering by title is enabled - orderTitle: { type: Boolean }, - // True if ordering by pid is enabled - orderPid: { type: Boolean }, - // True if ordering by cpu is enabled - orderCpu: { type: Boolean }, - // True if ordering by memory working size is enabled - orderMemWorkingSize: { type: Boolean }, - // True if ordering by memory private size is enabled - orderMemPrivateSize: { type: Boolean }, - // True if ordering by memory shared size is enabled - orderMemSharedSize: { type: Boolean }, - // Order direction. `acs` or `desc`. - orderDirection: { - type: String, - value: 'asc' - }, - // Order property name - orderProperty: { type: String }, - mainId: { type: Number }, - thisPid: { type: Number } - }; - } - - connectedCallback() { - if (super.connectedCallback) { - super.connectedCallback(); - } - this.active = true; - setTimeout(() => { - this.setupGlobalVariables(); - this.refresh(); - }); - this.loadTheme(); - } - - disconnectedCallback() { - if (super.disconnectedCallback) { - super.disconnectedCallback(); - } - this.active = false; - } - - /** - * Loads bar components. - * - * @return {Promise} - */ - async loadTheme() { - /* global ThemeManager */ - const mgr = new ThemeManager(); - await mgr.loadTheme('advanced-rest-client/arc-electron-default-theme'); - } - - setupGlobalVariables() { - this.mainId = appProcess.pid; - this.thisPid = appProcess.pid; - } - - refresh() { - if (!this.active) { - return; - } - let metrics = app.getAppMetrics(); - metrics = this.translateMetrics(metrics); - metrics.sort(this._sortItems.bind(this)); - this.items = metrics; - setTimeout(() => this.refresh(), 2000); - } - - /** - * Translates electron app metrics into the data model. - * - * @param {Array} metrics List of current metrics - * @return {Array} Internal data model. - */ - translateMetrics(metrics) { - const result = metrics.map((metric) => { - const cpu = this.translateCpuMetrics(metric.cpu); - let memory; - // https://github.com/electron/electron/issues/16179 - if (metric.memory) { - memory = this.translateMemoryMetrics(metric.memory); - } else { - memory = this._emptyMemoryInfo(); - } - const title = this.translateMetricTitle(metric.type, metric.pid); - return { - pid: metric.pid, - memory, - cpu, - title - }; - }); - return result; - } - /** - * Translates `type` property of the metric to a title to display - * @param {String} type Metric type value - * @param {Number} pid OS process id - * @return {String} Title related to the type. - */ - translateMetricTitle(type, pid) { - if (this.mainId === pid) { - return 'Application main thread'; - } - if (this.thisPid === pid) { - return 'Task manager'; - } - const windows = BrowserWindow.getAllWindows(); - for (let i = 0; i < windows.length; i++) { - if (windows[i].webContents.getOSProcessId() === pid) { - const title = windows[i].getTitle(); - if (title) { - return title; - } - } - } - switch (type) { - case 'Tab': return 'Application window'; - case 'Browser': return 'Application'; - default: return type; - } - } - /** - * Creates a data model for the CPU usage. - * - * @param {Object} cpu CPU metric - * @return {Object} Data model for CPU metrics - */ - translateCpuMetrics(cpu) { - return { - usage: Math.round(cpu.percentCPUUsage), - usageCompare: cpu.percentCPUUsage - // wakeups: cpu.idleWakeupsPerSecond - }; - } - /** - * Creates a data model for memory usage metrics - * - * @param {Object} memory Memory metric - * @return {Object} Memory usage metrics - */ - translateMemoryMetrics(memory) { - return { - // peak: peakWorkingSetSize - workingSetSize: this.computeBytes(memory.workingSetSize), - workingSetSizeCompare: memory.workingSetSize, - privateBytes: this.computeBytes(memory.privateBytes), - privateBytesCompare: memory.privateBytes, - sharedBytes: this.computeBytes(memory.sharedBytes), - sharedBytesCompare: memory.sharedBytes - }; - } - - _emptyMemoryInfo() { - return { - workingSetSize: 'unknown', - workingSetSizeCompare: 0, - privateBytes: 'unknown', - privateBytesCompare: 0, - sharedBytes: 'unknown', - sharedBytesCompare: 0 - }; - } - /** - * Computes readable value of bytes usage. - * https://stackoverflow.com/a/18650828/1127848 - * - * @param {Number} bytes Number of bytes - * @param {String} decimals Decimal number - * @return {String} Size label - */ - computeBytes(bytes, decimals) { - if (!bytes) { - return '0 B'; - } - const k = 1024; - const dm = decimals || 2; - const sizes = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; - const i = Math.floor(Math.log(bytes) / Math.log(k)); - return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; - } - - _computeOrderIcon(direction) { - return direction === 'asc' ? 'arc:arrow-drop-down' : 'arc:arrow-drop-up'; - } - - _changeOrder(e) { - const target = e.currentTarget; - const property = target.dataset.orderProperty; - if (property === this.orderProperty) { - this.toggleOrder(); - this._sort(); - return; - } - this._cancelOrderProperty(); - switch (property) { - case 'title': - this.orderTitle = true; - break; - case 'pid': - this.orderPid = true; - break; - case 'cpu-usage': - this.orderCpu = true; - break; - case 'memory-shared': - this.orderMemSharedSize = true; - break; - case 'memory-private': - this.orderMemPrivateSize = true; - break; - case 'memory-working': - this.orderMemWorkingSize = true; - break; - } - this.orderProperty = property; - this._sort(); - } - - _sort() { - const items = this.items || []; - items.sort(this._sortItems.bind(this)); - this.items = items; - } - - _cancelOrderProperty() { - const prop = this.orderProperty; - switch (prop) { - case 'title': - this.orderTitle = false; - break; - case 'pid': - this.orderPid = false; - break; - case 'cpu-usage': - this.orderCpu = false; - break; - case 'memory-shared': - this.orderMemSharedSize = false; - break; - case 'memory-private': - this.orderMemPrivateSize = false; - break; - case 'memory-working': - this.orderMemWorkingSize = false; - break; - } - this.orderProperty = undefined; - } - - toggleOrder() { - this.orderDirection = this.orderDirection === 'asc' ? 'desc' : 'asc'; - } - - _sortItems(a, b) { - const prop = this.orderProperty; - switch (prop) { - case 'title': return this._sortTitle(a, b); - case 'pid': return this._sortPid(a, b); - case 'cpu-usage': return this._sortCpu(a, b); - case 'memory-shared': return this._sortMemory(a, b, 'sharedBytesCompare'); - case 'memory-private': return this._sortMemory(a, b, 'privateBytesCompare'); - case 'memory-working': return this._sortMemory(a, b, 'workingSetSizeCompare'); - } - } - - _sortTitle(a, b) { - const dir = this.orderDirection; - const result = a.title.localeCompare(b.title); - if (dir === 'desc') { - return -result; - } - return result; - } - - _sortPid(a, b) { - let result = 0; - if (a.pid > b.pid) { - result = -1; - } - if (a.pid < b.pid) { - result = 1; - } - if (result === 0) { - return result; - } - return this.orderDirection === 'asc' ? result : -result; - } - - _sortCpu(a, b) { - let result = 0; - if (a.cpu.usageCompare > b.cpu.usageCompare) { - result = -1; - } - if (a.cpu.usageCompare < b.cpu.usageCompare) { - result = 1; - } - if (result === 0) { - return result; - } - return this.orderDirection === 'asc' ? result : -result; - } - - _sortMemory(a, b, property) { - let result = 0; - const aValue = a.memory[property]; - const bValue = b.memory[property]; - - if (aValue > bValue) { - result = -1; - } - if (aValue < bValue) { - result = 1; - } - if (result === 0) { - return result; - } - return this.orderDirection === 'asc' ? result : -result; - } -} -window.customElements.define('arc-task-manager', ArcTaskManager); diff --git a/src/arc-task-manager/task-manager-preload.js b/src/arc-task-manager/task-manager-preload.js deleted file mode 100644 index fb7132bd..00000000 --- a/src/arc-task-manager/task-manager-preload.js +++ /dev/null @@ -1,17 +0,0 @@ -const { app, BrowserWindow, process } = require('electron').remote; -const { ThemeManager } = require('../../scripts/packages/themes-manager/renderer'); -/* -Normally it would require to use `process.once('loaded')` to pass the global variables. -However, the task manager window is not intend to run as the first window. -Because of that, when the manager is triggered, the process is already loaded -and it is safe to set up global variables right away. -*/ - -global.app = { - getAppMetrics: () => app.getAppMetrics() -}; -global.BrowserWindow = BrowserWindow; -global.appProcess = { - pid: process.pid -}; -global.ThemeManager = ThemeManager; diff --git a/src/common/ArcPreferences.js b/src/common/ArcPreferences.js new file mode 100644 index 00000000..9a90c04a --- /dev/null +++ b/src/common/ArcPreferences.js @@ -0,0 +1,126 @@ +import { EventEmitter } from 'events'; +import fs from 'fs-extra'; +import log from 'electron-log'; + +export class ArcPreferences extends EventEmitter { + /** + * The current settings + * @type {any} + */ + #settings = undefined; + + /** + * @returns {any=} Prefer to call `load()` to read the data. + * This should be used when the data has been already read. + */ + get data() { + return this.#settings; + } + + /** + * @constructor + * + * @param {string} file The settings file name + */ + constructor(file) { + super(); + /** + * Full path to the preferences file where the data is stored. + * @type {String} + */ + this.settingsFile = file; + } + + /** + * Ensures that the file exists and reads it's content as JSON. + * + * @param {string} file Path to the file + * @return {Promise} Promise resolved to file content or empty object. + */ + async restoreFile(file) { + await fs.ensureFile(file); + return fs.readJson(file, { throws: false }); + } + + /** + * Stores JSON `data` in `file`. + * + * @param {string} file Path to a file. + * @param {object} data JavaScript object to store. + * @return {Promise} Promise resolved when the `file` is updated. + */ + async storeFile(file, data) { + await fs.outputJson(file, data); + } + + /** + * Loads current settings from settings file. + * + * @return {Promise} Promise resolved to a settings file. + */ + async load() { + if (this.#settings) { + return this.#settings; + } + try { + const data = await this.restoreFile(this.settingsFile); + return this.processSettings(data); + } catch (e) { + log.warn(e); + return this.processSettings(); + } + } + + /** + * Processes data from settings file. Creates default settings if settings + * file do not exists. + * + * @param {object=} data Settings read from the settings file. May be empty + * @return {Promise} Settings for the app. + */ + async processSettings(data) { + if (!data || !Object.keys(data).length) { + const settings = await this.defaultSettings(); + this.#settings = settings; + await this.store(); + return settings; + } + this.#settings = data; + return data; + } + + /** + * @returns {Promise} Sets the default settings object + */ + async defaultSettings() { + return {}; + } + + /** + * Stores current settings to file. + * + * @return {Promise} Promise resolved when the settings are stored. + */ + async store() { + await this.storeFile(this.settingsFile, this.#settings); + } + + /** + * Updates the value by path in the settings object + * @param {any} settings + * @param {string} path The path to the data + * @param {any} value The value to set. + */ + updateValue(settings, path, value) { + const parts = path.split('.'); + const last = parts.pop(); + let current = settings; + parts.forEach((part) => { + if (!current[part]) { + current[part] = {}; + } + current = current[part]; + }); + current[last] = value; + } +} diff --git a/src/electron-http-transport/electron-http-transport.js b/src/electron-http-transport/electron-http-transport.js deleted file mode 100644 index bff1dd4c..00000000 --- a/src/electron-http-transport/electron-http-transport.js +++ /dev/null @@ -1,617 +0,0 @@ -/** - * `electron-http-transport` - * - * A web comonent to work with @advanced-rest-client/electron-request - * node package in web components environment - * - * @customElement - * @memberof LogicElements - */ -class ElectronHttpTransport extends HTMLElement { - /* global SocketRequest, ElectronRequest */ - get requestTimeout() { - const rt = this.getAttribute('requesttimeout'); - if (!rt || isNaN(rt)) { - return null; - } - return Number(rt); - } - - set requestTimeout(value) { - if (!value) { - this.removeAttribute('requesttimeout'); - } else { - this.setAttribute('requesttimeout', value); - } - } - - get nativeTransport() { - return this.hasAttribute('nativetransport'); - } - - set nativeTransport(value) { - if (!value) { - this.removeAttribute('native-transport'); - } else { - this.setAttribute('native-transport', ''); - } - } - - get validateCertificates() { - return this.hasAttribute('validatecertificates'); - } - /** - * When set it validates certificates during request. - * @param {Boolean} value - */ - set validateCertificates(value) { - if (!value) { - this.removeAttribute('validatecertificates'); - } else { - this.setAttribute('validatecertificates', ''); - } - } - /** - * When not set the request object won't follow redirects. - * @param {Boolean} value - */ - set followRedirects(value) { - if (!value) { - this.removeAttribute('followredirects'); - } else { - this.setAttribute('followredirects', ''); - } - } - - get followRedirects() { - return this.hasAttribute('followredirects'); - } - /** - * When set the HTTP client adds default headers, like cURL does - * @param {Boolean} value - */ - set defaultHeaders(value) { - if (!value) { - this.removeAttribute('defaultheaders'); - } else { - this.setAttribute('defaultheaders', ''); - } - } - - get defaultHeaders() { - return this.hasAttribute('defaultheaders'); - } - /** - * A limit of characters to include into the `sentHttpMessage` property - * of the request object. 0 to disable limit. Default to 2048. - * @param {Number} value - */ - set sentMessageLimit(value) { - if (!value) { - this.removeAttribute('sentmessagelimit'); - } else { - this.setAttribute('sentmessagelimit', value); - } - } - - get sentMessageLimit() { - const v = this.getAttribute('sentmessagelimit'); - if (!v || isNaN(v)) { - return undefined; - } - return Number(v); - } - - constructor() { - super(); - // Socket handlers - this._loadStartHandler = this._loadStartHandler.bind(this); - this._firstByteHandler = this._firstByteHandler.bind(this); - this._loadEndHandler = this._loadEndHandler.bind(this); - this._beforeRedirectHandler = this._beforeRedirectHandler.bind(this); - this._headersReceivedHandler = this._headersReceivedHandler.bind(this); - this._loadHandler = this._loadHandler.bind(this); - this._errorHandler = this._errorHandler.bind(this); - // Host data handlers - this._ruleUpdated = this._ruleUpdated.bind(this); - this._ruleDeleted = this._ruleDeleted.bind(this); - // Transport control - this._onTransportRequested = this._onTransportRequested.bind(this); - this._abortHandler = this._abortHandler.bind(this); - // Local properties - this._connections = {}; - } - - connectedCallback() { - document.body.addEventListener('transport-request', this._onTransportRequested); - document.body.addEventListener('abort-api-request', this._abortHandler); - window.addEventListener('host-rules-changed', this._ruleUpdated); - window.addEventListener('host-rules-deleted', this._ruleDeleted); - } - - disconnectedCallback() { - document.body.removeEventListener('transport-request', this._onTransportRequested); - document.body.removeEventListener('abort-api-request', this._abortHandler); - window.addEventListener('host-rules-changed', this._ruleUpdated); - window.addEventListener('host-rules-deleted', this._ruleDeleted); - } - - _abortHandler(e) { - const id = e.detail.id; - const info = this._connections[id]; - if (!info) { - return; - } - e.preventDefault(); - info.connection.abort(); - info.aborted = true; - } - - _onTransportRequested(e) { - if (e.defaultPrevented) { - return; - } - e.preventDefault(); - e.stopPropagation(); - this.run(e.detail); - } - /** - * Runs the request with Electron's `SocketRequest` class. - * @param {Object} request ARC request object - * @param {?Object} opts Additional request options: - * - timeout {Number} - Timeout in milliseconds - * - followRedirects {Boolean} Note, as of ARC 13 this object is part of - * the request object under `config` property. - * @return {Promise} A promise when the request is started with the socket - * library - */ - async run(request, opts) { - opts = opts ? Object.assign({}, opts) : {}; - request = Object.assign({}, request); - if (request.config) { - request.config = Object.assign({}, request.config); - } - opts = this._prepareRequestOptions(request, opts); - try { - const hosts = await this._readHosts(); - /* eslint-disable-next-line require-atomic-updates */ - opts.hosts = hosts; - const connection = await this._prepareRequest(request, opts); - return await this._makeConnection(connection); - } catch (cause) { - this._errorHandler(cause, request.id); - } - } - - _prepareRequestOptions(request, opts) { - let rConfig; - if (request.config && request.config.enabled !== false) { - rConfig = Object.assign(request.config); - delete rConfig.enabled; - } else { - rConfig = {}; - } - opts = Object.assign({}, opts || {}); - opts = Object.assign(rConfig, opts); - if (typeof opts.timeout === 'undefined') { - const time = this.requestTimeout; - if (time) { - opts.timeout = time; - } - } - if (opts.timeout) { - opts.timeout = Number(opts.timeout) * 1000; - } else { - opts.timeout = 0; - } - if (!opts.validateCertificates) { - opts.validateCertificates = this.validateCertificates; - } - if (typeof opts.followRedirects === 'undefined') { - opts.followRedirects = this.followRedirects; - } - if (typeof opts.defaultHeaders === 'undefined') { - opts.defaultHeaders = this.defaultHeaders; - } - if (typeof opts.sentMessageLimit === 'undefined') { - opts.sentMessageLimit = this.sentMessageLimit; - } - if (opts.sentMessageLimit) { - opts.sentMessageLimit = Number(opts.sentMessageLimit); - } - if (request.clientCertificate) { - opts.clientCertificate = request.clientCertificate; - } - return opts; - } - /** - * Reads application hosts configuration and returns it. - * It returns empty array of hosts couldn't be read. - * @return {Promise} - */ - async _readHosts() { - if (this.hosts !== undefined) { - return this.hosts; - } - const e = new CustomEvent('host-rules-list', { - bubbles: true, - composed: true, - cancelable: true, - detail: {} - }); - this.dispatchEvent(e); - if (!e.defaultPrevented) { - this.hosts = []; - return this.hosts; - } - const rules = await e.detail.result; - this.hosts = rules || []; - return rules; - } - - _isNative(opts) { - if (opts && typeof opts.nativeTransport === 'boolean') { - return opts.nativeTransport; - } - return this.nativeTransport; - } - - _prepareRequest(request, opts) { - return this._isNative(opts) ? - this._prepareNativeRequest(request, opts) : - this._prepareArcRequest(request, opts); - } - - _prepareArcRequest(request, opts) { - let conn; - // In ARC electron the browser window is created without node integration - // and therefore require is disabled. In tests node is enabled. - if (typeof SocketRequest === 'undefined') { - const { SocketRequest } = require('@advanced-rest-client/electron-request'); - conn = new SocketRequest(request, opts); - } else { - conn = new SocketRequest(request, opts); - } - this._connections[request.id] = { - connection: conn, - aborted: false - }; - conn.on('loadstart', this._loadStartHandler); - conn.on('firstbyte', this._firstByteHandler); - conn.on('loadend', this._loadEndHandler); - conn.on('beforeredirect', this._beforeRedirectHandler); - conn.on('headersreceived', this._headersReceivedHandler); - conn.on('load', this._loadHandler); - conn.on('error', this._errorHandler); - return conn; - } - - _prepareNativeRequest(request, opts) { - let conn; - // In ARC electron the browser window is created without node integration - // and therefore require is disabled. In tests node is enabled. - if (typeof ElectronRequest === 'undefined') { - const { ElectronRequest } = require('@advanced-rest-client/electron-request'); - conn = new ElectronRequest(request, opts); - } else { - conn = new ElectronRequest(request, opts); - } - this._connections[request.id] = { - connection: conn, - aborted: false - }; - conn.on('loadstart', this._loadStartHandler); - conn.on('firstbyte', this._firstByteHandler); - conn.on('loadend', this._loadEndHandler); - conn.on('beforeredirect', this._beforeRedirectHandler); - conn.on('headersreceived', this._headersReceivedHandler); - conn.on('load', this._loadHandler); - conn.on('error', this._errorHandler); - return conn; - } - - async _makeConnection(connection) { - try { - return await connection.send(); - } catch (cause) { - this._errorHandler(cause, connection.id); - } - } - - _removeConnectionHandlers(connection) { - connection.removeListener('loadstart', this._loadStartHandler); - connection.removeListener('firstbyte', this._firstByteHandler); - connection.removeListener('loadend', this._loadEndHandler); - connection.removeListener('beforeredirect', this._beforeRedirectHandler); - connection.removeListener('headersreceived', this._headersReceivedHandler); - connection.removeListener('load', this._loadHandler); - connection.removeListener('error', this._errorHandler); - } - - _informStatus(type, id) { - const info = this._connections[id]; - if (!info || info.aborted) { - return; - } - this.dispatchEvent(new CustomEvent(type, { - composed: true, - bubbles: true, - detail: { - id - } - })); - } - - _loadStartHandler(id) { - this._informStatus('request-load-start', id); - } - - _firstByteHandler(id) { - this._informStatus('request-first-byte-received', id); - } - - _loadEndHandler(id) { - this._informStatus('request-load-end', id); - } - - _beforeRedirectHandler(id, detail) { - const info = this._connections[id]; - if (!info || info.aborted) { - return; - } - const e = new CustomEvent('before-redirect', { - composed: true, - bubbles: true, - cancelable: true, - detail: { - id, - url: detail.location - } - }); - this.dispatchEvent(e); - if (e.defaultPrevented) { - detail.returnValue = false; - } - } - - _headersReceivedHandler(id, detail) { - const info = this._connections[id]; - if (!info || info.aborted) { - return; - } - const e = new CustomEvent('headers-received', { - composed: true, - bubbles: true, - cancelable: true, - detail: { - id, - value: detail.value - } - }); - this.dispatchEvent(e); - if (e.defaultPrevented) { - detail.returnValue = false; - } - } - - _loadHandler(id, response, request) { - const info = this._connections[id]; - if (!info || info.aborted) { - return; - } - this._removeConnectionHandlers(info.connection); - delete this._connections[id]; - this._processResponse(id, response, request); - } - - _errorHandler(cause, id, request, response) { - const info = this._connections[id]; - if (info) { - this._removeConnectionHandlers(info.connection); - delete this._connections[id]; - } - if (info && info.aborted) { - return; - } - if (!response) { - response = {}; - } - const data = Object.assign({}, response, { - isError: true, - error: cause - }); - this._processResponse(id, data, request); - } - /** - * Processes response data and creates ARC response object. - * @param {String} id Request ID - * @param {Object} data Response data - * @param {Object} requestInfo Request data - */ - _processResponse(id, data, requestInfo) { - const detail = { - isXhr: false, - request: requestInfo - }; - const redirects = this._processRedirects(data.redirects); - if (redirects.timings.length) { - detail.redirectsTiming = redirects.timings; - detail.redirects = redirects.redirects; - } - if (data.error && typeof data.error !== 'function') { - detail.isError = true; - detail.error = data.error; - } else { - const stats = this._cleanTimings(data.stats); - detail.isError = false; - detail.response = data; - detail.sentHttpMessage = data.sentHttpMessage; - detail.loadingTime = this._computeLoadingTime(stats); - detail.timing = stats; - detail.auth = data.auth; - delete detail.response.sentHttpMessage; - delete detail.request.sentHttpMessage; - } - detail.id = id; - this._beforeResponse(detail); - } - /** - * Processes redirects data from the socket library. - * @param {Set} set A set of redirects - * @return {Object} Map of arrays of timings and redirects information. - */ - _processRedirects(set) { - const result = { - timings: [], - redirects: [] - }; - if (!set) { - return result; - } - set.forEach((item) => { - result.redirects.push(item); - result.timings.push(item.stats); - delete item.stats; - }); - return result; - } - /** - * Computes a request / response loading time from the stats object - * @param {Objject} stats A stats property of the socket client response. - * @return {Number} A time to full response in miliseconds. 0 if stats unavailable. - */ - _computeLoadingTime(stats) { - if (!stats) { - return 0; - } - let value = 0; - if (stats.dns && stats.dns > 0) { - value += stats.dns; - } - if (stats.connect && stats.connect > 0) { - value += stats.connect; - } - if (stats.receive && stats.receive > 0) { - value += stats.receive; - } - if (stats.send && stats.send > 0) { - value += stats.send; - } - if (stats.ssl && stats.ssl > 0) { - value += stats.ssl; - } - if (stats.wait && stats.wait > 0) { - value += stats.wait; - } - return value; - } - /** - * Creates HAR 1.2 object from timing data - * @param {Object} stats - * @return {Object} - */ - _cleanTimings(stats) { - const result = { - dns: stats.dns || -1, - connect: stats.connect || -1, - receive: stats.receive || -1, - send: stats.send || -1, - ssl: stats.ssl || -1, - wait: stats.wait || -1 - }; - return result; - } - /** - * Dispatches `response-ready` event with request data. - * If the event is not caneled then it dispatches `report-response` - * event. - * - * @param {Object} detail The request detail - */ - _beforeResponse(detail) { - const e = new CustomEvent('response-ready', { - composed: true, - bubbles: true, - cancelable: true, - detail - }); - this.dispatchEvent(e); - if (e.defaultPrevented) { - return; - } - this._reportResponse(e.detail); - } - /** - * Fires the `report-response` custom event with immutable response data. - * @param {Object} detail The event detail object. - */ - _reportResponse(detail) { - detail = this._prepareTransportObject(detail); - const e = new CustomEvent('report-response', { - composed: true, - bubbles: true, - cancelable: false, - detail - }); - this.dispatchEvent(e); - } - /** - * Creates an immutable `detail` object for the `report-response` custom - * event. - * @param {Object} detail - * @return {Object} Immutable object. - */ - _prepareTransportObject(detail) { - const configuration = {}; - Object.keys(detail).forEach((key) => { - configuration[key] = { - value: detail[key], - writable: false, - enumerable: true - }; - }); - return Object.create(Object.prototype, configuration); - } - /** - * Updates a rule from the `host-rules-changed` custom event. - * The event should contain `rule` property on the event's detail object - * containing the rule object. - * @param {CustomEvent} e - */ - _ruleUpdated(e) { - if (e.cancelable || !this.hosts) { - // Don't update rules if there's no local hosts array. Let the component - // ask for all rules first. - return; - } - const updatedValue = e.detail.rule; - const index = this.hosts.findIndex((item) => item._id === updatedValue._id); - if (index === -1) { - this.hosts.push(updatedValue); - } else { - this.hosts[index] = updatedValue; - } - } - /** - * Deletes the rule from the `host-rules-deleted` custom event. - * The event should contain `rule` property on the event's detail object - * containing the rule object. - * - * @param {CustomEvent} e - */ - _ruleDeleted(e) { - if (e.cancelable) { - return; - } - if (!this.hosts || !this.hosts.length) { - return; - } - const id = e.detail.id; - const index = this.hosts.findIndex((item) => item._id === id); - if (index === -1) { - return; - } - this.hosts.splice(index, 1); - } -} -window.customElements.define('electron-http-transport', ElectronHttpTransport); diff --git a/src/io/AppPrompts.js b/src/io/AppPrompts.js new file mode 100644 index 00000000..14c279b0 --- /dev/null +++ b/src/io/AppPrompts.js @@ -0,0 +1,119 @@ +import { dialog, ipcMain, BrowserWindow } from 'electron'; +import { logger } from './Logger.js'; + +const saveDialogHandler = Symbol('saveDialogHandler'); +const openDialogHandler = Symbol('openDialogHandler'); + +/** + * Class responsible for displaying system dialogs and + * to sends back results to the sender. + */ +export class AppPrompts { + /** + * Listens for the application events. + */ + listen() { + ipcMain.handle('save-dialog', this[saveDialogHandler].bind(this)); + ipcMain.handle('open-dialog', this[openDialogHandler].bind(this)); + } + + /** + * Handles save action dialog. Opens "save as..." dialog and returns the result to the app. + * + * @param {Event} e Event emitted by the BrowserWindow + * @param {Object} args Prompt dialog options: + * - file {String} - File name to suggest to the user. + * @return {Promise} + */ + [saveDialogHandler](e, args={}) { + logger.debug('Save dialog requested', args); + const options = { + title: 'Save to file' + }; + if (args.file) { + options.defaultPath = args.file; + } + return dialog.showSaveDialog(options); + } + + /** + * Handles open file action. Opens file picker dialog and returns the result to the app. + * + * @param {Electron.IpcMainInvokeEvent} e + * @returns {Promise} + */ + async [openDialogHandler](e) { + const win = BrowserWindow.fromWebContents(e.sender); + logger.debug('Opening file open dialog.'); + return dialog.showOpenDialog(win, { + title: 'Select file to open', + buttonLabel: 'Open', + properties: ['openFile'], + filters: [ + { name: 'All supported files', extensions: ['arc', 'json', 'raml', 'yaml', 'zip'] } + ] + }); + } + + /** + * A dialog that renders error message about missing workspace file. + * @param {String} file Requested workspace file location. + * @return {Promise} + */ + static async workspaceMissing(file) { + let message = 'Workspace file cannot be located. Probably it was deleted or'; + message += ' renamed.\n\n'; + message += `Requested file: ${file}`; + return dialog.showMessageBox({ + type: 'error', + message + }); + } + + /** + * Opens a dialog to open a file and notifies the window about new content. + * + * @param {Electron.BrowserWindow} bWindow + * @returns {Promise} + */ + static async openAssetDialog(bWindow) { + logger.debug('Opening file import dialog.'); + const result = await dialog.showOpenDialog(bWindow, { + title: 'Select file to import', + buttonLabel: 'Import', + properties: ['openFile'], + filters: [ + { name: 'All supported files', extensions: ['arc', 'json', 'raml', 'yaml', 'zip'] } + ] + }); + const { filePaths, canceled } = result; + if (canceled) { + logger.debug('Import dialog was canceled.'); + return; + } + logger.debug(`Sending file path to open in UI thread: ${filePaths[0]}`); + bWindow.webContents.send('command', 'process-external-file', filePaths[0]); + } + + /** + * @param {Electron.BrowserWindow} bWindow + * @returns {Promise} + */ + static async openWorkspaceFile(bWindow) { + logger.debug('Opening workspace import dialog.'); + const result = await dialog.showOpenDialog(bWindow, { + title: 'Select workspace file to open', + buttonLabel: 'Open', + properties: ['openFile'], + filters: [ + { name: 'All supported files', extensions: ['arc', 'json'] } + ] + }); + const { filePaths, canceled } = result; + if (canceled) { + logger.debug('Import dialog was canceled.'); + return undefined; + } + return filePaths[0]; + } +} diff --git a/src/io/AppStateManager.js b/src/io/AppStateManager.js new file mode 100644 index 00000000..4f791944 --- /dev/null +++ b/src/io/AppStateManager.js @@ -0,0 +1,77 @@ +import { ipcMain } from 'electron'; +import log from 'electron-log'; +import { ArcPreferences } from "../common/ArcPreferences.js"; + +/** @typedef {import('@advanced-rest-client/arc-types').ArcState.ARCState} ARCState */ + +export const readHandler = Symbol('readHandler'); +export const changeHandler = Symbol('changeHandler'); + +/** + * A class that manages state of the application. + * The state file stores application state that is not related to application settings. The state is restored for each window. + * The state is not propagated to other windows. Though, the last window that stores the sate wins the state for the next opened window. + * This is design this way so the user can open 2 windows and test APIs suing different environments (for example, as the current environment is not part of settings). + */ +export class AppStateManager extends ArcPreferences { + /** + * @constructor + * + * @param {string} file The state file path + */ + constructor(file) { + super(file); + this[readHandler] = this[readHandler].bind(this); + this[changeHandler] = this[changeHandler].bind(this); + } + + /** + * Listens for application events related to preferences management. + */ + observe() { + ipcMain.handle('app-state-read', this[readHandler]); + ipcMain.handle('app-state-update', this[changeHandler]); + } + + async [readHandler]() { + let data; + try { + data = await this.load(); + } catch (cause) { + log.error(cause); + // eslint-disable-next-line no-console + console.error(cause); + throw cause; + } + return data; + } + + /** + * @param {Event} event + * @param {string} path Preference name + * @param {any} value Preference value + */ + async [changeHandler](event, path, value) { + try { + const data = await this.load(); + this.updateValue(data, path, value); + await this.store(); + } catch (cause) { + log.error(cause); + // eslint-disable-next-line no-console + console.error(cause); + throw cause; + } + } + + /** + * Creates default settings object. + * + * @return {Promise} Default settings object. + */ + async defaultSettings() { + return /** @type ARCState */ ({ + kind: 'ARC#AppState', + }); + } +} diff --git a/src/io/ApplicationDefaults.js b/src/io/ApplicationDefaults.js new file mode 100644 index 00000000..9ca5655d --- /dev/null +++ b/src/io/ApplicationDefaults.js @@ -0,0 +1,33 @@ +import { ThemeDefaults } from './defaults/ThemeDefaults.js'; +import { WorkspaceDefaults } from './defaults/WorkspaceDefaults.js'; +import { DataStore } from './defaults/DataStore.js'; + +/** @typedef {import('./WindowsManager').WindowsManager} WindowsManager */ + +/** + * Class responsible for keeping application base environment stable. + * + * It copies default resources to it's default locations and sets up + * the application environment. + */ +export class ApplicationDefaults { + /** + * Prepares environment files while opening the application. + * Copies application themes to themes location. + * @return {Promise} + */ + async prepareEnvironment() { + const td = new ThemeDefaults(); + await td.prepareEnvironment(); + const wd = new WorkspaceDefaults(); + await wd.prepareEnvironment(); + } + + /** + * @param {WindowsManager} vm + */ + async prepareDatabaseUpgrade(vm) { + const db = new DataStore(vm); + await db.ensureDataUpgraded(); + } +} diff --git a/src/io/ApplicationMenu.js b/src/io/ApplicationMenu.js new file mode 100644 index 00000000..43696e28 --- /dev/null +++ b/src/io/ApplicationMenu.js @@ -0,0 +1,315 @@ +/* eslint-disable no-param-reassign */ +import { EventEmitter } from 'events'; +import { app, Menu, MenuItem } from 'electron'; +import fs from 'fs-extra'; +import path from 'path'; +import { logger } from './Logger.js'; +import { WorkspaceHistory } from './models/WorkspaceHistory.js'; + + +/** @typedef {import('../menus/types').MenuDefinition} MenuDefinition */ +/** @typedef {import('../menus/types').MenuItemDefinition} MenuItemDefinition */ +/** @typedef {import('./models/Models').WorkspaceHistoryEntry} WorkspaceHistoryEntry */ +/** @typedef {import('./ApplicationUpdater').ApplicationUpdater} ApplicationUpdater */ +/** @typedef {import('electron').BrowserWindow} BrowserWindow */ + +export const appendHistoryEntry = Symbol('appendHistoryEntry'); +export const workspaceHistoryAction = Symbol('workspaceHistoryAction'); +export const clearWorkspaceHistory = Symbol('clearWorkspaceHistory'); +export const createWorkspaceHistory = Symbol('createWorkspaceHistory'); + +/** + * The class that builds application menu per the OS and handles the differences. + * Also works with the ApplicationUpdated module to add support for the update process. + */ +export class ApplicationMenu extends EventEmitter { + /** + * @param {ApplicationUpdater} updateStatus The instance of the update status class + */ + constructor(updateStatus) { + super(); + this.topMenu = new Menu(); + this.history = new WorkspaceHistory(); + this.menuLoaded = false; + this.us = updateStatus; + + this.us.on('status-changed', this.updateStatusHandler.bind(this)); + this[workspaceHistoryAction] = this[workspaceHistoryAction].bind(this); + } + + /** + * Builds and sets the application menu. + * @return {Promise} Resolved when the application menu is created. + */ + async build() { + logger.info('Building application menu from a template...'); + try { + const template = await this.getTemplate(); + this.createFromTemplate(template); + this.menuLoaded = true; + Menu.setApplicationMenu(this.topMenu); + logger.info('Application menu is now set.'); + } catch (cause) { + this.menuLoaded = false; + const message = 'Menu template file was not found.'; + logger.error(message); + logger.error(cause); + } + } + + /** + * Gets menu template depending on the platform. + * @return {Promise} Promise resolved to JS object of menu template + * definition. + */ + async getTemplate() { + const osName = this.platformToName(); + const name = `${osName}.json`; + const file = path.join(__dirname, '..', 'menus', name); + logger.info('Menu template location', file); + return fs.readJson(file); + } + + /** + * Returns common names for the platform. + * @returns {string} Either `darwin`, `win` or `linux` + */ + platformToName() { + switch (process.platform) { + case 'darwin': return process.platform; + case 'win32': return 'win'; + default: return 'linux'; + } + } + + /** + * Creates a menu definition from ARC's internal template. + * @param {MenuDefinition} template [description] + */ + createFromTemplate(template) { + logger.info('Creating application menu instance'); + this.createMainMenu(template.menu); + } + + /** + * Creates application menu. + * @param {MenuItemDefinition[]} template Menu template model. + */ + createMainMenu(template) { + template.forEach((data) => { + const item = this.createMenuItem(data); + this.topMenu.append(item); + }); + } + + /** + * Creates a menu item from menu definition model. + * @param {MenuItemDefinition} options Menu item model. + * @return {MenuItem} Created menu item. + */ + createMenuItem(options) { + const init = /** @type {Electron.MenuItemConstructorOptions} */ ({ ...options }); + if (options.command) { + init.click = this.itemActionHandler.bind(this, options.command); + } + if (options.submenu) { + init.submenu = this.createSubMenu(options.submenu); + } + if (options.label === 'VERSION') { + init.label = `Version: ${app.getVersion()}`; + } + return new MenuItem(init); + } + + /** + * Creates a sub menu for a menu item. + * + * @param {MenuItemDefinition[]} submenu Menu data model + * @return {Menu} Menu item to be appended to another menu item. + */ + createSubMenu(submenu) { + const menu = new Menu(); + submenu.forEach((item) => menu.append(this.createMenuItem(item))); + return menu; + } + + /** + * Handler for the menu item click event. Emits the `menu-action` event. + * + * @param {string} command The command associated with the menu. + * @param {MenuItem} menuItem Clicked menu item. + * @param {BrowserWindow} browserWindow Target window. + */ + itemActionHandler(command, menuItem, browserWindow) { + logger.info(`Main menu action detected: ${command}`); + this.emit('menu-action', command, browserWindow); + this.us.menuActionHandler(command); + } + + /** + * Appends an item to the list of workspace history items. + * @param {string} filePath Location of the workspace file. + * @return {Promise} + */ + async appendWorkspaceHistory(filePath) { + await this.history.addEntry(filePath) + this[appendHistoryEntry](filePath); + } + + /** + * Clears list of workspace history. + * Persists the state in the settings file. + * @returns {Promise} + */ + async clearWorkspaceHistory() { + await this.history.clearHistory(); + this[clearWorkspaceHistory](); + } + + /** + * Loads workspace history list and creates menu entries. + * @returns {Promise} + */ + async loadWorkspaceHistory() { + const entries = await this.history.loadEntries(); + if (!entries) { + return; + } + this[createWorkspaceHistory](entries); + } + + /** + * @return {Menu} A reference to workspace history submenu. + */ + getWorkspaceHistoryMenu() { + // linux: 5, win: 5, osx: 6 + const index = process.platform === 'darwin' ? 6 : 5; + const workspaceMenu = this.topMenu.items[index]; + const historyMenu = workspaceMenu.submenu.items[3]; + return historyMenu.submenu; + } + + /** + * Appends history entry item to the history menu. + * + * @param {string} filePath A path to the workspace file. + */ + [appendHistoryEntry](filePath) { + const menu = this.getWorkspaceHistoryMenu(); + const { items } = menu; + if (items[2].visible) { + items[2].visible = false; + } + const options = /** @type Electron.MenuItemConstructorOptions */ ({ + label: filePath, + after: ['no-history-entry'], + click: this[workspaceHistoryAction], + }); + const item = new MenuItem(options); + menu.append(item); + } + + /** + * A handler for menu item click action. + * + * @param {MenuItem} menuItem Instance of the menu item + */ + [workspaceHistoryAction](menuItem) { + this.emit('open-workspace', menuItem.label); + this.history.addEntry(menuItem.label); + } + + /** + * Removes all workspace history entries from the menu. + */ + [clearWorkspaceHistory]() { + const menu = this.getWorkspaceHistoryMenu(); + const items = Array.from(menu.items); + items.splice(3); + items[2].visible = true; + // @ts-ignore + menu.clear(); + items.forEach((item) => menu.append(item)); + Menu.setApplicationMenu(this.topMenu); + } + + /** + * Iterates over the argument and creates menu entries from it. + * @param {WorkspaceHistoryEntry[]} entries List of history entries. + */ + [createWorkspaceHistory](entries) { + entries.forEach((item) => { + const filePath = item.file; + // Un-trusted source + if (typeof filePath !== 'string') { + return; + } + this[appendHistoryEntry](filePath); + }); + } + + // + // Auto updater methods + // + + /** + * Called when update status has changed from auto updated. + * @param {string} status The current status + */ + updateStatusHandler(status) { + if (!this.menuLoaded) { + return; + } + const name = this.platformToName(); + switch (name) { + case 'darwin': this.updateDarwinMenuUpdater(status); break; + case 'linux': this.updateLinuxMenuUpdater(status); break; + case 'win': this.updateWindowsMenuUpdater(status); break; + default: + } + } + + /** + * Updates the menu for the darwin platform menu. + * + * @param {string} status The current status + */ + updateDarwinMenuUpdater(status) { + const items = this.topMenu.items[0].submenu; + this.updateUpdaterStatus(status, items.items, 2); + } + + /** + * Updates the menu for the linux platform menu. + * + * @param {string} status The current status + */ + updateLinuxMenuUpdater(status) { + const { length } = this.topMenu.items; + const items = this.topMenu.items[length - 1].submenu; + this.updateUpdaterStatus(status, items.items, 3); + } + + /** + * Updates the menu for the linux platform menu. + * + * @param {string} status The current status + */ + updateWindowsMenuUpdater(status) { + const { length } = this.topMenu.items; + const items = this.topMenu.items[length - 1].submenu; + this.updateUpdaterStatus(status, items.items, 1); + } + + /** + * @param {string} status The current updater status + * @param {MenuItem[]} items The menu items containing the update status items + * @param {number} index The starting index where the updater menu items are located. + */ + updateUpdaterStatus(status, items, index) { + items[index].visible = status === 'update-downloaded'; + items[index + 1].visible = status === 'not-available'; + items[index + 2].visible = status === 'checking-for-update'; + items[index + 3].visible = status === 'download-progress'; + } +} diff --git a/scripts/main/app-options.js b/src/io/ApplicationOptions.js similarity index 57% rename from scripts/main/app-options.js rename to src/io/ApplicationOptions.js index cb36c404..3bf913ea 100644 --- a/scripts/main/app-options.js +++ b/src/io/ApplicationOptions.js @@ -1,5 +1,10 @@ -const log = require('./logger'); -const camelCase = require('camelcase'); +import camelCase from 'camelcase'; +import { logger } from './Logger.js'; + +/** @typedef {import('../types').ApplicationOption} ApplicationOption */ +/** @typedef {import('../types').ProcessedApplicationOption} ProcessedApplicationOption */ +/** @typedef {import('../types').ApplicationOptionsConfig} ApplicationOptionsConfig */ +/** @typedef {import('../types').ProtocolFile} ProtocolFile */ /** * A class describing and processing application initial options. @@ -8,19 +13,27 @@ const camelCase = require('camelcase'); * of this class. * Use `getOptions` to create an object with configuration. */ -class AppOptions { +export class ApplicationOptions { /** * List of command line options with mapping to properties. * - * @return {Array} List of app config options + * @return {ApplicationOption[]} List of app config options */ get availableOptions() { - return [{ + return [ + { // Path to the settings file. Overrides default location. name: '--settings-file', shortcut: '-s', type: String - }, { + }, + { + // Path to the state file. Overrides default location. + name: '--state-file', + shortcut: '-S', + type: String + }, + { // Path to the workspace state files path. Overrides default location. name: '--workspace-path', shortcut: '-w', @@ -30,14 +43,9 @@ class AppOptions { name: '--themes-path', shortcut: '-t', type: String - }, { - // Path to application components directory (with ARC components) - name: '--components-path', - shortcut: '-c', - type: String }, { // Opens ARC in dev mode (opened console, verbose log) - name: '--debug', + name: '--dev', shortcut: '-d', type: Boolean }, { @@ -62,7 +70,6 @@ class AppOptions { name: '--open', shortcut: '-o', type: String, - allowArray: true }, { // Skips application update check for this run name: '--skip-app-update', @@ -73,21 +80,42 @@ class AppOptions { name: '--skip-themes-update', shortcut: '-x', type: Boolean, + }, { + name: '--user-data-dir', + shortcut: '-D', + type: String, + }, { + name: '--release-channel', + shortcut: '-r', + type: String, + }, { + name: '--skip-cookie-consent', + type: Boolean, + }, { + name: '--skip-database-upgrade', + type: Boolean, }]; } + + constructor() { + /** + * @type {ProtocolFile} + */ + this.openProtocolFile = undefined; + } + /** * Produces list of startup options. - * @return {Object} Map of configured options. + * @return {ApplicationOptionsConfig} Map of configured options. */ getOptions() { const result = {}; - for (const key in this) { - if (Object.prototype.hasOwnProperty.call(this, key)) { - result[key] = this[key]; - } - } + Object.entries(this).forEach(([key, value]) => { + result[key] = value; + }); return result; } + /** * Parses startup options. */ @@ -97,38 +125,42 @@ class AppOptions { if (arg[0] !== '-') { if (this.isDefaultProtocolFile(arg)) { this.setDefaultProtocolFile(arg); + } else if (!this.open && /[a-zA-Z0-9]/.test(arg[0])) { + this.open = arg; } else if (arg[0] !== '.') { - log.warn('Unknown startup option ' + arg); + logger.warn(`Unknown startup option ${arg}`); } continue; } - let def = this.findDefinnition(arg); - if (!def) { - log.warn('Unknown startup option ' + arg); + const definition = this.findDefinition(arg); + if (!definition) { + logger.warn(`Unknown startup option ${arg}`); continue; } - def = this.getPropertyDefinition(arg, def, process.argv[i + 1]); - this.setProperty(def); - if (def.skipNext) { + const processedDefinition = this.getPropertyDefinition(arg, definition, process.argv[i + 1]); + this.setProperty(processedDefinition); + if (processedDefinition.skipNext) { i++; } } } + /** * Checks if the argument is default protocol file argument added to the * program's options by the OS. - * @param {String} arg Argument to test - * @return {Boolean} True if passed argument represent default protocol file. + * @param {string} arg Argument to test + * @return {boolean} True if passed argument represent default protocol file. */ isDefaultProtocolFile(arg) { return !!(arg && arg.indexOf('arc-file://') === 0); } + /** - * Sets `openProtocolFile` property with passed file path infomation. + * Sets `openProtocolFile` property with passed file path information. * The `source` property represents file source (like google-drive). * The `action` property represent an action to take (like `open` or `create`). - * The `id` proeprty if the file identifier. - * @param {String} url Default protocol file. + * The `id` property if the file identifier. + * @param {string} url Default protocol file. */ setDefaultProtocolFile(url) { const fileData = url.substr(11); @@ -137,65 +169,72 @@ class AppOptions { case 'drive': // arc-file://drive/open/file-id // arc-file://drive/create/file-id - this.openProtocolFile = { + this.openProtocolFile = /** @type ProtocolFile */ ({ source: 'google-drive', action: parts[1], id: parts[2] - }; - break; + }); + break; + default: } } + /** * Finds an option definition from an argument. * - * @param {String} arg Argument passed to the application. - * @return {Object} Option definition or undefined if not found. + * @param {string} arg Argument passed to the application. + * @return {ApplicationOption|undefined} Option definition or undefined if not found. */ - findDefinnition(arg) { + findDefinition(arg) { + let value = arg; const eqIndex = arg.indexOf('='); if (eqIndex !== -1) { - arg = arg.substr(0, eqIndex); + value = value.substr(0, eqIndex); + } + if (value.indexOf('--') === 0) { + return this.availableOptions.find((item) => item.name === value); } - if (arg.indexOf('--') === 0) { - return this.availableOptions.find((item) => item.name === arg); - } else if (arg.indexOf('-') === 0) { - return this.availableOptions.find((item) => item.shortcut === arg); + if (value.indexOf('-') === 0) { + return this.availableOptions.find((item) => item.shortcut === value); } + return undefined; } + /** * Updates definition object with `value` and `skipNext` properties. * - * @param {String} arg Command line argument - * @param {Object} def Existing command definition. - * @param {?String} nextValue Next item in the arguments array. - * @return {Object} Updated `def` object. + * @param {string} arg Command line argument + * @param {ApplicationOption} def Existing command definition. + * @param {string=} nextValue Next item in the arguments array. + * @return {ProcessedApplicationOption} Updated `def` object. */ getPropertyDefinition(arg, def, nextValue) { - def.skipNext = false; - if (def.type === Boolean) { - def.value = true; - return def; + const result = /** @type ProcessedApplicationOption */ ({ ...def, skipNext: false }); + if (result.type === Boolean) { + result.value = true; + return result; } let value; if (arg.indexOf('=') !== -1) { value = this.getArgValue(arg); } else { value = nextValue; - def.skipNext = true; + result.skipNext = true; } - if (def.type === Number) { - def.value = Number(value); + if (result.type === Number) { + result.value = Number(value); } else { - def.value = value; + result.value = value; } - return def; + return result; } + /** * Gets a value from an argument line when value is passed as * `arg="value"` or `arg=value` * - * @param {String} arg Argument pice - * @return {String} Value for the argument. + * @param {string} arg Argument pice + * @return {string} Value for the argument. */ getArgValue(arg) { const index = arg.indexOf('='); @@ -209,17 +248,18 @@ class AppOptions { } return value; } + /** * Sets a property value on this object. - * An option name is set as a property aftr it's camel cased. + * An option name is set as a property after it's camel cased. * - * @param {Object} def Command definition. + * @param {ProcessedApplicationOption} def Command definition. */ setProperty(def) { const name = camelCase(def.name); - if (this[name] && def.allowArray) { + if (this[name] && def.isArray) { let v = this[name]; - if (!(v instanceof Array)) { + if (!Array.isArray(v)) { v = [v]; } v.push(def.value); @@ -229,4 +269,3 @@ class AppOptions { } } } -exports.AppOptions = AppOptions; diff --git a/src/io/ApplicationPaths.js b/src/io/ApplicationPaths.js new file mode 100644 index 00000000..fe323195 --- /dev/null +++ b/src/io/ApplicationPaths.js @@ -0,0 +1,207 @@ +import { app } from 'electron'; +import path from 'path'; +import fs from 'fs-extra'; +import { logger } from './Logger.js'; + +export class ApplicationPaths { + /** + * The path to the application settings file + * @type {string} + */ + #settingsFile = undefined; + + /** + * The path to the application themes folder + * @type {string} + */ + #themesBasePath = undefined; + + /** + * The path to the application themes settings file. + * @type {string} + */ + #themesSettings = undefined; + + /** + * The path to the application workspace directory + * @type {string} + */ + #workspacePath = undefined; + + /** + * The path to the application state file where other than "settings" preferences are stored. + * @type {string} + */ + #stateFile = undefined; + + get settingsFile() { + return this.#settingsFile; + } + + get themesBasePath() { + return this.#themesBasePath; + } + + get themesSettings() { + return this.#themesSettings; + } + + get stateFile() { + return this.#stateFile; + } + + /** + * Resolves file path to a correct path if it's starts with `~`. + * + * @param {string} file The file path + * @return {string} Resolved path to the file. + */ + resolvePath(file) { + let result = file; + if (result[0] === '~') { + result = app.getPath('home') + result.substr(1); + } + return result; + } + + /** + * @returns {string} a location to the application directory depending on the OS + */ + getAppDirectory() { + switch (process.platform) { + case 'darwin': + return process.execPath.substring(0, process.execPath.indexOf('.app') + 4); + case 'linux': + case 'win32': + return path.join(process.execPath, '..'); + default: return ''; + } + } + + /** + * Safely checks whether the current user has access to the location. + * @param {string} dir the location to test + * @returns {boolean} a location to the application directory depending on the OS + */ + hasWriteAccess(dir) { + const testFilePath = path.join(dir, 'write.test'); + try { + fs.writeFileSync(testFilePath, new Date().toISOString(), { flag: 'w+' }); + fs.unlinkSync(testFilePath); + return true; + } catch (err) { + return false; + } + } + + /** + * Initializes settings file location in the application. + * @param {string=} file Settings file location. + */ + setSettingsFile(file) { + let loc = file; + if (loc) { + loc = this.resolvePath(loc); + const dir = path.dirname(loc); + try { + fs.ensureDirSync(dir); + this.#settingsFile = loc; + } catch (_) { + logger.error(`Insufficient permission to settings file folder "${dir}".`); + } + } + if (!this.#settingsFile) { + this.#settingsFile = path.join(process.env.ARC_HOME, 'settings.json'); + } + process.env.ARC_SETTINGS_FILE = this.#settingsFile; + logger.debug(`ARC_SETTINGS_FILE is set to: ${process.env.ARC_SETTINGS_FILE}`); + } + + /** + * Sets a home location for the application. + */ + setHome() { + const portableHomePath = path.join(this.getAppDirectory(), '..', '.arc'); + if (fs.pathExistsSync(portableHomePath)) { + if (this.hasWriteAccess(portableHomePath)) { + process.env.ARC_HOME = portableHomePath; + } else { + logger.error(`Insufficient permission to portable ARC_HOME "${portableHomePath}".`); + } + } + if (!process.env.ARC_HOME) { + process.env.ARC_HOME = app.getPath('userData'); + } + logger.debug(`ARC_HOME is set to: ${process.env.ARC_HOME}`); + } + + /** + * Sets locations related to themes + * @param {string=} themesPath A path to the themes directory + * @param {string=} [themesSettingsFile='themes-info.json'] A path to the themes settings file. + */ + setThemesPath(themesPath, themesSettingsFile='themes-info.json') { + if (themesPath) { + const resolved = this.resolvePath(themesPath); + try { + fs.ensureDirSync(resolved); + this.#themesBasePath = resolved; + } catch (_) { + logger.error(`Insufficient permission to themes installation location "${resolved}".`); + } + } + + if (!this.#themesBasePath) { + this.#themesBasePath = path.join(process.env.ARC_HOME, 'themes-esm'); + } + + this.#themesSettings = path.join(this.#themesBasePath, themesSettingsFile); + process.env.ARC_THEMES = this.#themesBasePath; + process.env.ARC_THEMES_SETTINGS = this.#themesSettings; + logger.debug(`ARC_THEMES is set to: ${process.env.ARC_THEMES}`); + logger.debug(`ARC_THEMES_SETTINGS is set to: ${process.env.ARC_THEMES_SETTINGS}`); + } + + /** + * Sets the default location of the workspace data, + * @param {string=} workspacePath A path to the workspace directory + */ + setWorkspacePath(workspacePath) { + if (workspacePath) { + const resolved = this.resolvePath(workspacePath); + try { + this.#workspacePath = resolved; + } catch (_) { + logger.error(`Insufficient permission to themes installation location "${resolved}".`); + } + } + if (!this.#workspacePath) { + this.#workspacePath = path.join(process.env.ARC_HOME, 'workspace'); + } + process.env.ARC_WORKSPACE_PATH = this.#workspacePath; + logger.debug(`ARC_WORKSPACE_PATH is set to: ${process.env.ARC_WORKSPACE_PATH}`); + } + + /** + * Initializes state file location in the application. + * @param {string=} file State file location. + */ + setStateFile(file) { + let loc = file; + if (loc) { + loc = this.resolvePath(loc); + const dir = path.dirname(loc); + try { + fs.ensureDirSync(dir); + this.#stateFile = loc; + } catch (_) { + logger.error(`Insufficient permission to state file folder "${dir}".`); + } + } + if (!this.#stateFile) { + this.#stateFile = path.join(process.env.ARC_HOME, 'state.json'); + } + process.env.ARC_STATE_FILE = this.#stateFile; + logger.debug(`ARC_STATE_FILE is set to: ${process.env.ARC_STATE_FILE}`); + } +} diff --git a/src/io/ApplicationUpdater.js b/src/io/ApplicationUpdater.js new file mode 100644 index 00000000..b76878a0 --- /dev/null +++ b/src/io/ApplicationUpdater.js @@ -0,0 +1,319 @@ +import { autoUpdater } from 'electron-updater'; +import { EventEmitter } from 'events'; +import { dialog, nativeImage, ipcMain, BrowserWindow } from 'electron'; +import path from 'path'; +import { logger } from './Logger.js'; + +autoUpdater.logger = logger; + +/** @typedef {import('electron-updater').UpdateInfo} UpdateInfo */ +/** @typedef {import('@advanced-rest-client/arc-types').Config.ARCConfig} ARCConfig */ + +export const checkingHandler = Symbol('checkingHandler'); +export const updateAvailableHandler = Symbol('updateAvailableHandler'); +export const updateNotAvailableHandler = Symbol('updateNotAvailableHandle'); +export const updateErrorHandler = Symbol('updateErrorHandler'); +export const downloadProgressHandler = Symbol('downloadProgressHandler'); +export const downloadReadyHandler = Symbol('downloadReadyHandler'); +export const checkUpdateHandler = Symbol('checkUpdateHandler'); + +/** + * A module to check for updates. + * + * UpdateInfo model: + * - version {String} - The version. + * - files {Array} + * - releaseName {String} - The release name. + * - releaseNotes {String} - The release notes. + * - releaseDate {String} - The release date. + * - stagingPercentage {Number} - The staged rollout percentage, 0-100. + */ +export class ApplicationUpdater extends EventEmitter { + + constructor() { + super(); + this.state = 0; + this.lastInfoObject = undefined; + this[checkingHandler] = this[checkingHandler].bind(this); + this[updateAvailableHandler] = this[updateAvailableHandler].bind(this); + this[updateNotAvailableHandler] = this[updateNotAvailableHandler].bind(this); + this[updateErrorHandler] = this[updateErrorHandler].bind(this); + this[downloadProgressHandler] = this[downloadProgressHandler].bind(this); + this[downloadReadyHandler] = this[downloadReadyHandler].bind(this); + this.installUpdate = this.installUpdate.bind(this); + this.check = this.check.bind(this); + } + + /** + * Adds auto-update library event listeners. + */ + listen() { + autoUpdater.on('checking-for-update', this[checkingHandler]); + autoUpdater.on('update-available', this[updateAvailableHandler]); + autoUpdater.on('update-not-available', this[updateNotAvailableHandler]); + autoUpdater.on('error', this[updateErrorHandler]); + autoUpdater.on('download-progress', this[downloadProgressHandler]); + autoUpdater.on('update-downloaded', this[downloadReadyHandler]); + + ipcMain.handle('check-for-update', this[checkUpdateHandler].bind(this)); + ipcMain.on('install-update', this.installUpdate); + } + + /** + * Adds auto-update library event listeners. + */ + unlisten() { + autoUpdater.off('checking-for-update', this[checkingHandler]); + autoUpdater.off('update-available', this[updateAvailableHandler]); + autoUpdater.off('update-not-available', this[updateNotAvailableHandler]); + autoUpdater.off('error', this[updateErrorHandler]); + autoUpdater.off('download-progress', this[downloadProgressHandler]); + autoUpdater.off('update-downloaded', this[downloadReadyHandler]); + + ipcMain.removeHandler('check-for-update'); + ipcMain.off('install-update', this.installUpdate); + } + + /** + * Checks if `channel` is a valid channel signature. + * @param {String} channel + * @return {Boolean} + */ + isValidChannel(channel) { + return ['beta', 'alpha', 'latest'].indexOf(channel) !== -1; + } + + /** + * Checks for update. + * + * @param {object=} opts Options for checking for an update. + */ + check(opts={}) { + this.lastOptions = opts; + logger.info('Checking for application updates...'); + autoUpdater.checkForUpdates(); + } + + /** + * Sets the channel value on auto updater + * @param {string} channel Channel name + */ + setReleaseChannel(channel) { + if (this.isValidChannel(channel)) { + logger.debug(`Setting the release channel to${ channel}`); + autoUpdater.channel = channel; + } else { + logger.warn(`Channel ${channel} is not a valid application release channel.`); + } + } + + /** + * Checks for app update. + * This function **must** be called after the app ready event. + * + * @param {ARCConfig=} settings Current application configuration. + * @param {boolean=} skipAppUpdate When set it skips application update check + */ + start(settings={}, skipAppUpdate=false) { + logger.info('ApplicationUpdater::Initializing auto updater.'); + const { updater={} } = settings; + const { auto, channel } = updater; + if (channel) { + if (this.isValidChannel(channel)) { + logger.info(`ApplicationUpdater::Setting auto updater channel to ${channel}`); + autoUpdater.channel = channel; + } + } + if (skipAppUpdate || auto === false) { + logger.debug('Auto Updater is disabled. Manual requests will still download the update.'); + autoUpdater.autoDownload = false; + autoUpdater.autoInstallOnAppQuit = false; + return; + } + if (!skipAppUpdate) { + setTimeout(() => this.check()); + } + } + + /** + * Quits the application and installs the update. + */ + installUpdate() { + logger.info('Initializing update process (quit & install)'); + autoUpdater.quitAndInstall(); + } + + /** + * Handler for the `check-for-update` event dispatched by the renderer process. + * Calls `check()` with option to not notify the user about the update + * @returns {Promise} + */ + async [checkUpdateHandler]() { + const result = await autoUpdater.checkForUpdates(); + if (!result || !result.updateInfo) { + return undefined; + } + return result.updateInfo; + } + + /** + * Emitted when checking if an update has started. + */ + [checkingHandler]() { + this.state = 1; + this.lastInfoObject = undefined; + this.emit('notify-windows', 'checking-for-update'); + this.emit('status-changed', 'checking-for-update'); + } + + /** + * Emitted when there is an available update. The update is downloaded + * automatically. + * + * @param {UpdateInfo} info Update info object. See class docs for details. + */ + [updateAvailableHandler](info) { + logger.debug('Update available.'); + this.state = 2; + this.lastInfoObject = info; + this.emit('notify-windows', 'update-available', info); + this.emit('status-changed', 'download-progress'); + if (!this.lastOptions || !this.lastOptions.notify) { + return; + } + this.updateAvailableDialog(); + } + + /** + * Emitted when there is no available update. + * + * @param {UpdateInfo} info Update info object. See class docs for details. + */ + [updateNotAvailableHandler](info) { + logger.debug('Update not available.'); + this.state = 3; + this.lastInfoObject = info; + this.emit('notify-windows', 'update-not-available', info); + this.emit('status-changed', 'not-available'); + this.notifyUser('No update available.', `${info.version} is the latest version.`); + } + + /** + * Emitted when there is an error while updating. + * + * @param {any} error Error from the library. + */ + [updateErrorHandler](error) { + const { message, code } = error; + logger.error('Update error'); + this.state = 4; + this.lastInfoObject = error; + this.emit('notify-windows', 'autoupdate-error', { + message, + code, + }); + this.emit('status-changed', 'not-available'); + if (code === 8) { + let msg = 'Unable to update the application when it runs in'; + msg += ' read-only mode. Move the application to the Applications'; + msg += ' folder first and try again.'; + this.notifyUser('Update error', msg, true); + } else { + this.notifyUser('Update error', message, true); + } + } + + /** + * Emitted on download progress. + * + * @param {object} progressObj Progress info data. Contains `progress` property which has the following properties: + * - bytesPerSecond + * - percent + * - total + * - transferred + */ + [downloadProgressHandler](progressObj) { + logger.debug('Update download progress'); + this.state = 5; + this.lastInfoObject = progressObj; + this.emit('notify-windows', 'download-progress', progressObj); + } + + /** + * Emitted when a new version is downloaded. + * + * @param {UpdateInfo} info Update info object. See class docs for details. + */ + [downloadReadyHandler](info) { + logger.debug('Update download ready', info); + this.state = 6; + this.lastInfoObject = info; + this.emit('notify-windows', 'update-downloaded', info); + this.emit('status-changed', 'update-downloaded'); + if (this.lastOptions && this.lastOptions.notify) { + setImmediate(() => autoUpdater.quitAndInstall()); + } + } + + /** + * Notifies the user about update event. + * + * @param {string} message Message to display. + * @param {string} detail MacOS only. Additional detail message. + * @param {boolean=} isError Should be true when notifying about error. + */ + notifyUser(message, detail, isError) { + this.lastOptions = this.lastOptions || {}; + if (!this.lastOptions || !this.lastOptions.notify) { + return; + } + const dialogOpts = { + type: isError ? 'error' : 'info', + title: 'ARC updater', + message, + detail, + }; + if (!isError) { + const imgPath = path.join(__dirname, '..', '..', 'assets', 'icon.iconset', 'icon_512x512.png'); + dialogOpts.icon = nativeImage.createFromPath(imgPath); + } + dialog.showMessageBox(dialogOpts); + } + + async updateAvailableDialog() { + let msg = 'Application update is available. '; + msg += 'Do you want to install it now?'; + const window = BrowserWindow.getFocusedWindow(); + const result = await dialog.showMessageBox(window, { + type: 'info', + title: 'Application update', + message: msg, + buttons: ['Yes', 'No'] + }); + if (result.response === 0) { + autoUpdater.downloadUpdate(); + } + } + + /** + * A function reserved for the application menu to call. + * Checks for the update status when requested. + * @param {string} action The action requested by the user. + */ + menuActionHandler(action) { + if (action.indexOf('application') === -1) { + return; + } + switch (action) { + case 'application:install-update': + this.installUpdate(); + break; + case 'application:check-for-update': + this.check({ + notify: true, + }); + break; + default: + } + } +} diff --git a/src/io/ArcEnvironment.js b/src/io/ArcEnvironment.js new file mode 100644 index 00000000..d456840b --- /dev/null +++ b/src/io/ArcEnvironment.js @@ -0,0 +1,400 @@ +import { app, BrowserWindow, ipcMain, nativeTheme } from 'electron'; +import { Oauth2Identity } from '@advanced-rest-client/electron-oauth2'; +import fs from 'fs-extra'; +import { ApplicationUpdater } from './ApplicationUpdater.js'; +import { logger } from './Logger.js'; +import { ThemesProtocol } from './ThemesProtocol.js'; +import { EsmProtocol } from './EsmProtocol.js'; +import { WindowsManager } from './WindowsManager.js'; +import { ApplicationMenu } from './ApplicationMenu.js'; +import { PopupMenuService } from './PopupMenuService.js'; +import { ThemeManager } from './ThemeManager.js'; +import { SessionManager } from './SessionManager.js'; +import { ContentSearchService } from './ContentSearchService.js'; +import { AppPrompts } from './AppPrompts.js'; +import { AppStateManager } from './AppStateManager.js'; +import { GoogleDrive } from './GoogleDrive.js'; +import { ExternalResourcesManager } from './ExternalResourcesManager.js'; + +/** @typedef {import('../types').ApplicationOptionsConfig} ApplicationOptionsConfig */ +/** @typedef {import('../types').ProtocolFile} ProtocolFile */ +/** @typedef {import('./PreferencesManager').PreferencesManager} PreferencesManager */ + +export const osThemeUpdateHandler = Symbol('osThemeUpdateHandler'); +export const importWorkspaceHandler = Symbol('importWorkspaceHandler'); + +export class ArcEnvironment { + /** + * @param {PreferencesManager} prefMgr Initialized preferences manager + * @param {ApplicationOptionsConfig=} [params={}] + */ + constructor(prefMgr, params={}) { + this.config = prefMgr; + this.initParams = params; + this.isDebug = params.dev || false; + this.withDevTools = params.withDevtools || false; + + this.initializeConfiguration(prefMgr); + this.initializeAppState(); + this.initializeWindowsManager(params); + this.initializeUpdater(); + this.initializeOAuth2(); + this.initializeMenu(); + this.initializePopupMenu(); + this.initializeThemes(); + this.initializeSessionManager(); + this.initializeSearchService(); + this.initializePrompts(); + this.initializeGoogleDrive(); + this.initializeExternalResources(); + + app.on('activate', () => this.activateHandler.bind(this)); + app.on('window-all-closed', this.allClosedHandler.bind(this)); + // @todo(pawel): create an overlay window on quit to delay the quit from ctrl/cmd+q for a second. + // app.on('will-quit', () => this.willQuitHandler.bind(this)); + // app.on('before-quit', () => this.beforeQuitHandler.bind(this)); + } + + /** + * Loads event listeners for the preferences manager + * @param {PreferencesManager} manager Initialized preferences manager + */ + initializeConfiguration(manager) { + manager.on('settings-changed', (name, value) => { + this.wm.notifyAll('preferences-value-updated', [name, value]); + this.settingsChanged(name, value); + }); + manager.observe(); + } + + initializeAppState() { + this.state = new AppStateManager(process.env.ARC_STATE_FILE); + this.state.observe(); + } + + /** + * Initializes the window manager class. + * @param {ApplicationOptionsConfig} params + */ + initializeWindowsManager(params) { + logger.debug('Initializing windows manager.'); + this.wm = new WindowsManager(params); + this.wm.listen(); + } + + /** + * Initializes auto updater. + */ + initializeUpdater() { + this.updater = new ApplicationUpdater(); + this.updater.listen(); + this.updater.on('notify-windows', (type, arg) => { + this.wm.notifyAll(type, arg); + }); + } + + initializeOAuth2() { + Oauth2Identity.listen(); + } + + /** + * Initializes the application menu` + */ + initializeMenu() { + logger.debug('Initializing application menu (system menu).'); + this.menu = new ApplicationMenu(this.updater); + this.menu.build(); + logger.debug('Listening for system menu events.'); + this.menu.on('menu-action', (action, win) => { + this.menuActionHandler(action, win); + }); + this.menu.loadWorkspaceHistory(); + this.menu.on('open-workspace', (filePath) => this.openWorkspace(filePath)); + } + + initializePopupMenu() { + logger.debug('Initializing app menu service (popup listener).'); + const instance = new PopupMenuService(this.wm); + instance.listen(); + this.appMenuService = instance; + } + + initializeThemes() { + logger.debug('Initializing theme manager.'); + this.themes = new ThemeManager(this, this.initParams.skipThemesUpdate); + this.themes.listen(); + nativeTheme.on('updated', this[osThemeUpdateHandler].bind(this)); + } + + initializeSessionManager() { + logger.debug('Initializing session manager.'); + this.sm = new SessionManager({ + appUrls: [ + 'https://advancedrestclient-1155.appspot.com', + 'advancedrestclient.com' + ], + }); + this.sm.listen(); + this.sm.on('cookie-changed', (cookies) => this.wm.notifyAll('cookie-changed', [cookies])); + } + + initializeSearchService() { + logger.debug('Initializing content search service.'); + this.search = new ContentSearchService(this.wm); + this.search.listen(); + } + + initializePrompts() { + this.prompts = new AppPrompts(); + this.prompts.listen(); + } + + initializeGoogleDrive() { + this.gDrive = new GoogleDrive(); + this.gDrive.listen(); + // this is dispatched by the `GoogleDriveProxy.js` preload class. + ipcMain.on('google-drive-proxy-file-pick', this.proxyGoogleDriveFilePick.bind(this)); + } + + initializeExternalResources() { + this.externalResources = new ExternalResourcesManager(); + this.externalResources.listen(); + } + + /** + * @param {Electron.IpcMainEvent} event + * @param {string} fileId + */ + proxyGoogleDriveFilePick(event, fileId) { + const child = BrowserWindow.fromWebContents(event.sender); + const parent = child.getParentWindow(); + child.close(); + if (!parent) { + return; + } + parent.webContents.send('google-drive-file-pick', fileId); + } + + /** + * Handler for settings change. + * @param {String} name Changed property name + * @param {any} value Changed value + */ + settingsChanged(name, value) { + switch (name) { + case 'releaseChannel': + this.updater.setReleaseChannel(value); + break; + default: + } + } + + registerHandlers() { + logger.debug('initializing themes protocol'); + const tp = new ThemesProtocol(); + tp.register(); + this.themesProtocol = tp; + logger.debug('initializing ESM protocol'); + const mp = new EsmProtocol(); + mp.register(); + this.modulesProtocol = mp; + } + + /** + * Reads current settings and initialized the environment: + * - the application updater + */ + async loadEnvironment() { + logger.debug('Loading user configuration...'); + const settings = await this.config.load(); + logger.debug('User configuration ready.'); + if (!this.isDebug) { + this.updater.start(settings, this.initParams.skipAppUpdate); + } + } + + /** + * Opens a new application window. + * @param {string|ProtocolFile=} params + */ + open(params) { + if (params === 'string' || !params) { + // @ts-ignore + this.wm.open(params); + } else { + this.wm.openWithAction(/** @type ProtocolFile */ (params)); + } + } + + /** + * A callback fof all windows closed event. + * It gives some time to the process to open another window. + * This may happen when calling close and open together. This callback runs + * and closes the app but new window is not yet ready. Hence a delay. + */ + allClosedHandler() { + setTimeout(() => { + if (this.wm.hasWindow) { + return; + } + logger.debug('All windows are now closed.'); + if (process.platform !== 'darwin') { + logger.debug('Quitting main thread.'); + app.quit(); + } else { + logger.debug('Keeping main thread running.'); + } + }, 1000); + } + + /** + * On OS X it's common to re-create a window in the app when the + * dock icon is clicked and there are no other windows open. + */ + async activateHandler() { + logger.debug('Activating a window.'); + if (!this.wm.hasWindow) { + await this.wm.open(); + } else { + this.wm.restoreLast(); + } + } + + /** + * Event handler for menu actions. + * + * @param {String} action Action type to perform + * @param {Electron.BrowserWindow} win Browser window association with the action + */ + menuActionHandler(action, win) { + logger.debug(`Handing menu command: ${action}`); + if (action.startsWith('application:')) { + this.applicationActionHandler(action.substr(12), win); + return; + } + if (action.startsWith('request:')) { + win.webContents.send('request-action', action.substr(8)); + return; + } + logger.warn(`Menu command not handled: ${action}`); + } + + /** + * Handles menu actions that are prefixed with `application:`. + * The `action` is without the application prefix. + * + * @param {String} action Action type to perform + * @param {Electron.BrowserWindow} win Browser window association with the action + */ + applicationActionHandler(action, win) { + switch (action) { + case 'quit': + logger.debug('Quitting the application.'); + app.quit(); + break; + case 'new-window': + logger.debug('Opening new window.'); + this.wm.open(); + break; + case 'popup-menu': + logger.debug('Toggling popup menu.'); + this.appMenuService.togglePopupMenu(); + break; + case 'clear-workspace-history': + this.menu.clearWorkspaceHistory(); + break; + case 'open-file': + AppPrompts.openAssetDialog(win); + break; + case 'open-drive': + this.wm.open({ + page: 'drive-picker.html', + preload: 'arc-preload.js', + ignoreWindowSessionSettings: true, + noMenu: true, + noWebSecurity: true, + parent: win, + }); + break; + case 'import-workspace': + this[importWorkspaceHandler](win); + break; + case 'find': + this.search.start(win); + break; + case 'open-themes': + this.wm.open({ + page: 'themes.html', + preload: 'themes-preload.js', + ignoreWindowSessionSettings: true, + noMenu: true, + }); + break; + case 'open-license': + this.wm.open({ + page: 'license.html', + ignoreWindowSessionSettings: true, + noMenu: true, + }); + break; + case 'about': + this.wm.open({ + page: 'about.html', + preload: 'arc-preload.js', + ignoreWindowSessionSettings: true, + noMenu: true, + parent: win, + }); + break; + case 'open-privacy-policy': + case 'open-documentation': + case 'open-faq': + case 'open-discussions': + case 'report-issue': + case 'search-issues': + case 'web-session-help': + this.externalResources.openHelpTopic(action); + break; + default: + logger.debug(`Sending "${action}" action to the UI thread.`); + win.webContents.send('command', action); + } + } + + [osThemeUpdateHandler]() { + this.wm.notifyAll('system-theme-changed', nativeTheme.shouldUseDarkColors); + } + + /** + * An application menu handler for open workspace from file. + * @param {Electron.BrowserWindow} win Window from where the request came from + * @return {Promise} + */ + async [importWorkspaceHandler](win) { + const path = await AppPrompts.openWorkspaceFile(win); + if (path) { + logger.info('Opening workspace file in a new window.'); + await this.wm.open({ + workspaceFile: path, + }); + await this.menu.appendWorkspaceHistory(path); + } + } + + /** + * Opens workspace from file + * @param {string} filePath Workspace file location. + * @returns {Promise} + */ + async openWorkspace(filePath) { + const exists = await fs.pathExists(filePath); + if (!exists) { + AppPrompts.workspaceMissing(filePath); + } else { + logger.info('Opening workspace file in a new window.'); + await this.wm.open({ + workspaceFile: filePath, + }); + }; + } +} diff --git a/src/io/ArcMeta.js b/src/io/ArcMeta.js new file mode 100644 index 00000000..aff125d5 --- /dev/null +++ b/src/io/ArcMeta.js @@ -0,0 +1,59 @@ +import path from 'path'; +import { v4, v5 } from 'uuid'; +import { ArcPreferences } from '../common/ArcPreferences.js'; +/** + * ARC metadata + * + * Type: `Object` + * Properties: + * - `appId` {String} Generated application ID that can be used to + * link user data + * - `aid` {String} Anonymized id that can be used to link this app with the analytics account like Google Analytics. + * **This property is never stored outside local filesystem or analytics server which doesn't allow connect this information with specific app instance** + */ +export class ArcMeta extends ArcPreferences { + /** + * @constructor + */ + constructor() { + super(path.join(process.env.ARC_HOME, 'app-meta.json')); + } + + /** + * Returns generated application ID. + * + * @return {Promise} Promise resolved to the application ID. + */ + async getAppId() { + const meta = await this.load(); + return meta.appId; + } + + /** + * To ensure anonymous app usage reporting the app is using generated UUID + * from the instance ID. Both are not stored together anywhere outside user's + * local filesystem. + * + * @return {Promise} Promise resolved to the application anonymized ID. + */ + async getAnonymizedId() { + const meta = await this.load() + return meta.aid; + } + + /** + * Creates default metadata for ARC. + * + * + * @return {Promise} Generated metadata object + */ + async defaultSettings() { + const appId = v4(); + const aid = v5('arc-electron', appId); + const result = { + appId, + aid + }; + return result; + } +} diff --git a/src/io/ArcSessionRecorder.js b/src/io/ArcSessionRecorder.js new file mode 100644 index 00000000..dc87187e --- /dev/null +++ b/src/io/ArcSessionRecorder.js @@ -0,0 +1,50 @@ +import fetch from 'node-fetch'; +import { ArcMeta } from './ArcMeta.js'; +import { logger } from './Logger.js'; +/** + * This is first part analytics. This records the app start ONLY. + * The generated client id is random string generated per app instance and stored locally. + * There's no possibility to connect the id with a particular instance. + * + * The reason to have this is to keep project alive by proving that someone is using it.. + */ +export class ArcSessionRecorder { + /** + * @constructor + */ + constructor() { + this.meta = new ArcMeta(); + this.endpoint = 'https://api.advancedrestclient.com/v1/analytics/record'; + } + + /** + * Pings the server to record the session. + * @return {Promise} + */ + async record() { + try { + const id = await this.meta.getAnonymizedId(); + await this._postSession(id); + } catch (cause) { + logger.error('Unable to record the session', cause.message); + } + } + + /** + * Posts session data to the analytics server. + * + * @param {string} aid Anonymous app id. + * @return {Promise} + */ + async _postSession(aid) { + const d = new Date(); + const data = { + aid, + tz: d.getTimezoneOffset() + }; + await fetch(this.endpoint, { + method: 'POST', + body: JSON.stringify(data), + }); + } +} diff --git a/src/io/Constants.js b/src/io/Constants.js new file mode 100644 index 00000000..4e6058fb --- /dev/null +++ b/src/io/Constants.js @@ -0,0 +1,5 @@ +// this is not to be changed after the application is first published or the users will loose their data. +export const MainWindowPersist = 'persist:arc-window'; +export const TaskManagerWindowPersist = 'persist:arc-task-manager'; +export const WebSessionPersist = 'persist:web-session'; +export const AppHostname = 'api-client.app'; diff --git a/src/io/ContentSearchService.js b/src/io/ContentSearchService.js new file mode 100644 index 00000000..933263ba --- /dev/null +++ b/src/io/ContentSearchService.js @@ -0,0 +1,325 @@ +import { ipcMain, BrowserWindow, nativeTheme } from 'electron'; + +const findHandler = Symbol('findHandler'); +const clearHandler = Symbol('clearHandler'); +const foundInPageHandler = Symbol('foundInPageHandler'); +const initializeSearchBar = Symbol('initializeSearchBar'); +const positionWindow = Symbol('positionWindow'); +const listenTargetEvents = Symbol('listenTargetEvents'); +const unlistenTargetEvents = Symbol('unlistenTargetEvents'); +const listenBarEvents = Symbol('listenBarEvents'); +const unlistenBarEvents = Symbol('unlistenBarEvents'); +const resizeHandler = Symbol('resizeHandler'); +const moveHandler = Symbol('moveHandler'); +const targetCloseHandler = Symbol('targetCloseHandler'); +const barCloseHandler = Symbol('barCloseHandler'); +const focusBarInput = Symbol('focusBarInput'); +const targetReloadHandler = Symbol('targetReloadHandler'); +const searchBarCommandHandler = Symbol('searchBarCommandHandler'); + +/** @typedef {import('./WindowsManager').WindowsManager} WindowsManager */ + +/** + * A service that performs a content search in the WebContents using Chrome APIs. + * + * Why is this class creating a new BrowserWindow? + * + * When the search bar is included in the DOM it is also a part of the searched content. The search filed + * gets highlighted and when the user is typing the input looses focus. + * It is not enough to use iframe or (the current) web-view. Iframe is also being pare of the text search on + * the page and the web-view element is basically a new browser window which requires using IPC but is currently + * not recommended by Electron authors to use. + */ +export class ContentSearchService { + /** + * @returns {object} Bounds object for the window. + */ + get searchBarBounds() { + return { + width: 400, + height: 56 + }; + } + + /** + * @param {WindowsManager} windowsManager + */ + constructor(windowsManager) { + this.windowsManager = windowsManager; + /** + * The map of find in page request IDs and the corresponding windows. + * + * @type {{[key: number]: Electron.WebContents}} + */ + this.requests = {}; + /** + * The list of WebContents being currently processed by this content search service. + * @type {Electron.WebContents[]} + */ + this.contents = []; + + /** + * @type {{ barWindow: BrowserWindow, targetWindow: BrowserWindow }[]} + */ + this.map = []; + + this[resizeHandler] = this[resizeHandler].bind(this); + this[moveHandler] = this[moveHandler].bind(this); + this[targetCloseHandler] = this[targetCloseHandler].bind(this); + this[barCloseHandler] = this[barCloseHandler].bind(this); + this[targetReloadHandler] = this[targetReloadHandler].bind(this); + } + + listen() { + ipcMain.on('search-bar-command', this[searchBarCommandHandler].bind(this)); + } + + /** + * Starts a search for a content window or focuses on the search button if the search bar is already opened. + * @param {Electron.BrowserWindow} win + */ + start(win) { + const item = this.map.find((entry) => entry.targetWindow === win); + if (item) { + this[focusBarInput](item.barWindow); + } else { + this[initializeSearchBar](win); + } + } + + /** + * Creates a new search bar and attaches it to the given windows + * @param {Electron.BrowserWindow} targetWindow + */ + [initializeSearchBar](targetWindow) { + const options = { + ...this.windowsManager.createBaseWindowOptions('search-bar.js'), + frame: false, + movable: false, + parent: targetWindow, + transparent: true, + // backgroundColor: '#00ffffff', + // hasShadow: false, + }; + delete options.backgroundColor; + const barWindow = new BrowserWindow(options); + this.map.push({ + barWindow, + targetWindow, + }); + this[positionWindow](barWindow, targetWindow); + this.windowsManager.loadPage(barWindow, 'search-bar.html', '', { + darkMode: String(nativeTheme.shouldUseDarkColors), + }); + this[listenTargetEvents](targetWindow); + this[listenBarEvents](barWindow); + barWindow.webContents.once('did-finish-load', () => this[focusBarInput](barWindow)); + if (process.argv.includes('--dev')) { + barWindow.webContents.openDevTools(); + } + } + + /** + * Positions the search bar window according to main window position. + * + * @param {Electron.BrowserWindow} barWindow + * @param {Electron.BrowserWindow} targetWindow + */ + [positionWindow](barWindow, targetWindow) { + const rect = targetWindow.getBounds(); + const winBounds = this.searchBarBounds; + const maxRight = rect.width + rect.x; + const x = maxRight - winBounds.width - 12; // padding + const maxTop = rect.y + 26; + winBounds.x = x; + winBounds.y = maxTop; + barWindow.setBounds(winBounds); + } + + /** + * Listens to the target window's move and resize events to reposition the corresponding search bar. + * + * @param {Electron.BrowserWindow} targetWindow + */ + [listenTargetEvents](targetWindow) { + targetWindow.on('resize', this[resizeHandler]); + targetWindow.on('move', this[moveHandler]); + targetWindow.on('close', this[targetCloseHandler]); + targetWindow.webContents.on('did-start-loading', this[targetReloadHandler]); + } + + /** + * Removes previously registered events. + * + * @param {Electron.BrowserWindow} targetWindow + */ + [unlistenTargetEvents](targetWindow) { + targetWindow.removeListener('resize', this[resizeHandler]); + targetWindow.removeListener('move', this[moveHandler]); + targetWindow.removeListener('close', this[targetCloseHandler]); + targetWindow.webContents.removeListener('did-start-loading', this[targetReloadHandler]); + } + + /** + * Listens to the search bar window events + * + * @param {Electron.BrowserWindow} barWindow + */ + [listenBarEvents](barWindow) { + barWindow.on('close', this[barCloseHandler]); + } + + /** + * Removes previously registered search events/ + * + * @param {Electron.BrowserWindow} barWindow + */ + [unlistenBarEvents](barWindow) { + barWindow.removeListener('close', this[barCloseHandler]); + } + + /** + * A handler for `resize` event from the app window. Repositions the search bar window. + * @param {any} e Event sent from the app window. + */ + [resizeHandler](e) { + const win = /** @type BrowserWindow */ (e.sender); + const item = this.map.find((entry) => entry.targetWindow === win); + if (!item) { + return; + } + this[positionWindow](item.barWindow, item.targetWindow); + } + + /** + * A handler for `move` event from the app window. Repositions the search bar window. + * @param {any} e Event sent from the app window. + */ + [moveHandler](e) { + const win = /** @type BrowserWindow */ (e.sender); + const item = this.map.find((entry) => entry.targetWindow === win); + if (!item) { + return; + } + this[positionWindow](item.barWindow, item.targetWindow); + } + + /** + * Event handler for the application window close handler. Removes this service from cache, + * closes search bar (if any) amd removes window listeners. + * @param {any} e Event sent from the app window. + */ + [targetCloseHandler](e) { + const win = /** @type BrowserWindow */ (e.sender); + const index = this.map.findIndex((entry) => entry.targetWindow === win); + if (index === -1) { + return + } + const item = this.map[index]; + this.map.splice(index, 1); + if (!item.barWindow.isDestroyed()) { + item.barWindow.close(); + } + } + + [barCloseHandler](e) { + const win = /** @type BrowserWindow */ (e.sender); + const index = this.map.findIndex((entry) => entry.barWindow === win); + if (index === -1) { + return + } + const item = this.map[index]; + this.map.splice(index, 1); + const { barWindow, targetWindow } = item; + if (!this.contents.includes(targetWindow.webContents)) { + const contentsIndex = this.contents.indexOf(targetWindow.webContents); + this.contents.splice(contentsIndex, 1); + } + targetWindow.webContents.stopFindInPage('clearSelection'); + this[unlistenBarEvents](barWindow); + this[unlistenTargetEvents](targetWindow); + } + + /** + * Focuses on the input element of the search bar + * + * @param {Electron.BrowserWindow} barWindow + */ + [focusBarInput](barWindow) { + if (barWindow.isDestroyed()) { + return; + } + if (!barWindow.isVisible()) { + barWindow.show(); + } + barWindow.webContents.send('command', 'focus-input'); + } + + /** + * @param {BrowserWindow} targetWindow + * @param {BrowserWindow} barWindow + * @param {string} query + * @param {Electron.FindInPageOptions=} opts + */ + [findHandler](targetWindow, barWindow, query, opts) { + if (!this.contents.includes(targetWindow.webContents)) { + this.contents.push(targetWindow.webContents); + targetWindow.webContents.on('found-in-page', this[foundInPageHandler].bind(this)); + } + + const request = targetWindow.webContents.findInPage(query, opts); + this.requests[request] = barWindow.webContents; + } + + /** + * @param {Electron.WebContents} targetContents + */ + [clearHandler](targetContents) { + const index = this.contents.findIndex((item) => item === targetContents); + targetContents.stopFindInPage('clearSelection'); + targetContents.removeAllListeners('found-in-page'); + this.contents.splice(index, 1); + } + + /** + * @param {Electron.Event} event + * @param {Electron.Result} detail + */ + [foundInPageHandler](event, detail) { + const { requestId, matches, activeMatchOrdinal } = detail; + const barContents = this.requests[requestId]; + if (!barContents) { + return; + } + delete this.requests[requestId]; + barContents.send('search-bar-found-in-page', matches, activeMatchOrdinal); + } + + /** + * @param {any} e + * @param {...any} args + */ + [searchBarCommandHandler](e, ...args) { + const contents = /** @type Electron.WebContents */ (e.sender); + const item = this.map.find((entry) => entry.barWindow.webContents === contents); + if (!item) { + return + } + const [command, ...rest] = args; + switch (command) { + case 'find': this[findHandler](item.targetWindow, item.barWindow, rest[0], rest[1]); break; + case 'clear': this[clearHandler](item.targetWindow.webContents); break; + case 'close': item.barWindow.close(); break; + default: + } + } + + [targetReloadHandler](e) { + const contents = /** @type Electron.WebContents */ (e.sender); + const item = this.map.find((entry) => entry.targetWindow.webContents === contents); + if (!item) { + return; + } + item.barWindow.close(); + } +} diff --git a/src/io/ContextActions.js b/src/io/ContextActions.js new file mode 100644 index 00000000..fa83e31a --- /dev/null +++ b/src/io/ContextActions.js @@ -0,0 +1,50 @@ +import { Menu } from 'electron'; +import { logger } from './Logger.js'; + +const selectionMenu = Menu.buildFromTemplate([ + {role: 'copy', accelerator: 'ctrl+c'}, + {type: 'separator'}, + {role: 'selectAll', accelerator: 'ctrl+a'}, +]); + +const inputMenu = Menu.buildFromTemplate([ + {role: 'undo', accelerator: 'ctrl+z'}, + {role: 'redo', accelerator: 'ctrl+shift+z'}, + {type: 'separator'}, + {role: 'cut', accelerator: 'ctrl+x'}, + {role: 'copy', accelerator: 'ctrl+c'}, + {role: 'paste', accelerator: 'ctrl+v'}, + {type: 'separator'}, + {role: 'selectAll', accelerator: 'ctrl+a'}, +]); + +/** + * A class responsible for gathering information about registered context menu + * actions and creating a configuration for opened windows. + */ +export class ContextActions { + /** + * Registers application default actions on the window object. + * + * @param {Electron.WebContents} webContents A web contents object of the renderer process + */ + registerDefaultActions(webContents) { + logger.debug('Registering window default context menu actions'); + webContents.on('context-menu', (e, props) => { + const { selectionText, isEditable, editFlags } = props; + if (isEditable) { + inputMenu.items[0].enabled = editFlags.canUndo; + inputMenu.items[1].enabled = editFlags.canRedo; + inputMenu.items[3].enabled = editFlags.canCut; + inputMenu.items[4].enabled = editFlags.canCopy; + inputMenu.items[5].enabled = editFlags.canPaste; + inputMenu.items[7].enabled = editFlags.canSelectAll; + inputMenu.popup(); + } else if (selectionText && selectionText.trim() !== '') { + inputMenu.items[0].enabled = editFlags.canCopy; + inputMenu.items[2].enabled = editFlags.canSelectAll; + selectionMenu.popup(); + } + }) + } +} diff --git a/src/io/EsmProtocol.js b/src/io/EsmProtocol.js new file mode 100644 index 00000000..d662648a --- /dev/null +++ b/src/io/EsmProtocol.js @@ -0,0 +1,195 @@ +/* eslint-disable no-bitwise */ +import { session, protocol } from 'electron'; +import path from 'path'; +import fs from 'fs-extra'; +import mime from 'mime-types'; +import { logger } from './Logger.js'; +import { MainWindowPersist, TaskManagerWindowPersist } from './Constants.js'; + +export const requestHandler = Symbol('requestHandler'); + +// const re = /import\s*(?:["']?([\w*{}\n, ]+)from\s*)?\s*["']?([@\w/\._-]+)["'].*/gm; +const locationPrefixes = ['web_modules', 'node_modules', 'src']; + +/** + * A class responsible for handling `web-module:` protocol. + * + * Components protocol is used to load ES modules with correct mime types. + * + * Example usage in the renderer process: + * + * ``` + * + * ``` + * + * This checks for existing component in following order: + * - ./bower_components/{url} (application main components) + * - {applicationUserDataDir}/{url} (application modules installation root) + * - {url} (filesystem) + * + * If the component does not exists then it throws an error. + */ +export class EsmProtocol { + constructor() { + this[requestHandler] = this[requestHandler].bind(this); + /** + * Base path to the application folder. + * @type {String} + */ + this.basePath = path.join(__dirname, '..', '..'); + } + + /** + * Registers the protocol handler. + * This must be called after the `ready` event. + */ + register() { + logger.debug('Registering ESM protocol'); + session.fromPartition(MainWindowPersist) + .protocol + .registerBufferProtocol('web-module', this[requestHandler]); + protocol + .registerBufferProtocol('web-module', this[requestHandler]); + session.fromPartition(TaskManagerWindowPersist) + .protocol + .registerBufferProtocol('web-module', this[requestHandler]); + } + + /** + * @param {Electron.ProtocolRequest} request + * @param {(response: string | Electron.ProtocolResponse) => void} callback + * @returns + */ + [requestHandler](request, callback) { + const url = new URL(request.url); + let fileLocation = this.findFile(url.pathname); + fileLocation = decodeURI(fileLocation); + // logger.silly(`EsmProtocolHandler::[requestHandler]: ${fileLocation}`); + fs.readFile(fileLocation, async (error, data) => { + if (error) { + logger.error(error); + // The file or directory cannot be found. + // NET_ERROR(FILE_NOT_FOUND, -6) + // @ts-ignore + callback(-6); + } else { + // let content = data; + const mimeType = mime.lookup(fileLocation) || 'application/octet-stream'; + // if (fileLocation.includes('node_modules/@api-modeling/')) { + // let str = data.toString(); + // const matches = [...str.matchAll(re)]; + // if (matches.length) { + // str = await this.makeRelativePaths(str, fileLocation, matches); + // } + // content = Buffer.from(str); + // } + callback({ + mimeType, + data, + }); + } + }); + } + + /** + * Finds a file location in one of the predefined paths. + * @param {string} filepath Request path + * @param {string[]} prefixes Location prefixes + * @returns {string} Location of the file. + */ + findFile(filepath, prefixes = locationPrefixes) { + for (let i = 0, len = prefixes.length; i } + */ + [actionHandler](e, action, ...args) { + switch (action) { + case 'create-file': return this[saveHandler](args[0], args[1]); + case 'list-folders': return this[listFoldersHandler](args[0]); + case 'create-app-folder': return this[createFolderHandler](args[0], args[1]); + case 'get-file': return this.getFile(args[0], args[1]); + default: throw new Error('Unknown action.'); + } + } + + /** + * @param {SaveDriveFileOptions} config The file meta data + * @param {any} data The data to store + */ + async [saveHandler](config, data) { + const { auth, id, meta } = config; + const resource = this._createResource(meta); + const media = this._createMedia(meta.mimeType, data); + if (id) { + return this.update(id, resource, media, config.parent, auth); + } + return this.create(resource, media, config.parent, auth); + } + + /** + * @param {any} opts + */ + async [listFoldersHandler](opts={}) { + if (this.cachedFolders) { + return this.cachedFolders; + } + const { auth } = opts; + const result = await this.listAppFolders(auth); + const folders = []; + if (result.files) { + result.files.forEach((item) => { + folders[folders.length] = { + id: item.id, + name: item.name, + }; + }); + } + this.cachedFolders = folders; + return folders; + } + + /** + * @param {string} name + * @param {OAuth2Authorization=} auth + * @return {Promise} + */ + async [createFolderHandler](name, auth={}) { + return this.ensureParent(name, auth); + } + + /** + * Creates media data used by this library + * @param {string} contentType The content type of the file. + * @param {any} data The data to upload. + * @return {FileMedia} Resource object + */ + _createMedia(contentType, data) { + let body = data; + if (typeof body !== 'string') { + body = JSON.stringify(body); + } + const media = { + mimeType: contentType || this.fileType, + body, + }; + return media; + } + + /** + * Creates resource data for Drive file. + * @param {FileResource} meta Passed user configuration + * @return {FileResource} Resource object + */ + _createResource(meta) { + const result = { ...meta }; + if (!result.description && this.fileDescription) { + result.description = this.fileDescription; + } + if (!result.mimeType && this.fileType) { + result.mimeType = this.fileType; + } + return result; + } + + /** + * Authorize the user with Google Drive. + * @param {OAuth2Authorization=} auth Passed `auth` object to create / update functions. + * @return {Promise} Promise resolved to token info object. + */ + async auth(auth) { + if (auth) { + if (auth.accessToken) { + return auth; + } + return Oauth2Identity.launchWebAuthFlow(auth); + } + return Oauth2Identity.getAuthToken({ interactive: true }); + } + + /** + * Lists folders in Google Drive. + * With regular set of authorization scopes this function lists folders + * created by this application. + * With additional scopes it will list all folders. + * ARC uses default set of scopes meaning it will only list folders + * previously created by it (as ling as OAuth client id is the same). + * @param {OAuth2Authorization=} auth The auth configuration. + * @return {Promise} Promise resolved to Drive response. + */ + async listAppFolders(auth) { + const info = await this.auth(auth); + if (info) { + return this._listAppFolders(info); + } + return undefined; + } + + /** + * Implementation for folders listing + * @param {OAuth2Authorization} auth + * @return {Promise} + */ + _listAppFolders(auth) { + const params = { + q: 'trashed = false and mimeType="application/vnd.google-apps.folder"', + orderBy: 'modifiedTime desc', + }; + let url = 'https://www.googleapis.com/drive/v3/files?'; + Object.keys(params).forEach((key) => { + url += `${key}=${encodeURIComponent(params[key])}&`; + }); + return new Promise((resolve, reject) => { + const request = net.request({ + method: 'GET', + url, + }); + request.setHeader('authorization', `Bearer ${auth.accessToken}`); + request.setHeader('accept', 'application/json'); + request.on('response', (response) => { + const body = /** @type Buffer[] */ ([]); + response.on('data', (chunk) => { + body.push(chunk); + }); + response.on('end', () => { + const data = Buffer.concat(body).toString(); + let parsed; + try { + parsed = JSON.parse(data); + } catch (e) { + reject(e); + return; + } + if (parsed.error) { + reject(new Error(parsed.message)); + } else { + resolve(parsed); + } + }); + }); + request.on('error', (error) => { + reject(error); + }); + request.end(); + }); + } + + /** + * Creates a Google Drive File. + * + * If `config.resource.mimeType` is not set and `drive.file.mime` is set then + * `this.mime` is used instead. + * + * This script will automatically set file thumbnail if not set + * (`config.resource.contentHints.thumbnail` object value). + * + * @param {FileResource} resource File metadata. + * @param {FileMedia} media A data to send with content type. + * @param {string=} parent The parent of the file. It may be the id of existing folder or a name of a folder to create + * @param {OAuth2Authorization=} auth The optional authorization + * @return {Promise} Promise resolved to Drive response object. + */ + async create(resource, media, parent, auth) { + if (!resource.mimeType && this.mime) { + resource.mimeType = this.mime; + } + const info = await this.auth(auth); + let parentInfo; + if (parent) { + parentInfo = await this.ensureParent(parent, info); + resource.parents = [parentInfo.id]; + } + const token = info.accessToken; + const url = await this._initializeSession(token, resource); + const result = await this._upload(token, url, media.body, media.mimeType); + if (parentInfo) { + result.parents = [parentInfo]; + } + return result; + } + + /** + * Update a file on Google Drive. + * + * @param {String} fileId A Google Drive file ID. + * @param {FileResource} resource The same as for `create` function. + * @param {FileMedia} media The same as for `create` function. + * @param {string=} parent The parent of the file. It may be the id of existing folder or a name of a folder to create + * @param {OAuth2Authorization=} auth The optional authorization + * @return {Promise} Fulfilled promise with file properties (the response). + */ + async update(fileId, resource, media, parent, auth) { + if (!resource.mimeType && this.mime) { + resource.mimeType = this.mime; + } + const info = await this.auth(auth); + const token = info.accessToken; + const url = await this._initializeSession(token, resource, fileId); + return this._upload(token, url, media.body, media.mimeType); + } + + /** + * Initializes resumable session to upload a file to Google Drive. + * @param {string} token Authorization token + * @param {FileResource=} meta Optional file meta data to send with the request + * @param {string=} fileId If it is the update request, this is file id to update + * @return {Promise} The upload URL. + */ + _initializeSession(token, meta, fileId) { + let url = 'https://www.googleapis.com/upload/drive/v3/files'; + let method; + if (fileId) { + url += `/${fileId}?uploadType=resumable`; + method = 'PATCH'; + } else { + url += '?uploadType=resumable'; + method = 'POST'; + } + return new Promise((resolve, reject) => { + const request = net.request({ + method, + url, + }); + request.setHeader('authorization', `Bearer ${token}`); + request.setHeader('Content-Type', 'application/json; charset=UTF-8'); + request.on('response', (response) => { + if (response.statusCode >= 400) { + const body = []; + response.on('data', (chunk) => { + body.push(chunk); + }); + response.on('end', () => { + const msg = `Could not initialize Drive upload session. Reason: ${Buffer.concat(body).toString()}`; + reject(new Error(msg)); + }); + return; + } + const result = response.headers.location; + if (result) { + resolve(Array.isArray(result) ? result[0] : result); + // response.destroy(); + } else { + reject(new Error('Could not initialize Drive upload session.')); + } + }); + request.on('error', (error) => { + reject(error); + }); + const message = meta ? JSON.stringify(meta) : undefined; + request.write(message); + request.end(); + }); + } + + /** + * Uploads the file to the upload endpoint. + * The `url` is received from the Drive upload location of the upload for + * the resource. + * @param {String} token + * @param {String} url + * @param {String} message + * @param {String} mimeType + * @return {Promise} + */ + _upload(token, url, message, mimeType) { + return new Promise((resolve, reject) => { + const request = net.request({ + method: 'PUT', + url, + }); + request.setHeader('authorization', `Bearer ${ token}`); + request.setHeader('content-type', mimeType); + request.on('response', (response) => { + const body = []; + response.on('data', (chunk) => { + body.push(chunk); + }); + response.on('end', () => { + const data = Buffer.concat(body).toString(); + let parsed; + try { + parsed = JSON.parse(data); + } catch (e) { + reject(e); + return; + } + resolve(parsed); + }); + }); + request.on('error', (error) => { + reject(error); + }); + request.write(message); + request.end(); + }); + } + + /** + * @param {string} parent The parent id or name. + * @param {OAuth2Authorization=} auth The auth configuration. + * @return {Promise} The id of the parent to use with the resource, + */ + async ensureParent(parent, auth) { + const result = await this.listAppFolders(auth); + if (result.files) { + const existing = result.files.find((item) => item.id === parent || item.name === parent); + if (existing) { + return existing; + } + } + return this.createFolder(parent, auth); + } + + /** + * Creates a Google Drive folder. + * + * @param {string} parent The folder name + * @param {OAuth2Authorization=} auth Authorization data to use + * @return {Promise} + */ + async createFolder(parent, auth) { + const info = await this.auth(auth); + const token = info.accessToken; + const item = await this._createFolder(parent, token); + if (!this.cachedFolders) { + this.cachedFolders = []; + } + this.cachedFolders.push(item); + return item; + } + + /** + * Makes a request to Drive API to create a folder. + * @param {String} name Folder name + * @param {String} token Authorization token. + * @return {Promise} A promise resolved to created folder ID. + */ + _createFolder(name, token) { + const url = 'https://content.googleapis.com/drive/v3/files?alt=json'; + const mimeType = 'application/vnd.google-apps.folder'; + const message = JSON.stringify({ + name, + mimeType, + }); + return new Promise((resolve, reject) => { + const request = net.request({ + method: 'POST', + url, + }); + request.setHeader('authorization', `Bearer ${token}`); + request.setHeader('content-type', 'application/json'); + request.on('response', (response) => { + const body = /** @type Buffer[] */ ([]); + response.on('data', (chunk) => { + body.push(chunk); + }); + response.on('end', () => { + const data = Buffer.concat(body).toString(); + let parsed; + try { + parsed = JSON.parse(data); + } catch (e) { + reject(e); + return; + } + if (parsed.error) { + reject(new Error(parsed.message)); + } else { + resolve(parsed); + } + }); + }); + request.on('error', (error) => { + reject(error); + }); + request.write(message); + request.end(); + }); + } + + /** + * Downloads the file data by given ID. + * @param {string} id File ID + * @param {OAuth2Authorization=} auth Authorization data to use + * @return {Promise} Promise resolved to file's string data. + */ + async getFile(id, auth) { + const info = await this.auth(auth); + return this._downloadFile(info, id); + } + + /** + * Makes a request to Drive API to download file content. + * @param {OAuth2Authorization} auth Authorization object. + * @param {string} id File id + * @return {Promise} + */ + _downloadFile(auth, id) { + const url = `https://www.googleapis.com/drive/v3/files/${id}?alt=media`; + return new Promise((resolve, reject) => { + const request = net.request({ + method: 'GET', + url, + }); + request.setHeader('authorization', `Bearer ${auth.accessToken}`); + request.on('response', (response) => { + let isError = false; + if (response.statusCode >= 400) { + isError = true; + } + const body = []; + response.on('data', (chunk) => { + body.push(chunk); + }); + response.on('end', () => { + let data = Buffer.concat(body).toString(); + if (isError) { + try { + let tmp = JSON.parse(data); + if (tmp.error) { + tmp = tmp.error; + } + if (tmp.message) { + data = (tmp.code ? (`${String(tmp.code)}: `) : '') + tmp.message; + } + } catch (_) { + // ... + } + reject(new Error(data)); + } else { + resolve(data); + } + }); + }); + request.on('error', (error) => { + reject(error); + }); + request.end(); + }); + } +} diff --git a/scripts/main/logger.js b/src/io/Logger.js similarity index 56% rename from scripts/main/logger.js rename to src/io/Logger.js index 96582395..835b969f 100644 --- a/scripts/main/logger.js +++ b/src/io/Logger.js @@ -1,22 +1,21 @@ -const path = require('path'); -const { app } = require('electron'); +/* eslint-disable no-param-reassign */ +/* eslint-disable no-console */ +import { app } from 'electron'; +import path from 'path'; +import { createLogger, format, transports } from 'winston'; -const { createLogger, format, transports } = require('winston'); const { combine, timestamp, printf } = format; -const myFormat = printf((info) => { - return `[${new Date(info.timestamp).toLocaleString()}]: ${info.level} ${info.message}`; -}); +const myFormat = printf((info) => `[${new Date(info.timestamp).toLocaleString()}]: ${info.level} ${info.message}`); let logRoot; try { logRoot = app.getPath('logs'); } catch (_) { - logRoot = app.getPath('userData', 'logs'); + logRoot = path.join(app.getPath('userData'), 'logs'); } const logPath = path.join(logRoot, 'log.log'); const errorPath = path.join(logRoot, 'error.log'); - const logger = createLogger({ exitOnError: false, level: 'warning', @@ -47,5 +46,19 @@ const logger = createLogger({ ) }); +/** + * + * @param {'debug'|'error'|'info'|'silly'|'verbose'|'warn'} level + */ +function setLevel(level) { + logger.transports.forEach((transport) => { + if (transport.level === undefined) { + return; + } + transport.level = level; + }); +} + + console.log('Log file path is', logPath); -module.exports = logger; +export { logger, setLevel }; diff --git a/src/io/PopupMenuService.js b/src/io/PopupMenuService.js new file mode 100644 index 00000000..b6d68be8 --- /dev/null +++ b/src/io/PopupMenuService.js @@ -0,0 +1,168 @@ +import { ipcMain } from 'electron'; +import { logger } from './Logger.js'; + +/** @typedef {import('./WindowsManager').WindowsManager} WindowsManager */ + +export const popupAppMenuHandler = Symbol('popupAppMenuHandler'); +export const windowClosedHandler = Symbol('windowClosedHandler'); +export const popupNavHandler = Symbol('popupNavHandler'); +export const addListeners = Symbol('addListeners'); +export const removeListeners = Symbol('removeListeners'); +export const createWindow = Symbol('createWindow'); +export const loadPage = Symbol('loadPage'); + +/** + * Application menu by default is embedded in main application window. + * User has an option to pop up menu to a new window. This class handles + * events from the renderer process to make it possible. + */ +export class PopupMenuService { + /** + * @param {WindowsManager} wm + */ + constructor(wm) { + this.wm = wm; + this.menuWindows = new Map(); + + this[popupAppMenuHandler] = this[popupAppMenuHandler].bind(this); + this[windowClosedHandler] = this[windowClosedHandler].bind(this); + this[popupNavHandler] = this[popupNavHandler].bind(this); + } + + listen() { + logger.debug('Listening for menu popup events'); + ipcMain.on('popup-app-menu', this[popupAppMenuHandler]); + ipcMain.on('popup-app-menu-nav', this[popupNavHandler]); + } + + /** + * Handler for `popup-app-menu` event dispatched by ARC windows. + * @param {Event} e + * @param {string} type Menu type + * @param {object=} sizing `width` and `height` + */ + [popupAppMenuHandler](e, type, sizing) { + logger.debug('Handling menu popup event from app window.'); + if (this.menuWindows.has(type)) { + logger.debug('Showing existing window.'); + const menu = this.menuWindows.get(type); + menu.show(); + return; + } + this.createMenuWindow(type, sizing); + } + + /** + * Creates menu window object. + * If the `type` already exists then nothing happens. + * @param {string} type Menu type + * @param {object=} sizing `width` and `height` + */ + async createMenuWindow(type, sizing={}) { + if (this.menuWindows.has(type)) { + return; + } + logger.debug(`Creating menu popup window for type: ${type}`); + const width = sizing.width ? sizing.width : 320; + const height = sizing.height ? sizing.height : 800; + const win = await this.wm.open({ + sizing: { + width, + height, + }, + params: { + type + }, + // noMenu: true, + page: 'popup-menu.html', + preload: 'popup-menu.js', + }); + this[addListeners](win); + this.menuWindows.set(type, win); + this.wm.notifyAll('popup-app-menu-opened', type); + } + + /** + * @param {Electron.BrowserWindow} bw + */ + [addListeners](bw) { + bw.addListener('closed', this[windowClosedHandler]); + } + + /** + * @param {Electron.BrowserWindow} bw + */ + [removeListeners](bw) { + bw.removeListener('closed', this[windowClosedHandler]); + } + + /** + * Handler for the BrowserWindow `closed` event. + * + * @param {Electron.Event} e Event emitted by the window. + */ + [windowClosedHandler](e) { + // @ts-ignore + const win = /** @type BrowserWindow */ (e.sender); + const entires = this.menuWindows.entries(); + let type; + for (const [key, value] of entires) { + if (value === win) { + type = key; + break; + } + } + if (!type) { + return; + } + this[removeListeners](win); + this.menuWindows.delete(type); + this.wm.notifyAll('popup-app-menu-closed', type); + } + + /** + * Handler for an event dispatched by popup menu when navigation action was + * performed. + * @param {Event} e + * @param {string} type Navigation type + * @param {...string[]} detail Arguments + */ + [popupNavHandler](e, type, ...detail) { + logger.debug('Handling popup menu event from the menu.'); + if (!this.wm.hasWindow) { + logger.warn('Popup menu event handled without menu window registered.'); + return; + } + const win = this.wm.lastArcFocused; + if (!win) { + logger.warn('Unable to perform navigation. No active window found.'); + return; + } + logger.debug('Sending navigate event to the renderer process.'); + win.webContents.send('app-navigate', type, detail); + } + + /** + * Removes all generated menu windows. + */ + clear() { + logger.debug('Removing all menu popup windows.'); + for (const win of this.menuWindows.values()) { + win.destroy(); + } + } + + /** + * Toggles entire menu window. + */ + togglePopupMenu() { + logger.debug('Toggling menu popup window.'); + const win = this.menuWindows.get('*'); + if (win) { + win.destroy(); + } else { + this.clear(); + this.createMenuWindow('*'); + } + } +} diff --git a/src/io/PreferencesManager.js b/src/io/PreferencesManager.js new file mode 100644 index 00000000..9c74f13c --- /dev/null +++ b/src/io/PreferencesManager.js @@ -0,0 +1,122 @@ +import { ipcMain } from 'electron'; +import log from 'electron-log'; +import { ArcPreferences } from "../common/ArcPreferences.js"; + +/** @typedef {import('@advanced-rest-client/arc-types').Config.ARCConfig} ARCConfig */ + +export const readHandler = Symbol('readHandler'); +export const changeHandler = Symbol('changeHandler'); + +export class PreferencesManager extends ArcPreferences { + /** + * @constructor + * + * @param {string} file The settings file name + */ + constructor(file) { + super(file); + this[readHandler] = this[readHandler].bind(this); + this[changeHandler] = this[changeHandler].bind(this); + } + + /** + * Listens for application events related to preferences management. + */ + observe() { + ipcMain.handle('preferences-read', this[readHandler]); + ipcMain.handle('preferences-update', this[changeHandler]); + } + + /** + * Loads current settings from settings file. + * This is just to provide typings. + * + * @returns {Promise} Promise resolved to a settings file. + */ + async load() { + return super.load(); + } + + async [readHandler]() { + let data; + try { + data = await this.load(); + } catch (cause) { + log.error(cause); + // eslint-disable-next-line no-console + console.error(cause); + throw cause; + } + return data; + } + + /** + * Handler for the IPC `update-app-preference` event + * + * @param {Event} event + * @param {string} path Preference name + * @param {any} value Preference value + */ + async [changeHandler](event, path, value) { + try { + const data = await this.load(); + this.updateValue(data, path, value); + await this.store(); + this.informChange(path, value); + } catch (cause) { + log.error(cause); + // eslint-disable-next-line no-console + console.error(cause); + throw cause; + } + } + + /** + * Informs all available windows about the change in the preferences. + * @param {string} name Preference name + * @param {string} value New value + */ + informChange(name, value) { + this.emit('settings-changed', name, value); + } + + /** + * Creates default settings object. + * + * @return {Promise} Default settings object. + */ + async defaultSettings() { + return /** @type ARCConfig */ ({ + view: { + draggableEnabled: true, + listType: 'default', + popupMenu: true, + }, + history: { + enabled: true, + fastSearch: true, + }, + privacy: { + telemetry: false, + exceptionsOnly: true, + }, + request: { + followRedirects: true, + useAppVariables: true, + useSystemVariables: true, + }, + requestEditor: { + bodyEditor: 'Monaco', + progressInfo: true, + sendButton: true, + }, + response: { + warningResponseMaxSize: 2048, + forceRawSize: 4096, + }, + updater: { + auto: true, + }, + }); + } +} diff --git a/src/io/SessionManager.js b/src/io/SessionManager.js new file mode 100644 index 00000000..d255f8cb --- /dev/null +++ b/src/io/SessionManager.js @@ -0,0 +1,367 @@ +/* eslint-disable no-await-in-loop */ +import { session, BrowserWindow, ipcMain, app } from 'electron'; +import { EventEmitter } from 'events'; +import { WebSessionPersist } from './Constants.js'; +import { logger } from './Logger.js'; + +/** @typedef {import('../types').SessionManagerConfig} SessionManagerConfig */ +/** @typedef {import('electron').Cookie} Cookie */ +/** @typedef {import('electron').Cookies} Cookies */ +/** @typedef {import('electron').CookiesSetDetails} CookiesSetDetails */ + +const cookieChangedHandler = Symbol('cookieChangedHandler'); +const getAllCookiesHandler = Symbol('getAllCookiesHandler'); +const openSessionWindowHandler = Symbol('openSessionWindowHandler'); +const computeCookieUrl = Symbol('computeCookieUrl'); +const getDomainCookiesHandler = Symbol('getDomainCookiesHandler'); +const getUrlCookiesHandler = Symbol('getUrlCookiesHandler'); +const setCookieHandler = Symbol('setCookieHandler'); +const setCookiesHandler = Symbol('setCookiesHandler'); +const removeCookieHandler = Symbol('removeCookieHandler'); +const removeCookiesHandler = Symbol('removeCookiesHandler'); +const handleCertIssue = Symbol('handleCertIssue'); +const isAppUsedUrl = Symbol('isAppUsedUrl'); +const sessionValue = Symbol('sessionValue'); + +/** + * A class responsible for managing chrome web session. + */ +export class SessionManager extends EventEmitter { + /** + * @return {Cookies} Instance of the session cookies object + */ + get session() { + let existing = this[sessionValue]; + if (!existing) { + this[sessionValue] = this.getSessionCookies(); + existing = this[sessionValue]; + } + return existing; + } + + /** + * @param {SessionManagerConfig=} opts Configuration options + */ + constructor(opts={}) { + super(); + this.appUrls = opts.appUrls; + + [ + cookieChangedHandler, + getAllCookiesHandler, + openSessionWindowHandler, + getDomainCookiesHandler, + getUrlCookiesHandler, + setCookieHandler, + setCookiesHandler, + removeCookieHandler, + removeCookiesHandler, + handleCertIssue, + ].forEach((symbol) => { + this[symbol] = this[symbol].bind(this); + }); + } + + /** + * Listens on the IPC events from the renderer + */ + listen() { + this.session.on('changed', this[cookieChangedHandler]); + ipcMain.on('open-web-url', this[openSessionWindowHandler]); + ipcMain.handle('cookies-session-get-all', this[getAllCookiesHandler]); + ipcMain.handle('cookies-session-get-domain', this[getDomainCookiesHandler]); + ipcMain.handle('cookies-session-get-url', this[getUrlCookiesHandler]); + ipcMain.handle('cookies-session-set-cookie', this[setCookieHandler]); + ipcMain.handle('cookies-session-set-cookies', this[setCookiesHandler]); + ipcMain.handle('cookies-session-remove-cookie', this[removeCookieHandler]); + ipcMain.handle('cookies-session-remove-cookies', this[removeCookiesHandler]); + app.on('certificate-error', this[handleCertIssue]); + } + + /** + * Un-listens previously registered listeners + */ + unlisten() { + this.session.removeListener('changed', this[cookieChangedHandler]); + ipcMain.removeListener('open-web-url', this[openSessionWindowHandler]); + ipcMain.removeHandler('cookies-session-get-all'); + ipcMain.removeHandler('cookies-session-get-domain'); + ipcMain.removeHandler('cookies-session-get-url'); + ipcMain.removeHandler('cookies-session-set-cookie'); + ipcMain.removeHandler('cookies-session-set-cookies'); + ipcMain.removeHandler('cookies-session-remove-cookie'); + ipcMain.removeHandler('cookies-session-remove-cookies'); + app.removeListener('certificate-error', this[handleCertIssue]); + this[sessionValue] = null; + } + + /** + * @param {Event} e + * @param {string} url + * @param {string} purpose + */ + [openSessionWindowHandler](e, url, purpose) { + switch (purpose) { + case 'web-session': this.openWebBrowser(url); break; + default: + } + } + + /** + * @param {Event} e + * @param {Cookie} cookie + * @param {string} cause + * @param {boolean} removed + */ + [cookieChangedHandler](e, cookie, cause, removed) { + const data = { + cookie, + cause, + removed, + }; + this.emit('cookie-changed', data); + } + + /** + * @return {Cookies} Electron's Cookies class instance for session window. + */ + getSessionCookies() { + const sis = session.fromPartition(WebSessionPersist); + return sis.cookies; + } + + /** + * Retrieves all cookies stored with the session. + * @return {Promise} A promise resolved to a list of cookies. + */ + async [getAllCookiesHandler]() { + return this.getAllCookies(); + } + + /** + * Retrieves all cookies stored with the session. + * @return {Promise} A promise resolved to a list of cookies. + */ + async getAllCookies() { + return this.session.get({}); + } + + /** + * Retrieves cookies stored with the session for given domain. + * @param {String} domain + * @return {Promise} A promise resolved to a list of cookies. + */ + async getDomainCookies(domain) { + return this.session.get({ domain }); + } + + /** + * Retrieves cookies stored with the session for given url. + * @param {string} url + * @return {Promise} A promise resolved to a list of cookies. + */ + async getUrlCookies(url) { + return this.session.get({ url }); + } + + /** + * Computes a cookie URL from the cookie definition + * + * @param {Cookie} cookie + * @param {boolean=} secured + * @return {string} + */ + [computeCookieUrl](cookie, secured=false) { + let { domain='' } = cookie; + if (domain[0] === '.') { + domain = domain.substr(1); + } + let protocol = 'http'; + if (secured) { + protocol += 's'; + } + protocol += '://'; + return protocol + domain + (cookie.path || '/'); + } + + /** + * Sets a cookie in the cookie store + * + * @param {CookiesSetDetails|Cookie} cookie + * @return {Promise} + */ + async setCookie(cookie) { + const typedSet = /** @type CookiesSetDetails */ (cookie); + const typed = /** @type Cookie */ (cookie); + if (!typedSet.url) { + typedSet.url = this[computeCookieUrl](typed, cookie.secure); + } + try { + await this.session.remove(typedSet.url, typedSet.name); + await this.session.set(typedSet); + await this.session.flushStore(); + } catch (e) { + logger.error(e.message); + logger.error(e); + } + return typedSet; + } + + /** + * Removes a cookie from the store + * + * @param {Cookie | CookiesSetDetails} cookie + * @param {boolean} flush + * @return {Promise} + */ + async removeCookie(cookie, flush=true) { + const typed = /** @type CookiesSetDetails */ (cookie); + const { name, url } = typed; + if (url) { + await this.session.remove(url, name); + } else { + const typedCookie = /** @type Cookie */ (cookie); + await this.removeCookieMakeUrl(typedCookie, name); + } + if (flush) { + await this.session.flushStore(); + } + } + + /** + * Removes a cookie from the store using cookie details to construct the URL. + * + * @param {Cookie} cookie + * @param {string} name + * @return {Promise} + */ + async removeCookieMakeUrl(cookie, name) { + const typed = /** @type Cookie */ (cookie); + const httpUrl = this[computeCookieUrl](typed); + const httpsUrl = this[computeCookieUrl](typed, true); + await this.session.remove(httpUrl, name); + await this.session.remove(httpsUrl, name); + } + + /** + * Opens a new browser window for given URL so the user can + * authenticate himself in the external service and the app will store + * cookies from this session. + * @param {string} url An URL to open + * @return {BrowserWindow} an instance of created window. + */ + openWebBrowser(url) { + const bw = new BrowserWindow({ + webPreferences: { + partition: WebSessionPersist, + nodeIntegration: false, + }, + }); + bw.loadURL(url, { userAgent: 'Chrome' }); + return bw; + } + + /** + * Handler for the read cookies for a domain event + * @param {Event} e + * @param {string} domain + * @return {Promise} + */ + async [getDomainCookiesHandler](e, domain) { + return this.getDomainCookies(domain); + } + + /** + * Handler for the list all cookies event + * @param {Event} e + * @param {string} url + * @return {Promise} + */ + async [getUrlCookiesHandler](e, url) { + return this.getUrlCookies(url); + } + + /** + * @param {Event} e + * @param {Cookie | CookiesSetDetails} cookie + * @return {Promise} + */ + async [setCookieHandler](e, cookie) { + return this.setCookie(cookie); + } + + /** + * @param {Event} e + * @param {(Cookie | CookiesSetDetails)[]} cookies + * @return {Promise} + */ + async [setCookiesHandler](e, cookies) { + for (let i = 0, len = cookies.length; i < len; i++) { + await this.setCookie(cookies[i]); + } + } + + /** + * @param {Event} e + * @param {(Cookie | CookiesSetDetails)[]} cookies + * @return {Promise} + */ + async [removeCookiesHandler](e, cookies) { + for (let i = 0, len = cookies.length; i < len; i++) { + await this.removeCookie(cookies[i], false); + } + await this.session.flushStore(); + } + + /** + * @param {Event} e + * @param {Cookie | CookiesSetDetails} cookie + * @return {Promise} + */ + async [removeCookieHandler](e, cookie) { + await this.removeCookie(cookie); + } + + /** + * Allows to ignore certificate errors when opening session window. + * + * @param {Event} e + * @param {Object} webContents + * @param {String} url + * @param {Object} error + * @param {Object} certificate + * @param {Function} callback + */ + [handleCertIssue](e, webContents, url, error, certificate, callback) { + if (this[isAppUsedUrl](url)) { + callback(false); + } else { + e.preventDefault(); + callback(true); + } + } + + /** + * Checks if given URL is used by the application to request an external resource. + * It is used by the `[handleCertIssue]()` function to determine if allow + * bypass certificate error. + * Each application registered URL should be evaluated by Chromium default + * certificate test engine. Otherwise it's a user entered URL in + * web session and certificate test should be bypassed. + * + * @param {string} url An url + * @return {boolean} True if certificate validation should be applied. + */ + [isAppUsedUrl](url) { + const { appUrls } = this; + if (!url || !appUrls || !appUrls.length) { + return false; + } + for (let i = 0, len = this.appUrls.length; i < len; i++) { + if (url.indexOf(this.appUrls[i]) !== -1) { + return true; + } + } + return false; + } +} diff --git a/src/io/TelemetryConsent.js b/src/io/TelemetryConsent.js new file mode 100644 index 00000000..0c787b72 --- /dev/null +++ b/src/io/TelemetryConsent.js @@ -0,0 +1,67 @@ +/* eslint-disable no-param-reassign */ +import fs from 'fs-extra'; +import path from 'path'; +import { ipcMain, app, shell } from 'electron'; + +/** @typedef {import('./WindowsManager').WindowsManager} WindowsManager */ + +/** + * Users privacy is a great concern for this project. Therefore this class + * runs before the any ARC window is created to ask whether the user consent to + * send limited and anonymous data to Google Analytics. + * + * This checks whether the lock file is created in the application folder. If so the + * consent flow is canceled. + * It renders the UI to ask the user about the analytics data. The user choice is + * reflected in the application configuration. + */ +export class TelemetryConsent { + /** + * @param {WindowsManager} wm + */ + constructor(wm) { + this.wm = wm; + this.lockFile = path.join(process.env.ARC_HOME, '.telemetry-consent.lock'); + } + + /** + * Runs the analytics data consent flow. + * @returns {Promise} + */ + async run() { + const lockExists = await fs.pathExists(this.lockFile); + if (lockExists) { + return undefined; + } + await this.renderDialog(); + ipcMain.on('telemetry-set', this.pageHandler.bind(this)); + return new Promise((resolve) => { + this.resolve = resolve; + }); + } + + async renderDialog() { + const win = await this.wm.open({ + ignoreWindowSessionSettings: true, + noMenu: true, + page: 'analytics-consent.html', + preload: 'arc-preload.js', + sizing: { + width: 1024, + height: 800, + } + }); + this.loader = win; + win.setMenu(null); + win.webContents.on('new-window', (event, url) => { + event.preventDefault(); + shell.openExternal(url); + }); + } + + async pageHandler() { + await fs.ensureFile(this.lockFile); + app.relaunch(); + app.quit(); + } +} diff --git a/src/io/ThemeManager.js b/src/io/ThemeManager.js new file mode 100644 index 00000000..4b21e556 --- /dev/null +++ b/src/io/ThemeManager.js @@ -0,0 +1,186 @@ +/* eslint-disable no-param-reassign */ +import { ipcMain } from 'electron'; +import { ThemeInfo } from './models/ThemeInfo.js'; +import { ThemePluginsManager } from './ThemePluginsManager.js'; +import { logger } from './Logger.js'; + +/** @typedef {import('./ArcEnvironment').ArcEnvironment} ArcEnvironment */ +/** @typedef {import('@advanced-rest-client/arc-types').Themes.ArcThemeStore} ArcThemeStore */ +/** @typedef {import('@advanced-rest-client/arc-types').Themes.InstalledTheme} InstalledTheme */ + +export const checkUpdateDebounce = Symbol('checkUpdateDebounce'); +export const checkUpdate = Symbol('checkUpdate'); + +export class ThemeManager { + /** + * + * @param {ArcEnvironment} arcApp + * @param {boolean} skipUpdateCheck + */ + constructor(arcApp, skipUpdateCheck) { + this.arcApp = arcApp; + /** + * ARC default theme ID + * @type {string} + */ + this.defaultTheme = '@advanced-rest-client/arc-electron-default-theme'; + this.readState = this.readState.bind(this); + this.readActive = this.readActive.bind(this); + this.activateTheme = this.activateTheme.bind(this); + this.installTheme = this.installTheme.bind(this); + this.uninstallTheme = this.uninstallTheme.bind(this); + this.updatePropertyHandler = this.updatePropertyHandler.bind(this); + + this.manager = new ThemePluginsManager(); + if (!skipUpdateCheck) { + this[checkUpdateDebounce](); + } + } + + /** + * Creates a model for theme info file. + * @return {ThemeInfo} + */ + get themeInfo() { + return new ThemeInfo(); + } + + /** + * Listens for the ipc events to support theme changes + */ + listen() { + ipcMain.handle('theme-manager-read-themes', this.readState); + ipcMain.handle('theme-manager-active-theme-info', this.readActive); + ipcMain.handle('theme-manager-activate-theme', this.activateTheme); + ipcMain.handle('theme-manager-install-theme', this.installTheme); + ipcMain.handle('theme-manager-uninstall-theme', this.uninstallTheme); + ipcMain.handle('theme-manager-update-property', this.updatePropertyHandler); + } + + /** + * Removes event listeners + */ + unlisten() { + ipcMain.removeHandler('theme-manager-read-themes'); + ipcMain.removeHandler('theme-manager-active-theme-info'); + ipcMain.removeHandler('theme-manager-activate-theme'); + ipcMain.removeHandler('theme-manager-install-theme'); + ipcMain.removeHandler('theme-manager-uninstall-theme'); + ipcMain.removeHandler('theme-manager-update-property'); + } + + /** + * Reads the current theme info + * @returns {Promise} + */ + async readState() { + return this.themeInfo.load(); + } + + /** + * @returns {Promise} + */ + async readActive() { + const state = await this.readState(); + const { themes, active } = state; + if (!Array.isArray(themes)) { + throw new Error(`No installed themes available.`); + } + const { defaultTheme } = this; + // first find the active theme + let info = themes.find((theme) => theme.name === active || theme._id === active); + if (!info && active === defaultTheme) { + throw new Error(`The default theme is not installed.`); + } + if (info) { + return info; + } + // then find the default theme. + info = themes.find((theme) => theme.name === defaultTheme || theme._id === defaultTheme); + if (!info && active === defaultTheme) { + throw new Error(`The default theme is not installed.`); + } + return info; + } + + /** + * A handler for the `theme-manager-activate-theme` event from the renderer + * process. + * @param {any} event + * @param {string} name + * @returns {Promise} + */ + async activateTheme(event, name) { + await this.themeInfo.setActive(name); + this.arcApp.wm.notifyAll('theme-manager-theme-activated', name); + } + + /** + * @param {any} e + * @param {string} name The theme to install + * @returns {Promise} + */ + async installTheme(e, name) { + if (!name || typeof name !== 'string') { + throw new Error('The name is not valid.'); + } + const index = name.indexOf('#'); + let version; + if (index !== -1) { + version = name.substr(index + 1); + name = name.substr(0, index); + } + const info = await this.manager.install(name, version); + await this.activateTheme(e, info.name); + } + + /** + * @param {any} e + * @param {string} name The theme to uninstall + * @returns {Promise} + */ + async uninstallTheme(e, name) { + if (!name || typeof name !== 'string') { + throw new Error('The name is not valid.'); + } + await this.manager.uninstall(name); + await this.activateTheme(e, this.defaultTheme); + } + + [checkUpdateDebounce]() { + setTimeout(() => this[checkUpdate](), 10000); + } + + async [checkUpdate]() { + logger.debug('Checking for themes updates...'); + try { + const info = await this.manager.checkForUpdates(); + if (!info || !info.length) { + logger.debug('Themes update not available.'); + return; + } + logger.debug('Updating themes....'); + const result = await this.manager.update(info); + result.forEach((item) => { + if (!item.error) { + return; + } + const { name, message } = item; + logger.info(`Theme ${name} update error: ${message}`); + }); + logger.info('Themes updated. The change will be applied with next app reload.'); + } catch (e) { + logger.error(e); + } + } + + /** + * @param {any} e + * @param {string} path The path to the value + * @param {any} value The value to set. + * @returns {Promise} + */ + async updatePropertyHandler(e, path, value) { + await this.themeInfo.setProperty(path, value); + } +} diff --git a/src/io/ThemePluginsManager.js b/src/io/ThemePluginsManager.js new file mode 100644 index 00000000..0869d69f --- /dev/null +++ b/src/io/ThemePluginsManager.js @@ -0,0 +1,347 @@ +/* eslint-disable no-await-in-loop */ +/* eslint-disable no-bitwise */ +/* eslint-disable no-param-reassign */ +import { app } from 'electron'; +import path from 'path'; +import fs from 'fs-extra'; +import { PluginManager } from 'live-plugin-manager'; +import semver from 'semver'; +import { ThemeInfo } from './models/ThemeInfo.js'; +import { logger } from './Logger.js'; + +/** @typedef {import('@advanced-rest-client/arc-types').Themes.ArcThemeStore} ArcThemeStore */ +/** @typedef {import('@advanced-rest-client/arc-types').Themes.InstalledTheme} InstalledTheme */ +/** @typedef {import('live-plugin-manager').IPluginInfo} IPluginInfo */ +/** @typedef {import('live-plugin-manager').PackageInfo} PackageInfo */ + +export class ThemePluginsManager { + #pluginManager = new PluginManager({ + cwd: process.env.ARC_THEMES, + pluginsPath: process.env.ARC_THEMES + }); + + + /** + * Creates a model for theme info file. + * @return {ThemeInfo} + */ + get themeInfo() { + return new ThemeInfo(); + } + + /** + * Resolves file path to correct path if it's starts with `~`. + * + * @param {String} file Settings file path + * @return {String} Path to the file. + */ + resolvePath(file) { + if (file && file[0] === '~') { + file = app.getPath('home') + file.substr(1); + } + return file; + } + + /** + * Installs a theme package to the themes directory. + * @param {string} name NPM name or Github repo. Local paths are symlink to target location. + * @param {String=} version Theme version to install. + * @returns {Promise} + */ + async install(name, version) { + let message = `Installing theme: ${name}`; + if (version) { + message += `, version ${version}`; + } + logger.info(message); + const info = await this._installPackage(name, version); + await this.themeInfo.addTheme(info); + return info; + } + + /** + * Implementation of installation process. + * + * If the `name` argument represents a path to a directory then + * local installation is performed. PluginManager is used otherwise. + * + * @param {String} name NPM name or Github repo. Local paths are symlink + * to target location. + * @param {String} version Theme version to install. + * @return {Promise} Promise resolved to theme info object + */ + _installPackage(name, version) { + try { + fs.accessSync(name, fs.constants.R_OK | fs.constants.X_OK); + return this._installLocalPackage(name); + } catch (_) { + return this._installRemotePackage(name, version); + } + } + + /** + * Creates a symlink from a local package to themes directory. + * @param {string} name Package location. + * @return {Promise} Promise resolved to theme info object + */ + async _installLocalPackage(name) { + logger.info('Installing theme from local sources...'); + let pkg; + try { + pkg = await fs.readJson(path.join(name, 'package.json')); + } catch (e) { + logger.error(e); + throw new Error('Unable to read package.json file of the theme.'); + } + + const location = path.join(process.env.ARC_THEMES, pkg.name); + let mainFile; + if (pkg.main) { + mainFile = path.join(location, pkg.main); + } else { + mainFile = path.join(location, path.basename(name)); + } + + const info = /** @type InstalledTheme */ ({ + isSymlink: true, + _id: pkg.name, + name: pkg.name, + version: pkg.version, + location, + mainFile, + description: pkg.description, + isDefault: false, + }); + if (pkg.themeTitle) { + info.title = pkg.themeTitle; + } + + await this._ensureSymlinkPath(location); + await fs.symlink(path.resolve(name), path.resolve(info.location), 'dir'); + + logger.info('Installation complete.'); + return info; + } + + /** + * Ensures the path to create a symlink is created. + * @param {string} location Symlink location + * @return {Promise} + */ + async _ensureSymlinkPath(location) { + location = path.dirname(location); + await fs.ensureDir(location); + } + + /** + * Uses PluginManager to install package from npm or GitHub. + * @param {string} name NPM name or Github repo. Local paths are symlink + * to target location. + * @param {string} version Theme version to install. + * @return {Promise} Promise resolved to theme info object + */ + async _installRemotePackage(name, version) { + logger.info('Installing theme from remote sources...'); + const [n, v] = this._prepareSourceAndVersion(name, version); + const result = await this.#pluginManager.install(n, v); + const info = /** @type InstalledTheme */ ({ + isSymlink: false, + _id: result.name, + name: result.name, + version: result.version, + location: result.location, + mainFile: result.mainFile, + title: '', + description: '', + isDefault: false, + }); + return info; + } + + /** + * Uninstalls package and removes it from the registry file. + * @param {string} name Name of the package. + * @return {Promise} + */ + async uninstall(name) { + logger.info(`Uninstalling theme ${name}`); + await this._uninstallPackage(name); + await this.themeInfo.removeTheme(name); + } + + /** + * Implementation of removing process. + * @param {string} name NPM name or Github repo. Local paths are symlink + * to target location. + * @return {Promise} Promise resolved to theme info object + */ + async _uninstallPackage(name) { + const info = await this.themeInfo.readTheme(name); + if (!info) { + throw new Error(`Package ${name} is not installed.`); + } + if (info.isSymlink) { + await fs.remove(info.location); + } else { + await this.#pluginManager.uninstall(info.name); + } + return info; + } + + /** + * Updates themes from passed list. + * @param {{name: string, version: string}[]} data A list of objects with `name` and `version` + * @returns {Promise<{name: string, error: boolean, message?: string}[]>} Update result. + */ + async update(data) { + const result = []; + for (let i = 0, len = data.length; i < len; i++) { + const { name, version } = data[i]; + try { + await this._installPackage(name, version); + await this.themeInfo.setThemeVersion(name, version); + result[result.length] = { + error: false, + name, + }; + } catch (e) { + result[result.length] = { + error: true, + message: e.message, + name, + }; + } + } + return result; + } + + + /** + * Checks for updates to all installed packages. + * @return {Promise} Promise resolved to a map of package names and + * info objects downloaded from the remote server. Only packages with + * update available are returned. + */ + async checkForUpdates() { + const candidates = await this._getUpdateCandidates(); + const result = []; + for (let i = 0, len = candidates.length; i < len; i++) { + const item = candidates[i]; + const data = await this._processCandidateUpdateInfo(item); + if (data) { + result[result.length] = data; + } + } + return result; + } + + /** + * @returns {Promise<{name: string, version: string}[]>} The list of installed packages to check for the update. + */ + async _getUpdateCandidates() { + const now = Date.now(); + const info = await this.themeInfo.load(); + const { themes } = info; + const names = []; + themes.forEach((item) => { + if (item.isSymlink) { + return; + } + if (item.updateCheck) { + const delta = now - item.updateCheck; + if (delta < 7.2e+6) { + // 2 hours + return; + } + } + names[names.length] = { + name: item.name, + version: item.version + }; + }); + return names; + } + + /** + * + * @param {{name: string, version: string}} candidate The package to check for update. + * @returns {Promise} + */ + async _processCandidateUpdateInfo(candidate) { + const { name, version } = candidate; + /* eslint-disable require-atomic-updates */ + let result; + try { + result = await this.checkUpdateAvailable(name, version); + await this.themeInfo.setUpdateCheckTime(name); + } catch (e) { + logger.warn(`Unable to get theme package info ${e.message}`); + } + return result; + } + + /** + * Checks whether an update is available for the theme. + * @param {string} name The theme `name` + * @param {string} version The current version + * @returns {Promise} + */ + async checkUpdateAvailable(name, version) { + const names = this._prepareSourceAndVersion(name, version); + const localInfo = await this.themeInfo.readTheme(name); + const remoteInfo = await this.#pluginManager.queryPackage(names[0]); + if (!this._compareVersions(remoteInfo, localInfo)) { + return undefined; + } + if (this._compareEngines(remoteInfo)) { + return remoteInfo; + } + return undefined; + } + + + /** + * Checks whether the version of the remove package is higher then the local package. + * @param {PackageInfo} remoteInfo Remote package version + * @param {InstalledTheme} localInfo Local package version + * @returns {boolean} + */ + _compareVersions(remoteInfo, localInfo) { + return semver.gt(remoteInfo.version, localInfo.version); + } + + /** + * @param {PackageInfo} remoteInfo + * @returns {boolean} + */ + _compareEngines(remoteInfo) { + // @ts-ignore + const { engines } = remoteInfo; + if (!engines || !engines.arc) { + return true; + } + const engine = engines.arc; + const version = process.env.npm_package_version; + if (semver.validRange(engine)) { + return semver.satisfies(version, engine); + } + return true; + } + + /** + * Processes source and version properties to produce right input for + * `live-plugin-manager` + * @param {string} source NPM name or Github repo + * @param {string=} version Theme version to install. + * @return {string[]} First item is the source and version the other. + */ + _prepareSourceAndVersion(source, version) { + if (source.indexOf('/') !== -1 && source[0] !== '@') { + if (!version) { + version = 'master'; + } + version = `${source}#${version}`; + } + return [source, version]; + } +} diff --git a/src/io/ThemesProtocol.js b/src/io/ThemesProtocol.js new file mode 100644 index 00000000..81d1930b --- /dev/null +++ b/src/io/ThemesProtocol.js @@ -0,0 +1,142 @@ +/* eslint-disable no-bitwise */ +import { session } from 'electron'; +import path from 'path'; +import fs from 'fs-extra'; +import { logger } from './Logger.js'; +import { MainWindowPersist, TaskManagerWindowPersist } from './Constants.js'; +import { ThemeInfo } from './models/ThemeInfo.js'; + +export const requestHandler = Symbol('requestHandler'); + +/** + * A class responsible for handling `themes:` protocol. + * + * + * + * Theme protocol is used to load theme file from themes installation location + * by using only theme id. + * + * Example usage in the renderer process: + * + * ``` + * + * ``` + * + * If the location represents a path then then file will be loaded from this + * location. + * + * ``` + * + * ``` + */ +export class ThemesProtocol { + constructor() { + this[requestHandler] = this[requestHandler].bind(this); + } + + /** + * Registers the protocol handler. + * This must be called after the `ready` event. + */ + register() { + logger.debug('Registering themes protocol'); + session.fromPartition(MainWindowPersist) + .protocol + .registerStringProtocol('themes', this[requestHandler]); + session.fromPartition(TaskManagerWindowPersist) + .protocol + .registerStringProtocol('themes', this[requestHandler]); + } + + /** + * @param {Electron.ProtocolRequest} request + * @param {(response: string | Electron.ProtocolResponse) => void} callback + * @returns + */ + async [requestHandler](request, callback) { + let url = request.url.substr(9); + logger.silly(`ThemesProtocol::requestHandler::${url}`); + try { + fs.accessSync(url, fs.constants.R_OK | fs.constants.X_OK); + await this.loadFileTheme(url, callback); + return; + } catch (_) { + // .. + } + if (url === 'dd1b715f-af00-4ee8-8b0c-2a262b3cf0c8') { + url = '@advanced-rest-client/arc-electron-default-theme'; + } + await this.loadInstalledTheme(url, callback); + } + + /** + * @param {string} themeLocation + * @param {(response: string | Electron.ProtocolResponse) => void} callback + */ + async loadFileTheme(themeLocation, callback) { + logger.silly(`ThemesProtocol::loading theme from ${themeLocation}`); + try { + const data = await fs.readFile(themeLocation, 'utf8'); + callback({ + data, + mimeType: 'text/css', + charset: 'utf8' + }); + } catch (cause) { + logger.error('Unable to load theme'); + logger.error(cause); + // @ts-ignore + callback(-6); + } + } + + /** + * @param {string} themeLocation + * @param {(response: string | Electron.ProtocolResponse) => void} callback + */ + async loadInstalledTheme(themeLocation, callback) { + logger.info(`loading theme ${themeLocation}`); + const model = new ThemeInfo(); + try { + let info = await model.readTheme(themeLocation); + if (!info && themeLocation[0] !== '@') { + info = await model.readTheme(`@${themeLocation}`); + } + if (!info) { + logger.error('Theme info not found'); + // @ts-ignore + callback(-6); + return; + } + const mainExists = await fs.pathExists(info.mainFile); + const file = mainExists ? info.mainFile : path.join(process.env.ARC_THEMES, info.mainFile); + logger.silly(`Theme found. Reading theme file: ${file}`); + const data = await fs.readFile(file, 'utf8'); + if (data) { + logger.silly('Sending theme file to renderer.'); + callback({ + data, + mimeType: 'text/css', + charset: 'utf8' + }); + } else { + logger.error('Theme file is empty'); + // @ts-ignore + callback(-6); + } + } catch (e) { + logger.error('Unable to load theme'); + logger.error(e.message); + logger.error(e.stack); + // @ts-ignore + callback(-6); + } + } + + findThemeInfo(id, themes) { + if (!themes || !themes.length) { + return null; + } + return themes.find((item) => item._id === id || item.name === id); + } +} diff --git a/src/io/WindowsManager.js b/src/io/WindowsManager.js new file mode 100644 index 00000000..2009c7d2 --- /dev/null +++ b/src/io/WindowsManager.js @@ -0,0 +1,557 @@ +/* eslint-disable no-param-reassign */ +import { BrowserWindow, ipcMain, shell, nativeTheme } from 'electron'; +import path from 'path'; +import url from 'url'; +import { v4 } from 'uuid'; +import { MainWindowPersist, AppHostname } from './Constants.js'; +import { logger } from './Logger.js'; +import { ArcSessionRecorder } from './ArcSessionRecorder.js'; +import { WindowsPersistance } from './WindowsPersistance.js'; +import { ContextActions } from './ContextActions.js'; + +/** @typedef {import('../types').ApplicationOptionsConfig} ApplicationOptionsConfig */ +/** @typedef {import('../types').ProtocolFile} ProtocolFile */ +/** @typedef {import('../types').WindowSession} WindowSession */ +/** @typedef {import('../types').OpenPageOptions} OpenPageOptions */ +/** @typedef {import('electron').WebContents} WebContents */ + + +export const closedHandler = Symbol('closedHandler'); +export const movedHandler = Symbol('movedHandler'); +export const resizedHandler = Symbol('resizedHandler'); +export const focusedHandler = Symbol('focusedHandler'); +export const popupHandler = Symbol('popupHandler'); +export const settingHandler = Symbol('settingHandler'); +export const windowOpenHandler = Symbol('windowOpenHandler'); +export const toggleDevToolsHandler = Symbol('toggleDevToolsHandler'); +export const windowReadyHandler = Symbol('windowReadyHandler'); +export const winContextInitHandler = Symbol('winContextInitHandler'); +export const workspaceLocationHandler = Symbol('workspaceLocationHandler'); +export const workspaceChangeLocationHandler = Symbol('workspaceChangeLocationHandler'); + +export class WindowsManager { + /** + * A pointer to last focused window. + * @type {BrowserWindow} + */ + #lastFocused = undefined; + + /** + * A list of focused windows, in order of latest focus + * @type {BrowserWindow[]} + */ + #focusQueue = []; + + /** + * @param {ApplicationOptionsConfig} startupOptions Application startup options. + */ + constructor(startupOptions={}) { + this.startupOptions = startupOptions; + /** + * @type {BrowserWindow[]} + */ + this.windows = []; + this[closedHandler] = this[closedHandler].bind(this); + this[movedHandler] = this[movedHandler].bind(this); + this[resizedHandler] = this[resizedHandler].bind(this); + this[focusedHandler] = this[focusedHandler].bind(this); + this[popupHandler] = this[popupHandler].bind(this); + this[settingHandler] = this[settingHandler].bind(this); + this[windowOpenHandler] = this[windowOpenHandler].bind(this); + this[toggleDevToolsHandler] = this[toggleDevToolsHandler].bind(this); + this[winContextInitHandler] = this[winContextInitHandler].bind(this); + this[workspaceLocationHandler] = this[workspaceLocationHandler].bind(this); + this[workspaceChangeLocationHandler] = this[workspaceChangeLocationHandler].bind(this); + + this.workspace = new WindowsPersistance(); + this.recorder = new ArcSessionRecorder(); + this.contextActions = new ContextActions(); + + /** + * A map with the location to the workspaces loaded in the current windows. + * @type {Map} + */ + this.workspacesMap = new Map(); + } + + /** + * @returns {boolean} True if has at leas one window. + */ + get hasWindow() { + return this.windows.length > 0; + } + + /** + * @return {BrowserWindow|undefined} Reference to last focused browser window + * or undefined if the window is destroyed or undefined. + */ + get lastFocused() { + if (!this.#lastFocused) { + return null; + } + if (this.#lastFocused.isDestroyed()) { + this.#lastFocused = undefined; + return null; + } + return this.#lastFocused; + } + + /** + * @return {BrowserWindow|undefined} Reference to last focused browser window that is ARC main window. + */ + get lastArcFocused() { + return this.#focusQueue.find((item) => { + if (item.isDestroyed()) { + return false; + } + const pageUrl = item.webContents.getURL(); + return pageUrl.includes('/app.html'); + }) + } + + /** + * @return {BrowserWindow} Returns reference to last created and still active + * window object. + */ + get lastActive() { + const ws = this.windows; + if (!ws || !ws.length) { + return null; + } + for (let i = ws.length - 1; i >= 0; i--) { + if (!ws[i].isDestroyed()) { + return ws[i]; + } + } + return null; + } + + /** + * Restores latest window is any present. + */ + restoreLast() { + const win = this.lastActive; + if (win) { + win.show(); + } else { + this.open(); + } + } + + /** + * Listens for relevant for this class events from the renderer. + */ + listen() { + ipcMain.on('new-window', this[windowOpenHandler]); + ipcMain.on('toggle-devtools', this[toggleDevToolsHandler]); + ipcMain.on('settings-changed', this[settingHandler]); + ipcMain.on('window-context-menu-init', this[winContextInitHandler]); + ipcMain.handle('workspace-get-location', this[workspaceLocationHandler]); + ipcMain.handle('workspace-change-location', this[workspaceChangeLocationHandler]); + } + + /** + * Notifies all opened windows with event data. + * + * @param {string} type Event type (channel name) + * @param {any=} args List of arguments or a single argument + * @param {BrowserWindow=} ignored The window that should not receive the notification. + */ + notifyAll(type, args=[], ignored) { + logger.debug(`[WM] Notifying all windows with type: ${type}`); + this.windows.forEach((win, index) => { + if (win.isDestroyed()) { + this.windows.splice(index, 1); + return; + } + if (ignored && win.id === ignored.id) { + return; + } + if (Array.isArray(args)) { + win.webContents.send(type, ...args); + } else { + win.webContents.send(type, args); + } + }); + } + + /** + * Finds an index for a window. + * @returns {number} + */ + findIndex() { + const { windows } = this; + if (!windows.length) { + return 1; + } + windows.sort((a, b) => a.id - b.id); + const len = windows.length; + for (let i = 1; i < len; i++) { + if (windows[i].id !== i) { + return i; + } + } + return len + 1; + } + + /** + * Closes a window by its WebContents id + * @param {number} id + */ + closeWindow(id) { + const bWin = this.windows.find((win) => win.webContents.id === id); + if (bWin.isDestroyed()) { + const index = this.windows.indexOf(bWin); + this.windows.splice(index, 1); + return; + } + bWin.close(); + } + + /** + * Opens a new application window. + * + * @param {OpenPageOptions=} [options={}] Page create options. Don't set for the default ARC window. + * @return {Promise} Resolved promise when the window is ready. + */ + async open(options={}) { + const { page, route, params={}, workspaceFile } = options; + let { preload } = options; + if (!preload && !page || page === 'app.html') { + preload = 'arc-preload.js'; + } + if (workspaceFile) { + const id = v4(); + this.workspacesMap.set(id, workspaceFile); + params.workspaceId = id; + } + logger.debug('[WM] Opening new window'); + const id = this.findIndex(); + let info; + if (options.sizing) { + info = options.sizing; + } else { + info = options.ignoreWindowSessionSettings ? {} : await this.workspace.restoreWindowState(id); + } + const win = this.createWindow(info, preload, options); + if (options.noMenu) { + win.removeMenu(); + win.setMenu(null); + } + this.addWidowListeners(win, options.ignoreWindowSessionSettings); + this.windows.push(win); + this.loadPage(win, page, route, params); + if (this.startupOptions.withDevtools) { + win.webContents.openDevTools(); + } + this.recorder.record(); + // win.webContents.openDevTools(); + return win; + } + + /** + * Opens ARC application window with path set to file action. + * + * @param {ProtocolFile} options Action configuration. + * @return {Promise} + */ + async openWithAction(options) { + if (!options) { + logger.error('openWithAction called without argument.'); + return undefined; + } + logger.debug(`[WM] Opening new window with action ${options.source} ${options.action}`); + const route = `file-protocol-action/${options.source}/${options.action}/${options.id}`; + return this.open({ + route, + }); + } + + /** + * @param {string=} preload The preload script to load from the `src/preload/` folder. + * @returns {Electron.BrowserWindowConstructorOptions} The base options for ARC windows. + */ + createBaseWindowOptions(preload) { + const options = /** @type Electron.BrowserWindowConstructorOptions */({ + backgroundColor: '#00A2DF', + show: false, + title: 'Advanced REST Client', + webPreferences: { + partition: MainWindowPersist, + nativeWindowOpen: true, + nodeIntegration: false, + contextIsolation: false, + // DO NOT ENABLE THIS FOR ALL WINDOWS. + // webSecurity: false, + }, + }); + if (preload) { + options.webPreferences.preload = path.join(__dirname, '..', 'preload', preload); + } + return options; + } + + /** + * Creates a configured browser window. + * @param {WindowSession} info + * @param {string=} preload The preload script to load from the `src/preload/` folder. + * @param {OpenPageOptions=} init + * @returns {BrowserWindow} + */ + createWindow(info, preload, init={}) { + const options = { ...this.createBaseWindowOptions(preload), ...info }; + if (init.noWebSecurity) { + options.webPreferences.webSecurity = false; + } + if (init.parent) { + options.parent = init.parent; + } + return new BrowserWindow(options); + } + + /** + * Loads application for a path. + * + * @param {BrowserWindow} win Window to load the app to. + * @param {string=} [page='app.html'] The page to open from the src/app folder. + * @param {string=} [appPath=''] ARC internal routing path. + * @param {{[key: string]: string}=} [params={}] A list of parameters to pass to the page with query parameters + */ + loadPage(win, page='app.html', appPath='', params={}) { + if (typeof params.darkMode === 'undefined') { + params.darkMode = String(nativeTheme.shouldUseDarkColors); + } + const full = url.format({ + hostname: AppHostname, + pathname: `/src/app/${page}`, + // loads the entire page on the esm protocol so all assets are served through it + // TODO: ARC <16 uses the `file:` protocol and does not use host name. An adapter is needed to be shipped + // with ARC 16 to move all data from the old domain. + protocol: 'web-module:', + slashes: true, + hash: appPath, + query: params, + }); + logger.debug(`[WM] Loading page: ${full}`); + win.loadURL(full); + } + + /** + * Adds browser window event listeners + * + * @param {BrowserWindow} win Window to attach listeners to. + * @param {boolean=} ignoreWindowSessionSettings + */ + addWidowListeners(win, ignoreWindowSessionSettings=false) { + win.addListener('closed', this[closedHandler]); + if (!ignoreWindowSessionSettings) { + win.addListener('move', this[movedHandler]); + win.addListener('resize', this[resizedHandler]); + } + win.addListener('focus', this[focusedHandler]); + win.once('ready-to-show', this[windowReadyHandler].bind(this, win)); + win.webContents.on('new-window', this[windowOpenHandler]); + } + + /** + * Finds window index position in windows array. + * + * @param {BrowserWindow} win Window to search + * @return {number} Window position or `-1` if not found. + */ + findWindowIndex(win) { + const noId = win.isDestroyed(); + return this.windows.findIndex((item) => { + if (item.isDestroyed()) { + return win === item; + } + if (noId) { + return false; + } + return item.id === win.id; + }); + } + + /** + * Reloads all not destroyed windows. + */ + reloadWindows() { + logger.debug('[WM] Reloading all windows.'); + const { windows } = this; + for (let i = windows.length - 1; i >= 0; i--) { + const win = windows[i]; + if (win.isDestroyed()) { + this.windows.splice(i, 1); + return; + } + win.reload(); + } + } + + // + // Event handlers + // + + [windowOpenHandler]() { + this.open(); + } + + /** + * Handler for `toggle-devtools` event. Opens devtools on sender. + * + * @param {any} e The event emitted by the renderer process. + */ + [toggleDevToolsHandler](e) { + const win = /** @type BrowserWindow */ (e.sender); + win.webContents.toggleDevTools(); + } + + /** + * A handler for a `settings-changed` from the renderer process. It informs other windows about the change. + * + * @param {any} e The event emitted by the renderer process. + * @param {string} key + * @param {any} value + * @param {string} area + */ + [settingHandler](e, key, value, area) { + const win = /** @type BrowserWindow */ (e.sender); + this.notifyAll('settings-changed', { + key, + value, + area, + }, win); + } + + /** + * Handler for the `new-window` event emitted by the window object. + * Opens new chrome tab with requested content. + * + * @param {Electron.IpcMainEvent} event Emitted event. + * @param {string} openUrl Requested URL + * @param {string} frameName + */ + [popupHandler](event, openUrl, frameName) { + if (frameName !== 'modal') { + return; + } + event.preventDefault(); + shell.openExternal(openUrl); + } + + /** + * @param {*} e + */ + [focusedHandler](e) { + const win = /** @type Electron.BrowserWindow */ (e.sender); + this.#lastFocused = win; + const index = this.#focusQueue.indexOf(win); + if (index !== -1) { + this.#focusQueue.splice(index, 1); + } + this.#focusQueue.unshift(win); + } + + [resizedHandler](e) { + const win = /** @type BrowserWindow */ (e.sender); + this.workspace.resizeHandler(win); + } + + [movedHandler](e) { + const win = /** @type BrowserWindow */ (e.sender); + this.workspace.moveHandler(win); + } + + /** + * Handler for the BrowserWindow `closed` event. + * Removes the window from the windows array. + * + * @param {*} e Event emitted by the window. + */ + [closedHandler](e) { + const win = /** @type BrowserWindow */ (e.sender); + if (this.#lastFocused === win) { + this.#lastFocused = undefined; + } + const focusIndex = this.#focusQueue.indexOf(win); + if (focusIndex !== -1) { + this.#focusQueue.splice(focusIndex, 1); + } + const index = this.findWindowIndex(win); + if (index === -1) { + return; + } + this.windows.splice(index, 1); + // const { welcomeWindow } = this; + // this.welcomeWindow = undefined; + // if (win !== welcomeWindow && !this.windows.length) { + // this.openWelcome(); + // } + } + + /** + * Handler for the "ready-to-show" event + * + * @param {BrowserWindow} win + */ + [windowReadyHandler](win) { + logger.debug('[WM] Window is ready to show'); + win.show(); + } + + /** + * Handler for the window basic state info request. + * + * @param {Electron.IpcMainEvent} e Event emitted by the window. + */ + [winContextInitHandler](e) { + this.contextActions.registerDefaultActions(e.sender); + } + + /** + * @param {any} event + * @param {string=} id + */ + async [workspaceLocationHandler](event, id) { + const loc = this.workspacesMap.get(id); + if (loc) { + return loc; + } + const contents = /** @type Electron.WebContents */ (event.sender); + // - 1 so it will be compatible with old architecture + const index = this.readWebContentsBrowserId(contents) - 1; + let file = 'workspace'; + if (index) { + file += `.${index}`; + } + file += '.json'; + return path.join(process.env.ARC_WORKSPACE_PATH, file); + } + + /** + * The handler to the request to change the current workspace location. + * @param {any} event + * @param {string} fileLocation + */ + async [workspaceChangeLocationHandler](event, fileLocation) { + const id = v4(); + this.workspacesMap.set(id, fileLocation); + return id; + } + + /** + * Searches for the BrowserWindow id by its web contents id. + * I expect the WebContents id equals to the BrowserWindow id but it is not documented + * or explicitly stated so it searches for the browser window id. + * + * @param {WebContents} contents + * @returns {number} + */ + readWebContentsBrowserId(contents) { + const bw = this.windows.find((win) => win.webContents === contents); + if (!bw) { + return contents.id; + } + return bw.id; + } +} diff --git a/src/io/WindowsPersistance.js b/src/io/WindowsPersistance.js new file mode 100644 index 00000000..ac054a8d --- /dev/null +++ b/src/io/WindowsPersistance.js @@ -0,0 +1,188 @@ +import path from 'path'; +import { screen } from 'electron'; +import { ArcPreferences } from '../common/ArcPreferences.js'; + +/** @typedef {import('../types').ApplicationConfig} ApplicationConfig */ +/** @typedef {import('../types').WindowsSessionSchema} WindowsSessionSchema */ +/** @typedef {import('../types').WindowSession} WindowSession */ +/** @typedef {import('electron').BrowserWindow} BrowserWindow */ +/** @typedef {import('electron').Display} Display */ + +export const storeTimeout = Symbol('storeTimeout'); + +/** + * This class stores opened windows position and size so it can be restored the next time the window is opened. + * It is used by the WindowManager. + */ +export class WindowsPersistance extends ArcPreferences { + constructor() { + super(path.join(process.env.ARC_HOME, 'workspace', 'windows.json')); + + /** + * Store data debounce timer. + * By default it's 500 ms. + * @type {number} + */ + this.storeDebounce = 500; + } + + /** + * @param {WindowsSessionSchema} data + * @param {number} id + * @returns {WindowSession|null} + */ + findWindow(data, id) { + if (!data) { + return null; + } + const { windows=[] } = data; + if (!Array.isArray(windows)) { + return null; + } + const result = windows.find((item) => item.id === id); + if (!result) { + return null; + } + return result; + } + + /** + * Restores previous stores window position or creates default values + * @param {number} id + * @return {Promise} + */ + async restoreWindowState(id) { + const data = await this.load(); + const info = this.findWindow(data, id); + if (!info) { + return this.defaultWindowSession(); + } + return this.readSafeWindowPosition(info); + } + + /** + * Callback to be called when a window has moved + * @param {BrowserWindow} win + */ + moveHandler(win) { + const [x, y] = win.getPosition(); + this.setWindowPosition(win.id, x, y); + if (this[storeTimeout]) { + clearTimeout(this[storeTimeout]); + } + this[storeTimeout] = setTimeout(() => this.store(), this.storeDebounce); + } + + /** + * Updates window position info + * @param {number} id + * @param {number} x + * @param {number} y + */ + setWindowPosition(id, x, y) { + const settings = /** @type WindowsSessionSchema */ (this.data); + if (!Array.isArray(settings.windows)) { + settings.windows = []; + } + const info = this.findWindow(settings, id); + if (!info) { + settings.windows.push({ + x, y, id, + }); + } else { + info.x = x; + info.y = y; + } + } + + /** + * Callback to be called when a window has been resized + * @param {BrowserWindow} win + */ + resizeHandler(win) { + const [width, height] = win.getSize(); + this.setWindowSize(win.id, width, height); + if (this[storeTimeout]) { + clearTimeout(this[storeTimeout]); + } + this[storeTimeout] = setTimeout(() => this.store(), this.storeDebounce); + } + + /** + * Updates window size info + * @param {number} id + * @param {number} width + * @param {number} height + */ + setWindowSize(id, width, height) { + const settings = /** @type WindowsSessionSchema */ (this.data); + if (!Array.isArray(settings.windows)) { + settings.windows = []; + } + const info = this.findWindow(settings, id); + if (!info) { + settings.windows.push({ + width, height, id, + }); + } else { + info.width = width; + info.height = height; + } + } + + async defaultSettings() { + return { + windows: [], + }; + } + + /** + * @returns {WindowSession} + */ + defaultWindowSession() { + return { + width: 1200, + height: 800, + }; + } + + /** + * Checks whether the window position is still visible and returns + * default position when not. + * This may happen when a screen is removed from the device. + * + * @TODO(pawel): When connecting a sound bar through an HDMI cable it is recognized as + * a "display". It looks like there's no way to tell a difference between this device + * and the actual display. + * + * @param {WindowSession} state + * @returns {WindowSession} state + */ + readSafeWindowPosition(state) { + const { x=0, y=0 } = state; + const displays = screen.getAllDisplays(); + const fit = displays.some((display) => this.pointInDisplay(display, x, y)); + if (!fit) { + return this.defaultWindowSession(); + } + return state; + } + + /** + * Checks whether the point is inside a display + * @param {Display} display + * @param {number} x + * @param {number} y + * @returns {boolean} + */ + pointInDisplay(display, x, y) { + const { x:dx, y:dy, width, height } = display.bounds; + if (x < dx || x > dx + width) { + return false; + } + if (y < dy || y > dy + height) { + return false; + } + return true; + } +} diff --git a/src/io/defaults/DataStore.js b/src/io/defaults/DataStore.js new file mode 100644 index 00000000..212544ef --- /dev/null +++ b/src/io/defaults/DataStore.js @@ -0,0 +1,181 @@ +import fs from 'fs-extra'; +import path from 'path'; +import url from 'url'; +import { BrowserWindow, ipcMain, app } from 'electron'; +import { AppHostname, MainWindowPersist } from '../Constants.js'; +import { logger } from '../Logger.js'; + +/** @typedef {import('../WindowsManager').WindowsManager} WindowsManager */ + +/** + * This class moves data from old ARC installation to new one. + * + * In ARC < 16 the renderer process was running from the `file:` scheme and without a hostname. + * ARC 16 >= 16 runs from the `web-module:` protocol and `advanced-rest-client` host name. The downside of this change + * is that the origin has changed and all data sha to be moved from the old origin to the new one. + */ +export class DataStore { + + /** + * @param {WindowsManager} vm + */ + constructor(vm) { + this.vm = vm; + this._noDataHandler = this._noDataHandler.bind(this); + this._serverDataHandler = this._serverDataHandler.bind(this); + this._reportedReady = this._reportedReady.bind(this); + this._receiverReady = this._receiverReady.bind(this); + this._errorHandler = this._errorHandler.bind(this); + this.lockFile = path.join(process.env.ARC_HOME, '.db-moved-hostname'); + this.migrationExport = path.join(app.getPath('temp'), '.migrate-data'); + ipcMain.on('server-db-no-data', this._noDataHandler); + ipcMain.on('server-db-finished', this._serverDataHandler); + ipcMain.on('data-transport-ready', this._reportedReady); + ipcMain.on('data-importer-finished', this._receiverReady); + ipcMain.on('db-error', this._errorHandler); + } + + async ensureDataUpgraded() { + const lockExists = await fs.pathExists(this.lockFile); + if (lockExists) { + return undefined; + } + await this.showDataUpgradeDialog(); + const serverWindow = this.getBrowserWindow(); + this.openServerWindow(serverWindow); + this.server = serverWindow; + + return new Promise((resolve) => { + this.resolve = resolve; + }); + } + + async showDataUpgradeDialog() { + return new Promise((resolve) => { + const win = this.vm.createWindow({ + height: undefined, + width: undefined, + x: undefined, + y: undefined, + }); + win.setMenu(null); + win.once('ready-to-show', () => { + win.show(); + }); + win.once('show', () => resolve()); + this.vm.loadPage(win, 'data-migration.html'); + this.loader = win; + }); + } + + async runImporterWindow() { + return new Promise((resolve) => { + const win = this.getBrowserWindow(); + this.openReceiverWindow(win); + win.once('ready-to-show', () => { + resolve(); + }); + this.receiver = win; + }); + } + + /** + * @param {BrowserWindow} bw + */ + openServerWindow(bw) { + const dest = path.join(__dirname, 'db-server.html'); + const full = url.format({ + pathname: dest, + protocol: 'file:', + slashes: true, + }); + bw.loadURL(full); + bw.webContents.openDevTools(); + } + + /** + * @param {BrowserWindow} bw + */ + openReceiverWindow(bw) { + const full = url.format({ + hostname: AppHostname, + pathname: `/io/defaults/db-receiver.html`, + protocol: 'web-module:', + slashes: true, + }); + bw.loadURL(full); + bw.webContents.openDevTools(); + } + + getBrowserWindow() { + const options = /** @type Electron.BrowserWindowConstructorOptions */({ + show: false, + frame: false, + closable: false, + webPreferences: { + partition: MainWindowPersist, + nodeIntegration: true, + contextIsolation: false, + }, + }); + return new BrowserWindow(options); + } + + _reportedReady(e, type) { + if (type === 'server') { + setTimeout(() => { + this.server.webContents.send('server-start', this.migrationExport); + }, 1000); + } else if (type === 'receiver') { + setTimeout(() => { + this.receiver.webContents.send('receiver-start', this.migrationExport); + }, 1000); + } + } + + async _receiverReady() { + this.afterFinish(); + this.receiver.close(); + this.receiver = undefined; + } + + _noDataHandler() { + this.afterFinish(); + this.server.close(); + this.server = undefined; + } + + _errorHandler(e, message, stack) { + logger.error(message); + logger.error(stack); + const info = { + message, stack + }; + const data = JSON.stringify(info); + this.loader.webContents.executeJavaScript(`window.postMessage({error: ${data}})`); + } + + async _serverDataHandler() { + this.loader.webContents.executeJavaScript('window.postMessage({loadingStatus: "Migrating data stores."})'); + + this.runImporterWindow(); + this.server.close(); + this.server = undefined; + } + + async afterFinish() { + ipcMain.removeAllListeners('server-db-no-data'); + ipcMain.removeAllListeners('server-db-finished'); + ipcMain.removeAllListeners('data-transport-ready'); + ipcMain.removeAllListeners('data-receiver-ready'); + ipcMain.removeAllListeners('db-error'); + + await fs.ensureFile(this.lockFile); + const tmpExists = await fs.pathExists(this.migrationExport); + if (tmpExists) { + await fs.remove(this.migrationExport); + } + app.relaunch(); + app.quit(); + } +} diff --git a/scripts/main/defaults/theme-defaults.js b/src/io/defaults/ThemeDefaults.js similarity index 76% rename from scripts/main/defaults/theme-defaults.js rename to src/io/defaults/ThemeDefaults.js index 688e8f74..bc4910d8 100644 --- a/scripts/main/defaults/theme-defaults.js +++ b/src/io/defaults/ThemeDefaults.js @@ -1,20 +1,22 @@ -const fs = require('fs-extra'); -const path = require('path'); -const log = require('../logger'); -const semver = require('semver'); +/* eslint-disable no-param-reassign */ +/* eslint-disable no-await-in-loop */ +import fs from 'fs-extra'; +import path from 'path'; +import semver from 'semver'; +import { logger } from '../Logger.js'; /** * A class that is responsible for setting up theme defaults. */ -class ThemeDefaults { +export class ThemeDefaults { /** * Sets defaults if the defaults are not yet set. - * It copues anypoint and default theme to theme location + * It copies anypoint and default theme to theme location * and creates theme-info file. * * @return {Promise} Resolved promise when the defaults are stored. */ async prepareEnvironment() { - log.debug('Preparing themes environment...'); + logger.debug('Preparing themes environment...'); const names = await this._readDefaultThemesPackages(); if (!names) { return; @@ -25,10 +27,10 @@ class ThemeDefaults { async _readDefaultThemesPackages() { const source = path.join(__dirname, '..', '..', '..', 'appresources', 'themes'); - log.silly('Searching for default themes...'); + logger.silly('Searching for default themes...'); const themes = await this._listThemePackages(source); if (themes) { - log.silly(`Found ${themes.length} default themes.`); + logger.silly(`Found ${themes.length} default themes.`); } return themes; } @@ -38,8 +40,8 @@ class ThemeDefaults { try { items = await fs.readdir(themePath); } catch (e) { - log.warn(`Unable to read themes path ${themePath}.`); - return; + logger.warn(`Unable to read themes path ${themePath}.`); + return undefined; } let themePaths = []; for (let name of items) { @@ -53,14 +55,14 @@ class ThemeDefaults { if (parent) { name = path.join(parent, name); } - log.silly('Found default theme: ' + name); + logger.silly(`Found default theme: ${name}`); themePaths[themePaths.length] = { name, main, location: loc }; } else { - log.silly(`Searching subdirectories of ${loc} for themes`); + logger.silly(`Searching subdirectories of ${loc} for themes`); if (parent) { parent = path.join(parent, name); } else { @@ -78,11 +80,11 @@ class ThemeDefaults { async _readMainFile(pkgFile, name) { // Default to package name ?? - const defaultName = name + '.js'; + const defaultName = `${name}.js`; let data; try { const content = await fs.readFile(pkgFile); - data = JSON.parse(content); + data = JSON.parse(String(content)); } catch (_) { return defaultName; } @@ -100,7 +102,7 @@ class ThemeDefaults { try { await this._ensureTheme(item); } catch (e) { - log.error(e); + logger.error(e); } await this._ensureThemes(themes); } @@ -109,7 +111,8 @@ class ThemeDefaults { const file = path.join(process.env.ARC_THEMES, info.name, info.main); const exists = await fs.pathExists(file); if (!exists) { - return await this._copyThemeFiles(info); + await this._copyThemeFiles(info); + return; } const localPkgFile = path.join(info.location, 'package.json'); const localPkg = await fs.readJson(localPkgFile); @@ -118,65 +121,70 @@ class ThemeDefaults { const localVersion = localPkg.version; const installedVersion = installedPkg.version; if (semver.gt(localVersion, installedVersion)) { - return await this._copyThemeFiles(info); + await this._copyThemeFiles(info); + return; } - log.silly(`Theme ${file} exists. Skipping initialization.`); + logger.silly(`Theme ${file} exists. Skipping initialization.`); } async _copyThemeFiles(info) { - log.debug(`Creating ${info.name} theme...`); + logger.debug(`Creating ${info.name} theme...`); const dest = path.join(process.env.ARC_THEMES, info.name); try { await fs.emptyDir(dest); await fs.copy(info.location, dest); await this._updateThemeVersion(info); } catch (cause) { - log.error('Unable to copy default theme from ' + info.location + ' to ' + dest); - log.error(cause); + logger.error(`Unable to copy default theme from ${info.location} to ${dest}`); + logger.error(cause); } } + // Setups theme info file if missing async _setThemeInfo() { const file = path.join(process.env.ARC_THEMES, 'themes-info.json'); const exists = await fs.pathExists(file); if (exists) { - log.debug(`${file} exists. Ensuring info scheme.`); - return await this._ensureThemesInfoVersion(file); + logger.debug(`${file} exists. Ensuring info scheme.`); + return this._ensureThemesInfoVersion(file); } - log.info('Creating themes-info.json file'); - return await this._copyInfoFile(); + logger.info('Creating themes-info.json file'); + return this._copyInfoFile(); } async _ensureThemesInfoVersion(file) { const data = await fs.readJson(file, { throws: false }); if (!data) { - return await this._copyInfoFile(); + return this._copyInfoFile(); } - if (data instanceof Array) { + if (Array.isArray(data)) { // version 0 - return await this._upgradeInfoFile(file, data); + return this._upgradeInfoFile(file, data); } if (!(data.themes instanceof Array)) { - return await this._copyInfoFile(); + return this._copyInfoFile(); } const item = data.themes[0]; if (!item.location) { - return await this._copyInfoFile(); + return this._copyInfoFile(); } if ((item.mainFile || '').indexOf('.js') !== -1) { // early 14.x.x preview - return await this._copyInfoFile(); + return this._copyInfoFile(); } + return undefined; } + /** - * @return {String} Location of theme info file in local resources. + * @return {string} Location of theme info file in local resources. */ get localThemeInfoFile() { return path.join(__dirname, '..', '..', '..', 'appresources', 'themes', 'themes-info.json'); } + /** * Copies theme info file from local resources to themes folder. - * @return {Promise} + * @return {Promise} */ async _copyInfoFile() { const dest = process.env.ARC_THEMES_SETTINGS; @@ -185,13 +193,14 @@ class ThemeDefaults { info = info || {}; await fs.writeJson(dest, info); } + /** * Upgrades original theme info file structure to v1. * * This function checks for already installed themes that are not default themes * and adds it to the list of newly created file. * - * @param {String} file Theme info (installed) file location. + * @param {string} file Theme info (installed) file location. * @param {Array} installed List of currently installed packages. * @return {Promise} */ @@ -226,4 +235,3 @@ class ThemeDefaults { }); } } -exports.ThemeDefaults = ThemeDefaults; diff --git a/scripts/main/defaults/workspace-defaults.js b/src/io/defaults/WorkspaceDefaults.js similarity index 65% rename from scripts/main/defaults/workspace-defaults.js rename to src/io/defaults/WorkspaceDefaults.js index 7cd9cbdb..6ed0ea14 100644 --- a/scripts/main/defaults/workspace-defaults.js +++ b/src/io/defaults/WorkspaceDefaults.js @@ -1,17 +1,18 @@ -const fs = require('fs-extra'); -const path = require('path'); -const log = require('../logger'); +import fs from 'fs-extra'; +import path from 'path'; +import { logger } from '../Logger.js'; + /** * A class that is responsible for setting up theme defaults. */ -class WorkspaceDefaults { +export class WorkspaceDefaults { /** * Ensures that the workspace * * @return {Promise} Resolved promise when the defaults are stored. */ async prepareEnvironment() { - log.debug('Preparing ARC workspace.'); + logger.debug('Preparing ARC workspace.'); await this._ensureWorkspaceDir(); } @@ -22,14 +23,13 @@ class WorkspaceDefaults { if (exists) { return; } - log.silly('Workspace directory does not exists. Creating.'); + logger.silly('Workspace directory does not exists. Creating.'); await fs.ensureDir(dir); const fileExists = await fs.pathExists(file); if (fileExists) { return; } - log.silly('Workspace default file does not exists. Creating.'); + logger.silly('Workspace default file does not exists. Creating.'); await fs.ensureFile(file); } } -exports.WorkspaceDefaults = WorkspaceDefaults; diff --git a/src/io/defaults/db-receiver.html b/src/io/defaults/db-receiver.html new file mode 100644 index 00000000..d78e50ca --- /dev/null +++ b/src/io/defaults/db-receiver.html @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/io/defaults/db-server.html b/src/io/defaults/db-server.html new file mode 100644 index 00000000..124d948f --- /dev/null +++ b/src/io/defaults/db-server.html @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/io/main.esm.js b/src/io/main.esm.js new file mode 100644 index 00000000..32c76b31 --- /dev/null +++ b/src/io/main.esm.js @@ -0,0 +1,6 @@ +const startTime = Date.now(); + +// eslint-disable-next-line import/first +import start from './start.js'; + +start(startTime); \ No newline at end of file diff --git a/src/io/main.js b/src/io/main.js new file mode 100644 index 00000000..514a5fd2 --- /dev/null +++ b/src/io/main.js @@ -0,0 +1,12 @@ +/* eslint-disable global-require */ +if (process.env.NODE_ENV !== 'test') { + try { + require('electron-reloader')(module); + } catch (_) { + // ... + } +} + +const _require = require("esm")(module); + +_require('./main.esm.js'); diff --git a/src/io/models/Models.d.ts b/src/io/models/Models.d.ts new file mode 100644 index 00000000..6d5a96f0 --- /dev/null +++ b/src/io/models/Models.d.ts @@ -0,0 +1,9 @@ +export declare interface WorkspaceHistoryEntry { + used: number; + file: string; +} + +export declare interface WorkspaceHistoryModel { + kind: "ARC#WorkspaceHistory"; + entries: WorkspaceHistoryEntry[]; +} diff --git a/src/io/models/ThemeInfo.js b/src/io/models/ThemeInfo.js new file mode 100644 index 00000000..add4e588 --- /dev/null +++ b/src/io/models/ThemeInfo.js @@ -0,0 +1,133 @@ +import { ArcPreferences } from '../../common/ArcPreferences.js'; + +/** @typedef {import('@advanced-rest-client/arc-types').Themes.ArcThemeStore} ArcThemeStore */ +/** @typedef {import('@advanced-rest-client/arc-types').Themes.InstalledTheme} InstalledTheme */ + +/** + * A preferences class to store and read theme info file. + */ +export class ThemeInfo extends ArcPreferences { + constructor() { + super(process.env.ARC_THEMES_SETTINGS); + } + + /** + * @returns {Promise} + */ + async load() { + return super.load(); + } + + /** + * Stores information about an installed theme. + * @param {InstalledTheme} info The theme to add. + * @returns {Promise} + */ + async addTheme(info) { + const data = await this.load(); + if (!Array.isArray(data.themes)) { + data.themes = []; + } + data.themes.push(info); + await this.store(); + } + + /** + * @param {string} name Theme `name` value. + * @returns {Promise} + */ + async removeTheme(name) { + const data = await this.load(); + if (!Array.isArray(data.themes)) { + return; + } + const index = data.themes.findIndex((item) => item.name === name); + if (index === -1) { + return; + } + data.themes.splice(index, 1); + await this.store(); + } + + /** + * Reads information about theme + * @param {string} name The `name` of the theme + * @returns {Promise} + */ + async readTheme(name) { + const data = await this.load(); + if (!Array.isArray(data.themes)) { + return undefined; + } + return data.themes.find((item) => item.name === name || item._id === name); + } + + /** + * Sets a theme as active theme + * @param {string} name Theme `name` value. + * @returns {Promise} + */ + async setActive(name) { + const data = await this.load(); + if (!Array.isArray(data.themes)) { + throw new Error(`No installed themes.`); + } + const index = data.themes.findIndex((item) => item.name === name); + if (index === -1) { + throw new Error(`The ${name} theme is not installed.`); + } + data.active = name; + await this.store(); + } + + /** + * Sets the current timestamp on the theme info on the `updateCheck` property + * @param {string} name + * @returns {Promise} + */ + async setUpdateCheckTime(name) { + const info = await this.readTheme(name); + if (!info) { + return; + } + info.updateCheck = Date.now(); + await this.store(); + } + + /** + * Updates the version number on an installed theme + * @param {string} name + * @param {string} version + * @returns {Promise} + */ + async setThemeVersion(name, version) { + const info = await this.readTheme(name); + if (!info) { + return; + } + info.version = version; + await this.store(); + } + + /** + * @returns {Promise} + */ + async defaultSettings() { + return /** @type ArcThemeStore */ ({ + kind: 'ARC#ThemeInfo', + version: '1.1.0', + themes: [], + }); + } + + /** + * Updates a property on the model without any side effects + * @param {string} path The path to the value + * @param {any} value The value to set + */ + async setProperty(path, value) { + const data = await this.load(); + this.updateValue(data, path, value); + await this.store(); + } +} diff --git a/scripts/main/models/workspace-history.js b/src/io/models/WorkspaceHistory.js similarity index 51% rename from scripts/main/models/workspace-history.js rename to src/io/models/WorkspaceHistory.js index a32ca642..02d50bea 100644 --- a/scripts/main/models/workspace-history.js +++ b/src/io/models/WorkspaceHistory.js @@ -1,27 +1,43 @@ -const { ArcPreferences } = require('../../packages/arc-preferences'); -const path = require('path'); +import path from 'path'; +import { ArcPreferences } from '../../common/ArcPreferences.js'; + +/** @typedef {import('./Models').WorkspaceHistoryModel} WorkspaceHistoryModel */ +/** @typedef {import('./Models').WorkspaceHistoryEntry} WorkspaceHistoryEntry */ + /** * A preferences class to store and read theme info file. */ -class WorkspaceHistory extends ArcPreferences { - constructor(limit) { - super({ - file: path.join(process.env.ARC_HOME, 'workspace', 'workspace-history.json') - }); - this.limit = limit || 15; +export class WorkspaceHistory extends ArcPreferences { + /** + * @param {number=} limit The menu items list limit + */ + constructor(limit=15) { + super(path.join(process.env.ARC_HOME, 'workspace', 'workspace-history.json')); + this.limit = limit; + } + + /** + * @returns {Promise} + */ + async load() { + return super.load(); } + /** + * @returns {Promise} + */ async defaultSettings() { return { kind: 'ARC#WorkspaceHistory', entries: [] }; } + /** - * Sort function to sort history entirs by time. - * @param {Object} a - * @param {Object} b - * @return {Number} + * Sort function to sort history entries by time. + * @param {WorkspaceHistoryEntry} a + * @param {WorkspaceHistoryEntry} b + * @returns {number} */ sortEntries(a, b) { if (a.used > b.used) { @@ -32,20 +48,21 @@ class WorkspaceHistory extends ArcPreferences { } return 0; } + /** * Loads list of history entires from the configuration file. - * @return {Array|undefined} List of entries or undefined if none found. + * @return {Promise} List of entries or undefined if none found. */ async loadEntries() { const data = await this.load(); if (!data) { - return; + return undefined; } - if (!(data.entries instanceof Array)) { - return; + if (!Array.isArray(data.entries)) { + return undefined; } if (!data.entries.length) { - return; + return undefined; } data.entries.sort(this.sortEntries); return data.entries; @@ -53,19 +70,15 @@ class WorkspaceHistory extends ArcPreferences { /** * Adds history entry to the stored list. - * @param {String} filePath A workspace file path location. - * @return {Promise} + * @param {string} filePath A workspace file path location. + * @return {Promise} */ async addEntry(filePath) { if (!filePath) { throw new Error('File path argument not set.'); } - let data = await this.load(); - if (!data) { - data = {}; - this.__settings = data; - } - if (!(data.entries instanceof Array)) { + const data = await this.load(); + if (!Array.isArray(data.entries)) { data.entries = []; } const index = data.entries.findIndex((item) => item.file === filePath); @@ -83,18 +96,14 @@ class WorkspaceHistory extends ArcPreferences { } await this.store(); } + /** * Clears entries history. * @return {Promise} */ async clearHistory() { - let data = await this.load(); - if (!data) { - data = {}; - this.__settings = data; - } + const data = await this.load(); data.entries = []; await this.store(); } } -module.exports.WorkspaceHistory = WorkspaceHistory; diff --git a/src/io/start.js b/src/io/start.js new file mode 100644 index 00000000..4fe694e7 --- /dev/null +++ b/src/io/start.js @@ -0,0 +1,155 @@ +import { app, protocol } from 'electron'; +import { logger, setLevel } from './Logger.js'; +import { ApplicationPaths } from './ApplicationPaths.js'; +import { ApplicationOptions } from './ApplicationOptions.js'; +import { ArcEnvironment } from './ArcEnvironment.js'; +import { PreferencesManager } from './PreferencesManager.js'; +import { ApplicationDefaults } from './ApplicationDefaults.js'; +import { TelemetryConsent } from './TelemetryConsent.js'; + +app.allowRendererProcessReuse = true; +let initOptions; + +/** @typedef {import('../types').ApplicationOptionsConfig} ApplicationOptionsConfig */ + +function addUrlToOpen(event, url) { + event.preventDefault(); + logger.debug(`Received URL to open: ${url}`); + const fileData = url.substr(11); + const parts = fileData.split('/'); + switch (parts[0]) { + case 'drive': + // arc-file://drive/open/file-id + // arc-file://drive/create/file-id + initOptions.open.push(`/request/drive/${parts[1]}/${parts[2]}`); + break; + default: + } +} + +/** + * Runs the environment + * @param {PreferencesManager} prefManager + * @param {ApplicationOptionsConfig} init + */ +async function readyHandler(prefManager, init) { + // @ts-ignore + global.appReadyTime = Date.now(); + // @ts-ignore + logger.debug(`Electron ready time: ${global.appReadyTime - global.shellStartTime}ms`); + app.removeListener('open-url', addUrlToOpen); + + const defaults = new ApplicationDefaults(); + await defaults.prepareEnvironment(); + const env = new ArcEnvironment(prefManager, init); + /** + * @type {ArcEnvironment} + */ + // @ts-ignore + global.Arc = env; + env.registerHandlers(); + + if (!init.skipDatabaseUpgrade) { + // this has to be done after the protocols are registered. + await defaults.prepareDatabaseUpgrade(env.wm); + } + + if (!init.skipCookieConsent) { + // telemetry consent screen + const telemetry = new TelemetryConsent(env.wm); + await telemetry.run(); + } + + await env.loadEnvironment(); + // @ts-ignore + global.appLoadingTime = Date.now(); + // @ts-ignore + logger.debug(`App init time: ${global.appLoadingTime - global.appReadyTime}ms`); + env.open(init.openProtocolFile || init.open); +} + +/** + * Runs the IO thread of the application. + * @param {number} startTime The timestamp when the application first started + */ +export default async function start(startTime) { + // @ts-ignore + global.shellStartTime = startTime; + app.commandLine.appendSwitch('enable-experimental-web-platform-features'); + app.commandLine.appendSwitch('disable-features', 'OutOfBlinkCors'); + + process.on('uncaughtException', (error) => { + if (error.message) { + logger.error(error.message); + } + if (error.stack) { + logger.error(error.stack); + } + }); + + process.on('unhandledRejection', + /** + * @param {Error} error + */ + (error) => { + if (error.message) { + logger.error(error.message); + } + + if (error.stack) { + logger.error(error.stack); + } + }); + + const startupOptions = new ApplicationOptions(); + startupOptions.parse(); + initOptions = startupOptions.getOptions(); + if (initOptions.dev) { + setLevel(initOptions.debugLevel || 'silly'); + // logger.level = initOptions.debugLevel || 'warn'; + } else if (initOptions.debugLevel) { + // logger.level = initOptions.debugLevel; + setLevel(initOptions.debugLevel); + } else { + // logger.level = 'error'; + setLevel('error'); + } + + if (initOptions.userDataDir) { + app.setPath('userData', initOptions.userDataDir); + } + + // Standard scheme must be registered before the app is ready + protocol.registerSchemesAsPrivileged([ + { scheme: 'web-module', privileges: { standard: true, secure: true } }, + { scheme: 'themes', privileges: { standard: true, secure: true } } + ]); + + logger.debug('Setting up the environment'); + const appPaths = new ApplicationPaths(); + appPaths.setHome(); + appPaths.setSettingsFile(initOptions.settingsFile); + appPaths.setThemesPath(initOptions.themesPath); + appPaths.setWorkspacePath(initOptions.workspacePath); + appPaths.setStateFile(initOptions.stateFile); + + // Overrides initial user path to processed by ApplicationPaths + initOptions.settingsFile = appPaths.settingsFile; + initOptions.themesPath = appPaths.themesBasePath; + + // This prevents Win10 from showing dupe items in the taskbar + app.setAppUserModelId(`com.squirrel.mulesoft.arc.${process.arch}`); + + const protocolResult = app.setAsDefaultProtocolClient('arc-file'); + if (protocolResult) { + logger.debug('Registered "arc-file" protocol'); + } else { + logger.warn('Unable to register "arc-file" protocol'); + } + + app.on('open-url', addUrlToOpen); + await app.whenReady(); + + const prefManager = new PreferencesManager(appPaths.settingsFile); + readyHandler(prefManager, initOptions); +} diff --git a/menus/darwin.json b/src/menus/darwin.json similarity index 84% rename from menus/darwin.json rename to src/menus/darwin.json index 45c4442f..128d5a0e 100644 --- a/menus/darwin.json +++ b/src/menus/darwin.json @@ -65,32 +65,52 @@ "label": "File", "submenu": [ { - "label": "New tab", - "command": "request:new-tab", - "accelerator": "CommandOrControl+t" - }, { + "label": "New", + "submenu": [ + { + "label": "HTTP request", + "command": "request:new-http-tab", + "accelerator": "CommandOrControl+t" + }, + { + "label": "Web socket request", + "command": "request:new-websocket-tab" + }, + { + "label": "Window", + "command": "application:new-window", + "accelerator": "CommandOrControl+n" + } + ] + }, + { + "label": "Open", + "submenu": [ + { + "label": "Open file", + "command": "application:open-file", + "accelerator": "CommandOrControl+Shift+o" + }, + { + "label": "Open saved request", + "command": "application:open-saved", + "accelerator": "CommandOrControl+o" + }, + { + "label": "Open history", + "command": "application:open-history", + "accelerator": "CommandOrControl+h" + }, + { + "label": "Open from Google Drive", + "command": "application:open-drive" + } + ] + }, + { "label": "Close tab", "command": "request:close-tab", "accelerator": "CommandOrControl+w" - }, { - "label": "New window", - "command": "application:new-window", - "accelerator": "CommandOrControl+n" - }, { - "label": "Open file", - "command": "application:open-file", - "accelerator": "CommandOrControl+Shift+o" - }, { - "label": "Open saved request", - "command": "application:open-saved", - "accelerator": "CommandOrControl+o" - }, { - "label": "Open history", - "command": "application:open-history", - "accelerator": "CommandOrControl+Shift+h" - }, { - "label": "Open from Google Drive", - "command": "application:open-drive" }, { "type": "separator" @@ -168,10 +188,6 @@ }, { "role": "toggledevtools" - }, - { - "label": "Task Manager", - "command": "application:task-manager" } ] }, @@ -229,23 +245,17 @@ "role": "front" }, { - "type": "separator", - "visible": false + "type": "separator" }, { "label": "Popup application menu", - "command": "application:popup-menu", - "visible": false + "command": "application:popup-menu" } ] }, { "label": "Request", "submenu": [ - { - "label": "Open requests workspace", - "command": "application:open-requests-workspace" - }, { "label": "Run current tab", "command": "request:send-current", @@ -341,14 +351,6 @@ "label": "Frequently Asked Questions", "command": "application:open-faq" }, - { - "label": "What's new", - "command": "application:open-messages" - }, - { - "label": "Show tutorial", - "command": "application:open-onboarding" - }, { "type": "separator" }, diff --git a/menus/linux.json b/src/menus/linux.json similarity index 82% rename from menus/linux.json rename to src/menus/linux.json index 2c5effdd..f4571c74 100644 --- a/menus/linux.json +++ b/src/menus/linux.json @@ -4,32 +4,52 @@ "label": "File", "submenu": [ { - "label": "New tab", - "command": "request:new-tab", - "accelerator": "CommandOrControl+t" - }, { + "label": "New", + "submenu": [ + { + "label": "HTTP request", + "command": "request:new-http-tab", + "accelerator": "CommandOrControl+t" + }, + { + "label": "Web socket request", + "command": "request:new-websocket-tab" + }, + { + "label": "Window", + "command": "application:new-window", + "accelerator": "CommandOrControl+n" + } + ] + }, + { + "label": "Open", + "submenu": [ + { + "label": "Open file", + "command": "application:open-file", + "accelerator": "CommandOrControl+Shift+o" + }, + { + "label": "Open saved request", + "command": "application:open-saved", + "accelerator": "CommandOrControl+o" + }, + { + "label": "Open history", + "command": "application:open-history", + "accelerator": "CommandOrControl+h" + }, + { + "label": "Open from Google Drive", + "command": "application:open-drive" + } + ] + }, + { "label": "Close tab", "command": "request:close-tab", "accelerator": "CommandOrControl+w" - }, { - "label": "New Window", - "command": "application:new-window", - "accelerator": "CommandOrControl+n" - }, { - "label": "Open file", - "command": "application:open-file", - "accelerator": "CommandOrControl+Shift+o" - }, { - "label": "Open saved request", - "command": "application:open-saved", - "accelerator": "CommandOrControl+o" - }, { - "label": "Open history", - "command": "application:open-history", - "accelerator": "CommandOrControl+h" - }, { - "label": "Open from Google Drive", - "command": "application:open-drive" }, { "type": "separator" @@ -122,10 +142,6 @@ }, { "role": "toggledevtools" - }, - { - "label": "Task Manager", - "command": "application:task-manager" } ] }, @@ -178,23 +194,17 @@ "role": "front" }, { - "type": "separator", - "visible": false + "type": "separator" }, { "label": "Popup application menu", - "command": "application:popup-menu", - "visible": false + "command": "application:popup-menu" } ] }, { "label": "Request", "submenu": [ - { - "label": "Open requests workspace", - "command": "application:open-requests-workspace" - }, { "label": "Run current tab", "command": "request:send-current", @@ -230,13 +240,6 @@ { "label": "Hosts", "command": "application:open-hosts-editor" - }, - { - "type": "separator" - }, - { - "label": "Web socket request", - "command": "application:open-web-socket" } ] }, @@ -321,14 +324,6 @@ "label": "Frequently Asked Questions", "command": "application:open-faq" }, - { - "label": "What's new", - "command": "application:open-messages" - }, - { - "label": "Show tutorial", - "command": "application:open-onboarding" - }, { "type": "separator" }, diff --git a/src/menus/types.d.ts b/src/menus/types.d.ts new file mode 100644 index 00000000..5461b385 --- /dev/null +++ b/src/menus/types.d.ts @@ -0,0 +1,12 @@ +export interface MenuDefinition { + menu: MenuItemDefinition[]; +} + +export class MenuItemDefinition { + label?: string; + command?: string; + accelerator?: string; + type?: string; + role?: string; + submenu?: MenuItemDefinition[]; +} \ No newline at end of file diff --git a/menus/win.json b/src/menus/win.json similarity index 83% rename from menus/win.json rename to src/menus/win.json index 4d761c20..5fa1e1c9 100644 --- a/menus/win.json +++ b/src/menus/win.json @@ -4,39 +4,53 @@ "label": "File", "submenu": [ { - "label": "New tab", - "command": "request:new-tab", - "accelerator": "CommandOrControl+t" + "label": "New", + "submenu": [ + { + "label": "HTTP request", + "command": "request:new-http-tab", + "accelerator": "CommandOrControl+t" + }, + { + "label": "Web socket request", + "command": "request:new-websocket-tab" + }, + { + "label": "Window", + "command": "application:new-window", + "accelerator": "CommandOrControl+n" + } + ] + }, + { + "label": "Open", + "submenu": [ + { + "label": "Open file", + "command": "application:open-file", + "accelerator": "CommandOrControl+Shift+o" + }, + { + "label": "Open saved request", + "command": "application:open-saved", + "accelerator": "CommandOrControl+o" + }, + { + "label": "Open history", + "command": "application:open-history", + "accelerator": "CommandOrControl+h" + }, + { + "label": "Open from Google Drive", + "command": "application:open-drive" + } + ] }, { "label": "Close tab", "command": "request:close-tab", "accelerator": "CommandOrControl+w" }, - { - "label": "New Window", - "command": "application:new-window", - "accelerator": "CommandOrControl+n" - }, - { - "label": "Open file", - "command": "application:open-file", - "accelerator": "CommandOrControl+Shift+o" - }, - { - "label": "Open saved request", - "command": "application:open-saved", - "accelerator": "CommandOrControl+o" - }, - { - "label": "Open history", - "command": "application:open-history", - "accelerator": "CommandOrControl+h" - }, - { - "label": "Open from Google Drive", - "command": "application:open-drive" - }, { "type": "separator" }, @@ -128,10 +142,6 @@ }, { "role": "toggledevtools" - }, - { - "label": "Task Manager", - "command": "application:task-manager" } ] }, @@ -184,23 +194,17 @@ "role": "front" }, { - "type": "separator", - "visible": false + "type": "separator" }, { "label": "Popup application menu", - "command": "application:popup-menu", - "visible": false + "command": "application:popup-menu" } ] }, { "label": "Request", "submenu": [ - { - "label": "Open requests workspace", - "command": "application:open-requests-workspace" - }, { "label": "Run current tab", "command": "request:send-current", @@ -320,14 +324,6 @@ "label": "Frequently Asked Questions", "command": "application:open-faq" }, - { - "label": "What's new", - "command": "application:open-messages" - }, - { - "label": "Show tutorial", - "command": "application:open-onboarding" - }, { "type": "separator" }, diff --git a/src/poweredby.js b/src/poweredby.js deleted file mode 100644 index ae4f38ea..00000000 --- a/src/poweredby.js +++ /dev/null @@ -1,17 +0,0 @@ -/** -@license -Copyright 2018 The Advanced REST client authors -Licensed under the Apache License, Version 2.0 (the "License"); you may not -use this file except in compliance with the License. You may obtain a copy of -the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations under -the License. -*/ -import { svg } from '../web_modules/lit-element/lit-element.js'; -/* eslint-disable max-len */ -export default svg` - Powered by`; diff --git a/src/preload/Analytics.d.ts b/src/preload/Analytics.d.ts new file mode 100644 index 00000000..f5e99b51 --- /dev/null +++ b/src/preload/Analytics.d.ts @@ -0,0 +1,35 @@ +export declare interface AnalyticsInit { + clientId: string; + trackingId: string; + userId?: string; + anonymizeIp?: boolean; + dataSource?: string; + useCacheBooster?: boolean; + referrer?: string; + campaignName?: string; + campaignSource?: string; + campaignMedium?: string; + appVersion?: string; + appName?: string; + appId?: string; + appInstallerId?: string; + debug?: boolean; + debugEndpoint?: boolean; + customMetrics?: CustomMetric[]; + customDimensions?: CustomDimension[]; +} + +export declare interface CustomMetric { + index: number; + value: number; +} + +export declare interface CustomDimension { + index: number; + value: string; +} + +export declare interface BaseHitOptions { + customMetrics?: CustomMetric[]; + customDimensions?: CustomDimension[]; +} diff --git a/src/preload/AppStateProxy.js b/src/preload/AppStateProxy.js new file mode 100644 index 00000000..879b89df --- /dev/null +++ b/src/preload/AppStateProxy.js @@ -0,0 +1,26 @@ +import { ipcRenderer } from 'electron'; + +/** @typedef {import('@advanced-rest-client/arc-types').ArcState.ARCState} ARCState */ + +/** + * A class that acts as a proxy to read application settings. + */ +export class AppStateProxy { + /** + * Reads the current application state. + * @returns {Promise} + */ + read() { + return ipcRenderer.invoke('app-state-read'); + } + + /** + * Updates a single state value + * @param {string} name Path to the state preference + * @param {any} value State value + * @returns {Promise} + */ + update(name, value) { + return ipcRenderer.invoke('app-state-update', name, value); + } +} diff --git a/src/preload/ApplicationSearchProxy.js b/src/preload/ApplicationSearchProxy.js new file mode 100644 index 00000000..b11ec670 --- /dev/null +++ b/src/preload/ApplicationSearchProxy.js @@ -0,0 +1,81 @@ +/* eslint-disable no-unused-vars */ +import { ipcRenderer } from 'electron'; + +export const search = Symbol('search'); +export const resultHandler = Symbol('resultHandler'); +export const messageHandler = Symbol('messageHandler'); + +/** + * A proxy for the corresponding class defined in the `io` namespace. + * Informs about search action. + */ +export class ApplicationSearchProxy { + constructor() { + /** + * The last query used with `search()`. + */ + this.lastQuery = undefined; + } + + listen() { + ipcRenderer.on('search-bar-found-in-page', this[resultHandler].bind(this)); + window.addEventListener('message', this[messageHandler].bind(this)); + } + + /** + * Depending on the situation, either performs a new search or moves to another position + * @param {string|null} query The query to search for + */ + search(query) { + if (this.lastQuery === query) { + this.searchNext(); + return; + } + this.lastQuery = query; + const opts = {}; + this[search](query, opts); + } + + searchNext() { + const opts = { + findNext: true, + forward: true, + }; + this[search](this.lastQuery, opts); + } + + searchPrevious() { + const opts = { + findNext: true, + forward: false, + }; + this[search](this.lastQuery, opts); + } + + /** + * @param {string|null} query The query or null to stop the search + * @param {Electron.FindInPageOptions=} opts Search options + */ + [search](query, opts) { + if (!query) { + ipcRenderer.send('search-bar-clear'); + return; + } + ipcRenderer.send('search-bar-find', query, opts); + } + + [resultHandler](e, matches, activeMatchOrdinal) { + // console.log('Search result', e, matches, activeMatchOrdinal); + } + + /** + * @param {MessageEvent} e + */ + [messageHandler](e) { + const { data } = e; + switch (data.action) { + case 'search-bar-query': this.search(data.query); break; + default: + } + } +} diff --git a/src/preload/CookieBridge.js b/src/preload/CookieBridge.js new file mode 100644 index 00000000..36232dda --- /dev/null +++ b/src/preload/CookieBridge.js @@ -0,0 +1,314 @@ +import { ipcRenderer as ipc } from 'electron'; +import { SessionCookieEventTypes, SessionCookieEvents } from '@advanced-rest-client/arc-events'; + +/** @typedef {import('@advanced-rest-client/arc-events').SessionCookiesListEvent} SessionCookiesListEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').SessionCookiesListDomainEvent} SessionCookiesListDomainEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').SessionCookiesListUrlEvent} SessionCookiesListUrlEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').SessionCookiesRemoveEvent} SessionCookiesRemoveEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').SessionCookieUpdateEvent} SessionCookieUpdateEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').SessionCookieUpdateBulkEvent} SessionCookieUpdateBulkEvent */ +/** @typedef {import('@advanced-rest-client/arc-types').Cookies.ARCCookie} ARCCookie */ + +export const requestAllCookiesHandler = Symbol('requestAllCookiesHandler'); +export const requestDomainCookiesHandler = Symbol('requestDomainCookiesHandler'); +export const requestUrlCookiesHandler = Symbol('requestUrlCookiesHandler'); +export const updateCookieHandler = Symbol('updateCookieHandler'); +export const updateCookiesHandler = Symbol('updateCookiesHandler'); +export const deleteCookiesHandler = Symbol('deleteCookiesHandler'); +export const cookieChangeHandler = Symbol('cookieChangeHandler'); + +/** + * Computes a cookie URL from the cookie definition + * + * @param {ARCCookie} cookie + * @param {boolean=} secured + * @return {string} + */ +function computeCookieUrl(cookie, secured=false) { + let { domain='' } = cookie; + if (domain[0] === '.') { + domain = domain.substr(1); + } + let protocol = 'http'; + if (secured) { + protocol += 's'; + } + protocol += '://'; + return protocol + domain + (cookie.path || '/'); +} + +/** + * @param {Electron.Cookie} electronCookie + * @return {ARCCookie} + */ +export function electronToArcCookie(electronCookie) { + const cookie = /** @type ARCCookie */ ({ + domain: electronCookie.domain, + httpOnly: electronCookie.httpOnly, + hostOnly: electronCookie.hostOnly, + name: electronCookie.name, + path: electronCookie.path, + secure: electronCookie.secure, + session: electronCookie.session, + value: electronCookie.value, + created: Date.now(), + expires: 0, + lastAccess: Date.now(), + persistent: false, + }); + if (electronCookie.expirationDate) { + cookie.expires = electronCookie.expirationDate * 1000; + } + return cookie; +} +/** + * @param {ARCCookie} cookie + * @return {CookiesSetDetails} A copy of the cookie that is translated into an Electron cookie + */ +export function arcCookieToElectron(cookie) { + const electronCookie = /** @type CookiesSetDetails */ ({ + domain: cookie.domain, + httpOnly: cookie.httpOnly, + hostOnly: cookie.hostOnly, + name: cookie.name, + path: cookie.path, + secure: cookie.secure, + value: cookie.value, + url: computeCookieUrl(cookie, cookie.secure), + }); + if (cookie.expires) { + electronCookie.expirationDate = Math.round(cookie.expires / 1000); + } + return electronCookie; +} + + +/** + * Class responsible for cookie exchange between web app and the main process. + */ +export class CookieBridge { + constructor() { + this[requestAllCookiesHandler] = this[requestAllCookiesHandler].bind(this); + this[requestDomainCookiesHandler] = this[requestDomainCookiesHandler].bind(this); + this[requestUrlCookiesHandler] = this[requestUrlCookiesHandler].bind(this); + this[updateCookieHandler] = this[updateCookieHandler].bind(this); + this[updateCookiesHandler] = this[updateCookiesHandler].bind(this); + this[cookieChangeHandler] = this[cookieChangeHandler].bind(this); + this[deleteCookiesHandler] = this[deleteCookiesHandler].bind(this); + } + + listen() { + window.addEventListener(SessionCookieEventTypes.listAll, this[requestAllCookiesHandler]); + window.addEventListener(SessionCookieEventTypes.listDomain, this[requestDomainCookiesHandler]); + window.addEventListener(SessionCookieEventTypes.listUrl, this[requestUrlCookiesHandler]); + window.addEventListener(SessionCookieEventTypes.delete, this[deleteCookiesHandler]); + window.addEventListener(SessionCookieEventTypes.update, this[updateCookieHandler]); + window.addEventListener(SessionCookieEventTypes.updateBulk, this[updateCookiesHandler]); + ipc.on('cookie-changed', this[cookieChangeHandler]); + } + + unlisten() { + window.removeEventListener(SessionCookieEventTypes.listAll, this[requestAllCookiesHandler]); + window.removeEventListener(SessionCookieEventTypes.listDomain, this[requestDomainCookiesHandler]); + window.removeEventListener(SessionCookieEventTypes.listUrl, this[requestUrlCookiesHandler]); + window.removeEventListener(SessionCookieEventTypes.delete, this[deleteCookiesHandler]); + window.removeEventListener(SessionCookieEventTypes.update, this[updateCookieHandler]); + window.removeEventListener(SessionCookieEventTypes.updateBulk, this[updateCookiesHandler]); + ipc.removeListener('cookie-changed', this[cookieChangeHandler]); + } + + /** + * @return {Promise} List of all cookies in the cookie session partition. + */ + async getAllCookies() { + const result = /** @type Electron.Cookie[] */ (await ipc.invoke('cookies-session-get-all')); + return result.map((item) => electronToArcCookie(item)); + } + + /** + * @param {string} domain Cookies domain name + * @return {Promise} List of domain cookies in the cookie session partition. + */ + async getDomainCookies(domain) { + const result = /** @type Electron.Cookie[] */ (await ipc.invoke('cookies-session-get-domain', domain)); + return result.map((item) => electronToArcCookie(item)); + } + + /** + * Gets a list of cookies for given URL (matching domain and path as defined + * in Cookie spec) from the datastore. + * + * @param {string} url An URL to match cookies. + * @return {Promise} List of database objects that matches cookies. + */ + async getUrlCookies(url) { + const result = /** @type Electron.Cookie[] */ (await ipc.invoke('cookies-session-get-url', url)); + return result.map((item) => electronToArcCookie(item)); + } + + /** + * Removes cookie or cookies from the store. + * @param {ARCCookie[]} cookies A cookie or a list of cookies to delete. + * @return {Promise} + */ + async removeCookies(cookies) { + const electronCookies = cookies.map((item) => arcCookieToElectron(item)); + return ipc.invoke('cookies-session-remove-cookies', electronCookies); + } + + /** + * Creates or updates cookies in the cookies partition. + * @param {ARCCookie} cookie ARC's cookie definition. + * @return {Promise} + */ + async updateCookie(cookie) { + const electronCookie = arcCookieToElectron(cookie); + return ipc.invoke('cookies-session-set-cookie', electronCookie); + } + + /** + * Stores list of cookies in the store. + * + * @param {ARCCookie[]} cookies List of cookies to store + * @return {Promise} Resolved promise when all cookies are stored. + */ + async updateCookies(cookies) { + if (!cookies || !cookies.length) { + return undefined; + } + const items = cookies.map((cookie) => { + let item; + // @ts-ignore + if (cookie.toJSON) { + // compatibility with cookie-parser of ARC + // @ts-ignore + item = cookie.toJSON(); + } else { + item = cookie; + } + return arcCookieToElectron(item); + }); + return ipc.invoke('cookies-session-set-cookies', items); + } + + /** + * @param {Electron.Cookie} cookie + * @returns {ARCCookie} + */ + translateCookieForWeb(cookie) { + const result = /** @type ARCCookie */ ({ ...cookie }); + if (cookie.expirationDate) { + result.expires = cookie.expirationDate * 1000; + // @ts-ignore + delete result.expirationDate; + } + return result; + } + + /** + * Handler for the `session-cookie-list-all` DOM event. + * Sets a result of calling `getAllCookies()` to `detail.result` property. + * @param {SessionCookiesListEvent} e + */ + [requestAllCookiesHandler](e) { + if (e.defaultPrevented) { + return; + } + e.preventDefault(); + e.detail.result = this.getAllCookies(); + } + + /** + * Handler for the `session-cookie-list-domain` DOM event. + * Sets a result of calling `getDomainCookies()` to `detail.result` property. + * + * It expects the `domain` property to be set on the `detail` object. + * + * @param {SessionCookiesListDomainEvent} e + */ + [requestDomainCookiesHandler](e) { + if (e.defaultPrevented) { + return; + } + e.preventDefault(); + const { domain } = e; + e.detail.result = this.getDomainCookies(domain); + } + + /** + * @param {SessionCookiesListUrlEvent} e + */ + [requestUrlCookiesHandler](e) { + if (e.defaultPrevented) { + return; + } + e.preventDefault(); + const { url } = e; + e.detail.result = this.getUrlCookies(url); + } + + /** + * Handler for the `session-cookie-remove` DOM event. + * Sets a result of calling `removeCookies(detail.remove)` to `detail.result` property. + * + * It expects the `cookies` property to be set on the `detail` object. + * + * @param {SessionCookiesRemoveEvent} e + */ + [deleteCookiesHandler](e) { + if (e.defaultPrevented) { + return; + } + e.preventDefault(); + const { cookies } = e; + e.detail.result = this.removeCookies(cookies); + } + + /** + * Handler for the `session-cookie-update` DOM event. + * Sets a result of calling `updateCookie(detail.cookie)` to `detail.result` property. + * + * It expects the `cookie` property to be set on the `detail` object. + * + * @param {SessionCookieUpdateEvent} e + */ + [updateCookieHandler](e) { + if (e.defaultPrevented) { + return; + } + e.preventDefault(); + const { cookie } = e; + e.detail.result = this.updateCookie(cookie); + } + + /** + * @param {SessionCookieUpdateBulkEvent} e + */ + [updateCookiesHandler](e) { + if (e.defaultPrevented) { + return; + } + e.preventDefault(); + const { cookies } = e; + e.detail.result = this.updateCookies(cookies); + } + + /** + * A handler from main thread's `cookie-changed` event. + * It dispatches `session-cookie-removed` or `session-cookie-changed` DOM event, + * depending on the change definition. + * + * @param {Event} e IPC event + * @param {Object} data Cookie data + * @param {Object} data.cookie The electron cookie object + * @param {boolean=} data.removed Set when a cookie was removed. Otherwise it is changed. + */ + [cookieChangeHandler](e, data) { + const cookie = this.translateCookieForWeb(data.cookie); + if (data.removed) { + SessionCookieEvents.State.delete(document.body, cookie); + } else { + SessionCookieEvents.State.update(document.body, cookie); + } + } +} diff --git a/src/preload/EncryptionService.js b/src/preload/EncryptionService.js new file mode 100644 index 00000000..ddbf47a6 --- /dev/null +++ b/src/preload/EncryptionService.js @@ -0,0 +1,142 @@ +// import prompt from 'electron-prompt'; +import { EncryptionEventTypes } from '@advanced-rest-client/arc-events'; + +/** @typedef {import('@advanced-rest-client/arc-events').ArcEncryptEvent} ArcEncryptEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').ArcDecryptEvent} ArcDecryptEvent */ + +/** + * A class that handles DOM events to perform data encryption/decryption. + */ +export class EncryptionService { + constructor() { + this._decodeHandler = this._decodeHandler.bind(this); + this._encodeHandler = this._encodeHandler.bind(this); + } + + listen() { + window.addEventListener(EncryptionEventTypes.decrypt, this._decodeHandler); + window.addEventListener(EncryptionEventTypes.encrypt, this._encodeHandler); + } + + unlisten() { + window.removeEventListener(EncryptionEventTypes.decrypt, this._decodeHandler); + window.removeEventListener(EncryptionEventTypes.encrypt, this._encodeHandler); + } + + /** + * @param {ArcDecryptEvent} e + */ + _decodeHandler(e) { + const { method, data, passphrase } = e; + e.preventDefault(); + e.detail.result = this.decode(method, data, passphrase); + } + + /** + * @param {ArcEncryptEvent} e + */ + _encodeHandler(e) { + const { method, passphrase, data } = e; + e.preventDefault(); + e.detail.result = this.encode(method, data, passphrase); + } + + /** + * @param {string} method The method to use. Currently only eas is supported. + * @param {string} data The data to encrypt + * @param {string} passphrase THe password to use + * @returns {Promise} Encoded string. + */ + async encode(method, data, passphrase) { + switch (method) { + case 'aes': return this.encodeAes(data, passphrase); + default: throw new Error(`Unknown encryption method`); + } + } + + /** + * @param {string} data The data to encode + * @param {string} passphrase THe password to use to encode the data + * @returns {Promise} + */ + async encodeAes(data, passphrase) { + // see https://gist.github.com/chrisveness/43bcda93af9f646d083fad678071b90a + const pwUtf8 = new TextEncoder().encode(passphrase); + const pwHash = await crypto.subtle.digest('SHA-256', pwUtf8); + const iv = crypto.getRandomValues(new Uint8Array(12)); + const alg = { name: 'AES-GCM', iv }; + const key = await crypto.subtle.importKey('raw', pwHash, alg, false, ['encrypt']); + const ptUint8 = new TextEncoder().encode(data); + const ctBuffer = await crypto.subtle.encrypt(alg, key, ptUint8); + const ctArray = Array.from(new Uint8Array(ctBuffer)); + const ctStr = ctArray.map(byte => String.fromCharCode(byte)).join(''); + const ctBase64 = btoa(ctStr); + const ivHex = Array.from(iv).map(b => (`00${b.toString(16)}`).slice(-2)).join(''); + return ivHex+ctBase64; + } + + /** + * Decodes previously encoded data + * @param {string} method + * @param {string} data + * @param {string=} passphrase + * @returns {Promise} The decoded data + */ + async decode(method, data, passphrase) { + switch (method) { + case 'aes': return this.decodeAes(data, passphrase); + default: throw new Error(`Unknown decryption method`); + } + } + + /** + * Decodes previously encoded data with AES method. + * @param {string} data The data to decrypt + * @param {string=} passphrase When not provided it asks the user for the password. + * @returns {Promise} The decoded data + */ + async decodeAes(data, passphrase) { + if (passphrase === undefined) { + // eslint-disable-next-line no-param-reassign + passphrase = await this.requestPassword(); + } + try { + const pwUtf8 = new TextEncoder().encode(passphrase); + const pwHash = await crypto.subtle.digest('SHA-256', pwUtf8); + const iv = data.slice(0,24).match(/.{2}/g).map(byte => parseInt(byte, 16)); + const alg = { name: 'AES-GCM', iv: new Uint8Array(iv) }; + const key = await crypto.subtle.importKey('raw', pwHash, alg, false, ['decrypt']); + const ctStr = atob(data.slice(24)); + const ctUint8 = new Uint8Array(ctStr.match(/[\s\S]/g).map(ch => ch.charCodeAt(0))); + const plainBuffer = await crypto.subtle.decrypt(alg, key, ctUint8); + const plaintext = new TextDecoder().decode(plainBuffer); + return plaintext; + } catch (_) { + throw new Error('Invalid password.'); + } + } + + /** + * Opens a password dialog, which is hard-coded into the `app.html` file to ask for the file password. + * @returns {Promise} User input or throws when cancelled. + */ + async requestPassword() { + return new Promise((resolve, reject) => { + const dialog = document.getElementById('passwordPrompt'); + // @ts-ignore + dialog.opened = true; + dialog.addEventListener('closed', function f(e) { + dialog.removeEventListener('closed', f); + // @ts-ignore + const { detail } = e; + if (detail.cancelled || !detail.confirmed) { + reject(new Error('The password is required.')); + } else { + const input = dialog.querySelector('anypoint-masked-input'); + // no validation here, password can be an empty string + resolve(input.value); + } + }); + }); + } +} diff --git a/src/preload/FilesystemProxy.js b/src/preload/FilesystemProxy.js new file mode 100644 index 00000000..5174b7dd --- /dev/null +++ b/src/preload/FilesystemProxy.js @@ -0,0 +1,181 @@ +import path from 'path'; +import fs from 'fs-extra'; +import log from 'electron-log'; +import { ipcRenderer } from 'electron'; +import { DataExportEventTypes } from '@advanced-rest-client/arc-events'; +import { v4 } from 'uuid'; + +/** @typedef {import('@advanced-rest-client/arc-events').ArcExportFilesystemEvent} ArcExportFilesystemEvent */ +/** @typedef {import('@advanced-rest-client/arc-types').DataExport.ProviderOptions} ProviderOptions */ +/** @typedef {import('@advanced-rest-client/arc-types').DataExport.ArcExportResult} ArcExportResult */ +/** @typedef {import('@advanced-rest-client/electron-amf-service/types').ApiParseResult} ApiParseResult */ + +export const exportHandler = Symbol('exportHandler'); +export const writeContent = Symbol('writeContent'); +export const prepareData = Symbol('prepareData'); + +/** + * This class is a proxy to access user filesystem from the renderer process. + * + * Node integration is disabled inside the application and scripts do not have + * access to the `fs` module. This class is loaded in the preload script and + * uses events API to store data in file. + * + * Also, data are not send to the IO thread as saving file is a blocking + * operation which could froze all application windows. If anything happens + * during IO operation it us better to crash single window. + */ +export class FilesystemProxy { + constructor() { + this[exportHandler] = this[exportHandler].bind(this); + } + + listen() { + window.addEventListener(DataExportEventTypes.fileSave, this[exportHandler]); + } + + unlisten() { + window.removeEventListener(DataExportEventTypes.fileSave, this[exportHandler]); + } + + /** + * @param {ArcExportFilesystemEvent} e + */ + [exportHandler](e) { + if (e.defaultPrevented) { + return; + } + e.preventDefault(); + const { data, providerOptions } = e; + e.detail.result = this.exportFileData(data, providerOptions); + } + + /** + * Requests a save file dialog and saves the data to selected path if not cancelled. + * This does nothing when dialog is canceled. + * + * @param {string|Buffer} content Data to write + * @param {ProviderOptions} options Export provider options + * @return {Promise} + */ + async exportFileData(content, options) { + const opts = { + file: options.file, + }; + let dialogResult; + try { + dialogResult = await ipcRenderer.invoke('save-dialog', opts); + } catch (e) { + log.error(e); + return /** @type ArcExportResult */ ({ + interrupted: false, + success: false, + }); + } + const { filePath, canceled } = dialogResult; + const result = /** @type ArcExportResult */ ({ + interrupted: !!canceled, + success: !canceled, + }); + if (canceled) { + return result; + } + result.fileId = path.basename(filePath); + result.parentId = path.dirname(filePath); + try { + await this[writeContent](filePath, content, options.contentType); + } catch (e) { + result.success = false; + log.error(e); + } + return result; + } + + /** + * Writes content to a file + * @param {string} filePath Absolute path to a file + * @param {string|Buffer|any} content Data to be written + * @param {string=} mime Content media type. + * @return {Promise} + */ + [writeContent](filePath, content, mime) { + let data = content; + if (typeof content !== 'string') { + data = this[prepareData](content, mime); + } + return fs.writeFile(filePath, data, 'utf8'); + } + + /** + * @param {any} data + * @param {string} mime + * @return {string} + */ + [prepareData](data, mime) { + switch (mime) { + case 'application/json': return JSON.stringify(data); + default: return String(data); + } + } + + /** + * Triggers the open file dialog pre-configured to pick supported by ARC files. + * + * @returns {Promise} + */ + async pickFile() { + return ipcRenderer.invoke('open-dialog'); + } + + // /** + // * Allows to read file from user filesystem. + // * @param {string} filePath File path to ready + // * @return {Promise} + // */ + // readFile(filePath) { + // return fs.readFile(filePath); + // } + + // extname(filePath) { + // return path.extname(filePath); + // } + + /** + * When the API data is processed by the AMF service, this function is called to store the temporary file + * in the application home directory with the API details. + * After the data is saved the function returns the name of the file to the main application so it can redirect the user to + * the API Console page with the file identifier. + * + * @param {ApiParseResult} data + * @returns {Promise} + */ + async storeApicModelTmp(data) { + const dir = path.join(process.env.ARC_HOME, 'amf-models'); + await fs.ensureDir(dir); + const id = v4(); + const file = `${id}.json`; + const filePath = path.join(dir, file); + await fs.outputJSON(filePath, data); + return id; + } + + /** + * Restores previously stored API data in a temporary file + * @param {string} id The id of the file previously generated by the `storeApicModelTmp()` function. + * @returns {Promise} + */ + async restoreApicModelTmp(id) { + const dir = path.join(process.env.ARC_HOME, 'amf-models'); + await fs.ensureDir(dir); + const file = `${id}.json`; + const filePath = path.join(dir, file); + const exists = await fs.pathExists(filePath); + if (!exists) { + throw new Error(`The API Console model does not exists as ${id}`); + } + const info = await fs.readJSON(filePath); + // @todo: uncomment when finished working on this implementation. + // fs.remove(filePath); + return info; + } +} diff --git a/src/preload/GoogleAnalytics.js b/src/preload/GoogleAnalytics.js new file mode 100644 index 00000000..6a135482 --- /dev/null +++ b/src/preload/GoogleAnalytics.js @@ -0,0 +1,295 @@ +/* eslint-disable no-param-reassign */ +import { TelemetryEventTypes } from '@advanced-rest-client/arc-events'; +import { ipcRenderer } from 'electron'; +import { v4 } from 'uuid'; +import { UniversalAnalytics } from './UniversalAnalytics.js'; + +/** @typedef {import('@advanced-rest-client/arc-events').TelemetryExceptionEvent} TelemetryExceptionEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').TelemetryTimingEvent} TelemetryTimingEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').TelemetryEventEvent} TelemetryEventEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').TelemetryScreenEvent} TelemetryScreenEvent */ +/** @typedef {import('@advanced-rest-client/arc-types').Config.ARCConfig} ARCConfig */ +/** @typedef {import('./Analytics').AnalyticsInit} AnalyticsInit */ + +const eventHandler = Symbol('eventHandler'); +const exceptionHandler = Symbol('exceptionHandler'); +const viewHandler = Symbol('viewHandler'); +const timingHandler = Symbol('viewHandler'); +const preferenceHandler = Symbol('preferenceHandler'); +const channelValue = Symbol('channelValue'); +const setupChannel = Symbol('setupChannel'); + +/** + * @typedef Tracker + * @property {UniversalAnalytics} analytics + * @property {'web'|'app'} type + */ + +/** + * The preload script that should be added to every window and page to add analytics support for the application. + * It listens for the DOM events defined in `@advanced-rest-client/arc-events` so the components can dispatch their analytics events + * outside the main application scope. + */ +export class GoogleAnalytics { + get channel() { + return this[channelValue]; + } + + set channel(value) { + const old = this[channelValue]; + if (old === value) { + return; + } + this[channelValue] = value; + this[setupChannel](value); + } + + constructor() { + /** + * Whether or not the Google Analytics is enabled. + * When disabled all functions are void. + */ + this.telemetry = false; + + /** + * The client ID needed to maintain the session. + */ + this.clientId = undefined; + + /** + * When `telemetry` equals `false` and this is `true` then it will allow to send + * information about exceptions only to google analytics. + */ + this.exceptionsOnly = false; + + /** + * The application identifier. + */ + this.appId = 'com.mulesoft.arc'; + + /** + * The application name. + */ + this.appName = 'Advanced REST Client'; + + /** + * @type {Tracker[]} + */ + this.trackers = []; + } + + addCustomDimensions() { + // @ts-ignore + const { versionInfo } = global; + const cd = [ + { + index: 1, + value: versionInfo.chrome, + }, + { + index: 2, + value: versionInfo.appVersion, + } + ]; + this.trackers.forEach((tracker) => { + tracker.analytics.customDimensions = cd; + }); + // channel is set up via the `channel` property. + } + + async initialize() { + let cnf = /** @type ARCConfig */ ({}); + try { + cnf = await ipcRenderer.invoke('preferences-read'); + } catch (e) { + // .. + } + const { privacy={}, updater={} } = cnf; + this.channel = updater.channel || 'stable'; + this.telemetry = typeof privacy.telemetry === 'boolean' ? privacy.telemetry : false; + try { + await this.setupClientId(privacy.clientId); + } catch (e) { + // ... + } + this.setupTrackers(); + this.listen(); + } + + /** + * Sets up tracker instances. + */ + setupTrackers() { + const base = /** @type AnalyticsInit */ ({ + trackingId: '', + clientId: this.clientId, + appName: this.appName, + // @ts-ignore + appVersion: global.versionInfo.appVersion, + appId: this.appId, + // debug: true, + // debugEndpoint: true, + }); + /** + * @type {Tracker[]} + */ + this.trackers = [ + { + analytics: new UniversalAnalytics({ ...base, trackingId: 'UA-18021184-6' }), + type: 'web', + }, + { + analytics: new UniversalAnalytics({ ...base, trackingId: 'UA-18021184-14' }), + type: 'app', + }, + { + analytics: new UniversalAnalytics({ ...base, trackingId: 'UA-71458341-1' }), + type: 'app', + } + ]; + } + + listen() { + window.addEventListener(TelemetryEventTypes.event, this[eventHandler].bind(this)); + window.addEventListener(TelemetryEventTypes.exception, this[exceptionHandler].bind(this)); + window.addEventListener(TelemetryEventTypes.view, this[viewHandler].bind(this)); + window.addEventListener(TelemetryEventTypes.timing, this[timingHandler].bind(this)); + ipcRenderer.on('preferences-value-updated', this[preferenceHandler].bind(this)); + } + + /** + * Sets the client id. When the `clientId` is not provided it generates one and updated the application settings. + * @param {string=} clientId + */ + async setupClientId(clientId) { + if (typeof clientId === 'string') { + this.clientId = clientId; + return; + } + this.clientId = v4(); + await ipcRenderer.invoke('preferences-update', 'privacy.clientId', this.clientId); + } + + /** + * @param {string} screenName + */ + screenView(screenName) { + if (!this.telemetry) { + return; + } + this.trackers.forEach((tracker) => { + if (tracker.type === 'web') { + tracker.analytics.sendPage(screenName); + } else { + tracker.analytics.sendScreen(screenName); + } + }); + } + + /** + * @param {string} category + * @param {string} action + * @param {string=} label + * @param {number=} value + */ + event(category, action, label, value) { + if (!this.telemetry) { + return; + } + this.trackers.forEach((tracker) => { + tracker.analytics.sendEvent(category, action, label, value); + }); + } + + /** + * @param {string} message + * @param {boolean} fatal + */ + exception(message, fatal) { + if (!this.telemetry) { + return; + } + this.trackers.forEach((tracker) => { + tracker.analytics.sendException(message, fatal); + }); + } + + /** + * @param {string} category + * @param {string} variable + * @param {number} value + * @param {string=} label + */ + timing(category, variable, value, label) { + if (!this.telemetry) { + return; + } + this.trackers.forEach((tracker) => { + tracker.analytics.sendTimings(category, variable, value, label); + }); + } + + /** + * @param {TelemetryScreenEvent} e + */ + [viewHandler](e) { + const { screenName } = e.detail; + this.screenView(screenName); + } + + /** + * @param {TelemetryEventEvent} e + */ + [eventHandler](e) { + const { action, category, label, value } = e.detail; + this.event(category, action, label, value); + } + + /** + * @param {TelemetryExceptionEvent} e + */ + [exceptionHandler](e) { + const { description, fatal } = e.detail; + this.exception(description, fatal); + } + + /** + * @param {TelemetryTimingEvent} e + */ + [timingHandler](e) { + const { category, variable, value, label } = e.detail; + this.timing(category, variable, value, label); + } + + /** + * @param {string} value The application release channel. + */ + [setupChannel](value) { + this.trackers.forEach((tracker) => { + const index = tracker.analytics.customDimensions.findIndex((i) => i.index === 5); + if (index === -1) { + tracker.analytics.customDimensions.push({ + index: 5, + value, + }); + } else { + tracker.analytics.customDimensions[index].value = value; + } + }); + } + + /** + * Handler for the IO event for settings update. + * + * @param {Electron.IpcRendererEvent} e + * @param {String} key The key of changed property + * @param {any} value + */ + [preferenceHandler](e, key, value) { + switch (key) { + case 'privacy.telemetry': this.telemetry = value; break; + case 'updater.channel': this.channel = value; break; + default: + } + } +} diff --git a/src/preload/GoogleDriveProxy.js b/src/preload/GoogleDriveProxy.js new file mode 100644 index 00000000..22190962 --- /dev/null +++ b/src/preload/GoogleDriveProxy.js @@ -0,0 +1,125 @@ +import { ipcRenderer } from 'electron'; +import { GoogleDriveEventTypes } from '@advanced-rest-client/arc-events'; + +/** @typedef {import('@advanced-rest-client/arc-types').Authorization.OAuth2Authorization} OAuth2Authorization */ +/** @typedef {import('@advanced-rest-client/arc-events').GoogleDriveListFolderEvent} GoogleDriveListFolderEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').GoogleDriveReadEvent} GoogleDriveReadEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').GoogleDriveSaveEvent} GoogleDriveSaveEvent */ +/** @typedef {import('../types').SaveDriveFileOptions} SaveDriveFileOptions */ + +const saveFileHandler = Symbol('saveFileHandler'); +const listAppFoldersHandler = Symbol('listAppFoldersHandler'); +const getFileHandler = Symbol('getFileHandler'); + +/** + * A class to be used in the renderer process that listens for drive + * events and communicates with drive instance in the main process. + */ +export class GoogleDriveProxy { + /** + * @returns {OAuth2Authorization} + */ + get oauthConfig() { + return { + clientId: '1076318174169-u4a5d3j2v0tbie1jnjgsluqk1ti7ged3.apps.googleusercontent.com', + authorizationUri: 'https://accounts.google.com/o/oauth2/v2/auth', + redirectUri: 'https://auth.advancedrestclient.com/oauth2', + scopes: [ + 'https://www.googleapis.com/auth/drive.file', + 'https://www.googleapis.com/auth/drive.install', + ], + } + } + + constructor() { + this[saveFileHandler] = this[saveFileHandler].bind(this); + this[listAppFoldersHandler] = this[listAppFoldersHandler].bind(this); + this[getFileHandler] = this[getFileHandler].bind(this); + } + + /** + * Listens for both ipc and web events and makes the magic happen. + */ + listen() { + window.addEventListener(GoogleDriveEventTypes.save, this[saveFileHandler]); + window.addEventListener(GoogleDriveEventTypes.listAppFolders, this[listAppFoldersHandler]); + window.addEventListener(GoogleDriveEventTypes.read, this[getFileHandler]); + } + + /** + * Stops listening to the web and ipc events. + */ + unlisten() { + window.removeEventListener(GoogleDriveEventTypes.save, this[saveFileHandler]); + window.removeEventListener(GoogleDriveEventTypes.listAppFolders, this[listAppFoldersHandler]); + window.removeEventListener(GoogleDriveEventTypes.read, this[getFileHandler]); + } + + /** + * @param {GoogleDriveSaveEvent} e + */ + [saveFileHandler](e) { + e.preventDefault(); + const { data, providerOptions } = e; + const { file, contentType, parent } = providerOptions; + const meta = { + name: file, + mimeType: contentType, + }; + const options = /** @type SaveDriveFileOptions */ ({ + meta, + parent, + auth: this.oauthConfig, + }); + e.detail.result = ipcRenderer.invoke('google-drive-process', 'create-file', options, data); + } + + /** + * Handler for `google-drive-list-app-folders` event. + * Requests to get Drive folders list created by this application. + * @param {GoogleDriveListFolderEvent} e + */ + [listAppFoldersHandler](e) { + e.detail.result = this.listFolders(); + } + + listFolders() { + const auth = this.oauthConfig; + auth.interactive = false; + return ipcRenderer.invoke('google-drive-process', 'list-folders', auth); + } + + /** + * Downloads file from Google Drive by its ID. + * @param {String} fileId File ID + * @return {Promise} Promise resolved to file content. + */ + getFile(fileId) { + const auth = this.oauthConfig; + auth.interactive = true; + return ipcRenderer.invoke('google-drive-process', 'get-file', fileId, auth); + } + + /** + * @param {GoogleDriveReadEvent} e + */ + [getFileHandler](e) { + e.preventDefault(); + if (!e.id) { + e.detail.result = Promise.reject(new Error('The "id" detail property is missing.')); + } else { + e.detail.result = this.getFile(e.id); + } + } + + /** + * Notifies the parent window about a file pick action. + * If the current window does not have a parent then it does nothing. + * + * @param {string} fileId The picked file id + */ + notifyParentFilePicked(fileId) { + // this does not need a confirmation so simple send will do. + ipcRenderer.send('google-drive-proxy-file-pick', fileId); + } +} diff --git a/src/preload/ImportFilePreProcessor.js b/src/preload/ImportFilePreProcessor.js new file mode 100644 index 00000000..63604f3c --- /dev/null +++ b/src/preload/ImportFilePreProcessor.js @@ -0,0 +1,85 @@ +import path from 'path'; +import fs from 'fs-extra'; + +export const isApiFile = Symbol('isApiFile'); + +/** + * Simple class to read file picked by the user and that helps to decide whether the file + * is an API file to process with the AMF factory or is it ARC import file. + * + * @todo This has no sense to handle all imports through a single import file. + * THese should be specialized paths to import API data and to import ARC data. + */ +export class ImportFilePreProcessor { + /** + * @param {string} filePath The path to the imported file + */ + constructor(filePath) { + this.filePath = filePath; + + /** + * @type {Buffer} + */ + this.buffer = undefined; + } + + async prepare() { + const { filePath } = this; + if (!filePath) { + throw new Error('The file path is not set'); + } + const exists = await fs.pathExists(filePath); + if (!exists) { + throw new Error('The file path does not exists'); + } + try { + await fs.access(filePath, fs.constants.R_OK); + } catch (e) { + throw new Error('Unable to read import file. The current user has no permissions to the file.'); + } + this.buffer = await fs.readFile(filePath); + } + + /** + * Tests whether the buffer should be sent to the API processor instead of import processor. + * + * Note, the contents may be still an API as OAS (swagger) support JSON format. This is not here tested + * because the file content can be encrypted with password. + * + * @returns {Promise} + */ + async isApiFile() { + const { filePath } = this; + if (!filePath) { + throw new Error('The file path is not set'); + } + const ext = path.extname(filePath); + if (this[isApiFile](ext)) { + return true; + } + return false; + } + + /** + * Call `isApiFile()` first to test whether the file is the zip file. + * + * @return {string} The contents as string. + */ + readContents() { + const { buffer } = this; + if (!buffer) { + throw new Error('Call the prepare function first.'); + } + const content = buffer.toString().trim(); + return content; + } + + /** + * @param {string} ext + * @returns {boolean} + */ + [isApiFile](ext) { + const apiTypes = ['.zip', '.yaml', '.raml']; + return apiTypes.includes(ext); + } +} diff --git a/src/preload/PreferencesProxy.js b/src/preload/PreferencesProxy.js new file mode 100644 index 00000000..86e87f5a --- /dev/null +++ b/src/preload/PreferencesProxy.js @@ -0,0 +1,88 @@ +import { ipcRenderer } from 'electron'; +import { ConfigEvents, ConfigEventTypes } from '@advanced-rest-client/arc-events'; + +/** @typedef {import('@advanced-rest-client/arc-types').Config.ARCConfig} ARCConfig */ +/** @typedef {import('@advanced-rest-client/arc-events').ConfigUpdateEvent} ConfigUpdateEvent */ + +export const domReadHandler = Symbol('domReadHandler'); +export const domChangeHandler = Symbol('domChangeHandler'); +export const ioChangeHandler = Symbol('ioChangeHandler'); + +/** + * A class that acts as a proxy to read application settings. + */ +export class PreferencesProxy { + constructor() { + this[domReadHandler] = this[domReadHandler].bind(this); + this[domChangeHandler] = this[domChangeHandler].bind(this); + this[ioChangeHandler] = this[ioChangeHandler].bind(this); + } + + /** + * Observers window and IPC events which makes this class work. + */ + observe() { + window.addEventListener(ConfigEventTypes.readAll, this[domReadHandler]); + window.addEventListener(ConfigEventTypes.update, this[domChangeHandler]); + ipcRenderer.on('preferences-value-updated', this[ioChangeHandler]); + } + + /** + * Stop observing window and IPC events + */ + unobserve() { + window.removeEventListener(ConfigEventTypes.readAll, this[domReadHandler]); + window.removeEventListener(ConfigEventTypes.update, this[domChangeHandler]); + ipcRenderer.removeListener('preferences-value-updated', this[ioChangeHandler]); + } + + /** + * Reads current application settings. + * @returns {Promise} + */ + read() { + return ipcRenderer.invoke('preferences-read'); + } + + /** + * Updates a single preference + * @param {string} name Preference name + * @param {any} value Preference value + * @returns {Promise} + */ + update(name, value) { + return ipcRenderer.invoke('preferences-update', name, value); + } + + /** + * A handler for the preferences read event emitted on the DOM. + * @param {CustomEvent} e + */ + [domReadHandler](e) { + e.detail.result = this.read(); + } + + /** + * A handler for the preferences read event emitted on the DOM. + * @param {ConfigUpdateEvent} e + */ + [domChangeHandler](e) { + const { key, value } = e.detail; + if (!key) { + e.detail.result = Promise.reject(new Error(`The name cannot be empty`)); + return; + } + e.detail.result = this.update(key, value); + } + + /** + * Handler for the IO event for settings update. + * + * @param {Electron.IpcRendererEvent} e + * @param {String} name Name of changed property + * @param {any} value + */ + [ioChangeHandler](e, name, value) { + ConfigEvents.State.update(document.body, name, value); + } +} diff --git a/src/preload/README.md b/src/preload/README.md new file mode 100644 index 00000000..f5047e8b --- /dev/null +++ b/src/preload/README.md @@ -0,0 +1,9 @@ +# Pre-load scripts for all windows + +Here is the location of all classes that are loaded in the pre-load scripts of a browser window. + +The purpose of those is to provide an access to the application main thread through IPC. + +ARC browser processes have disabled node integration (and they won't have it enabled). The way to deal with this is to create a class that deals with the logic in the renderer process or communicate with the IO process. + +Before accessing the user's filesystem make sure that unusual paths are not read / altered by the script. diff --git a/src/preload/ThemeManager.js b/src/preload/ThemeManager.js new file mode 100644 index 00000000..d2967ab0 --- /dev/null +++ b/src/preload/ThemeManager.js @@ -0,0 +1,167 @@ +import { ipcRenderer as ipc } from 'electron'; +import logger from 'electron-log'; + +/** @typedef {import('@advanced-rest-client/arc-types').Themes.ArcThemeStore} ArcThemeStore */ +/** @typedef {import('@advanced-rest-client/arc-types').Themes.InstalledTheme} InstalledTheme */ + +const themeActivatedHandler = Symbol('themeActivatedHandler'); + +/** + * Theme manager class for renderer process. + * + * It listens for web and ipc events to manage themes. + */ +export class ThemeManager { + static get defaultTheme() { + return '@advanced-rest-client/arc-electron-default-theme'; + } + + static get anypointTheme() { + return '@advanced-rest-client/arc-electron-anypoint-theme'; + } + + static get darkTheme() { + return '@advanced-rest-client/arc-electron-dark-theme'; + } + + constructor() { + this[themeActivatedHandler] = this[themeActivatedHandler].bind(this); + } + + /** + * Listens for the ipc events to support theme changes + */ + listen() { + ipc.on('theme-manager-theme-activated', this[themeActivatedHandler]); + } + + /** + * Removes event listeners + */ + unlisten() { + ipc.off('theme-manager-theme-activated', this[themeActivatedHandler]); + } + + /** + * Handler for the theme activated event. Updates the theme in the current window. + * @param {*} e + * @param {string} id + */ + async [themeActivatedHandler](e, id) { + await this.loadTheme(id); + document.body.dispatchEvent(new CustomEvent('themeactivated', { + detail: id, + bubbles: true, + })); + } + + /** + * Lists installed themes in the application. + * @return {Promise} A promise resolved to the theme info array + */ + readState() { + logger.silly('listing themes'); + return ipc.invoke('theme-manager-read-themes'); + } + + /** + * Reads information about current theme. + * @return {Promise} A promise resolved to the theme info + */ + readActiveThemeInfo() { + logger.silly('reading active theme'); + return ipc.invoke('theme-manager-active-theme-info'); + } + + /** + * Activates the theme. It stores theme id in user preferences and loads the + * theme. + * @param {string} name Theme name to activate + * @return {Promise} Promise resolved when the theme is activated + */ + activate(name) { + logger.info(`activating theme: ${name}`); + return ipc.invoke('theme-manager-activate-theme', name); + } + + /** + * @param {string} name The theme to install + * @returns {Promise} + */ + installTheme(name) { + logger.info(`installing theme: ${name}`); + if (!name) { + return Promise.reject(new Error('Name is required')); + } + return ipc.invoke('theme-manager-install-theme', name); + } + + /** + * @param {string} name The theme to uninstall + * @returns {Promise} + */ + uninstallTheme(name) { + logger.info(`uninstalling a theme: ${name}`); + if (!name) { + return Promise.reject(new Error('Name is required')); + } + return ipc.invoke('theme-manager-uninstall-theme', name); + } + + /** + * Loads theme file and activates it. + * @param {string=} themeId ID of installed theme of location of theme file. + * + * @param {boolean=} noFallback By default the manager will try to revert to default + * theme when passed theme cannot be loaded. When this option is set then + * it will throw error instead of loading default theme. + * @return {Promise} + */ + async loadTheme(themeId, noFallback) { + logger.silly(`loading theme: ${themeId}`); + let id = themeId; + if (!id || id === 'dd1b715f-af00-4ee8-8b0c-2a262b3cf0c8') { + id = ThemeManager.defaultTheme; + } else if (id === '859e0c71-ce8b-44df-843b-bca602c13d06') { + id = ThemeManager.anypointTheme; + } + try { + await this._loadTheme(id); + } catch (cause) { + if (!noFallback && id !== ThemeManager.defaultTheme) { + await this._loadTheme(ThemeManager.defaultTheme); + return; + } + throw cause; + } + } + + /** + * @param {string} themeId + * @returns {Promise} + */ + async _loadTheme(themeId) { + const nodes = document.head.querySelectorAll('link[rel="stylesheet"]'); + for (let i = nodes.length - 1; i >= 0; i--) { + // @ts-ignore + const { href } = nodes[i]; + if (href && href.indexOf('themes:') === 0) { + logger.silly(`removing previous theme: ${href}`); + nodes[i].parentNode.removeChild(nodes[i]); + } + } + logger.silly(`adding theme to the DOM: ${themeId}`); + const link = document.createElement('link'); + link.setAttribute('rel', 'stylesheet'); + link.setAttribute('type', 'text/css'); + link.setAttribute('href', `themes://${themeId}`); + document.head.appendChild(link); + } + + /** + * @param {boolean} status Whether to ignore the system preferences for dark / light theme. + */ + async setSystemPreferred(status) { + return ipc.invoke('theme-manager-update-property', 'systemPreferred', status); + } +} diff --git a/src/preload/UniversalAnalytics.js b/src/preload/UniversalAnalytics.js new file mode 100644 index 00000000..8ec6d0e7 --- /dev/null +++ b/src/preload/UniversalAnalytics.js @@ -0,0 +1,935 @@ +/* eslint-disable no-param-reassign */ +/** @typedef {import('./Analytics').AnalyticsInit} AnalyticsInit */ +/** @typedef {import('./Analytics').CustomMetric} CustomMetric */ +/** @typedef {import('./Analytics').CustomDimension} CustomDimension */ +/** @typedef {import('./Analytics').BaseHitOptions} BaseHitOptions */ + +export const initializingValue = Symbol('initializingValue'); + +/** + * **Required for all hit types.** + * + * The Protocol version. The current value is '1'. This will only change when there + * are changes made that are not backwards compatible. + * + * - Parameter: **v** + * - Example value: 1 + * - Example usage: v=1 + * + * @type {Number} + */ +const protocolVersion = 1; +/** + * A map of parameter names to its descriptions. + * @type {Object} + */ +export const paramsMap = { + v: 'Protocol Version', + tid: 'Tracking ID / Web Property ID', + aip: 'Anonymize IP', + ds: 'Data Source', + qt: 'Queue Time', + z: 'Cache Buster', + cid: 'Client ID', + uid: 'User ID', + sc: 'Session Control', + uip: 'IP Override', + ua: 'User Agent Override', + geoip: 'Geographical Override', + dr: 'Document Referrer', + cn: 'Campaign Name', + cs: 'Campaign Source', + cm: 'Campaign Medium', + ck: 'Campaign Keyword', + cc: 'Campaign Content', + ci: 'Campaign ID', + gclid: 'Google AdWords ID', + dclid: 'Google Display Ads ID', + sr: 'Screen Resolution', + vp: 'Viewport size', + de: 'Document Encoding', + sd: 'Screen Colors', + ul: 'User Language', + je: 'Java Enabled', + fl: 'Flash Version', + t: 'Hit type', + ni: 'Non-Interaction Hit', + dl: 'Document location URL', + dh: 'Document Host Name', + dp: 'Document Path', + dt: 'Document Title', + cd: 'Screen Name', + linkid: 'Link ID', + an: 'Application Name', + aid: 'Application ID', + av: 'Application Version', + aiid: 'Application Installer ID', + ec: 'Event Category', + ea: 'Event Action', + el: 'Event Label', + ev: 'Event Value', + sn: 'Social Network', + sa: 'Social Action', + st: 'Social Action Target', + utc: 'User timing category', + utv: 'User timing variable name', + utt: 'User timing time', + utl: 'User timing label', + plt: 'Page Load Time', + dns: 'DNS Time', + pdt: 'Page Download Time', + rrt: 'Redirect Response Time', + tcp: 'TCP Connect Time', + srt: 'Server Response Time', + dit: 'DOM Interactive Time', + clt: 'Content Load Time', + exd: 'Exception Description', + exf: 'Is Exception Fatal?', + xid: 'Experiment ID', + xvar: 'Experiment Variant' +}; + +for (let i = 1; i < 201; i++) { + paramsMap[`cd${i}`] = `Custom dimension #${i}`; + paramsMap[`cm${i}`] = `Custom metric #${i}`; +} + +/** + * List of hist to be send when came back from offline state. + * Note, this is in memory information only. + * The component do not stores this information. + * + * @type {string[]} + */ +export const offlineQueue = []; + +export class UniversalAnalytics { + /** + * The Client ID for the measurement protocol. + * + * **It is required for all types of calls.** + * + * The value of this field should be a random UUID (version 4) as described + * in http://www.ietf.org/rfc/rfc4122.txt + * + * - Parameter: **cid** + * - Example value: 35009a79-1a05-49d7-b876-2b884d0f825b + * - Example usage: cid=35009a79-1a05-49d7-b876-2b884d0f825b + * + * @returns {string} + */ + get clientId() { + return this._clientId; + } + + set clientId(value) { + this._clientId = value; + this._configureBaseParams(); + } + + /** + * This is intended to be a known identifier for a user provided by the site owner/tracking + * library user. It must not itself be PII (personally identifiable information). + * The value should never be persisted in GA cookies or other Analytics provided storage. + * + * - Parameter: **uid** + * - Example value: as8eknlll + * - Example usage: uid=as8eknlll + * + * @returns {string} + */ + get userId() { + return this._userId; + } + + set userId(value) { + this._userId = value; + this._configureBaseParams(); + } + + /** + * **Required for all hit types.** + * + * The tracking ID / web property ID. The format is UA-XXXX-Y. + * All collected data is associated by this ID. + * + * - Parameter: **tid** + * - Example value: UA-XXXX-Y + * - Example usage: tid=UA-XXXX-Y + * + * @returns {string} + */ + get trackingId() { + return this._trackingId; + } + + set trackingId(value) { + this._trackingId = value; + this._configureBaseParams(); + } + + /** + * When present, the IP address of the sender will be anonymized. + * For example, the IP will be anonymized if any of the following parameters are present in + * the payload: &aip=, &aip=0, or &aip=1 + * + * - Parameter: **aip** + * - Example value: 1 + * - Example usage: aip=1 + * @returns {boolean} + */ + get anonymizeIp() { + return this._anonymizeIp; + } + + set anonymizeIp(value) { + this._anonymizeIp = value; + this._configureBaseParams(); + } + + /** + * Indicates the data source of the hit. Hits sent from analytics.js will have data source + * set to 'web'; hits sent from one of the mobile SDKs will have data source set to 'app'. + * + * - Parameter: **ds** + * - Example value: call center + * - Example usage: ds=call%20center + * + * @returns {string} + */ + get dataSource() { + return this._dataSource; + } + + set dataSource(value) { + this._dataSource = value; + this._configureBaseParams(); + } + + /** + * Used to send a random number in GET requests to ensure browsers and proxies + * don't cache hits. + * + * - Parameter: **z** + * - Example value: 289372387623 + * - Example usage: z=289372387623 + * + * @returns {boolean} + */ + get useCacheBooster() { + return this._useCacheBooster; + } + + set useCacheBooster(value) { + this._useCacheBooster = value; + } + + /** + * Specifies which referral source brought traffic to a website. This value is also used to + * compute the traffic source. The format of this value is a URL. + * + * - Parameter: **dr** + * - Example value: http://example.com + * - Example usage: dr=http%3A%2F%2Fexample.com + * + * @returns {string} + */ + get referrer() { + return this._referrer; + } + + set referrer(value) { + this._referrer = value; + this._configureBaseParams(); + } + + /** + * Specifies the campaign name. + * + * - Parameter: **cn** + * - Example value: (direct) + * - Example usage: cn=%28direct%29 + * + * @returns {string} + */ + get campaignName() { + return this._campaignName; + } + + set campaignName(value) { + this._campaignName = value; + this._configureBaseParams(); + } + + /** + * Specifies the campaign source. + * + * - Parameter: **cs** + * - Example value: (direct) + * - Example usage: cs=%28direct%29 + * + * @returns {string} + */ + get campaignSource() { + return this._campaignSource; + } + + set campaignSource(value) { + this._campaignSource = value; + this._configureBaseParams(); + } + + /** + * Specifies the campaign medium. + * + * - Parameter: **cm** + * - Example value: organic + * - Example usage: cm=organic + * + * @returns {string} + */ + get campaignMedium() { + return this._campaignMedium; + } + + set campaignMedium(value) { + this._campaignMedium = value; + this._configureBaseParams(); + } + + /** + * Specifies the application version. + * + * - Parameter: **av** + * - Example value: 1.2 + * - Example usage: av=1.2 + * + * @returns {string} + */ + get appVersion() { + return this._appVersion; + } + + set appVersion(value) { + this._appVersion = value; + this._configureBaseParams(); + } + + /** + * Specifies the application name. This field is required for any hit that has app related + * data (i.e., app version, app ID, or app installer ID). For hits sent to web properties, + * this field is optional. + * + * - Parameter: **an** + * - Example My App + * - Example usage: an=My%20App + * + * @returns {string} + */ + get appName() { + return this._appName; + } + + set appName(value) { + this._appName = value; + this._configureBaseParams(); + } + + /** + * Application identifier. + * + * - Parameter: **aid** + * - Example value: com.company.app + * - Example usage: aid=com.company.app + * + * @returns {string} + */ + get appId() { + return this._appId; + } + + set appId(value) { + this._appId = value; + this._configureBaseParams(); + } + + /** + * Application installer identifier. + * + * - Parameter: **aiid** + * - Example value: com.platform.vending + * - Example usage: aiid=com.platform.vending + * + * @returns {string} + */ + get appInstallerId() { + return this._appInstallerId; + } + + set appInstallerId(value) { + this._appInstallerId = value; + this._configureBaseParams(); + } + + /** + * If set to true it will prints debug messages into the console. + * + * @returns {boolean} + */ + get debug() { + return this._debug; + } + + set debug(value) { + this._debug = value; + } + + /** + * If set it will send the data to GA's debug endpoint and the request won't be actually saved but only validated + * + * @returns {boolean} + */ + get debugEndpoint() { + return this._debugEndpoint; + } + + set debugEndpoint(value) { + this._debugEndpoint = value; + } + + /** + * When set it queues requests to GA in memory and attempts to send the requests + * again when this flag is removed. + * + * @returns {boolean} + */ + get offline() { + return this._offline; + } + + set offline(value) { + this._offline = value; + this._offlineChanged(value); + } + + /** + * Generated POST parameters based on a params + * @returns {Record} + */ + get _baseParams() { + return this.__baseParams; + } + + set _baseParams(value) { + this.__baseParams = value; + } + + /** + * Each custom metric has an associated index. There is a maximum of 20 custom + * metrics (200 for Analytics 360 accounts). The metric index must be a positive + * integer between 1 and 200, inclusive. + * + * - Parameter: **cm** + * - Example value: 47 + * - Example usage: cm1=47 + * + * @return {CustomMetric[]} + */ + get customMetrics() { + return this._customMetrics; + } + + set customMetrics(value) { + this._customMetrics = value; + } + + /** + * Each custom dimension has an associated index. There is a maximum of 20 custom + * dimensions (200 for Analytics 360 accounts). The dimension index must be a positive + * integer between 1 and 200, inclusive. + * + * - Parameter: **cd** + * - Example value: Sports + * - Example usage: cd1=Sports + * + * @return {CustomDimension[]} + */ + get customDimensions() { + return this._customDimensions; + } + + set customDimensions(value) { + this._customDimensions = value; + } + + /** + * @param {AnalyticsInit} init + */ + constructor(init) { + this[initializingValue] = true; + this.clientId = init.clientId; + this.trackingId = init.trackingId; + this._baseParams = {}; + this._customMetrics = []; + this._customDimensions = []; + + if (typeof init.userId === 'string') { + this.userId = init.userId; + } + if (typeof init.dataSource === 'string') { + this.dataSource = init.dataSource; + } + if (typeof init.referrer === 'string') { + this.referrer = init.referrer; + } + if (typeof init.campaignName === 'string') { + this.campaignName = init.campaignName; + } + if (typeof init.campaignSource === 'string') { + this.campaignSource = init.campaignSource; + } + if (typeof init.campaignMedium === 'string') { + this.campaignMedium = init.campaignMedium; + } + if (typeof init.appVersion === 'string') { + this.appVersion = init.appVersion; + } + if (typeof init.appName === 'string') { + this.appName = init.appName; + } + if (typeof init.appId === 'string') { + this.appId = init.appId; + } + if (typeof init.appInstallerId === 'string') { + this.appInstallerId = init.appInstallerId; + } + if (typeof init.debugEndpoint === 'boolean') { + this.debugEndpoint = init.debugEndpoint; + } + if (typeof init.anonymizeIp === 'boolean') { + this.anonymizeIp = init.anonymizeIp; + } + if (typeof init.useCacheBooster === 'boolean') { + this.useCacheBooster = init.useCacheBooster; + } + if (typeof init.debug === 'boolean') { + this.debug = init.debug; + } + if (Array.isArray(init.customDimensions)) { + this.customDimensions = init.customDimensions; + } + if (Array.isArray(init.customMetrics)) { + this.customMetrics = init.customMetrics; + } + this[initializingValue] = false; + this._configureBaseParams(); + } + + /** + * Sends the screen view hit to the GA. + * + * @param {string} name Screen name. + * @param {BaseHitOptions=} opts Custom data definition + * @returns {Promise} + */ + sendScreen(name, opts) { + const data = { + cd: name, + }; + this.appendCustomData(data, opts); + return this.sendHit('screenview', data); + } + + /** + * Sends the screen view hit to the GA. + * + * @param {string} name Screen name. + * @param {string=} hostName Document hostname. + * @param {string=} path Page path + * @param {BaseHitOptions=} opts Custom data definition + * @returns {Promise} + */ + sendPage(name, hostName=window.location.hostname, path=window.location.pathname, opts) { + const data = { + dh: hostName, + dp: path, + dt: name, + }; + this.appendCustomData(data, opts); + return this.sendHit('pageview', data); + } + + /** + * Sends event tracking. + * + * @param {string} category Specifies the event category. Must not be empty. + * @param {string} action Specifies the event action. Must not be empty. + * @param {string=} label Specifies the event label. Optional value. + * @param {number=} value Specifies the event value. Values must be non-negative. Optional. + * @param {BaseHitOptions=} opts Custom data definition. + * @returns {Promise} + */ + sendEvent(category, action, label, value, opts) { + const missing = []; + if (!category) { + missing.push('category'); + } + if (!action) { + missing.push('action'); + } + if (missing.length) { + throw new Error(`Missing required parameters: ${missing.join(', ')}`); + } + const data = { + ec: category, + ea: action + }; + if (label) { + data.el = label; + } + if (value) { + data.ev = value; + } + this.appendCustomData(data, opts); + return this.sendHit('event', data); + } + + /** + * Sends the exception hit to GA. + * + * @param {string} description A description of the exception. + * @param {boolean} fatal Specifies whether the exception was fatal. + * @param {BaseHitOptions=} opts Custom data definition. + * @returns {Promise} + */ + sendException(description, fatal, opts) { + const value = fatal ? '1' : '0'; + const data = { + exd: description, + exf: value, + }; + this.appendCustomData(data, opts); + return this.sendHit('exception', data); + } + + /** + * Track social interaction + * + * @param {string} network Specifies the social network, for example Facebook or Google Plus. + * @param {string} action Specifies the social interaction action. For example on Google Plus + * when a user clicks the +1 button, the social action is 'plus'. + * @param {string} target Specifies the target of a social interaction. This value is + * typically a URL but can be any text. + * @param {BaseHitOptions=} opts Custom data definition. + * @returns {Promise} + */ + sendSocial(network, action, target, opts) { + const missing = []; + if (!network) { + missing.push('network'); + } + if (!action) { + missing.push('action'); + } + if (!target) { + missing.push('target'); + } + if (missing.length) { + throw new Error(`Missing required parameters: ${missing.join(', ')}`); + } + const data = { + sn: network, + sa: action, + st: target + }; + this.appendCustomData(data, opts); + return this.sendHit('social', data); + } + + /** + * Track timings in the app. + * + * @param {string} category Specifies the user timing category. **required** + * @param {string} variable Specifies the user timing variable. **required** + * @param {number} time Specifies the user timing value. The value is in milliseconds. + * @param {string} label Specifies the user timing label. + * @param {BaseHitOptions=} cmOpts Custom data definition. + * @returns {Promise} + */ + sendTimings(category, variable, time, label, cmOpts) { + const missing = []; + if (!category) { + missing.push('category'); + } + if (!variable) { + missing.push('variable'); + } + if (!time) { + missing.push('time'); + } + if (missing.length) { + throw new Error(`Missing required parameters: ${missing.join(', ')}`); + } + const opts = { + utc: category, + utv: variable, + utt: String(time) + }; + if (label) { + opts.utl = label; + } + this.appendCustomData(opts, cmOpts); + return this.sendHit('timing', opts); + } + + /** + * Append custom metrics / dimensions definitions to the + * parameters list. + * + * @param {Record} data The data to send + * @param {BaseHitOptions=} opts + */ + appendCustomData(data, opts) { + if (!opts) { + return; + } + if (opts.customDimensions && opts.customDimensions.length) { + opts.customDimensions.forEach((item) => { + data[`cd${item.index}`] = item.value; + }); + } + if (opts.customMetrics && opts.customMetrics.length) { + opts.customMetrics.forEach((item) => { + data[`cm${item.index}`] = String(item.value); + }); + } + } + + /** + * Send a hit to the GA server. + * The `type` parameter is required for all types of hits. + * + * @param {string} type The type of hit. Must be one of 'pageview', 'screenview', 'event', + * 'transaction', 'item', 'social', 'exception', 'timing'. + * @param {Record} params Map of params to send wit this hit. + * @returns {Promise} + */ + sendHit(type, params) { + if (!['pageview', 'screenview', 'event', 'transaction', 'item', 'social', 'exception', 'timing'].includes(type)) { + throw new Error('Unknown hit type.'); + } + params.t = type; + this._processParams(params); + const post = { ...this._baseParams, ...params}; + const body = this._createBody(post); + if (this.debug) { + /* eslint-disable-next-line */ + console.group('Running command for ', type); + this._printParamsTable(post); + /* eslint-disable-next-line */ + console.groupEnd(); + } + return this._transport(body); + } + + /** + * Encodes parameters. + * @param {Record} params + */ + _processParams(params) { + Object.keys(params).forEach((param) => { + params[param] = this.encodeQueryString(params[param]); + }); + } + + /** + * Creates a post body from the params. + * @param {Record} params List of parameters to send + * @returns {string} Request body + */ + _createBody(params) { + let result = ''; + Object.keys(params).forEach((param) => { + if (result) { + result += '&'; + } + result += `${param}=${params[param]}`; + }); + return result; + } + + /** + * @param {string} str The value to URL encode + * @returns {string} The encoded value; + */ + encodeQueryString(str) { + if (!str) { + return str; + } + const regexp = /%20/g; + return encodeURIComponent(str).replace(regexp, '+'); + } + + _configureBaseParams() { + if (this[initializingValue]) { + return; + } + const { screen } = window; + const data = { + v: String(protocolVersion), + tid: this.trackingId, + cid: this.clientId, + ul: navigator.language, + sr: `${screen.width}x${screen.height}`, + sd: String(screen.pixelDepth) + }; + const iw = window.innerWidth; + const ih = window.innerHeight; + if (iw && ih) { + data.vp = `${iw}x${ih}`; + } + + if (this.userId) { + data.uid = this.userId; + } + if (this.anonymizeIp) { + data.aip = '1'; + } + if (this.dataSource) { + data.ds = this.encodeQueryString(this.dataSource); + } + if (this.referrer) { + data.dr = this.encodeQueryString(this.referrer); + } + if (this.campaignName) { + data.cn = this.encodeQueryString(this.campaignName); + } + if (this.campaignSource) { + data.cs = this.encodeQueryString(this.campaignSource); + } + if (this.campaignMedium) { + data.cm = this.encodeQueryString(this.campaignMedium); + } + if (this.appVersion) { + data.av = this.encodeQueryString(this.appVersion); + } + if (this.appName) { + data.an = this.encodeQueryString(this.appName); + } + if (this.appId) { + data.aid = this.encodeQueryString(this.appId); + } + if (this.appInstallerId) { + data.aiid = this.encodeQueryString(this.appInstallerId); + } + if (this.customMetrics.length) { + this.customMetrics.forEach((cm) => { + data[`cm${cm.index}`] = this.encodeQueryString(String(cm.value)); + }); + } + if (this._customDimensions.length) { + this._customDimensions.forEach((cd) => { + data[`cd${cd.index}`] = this.encodeQueryString(cd.value); + }); + } + if (this.debug) { + /* eslint-disable-next-line */ + console.info('[GA] Configuring base object', data); + } + this._baseParams = data; + } + + /** + * @param {Record} list + */ + _printParamsTable(list) { + const map = {}; + const debugList = []; + Object.keys(list).forEach((param) => { + const name = paramsMap[param] || param; + const value = decodeURIComponent(list[param]); + map[param] = { + value, + name + }; + debugList.push({ + param, + value, + name + }); + }); + /* eslint-disable-next-line */ + console.table(map, ['name', 'value']); + } + + /** + * @param {string} body The message to send + * @returns {Promise} + */ + async _transport(body) { + const { offline } = this; + if (offline) { + offlineQueue.push(body); + return; + } + + const init = { + method: 'POST', + headers: { 'content-type': 'application/x-www-form-urlencoded' }, + body, + }; + let url = 'https://www.google-analytics.com'; + if (this.debugEndpoint) { + url += '/debug'; + } + url += '/collect'; + if (this.useCacheBooster) { + url += `?z=${ Date.now()}`; + } + + try { + const response = await fetch(url, init); + if (response.status !== 200) { + if (!offline) { + offlineQueue.push(body); + } else { + throw new Error('Unable send data.'); + } + } + if (this.debugEndpoint) { + const result = await response.json(); + // eslint-disable-next-line no-console + console.log(result); + } + } catch (e) { + if (!navigator.onLine && !offline) { + offlineQueue.push(body); + return; + } + throw new Error('Unable to send data'); + } + } + + /** + * @param {boolean} value + * @returns {Promise} + */ + async _offlineChanged(value) { + if (value || !offlineQueue.length) { + // Nothing to do when offline of no pending tasks. + return; + } + const p = []; + for (let i = offlineQueue.length - 1; i >= 0; i--) { + const body = offlineQueue[i]; + offlineQueue.splice(i, 1); + p[p.length] = this._transport(body); + } + try { + await Promise.all(p) + } catch (e) { + /* eslint-disable-next-line */ + console.warn(e); + }; + } +} diff --git a/src/preload/WindowProxy.js b/src/preload/WindowProxy.js new file mode 100644 index 00000000..5a25cba6 --- /dev/null +++ b/src/preload/WindowProxy.js @@ -0,0 +1,13 @@ +import { ipcRenderer } from 'electron'; + +/** + * A proxy for the renderer process to communicate with the WindowManager + */ +export class WindowProxy { + /** + * Queries for the initial data the page was loaded with. + */ + async initContextMenu() { + ipcRenderer.send('window-context-menu-init'); + } +} diff --git a/src/preload/WorkspaceManager.js b/src/preload/WorkspaceManager.js new file mode 100644 index 00000000..d0202edb --- /dev/null +++ b/src/preload/WorkspaceManager.js @@ -0,0 +1,213 @@ +import { ipcRenderer } from 'electron'; +import logger from 'electron-log'; +import fs from 'fs-extra'; +import { v4 } from 'uuid'; +import { WorkspaceEventTypes } from '@advanced-rest-client/arc-events'; + +/** @typedef {import('@advanced-rest-client/arc-events').WorkspaceReadEvent} WorkspaceReadEvent */ +/** @typedef {import('@advanced-rest-client/arc-events').WorkspaceWriteEvent} WorkspaceWriteEvent */ +/** @typedef {import('@advanced-rest-client/arc-types').Workspace.DomainWorkspace} DomainWorkspace */ +/** @typedef {import('@advanced-rest-client/arc-types').Workspace.LegacyWorkspace} LegacyWorkspace */ + +export const readHandler = Symbol('readHandler'); +export const writeHandler = Symbol('writeHandler'); +export const getFileLocation = Symbol('getFileLocation'); + +/** + * A class that manipulates the content of the workspace file. + * The UI thread is not aware of the location of the workspace file. It only receives an autogenerated id by the `WindowManager`. + * This class needs to ask where the file is located. This is done so no other script other than the one loaded in the pre-load script + * can read the actual location of the file. + */ +export class WorkspaceManager { + /** + * @type {string} The read location of the workspace file. + */ + #file = undefined; + + /** + * @type {*} + */ + #writeTimeout = undefined; + + /** + * @param {string=} id The identifier of the workspace generated by the window manager. If not set the default file is used. + */ + constructor(id) { + this.id = id; + /** + * Store data debounce timer. + * By default it's 500 ms. + * @type {Number} + */ + this.timeout = 500; + + this[readHandler] = this[readHandler].bind(this); + this[writeHandler] = this[writeHandler].bind(this); + } + + listen() { + window.addEventListener(WorkspaceEventTypes.read, this[readHandler]); + window.addEventListener(WorkspaceEventTypes.write, this[writeHandler]); + } + + /** + * @param {WorkspaceReadEvent} e + */ + [readHandler](e) { + e.detail.result = this.read(); + } + + /** + * @param {WorkspaceWriteEvent} e + */ + [writeHandler](e) { + const { contents } = e.detail; + e.detail.result = this.write(contents); + } + + /** + * @returns {Promise} The current state of the workspace. + */ + async read() { + const file = await this[getFileLocation](); + await fs.ensureFile(file); + let result; + try { + result = await fs.readJSON(file, { throws: false }); + } catch (e) { + logger.error(`Workspace file read error for file ${file}`); + } + return this.processWorkspaceInput(result); + } + + /** + * Stores the state to a file. + * @param {DomainWorkspace} workspace The workspace data to store. + */ + async write(workspace) { + if (this.#writeTimeout) { + clearTimeout(this.#writeTimeout); + this.#writeTimeout = undefined; + } + const file = await this[getFileLocation](); + try { + await fs.ensureFile(file); + await fs.writeJSON(file, workspace); + } catch (e) { + logger.error(`Workspace file write error to file ${file}`); + } + } + + /** + * Stores the state to a file. + * @param {DomainWorkspace} workspace The workspace data to store. + */ + writeAsync(workspace) { + if (this.#writeTimeout) { + clearTimeout(this.#writeTimeout); + } + this.#writeTimeout = setTimeout(() => this.write(workspace), this.timeout); + } + + /** + * @returns {Promise} + */ + async [getFileLocation]() { + if (this.#file) { + return this.#file; + } + const location = await ipcRenderer.invoke('workspace-get-location', this.id); + this.#file = location; + return location; + } + + /** + * If needed it upgrades the schema to the current one. + * It creates a new workspace if it detects that the input is invalid. + * @param {any} input The data read from the file. + * @returns {DomainWorkspace} Processed workspace data + */ + processWorkspaceInput(input) { + if (!input) { + return this.createDefaultWorkspace(); + } + if (input.kind === 'ARC#DomainWorkspace') { + return input; + } + const typedLegacy = /** @type LegacyWorkspace */ (input); + if (Array.isArray(typedLegacy.requests)) { + return this.upgradeLegacyWorkspace(typedLegacy); + } + return this.createDefaultWorkspace(); + } + + /** + * Creates an empty workspace definition. + * @returns {DomainWorkspace} Processed workspace data + */ + createDefaultWorkspace() { + return { + kind: 'ARC#DomainWorkspace', + id: v4(), + readOnly: false, + }; + } + + /** + * @param {LegacyWorkspace} old + * @returns {DomainWorkspace} Processed workspace data + */ + upgradeLegacyWorkspace(old) { + const info = this.createDefaultWorkspace(); + info.meta = { + kind: 'ARC#ThingMeta', + }; + if (typeof old.description === 'string') { + info.meta.description = old.description; + } + if (typeof old.version === 'string') { + info.meta.version = old.version; + } + if (typeof old.published === 'string') { + info.meta.published = old.published; + info.meta.updated = old.published; + } + if (typeof old.version === 'string') { + info.meta.version = old.version; + } + if (old.provider) { + info.provider = old.provider; + info.provider.kind = 'ARC#Provider'; + } + if (typeof old.selected === 'number') { + info.selected = old.selected; + } + if (Array.isArray(old.variables)) { + info.variables = old.variables; + } + if (Array.isArray(old.requests)) { + info.requests = old.requests; + } + return info; + } + + /** + * Triggers the save file dialog and when a file is picker then is changes the workspace file location. + * @returns {Promise} + */ + async changeStoreLocation() { + const opts = { + file: 'arc-workspace.json', + }; + const dialogResult = await ipcRenderer.invoke('save-dialog', opts); + const { canceled, filePath } = dialogResult; + if (canceled) { + return undefined; + } + const id = await ipcRenderer.invoke('workspace-change-location', filePath); + this.#file = undefined; + this.id = id; + return id; + } +} diff --git a/src/preload/arc-preload.esm.js b/src/preload/arc-preload.esm.js new file mode 100644 index 00000000..6745b913 --- /dev/null +++ b/src/preload/arc-preload.esm.js @@ -0,0 +1,89 @@ +import { ipcRenderer, clipboard } from 'electron'; +import logger from 'electron-log'; +import { OAuth2Handler } from '@advanced-rest-client/electron-oauth2/renderer/OAuth2Handler.js'; +import { SocketRequest, ElectronRequest } from '@advanced-rest-client/electron-request'; +import { ElectronAmfService } from '@advanced-rest-client/electron-amf-service'; +import { PreferencesProxy } from './PreferencesProxy.js'; +import { WindowProxy } from './WindowProxy.js'; +import { CookieBridge } from './CookieBridge.js'; +import { ThemeManager } from './ThemeManager.js'; +import { EncryptionService } from './EncryptionService.js'; +import { WorkspaceManager } from './WorkspaceManager.js'; +import { ImportFilePreProcessor } from './ImportFilePreProcessor.js'; +import { FilesystemProxy } from './FilesystemProxy.js'; +import { ApplicationSearchProxy } from './ApplicationSearchProxy.js'; +import { AppStateProxy } from './AppStateProxy.js'; +import { GoogleDriveProxy } from './GoogleDriveProxy.js'; +import { GoogleAnalytics } from './GoogleAnalytics.js'; + +const env = {}; +const APP_VERSION = process.env.npm_package_version; +Object.keys(process.env).forEach((key) => { + if (key.indexOf('npm_') === 0 || key.indexOf('ARC_') === 0) { + return; + } + env[key] = process.env[key]; +}); + +const { versions } = process; +const nodeBuffer = Buffer; + +const origRequire = require; + +process.once('loaded', () => { + // @ts-ignore + global.OAuth2Handler = OAuth2Handler; + // @ts-ignore + global.PreferencesProxy = PreferencesProxy; + // @ts-ignore + global.AppStateProxy = AppStateProxy; + global.logger = logger; + // @ts-ignore + global.WindowManagerProxy = WindowProxy; + // @ts-ignore + global.CookieBridge = CookieBridge; + // @ts-ignore + global.SocketRequest = SocketRequest; + // @ts-ignore + global.ElectronRequest = ElectronRequest; + // @ts-ignore + global.ThemeManager = ThemeManager; + // @ts-ignore + global.EncryptionService = EncryptionService; + // @ts-ignore + global.WorkspaceManager = WorkspaceManager; + // @ts-ignore + global.ImportFilePreProcessor = ImportFilePreProcessor; + // @ts-ignore + global.FilesystemProxy = FilesystemProxy; + // @ts-ignore + global.ApplicationSearchProxy = ApplicationSearchProxy; + // @ts-ignore + global.GoogleDriveProxy = GoogleDriveProxy; + // @ts-ignore + global.ElectronAmfService = ElectronAmfService; + // @ts-ignore + global.GoogleAnalytics = GoogleAnalytics; + global.ipc = ipcRenderer; + global.clipboard = clipboard; + + global.process = { + // @ts-ignore + env, + }; + + // @ts-ignore + global.versionInfo = { + // @ts-ignore + chrome: versions.chrome, + appVersion: APP_VERSION, + }; + + // this is important for the response view which uses Buffer class when the response has been recorded by Electron app. + global.Buffer = nodeBuffer; + + if (process.env.NODE_ENV === 'test') { + // @ts-ignore + window.electronRequire = origRequire + } +}); diff --git a/src/preload/arc-preload.js b/src/preload/arc-preload.js new file mode 100644 index 00000000..0a81b19b --- /dev/null +++ b/src/preload/arc-preload.js @@ -0,0 +1,3 @@ +const _require = require("esm")(module); + +_require('./arc-preload.esm.js'); diff --git a/src/preload/popup-menu.esm.js b/src/preload/popup-menu.esm.js new file mode 100644 index 00000000..96347d02 --- /dev/null +++ b/src/preload/popup-menu.esm.js @@ -0,0 +1,13 @@ +import { ipcRenderer } from 'electron'; +import logger from 'electron-log'; +import { PreferencesProxy } from './PreferencesProxy.js'; +import { ThemeManager } from './ThemeManager.js'; + +process.once('loaded', () => { + // @ts-ignore + global.PreferencesProxy = PreferencesProxy; + global.logger = logger; + // @ts-ignore + global.ThemeManager = ThemeManager; + global.ipc = ipcRenderer; +}); diff --git a/src/preload/popup-menu.js b/src/preload/popup-menu.js new file mode 100644 index 00000000..5380a87f --- /dev/null +++ b/src/preload/popup-menu.js @@ -0,0 +1,3 @@ +const _require = require("esm")(module); + +_require('./popup-menu.esm.js'); diff --git a/src/preload/search-bar.esm.js b/src/preload/search-bar.esm.js new file mode 100644 index 00000000..6097de9b --- /dev/null +++ b/src/preload/search-bar.esm.js @@ -0,0 +1,8 @@ +import { ipcRenderer } from 'electron'; +import { ThemeManager } from './ThemeManager.js'; + +process.once('loaded', () => { + global.ipc = ipcRenderer; + // @ts-ignore + global.ThemeManager = ThemeManager; +}); diff --git a/src/preload/search-bar.js b/src/preload/search-bar.js new file mode 100644 index 00000000..7016dd73 --- /dev/null +++ b/src/preload/search-bar.js @@ -0,0 +1,3 @@ +const _require = require("esm")(module); + +_require('./search-bar.esm.js'); diff --git a/src/preload/themes-preload.esm.js b/src/preload/themes-preload.esm.js new file mode 100644 index 00000000..96347d02 --- /dev/null +++ b/src/preload/themes-preload.esm.js @@ -0,0 +1,13 @@ +import { ipcRenderer } from 'electron'; +import logger from 'electron-log'; +import { PreferencesProxy } from './PreferencesProxy.js'; +import { ThemeManager } from './ThemeManager.js'; + +process.once('loaded', () => { + // @ts-ignore + global.PreferencesProxy = PreferencesProxy; + global.logger = logger; + // @ts-ignore + global.ThemeManager = ThemeManager; + global.ipc = ipcRenderer; +}); diff --git a/src/preload/themes-preload.js b/src/preload/themes-preload.js new file mode 100644 index 00000000..25fb4601 --- /dev/null +++ b/src/preload/themes-preload.js @@ -0,0 +1,3 @@ +const _require = require("esm")(module); + +_require('./themes-preload.esm.js'); diff --git a/src/search-bar/search-bar.html b/src/search-bar/search-bar.html deleted file mode 100644 index 78789e0e..00000000 --- a/src/search-bar/search-bar.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - Search - - - - - - - diff --git a/src/search-bar/search-bar.js b/src/search-bar/search-bar.js deleted file mode 100644 index 9782dac2..00000000 --- a/src/search-bar/search-bar.js +++ /dev/null @@ -1,251 +0,0 @@ -import { LitElement, html, css } from '../../web_modules/lit-element/lit-element.js'; -import { keyboardArrowUp, keyboardArrowDown, close } from - '../../web_modules/@advanced-rest-client/arc-icons/ArcIcons.js'; -import '../../web_modules/@polymer/font-roboto-local/roboto.js'; -import '../../web_modules/@anypoint-web-components/anypoint-button/anypoint-icon-button.js'; -import '../../web_modules/@anypoint-web-components/anypoint-input/anypoint-input.js'; - -class SearchBar extends LitElement { - static get styles() { - return css` - .container { - display: flex; - flex-direction: row; - align-items: center; - background-color: var(--search-bar-background-color, #fff); - margin: 8px; - } - - .container .counters { - color: var(--search-bar-counters-color, #9E9E9E); - font-size: 14px; - } - - .controls { - display: flex; - flex-direction: row; - align-items: center; - margin-left: 8px; - padding-left: 8px; - } - - anypoint-icon-button { - color: var(--search-bar-action-button-color, #616161); - width: 36px; - height: 36px; - } - - anypoint-input { - flex: 1; - width: auto; - margin: 0; - } - - .icon { - width: 24px; - height: 24px; - display: inline-block; - fill: currentColor; - } - `; - } - - static get properties() { - return { - value: { type: String }, - selected: { type: Number }, - searchCount: { type: Number }, - }; - } - - /** - * @constructor - */ - constructor() { - super(); - this._searchCoundHandler = this._searchCoundHandler.bind(this); - this._focusHandler = this._focusHandler.bind(this); - this._keydownHandler = this._keydownHandler.bind(this); - - this.selected = 0; - this.searchCount = 0; - } - - get hasValue() { - return !!this.value; - } - - connectedCallback() { - super.connectedCallback(); - this.loadBar(); - this.listen(); - } - - /** - * Listens for the main script events. - */ - listen() { - /* global ipc */ - ipc.on('search-count', this._searchCoundHandler); - ipc.on('focus-input', this._focusHandler); - this.addEventListener('keydown', this._keydownHandler); - } - /** - * Removes listeners for the main script events. - */ - disconnectedCallback() { - super.disconnectedCallback(); - ipc.removeListener('search-count', this._searchCoundHandler); - ipc.removeListener('focus-input', this._focusHandler); - this.removeEventListener('keydown', this._keydownHandler); - } - /** - * Loads bar components. - * - * @return {Promise} - */ - async loadBar() { - /* global ArcPreferencesProxy, ThemeManager */ - const prefProxy = new ArcPreferencesProxy(); - const cnf = await prefProxy.load(); - const mgr = new ThemeManager(); - await mgr.loadTheme(cnf.theme); - } - /** - * Closes the search bar. - */ - close() { - ipc.send('search-bar-close'); - } - /** - * Sends the `search-bar-query` event to the main script - * so the window search handler can perform search operation. - */ - query() { - const { value } = this; - ipc.send('search-bar-query', value); - } - /** - * Sends the `search-bar-query-next` event to the main script - * so the window search handler can mark next search result. - */ - highlightNext() { - ipc.send('search-bar-query-next'); - } - /** - * Sends the `search-bar-query-previous` event to the main script - * so the window search handler can mark previous search result. - */ - highlightPrevious() { - ipc.send('search-bar-query-previous'); - } - /** - * Handler for the `search-count` event from the main page. - * Sets `searchCount` and `selected` properties on the search bar - * template instance. - * - * @param {Event} event Event instance. - * @param {Number} count Search results count - * @param {Number} selected Currently selected instance. - */ - _searchCoundHandler(event, count, selected) { - this.searchCount = count; - this.selected = selected; - } - /** - * Focuses on the text input. - */ - _focusHandler() { - const i = this.shadowRoot.querySelector('anypoint-input'); - if (!i) { - return; - } - i.inputElement.focus(); - } - - _inputHandler(e) { - this.value = e.target.value; - this.query(); - } - - _keydownHandler(e) { - if (e.key === 'Escape') { - this.close(); - } else if (e.key === 'Enter') { - this.highlightNext(); - } - } - - render() { - return html` -
- ${this._inputTemplate()} -
- ${this._controlsTemplate()} -
-
`; - } - - _inputTemplate() { - const { - value, - compatibility - } = this; - return html` - - ${this._suffixTemplate()} - - - `; - } - - _suffixTemplate() { - if (!this.hasValue) { - return ''; - } - const { - selected, - searchCount - } = this; - return html`
${selected}/${searchCount}
`; - } - - _controlsTemplate() { - const { hasValue, compatibility } = this; - return html` - - ${keyboardArrowUp} - - - ${keyboardArrowDown} - - - ${close} - - `; - } -} -window.customElements.define('search-bar', SearchBar); diff --git a/src/types.d.ts b/src/types.d.ts new file mode 100644 index 00000000..43c82bfe --- /dev/null +++ b/src/types.d.ts @@ -0,0 +1,262 @@ +import { Cookie } from 'electron'; +import { OAuth2Authorization } from '@advanced-rest-client/electron-oauth2'; + +/** + * Configuration for an application config option. + */ +export declare interface ApplicationOption { + name: string; + shortcut?: string; + type: any; + isArray?: boolean; +} +/** + * Configuration option after internal processing + */ +export declare interface ProcessedApplicationOption extends ApplicationOption { + value?: any; + skipNext: boolean; +} +/** + * An object generated by the `ApplicationOptions` class. + */ +export declare interface ApplicationOptionsConfig { + settingsFile?: string; + stateFile?: string; + themesPath?: string; + workspacePath?: string; + dev?: boolean; + debugLevel?: 'debug'|'error'|'info'|'silly'|'verbose'|'warn'; + withDevtools?: boolean; + // this is for development purposes only + port?: number; + // the domain model file to open. + open?: string; + /** + * When set it prohibits the application from auto update. + */ + skipAppUpdate?: boolean; + skipThemesUpdate?: boolean; + userDataDir?: string; + /** + * Overrides current configuration for the release channel. + */ + releaseChannel?: string; + openProtocolFile?: string; + /** + * When set it does not render the cookie consent dialog + */ + skipCookieConsent?: boolean; + /** + * When set it does not render the cookie consent dialog + */ + skipDatabaseUpgrade?: boolean; +} + +/** + * When the application was opened from the protocol handler it will + * have a path that looks like `domain://[source]/[action]/[id]` + */ +export declare interface ProtocolFile { + source: string; + action: string; + id: string; +} + +/** + * The final config object distributed to all windows. + */ +export declare interface ApplicationConfig { + /** + * Whether the telemetry is enabled. + */ + telemetry?: boolean; + /** + * Application release channel. + */ + releaseChannel?: 'beta' | 'alpha' | 'latest'; + /** + * Whether the automatic updates are enabled. + * True by default. + */ + autoUpdate?: boolean; +} + +export declare interface WindowsSessionSchema { + windows: WindowSession[]; +} + +/** + * Interface describing a data structure for a window sizes and positions. + * Used in `WindowPersistance`. + */ +export declare interface WindowSession { + /** + * The id of the window. + */ + id?: number, + width?: number; + height?: number; + x?: number; + y?: number; +} + +export declare interface OpenPageOptions { + /** + * The name of the page in the `src/app/` directory to load in the window. + * Default to `app.html`. + */ + page?: string; + /** + * A string to be appended to the has part of the loaded URL. + * No default value. + */ + route?: string; + /** + * The name of the preload script located in the `src/preload/` folder. + * When not set no preload script is loaded, unless loading the default page (no value on `page`), + * then it is set to `arc-preload.js`. + */ + preload?: string; + /** + * A list of init parameters to append to the loaded page's query string. + */ + params?: {[key: string]: string}; + /** + * The workspace file that has been requested to open with the window. + * This is only for the main application window. + */ + workspaceFile?: string; + /** + * When set it ignores reading window sizing and position from the workspace file. + */ + ignoreWindowSessionSettings?: boolean; + /** + * When set it removed the default menu + */ + noMenu?: boolean; + /** + * Optional size and position to set on the window. + */ + sizing?: WindowSession; + /** + * This is intended to be used with the Google Drive window only. Google does not allow other than http: https: origins + * and therefore the app is unable to make a request from the application. + * When a Drive picker window is opened it instructs Electron to disable web security to work around this problem. + */ + noWebSecurity?: boolean; + /** + * Makes the new window a child of the `parent`. + */ + parent?: Electron.BrowserWindow; +} + +export declare interface ArcAppInitOptions { + /** + * Tells whether dark mode should be enabled, due to system settings. + */ + darkMode?: boolean; + /** + * The backend id of the workspace file. + */ + workspaceId?: string; +} + + +export interface SessionManagerConfig { + /** + * A list of application internal URLs for + * which certificate error should not be ignored. + */ + appUrls?: string[]; +} + +export interface ElectronCookieChangeRecord { + /** + * The cookie that was changed. + */ + cookie: Cookie; + /** + * The cause of the change with one of the following values: + * - `explicit` - The cookie was changed directly by a consumer's action. + * - `overwrite` - The cookie was automatically removed due to an insert operation that overwrote it. + * - `expired` - The cookie was automatically removed as it expired. + * - `evicted` - The cookie was automatically evicted during garbage collection. + * - `expired-overwrite` - The cookie was overwritten with an already-expired expiration date. + */ + cause: string; + /** + * `true` if the cookie was removed, `false` otherwise. + */ + removed: boolean; +} + + +export interface DriveExportInit { + /** + * Default mime type for a file if not defined when updating. + */ + mime?: string; + fileDescription?: string; + fileType?: string; +} + +export interface SaveDriveFileOptions { + /** + * Optional name of the parent folder + */ + parent?: string; + /** + * Google Drive file id to update. Used when updating a file. + */ + id?: string; + /** + * Google Drive file resource values. See Google Drive API documentation for details. + */ + meta?: FileResource; + /** + * Authorization configuration to use when authorizing the request. + * If the `accessToken` property is set it skips authorization and uses this token instead. + * By default it expects `oauth2` configuration in the `package.json` file. + */ + auth?: OAuth2Authorization; +} + +export declare interface FileMedia { + mimeType: string; + body: string; +} + +export declare interface FileResource { + description?: string; + parents?: string[]; + /** + * The name of the file + */ + name: string; + /** + * File content type. Defaults to `application/json` + */ + mimeType?: string; +} + +export declare interface AppFolderListResponse { + kind: 'drive#fileList'; + incompleteSearch: boolean; + files: FolderListItem[]; +} + +export declare interface FolderListItem { + kind: 'drive#file'; + id: string; + name: string; + mimeType: string; +} + +export declare interface FileCreateItem { + kind: 'drive#file', + id: string; + name: string; + mimeType: string; + parents?: FolderListItem[]; +} diff --git a/tasks/arc-publish.sh b/tasks/arc-publish.sh index 1906a8e4..7170d822 100755 --- a/tasks/arc-publish.sh +++ b/tasks/arc-publish.sh @@ -3,6 +3,11 @@ if [ $TRAVIS_BRANCH != 'alpha' ] && [ $TRAVIS_BRANCH != 'master' ] && [ $TRAVIS_ exit 0 fi +if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + echo "Skipping ARC build. This is a PR request." + exit 0 +fi + # Fails the build when the publishing process fails. set -e diff --git a/tasks/notarize.js b/tasks/notarize.js index 4dedc5ca..68ad8368 100644 --- a/tasks/notarize.js +++ b/tasks/notarize.js @@ -4,7 +4,7 @@ const { notarize } = require('electron-notarize'); exports.default = async function notarizing(context) { const { electronPlatformName, appOutDir } = context; if (electronPlatformName !== 'darwin') { - return; + return undefined; } const appName = context.packager.appInfo.productFilename; @@ -12,7 +12,7 @@ exports.default = async function notarizing(context) { /* eslint-disable-next-line no-console */ console.log('Notarizing macOS application...'); - return await notarize({ + return notarize({ appBundleId: 'com.mulesoft.arc', appPath: `${appOutDir}/${appName}.app`, appleId: process.env.APPLEID, diff --git a/tasks/prepare-app.js b/tasks/prepare-app.js index 72729a49..5d0a9e91 100644 --- a/tasks/prepare-app.js +++ b/tasks/prepare-app.js @@ -1,3 +1,4 @@ +/* eslint-disable no-await-in-loop */ const fs = require('fs-extra'); const path = require('path'); /* eslint-disable no-console */ @@ -13,6 +14,7 @@ class PrepareApp { process.exit(-1); } } + /** * A function that checks whether any of `@advanced-rest-client` or `@api-components` * module located in node_modules has inner `node_modules` component. @@ -28,9 +30,13 @@ class PrepareApp { async _analyzeNmPath(dir) { const loc = path.join(__dirname, '..', 'node_modules', dir); + const exists = await fs.pathExists(loc); + if (!exists) { + return; + } const items = await fs.readdir(loc); for (let i = 0, len = items.length; i < len; i++) { - if (items[i] === 'pouchdb-mapreduce-no-ddocs') { + if (['pouchdb-mapreduce-no-ddocs', 'electron-request'].includes(items[i])) { continue; } const candidate = path.join(loc, items[i], 'node_modules'); diff --git a/test/basic.nottest.js b/test/.old/basic.nottest.js similarity index 100% rename from test/basic.nottest.js rename to test/.old/basic.nottest.js diff --git a/test/client-certificates/cc.app.spec.js b/test/.old/client-certificates/cc.app.spec.js similarity index 100% rename from test/client-certificates/cc.app.spec.js rename to test/.old/client-certificates/cc.app.spec.js diff --git a/test/configuration/renderer-configuration-setup.app.spec.js b/test/.old/configuration/renderer-configuration-setup.app.spec.js similarity index 100% rename from test/configuration/renderer-configuration-setup.app.spec.js rename to test/.old/configuration/renderer-configuration-setup.app.spec.js diff --git a/test/remote-api/api.app.spec.js b/test/.old/remote-api/api.app.spec.js similarity index 100% rename from test/remote-api/api.app.spec.js rename to test/.old/remote-api/api.app.spec.js diff --git a/test/session-cookies/basic.app.spec.js b/test/.old/session-cookies/basic.app.spec.js similarity index 100% rename from test/session-cookies/basic.app.spec.js rename to test/.old/session-cookies/basic.app.spec.js diff --git a/test/themes/dark-mode.app.spec.js b/test/.old/themes/dark-mode.app.spec.js similarity index 100% rename from test/themes/dark-mode.app.spec.js rename to test/.old/themes/dark-mode.app.spec.js diff --git a/test/window-bootstrap/database.app.spec.js b/test/.old/window-bootstrap/database.app.spec.js similarity index 100% rename from test/window-bootstrap/database.app.spec.js rename to test/.old/window-bootstrap/database.app.spec.js diff --git a/test/window-bootstrap/window-loading.app.spec.js b/test/.old/window-bootstrap/window-loading.app.spec.js similarity index 100% rename from test/window-bootstrap/window-loading.app.spec.js rename to test/.old/window-bootstrap/window-loading.app.spec.js diff --git a/test/basics/app-options.main.spec.js b/test/ApplicationOptions/ApplicationOptions.main.spec.js similarity index 68% rename from test/basics/app-options.main.spec.js rename to test/ApplicationOptions/ApplicationOptions.main.spec.js index ce643685..57bf8071 100644 --- a/test/basics/app-options.main.spec.js +++ b/test/ApplicationOptions/ApplicationOptions.main.spec.js @@ -1,18 +1,23 @@ -const { AppOptions } = require('../../scripts/main/app-options'); const { assert } = require('chai'); -describe('AppOptions', () => { +const _require = require('esm')(module); + +/** @typedef {import('../../src/io/ApplicationOptions').ApplicationOptions} ApplicationOptions */ + +const { ApplicationOptions } = _require('../../src/io/ApplicationOptions.js'); + +describe('ApplicationOptions', () => { describe('#availableOptions', () => { - let instance; + let instance = /** @type ApplicationOptions */ (null); before(() => { - instance = new AppOptions(); + instance = new ApplicationOptions(); }); [ '--settings-file', + '--state-file', '--workspace-path', '--themes-path', - '--components-path', - '--debug', + '--dev', '--debug-level', '--with-devtools', '.', @@ -20,6 +25,10 @@ describe('AppOptions', () => { '--open', '--skip-app-update', '--skip-themes-update', + '--user-data-dir', + '--release-channel', + '--skip-cookie-consent', + '--skip-database-upgrade', ].forEach((option) => { it(`supports ${option} option`, () => { const opts = instance.availableOptions; @@ -30,9 +39,9 @@ describe('AppOptions', () => { [ '-s', + '-S', '-w', '-t', - '-c', '-d', '-l', '-w', @@ -41,6 +50,8 @@ describe('AppOptions', () => { '-o', '-u', '-x', + '-D', + '-r', ].forEach((option) => { it(`supports ${option} shortcut`, () => { const opts = instance.availableOptions; @@ -51,10 +62,10 @@ describe('AppOptions', () => { [ ['--settings-file', String], + ['--state-file', String], ['--workspace-path', String], ['--themes-path', String], - ['--components-path', String], - ['--debug', Boolean], + ['--dev', Boolean], ['--debug-level', String], ['--with-devtools', Boolean], ['.', String], @@ -62,6 +73,10 @@ describe('AppOptions', () => { ['--open', String], ['--skip-themes-update', Boolean], ['--skip-app-update', Boolean], + ['--user-data-dir', String], + ['--release-channel', String], + ['--skip-cookie-consent', Boolean], + ['--skip-database-upgrade', Boolean], ].forEach(([option, type]) => { it(`has type for ${option} option`, () => { const opts = instance.availableOptions; @@ -72,23 +87,27 @@ describe('AppOptions', () => { }); describe('parse()', () => { - let instance; + let instance = /** @type ApplicationOptions */ (null); beforeEach(() => { - instance = new AppOptions(); + instance = new ApplicationOptions(); }); [ ['--settings-file', 'test-settings-file', 'test-settings-file', 'settingsFile'], + ['--state-file', 'test-state-file', 'test-state-file', 'stateFile'], ['--workspace-path', 'test-workspace-path', 'test-workspace-path', 'workspacePath'], ['--themes-path', 'test-themes-path', 'test-themes-path', 'themesPath'], - ['--components-path', 'test-components-path', 'test-components-path', 'componentsPath'], + ['--dev', undefined, true, 'dev'], ['--debug-level', 'silly', 'silly', 'debugLevel'], - ['--open', 'test-file', 'test-file', 'open'], - ['--debug', undefined, true, 'debug'], ['--with-devtools', undefined, true, 'withDevtools'], ['--port', '8080', 8080, 'port'], + ['--open', 'test-file', 'test-file', 'open'], ['--skip-app-update', undefined, true, 'skipAppUpdate'], ['--skip-themes-update', undefined, true, 'skipThemesUpdate'], + ['--user-data-dir', 'data-path', 'data-path', 'userDataDir'], + ['--release-channel', 'latest', 'latest', 'releaseChannel'], + ['--skip-cookie-consent', undefined, true, 'skipCookieConsent'], + ['--skip-database-upgrade', undefined, true, 'skipDatabaseUpgrade'], ].forEach(([option, value, parsedValue, property]) => { it(`sets ${option} property to ${value}`, () => { const orig = process.argv; @@ -96,18 +115,20 @@ describe('AppOptions', () => { if (value) { newArgs[newArgs.length] = value; } + // @ts-ignore process.argv = newArgs; instance.parse(); process.argv = orig; + // @ts-ignore assert.equal(instance[property], parsedValue); }); }); }); describe('openProtocolFile()', () => { - let instance; + let instance = /** @type ApplicationOptions */ (null); beforeEach(() => { - instance = new AppOptions(); + instance = new ApplicationOptions(); }); it('sets Drive protocol info', () => { diff --git a/test/ElectronCookies/CookieBridge.renderer.spec.js b/test/ElectronCookies/CookieBridge.renderer.spec.js new file mode 100644 index 00000000..ff91e04e --- /dev/null +++ b/test/ElectronCookies/CookieBridge.renderer.spec.js @@ -0,0 +1,423 @@ +/* eslint-disable prefer-destructuring */ +/* eslint-disable import/no-commonjs */ + +const { assert } = require('chai'); +const _require = require('esm')(module); + +const { CookieBridge } = _require('../../src/preload/CookieBridge'); +const ArcEvents = _require('@advanced-rest-client/arc-events'); +const { DataGenerator } = require('./Generator.js'); + +/** @typedef {import('@advanced-rest-client/arc-events').SessionCookieEvents} SessionCookieEventsType */ +/** @typedef {import('@advanced-rest-client/arc-types').Cookies.ARCCookie} ARCCookie */ + +const SessionCookieEvents = /** @type SessionCookieEventsType */ (ArcEvents.SessionCookieEvents); + +describe('CookieBridge - renderer process', () => { + const generator = new DataGenerator(); + + /** + * @param {CookieBridge} instance + */ + async function removeAllCookies(instance) { + const cookies = await instance.getAllCookies(); + if (cookies.length) { + await instance.removeCookies(cookies); + } + } + + describe('getAllCookies()', () => { + let instance = /** @type CookieBridge */ (null); + + beforeEach(async () => { + instance = new CookieBridge(); + }); + + afterEach(async () => { + await removeAllCookies(instance); + }); + + it('reads all cookies', async () => { + const cookies = generator.generateCookiesData({ size: 10 }); + await instance.updateCookies(cookies); + const result = await instance.getAllCookies(); + assert.lengthOf(result, 10); + }); + + it('returns empty array when no cookies', async () => { + const result = await instance.getAllCookies(); + assert.lengthOf(result, 0); + }); + + it('has no expired cookies', async () => { + const cookie = generator.generateCookieObject(); + cookie.expires = Date.now() - 1000; + delete cookie.maxAge; + await instance.updateCookies([cookie]); + const result = await instance.getAllCookies(); + assert.lengthOf(result, 0); + }); + }); + + describe('getDomainCookies()', () => { + let instance = /** @type CookieBridge */ (null); + + beforeEach(async () => { + instance = new CookieBridge(); + }); + + afterEach(async () => { + await removeAllCookies(instance); + }); + + it('reads cookies for the domain', async () => { + const cookies = generator.generateCookiesData({ size: 5 }); + await instance.updateCookies(cookies); + const result = await instance.getDomainCookies(cookies[0].domain); + assert.lengthOf(result, 1); + }); + + it('returns empty array when no cookies', async () => { + const result = await instance.getDomainCookies('api.com'); + assert.lengthOf(result, 0); + }); + + it('returns empty array when no domain cookies', async () => { + const cookies = generator.generateCookiesData({ size: 5 }); + await instance.updateCookies(cookies); + const result = await instance.getDomainCookies('api.com'); + assert.lengthOf(result, 0); + }); + }); + + describe('removeCookies()', () => { + let instance = /** @type CookieBridge */ (null); + + beforeEach(async () => { + instance = new CookieBridge(); + }); + + afterEach(async () => { + await removeAllCookies(instance); + }); + + it('removes a cookie', async () => { + const cookie = generator.generateCookieObject(); + await instance.updateCookie(cookie); + await instance.removeCookies([cookie]); + const result = await instance.getAllCookies(); + assert.lengthOf(result, 0); + }); + + it('does nothing when cookie does not exist', async () => { + const cookie = generator.generateCookieObject(); + await instance.removeCookies([cookie]); + }); + }); + + describe('Events based tests', () => { + async function createTestCookies() { + const c1 = { + name: 'test-name', + value: 'test-value', + url: 'http://api.domain.com', + domain: 'api.domain.com', + path: '/', + }; + const c2 = { + name: 'test2', + value: 'test2', + url: 'http://other.com', + domain: 'other.com', + path: '/', + }; + await SessionCookieEvents.update(document.body, c1); + await SessionCookieEvents.update(document.body, c2); + } + + async function removeTestCookies() { + const cookies = [{ + name: 'test-name', + url: 'http://api.domain.com', + domain: 'api.domain.com', + path: '/', + }, { + name: 'test2', + url: 'http://other.com', + domain: 'other.com', + path: '/', + }]; + await SessionCookieEvents.delete(document.body, cookies); + } + + let instance = /** @type CookieBridge */ (null); + before(() => { + instance = new CookieBridge(); + instance.listen(); + }); + + after(() => { + instance.unlisten(); + }); + + describe('session-cookie-list-all', () => { + before(() => createTestCookies()); + after(() => removeTestCookies()); + + it('returns all cookies', async () => { + const result = await SessionCookieEvents.listAll(document.body); + assert.typeOf(result, 'array', 'returns an array'); + assert.lengthOf(result, 2, 'has all created cookies'); + }); + }); + + describe('domain cookie list', () => { + before(() => createTestCookies()); + after(() => removeTestCookies()); + + it('returns domain cookies', async () => { + const result = await SessionCookieEvents.listDomain(document.body, 'other.com'); + assert.typeOf(result, 'array', 'returns an array'); + assert.lengthOf(result, 1, 'has single cookie'); + assert.equal(result[0].domain, '.other.com', 'has a domain cookie'); + }); + }); + + describe('updating a cookie', () => { + afterEach(() => removeAllCookies(instance)); + + it('persists the cookie in the store', async () => { + await SessionCookieEvents.update(document.body, { + name: 'test', + value: 'test', + path: '/', + domain: 'domain.com', + }); + const cookies = await instance.getAllCookies(); + const [cookie] = cookies; + // @ts-ignore + delete cookie.created; + // @ts-ignore + delete cookie.lastAccess; + // @ts-ignore + delete cookie.persistent; + assert.deepEqual(cookies[0], { + domain: '.domain.com', + // hostOnly: true, + httpOnly: false, + name: 'test', + path: '/', + secure: false, + session: true, + value: 'test', + expires: 0, + hostOnly: false, + }); + }); + }); + + describe('session-cookie-remove', () => { + before(() => createTestCookies()); + after(() => removeTestCookies()); + + it('removes a cookie', async () => { + await SessionCookieEvents.delete(document.body, [{ + name: 'test-name', + value: 'test-value', + // url: 'http://api.domain.com', + domain: 'api.domain.com', + path: '/', + }]); + const result = await instance.getDomainCookies('api.domain.com'); + assert.lengthOf(result, 0); + }); + }); + }); + + describe('class APIs', () => { + describe('updateCookie()', () => { + let instance = /** @type CookieBridge */ (null); + let cookie = /** @type ARCCookie */ (null); + beforeEach(() => { + instance = new CookieBridge(); + cookie = { + name: `test-cookie`, + value: 'test', + // url: `http://api.domain.com`, + domain: 'api.domain.com', + path: '/', + expires: Date.now() + 2000, + httpOnly: false, + secure: false, + hostOnly: false, + }; + }); + + afterEach(async () => { + await removeAllCookies(instance); + }); + + it('returns created cookie', async () => { + const expires = Math.round(cookie.expires / 1000); + const result = await instance.updateCookie(cookie); + assert.deepEqual(result, { + domain: 'api.domain.com', + path: '/', + expirationDate: expires, + httpOnly: false, + hostOnly: false, + name: cookie.name, + secure: false, + url: `http://api.domain.com/`, + value: 'test', + }); + }); + + it('stores the cookie in the data store', async () => { + const expires = Math.round(cookie.expires / 1000); + await instance.updateCookie(cookie); + const cookies = await instance.getAllCookies(); + const [item] = cookies; + // @ts-ignore + delete item.created; + // @ts-ignore + delete item.lastAccess; + // @ts-ignore + delete item.persistent; + assert.deepEqual(item, { + domain: '.api.domain.com', + expires: expires * 1000, + hostOnly: false, + httpOnly: false, + name: cookie.name, + path: '/', + secure: false, + session: false, + value: 'test', + }); + }); + }); + + describe('updateCookies()', () => { + let instance = /** @type CookieBridge */ (null); + let cookies = /** @type ARCCookie[] */ (null); + beforeEach(() => { + instance = new CookieBridge(); + cookies = [ + { + name: `test-cookie1`, + value: 'test', + // url: `http://api.domain.com`, + domain: 'api.domain.com', + path: '/', + expires: Date.now() + 2000, + httpOnly: false, + }, + { + name: `test-cookie2`, + value: 'test', + // url: `http://other.com`, + domain: 'other.com', + path: '/', + expires: Date.now() + 2000, + httpOnly: false, + }, + ]; + }); + + afterEach(async () => { + await removeAllCookies(instance); + }); + + it('stores created cookies in the data store', async () => { + await instance.updateCookies(cookies); + const all = await instance.getAllCookies(); + assert.lengthOf(all, 2); + }); + }); + + describe('removeCookies()', () => { + let instance = /** @type CookieBridge */ (null); + let cookies = /** @type ARCCookie[] */ (null); + beforeEach(async () => { + instance = new CookieBridge(); + cookies = [ + { + name: `test-cookie1`, + value: 'test', + // url: `http://api.domain.com`, + domain: 'api.domain.com', + path: '/', + expires: Date.now() + 2000, + httpOnly: false, + }, + { + name: `test-cookie2`, + value: 'test', + // url: `http://other.com`, + domain: 'other.com', + path: '/', + expires: Date.now() + 2000, + httpOnly: false, + }, + ]; + await instance.updateCookies(cookies); + }); + + afterEach(async () => { + await removeAllCookies(instance); + }); + + it('removes all passed cookies', async () => { + await instance.removeCookies(cookies); + const all = await instance.getAllCookies(); + assert.lengthOf(all, 0); + }); + + it('removes only passed cookies', async () => { + await instance.removeCookies([cookies[0]]); + const all = await instance.getAllCookies(); + assert.lengthOf(all, 1); + assert.equal(all[0].name, 'test-cookie2'); + }); + }); + + describe('getDomainCookies()', () => { + let instance = /** @type CookieBridge */ (null); + let cookies = /** @type ARCCookie[] */ (null); + beforeEach(async () => { + instance = new CookieBridge(); + cookies = [ + { + name: 'test-cookie1', + value: 'test', + // url: 'http://api.domain.com', + expires: Date.now() + 2000, + httpOnly: false, + domain: 'api.domain.com', + path: '/', + }, + { + name: `test-cookie2`, + value: 'test', + // url: `http://other.com`, + expires: Date.now() + 2000, + httpOnly: false, + domain: 'other.com', + path: '/' + }, + ]; + await instance.updateCookies(cookies); + }); + + afterEach(async () => { + await removeAllCookies(instance); + }); + + it('reads all cookies', async () => { + const result = await instance.getDomainCookies('api.domain.com'); + assert.lengthOf(result, 1); + }); + }); + }); +}); diff --git a/test/ElectronCookies/Generator.js b/test/ElectronCookies/Generator.js new file mode 100644 index 00000000..7cb7635a --- /dev/null +++ b/test/ElectronCookies/Generator.js @@ -0,0 +1,43 @@ +/* eslint-disable import/no-commonjs */ + +const Chance = require('chance'); +// @ts-ignore +const _require = require('esm')(module); + +const { Cookie } = _require('@advanced-rest-client/arc-cookies/src/Cookie.js'); + +const chance = new Chance(); + +class DataGenerator { + // Generates random Cookie data + generateCookieObject() { + const cookie = new Cookie(chance.word(), chance.word(), { + 'domain': chance.domain(), + 'expires': chance.hammertime(), + 'hostOnly': chance.bool(), + 'httpOnly': chance.bool(), + 'path': chance.bool() ? '/' : `/${chance.word()}`, + 'secure': chance.bool(), + 'max-age': chance.integer({ min: 100, max: 1000 }), + }); + return cookie; + } + + /** + * Generates cookies list + * + * @param {object=} opts Configuration options: + * - `size` (Number) Number of items to generate. Default to 25. + * @return {object[]} List of datastore entries. + */ + generateCookiesData(opts = {}) { + const size = opts.size || 25; + const result = []; + for (let i = 0; i < size; i++) { + result.push(this.generateCookieObject()); + } + return result; + } +} + +module.exports.DataGenerator = DataGenerator; diff --git a/test/ElectronCookies/SessionManager.main.spec.js b/test/ElectronCookies/SessionManager.main.spec.js new file mode 100644 index 00000000..a2c01b86 --- /dev/null +++ b/test/ElectronCookies/SessionManager.main.spec.js @@ -0,0 +1,383 @@ +/* eslint-disable no-await-in-loop */ +/* eslint-disable import/no-commonjs */ +const { assert } = require('chai'); +const { session } = require('electron'); +const _require = require('esm')(module); + +/** @typedef {import('../../src/io/SessionManager').SessionManager} SessionManager */ + +const { SessionManager } = _require('../../src/io/SessionManager.js'); +const { WebSessionPersist } = _require('../../src/io/Constants.js'); + +describe('SessionManager - main process', () => { + const url = 'https://domain.com/cookies'; + + async function cleanCookies() { + const sis = session.fromPartition(WebSessionPersist); + const Cookies = sis.cookies; + const cookies = await Cookies.get({}); + if (!cookies || !cookies.length) { + return; + } + for (let i = 0; i < cookies.length; i++) { + let cookieUrl; + if (cookies[i].name === 't1') { + cookieUrl = 'https://domain.com/path'; + } else if (cookies[i].name === 't2') { + cookieUrl = 'https://other.com/'; + } + await Cookies.remove((cookieUrl || url), cookies[i].name); + } + } + + async function createTestCookies() { + const sis = session.fromPartition(WebSessionPersist); + const Cookies = sis.cookies; + await Cookies.set({ + url: 'https://domain.com/path', + name: 't1', + value: 'v1', + }); + await Cookies.set({ + url: 'https://other.com/', + name: 't2', + value: 'v2', + }); + } + + async function removeCookies(cookies) { + const sis = session.fromPartition(WebSessionPersist); + const Cookies = sis.cookies; + for (let i = 0, len = cookies.length; i < len; i++) { + const [curl, name] = cookies[i]; + await Cookies.remove(curl, name); + } + await Cookies.flushStore(); + } + + describe('getSessionCookies()', () => { + let instance = /** @type SessionManager */ (null); + beforeEach(() => { + instance = new SessionManager(); + instance.listen(); + }); + + afterEach(() => { + instance.unlisten(); + }); + + it('Returns Cookies class for session', () => { + const result = instance.getSessionCookies(); + assert.equal(result.constructor.name, 'Cookies'); + }); + }); + + describe('#session', () => { + let instance = /** @type SessionManager */ (null); + beforeEach(() => { + instance = new SessionManager(); + }); + + it('returns session cookies instance', () => { + const result = instance.session; + assert.equal(result.constructor.name, 'Cookies'); + }); + + it('returns the same cookies instance', () => { + const result1 = instance.session; + const result2 = instance.session; + assert.isTrue(result1 === result2); + }); + }); + + describe('setCookie()', () => { + let instance = /** @type SessionManager */ (null); + const name = 'test-cookie'; + const value = 'test-value'; + + before(() => cleanCookies()); + + beforeEach(() => { + instance = new SessionManager(); + instance.listen(); + }); + + afterEach(async () => { + instance.unlisten(); + await removeCookies([ + [url, name], + ['https://domain.com/', name], + ['http://qax.anypoint.mulesoft.com/', '_csrf'], + ]); + }); + + it('creates a cookie', async () => { + await instance.setCookie({ + url, + name, + value, + }); + const cookies = await instance.session.get({}); + assert.lengthOf(cookies, 1); + assert.equal(cookies[0].name, name); + assert.equal(cookies[0].value, value); + }); + + it('creates url for a cookie', async () => { + const created = await instance.setCookie({ + name, + value, + domain: 'domain.com', + secure: true, + url: 'https://domain.com/', + }); + assert.equal(created.url, 'https://domain.com/'); + }); + + it('creates a cookie from renderer object', async () => { + const cookie = { + created: Date.now(), + domain: 'qax.anypoint.mulesoft.com', + expirationDate: 8640000000000, + hostOnly: true, + // httponly: null, + lastAccess: 1580162723841, + name: '_csrf', + path: '/', + persistent: false, + value: 'GwjXpexHYiv22J9Bd7NUF-4c', + url: 'http://qax.anypoint.mulesoft.com', + }; + await instance.setCookie(cookie); + + const cookies = await instance.session.get({}); + assert.lengthOf(cookies, 1, 'has single cookie'); + assert.deepEqual(cookies[0], { + name: '_csrf', + value: 'GwjXpexHYiv22J9Bd7NUF-4c', + domain: '.qax.anypoint.mulesoft.com', + hostOnly: false, + path: '/', + secure: false, + httpOnly: false, + session: false, + expirationDate: 8640000000000, + sameSite: 'no_restriction', + }, 'stores the cookie in the store'); + }); + }); + + describe('removeCookie()', () => { + let instance = /** @type SessionManager */ (null); + const curl = 'https://domain.com/cookies'; + const name = 'test-cookie'; + const value = 'test-value'; + + before(() => cleanCookies()); + + beforeEach(() => { + instance = new SessionManager(); + instance.listen(); + }); + + afterEach(async () => { + instance.unlisten(); + }); + + it('removes existing cookie', async () => { + const created = await instance.setCookie({ + url: curl, + name, + value, + }); + await instance.removeCookie(created); + const cookies = await instance.session.get({}); + assert.lengthOf(cookies, 0); + }); + + it('removes renderer based cookie', async () => { + const cookie = { + created: Date.now(), + domain: 'qax.anypoint.mulesoft.com', + expirationDate: 8640000000000, + hostOnly: true, + // httponly: null, + lastAccess: 1580162723841, + name: '_csrf', + path: '/', + persistent: false, + value: 'GwjXpexHYiv22J9Bd7NUF-4c', + url: 'http://qax.anypoint.mulesoft.com', + }; + await instance.setCookie(cookie); + await instance.removeCookie({ + url: 'http://qax.anypoint.mulesoft.com/', + name: '_csrf', + }); + const cookies = await instance.session.get({}); + assert.lengthOf(cookies, 0); + }); + }); + + describe('getUrlCookies()', () => { + let instance = /** @type SessionManager */ (null); + before(async () => { + await cleanCookies(); + await createTestCookies(); + }); + + after(async () => { + await cleanCookies(); + }); + + beforeEach(() => { + instance = new SessionManager(); + instance.listen(); + }); + + afterEach(() => { + instance.unlisten(); + }); + + it('Reads url cookies with getUrlCookies()', async () => { + const cookies = await instance.getUrlCookies('https://other.com'); + assert.lengthOf(cookies, 1); + }); + }); + + describe('getAllCookies()', () => { + let instance = /** @type SessionManager */ (null); + + beforeEach(() => { + instance = new SessionManager(); + instance.listen(); + }); + + afterEach(async () => { + instance.unlisten(); + await cleanCookies(); + }); + + it('reads all cookies', async () => { + await createTestCookies(); + const cookies = await instance.getAllCookies(); + assert.lengthOf(cookies, 2); + }); + + it('returns empty array when no cookies', async () => { + const cookies = await instance.getAllCookies(); + assert.lengthOf(cookies, 0); + }); + }); + + describe('getDomainCookies()', () => { + let instance = /** @type SessionManager */ (null); + + beforeEach(() => { + instance = new SessionManager(); + instance.listen(); + }); + + afterEach(async () => { + instance.unlisten(); + await cleanCookies(); + }); + + it('reads domain cookies', async () => { + await createTestCookies(); + const cookies = await instance.getDomainCookies('other.com'); + assert.lengthOf(cookies, 1); + }); + + it('returns empty array when no cookies', async () => { + const cookies = await instance.getDomainCookies('abc.xyz'); + assert.lengthOf(cookies, 0); + }); + + it('returns empty array when no domain cookies', async () => { + await createTestCookies(); + const cookies = await instance.getDomainCookies('abc.xyz'); + assert.lengthOf(cookies, 0); + }); + }); + + describe('getUrlCookies()', () => { + let instance = /** @type SessionManager */ (null); + + beforeEach(() => { + instance = new SessionManager(); + instance.listen(); + }); + + afterEach(async () => { + instance.unlisten(); + await cleanCookies(); + }); + + it('reads cookies by the URL', async () => { + await createTestCookies(); + const cookies = await instance.getUrlCookies('https://other.com'); + assert.lengthOf(cookies, 1); + }); + + it('returns empty array when no cookies', async () => { + const cookies = await instance.getUrlCookies('https://other.com'); + assert.lengthOf(cookies, 0); + }); + + it('returns empty array when no URL cookies', async () => { + await createTestCookies(); + const cookies = await instance.getUrlCookies('https://others.xyz'); + assert.lengthOf(cookies, 0); + }); + }); + + describe('removeCookieMakeUrl()', () => { + let instance = /** @type SessionManager */ (null); + + beforeEach(() => { + instance = new SessionManager(); + instance.listen(); + }); + + afterEach(async () => { + instance.unlisten(); + await cleanCookies(); + }); + + it('removes a cookie', async () => { + await createTestCookies(); + const cookiesPre = await instance.getAllCookies(); + assert.lengthOf(cookiesPre, 2); + await instance.removeCookieMakeUrl({ + domain: 'domain.com', + name: 't1', + value: 'v1', + sameSite: 'unspecified', + }, 't1'); + const cookies = await instance.getAllCookies(); + assert.notEqual(cookies.length, cookiesPre.length); + }); + }); + + describe('openWebBrowser()', () => { + let instance = /** @type SessionManager */ (null); + const loc = 'about:blank'; + + beforeEach(() => { + instance = new SessionManager(); + }); + + it('returns the browser URL', async () => { + const result = instance.openWebBrowser(loc); + assert.equal(result.constructor.name, 'BrowserWindow'); + result.close(); + }); + + it('has the user agent set', async () => { + const result = instance.openWebBrowser(loc); + assert.equal(result.webContents.userAgent, 'Chrome'); + result.close(); + }); + }); +}); diff --git a/test/WindowsManager/WindowsManager.main.spec.js b/test/WindowsManager/WindowsManager.main.spec.js new file mode 100644 index 00000000..f4106055 --- /dev/null +++ b/test/WindowsManager/WindowsManager.main.spec.js @@ -0,0 +1,150 @@ +const { assert } = require('chai'); +const { BrowserWindow } = require('electron'); +const _require = require('esm')(module); +const testPaths = require('../setup-paths'); + +const { WindowsManager } = _require('../../src/io/WindowsManager'); +const { ArcSessionRecorder } = _require('../../src/io/ArcSessionRecorder'); +const { ContextActions } = _require('../../src/io/ContextActions'); +const { WindowsPersistance } = _require('../../src/io/WindowsPersistance'); +const { setLevel } = _require('../../src/io/Logger'); + +/** @typedef {import('../../src/io/WindowsManager').WindowsManager} WindowsManager */ +/** @typedef {import('../../src/io/ArcSessionRecorder').ArcSessionRecorder} ArcSessionRecorder */ +/** @typedef {import('../../src/io/ContextActions').ContextActions} ContextActions */ +/** @typedef {import('../../src/io/WindowsPersistance').WindowsPersistance} WindowsPersistance */ + +setLevel('error'); + +describe('WindowsManager', () => { + before(() => { + testPaths.getBasePath(); + testPaths.setupEnvironment(); + }); + + describe('constructor()', () => { + it('sets the default startup options', () => { + const instance = new WindowsManager(); + assert.typeOf(instance.startupOptions, 'object'); + assert.lengthOf(Object.keys(instance.startupOptions), 0); + }); + + it('sets passed startup options', () => { + const opts = { startPath: 'test' }; + const instance = new WindowsManager(opts); + assert.deepEqual(instance.startupOptions, opts); + }); + + it('sets the windows array property', () => { + const instance = new WindowsManager(); + assert.lengthOf(instance.windows, 0); + }); + + it('Sets ArcSessionRecorder', () => { + const instance = new WindowsManager(); + assert.isTrue(instance.recorder instanceof ArcSessionRecorder); + }); + + it('Sets ContextActions', () => { + const instance = new WindowsManager(); + assert.isTrue(instance.contextActions instanceof ContextActions); + }); + + it('sets the workspace property', () => { + const instance = new WindowsManager(); + assert.isTrue(instance.workspace instanceof WindowsPersistance); + }); + }); + + describe('get hasWindow()', () => { + let instance = /** @type WindowsManager */ (null); + before(() => { + instance = new WindowsManager(); + }); + + it('Returns false when no windows', () => { + assert.isFalse(instance.hasWindow); + }); + + it('Returns true when has a window', () => { + // @ts-ignore + instance.windows = [{}]; + assert.isTrue(instance.hasWindow); + }); + }); + + describe('get lastFocused()', () => { + let instance = /** @type WindowsManager */ (null); + before(() => { + instance = new WindowsManager(); + }); + + it('returns null when no focused window', () => { + assert.equal(instance.lastFocused, null); + }); + }); + + describe('get lastActive()', () => { + let instance = /** @type WindowsManager */ (null); + before(() => { + instance = new WindowsManager(); + }); + + it('returns null when no windows', () => { + assert.equal(instance.lastActive, null); + }); + + it('returns null when no active windows', () => { + instance.windows = [ + // @ts-ignore + { + isDestroyed: () => true + }, + // @ts-ignore + { + isDestroyed: () => true + } + ]; + assert.equal(instance.lastActive, null); + }); + + it('Returns window instance', () => { + instance.windows = [ + // @ts-ignore + { + isDestroyed: () => true + }, + // @ts-ignore + { + isDestroyed: () => false + } + ]; + assert.deepEqual(instance.lastActive, instance.windows[1]); + }); + }); + + describe('open()', () => { + let instance = /** @type WindowsManager */ (null); + before(() => { + instance = new WindowsManager(); + }); + + it('returns the window instance', async () => { + const win = await instance.open(); + assert.isTrue(win instanceof BrowserWindow); + win.destroy(); + }); + + it('adds window to the list of windows', async () => { + const win = await instance.open(); + assert.isTrue(instance.windows.includes(win)); + win.destroy(); + }); + + it('removes window from the list when destroyed', async () => { + const win = await instance.open(); + win.destroy(); + assert.isFalse(instance.windows.includes(win)); + }); + }); +}); diff --git a/test/app-menu/ApplicationMenu.main.spec.js b/test/app-menu/ApplicationMenu.main.spec.js new file mode 100644 index 00000000..983db170 --- /dev/null +++ b/test/app-menu/ApplicationMenu.main.spec.js @@ -0,0 +1,283 @@ +const { assert } = require('chai'); +const path = require('path'); +const fs = require('fs-extra'); +const sinon = require('sinon'); +const { Menu } = require('electron'); +const _require = require('esm')(module); +const testPaths = require('../setup-paths'); + +const { ApplicationMenu, clearWorkspaceHistory, appendHistoryEntry, createWorkspaceHistory, workspaceHistoryAction } = _require('../../src/io/ApplicationMenu'); +const { ApplicationUpdater } = _require('../../src/io/ApplicationUpdater'); +const { setLevel } = _require('../../src/io/Logger'); + +/** @typedef {import('../../src/io/ApplicationMenu').ApplicationMenu} ApplicationMenu */ +/** @typedef {import('../../src/io/ApplicationUpdater').ApplicationUpdater} ApplicationUpdater */ + +setLevel('error'); + +describe('ApplicationMenu class', () => { + const historyPath = path.join('workspace', 'workspace-history.json'); + let updater = /** @type ApplicationUpdater */ (null); + before(() => { + testPaths.getBasePath(); + updater = new ApplicationUpdater(); + }); + + after(() => { + updater.removeAllListeners('status-changed'); + }); + + describe('Constructor', () => { + afterEach(() => { + updater.removeAllListeners('status-changed'); + }); + + it('Sets topMenu', () => { + const instance = new ApplicationMenu(updater); + assert.ok(instance.topMenu); + }); + + it('Sets history', () => { + const instance = new ApplicationMenu(updater); + assert.typeOf(instance.history, 'object'); + }); + }); + + describe('build()', () => { + let instance = /** @type ApplicationMenu */ (null); + beforeEach(() => { + instance = new ApplicationMenu(updater); + }); + + afterEach(() => { + updater.removeAllListeners('status-changed'); + }); + + it('calls getTemplate()', async () => { + const spy = sinon.spy(instance, 'getTemplate'); + await instance.build(); + assert.isTrue(spy.called); + }); + + it('calls createFromTemplate()', async () => { + const spy = sinon.spy(instance, 'createFromTemplate'); + await instance.build(); + assert.isTrue(spy.called); + }); + + it('sets menuLoaded', async () => { + await instance.build(); + assert.isTrue(instance.menuLoaded); + }); + + it('sets application menu', async () => { + await instance.build() + const menu = Menu.getApplicationMenu(); + assert.ok(menu); + assert.isAbove(menu.items.length, 5); + }); + }); + + describe('appendWorkspaceHistory()', () => { + let instance = /** @type ApplicationMenu */ (null); + beforeEach(() => { + instance = new ApplicationMenu(updater); + return instance.build(); + }); + + afterEach(() => { + updater.removeAllListeners('status-changed'); + const file = path.join(process.env.ARC_HOME, historyPath); + return fs.remove(file); + }); + + it('calls WorkspaceHistory::addEntry', async () => { + const spy = sinon.spy(instance.history, 'addEntry'); + await instance.appendWorkspaceHistory('/test'); + assert.isTrue(spy.called); + }); + + it('calls [appendHistoryEntry]', async () => { + const spy = sinon.spy(instance, appendHistoryEntry); + await instance.appendWorkspaceHistory('/test'); + assert.isTrue(spy.called); + }); + }); + + describe('clearWorkspaceHistory()', () => { + let instance = /** @type ApplicationMenu */ (null); + beforeEach(() => { + instance = new ApplicationMenu(updater); + return instance.build(); + }); + + afterEach(() => { + updater.removeAllListeners('status-changed'); + const file = path.join(process.env.ARC_HOME, historyPath); + return fs.remove(file); + }); + + it('calls WorkspaceHistory::clearHistory', async () => { + const spy = sinon.spy(instance.history, 'clearHistory'); + await instance.clearWorkspaceHistory() + assert.isTrue(spy.called); + }); + + it('calls [clearWorkspaceHistory]', async () => { + const spy = sinon.spy(instance, clearWorkspaceHistory); + await instance.clearWorkspaceHistory(); + assert.isTrue(spy.called); + }); + }); + + describe('loadWorkspaceHistory()', () => { + let instance = /** @type ApplicationMenu */ (null); + beforeEach(() => { + instance = new ApplicationMenu(updater); + return instance.build(); + }); + + afterEach(() => { + updater.removeAllListeners('status-changed'); + const file = path.join(process.env.ARC_HOME, historyPath); + return fs.remove(file); + }); + + it('calls WorkspaceHistory::loadEntries', async () => { + const spy = sinon.spy(instance.history, 'loadEntries'); + await instance.loadWorkspaceHistory(); + assert.isTrue(spy.called); + }); + + it('does not call [createWorkspaceHistory] when no entires', async () => { + const spy = sinon.spy(instance, createWorkspaceHistory); + await instance.loadWorkspaceHistory(); + assert.isFalse(spy.called); + }); + + it('calls [createWorkspaceHistory] when has entires', async () => { + const file = path.join(process.env.ARC_HOME, historyPath); + const spy = sinon.spy(instance, createWorkspaceHistory); + await fs.outputJson(file, { + entries: [{ + file: '/1', + used: 1 + }, { + file: '/2', + used: 2 + }] + }); + await instance.loadWorkspaceHistory(); + assert.isTrue(spy.called); + }); + }); + + describe('[createWorkspaceHistory]()', () => { + let instance = /** @type ApplicationMenu */ (null); + beforeEach(() => { + instance = new ApplicationMenu(updater); + return instance.build(); + }); + + afterEach(() => { + updater.removeAllListeners('status-changed'); + }); + + it('calls [appendHistoryEntry] for each entry', () => { + const entries = [{ + file: '/1', + used: 1 + }, { + file: '/2', + used: 2 + }]; + const spy = sinon.spy(instance, appendHistoryEntry); + instance[createWorkspaceHistory](entries); + assert.equal(spy.callCount, 2); + }); + + it('ignores invalid entires', () => { + const entries = [{ + file: 1, + used: 1 + }, { + file: '/2', + used: 2 + }]; + const spy = sinon.spy(instance, appendHistoryEntry); + instance[createWorkspaceHistory](entries); + assert.equal(spy.callCount, 1); + }); + }); + + describe('getWorkspaceHistoryMenu()', () => { + let instance = /** @type ApplicationMenu */ (null); + beforeEach(() => { + instance = new ApplicationMenu(updater); + return instance.build(); + }); + + afterEach(() => { + updater.removeAllListeners('status-changed'); + }); + + it('Returns the menu', () => { + const result = instance.getWorkspaceHistoryMenu(); + assert.isTrue(result instanceof Menu); + }); + }); + + describe('[appendHistoryEntry]()', () => { + let instance = /** @type ApplicationMenu */ (null); + beforeEach(() => { + instance = new ApplicationMenu(updater); + return instance.build(); + }); + + afterEach(() => { + updater.removeAllListeners('status-changed'); + }); + + it('Adds menu item', () => { + instance[appendHistoryEntry]('/1'); + const menu = instance.getWorkspaceHistoryMenu(); + assert.equal(menu.items[3].label, '/1'); + }); + + it('Hides 3rd menu item', () => { + instance[appendHistoryEntry]('/1'); + const menu = instance.getWorkspaceHistoryMenu(); + assert.isFalse(menu.items[2].visible); + }); + }); + + describe('[workspaceHistoryAction]()', () => { + let instance = /** @type ApplicationMenu */ (null); + beforeEach(() => { + instance = new ApplicationMenu(updater); + return instance.build(); + }); + + afterEach(() => { + updater.removeAllListeners('status-changed'); + const file = path.join(process.env.ARC_HOME, historyPath); + return fs.remove(file); + }); + + it('Calls WorkspaceHistory::addEntry', () => { + const spy = sinon.spy(instance.history, 'addEntry'); + instance[workspaceHistoryAction]({ label: '/test' }); + assert.equal(spy.args[0][0], '/test'); + }); + + it('Emits open-workspace event', () => { + let called = false; + instance.on('open-workspace', () => { + called = true; + }); + instance[workspaceHistoryAction]({ label: '/test' }); + instance.removeAllListeners('open-workspace'); + assert.isTrue(called); + }); + }); +}); diff --git a/test/app-menu/app-menu.main.spec.js b/test/app-menu/app-menu.main.spec.js deleted file mode 100644 index 689e7987..00000000 --- a/test/app-menu/app-menu.main.spec.js +++ /dev/null @@ -1,273 +0,0 @@ -const { assert } = require('chai'); -const path = require('path'); -const fs = require('fs-extra'); -const { ArcMainMenu } = require('../../scripts/main/main-menu.js'); -const sinon = require('sinon'); -const { Menu } = require('electron'); - -describe('ArcMainMenu class', function() { - const historyPath = path.join('workspace', 'workspace-history.json'); - - describe('Constructor', function() { - it('Sets topMenu', function() { - const instance = new ArcMainMenu(); - assert.ok(instance.topMenu); - }); - - it('Sets history', function() { - const instance = new ArcMainMenu(); - assert.typeOf(instance.history, 'object'); - }); - }); - - describe('build()', () => { - let instance; - beforeEach(() => { - instance = new ArcMainMenu(); - }); - - it('Returns a promise', () => { - const result = instance.build(); - assert.typeOf(result, 'promise'); - return result; - }); - - it('Calls _getTemplate()', () => { - const spy = sinon.spy(instance, '_getTemplate'); - return instance.build() - .then(() => { - assert.isTrue(spy.called); - }); - }); - - it('Calls _createFromTemplate()', () => { - const spy = sinon.spy(instance, '_createFromTemplate'); - return instance.build() - .then(() => { - assert.isTrue(spy.called); - }); - }); - - it('Sets _menuLoaded', () => { - return instance.build() - .then(() => { - assert.isTrue(instance._menuLoaded); - }); - }); - - it('Sets application menu', () => { - return instance.build() - .then(() => { - const menu = Menu.getApplicationMenu(); - assert.ok(menu); - assert.isAbove(menu.items.length, 5); - }); - }); - - it('Executes pendingActions', () => { - instance.pendingActions = ['disableAppMenuPopup']; - const spy = sinon.spy(instance, 'disableAppMenuPopup'); - return instance.build() - .then(() => { - assert.isTrue(spy.called); - }); - }); - }); - - describe('appendWorkspaceHistory()', () => { - let instance; - beforeEach(() => { - instance = new ArcMainMenu(); - return instance.build(); - }); - - afterEach(() => { - const file = path.join(process.env.ARC_HOME, historyPath); - return fs.remove(file); - }); - - it('Calls WorkspaceHistory::addEntry', () => { - const spy = sinon.spy(instance.history, 'addEntry'); - return instance.appendWorkspaceHistory('/test') - .then(() => { - assert.isTrue(spy.called); - }); - }); - - it('Calls _appendHistoryEntry', () => { - const spy = sinon.spy(instance, '_appendHistoryEntry'); - return instance.appendWorkspaceHistory('/test') - .then(() => { - assert.isTrue(spy.called); - }); - }); - }); - - describe('clearWorkspaceHistory()', () => { - let instance; - beforeEach(() => { - instance = new ArcMainMenu(); - return instance.build(); - }); - - afterEach(() => { - const file = path.join(process.env.ARC_HOME, historyPath); - return fs.remove(file); - }); - - it('Calls WorkspaceHistory::clearHistory', async () => { - const spy = sinon.spy(instance.history, 'clearHistory'); - await instance.clearWorkspaceHistory() - assert.isTrue(spy.called); - }); - - it('Calls _clearWorkspaceHistory', async () => { - const spy = sinon.spy(instance, '_clearWorkspaceHistory'); - await instance.clearWorkspaceHistory(); - assert.isTrue(spy.called); - }); - }); - - describe('loadWorkspaceHistory()', () => { - let instance; - beforeEach(() => { - instance = new ArcMainMenu(); - return instance.build(); - }); - - afterEach(() => { - const file = path.join(process.env.ARC_HOME, historyPath); - return fs.remove(file); - }); - - it('Calls WorkspaceHistory::clearHistory', () => { - const spy = sinon.spy(instance.history, 'loadEntries'); - return instance.loadWorkspaceHistory() - .then(() => { - assert.isTrue(spy.called); - }); - }); - - it('Does not call _createWorkspaceHistory when no entires', () => { - const spy = sinon.spy(instance, '_createWorkspaceHistory'); - return instance.loadWorkspaceHistory() - .then(() => { - assert.isFalse(spy.called); - }); - }); - - it('Calls _createWorkspaceHistory when has entires', () => { - const file = path.join(process.env.ARC_HOME, historyPath); - const spy = sinon.spy(instance, '_createWorkspaceHistory'); - return fs.outputJson(file, { - entries: [{ - file: '/1', - used: 1 - }, { - file: '/2', - used: 2 - }] - }) - .then(() => instance.loadWorkspaceHistory()) - .then(() => { - assert.isTrue(spy.called); - }); - }); - }); - - describe('_createWorkspaceHistory()', () => { - let instance; - beforeEach(() => { - instance = new ArcMainMenu(); - return instance.build(); - }); - - it('Calls _appendHistoryEntry for each entry', () => { - const entries = [{ - file: '/1', - used: 1 - }, { - file: '/2', - used: 2 - }]; - const spy = sinon.spy(instance, '_appendHistoryEntry'); - instance._createWorkspaceHistory(entries); - assert.equal(spy.callCount, 2); - }); - - it('Ignores invalid entires', () => { - const entries = [{ - file: 1, - used: 1 - }, { - file: '/2', - used: 2 - }]; - const spy = sinon.spy(instance, '_appendHistoryEntry'); - instance._createWorkspaceHistory(entries); - assert.equal(spy.callCount, 1); - }); - }); - - describe('getWorkspaceHistoryMenu()', () => { - let instance; - beforeEach(() => { - instance = new ArcMainMenu(); - return instance.build(); - }); - - it('Returns the menu', () => { - const result = instance.getWorkspaceHistoryMenu(); - assert.isTrue(result instanceof Menu); - }); - }); - - describe('_appendHistoryEntry()', () => { - let instance; - beforeEach(() => { - instance = new ArcMainMenu(); - return instance.build(); - }); - - it('Adds menu item', () => { - instance._appendHistoryEntry('/1'); - const menu = instance.getWorkspaceHistoryMenu(); - assert.equal(menu.items[3].label, '/1'); - }); - - it('Hiddes 3rd menu item', () => { - instance._appendHistoryEntry('/1'); - const menu = instance.getWorkspaceHistoryMenu(); - assert.isFalse(menu.items[2].visible); - }); - }); - - describe('_workspaceHistoryAction()', () => { - let instance; - beforeEach(() => { - instance = new ArcMainMenu(); - return instance.build(); - }); - - afterEach(() => { - const file = path.join(process.env.ARC_HOME, historyPath); - return fs.remove(file); - }); - - it('Calls WorkspaceHistory::addEntry', () => { - const spy = sinon.spy(instance.history, 'addEntry'); - instance._workspaceHistoryAction({ label: '/test' }); - assert.equal(spy.args[0][0], '/test'); - }); - - it('Emitts open-workspace event', () => { - let called = false; - instance.on('open-workspace', () => { - called = true; - }); - instance._workspaceHistoryAction({ label: '/test' }); - instance.removeAllListeners('open-workspace'); - assert.isTrue(called); - }); - }); -}); diff --git a/test/app-paths/initial-paths.app.spec.js b/test/app-paths/initial-paths.app.spec.js index 749126a9..7d87c7e6 100644 --- a/test/app-paths/initial-paths.app.spec.js +++ b/test/app-paths/initial-paths.app.spec.js @@ -1,102 +1,81 @@ -const bootstrap = require('../test-bootstrap.js'); const { assert } = require('chai'); const fs = require('fs-extra'); const path = require('path'); +const bootstrap = require('../test-bootstrap.js'); + +/** @typedef {import('spectron').Application} Application */ -describe('Initial paths', function() { +describe('Initial paths', () => { const basePath = path.join('test', 'tests-exe-dir'); const settingsFilePath = path.join(basePath, 'test-settings.json'); const workspaceFilePath = path.join(basePath, 'workspace'); const themesFilePath = path.join(basePath, 'themes-esm'); - describe('Setups default file paths', function() { - let app; - before(function() { - app = bootstrap.getApp(); - return app.start() - .then(() => app.client.waitUntilWindowLoaded(10000)) - .catch((cause) => { + describe('Setups default file paths', () => { + let app = /** @type Application */ (null); + before(async () => { + const opts = { + args: [ + '--skip-cookie-consent', + '--skip-database-upgrade', + ] + }; + app = bootstrap.getApp(opts); + try { + await app.start(); + // await app.client.waitUntilWindowLoaded(); + await bootstrap.deffer(5000); + } catch (e) { + console.log('IS RUNNING', app.isRunning()); + await app.stop() if (app && app.isRunning()) { - return app.stop() - .then(() => { - throw cause; - }); + throw e; } - throw cause; - }); + throw e; + } }); - after(function() { - let p; + after(async () => { if (app && app.isRunning()) { - p = app.stop(); - } else { - p = Promise.resolve(); + await app.stop(); } - const basePath = path.join('test', 'playground'); - return p.then(() => fs.remove(basePath)); - }); - - it('Should set default settings file location', function() { - return app.electron.remote.app - .testsInterface('get-application-settings-file-location') - .then((location) => { - assert.typeOf(location, 'string'); - }); - }); - - it('Should set default workspace file location', function() { - return app.electron.remote.app - .testsInterface('get-application-workspace-state-file-location') - .then((location) => { - assert.typeOf(location, 'string'); - }); + const bp = path.join('test', 'playground'); + await fs.remove(bp); }); - it('Sets ARC_HOME variable', () => { - return app.mainProcess.env() - .then((variables) => { - assert.typeOf(variables.ARC_HOME, 'string'); - }); + it('sets ARC_HOME variable', async () => { + console.log(app); + const variables = await app.mainProcess.env(); + assert.typeOf(variables.ARC_HOME, 'string'); }); - it('Sets ARC_SETTINGS_FILE variable', () => { - return app.mainProcess.env() - .then((variables) => { - assert.typeOf(variables.ARC_SETTINGS_FILE, 'string'); - }); + it('sets ARC_SETTINGS_FILE variable', async () => { + const variables = await app.mainProcess.env(); + assert.typeOf(variables.ARC_SETTINGS_FILE, 'string'); }); - it('Sets default ARC_SETTINGS_FILE is in ARC_HOME', () => { - return app.mainProcess.env() - .then((variables) => { - assert.equal(variables.ARC_SETTINGS_FILE, bootstrap.settingsFilePath); - }); + it('sets default ARC_SETTINGS_FILE is in ARC_HOME', async () => { + const variables = await app.mainProcess.env(); + assert.equal(variables.ARC_SETTINGS_FILE, bootstrap.settingsFilePath); }); - it('Sets default ARC_THEMES in ARC_HOME', () => { - return app.mainProcess.env() - .then((variables) => { - assert.equal(variables.ARC_THEMES, bootstrap.themesFilePath); - }); + it('sets default ARC_THEMES in ARC_HOME', async () => { + const variables = await app.mainProcess.env(); + assert.equal(variables.ARC_THEMES, bootstrap.themesFilePath); }); - it('Sets default ARC_THEMES_SETTINGS in ARC_THEMES', () => { - return app.mainProcess.env() - .then((variables) => { - assert.equal(variables.ARC_THEMES_SETTINGS, path.join(bootstrap.themesFilePath, 'themes-info.json')); - }); + it('sets default ARC_THEMES_SETTINGS in ARC_THEMES', async () => { + const variables = await app.mainProcess.env(); + assert.equal(variables.ARC_THEMES_SETTINGS, path.join(bootstrap.themesFilePath, 'themes-info.json')); }); - it('Sets default ARC_WORKSPACE_PATH in ARC_HOME', () => { - return app.mainProcess.env() - .then((variables) => { - assert.equal(variables.ARC_WORKSPACE_PATH, bootstrap.workspaceFilePath); - }); + it('sets default ARC_WORKSPACE_PATH in ARC_HOME', async () => { + const variables = await app.mainProcess.env(); + assert.equal(variables.ARC_WORKSPACE_PATH, bootstrap.workspaceFilePath); }); }); - describe('Setups configuration file paths', function() { + describe('Setups configuration file paths', () => { const opts = { args: [ '--settings-file', @@ -104,54 +83,44 @@ describe('Initial paths', function() { '--workspace-path', workspaceFilePath, '--themes-path', - themesFilePath + themesFilePath, + '--skip-cookie-consent', + '--skip-database-upgrade', ] }; - let app; - before(function() { + let app = /** @type Application */ (null); + before(async () => { app = bootstrap.getApp(opts); - return app.start() - .then(() => app.client.waitUntilWindowLoaded(10000)); + await app.start() + await app.client.waitUntilWindowLoaded(10000); }); - after(function() { - let promise; + after(async () => { if (app && app.isRunning()) { - promise = app.stop(); - } else { - promise = Promise.resolve(); + await app.stop(); } - return promise - .then(() => fs.remove(settingsFilePath)) - .then(() => fs.remove(workspaceFilePath)); + await fs.remove(settingsFilePath); + await fs.remove(workspaceFilePath); }); - it('Sets ARC_SETTINGS_FILE variable', () => { - return app.mainProcess.env() - .then((variables) => { - assert.equal(variables.ARC_SETTINGS_FILE, settingsFilePath); - }); + it('sets ARC_SETTINGS_FILE variable', async () => { + const variables = await app.mainProcess.env(); + assert.equal(variables.ARC_SETTINGS_FILE, settingsFilePath); }); - it('Sets ARC_WORKSPACE_PATH variable', () => { - return app.mainProcess.env() - .then((variables) => { - assert.equal(variables.ARC_WORKSPACE_PATH, workspaceFilePath); - }); + it('sets ARC_WORKSPACE_PATH variable', async () => { + const variables = await app.mainProcess.env(); + assert.equal(variables.ARC_WORKSPACE_PATH, workspaceFilePath); }); - it('Sets ARC_THEMES variable', () => { - return app.mainProcess.env() - .then((variables) => { - assert.equal(variables.ARC_THEMES, themesFilePath); - }); + it('sets ARC_THEMES variable', async () => { + const variables = await app.mainProcess.env(); + assert.equal(variables.ARC_THEMES, themesFilePath); }); - it('Sets ARC_THEMES_SETTINGS variable', () => { - return app.mainProcess.env() - .then((variables) => { - assert.equal(variables.ARC_THEMES_SETTINGS, path.join(themesFilePath, 'themes-info.json')); - }); + it('sets ARC_THEMES_SETTINGS variable', async () => { + const variables = await app.mainProcess.env(); + assert.equal(variables.ARC_THEMES_SETTINGS, path.join(themesFilePath, 'themes-info.json')); }); }); }); diff --git a/test/basics/arc-base.main.spec.js b/test/basics/arc-base.main.spec.js deleted file mode 100644 index f6a51011..00000000 --- a/test/basics/arc-base.main.spec.js +++ /dev/null @@ -1,187 +0,0 @@ -const { ArcBase } = require('../../scripts/main/arc-base'); -const { assert } = require('chai'); - -describe('ArcBase class', function() { - describe('Debounce', function() { - let base; - beforeEach(function() { - base = new ArcBase(); - }); - - it('Execute tasks', function(done) { - const fn = function() { - done(); - }; - base.debounce('name', fn, 10); - }); - - it('Execute tasks only once', function(done) { - let called = 0; - const fn = function() { - called++; - }; - base.debounce('name', fn, 10); - setTimeout(function() { - base.debounce('name', fn, 10); - }, 2); - base.debounce('name', fn, 10); - setTimeout(function() { - assert.equal(called, 1); - done(); - }, 15); - }); - }).timeout(10000); - - describe('Cancel debounce', function() { - let base; - beforeEach(function() { - base = new ArcBase(); - }); - - it('Does not execute tasks', function(done) { - let called = 0; - const fn = function() { - called++; - }; - base.debounce('name', fn, 10); - setTimeout(function() { - base.cancelDebounce('name'); - }, 2); - setTimeout(function() { - assert.equal(called, 0); - done(); - }, 15); - }); - }).timeout(10000); - - describe('_debounceIndex()', () => { - let base; - beforeEach(function() { - base = new ArcBase(); - }); - - it('Returns -1 if debouncer not set', () => { - const result = base._debounceIndex('test'); - assert.equal(result, -1); - }); - - it('Returns index of a debouncer', () => { - base._debouncers.push({ - name: 'test' - }); - const result = base._debounceIndex('test'); - assert.equal(result, 0); - }); - }); - - describe('nextIpcRequestId()', () => { - let base; - beforeEach(function() { - base = new ArcBase(); - }); - - it('Returns a number', () => { - const result = base.nextIpcRequestId(); - assert.typeOf(result, 'number'); - }); - - it('Increases the number for each call', () => { - const result1 = base.nextIpcRequestId(); - const result2 = base.nextIpcRequestId(); - assert.isAbove(result2, result1); - }); - }); - - describe('appendPromise()', () => { - let base; - beforeEach(function() { - base = new ArcBase(); - }); - - it('Returns a promise', () => { - const result = base.appendPromise('test'); - assert.typeOf(result, 'promise'); - }); - - it('Adds promise to the queue', () => { - base.appendPromise('test'); - assert.lengthOf(base._promises, 1); - }); - - it('Added promise has the id', () => { - base.appendPromise('test'); - assert.equal(base._promises[0].id, 'test'); - }); - - it('Added promise has resolve function', () => { - base.appendPromise('test'); - assert.typeOf(base._promises[0].resolve, 'function'); - }); - - it('Added promise has reject function', () => { - base.appendPromise('test'); - assert.typeOf(base._promises[0].reject, 'function'); - }); - }); - - describe('_ipcPromiseCallback()', () => { - let base; - beforeEach(function() { - base = new ArcBase(); - }); - - it('Throws an error when promise not found in the queue', () => { - assert.throws(function() { - base._ipcPromiseCallback({}, 'test'); - }); - }); - - it('Resolves promise', () => { - const p = base.appendPromise('test'); - base._ipcPromiseCallback({}, 'test', false); - return p; - }); - - it('Rejects promise', () => { - const p = base.appendPromise('test'); - base._ipcPromiseCallback({}, 'test', true); - let called = false; - return p - .then(() => { - called = true; - throw new Error('Resolves the promise'); - }) - .catch((cause) => { - if (called) { - throw cause; - } - }); - }); - - it('Resolves promise with arguments', () => { - const p = base.appendPromise('test'); - base._ipcPromiseCallback({}, 'test', false, 'a', 'b', 'c'); - return p - .then((result) => { - assert.deepEqual(result, ['a', 'b', 'c']); - }); - }); - - it('Rejects promise with arguments', () => { - const p = base.appendPromise('test'); - base._ipcPromiseCallback({}, 'test', true, 'a', 'b', 'c'); - let called = false; - return p - .then(() => { - called = true; - throw new Error('Resolves the promise'); - }) - .catch((cause) => { - if (called) { - throw cause; - } - assert.deepEqual(cause, ['a', 'b', 'c']); - }); - }); - }); -}); diff --git a/test/scripts/main/theme-defaults.main.spec.js b/test/defaults/ThemeDefaults.main.spec.js similarity index 65% rename from test/scripts/main/theme-defaults.main.spec.js rename to test/defaults/ThemeDefaults.main.spec.js index 7ce6804b..c7c1e90f 100644 --- a/test/scripts/main/theme-defaults.main.spec.js +++ b/test/defaults/ThemeDefaults.main.spec.js @@ -1,12 +1,20 @@ -const assert = require('chai').assert; +/* eslint-disable no-param-reassign */ +const { assert } = require('chai'); const fs = require('fs-extra'); const path = require('path'); -const { ThemeDefaults } = require('../../../scripts/main/defaults/theme-defaults.js'); +const _require = require('esm')(module); +const testPaths = require('../setup-paths'); -const testPaths = require('../../setup-paths'); testPaths.getBasePath(); -describe('ThemeDefaults', function() { +const { ThemeDefaults } = _require('../../src/io/defaults/ThemeDefaults'); +const { setLevel } = _require('../../src/io/Logger'); + +/** @typedef {import('../../src/io/defaults/ThemeDefaults').ThemeDefaults} ThemeDefaults */ + +setLevel('error'); + +describe('ThemeDefaults', () => { const basePath = path.join(process.env.ARC_THEMES, '@advanced-rest-client'); const defaultFile = path.join(basePath, 'arc-electron-default-theme', 'arc-electron-default-theme.css'); const defaultPackage = path.join(basePath, 'arc-electron-default-theme', 'package.json'); @@ -15,57 +23,56 @@ describe('ThemeDefaults', function() { const darkFile = path.join(basePath, 'arc-electron-dark-theme', 'arc-electron-dark-theme.css'); const darkPackage = path.join(basePath, 'arc-electron-dark-theme', 'package.json'); - let instance; + let instance = /** @type ThemeDefaults */ (null); - describe('prepareEnvironment()', function() { - beforeEach(function() { + describe('prepareEnvironment()', () => { + beforeEach(() => { instance = new ThemeDefaults(); }); - afterEach(function() { - return fs.remove(process.env.ARC_THEMES); + afterEach(async () => { + await fs.remove(process.env.ARC_THEMES); }); async function testContents(themeFile, pkgFile) { - const fileExists = await fs.exists(themeFile); + const fileExists = await fs.pathExists(themeFile); assert.isTrue(fileExists, 'Main file exists'); - const pkgExists = await fs.exists(pkgFile); + const pkgExists = await fs.pathExists(pkgFile); assert.isTrue(pkgExists, 'Package file exists'); } - it('Copies default theme files', async () => { + it('copies default theme files', async () => { await instance.prepareEnvironment(); await testContents(defaultFile, defaultPackage); }); - it('Copies anypoint theme files', async () => { + it('copies anypoint theme files', async () => { await instance.prepareEnvironment(); await testContents(anypointFile, anypointPackage); }); - it('Copies dark theme files', async () => { + it('copies dark theme files', async () => { await instance.prepareEnvironment(); await testContents(darkFile, darkPackage); }); - it('Copies theme info file', async () => { + it('copies theme info file', async () => { await instance.prepareEnvironment(); - const exists = await fs.exists(process.env.ARC_THEMES_SETTINGS); + const exists = await fs.pathExists(process.env.ARC_THEMES_SETTINGS); assert.isTrue(exists, 'File exists'); }); }); describe('Updating preinstalled theme files', () => { - beforeEach(function() { + beforeEach(() => { instance = new ThemeDefaults(); }); - afterEach(function() { - return fs.remove(process.env.ARC_THEMES); + afterEach(async () => { + await fs.remove(process.env.ARC_THEMES); }); - async function installDummy(version) { - version = version || '0.0.0'; + async function installDummy(version='0.0.0') { await fs.outputFile(defaultFile, 'not-a-theme-file'); await fs.writeJson(defaultPackage, { version @@ -73,9 +80,8 @@ describe('ThemeDefaults', function() { } async function installDb() { - const db = await fs.readJson( - path.join(__dirname, '..', '..', '..', 'appresources', 'themes', 'themes-info.json')); - db.themes.forEach((item) => item.version = '0.0.0'); + const db = await fs.readJson(path.join(__dirname, '..', '..', 'appresources', 'themes', 'themes-info.json')); + db.themes.forEach((item) => { item.version = '0.0.0' }); await fs.outputJson(process.env.ARC_THEMES_SETTINGS, db); } @@ -89,7 +95,7 @@ describe('ThemeDefaults', function() { assert.notEqual(pkg.version, '0.0.0', 'Package version is updated'); }); - it('updates indo db', async () => { + it('updates the db', async () => { await installDummy(); await installDb(); await instance.prepareEnvironment(); diff --git a/test/dev.js b/test/dev.js deleted file mode 100644 index dbe51383..00000000 --- a/test/dev.js +++ /dev/null @@ -1,48 +0,0 @@ -// const path = require('path'); -// const Application = require('spectron').Application; - -// let electronPath = path.join(__dirname, '..', 'node_modules', -// '.bin', 'electron'); -// if (process.platform === 'win32') { -// electronPath += '.cmd'; -// } -// const workspaceFilePath = 'test/test-workspace.json'; -// let appPath = path.join(__dirname, '..', 'main.js'); -// let app = new Application({ -// path: electronPath, -// args: [ -// appPath, -// '--workspace-file', -// workspaceFilePath -// ] -// }); -// app.start(); -const {SocketRequest} = require('../scripts/renderer/socket-request.js'); -const parts = [ - // After processing status line - Buffer.from([67, 111, 110, 116, 101, 110, 116, 45, 84, 121, 112, 101, - 58, 32, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, - 47, 106, 115, 111, 110, 13, 10, 67, 111, 110, 116, 101, 110, - 116, 45, 76, 101, 110, 103, 116, 104, 58, 32, 49, 49, 52, - 13, 10]), - Buffer.from([83,101,114,118,101,114,58,32,87,101,114,107,122,101,117,103,47,48,46,49,52,46,49,32,80,121,116,104,111,110,47,50,46,55,46,49,52,13,10,68,97,116,101,58,32,84,104,117,44,32,50,49,32,74,117,110,32,50,48,49,56,32,49,56,58,51,48,58,53,49,32,71,77,84,13,10,13,10,123,34,105,110,115,116,114,117,109,101,110,116,95,105,100,34,58,32,50,52,49,56,54,44,32,34,117,115,101,114,95,105,100,34,58,32,53,57,44,32,34,112,114,111,100,117,99,116,95,105,100,34,58,32,51,50,54,57,44,32,34,112,114,105,99,101,34,58,32,50,46,48,44,32,34,115,105,100,101,34,58,32,34,83,101,108,108,34,44,32,34,105,100,34,58,32,50,44,32,34,113,117,97,110,116,105,116,121,34,58,32,48,125,10]) -]; -const requests = [{ - url: `http://localhost:8080/api/endpoint?query=param`, - method: 'GET', - headers: 'Host: test.com\nContent-Length: 0', - payload: 'abc' -}]; - -const opts = [{ - timeout: 50000, - followRedirects: false, - hosts: [{ - from: 'domain.com', - to: 'test.com' - }] -}]; -const request = new SocketRequest(requests[0], opts[0]); -request._processHeaders(parts[0]); -debugger; -request._processHeaders(parts[1]); diff --git a/test/devtest.js b/test/devtest.js deleted file mode 100644 index 0a4f6e1d..00000000 --- a/test/devtest.js +++ /dev/null @@ -1,14 +0,0 @@ -const bootstrap = require('./test-bootstrap.js'); -const workspaceFilePath = 'test/restore.workspace.json'; -const opts = { - args: [ - '--workspace-file', - workspaceFilePath - ] -}; -const app = bootstrap.getApp(opts); -app.start() -.then(() => app.client.waitUntilWindowLoaded(10000)) -.then(() => { - global._testApp = app; -}); diff --git a/test/module-import.js b/test/module-import.js new file mode 100644 index 00000000..2c8b57a6 --- /dev/null +++ b/test/module-import.js @@ -0,0 +1,4 @@ +const _require = require("esm")(module); + +module.exports.WebSessionPersist = _require('../src/io/Constants.js'); +module.exports.SessionManager = _require('../src/io/SessionManager.js'); diff --git a/test/plugin-manager/ThemePluginsManager.main.spec.js b/test/plugin-manager/ThemePluginsManager.main.spec.js new file mode 100644 index 00000000..d47e5310 --- /dev/null +++ b/test/plugin-manager/ThemePluginsManager.main.spec.js @@ -0,0 +1,221 @@ +const { assert } = require('chai'); +const fs = require('fs-extra'); +const path = require('path'); +const _require = require('esm')(module); +const testPaths = require('../setup-paths'); + +const { ThemePluginsManager } = _require('../../src/io/ThemePluginsManager.js'); +const { setLevel } = _require('../../src/io/Logger'); + +/** @typedef {import('../../src/io/ThemePluginsManager').ThemePluginsManager} ThemePluginsManager */ + +setLevel('error'); + +describe('ThemePluginsManager - main process', () => { + let basePath; + + before(async () => { + basePath = testPaths.getBasePath(); + const logFile = path.join(basePath, 'log.log'); + await fs.ensureFile(logFile); + }); + + after(() => fs.remove(basePath)); + + describe('themeInfo getter', () => { + let instance = /** @type ThemePluginsManager */ (null); + beforeEach(() => { + instance = new ThemePluginsManager(); + }); + + it('Returns an instance of ThemeInfo', () => { + const result = instance.themeInfo; + assert.equal(result.constructor.name, 'ThemeInfo'); + }); + + it('settingsFile is set', () => { + const result = instance.themeInfo; + assert.equal(result.settingsFile, process.env.ARC_THEMES_SETTINGS); + }); + + it('Always returns new instance', () => { + const i1 = instance.themeInfo; + const i2 = instance.themeInfo; + assert.isFalse(i1 === i2); + }); + }); + + describe('resolvePath()', () => { + let instance = /** @type ThemePluginsManager */ (null); + beforeEach(() => { + instance = new ThemePluginsManager(); + }); + + it('Reads home path', () => { + const result = instance.resolvePath('~/test'); + assert.equal(result.indexOf('~/'), -1); + }); + }); + + describe('_ensureSymlinkPath()', () => { + afterEach(() => fs.remove(basePath)); + + let instance = /** @type ThemePluginsManager */ (null); + beforeEach(() => { + instance = new ThemePluginsManager(); + }); + + it('Creates path to the location', async () => { + const loc = path.join(basePath, 'a', 'b', 'c'); + await instance._ensureSymlinkPath(loc); + const exists = await fs.pathExists(path.join(basePath, 'a', 'b')); + assert.isTrue(exists); + }); + + it('Last folder is not created', async () => { + const loc = `${basePath}/a/b/c`; + await instance._ensureSymlinkPath(loc); + const exists = await fs.pathExists(path.join(basePath, 'a', 'b', 'c')); + assert.isFalse(exists); + }); + }); + + describe('_installLocalPackage()', () => { + const localPackage = path.join(__dirname, 'local-package'); + afterEach(() => fs.remove(basePath)); + + let instance = /** @type ThemePluginsManager */ (null); + beforeEach(() => { + instance = new ThemePluginsManager(); + }); + + it('creates the symlink', async () => { + await instance._installLocalPackage(localPackage); + const exists = await fs.pathExists(path.join(process.env.ARC_THEMES, 'test-package')); + assert.isTrue(exists); + }); + + it('returns package info object', async () => { + const result = await instance._installLocalPackage(localPackage); + assert.typeOf(result, 'object'); + }); + + it('Has package name', async () => { + const result = await instance._installLocalPackage(localPackage); + assert.equal(result.name, 'test-package'); + }); + + it('isSymlink is set', async () => { + const result = await instance._installLocalPackage(localPackage); + assert.isTrue(result.isSymlink); + }); + + it('version is set', async () => { + const result = await instance._installLocalPackage(localPackage); + assert.equal(result.version, '0.1.0'); + }); + + it('location is set', async () => { + const result = await instance._installLocalPackage(localPackage); + assert.equal(result.location, path.join(process.env.ARC_THEMES, 'test-package')); + }); + + it('mainFile is set', async () => { + const result = await instance._installLocalPackage(localPackage); + assert.equal(result.mainFile, path.join(process.env.ARC_THEMES, 'test-package', 'theme.css')); + }); + }); + + describe('_installRemotePackage()', () => { + afterEach(() => fs.remove(basePath)); + + const pkgName = 'advanced-rest-client/arc-electron-default-theme'; + const pkgVersion = '2.0.0-preview'; + + it('installs GitHub package', async () => { + const instance = new ThemePluginsManager(); + await instance._installRemotePackage(pkgName, pkgVersion); + const exists = await fs.pathExists(path.join(process.env.ARC_THEMES, '@advanced-rest-client', 'arc-electron-default-theme')); + assert.isTrue(exists); + }); + + it('Returns info object', async () => { + const instance = new ThemePluginsManager(); + const result = await instance._installRemotePackage(pkgName, pkgVersion); + assert.typeOf(result, 'object'); + assert.equal(result.name, '@advanced-rest-client/arc-electron-default-theme'); + assert.equal(result.version, pkgVersion); + assert.equal(result.location, path.join(process.env.ARC_THEMES, `@${pkgName}`)); + assert.equal(result.mainFile,path.join(process.env.ARC_THEMES, `@${pkgName}`, 'arc-electron-default-theme.html')); + }); + }); + + describe('uninstall()', () => { + describe('Local package', () => { + let instance = /** @type ThemePluginsManager */ (null); + const pkgName = 'test-package'; + const localPackage = path.join(__dirname, 'local-package'); + beforeEach(async () => { + instance = new ThemePluginsManager(); + await instance.install(localPackage); + const exists = await fs.pathExists(path.join(process.env.ARC_THEMES, 'test-package')); + assert.isTrue(exists, 'has the installed package in the themes location'); + const exists2 = await fs.pathExists(path.join(process.env.ARC_THEMES, 'themes-info.json')) + assert.isTrue(exists2, 'has the theme info file'); + }); + + afterEach(() => fs.remove(basePath)); + + it('Removes local package', async () => { + await instance.uninstall(pkgName); + const exists = await fs.pathExists(path.join(process.env.ARC_THEMES, 'test-package')); + assert.isFalse(exists); + }); + + it('Removes entry from info file.', async () => { + await instance.uninstall(pkgName); + const data = await fs.readJson(process.env.ARC_THEMES_SETTINGS); + assert.typeOf(data.themes, 'array'); + assert.lengthOf(data.themes, 0); + }); + }); + + describe('Remote package', () => { + let instance = /** @type ThemePluginsManager */ (null); + const pkgName = 'advanced-rest-client/arc-electron-default-theme'; + const installedName = `@${pkgName}`; + const pkgVersion = '2.0.0-preview'; + let installedLocation; + + before(() => { + installedLocation = path.join(process.env.ARC_THEMES, '@advanced-rest-client', 'arc-electron-default-theme'); + instance = new ThemePluginsManager(); + return instance.install(pkgName, pkgVersion); + }); + + after(() => fs.remove(basePath)); + + it('has the installed package', async () => { + const exists = await fs.pathExists(installedLocation) + assert.isTrue(exists); + }); + + it('has the entry in the theme info file.', async () => { + const exists = await fs.pathExists(process.env.ARC_THEMES_SETTINGS) + assert.isTrue(exists); + }); + + it('removes remote package', async () => { + await instance.uninstall(installedName); + const exists = await fs.pathExists(installedLocation); + assert.isFalse(exists); + }); + + it('removes entry from the info file.', async () => { + const data = await fs.readJson(path.join(process.env.ARC_THEMES_SETTINGS)); + assert.typeOf(data.themes, 'array'); + assert.lengthOf(data.themes, 0); + }); + }); + }); +}); diff --git a/test/plugin-manager/theme-plugins-manager.main.spec.js b/test/plugin-manager/theme-plugins-manager.main.spec.js deleted file mode 100644 index f200b78f..00000000 --- a/test/plugin-manager/theme-plugins-manager.main.spec.js +++ /dev/null @@ -1,391 +0,0 @@ -const assert = require('chai').assert; -const fs = require('fs-extra'); -const path = require('path'); -const { ThemePluginsManager } = require('../../scripts/packages/plugin-manager/main'); -const testPaths = require('../setup-paths'); - -describe('ThemePluginsManager - main process', function() { - let basePath; - - before(async () => { - basePath = testPaths.getBasePath(); - const logFile = path.join(basePath, 'log.log'); - await fs.ensureFile(logFile); - }); - - after(() => fs.remove(basePath)); - - describe('pluginManager getter', () => { - let instance; - beforeEach(() => { - instance = new ThemePluginsManager(); - }); - - it('Returns an instance of PluginManager', function() { - const result = instance.pluginManager; - assert.equal(result.constructor.name, 'PluginManager'); - }); - - it('cwd is set', function() { - const result = instance.pluginManager; - assert.equal(result.options.cwd, process.env.ARC_THEMES); - }); - - it('pluginsPath is set', function() { - const result = instance.pluginManager; - assert.equal(result.options.pluginsPath, process.env.ARC_THEMES); - }); - - it('Always returns the same instance', () => { - const i1 = instance.pluginManager; - const i2 = instance.pluginManager; - assert.isTrue(i1 === i2); - }); - }); - - describe('themeInfo getter', () => { - let instance; - beforeEach(() => { - instance = new ThemePluginsManager(); - }); - - it('Returns an instance of ThemeInfo', function() { - const result = instance.themeInfo; - assert.equal(result.constructor.name, 'ThemeInfo'); - }); - - it('settingsFile is set', function() { - const result = instance.themeInfo; - assert.equal(result.settingsFile, process.env.ARC_THEMES_SETTINGS); - }); - - it('Always returns new instance', () => { - const i1 = instance.themeInfo; - const i2 = instance.themeInfo; - assert.isFalse(i1 === i2); - }); - }); - - describe('resolvePath()', function() { - let instance; - beforeEach(() => { - instance = new ThemePluginsManager(); - }); - - it('Reads home path', function() { - const result = instance.resolvePath('~/test'); - assert.equal(result.indexOf('~/'), -1); - }); - }); - - describe('_ensureSymlinkPath()', () => { - afterEach(() => fs.remove(basePath)); - - let instance; - beforeEach(() => { - instance = new ThemePluginsManager(); - }); - - it('Creates path to the location', () => { - const loc = path.join(basePath, 'a', 'b', 'c'); - return instance._ensureSymlinkPath(loc) - .then(() => fs.pathExists(path.join(basePath, 'a', 'b'))) - .then((exists) => assert.isTrue(exists)); - }); - - it('Last folder is not created', () => { - const loc = basePath + '/a/b/c'; - return instance._ensureSymlinkPath(loc) - .then(() => fs.pathExists(path.join(basePath, 'a', 'b', 'c'))) - .then((exists) => assert.isFalse(exists)); - }); - }); - - describe('_installLocalPackage()', () => { - const localPackage = path.join(__dirname, 'local-package'); - afterEach(() => fs.remove(basePath)); - - let instance; - beforeEach(() => { - instance = new ThemePluginsManager(); - }); - - it('Creates a symlink', () => { - return instance._installLocalPackage(localPackage) - .then(() => fs.pathExists(path.join(process.env.ARC_THEMES, 'test-package'))) - .then((exists) => assert.isTrue(exists)); - }); - - it('Returns package info object', () => { - return instance._installLocalPackage(localPackage) - .then((result) => { - assert.typeOf(result, 'object'); - }); - }); - - it('Has package name', () => { - return instance._installLocalPackage(localPackage) - .then((result) => { - assert.equal(result.name, 'test-package'); - }); - }); - - it('isSymlink is set', () => { - return instance._installLocalPackage(localPackage) - .then((result) => { - assert.isTrue(result.isSymlink); - }); - }); - - it('version is set', () => { - return instance._installLocalPackage(localPackage) - .then((result) => { - assert.equal(result.version, '0.1.0'); - }); - }); - - it('location is set', () => { - return instance._installLocalPackage(localPackage) - .then((result) => { - assert.equal(result.location, path.join(process.env.ARC_THEMES, 'test-package')); - }); - }); - - it('mainFile is set', () => { - return instance._installLocalPackage(localPackage) - .then((result) => { - assert.equal(result.mainFile, path.join(process.env.ARC_THEMES, 'test-package', 'theme.css')); - }); - }); - }); - - describe('_installRemotePackage()', function() { - afterEach(() => fs.remove(basePath)); - - const pkgName = 'advanced-rest-client/arc-electron-default-theme'; - const pkgVersion = '2.0.0-preview'; - - it('Installs GitHub package', function() { - const instance = new ThemePluginsManager(); - return instance._installRemotePackage(pkgName, pkgVersion) - .then(() => fs.pathExists( - path.join(process.env.ARC_THEMES, '@advanced-rest-client', 'arc-electron-default-theme'))) - .then((exists) => assert.isTrue(exists)); - }); - - it('Returns info object', function() { - const instance = new ThemePluginsManager(); - return instance._installRemotePackage(pkgName, pkgVersion) - .then((result) => { - assert.typeOf(result, 'object'); - assert.equal(result.name, '@advanced-rest-client/arc-electron-default-theme'); - assert.equal(result.version, pkgVersion); - assert.equal(result.location, path.join(process.env.ARC_THEMES, '@' + pkgName)); - assert.equal(result.mainFile, - path.join(process.env.ARC_THEMES, '@' + pkgName, 'arc-electron-default-theme.html')); - }); - }); - }); - - describe('_createThemeInfo()', () => { - const pkgName = 'test'; - let instance; - let info; - beforeEach(() => { - instance = new ThemePluginsManager(); - info = { - name: 'test-name', - version: 'test-version', - location: __dirname + '/local-package', - mainFile: __dirname + '/local-package/theme.css', - isSymlink: true - }; - }); - - it('Eventually returns an object', () => { - return instance._createThemeInfo(pkgName, info) - .then((result) => { - assert.typeOf(result, 'object'); - }); - }); - - it('_id is set', () => { - return instance._createThemeInfo(pkgName, info) - .then((result) => { - assert.equal(result._id, pkgName); - }); - }); - - it('isSymlink is set', () => { - return instance._createThemeInfo(pkgName, info) - .then((result) => { - assert.isTrue(result.isSymlink); - }); - }); - - it('name is set', () => { - return instance._createThemeInfo(pkgName, info) - .then((result) => { - assert.equal(result.name, info.name); - }); - }); - - it('version is set', () => { - return instance._createThemeInfo(pkgName, info) - .then((result) => { - assert.equal(result.version, info.version); - }); - }); - - it('location is set', () => { - return instance._createThemeInfo(pkgName, info) - .then((result) => { - assert.equal(result.location, info.location); - }); - }); - - it('mainFile is set', () => { - return instance._createThemeInfo(pkgName, info) - .then((result) => { - assert.equal(result.mainFile, info.mainFile); - }); - }); - - it('title is set from the package.json file', () => { - return instance._createThemeInfo(pkgName, info) - .then((result) => { - assert.equal(result.title, 'Test title'); - }); - }); - - it('description is set from the package.json file', () => { - return instance._createThemeInfo(pkgName, info) - .then((result) => { - assert.equal(result.description, 'Test description'); - }); - }); - }); - - describe('_addThemeEntry()', () => { - let instance; - let info; - beforeEach(() => { - instance = new ThemePluginsManager(); - info = { - _id: 'test-id', - name: 'test-name', - version: 'test-version', - location: __dirname + '/local-package', - mainFile: __dirname + '/local-package/theme.css' - }; - }); - - afterEach(() => fs.remove(basePath)); - - it('Creates theme registry file', () => { - return instance._addThemeEntry(info) - .then(() => fs.pathExists(process.env.ARC_THEMES_SETTINGS)) - .then((exists) => assert.isTrue(exists)); - }); - - it('Adds info to theme registry file', () => { - return instance._addThemeEntry(info) - .then(() => fs.readJson(process.env.ARC_THEMES_SETTINGS)) - .then((data) => { - assert.typeOf(data, 'object'); - assert.typeOf(data.themes, 'array'); - assert.lengthOf(data.themes, 1); - }); - }); - - it('Adds 2 info objects to theme registry file', () => { - return instance._addThemeEntry(info) - .then(() => instance._addThemeEntry(info)) - .then(() => fs.readJson(process.env.ARC_THEMES_SETTINGS)) - .then((data) => { - assert.typeOf(data.themes, 'array'); - assert.lengthOf(data.themes, 2); - }); - }); - }); - - describe('uninstall()', () => { - describe('Local package', () => { - let instance; - const localPackage = path.join(__dirname, 'local-package'); - beforeEach(() => { - instance = new ThemePluginsManager(); - return instance.install(localPackage); - }); - - afterEach(() => fs.remove(basePath)); - - it('Has package installed', () => { - return fs.pathExists(path.join(process.env.ARC_THEMES, 'test-package')) - .then((exists) => assert.isTrue(exists)); - }); - - it('Has entry in theme info file.', () => { - return fs.pathExists(path.join(process.env.ARC_THEMES, 'themes-info.json')) - .then((exists) => assert.isTrue(exists)); - }); - - it('Removes local package', async () => { - await instance.uninstall(localPackage); - const exists = await fs.pathExists(path.join(process.env.ARC_THEMES, 'test-package')); - assert.isFalse(exists); - }); - - it('Removes entry from info file.', async () => { - await instance.uninstall(localPackage); - const data = await fs.readJson(process.env.ARC_THEMES_SETTINGS); - assert.typeOf(data.themes, 'array'); - assert.lengthOf(data.themes, 0); - }); - }); - - describe('Remote package', () => { - let instance; - const pkgName = 'advanced-rest-client/arc-electron-default-theme'; - const pkgVersion = '2.0.0-preview'; - let installedLocation; - - before(() => { - installedLocation = path.join( - process.env.ARC_THEMES, - '@advanced-rest-client', - 'arc-electron-default-theme'); - instance = new ThemePluginsManager(); - return instance.install(pkgName, pkgVersion); - }); - - after(() => fs.remove(basePath)); - - it('Has package installed', () => { - return fs.pathExists(installedLocation) - .then((exists) => assert.isTrue(exists)); - }); - - it('Has entry in theme info file.', () => { - return fs.pathExists(process.env.ARC_THEMES_SETTINGS) - .then((exists) => assert.isTrue(exists)); - }); - - it('Removes remote package', () => { - return instance.uninstall(pkgName) - .then(() => fs.pathExists(installedLocation)) - .then((exists) => { - assert.isFalse(exists); - }); - }); - - it('Removes entry from info file.', () => { - return fs.readJson(path.join(process.env.ARC_THEMES_SETTINGS)) - .then((data) => { - assert.typeOf(data.themes, 'array'); - assert.lengthOf(data.themes, 0); - }); - }); - }); - }); -}); diff --git a/test/renderer-setup-environment.js b/test/renderer-setup-environment.js new file mode 100644 index 00000000..30d8ecac --- /dev/null +++ b/test/renderer-setup-environment.js @@ -0,0 +1,13 @@ +const { app } = require('electron'); +// @ts-ignore +const _require = require('esm')(module); +const testPaths = require('./setup-paths'); + +const { setLevel } = _require('../src/io/Logger'); + +setLevel('error'); + +app.on('ready', () => { + testPaths.getBasePath(); + testPaths.setupEnvironment(); +}); diff --git a/test/renderer-setup-paths.js b/test/renderer-setup-paths.js deleted file mode 100644 index a6309f1e..00000000 --- a/test/renderer-setup-paths.js +++ /dev/null @@ -1,2 +0,0 @@ -const testPaths = require('./setup-paths'); -testPaths.getBasePath(); diff --git a/test/scripts/main/app-options.main.spec.js b/test/scripts/main/app-options.main.spec.js deleted file mode 100644 index 0a1de02a..00000000 --- a/test/scripts/main/app-options.main.spec.js +++ /dev/null @@ -1,275 +0,0 @@ -const {assert} = require('chai'); -const {AppOptions} = require('../../../scripts/main/app-options.js'); - -describe('AppOptions', function() { - let instance; - - describe('availableOptions', function() { - before(function() { - instance = new AppOptions(); - }); - - it('Returns and Array', function() { - assert.typeOf(instance.availableOptions, 'array'); - }); - - it('Array is not empty', function() { - assert.isAbove(instance.availableOptions.length, 1); - }); - - it('Properties are set', function() { - const opts = instance.availableOptions; - for (let i = 0, len = opts.length; i < len; i++) { - assert.typeOf(opts[i].name, 'string', 'Name is a string'); - assert.typeOf(opts[i].shortcut, 'string', 'Shortcut is a string'); - assert.typeOf(opts[i].type, 'function', 'Type is set'); - } - }); - }); - - describe('parse()', function() { - let origArgV; - describe('Defaults', function() { - before(function() { - origArgV = process.argv; - process.argv = [ - '/app/path' - ]; - instance = new AppOptions(); - instance.parse(); - }); - - after(function() { - process.argv = origArgV; - }); - - it('Settings file is undefined', function() { - assert.isUndefined(instance.settingsFile); - }); - - it('Workspace file is undefined', function() { - assert.isUndefined(instance.workspacePath); - }); - - it('disableLog is undefined', function() { - assert.isUndefined(instance.disableLog); - }); - }); - - describe('Full options names', function() { - before(function() { - origArgV = process.argv; - process.argv = [ - '/app/path', - '--settings-file', - 'settings-file-test', - '--workspace-path', - 'workspace-path-test', - '--debug', - '--invalid-option', - 'ivalid-value' - ]; - instance = new AppOptions(); - instance.parse(); - }); - - after(function() { - process.argv = origArgV; - }); - - it('Sets settings file', function() { - assert.equal(instance.settingsFile, 'settings-file-test'); - }); - - it('Sets workspace file', function() { - assert.equal(instance.workspacePath, 'workspace-path-test'); - }); - - it('Sets debug', function() { - assert.isTrue(instance.debug, 'debug is set'); - }); - - it('invalidOption is not set', function() { - assert.isUndefined(instance.invalidOption); - }); - }); - - describe('Shortcuts', function() { - before(function() { - origArgV = process.argv; - process.argv = [ - '/app/path', - '-d', - '-s', - 'settings-file-test', - '-w', - 'workspace-path-test' - ]; - instance = new AppOptions(); - instance.parse(); - }); - - after(function() { - process.argv = origArgV; - }); - - it('Sets settings file', function() { - assert.equal(instance.settingsFile, 'settings-file-test'); - }); - - it('Sets workspace file', function() { - assert.equal(instance.workspacePath, 'workspace-path-test'); - }); - - it('Sets debug', function() { - assert.isTrue(instance.debug, 'debug is set'); - }); - }); - }); - - describe('findDefinnition()', function() { - before(function() { - instance = new AppOptions(); - }); - - it('Finds a definition for full name', function() { - const name = '--settings-file'; - const result = instance.findDefinnition(name); - assert.typeOf(result, 'object'); - assert.equal(result.name, name); - }); - - it('Finds a definition for shortcut', function() { - const name = '--settings-file'; - const result = instance.findDefinnition('-s'); - assert.typeOf(result, 'object'); - assert.equal(result.name, name); - }); - - it('Returns undefined for unknown name', function() { - const result = instance.findDefinnition('--non-existing'); - assert.isUndefined(result); - }); - - it('Returns undefined for unknown shortcut', function() { - const result = instance.findDefinnition('-non-existing'); - assert.isUndefined(result); - }); - }); - - describe('getPropertyDefinition()', function() { - const def = { - type: String, - name: 'test' - }; - const argWithValue = 'name="test-value"'; - const arg = 'name'; - before(function() { - instance = new AppOptions(); - }); - - it('Parses argument with value', function() { - const defArg = Object.assign({}, def); - const result = instance.getPropertyDefinition(argWithValue, defArg, 'other-test'); - assert.isFalse(result.skipNext); - assert.equal(result.value, 'test-value'); - }); - - it('Parses argument without value', function() { - const defArg = Object.assign({}, def); - const result = instance.getPropertyDefinition(arg, defArg, 'other-test'); - assert.isTrue(result.skipNext); - assert.equal(result.value, 'other-test'); - }); - - it('Value is number for numeric types', function() { - const defArg = Object.assign({}, def); - defArg.type = Number; - const result = instance.getPropertyDefinition(arg, defArg, '2'); - assert.isTrue(result.skipNext); - assert.strictEqual(result.value, 2); - }); - - it('Value is a Boolean for Boolean types', function() { - const defArg = Object.assign({}, def); - defArg.type = Boolean; - const result = instance.getPropertyDefinition(arg, defArg); - assert.isFalse(result.skipNext); - assert.isTrue(result.value); - }); - }); - - describe('getArgValue()', function() { - before(function() { - instance = new AppOptions(); - }); - - it('Returns value with quota', function() { - const result = instance.getArgValue('name="test"'); - assert.equal(result, 'test'); - }); - - it('Returns value without quota', function() { - const result = instance.getArgValue('name=test'); - assert.equal(result, 'test'); - }); - - it('Returns empty stirng when no value', function() { - const result = instance.getArgValue('name'); - assert.equal(result, ''); - }); - }); - - describe('setProperty()', function() { - const def = { - value: 'test' - }; - before(function() { - instance = new AppOptions(); - }); - - it('Sets full name property', function() { - const arg = Object.assign({name: '--my-name-argument'}, def); - instance.setProperty(arg); - assert.equal(instance.myNameArgument, 'test'); - }); - }); - - describe('getOptions()', function() { - let origArgV; - before(function() { - origArgV = process.argv; - process.argv = [ - '/app/path', - '--debug', - '--settings-file', - 'settings-file-test', - '--workspace-path', - 'workspace-path-test' - ]; - instance = new AppOptions(); - instance.parse(); - }); - - after(function() { - process.argv = origArgV; - }); - - it('Returns object', function() { - const result = instance.getOptions(); - assert.typeOf(result, 'object'); - }); - - it('Object has 3 properties', function() { - const result = instance.getOptions(); - assert.lengthOf(Object.keys(result), 3); - }); - - it('Returns all properties', function() { - const result = instance.getOptions(); - assert.equal(result.settingsFile, 'settings-file-test'); - assert.equal(result.workspacePath, 'workspace-path-test'); - assert.isTrue(result.debug); - }); - }); -}); diff --git a/test/scripts/main/window-manager.main.spec.js b/test/scripts/main/window-manager.main.spec.js deleted file mode 100644 index 34b29dab..00000000 --- a/test/scripts/main/window-manager.main.spec.js +++ /dev/null @@ -1,177 +0,0 @@ -const { assert } = require('chai'); -const { ArcWindowsManager } = require('../../../scripts/main/windows-manager.js'); -const { ArcSessionRecorder } = require('../../../scripts/main/arc-session-recorder'); -const { ContextActions } = require('../../../scripts/packages/context-actions/main'); -const { BrowserWindow } = require('electron'); - -describe('ArcWindowsManager', function() { - describe('constructor()', function() { - it('Sets default startupOptions', function() { - const instance = new ArcWindowsManager(); - assert.typeOf(instance.startupOptions, 'object'); - assert.lengthOf(Object.keys(instance.startupOptions), 0); - }); - - it('Sets passed startupOptions', function() { - const opts = { startPath: 'test' }; - const instance = new ArcWindowsManager(opts); - assert.deepEqual(instance.startupOptions, opts); - }); - - it('Sets windows array', () => { - const instance = new ArcWindowsManager(); - assert.lengthOf(instance.windows, 0); - }); - - it('Sets ArcSessionRecorder', () => { - const instance = new ArcWindowsManager(); - assert.isTrue(instance.recorder instanceof ArcSessionRecorder); - }); - - it('Sets ContextActions', () => { - const instance = new ArcWindowsManager(); - assert.isTrue(instance.contextActions instanceof ContextActions); - }); - }); - - describe('get hasWindow()', () => { - let instance; - before(() => { - instance = new ArcWindowsManager(); - }); - - it('Returns false when no windows', () => { - assert.isFalse(instance.hasWindow); - }); - - it('Returns true when has a window', () => { - instance.windows = [{}]; - assert.isTrue(instance.hasWindow); - }); - }); - - describe('get lastFocused()', () => { - let instance; - before(() => { - instance = new ArcWindowsManager(); - }); - - it('Returns null when no focused window', () => { - assert.equal(instance.lastFocused, null); - }); - - it('Returns null when the window has been destroyed', () => { - instance._lastFocused = { - isDestroyed: () => true - }; - assert.equal(instance.lastFocused, null); - }); - - it('Returns window instance', () => { - instance._lastFocused = { - isDestroyed: () => false - }; - assert.deepEqual(instance.lastFocused, instance._lastFocused); - }); - }); - - describe('get lastActive()', () => { - let instance; - before(() => { - instance = new ArcWindowsManager(); - }); - - it('Returns null when no windows', () => { - assert.equal(instance.lastActive, null); - }); - - it('Returns null when no active windows', () => { - instance.windows = [{ - isDestroyed: () => true - }, { - isDestroyed: () => true - }]; - assert.equal(instance.lastActive, null); - }); - - it('Returns window instance', () => { - instance.windows = [{ - isDestroyed: () => true - }, { - isDestroyed: () => false - }]; - assert.deepEqual(instance.lastActive, instance.windows[1]); - }); - }); - - describe('open()', () => { - let instance; - before(() => { - instance = new ArcWindowsManager(); - }); - - it('Returns window instance', () => { - return instance.open() - .then((win) => { - assert.isTrue(win instanceof BrowserWindow); - win.destroy(); - }); - }); - - it('Sets __arcSession on the window', () => { - return instance.open() - .then((win) => { - win.destroy(); - assert.ok(win.__arcSession); - }); - }); - - it('Sets __arcIndex on the window', () => { - return instance.open() - .then((win) => { - win.destroy(); - assert.equal(win.__arcIndex, 0); - }); - }); - - it('Adds window to the list of windows', () => { - return instance.open() - .then((win) => { - assert.notEqual(instance.windows.indexOf(win), -1); - win.destroy(); - }); - }); - - it('Removes window from the list when destroyed', () => { - return instance.open() - .then((win) => { - win.destroy(); - assert.equal(instance.windows.indexOf(win), -1); - }); - }); - }); - - describe('__getNewWindow()', () => { - let instance; - let session; - before(() => { - instance = new ArcWindowsManager(); - session = { - size: { - width: 100, - height: 200 - }, - position: { - x: 10, - y: 20 - } - }; - }); - - it('Creates BrowserWindow instance', () => { - const result = instance.__getNewWindow(0, session); - assert.isTrue(result instanceof BrowserWindow); - result.destroy(); - }); - }); -}); diff --git a/test/setup-paths.js b/test/setup-paths.js index a00cf69d..56eadef1 100644 --- a/test/setup-paths.js +++ b/test/setup-paths.js @@ -1,11 +1,18 @@ -const arcPaths = require('../scripts/main/arc-paths'); const electron = require('electron'); const path = require('path'); +// @ts-ignore +const _require = require('esm')(module); + +const { ApplicationPaths } = _require('../src/io/ApplicationPaths.js'); +const { ArcEnvironment } = _require('../src/io/ArcEnvironment.js'); +const { PreferencesManager } = _require('../src/io/PreferencesManager.js'); + +const arcPaths = new ApplicationPaths(); let pathsSet = false; module.exports = { - getBasePath: function() { + getBasePath: () => { const app = electron.remote ? electron.remote.app : electron.app; if (pathsSet) { return app.getPath('userData'); @@ -17,6 +24,16 @@ module.exports = { arcPaths.setSettingsFile(); arcPaths.setWorkspacePath(); arcPaths.setThemesPath(); + arcPaths.setStateFile(); return basePath; + }, + + setupEnvironment() { + const prefManager = new PreferencesManager(path.join(__dirname, 'tests-exe-dir', 'test-settings.json')); + const env = new ArcEnvironment(prefManager, {}); + // @ts-ignore + global.Arc = env; + env.registerHandlers(); + // await env.loadEnvironment(); } }; diff --git a/test/test-bootstrap.js b/test/test-bootstrap.js index be723521..b7e52787 100644 --- a/test/test-bootstrap.js +++ b/test/test-bootstrap.js @@ -1,50 +1,52 @@ +/* eslint-disable no-multi-assign */ const path = require('path'); const { Application } = require('spectron'); const electronPath = require('electron'); const fs = require('fs-extra'); -const appPath = path.join(__dirname, '..', 'main.js'); +const appPath = path.join(__dirname, '..', 'src', 'io', 'main.js'); const basePath = path.join('test', 'playground'); -// console.log('App path ', appPath); + +/** @typedef {import('spectron').AppConstructorOptions} AppConstructorOptions */ const settingsFilePath = module.exports.settingsFilePath = path.join(basePath, 'settings.json'); const workspaceFilePath = module.exports.workspaceFilePath = path.join(basePath, 'workspace'); const themesFilePath = module.exports.themesFilePath = path.join(basePath, 'themes'); -function getApp(opts) { - opts = opts || {}; - const options = { - path: electronPath, - startTimeout: 50000, - waitTimeout: 50000, +function getApp(opts={}) { + const options = /** @type AppConstructorOptions */ ({ + path: /** @type any */ (electronPath), + // startTimeout: 5000, + // waitTimeout: 5000, args: [ appPath, '--test' ], - requireName: 'electronRequire' - }; + requireName: 'electronRequire', + // chromeDriverLogPath: path.join(__dirname, 'log.log'), + }); if (opts.args) { options.args = options.args.concat(opts.args); } else { options.args = options.args.concat([ '--workspace-path', workspaceFilePath, '--settings-file', settingsFilePath, - '--themes-path', themesFilePath + '--themes-path', themesFilePath, ]); } + // console.log(options); return new Application(options); } function deffer(timeout) { - return new Promise(function(resolve) { - setTimeout(function() { + return new Promise((resolve) => { + setTimeout(() => { resolve(); }, timeout); }); } -async function runAppDeffered(timeout, opts) { +async function runAppDeferred(timeout=5000, opts) { const app = getApp(opts); - timeout = timeout || 5000; try { await app.start(); await app.client.waitUntilWindowLoaded(10000); @@ -58,8 +60,7 @@ async function runAppDeffered(timeout, opts) { } } -async function stopAndClean(app, clearPath) { - clearPath = clearPath || basePath; +async function stopAndClean(app, clearPath=basePath) { if (app && app.isRunning()) { await app.stop(); } @@ -67,5 +68,6 @@ async function stopAndClean(app, clearPath) { } module.exports.getApp = getApp; -module.exports.runAppDeffered = runAppDeffered; +module.exports.runAppDeferred = runAppDeferred; module.exports.stopAndClean = stopAndClean; +module.exports.deffer = deffer; diff --git a/test/workspaces/WorkspaceHistory.main.spec.js b/test/workspaces/WorkspaceHistory.main.spec.js new file mode 100644 index 00000000..b18c689a --- /dev/null +++ b/test/workspaces/WorkspaceHistory.main.spec.js @@ -0,0 +1,225 @@ +const { assert } = require('chai'); +const path = require('path'); +const fs = require('fs-extra'); +const _require = require('esm')(module); +const testPaths = require('../setup-paths'); + +/** @typedef {import('../../src/io/models/WorkspaceHistory').WorkspaceHistory} WorkspaceHistory */ + +const { WorkspaceHistory } = _require('../../src/io/models/WorkspaceHistory'); + +describe('WorkspaceHistory model class', () => { + const historyPath = path.join('workspace', 'workspace-history.json'); + + before(() => { + testPaths.getBasePath(); + }); + + describe('Constructor', () => { + it('Sets default entries limit', () => { + const instance = new WorkspaceHistory(); + assert.equal(instance.limit, 15); + }); + + it('Sets limit from the argument', () => { + const instance = new WorkspaceHistory(10); + assert.equal(instance.limit, 10); + }); + + it('Sets file path', () => { + const instance = new WorkspaceHistory(); + const result = path.join(process.env.ARC_HOME, historyPath); + assert.equal(instance.settingsFile, result); + }); + }); + + describe('defaultSettings()', () => { + let instance = /** @type WorkspaceHistory */ (null); + beforeEach(() => { + instance = new WorkspaceHistory(); + }); + + it('returns an object', async () => { + const result = await instance.defaultSettings(); + assert.typeOf(result, 'object'); + }); + + it('has the "kind" property', async () => { + const result = await instance.defaultSettings() + assert.equal(result.kind, 'ARC#WorkspaceHistory'); + }); + + it('has the "entries" property', async () => { + const result = await instance.defaultSettings() + assert.typeOf(result.entries, 'array'); + }); + + it('has empty "entries" property', async () => { + const result = await instance.defaultSettings() + assert.lengthOf(result.entries, 0); + }); + }); + + describe('sortEntries()', () => { + let instance = /** @type WorkspaceHistory */ (null); + beforeEach(() => { + instance = new WorkspaceHistory(); + }); + + it('returns 1 when a is older', () => { + const a = { used: 1, file: 'a' }; + const b = { used: 2, file: 'a' }; + const result = instance.sortEntries(a, b); + assert.equal(result, 1); + }); + + it('returns -1 when a is younger', () => { + const a = { used: 2, file: 'a' }; + const b = { used: 1, file: 'a' }; + const result = instance.sortEntries(a, b); + assert.equal(result, -1); + }); + + it('returns 0 when equal', () => { + const a = { used: 1, file: 'a' }; + const b = { used: 1, file: 'a' }; + const result = instance.sortEntries(a, b); + assert.equal(result, 0); + }); + }); + + describe('sortEntries()', () => { + let instance = /** @type WorkspaceHistory */ (null); + beforeEach(() => { + instance = new WorkspaceHistory(); + }); + + afterEach(() => { + const file = path.join(process.env.ARC_HOME, historyPath); + return fs.remove(file); + }); + + it('returns undefined when no array items', async () => { + const result = await instance.loadEntries() + assert.isUndefined(result); + }); + + it('returns undefined when load function do not return data', async () => { + instance.load = async () => undefined; + const result = await instance.loadEntries() + assert.isUndefined(result); + }); + + it('returns undefined when no entires array', async () => { + instance.load = async () => ({ kind: 'ARC#WorkspaceHistory', entries: undefined }); + const result = await instance.loadEntries() + assert.isUndefined(result); + }); + + it('returns undefined when entires is not an array', async () => { + // @ts-ignore + instance.load = async () => ({ kind: 'ARC#WorkspaceHistory', entries: {} }); + const result = await instance.loadEntries() + assert.isUndefined(result); + }); + + it('returns list of entires', async () => { + const entries = [{ used: 1, file: 'test' }]; + instance.load = async () => ({ kind: 'ARC#WorkspaceHistory', entries }); + const result = await instance.loadEntries() + assert.deepEqual(result, entries); + }); + }); + + describe('addEntry()', () => { + let instance = /** @type WorkspaceHistory */ (null); + beforeEach(() => { + instance = new WorkspaceHistory(); + }); + + afterEach(() => { + const file = path.join(process.env.ARC_HOME, historyPath); + return fs.remove(file); + }); + + it('rejects when no argument', async () => { + let called = false; + try { + await instance.addEntry(undefined); + } catch (e) { + called = true; + } + assert.isTrue(called); + }); + + it('adds a new entry', async () => { + await instance.addEntry('/test'); + const file = path.join(process.env.ARC_HOME, historyPath); + const data = await fs.readJson(file); + assert.lengthOf(data.entries, 1, 'Has an entry'); + assert.equal(data.entries[0].file, '/test', 'Entry has file'); + assert.typeOf(data.entries[0].used, 'number', 'Entry has used'); + }); + + it('updates existing entry', async () => { + const file = path.join(process.env.ARC_HOME, historyPath); + await fs.outputJson(file, { + entries: [{ + file: '/test', + used: 1 + }] + }); + await instance.addEntry('/test'); + const data = await fs.readJson(file); + assert.typeOf(data.entries[0].used, 'number', 'Entry has used'); + assert.notEqual(data.entries[0].used, 1, 'Entry used time is updated'); + }); + + it('limits number of entries', async () => { + const file = path.join(process.env.ARC_HOME, historyPath); + instance.limit = 2; + await fs.outputJson(file, { + entries: [{ + file: '/1', + used: 1 + }, { + file: '/2', + used: 2 + }] + }); + await instance.addEntry('/3'); + const data = await fs.readJson(file); + assert.equal(data.entries[0].file, '/3', 'New Entry added'); + assert.equal(data.entries[1].file, '/2', 'Youngest entry stays'); + assert.lengthOf(data.entries, 2, 'Oldest entry is removed'); + }); + }); + + describe('clearHistory()', () => { + let instance = /** @type WorkspaceHistory */ (null); + beforeEach(() => { + instance = new WorkspaceHistory(); + }); + + afterEach(() => { + const file = path.join(process.env.ARC_HOME, historyPath); + return fs.remove(file); + }); + + it('clears entries', async () => { + const file = path.join(process.env.ARC_HOME, historyPath); + await fs.outputJson(file, { + entries: [{ + file: '/1', + used: 1 + }, { + file: '/2', + used: 2 + }] + }) + await instance.clearHistory(); + const data = await fs.readJson(file); + assert.lengthOf(data.entries, 0); + }); + }); +}); diff --git a/test/workspaces/workspace-history-model.main.spec.js b/test/workspaces/workspace-history-model.main.spec.js deleted file mode 100644 index c10dd9dc..00000000 --- a/test/workspaces/workspace-history-model.main.spec.js +++ /dev/null @@ -1,273 +0,0 @@ -const { WorkspaceHistory } = require('../../scripts/main/models/workspace-history'); -const { assert } = require('chai'); -const path = require('path'); -const fs = require('fs-extra'); - -describe('WorkspaceHistory model class', function() { - const historyPath = path.join('workspace', 'workspace-history.json'); - describe('Constructor', function() { - it('Sets default entries limit', function() { - const instance = new WorkspaceHistory(); - assert.equal(instance.limit, 15); - }); - - it('Sets limit from the argument', function() { - const instance = new WorkspaceHistory(10); - assert.equal(instance.limit, 10); - }); - - it('Sets file path', () => { - const instance = new WorkspaceHistory(); - const result = path.join(process.env.ARC_HOME, historyPath); - assert.equal(instance.settingsFile, result); - }); - }); - - describe('defaultSettings()', () => { - let instance; - beforeEach(() => { - instance = new WorkspaceHistory(); - }); - - it('Returns a promise', () => { - const result = instance.defaultSettings(); - assert.typeOf(result, 'promise'); - }); - - it('Promise resolves to an object', () => { - return instance.defaultSettings() - .then((result) => { - assert.typeOf(result, 'object'); - }); - }); - - it('Object has kind property', () => { - return instance.defaultSettings() - .then((result) => { - assert.equal(result.kind, 'ARC#WorkspaceHistory'); - }); - }); - - it('Object has entries property', () => { - return instance.defaultSettings() - .then((result) => { - assert.typeOf(result.entries, 'array'); - }); - }); - - it('Entries property is empty', () => { - return instance.defaultSettings() - .then((result) => { - assert.lengthOf(result.entries, 0); - }); - }); - }); - - describe('sortEntries()', () => { - let instance; - beforeEach(() => { - instance = new WorkspaceHistory(); - }); - - it('Returns 1 when a is older', () => { - const a = { used: 1 }; - const b = { used: 2 }; - const result = instance.sortEntries(a, b); - assert.equal(result, 1); - }); - - it('Returns -1 when a is yonger', () => { - const a = { used: 2 }; - const b = { used: 1 }; - const result = instance.sortEntries(a, b); - assert.equal(result, -1); - }); - - it('Returns 0 when equal', () => { - const a = { used: 1 }; - const b = { used: 1 }; - const result = instance.sortEntries(a, b); - assert.equal(result, 0); - }); - }); - - describe('sortEntries()', () => { - let instance; - beforeEach(() => { - instance = new WorkspaceHistory(); - }); - - afterEach(() => { - const file = path.join(process.env.ARC_HOME, historyPath); - return fs.remove(file); - }); - - it('Returns a promise', () => { - const result = instance.loadEntries(); - assert.typeOf(result, 'promise'); - return result; - }); - - it('Returns undefined when no array items', () => { - return instance.loadEntries() - .then((result) => { - assert.isUndefined(result); - }); - }); - - it('Returns undefined when load function do not return data', () => { - instance.load = () => Promise.resolve(); - return instance.loadEntries() - .then((result) => { - assert.isUndefined(result); - }); - }); - - it('Returns undefined when no entires array', () => { - instance.load = () => Promise.resolve({}); - return instance.loadEntries() - .then((result) => { - assert.isUndefined(result); - }); - }); - - it('Returns undefined when entires is not an array', () => { - instance.load = () => Promise.resolve({ entries: {} }); - return instance.loadEntries() - .then((result) => { - assert.isUndefined(result); - }); - }); - - it('Returns list of entires', () => { - const entries = [{ used: 1, file: 'test' }]; - instance.load = () => Promise.resolve({ entries }); - return instance.loadEntries() - .then((result) => { - assert.deepEqual(result, entries); - }); - }); - }); - - describe('addEntry()', () => { - let instance; - beforeEach(() => { - instance = new WorkspaceHistory(); - }); - - afterEach(() => { - const file = path.join(process.env.ARC_HOME, historyPath); - return fs.remove(file); - }); - - it('Rejects when no argument', (done) => { - const result = instance.addEntry(); - result.then(() => { - throw new Error('Should not resolve'); - }) - .catch((cause) => { - assert.notEqual(cause.message, 'Should not resolve'); - done(); - }); - }); - - it('Adds a new entry', () => { - return instance.addEntry('/test') - .then(() => { - const file = path.join(process.env.ARC_HOME, historyPath); - return fs.readJson(file); - }) - .then((data) => { - assert.lengthOf(data.entries, 1, 'Has an entry'); - assert.equal(data.entries[0].file, '/test', 'Entry has file'); - assert.typeOf(data.entries[0].used, 'number', 'Entry has used'); - }); - }); - - it('Updates existing entry', () => { - const file = path.join(process.env.ARC_HOME, historyPath); - return fs.outputJson(file, { - entries: [{ - file: '/test', - used: 1 - }] - }) - .then(() => instance.addEntry('/test')) - .then(() => fs.readJson(file)) - .then((data) => { - assert.typeOf(data.entries[0].used, 'number', 'Entry has used'); - assert.notEqual(data.entries[0].used, 1, 'Entry used time is updated'); - }); - }); - - it('Limits number of entries', () => { - const file = path.join(process.env.ARC_HOME, historyPath); - instance.limit = 2; - return fs.outputJson(file, { - entries: [{ - file: '/1', - used: 1 - }, { - file: '/2', - used: 2 - }] - }) - .then(() => instance.addEntry('/3')) - .then(() => fs.readJson(file)) - .then((data) => { - assert.equal(data.entries[0].file, '/3', 'New Entry added'); - assert.equal(data.entries[1].file, '/2', 'Yongest entry stays'); - assert.lengthOf(data.entries, 2, 'Oldest entry is removed'); - }); - }); - }); - - describe('clearHistory()', () => { - let instance; - beforeEach(() => { - instance = new WorkspaceHistory(); - }); - - afterEach(() => { - const file = path.join(process.env.ARC_HOME, historyPath); - return fs.remove(file); - }); - - it('Clears entries', () => { - const file = path.join(process.env.ARC_HOME, historyPath); - return fs.outputJson(file, { - entries: [{ - file: '/1', - used: 1 - }, { - file: '/2', - used: 2 - }] - }) - .then(() => instance.clearHistory()) - .then(() => fs.readJson(file)) - .then((data) => { - assert.lengthOf(data.entries, 0); - }); - }); - - it('Creates entries when no data', () => { - instance.load = () => Promise.resolve(); - const file = path.join(process.env.ARC_HOME, historyPath); - return fs.outputJson(file, { - entries: [{ - file: '/1', - used: 1 - }, { - file: '/2', - used: 2 - }] - }) - .then(() => instance.clearHistory()) - .then(() => fs.readJson(file)) - .then((data) => { - assert.lengthOf(data.entries, 0); - }); - }); - }); -}); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..c16d1f30 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "esnext", + "module": "esnext", + "moduleResolution": "node", + "lib": ["es2017", "dom"], + "allowJs": true, + "checkJs": true, + "noEmit": true, + "strict": false, + "noImplicitThis": true, + "alwaysStrict": true, + "esModuleInterop": true, + "plugins": [ + { + "name": "typescript-lit-html-plugin" + } + ] + }, + "include": ["**/*.js","node_modules/@open-wc/**/*.js", "types.d.ts"], + "exclude": [ + "node_modules/!(@open-wc)" + ] +} diff --git a/types.d.ts b/types.d.ts new file mode 100644 index 00000000..580b294b --- /dev/null +++ b/types.d.ts @@ -0,0 +1,54 @@ +import { ElectronRequest as ElectronRequestBase, SocketRequest as SocketRequestBase } from "@advanced-rest-client/electron-request"; +import { OAuth2Handler as OAuth2HandlerBase } from "@advanced-rest-client/electron-oauth2/renderer/OAuth2Handler"; +import { ElectronAmfService as ElectronAmfServiceBase } from "@advanced-rest-client/electron-amf-service"; +import { Clipboard, IpcRenderer } from "electron"; +import { CookieBridge as CookieBridgeBase } from "./src/preload/CookieBridge"; +import { EncryptionService as EncryptionServiceBase } from "./src/preload/EncryptionService"; +import { ThemeManager as ThemeManagerBase } from "./src/preload/ThemeManager"; +import { WorkspaceManager as WorkspaceManagerBase } from "./src/preload/WorkspaceManager"; +import { WindowProxy as WindowProxyBase } from "./src/preload/WindowProxy"; +import { PreferencesProxy as PreferencesProxyBase } from "./src/preload/PreferencesProxy"; +import { ImportFilePreProcessor as ImportFilePreProcessorBase } from "./src/preload/ImportFilePreProcessor"; +import { FilesystemProxy as FilesystemProxyBase } from "./src/preload/FilesystemProxy"; +import { ApplicationSearchProxy as ApplicationSearchProxyBase } from "./src/preload/ApplicationSearchProxy"; +import { AppStateProxy as AppStateProxyBase } from "./src/preload/AppStateProxy"; +import { GoogleDriveProxy as GoogleDriveProxyBase } from "./src/preload/GoogleDriveProxy"; +import { GoogleAnalytics as GoogleAnalyticsBase } from "./src/preload/GoogleAnalytics"; +import logger from "electron-log"; + +// declare global { +// interface Global { +// ipc: IpcRenderer; +// } +// } +interface Window { + ipc: IpcRenderer; +} + +declare interface AppVersionInfo { + chrome: string; + appVersion: string; +} + +declare global { + var ipc: IpcRenderer; + var clipboard: Clipboard; + var logger: logger.ElectronLog; + var versionInfo: AppVersionInfo; + class AppStateProxy extends AppStateProxyBase {} + class WorkspaceManager extends WorkspaceManagerBase {} + class EncryptionService extends EncryptionServiceBase {} + class ThemeManager extends ThemeManagerBase {} + class ElectronRequest extends ElectronRequestBase {} + class SocketRequest extends SocketRequestBase {} + class CookieBridge extends CookieBridgeBase {} + class WindowManagerProxy extends WindowProxyBase {} + class PreferencesProxy extends PreferencesProxyBase {} + class OAuth2Handler extends OAuth2HandlerBase {} + class ImportFilePreProcessor extends ImportFilePreProcessorBase {} + class FilesystemProxy extends FilesystemProxyBase {} + class ApplicationSearchProxy extends ApplicationSearchProxyBase {} + class GoogleDriveProxy extends GoogleDriveProxyBase {} + class ElectronAmfService extends ElectronAmfServiceBase {} + class GoogleAnalytics extends GoogleAnalyticsBase {} +} diff --git a/using-arc/cookies-and-session-management.md b/using-arc/cookies-and-session-management.md deleted file mode 100644 index 6bd3ed03..00000000 --- a/using-arc/cookies-and-session-management.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -description: >- - Cookies are important part of session mechanism in the web and when working - with APIs. This section describes how to use cookie manager to authenticate - the request using cookies. ---- - -# Cookies and session management - -{% hint style="warning" %} -When possible, use other means to authenticate a request like Bearer token with JWT. -{% endhint %} - -Advanced REST Client emulates browser behavior when it comes to handling cookies. When a `set-cookie` header is received as a response to an API call then the value of the cookie is processed according to [HTTP State Management Mechanism](https://tools.ietf.org/html/rfc6265) specification. When a request is made to the cookie domain after the cookie was received it is automatically added to the request. - -{% hint style="info" %} -The "set-cookie" header tells the client \(web browser, ARC\) that the server requests to store some data on the client. This data should be then send back with any following request that matches set domain and path. -{% endhint %} - -ARC is web based application and it has a browser included in it. To leverage this ARC allows you to open a Chromium browser window \(it is open source version of Chrome\), log in to a web service, and store received this way cookies into ARC storage. The window opened in ARC has a separate storage and session management than any other ARC window \(main application, menu popup window, task manager, and so on\). This way you can securely authenticate in the window and only incoming cookies are sent back to the application ignoring any other stored values. - -## Authenticating to a web service - -To obtain and store cookies by logging in to a web service using a browser window select Request > Web Session > Login to a web service menu option. This opens an URL input where you can put the login page URL. - -![Login to a web service URL input](../.gitbook/assets/image%20%2829%29.png) - -In this example we will use MuleSoft's Anypoint platform login scheme. The login page is accessible under `https://anypoint.mulesoft.com` URL. - -![Login page to Anypoint platform](../.gitbook/assets/image%20%2823%29.png) - -After successful login a regular page is rendered. - -![Authorized user view](../.gitbook/assets/image%20%2828%29.png) - -Now the login window can be be closed. All cookies sent by the authorization server are now synchronized with ARC's cookies manager. You can see the cookies by selecting Request > Web session > Cookie manager menu option. - -![Cookies set by the web service](../.gitbook/assets/image%20%2839%29.png) - -When a request to matching domain is executed the cookies are automatically added to the request. - -![Request with cookies added automatically](../.gitbook/assets/image%20%2846%29.png) - -## Creating cookies manually - -In Cookie manager \(Request > Web session > Cookie manager\) you have an option to create a cookie manually or to edit existing cookie. I am going to create a new cookie that is going to be set to a request send to `domain.com.` - -![Cookie editor with values](../.gitbook/assets/image%20%2841%29.png) - -After saving the cookie a new entry is added to the list of cookies. - -![Created cookie on the list of cookies](../.gitbook/assets/image%20%2866%29.png) - -You can preview cookie details or edit the cookie after pressing "details" button next to cookie name. - -![Cookie details](../.gitbook/assets/image%20%2819%29.png) - -After a cookie is set it will be automatically added to a request that matches the domain `domain.com`. - -![Request with cookie](../.gitbook/assets/image%20%2815%29.png) - -{% hint style="info" %} -Because the cookie was created with dot "." in front of the cookie domain, the cookie is applied to all requests sent to the domain and all its subdomains. This means the request to domain `http://www.domain.com` will also have the cookie applied to it. -{% endhint %} - diff --git a/using-arc/environments-and-variables.md b/using-arc/environments-and-variables.md deleted file mode 100644 index bdcde3e6..00000000 --- a/using-arc/environments-and-variables.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -description: >- - This guide shows how to use environments and variables in Advanced REST - Client. ---- - -# Environments and variables - -## Variables overview - -Variables are used in all request fields \(method, URL, headers, body\) and allow to define a value in a global scope that is inserted in place when making a request. - -Environments are the way of organizing variables into a namespace. It allows to switch between different sets of variables. It can be used to define variables for different context like staging and production. - -Let's say you have "production" and "stage" environments for your API. Both are using different authorization keys. Environments and variables are made to manage situation like this. Let's say you API support `x-client-id` header with some value that is used to recognize the client. Because of the separation of the environments you have to use different keys for both environments. To deal with this create two environments for "production" and "stage" and create `apiClientId` variable with corresponding values. You can use the variable as `${apiClientId}` in the headers editor as a value. The value is automatically added to the headers before sending the request to the server. - -## Listing variables - -Advanced REST Client lists your application variables created for current environment and system variables available on your machine. You can use both keys to insert it into a request. - -![Variables list](../.gitbook/assets/image%20%2812%29.png) - -To protect your data variables are masked by default. You can toggle visibility of the values using the button at the bottom of the variables list. - -{% hint style="success" %} -You can disable application or system variables in application settings. -{% endhint %} - -When switching the environment in the top toolbar you will switch between different application variables defined for this environment. System variables cannot be changed. - -![Empty environment](../.gitbook/assets/image%20%2810%29.png) - -## Editing variables - -To add a new environment first click on "Edit variables" to open variables editor. - -![Empty variables editor](../.gitbook/assets/image%20%2856%29.png) - -Then "Add" next to environment selector. It then renders a text field where you can enter new environment name. There are no limitation for environment name. - -![Adding an environment](../.gitbook/assets/image%20%2844%29.png) - -When the environment is saved then you can define variables for it. - -![Adding a variable](../.gitbook/assets/image.png) - -You can disable a variable by toggling it on the left-hand side of the input field. - -{% hint style="danger" %} -Variable name must start with a letter and only contain letters and numbers. Special characters or national accents are not supported. -{% endhint %} - -{% hint style="warning" %} -Variable value is always visible in the editor mode. -{% endhint %} - -{% hint style="success" %} -Variable value can be any value, even another variable. -{% endhint %} - -You can repeat this steps as many times you need for each of your environments. After your variables are defined you can use them in the editors. - -## Applying variables - -To apply a variable simply as `${` before variable name and `}` after it. - -![Applying variable to a request](../.gitbook/assets/image%20%2850%29.png) - -The value is applied to the header just before sending the request - -![Sent HTTP message with variable applied to a header](../.gitbook/assets/image%20%2860%29.png) - -You can put a variable into a method, URL, headers, or payload field. Variables can be used as many times as you need in a request. - -## Composite variables - -Variable's value can use another variable. This variables makes it easier to build variables that requires values from multiple sources. - -As an example, basic authorization requires both username and password. It might be difficult to maintain credentials in multiple requests. It's a better idea to store both the username and the password as a separate variables and create new one that combines both with some additional value. - -![Composite variables example](../.gitbook/assets/image%20%285%29.png) - -As a result the combined value is used with the request. - -![Processed variable value](../.gitbook/assets/image%20%2851%29.png) - -## Functions in variables - -You can use one of the predefined functions in your variables. The ARC's engine support various String, Math, and other functions. To run a function editor press a pencil icon next to variable value text field. It brings editor popup with available options with configuration. - -![Variable value editor](../.gitbook/assets/image%20%287%29.png) - -It uses JavaScript envine to evaluate the value. We will use a `slice` function from `String` class to demonstrate the principle. The `slice` function accepts two arguments start and end, and returns a string that contains characters found between start index and end index. We are going to "slice" our `${username}` variable to get a string from position 1 to 3. We would use the following syntax: `String.slice(${username}, 1, 3)` where the first argument is the string we are operating on and other arguments are arguments passed to the JavaScript function. - -In a programming world this would JavaScript would evaluate: `"uname".slice(1, 3)` which in result returns `na`. - -![Evaluated function](../.gitbook/assets/image%20%2849%29.png) - -### Function execution group - -ARC support few additional functions. They are defined in miscellaneous tab. The the moment you can choose between `now` `random` `decodeURIComponent` and `encodeURIComponent` functions. - -Now and random functions support grouping that allows you to generate a value once when making a request and to reuse generated value again using the same group name. Pass a value to either of the functions as an argument and re-use the same function call more than once to recol generated value. - -![Grouped generated values](../.gitbook/assets/image%20%2863%29.png) - diff --git a/using-arc/host-rules.md b/using-arc/host-rules.md deleted file mode 100644 index 51d2d3a9..00000000 --- a/using-arc/host-rules.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -description: This page describes how to use host rules in Advanced REST Client ---- - -# Host rules - -## What are the host rules? - -Host rules assist your operating system to map a host name to an IP address. Historically it was used in first computers before first DNS \(Domain Naming System\) was created to tell the system what is the IP address of the remote machine while having it's name only. Today it is primarily used to alter host - IP address mapping to something different than DNS tells or to create a mapping that DNS is not aware of. - -## Why would you need it in ARC? - -While developing a web server or an API often the server is run locally or in local network. In most cases IP address, that is well known to you, is enough to run a request. However sometimes you need to test a configuration that depends on the value of `host` header. This is quite common for servers that are hosting several virtual hosts. - -Technically you can manually set the URL to an IP address and then put `host` header in the headers editor to test for virtual hosts. Other option is to alter system's `hosts` file to create a mapping but this usually requires administrative privileges. In ARC, however, recommended way of doing this is to define own hosts rules that maps parts of your URL to some other value, but keeps the original URL to generate a host header when connecting to a server. - -When you define a rule and the rule matches the URL of currently executed request, the URL that is used to make a connection is replaced by the mapping value. This way, say, instead of connecting to `host.com` you would be connecting to `127.0.0` \(local host\). However, when the HTTP message is constructed, the original URL value is used to set a value for `host` header which in this example will be `host: host.com` - -## Defining rules - -From the menu Request select Hosts. A host rules mapping screen appears. Click on the add button \(right bottom corner of the screen\) to add new entry. - -![Empty rule in hosts rules mapping](../.gitbook/assets/image%20%2848%29.png) - -In the `from` filed enter the part of the URL that should be replaced with another value. It doesn't have to be a host name only. It can be a full URL or a part of it. - -![Defining a rule in hosts mapping editor](../.gitbook/assets/image%20%2840%29.png) - -In this example the rules mapping maps `https://hosts.com` to `http://127.0.0.1`. Notice that we are not only changing the host but also the scheme. - -Now you can test whether the mapping meets your expectations by running a request URL through rules tester. - -![Rules tester with result](../.gitbook/assets/image%20%2865%29.png) - -We are testing `https://host.com/index.html` URL against defined rules. The result shows that expected result is `http://127.0.0.1/index.html`. - -Now, we can run a request that uses `host.com` in the URL and the connection is made to the local host. - -![Request made to mapped location](../.gitbook/assets/image%20%2862%29.png) - -Even though the request URL contains non-existing URL the request returned data from my locally run server. - -{% hint style="info" %} -All rules are evaluated in order from the first one to the last one. Already altered URL can be altered again by another rule. -{% endhint %} - -## Examples - -### Host only mapping - -From: `212.77.100.101` To: `127.0.0.1` - -This will result with translating the following URL `https://212.77.100.101/index.html` into `https://127.0.0.1/index.html`. - -### URI mapping - -From: `http://domain.com/api` To: `http://127.0.0.1:8081` - -This will result with translating the following URL `http://domain.com/api/endpoint/?query=something` into `https://127.0.0.1:8081/endpoint/?query=something`. - -### With asterisk - -From: `http://212.77.100.101/*/` To: `http://localhost/path/to/endpoint/` - -This will result with translating the following URL `http://212.77.100.101/api/whathever/here/test?query=something` into `http://localhost/path/to/endpoint/test?query=something`. - diff --git a/using-arc/request-actions.md b/using-arc/request-actions.md deleted file mode 100644 index 826dbc5e..00000000 --- a/using-arc/request-actions.md +++ /dev/null @@ -1,177 +0,0 @@ ---- -description: >- - This documentation explain what is and how to use request actions in Advanced - REST Client. ---- - -# Request actions - -Create request actions to dynamically assign variables when the response from the endpoint is ready. ARC gives you convenient editor to create actions that are performed each time the request is send. - -Actions can be conditional. Create a condition rule for the request action and the action is performed only if all conditions are meet. - -This help page is to describe in details how to use request actions and conditions. - -![Request actions overview](../.gitbook/assets/image%20%281%29.png) - -There are two groups of actions that can be performed during the request - -* request actions - executed before the connection is made -* response actions - executed when response is ready - -## Request actions - -Currently request action only allows you to set a value on a variable before the request is made. This value is not stored in the data store bur rather in memory only. This means when you restart the application the variable value will be restored to it's original value. - -![Request action with definition](../.gitbook/assets/image%20%2857%29.png) - -In this example a `myAccessToken` variable is set to empty string before the request is executed. - -## Response action - -Response actions are more complex as they are made to extract data from the response and assign the value to a variable or store the variable in the data store. - -The data can be extracted from each part of the request/response parts of the HTTP message: URL, headers, status line, and the payload. - -### Extracting the data from the response - -You need to tell the application where to look for the data that you want to extract from the response. In the editor you can select either `Request` or `Response` as a main data source. In both cases the rest of the configuration is the same but it uses either request or response values. - -Next step is to define what type of data the application should query for the value. It can be `Url`, `Status code`, `Headers` or `Body`. - -Except for status code you should also define path to the data. Depending on selected type you can use different paths. - -#### Path to the data - -**URL** - -If you not specify path the application will use the whole URL of the last response \(it can be more than one response if there was redirection\). You can specify following paths for `url`: - -* host - Returns the host value, e.g. `api.domain.com` -* `protocol` - Returns URL's protocol, e.g. `https:` -* `path` - URL's path, e.g. `/path/to/resource.json` -* `query` - Returns full query string, e.g. `version=1&page=test` -* `query.[any string]` - Returns the value of a query parameter. For `query.version` it would return `1`and for `query.page` the value will be `test`. -* `hash` - Returns everything that is after the `#` character, e.g. `access_token=token&state=A6RT7W` -* `hast.[any string]` - It treats hash as query parameters and returns the value of the parameter. For `hash.access_token` it would return `token` - -**Example for URL type** - -`https://auth.domain.com/auth/oauth-popup?version=2&remember=true#access_token=z8a1d97c-c4e6-488f-8ac0-a32e3d749f49&token_type=bearer&state=Y2I1CD` - -```javascript -path = 'host' // auth.domain.com -path = 'protocol' // https: -path = 'path' // /auth/oauth-popup -path = 'query' // version=2&remember=true -path = 'query.version' // 2 (String!) -path = 'hash' // access_token=z8a1d97c-c4e6-488f-8ac0-a32e3d749f49&token_type=bearer&state=Y2I1CD -path = 'hash.access_token' // z8a1d97c-c4e6-488f-8ac0-a32e3d749f49 -``` - -**Headers** - -Set header name as a path and the value of the header will be extracted from request or response. - -**Example for headers** - -```http -Content-Type: application/json -Content-Length: 100 -Connection: close -``` - -```javascript -path = 'content-type' // application/json -path = 'Content-length' // 100 (String!) -path = 'Connection' // close -``` - -**Body** - -Currently only **JSON** and **XML** responses are supported. Also, XML has to be valid XML string or the parser will not produce the value. - -For JSON types simply specify path to the data. To access array value use dot with index notation, for example `data.0.name`. This will get value from `name` from first item of the `data` array. - -**Example for JSON** - -```javascript -{ - property: { - otherProperty: { - value: 123456 - } - } -} -path = 'property.otherProperty.value' // 123456 -``` - -**Example for JSON array** - -```javascript -{ - "data": [{ - "name": "a" - }, { - "name": "b" - }] -} -path = 'data.1.name' // b -``` - -**XML** - -Similar for XML: - -```javascript -const xml = ` - - - -
- 202-456-1111 - -` -path = 'people.person.0.phoneNumber' // 202-456-1111 -``` - -**Accessing XML attribute value** - -XML path supports attr\(ATTRIBUTE NAME\) function that returns the value of the attribute: - -```text -path = 'people.person.0.name.attr(first)' // george -``` - -### Defining the resulting action - -When `path` is set you can define two actions to be performed on the data. You can either permanently `Store variable` in application internal database or `Assign variable` temporarily until you restart the application. Last item is to define variable name that will be updated with the value. - -![Response action definition](../.gitbook/assets/image%20%289%29.png) - -## Conditions - -![](../.gitbook/assets/image%20%2830%29.png) - -You can add a condition to the action so the action will be executed if all defined conditions are meet. - -To add a condition to the action click on `Add condition` button. Source, Type and Path to data works the same way as in Action editor. - -After you define source of the data then choose operator to be used to compare the data. It can be one of: - -* equal -* not-equal -* greater-than -* greater-than-equal -* less-than -* less-than-equal -* contains - -Contains can operate on strings, whole headers object \(contains "content-type"\) and on JSON objects \(contains "property"\). - -Last field to set up is `Condition value` which is used to compare the data. - -## Further reading - -See our guide to [authorize the application with OAuth 2 and request actions](../guides/authenticating-with-oauth2-and-request-actions.md). - diff --git a/using-arc/searching-for-a-request.md b/using-arc/searching-for-a-request.md deleted file mode 100644 index 1ecda0f8..00000000 --- a/using-arc/searching-for-a-request.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -description: >- - Internally Advanced REST Client is using IndexedDB, a web standard of storing - a data in client application. This comes with some limitations. This page - describes search capabilities in the application ---- - -# Searching for a request - -In general a request is stored in the data store as **History object** and **Saved object**. - -History object is created when history is not disabled in settings and every time you run a request in the workspace. A history entry is created for a combination of an URL and a method. Only one entry a day for the combination is created. This means that if you run the same request multiple time during the day only one entry is created and it reflects the last state after running the request. The history object does not recognize changes to headers or payload. It is always the last sent values. - -Saved object is generated when you press CTRL/CMD + S \(or File > Save\) and explicitly save a request to saved store. The difference between history and saved request is that the saved request have a name, description, and can be added to a project. - -Both types are stored in separate data stores. This means that when performing a search you are defining the type of a request you are searching for. - -## Search UI - -To search for a request go to history or saved screen. You can access it from the application menu: - -![Access to the history screen](../.gitbook/assets/image%20%2837%29.png) - -In the requests list screen \(for either history or saved\) there is a search text field that you can use to input your query. - -![Search text box in history screen](../.gitbook/assets/image%20%2811%29.png) - -The search is performed on the following fields: - -* name \(saved request\) -* headers -* payload -* url -* method - -For name, headers, payload, and method is compares whole words. This means that for name "my saved request" the search will find the request for query like "my" or "request" but not "save". - -The URL is treated slightly different. Each URL is processed to produce few meaningful values that can help while searching for an endpoint. In normal circumstances you would have to provide the full URL to find a request which is not what anyone would expect. When an URL is stored it is stored as: - -* host, path, and search part of the URL, eg. `https://domain.com/path?param=value` -* path and search part of the URL, eg. `path?param=value` -* search parameters, each entry for each parameter, eg. `param=value` - -When searching for an URL each of this fields is queried for the data. IndexedDb does not support full search queries. ARC implements an algorithm that iterates over keys and compares compares whether an URL contains search phrase. This way it is a good compromise between functionality and performance. - -![Search result](../.gitbook/assets/image%20%2847%29.png) - -If you are more technical, you can check how searching is implemented in [url-indexer](https://github.com/advanced-rest-client/arc-models/blob/stage/url-indexer.js#L727). - diff --git a/using-arc/workspaces.md b/using-arc/workspaces.md deleted file mode 100644 index 6db2aa33..00000000 --- a/using-arc/workspaces.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -description: This pages describes how to use workspaces in Advanced REST Client ---- - -# Workspaces - -## Introducing workspaces - -{% hint style="info" %} -Workspaces are available in ARC 14 and above -{% endhint %} - -A workspace is the current state of the request editors opened in the application. - -![Workspace area in Advanced REST Client](../.gitbook/assets/worspace-area.png) - -Every time a request property is changed or a response is ready a new state is stored by the application automatically in a file. Request property can be the method, URL, headers, or the payload but also Actions and request configuration. - -Historically this data was stored in a file in application home directory. Now, however, you have an option to save the workspace state to some other file you select. This file can be later opened by ARC and it restores the same sate. - -## Why to use workspaces? - -When you creating a tutorial or a documentation for your API you can create a workspace that contains all required configuration to run requests one-by-one. You can design the workspace as each tab represent next step in your tutorial. The workspace also contains configuration data like variables and application configuration that should be applied to a request when executing it. - -## Using workspaces - -### Prepare your workspace - -To start with a workspace just create a sequence of requests you want to share with your audience. It's just like regular use of ARC. You can design request actions and configure request behavior in the corresponding tabs of the request editor. - -If you make a request and the response is ready then the response is also added to the current state. - -{% hint style="warning" %} -ARC 14 does not allow to define workspace variables in application interface. Variables can be added by editing generated file. -{% endhint %} - -When ready go to Workspace menu and select Open workspace details. - -![Opening workspace details](../.gitbook/assets/image%20%2820%29.png) - -This opens a dialog that shows workspace metadata like description, version, and author information. Don't worry about not having any data just yet. - -![Empty workspace details](../.gitbook/assets/image%20%2822%29.png) - -The workspace details are for the target audience that gives additional context to the data included into the workspace. Remember, however, that this step is optional. - -Go ahead and click "Edit" button. It opens workspace details editor that allows you to enter the corresponding values. All input fields are optional. - -{% hint style="info" %} -The description field supports markdown. -{% endhint %} - -After filling the form the preview shows updated information instead "No data". - -![](../.gitbook/assets/image%20%2868%29.png) - -### Saving the workspace - -From the _Workspace_ menu select _Save as..._ option. - -![Woskace save as menu option](../.gitbook/assets/image%20%2861%29.png) - -This opens a regular save dialog. Select a location where the file should be stored. - -![Workspace save as dialog](../.gitbook/assets/image%20%2826%29.png) - -That's it. The workspace is now stored in the file you have requested. - -When you open the file you will see it's just a JSON file with a representation of the state: - -![Generated file contents](../.gitbook/assets/image%20%2836%29.png) - -You can change any of the properties in the JSON if needed. However if you make any change in the application UI the state is automatically stored to the file, unless you open other workspace file. - -### Opening workspace file - -From the _Workspace_ menu select _Open from file_ option. - -![Workspace open from file menu option](../.gitbook/assets/image%20%2845%29.png) - -This opens new ARC window with the same state as stored when the file was saved. - diff --git a/using-arc/your-first-api-call.md b/using-arc/your-first-api-call.md deleted file mode 100644 index dcf92db8..00000000 --- a/using-arc/your-first-api-call.md +++ /dev/null @@ -1,188 +0,0 @@ ---- -description: This guide describes how to make your first request to the API endpoint ---- - -# Your first API call - -## The request editor - -You will use the request panel to enter request properties like method, URL, headers, and the body. - -![Empty request panel](../.gitbook/assets/image%20%2842%29.png) - -### Request URL - -The request URL it is an API endpoint URL you want to connect to. The input field allows to provide any valid URL data, like, `https://api.domain.com/endpoint?param=value` - -![URL editor with url](../.gitbook/assets/image%20%2831%29.png) - -{% hint style="info" %} -The URL is passed to the HTTP client unprocessed to give you more control over request parameters. This means that special characters must be encoded before sending the request. -{% endhint %} - -#### URL editor - -The URL editor has an alternative view to provide URL data. It allows to define each part of the URL separately. It also has a convenient way of defining query parameters. - -![](../.gitbook/assets/image%20%2853%29.png) - -Query parameters can be added, removed, or disabled. - -You can add as much query parameters as you need. Names and values must be valid query parameter string. - -![Invalid parameters values](../.gitbook/assets/image%20%2859%29.png) - -Don't worry, when the application say that the parameter is invalid you can use "Encode URL" button to fix the problem. - -![Encoded correct values in the URL editor](../.gitbook/assets/image%20%2869%29.png) - -{% hint style="info" %} -Once encoded value will be encoded again producing invalid entry. When you want to encode values again, decode the values first and then encode. -{% endhint %} - -To remove query parameter just press the "X" button on the right-hand side of the parameters. - -You can also disable query parameter using the toggle button on the left-hand side. This option removes the parameter from the final URL but keeps it in the editor so you can test various scenarios. - -### Request method - -The method tells what kind of operation is to be performed on the resource. In REST methods describe type of the operation: - -* POST - create resource operation -* GET - read operation, like list resources, get a resource -* PUT, PATCH - update a resource -* DELETE - deletes a resource - -There are more less commonly used methods and Advanced REST Client support them all. You can even define custom method by selecting "custom" option in the drop down. - - - -![Custom HTTP method](../.gitbook/assets/image%20%282%29.png) - -{% hint style="warning" %} -Custom methods are allowed but some clients may not fully support them. -{% endhint %} - -### HTTP headers - -The headers are additional meta-information send to the server to inform it how to process the message. There are well defined request and response headers like `content-type` or `accept`. Your server, however, may require custom headers. The headers editor allows you to define this headers. - -{% hint style="info" %} -ARC does not generate any request headers with exception of `Host` header which is required to make a request. Unlike other HTTP clients, only headers that are defined in the editor are send to the server. -{% endhint %} - -By default ARC renders a form view with autofill options when defining headers. - -![Headers editor - form view](../.gitbook/assets/image%20%284%29.png) - -When a header is recognized as one of the standard header is renders a help icon that opens a description for the header. - -![Hint message for known header](../.gitbook/assets/image%20%2832%29.png) - -Similarly to query parameters editor, headers can be temporarily disabled to test various options. When the checkbox is unselected then the header value is kept in the editor but it is excluded from the request. - -For more advanced use you can switch to "Source view" which renders a text editor to provide header values manually. - -![Source view in headers editor](../.gitbook/assets/image%20%2852%29.png) - -The editor support suggestions for header names and values. - -### Request body - -Body is the message you want to send to the server. In RESTful APIs this is the resource you create or update. - -![JSON body editor](../.gitbook/assets/image%20%2818%29.png) - -{% hint style="info" %} -GET and HEAD methods cannot define a body on a request. Even though it is technically possible, clients probably won't work with such request. -{% endhint %} - -{% hint style="info" %} -You don't need to set Content-Length header. It is added automatically when preparing the message. When this header is defined in the headers list it will be used instead. This way you can test your server for invalid input. -{% endhint %} - -The body editor supports syntax highlighting for several content types like JSON and XML. Use the drop down type selector to switch between some popular media types. - -Form data editor can be a form based editor that allows you to enter and encode the data if needed. - -![x-www-urlencode media type editor](../.gitbook/assets/image%20%2824%29.png) - -Multipart values are also supported. The editor allows you to add both file and text part to the message. You need to provide a name of the part and the value \(either a text for text part or a file for file part\). Additionally you can define a media type for the text part. - -![Multipart data editor](../.gitbook/assets/image%20%2814%29.png) - -ARC takes care about `content-type` header for multipart data. It is generated automatically when sending the request to comply with multipart specification. - -{% hint style="danger" %} -Do not modify content-type header in the headers editor when using multipart data. When the "boundary" is not the same as in generated message then the request will fail. -{% endhint %} - -When your request is ready you can press the "send" button to initialize the request. This sends the request data to ARC's HTTP client which generates HTTP message, makes a connection, send the message, and awaits the response. - -Try it with this example request data - -``` -Method: POST -URL: https://httpbin.org/post -Headers: -Content-Type: application/json -Accept: application/json -x-custom-header: header value -Payload: -{ - "page": "test" -} -``` - -## The response view - -When the response is ready ARC renders a response view below the request panel. By default it renders information about response status, processing time, and the received message. - -![Response view](../.gitbook/assets/image%20%2833%29.png) - -In most cases the response is parsed and syntax is highlighted for your convenience. You can see the original message by pressing "Source view" button. - -![Source view in the response view](../.gitbook/assets/image%20%283%29.png) - -JSON response has additional option to render it in table view. It is an alternative way of presenting the data. - -![JSON data table](../.gitbook/assets/image%20%2817%29.png) - -Advanced REST Client collect detailed information about the request, response, and the process of receiving the response. Data like request and response headers, redirects, connection timings are available under "Details" panel. - -**Request headers** contains a final list of headers sent to the server. It also has a view that renders full HTTP message sent to the server. - -![](../.gitbook/assets/image%20%2838%29.png) - -In this case the HTTP client added Host, Connection, and Content-Length headers to manage the the connection process and inform the server about the content. - -The **response headers** contains a list of all headers received from the server. - -![Response headers](../.gitbook/assets/image%20%2864%29.png) - -{% hint style="success" %} -Cookies are processed like a web browser would process it. Cookies are stored in internal protected storage and applied to a request send to the same domain and path. -{% endhint %} - -The **redirects** panel renders a response for each redirect that happened during the request. It shows information where the request was redirect to, status code, and the list of headers. - -![](../.gitbook/assets/image%20%2825%29.png) - -{% hint style="info" %} -Only the final response is reported in the response body view. -{% endhint %} - -{% hint style="info" %} -Cookies are processed when redirecting the request as it would be for direct request. -{% endhint %} - -The **timings tab** renders detailed information about each part of the request process like DNS lookup, connecting, SSL negotiation, message sending, and receiving time. - -If the request was redirected this will render timing information for each redirect. - -![Timings panel with redirects](../.gitbook/assets/image%20%2858%29.png) - -{% hint style="info" %} -The reported timing in the main response view is for the last request in the redirects chain. The timing panel shows the total time for all requests. -{% endhint %} -