├── .editorconfig ├── .gitignore ├── .vscode ├── launch.json └── settings.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── dist ├── extension.js └── extension.js.map ├── docs ├── collection │ ├── sch-new-schematic-default.md │ ├── sch-new-schematic-function-name.md │ └── sch-ng-add.md ├── images │ └── feat-generate-schematic.gif ├── schema │ ├── sch-default-json.md │ ├── sch-property-dollar-default.md │ ├── sch-property-prompt-input.md │ ├── sch-property-prompt-selection.md │ ├── sch-property-prompt-yes-no.md │ └── sch-property.md ├── schematics │ ├── sch-apply-merge-templates.md │ ├── sch-chain-rules.md │ ├── sch-create-json-file.md │ ├── sch-default-function.md │ ├── sch-external-schematics.md │ ├── sch-import-apply-merge-templates.md │ ├── sch-import-chain.md │ ├── sch-import-external-schematic.md │ ├── sch-import-install-package-task.md │ ├── sch-install-package.md │ ├── sch-read-json-file.md │ ├── sch-rule.md │ ├── sch-set-package-dependencies.md │ ├── sch-set-package-dev-dependencies.md │ ├── sch-set-package-scripts.md │ ├── sch-tree-create.md │ ├── sch-tree-delete-directory.md │ ├── sch-tree-delete.md │ ├── sch-tree-exist.md │ ├── sch-tree-overwrite.md │ ├── sch-tree-read.md │ ├── sch-tree-rename.md │ └── sch-write-json-file.md └── typescript │ ├── ts-ast-to-code.md │ ├── ts-import.md │ └── ts-string-to-ast.md ├── document-generator.ts ├── icon.png ├── icon.svg ├── package.json ├── src ├── extension.ts ├── register-code-snippets.js ├── register-code-snippets.js.map ├── register-code-snippets.ts ├── register-file-gen-commands.ts ├── snippets │ ├── collection-snippets.json │ ├── schema-snippets.json │ ├── schematics-snippets.json │ └── typescript-snippets.json └── utils │ ├── string.js │ ├── string.js.map │ └── string.ts ├── tsconfig.json ├── vsc-extension-quickstart.md └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.vsix 2 | node_modules/ 3 | yarn-error.log 4 | src/**/*.js 5 | src/**/*.js.map 6 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "runtimeExecutable": "${execPath}", 13 | "args": [ 14 | "--extensionDevelopmentPath=${workspaceFolder}" 15 | ] 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": { 3 | "src/**/*.js": true, 4 | "src/**/*.js.*": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | docs/ 5 | document-generator.ts 6 | icon.svg 7 | yarn* 8 | vsc-extension-quickstart.md 9 | 10 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the "vscode-schematics-snippets" extension will be documented in this file. 4 | 5 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 6 | 7 | ## [Unreleased] 8 | 9 | - Initial release -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2019 Mike Huang 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Schematics Snippets 2 | 3 | Code snippets collection for writing [@angular-devkit/schematics](https://www.npmjs.com/package/@angular-devkit/schematics) 4 | 5 | ## Features 6 | 7 | - Generate schematic file: `F1` -> `Schematics: Generate A Schematic`. 8 | - Snippets: Use `sch-*` snippets to generate schematics related codes. 9 | - Sometimes we might use TypeScript Compiler API, there are `ts-*` snippets to generate some useful AST (Abstract Syntax Tree) manipulation code. 10 | - For the full generated code of snippet, see it [here](docs/). 11 | 12 | ### Generate schematic file 13 | 14 | ![featire: generate schematic file](docs/images/feat-generate-schematic.gif) 15 | 16 | ### Snippets 17 | 18 | #### In \*.ts 19 | 20 | 21 | 22 | | Snippet Name | Generated Code | Description | 23 | | ---------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------- | 24 | | `sch-default-function` | [code](docs/schematics/sch-default-function.md) | Generate an export function with schematics template | 25 | | `sch-rule` | [code](docs/schematics/sch-rule.md) | Generate a basic rule of schematics | 26 | | `sch-tree-create` | [code](docs/schematics/sch-tree-create.md) | Create a file to the tree | 27 | | `sch-tree-overwrite` | [code](docs/schematics/sch-tree-overwrite.md) | Overwrite a file content from the tree | 28 | | `sch-tree-delete` | [code](docs/schematics/sch-tree-delete.md) | Delete a file from the tree | 29 | | `sch-tree-delete-directory` | [code](docs/schematics/sch-tree-delete-directory.md) | Delete a directory from the tree | 30 | | `sch-tree-rename` | [code](docs/schematics/sch-tree-rename.md) | Rename a file from the tree | 31 | | `sch-tree-read` | [code](docs/schematics/sch-tree-read.md) | Read a file from the tree | 32 | | `sch-tree-exist` | [code](docs/schematics/sch-tree-exist.md) | Check a file exist in the tree | 33 | | `sch-import-external-schematic` | [code](docs/schematics/sch-import-external-schematic.md) | Import externalSchematic | 34 | | `sch-external-schematics` | [code](docs/schematics/sch-external-schematics.md) | Run external schematics | 35 | | `sch-import-chain` | [code](docs/schematics/sch-import-chain.md) | Import chain rule | 36 | | `sch-chain-rules` | [code](docs/schematics/sch-chain-rules.md) | Chain schematic rules | 37 | | `sch-import-apply-merge-templates` | [code](docs/schematics/sch-import-apply-merge-templates.md) | Import rules to apply and merge templates | 38 | | `sch-apply-merge-templates` | [code](docs/schematics/sch-apply-merge-templates.md) | Apply and merge templates | 39 | | `sch-read-json-file` | [code](docs/schematics/sch-read-json-file.md) | Read json file | 40 | | `sch-write-json-file` | [code](docs/schematics/sch-write-json-file.md) | Write json file | 41 | | `sch-create-json-file` | [code](docs/schematics/sch-create-json-file.md) | Create json file | 42 | | `sch-import-install-package-task` | [code](docs/schematics/sch-import-install-package-task.md) | Import install package task | 43 | | `sch-install-package` | [code](docs/schematics/sch-install-package.md) | Run install package task | 44 | | `sch-set-package-dependencies` | [code](docs/schematics/sch-set-package-dependencies.md) | Set dependencies to package.json | 45 | | `sch-set-package-dev-dependencies` | [code](docs/schematics/sch-set-package-dev-dependencies.md) | Set devDependencies to package.json | 46 | | `sch-set-package-scripts` | [code](docs/schematics/sch-set-package-scripts.md) | Set script to package.json | 47 | 48 | 49 | 50 | #### In schema.json 51 | 52 | 53 | 54 | | Snippet Name | Generated Code | Description | 55 | | ------------------------------- | ---------------------------------------------------- | ------------------------------------------------------- | 56 | | `sch-default-json` | [code](docs/schema/sch-default-json.md) | schema.json template | 57 | | `sch-property` | [code](docs/schema/sch-property.md) | Add a property to schema.json | 58 | | `sch-property-prompt-input` | [code](docs/schema/sch-property-prompt-input.md) | Add a property to schema.json contains prompt input | 59 | | `sch-property-prompt-yes-no` | [code](docs/schema/sch-property-prompt-yes-no.md) | Add a property to schema.json contains prompt Y/N | 60 | | `sch-property-prompt-selection` | [code](docs/schema/sch-property-prompt-selection.md) | Add a property to schema.json contains prompt selection | 61 | | `sch-property-dollar-default` | [code](docs/schema/sch-property-dollar-default.md) | Property $default | 62 | 63 | 64 | 65 | #### In collection.json 66 | 67 | 68 | 69 | | Snippet Name | Generated Code | Description | 70 | | --------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------ | 71 | | `sch-new-schematic-default` | [code](docs/collection/sch-new-schematic-default.md) | Add a schematic to collection.json by deafult function | 72 | | `sch-new-schematic-function-name` | [code](docs/collection/sch-new-schematic-function-name.md) | Add a schematic to collection.json by function name | 73 | | `sch-ng-add` | [code](docs/collection/sch-ng-add.md) | Add a schematic of "ng-add" to collection.json | 74 | 75 | 76 | 77 | ### TypeScript Compiler API Snippets 78 | 79 | 80 | 81 | | Snippet Name | Generated Code | Description | 82 | | ------------------ | ------------------------------------------- | ------------------------------ | 83 | | `ts-import` | [code](docs/typescript/ts-import.md) | Import TypeScript Compiler API | 84 | | `ts-string-to-ast` | [code](docs/typescript/ts-string-to-ast.md) | Convert string to AST node | 85 | | `ts-ast-to-code` | [code](docs/typescript/ts-ast-to-code.md) | Convert AST node to code | 86 | 87 | 88 | 89 | ## Release Notes 90 | 91 | ### 5.0.0 92 | 93 | - Generate a schematic set by `F1` -> `Schematics: Generate A Schematic`. 94 | - Add semicolon to single line snippet. 95 | 96 | ### 4.0.1 97 | 98 | - Because of some technical problem, now we are in 4.0.1 😜. 99 | 100 | ### 2.0.0 101 | 102 | - Now we support snippet in `schema.json` and `collection.json` separately. 103 | - In ver1, we use `sch-schema-*` and `sch-coll-*` to identify the snippet type in json file, but now we don't have to, so we remove `schema-` and `coll-` prefix. 104 | - Because it's a breaking change, so let's upgrade to `2.0.0` 105 | 106 | ### 1.0.0 107 | 108 | - Initially add snippets 109 | 110 | ## LICENSE 111 | 112 | MIT 113 | -------------------------------------------------------------------------------- /dist/extension.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | const vscode = require("vscode"); 4 | function activate(context) { 5 | let schemaJsonProvider = vscode.languages.registerCompletionItemProvider({ scheme: 'schema.json', language: 'json' }, { 6 | provideCompletionItems(document, _position, _token, _context) { 7 | console.error('event'); 8 | const completionItems = []; 9 | // const obj = JSON.parse(fs.readFileSync('~/snippets/schema-snippets.json').toString('UTF-8')); 10 | // console.log(obj); 11 | // Object.keys(obj).forEach(desc => { 12 | // const prefix = obj[desc]['prefix']; 13 | // const body = obj[desc]['body']; 14 | // const completion = new vscode.CompletionItem(prefix); 15 | // completion.insertText = new vscode.SnippetString(Array.isArray(body) ? (body as string[]).join('\n') : body); 16 | // completion.documentation = desc; 17 | // completionItems.push(completion); 18 | // }); 19 | // a simple completion item which inserts `Hello World!` 20 | const simpleCompletion = new vscode.CompletionItem('Hello World!'); 21 | // a completion item that inserts its text as snippet, 22 | // the `insertText`-property is a `SnippetString` which will be 23 | // honored by the editor. 24 | const snippetCompletion = new vscode.CompletionItem('Good part of the day'); 25 | snippetCompletion.insertText = new vscode.SnippetString('Good ${1|morning,afternoon,evening|}. It is ${1}, right?'); 26 | snippetCompletion.documentation = new vscode.MarkdownString('Inserts a snippet that lets you select the _appropriate_ part of the day for your greeting.'); 27 | completionItems.push(simpleCompletion); 28 | return completionItems; 29 | // a simple completion item which inserts `Hello World!` 30 | // const simpleCompletion = new vscode.CompletionItem('Hello World!'); 31 | // // a completion item that inserts its text as snippet, 32 | // // the `insertText`-property is a `SnippetString` which will be 33 | // // honored by the editor. 34 | // const snippetCompletion = new vscode.CompletionItem('Good part of the day'); 35 | // snippetCompletion.insertText = new vscode.SnippetString('Good ${1|morning,afternoon,evening|}. It is ${1}, right?'); 36 | // snippetCompletion.documentation = new vscode.MarkdownString( 37 | // 'Inserts a snippet that lets you select the _appropriate_ part of the day for your greeting.' 38 | // ); 39 | // // a completion item that can be accepted by a commit character, 40 | // // the `commitCharacters`-property is set which means that the completion will 41 | // // be inserted and then the character will be typed. 42 | // const commitCharacterCompletion = new vscode.CompletionItem('console'); 43 | // commitCharacterCompletion.commitCharacters = ['.']; 44 | // commitCharacterCompletion.documentation = new vscode.MarkdownString('Press `.` to get `console.`'); 45 | // // a completion item that retriggers IntelliSense when being accepted, 46 | // // the `command`-property is set which the editor will execute after 47 | // // completion has been inserted. Also, the `insertText` is set so that 48 | // // a space is inserted after `new` 49 | // const commandCompletion = new vscode.CompletionItem('new'); 50 | // commandCompletion.kind = vscode.CompletionItemKind.Keyword; 51 | // commandCompletion.insertText = 'new '; 52 | // commandCompletion.command = { command: 'editor.action.triggerSuggest', title: 'Re-trigger completions...' }; 53 | // // return all completion items as array 54 | // return [simpleCompletion, snippetCompletion, commitCharacterCompletion, commandCompletion]; 55 | } 56 | }); 57 | context.subscriptions.push(schemaJsonProvider); 58 | } 59 | exports.activate = activate; 60 | //# sourceMappingURL=extension.js.map -------------------------------------------------------------------------------- /dist/extension.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":";;AAAA,iCAAiC;AAEjC,SAAgB,QAAQ,CAAC,OAAgC;IACvD,IAAI,kBAAkB,GAAG,MAAM,CAAC,SAAS,CAAC,8BAA8B,CACtE,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,EAC3C;QACE,sBAAsB,CACpB,QAA6B,EAC7B,SAA0B,EAC1B,MAAgC,EAChC,QAAkC;YAElC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACvB,MAAM,eAAe,GAA4B,EAAE,CAAC;YACpD,gGAAgG;YAChG,oBAAoB;YACpB,qCAAqC;YACrC,wCAAwC;YACxC,oCAAoC;YAEpC,0DAA0D;YAC1D,kHAAkH;YAClH,qCAAqC;YAErC,sCAAsC;YACtC,MAAM;YAEL,wDAAwD;YACzD,MAAM,gBAAgB,GAAG,IAAI,MAAM,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;YAEnE,sDAAsD;YACtD,+DAA+D;YAC/D,yBAAyB;YACzB,MAAM,iBAAiB,GAAG,IAAI,MAAM,CAAC,cAAc,CAAC,sBAAsB,CAAC,CAAC;YAC5E,iBAAiB,CAAC,UAAU,GAAG,IAAI,MAAM,CAAC,aAAa,CAAC,0DAA0D,CAAC,CAAC;YACpH,iBAAiB,CAAC,aAAa,GAAG,IAAI,MAAM,CAAC,cAAc,CACzD,6FAA6F,CAC9F,CAAC;YAEF,eAAe,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YAEvC,OAAO,eAAe,CAAC;YACvB,wDAAwD;YACxD,sEAAsE;YAEtE,yDAAyD;YACzD,kEAAkE;YAClE,4BAA4B;YAC5B,+EAA+E;YAC/E,uHAAuH;YACvH,+DAA+D;YAC/D,kGAAkG;YAClG,KAAK;YAEL,mEAAmE;YACnE,iFAAiF;YACjF,uDAAuD;YACvD,0EAA0E;YAC1E,sDAAsD;YACtD,sGAAsG;YAEtG,yEAAyE;YACzE,uEAAuE;YACvE,yEAAyE;YACzE,qCAAqC;YACrC,8DAA8D;YAC9D,8DAA8D;YAC9D,yCAAyC;YACzC,+GAA+G;YAE/G,0CAA0C;YAC1C,8FAA8F;QAChG,CAAC;KACF,CACF,CAAC;IAEF,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;AACjD,CAAC;AA3ED,4BA2EC"} -------------------------------------------------------------------------------- /docs/collection/sch-new-schematic-default.md: -------------------------------------------------------------------------------- 1 | # sch-new-schematic-default 2 | 3 | Add a schematic to collection.json by deafult function 4 | 5 | ```typescript 6 | "${1:schematic-name}": { 7 | "description": "${2:Description.}", 8 | "factory": "./${1:schematic-name}", 9 | "schema": "./${1:schematic-name}/schema.json" 10 | } 11 | ``` 12 | -------------------------------------------------------------------------------- /docs/collection/sch-new-schematic-function-name.md: -------------------------------------------------------------------------------- 1 | # sch-new-schematic-function-name 2 | 3 | Add a schematic to collection.json by function name 4 | 5 | ```typescript 6 | "${1:schematic-name}": { 7 | "description": "${3:Description.}", 8 | "factory": "./${1:schematic-name}/index#${2:functionName}", 9 | "schema": "./${1:schematic-name}/schema.json" 10 | } 11 | ``` 12 | -------------------------------------------------------------------------------- /docs/collection/sch-ng-add.md: -------------------------------------------------------------------------------- 1 | # sch-ng-add 2 | 3 | Add a schematic of "ng-add" to collection.json 4 | 5 | ```typescript 6 | "ng-add": { 7 | "description": "${1:Description...}", 8 | "factory": "./ng-add" 9 | } 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/images/feat-generate-schematic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wellwind/vscode-schematics-snippets/8a36f19c9418eae71eb7cb56b356c9541e8bb0c5/docs/images/feat-generate-schematic.gif -------------------------------------------------------------------------------- /docs/schema/sch-default-json.md: -------------------------------------------------------------------------------- 1 | # sch-default-json 2 | 3 | schema.json template 4 | 5 | ```json 6 | { 7 | "schema": "http://json-schema.org/schema", 8 | "id": "${1:schematics-id}", 9 | "title": "${2:title}", 10 | "type": "object", 11 | "description": "${3:description}", 12 | "properties": {}, 13 | "required": [] 14 | } 15 | ``` 16 | -------------------------------------------------------------------------------- /docs/schema/sch-property-dollar-default.md: -------------------------------------------------------------------------------- 1 | # sch-property-dollar-default 2 | 3 | Property $default 4 | 5 | ```json 6 | "$$default": { 7 | "$$source": "argv", 8 | "index": 0 9 | } 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/schema/sch-property-prompt-input.md: -------------------------------------------------------------------------------- 1 | # sch-property-prompt-input 2 | 3 | Add a property to schema.json contains prompt input 4 | 5 | ```json 6 | "${1:property}": { 7 | "description": "${2:description}", 8 | "type": "string", 9 | "default": "${3:default}", 10 | "x-prompt": "${5:message}" 11 | } 12 | ``` 13 | -------------------------------------------------------------------------------- /docs/schema/sch-property-prompt-selection.md: -------------------------------------------------------------------------------- 1 | # sch-property-prompt-selection 2 | 3 | Add a property to schema.json contains prompt selection 4 | 5 | ```json 6 | "${1:property}": { 7 | "description": "${2:description}", 8 | "type": "${3:string}", 9 | "default": "${4:value1}", 10 | "x-prompt": { 11 | "message": "${5:message}", 12 | "type": "list", 13 | "items": [ 14 | { "value": "${6:value1}", "label": "${7:label1}" }, 15 | { "value": "${8:value2}", "label": "${9:label2}" } 16 | ] 17 | } 18 | } 19 | ``` 20 | -------------------------------------------------------------------------------- /docs/schema/sch-property-prompt-yes-no.md: -------------------------------------------------------------------------------- 1 | # sch-property-prompt-yes-no 2 | 3 | Add a property to schema.json contains prompt Y/N 4 | 5 | ```json 6 | "${1:property}": { 7 | "description": "${2:description}", 8 | "type": "boolean", 9 | "default": "${3:true}", 10 | "x-prompt": "${4:message}" 11 | } 12 | ``` 13 | -------------------------------------------------------------------------------- /docs/schema/sch-property.md: -------------------------------------------------------------------------------- 1 | # sch-property 2 | 3 | Add a property to schema.json 4 | 5 | ```json 6 | "${1:property}": { 7 | "description": "${2:description}", 8 | "type": "${3:string}", 9 | "default": "${4:default}" 10 | } 11 | ``` 12 | -------------------------------------------------------------------------------- /docs/schematics/sch-apply-merge-templates.md: -------------------------------------------------------------------------------- 1 | # sch-apply-merge-templates 2 | 3 | Apply and merge templates 4 | 5 | ```json 6 | const ${1:templateSource} = apply(url('${2:./files}'), [ 7 | applyTemplates({ 8 | classify: strings.classify, 9 | dasherize: strings.dasherize, 10 | name: options.name 11 | }), 12 | move(normalize(options.path as string)) 13 | ]); 14 | 15 | return chain([ 16 | mergeWith(${1:templateSource}) 17 | ]); 18 | ``` 19 | -------------------------------------------------------------------------------- /docs/schematics/sch-chain-rules.md: -------------------------------------------------------------------------------- 1 | # sch-chain-rules 2 | 3 | Chain schematic rules 4 | 5 | ```json 6 | chain([${1:rule1}, ${2:rule2}]); 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-create-json-file.md: -------------------------------------------------------------------------------- 1 | # sch-create-json-file 2 | 3 | Create json file 4 | 5 | ```json 6 | tree.create(${1:'angular.json'}, JSON.stringify(${2:jsonObject}, null, 2)); 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-default-function.md: -------------------------------------------------------------------------------- 1 | # sch-default-function 2 | 3 | Generate an export function with schematics template 4 | 5 | ```json 6 | import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics'; 7 | 8 | export default function ${1:index}(_options: any): Rule { 9 | return (tree: Tree, _context: SchematicContext) => { 10 | ${0} 11 | return tree; 12 | }; 13 | } 14 | ``` 15 | -------------------------------------------------------------------------------- /docs/schematics/sch-external-schematics.md: -------------------------------------------------------------------------------- 1 | # sch-external-schematics 2 | 3 | Run external schematics 4 | 5 | ```json 6 | externalSchematic('${1:collection}', '${2:schematic}', { 7 | ${3:...options} 8 | } 9 | }) 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/schematics/sch-import-apply-merge-templates.md: -------------------------------------------------------------------------------- 1 | # sch-import-apply-merge-templates 2 | 3 | Import rules to apply and merge templates 4 | 5 | ```json 6 | import { apply, url, applyTemplates, move, chain, mergeWith } from '@angular-devkit/schematics'; 7 | import { strings, normalize } from '@angular-devkit/core'; 8 | ``` 9 | -------------------------------------------------------------------------------- /docs/schematics/sch-import-chain.md: -------------------------------------------------------------------------------- 1 | # sch-import-chain 2 | 3 | Import chain rule 4 | 5 | ```json 6 | import { chain } from '@angular-devkit/schematics'; 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-import-external-schematic.md: -------------------------------------------------------------------------------- 1 | # sch-import-external-schematic 2 | 3 | Import externalSchematic 4 | 5 | ```json 6 | import { externalSchematic } from '@angular-devkit/schematics'; 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-import-install-package-task.md: -------------------------------------------------------------------------------- 1 | # sch-import-install-package-task 2 | 3 | Import install package task 4 | 5 | ```json 6 | import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-install-package.md: -------------------------------------------------------------------------------- 1 | # sch-install-package 2 | 3 | Run install package task 4 | 5 | ```json 6 | _context.addTask(new NodePackageInstallTask()); 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-read-json-file.md: -------------------------------------------------------------------------------- 1 | # sch-read-json-file 2 | 3 | Read json file 4 | 5 | ```json 6 | const ${1:content} = JSON.parse(tree.read(${2:'angular.json'}).toString('${3:UTF-8}')); 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-rule.md: -------------------------------------------------------------------------------- 1 | # sch-rule 2 | 3 | Generate a basic rule of schematics 4 | 5 | ```json 6 | function ${1:name}(${2:options}: ${3:any}): Rule { 7 | return (${4:tree}: Tree, ${5:context}: SchematicContext) => { 8 | ${6} 9 | return tree; 10 | }; 11 | } 12 | ``` 13 | -------------------------------------------------------------------------------- /docs/schematics/sch-set-package-dependencies.md: -------------------------------------------------------------------------------- 1 | # sch-set-package-dependencies 2 | 3 | Set dependencies to package.json 4 | 5 | ```json 6 | const content = JSON.parse(tree.read('package.json')!.toString('UTF-8')); 7 | content.dependencies['${1:package}'] = '${2:version}'; 8 | tree.overwrite('package.json', JSON.stringify(content, null, 2)); 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/schematics/sch-set-package-dev-dependencies.md: -------------------------------------------------------------------------------- 1 | # sch-set-package-dev-dependencies 2 | 3 | Set devDependencies to package.json 4 | 5 | ```json 6 | const content = JSON.parse(tree.read('package.json')!.toString('UTF-8')); 7 | content.devDependencies['${1:package}'] = '${2:version}'; 8 | tree.overwrite('package.json', JSON.stringify(content, null, 2)); 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/schematics/sch-set-package-scripts.md: -------------------------------------------------------------------------------- 1 | # sch-set-package-scripts 2 | 3 | Set script to package.json 4 | 5 | ```json 6 | const content = JSON.parse(tree.read('package.json')!.toString('UTF-8')); 7 | content.scripts['${1:alias}'] = '${2:command}'; 8 | tree.overwrite('package.json', JSON.stringify(content, null, 2)); 9 | ``` 10 | -------------------------------------------------------------------------------- /docs/schematics/sch-tree-create.md: -------------------------------------------------------------------------------- 1 | # sch-tree-create 2 | 3 | Create a file to the tree 4 | 5 | ```json 6 | tree.create(${1:path}, ${2:content}); 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-tree-delete-directory.md: -------------------------------------------------------------------------------- 1 | # sch-tree-delete-directory 2 | 3 | Delete a directory from the tree 4 | 5 | ```json 6 | tree.getDir(path).visit(filePath => tree.delete(filePath)); 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-tree-delete.md: -------------------------------------------------------------------------------- 1 | # sch-tree-delete 2 | 3 | Delete a file from the tree 4 | 5 | ```json 6 | tree.delete(${1:path}); 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-tree-exist.md: -------------------------------------------------------------------------------- 1 | # sch-tree-exist 2 | 3 | Check a file exist in the tree 4 | 5 | ```json 6 | tree.exist(${1:file}) 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-tree-overwrite.md: -------------------------------------------------------------------------------- 1 | # sch-tree-overwrite 2 | 3 | Overwrite a file content from the tree 4 | 5 | ```json 6 | tree.overwrite(${1:path}, ${2:content}); 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-tree-read.md: -------------------------------------------------------------------------------- 1 | # sch-tree-read 2 | 3 | Read a file from the tree 4 | 5 | ```json 6 | const ${1:content} = tree.read(${2:path}).toString('${3:UTF-8}'); 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-tree-rename.md: -------------------------------------------------------------------------------- 1 | # sch-tree-rename 2 | 3 | Rename a file from the tree 4 | 5 | ```json 6 | tree.rename(${1:from}, ${2:to}); 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/schematics/sch-write-json-file.md: -------------------------------------------------------------------------------- 1 | # sch-write-json-file 2 | 3 | Write json file 4 | 5 | ```json 6 | tree.overwrite(${1:'angular.json'}, JSON.stringify(${2:jsonObject}, null, 2)); 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/typescript/ts-ast-to-code.md: -------------------------------------------------------------------------------- 1 | # ts-ast-to-code 2 | 3 | Convert AST node to code 4 | 5 | ```typescript 6 | const resultFile = ts.createSourceFile( 7 | '', 8 | '', 9 | ts.ScriptTarget.Latest, 10 | /*setParentNodes*/ false, 11 | ts.ScriptKind.TS 12 | ); 13 | 14 | const printer = ts.createPrinter({ 15 | newLine: ts.NewLineKind.LineFeed 16 | }); 17 | 18 | const result = printer.printNode( 19 | ts.EmitHint.Unspecified, 20 | ${1:astNode}, 21 | resultFile 22 | ); 23 | ``` 24 | -------------------------------------------------------------------------------- /docs/typescript/ts-import.md: -------------------------------------------------------------------------------- 1 | # ts-import 2 | 3 | Import TypeScript Compiler API 4 | 5 | ```typescript 6 | import * as ts from 'typescript'; 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/typescript/ts-string-to-ast.md: -------------------------------------------------------------------------------- 1 | # ts-string-to-ast 2 | 3 | Convert string to AST node 4 | 5 | ```typescript 6 | const ${1:ast} = ts.createSourceFile('', ${2:content}, ${3:ts.ScriptTarget.Latest}); 7 | ``` 8 | -------------------------------------------------------------------------------- /document-generator.ts: -------------------------------------------------------------------------------- 1 | import { exec } from 'child_process'; 2 | import * as fs from 'fs'; 3 | import * as path from 'path'; 4 | import * as shell from 'shelljs'; 5 | const markdownTable = require('markdown-table'); 6 | 7 | interface Snippet { 8 | scope: string; 9 | prefix: string; 10 | body: string[] | string; 11 | } 12 | 13 | interface Snippets { 14 | [key: string]: Snippet; 15 | } 16 | 17 | const clearDocFolder = (docFolder: string) => { 18 | shell.rm('-rf', docFolder); 19 | shell.mkdir('-p', docFolder); 20 | }; 21 | 22 | const loadSnippets = (snippetPath: string) => { 23 | const data = fs.readFileSync(snippetPath); 24 | const snippets = JSON.parse(data.toString()) as Snippets; 25 | return snippets; 26 | }; 27 | 28 | const generateSnippetDocumentcontent = (key: string, snippet: Snippet, lang: string) => { 29 | const content = `# ${snippet.prefix} 30 | 31 | ${key} 32 | 33 | \`\`\`${lang} 34 | ${Array.isArray(snippet.body) ? snippet.body.join('\n') : snippet.body} 35 | \`\`\` 36 | `; 37 | return content; 38 | }; 39 | 40 | function createSnippetDocumentFiles(snippets: Snippets, docFolder: string, lang: string) { 41 | Object.keys(snippets).forEach(key => { 42 | const snippet = snippets[key]; 43 | const filePath = path.join(docFolder, `${snippet.prefix}.md`); 44 | const content = generateSnippetDocumentcontent(key, snippet, lang); 45 | fs.writeFileSync(filePath, content); 46 | }); 47 | } 48 | 49 | const replaceReadmeSnippets = (docFolder: string, snippets: Snippets, replaceBlock: string) => { 50 | const readmeTable = [ 51 | ['Snippet Name', 'Generated Code', 'Description'], 52 | ...Object.keys(snippets).map(key => { 53 | const snippet = snippets[key]; 54 | return [`\`${snippet.prefix}\``, `[code](${path.join(docFolder, snippet.prefix).replace(new RegExp(/\\/, 'g'), '/')}.md)`, key]; 55 | }) 56 | ]; 57 | 58 | const readme = fs.readFileSync('README.md').toString('UTF-8'); 59 | const regexString = `.+`; 60 | const replacedReadme = readme.replace( 61 | new RegExp(regexString, 's'), 62 | `\n\n${markdownTable(readmeTable)}\n\n` 63 | ); 64 | 65 | fs.writeFileSync('README.md', replacedReadme); 66 | }; 67 | 68 | const generateSnippetsDocument = (snippetPath: string, docFolder: string, replaceBlock: string, lang: string) => { 69 | clearDocFolder(docFolder); 70 | 71 | const snippets = loadSnippets(snippetPath); 72 | 73 | createSnippetDocumentFiles(snippets, docFolder, lang); 74 | replaceReadmeSnippets(docFolder, snippets, replaceBlock); 75 | }; 76 | 77 | generateSnippetsDocument('src/snippets/schematics-snippets.json', 'docs/schematics', 'Schematics', 'json'); 78 | generateSnippetsDocument('src/snippets/schema-snippets.json', 'docs/schema', 'Schema', 'json'); 79 | generateSnippetsDocument('src/snippets/collection-snippets.json', 'docs/collection', 'Collection', 'typescript'); 80 | generateSnippetsDocument('src/snippets/typescript-snippets.json', 'docs/typescript', 'TypeScript', 'typescript'); 81 | 82 | exec('git add .'); 83 | exec('git commit -m "chore(doc): update documents"'); 84 | 85 | console.info('Documents generated.'); 86 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wellwind/vscode-schematics-snippets/8a36f19c9418eae71eb7cb56b356c9541e8bb0c5/icon.png -------------------------------------------------------------------------------- /icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | labs 6 | 7 | 8 | Layer 1 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vscode-schematics-snippets", 3 | "displayName": "Schematics Snippets", 4 | "description": "Code snippets collection for writing @angular-devkit/schematics", 5 | "publisher": "mikehuang", 6 | "version": "5.0.2", 7 | "scripts": { 8 | "build": "tsc -p tsconfig.json", 9 | "vsce:publish": "vsce publish", 10 | "vsce:publish:patch": "vsce publish patch", 11 | "vsce:publish:minor": "vsce publish minor", 12 | "vsce:publish:major": "vsce publish major", 13 | "vsce:package": "vsce package", 14 | "gen:document": "ts-node document-generator.ts" 15 | }, 16 | "engines": { 17 | "vscode": "^1.39.0" 18 | }, 19 | "categories": [ 20 | "Snippets", 21 | "Other" 22 | ], 23 | "icon": "icon.png", 24 | "activationEvents": [ 25 | "onLanguage:typescript", 26 | "onLanguage:json", 27 | "onCommand:schematicToolkit.genSchematic" 28 | ], 29 | "main": "src/extension.js", 30 | "contributes": { 31 | "commands": [ 32 | { 33 | "command": "schematicToolkit.genSchematic", 34 | "title": "Schematics: Generate A Schematic" 35 | } 36 | ] 37 | }, 38 | "repository": { 39 | "type": "git", 40 | "url": "https://github.com/wellwind/vscode-schematics-snippets.git" 41 | }, 42 | "license": "MIT", 43 | "keywords": [ 44 | "schematics", 45 | "typescript", 46 | "code snippets" 47 | ], 48 | "devDependencies": { 49 | "@types/node": "^12.7.7", 50 | "@types/prettier": "^1.18.2", 51 | "@types/shelljs": "^0.8.5", 52 | "@types/vscode": "^1.39.0", 53 | "markdown-table": "^1.1.3", 54 | "shelljs": "^0.8.3", 55 | "ts-node": "^8.4.1", 56 | "typescript": "^3.6.3", 57 | "vsce": "^1.66.0" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/extension.ts: -------------------------------------------------------------------------------- 1 | import * as vscode from 'vscode'; 2 | import { registerCodeSnippets } from './register-code-snippets'; 3 | import { registerFileGenCommands } from './register-file-gen-commands'; 4 | 5 | export function activate(context: vscode.ExtensionContext) { 6 | registerCodeSnippets(context); 7 | registerFileGenCommands(context); 8 | } 9 | -------------------------------------------------------------------------------- /src/register-code-snippets.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | const fs = require("fs"); 4 | const path = require("path"); 5 | const vscode = require("vscode"); 6 | const collectionObj = JSON.parse(fs.readFileSync(path.join(__dirname, 'snippets', 'collection-snippets.json')).toString('UTF-8')); 7 | const schemaObj = JSON.parse(fs.readFileSync(path.join(__dirname, 'snippets', 'schema-snippets.json')).toString('UTF-8')); 8 | const schematicsObj = JSON.parse(fs.readFileSync(path.join(__dirname, 'snippets', 'schematics-snippets.json')).toString('UTF-8')); 9 | const typescriptObj = JSON.parse(fs.readFileSync(path.join(__dirname, 'snippets', 'typescript-snippets.json')).toString('UTF-8')); 10 | const generateCompletionItems = (obj, selector) => { 11 | return vscode.languages.registerCompletionItemProvider(selector, { 12 | provideCompletionItems(_document, _position, _token, _context) { 13 | const completionItems = []; 14 | Object.keys(obj).forEach(desc => { 15 | const prefix = obj[desc]['prefix']; 16 | const body = obj[desc]['body']; 17 | const snippet = Array.isArray(body) ? body.join('\n') : body; 18 | const completion = new vscode.CompletionItem(prefix); 19 | completion.insertText = new vscode.SnippetString(snippet); 20 | completion.documentation = new vscode.MarkdownString(desc); 21 | completionItems.push(completion); 22 | }); 23 | return completionItems; 24 | } 25 | }); 26 | }; 27 | function registerCodeSnippets(context) { 28 | let collectionJsonProvider = generateCompletionItems(collectionObj, { scheme: 'file', pattern: '**/collection.json', language: 'json' }); 29 | let schemaJsonProvider = generateCompletionItems(schemaObj, { scheme: 'file', pattern: '**/schema.json', language: 'json' }); 30 | let schematicsTsProvider = generateCompletionItems(schematicsObj, { language: 'typescript' }); 31 | let typescriptHelpersProvider = generateCompletionItems(typescriptObj, { language: 'typescript' }); 32 | context.subscriptions.push(collectionJsonProvider, schemaJsonProvider, schematicsTsProvider, typescriptHelpersProvider); 33 | } 34 | exports.registerCodeSnippets = registerCodeSnippets; 35 | //# sourceMappingURL=register-code-snippets.js.map -------------------------------------------------------------------------------- /src/register-code-snippets.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"register-code-snippets.js","sourceRoot":"","sources":["register-code-snippets.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,6BAA6B;AAC7B,iCAAiC;AAEjC,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,0BAA0B,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAClI,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,sBAAsB,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAC1H,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,0BAA0B,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAClI,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,0BAA0B,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAElI,MAAM,uBAAuB,GAAG,CAAC,GAAQ,EAAE,QAAiC,EAAE,EAAE;IAC9E,OAAO,MAAM,CAAC,SAAS,CAAC,8BAA8B,CAAC,QAAQ,EAAE;QAC/D,sBAAsB,CACpB,SAA8B,EAC9B,SAA0B,EAC1B,MAAgC,EAChC,QAAkC;YAElC,MAAM,eAAe,GAA4B,EAAE,CAAC;YAEpD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBAC9B,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;gBACnC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;gBAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE,IAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC3E,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;gBACrD,UAAU,CAAC,UAAU,GAAG,IAAI,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;gBAC1D,UAAU,CAAC,aAAa,GAAG,IAAI,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;gBAE3D,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;YAEH,OAAO,eAAe,CAAC;QACzB,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,SAAgB,oBAAoB,CAAC,OAAgC;IACnE,IAAI,sBAAsB,GAAG,uBAAuB,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IACzI,IAAI,kBAAkB,GAAG,uBAAuB,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7H,IAAI,oBAAoB,GAAG,uBAAuB,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC;IAC9F,IAAI,yBAAyB,GAAG,uBAAuB,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC;IACnG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,sBAAsB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,yBAAyB,CAAC,CAAC;AAC1H,CAAC;AAND,oDAMC"} -------------------------------------------------------------------------------- /src/register-code-snippets.ts: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | import * as path from 'path'; 3 | import * as vscode from 'vscode'; 4 | 5 | const collectionObj = JSON.parse(fs.readFileSync(path.join(__dirname, 'snippets', 'collection-snippets.json')).toString('UTF-8')); 6 | const schemaObj = JSON.parse(fs.readFileSync(path.join(__dirname, 'snippets', 'schema-snippets.json')).toString('UTF-8')); 7 | const schematicsObj = JSON.parse(fs.readFileSync(path.join(__dirname, 'snippets', 'schematics-snippets.json')).toString('UTF-8')); 8 | const typescriptObj = JSON.parse(fs.readFileSync(path.join(__dirname, 'snippets', 'typescript-snippets.json')).toString('UTF-8')); 9 | 10 | const generateCompletionItems = (obj: any, selector: vscode.DocumentSelector) => { 11 | return vscode.languages.registerCompletionItemProvider(selector, { 12 | provideCompletionItems( 13 | _document: vscode.TextDocument, 14 | _position: vscode.Position, 15 | _token: vscode.CancellationToken, 16 | _context: vscode.CompletionContext 17 | ) { 18 | const completionItems: vscode.CompletionItem[] = []; 19 | 20 | Object.keys(obj).forEach(desc => { 21 | const prefix = obj[desc]['prefix']; 22 | const body = obj[desc]['body']; 23 | const snippet = Array.isArray(body) ? (body as string[]).join('\n') : body; 24 | const completion = new vscode.CompletionItem(prefix); 25 | completion.insertText = new vscode.SnippetString(snippet); 26 | completion.documentation = new vscode.MarkdownString(desc); 27 | 28 | completionItems.push(completion); 29 | }); 30 | 31 | return completionItems; 32 | } 33 | }); 34 | }; 35 | 36 | export function registerCodeSnippets(context: vscode.ExtensionContext) { 37 | let collectionJsonProvider = generateCompletionItems(collectionObj, { scheme: 'file', pattern: '**/collection.json', language: 'json' }); 38 | let schemaJsonProvider = generateCompletionItems(schemaObj, { scheme: 'file', pattern: '**/schema.json', language: 'json' }); 39 | let schematicsTsProvider = generateCompletionItems(schematicsObj, { language: 'typescript' }); 40 | let typescriptHelpersProvider = generateCompletionItems(typescriptObj, { language: 'typescript' }); 41 | context.subscriptions.push(collectionJsonProvider, schemaJsonProvider, schematicsTsProvider, typescriptHelpersProvider); 42 | } 43 | -------------------------------------------------------------------------------- /src/register-file-gen-commands.ts: -------------------------------------------------------------------------------- 1 | import * as fs from "fs"; 2 | import * as path from "path"; 3 | import * as vscode from "vscode"; 4 | import { camelize, dasherize } from "./utils/string"; 5 | 6 | const generateSchematic = (collectionPath: string, name: string) => { 7 | const dirName = path.join(path.dirname(collectionPath), dasherize(name)); 8 | const indexFilePath = path.join(dirName, "index.ts"); 9 | const schemaFilePath = path.join(dirName, "schema.json"); 10 | if (!fs.existsSync(dirName)) { 11 | fs.mkdirSync(dirName); 12 | } 13 | 14 | const indexContent = `import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics'; 15 | 16 | export function ${camelize(name)}(_options: any): Rule { 17 | return (tree: Tree, _context: SchematicContext) => { 18 | 19 | return tree; 20 | }; 21 | } 22 | `; 23 | fs.writeFileSync(indexFilePath, indexContent); 24 | 25 | const schemaContent = `{ 26 | "schema": "http://json-schema.org/schema", 27 | "id": "${name}", 28 | "title": "${name}", 29 | "type": "object", 30 | "description": "${name}", 31 | "properties": {}, 32 | "required": [] 33 | } 34 | `; 35 | 36 | fs.writeFileSync(schemaFilePath, schemaContent); 37 | 38 | vscode.window.showTextDocument(vscode.Uri.parse(schemaFilePath)); 39 | vscode.window.showTextDocument(vscode.Uri.parse(indexFilePath)); 40 | }; 41 | 42 | const updateCollectionJson = (path: string, name: string) => { 43 | const collectionJson = JSON.parse(fs.readFileSync(path).toString("UTF-8")); 44 | 45 | collectionJson.schematics[name] = { 46 | description: name, 47 | factory: `./${dasherize(name)}/index#${camelize(name)}`, 48 | schema: `./${dasherize(name)}/schema.json` 49 | }; 50 | fs.writeFileSync(path, JSON.stringify(collectionJson, null, 2)); 51 | vscode.window.showTextDocument(vscode.Uri.parse(path)); 52 | }; 53 | 54 | const isSchemaWorkspace = async () => { 55 | const packageJsonFilePath = getPackageJsonFilePath(); 56 | const foundPackageFile = fs.existsSync(packageJsonFilePath); 57 | 58 | if (foundPackageFile) { 59 | const collectionFilePath = getCollectionFilePath() || ""; 60 | if (collectionFilePath) { 61 | const collectionFilePhysicalPath = getPhysicalFilePath( 62 | collectionFilePath 63 | ); 64 | 65 | const foundCollectionFile = fs.existsSync(collectionFilePhysicalPath); 66 | if (foundCollectionFile) { 67 | return true; 68 | } 69 | } 70 | } 71 | return false; 72 | }; 73 | 74 | const getPhysicalFilePath = (file: string) => { 75 | return path.join(vscode.workspace.rootPath || "", file || ""); 76 | }; 77 | 78 | const getCollectionFilePath = () => { 79 | const packageJsonFilePath = getPackageJsonFilePath(); 80 | const packageJsonContent = JSON.parse( 81 | fs.readFileSync(packageJsonFilePath).toString("UTF-8") 82 | ); 83 | const collectionFilePath = packageJsonContent.schematics; 84 | return collectionFilePath; 85 | }; 86 | 87 | const getPackageJsonFilePath = () => { 88 | const workspaceRoot = vscode.workspace.rootPath; 89 | const packageJsonFilePath = path.join(workspaceRoot || "", "package.json"); 90 | return packageJsonFilePath; 91 | }; 92 | 93 | export function registerFileGenCommands(context: vscode.ExtensionContext) { 94 | const command = "schematicToolkit.genSchematic"; 95 | 96 | const commandHandler = async () => { 97 | if (isSchemaWorkspace()) { 98 | const collectionFilePath = getCollectionFilePath() || ""; 99 | const collectionFilePhysicalPath = getPhysicalFilePath( 100 | collectionFilePath 101 | ); 102 | 103 | const collectionJson = JSON.parse( 104 | fs.readFileSync(collectionFilePhysicalPath).toString("UTF-8") 105 | ); 106 | const schemaName = 107 | (await vscode.window.showInputBox({ prompt: "Schematic Name:" })) || ""; 108 | 109 | if (schemaName) { 110 | if (collectionJson.schematics[dasherize(schemaName)]) { 111 | vscode.window.showErrorMessage("This schematic name is exist."); 112 | return; 113 | } else { 114 | updateCollectionJson(collectionFilePhysicalPath, schemaName); 115 | generateSchematic(collectionFilePhysicalPath, schemaName); 116 | } 117 | } 118 | } else { 119 | vscode.window.showErrorMessage("You are not in a schematic workspace."); 120 | } 121 | }; 122 | 123 | context.subscriptions.push( 124 | vscode.commands.registerCommand(command, commandHandler) 125 | ); 126 | } 127 | -------------------------------------------------------------------------------- /src/snippets/collection-snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "Add a schematic to collection.json by deafult function": { 3 | "prefix": "sch-new-schematic-default", 4 | "body": [ 5 | "\"${1:schematic-name}\": {", 6 | " \"description\": \"${2:Description.}\",", 7 | " \"factory\": \"./${1:schematic-name}\",", 8 | " \"schema\": \"./${1:schematic-name}/schema.json\"", 9 | "}" 10 | ] 11 | }, 12 | "Add a schematic to collection.json by function name": { 13 | "prefix": "sch-new-schematic-function-name", 14 | "body": [ 15 | "\"${1:schematic-name}\": {", 16 | " \"description\": \"${3:Description.}\",", 17 | " \"factory\": \"./${1:schematic-name}/index#${2:functionName}\",", 18 | " \"schema\": \"./${1:schematic-name}/schema.json\"", 19 | "}" 20 | ] 21 | }, 22 | "Add a schematic of \"ng-add\" to collection.json": { 23 | "prefix": "sch-ng-add", 24 | "body": [ 25 | "\"ng-add\": {", 26 | " \"description\": \"${1:Description...}\",", 27 | " \"factory\": \"./ng-add\"", 28 | "}" 29 | ] 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/snippets/schema-snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "schema.json template": { 3 | "prefix": "sch-default-json", 4 | "body": [ 5 | "{", 6 | " \"schema\": \"http://json-schema.org/schema\",", 7 | " \"id\": \"${1:schematics-id}\",", 8 | " \"title\": \"${2:title}\",", 9 | " \"type\": \"object\",", 10 | " \"description\": \"${3:description}\",", 11 | " \"properties\": {},", 12 | " \"required\": []", 13 | "}" 14 | ] 15 | }, 16 | "Add a property to schema.json": { 17 | "prefix": "sch-property", 18 | "body": [ 19 | "\"${1:property}\": {", 20 | " \"description\": \"${2:description}\",", 21 | " \"type\": \"${3:string}\",", 22 | " \"default\": \"${4:default}\"", 23 | "}" 24 | ] 25 | }, 26 | "Add a property to schema.json contains prompt input": { 27 | "prefix": "sch-property-prompt-input", 28 | "body": [ 29 | "\"${1:property}\": {", 30 | " \"description\": \"${2:description}\",", 31 | " \"type\": \"string\",", 32 | " \"default\": \"${3:default}\",", 33 | " \"x-prompt\": \"${5:message}\"", 34 | "}" 35 | ] 36 | }, 37 | "Add a property to schema.json contains prompt Y/N": { 38 | "prefix": "sch-property-prompt-yes-no", 39 | "body": [ 40 | "\"${1:property}\": {", 41 | " \"description\": \"${2:description}\",", 42 | " \"type\": \"boolean\",", 43 | " \"default\": ${3:true},", 44 | " \"x-prompt\": \"${4:message}\"", 45 | "}" 46 | ] 47 | }, 48 | "Add a property to schema.json contains prompt selection": { 49 | "prefix": "sch-property-prompt-selection", 50 | "body": [ 51 | "\"${1:property}\": {", 52 | " \"description\": \"${2:description}\",", 53 | " \"type\": \"${3:string}\",", 54 | " \"default\": \"${4:value1}\",", 55 | " \"x-prompt\": {", 56 | " \"message\": \"${5:message}\",", 57 | " \"type\": \"list\",", 58 | " \"items\": [", 59 | " { \"value\": \"${6:value1}\", \"label\": \"${7:label1}\" },", 60 | " { \"value\": \"${8:value2}\", \"label\": \"${9:label2}\" }", 61 | " ]", 62 | " }", 63 | "}" 64 | ] 65 | }, 66 | "Property $default": { 67 | "prefix": "sch-property-dollar-default", 68 | "body": [ 69 | "\"$${1:default}\": {", 70 | " \"$${2:source}\": \"argv\",", 71 | " \"index\": 0", 72 | "}" 73 | ] 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/snippets/schematics-snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "Generate an export function with schematics template": { 3 | "prefix": "sch-default-function", 4 | "body": [ 5 | "import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';", 6 | "", 7 | "export default function ${1:index}(_options: any): Rule {", 8 | " return (tree: Tree, _context: SchematicContext) => {", 9 | " ${0}", 10 | " return tree;", 11 | " };", 12 | "}" 13 | ] 14 | }, 15 | "Generate a basic rule of schematics": { 16 | "prefix": "sch-rule", 17 | "body": [ 18 | "function ${1:name}(${2:options}: ${3:any}): Rule {", 19 | " return (${4:tree}: Tree, ${5:context}: SchematicContext) => {", 20 | " ${6}", 21 | " return tree;", 22 | " };", 23 | "}" 24 | ] 25 | }, 26 | "Create a file to the tree": { 27 | "prefix": "sch-tree-create", 28 | "body": "tree.create(${1:path}, ${2:content});" 29 | }, 30 | "Overwrite a file content from the tree": { 31 | "prefix": "sch-tree-overwrite", 32 | "body": "tree.overwrite(${1:path}, ${2:content});" 33 | }, 34 | "Delete a file from the tree": { 35 | "prefix": "sch-tree-delete", 36 | "body": "tree.delete(${1:path});" 37 | }, 38 | "Delete a directory from the tree": { 39 | "prefix": "sch-tree-delete-directory", 40 | "body": "tree.getDir(path).visit(filePath => tree.delete(filePath));" 41 | }, 42 | "Rename a file from the tree": { 43 | "prefix": "sch-tree-rename", 44 | "body": "tree.rename(${1:from}, ${2:to});" 45 | }, 46 | "Read a file from the tree": { 47 | "prefix": "sch-tree-read", 48 | "body": "const ${1:content} = tree.read(${2:path}).toString('${3:UTF-8}');" 49 | }, 50 | "Check a file exist in the tree": { 51 | "prefix": "sch-tree-exist", 52 | "body": "tree.exist(${1:file})" 53 | }, 54 | "Import externalSchematic": { 55 | "prefix": "sch-import-external-schematic", 56 | "body": "import { externalSchematic } from '@angular-devkit/schematics';" 57 | }, 58 | "Run external schematics": { 59 | "prefix": "sch-external-schematics", 60 | "body": [ 61 | "externalSchematic('${1:collection}', '${2:schematic}', {", 62 | " ${3:...options}", 63 | " }", 64 | "})" 65 | ] 66 | }, 67 | "Import chain rule": { 68 | "prefix": "sch-import-chain", 69 | "body": "import { chain } from '@angular-devkit/schematics';" 70 | }, 71 | "Chain schematic rules": { 72 | "prefix": "sch-chain-rules", 73 | "body": [ 74 | "chain([${1:rule1}, ${2:rule2}]);" 75 | ] 76 | }, 77 | "Import rules to apply and merge templates": { 78 | "prefix": "sch-import-apply-merge-templates", 79 | "body": [ 80 | "import { apply, url, applyTemplates, move, chain, mergeWith } from '@angular-devkit/schematics';", 81 | "import { strings, normalize } from '@angular-devkit/core';" 82 | ] 83 | }, 84 | "Apply and merge templates": { 85 | "prefix": "sch-apply-merge-templates", 86 | "body": [ 87 | "const ${1:templateSource} = apply(url('${2:./files}'), [", 88 | " applyTemplates({", 89 | " classify: strings.classify,", 90 | " dasherize: strings.dasherize,", 91 | " name: options.name", 92 | " }),", 93 | " move(normalize(options.path as string))", 94 | "]);", 95 | "", 96 | "return chain([", 97 | " mergeWith(${1:templateSource})", 98 | "]);" 99 | ] 100 | }, 101 | "Read json file": { 102 | "prefix": "sch-read-json-file", 103 | "body": "const ${1:content} = JSON.parse(tree.read(${2:'angular.json'}).toString('${3:UTF-8}'));" 104 | }, 105 | "Write json file": { 106 | "prefix": "sch-write-json-file", 107 | "body": "tree.overwrite(${1:'angular.json'}, JSON.stringify(${2:jsonObject}, null, 2));" 108 | }, 109 | "Create json file": { 110 | "prefix": "sch-create-json-file", 111 | "body": "tree.create(${1:'angular.json'}, JSON.stringify(${2:jsonObject}, null, 2));" 112 | }, 113 | "Import install package task": { 114 | "prefix": "sch-import-install-package-task", 115 | "body": "import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';" 116 | }, 117 | "Run install package task": { 118 | "prefix": "sch-install-package", 119 | "body": "_context.addTask(new NodePackageInstallTask());" 120 | }, 121 | "Set dependencies to package.json": { 122 | "prefix": "sch-set-package-dependencies", 123 | "body": [ 124 | "const content = JSON.parse(tree.read('package.json')!.toString('UTF-8'));", 125 | "content.dependencies['${1:package}'] = '${2:version}';", 126 | "tree.overwrite('package.json', JSON.stringify(content, null, 2));" 127 | ] 128 | }, 129 | "Set devDependencies to package.json": { 130 | "prefix": "sch-set-package-dev-dependencies", 131 | "body": [ 132 | "const content = JSON.parse(tree.read('package.json')!.toString('UTF-8'));", 133 | "content.devDependencies['${1:package}'] = '${2:version}';", 134 | "tree.overwrite('package.json', JSON.stringify(content, null, 2));" 135 | ] 136 | }, 137 | "Set script to package.json": { 138 | "prefix": "sch-set-package-scripts", 139 | "body": [ 140 | "const content = JSON.parse(tree.read('package.json')!.toString('UTF-8'));", 141 | "content.scripts['${1:alias}'] = '${2:command}';", 142 | "tree.overwrite('package.json', JSON.stringify(content, null, 2));" 143 | ] 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /src/snippets/typescript-snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "Import TypeScript Compiler API": { 3 | "prefix": "ts-import", 4 | "body": "import * as ts from 'typescript';" 5 | }, 6 | "Convert string to AST node": { 7 | "prefix": "ts-string-to-ast", 8 | "body": "const ${1:ast} = ts.createSourceFile('', ${2:content}, ${3:ts.ScriptTarget.Latest});" 9 | }, 10 | "Convert AST node to code": { 11 | "prefix": "ts-ast-to-code", 12 | "body": [ 13 | "const resultFile = ts.createSourceFile(", 14 | " '',", 15 | " '',", 16 | " ts.ScriptTarget.Latest,", 17 | " /*setParentNodes*/ false,", 18 | " ts.ScriptKind.TS", 19 | ");", 20 | "", 21 | "const printer = ts.createPrinter({", 22 | " newLine: ts.NewLineKind.LineFeed", 23 | "});", 24 | "", 25 | "const result = printer.printNode(", 26 | " ts.EmitHint.Unspecified,", 27 | " ${1:astNode},", 28 | " resultFile", 29 | ");" 30 | ] 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/utils/string.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.dasherize = (str) => { 4 | return exports.decamelize(str).replace((/[ _]/g), '-'); 5 | }; 6 | exports.decamelize = (str) => { 7 | return str.replace((/([a-z\d])([A-Z])/g), '$1_$2').toLowerCase(); 8 | }; 9 | exports.camelize = (str) => { 10 | return str 11 | .replace(/(-|_|\.|\s)+(.)?/g, (_match, _separator, chr) => { 12 | return chr ? chr.toUpperCase() : ''; 13 | }) 14 | .replace(/^([A-Z])/, (match) => match.toLowerCase()); 15 | }; 16 | //# sourceMappingURL=string.js.map -------------------------------------------------------------------------------- /src/utils/string.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"string.js","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":";;AAAa,QAAA,SAAS,GAAG,CAAC,GAAW,EAAU,EAAE;IAC/C,OAAO,kBAAU,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC;AACjD,CAAC,CAAA;AAEY,QAAA,UAAU,GAAG,CAAC,GAAW,EAAU,EAAE;IAChD,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;AACnE,CAAC,CAAA;AAEY,QAAA,QAAQ,GAAG,CAAC,GAAW,EAAS,EAAE;IAC7C,OAAO,GAAG;SACP,OAAO,CAAC,mBAAmB,EAAE,CAAC,MAAc,EAAE,UAAkB,EAAE,GAAW,EAAE,EAAE;QAChF,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACtC,CAAC,CAAC;SACD,OAAO,CAAC,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;AACjE,CAAC,CAAC"} -------------------------------------------------------------------------------- /src/utils/string.ts: -------------------------------------------------------------------------------- 1 | export const dasherize = (str: string): string => { 2 | return decamelize(str).replace((/[ _]/g), '-'); 3 | } 4 | 5 | export const decamelize = (str: string): string => { 6 | return str.replace((/([a-z\d])([A-Z])/g), '$1_$2').toLowerCase(); 7 | } 8 | 9 | export const camelize = (str: string):string => { 10 | return str 11 | .replace(/(-|_|\.|\s)+(.)?/g, (_match: string, _separator: string, chr: string) => { 12 | return chr ? chr.toUpperCase() : ''; 13 | }) 14 | .replace(/^([A-Z])/, (match: string) => match.toLowerCase()); 15 | }; 16 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "sourceMap": true, 6 | "strict": true, 7 | "rootDir": "src" 8 | }, 9 | "exclude": ["node_modules", "document-generator.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /vsc-extension-quickstart.md: -------------------------------------------------------------------------------- 1 | # Welcome to your VS Code Extension 2 | 3 | ## What's in the folder 4 | 5 | * This folder contains all of the files necessary for your extension. 6 | * `package.json` - this is the manifest file that defines the location of the snippet file and specifies the language of the snippets. 7 | * `snippets/snippets.json` - the file containing all snippets. 8 | 9 | ## Get up and running straight away 10 | 11 | * Press `F5` to open a new window with your extension loaded. 12 | * Create a new file with a file name suffix matching your language. 13 | * Verify that your snippets are proposed on intellisense. 14 | 15 | ## Make changes 16 | 17 | * You can relaunch the extension from the debug toolbar after making changes to the files listed above. 18 | * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. 19 | 20 | ## Install your extension 21 | 22 | * To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code. 23 | * To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. 24 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/events@*": 6 | version "3.0.0" 7 | resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" 8 | integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== 9 | 10 | "@types/glob@*": 11 | version "7.1.1" 12 | resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" 13 | integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== 14 | dependencies: 15 | "@types/events" "*" 16 | "@types/minimatch" "*" 17 | "@types/node" "*" 18 | 19 | "@types/minimatch@*": 20 | version "3.0.3" 21 | resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" 22 | integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== 23 | 24 | "@types/node@*", "@types/node@^12.7.7": 25 | version "12.7.7" 26 | resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.7.tgz#f9bd8c00fa9e1a8129af910fc829f6139c397d6c" 27 | integrity sha512-4jUncNe2tj1nmrO/34PsRpZqYVnRV1svbU78cKhuQKkMntKB/AmdLyGgswcZKjFHEHGpiY8pVD8CuVI55nP54w== 28 | 29 | "@types/prettier@^1.18.2": 30 | version "1.18.2" 31 | resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.18.2.tgz#069e7d132024d436fd1f5771f6932426a695f230" 32 | integrity sha512-2JBasa5Qaj81Qsp/dxX2Njy+MdKC767WytHUDsRM7TYEfQvKPxsnGpnCBlBS1i2Aiv1YwCpmKSbQ6O6v8TpiKg== 33 | 34 | "@types/shelljs@^0.8.5": 35 | version "0.8.5" 36 | resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.5.tgz#1e507b2f6d1f893269bd3e851ec24419ef9beeea" 37 | integrity sha512-bZgjwIWu9gHCjirKJoOlLzGi5N0QgZ5t7EXEuoqyWCHTuSddURXo3FOBYDyRPNOWzZ6NbkLvZnVkn483Y/tvcQ== 38 | dependencies: 39 | "@types/glob" "*" 40 | "@types/node" "*" 41 | 42 | "@types/vscode@^1.39.0": 43 | version "1.39.0" 44 | resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.39.0.tgz#46c257df4833ff4c1e6806f0406a873fb79672dd" 45 | integrity sha512-rlg0okXDt7NjAyHXbZ2nO1I/VY/8y9w67ltLRrOxXQ46ayvrYZavD4A6zpYrGbs2+ZOEQzcUs+QZOqcVGQIxXQ== 46 | 47 | ansi-styles@^3.2.1: 48 | version "3.2.1" 49 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 50 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== 51 | dependencies: 52 | color-convert "^1.9.0" 53 | 54 | arg@^4.1.0: 55 | version "4.1.1" 56 | resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.1.tgz#485f8e7c390ce4c5f78257dbea80d4be11feda4c" 57 | integrity sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw== 58 | 59 | argparse@^1.0.7: 60 | version "1.0.10" 61 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" 62 | integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== 63 | dependencies: 64 | sprintf-js "~1.0.2" 65 | 66 | azure-devops-node-api@^7.2.0: 67 | version "7.2.0" 68 | resolved "https://registry.yarnpkg.com/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz#131d4e01cf12ebc6e45569b5e0c5c249e4114d6d" 69 | integrity sha512-pMfGJ6gAQ7LRKTHgiRF+8iaUUeGAI0c8puLaqHLc7B8AR7W6GJLozK9RFeUHFjEGybC9/EB3r67WPd7e46zQ8w== 70 | dependencies: 71 | os "0.1.1" 72 | tunnel "0.0.4" 73 | typed-rest-client "1.2.0" 74 | underscore "1.8.3" 75 | 76 | balanced-match@^1.0.0: 77 | version "1.0.0" 78 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 79 | integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= 80 | 81 | boolbase@~1.0.0: 82 | version "1.0.0" 83 | resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" 84 | integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= 85 | 86 | brace-expansion@^1.1.7: 87 | version "1.1.11" 88 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 89 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 90 | dependencies: 91 | balanced-match "^1.0.0" 92 | concat-map "0.0.1" 93 | 94 | buffer-crc32@~0.2.3: 95 | version "0.2.13" 96 | resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" 97 | integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= 98 | 99 | buffer-from@^1.0.0: 100 | version "1.1.1" 101 | resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" 102 | integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== 103 | 104 | chalk@^2.4.2: 105 | version "2.4.2" 106 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" 107 | integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== 108 | dependencies: 109 | ansi-styles "^3.2.1" 110 | escape-string-regexp "^1.0.5" 111 | supports-color "^5.3.0" 112 | 113 | cheerio@^1.0.0-rc.1: 114 | version "1.0.0-rc.3" 115 | resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.3.tgz#094636d425b2e9c0f4eb91a46c05630c9a1a8bf6" 116 | integrity sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA== 117 | dependencies: 118 | css-select "~1.2.0" 119 | dom-serializer "~0.1.1" 120 | entities "~1.1.1" 121 | htmlparser2 "^3.9.1" 122 | lodash "^4.15.0" 123 | parse5 "^3.0.1" 124 | 125 | color-convert@^1.9.0: 126 | version "1.9.3" 127 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 128 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== 129 | dependencies: 130 | color-name "1.1.3" 131 | 132 | color-name@1.1.3: 133 | version "1.1.3" 134 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 135 | integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= 136 | 137 | commander@^2.8.1: 138 | version "2.20.0" 139 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" 140 | integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== 141 | 142 | concat-map@0.0.1: 143 | version "0.0.1" 144 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 145 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 146 | 147 | css-select@~1.2.0: 148 | version "1.2.0" 149 | resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" 150 | integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= 151 | dependencies: 152 | boolbase "~1.0.0" 153 | css-what "2.1" 154 | domutils "1.5.1" 155 | nth-check "~1.0.1" 156 | 157 | css-what@2.1: 158 | version "2.1.3" 159 | resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" 160 | integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== 161 | 162 | denodeify@^1.2.1: 163 | version "1.2.1" 164 | resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" 165 | integrity sha1-OjYof1A05pnnV3kBBSwubJQlFjE= 166 | 167 | didyoumean@^1.2.1: 168 | version "1.2.1" 169 | resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.1.tgz#e92edfdada6537d484d73c0172fd1eba0c4976ff" 170 | integrity sha1-6S7f2tplN9SE1zwBcv0eugxJdv8= 171 | 172 | diff@^4.0.1: 173 | version "4.0.1" 174 | resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.1.tgz#0c667cb467ebbb5cea7f14f135cc2dba7780a8ff" 175 | integrity sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q== 176 | 177 | dom-serializer@0: 178 | version "0.2.1" 179 | resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.1.tgz#13650c850daffea35d8b626a4cfc4d3a17643fdb" 180 | integrity sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q== 181 | dependencies: 182 | domelementtype "^2.0.1" 183 | entities "^2.0.0" 184 | 185 | dom-serializer@~0.1.1: 186 | version "0.1.1" 187 | resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" 188 | integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== 189 | dependencies: 190 | domelementtype "^1.3.0" 191 | entities "^1.1.1" 192 | 193 | domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: 194 | version "1.3.1" 195 | resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" 196 | integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== 197 | 198 | domelementtype@^2.0.1: 199 | version "2.0.1" 200 | resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" 201 | integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== 202 | 203 | domhandler@^2.3.0: 204 | version "2.4.2" 205 | resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" 206 | integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== 207 | dependencies: 208 | domelementtype "1" 209 | 210 | domutils@1.5.1: 211 | version "1.5.1" 212 | resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" 213 | integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= 214 | dependencies: 215 | dom-serializer "0" 216 | domelementtype "1" 217 | 218 | domutils@^1.5.1: 219 | version "1.7.0" 220 | resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" 221 | integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== 222 | dependencies: 223 | dom-serializer "0" 224 | domelementtype "1" 225 | 226 | entities@^1.1.1, entities@~1.1.1: 227 | version "1.1.2" 228 | resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" 229 | integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== 230 | 231 | entities@^2.0.0: 232 | version "2.0.0" 233 | resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" 234 | integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== 235 | 236 | escape-string-regexp@^1.0.5: 237 | version "1.0.5" 238 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 239 | integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= 240 | 241 | fd-slicer@~1.1.0: 242 | version "1.1.0" 243 | resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" 244 | integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= 245 | dependencies: 246 | pend "~1.2.0" 247 | 248 | fs.realpath@^1.0.0: 249 | version "1.0.0" 250 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 251 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 252 | 253 | glob@^7.0.0, glob@^7.0.6: 254 | version "7.1.4" 255 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" 256 | integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== 257 | dependencies: 258 | fs.realpath "^1.0.0" 259 | inflight "^1.0.4" 260 | inherits "2" 261 | minimatch "^3.0.4" 262 | once "^1.3.0" 263 | path-is-absolute "^1.0.0" 264 | 265 | has-flag@^3.0.0: 266 | version "3.0.0" 267 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 268 | integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= 269 | 270 | htmlparser2@^3.9.1: 271 | version "3.10.1" 272 | resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" 273 | integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== 274 | dependencies: 275 | domelementtype "^1.3.1" 276 | domhandler "^2.3.0" 277 | domutils "^1.5.1" 278 | entities "^1.1.1" 279 | inherits "^2.0.1" 280 | readable-stream "^3.1.1" 281 | 282 | inflight@^1.0.4: 283 | version "1.0.6" 284 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 285 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 286 | dependencies: 287 | once "^1.3.0" 288 | wrappy "1" 289 | 290 | inherits@2, inherits@^2.0.1, inherits@^2.0.3: 291 | version "2.0.4" 292 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 293 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 294 | 295 | interpret@^1.0.0: 296 | version "1.2.0" 297 | resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" 298 | integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== 299 | 300 | linkify-it@^2.0.0: 301 | version "2.2.0" 302 | resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.2.0.tgz#e3b54697e78bf915c70a38acd78fd09e0058b1cf" 303 | integrity sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw== 304 | dependencies: 305 | uc.micro "^1.0.1" 306 | 307 | lodash@^4.15.0, lodash@^4.17.10: 308 | version "4.17.15" 309 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" 310 | integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== 311 | 312 | make-error@^1.1.1: 313 | version "1.3.5" 314 | resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" 315 | integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== 316 | 317 | markdown-it@^8.3.1: 318 | version "8.4.2" 319 | resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.2.tgz#386f98998dc15a37722aa7722084f4020bdd9b54" 320 | integrity sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ== 321 | dependencies: 322 | argparse "^1.0.7" 323 | entities "~1.1.1" 324 | linkify-it "^2.0.0" 325 | mdurl "^1.0.1" 326 | uc.micro "^1.0.5" 327 | 328 | markdown-table@^1.1.3: 329 | version "1.1.3" 330 | resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" 331 | integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== 332 | 333 | mdurl@^1.0.1: 334 | version "1.0.1" 335 | resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" 336 | integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= 337 | 338 | mime@^1.3.4: 339 | version "1.6.0" 340 | resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" 341 | integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== 342 | 343 | minimatch@^3.0.3, minimatch@^3.0.4: 344 | version "3.0.4" 345 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 346 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 347 | dependencies: 348 | brace-expansion "^1.1.7" 349 | 350 | mute-stream@~0.0.4: 351 | version "0.0.8" 352 | resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" 353 | integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== 354 | 355 | nth-check@~1.0.1: 356 | version "1.0.2" 357 | resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" 358 | integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== 359 | dependencies: 360 | boolbase "~1.0.0" 361 | 362 | once@^1.3.0: 363 | version "1.4.0" 364 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 365 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 366 | dependencies: 367 | wrappy "1" 368 | 369 | os-homedir@^1.0.0: 370 | version "1.0.2" 371 | resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" 372 | integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= 373 | 374 | os-tmpdir@^1.0.0, os-tmpdir@~1.0.1: 375 | version "1.0.2" 376 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 377 | integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= 378 | 379 | os@0.1.1: 380 | version "0.1.1" 381 | resolved "https://registry.yarnpkg.com/os/-/os-0.1.1.tgz#208845e89e193ad4d971474b93947736a56d13f3" 382 | integrity sha1-IIhF6J4ZOtTZcUdLk5R3NqVtE/M= 383 | 384 | osenv@^0.1.3: 385 | version "0.1.5" 386 | resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" 387 | integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== 388 | dependencies: 389 | os-homedir "^1.0.0" 390 | os-tmpdir "^1.0.0" 391 | 392 | parse-semver@^1.1.1: 393 | version "1.1.1" 394 | resolved "https://registry.yarnpkg.com/parse-semver/-/parse-semver-1.1.1.tgz#9a4afd6df063dc4826f93fba4a99cf223f666cb8" 395 | integrity sha1-mkr9bfBj3Egm+T+6SpnPIj9mbLg= 396 | dependencies: 397 | semver "^5.1.0" 398 | 399 | parse5@^3.0.1: 400 | version "3.0.3" 401 | resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c" 402 | integrity sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA== 403 | dependencies: 404 | "@types/node" "*" 405 | 406 | path-is-absolute@^1.0.0: 407 | version "1.0.1" 408 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 409 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 410 | 411 | path-parse@^1.0.6: 412 | version "1.0.6" 413 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" 414 | integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== 415 | 416 | pend@~1.2.0: 417 | version "1.2.0" 418 | resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" 419 | integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= 420 | 421 | read@^1.0.7: 422 | version "1.0.7" 423 | resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" 424 | integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= 425 | dependencies: 426 | mute-stream "~0.0.4" 427 | 428 | readable-stream@^3.1.1: 429 | version "3.4.0" 430 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" 431 | integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== 432 | dependencies: 433 | inherits "^2.0.3" 434 | string_decoder "^1.1.1" 435 | util-deprecate "^1.0.1" 436 | 437 | rechoir@^0.6.2: 438 | version "0.6.2" 439 | resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" 440 | integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= 441 | dependencies: 442 | resolve "^1.1.6" 443 | 444 | resolve@^1.1.6: 445 | version "1.12.0" 446 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6" 447 | integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== 448 | dependencies: 449 | path-parse "^1.0.6" 450 | 451 | safe-buffer@~5.2.0: 452 | version "5.2.0" 453 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" 454 | integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== 455 | 456 | semver@^5.1.0: 457 | version "5.7.1" 458 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" 459 | integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== 460 | 461 | shelljs@^0.8.3: 462 | version "0.8.3" 463 | resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097" 464 | integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A== 465 | dependencies: 466 | glob "^7.0.0" 467 | interpret "^1.0.0" 468 | rechoir "^0.6.2" 469 | 470 | source-map-support@^0.5.6: 471 | version "0.5.13" 472 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" 473 | integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== 474 | dependencies: 475 | buffer-from "^1.0.0" 476 | source-map "^0.6.0" 477 | 478 | source-map@^0.6.0: 479 | version "0.6.1" 480 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 481 | integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 482 | 483 | sprintf-js@~1.0.2: 484 | version "1.0.3" 485 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 486 | integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= 487 | 488 | string_decoder@^1.1.1: 489 | version "1.3.0" 490 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" 491 | integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== 492 | dependencies: 493 | safe-buffer "~5.2.0" 494 | 495 | supports-color@^5.3.0: 496 | version "5.5.0" 497 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 498 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== 499 | dependencies: 500 | has-flag "^3.0.0" 501 | 502 | tmp@0.0.29: 503 | version "0.0.29" 504 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.29.tgz#f25125ff0dd9da3ccb0c2dd371ee1288bb9128c0" 505 | integrity sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA= 506 | dependencies: 507 | os-tmpdir "~1.0.1" 508 | 509 | ts-node@^8.4.1: 510 | version "8.4.1" 511 | resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.4.1.tgz#270b0dba16e8723c9fa4f9b4775d3810fd994b4f" 512 | integrity sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw== 513 | dependencies: 514 | arg "^4.1.0" 515 | diff "^4.0.1" 516 | make-error "^1.1.1" 517 | source-map-support "^0.5.6" 518 | yn "^3.0.0" 519 | 520 | tunnel@0.0.4: 521 | version "0.0.4" 522 | resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.4.tgz#2d3785a158c174c9a16dc2c046ec5fc5f1742213" 523 | integrity sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM= 524 | 525 | typed-rest-client@1.2.0: 526 | version "1.2.0" 527 | resolved "https://registry.yarnpkg.com/typed-rest-client/-/typed-rest-client-1.2.0.tgz#723085d203f38d7d147271e5ed3a75488eb44a02" 528 | integrity sha512-FrUshzZ1yxH8YwGR29PWWnfksLEILbWJydU7zfIRkyH7kAEzB62uMAl2WY6EyolWpLpVHeJGgQm45/MaruaHpw== 529 | dependencies: 530 | tunnel "0.0.4" 531 | underscore "1.8.3" 532 | 533 | typescript@^3.6.3: 534 | version "3.6.3" 535 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.3.tgz#fea942fabb20f7e1ca7164ff626f1a9f3f70b4da" 536 | integrity sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw== 537 | 538 | uc.micro@^1.0.1, uc.micro@^1.0.5: 539 | version "1.0.6" 540 | resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" 541 | integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== 542 | 543 | underscore@1.8.3: 544 | version "1.8.3" 545 | resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" 546 | integrity sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI= 547 | 548 | url-join@^1.1.0: 549 | version "1.1.0" 550 | resolved "https://registry.yarnpkg.com/url-join/-/url-join-1.1.0.tgz#741c6c2f4596c4830d6718460920d0c92202dc78" 551 | integrity sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg= 552 | 553 | util-deprecate@^1.0.1: 554 | version "1.0.2" 555 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 556 | integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= 557 | 558 | vsce@^1.66.0: 559 | version "1.66.0" 560 | resolved "https://registry.yarnpkg.com/vsce/-/vsce-1.66.0.tgz#8cf1d64a4825d5d0523ea5efd0bf41e2c6829565" 561 | integrity sha512-Zf4+WD4PhEcOr7jkU08SI9lwFqDhmhk73YOCGQ/tNLaBy+PnnX4eSdqj9LdzDLuI2dsyomJLXzDSNgxuaInxCQ== 562 | dependencies: 563 | azure-devops-node-api "^7.2.0" 564 | chalk "^2.4.2" 565 | cheerio "^1.0.0-rc.1" 566 | commander "^2.8.1" 567 | denodeify "^1.2.1" 568 | didyoumean "^1.2.1" 569 | glob "^7.0.6" 570 | lodash "^4.17.10" 571 | markdown-it "^8.3.1" 572 | mime "^1.3.4" 573 | minimatch "^3.0.3" 574 | osenv "^0.1.3" 575 | parse-semver "^1.1.1" 576 | read "^1.0.7" 577 | semver "^5.1.0" 578 | tmp "0.0.29" 579 | typed-rest-client "1.2.0" 580 | url-join "^1.1.0" 581 | yauzl "^2.3.1" 582 | yazl "^2.2.2" 583 | 584 | wrappy@1: 585 | version "1.0.2" 586 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 587 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 588 | 589 | yauzl@^2.3.1: 590 | version "2.10.0" 591 | resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" 592 | integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= 593 | dependencies: 594 | buffer-crc32 "~0.2.3" 595 | fd-slicer "~1.1.0" 596 | 597 | yazl@^2.2.2: 598 | version "2.5.1" 599 | resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.5.1.tgz#a3d65d3dd659a5b0937850e8609f22fffa2b5c35" 600 | integrity sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw== 601 | dependencies: 602 | buffer-crc32 "~0.2.3" 603 | 604 | yn@^3.0.0: 605 | version "3.1.1" 606 | resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" 607 | integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== 608 | --------------------------------------------------------------------------------