[
  {
    "path": ".github/workflows/test.yml",
    "content": "name: Test\n\non:\n  pull_request:\n  push:\n  workflow_dispatch:\n  schedule:\n    - cron: \"0 8 * * *\" # Every day at 8:00 UTC https://crontab.guru/#0_8_*_*_*\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - name: Install dependencies\n        run: npm ci\n      - name: Run prettier linting\n        run: npm run lint\n      - name: Run unit tests\n        run: npm test\n      - name: Run build\n        run: npm run build:prod\n      - name: Upload dist bundle\n        uses: actions/upload-artifact@v2\n        with:\n          name: test-build\n          path: dist\n      - name: Codecov Upload\n        uses: codecov/codecov-action@v1\n        with:\n          file: ./coverage/lcov.info\n"
  },
  {
    "path": ".gitignore",
    "content": ".idea/\n\n# Build\nbuild/*.js\n\n# Maps\nbuild/*.js.map\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Libs\nnode_modules\n\n# local coverage\ncoverage\n"
  },
  {
    "path": ".prettierrc",
    "content": "{\n  \"printWidth\": 120,\n  \"parser\": \"typescript\",\n  \"singleQuote\": true\n}\n"
  },
  {
    "path": ".vscode/extensions.json",
    "content": "{\n    \"recommendations\": [\n        \"esbenp.prettier-vscode\"\n    ]\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n    \"typescript.tsdk\": \"node_modules/typescript/lib\",\n    \"tslint.enable\": false,\n    \"search.exclude\": {\n        \"**/node_modules\": true,\n        \"**/bower_components\": true,\n        \"**/dist\": true\n    },\n    \"workbench.colorCustomizations\": {\n        \"activityBar.background\": \"#192963\",\n        \"titleBar.activeBackground\": \"#23398B\",\n        \"titleBar.activeForeground\": \"#FAFBFE\"\n    }\n}\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)\n\n## [1.0.24] - 2021-09-30\n\n- Updated `vscode-icons` to 11.6.0\n    - Over 200 new filenames, folders and extension\n    - Over 20 new icons\n\n## [1.0.23] - 2021-02-13\n\n- Updated `vscode-icons` to 11.1.0\n- Various improvements [#27](https://github.com/dderevjanik/github-vscode-icons/pull/27), thanks to [kidonng](https://github.com/kidonng)\n- Better github url detection [#26](https://github.com/dderevjanik/github-vscode-icons/pull/26), thanks to [kidonng](https://github.com/kidonng)\n- Test for queries [#24](https://github.com/dderevjanik/github-vscode-icons/pull/24), thanks to [s-weigand](https://github.com/s-weigand)\n- Vertically adjuested icons [#28](https://github.com/dderevjanik/github-vscode-icons/pull/30), thanks to [antoinerousseau](https://github.com/antoinerousseau)\n\n## [1.0.22] - 2020-06-30\n\n### Fixes\n\n- Fixed new github UI design [#21](https://github.com/dderevjanik/github-vscode-icons/issues/21)\n\n## [1.0.21] - 2020-06-20\n\n### Fixes\n\n- Fixed Infinite spinner issue [#13](https://github.com/dderevjanik/github-vscode-icons/issues/13) and [#17](https://github.com/dderevjanik/github-vscode-icons/issues/17), thanks to [s-weigand](https://github.com/s-weigand)\n\n## Changed\n\n- Updated `vscode-icons` to 10.1.1 [changelog](https://marketplace.visualstudio.com/items/vscode-icons-team.vscode-icons/changelog). Since last version (`9.3.0`), there are\n    - over 180 new filenames and extensions\n    - over 60 new folders\n    - 142 new icons and 51 changed\n\n## [1.0.20] - 2020-02-24\n\n### Fixes\n\n- Fixed [GH issue](https://github.com/dderevjanik/github-vscode-icons/issues/13)\n- Fixed [GH not displaying submodule](https://github.com/dderevjanik/github-vscode-icons/issues/11)\n\n## [1.0.19] - 2019-05-20\n\n### Fixes\n\n- Fixed (again) [issue with Refined Github](https://github.com/dderevjanik/github-vscode-icons/issues/8)\n\n### Changed\n\n- Added support [for symlink directory](https://github.com/dderevjanik/github-vscode-icons/issues/9) (`octicon-file-symlink-directory`)\n- Added better error reporting\n    - In console, you can see better error messages\n    - If icon cannot be set, leave loading icon\n\n## [1.0.18] - 2019-04-26\n\n### Fixes\n\n- Fixed [issue with Refined Github](https://github.com/dderevjanik/github-vscode-icons/issues/8)\n\n## [1.0.17] - 2019-04-23\n\n### Changed\n\n- Updated `vscode-icons` to 8.6.0 [changelog](https://marketplace.visualstudio.com/items/robertohuertasm.vscode-icons/changelog)[changelog]\n- Feature: Support for `coverage` folder. ([@robertohuertasm](https://github.com/robertohuertasm) in [#2015](https://github.com/vscode-icons/vscode-icons/pull/2015))\n- Feature: Support for `azure-pipelines` folder. ([@robertohuertasm](https://github.com/robertohuertasm) in [#2014](https://github.com/vscode-icons/vscode-icons/pull/2014))\n- Feature: Support for `interfaces` folder. ([@KingDarBoja](https://github.com/KingDarBoja) & [@robertohuertasm](https://github.com/robertohuertasm) in [#2013](https://github.com/vscode-icons/vscode-icons/pull/2013))\n- Feature: Support for `notifications & event` folders. ([@KingDarBoja](https://github.com/KingDarBoja) in [#2012](https://github.com/vscode-icons/vscode-icons/pull/2012))\n- Feature: Support for `theme` folder. ([@KingDarBoja](https://github.com/KingDarBoja) in [#2011](https://github.com/vscode-icons/vscode-icons/pull/2011))\n- Feature: Support for `services` folder. ([@KingDarBoja](https://github.com/KingDarBoja) in [#2010](https://github.com/vscode-icons/vscode-icons/pull/2010))\n- Feature: Support for `middleware` folder. ([@KingDarBoja](https://github.com/KingDarBoja) in [#2009](https://github.com/vscode-icons/vscode-icons/pull/2009))\n- Feature: Support for `mock` folder. ([@JimiC](https://github.com/JimiC) in [#2008](https://github.com/vscode-icons/vscode-icons/pull/2008))\n- Feature: Support for `blueprint` folder. ([@JimiC](https://github.com/JimiC) in [#2007](https://github.com/vscode-icons/vscode-icons/pull/2007))\n- Feature: Support for `controllers` folder. ([@JimiC](https://github.com/JimiC) in [#2006](https://github.com/vscode-icons/vscode-icons/pull/2006))\n- Enhancement: Updated `Google Cloud` folder icon. ([@JimiC](https://github.com/JimiC) in [#2005](https://github.com/vscode-icons/vscode-icons/pull/2005))\n- Feature: Support for `certificates` folder. ([@JimiC](https://github.com/JimiC) & [@robertohuertasm](https://github.com/robertohuertasm) in [#2004](https://github.com/vscode-icons/vscode-icons/pull/2004))\n- Feature: Support for `minikube` folder. ([@JimiC](https://github.com/JimiC) in [#2003](https://github.com/vscode-icons/vscode-icons/pull/2003))\n- Feature: Support for `entities` folder. ([@JimiC](https://github.com/JimiC) in [#2002](https://github.com/vscode-icons/vscode-icons/pull/2002))\n- Feature: Support for `repo` folder. ([@JimiC](https://github.com/JimiC) in [#2001](https://github.com/vscode-icons/vscode-icons/pull/2001))\n- Feature: Support for `sounds` folder. ([@JimiC](https://github.com/JimiC) in [#2000](https://github.com/vscode-icons/vscode-icons/pull/2000))\n- Feature: Support for more `config` names for folders. ([@JimiC](https://github.com/JimiC) in [#1999](https://github.com/vscode-icons/vscode-icons/pull/1999))\n- Feature: Support for `Stories` folder. ([@JimiC](https://github.com/JimiC) in [#1998](https://github.com/vscode-icons/vscode-icons/pull/1998))\n- Feature: Support for `Stories` folder. ([@JimiC](https://github.com/JimiC) in [#1997](https://github.com/vscode-icons/vscode-icons/pull/1997))\n- Feature: Support for `_locales` folder. ([@JimiC](https://github.com/JimiC) in [#1996](https://github.com/vscode-icons/vscode-icons/pull/1996))\n- Feature: Support for `cmake` folder. ([@JimiC](https://github.com/JimiC) in [#1995](https://github.com/vscode-icons/vscode-icons/pull/1995))\n- Feature: Support for `Gulp` folder. ([@JimiC](https://github.com/JimiC) in [#1994](https://github.com/vscode-icons/vscode-icons/pull/1994))\n- Feature: Support for `Electron` folder. ([@JimiC](https://github.com/JimiC) in [#1993](https://github.com/vscode-icons/vscode-icons/pull/1993))\n- Feature: Support for `Cuda` folder. ([@JimiC](https://github.com/JimiC) in [#1992](https://github.com/vscode-icons/vscode-icons/pull/1992))\n- Feature: Support for `vsixmanifest` folder. ([@JimiC](https://github.com/JimiC) in [#1991](https://github.com/vscode-icons/vscode-icons/pull/1991))\n- Feature: Support for `cli` folder. ([@KingDarBoja](https://github.com/KingDarBoja) & [@JimiC](https://github.com/JimiC) in [#1990](https://github.com/vscode-icons/vscode-icons/pull/1990))\n- Feature: Support for `Buildkite` folder. ([@KingDarBoja](https://github.com/KingDarBoja) in [#1989](https://github.com/vscode-icons/vscode-icons/pull/1989))\n- Feature: Support for `Grunt` folder. ([@KingDarBoja](https://github.com/KingDarBoja) in [#1988](https://github.com/vscode-icons/vscode-icons/pull/1988))\n- Feature: Support for `windows, linux & macos` folders. ([@KingDarBoja](https://github.com/KingDarBoja) in [#1986](https://github.com/vscode-icons/vscode-icons/pull/1986))\n- Feature: Support for `modules` folder. ([@KingDarBoja](https://github.com/KingDarBoja) in [#1985](https://github.com/vscode-icons/vscode-icons/pull/1985))\n- Feature: Support for `Sentry`. ([@KingDarBoja](https://github.com/KingDarBoja) in [#1984](https://github.com/vscode-icons/vscode-icons/pull/1984))\n- Feature: Support for `JSS`. ([@KingDarBoja](https://github.com/KingDarBoja) in [#1983](https://github.com/vscode-icons/vscode-icons/pull/1983))\n- Feature: Support for `Moleculer`. ([@icebob](https://github.com/icebob) in [#1980](https://github.com/vscode-icons/vscode-icons/pull/1980))\n- Feature: Support for `APL`. ([@KingDarBoja](https://github.com/KingDarBoja) in [#1978](https://github.com/vscode-icons/vscode-icons/pull/1978))\n\n## [1.0.16] - 2019-04-12\n\n### Changed\n\n- Updated  `vscode-icons` to 8.5.0 [changelog](https://marketplace.visualstudio.com/items/robertohuertasm.vscode-icons/changelog)\n- Over 122 new icons\n\n## [1.0.14] - 2018-09-12\n\n### Fixes\n\n- vscode-icons not showing after latest GH update\n\n## [1.0.13] - 2018-08-02\n\n### Changed\n\n- Updated `vscode-icons` to 7.25.0 [changelog](https://marketplace.visualstudio.com/items/robertohuertasm.vscode-icons/changelog)\n\n### Fixes\n\n- Filenames like `Jenkinsfile`, which are defined by vscode language extension, now\nworks\n\n## [1.0.12] - 2018-06-07\n\n### Changed\n\n- Updated `vscode-icons` to 7.23.0, added 15 new icons [changelog](https://marketplace.visualstudio.com/items/robertohuertasm.vscode-icons/changelog)\n\n## [1.0.11] - 2018-05-02\n\n### Fixes\n\n- Showing loading icon instead of file icon in Gitlab\n- Loading icon in Bitbucket\n\n## [1.0.10] - 2018-03-23\n\n### Changed\n\n- Updated `vscode-icons` to 7.22.0, added 13 new icons  [changelog](https://marketplace.visualstudio.com/items/robertohuertasm.vscode-icons/changelog)\n\n## [1.0.9] - 2018-03-18\n\n### Changed\n\n- Updated `vscode-icons` to 7.21.0 [changelog](https://marketplace.visualstudio.com/items/robertohuertasm.vscode-icons/changelog)\n\n## [1.0.8] - 2018-02-18\n\n### Added\n\n- Support for [gitlab.com](https://about.gitlab.com/)\n    - Display icons in Repo Tree\n- Support for [bitbucket.org](https://bitbucket.org/)\n    - Display icons in Repo Tree\n- Support for [pastebin.com](https://pastebin.com/)\n    - Display icons in user profile\n- Support for [sourceforge.com](https://sourceforge.net)\n    - Display icons in project files\n\n### Changed\n\n- Updated `vscode-icons` to 7.19.0, added 25 new icons, read more at vscode-icons [changelog](https://marketplace.visualstudio.com/items/robertohuertasm.vscode-icons/changelog)\n- Changed structure of project to be more abstract for several web-based GIT hostings (Github, Gitlab, Bitbucket and Gist) and even for Pastebin\n\n### Fixes\n\n- [Github] no icon for submodule\n- [Github] temporally fixed bug with `symlink` files\n- [Github] not showing file icons\n\n## [1.0.6] - 2017-10-29\n\n- updated `vscode-icons` to 7.17.0, added 24 new icons, read more at vscode-icons [changelog](https://github.com/vscode-icons/vscode-icons/blob/master/CHANGELOG.md#7170-october-28-2017)\n- changed orange logo back to blue one, read more about this change at [vscode blogpost](https://code.visualstudio.com/blogs/2017/10/24/theicon)\n\n## [1.0.5] - 2017-10-24\n\n### Changed\n\n- `vscode-icons` updated to `7.16.0`, added 25 new icons, read more at vscode-icons [changelog](https://github.com/vscode-icons/vscode-icons/blob/master/CHANGELOG.md#7160-october-22-2017)\n\n## [1.0.4] - 2017-10-20\n\n### Changed\n\n- Blue logo to orange one, read more about this change at [vscode blogpost](https://code.visualstudio.com/updates/v1_17#_new-visual-studio-code-logo)\n- Name of extension from `vscode-github-icons` to `github-vscode-icons` in chrome store\n- Project Structure, now is more readable and better self-explanatory\n- Better performance (~25%) thanks to optimizing `getIcons` functions\n\n### Added\n\n- Support for filenames with several extensions like `content.js.map`, `index.test.tsx`, etc\n- Opera browser extension\n- Loading icon when `vscode-icons` is loading\n- Test for *getIcons* functions\n\n## [1.0.3] - 2017-10-10\n\n### Fixes\n\n- Showing light version of icons should work correctly\n\n## [1.0.2] - 2017-10-08\n\n### Fixes\n\n- Icons are now showed properly in github repo tree\n\n### Added\n\n- Travis Support\n\n### Changed\n\n- Default theme for icons is `light` now (before it was `dark`)\n- [vscode-icons](https://github.com/vscode-icons/vscode-icons) version changed to `7.15.0`, see [CHANGELOG.md](https://github.com/vscode-icons/vscode-icons/blob/master/CHANGELOG.md)\n\n## [1.0.1] - 2017-10-06\n\n### Added\n\n- Showing icons on `gist.github`\n- This changelog file\n- `CREDITS.md`\n\n### Changed\n\n- Script is running on proper GH pages (so it'll no trying to render file icons on account settings page)\n\n## [1.0.0] - 2017-10-03\n\n- Initial version\n"
  },
  {
    "path": "CREDITS.md",
    "content": "# Credits\n\n## Contributors\n\n- [dderevjanik](https://github.com/dderevjanik)\n- [s-weigand](https://github.com/s-weigand)\n- [kidonng](https://github.com/kidonng)\n- [antoinerousseau](https://github.com/antoinerousseau)\n\n## Projects\n\n- [vscode-icons](https://github.com/vscode-icons/vscode-icons) for providing beautiful icons and their definitions\n- [refined-github](https://github.com/sindresorhus/refined-github/blob/master/src/libs/page-detect.js) for github page detect functions\n- [hide-files-on-github](https://github.com/sindresorhus/hide-files-on-github) for `pjax:end` event listener + observerFragment\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Daniel Derevjanik\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Github-vscode-icons\n\n[![Build Status](https://travis-ci.org/dderevjanik/github-vscode-icons.svg?branch=master)](https://travis-ci.org/dderevjanik/github-vscode-icons)\n[![Known Vulnerabilities](https://snyk.io/test/github/dderevjanik/github-vscode-icons/badge.svg)](https://snyk.io/test/github/dderevjanik/github-vscode-icons)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\nChrome webstore: ![Chrome Web Store](https://img.shields.io/chrome-web-store/rating/hoccpcefjcgnabbmojbfoflggkecmpgd)\n\n**Download:**\n\n[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/hoccpcefjcgnabbmojbfoflggkecmpgd)](https://chrome.google.com/webstore/detail/vscode-github-icons/hoccpcefjcgnabbmojbfoflggkecmpgd?utm_source=github)\n[![Mozilla Add-on](https://img.shields.io/amo/v/github-vscode-icons)](https://addons.mozilla.org/en-GB/firefox/addon/github-vscode-icons/)\n\n**Supported websites:**\n![github-favicon](build/favicons/github-favicon.ico) Github (also Gist),\n![gitlab-favicon](build/favicons/gitlab-favicon.ico) Gitlab,\n<!-- ![bitbucket-favicon](build/favicons/bitbucket-favicon.ico) Bitbucket (WIP), -->\n![pastebin-favicon](build/favicons/pastebin-favicon.ico) Pastebin,\n![sourceforge-favicon](./build/favicons/sourceforge-favicon.ico) SourceForge\n\n## About\n\nExtension for browser, which displays [vscode-icons](https://github.com/vscode-icons/vscode-icons) in Github (including Gist), Gitlab and Bitbucket repositories. It also displays `vscode-icons` in user's Pastebin list and in Sourceforge projects.\n\nIf you're familiar with beautiful extension for vscode called `vscode-icons`, then you know that you need also one for Web. Brain will recognize different icons much faster and when you're spending several hours per day on websites like github, gitlab or bitbucket, this extension is for you.\nIf you look at github repository with displayed `vscode-icons`, you'll get instant overview of used technologies by their specific icons (*look at screenshots below*).\n\nGo to [changelog](./CHANGELOG.md) to see latest changes\n\n## Screenshots\n\n![screen_repo](./docs/screenshots/repo_screens.png)\n\n## Development\n\nTo stay updated with `vscode-icons`, you need to extract compiled `icons.json` from `vscode-icons` everytime when it updates.\nAfter that, you need run script called `npm run preprocess`, which will generate definition chunks (categorized icons) from `icons.json` for easier and faster work with them.\n\n## Related\n\n- [vscode-icons](https://github.com/vscode-icons/vscode-icons) extension for vscode\n- [vscode-icons-js](https://github.com/dderevjanik/vscode-icons-js) File specific icons from vscode [vscode-icons](https://github.com/vscode-icons/vscode-icons) extension inspired by file-icons-js\n"
  },
  {
    "path": "build/background.html",
    "content": "<html>\n    <script type=\"text/javascript\" src=\"background.js\"></script>\n</html>"
  },
  {
    "path": "build/content.css",
    "content": "/**\n * Github\n */\n\ntd.icon {\n    min-width: 26px; /* make sure that icon will not blink after replacing old one */\n}\n\ntd.icon > .octicon {\n    display: none; /* don't show old icon */\n    width: 16px;\n}\ntd.icon > .spinner {\n    display: block !important; /* show loading icon while replacing old one */\n}\n\ntd.icon > img  {\n    /* copied from original icon */\n    position: relative;\n    top: 3px;\n    margin-top: -3px;\n    margin-left: -2px;\n}\n\n.js-path-segment > a > img {\n    vertical-align: middle;\n}\n\n.js-path-segment:before {\n    /* min-width: 16px;\n    display: inline-block;\n    content: \"\\00a0 \"; */\n}\n\n.final-path > img {\n    vertical-align: middle;\n}\n\n/* diff icons - WIP */\n\n.vsi-icon-diff {\n    vertical-align: middle;\n}\n\n.vscode-icon {\n    vertical-align: -3px;\n    height: 16px;\n}\n\n/**\n * BitBucket\n */\n.bb-icon {\n    height: 24px !important;\n    vertical-align: text-top;\n}\n/*\n\n.aui-iconfont-devtools-folder-closed:before {\n    width: 16px;\n    height: 16px;\n    background-image: url('chrome-extension://__MSG_@@extension_id__/images/animation.gif');\n    background-size: 16px 16px;\n}\n\n.aui-iconfont-devtools-submodule:before {\n    width: 16px;\n    height: 16px;\n    background-image: url('chrome-extension://__MSG_@@extension_id__/images/animation.gif');\n    background-size: 16px 16px;\n}\n\n.aui-iconfont-devtools-file:before {\n    width: 16px;\n    height: 16px;\n    background-image: url('chrome-extension://__MSG_@@extension_id__/images/animation.gif');\n    background-size: 16px 16px;\n}\n\n.aui-iconfont-devtools-folder-closed:before {\n    content: \"\" !important;\n}\n\n.aui-iconfont-devtools-submodule:before {\n    content: \"\" !important;\n}\n\n.aui-iconfont-devtools-file:before {\n    content: \"\" !important;\n} */\n\n/**\n * GitLab\n */\n.tree-item > td > .fa.fa-folder.fa-fw {\n    width: 18px;\n    height: 14px;\n    background-image: url('chrome-extension://__MSG_@@extension_id__/images/animation.gif');\n    background-size: 18px 14px;\n}\n\n.tree-item > td > .fa.fa-file-text-o.fa-fw {\n    width: 18px;\n    height: 14px;\n    background-image: url('chrome-extension://__MSG_@@extension_id__/images/animation.gif');\n    background-size: 18px 14px;\n}\n\n.tree-item > td > .fa.fa-file-folder-o.fa-fw {\n    width: 18px;\n    height: 14px;\n    background-image: url('chrome-extension://__MSG_@@extension_id__/images/animation.gif');\n    background-size: 18px 14px;\n}\n\n.tree-item > td > .fa.fa-folder.fa-fw::before {\n    content: \"\";\n}\n\n.tree-item > td > .fa.fa-file-text-o.fa-fw::before {\n    content: \"\";\n}\n\n.tree-item > td > .fa.fa-file-folder-o.fa-fw::before {\n    content: \"\";\n}\n\n/**\n * Pastebin\n */\n.vsi-pb {\n    margin: 10px 7px 0 -5px\n}\n\n/**\n * Source Forge\n */\n.vscode-icon.sf-icon {\n    margin-right: 0.5rem;\n    width:  20px;\n    height: 20px;\n}\n"
  },
  {
    "path": "build/manifest.json",
    "content": "{\n  \"manifest_version\": 2,\n  \"name\": \"github-vscode-icons\",\n  \"description\": \"This extension shows a VS Code icons in Github Repositories\",\n  \"icons\": {\n    \"16\": \"icon16.png\",\n    \"48\": \"icon48.png\",\n    \"128\": \"icon128.png\"\n  },\n  \"version\": \"1.24\",\n  \"author\": \"Daniel Derevjanik <daniel.derevjanik@gmail.com>\",\n  \"offline_enabled\": true,\n  \"browser_action\": {\n    \"default_icon\": {\n      \"48\": \"icon48.png\",\n      \"128\": \"icon128.png\"\n    }\n  },\n  \"background\": {\n    \"scripts\": [\n      \"background.js\"\n    ],\n    \"persistent\": false\n  },\n  \"web_accessible_resources\": [\n    \"icons/*.svg\",\n    \"images/*.gif\"\n  ],\n  \"content_scripts\": [\n    {\n      \"css\": [\n        \"content.css\"\n      ],\n      \"matches\": [\n        \"*://*/*\"\n      ],\n      \"js\": [\n        \"content.js\"\n      ],\n      \"run_at\": \"document_idle\"\n    }\n  ],\n  \"permissions\": [\n    \"storage\",\n    \"*://bitbucket.org/*\",\n    \"*://github.com/*\",\n    \"*://gist.github.com/*\",\n    \"*://gitlab.com/*\",\n    \"*://pastebin.com/*\",\n    \"*://sourceforge.net/*\"\n  ],\n  \"-ms-preload\": {\n    \"backgroundScript\": \"backgroundScriptsAPIBridge.js\",\n    \"contentScript\": \"contentScriptsAPIBridge.js\"\n  }\n}"
  },
  {
    "path": "build/popup.css",
    "content": "html {\n    width: 300px;\n}\n\nbody {\n    width: 300px;\n    padding: 10px;\n}\n\n.vsi-icon {\n    width: 16px;\n    height: 16px;\n}\n"
  },
  {
    "path": "build/popup.html",
    "content": "<!DOCTYPE html>\n<html>\n\n<head>\n  <title>Surfable: Command Palette</title>\n  <link rel=\"stylesheet\" href=\"popup.css\">\n  <link rel=\"stylesheet\" href=\"spectre.min.css\">\n</head>\n\n<body>\n  <div id=\"app\"></div>\n  <script src=\"popup.js\"></script>\n</body>\n\n</html>\n"
  },
  {
    "path": "dist/.gitignore",
    "content": "*\n!.gitignore\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"github-vscode-icons\",\n  \"version\": \"1.0.24\",\n  \"description\": \"show vscode-icons in github repository\",\n  \"main\": \"index.js\",\n  \"private\": true,\n  \"scripts\": {\n    \"script:make-zip\": \"ts-node ./scripts/make-dist-zip.script.ts\",\n    \"clean\": \"rimraf build/*.map\",\n    \"dev\": \"npm run build:dev\",\n    \"manifest:firefox\": \"ts-node ./scripts/create-manifest.ts\",\n    \"manifest:chrome\": \"BROWSER=CHROME ts-node ./scripts/create-manifest.ts\",\n    \"manifest:edge\": \"BROWSER=EDGE ts-node ./scripts/create-manifest.ts\",\n    \"manifest:dev\": \"NODE_ENV=development npm run manifest:chrome\",\n    \"build:firefox\": \"BROWSER=FIREFOX run-s manifest:firefox script:make-zip\",\n    \"build:chrome\": \"BROWSER=CHROME run-s manifest:chrome script:make-zip\",\n    \"build:edge\": \"BROWSER=EDGE run-s manifest:edge script:make-zip\",\n    \"build:dev\": \"NODE_ENV=development; webpack -w --mode development\",\n    \"build:prod\": \"NODE_ENV=production; webpack --mode production --config webpack.config.js; run-s clean build:firefox build:chrome build:edge\",\n    \"dist\": \"npm run build:prod\",\n    \"lint\": \"run-s lint:packages lint:json lint:typings\",\n    \"lint:packages\": \"prettier --check ./packages/**/*.{ts,d.ts,tsx}\",\n    \"lint:json\": \"prettier --parser json --check ./{*,tests/*}.json\",\n    \"lint:typings\": \"prettier --check ./typings/**/*.d.ts\",\n    \"format\": \"run-s format:packages format:json format:typings\",\n    \"format:packages\": \"prettier --write ./packages/**/*.{ts,d.ts,tsx}\",\n    \"format:json\": \"prettier --parser json --write ./{*,tests/*}.json\",\n    \"format:typings\": \"prettier --write ./typings/**/*.d.ts\",\n    \"test\": \"jest --coverage\"\n  },\n  \"jest\": {\n    \"preset\": \"jest-puppeteer\",\n    \"globals\": {\n      \"extensionsToTreatAsEsm\": [\n        \".ts\"\n      ],\n      \"ts-jest\": {\n        \"tsconfig\": \"tests/tsconfig.tests.json\",\n        \"useESM\": true\n      }\n    },\n    \"transform\": {\n      \"^.+(\\\\.(ts|tsx)|select-dom/.+\\\\.js)$\": \"ts-jest\"\n    },\n    \"transformIgnorePatterns\": [\n      \"/node_modules/(?!select-dom)\"\n    ],\n    \"testRegex\": \"(/tests/.*\\\\.(test|spec))\\\\.(ts|tsx|js)$\",\n    \"moduleFileExtensions\": [\n      \"ts\",\n      \"tsx\",\n      \"js\"\n    ],\n    \"coveragePathIgnorePatterns\": [\n      \"/node_modules/\",\n      \"/tests/\"\n    ],\n    \"collectCoverageFrom\": [\n      \"packages/**/*.{js,ts,tsx}\"\n    ]\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/dderevjanik/github-vscode-icons\"\n  },\n  \"author\": {\n    \"email\": \"daniel.derevjanik@gmail.com\",\n    \"name\": \"Daniel Derevjanik\"\n  },\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"https://github.com/dderevjanik/github-vscode-icons/issues\"\n  },\n  \"homepage\": \"https://github.com/dderevjanik/github-vscode-icons#readme\",\n  \"dependencies\": {\n    \"fastdom\": \"^1.0.10\",\n    \"github-url-detection\": \"^2.0.5\",\n    \"react\": \"^17.0.1\",\n    \"react-dom\": \"^17.0.1\",\n    \"select-dom\": \"^7.1.0\",\n    \"selector-observer\": \"^2.1.6\",\n    \"vscode-icons-js\": \"^11.6.0\"\n  },\n  \"devDependencies\": {\n    \"@types/archiver\": \"^5.1.0\",\n    \"@types/chalk\": \"^0.4.31\",\n    \"@types/chrome\": \"0.0.130\",\n    \"@types/jest\": \"^26.0.20\",\n    \"@types/jest-environment-puppeteer\": \"^4.4.1\",\n    \"@types/jsdom\": \"^16.2.6\",\n    \"@types/node\": \"^14.14.27\",\n    \"@types/node-fetch\": \"^2.5.8\",\n    \"@types/puppeteer\": \"^5.4.3\",\n    \"@types/react\": \"^17.0.2\",\n    \"@types/react-dom\": \"^17.0.1\",\n    \"archiver\": \"^5.2.0\",\n    \"chalk\": \"^4.1.0\",\n    \"cross-env\": \"^7.0.3\",\n    \"jest\": \"^27.0.0-next.7\",\n    \"jest-puppeteer\": \"^4.4.0\",\n    \"jsdom\": \"^16.4.0\",\n    \"node-fetch\": \"^2.6.1\",\n    \"npm-run-all\": \"^4.1.5\",\n    \"prettier\": \"^2.2.1\",\n    \"puppeteer\": \"^7.1.0\",\n    \"rimraf\": \"^3.0.2\",\n    \"ts-jest\": \"^27.0.0-next.10\",\n    \"ts-loader\": \"^8.0.17\",\n    \"ts-node\": \"^9.1.1\",\n    \"typescript\": \"^4.1.5\",\n    \"webpack\": \"^5.21.2\",\n    \"webpack-cli\": \"^4.5.0\"\n  }\n}\n"
  },
  {
    "path": "packages/ManifesFirefox.ts",
    "content": "import { createChromeManifest } from './ManifestChrome';\n\nexport const createFirefoxManifest = () => {\n  const manifest = createChromeManifest();\n  delete manifest['offline_enabled'];\n  delete manifest['background']['persistent'];\n  return manifest;\n};\n"
  },
  {
    "path": "packages/ManifestChrome.ts",
    "content": "/**\n * This template is used to generate 'build/manifest.json' by `npm run manifest`\n * In order to test some features only in 'dev' environment\n */\nconst manifest = {\n  manifest_version: 2,\n  name: 'github-vscode-icons',\n  description: 'This extension shows a VS Code icons in Github Repositories',\n  icons: {\n    '128': 'icon128.png',\n    '48': 'icon48.png',\n    '16': 'icon16.png',\n  },\n  version: '1.24',\n  author: 'Daniel Derevjanik <daniel.derevjanik@gmail.com>',\n  offline_enabled: true,\n  browser_action: {\n    default_icon: {\n      '128': 'icon128.png',\n      '48': 'icon48.png',\n    },\n  },\n  background: {\n    scripts: ['background.js'],\n    persistent: false,\n  },\n  web_accessible_resources: ['icons/*.svg', 'images/*.gif'],\n  content_scripts: [\n    {\n      css: ['content.css'],\n      matches: ['*://*/*'],\n      js: ['content.js'],\n      run_at: 'document_idle',\n    },\n  ],\n  permissions: [\n    'storage',\n    '*://bitbucket.org/*',\n    '*://github.com/*',\n    '*://gist.github.com/*',\n    '*://gitlab.com/*',\n    '*://pastebin.com/*',\n    '*://sourceforge.net/*',\n  ],\n};\n\nexport const createChromeManifest = () => {\n  if (process.env.NODE_ENV === 'development') {\n    // FOR DEVELOPMENT;\n    (manifest.browser_action as any)['default_popup'] = 'popup.html';\n  }\n  return manifest;\n};\n"
  },
  {
    "path": "packages/ManifestEdge.ts",
    "content": "/**\n * In order to make this extension works on Microsoft Edge, we need to edit chrome manifest\n */\nimport { createChromeManifest } from './ManifestChrome';\n\nexport const createEdgeManifest = () => {\n  const manifest = createChromeManifest();\n  /**\n   * API Bridge polyfill\n   * https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/porting-chrome-extensions\n   */\n  // @ts-ignore\n  manifest['-ms-preload'] = {\n    backgroundScript: 'backgroundScriptsAPIBridge.js',\n    contentScript: 'contentScriptsAPIBridge.js',\n  };\n  return manifest;\n};\n"
  },
  {
    "path": "packages/background/Background.ts",
    "content": "import { LocalStorage, initialStorage, getStorage, setStorage, resetStorage } from '../common/LocalStorage';\nimport { onMessage, sendMessage } from '../common/Messenger';\n\nonMessage(async (message, _, sendResponse) => {\n  switch (message.type) {\n    case 'STORAGE_GET': {\n      const storage = await getStorage();\n      sendResponse(storage);\n      break;\n    }\n    case 'STORAGE_SET': {\n      const storage = message.storage;\n      setStorage(storage);\n      break;\n    }\n    case 'STORAGE_RESET': {\n      resetStorage();\n      break;\n    }\n  }\n});\n"
  },
  {
    "path": "packages/common/HostData.ts",
    "content": "import { SupportedHostings } from './SupportedHostings';\n\ntype HostData = {\n  /**\n   * Hosting full name\n   */\n  fullName: string;\n  /**\n   * Favicon url\n   */\n  favicon: string;\n  /**\n   * Used to match host url\n   */\n  host: string;\n};\n\nconst hostData: { [H in SupportedHostings]: HostData } = {\n  bitbucket: {\n    fullName: 'Bitbucket',\n    favicon: 'bitbucket-favicon.ico',\n    host: 'bitbucket',\n  },\n  github: {\n    fullName: 'Github',\n    favicon: 'github-favicon.ico',\n    host: 'github',\n  },\n  githubgist: {\n    fullName: 'Github Gist',\n    favicon: 'github-favicon.ico',\n    host: 'gist.github',\n  },\n  gitlab: {\n    fullName: 'Gitlab',\n    favicon: 'gitlab-favicon.ico',\n    host: 'gitlab',\n  },\n  pastebin: {\n    fullName: 'Pastebin',\n    favicon: 'pastebin-favicon.ico',\n    host: 'pastebin',\n  },\n  sourceforge: {\n    fullName: 'Sourceforge',\n    favicon: 'sourceforge-favicon.ico',\n    host: 'sourceforge',\n  },\n};\n\nexport function getHostData(host: SupportedHostings) {\n  return hostData[host];\n}\n"
  },
  {
    "path": "packages/common/LocalStorage.ts",
    "content": "/**\n * This file is accessible only from extension's Background\n */\nimport { SupportedHostings } from './SupportedHostings';\n\nexport type LocalStorage = {\n  /**\n   * Extension version\n   */\n  version: string;\n  /**\n   * List of showed/hidden icons for specific hosts\n   */\n  showIcons: { [Hosting in SupportedHostings]: boolean };\n};\n\nexport const initialStorage: LocalStorage = {\n  version: chrome.runtime.getManifest().version,\n  showIcons: {\n    github: true,\n    githubgist: false,\n    gitlab: true,\n    bitbucket: true,\n    pastebin: false,\n    sourceforge: true,\n  },\n};\n\nexport function getStorage(): Promise<LocalStorage> {\n  return new Promise((resolve, reject) => {\n    if (chrome.storage === undefined) {\n      reject(new Error('Storage is not accessible from this part of extension'));\n    }\n    chrome.storage.local.get((storage) => {\n      const store = storage as LocalStorage;\n      if (store.version === undefined) {\n        // When version doesn't exists, it means that storage is empty and user is running\n        // extension for first time, so use initial storage\n        chrome.storage.local.set(initialStorage);\n        resolve(initialStorage);\n      }\n      resolve(store);\n    });\n  });\n}\n\nexport function setStorage(storage: LocalStorage) {\n  if (chrome.storage === undefined) {\n    throw new Error('Storage is not accessible from this part of extension');\n  }\n  chrome.storage.local.set(storage);\n}\n\nexport function resetStorage() {\n  if (chrome.storage === undefined) {\n    throw new Error('Storage is not accessible from this part of extension');\n  }\n  chrome.storage.local.set(initialStorage);\n  return initialStorage;\n}\n"
  },
  {
    "path": "packages/common/Messenger.ts",
    "content": "import { LocalStorage } from './LocalStorage';\n\ntype CreateMessage<Type extends string, Payload extends object> = { type: Type } & Payload;\n\ntype Message =\n  | CreateMessage<'STORAGE_SET', { storage: LocalStorage }>\n  | CreateMessage<'STORAGE_GET', {}>\n  | CreateMessage<'STORAGE_RESET', {}>;\n\nexport function sendMessage(message: Message) {\n  return new Promise((resolve, _) => {\n    chrome.runtime.sendMessage(message, (response) => {\n      resolve(response);\n    });\n  });\n}\n\nexport function onMessage(callback: (message: Message, sender: any, sendResponse: (response?: any) => void) => void) {\n  chrome.runtime.onMessage.addListener((internalMessage, internalSender, internalSendResponse) => {\n    callback(internalMessage, internalSender, internalSendResponse);\n    return true;\n  });\n}\n"
  },
  {
    "path": "packages/common/SupportedHostings.ts",
    "content": "export type SupportedHostings = 'github' | 'githubgist' | 'gitlab' | 'bitbucket' | 'pastebin' | 'sourceforge';\n"
  },
  {
    "path": "packages/content/Content.ts",
    "content": "// Internal\nimport { LocalStorage } from '../common/LocalStorage';\nimport { sendMessage } from '../common/Messenger';\nimport { getHostData } from '../common/HostData';\nimport { SupportedHostings } from '../common/SupportedHostings';\nimport { showIconsForHosting } from './utils/showIconsForHosting';\n// Supported pages\nimport { initGithub } from './pages/GitHub';\nimport { initGitLab } from './pages/GitLab';\nimport { initBitBucket } from './pages/BitBucket';\nimport { initGistGithub } from './pages/GistGitHub';\nimport { initPasteBin } from './pages/PasteBin';\nimport { initSourceForge } from './pages/SourceForge';\n\nconst hostLocation = location.host;\n\n(async function () {\n  const storage = (await sendMessage({ type: 'STORAGE_GET' })) as LocalStorage;\n  const hosts = Object.keys(storage.showIcons) as SupportedHostings[];\n  for (const host of hosts) {\n    const hostingData = getHostData(host);\n    const isShowIconsTurnedOn = storage.showIcons[host];\n    if (isShowIconsTurnedOn && hostLocation.includes(hostingData.host)) {\n      showIconsForHosting(host);\n      break; // we don't need to iterate over another hostings when already displayed icons\n    }\n  }\n})();\n"
  },
  {
    "path": "packages/content/data/PastebinSyntaxesToIcon.json",
    "content": "{\n  \"4CS\": \"\",\n  \"6502 ACME Cross Assembler\": \"file_type_assembly.svg\",\n  \"6502 Kick Assembler\": \"file_type_assembly.svg\",\n  \"6502 TASM/64TASS\": \"file_type_assembly.svg\",\n  \"ABAP\": \"\",\n  \"ActionScript\": \"file_type_actionscript.svg\",\n  \"ActionScript 3\": \"file_type_actionscript.svg\",\n  \"Ada\": \"\",\n  \"AIMMS\": \"\",\n  \"ALGOL 68\": \"\",\n  \"Apache Log\": \"\",\n  \"AppleScript\": \"file_type_applescript.svg\",\n  \"APT Sources\": \"\",\n  \"ARM\": \"\",\n  \"ASM (NASM)\": \"file_type_assembly.svg\",\n  \"ASP\": \"file_type_asp.svg\",\n  \"Asymptote\": \"\",\n  \"autoconf\": \"\",\n  \"Autohotkey\": \"file_type_autohotkey.svg\",\n  \"AutoIt\": \"file_type_autoit.svg\",\n  \"Avisynth\": \"\",\n  \"Awk\": \"\",\n  \"BASCOM AVR\": \"\",\n  \"Bash\": \"file_type_shell.svg\",\n  \"Basic4GL\": \"\",\n  \"Batch\": \"file_type_shell.svg\",\n  \"BibTeX\": \"\",\n  \"Blitz Basic\": \"\",\n  \"Blitz3D\": \"\",\n  \"BlitzMax\": \"\",\n  \"BNF\": \"\",\n  \"BOO\": \"\",\n  \"BrainFuck\": \"\",\n  \"C\": \"file_type_c.svg\",\n  \"C (WinAPI)\": \"file_type_c.svg\",\n  \"C for Macs\": \"file_type_c.svg\",\n  \"C Intermediate Language\": \"file_type_c.svg\",\n  \"C#\": \"file_type_csharp.svg\",\n  \"C++\": \"file_type_cpp.svg\",\n  \"C++ (WinAPI)\": \"file_type_cpp.svg\",\n  \"C++ (with Qt extensions)\": \"file_type_cpp.svg\",\n  \"C: Loadrunner\": \"file_type_c.svg\",\n  \"CAD DCL\": \"\",\n  \"CAD Lisp\": \"\",\n  \"Ceylon\": \"\",\n  \"CFDG\": \"\",\n  \"ChaiScript\": \"\",\n  \"Chapel\": \"\",\n  \"Clojure\": \"file_type_clojure.svg\",\n  \"Clone C\": \"\",\n  \"Clone C++\": \"\",\n  \"CMake\": \"file_type_cmake.svg\",\n  \"COBOL\": \"file_type_cobol.svg\",\n  \"CoffeeScript\": \"file_type_coffeescript.svg\",\n  \"ColdFusion\": \"\",\n  \"CSS\": \"file_type_css.svg\",\n  \"Cuesheet\": \"\",\n  \"D\": \"file_type_dlang.svg\",\n  \"Dart\": \"file_type_dartlang.svg\",\n  \"DCL\": \"\",\n  \"DCPU-16\": \"\",\n  \"DCS\": \"\",\n  \"Delphi\": \"\",\n  \"Delphi Prism (Oxygene)\": \"\",\n  \"Diff\": \"file_type_diff.svg\",\n  \"DIV\": \"\",\n  \"DOT\": \"\",\n  \"E\": \"\",\n  \"Easytrieve\": \"\",\n  \"ECMAScript\": \"file_type_light_js.svg\",\n  \"Eiffel\": \"\",\n  \"Email\": \"\",\n  \"EPC\": \"\",\n  \"Erlang\": \"\",\n  \"Euphoria\": \"\",\n  \"F#\": \"file_type_fsharp.svg\",\n  \"Falcon\": \"\",\n  \"Filemaker\": \"\",\n  \"FO Language\": \"\",\n  \"Formula One\": \"\",\n  \"Fortran\": \"file_type_fortran.svg\",\n  \"FreeBasic\": \"\",\n  \"FreeSWITCH\": \"\",\n  \"GAMBAS\": \"\",\n  \"Game Maker\": \"file_type_gamemaker.svg\",\n  \"GDB\": \"\",\n  \"Genero\": \"\",\n  \"Genie\": \"\",\n  \"GetText\": \"\",\n  \"Go\": \"file_type_go.svg\",\n  \"Groovy\": \"file_type_groovy.svg\",\n  \"GwBasic\": \"\",\n  \"Haskell\": \"file_type_haskell.svg\",\n  \"Haxe\": \"file_type_haxe.svg\",\n  \"HicEst\": \"\",\n  \"HQ9 Plus\": \"\",\n  \"HTML\": \"file_type_html.svg\",\n  \"HTML 5\": \"file_type_html.svg\",\n  \"Icon\": \"\",\n  \"IDL\": \"\",\n  \"INI file\": \"file_type_light_ini.svg\",\n  \"Inno Script\": \"\",\n  \"INTERCAL\": \"\",\n  \"IO\": \"\",\n  \"ISPF Panel Definition\": \"\",\n  \"J\": \"\",\n  \"Java\": \"file_type_java.svg\",\n  \"Java 5\": \"file_type_java.svg\",\n  \"JavaScript\": \"file_type_light_js.svg\",\n  \"JCL\": \"\",\n  \"jQuery\": \"file_type_light_js.svg\",\n  \"JSON\": \"file_type_light_json.svg\",\n  \"Julia\": \"file_type_julia.svg\",\n  \"KiXtart\": \"\",\n  \"Kotlin\": \"file_type_kotlin.svg\",\n  \"Latex\": \"file_type_light_tex.svg\",\n  \"LDIF\": \"\",\n  \"Liberty BASIC\": \"\",\n  \"Linden Scripting\": \"\",\n  \"Lisp\": \"file_type_lisp.svg\",\n  \"LLVM\": \"\",\n  \"Loco Basic\": \"\",\n  \"Logtalk\": \"\",\n  \"LOL Code\": \"\",\n  \"Lotus Formulas\": \"\",\n  \"Lotus Script\": \"\",\n  \"LScript\": \"\",\n  \"Lua\": \"file_type_lua.svg\",\n  \"M68000 Assembler\": \"\",\n  \"MagikSF\": \"\",\n  \"Make\": \"file_type_makefile.svg\",\n  \"MapBasic\": \"\",\n  \"Markdown\": \"file_type_markdown.svg\",\n  \"MatLab\": \"file_type_matlab.png\",\n  \"mIRC\": \"\",\n  \"MIX Assembler\": \"\",\n  \"Modula 2\": \"\",\n  \"Modula 3\": \"\",\n  \"Motorola 68000 HiSoft Dev\": \"\",\n  \"MPASM\": \"\",\n  \"MXML\": \"\",\n  \"MySQL\": \"file_type_sql.svg\",\n  \"Nagios\": \"\",\n  \"NetRexx\": \"\",\n  \"newLISP\": \"\",\n  \"Nginx\": \"\",\n  \"Nimrod\": \"\",\n  \"None\": \"\",\n  \"NullSoft Installer\": \"\",\n  \"Oberon 2\": \"\",\n  \"Objeck Programming Langua\": \"\",\n  \"Objective C\": \"file_type_objectivec.svg\",\n  \"OCalm Brief\": \"file_type_ocaml.svg\",\n  \"OCaml\": \"file_type_ocaml.svg\",\n  \"Octave\": \"\",\n  \"Open Object Rexx\": \"\",\n  \"OpenBSD PACKET FILTER\": \"\",\n  \"OpenGL Shading\": \"\",\n  \"Openoffice BASIC\": \"\",\n  \"Oracle 11\": \"\",\n  \"Oracle 8\": \"\",\n  \"Oz\": \"\",\n  \"ParaSail\": \"\",\n  \"PARI/GP\": \"\",\n  \"Pascal\": \"file_type_delphi.svg\",\n  \"Pawn\": \"\",\n  \"PCRE\": \"\",\n  \"Per\": \"\",\n  \"Perl\": \"file_type_perl.svg\",\n  \"Perl 6\": \"file_type_perl.svg\",\n  \"PHP\": \"file_type_php.svg\",\n  \"PHP Brief\": \"file_type_php.svg\",\n  \"Pic 16\": \"\",\n  \"Pike\": \"\",\n  \"Pixel Bender\": \"\",\n  \"PL/I\": \"\",\n  \"PL/SQL\": \"file_type_sql.svg\",\n  \"PostgreSQL\": \"file_type_sql.svg\",\n  \"PostScript\": \"\",\n  \"POV-Ray\": \"\",\n  \"Power Shell\": \"file_type_powershell.svg\",\n  \"PowerBuilder\": \"\",\n  \"ProFTPd\": \"\",\n  \"Progress\": \"\",\n  \"Prolog\": \"file_type_prolog.svg\",\n  \"Properties\": \"\",\n  \"ProvideX\": \"\",\n  \"Puppet\": \"\",\n  \"PureBasic\": \"\",\n  \"PyCon\": \"\",\n  \"Python\": \"file_type_python.svg\",\n  \"Python for S60\": \"file_type_python.svg\",\n  \"q/kdb+\": \"\",\n  \"QBasic\": \"\",\n  \"QML\": \"\",\n  \"R\": \"file_type_r.svg\",\n  \"Racket\": \"\",\n  \"Rails\": \"\",\n  \"RBScript\": \"\",\n  \"REBOL\": \"\",\n  \"REG\": \"\",\n  \"Rexx\": \"\",\n  \"Robots\": \"\",\n  \"RPM Spec\": \"\",\n  \"Ruby\": \"file_type_ruby.svg\",\n  \"Ruby Gnuplot\": \"file_type_ruby.svg\",\n  \"Rust\": \"file_type_rust.svg\",\n  \"SAS\": \"\",\n  \"Scala\": \"file_type_scala.svg\",\n  \"Scheme\": \"\",\n  \"Scilab\": \"file_type_scilab.svg\",\n  \"SCL\": \"\",\n  \"SdlBasic\": \"\",\n  \"Smalltalk\": \"\",\n  \"Smarty\": \"file_type_smarty.svg\",\n  \"SPARK\": \"\",\n  \"SPARQL\": \"\",\n  \"SQF\": \"\",\n  \"SQL\": \"file_type_sql.svg\",\n  \"StandardML\": \"\",\n  \"StoneScript\": \"\",\n  \"SuperCollider\": \"\",\n  \"Swift\": \"file_type_swift.svg\",\n  \"SystemVerilog\": \"\",\n  \"T-SQL\": \"\",\n  \"TCL\": \"\",\n  \"Tera Term\": \"\",\n  \"thinBasic\": \"\",\n  \"TypoScript\": \"\",\n  \"Unicon\": \"\",\n  \"UnrealScript\": \"\",\n  \"UPC\": \"\",\n  \"Urbi\": \"\",\n  \"Vala\": \"\",\n  \"VB.NET\": \"file_type_vb.svg\",\n  \"VBScript\": \"file_type_vb.svg\",\n  \"Vedit\": \"\",\n  \"VeriLog\": \"\",\n  \"VHDL\": \"\",\n  \"VIM\": \"\",\n  \"Visual Pro Log\": \"\",\n  \"VisualBasic\": \"file_type_vb.svg\",\n  \"VisualFoxPro\": \"\",\n  \"WhiteSpace\": \"\",\n  \"WHOIS\": \"\",\n  \"Winbatch\": \"\",\n  \"XBasic\": \"\",\n  \"XML\": \"file_type_xml.svg\",\n  \"Xorg Config\": \"\",\n  \"XPP\": \"\",\n  \"YAML\": \"file_type_light_yaml.svg\",\n  \"Z80 Assembler\": \"\",\n  \"ZXBasic\": \"\"\n}\n"
  },
  {
    "path": "packages/content/pages/BitBucket.ts",
    "content": "import { getIconForFile, getIconForFolder, getIconForOpenFolder, getIconUrl, DEFAULT_ROOT } from '../utils/Icons';\nimport { getFileIcon, getFolderIcon } from '../utils/Dev';\nimport { isBitBucketRepo } from '../utils/PageDetect';\nimport { mutate } from 'fastdom';\n\nexport const QUERY_FILE_TABLE_ROWS = 'table[data-qa=\"repository-directory\"] > tbody > tr';\nexport const QUERY_ICONS_TO_REPLACE = `${QUERY_FILE_TABLE_ROWS} a svg`;\n\nfunction showRepoTreeIcons() {\n  if (!isBitBucketRepo()) return;\n  if (!document.querySelector(QUERY_FILE_TABLE_ROWS) || !document.querySelector(QUERY_ICONS_TO_REPLACE)) return;\n  const treeItems = document.querySelectorAll<HTMLTableRowElement>(QUERY_FILE_TABLE_ROWS);\n  for (let i = 0; i < treeItems.length; i++) {\n    /**\n     * [TR:\n     *  [TD: [DIV: [A: [SPAN: [SVG: icon]]]]]\n     *  [TD: [A: name]]\n     * ]\n     */\n    const itemEl = treeItems[i] as HTMLDivElement;\n    const iconAnchorEl = itemEl.firstChild!.firstChild!.firstChild! as HTMLAnchorElement;\n    const iconEl = iconAnchorEl.firstChild! as HTMLSpanElement;\n    const nameAnchorEl = itemEl.children[1].firstChild! as HTMLAnchorElement;\n    if (document.querySelector(`${QUERY_FILE_TABLE_ROWS}:nth-child(${i + 1}) img.vscode-icon.bb-icon`)) {\n      continue;\n    }\n\n    const newIconEl = document.createElement('img');\n    newIconEl.setAttribute('class', 'vscode-icon bb-icon');\n\n    const replaceNodeIfExists = (newIconEl: HTMLImageElement) => {\n      // used to prevent replacing of none existing nodes\n      if (!document.querySelector(`${QUERY_FILE_TABLE_ROWS}:nth-child(${i + 1}) img.vscode-icon.bb-icon`)) {\n        iconAnchorEl.replaceChild(newIconEl, iconEl);\n      }\n    };\n\n    if (iconAnchorEl.href === '..') {\n      // ..\n      continue;\n    } else if (iconAnchorEl.href.endsWith('/')) {\n      // FOLDER\n      const name = nameAnchorEl.innerText.toLowerCase();\n      const iconPath = getFolderIcon(name);\n      mutate(() => {\n        newIconEl.setAttribute('src', getIconUrl(iconPath));\n        replaceNodeIfExists(newIconEl);\n      });\n    } else if (itemEl.className.includes('subreponame')) {\n      // TODO: SUBMODULE\n      const iconEl = itemEl.firstElementChild! as HTMLSpanElement;\n      mutate(() => {\n        newIconEl.setAttribute('src', getIconUrl(getIconForFolder('submodules')));\n        replaceNodeIfExists(newIconEl);\n      });\n    } else {\n      // FILE\n      const name = nameAnchorEl.innerText.toLowerCase();\n      const iconPath = getFileIcon(name);\n      mutate(() => {\n        newIconEl.setAttribute('src', getIconUrl(iconPath));\n        replaceNodeIfExists(newIconEl);\n      });\n    }\n  }\n}\nfunction update(e?: any) {\n  showRepoTreeIcons();\n}\n\nexport function initBitBucket() {\n  update();\n  window.addEventListener('message', update);\n}\n"
  },
  {
    "path": "packages/content/pages/GistGitHub.ts",
    "content": "import { isGist } from 'github-url-detection';\nimport { getIconForFile, getIconUrl } from '../utils/Icons';\nimport { mutate } from 'fastdom';\n\nexport const QUERY_FILE_INFO = '.file-info';\n\nconst showGistIcons = async () => {\n  const fileInfos = document.querySelectorAll(QUERY_FILE_INFO);\n  for (let i = 0; i < fileInfos.length; i++) {\n    /**\n     * [DIV:\n     *  [SPAN: [SVG: icon]],\n     *  [A: [STRONG: name]]\n     * ]\n     */\n    const fileInfo = fileInfos[i] as HTMLDivElement;\n    const gistName = (fileInfo.lastElementChild!.firstElementChild as HTMLSpanElement).innerText;\n    const iconPath = getIconForFile(gistName);\n    mutate(() => {\n      fileInfo.firstElementChild!.innerHTML = `<img src=\"${getIconUrl(iconPath)}\" alt=\"icon\" class=\"vscode-icon\">`;\n    });\n  }\n};\n\nfunction update(e?: any) {\n  if (isGist()) {\n    showGistIcons();\n  }\n}\n\nexport function initGistGithub() {\n  update();\n}\n"
  },
  {
    "path": "packages/content/pages/GitHub.ts",
    "content": "import {\n  getIconForFolder,\n  getIconForOpenFolder,\n  getIconForFile,\n  getIconUrl,\n  DEFAULT_ROOT_OPENED,\n  DEFAULT_ROOT,\n  DEFAULT_FILE,\n} from '../utils/Icons';\nimport { isCommit, isRepoRoot, isSingleFile, isRepoTree } from 'github-url-detection';\nimport { isHistoryForFile } from '../utils/PageDetect';\nimport { mutate } from 'fastdom';\nimport { getFileIcon, getFolderIcon } from '../utils/Dev';\nimport { observe } from 'selector-observer';\n\nexport const QUERY_FILE_TABLE_ITEMS = 'div.js-navigation-container>div.js-navigation-item';\nexport const QUERY_PATH_SEGMENTS = '.repository-content .js-path-segment a';\nexport const QUERY_PJAX_CONTAINER = 'main';\nexport const QUERY_LAST_PATH_SEGMENT = '.final-path';\n\n/**\n * Show icon for path segments\n */\nfunction showIconsForSegments() {\n  if (!((!isRepoRoot() && isRepoTree()) || isSingleFile() || isHistoryForFile())) return;\n  const aSegments = document.querySelectorAll<HTMLAnchorElement>(QUERY_PATH_SEGMENTS);\n  const firstSegment = aSegments[0];\n  const finalSegment = document.querySelector(QUERY_LAST_PATH_SEGMENT) as HTMLSpanElement | undefined;\n\n  // first segment has always root folder icon\n  if (firstSegment) {\n    const spanEl = firstSegment.children[0] as HTMLSpanElement;\n    spanEl.innerHTML = `<img src=\"${getIconUrl(DEFAULT_ROOT_OPENED)}\" alt=\"icon\" class=\"vscode-icon\"><span> ${\n      spanEl.innerText\n    }</span>`;\n  }\n\n  // check if final segment is file or folder\n  if (finalSegment) {\n    const iconPath = window.location.href.includes('/blob/')\n      ? getIconForFile(finalSegment.innerText)\n      : getIconForOpenFolder(finalSegment.innerText);\n    finalSegment.innerHTML = `<img src=\"${getIconUrl(iconPath)}\" alt=\"icon\" class=\"vscode-icon\"><span> ${\n      finalSegment.innerText\n    }</span>`;\n  }\n\n  // segments between first and last are always folders\n  for (let i = 1; i < aSegments.length; i++) {\n    const spanEl = aSegments[i];\n    const aEl = spanEl.firstChild as HTMLAnchorElement;\n    const iconPath = getIconForOpenFolder(aEl.innerText);\n    aEl.innerHTML = `<img src=\"${getIconUrl(iconPath)}\" alt=\"icon\" class=\"vscode-icon\"><span> ${aEl.innerText}</span>`;\n  }\n}\n\n/**\n * Show icons for repository files\n */\nfunction showRepoTreeIcons(rowEl: Element) {\n  const iconEl = rowEl.children[0] as HTMLTableCellElement;\n  const iconSVGEl = iconEl.querySelector<SVGElement>('.octicon');\n  if (!iconSVGEl) {\n    // ... (up)\n    return;\n  }\n  /**\n   * <div role=\"row\">\n   *  <div><svg class={{icon}}/></div>,\n   *  <div><span><a>{{name}}</a></span></div>,\n   *  <div><span><a>{{message}}</a></span></div>,\n   *  <div><span>{time}</span><s/div>,\n   * </div>\n   */\n  const contentEl = rowEl.children[1] as Element;\n\n  const linkToEl = contentEl.firstElementChild.firstElementChild as HTMLAnchorElement;\n\n  let iconPath = '';\n  if (iconSVGEl) {\n    const iconSVGClassName = iconSVGEl.className.baseVal;\n    if (iconSVGClassName.includes('octicon-file-text') || iconSVGClassName.includes('octicon-file ')) {\n      iconPath = getFileIcon(linkToEl.innerText.toLowerCase());\n    } else if (iconSVGClassName.includes('octicon-file-directory')) {\n      const name = linkToEl.innerText.toLowerCase();\n      iconPath = getFolderIcon(name.split('/').shift());\n    } else if (iconSVGClassName.includes('octicon-file-submodule')) {\n      iconPath = getIconForFolder('submodules');\n    } else if (iconSVGClassName.includes('octicon-file-symlink-file')) {\n      iconPath = DEFAULT_FILE;\n    } else if (iconSVGClassName.includes('octicon-file-symlink-directory')) {\n      iconPath = DEFAULT_FILE;\n    } else {\n      console.error(`Unknown filetype: \"${iconSVGClassName}\", please report`);\n      return;\n    }\n    const x = mutate(() => {\n      iconSVGEl.outerHTML = `<img src=\"${getIconUrl(\n        iconPath\n      )}\" class=\"vscode-icon ${iconSVGClassName}\" alt=\"icon\" width=\"16\" height=\"16\">`;\n    });\n  }\n  // else {\n  //   console.error(`Error during parsing: \"td.icon > svg.octoicon\" doesnt exists for ${i}. row`);\n  // }\n}\n\nfunction update(e?: any) {\n  showIconsForSegments();\n  if (isCommit()) {\n    // showDiffIcon();\n  }\n}\n\nexport function initGithub() {\n  // Update on fragment update\n  observe(QUERY_FILE_TABLE_ITEMS, {\n    add(rowEl) {\n      showRepoTreeIcons(rowEl);\n    },\n  });\n  update();\n  document.addEventListener('pjax:end', update); // Update on page change\n}\n"
  },
  {
    "path": "packages/content/pages/GitLab.ts",
    "content": "import { getIconForFile, getIconForFolder, getIconForOpenFolder, getIconUrl } from '../utils/Icons';\nimport { isGitLabRepo } from '../utils/PageDetect';\nimport { mutate } from 'fastdom';\nimport { getFolderIcon, getFileIcon } from '../utils/Dev';\n\nexport const QUERY_TREE_ITEMS = '.tree-item';\n\nfunction showRepoTreeIcons() {\n  const treeItems = document.querySelectorAll(QUERY_TREE_ITEMS);\n  for (let i = 0; i < treeItems.length; i++) {\n    /**\n     * [TR:\n     *  [TD: [[I: icon], [A: [SPAN: name]]]],\n     *  [TD: [SPAN: [A: message]]],\n     *  [TD: [TIME: ago]]\n     * ]\n     */\n    const itemEl = treeItems[i];\n    const newIconEl = document.createElement('img');\n\n    const iconAndNameEls = itemEl.firstElementChild!;\n    const iconEl = iconAndNameEls.firstElementChild!;\n    const nameEl = iconAndNameEls.lastElementChild as HTMLAnchorElement;\n\n    const name = nameEl.innerText.toLowerCase();\n    if (i === 0 && name === '..') {\n      continue;\n    }\n    const iconPath = nameEl.href.indexOf('/tree/') > 0 ? getFolderIcon(name) : getFileIcon(name);\n\n    mutate(() => {\n      newIconEl.setAttribute('src', getIconUrl(iconPath));\n      newIconEl.setAttribute('class', 'vscode-icon');\n      iconAndNameEls.replaceChild(newIconEl, iconEl);\n    });\n  }\n}\n\nfunction update(e?: any) {\n  if (isGitLabRepo()) {\n    showRepoTreeIcons();\n  }\n}\n\nexport function initGitLab() {\n  update();\n}\n"
  },
  {
    "path": "packages/content/pages/PasteBin.ts",
    "content": "import { getIconForPBSyntax, getIconUrl, DEFAULT_FILE } from '../utils/Icons';\nimport { isPastebinUserList, isPasteOpen } from '../utils/PageDetect';\nimport { mutate } from 'fastdom';\n\nconst QUERY_PASTEBIN_ITEMS = '.maintable>tbody>tr';\nconst QUERY_PASTEBIN_PASTE = '#code_buttons>span:last-child';\n\nfunction showIconsForFiles() {\n  const pastes = document.querySelectorAll(QUERY_PASTEBIN_ITEMS);\n  // skip first tr, which is header\n  for (let i = 1; i < pastes.length; i++) {\n    /**\n     * [TR:\n     *  [TD: [[IMAGE: icon], [A: name]]],\n     *  [TD: added],\n     *  [TD: expires],\n     *  [TD: hits],\n     *  [TD: [A: syntax]],\n     *  [TD: ?]\n     * ]\n     */\n    const item = pastes[i];\n\n    const iconAndNameEl = item.firstElementChild as HTMLTableDataCellElement;\n    const iconEl = iconAndNameEl.firstElementChild as HTMLImageElement;\n\n    const syntaxEl = item.childNodes[9] as HTMLAnchorElement;\n    const syntaxName = syntaxEl.innerText;\n\n    const iconPath = getIconForPBSyntax(syntaxName);\n\n    const newIconEl = document.createElement('img');\n    mutate(() => {\n      newIconEl.setAttribute('src', getIconUrl(iconPath));\n      newIconEl.setAttribute('class', 'vscode-icon vsi-pb');\n\n      iconAndNameEl.replaceChild(newIconEl, iconEl);\n    });\n  }\n}\n\nfunction showIconForPaste() {\n  // TODO:\n}\n\nconst domLoaded = new Promise((resolve) => {\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', resolve);\n  } else {\n    resolve(null);\n  }\n});\n\nfunction update(e?: any) {\n  if (isPastebinUserList) {\n    showIconsForFiles();\n  } else if (isPasteOpen) {\n    showIconForPaste();\n  }\n}\n\nexport function initPasteBin() {\n  update();\n}\n"
  },
  {
    "path": "packages/content/pages/SourceForge.ts",
    "content": "import { getIconForFile, getIconForFolder, getIconUrl } from '../utils/Icons';\nimport { isSourceForgeFiles } from '../utils/PageDetect';\nimport { mutate } from 'fastdom';\nimport { getFolderIcon, getFileIcon } from '../utils/Dev';\n\nexport const QUERY_SOURCEFORGE_ITEMS = '#files_list>tbody>tr';\n\nfunction showIconsForFiles() {\n  const items = document.querySelectorAll(QUERY_SOURCEFORGE_ITEMS);\n  for (let i = 0; i < items.length; i++) {\n    const item = items[i];\n\n    const newIconEl = document.createElement('img');\n    newIconEl.setAttribute('class', 'vscode-icon sf-icon');\n    const iconAndNameEl = item.firstElementChild.firstElementChild as HTMLTableHeaderCellElement;\n\n    const isFolder = item.className.includes('folder');\n    if (isFolder) {\n      /**\n       * [TR:\n       *  [TH: [A: [SVG: icon], [SPAN: folderName]]],\n       *  [TD: [ABBR: date]],\n       *  [TD: size],\n       *  [TD: [DIV: Populated by JS], [DIV: [A: chart]]],\n       * ]\n       */\n\n      const iconEl = iconAndNameEl.firstElementChild as SVGAElement;\n      const nameEl = iconAndNameEl.lastElementChild as HTMLAnchorElement;\n      const name = nameEl.innerText.toLowerCase();\n      const iconPath = getFolderIcon(name);\n      mutate(() => {\n        newIconEl.setAttribute('src', getIconUrl(iconPath));\n        iconAndNameEl.replaceChild(newIconEl, iconEl);\n      });\n    } else {\n      /**\n       * [TR:\n       *  [TH: [A: [SVG: icon]]],\n       *  [TD: [ABBR: date]],\n       *  [TD: size],\n       *  [TD: [DIV: Populated by JS], [DIV: [A: chart]]],\n       * ]\n       */\n\n      const nameEl = iconAndNameEl.firstElementChild as HTMLAnchorElement;\n      const name = nameEl.innerText.toLowerCase();\n      const iconPath = getFileIcon(name);\n      mutate(() => {\n        newIconEl.setAttribute('src', getIconUrl(iconPath));\n        iconAndNameEl.insertBefore(newIconEl, nameEl);\n      });\n    }\n  }\n}\n\nfunction update(e?: any) {\n  if (isSourceForgeFiles()) {\n    showIconsForFiles();\n  }\n}\n\nexport function initSourceForge() {\n  update();\n}\n"
  },
  {
    "path": "packages/content/utils/Dev.ts",
    "content": "import * as VSCJS from 'vscode-icons-js';\n\nexport const getFolderIcon =\n  process.env.NODE_ENV === 'production'\n    ? VSCJS.getIconForFolder\n    : (folderName: string): string => {\n        const folderIcon = VSCJS.getIconForFolder(folderName);\n        if (folderIcon === VSCJS.DEFAULT_FOLDER) {\n          save('FOLDER', folderName);\n        }\n        return folderIcon;\n      };\n\nexport const getFileIcon =\n  process.env.NODE_ENV === 'production'\n    ? VSCJS.getIconForFile\n    : (filename: string): string => {\n        const fileIcon = VSCJS.getIconForFile(filename);\n        if (fileIcon === VSCJS.DEFAULT_FILE) {\n          save('FILE', filename);\n        }\n        return fileIcon;\n      };\n\ntype Items = {\n  folders: {\n    [folderName: string]: number;\n  };\n  files: {\n    [fileName: string]: number;\n  };\n};\n\n/**\n * Save name of file/folder that doesn't have an icon\n */\nexport const save = (type: 'FOLDER' | 'FILE', name: string) => {\n  console.log('tracking: ', type, name);\n  const allItemsStr = localStorage.getItem('items');\n  if (allItemsStr) {\n    const items = JSON.parse(allItemsStr) as Items;\n    const names = type === 'FOLDER' ? items.folders : items.files;\n    if (name in names) {\n      names[name] = names[name] + 1;\n    } else {\n      names[name] = 1;\n    }\n    localStorage.setItem('items', JSON.stringify(items));\n  } else {\n    const items = { folders: {}, files: {} } as Items;\n    const names = type === 'FOLDER' ? items.folders : items.files;\n    names[name] = 1;\n    localStorage.setItem('items', JSON.stringify(items));\n  }\n};\n\n/**\n * Load name of file/folder that doesn't have an icon\n */\nexport const load = (): Items => {\n  const allItemsStr = localStorage.getItem('items');\n  if (allItemsStr) {\n    return JSON.parse(allItemsStr);\n  } else {\n    return {\n      files: {},\n      folders: {},\n    };\n  }\n};\n"
  },
  {
    "path": "packages/content/utils/Icons.ts",
    "content": "type NAME_TO_ICON = { [name: string]: string };\nexport {\n  getIconForFile,\n  getIconForFolder,\n  getIconForOpenFolder,\n  DEFAULT_FILE,\n  DEFAULT_FOLDER,\n  DEFAULT_FOLDER_OPENED,\n  DEFAULT_ROOT_OPENED,\n  DEFAULT_ROOT,\n} from 'vscode-icons-js';\nimport { DEFAULT_FILE } from 'vscode-icons-js';\n\nconst PBSyntaxesToIcon = require('../data/PastebinSyntaxesToIcon.json') as NAME_TO_ICON;\n\n/**\n * Retrieve url of icon within chrome\n */\nexport const getIconUrl = (iconFileName: string) => chrome.runtime.getURL('icons/' + iconFileName);\n\n/**\n * Get icon for a pastebin syntaxes\n * @desc list of supported syntaxes https://pastebin.com/languages\n * @param syntaxName name of syntax to icon for\n * @return icon filename\n */\nexport function getIconForPBSyntax(syntaxName: string) {\n  const syntaxIcon = PBSyntaxesToIcon[syntaxName];\n  if (syntaxIcon !== undefined && syntaxIcon !== '') {\n    return syntaxIcon;\n  }\n  return DEFAULT_FILE;\n}\n"
  },
  {
    "path": "packages/content/utils/PageDetect.ts",
    "content": "import * as select from 'select-dom';\nimport { isRepo, utils } from 'github-url-detection';\n\nexport const isHistoryForFile = () => isRepo() && /^\\/commits\\/[0-9a-f]{5,40}\\/.+/.test(utils.getRepoPath());\n\n/**\n * BitBucket related detections\n */\nexport const isBitBucketRepo = () => location.href.indexOf('bitbucket.org/') > 0;\n\n/**\n * GitLab related detections\n */\nexport const isGitLabRepo = () => select.exists('.tree-content-holder');\n\n/**\n * Pastebin related detections\n */\nexport const isPastebinUserList = () =>\n  location.href.indexOf('pastebin.com/u/') > 0 && select.exists('table.maintable');\n\nexport const isPasteOpen = () => select.exists('#code_frame2');\n\n/**\n * SourceForge related detections\n */\nexport const isSourceForgeFiles = () => select.exists('#files_list');\n"
  },
  {
    "path": "packages/content/utils/showIconsForHosting.ts",
    "content": "import { SupportedHostings } from '../../common/SupportedHostings';\nimport { initBitBucket } from '../pages/BitBucket';\nimport { initGistGithub } from '../pages/GistGitHub';\nimport { initGithub } from '../pages/GitHub';\nimport { initGitLab } from '../pages/GitLab';\nimport { initPasteBin } from '../pages/PasteBin';\nimport { initSourceForge } from '../pages/SourceForge';\n\n/**\n * @param host - will show icons on page for host\n */\nexport function showIconsForHosting(host: SupportedHostings) {\n  const funcsToShowIcons: { [H in SupportedHostings]: () => void } = {\n    bitbucket: initBitBucket,\n    githubgist: initGistGithub,\n    github: initGithub,\n    gitlab: initGitLab,\n    pastebin: initPasteBin,\n    sourceforge: initSourceForge,\n  };\n  funcsToShowIcons[host]();\n}\n"
  },
  {
    "path": "packages/popup/Popup.tsx",
    "content": "import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { LocalStorage } from '../common/LocalStorage';\nimport { sendMessage } from '../common/Messenger';\nimport { getHostData } from '../common/HostData';\n\ntype State = {\n  storage: LocalStorage;\n  isSomethingChanged: boolean;\n};\n\ntype Props = {\n  storage: LocalStorage;\n};\n\nclass Popup extends React.Component<Props, State> {\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      storage: props.storage,\n      isSomethingChanged: false,\n    };\n  }\n\n  handleToggleClick = (hosting: keyof LocalStorage['showIcons']) => {\n    const prevStorage = this.state.storage;\n    const newStorage: LocalStorage = {\n      ...prevStorage,\n      showIcons: {\n        ...prevStorage.showIcons,\n        [hosting]: !prevStorage.showIcons[hosting],\n      },\n    };\n    sendMessage({ type: 'STORAGE_SET', storage: newStorage });\n    this.setState({\n      storage: newStorage,\n      isSomethingChanged: true,\n    });\n  };\n\n  handleResetButton = async () => {\n    const defaultState = (await sendMessage({ type: 'STORAGE_RESET' })) as LocalStorage;\n    this.setState({\n      storage: defaultState,\n    });\n  };\n\n  render() {\n    const hostings = Object.keys(this.props.storage.showIcons) as (keyof LocalStorage['showIcons'])[];\n    const changedText = this.state.isSomethingChanged ? (\n      <p style={{ color: 'orange' }}>\n        <i>In order to see changes on pages, please reload them using refresh button</i>\n      </p>\n    ) : null;\n    return (\n      <div id=\"settings\">\n        <h3>display icons for:</h3>\n        <div>\n          {hostings.map((hosting, index) => {\n            const hostData = getHostData(hosting);\n            return (\n              <div\n                key={index}\n                className=\"form-group\"\n                style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}\n              >\n                <label className=\"form-checkbox\">\n                  {hostData.fullName}\n                  <input\n                    type=\"checkbox\"\n                    checked={this.state.storage.showIcons[hosting]}\n                    onChange={(_: any) => this.handleToggleClick(hosting)}\n                  />\n                  <i className=\"form-icon\" />\n                </label>\n                <img className=\"vsi-icon\" src={chrome.runtime.getURL(`favicons/${hostData.favicon}`)} />\n              </div>\n            );\n          })}\n          {changedText}\n        </div>\n        {/* <button onClick={this.handleResetButton}>Reset</button> */}\n      </div>\n    );\n  }\n}\n\n(async function () {\n  const storage = (await sendMessage({ type: 'STORAGE_GET' })) as LocalStorage;\n  ReactDOM.render(<Popup storage={storage} />, document.getElementById('app') as HTMLDivElement);\n})();\n"
  },
  {
    "path": "scripts/create-manifest.ts",
    "content": "/**\n * Compress build/ folder to create archive which will be consumed by browser\n */\nimport { script } from './utils';\nimport { writeFileSync } from 'fs';\nimport { createChromeManifest } from '../packages/ManifestChrome';\nimport { createEdgeManifest } from '../packages/ManifestEdge';\nimport { createFirefoxManifest } from '../packages/ManifesFirefox';\n\nif (process.env.BROWSER) {\n  script(__filename, `Creating  manifest.json`, (_, exit) => {\n    let manifest;\n    switch(process.env.BROWSER) {\n      case 'EDGE': {\n        manifest = createEdgeManifest();\n        break;\n      }\n      case 'FIREFOX': {\n        manifest = createFirefoxManifest();\n        break;\n      }\n      case 'CHROME': {\n        manifest = createChromeManifest();\n        break;\n      }\n      default: {\n        throw new Error(`unknown BROWSER env '${process.env.BROWSER}'. Please use 'EDGE', 'FIREFOX' or 'CHROME'`);\n      }\n    }\n    const manifestJSON = JSON.stringify(manifest, null, 2);\n    writeFileSync('./build/manifest.json', manifestJSON);\n    exit();\n  });\n} else {\n  throw new Error('No browser selected, please add BROWSER env');\n}\n\n"
  },
  {
    "path": "scripts/make-dist-zip.script.ts",
    "content": "/**\n * Compress build/ folder to create archive which will be consumed by browser\n */\nimport { script } from './utils';\nimport { createWriteStream } from 'fs';\nimport * as Archiver from 'archiver';\n\nconst manifest = require('../build/manifest.json');\nconst manifestVersion = manifest.version;\nconst archiveName = 'github-vsci';\n\nif (process.env.BROWSER && ['CHROME', 'FIREFOX', 'EDGE'].includes(process.env.BROWSER)) {\n\tconst name = process.env.BROWSER.toLowerCase();\n\tscript(__filename, `Creating '${name}-${archiveName}-${manifestVersion}.zip' ready to upload to stores`, ({ log, Ch }, exit) => {\n\t\tconst distZip = createWriteStream(`${process.cwd()}/dist/${name}-${archiveName}-${manifestVersion}.zip`);\n\t\tconst archive = Archiver('zip', { zlib: { level: 9 } });\n\n\t\t// On end, print total bytes\n\t\tdistZip.on('close', () => {\n\t\t\tlog(archive.pointer() + ' total bytes');\n\t\t\tlog(Ch.green(`> '${name}-${archiveName}-${manifestVersion}.zip' file created`));\n\t\t\texit();\n\t\t});\n\n\t\tarchive.pipe(distZip);\n\t\tarchive.directory('./build', false);\n\n\t\tarchive.finalize();\n\t});\n\n} else {\n\tthrow new Error('Please, set BROWSER env to CHROME, FIREFOX or EDGE');\n}\n\n\n"
  },
  {
    "path": "scripts/utils.ts",
    "content": "import * as Path from 'path';\nimport * as Ch from 'chalk';\n\nconst log = console.log;\n\nexport async function script(filename: string, desc: string, callback: (tools: { log: Console['log'], Ch: typeof Ch }, exit: (error?: any) => void) => Promise<void> | void) {\n    const baseName = Path.basename(filename);\n    log(Ch.bgYellow(`(${baseName}) ${desc}`));\n    const sTime = Date.now();\n    try {\n        callback({ log, Ch }, (error?: any) => {\n            const diff = Date.now() - sTime;\n            if (error) {\n                console.log(`Execution time: ${Ch.bgRed(diff.toString() + 'ms')}`);\n            } else {\n                console.log(`Execution time: ${Ch.bgGreen(diff.toString() + 'ms')}`);\n            }\n        });\n    } catch (error) {\n        const diff = Date.now() - sTime;\n        console.log(`Execution time: ${Ch.bgRed(diff.toString() + 'ms')}`);\n    }\n}\n"
  },
  {
    "path": "tests/packages/content/pages/BitBucket.test.ts",
    "content": "import { fetchRenderedDocument,SITE_RETRIEVE_TIMEOUT } from '../../../utils';\n\n\nimport { QUERY_FILE_TABLE_ROWS, QUERY_ICONS_TO_REPLACE } from '../../../../packages/content/pages/BitBucket';\n\ndescribe('Test Bitbucket queries', () => {\n  it('Repo root', async () => {\n    const renderedDocument = await fetchRenderedDocument('https://bitbucket.org/pypa/distlib/src/master/');\n    expect(renderedDocument.querySelectorAll(QUERY_FILE_TABLE_ROWS).length).not.toBe(0);\n    expect(renderedDocument.querySelectorAll(QUERY_ICONS_TO_REPLACE).length).not.toBe(0);\n  },SITE_RETRIEVE_TIMEOUT);\n  it('Subfolder with filetable', async () => {\n    const renderedDocument = await fetchRenderedDocument('https://bitbucket.org/pypa/distlib/src/master/tests/');\n    expect(renderedDocument.querySelectorAll(QUERY_FILE_TABLE_ROWS).length).not.toBe(0);\n    expect(renderedDocument.querySelectorAll(QUERY_ICONS_TO_REPLACE).length).not.toBe(0);\n  },SITE_RETRIEVE_TIMEOUT);\n  it('Open file', async () => {\n    const renderedDocument = await fetchRenderedDocument(\n      'https://bitbucket.org/pypa/distlib/src/master/README.rst',\n      null\n    );\n    expect(renderedDocument.querySelectorAll(QUERY_FILE_TABLE_ROWS).length).toBe(0);\n    expect(renderedDocument.querySelectorAll(QUERY_ICONS_TO_REPLACE).length).toBe(0);\n  },SITE_RETRIEVE_TIMEOUT);\n});\n"
  },
  {
    "path": "tests/packages/content/pages/GistGitHub.test.ts",
    "content": "import { fetchDocument,SITE_RETRIEVE_TIMEOUT } from '../../../utils';\n\nimport { QUERY_FILE_INFO } from '../../../../packages/content/pages/GistGitHub';\n\nit('Test GistGitHub query', async () => {\n  const fetchedDocument = await fetchDocument('https://gist.github.com/spences10/5c492e197e95158809a83650ff97fc3a');\n  expect(fetchedDocument.querySelectorAll(QUERY_FILE_INFO).length).not.toBe(0);\n}, SITE_RETRIEVE_TIMEOUT);\n"
  },
  {
    "path": "tests/packages/content/pages/GitHub.test.ts",
    "content": "/**\n * @jest-environment jsdom\n */\n\nimport { fetchDocument, SITE_RETRIEVE_TIMEOUT } from '../../../utils';\n\nimport {\n  QUERY_FILE_TABLE_ITEMS,\n  QUERY_PATH_SEGMENTS,\n  QUERY_PJAX_CONTAINER,\n  QUERY_LAST_PATH_SEGMENT\n} from '../../../../packages/content/pages/GitHub';\n\ndescribe('Test Github queries', () => {\n  it('Repo root', async () => {\n    const fetchedDocument = await fetchDocument('https://github.com/dderevjanik/github-vscode-icons');\n    expect(fetchedDocument.querySelectorAll(QUERY_FILE_TABLE_ITEMS).length).not.toBe(0);\n    expect(fetchedDocument.querySelectorAll(QUERY_PATH_SEGMENTS).length).toBe(0);\n    expect(fetchedDocument.querySelectorAll(QUERY_PJAX_CONTAINER).length).not.toBe(0);\n    expect(fetchedDocument.querySelectorAll(QUERY_LAST_PATH_SEGMENT).length).toBe(0);\n  }, SITE_RETRIEVE_TIMEOUT);\n  it('Subfolder with filetable', async () => {\n    const fetchedDocument = await fetchDocument(\n      'https://github.com/dderevjanik/github-vscode-icons/tree/master/packages/content/pages'\n    );\n    expect(fetchedDocument.querySelectorAll(QUERY_FILE_TABLE_ITEMS).length).not.toBe(0);\n    expect(fetchedDocument.querySelectorAll(QUERY_PATH_SEGMENTS).length).not.toBe(0);\n    expect(fetchedDocument.querySelectorAll(QUERY_PJAX_CONTAINER).length).not.toBe(0);\n    expect(fetchedDocument.querySelectorAll(QUERY_LAST_PATH_SEGMENT).length).not.toBe(0);\n  }, SITE_RETRIEVE_TIMEOUT);\n  it('Open file', async () => {\n    const fetchedDocument = await fetchDocument(\n      'https://github.com/dderevjanik/github-vscode-icons/blob/master/packages/content/pages/GitHub.ts'\n    );\n    expect(fetchedDocument.querySelectorAll(QUERY_FILE_TABLE_ITEMS).length).toBe(0);\n    expect(fetchedDocument.querySelectorAll(QUERY_PATH_SEGMENTS).length).not.toBe(0);\n    expect(fetchedDocument.querySelectorAll(QUERY_PJAX_CONTAINER).length).not.toBe(0);\n    expect(fetchedDocument.querySelectorAll(QUERY_LAST_PATH_SEGMENT).length).not.toBe(0);\n  }, SITE_RETRIEVE_TIMEOUT);\n});\n"
  },
  {
    "path": "tests/packages/content/pages/GitLab.test.ts",
    "content": "import { fetchRenderedDocument, SITE_RETRIEVE_TIMEOUT} from '../../../utils';\n\nimport { QUERY_TREE_ITEMS } from '../../../../packages/content/pages/GitLab';\n\ndescribe('Test Gitlab queries', () => {\n  it('Repo root', async () => {\n    const renderedDocument = await fetchRenderedDocument('https://gitlab.com/pycqa/flake8', '.tree-table');\n    expect(renderedDocument.querySelectorAll(QUERY_TREE_ITEMS).length).not.toBe(0);\n  }, SITE_RETRIEVE_TIMEOUT);\n  it('Subfolder with filetable', async () => {\n    const renderedDocument = await fetchRenderedDocument(\n      'https://gitlab.com/pycqa/flake8/-/tree/master/src/flake8',\n      '.tree-table'\n    );\n    expect(renderedDocument.querySelectorAll(QUERY_TREE_ITEMS).length).not.toBe(0);\n  }, SITE_RETRIEVE_TIMEOUT);\n  it('Open file', async () => {\n    const renderedDocument = await fetchRenderedDocument(\n      'https://gitlab.com/pycqa/flake8/-/blob/master/src/flake8/__init__.py',\n      null\n    );\n    expect(renderedDocument.querySelectorAll(QUERY_TREE_ITEMS).length).toBe(0);\n  }, SITE_RETRIEVE_TIMEOUT);\n});\n"
  },
  {
    "path": "tests/packages/content/pages/SourceForge.test.ts",
    "content": "import { fetchDocument, SITE_RETRIEVE_TIMEOUT } from '../../../utils';\n\nimport { QUERY_SOURCEFORGE_ITEMS } from '../../../../packages/content/pages/SourceForge';\n\ndescribe('Test SourceForge queries', () => {\n  it('Repo root', async () => {\n    const fetchedDocument = await fetchDocument('https://sourceforge.net/projects/python-fire.mirror/files/');\n    expect(fetchedDocument.querySelectorAll(QUERY_SOURCEFORGE_ITEMS).length).not.toBe(0);\n  }, SITE_RETRIEVE_TIMEOUT);\n  it('Subfolder with filetable', async () => {\n    const fetchedDocument = await fetchDocument('https://sourceforge.net/projects/python-fire.mirror/files/v0.3.1/');\n    expect(fetchedDocument.querySelectorAll(QUERY_SOURCEFORGE_ITEMS).length).not.toBe(0);\n  }, SITE_RETRIEVE_TIMEOUT);\n});\n"
  },
  {
    "path": "tests/tsconfig.tests.json",
    "content": "{\n  \"extends\": \"../tsconfig.json\",\n  \"compilerOptions\": {\n    \"esModuleInterop\": true,\n    \"noImplicitAny\": false /* Raise error on expressions and declarations with an implied 'any' type. */\n  }\n}\n"
  },
  {
    "path": "tests/utils.ts",
    "content": "import { JSDOM } from 'jsdom';\n\nimport fetch from 'node-fetch';\nimport { table } from 'console';\n\n\nexport const SITE_RETRIEVE_TIMEOUT = 30000;\n\nexport const getElementFromSource = (elementSource: string): Document => {\n  const dom = new JSDOM(elementSource);\n  return dom.window.document;\n  // const parser = new DOMParser();\n  // return parser.parseFromString(elementSource, 'text/html').documentElement;\n};\n\nexport const fetchDocument = async (url: string): Promise<Document> => {\n  const response = await fetch(url);\n  const pageSource = await response.text();\n  return getElementFromSource(pageSource);\n};\n\nexport const fetchRenderedDocument = async (url: string, waitSelector: string | null = 'table'): Promise<Document> => {\n  await page.goto(url, { waitUntil: 'networkidle2' });\n  if (waitSelector !== null) {\n    await page.waitForSelector(waitSelector);\n  }\n  const renderedPageSource = await page.evaluate(() => {\n    const nrOfFoundTables = document.querySelector('html').outerHTML;\n    return nrOfFoundTables;\n  });\n  return getElementFromSource(renderedPageSource);\n};\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    /* Basic Options */\n    \"target\": \"es6\" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */,\n    \"module\": \"commonjs\" /* Specify module code generation: 'none', commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,\n    \"lib\": [\"dom\", \"es2015\", \"es6\", \"es7\"] /* Specify library files to be included in the compilation:  */,\n    \"allowJs\": true /* Allow javascript files to be compiled. */,\n    \"checkJs\": true /* Report errors in .js files. */,\n    \"jsx\": \"react\" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,\n    // \"declaration\": true,                   /* Generates corresponding '.d.ts' file. */\n    // \"sourceMap\": true,                     /* Generates corresponding '.map' file. */\n    // \"outFile\": \"./\",                       /* Concatenate and emit output to single file. */\n    // \"outDir\": \"./\",                        /* Redirect output structure to the directory. */\n    // \"rootDir\": \"./\",                       /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */\n    // \"removeComments\": true,                /* Do not emit comments to output. */\n    // \"noEmit\": true,                        /* Do not emit outputs. */\n    // \"importHelpers\": true,                 /* Import emit helpers from 'tslib'. */\n    // \"downlevelIteration\": true,            /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */\n    // \"isolatedModules\": true,               /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */\n    /* Strict Type-Checking Options */\n    \"strict\": true /* Enable all strict type-checking options. */,\n    \"noImplicitAny\": true /* Raise error on expressions and declarations with an implied 'any' type. */,\n    \"strictNullChecks\": false /* Enable strict null checks. */,\n    // \"noImplicitThis\": true,                /* Raise error on 'this' expressions with an implied 'any' type. */\n    // \"alwaysStrict\": true,                  /* Parse in strict mode and emit \"use strict\" for each source file. */\n    /* Additional Checks */\n    // \"noUnusedLocals\": true,                /* Report errors on unused locals. */\n    // \"noUnusedParameters\": true,            /* Report errors on unused parameters. */\n    // \"noImplicitReturns\": true,             /* Report error when not all code paths in function return a value. */\n    // \"noFallthroughCasesInSwitch\": true,    /* Report errors for fallthrough cases in switch statement. */\n    /* Module Resolution Options */\n    // \"moduleResolution\": \"node\",            /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */\n    // \"baseUrl\": \"./\",                       /* Base directory to resolve non-absolute module names. */\n    // \"paths\": {},                           /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */\n    // \"rootDirs\": [],                        /* List of root folders whose combined content represents the structure of the project at runtime. */\n    \"typeRoots\": [\"node_modules/@types\", \"typings\"] /* List of folders to include type definitions from. */\n    // \"types\": [],                           /* Type declaration files to be included in compilation. */\n    // \"allowSyntheticDefaultImports\": true,  /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */\n    // \"preserveSymlinks\": true,              /* Do not resolve the real path of symlinks. */\n    /* Source Map Options */\n    // \"sourceRoot\": \"./\",                    /* Specify the location where debugger should locate TypeScript files instead of source locations. */\n    // \"mapRoot\": \"./\",                       /* Specify the location where debugger should locate map files instead of generated locations. */\n    // \"inlineSourceMap\": true,               /* Emit a single file with source maps instead of having a separate file. */\n    // \"inlineSources\": true,                 /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */\n    /* Experimental Options */\n    // \"experimentalDecorators\": true,        /* Enables experimental support for ES7 decorators. */\n    // \"emitDecoratorMetadata\": true,         /* Enables experimental support for emitting type metadata for decorators. */\n    // \"skipLibCheck\": true\n  },\n  \"include\": [\"./packages/**/*.d.ts\", \"./scripts/**/*.ts\"],\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "typings/fastdom/index.d.ts",
    "content": "declare module 'fastdom' {\n  /**\n   * Clears any scheduled job.\n   */\n  export const clear: () => void;\n\n  /**\n   * Schedules a job for the 'measure' queue. Returns a unique ID that can be used to clear the scheduled job.\n   */\n  export const measure: (callback: () => void) => void;\n\n  /**\n   * Schedules a job for the 'mutate' queue. Returns a unique ID that can be used to clear the scheduled job.\n   */\n  export const mutate: (callback: () => void) => void;\n\n  export const extend: () => void;\n}\n"
  },
  {
    "path": "typings/icons.d.ts",
    "content": "declare module '*icons.json' {\n  const json: {\n    iconDefinitions: { [iconKey: string]: { iconPath: string } };\n    folderNames: { [folderName: string]: string };\n    fileExtensions: {\n      [fileExtension: string]: string;\n    };\n    fileNames: { [fileName: string]: string };\n    languagesIds: { [languageId: string]: string };\n    light: {\n      folderNames: { [folderName: string]: string };\n      fileExtensions: {\n        [fileExtension: string]: string;\n      };\n      fileNames: { [fileName: string]: string };\n      languagesIds: { [languageId: string]: string };\n    };\n  };\n  export default json;\n}\n"
  },
  {
    "path": "typings/languages-vscode.d.ts",
    "content": "declare module '*languages-vscode.json' {\n  const json: {\n    [languageId: string]: {\n      extensions: string[];\n      filenames: string[];\n    };\n  };\n  export default json;\n}\n"
  },
  {
    "path": "typings/languages-vsi.d.ts",
    "content": "declare module '*languages-vsi.json' {\n  const json: {\n    [languageId: string]: {\n      defaultExtension: string;\n    };\n  };\n  export default json;\n}\n"
  },
  {
    "path": "typings/select-dom/index.d.ts",
    "content": "declare module 'select-dom' {\n  /**\n   * Check if any element with inserted query exists\n   */\n  export function exists(query: string): boolean;\n}\n"
  },
  {
    "path": "webpack.config.js",
    "content": "const path = require('path');\nconst Webpack = require('webpack');\n\nconst baseConfig = {\n  devtool: 'source-map',\n  entry: {\n    content: './packages/content/Content.ts',\n    popup: './packages/popup/Popup.tsx',\n    background: './packages/background/Background.ts'\n  },\n  output: {\n    path: path.resolve(__dirname, 'build'),\n    filename: '[name].js'\n  },\n  devServer: {\n    contentBase: __dirname + '/public'\n  },\n  resolve: {\n    // Add '.ts' and '.tsx' as a resolvable extension.\n    extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js', '.json']\n  },\n  module: {\n    rules: [\n      // all files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'\n      {\n        test: /\\.tsx?$/,\n        use: 'ts-loader'\n      }\n    ]\n  },\n  plugins: []\n};\n\nmodule.exports = baseConfig;\n"
  }
]