[
  {
    "path": ".eslintrc.js",
    "content": "module.exports = {\n  parser: \"@typescript-eslint/parser\", // Specifies the ESLint parser\n  extends: [\n    \"eslint:recommended\",\n    \"plugin:@typescript-eslint/eslint-recommended\",\n    \"plugin:@typescript-eslint/recommended\",\n    \"plugin:@typescript-eslint/recommended-requiring-type-checking\",\n    \"prettier\",\n    \"plugin:unicorn/recommended\",\n    \"plugin:promise/recommended\",\n    \"plugin:chai-expect/recommended\",\n  ],\n  env: {\n    node: true,\n    browser: false,\n    mocha: true,\n  },\n  plugins: [\n    \"@typescript-eslint\",\n    \"prettier\",\n    // \"import\",\n    \"promise\",\n    \"chai-expect\",\n  ],\n  settings: { \"import/core-modules\": [\"vscode\"] },\n  parserOptions: {\n    ecmaVersion: 2019, // Allows for the parsing of modern ECMAScript features\n    sourceType: \"module\", // Allows for the use of imports\n    project: \"./tsconfig.json\",\n    impliedStrict: true,\n    createDefaultProgram: true,\n  },\n  rules: {\n    \"array-callback-return\": \"error\",\n    \"prefer-template\": \"warn\",\n    \"prefer-promise-reject-errors\": \"error\",\n    \"require-unicode-regexp\": \"error\",\n    yoda: \"error\",\n    \"prefer-spread\": \"error\",\n    \"prettier/prettier\": \"warn\",\n    \"unicorn/prevent-abbreviations\": \"off\",\n    \"unicorn/explicit-length-check\": \"off\",\n    \"unicorn/consistent-function-scoping\": \"off\",\n    \"@typescript-eslint/explicit-module-boundary-types\": \"off\",\n    \"lines-between-class-members\": [\n      \"error\",\n      \"always\",\n      { exceptAfterSingleLine: true },\n    ],\n    \"@typescript-eslint/explicit-function-return-type\": \"off\",\n    \"@typescript-eslint/no-unused-vars\": [\"warn\", { argsIgnorePattern: \"^_\" }],\n  },\n}\n"
  },
  {
    "path": ".gitignore",
    "content": "out\nnode_modules\n.vscode-test/\n*.vsix\n.DS_Store\n"
  },
  {
    "path": ".husky/.gitignore",
    "content": "_\n"
  },
  {
    "path": ".husky/prepare-commit-msg",
    "content": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpx devmoji -e --lint\n"
  },
  {
    "path": ".prettierrc",
    "content": "{\n  \"semi\": false,\n  \"singleQuote\": false,\n  \"tabWidth\": 2,\n  \"useTabs\": false,\n  \"printWidth\": 80,\n  \"trailingComma\": \"es5\",\n  \"proseWrap\": \"preserve\"\n}\n"
  },
  {
    "path": ".vscode/extensions.json",
    "content": "{\n  // See http://go.microsoft.com/fwlink/?LinkId=827846\n  // for the documentation about the extensions.json format\n  \"recommendations\": []\n}\n"
  },
  {
    "path": ".vscode/launch.json",
    "content": "// A launch configuration that compiles the extension and then opens it inside a new window\n// Use IntelliSense to learn about possible attributes.\n// Hover to view descriptions of existing attributes.\n// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n{\n\t\"version\": \"0.2.0\",\n\t\"configurations\": [\n\t\t{\n\t\t\t\"name\": \"Run Extension\",\n\t\t\t\"type\": \"extensionHost\",\n\t\t\t\"request\": \"launch\",\n\t\t\t\"runtimeExecutable\": \"${execPath}\",\n\t\t\t\"args\": [\n\t\t\t\t\"--extensionDevelopmentPath=${workspaceFolder}\"\n\t\t\t],\n\t\t\t\"outFiles\": [\n\t\t\t\t\"${workspaceFolder}/out/**/*.js\"\n\t\t\t],\n\t\t\t\"preLaunchTask\": \"${defaultBuildTask}\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Extension Tests\",\n\t\t\t\"type\": \"extensionHost\",\n\t\t\t\"request\": \"launch\",\n\t\t\t\"runtimeExecutable\": \"${execPath}\",\n\t\t\t\"args\": [\n\t\t\t\t\"--extensionDevelopmentPath=${workspaceFolder}\",\n\t\t\t\t\"--extensionTestsPath=${workspaceFolder}/out/test/suite/index\"\n\t\t\t],\n\t\t\t\"outFiles\": [\n\t\t\t\t\"${workspaceFolder}/out/test/**/*.js\"\n\t\t\t],\n\t\t\t\"preLaunchTask\": \"${defaultBuildTask}\"\n\t\t}\n\t]\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "// Place your settings in this file to overwrite default and user settings.\n{\n    \"files.exclude\": {\n        \"out\": false // set this to true to hide the \"out\" folder with the compiled JS files\n    },\n    \"search.exclude\": {\n        \"out\": true // set this to false to include \"out\" folder in search results\n    },\n    // Turn off tsc task auto detection since we have the necessary tasks as npm scripts\n    \"typescript.tsc.autoDetect\": \"off\"\n}"
  },
  {
    "path": ".vscode/tasks.json",
    "content": "// See https://go.microsoft.com/fwlink/?LinkId=733558\n// for the documentation about the tasks.json format\n{\n  \"version\": \"2.0.0\",\n  \"tasks\": [\n    {\n      \"type\": \"npm\",\n      \"script\": \"compile\",\n      \"group\": {\n        \"kind\": \"build\",\n        \"isDefault\": true\n      },\n      \"problemMatcher\": [],\n      \"label\": \"npm: compile\",\n      \"detail\": \"npx rollup -c rollup.config.js\"\n    }\n  ]\n}\n"
  },
  {
    "path": ".vscodeignore",
    "content": ".vscode/**\n.vscode-test/**\nout/test/**\nsrc/**\n.gitignore\nvsc-extension-quickstart.md\n**/tsconfig.json\n**/.eslintrc.json\n**/*.map\n**/*.ts\nnode_modules\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Release Notes\n\n## 1.3.0\n\n- Use rollup for smaller (and faster) builds\n- Added config option to include monorepo root during sync. (Implements Make includeRoot configurable from VSCode settings #56)\n\n## 1.2.0\n\n- Added option to configure custom package types\n\n## 1.1.3\n\n- Fixed an issue with workspace folders on Windows\n\n## 1.0.0\n\n- Initial release :tada:\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "# Monorepo Workspace\n\nManage monorepos with multi-root workspaces. Supports Lerna, Yarn, Pnpm, Rushjs and recursive package directories.\n\n## Features\n\nAll **Monorepo Workspace** functionality can be found in the command palette. Available commands:\n\n![Commands](images/animation.gif)\n\nSelecting workspace folders:\n![Select](images/select.png)\n\nSelecting one package:\n![Commands](images/list.png)\n\n* `Monorepo: Select Workspace Folders`: select active folders in your workspace, including packages in your repository\n* `Monorepo: Open Package (Current Window)`: open a package from your repository in the current window\n* `Monorepo: Open Package (New Window)`: open a package from your repository in a new window\n* `Monorepo: Open Package (Workspace Folder)`: add a package from your repository as a workspace folder\n\nYou can also create workspace folders for all your repository packages with `Monorepo: Sync Workspace Folders`:\n![Commands](images/explorer.png)\n\n## Extension Settings\n\n**Monorepo Manager** tries to detect the type of package (library, application or tool) based on configurable regexes.\n\nThe workspace folder prefix containing the emoji is also configurable.\n\nYou can also configure custom types with a prefix in your JSON settings:\n\n```json\n{\n  \"monorepoWorkspace.folders.custom\": [\n    {\"regex\":\"app1\", \"prefix\": \"🔥\"},\n    {\"regex\":\"app2\", \"prefix\": \"📚\"}\n  ]\n}\n```\n\nYou can find all options under \"Monorepo Workspace\" in your configurtion.\n\n## Release Notes\n\n### 1.2.0\n\nAdded option to configure custom package types\n\n### 1.1.3\n\nFixed an issue with workspace folders on Windows\n\n### 1.0.0\n\nInitial release :tada:\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"vscode-monorepo-workspace\",\n  \"displayName\": \"Monorepo Workspace\",\n  \"description\": \"Manage monorepos with multi-root workspaces. Supports Lerna, Yarn, Pnpm, Rushjs and recursive package directories\",\n  \"version\": \"1.3.1\",\n  \"publisher\": \"folke\",\n  \"repository\": \"http://github.com/folke/vscode-monorepo-workspace\",\n  \"license\": \"SEE LICENSE IN LICENSE\",\n  \"engines\": {\n    \"vscode\": \">=1.53.0\"\n  },\n  \"categories\": [\n    \"Other\"\n  ],\n  \"keywords\": [\n    \"workspace\",\n    \"monorepo\",\n    \"project\",\n    \"yarn\",\n    \"folder\"\n  ],\n  \"activationEvents\": [\n    \"workspaceContains:**/package.json\"\n  ],\n  \"main\": \"./out/extension.js\",\n  \"icon\": \"images/icon.png\",\n  \"contributes\": {\n    \"commands\": [\n      {\n        \"command\": \"extension.openPackageCurrentWindow\",\n        \"title\": \"Monorepo: Open Package (Current Window)\"\n      },\n      {\n        \"command\": \"extension.openPackageNewWindow\",\n        \"title\": \"Monorepo: Open Package (New Window)\"\n      },\n      {\n        \"command\": \"extension.openPackageWorkspaceFolder\",\n        \"title\": \"Monorepo: Open Package (Workspace Folder)\"\n      },\n      {\n        \"command\": \"extension.select\",\n        \"title\": \"Monorepo: Select Workspace Folders\"\n      },\n      {\n        \"command\": \"extension.updateAll\",\n        \"title\": \"Monorepo: Sync Workspace Folders\"\n      }\n    ],\n    \"configuration\": {\n      \"title\": \"Monorepo Workspace\",\n      \"properties\": {\n        \"monorepoWorkspace.includeRoot\": {\n          \"type\": \"boolean\",\n          \"default\": true,\n          \"description\": \"Inlcude the top-level monorepo root path as a workspace folder\"\n        },\n        \"monorepoWorkspace.folders.regex.apps\": {\n          \"type\": \"string\",\n          \"default\": \"^app|web|api|frontend|backend\",\n          \"description\": \"Regex to match app-like package paths\"\n        },\n        \"monorepoWorkspace.folders.prefix.apps\": {\n          \"type\": \"string\",\n          \"default\": \"🚀 \",\n          \"description\": \"Folder prefix for apps\"\n        },\n        \"monorepoWorkspace.folders.regex.libs\": {\n          \"type\": \"string\",\n          \"default\": \"^common|package|lib|private\",\n          \"description\": \"Regex to match library-like package paths\"\n        },\n        \"monorepoWorkspace.folders.prefix.libs\": {\n          \"type\": \"string\",\n          \"default\": \"📦 \",\n          \"description\": \"Folder prefix for libraries\"\n        },\n        \"monorepoWorkspace.folders.regex.tools\": {\n          \"type\": \"string\",\n          \"default\": \"^tool|script|util\",\n          \"description\": \"Regex to match tool-like package paths\"\n        },\n        \"monorepoWorkspace.folders.prefix.tools\": {\n          \"type\": \"string\",\n          \"default\": \"⚙️ \",\n          \"description\": \"Folder prefix for tools\"\n        },\n        \"monorepoWorkspace.folders.prefix.unknown\": {\n          \"type\": \"string\",\n          \"default\": \"\",\n          \"description\": \"Folder prefix for unknown packages\"\n        },\n        \"monorepoWorkspace.folders.prefix.root\": {\n          \"type\": \"string\",\n          \"default\": \"✨ \",\n          \"description\": \"Folder prefix for the root folder\"\n        },\n        \"monorepoWorkspace.folders.custom\": {\n          \"type\": \"array\",\n          \"default\": [],\n          \"description\": \"An array of custom 'regex/prefix' pairs like: [{regex:'foo', prefix:'bar'}, {regex:'fffoo', prefix:'bbbar'}]\"\n        }\n      }\n    }\n  },\n  \"scripts\": {\n    \"vscode:prepublish\": \"yarn run compile\",\n    \"compile\": \"npx rollup -c\",\n    \"lint\": \"eslint src --ext ts\",\n    \"pretest\": \"yarn run compile && yarn run lint\",\n    \"test\": \"node ./out/test/run-test.js\",\n    \"release\": \"vsce package && vsce publish\"\n  },\n  \"devDependencies\": {\n    \"@rollup/plugin-commonjs\": \"17.1.0\",\n    \"@rollup/plugin-node-resolve\": \"11.2.0\",\n    \"@rollup/plugin-typescript\": \"8.2.0\",\n    \"@types/glob\": \"7.1.3\",\n    \"@types/mocha\": \"8.2.1\",\n    \"@types/node\": \"14.14.31\",\n    \"@types/vscode\": \"1.53.0\",\n    \"@typescript-eslint/eslint-plugin\": \"4.15.2\",\n    \"@typescript-eslint/parser\": \"4.15.2\",\n    \"devmoji\": \"2.2.0\",\n    \"eslint\": \"7.21.0\",\n    \"eslint-config-prettier\": \"8.1.0\",\n    \"eslint-plugin-chai-expect\": \"2.2.0\",\n    \"eslint-plugin-import\": \"2.22.1\",\n    \"eslint-plugin-jest\": \"24.1.5\",\n    \"eslint-plugin-node\": \"11.1.0\",\n    \"eslint-plugin-prettier\": \"3.3.1\",\n    \"eslint-plugin-promise\": \"4.3.1\",\n    \"eslint-plugin-unicorn\": \"28.0.2\",\n    \"glob\": \"7.1.6\",\n    \"husky\": \"5.1.1\",\n    \"mocha\": \"8.3.0\",\n    \"prettier\": \"2.2.1\",\n    \"rollup\": \"2.40.0\",\n    \"rollup-plugin-terser\": \"7.0.2\",\n    \"rollup-plugin-typescript2\": \"0.30.0\",\n    \"tslib\": \"2.1.0\",\n    \"typescript\": \"4.2.2\",\n    \"vscode-test\": \"1.5.1\"\n  },\n  \"dependencies\": {\n    \"rollup-plugin-progress\": \"1.1.2\",\n    \"ultra-runner\": \"3.10.5\"\n  }\n}\n"
  },
  {
    "path": "renovate.json",
    "content": "{\n  \"extends\": [\n    \"config:base\",\n    \":semanticCommits\",\n    \"group:allApollographql\",\n    \"group:definitelyTyped\",\n    \"group:vueMonorepo\",\n    \"group:nestMonorepo\",\n    \"group:fortawesome\",\n    \"group:linters\",\n    \"group:test\",\n    \"group:allNonMajor\"\n  ],\n  \"masterIssue\": true,\n  \"prHourlyLimit\": 20,\n  \"packageRules\": [\n    {\n      \"packagePatterns\": [\"vscode\"],\n      \"groupName\": \"vscode\"\n    },\n    {\n      \"updateTypes\": [\"patch\", \"pin\", \"digest\"],\n      \"automerge\": true\n    }\n  ]\n}\n"
  },
  {
    "path": "rollup.config.js",
    "content": "// import typescript from \"@rollup/plugin-typescript\"\nimport typescript from \"rollup-plugin-typescript2\"\nimport { nodeResolve } from \"@rollup/plugin-node-resolve\"\nimport { terser } from \"rollup-plugin-terser\"\nimport commonjs from \"@rollup/plugin-commonjs\"\nimport progress from \"rollup-plugin-progress\"\nimport { builtinModules } from \"module\"\n\nexport default {\n  input: \"src/extension.ts\", // our source file\n  output: {\n    sourcemap: false,\n    // freeze: false,\n    // interop: \"auto\",\n    // dir: \"out\",\n    file: \"out/extension.js\",\n    format: \"cjs\",\n  },\n\n  // external: [...Object.keys(pkg.dependencies || {}), ...builtins],\n  external: [...builtinModules, \"vscode\"],\n  plugins: [\n    nodeResolve({\n      preferBuiltins: true,\n    }),\n    typescript({\n      // tsconfig: \"./tsconfig.json\",\n      // module: \"esnext\",\n      // typescript: require(\"typescript\"),\n    }),\n    commonjs({ dynamicRequireTargets: [\"*\"] }),\n    terser({ compress: true, mangle: true }),\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n    progress(),\n  ],\n}\n"
  },
  {
    "path": "src/extension.ts",
    "content": "// eslint-disable-next-line unicorn/import-style\nimport path from \"path\"\nimport { getWorkspace } from \"ultra-runner\"\nimport {\n  commands,\n  ExtensionContext,\n  QuickPickItem,\n  Uri,\n  window,\n  workspace as vscodeWorkspace,\n} from \"vscode\"\n\ninterface WorkspaceFolderItem extends QuickPickItem {\n  root: Uri\n  isRoot: boolean\n  description: string\n}\n\nfunction getFolderEmoji(root: string, pkgRoot: string) {\n  const config = vscodeWorkspace.getConfiguration(\"monorepoWorkspace.folders\")\n  if (root == pkgRoot) return config.get<string>(\"prefix.root\") || \"\"\n  const dir = path.relative(root, pkgRoot)\n\n  // Use custom prefixes first\n  const custom = config.get<{ regex: string; prefix: string }[]>(\"custom\")\n  if (custom?.length) {\n    for (const c of custom) {\n      if (c.prefix && c.regex && new RegExp(c.regex, \"u\").test(dir))\n        return c.prefix\n    }\n  }\n\n  for (const type of [\"apps\", \"libs\", \"tools\"]) {\n    const regex = config.get<string>(`regex.${type}`)\n    const prefix = config.get<string>(`prefix.${type}`)\n    if (regex && prefix && new RegExp(regex, \"u\").test(dir)) return prefix\n  }\n  return config.get<string>(\"prefix.unknown\") || \"\"\n}\n\nasync function getPackageFolders(\n  includeRoot = true\n): Promise<WorkspaceFolderItem[] | undefined> {\n  const cwd = vscodeWorkspace.workspaceFolders?.[0].uri.fsPath\n  if (cwd) {\n    const workspace = await getWorkspace({\n      cwd,\n      includeRoot: true,\n    })\n    if (workspace) {\n      const ret: WorkspaceFolderItem[] = []\n      if (includeRoot)\n        ret.push({\n          label: `${getFolderEmoji(workspace.root, workspace.root)}${\n            workspace.getPackageForRoot(workspace.root) || \"root\"\n          }`,\n          description: `${\n            workspace.type[0].toUpperCase() + workspace.type.slice(1)\n          } Workspace Root`,\n          root: Uri.file(workspace.root),\n          isRoot: true,\n        })\n      ret.push(\n        ...workspace\n          .getPackages()\n          .filter((p) => p.root !== workspace.root)\n          .map((p) => {\n            return {\n              label: `${getFolderEmoji(workspace.root, p.root)}${p.name}`,\n              description: `at ${path.relative(workspace.root, p.root)}`,\n              root: Uri.file(p.root),\n              isRoot: false,\n            }\n          })\n          .sort((a, b) => a.root.fsPath.localeCompare(b.root.fsPath))\n      )\n      return ret\n    }\n  }\n}\n\nenum PackageAction {\n  newWindow,\n  currentWindow,\n  workspaceFolder,\n}\n\nfunction addWorkspaceFolder(item: WorkspaceFolderItem) {\n  const folders = vscodeWorkspace.workspaceFolders\n  let start = 0\n  let deleteCount = 0\n  if (folders)\n    for (const folder of folders) {\n      if (folder.uri == item.root) {\n        // Nothing to update\n        if (folder.name == item.label) return\n        deleteCount = 1\n        break\n      }\n      start++\n    }\n  vscodeWorkspace.updateWorkspaceFolders(start, deleteCount, {\n    name: item.label,\n    uri: item.root,\n  })\n}\n\nasync function updateAll(items?: WorkspaceFolderItem[], clean = false) {\n  const config = vscodeWorkspace.getConfiguration(\"monorepoWorkspace\")\n  if (!items) items = await getPackageFolders(config.get(\"includeRoot\"))\n  if (!items) return\n  const itemsSet = new Set(items.map((item) => item.root.fsPath))\n  const folders = vscodeWorkspace.workspaceFolders\n  const adds: { name: string; uri: Uri }[] = []\n  if (folders && !clean) {\n    adds.push(...folders.filter((f) => !itemsSet.has(f.uri.fsPath)))\n  }\n  adds.push(\n    ...items.map((item) => ({\n      name: item.label,\n      uri: item.root,\n    }))\n  )\n  vscodeWorkspace.updateWorkspaceFolders(0, folders?.length, ...adds)\n}\n\nasync function select(items?: WorkspaceFolderItem[]) {\n  if (!items) items = await getPackageFolders()\n  if (!items) return\n  const itemsSet = new Map(items.map((item) => [item.root.fsPath, item]))\n  const folders = vscodeWorkspace.workspaceFolders\n\n  if (folders) {\n    for (const folder of folders) {\n      if (itemsSet.has(folder.uri.fsPath)) {\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        itemsSet.get(folder.uri.fsPath)!.picked = true\n      } else {\n        items.push({\n          root: folder.uri,\n          isRoot: false,\n          label: folder.name,\n          description: \"\",\n          picked: true,\n        })\n      }\n    }\n  }\n\n  const picked = await window.showQuickPick(items, {\n    canPickMany: true,\n    matchOnDescription: true,\n  })\n  if (picked?.length) return updateAll(picked, true)\n}\n\nasync function openPackage(action: PackageAction) {\n  const items = await getPackageFolders()\n  if (items) {\n    const item = await window.showQuickPick(items, {\n      canPickMany: false,\n      matchOnDescription: true,\n    })\n    if (item) {\n      switch (action) {\n        case PackageAction.currentWindow:\n          return commands.executeCommand(\"vscode.openFolder\", item.root)\n        case PackageAction.newWindow:\n          return commands.executeCommand(\"vscode.openFolder\", item.root, true)\n        case PackageAction.workspaceFolder:\n          addWorkspaceFolder(item)\n          break\n      }\n    }\n  }\n}\n// this method is called when your extension is activated\n// your extension is activated the very first time the command is executed\nexport function activate(context: ExtensionContext) {\n  context.subscriptions.push(\n    commands.registerCommand(\"extension.openPackageCurrentWindow\", () =>\n      openPackage(PackageAction.currentWindow)\n    ),\n    commands.registerCommand(\"extension.openPackageNewWindow\", () =>\n      openPackage(PackageAction.newWindow)\n    ),\n    commands.registerCommand(\"extension.openPackageWorkspaceFolder\", () =>\n      openPackage(PackageAction.workspaceFolder)\n    ),\n    commands.registerCommand(\"extension.updateAll\", () => updateAll()),\n    commands.registerCommand(\"extension.select\", () => select())\n  )\n}\n\n// this method is called when your extension is deactivated\nexport function deactivate() {\n  true\n}\n"
  },
  {
    "path": "src/test/run-test.ts",
    "content": "import path from \"path\"\n\nimport { runTests } from \"vscode-test\"\n\nasync function main() {\n  try {\n    // The folder containing the Extension Manifest package.json\n    // Passed to `--extensionDevelopmentPath`\n    const extensionDevelopmentPath = path.resolve(__dirname, \"../../\")\n\n    // The path to test runner\n    // Passed to --extensionTestsPath\n    const extensionTestsPath = path.resolve(__dirname, \"./suite/index\")\n\n    // Download VS Code, unzip it and run the integration test\n    await runTests({ extensionDevelopmentPath, extensionTestsPath })\n  } catch {\n    console.error(\"Failed to run tests\")\n    // eslint-disable-next-line unicorn/no-process-exit\n    process.exit(1)\n  }\n}\n\nvoid main()\n"
  },
  {
    "path": "src/test/suite/extension.test.ts",
    "content": "import * as assert from \"assert\"\n\n// You can import and use all API from the 'vscode' module\n// as well as import your extension to test it\nimport * as vscode from \"vscode\"\n// import * as myExtension from '../extension';\n\nsuite(\"Extension Test Suite\", () => {\n  void vscode.window.showInformationMessage(\"Start all tests.\")\n\n  test(\"Sample test\", () => {\n    assert.equal(-1, [1, 2, 3].indexOf(5))\n    assert.equal(-1, [1, 2, 3].indexOf(0))\n  })\n})\n"
  },
  {
    "path": "src/test/suite/index.ts",
    "content": "import path from \"path\"\nimport Mocha from \"mocha\"\nimport glob from \"glob\"\n\nexport function run(): Promise<void> {\n  // Create the mocha test\n  const mocha = new Mocha({\n    ui: \"tdd\",\n    color: true,\n  })\n\n  const testsRoot = path.resolve(__dirname, \"..\")\n\n  return new Promise((resolve, reject) => {\n    glob(\"**/**.test.js\", { cwd: testsRoot }, (err, files) => {\n      if (err) {\n        return reject(err)\n      }\n\n      // Add files to the test suite\n      for (const f of files) mocha.addFile(path.resolve(testsRoot, f))\n\n      try {\n        // Run the mocha test\n        mocha.run((failures) => {\n          if (failures > 0) {\n            reject(new Error(`${failures} tests failed.`))\n          } else {\n            resolve()\n          }\n        })\n      } catch (error) {\n        console.error(error)\n        reject(error)\n      }\n    })\n  })\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"module\": \"es2015\",\n    \"target\": \"es6\",\n    // \"outDir\": \"out\",\n    \"lib\": [\"es6\"],\n    \"sourceMap\": true,\n    \"moduleResolution\": \"node\",\n    \"rootDir\": \"src\",\n    \"allowSyntheticDefaultImports\": true,\n    \"importHelpers\": true,\n    \"esModuleInterop\": true,\n    \"strict\": true /* enable all strict type-checking options */\n    /* Additional Checks */\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    // \"noUnusedParameters\": true,  /* Report errors on unused parameters. */\n  },\n  \"exclude\": [\"node_modules\", \".vscode-test\"]\n}\n"
  },
  {
    "path": "vsc-extension-quickstart.md",
    "content": "# Welcome to your VS Code Extension\n\n## What's in the folder\n\n* This folder contains all of the files necessary for your extension.\n* `package.json` - this is the manifest file in which you declare your extension and command.\n  * The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesn’t yet need to load the plugin.\n* `src/extension.ts` - this is the main file where you will provide the implementation of your command.\n  * The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.\n  * We pass the function containing the implementation of the command as the second parameter to `registerCommand`.\n\n## Get up and running straight away\n\n* Press `F5` to open a new window with your extension loaded.\n* Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`.\n* Set breakpoints in your code inside `src/extension.ts` to debug your extension.\n* Find output from your extension in the debug console.\n\n## Publishing\n\n* create a new token at https://dev.azure.com/hipfu/_usersSettings/tokens\n* `vsce login [TOKEN]`\n\n## Make changes\n\n* You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`.\n* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.\n\n\n## Explore the API\n\n* You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`.\n\n## Run tests\n\n* Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Extension Tests`.\n* Press `F5` to run the tests in a new window with your extension loaded.\n* See the output of the test result in the debug console.\n* Make changes to `src/test/suite/extension.test.ts` or create new test files inside the `test/suite` folder.\n  * The provided test runner will only consider files matching the name pattern `**.test.ts`.\n  * You can create folders inside the `test` folder to structure your tests any way you want.\n\n## Go further\n\n * Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension).\n * [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VSCode extension marketplace.\n * Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).\n"
  }
]