├── .gitignore ├── README.md ├── assets ├── declarations │ ├── node.d.ts │ ├── ts-simple-ast.d.ts │ ├── tsquery.d.ts │ └── typescript.d.ts └── examples │ ├── ts-build-and-print-ast │ └── code.ts │ ├── ts-create-program-without-fs │ ├── code.ts │ └── input.ts │ ├── ts-transformation-2 │ └── code.ts │ ├── ts-type-checking-source │ ├── code.ts │ └── input.ts │ ├── tsSimpleAstAndTsQuery │ ├── code.ts │ └── input.ts │ └── tsa-rename-test1 │ ├── code.ts │ └── input.ts ├── package-lock.json ├── package.json ├── shrinkwrap.yaml ├── src ├── config.ts ├── editor.js ├── examples.ts ├── index.html ├── readFileSync.ts ├── runTs.ts ├── server.ts └── templates.ts ├── test ├── compile-with-editor-libraries.ts ├── tsa-rename-test1.ts └── tsquerytest1.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.log 4 | tmp 5 | .yamat 6 | *.tgz 7 | separate-project-test1 8 | evaluated_* 9 | .idea 10 | atom-input-ui-provider -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TypeScript Compiler API online editor 2 | 3 | * Play with TypeScript compiler (and others) APIs online: [TypeScript Compiler API online playground](https://typescript-api-playground.glitch.me/) 4 | * [glitch development page](https://glitch.com/edit/#!/typescript-api-playground) 5 | 6 | 7 | # Objectives / Features 8 | 9 | Basically is a server side node.js application that let the user input two TypeScript source files, one is its program using TypeScript compiler APIs and others, and the second is an example TypeScript source file that will be manipulated by the first program. Then the Program is evaluated server-side and the results are printed back to the browser (probably modifying the example source file) 10 | 11 | * It has lots of working examples using different TypeScript APIs and related libraries. 12 | 13 | * Thanks to glitch infrastructure is online! https://typescript-api-playground.glitch.me/ 14 | 15 | * Easily run in local host: `npm install && npm start & ; firefox localhost:8080` 16 | 17 | * Uses the great TypeScript monaco-editor so the experience is incredible 18 | 19 | * The idea is being able to point to users to these examples so they can play online with them when asking for help. 20 | 21 | 22 | 23 | 24 | # Notes / difficulties / learning 25 | 26 | * editor.js - is a handlebars template that contains big ibraries like typescript.d.ts embedded inside - now trying to migrate reading files and fixing production cache. 27 | 28 | * ts-simple-ast.d.ts needed little modification at the begginig of the heads (see comments ) and explicit declaration using compilerOptions path and baseUrl (see editor.js monaco.languages.typescript.typescriptDefaults.setCompilerOptions ) 29 | 30 | * for typescript.d.ts to work we need to add the following to the top of the file: 31 | 32 | ``` 33 | declare module "typescript"{ 34 | export = ts 35 | } 36 | ``` 37 | 38 | * tsquery.d.ts : had to run the following to join all .d.ts in one file : 39 | 40 | ```dts-generator --name tsquery --out package-name.d.ts --project /home/sg/git/tsquery``` 41 | 42 | 43 | 44 | # TODO 45 | 46 | * user being able to save / load its work - cheap solution like typescript playground use url parameters as source code input. Maybe a list in the server in a file ? 47 | 48 | * make some specs - like run server and post something to /run and expect some answer. In particular example code with string templates and different template quotes like this: tsquery simple example 49 | 50 | * a help dialog or alert with minimal instructions 51 | 52 | * better example tagging and sorting 53 | 54 | * typechecking example using createProgram 55 | 56 | * nice idea: from input editor pass current cursor position / selected text range to main() so we can refactor it! 57 | 58 | * when selecting example reflect the change in the url 59 | 60 | * example of transpile -> transformation 61 | 62 | * add candomed 63 | 64 | 65 | 66 | # Dones : 67 | 68 | * Production , performance, security: we are eval() and compiling / rendering templates on each request for fast development - we need a production mode that dont do this, caches everything in memory. 69 | -------------------------------------------------------------------------------- /assets/declarations/tsquery.d.ts: -------------------------------------------------------------------------------- 1 | // generated automatically using the command: 2 | // ```dts-generator --name tsquery --out package-name.d.ts --project /home/sg/git/tsquery``` 3 | 4 | declare module '@phenomnomnominal/tsquery/src/ast' { 5 | import { SourceFile } from 'typescript'; 6 | export function createAST(text: string, fileName?: string): SourceFile; 7 | 8 | } 9 | declare module '@phenomnomnominal/tsquery/src/tsquery-types' { 10 | import { Node, SourceFile, SyntaxKind } from 'typescript'; 11 | export type TSQueryApi = { 12 | (ast: string | Node | TSQueryNode, selector: string): Array>; 13 | ast(text: string, fileName?: string): SourceFile; 14 | match(ast: Node | TSQueryNode, selector: TSQuerySelectorNode): Array>; 15 | matches(node: TSQueryNode, selector: TSQuerySelectorNode, ancestry: Array): boolean; 16 | parse(selector: string): TSQuerySelectorNode; 17 | query(ast: string | Node | TSQueryNode, selector: string): Array>; 18 | syntaxKindName(node: SyntaxKind): string; 19 | }; 20 | export type TSQueryAttributeOperatorType = 'regexp' | 'literal' | 'type'; 21 | export type TSQueryAttributeOperator = (obj: any, value: any, type: TSQueryAttributeOperatorType) => boolean; 22 | export type TSQueryAttributeOperators = { 23 | [key: string]: TSQueryAttributeOperator; 24 | }; 25 | export type TSQueryMatcher = (node: TSQueryNode, selector: TSQuerySelectorNode, ancestry: Array) => boolean; 26 | export type TSQueryMatchers = { 27 | [key: string]: TSQueryMatcher; 28 | }; 29 | export type TSQueryNode = T & { 30 | kindName: string; 31 | name?: string; 32 | text: string; 33 | value?: any; 34 | }; 35 | export type TSQuerySelectorNode = { 36 | [key: string]: TSQuerySelectorNode | Array | RegExp | boolean | number | string; 37 | index: TSQuerySelectorNode; 38 | left: TSQuerySelectorNode; 39 | name: string; 40 | operator: '=' | '!=' | '<=' | '<' | '>=' | '>'; 41 | right: TSQuerySelectorNode; 42 | selectors: Array; 43 | subject: boolean; 44 | type: TSQueryAttributeOperatorType; 45 | value: TSQuerySelectorNode | RegExp | number | string; 46 | }; 47 | export type TSQueryTraverseOptions = { 48 | enter: (node: TSQueryNode, parent: TSQueryNode | null) => void; 49 | leave: (node: TSQueryNode, parent: TSQueryNode | null) => void; 50 | }; 51 | 52 | } 53 | declare module '@phenomnomnominal/tsquery/src/syntax-kind' { 54 | import { SyntaxKind } from 'typescript'; 55 | export const syntaxKindMap: { 56 | [key: string]: string; 57 | }; 58 | export function syntaxKindName(kind: SyntaxKind): string; 59 | 60 | } 61 | declare module '@phenomnomnominal/tsquery/src/traverse' { 62 | import { Node } from 'typescript'; 63 | import { TSQueryNode, TSQueryTraverseOptions } from '@phenomnomnominal/tsquery/src/tsquery-types'; 64 | export function traverse(node: Node | TSQueryNode, options: TSQueryTraverseOptions): void; 65 | export function traverseChildren(node: Node | TSQueryNode, iterator: (childNode: TSQueryNode, ancestors: Array) => void): void; 66 | export function getVisitorKeys(node: TSQueryNode | null): Array; 67 | export function addProperties(node: TSQueryNode): void; 68 | 69 | } 70 | declare module '@phenomnomnominal/tsquery/src/utils' { 71 | import { Node } from 'typescript'; 72 | export function getPath(obj: any, path: string): any; 73 | export function inPath(node: Node, ancestor: Node, path: Array): boolean; 74 | 75 | } 76 | declare module '@phenomnomnominal/tsquery/src/matchers/attribute' { 77 | import { TSQueryNode, TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 78 | export function attribute(node: TSQueryNode, selector: TSQuerySelectorNode): boolean; 79 | 80 | } 81 | declare module '@phenomnomnominal/tsquery/src/matchers/child' { 82 | import { TSQueryNode, TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 83 | export function child(node: TSQueryNode, selector: TSQuerySelectorNode, ancestry: Array): boolean; 84 | 85 | } 86 | declare module '@phenomnomnominal/tsquery/src/matchers/class' { 87 | import { TSQueryNode, TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 88 | export function classs(node: TSQueryNode, selector: TSQuerySelectorNode, ancestry: Array): boolean; 89 | 90 | } 91 | declare module '@phenomnomnominal/tsquery/src/matchers/descendant' { 92 | import { TSQueryNode, TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 93 | export function descendant(node: TSQueryNode, selector: TSQuerySelectorNode, ancestry: Array): boolean; 94 | 95 | } 96 | declare module '@phenomnomnominal/tsquery/src/matchers/field' { 97 | import { TSQueryNode, TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 98 | export function field(node: TSQueryNode, selector: TSQuerySelectorNode, ancestry: Array): boolean; 99 | 100 | } 101 | declare module '@phenomnomnominal/tsquery/src/matchers/has' { 102 | import { TSQueryNode, TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 103 | export function has(node: TSQueryNode, selector: TSQuerySelectorNode): boolean; 104 | 105 | } 106 | declare module '@phenomnomnominal/tsquery/src/matchers/identifier' { 107 | import { TSQueryNode, TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 108 | export function identifier(node: TSQueryNode, selector: TSQuerySelectorNode): boolean; 109 | 110 | } 111 | declare module '@phenomnomnominal/tsquery/src/matchers/matches' { 112 | import { TSQueryNode, TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 113 | export function matches(modifier: 'some' | 'every'): (node: TSQueryNode, selector: TSQuerySelectorNode, ancestry: Array) => boolean; 114 | 115 | } 116 | declare module '@phenomnomnominal/tsquery/src/matchers/not' { 117 | import { TSQueryNode, TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 118 | export function not(node: TSQueryNode, selector: TSQuerySelectorNode, ancestry: Array): boolean; 119 | 120 | } 121 | declare module '@phenomnomnominal/tsquery/src/matchers/nth-child' { 122 | import { TSQueryNode, TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 123 | export function nthChild(node: TSQueryNode, selector: TSQuerySelectorNode, ancestry: Array): boolean; 124 | export function nthLastChild(node: TSQueryNode, selector: TSQuerySelectorNode, ancestry: Array): boolean; 125 | 126 | } 127 | declare module '@phenomnomnominal/tsquery/src/matchers/sibling' { 128 | import { TSQueryNode, TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 129 | export function sibling(node: TSQueryNode, selector: TSQuerySelectorNode, ancestry: Array): boolean; 130 | export function adjacent(node: TSQueryNode, selector: TSQuerySelectorNode, ancestry: Array): boolean; 131 | 132 | } 133 | declare module '@phenomnomnominal/tsquery/src/matchers/wildcard' { 134 | export function wildcard(): boolean; 135 | 136 | } 137 | declare module '@phenomnomnominal/tsquery/src/matchers/index' { 138 | import { TSQueryMatchers } from '@phenomnomnominal/tsquery/src/tsquery-types'; 139 | export const MATCHERS: TSQueryMatchers; 140 | 141 | } 142 | declare module '@phenomnomnominal/tsquery/src/match' { 143 | import { Node } from 'typescript'; 144 | import { TSQueryNode, TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 145 | export function match(node: Node | TSQueryNode, selector: TSQuerySelectorNode): Array>; 146 | export function findMatches(node: TSQueryNode, selector: TSQuerySelectorNode, ancestry?: Array): boolean; 147 | 148 | } 149 | declare module '@phenomnomnominal/tsquery/src/parse' { 150 | import { TSQuerySelectorNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 151 | export function parse(selector: string): TSQuerySelectorNode; 152 | 153 | } 154 | declare module '@phenomnomnominal/tsquery/src/query' { 155 | import { Node } from 'typescript'; 156 | import { TSQueryNode } from '@phenomnomnominal/tsquery/src/tsquery-types'; 157 | export function query(ast: string | Node | TSQueryNode, selector: string): Array>; 158 | 159 | } 160 | declare module '@phenomnomnominal/tsquery' { 161 | import { TSQueryApi } from '@phenomnomnominal/tsquery/src/tsquery-types'; 162 | export const tsquery: TSQueryApi; 163 | 164 | } -------------------------------------------------------------------------------- /assets/examples/ts-build-and-print-ast/code.ts: -------------------------------------------------------------------------------- 1 | import * as ts from 'typescript'; 2 | 3 | function makeFactorialFunction() { 4 | const functionName = ts.createIdentifier("factorial"); 5 | const paramName = ts.createIdentifier("n"); 6 | const parameter = ts.createParameter( 7 | /*decorators*/ undefined, 8 | /*modifiers*/ undefined, 9 | /*dotDotDotToken*/ undefined, 10 | paramName); 11 | 12 | const condition = ts.createBinary( 13 | paramName, 14 | ts.SyntaxKind.LessThanEqualsToken, 15 | ts.createLiteral(1)); 16 | 17 | const ifBody = ts.createBlock( 18 | [ts.createReturn(ts.createLiteral(1))], 19 | /*multiline*/ true) 20 | const decrementedArg = ts.createBinary(paramName, ts.SyntaxKind.MinusToken, ts.createLiteral(1)) 21 | const recurse = ts.createBinary( 22 | paramName, 23 | ts.SyntaxKind.AsteriskToken, 24 | ts.createCall(functionName, /*typeArgs*/undefined, [decrementedArg])); 25 | const statements = [ 26 | ts.createIf(condition, ifBody), 27 | ts.createReturn( 28 | recurse 29 | ), 30 | ]; 31 | return ts.createFunctionDeclaration( 32 | /*decorators*/ undefined, 33 | /*modifiers*/[ts.createToken(ts.SyntaxKind.ExportKeyword)], 34 | /*asteriskToken*/ undefined, 35 | functionName, 36 | /*typeParameters*/ undefined, 37 | [parameter], 38 | /*returnType*/ ts.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), 39 | ts.createBlock(statements, /*multiline*/ true), 40 | ) 41 | } 42 | 43 | function main(source: string, log: (m: string)=>void):string { 44 | const resultFile = ts.createSourceFile("someFileName.ts", "", ts.ScriptTarget.Latest, /*setParentNodes*/ false, ts.ScriptKind.TS); 45 | const printer = ts.createPrinter({ 46 | newLine: ts.NewLineKind.LineFeed, 47 | }); 48 | const result = printer.printNode(ts.EmitHint.Unspecified, makeFactorialFunction(), resultFile); 49 | return result 50 | } -------------------------------------------------------------------------------- /assets/examples/ts-create-program-without-fs/code.ts: -------------------------------------------------------------------------------- 1 | import * as ts from 'typescript' 2 | export function main(code: string, log: (msg: string) => void) { 3 | const program = createProgram([ 4 | { fileName: 'one.ts', content:`class Animal { 5 | constructor(public name: string) { } 6 | move(distanceInMeters: number = 0) { 7 | console.log(\`\${this.name} moved \${distanceInMeters}m.\`) 8 | } 9 | } 10 | class Snake extends Animal { 11 | constructor(name: string) { super(name); } 12 | move(distanceInMeters = 5) { 13 | console.log("Slithering..."); 14 | super.move(distanceInMeters); 15 | }` }, 16 | { fileName: 'two.ts', content: 'class A{color: string="red"; method2(l: Date[][]):number{if(l { 20 | log(`=== AST of ${sourceFile.fileName} ==`) 21 | visit(sourceFile, (n, level) => log(printNode(n, level))) 22 | }) 23 | } 24 | 25 | function printNode (n: ts.Node, level: number = 0):string { 26 | const text = n.getText().replace(/[\\n\\s]+/gm, ' ') 27 | return`${new Array(level * 2).fill(' ').join('')}${getKindName(n.kind)} - "${text.substring(0, Math.min(text.length, 20))}` 28 | } 29 | /** creates a dummy ts.Program in memory with given source files inside */ 30 | export function createProgram(files: { 31 | fileName: string, content: string, 32 | sourceFile?: ts.SourceFile 33 | }[], compilerOptions?: ts.CompilerOptions): ts.Program { 34 | const tsConfigJson = ts.parseConfigFileTextToJson('tsconfig.json', 35 | compilerOptions ? JSON.stringify(compilerOptions) :`{ 36 | "compilerOptions": { 37 | "target": "es2018", 38 | "module": "commonjs", 39 | "lib": ["es2018"], 40 | "rootDir": ".", 41 | "strict": false, 42 | "esModuleInterop": true, 43 | } 44 | `) 45 | let { options, errors } = ts.convertCompilerOptionsFromJson(tsConfigJson.config.compilerOptions, '.') 46 | if (errors.length) { 47 | throw errors 48 | } 49 | const compilerHost = ts.createCompilerHost(options) 50 | compilerHost.getSourceFile = function (fileName: string, languageVersion: ts.ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): ts.SourceFile | undefined { 51 | const file = files.find(f => f.fileName === fileName) 52 | if (!file) return undefined 53 | file.sourceFile = file.sourceFile || ts.createSourceFile(fileName, file.content, ts.ScriptTarget.ES2015, true) 54 | return file.sourceFile 55 | } 56 | return ts.createProgram(files.map(f => f.fileName), options, compilerHost) 57 | } 58 | 59 | function visit(node: ts.Node, visitor: (node: ts.Node, level: number) => void, level: number = 0) { 60 | if (!node) { 61 | return; 62 | } 63 | visitor(node, level); 64 | node.forEachChild(child => visit(child, visitor, level + 1)); 65 | } 66 | 67 | function getKindName(kind: ts.SyntaxKind) { 68 | return (ts as any).SyntaxKind[kind]; 69 | } -------------------------------------------------------------------------------- /assets/examples/ts-create-program-without-fs/input.ts: -------------------------------------------------------------------------------- 1 | import * as fs from "fs"; 2 | import * as ts from "typescript"; 3 | function watch(rootFileNames: string[], options: ts.CompilerOptions) { 4 | const files: ts.MapLike<{ version: number }> = {} 5 | rootFileNames.forEach(fileName => { 6 | files[fileName] = { version: 0 } 7 | }) 8 | const servicesHost: ts.LanguageServiceHost = { 9 | getScriptFileNames: () => rootFileNames, 10 | getScriptVersion: (fileName) => files[fileName] && files[fileName].version.toString(), 11 | getScriptSnapshot: (fileName) => { 12 | if (!fs.existsSync(fileName)) { 13 | return undefined 14 | } 15 | return ts.ScriptSnapshot.fromString(fs.readFileSync(fileName).toString()) 16 | }, 17 | getCurrentDirectory: () => process.cwd(), 18 | getCompilationSettings: () => options, 19 | getDefaultLibFileName: (options) => ts.getDefaultLibFilePath(options), 20 | fileExists: ts.sys.fileExists, 21 | readFile: ts.sys.readFile, 22 | readDirectory: ts.sys.readDirectory, 23 | } 24 | const services = ts.createLanguageService(servicesHost, ts.createDocumentRegistry()) 25 | rootFileNames.forEach(fileName => { 26 | emitFile(fileName) 27 | fs.watchFile(fileName, 28 | { persistent: true, interval: 250 }, 29 | (curr, prev) => { 30 | if (+curr.mtime <= +prev.mtime) { 31 | return 32 | } 33 | files[fileName].version++ 34 | emitFile(fileName) 35 | }) 36 | }) 37 | function emitFile(fileName: string) { 38 | let output = services.getEmitOutput(fileName) 39 | if (!output.emitSkipped) { 40 | console.log(`Emitting ${fileName}`) 41 | } 42 | else { 43 | console.log(`Emitting ${fileName} failed`) 44 | logErrors(fileName) 45 | } 46 | output.outputFiles.forEach(o => { 47 | fs.writeFileSync(o.name, o.text, "utf8") 48 | }) 49 | } 50 | function logErrors(fileName: string) { 51 | let allDiagnostics = services.getCompilerOptionsDiagnostics() 52 | .concat(services.getSyntacticDiagnostics(fileName)) 53 | .concat(services.getSemanticDiagnostics(fileName)) 54 | allDiagnostics.forEach(diagnostic => { 55 | let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\\n") 56 | if (diagnostic.file) { 57 | let { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!) 58 | console.log(`Error ${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`) 59 | } 60 | else { 61 | console.log(`Error: ${message}`) 62 | } 63 | }) 64 | } 65 | } 66 | const currentDirectoryFiles = fs.readdirSync(process.cwd()). 67 | filter(fileName => fileName.length >= 3 && fileName.substr(fileName.length - 3, 3) === ".ts") 68 | watch(currentDirectoryFiles, { module: ts.ModuleKind.CommonJS }) -------------------------------------------------------------------------------- /assets/examples/ts-transformation-2/code.ts: -------------------------------------------------------------------------------- 1 | // this example will create a simple typescript source file programmatically, parse it to AST Nodes and then 2 | // use TypeScript Transformations to manipulate some ot its nodes (changing particular arithmetic expressions). 3 | // Finally , the transformed AST will be printed back to another source file as a string 4 | 5 | // (Note: I've taken this example from somewhere else some credits are not mine - but since there's limited typescript 6 | // documentation I think is a good idea to duplicate this... ) 7 | 8 | import * as ts from 'typescript' 9 | 10 | export function main(source: string, log: (msg: string) => void): string { 11 | 12 | const sourceFile: ts.SourceFile = ts.createSourceFile( 13 | 'test.ts', source, ts.ScriptTarget.ES2015, true, ts.ScriptKind.TS 14 | ) 15 | 16 | // Apply transformation to the sourcefile 17 | const result: ts.TransformationResult = ts.transform( 18 | sourceFile, [transformer] 19 | ) 20 | // obtain the transformed source file 21 | const transformedSourceFile: ts.SourceFile = result.transformed[0] 22 | const printer: ts.Printer = ts.createPrinter() 23 | 24 | const transformedContent = printer.printFile(transformedSourceFile) 25 | 26 | log('Original file:\\n' + printer.printFile(sourceFile) + 'Transformed file:\\n' + transformedContent) 27 | 28 | result.dispose() 29 | return transformedContent 30 | } 31 | 32 | // Now the interesting part, we will build a Transformation that will replace particular nodes of 33 | // the AST, BinaryExpressions like a+b, and replace them with with the number literal resulting 34 | // of applying the mathematical operation. In this case the expression "1 + 1 + 3" will be replaced 35 | // with the expression "6" 36 | const transformer = (context: ts.TransformationContext) => (rootNode: T) => { 37 | 38 | // visit() function will visit all the descendants node (recursively) 39 | function visit(node: ts.Node): ts.Node { 40 | node = ts.visitEachChild(node, visit, context) 41 | 42 | // Here we filter which node we want to manipulate / replace, in our case binary expressions 43 | if (ts.isBinaryExpression(node)) { 44 | 45 | if (node.left.kind === ts.SyntaxKind.NumericLiteral && 46 | node.right.kind === ts.SyntaxKind.NumericLiteral) { 47 | const left = node.left as ts.NumericLiteral 48 | const leftVal = parseFloat(left.text) 49 | const right = node.right as ts.NumericLiteral 50 | const rightVal = parseFloat(right.text) 51 | switch (node.operatorToken.kind) { 52 | case ts.SyntaxKind.PlusToken: 53 | 54 | // Important, returning another node will replace the original "node" with returned one. 55 | // In our case we will be replacing binary expressions like 1.2 with the actual result of 56 | // the operaton (as long as operands are literals) 57 | return ts.createLiteral(leftVal + rightVal) 58 | case ts.SyntaxKind.AsteriskToken: 59 | return ts.createLiteral(leftVal * rightVal) 60 | case ts.SyntaxKind.MinusToken: 61 | return ts.createLiteral(leftVal - rightVal) 62 | } 63 | } 64 | } 65 | // for all the other kind of nodes, we just return the node (no transformation or replacement) 66 | return node 67 | } 68 | return ts.visitNode(rootNode, visit) 69 | } -------------------------------------------------------------------------------- /assets/examples/ts-type-checking-source/code.ts: -------------------------------------------------------------------------------- 1 | import * as ts from "typescript"; 2 | import * as fs from "fs"; 3 | import { create } from "domain"; 4 | 5 | interface DocEntry { 6 | name?: string, 7 | fileName?: string, 8 | documentation?: string, 9 | type?: string, 10 | constructors?: DocEntry[], 11 | parameters?: DocEntry[], 12 | returnType?: string 13 | }; 14 | 15 | function main(source: string, log: (msg: string) => void) { 16 | // Build a program using the set of root file names in fileNames 17 | const files = [ 18 | { 19 | fileName: 'file1.ts', content: ` 20 | /** 21 | * Documentation for C 22 | */ 23 | class C { 24 | /** 25 | * constructor documentation 26 | * @param a my parameter documentation 27 | * @param b another parameter documentation 28 | */ 29 | constructor(a: string, b: C) { } 30 | } 31 | `}, 32 | 33 | { 34 | fileName: 'input2.ts', 35 | content: source 36 | } 37 | ] 38 | const program = createProgram(files) 39 | const doc = generateDocumentation(program) 40 | log(doc) 41 | } 42 | 43 | /** Generate documentation for all classes in a set of .ts files */ 44 | function generateDocumentation(program: ts.Program): string { 45 | // Get the checker, we will use it to find more about classes 46 | let checker = program.getTypeChecker(); 47 | let output: DocEntry[] = []; 48 | // Visit every sourceFile in the program 49 | for (const sourceFile of program.getSourceFiles()) { 50 | if (!sourceFile.isDeclarationFile) { 51 | // Walk the tree to search for classes 52 | ts.forEachChild(sourceFile, visit); 53 | } 54 | } 55 | return JSON.stringify(output, undefined, 4) 56 | 57 | /** visit nodes finding exported classes */ 58 | function visit(node: ts.Node) { 59 | // Only consider exported nodes 60 | if (!isNodeExported(node)) { 61 | return; 62 | } 63 | if (ts.isClassDeclaration(node) && node.name) { 64 | // This is a top level class, get its symbol 65 | let symbol = checker.getSymbolAtLocation(node.name); 66 | if (symbol) { 67 | output.push(serializeClass(symbol)); 68 | } 69 | // No need to walk any further, class expressions/inner declarations cannot be exported 70 | } 71 | else if (ts.isModuleDeclaration(node)) { 72 | // This is a namespace, visit its children 73 | ts.forEachChild(node, visit); 74 | } 75 | } 76 | 77 | /** Serialize a symbol into a json object */ 78 | function serializeSymbol(symbol: ts.Symbol): DocEntry { 79 | return { 80 | name: symbol.getName(), 81 | documentation: ts.displayPartsToString(symbol.getDocumentationComment(checker)), 82 | type: checker.typeToString(checker.getTypeOfSymbolAtLocation(symbol, symbol.valueDeclaration!)) 83 | }; 84 | } 85 | 86 | /** Serialize a class symbol information */ 87 | function serializeClass(symbol: ts.Symbol) { 88 | let details = serializeSymbol(symbol); 89 | // Get the construct signatures 90 | let constructorType = checker.getTypeOfSymbolAtLocation(symbol, symbol.valueDeclaration!); 91 | details.constructors = constructorType.getConstructSignatures().map(serializeSignature); 92 | return details; 93 | } 94 | 95 | /** Serialize a signature (call or construct) */ 96 | function serializeSignature(signature: ts.Signature) { 97 | return { 98 | parameters: signature.parameters.map(serializeSymbol), 99 | returnType: checker.typeToString(signature.getReturnType()), 100 | documentation: ts.displayPartsToString(signature.getDocumentationComment(checker)) 101 | }; 102 | } 103 | 104 | /** True if this is visible outside this file, false otherwise */ 105 | function isNodeExported(node: ts.Node): boolean { 106 | return (ts.getCombinedModifierFlags(node) & ts.ModifierFlags.Export) !== 0 || (!!node.parent && node.parent.kind === ts.SyntaxKind.SourceFile); 107 | } 108 | } 109 | 110 | 111 | 112 | /** creates a dummy ts.Program in memory with given source files inside */ 113 | export function createProgram(files: { 114 | fileName: string, content: string, 115 | sourceFile?: ts.SourceFile 116 | }[], compilerOptions?: ts.CompilerOptions): ts.Program { 117 | const tsConfigJson = ts.parseConfigFileTextToJson('tsconfig.json', 118 | compilerOptions ? JSON.stringify(compilerOptions) : `{ 119 | "compilerOptions": { 120 | "target": "es2018", 121 | "module": "commonjs", 122 | "lib": ["es2018"], 123 | "rootDir": ".", 124 | "strict": false, 125 | "esModuleInterop": true, 126 | } 127 | `) 128 | let { options, errors } = ts.convertCompilerOptionsFromJson(tsConfigJson.config.compilerOptions, '.') 129 | if (errors.length) { 130 | throw errors 131 | } 132 | const compilerHost = ts.createCompilerHost(options) 133 | compilerHost.getSourceFile = function (fileName: string, languageVersion: ts.ScriptTarget, 134 | onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): ts.SourceFile | undefined { 135 | const file = files.find(f => f.fileName === fileName) 136 | if (!file) return undefined 137 | file.sourceFile = file.sourceFile || ts.createSourceFile(fileName, file.content, ts.ScriptTarget.ES2015, true) 138 | return file.sourceFile 139 | } 140 | // in order to typechecker to work we need to implement the following method, the following implementation is enough: 141 | compilerHost.resolveTypeReferenceDirectives = function(typeReferenceDirectiveNames: string[], containingFile: string): (ts.ResolvedTypeReferenceDirective | undefined)[] { 142 | return [] 143 | } 144 | return ts.createProgram(files.map(f => f.fileName), options, compilerHost) 145 | } 146 | -------------------------------------------------------------------------------- /assets/examples/ts-type-checking-source/input.ts: -------------------------------------------------------------------------------- 1 | 2 | export class Symbol extends Date { 3 | /** 4 | * Initializes a new instance of Symbol. 5 | * @internal 6 | * @param global - Global container. 7 | * @param symbol - Compiler symbol. 8 | */ 9 | constructor(global: Date, symbol: string) { 10 | super() 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /assets/examples/tsSimpleAstAndTsQuery/code.ts: -------------------------------------------------------------------------------- 1 | import { tsquery } from '@phenomnomnominal/tsquery' 2 | import Project, { Node, FunctionDeclaration, ParameterDeclaration } from 'ts-simple-ast' 3 | import { ok } from 'assert'; 4 | 5 | export function main(source: string, log: (msg: string) => void) { 6 | const project = new Project({ useVirtualFileSystem: true }) 7 | const sourceFile = project.createSourceFile('test.ts', source) 8 | 9 | let f = queryOne(sourceFile, functionDeclarationReturningTypeQuery({type: 'Person'})) 10 | assertIncludes(f.getText(), `function f(n: number, p: Person): Person`) 11 | 12 | f.addParameter({ name: 'a', type: 'Person[][]' }) 13 | f = queryOne(sourceFile, functionDeclarationReturningTypeQuery({type: 'Person'})) 14 | assertIncludes(f.getText(), `function f(n: number, p: Person, a: Person[][]): Person`) 15 | 16 | const paramA = queryOne(f, parameterQuery({name: 'a', type: 'Person'})) 17 | assertIncludes(paramA.getText(), `a: Person[][]`) 18 | log(sourceFile.getText()) 19 | } 20 | 21 | function query(node: Node, q: string): T[] { 22 | // https://gist.github.com/dsherret/826fe77613be22676778b8c4ba7390e7 23 | return tsquery(node.compilerNode, q) 24 | .map(n => ((node as any).getNodeFromCompilerNode(n) as T)) 25 | } 26 | 27 | function queryOne(node: Node, q: string): T | undefined { 28 | const results = query(node, q) 29 | return results.length ? results[0] : undefined 30 | } 31 | 32 | const parameterQuery = ({name, type}: {name: string, type: string}) => `Parameter:has(Parameter>Identifier[name="${name}"]):has(Parameter>ArrayType>ArrayType>${typeQuery({type})})` 33 | 34 | const typeQuery = ({type}: {type: string})=>`TypeReference>Identifier[name="${type}"]` 35 | 36 | const functionDeclarationReturningTypeQuery = ({type}: {type: string}) => `FunctionDeclaration:has(FunctionDeclaration>${typeQuery({type})})` 37 | 38 | const assertIncludes = (a, b, msg:string=`Expected ${JSON.stringify(a)} to include ${JSON.stringify(b)}`) => ok(a.includes(b), msg) -------------------------------------------------------------------------------- /assets/examples/tsSimpleAstAndTsQuery/input.ts: -------------------------------------------------------------------------------- 1 | interface Person { } 2 | function f(n: number, p: Person): Person { return null } 3 | function g(n: Person): Person[] { return null } -------------------------------------------------------------------------------- /assets/examples/tsa-rename-test1/code.ts: -------------------------------------------------------------------------------- 1 | import Project, { ClassDeclaration, FunctionDeclaration, InterfaceDeclaration, MethodDeclaration, MethodSignature, Node, ParameterDeclaration, PropertyDeclaration, PropertySignature, TypeGuards, VariableDeclaration } from 'ts-simple-ast' 2 | import * as ts from 'typescript' 3 | 4 | export function main(code: string, log: (msg: string) => void) { 5 | const project = new Project({ 6 | useVirtualFileSystem: true, 7 | compilerOptions: { target: ts.ScriptTarget.ES2018 } 8 | }) 9 | const sourceFile = project.createSourceFile('src/index.ts', code) 10 | let d: T 11 | const visited = {} 12 | // heads up - we will be changing the AST radically when calling rename() since it wi have impact on the entire project 13 | // That's why we need to query the source file each time. This could be slow for large source sets. 14 | // More information at: https://dsherret.github.io/ts-simple-ast/manipulation/ 15 | while ((d = sourceFile.getDescendants().find(n => predicate(n) && !visited[(n as T).getName()]) as T)) { 16 | if (predicateProperties(d)) { 17 | const name = randomName('variable') 18 | d.rename(name) 19 | visited[name] = true 20 | } 21 | else if (predicateClasses(d)) { 22 | const name = randomName('class') 23 | d.rename(name) 24 | visited[name] = true 25 | } 26 | } 27 | return sourceFile.getText() 28 | } 29 | 30 | type T = ParameterDeclaration | FunctionDeclaration | VariableDeclaration | ClassDeclaration | 31 | InterfaceDeclaration | PropertyDeclaration | PropertySignature | MethodDeclaration | MethodSignature 32 | 33 | const predicateProperties = (d: Node): boolean => 34 | (TypeGuards.isParameterDeclaration(d) || TypeGuards.isFunctionDeclaration(d) || 35 | TypeGuards.isPropertyDeclaration(d) || TypeGuards.isMethodDeclaration(d) || 36 | TypeGuards.isPropertySignature(d) || TypeGuards.isMethodSignature(d) || TypeGuards.isVariableDeclaration(d)) 37 | 38 | const predicateClasses = (d: Node): boolean =>( TypeGuards.isClassDeclaration(d) || TypeGuards.isInterfaceDeclaration(d)) 39 | 40 | const predicate = (d: Node): boolean => (predicateProperties(d) || predicateClasses(d)) 41 | 42 | // very heuristic identifier random generation - dont try this at home! 43 | const dic = {} 44 | function randomName(what: 'variable' | 'class' = 'variable', amountOfWords: number = 2) { 45 | let v 46 | while ((v = randomIdentifier(what, amountOfWords) + random(0, 9999)) && dic[v]) { } 47 | dic[v] = true 48 | return v 49 | } 50 | function randomIdentifier(what: 'variable' | 'class' = 'variable', amountOfWords: number = 2): string { 51 | let w = words[random(0, words.length - 1)] 52 | return what === 'class' ? camel(w) : w 53 | } 54 | function camel(w: string) { 55 | return w.substring(0, 1).toUpperCase() + w.substring(1, w.length) 56 | } 57 | function random(a, b) { 58 | return Math.floor(Math.random() * b) + a 59 | } 60 | const words = `lorem ipsum dolor sit amet consectetuer adipiscing elit fusce tellus odio dapibus id fermentum quis suscipit erat nam sed magna elementum tincidunt praesent vitae arcu tempor neque lacinia pretium etiam dictum diam curabitur sagittis hendrerit ante duis aute irure in reprehenderit voluptate velit esse cillum dolore eu fugiat nulla pariatur pulvinar eleifend sem nibh ut enim ad minima veniam nostrum exercitationem ullam corporis laboriosam nisi aliquid ex ea commodi consequatur aliquam ornare wisi metus turpis cursus a interdum felis autem vel eum iure qui quam nihil molestiae illum dolorem quo voluptas integer bibendum eget vestibulum ullamcorper nec rutrum non nonummy ac volutpat phasellus rhoncus lectus viverra nunc faucibus libero facilisis lacus nemo ipsam voluptatem quia aspernatur aut odit fugit consequuntur magni dolores eos ratione sequi nesciunt aenean placerat imperdiet justo fringilla maecenas pharetra pellentesque massa nullam molestie nisl malesuada lobortis at dui morbi leo mi tristique minim nostrud exercitation ullamco laboris aliquip commodo consequat risus tortor gravida vehicula vivamus orci venenatis pede mauris et harum quidem rerum facilis est expedita distinctio sapien class aptent taciti sociosqu litora torquent per conubia nostra inceptos hymenaeos luctus quisque scelerisque egestas habitant senectus netus fames donec congue vulputate iaculis cum sociis natoque penatibus magnis dis parturient montes nascetur ridiculus mus auctor ligula sollicitudin purus excepteur sint occaecat cupidatat proident sunt culpa officia deserunt mollit anim laborum proin dignissim feugiat condimentum augue semper accumsan varius mollis porro quisquam consectetur adipisci numquam eius modi tempora incidunt labore magnam quaerat ultrices ultricies cras temporibus quibusdam officiis debitis necessitatibus saepe eveniet voluptates repudiandae recusandae posuere porttitor tempore soluta nobis eligendi optio cumque impedit minus quod maxime placeat facere possimus omnis assumenda repellendus suspendisse mattis convallis aliquet euismod tempus laoreet itaque earum hic tenetur sapiente delectus reiciendis voluptatibus maiores alias perferendis doloribus asperiores repellat`.split(/[\n\s]+/).map(w => w && w.toLowerCase().replace(/[\.]/mg, '')).filter((w, i, arr) => arr.indexOf(w) === i) 61 | -------------------------------------------------------------------------------- /assets/examples/tsa-rename-test1/input.ts: -------------------------------------------------------------------------------- 1 | class Animal implements Living { 2 | energy: number 3 | constructor(public name: string) { } 4 | move(distanceInMeters: number = 0) { 5 | console.log( `${this.name} moved ${distanceInMeters}m.`) 6 | } 7 | } 8 | interface Living{ 9 | energy: number 10 | } 11 | class Snake extends Animal { 12 | constructor(name: string) { super(name); } 13 | move(distanceInMeters = 5) { 14 | console.log("Slithering..."); 15 | super.move(distanceInMeters); 16 | } 17 | } 18 | const words = [] 19 | function randomIdentifier(what: 'variable' | 'class' = 'variable', amountOfWords: number = 2): string { 20 | let w = words[random(0, words.length - 1)] 21 | return what === 'class' ? camel(w) : w 22 | } 23 | function random(a, b) { 24 | return Math.floor(Math.random() * b) + a 25 | } 26 | function camel(w: string) { 27 | return w.substring(0, 1).toUpperCase() + w.substring(1, w.length) 28 | } -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "typescript-api-playground", 3 | "version": "0.0.3", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@dsherret/to-absolute-glob": { 8 | "version": "2.0.2", 9 | "resolved": "https://registry.npmjs.org/@dsherret/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", 10 | "integrity": "sha1-H2R13IvZdM6gei2vOGSzF7HdMyw=", 11 | "requires": { 12 | "is-absolute": "^1.0.0", 13 | "is-negated-glob": "^1.0.0" 14 | } 15 | }, 16 | "@mrmlnc/readdir-enhanced": { 17 | "version": "2.2.1", 18 | "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", 19 | "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", 20 | "requires": { 21 | "call-me-maybe": "^1.0.1", 22 | "glob-to-regexp": "^0.3.0" 23 | } 24 | }, 25 | "@nodelib/fs.stat": { 26 | "version": "1.1.0", 27 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz", 28 | "integrity": "sha512-LAQ1d4OPfSJ/BMbI2DuizmYrrkD9JMaTdi2hQTlI53lQ4kRQPyZQRS4CYQ7O66bnBBnP/oYdRxbk++X0xuFU6A==" 29 | }, 30 | "@phenomnomnominal/tsquery": { 31 | "version": "2.0.0-beta.5", 32 | "resolved": "https://registry.npmjs.org/@phenomnomnominal/tsquery/-/tsquery-2.0.0-beta.5.tgz", 33 | "integrity": "sha512-TzHDcTDwccRDbFcaBnumU3RWWl9RfO39QCOIhcuFDsB4W27E2mjOUbaKnKErgdTN/+pc9FpLgyiOSwGNDoioCQ==", 34 | "requires": { 35 | "esquery": "^1.0.1", 36 | "minimist": "^1.2.0" 37 | } 38 | }, 39 | "@types/node": { 40 | "version": "10.5.2", 41 | "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.2.tgz", 42 | "integrity": "sha512-m9zXmifkZsMHZBOyxZWilMwmTlpC8x5Ty360JKTiXvlXZfBWYpsg9ZZvP/Ye+iZUh+Q+MxDLjItVTWIsfwz+8Q==", 43 | "dev": true 44 | }, 45 | "acorn": { 46 | "version": "5.7.1", 47 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", 48 | "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==" 49 | }, 50 | "align-text": { 51 | "version": "0.1.4", 52 | "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", 53 | "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", 54 | "requires": { 55 | "kind-of": "^3.0.2", 56 | "longest": "^1.0.1", 57 | "repeat-string": "^1.5.2" 58 | } 59 | }, 60 | "amdefine": { 61 | "version": "1.0.1", 62 | "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", 63 | "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" 64 | }, 65 | "arr-diff": { 66 | "version": "4.0.0", 67 | "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", 68 | "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" 69 | }, 70 | "arr-flatten": { 71 | "version": "1.1.0", 72 | "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", 73 | "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" 74 | }, 75 | "arr-union": { 76 | "version": "3.1.0", 77 | "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", 78 | "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" 79 | }, 80 | "array-differ": { 81 | "version": "1.0.0", 82 | "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", 83 | "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=" 84 | }, 85 | "array-union": { 86 | "version": "1.0.2", 87 | "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", 88 | "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", 89 | "requires": { 90 | "array-uniq": "^1.0.1" 91 | } 92 | }, 93 | "array-uniq": { 94 | "version": "1.0.3", 95 | "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", 96 | "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" 97 | }, 98 | "array-unique": { 99 | "version": "0.3.2", 100 | "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", 101 | "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" 102 | }, 103 | "arrify": { 104 | "version": "1.0.1", 105 | "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", 106 | "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" 107 | }, 108 | "assign-symbols": { 109 | "version": "1.0.0", 110 | "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", 111 | "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" 112 | }, 113 | "astring": { 114 | "version": "1.3.1", 115 | "resolved": "https://registry.npmjs.org/astring/-/astring-1.3.1.tgz", 116 | "integrity": "sha512-kMDFc68yAKWQVBC5PhWsnvKtNaQew1XTuYLFjcZFfGys3yl9A+vOcgo3w1VMr8XgK0aYfClg4g0ifDF5lftJNg==" 117 | }, 118 | "async": { 119 | "version": "1.5.2", 120 | "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", 121 | "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" 122 | }, 123 | "atob": { 124 | "version": "2.1.1", 125 | "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", 126 | "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" 127 | }, 128 | "balanced-match": { 129 | "version": "1.0.0", 130 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 131 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 132 | }, 133 | "base": { 134 | "version": "0.11.2", 135 | "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", 136 | "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", 137 | "requires": { 138 | "cache-base": "^1.0.1", 139 | "class-utils": "^0.3.5", 140 | "component-emitter": "^1.2.1", 141 | "define-property": "^1.0.0", 142 | "isobject": "^3.0.1", 143 | "mixin-deep": "^1.2.0", 144 | "pascalcase": "^0.1.1" 145 | }, 146 | "dependencies": { 147 | "define-property": { 148 | "version": "1.0.0", 149 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", 150 | "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", 151 | "requires": { 152 | "is-descriptor": "^1.0.0" 153 | } 154 | }, 155 | "is-accessor-descriptor": { 156 | "version": "1.0.0", 157 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", 158 | "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", 159 | "requires": { 160 | "kind-of": "^6.0.0" 161 | } 162 | }, 163 | "is-data-descriptor": { 164 | "version": "1.0.0", 165 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", 166 | "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", 167 | "requires": { 168 | "kind-of": "^6.0.0" 169 | } 170 | }, 171 | "is-descriptor": { 172 | "version": "1.0.2", 173 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", 174 | "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", 175 | "requires": { 176 | "is-accessor-descriptor": "^1.0.0", 177 | "is-data-descriptor": "^1.0.0", 178 | "kind-of": "^6.0.2" 179 | } 180 | }, 181 | "kind-of": { 182 | "version": "6.0.2", 183 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", 184 | "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" 185 | } 186 | } 187 | }, 188 | "brace-expansion": { 189 | "version": "1.1.11", 190 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 191 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 192 | "requires": { 193 | "balanced-match": "^1.0.0", 194 | "concat-map": "0.0.1" 195 | } 196 | }, 197 | "braces": { 198 | "version": "2.3.2", 199 | "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", 200 | "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", 201 | "requires": { 202 | "arr-flatten": "^1.1.0", 203 | "array-unique": "^0.3.2", 204 | "extend-shallow": "^2.0.1", 205 | "fill-range": "^4.0.0", 206 | "isobject": "^3.0.1", 207 | "repeat-element": "^1.1.2", 208 | "snapdragon": "^0.8.1", 209 | "snapdragon-node": "^2.0.1", 210 | "split-string": "^3.0.2", 211 | "to-regex": "^3.0.1" 212 | }, 213 | "dependencies": { 214 | "extend-shallow": { 215 | "version": "2.0.1", 216 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", 217 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", 218 | "requires": { 219 | "is-extendable": "^0.1.0" 220 | } 221 | } 222 | } 223 | }, 224 | "buffer-from": { 225 | "version": "1.1.0", 226 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", 227 | "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", 228 | "dev": true 229 | }, 230 | "cache-base": { 231 | "version": "1.0.1", 232 | "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", 233 | "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", 234 | "requires": { 235 | "collection-visit": "^1.0.0", 236 | "component-emitter": "^1.2.1", 237 | "get-value": "^2.0.6", 238 | "has-value": "^1.0.0", 239 | "isobject": "^3.0.1", 240 | "set-value": "^2.0.0", 241 | "to-object-path": "^0.3.0", 242 | "union-value": "^1.0.0", 243 | "unset-value": "^1.0.0" 244 | } 245 | }, 246 | "call-me-maybe": { 247 | "version": "1.0.1", 248 | "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", 249 | "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" 250 | }, 251 | "camelcase": { 252 | "version": "1.2.1", 253 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", 254 | "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", 255 | "optional": true 256 | }, 257 | "center-align": { 258 | "version": "0.1.3", 259 | "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", 260 | "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", 261 | "optional": true, 262 | "requires": { 263 | "align-text": "^0.1.3", 264 | "lazy-cache": "^1.0.3" 265 | } 266 | }, 267 | "class-utils": { 268 | "version": "0.3.6", 269 | "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", 270 | "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", 271 | "requires": { 272 | "arr-union": "^3.1.0", 273 | "define-property": "^0.2.5", 274 | "isobject": "^3.0.0", 275 | "static-extend": "^0.1.1" 276 | }, 277 | "dependencies": { 278 | "define-property": { 279 | "version": "0.2.5", 280 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", 281 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", 282 | "requires": { 283 | "is-descriptor": "^0.1.0" 284 | } 285 | } 286 | } 287 | }, 288 | "cliui": { 289 | "version": "2.1.0", 290 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", 291 | "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", 292 | "optional": true, 293 | "requires": { 294 | "center-align": "^0.1.1", 295 | "right-align": "^0.1.1", 296 | "wordwrap": "0.0.2" 297 | }, 298 | "dependencies": { 299 | "wordwrap": { 300 | "version": "0.0.2", 301 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", 302 | "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", 303 | "optional": true 304 | } 305 | } 306 | }, 307 | "code-block-writer": { 308 | "version": "7.2.1", 309 | "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-7.2.1.tgz", 310 | "integrity": "sha512-SYGE48EEUA1yeu7dcd93McZIc4+eLjMiw9uC9+Q3TMe8GibkgjVVLLz43kfTCSOA6wAAZKjdACEVZmcdW6m8ag==" 311 | }, 312 | "collection-visit": { 313 | "version": "1.0.0", 314 | "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", 315 | "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", 316 | "requires": { 317 | "map-visit": "^1.0.0", 318 | "object-visit": "^1.0.0" 319 | } 320 | }, 321 | "component-emitter": { 322 | "version": "1.2.1", 323 | "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", 324 | "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" 325 | }, 326 | "concat-map": { 327 | "version": "0.0.1", 328 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 329 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 330 | }, 331 | "copy-descriptor": { 332 | "version": "0.1.1", 333 | "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", 334 | "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" 335 | }, 336 | "debug": { 337 | "version": "2.6.9", 338 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 339 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 340 | "requires": { 341 | "ms": "2.0.0" 342 | } 343 | }, 344 | "decamelize": { 345 | "version": "1.2.0", 346 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 347 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", 348 | "optional": true 349 | }, 350 | "decode-uri-component": { 351 | "version": "0.2.0", 352 | "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", 353 | "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" 354 | }, 355 | "deep-is": { 356 | "version": "0.1.3", 357 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 358 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" 359 | }, 360 | "define-property": { 361 | "version": "2.0.2", 362 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", 363 | "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", 364 | "requires": { 365 | "is-descriptor": "^1.0.2", 366 | "isobject": "^3.0.1" 367 | }, 368 | "dependencies": { 369 | "is-accessor-descriptor": { 370 | "version": "1.0.0", 371 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", 372 | "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", 373 | "requires": { 374 | "kind-of": "^6.0.0" 375 | } 376 | }, 377 | "is-data-descriptor": { 378 | "version": "1.0.0", 379 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", 380 | "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", 381 | "requires": { 382 | "kind-of": "^6.0.0" 383 | } 384 | }, 385 | "is-descriptor": { 386 | "version": "1.0.2", 387 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", 388 | "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", 389 | "requires": { 390 | "is-accessor-descriptor": "^1.0.0", 391 | "is-data-descriptor": "^1.0.0", 392 | "kind-of": "^6.0.2" 393 | } 394 | }, 395 | "kind-of": { 396 | "version": "6.0.2", 397 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", 398 | "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" 399 | } 400 | } 401 | }, 402 | "diff": { 403 | "version": "3.5.0", 404 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", 405 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", 406 | "dev": true 407 | }, 408 | "dir-glob": { 409 | "version": "2.0.0", 410 | "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", 411 | "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", 412 | "requires": { 413 | "arrify": "^1.0.1", 414 | "path-type": "^3.0.0" 415 | } 416 | }, 417 | "escodegen": { 418 | "version": "1.10.0", 419 | "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.10.0.tgz", 420 | "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", 421 | "requires": { 422 | "esprima": "^3.1.3", 423 | "estraverse": "^4.2.0", 424 | "esutils": "^2.0.2", 425 | "optionator": "^0.8.1", 426 | "source-map": "~0.6.1" 427 | }, 428 | "dependencies": { 429 | "esprima": { 430 | "version": "3.1.3", 431 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", 432 | "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" 433 | }, 434 | "source-map": { 435 | "version": "0.6.1", 436 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 437 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 438 | "optional": true 439 | } 440 | } 441 | }, 442 | "esprima": { 443 | "version": "4.0.1", 444 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 445 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" 446 | }, 447 | "esquery": { 448 | "version": "1.0.1", 449 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", 450 | "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", 451 | "requires": { 452 | "estraverse": "^4.0.0" 453 | } 454 | }, 455 | "estraverse": { 456 | "version": "4.2.0", 457 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", 458 | "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" 459 | }, 460 | "esutils": { 461 | "version": "2.0.2", 462 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", 463 | "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" 464 | }, 465 | "expand-brackets": { 466 | "version": "2.1.4", 467 | "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", 468 | "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", 469 | "requires": { 470 | "debug": "^2.3.3", 471 | "define-property": "^0.2.5", 472 | "extend-shallow": "^2.0.1", 473 | "posix-character-classes": "^0.1.0", 474 | "regex-not": "^1.0.0", 475 | "snapdragon": "^0.8.1", 476 | "to-regex": "^3.0.1" 477 | }, 478 | "dependencies": { 479 | "define-property": { 480 | "version": "0.2.5", 481 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", 482 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", 483 | "requires": { 484 | "is-descriptor": "^0.1.0" 485 | } 486 | }, 487 | "extend-shallow": { 488 | "version": "2.0.1", 489 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", 490 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", 491 | "requires": { 492 | "is-extendable": "^0.1.0" 493 | } 494 | } 495 | } 496 | }, 497 | "extend-shallow": { 498 | "version": "3.0.2", 499 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", 500 | "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", 501 | "requires": { 502 | "assign-symbols": "^1.0.0", 503 | "is-extendable": "^1.0.1" 504 | }, 505 | "dependencies": { 506 | "is-extendable": { 507 | "version": "1.0.1", 508 | "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", 509 | "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", 510 | "requires": { 511 | "is-plain-object": "^2.0.4" 512 | } 513 | } 514 | } 515 | }, 516 | "extglob": { 517 | "version": "2.0.4", 518 | "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", 519 | "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", 520 | "requires": { 521 | "array-unique": "^0.3.2", 522 | "define-property": "^1.0.0", 523 | "expand-brackets": "^2.1.4", 524 | "extend-shallow": "^2.0.1", 525 | "fragment-cache": "^0.2.1", 526 | "regex-not": "^1.0.0", 527 | "snapdragon": "^0.8.1", 528 | "to-regex": "^3.0.1" 529 | }, 530 | "dependencies": { 531 | "define-property": { 532 | "version": "1.0.0", 533 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", 534 | "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", 535 | "requires": { 536 | "is-descriptor": "^1.0.0" 537 | } 538 | }, 539 | "extend-shallow": { 540 | "version": "2.0.1", 541 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", 542 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", 543 | "requires": { 544 | "is-extendable": "^0.1.0" 545 | } 546 | }, 547 | "is-accessor-descriptor": { 548 | "version": "1.0.0", 549 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", 550 | "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", 551 | "requires": { 552 | "kind-of": "^6.0.0" 553 | } 554 | }, 555 | "is-data-descriptor": { 556 | "version": "1.0.0", 557 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", 558 | "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", 559 | "requires": { 560 | "kind-of": "^6.0.0" 561 | } 562 | }, 563 | "is-descriptor": { 564 | "version": "1.0.2", 565 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", 566 | "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", 567 | "requires": { 568 | "is-accessor-descriptor": "^1.0.0", 569 | "is-data-descriptor": "^1.0.0", 570 | "kind-of": "^6.0.2" 571 | } 572 | }, 573 | "kind-of": { 574 | "version": "6.0.2", 575 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", 576 | "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" 577 | } 578 | } 579 | }, 580 | "fast-glob": { 581 | "version": "2.2.2", 582 | "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", 583 | "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", 584 | "requires": { 585 | "@mrmlnc/readdir-enhanced": "^2.2.1", 586 | "@nodelib/fs.stat": "^1.0.1", 587 | "glob-parent": "^3.1.0", 588 | "is-glob": "^4.0.0", 589 | "merge2": "^1.2.1", 590 | "micromatch": "^3.1.10" 591 | }, 592 | "dependencies": { 593 | "is-glob": { 594 | "version": "4.0.0", 595 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", 596 | "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", 597 | "requires": { 598 | "is-extglob": "^2.1.1" 599 | } 600 | } 601 | } 602 | }, 603 | "fast-levenshtein": { 604 | "version": "2.0.6", 605 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 606 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" 607 | }, 608 | "fill-range": { 609 | "version": "4.0.0", 610 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", 611 | "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", 612 | "requires": { 613 | "extend-shallow": "^2.0.1", 614 | "is-number": "^3.0.0", 615 | "repeat-string": "^1.6.1", 616 | "to-regex-range": "^2.1.0" 617 | }, 618 | "dependencies": { 619 | "extend-shallow": { 620 | "version": "2.0.1", 621 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", 622 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", 623 | "requires": { 624 | "is-extendable": "^0.1.0" 625 | } 626 | } 627 | } 628 | }, 629 | "for-in": { 630 | "version": "1.0.2", 631 | "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", 632 | "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" 633 | }, 634 | "fragment-cache": { 635 | "version": "0.2.1", 636 | "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", 637 | "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", 638 | "requires": { 639 | "map-cache": "^0.2.2" 640 | } 641 | }, 642 | "fs-extra": { 643 | "version": "6.0.1", 644 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", 645 | "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", 646 | "requires": { 647 | "graceful-fs": "^4.1.2", 648 | "jsonfile": "^4.0.0", 649 | "universalify": "^0.1.0" 650 | } 651 | }, 652 | "fs.realpath": { 653 | "version": "1.0.0", 654 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 655 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 656 | }, 657 | "get-value": { 658 | "version": "2.0.6", 659 | "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", 660 | "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" 661 | }, 662 | "glob": { 663 | "version": "7.1.2", 664 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", 665 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", 666 | "requires": { 667 | "fs.realpath": "^1.0.0", 668 | "inflight": "^1.0.4", 669 | "inherits": "2", 670 | "minimatch": "^3.0.4", 671 | "once": "^1.3.0", 672 | "path-is-absolute": "^1.0.0" 673 | } 674 | }, 675 | "glob-parent": { 676 | "version": "3.1.0", 677 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", 678 | "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", 679 | "requires": { 680 | "is-glob": "^3.1.0", 681 | "path-dirname": "^1.0.0" 682 | } 683 | }, 684 | "glob-to-regexp": { 685 | "version": "0.3.0", 686 | "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", 687 | "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" 688 | }, 689 | "globby": { 690 | "version": "8.0.1", 691 | "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", 692 | "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", 693 | "requires": { 694 | "array-union": "^1.0.1", 695 | "dir-glob": "^2.0.0", 696 | "fast-glob": "^2.0.2", 697 | "glob": "^7.1.2", 698 | "ignore": "^3.3.5", 699 | "pify": "^3.0.0", 700 | "slash": "^1.0.0" 701 | } 702 | }, 703 | "graceful-fs": { 704 | "version": "4.1.11", 705 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", 706 | "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" 707 | }, 708 | "handlebars": { 709 | "version": "4.0.11", 710 | "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", 711 | "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", 712 | "requires": { 713 | "async": "^1.4.0", 714 | "optimist": "^0.6.1", 715 | "source-map": "^0.4.4", 716 | "uglify-js": "^2.6" 717 | } 718 | }, 719 | "has-value": { 720 | "version": "1.0.0", 721 | "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", 722 | "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", 723 | "requires": { 724 | "get-value": "^2.0.6", 725 | "has-values": "^1.0.0", 726 | "isobject": "^3.0.0" 727 | } 728 | }, 729 | "has-values": { 730 | "version": "1.0.0", 731 | "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", 732 | "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", 733 | "requires": { 734 | "is-number": "^3.0.0", 735 | "kind-of": "^4.0.0" 736 | }, 737 | "dependencies": { 738 | "kind-of": { 739 | "version": "4.0.0", 740 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", 741 | "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", 742 | "requires": { 743 | "is-buffer": "^1.1.5" 744 | } 745 | } 746 | } 747 | }, 748 | "ignore": { 749 | "version": "3.3.10", 750 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", 751 | "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" 752 | }, 753 | "inflight": { 754 | "version": "1.0.6", 755 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 756 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 757 | "requires": { 758 | "once": "^1.3.0", 759 | "wrappy": "1" 760 | } 761 | }, 762 | "inherits": { 763 | "version": "2.0.3", 764 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 765 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 766 | }, 767 | "interpret": { 768 | "version": "1.1.0", 769 | "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", 770 | "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" 771 | }, 772 | "is-absolute": { 773 | "version": "1.0.0", 774 | "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", 775 | "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", 776 | "requires": { 777 | "is-relative": "^1.0.0", 778 | "is-windows": "^1.0.1" 779 | } 780 | }, 781 | "is-accessor-descriptor": { 782 | "version": "0.1.6", 783 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", 784 | "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", 785 | "requires": { 786 | "kind-of": "^3.0.2" 787 | } 788 | }, 789 | "is-buffer": { 790 | "version": "1.1.6", 791 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", 792 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" 793 | }, 794 | "is-data-descriptor": { 795 | "version": "0.1.4", 796 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", 797 | "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", 798 | "requires": { 799 | "kind-of": "^3.0.2" 800 | } 801 | }, 802 | "is-descriptor": { 803 | "version": "0.1.6", 804 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", 805 | "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", 806 | "requires": { 807 | "is-accessor-descriptor": "^0.1.6", 808 | "is-data-descriptor": "^0.1.4", 809 | "kind-of": "^5.0.0" 810 | }, 811 | "dependencies": { 812 | "kind-of": { 813 | "version": "5.1.0", 814 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", 815 | "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" 816 | } 817 | } 818 | }, 819 | "is-extendable": { 820 | "version": "0.1.1", 821 | "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", 822 | "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" 823 | }, 824 | "is-extglob": { 825 | "version": "2.1.1", 826 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 827 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" 828 | }, 829 | "is-glob": { 830 | "version": "3.1.0", 831 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", 832 | "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", 833 | "requires": { 834 | "is-extglob": "^2.1.0" 835 | } 836 | }, 837 | "is-negated-glob": { 838 | "version": "1.0.0", 839 | "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", 840 | "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=" 841 | }, 842 | "is-number": { 843 | "version": "3.0.0", 844 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", 845 | "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", 846 | "requires": { 847 | "kind-of": "^3.0.2" 848 | } 849 | }, 850 | "is-plain-object": { 851 | "version": "2.0.4", 852 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", 853 | "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", 854 | "requires": { 855 | "isobject": "^3.0.1" 856 | } 857 | }, 858 | "is-relative": { 859 | "version": "1.0.0", 860 | "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", 861 | "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", 862 | "requires": { 863 | "is-unc-path": "^1.0.0" 864 | } 865 | }, 866 | "is-unc-path": { 867 | "version": "1.0.0", 868 | "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", 869 | "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", 870 | "requires": { 871 | "unc-path-regex": "^0.1.2" 872 | } 873 | }, 874 | "is-windows": { 875 | "version": "1.0.2", 876 | "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", 877 | "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" 878 | }, 879 | "isarray": { 880 | "version": "1.0.0", 881 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 882 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 883 | }, 884 | "isobject": { 885 | "version": "3.0.1", 886 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", 887 | "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" 888 | }, 889 | "jsonfile": { 890 | "version": "4.0.0", 891 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", 892 | "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", 893 | "requires": { 894 | "graceful-fs": "^4.1.6" 895 | } 896 | }, 897 | "kind-of": { 898 | "version": "3.2.2", 899 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", 900 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", 901 | "requires": { 902 | "is-buffer": "^1.1.5" 903 | } 904 | }, 905 | "lazy-cache": { 906 | "version": "1.0.4", 907 | "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", 908 | "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", 909 | "optional": true 910 | }, 911 | "levn": { 912 | "version": "0.3.0", 913 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", 914 | "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", 915 | "requires": { 916 | "prelude-ls": "~1.1.2", 917 | "type-check": "~0.3.2" 918 | } 919 | }, 920 | "longest": { 921 | "version": "1.0.1", 922 | "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", 923 | "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" 924 | }, 925 | "make-error": { 926 | "version": "1.3.4", 927 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", 928 | "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", 929 | "dev": true 930 | }, 931 | "map-cache": { 932 | "version": "0.2.2", 933 | "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", 934 | "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" 935 | }, 936 | "map-visit": { 937 | "version": "1.0.0", 938 | "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", 939 | "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", 940 | "requires": { 941 | "object-visit": "^1.0.0" 942 | } 943 | }, 944 | "merge2": { 945 | "version": "1.2.2", 946 | "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz", 947 | "integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==" 948 | }, 949 | "micromatch": { 950 | "version": "3.1.10", 951 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", 952 | "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", 953 | "requires": { 954 | "arr-diff": "^4.0.0", 955 | "array-unique": "^0.3.2", 956 | "braces": "^2.3.1", 957 | "define-property": "^2.0.2", 958 | "extend-shallow": "^3.0.2", 959 | "extglob": "^2.0.4", 960 | "fragment-cache": "^0.2.1", 961 | "kind-of": "^6.0.2", 962 | "nanomatch": "^1.2.9", 963 | "object.pick": "^1.3.0", 964 | "regex-not": "^1.0.0", 965 | "snapdragon": "^0.8.1", 966 | "to-regex": "^3.0.2" 967 | }, 968 | "dependencies": { 969 | "kind-of": { 970 | "version": "6.0.2", 971 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", 972 | "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" 973 | } 974 | } 975 | }, 976 | "minify-fast": { 977 | "version": "0.11.1", 978 | "resolved": "https://registry.npmjs.org/minify-fast/-/minify-fast-0.11.1.tgz", 979 | "integrity": "sha512-hDPPA0OYaEn0OYtJfCQwSFF5PKE6F6eZgw+QJGaSfJtETB/FKSGKtQvUkpWXbio1+mMoIIX4Hrsb9+AdJkaSJw==", 980 | "requires": { 981 | "acorn": "^5.7.1", 982 | "astring": "^1.3.1", 983 | "escodegen": "^1.10.0", 984 | "esprima": "^4.0.1", 985 | "glob": "^7.1.2", 986 | "minimist": "^1.2.0", 987 | "shelljs": "^0.8.2" 988 | } 989 | }, 990 | "minimatch": { 991 | "version": "3.0.4", 992 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 993 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 994 | "requires": { 995 | "brace-expansion": "^1.1.7" 996 | } 997 | }, 998 | "minimist": { 999 | "version": "1.2.0", 1000 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", 1001 | "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" 1002 | }, 1003 | "mixin-deep": { 1004 | "version": "1.3.1", 1005 | "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", 1006 | "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", 1007 | "requires": { 1008 | "for-in": "^1.0.2", 1009 | "is-extendable": "^1.0.1" 1010 | }, 1011 | "dependencies": { 1012 | "is-extendable": { 1013 | "version": "1.0.1", 1014 | "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", 1015 | "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", 1016 | "requires": { 1017 | "is-plain-object": "^2.0.4" 1018 | } 1019 | } 1020 | } 1021 | }, 1022 | "mkdirp": { 1023 | "version": "0.5.1", 1024 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", 1025 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", 1026 | "dev": true, 1027 | "requires": { 1028 | "minimist": "0.0.8" 1029 | }, 1030 | "dependencies": { 1031 | "minimist": { 1032 | "version": "0.0.8", 1033 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", 1034 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", 1035 | "dev": true 1036 | } 1037 | } 1038 | }, 1039 | "ms": { 1040 | "version": "2.0.0", 1041 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1042 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 1043 | }, 1044 | "multimatch": { 1045 | "version": "2.1.0", 1046 | "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", 1047 | "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", 1048 | "requires": { 1049 | "array-differ": "^1.0.0", 1050 | "array-union": "^1.0.1", 1051 | "arrify": "^1.0.0", 1052 | "minimatch": "^3.0.0" 1053 | } 1054 | }, 1055 | "nanomatch": { 1056 | "version": "1.2.13", 1057 | "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", 1058 | "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", 1059 | "requires": { 1060 | "arr-diff": "^4.0.0", 1061 | "array-unique": "^0.3.2", 1062 | "define-property": "^2.0.2", 1063 | "extend-shallow": "^3.0.2", 1064 | "fragment-cache": "^0.2.1", 1065 | "is-windows": "^1.0.2", 1066 | "kind-of": "^6.0.2", 1067 | "object.pick": "^1.3.0", 1068 | "regex-not": "^1.0.0", 1069 | "snapdragon": "^0.8.1", 1070 | "to-regex": "^3.0.1" 1071 | }, 1072 | "dependencies": { 1073 | "kind-of": { 1074 | "version": "6.0.2", 1075 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", 1076 | "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" 1077 | } 1078 | } 1079 | }, 1080 | "object-assign": { 1081 | "version": "4.1.1", 1082 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 1083 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 1084 | }, 1085 | "object-copy": { 1086 | "version": "0.1.0", 1087 | "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", 1088 | "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", 1089 | "requires": { 1090 | "copy-descriptor": "^0.1.0", 1091 | "define-property": "^0.2.5", 1092 | "kind-of": "^3.0.3" 1093 | }, 1094 | "dependencies": { 1095 | "define-property": { 1096 | "version": "0.2.5", 1097 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", 1098 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", 1099 | "requires": { 1100 | "is-descriptor": "^0.1.0" 1101 | } 1102 | } 1103 | } 1104 | }, 1105 | "object-visit": { 1106 | "version": "1.0.1", 1107 | "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", 1108 | "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", 1109 | "requires": { 1110 | "isobject": "^3.0.0" 1111 | } 1112 | }, 1113 | "object.pick": { 1114 | "version": "1.3.0", 1115 | "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", 1116 | "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", 1117 | "requires": { 1118 | "isobject": "^3.0.1" 1119 | } 1120 | }, 1121 | "once": { 1122 | "version": "1.4.0", 1123 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1124 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1125 | "requires": { 1126 | "wrappy": "1" 1127 | } 1128 | }, 1129 | "optimist": { 1130 | "version": "0.6.1", 1131 | "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", 1132 | "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", 1133 | "requires": { 1134 | "minimist": "~0.0.1", 1135 | "wordwrap": "~0.0.2" 1136 | }, 1137 | "dependencies": { 1138 | "minimist": { 1139 | "version": "0.0.10", 1140 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", 1141 | "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" 1142 | } 1143 | } 1144 | }, 1145 | "optionator": { 1146 | "version": "0.8.2", 1147 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", 1148 | "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", 1149 | "requires": { 1150 | "deep-is": "~0.1.3", 1151 | "fast-levenshtein": "~2.0.4", 1152 | "levn": "~0.3.0", 1153 | "prelude-ls": "~1.1.2", 1154 | "type-check": "~0.3.2", 1155 | "wordwrap": "~1.0.0" 1156 | }, 1157 | "dependencies": { 1158 | "wordwrap": { 1159 | "version": "1.0.0", 1160 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", 1161 | "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" 1162 | } 1163 | } 1164 | }, 1165 | "pascalcase": { 1166 | "version": "0.1.1", 1167 | "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", 1168 | "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" 1169 | }, 1170 | "path-dirname": { 1171 | "version": "1.0.2", 1172 | "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", 1173 | "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" 1174 | }, 1175 | "path-is-absolute": { 1176 | "version": "1.0.1", 1177 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1178 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 1179 | }, 1180 | "path-parse": { 1181 | "version": "1.0.5", 1182 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", 1183 | "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" 1184 | }, 1185 | "path-type": { 1186 | "version": "3.0.0", 1187 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", 1188 | "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", 1189 | "requires": { 1190 | "pify": "^3.0.0" 1191 | } 1192 | }, 1193 | "pify": { 1194 | "version": "3.0.0", 1195 | "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", 1196 | "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" 1197 | }, 1198 | "posix-character-classes": { 1199 | "version": "0.1.1", 1200 | "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", 1201 | "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" 1202 | }, 1203 | "prelude-ls": { 1204 | "version": "1.1.2", 1205 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", 1206 | "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" 1207 | }, 1208 | "rechoir": { 1209 | "version": "0.6.2", 1210 | "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", 1211 | "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", 1212 | "requires": { 1213 | "resolve": "^1.1.6" 1214 | } 1215 | }, 1216 | "regex-not": { 1217 | "version": "1.0.2", 1218 | "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", 1219 | "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", 1220 | "requires": { 1221 | "extend-shallow": "^3.0.2", 1222 | "safe-regex": "^1.1.0" 1223 | } 1224 | }, 1225 | "repeat-element": { 1226 | "version": "1.1.2", 1227 | "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", 1228 | "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" 1229 | }, 1230 | "repeat-string": { 1231 | "version": "1.6.1", 1232 | "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", 1233 | "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" 1234 | }, 1235 | "resolve": { 1236 | "version": "1.8.1", 1237 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", 1238 | "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", 1239 | "requires": { 1240 | "path-parse": "^1.0.5" 1241 | } 1242 | }, 1243 | "resolve-url": { 1244 | "version": "0.2.1", 1245 | "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", 1246 | "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" 1247 | }, 1248 | "ret": { 1249 | "version": "0.1.15", 1250 | "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", 1251 | "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" 1252 | }, 1253 | "right-align": { 1254 | "version": "0.1.3", 1255 | "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", 1256 | "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", 1257 | "optional": true, 1258 | "requires": { 1259 | "align-text": "^0.1.1" 1260 | } 1261 | }, 1262 | "safe-regex": { 1263 | "version": "1.1.0", 1264 | "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", 1265 | "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", 1266 | "requires": { 1267 | "ret": "~0.1.10" 1268 | } 1269 | }, 1270 | "set-value": { 1271 | "version": "2.0.0", 1272 | "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", 1273 | "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", 1274 | "requires": { 1275 | "extend-shallow": "^2.0.1", 1276 | "is-extendable": "^0.1.1", 1277 | "is-plain-object": "^2.0.3", 1278 | "split-string": "^3.0.1" 1279 | }, 1280 | "dependencies": { 1281 | "extend-shallow": { 1282 | "version": "2.0.1", 1283 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", 1284 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", 1285 | "requires": { 1286 | "is-extendable": "^0.1.0" 1287 | } 1288 | } 1289 | } 1290 | }, 1291 | "shelljs": { 1292 | "version": "0.8.2", 1293 | "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.2.tgz", 1294 | "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==", 1295 | "requires": { 1296 | "glob": "^7.0.0", 1297 | "interpret": "^1.0.0", 1298 | "rechoir": "^0.6.2" 1299 | } 1300 | }, 1301 | "slash": { 1302 | "version": "1.0.0", 1303 | "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", 1304 | "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" 1305 | }, 1306 | "snapdragon": { 1307 | "version": "0.8.2", 1308 | "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", 1309 | "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", 1310 | "requires": { 1311 | "base": "^0.11.1", 1312 | "debug": "^2.2.0", 1313 | "define-property": "^0.2.5", 1314 | "extend-shallow": "^2.0.1", 1315 | "map-cache": "^0.2.2", 1316 | "source-map": "^0.5.6", 1317 | "source-map-resolve": "^0.5.0", 1318 | "use": "^3.1.0" 1319 | }, 1320 | "dependencies": { 1321 | "define-property": { 1322 | "version": "0.2.5", 1323 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", 1324 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", 1325 | "requires": { 1326 | "is-descriptor": "^0.1.0" 1327 | } 1328 | }, 1329 | "extend-shallow": { 1330 | "version": "2.0.1", 1331 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", 1332 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", 1333 | "requires": { 1334 | "is-extendable": "^0.1.0" 1335 | } 1336 | }, 1337 | "source-map": { 1338 | "version": "0.5.7", 1339 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", 1340 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" 1341 | } 1342 | } 1343 | }, 1344 | "snapdragon-node": { 1345 | "version": "2.1.1", 1346 | "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", 1347 | "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", 1348 | "requires": { 1349 | "define-property": "^1.0.0", 1350 | "isobject": "^3.0.0", 1351 | "snapdragon-util": "^3.0.1" 1352 | }, 1353 | "dependencies": { 1354 | "define-property": { 1355 | "version": "1.0.0", 1356 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", 1357 | "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", 1358 | "requires": { 1359 | "is-descriptor": "^1.0.0" 1360 | } 1361 | }, 1362 | "is-accessor-descriptor": { 1363 | "version": "1.0.0", 1364 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", 1365 | "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", 1366 | "requires": { 1367 | "kind-of": "^6.0.0" 1368 | } 1369 | }, 1370 | "is-data-descriptor": { 1371 | "version": "1.0.0", 1372 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", 1373 | "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", 1374 | "requires": { 1375 | "kind-of": "^6.0.0" 1376 | } 1377 | }, 1378 | "is-descriptor": { 1379 | "version": "1.0.2", 1380 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", 1381 | "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", 1382 | "requires": { 1383 | "is-accessor-descriptor": "^1.0.0", 1384 | "is-data-descriptor": "^1.0.0", 1385 | "kind-of": "^6.0.2" 1386 | } 1387 | }, 1388 | "kind-of": { 1389 | "version": "6.0.2", 1390 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", 1391 | "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" 1392 | } 1393 | } 1394 | }, 1395 | "snapdragon-util": { 1396 | "version": "3.0.1", 1397 | "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", 1398 | "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", 1399 | "requires": { 1400 | "kind-of": "^3.2.0" 1401 | } 1402 | }, 1403 | "source-map": { 1404 | "version": "0.4.4", 1405 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", 1406 | "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", 1407 | "requires": { 1408 | "amdefine": ">=0.0.4" 1409 | } 1410 | }, 1411 | "source-map-resolve": { 1412 | "version": "0.5.2", 1413 | "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", 1414 | "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", 1415 | "requires": { 1416 | "atob": "^2.1.1", 1417 | "decode-uri-component": "^0.2.0", 1418 | "resolve-url": "^0.2.1", 1419 | "source-map-url": "^0.4.0", 1420 | "urix": "^0.1.0" 1421 | } 1422 | }, 1423 | "source-map-support": { 1424 | "version": "0.5.6", 1425 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", 1426 | "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", 1427 | "dev": true, 1428 | "requires": { 1429 | "buffer-from": "^1.0.0", 1430 | "source-map": "^0.6.0" 1431 | }, 1432 | "dependencies": { 1433 | "source-map": { 1434 | "version": "0.6.1", 1435 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1436 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 1437 | "dev": true 1438 | } 1439 | } 1440 | }, 1441 | "source-map-url": { 1442 | "version": "0.4.0", 1443 | "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", 1444 | "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" 1445 | }, 1446 | "split-string": { 1447 | "version": "3.1.0", 1448 | "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", 1449 | "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", 1450 | "requires": { 1451 | "extend-shallow": "^3.0.0" 1452 | } 1453 | }, 1454 | "static-extend": { 1455 | "version": "0.1.2", 1456 | "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", 1457 | "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", 1458 | "requires": { 1459 | "define-property": "^0.2.5", 1460 | "object-copy": "^0.1.0" 1461 | }, 1462 | "dependencies": { 1463 | "define-property": { 1464 | "version": "0.2.5", 1465 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", 1466 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", 1467 | "requires": { 1468 | "is-descriptor": "^0.1.0" 1469 | } 1470 | } 1471 | } 1472 | }, 1473 | "to-object-path": { 1474 | "version": "0.3.0", 1475 | "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", 1476 | "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", 1477 | "requires": { 1478 | "kind-of": "^3.0.2" 1479 | } 1480 | }, 1481 | "to-regex": { 1482 | "version": "3.0.2", 1483 | "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", 1484 | "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", 1485 | "requires": { 1486 | "define-property": "^2.0.2", 1487 | "extend-shallow": "^3.0.2", 1488 | "regex-not": "^1.0.2", 1489 | "safe-regex": "^1.1.0" 1490 | } 1491 | }, 1492 | "to-regex-range": { 1493 | "version": "2.1.1", 1494 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", 1495 | "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", 1496 | "requires": { 1497 | "is-number": "^3.0.0", 1498 | "repeat-string": "^1.6.1" 1499 | } 1500 | }, 1501 | "ts-node": { 1502 | "version": "7.0.0", 1503 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.0.tgz", 1504 | "integrity": "sha512-klJsfswHP0FuOLsvBZ/zzCfUvakOSSxds78mVeK7I+qP76YWtxf16hEZsp3U+b0kIo82R5UatGFeblYMqabb2Q==", 1505 | "dev": true, 1506 | "requires": { 1507 | "arrify": "^1.0.0", 1508 | "buffer-from": "^1.1.0", 1509 | "diff": "^3.1.0", 1510 | "make-error": "^1.1.1", 1511 | "minimist": "^1.2.0", 1512 | "mkdirp": "^0.5.1", 1513 | "source-map-support": "^0.5.6", 1514 | "yn": "^2.0.0" 1515 | } 1516 | }, 1517 | "ts-simple-ast": { 1518 | "version": "12.5.4", 1519 | "resolved": "https://registry.npmjs.org/ts-simple-ast/-/ts-simple-ast-12.5.4.tgz", 1520 | "integrity": "sha512-xwxPBZ4OktDHqgDfm9Bt1gn4en3agSFcU8X/EglzSSdIDUTws8BCH0TbEYsE47J1t99Ht1BYO66rQ2FHLZu12g==", 1521 | "requires": { 1522 | "@dsherret/to-absolute-glob": "^2.0.2", 1523 | "code-block-writer": "^7.2.1", 1524 | "fs-extra": "^6.0.1", 1525 | "glob-parent": "^3.1.0", 1526 | "globby": "^8.0.1", 1527 | "is-negated-glob": "^1.0.0", 1528 | "multimatch": "^2.1.0", 1529 | "object-assign": "^4.1.1", 1530 | "tslib": "^1.9.0", 1531 | "typescript": "2.9.1" 1532 | }, 1533 | "dependencies": { 1534 | "typescript": { 1535 | "version": "2.9.1", 1536 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.1.tgz", 1537 | "integrity": "sha512-h6pM2f/GDchCFlldnriOhs1QHuwbnmj6/v7499eMHqPeW4V2G0elua2eIc2nu8v2NdHV0Gm+tzX83Hr6nUFjQA==" 1538 | } 1539 | } 1540 | }, 1541 | "tslib": { 1542 | "version": "1.9.3", 1543 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", 1544 | "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" 1545 | }, 1546 | "type-check": { 1547 | "version": "0.3.2", 1548 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", 1549 | "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", 1550 | "requires": { 1551 | "prelude-ls": "~1.1.2" 1552 | } 1553 | }, 1554 | "typescript": { 1555 | "version": "2.9.2", 1556 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", 1557 | "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==" 1558 | }, 1559 | "uglify-js": { 1560 | "version": "2.8.29", 1561 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", 1562 | "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", 1563 | "optional": true, 1564 | "requires": { 1565 | "source-map": "~0.5.1", 1566 | "uglify-to-browserify": "~1.0.0", 1567 | "yargs": "~3.10.0" 1568 | }, 1569 | "dependencies": { 1570 | "source-map": { 1571 | "version": "0.5.7", 1572 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", 1573 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", 1574 | "optional": true 1575 | } 1576 | } 1577 | }, 1578 | "uglify-to-browserify": { 1579 | "version": "1.0.2", 1580 | "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", 1581 | "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", 1582 | "optional": true 1583 | }, 1584 | "unc-path-regex": { 1585 | "version": "0.1.2", 1586 | "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", 1587 | "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" 1588 | }, 1589 | "union-value": { 1590 | "version": "1.0.0", 1591 | "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", 1592 | "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", 1593 | "requires": { 1594 | "arr-union": "^3.1.0", 1595 | "get-value": "^2.0.6", 1596 | "is-extendable": "^0.1.1", 1597 | "set-value": "^0.4.3" 1598 | }, 1599 | "dependencies": { 1600 | "extend-shallow": { 1601 | "version": "2.0.1", 1602 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", 1603 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", 1604 | "requires": { 1605 | "is-extendable": "^0.1.0" 1606 | } 1607 | }, 1608 | "set-value": { 1609 | "version": "0.4.3", 1610 | "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", 1611 | "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", 1612 | "requires": { 1613 | "extend-shallow": "^2.0.1", 1614 | "is-extendable": "^0.1.1", 1615 | "is-plain-object": "^2.0.1", 1616 | "to-object-path": "^0.3.0" 1617 | } 1618 | } 1619 | } 1620 | }, 1621 | "universalify": { 1622 | "version": "0.1.2", 1623 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", 1624 | "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" 1625 | }, 1626 | "unset-value": { 1627 | "version": "1.0.0", 1628 | "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", 1629 | "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", 1630 | "requires": { 1631 | "has-value": "^0.3.1", 1632 | "isobject": "^3.0.0" 1633 | }, 1634 | "dependencies": { 1635 | "has-value": { 1636 | "version": "0.3.1", 1637 | "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", 1638 | "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", 1639 | "requires": { 1640 | "get-value": "^2.0.3", 1641 | "has-values": "^0.1.4", 1642 | "isobject": "^2.0.0" 1643 | }, 1644 | "dependencies": { 1645 | "isobject": { 1646 | "version": "2.1.0", 1647 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", 1648 | "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", 1649 | "requires": { 1650 | "isarray": "1.0.0" 1651 | } 1652 | } 1653 | } 1654 | }, 1655 | "has-values": { 1656 | "version": "0.1.4", 1657 | "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", 1658 | "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" 1659 | } 1660 | } 1661 | }, 1662 | "urix": { 1663 | "version": "0.1.0", 1664 | "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", 1665 | "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" 1666 | }, 1667 | "use": { 1668 | "version": "3.1.1", 1669 | "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", 1670 | "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" 1671 | }, 1672 | "window-size": { 1673 | "version": "0.1.0", 1674 | "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", 1675 | "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", 1676 | "optional": true 1677 | }, 1678 | "wordwrap": { 1679 | "version": "0.0.3", 1680 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", 1681 | "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" 1682 | }, 1683 | "wrappy": { 1684 | "version": "1.0.2", 1685 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1686 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 1687 | }, 1688 | "yargs": { 1689 | "version": "3.10.0", 1690 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", 1691 | "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", 1692 | "optional": true, 1693 | "requires": { 1694 | "camelcase": "^1.0.2", 1695 | "cliui": "^2.1.0", 1696 | "decamelize": "^1.0.0", 1697 | "window-size": "0.1.0" 1698 | } 1699 | }, 1700 | "yn": { 1701 | "version": "2.0.0", 1702 | "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", 1703 | "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", 1704 | "dev": true 1705 | } 1706 | } 1707 | } 1708 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "typescript-api-playground", 3 | "version": "0.0.3", 4 | "description": "TypeScript compiler API and others online playground: https://typescript-api-playground.glitch.me/", 5 | "scripts": { 6 | "start": "ts-node ./src/server.ts" 7 | }, 8 | "engines": { 9 | "node": "10.x" 10 | }, 11 | "repository": "https://github.com/cancerberoSgx/typescript-api-playground", 12 | "license": "MIT", 13 | "dependencies": { 14 | "@phenomnomnominal/tsquery": "^2.0.0-beta.5", 15 | "handlebars": "^4.0.11", 16 | "minify-fast": "0.11.1", 17 | "ts-simple-ast": "12.5.4", 18 | "typescript": "2.9.2" 19 | }, 20 | "devDependencies": { 21 | "@types/node": "^10.5.2", 22 | "ts-node": "^7.0.0" 23 | }, 24 | "keywords": [ 25 | "node", 26 | "glitch", 27 | "typescript", 28 | "typescript compiler api", 29 | "typescript playground", 30 | "online editor", 31 | "typescript API" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /shrinkwrap.yaml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | handlebars: 4.0.11 3 | ts-simple-ast: 12.4.0 4 | typescript: 2.9.1 5 | devDependencies: 6 | '@types/node': 10.3.4 7 | ts-node: 6.1.2 8 | packages: 9 | /@dsherret/to-absolute-glob/2.0.2: 10 | dependencies: 11 | is-absolute: 1.0.0 12 | is-negated-glob: 1.0.0 13 | dev: false 14 | engines: 15 | node: '>=0.10.0' 16 | resolution: 17 | integrity: sha1-H2R13IvZdM6gei2vOGSzF7HdMyw= 18 | /@mrmlnc/readdir-enhanced/2.2.1: 19 | dependencies: 20 | call-me-maybe: 1.0.1 21 | glob-to-regexp: 0.3.0 22 | dev: false 23 | engines: 24 | node: '>=4' 25 | resolution: 26 | integrity: sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== 27 | /@nodelib/fs.stat/1.1.0: 28 | dev: false 29 | engines: 30 | node: '>= 6' 31 | resolution: 32 | integrity: sha512-LAQ1d4OPfSJ/BMbI2DuizmYrrkD9JMaTdi2hQTlI53lQ4kRQPyZQRS4CYQ7O66bnBBnP/oYdRxbk++X0xuFU6A== 33 | /@types/node/10.3.4: 34 | dev: true 35 | resolution: 36 | integrity: sha512-YMLlzdeNnAyLrQew39IFRkMacAR5BqKGIEei9ZjdHsIZtv+ZWKYTu1i7QJhetxQ9ReXx8w5f+cixdHZG3zgMQA== 37 | /align-text/0.1.4: 38 | dependencies: 39 | kind-of: 3.2.2 40 | longest: 1.0.1 41 | repeat-string: 1.6.1 42 | dev: false 43 | engines: 44 | node: '>=0.10.0' 45 | optional: true 46 | resolution: 47 | integrity: sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= 48 | /amdefine/1.0.1: 49 | dev: false 50 | engines: 51 | node: '>=0.4.2' 52 | resolution: 53 | integrity: sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= 54 | /arr-diff/4.0.0: 55 | dev: false 56 | engines: 57 | node: '>=0.10.0' 58 | resolution: 59 | integrity: sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= 60 | /arr-flatten/1.1.0: 61 | dev: false 62 | engines: 63 | node: '>=0.10.0' 64 | resolution: 65 | integrity: sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== 66 | /arr-union/3.1.0: 67 | dev: false 68 | engines: 69 | node: '>=0.10.0' 70 | resolution: 71 | integrity: sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= 72 | /array-differ/1.0.0: 73 | dev: false 74 | engines: 75 | node: '>=0.10.0' 76 | resolution: 77 | integrity: sha1-7/UuN1gknTO+QCuLuOVkuytdQDE= 78 | /array-union/1.0.2: 79 | dependencies: 80 | array-uniq: 1.0.3 81 | dev: false 82 | engines: 83 | node: '>=0.10.0' 84 | resolution: 85 | integrity: sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= 86 | /array-uniq/1.0.3: 87 | dev: false 88 | engines: 89 | node: '>=0.10.0' 90 | resolution: 91 | integrity: sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= 92 | /array-unique/0.3.2: 93 | dev: false 94 | engines: 95 | node: '>=0.10.0' 96 | resolution: 97 | integrity: sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= 98 | /arrify/1.0.1: 99 | engines: 100 | node: '>=0.10.0' 101 | resolution: 102 | integrity: sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= 103 | /assign-symbols/1.0.0: 104 | dev: false 105 | engines: 106 | node: '>=0.10.0' 107 | resolution: 108 | integrity: sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= 109 | /async/1.5.2: 110 | dev: false 111 | resolution: 112 | integrity: sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= 113 | /atob/2.1.1: 114 | dev: false 115 | engines: 116 | node: '>= 4.5.0' 117 | resolution: 118 | integrity: sha1-ri1acpR38onWDdf5amMUoi3Wwio= 119 | /balanced-match/1.0.0: 120 | dev: false 121 | resolution: 122 | integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c= 123 | /base/0.11.2: 124 | dependencies: 125 | cache-base: 1.0.1 126 | class-utils: 0.3.6 127 | component-emitter: 1.2.1 128 | define-property: 1.0.0 129 | isobject: 3.0.1 130 | mixin-deep: 1.3.1 131 | pascalcase: 0.1.1 132 | dev: false 133 | engines: 134 | node: '>=0.10.0' 135 | resolution: 136 | integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== 137 | /brace-expansion/1.1.11: 138 | dependencies: 139 | balanced-match: 1.0.0 140 | concat-map: 0.0.1 141 | dev: false 142 | resolution: 143 | integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 144 | /braces/2.3.2: 145 | dependencies: 146 | arr-flatten: 1.1.0 147 | array-unique: 0.3.2 148 | extend-shallow: 2.0.1 149 | fill-range: 4.0.0 150 | isobject: 3.0.1 151 | repeat-element: 1.1.2 152 | snapdragon: 0.8.2 153 | snapdragon-node: 2.1.1 154 | split-string: 3.1.0 155 | to-regex: 3.0.2 156 | dev: false 157 | engines: 158 | node: '>=0.10.0' 159 | resolution: 160 | integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== 161 | /buffer-from/1.1.0: 162 | dev: true 163 | resolution: 164 | integrity: sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ== 165 | /cache-base/1.0.1: 166 | dependencies: 167 | collection-visit: 1.0.0 168 | component-emitter: 1.2.1 169 | get-value: 2.0.6 170 | has-value: 1.0.0 171 | isobject: 3.0.1 172 | set-value: 2.0.0 173 | to-object-path: 0.3.0 174 | union-value: 1.0.0 175 | unset-value: 1.0.0 176 | dev: false 177 | engines: 178 | node: '>=0.10.0' 179 | resolution: 180 | integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== 181 | /call-me-maybe/1.0.1: 182 | dev: false 183 | resolution: 184 | integrity: sha1-JtII6onje1y95gJQoV8DHBak1ms= 185 | /camelcase/1.2.1: 186 | dev: false 187 | engines: 188 | node: '>=0.10.0' 189 | optional: true 190 | resolution: 191 | integrity: sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= 192 | /center-align/0.1.3: 193 | dependencies: 194 | align-text: 0.1.4 195 | lazy-cache: 1.0.4 196 | dev: false 197 | engines: 198 | node: '>=0.10.0' 199 | optional: true 200 | resolution: 201 | integrity: sha1-qg0yYptu6XIgBBHL1EYckHvCt60= 202 | /class-utils/0.3.6: 203 | dependencies: 204 | arr-union: 3.1.0 205 | define-property: 0.2.5 206 | isobject: 3.0.1 207 | static-extend: 0.1.2 208 | dev: false 209 | engines: 210 | node: '>=0.10.0' 211 | resolution: 212 | integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== 213 | /cliui/2.1.0: 214 | dependencies: 215 | center-align: 0.1.3 216 | right-align: 0.1.3 217 | wordwrap: 0.0.2 218 | dev: false 219 | optional: true 220 | resolution: 221 | integrity: sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= 222 | /code-block-writer/7.2.0: 223 | dev: false 224 | resolution: 225 | integrity: sha512-nbjC1C3cQg7kumv+wl4Brv94ro8l13QxAVaiSulyTvSK83nFUd4FlTIzcnfrsEchl0yErPdNRnNW/+3KFu3z7w== 226 | /collection-visit/1.0.0: 227 | dependencies: 228 | map-visit: 1.0.0 229 | object-visit: 1.0.1 230 | dev: false 231 | engines: 232 | node: '>=0.10.0' 233 | resolution: 234 | integrity: sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= 235 | /component-emitter/1.2.1: 236 | dev: false 237 | resolution: 238 | integrity: sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= 239 | /concat-map/0.0.1: 240 | dev: false 241 | resolution: 242 | integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 243 | /copy-descriptor/0.1.1: 244 | dev: false 245 | engines: 246 | node: '>=0.10.0' 247 | resolution: 248 | integrity: sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= 249 | /debug/2.6.9: 250 | dependencies: 251 | ms: 2.0.0 252 | dev: false 253 | resolution: 254 | integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== 255 | /decamelize/1.2.0: 256 | dev: false 257 | engines: 258 | node: '>=0.10.0' 259 | optional: true 260 | resolution: 261 | integrity: sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= 262 | /decode-uri-component/0.2.0: 263 | dev: false 264 | engines: 265 | node: '>=0.10' 266 | resolution: 267 | integrity: sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= 268 | /define-property/0.2.5: 269 | dependencies: 270 | is-descriptor: 0.1.6 271 | dev: false 272 | engines: 273 | node: '>=0.10.0' 274 | resolution: 275 | integrity: sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= 276 | /define-property/1.0.0: 277 | dependencies: 278 | is-descriptor: 1.0.2 279 | dev: false 280 | engines: 281 | node: '>=0.10.0' 282 | resolution: 283 | integrity: sha1-dp66rz9KY6rTr56NMEybvnm/sOY= 284 | /define-property/2.0.2: 285 | dependencies: 286 | is-descriptor: 1.0.2 287 | isobject: 3.0.1 288 | dev: false 289 | engines: 290 | node: '>=0.10.0' 291 | resolution: 292 | integrity: sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== 293 | /diff/3.5.0: 294 | dev: true 295 | engines: 296 | node: '>=0.3.1' 297 | resolution: 298 | integrity: sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== 299 | /dir-glob/2.0.0: 300 | dependencies: 301 | arrify: 1.0.1 302 | path-type: 3.0.0 303 | dev: false 304 | engines: 305 | node: '>=4' 306 | resolution: 307 | integrity: sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag== 308 | /expand-brackets/2.1.4: 309 | dependencies: 310 | debug: 2.6.9 311 | define-property: 0.2.5 312 | extend-shallow: 2.0.1 313 | posix-character-classes: 0.1.1 314 | regex-not: 1.0.2 315 | snapdragon: 0.8.2 316 | to-regex: 3.0.2 317 | dev: false 318 | engines: 319 | node: '>=0.10.0' 320 | resolution: 321 | integrity: sha1-t3c14xXOMPa27/D4OwQVGiJEliI= 322 | /extend-shallow/2.0.1: 323 | dependencies: 324 | is-extendable: 0.1.1 325 | dev: false 326 | engines: 327 | node: '>=0.10.0' 328 | resolution: 329 | integrity: sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= 330 | /extend-shallow/3.0.2: 331 | dependencies: 332 | assign-symbols: 1.0.0 333 | is-extendable: 1.0.1 334 | dev: false 335 | engines: 336 | node: '>=0.10.0' 337 | resolution: 338 | integrity: sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= 339 | /extglob/2.0.4: 340 | dependencies: 341 | array-unique: 0.3.2 342 | define-property: 1.0.0 343 | expand-brackets: 2.1.4 344 | extend-shallow: 2.0.1 345 | fragment-cache: 0.2.1 346 | regex-not: 1.0.2 347 | snapdragon: 0.8.2 348 | to-regex: 3.0.2 349 | dev: false 350 | engines: 351 | node: '>=0.10.0' 352 | resolution: 353 | integrity: sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== 354 | /fast-glob/2.2.2: 355 | dependencies: 356 | '@mrmlnc/readdir-enhanced': 2.2.1 357 | '@nodelib/fs.stat': 1.1.0 358 | glob-parent: 3.1.0 359 | is-glob: 4.0.0 360 | merge2: 1.2.2 361 | micromatch: 3.1.10 362 | dev: false 363 | engines: 364 | node: '>=4.0.0' 365 | resolution: 366 | integrity: sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g== 367 | /fill-range/4.0.0: 368 | dependencies: 369 | extend-shallow: 2.0.1 370 | is-number: 3.0.0 371 | repeat-string: 1.6.1 372 | to-regex-range: 2.1.1 373 | dev: false 374 | engines: 375 | node: '>=0.10.0' 376 | resolution: 377 | integrity: sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= 378 | /for-in/1.0.2: 379 | dev: false 380 | engines: 381 | node: '>=0.10.0' 382 | resolution: 383 | integrity: sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= 384 | /fragment-cache/0.2.1: 385 | dependencies: 386 | map-cache: 0.2.2 387 | dev: false 388 | engines: 389 | node: '>=0.10.0' 390 | resolution: 391 | integrity: sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= 392 | /fs-extra/6.0.1: 393 | dependencies: 394 | graceful-fs: 4.1.11 395 | jsonfile: 4.0.0 396 | universalify: 0.1.2 397 | dev: false 398 | resolution: 399 | integrity: sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA== 400 | /fs.realpath/1.0.0: 401 | dev: false 402 | resolution: 403 | integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 404 | /get-value/2.0.6: 405 | dev: false 406 | engines: 407 | node: '>=0.10.0' 408 | resolution: 409 | integrity: sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= 410 | /glob-parent/3.1.0: 411 | dependencies: 412 | is-glob: 3.1.0 413 | path-dirname: 1.0.2 414 | dev: false 415 | resolution: 416 | integrity: sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= 417 | /glob-to-regexp/0.3.0: 418 | dev: false 419 | resolution: 420 | integrity: sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= 421 | /glob/7.1.2: 422 | dependencies: 423 | fs.realpath: 1.0.0 424 | inflight: 1.0.6 425 | inherits: 2.0.3 426 | minimatch: 3.0.4 427 | once: 1.4.0 428 | path-is-absolute: 1.0.1 429 | dev: false 430 | resolution: 431 | integrity: sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== 432 | /globby/8.0.1: 433 | dependencies: 434 | array-union: 1.0.2 435 | dir-glob: 2.0.0 436 | fast-glob: 2.2.2 437 | glob: 7.1.2 438 | ignore: 3.3.8 439 | pify: 3.0.0 440 | slash: 1.0.0 441 | dev: false 442 | engines: 443 | node: '>=4' 444 | resolution: 445 | integrity: sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw== 446 | /graceful-fs/4.1.11: 447 | dev: false 448 | engines: 449 | node: '>=0.4.0' 450 | resolution: 451 | integrity: sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg= 452 | /handlebars/4.0.11: 453 | dependencies: 454 | async: 1.5.2 455 | optimist: 0.6.1 456 | source-map: 0.4.4 457 | dev: false 458 | engines: 459 | node: '>=0.4.7' 460 | optionalDependencies: 461 | uglify-js: 2.8.29 462 | resolution: 463 | integrity: sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw= 464 | /has-value/0.3.1: 465 | dependencies: 466 | get-value: 2.0.6 467 | has-values: 0.1.4 468 | isobject: 2.1.0 469 | dev: false 470 | engines: 471 | node: '>=0.10.0' 472 | resolution: 473 | integrity: sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= 474 | /has-value/1.0.0: 475 | dependencies: 476 | get-value: 2.0.6 477 | has-values: 1.0.0 478 | isobject: 3.0.1 479 | dev: false 480 | engines: 481 | node: '>=0.10.0' 482 | resolution: 483 | integrity: sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= 484 | /has-values/0.1.4: 485 | dev: false 486 | engines: 487 | node: '>=0.10.0' 488 | resolution: 489 | integrity: sha1-bWHeldkd/Km5oCCJrThL/49it3E= 490 | /has-values/1.0.0: 491 | dependencies: 492 | is-number: 3.0.0 493 | kind-of: 4.0.0 494 | dev: false 495 | engines: 496 | node: '>=0.10.0' 497 | resolution: 498 | integrity: sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= 499 | /ignore/3.3.8: 500 | dev: false 501 | resolution: 502 | integrity: sha512-pUh+xUQQhQzevjRHHFqqcTy0/dP/kS9I8HSrUydhihjuD09W6ldVWFtIrwhXdUJHis3i2rZNqEHpZH/cbinFbg== 503 | /inflight/1.0.6: 504 | dependencies: 505 | once: 1.4.0 506 | wrappy: 1.0.2 507 | dev: false 508 | resolution: 509 | integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 510 | /inherits/2.0.3: 511 | dev: false 512 | resolution: 513 | integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= 514 | /is-absolute/1.0.0: 515 | dependencies: 516 | is-relative: 1.0.0 517 | is-windows: 1.0.2 518 | dev: false 519 | engines: 520 | node: '>=0.10.0' 521 | resolution: 522 | integrity: sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== 523 | /is-accessor-descriptor/0.1.6: 524 | dependencies: 525 | kind-of: 3.2.2 526 | dev: false 527 | engines: 528 | node: '>=0.10.0' 529 | resolution: 530 | integrity: sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= 531 | /is-accessor-descriptor/1.0.0: 532 | dependencies: 533 | kind-of: 6.0.2 534 | dev: false 535 | engines: 536 | node: '>=0.10.0' 537 | resolution: 538 | integrity: sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== 539 | /is-buffer/1.1.6: 540 | dev: false 541 | resolution: 542 | integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== 543 | /is-data-descriptor/0.1.4: 544 | dependencies: 545 | kind-of: 3.2.2 546 | dev: false 547 | engines: 548 | node: '>=0.10.0' 549 | resolution: 550 | integrity: sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= 551 | /is-data-descriptor/1.0.0: 552 | dependencies: 553 | kind-of: 6.0.2 554 | dev: false 555 | engines: 556 | node: '>=0.10.0' 557 | resolution: 558 | integrity: sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== 559 | /is-descriptor/0.1.6: 560 | dependencies: 561 | is-accessor-descriptor: 0.1.6 562 | is-data-descriptor: 0.1.4 563 | kind-of: 5.1.0 564 | dev: false 565 | engines: 566 | node: '>=0.10.0' 567 | resolution: 568 | integrity: sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== 569 | /is-descriptor/1.0.2: 570 | dependencies: 571 | is-accessor-descriptor: 1.0.0 572 | is-data-descriptor: 1.0.0 573 | kind-of: 6.0.2 574 | dev: false 575 | engines: 576 | node: '>=0.10.0' 577 | resolution: 578 | integrity: sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== 579 | /is-extendable/0.1.1: 580 | dev: false 581 | engines: 582 | node: '>=0.10.0' 583 | resolution: 584 | integrity: sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= 585 | /is-extendable/1.0.1: 586 | dependencies: 587 | is-plain-object: 2.0.4 588 | dev: false 589 | engines: 590 | node: '>=0.10.0' 591 | resolution: 592 | integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== 593 | /is-extglob/2.1.1: 594 | dev: false 595 | engines: 596 | node: '>=0.10.0' 597 | resolution: 598 | integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= 599 | /is-glob/3.1.0: 600 | dependencies: 601 | is-extglob: 2.1.1 602 | dev: false 603 | engines: 604 | node: '>=0.10.0' 605 | resolution: 606 | integrity: sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= 607 | /is-glob/4.0.0: 608 | dependencies: 609 | is-extglob: 2.1.1 610 | dev: false 611 | engines: 612 | node: '>=0.10.0' 613 | resolution: 614 | integrity: sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A= 615 | /is-negated-glob/1.0.0: 616 | dev: false 617 | engines: 618 | node: '>=0.10.0' 619 | resolution: 620 | integrity: sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI= 621 | /is-number/3.0.0: 622 | dependencies: 623 | kind-of: 3.2.2 624 | dev: false 625 | engines: 626 | node: '>=0.10.0' 627 | resolution: 628 | integrity: sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= 629 | /is-number/4.0.0: 630 | dev: false 631 | engines: 632 | node: '>=0.10.0' 633 | resolution: 634 | integrity: sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== 635 | /is-odd/2.0.0: 636 | dependencies: 637 | is-number: 4.0.0 638 | dev: false 639 | engines: 640 | node: '>=0.10.0' 641 | resolution: 642 | integrity: sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ== 643 | /is-plain-object/2.0.4: 644 | dependencies: 645 | isobject: 3.0.1 646 | dev: false 647 | engines: 648 | node: '>=0.10.0' 649 | resolution: 650 | integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== 651 | /is-relative/1.0.0: 652 | dependencies: 653 | is-unc-path: 1.0.0 654 | dev: false 655 | engines: 656 | node: '>=0.10.0' 657 | resolution: 658 | integrity: sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== 659 | /is-unc-path/1.0.0: 660 | dependencies: 661 | unc-path-regex: 0.1.2 662 | dev: false 663 | engines: 664 | node: '>=0.10.0' 665 | resolution: 666 | integrity: sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== 667 | /is-windows/1.0.2: 668 | dev: false 669 | engines: 670 | node: '>=0.10.0' 671 | resolution: 672 | integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== 673 | /isarray/1.0.0: 674 | dev: false 675 | resolution: 676 | integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= 677 | /isobject/2.1.0: 678 | dependencies: 679 | isarray: 1.0.0 680 | dev: false 681 | engines: 682 | node: '>=0.10.0' 683 | resolution: 684 | integrity: sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= 685 | /isobject/3.0.1: 686 | dev: false 687 | engines: 688 | node: '>=0.10.0' 689 | resolution: 690 | integrity: sha1-TkMekrEalzFjaqH5yNHMvP2reN8= 691 | /jsonfile/4.0.0: 692 | dev: false 693 | optionalDependencies: 694 | graceful-fs: 4.1.11 695 | resolution: 696 | integrity: sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= 697 | /kind-of/3.2.2: 698 | dependencies: 699 | is-buffer: 1.1.6 700 | dev: false 701 | engines: 702 | node: '>=0.10.0' 703 | resolution: 704 | integrity: sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= 705 | /kind-of/4.0.0: 706 | dependencies: 707 | is-buffer: 1.1.6 708 | dev: false 709 | engines: 710 | node: '>=0.10.0' 711 | resolution: 712 | integrity: sha1-IIE989cSkosgc3hpGkUGb65y3Vc= 713 | /kind-of/5.1.0: 714 | dev: false 715 | engines: 716 | node: '>=0.10.0' 717 | resolution: 718 | integrity: sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== 719 | /kind-of/6.0.2: 720 | dev: false 721 | engines: 722 | node: '>=0.10.0' 723 | resolution: 724 | integrity: sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== 725 | /lazy-cache/1.0.4: 726 | dev: false 727 | engines: 728 | node: '>=0.10.0' 729 | optional: true 730 | resolution: 731 | integrity: sha1-odePw6UEdMuAhF07O24dpJpEbo4= 732 | /longest/1.0.1: 733 | dev: false 734 | engines: 735 | node: '>=0.10.0' 736 | optional: true 737 | resolution: 738 | integrity: sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= 739 | /make-error/1.3.4: 740 | dev: true 741 | resolution: 742 | integrity: sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g== 743 | /map-cache/0.2.2: 744 | dev: false 745 | engines: 746 | node: '>=0.10.0' 747 | resolution: 748 | integrity: sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= 749 | /map-visit/1.0.0: 750 | dependencies: 751 | object-visit: 1.0.1 752 | dev: false 753 | engines: 754 | node: '>=0.10.0' 755 | resolution: 756 | integrity: sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= 757 | /merge2/1.2.2: 758 | dev: false 759 | engines: 760 | node: '>= 4.5.0' 761 | resolution: 762 | integrity: sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg== 763 | /micromatch/3.1.10: 764 | dependencies: 765 | arr-diff: 4.0.0 766 | array-unique: 0.3.2 767 | braces: 2.3.2 768 | define-property: 2.0.2 769 | extend-shallow: 3.0.2 770 | extglob: 2.0.4 771 | fragment-cache: 0.2.1 772 | kind-of: 6.0.2 773 | nanomatch: 1.2.9 774 | object.pick: 1.3.0 775 | regex-not: 1.0.2 776 | snapdragon: 0.8.2 777 | to-regex: 3.0.2 778 | dev: false 779 | engines: 780 | node: '>=0.10.0' 781 | resolution: 782 | integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== 783 | /minimatch/3.0.4: 784 | dependencies: 785 | brace-expansion: 1.1.11 786 | dev: false 787 | resolution: 788 | integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 789 | /minimist/0.0.10: 790 | dev: false 791 | resolution: 792 | integrity: sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= 793 | /minimist/0.0.8: 794 | dev: true 795 | resolution: 796 | integrity: sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= 797 | /minimist/1.2.0: 798 | dev: true 799 | resolution: 800 | integrity: sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= 801 | /mixin-deep/1.3.1: 802 | dependencies: 803 | for-in: 1.0.2 804 | is-extendable: 1.0.1 805 | dev: false 806 | engines: 807 | node: '>=0.10.0' 808 | resolution: 809 | integrity: sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== 810 | /mkdirp/0.5.1: 811 | dependencies: 812 | minimist: 0.0.8 813 | dev: true 814 | resolution: 815 | integrity: sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= 816 | /ms/2.0.0: 817 | dev: false 818 | resolution: 819 | integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= 820 | /multimatch/2.1.0: 821 | dependencies: 822 | array-differ: 1.0.0 823 | array-union: 1.0.2 824 | arrify: 1.0.1 825 | minimatch: 3.0.4 826 | dev: false 827 | engines: 828 | node: '>=0.10.0' 829 | resolution: 830 | integrity: sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis= 831 | /nanomatch/1.2.9: 832 | dependencies: 833 | arr-diff: 4.0.0 834 | array-unique: 0.3.2 835 | define-property: 2.0.2 836 | extend-shallow: 3.0.2 837 | fragment-cache: 0.2.1 838 | is-odd: 2.0.0 839 | is-windows: 1.0.2 840 | kind-of: 6.0.2 841 | object.pick: 1.3.0 842 | regex-not: 1.0.2 843 | snapdragon: 0.8.2 844 | to-regex: 3.0.2 845 | dev: false 846 | engines: 847 | node: '>=0.10.0' 848 | resolution: 849 | integrity: sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA== 850 | /object-assign/4.1.1: 851 | dev: false 852 | engines: 853 | node: '>=0.10.0' 854 | resolution: 855 | integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= 856 | /object-copy/0.1.0: 857 | dependencies: 858 | copy-descriptor: 0.1.1 859 | define-property: 0.2.5 860 | kind-of: 3.2.2 861 | dev: false 862 | engines: 863 | node: '>=0.10.0' 864 | resolution: 865 | integrity: sha1-fn2Fi3gb18mRpBupde04EnVOmYw= 866 | /object-visit/1.0.1: 867 | dependencies: 868 | isobject: 3.0.1 869 | dev: false 870 | engines: 871 | node: '>=0.10.0' 872 | resolution: 873 | integrity: sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= 874 | /object.pick/1.3.0: 875 | dependencies: 876 | isobject: 3.0.1 877 | dev: false 878 | engines: 879 | node: '>=0.10.0' 880 | resolution: 881 | integrity: sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= 882 | /once/1.4.0: 883 | dependencies: 884 | wrappy: 1.0.2 885 | dev: false 886 | resolution: 887 | integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 888 | /optimist/0.6.1: 889 | dependencies: 890 | minimist: 0.0.10 891 | wordwrap: 0.0.3 892 | dev: false 893 | resolution: 894 | integrity: sha1-2j6nRob6IaGaERwybpDrFaAZZoY= 895 | /pascalcase/0.1.1: 896 | dev: false 897 | engines: 898 | node: '>=0.10.0' 899 | resolution: 900 | integrity: sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= 901 | /path-dirname/1.0.2: 902 | dev: false 903 | resolution: 904 | integrity: sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= 905 | /path-is-absolute/1.0.1: 906 | dev: false 907 | engines: 908 | node: '>=0.10.0' 909 | resolution: 910 | integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 911 | /path-type/3.0.0: 912 | dependencies: 913 | pify: 3.0.0 914 | dev: false 915 | engines: 916 | node: '>=4' 917 | resolution: 918 | integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== 919 | /pify/3.0.0: 920 | dev: false 921 | engines: 922 | node: '>=4' 923 | resolution: 924 | integrity: sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= 925 | /posix-character-classes/0.1.1: 926 | dev: false 927 | engines: 928 | node: '>=0.10.0' 929 | resolution: 930 | integrity: sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= 931 | /regex-not/1.0.2: 932 | dependencies: 933 | extend-shallow: 3.0.2 934 | safe-regex: 1.1.0 935 | dev: false 936 | engines: 937 | node: '>=0.10.0' 938 | resolution: 939 | integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== 940 | /repeat-element/1.1.2: 941 | dev: false 942 | engines: 943 | node: '>=0.10.0' 944 | resolution: 945 | integrity: sha1-7wiaF40Ug7quTZPrmLT55OEdmQo= 946 | /repeat-string/1.6.1: 947 | dev: false 948 | engines: 949 | node: '>=0.10' 950 | resolution: 951 | integrity: sha1-jcrkcOHIirwtYA//Sndihtp15jc= 952 | /resolve-url/0.2.1: 953 | dev: false 954 | resolution: 955 | integrity: sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= 956 | /ret/0.1.15: 957 | dev: false 958 | engines: 959 | node: '>=0.12' 960 | resolution: 961 | integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== 962 | /right-align/0.1.3: 963 | dependencies: 964 | align-text: 0.1.4 965 | dev: false 966 | engines: 967 | node: '>=0.10.0' 968 | optional: true 969 | resolution: 970 | integrity: sha1-YTObci/mo1FWiSENJOFMlhSGE+8= 971 | /safe-regex/1.1.0: 972 | dependencies: 973 | ret: 0.1.15 974 | dev: false 975 | resolution: 976 | integrity: sha1-QKNmnzsHfR6UPURinhV91IAjvy4= 977 | /set-value/0.4.3: 978 | dependencies: 979 | extend-shallow: 2.0.1 980 | is-extendable: 0.1.1 981 | is-plain-object: 2.0.4 982 | to-object-path: 0.3.0 983 | dev: false 984 | engines: 985 | node: '>=0.10.0' 986 | resolution: 987 | integrity: sha1-fbCPnT0i3H945Trzw79GZuzfzPE= 988 | /set-value/2.0.0: 989 | dependencies: 990 | extend-shallow: 2.0.1 991 | is-extendable: 0.1.1 992 | is-plain-object: 2.0.4 993 | split-string: 3.1.0 994 | dev: false 995 | engines: 996 | node: '>=0.10.0' 997 | resolution: 998 | integrity: sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== 999 | /slash/1.0.0: 1000 | dev: false 1001 | engines: 1002 | node: '>=0.10.0' 1003 | resolution: 1004 | integrity: sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= 1005 | /snapdragon-node/2.1.1: 1006 | dependencies: 1007 | define-property: 1.0.0 1008 | isobject: 3.0.1 1009 | snapdragon-util: 3.0.1 1010 | dev: false 1011 | engines: 1012 | node: '>=0.10.0' 1013 | resolution: 1014 | integrity: sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== 1015 | /snapdragon-util/3.0.1: 1016 | dependencies: 1017 | kind-of: 3.2.2 1018 | dev: false 1019 | engines: 1020 | node: '>=0.10.0' 1021 | resolution: 1022 | integrity: sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== 1023 | /snapdragon/0.8.2: 1024 | dependencies: 1025 | base: 0.11.2 1026 | debug: 2.6.9 1027 | define-property: 0.2.5 1028 | extend-shallow: 2.0.1 1029 | map-cache: 0.2.2 1030 | source-map: 0.5.7 1031 | source-map-resolve: 0.5.2 1032 | use: 3.1.0 1033 | dev: false 1034 | engines: 1035 | node: '>=0.10.0' 1036 | resolution: 1037 | integrity: sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== 1038 | /source-map-resolve/0.5.2: 1039 | dependencies: 1040 | atob: 2.1.1 1041 | decode-uri-component: 0.2.0 1042 | resolve-url: 0.2.1 1043 | source-map-url: 0.4.0 1044 | urix: 0.1.0 1045 | dev: false 1046 | resolution: 1047 | integrity: sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== 1048 | /source-map-support/0.5.6: 1049 | dependencies: 1050 | buffer-from: 1.1.0 1051 | source-map: 0.6.1 1052 | dev: true 1053 | resolution: 1054 | integrity: sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g== 1055 | /source-map-url/0.4.0: 1056 | dev: false 1057 | resolution: 1058 | integrity: sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= 1059 | /source-map/0.4.4: 1060 | dependencies: 1061 | amdefine: 1.0.1 1062 | dev: false 1063 | engines: 1064 | node: '>=0.8.0' 1065 | resolution: 1066 | integrity: sha1-66T12pwNyZneaAMti092FzZSA2s= 1067 | /source-map/0.5.7: 1068 | dev: false 1069 | engines: 1070 | node: '>=0.10.0' 1071 | resolution: 1072 | integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= 1073 | /source-map/0.6.1: 1074 | dev: true 1075 | engines: 1076 | node: '>=0.10.0' 1077 | resolution: 1078 | integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 1079 | /split-string/3.1.0: 1080 | dependencies: 1081 | extend-shallow: 3.0.2 1082 | dev: false 1083 | engines: 1084 | node: '>=0.10.0' 1085 | resolution: 1086 | integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== 1087 | /static-extend/0.1.2: 1088 | dependencies: 1089 | define-property: 0.2.5 1090 | object-copy: 0.1.0 1091 | dev: false 1092 | engines: 1093 | node: '>=0.10.0' 1094 | resolution: 1095 | integrity: sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= 1096 | /to-object-path/0.3.0: 1097 | dependencies: 1098 | kind-of: 3.2.2 1099 | dev: false 1100 | engines: 1101 | node: '>=0.10.0' 1102 | resolution: 1103 | integrity: sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= 1104 | /to-regex-range/2.1.1: 1105 | dependencies: 1106 | is-number: 3.0.0 1107 | repeat-string: 1.6.1 1108 | dev: false 1109 | engines: 1110 | node: '>=0.10.0' 1111 | resolution: 1112 | integrity: sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= 1113 | /to-regex/3.0.2: 1114 | dependencies: 1115 | define-property: 2.0.2 1116 | extend-shallow: 3.0.2 1117 | regex-not: 1.0.2 1118 | safe-regex: 1.1.0 1119 | dev: false 1120 | engines: 1121 | node: '>=0.10.0' 1122 | resolution: 1123 | integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== 1124 | /ts-node/6.1.2: 1125 | dependencies: 1126 | arrify: 1.0.1 1127 | buffer-from: 1.1.0 1128 | diff: 3.5.0 1129 | make-error: 1.3.4 1130 | minimist: 1.2.0 1131 | mkdirp: 0.5.1 1132 | source-map-support: 0.5.6 1133 | yn: 2.0.0 1134 | dev: true 1135 | engines: 1136 | node: '>=4.2.0' 1137 | resolution: 1138 | integrity: sha512-FS0pXZK0RAHFn+aq7iuWx4FPHiyUMM6p6DgKCl44c5tZKad2aUnwDH09XhsUmR0ncV2gd+ND1EV/Br5HpTxGJg== 1139 | /ts-simple-ast/12.4.0: 1140 | dependencies: 1141 | '@dsherret/to-absolute-glob': 2.0.2 1142 | code-block-writer: 7.2.0 1143 | fs-extra: 6.0.1 1144 | glob-parent: 3.1.0 1145 | globby: 8.0.1 1146 | is-negated-glob: 1.0.0 1147 | multimatch: 2.1.0 1148 | object-assign: 4.1.1 1149 | tslib: 1.9.2 1150 | typescript: 2.9.1 1151 | dev: false 1152 | resolution: 1153 | integrity: sha512-7GJFZlyTZY7uMAEhX62ZLxdwOpGDJzc/nwpi1nRPZ7N2ICcqqrMjDtRnki15IUBv2ZjIGu6KBqk/pUqJFODFsg== 1154 | /tslib/1.9.2: 1155 | dev: false 1156 | resolution: 1157 | integrity: sha512-AVP5Xol3WivEr7hnssHDsaM+lVrVXWUvd1cfXTRkTj80b//6g2wIFEH6hZG0muGZRnHGrfttpdzRk3YlBkWjKw== 1158 | /typescript/2.9.1: 1159 | dev: false 1160 | engines: 1161 | node: '>=4.2.0' 1162 | resolution: 1163 | integrity: sha512-h6pM2f/GDchCFlldnriOhs1QHuwbnmj6/v7499eMHqPeW4V2G0elua2eIc2nu8v2NdHV0Gm+tzX83Hr6nUFjQA== 1164 | /uglify-js/2.8.29: 1165 | dependencies: 1166 | source-map: 0.5.7 1167 | yargs: 3.10.0 1168 | dev: false 1169 | engines: 1170 | node: '>=0.8.0' 1171 | optional: true 1172 | optionalDependencies: 1173 | uglify-to-browserify: 1.0.2 1174 | resolution: 1175 | integrity: sha1-KcVzMUgFe7Th913zW3qcty5qWd0= 1176 | /uglify-to-browserify/1.0.2: 1177 | dev: false 1178 | optional: true 1179 | resolution: 1180 | integrity: sha1-bgkk1r2mta/jSeOabWMoUKD4grc= 1181 | /unc-path-regex/0.1.2: 1182 | dev: false 1183 | engines: 1184 | node: '>=0.10.0' 1185 | resolution: 1186 | integrity: sha1-5z3T17DXxe2G+6xrCufYxqadUPo= 1187 | /union-value/1.0.0: 1188 | dependencies: 1189 | arr-union: 3.1.0 1190 | get-value: 2.0.6 1191 | is-extendable: 0.1.1 1192 | set-value: 0.4.3 1193 | dev: false 1194 | engines: 1195 | node: '>=0.10.0' 1196 | resolution: 1197 | integrity: sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= 1198 | /universalify/0.1.2: 1199 | dev: false 1200 | engines: 1201 | node: '>= 4.0.0' 1202 | resolution: 1203 | integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== 1204 | /unset-value/1.0.0: 1205 | dependencies: 1206 | has-value: 0.3.1 1207 | isobject: 3.0.1 1208 | dev: false 1209 | engines: 1210 | node: '>=0.10.0' 1211 | resolution: 1212 | integrity: sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= 1213 | /urix/0.1.0: 1214 | dev: false 1215 | resolution: 1216 | integrity: sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= 1217 | /use/3.1.0: 1218 | dependencies: 1219 | kind-of: 6.0.2 1220 | dev: false 1221 | engines: 1222 | node: '>=0.10.0' 1223 | resolution: 1224 | integrity: sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw== 1225 | /window-size/0.1.0: 1226 | dev: false 1227 | engines: 1228 | node: '>= 0.8.0' 1229 | optional: true 1230 | resolution: 1231 | integrity: sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= 1232 | /wordwrap/0.0.2: 1233 | dev: false 1234 | engines: 1235 | node: '>=0.4.0' 1236 | optional: true 1237 | resolution: 1238 | integrity: sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= 1239 | /wordwrap/0.0.3: 1240 | dev: false 1241 | engines: 1242 | node: '>=0.4.0' 1243 | resolution: 1244 | integrity: sha1-o9XabNXAvAAI03I0u68b7WMFkQc= 1245 | /wrappy/1.0.2: 1246 | dev: false 1247 | resolution: 1248 | integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 1249 | /yargs/3.10.0: 1250 | dependencies: 1251 | camelcase: 1.2.1 1252 | cliui: 2.1.0 1253 | decamelize: 1.2.0 1254 | window-size: 0.1.0 1255 | dev: false 1256 | optional: true 1257 | resolution: 1258 | integrity: sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= 1259 | /yn/2.0.0: 1260 | dev: true 1261 | engines: 1262 | node: '>=4' 1263 | resolution: 1264 | integrity: sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= 1265 | registry: 'https://registry.npmjs.org/' 1266 | shrinkwrapMinorVersion: 7 1267 | shrinkwrapVersion: 3 1268 | specifiers: 1269 | '@types/node': ^10.0.4 1270 | handlebars: ^4.0.11 1271 | ts-node: ^6.1.0 1272 | ts-simple-ast: 12.4.0 1273 | typescript: 2.9.1 1274 | -------------------------------------------------------------------------------- /src/config.ts: -------------------------------------------------------------------------------- 1 | export const mode: 'development'|'production' = process.env.PORT ? 'production' : 'development' 2 | export const port = process.env.PORT || 8080 3 | export const url = process.env.PORT ? 'https://typescript-api-playground.glitch.me' : 'http://localhost:8080' -------------------------------------------------------------------------------- /src/editor.js: -------------------------------------------------------------------------------- 1 | 2 | var typeScriptCodeEditor, exampleCodeEditor 3 | 4 | 5 | // code examples 6 | 7 | const codeExamples = {{{examplesString}}}; 8 | function changeExample(name){ 9 | const found = codeExamples.find(e=>e.name===name) 10 | if(!found){ 11 | alert('Example not found: '+name) 12 | return 13 | } 14 | example = found 15 | typeScriptCodeEditor.setValue(example.codeValue) 16 | exampleCodeEditor.setValue(example.inputValue) 17 | location.hash=`example=${encodeURIComponent(example.name)}` 18 | if(example.autoRun){ 19 | typeScriptCodeRun() 20 | } 21 | } 22 | const hashEditorInputPrefix = '__editor_input__=' 23 | const hashEditorCodePrefix = '__editor_code__=' 24 | let example 25 | 26 | function setExampleFromUrlParameter(){ 27 | const url = new URL(location.href) 28 | 29 | const exampleIndex = url.searchParams.get("example")|| undefined 30 | example = exampleIndex!==undefined ? codeExamples[exampleIndex] : undefined 31 | if(example){return} 32 | 33 | example = codeExamples.find(e=>decodeURIComponent(url.searchParams.get("example"))===e.name) 34 | if(example){return} 35 | 36 | example = codeExamples.find(e=>decodeURIComponent(url.hash.split('#example=').length===2 ? url.hash.split('#example=')[1] : '')===e.name) 37 | if(example){return} 38 | 39 | const code = url.hash.includes(hashEditorCodePrefix) ? url.hash.substring(url.hash.indexOf(hashEditorCodePrefix)+hashEditorCodePrefix.length, url.hash.includes(hashEditorInputPrefix) ? url.hash.indexOf(hashEditorInputPrefix) : url.hash.length) : undefined 40 | let input = code && url.hash.includes(hashEditorInputPrefix) ? url.hash.substring(url.hash.indexOf(hashEditorInputPrefix)+hashEditorInputPrefix.length, url.hash.length) : undefined 41 | if(code){ 42 | example = { 43 | name: 'custom example', 44 | description: 'custom example - data came from url', 45 | inputValue: decodeURIComponent(input || ''), 46 | codeValue: decodeURIComponent(code) 47 | } 48 | return 49 | } 50 | example = codeExamples[0] 51 | } 52 | 53 | function setWorkingAnimation(working){ 54 | document.getElementById('working-animation').style.display = working ? 'inline-block' : 'none' 55 | } 56 | 57 | 58 | function buildUrl() { 59 | const code = encodeURIComponent(typeScriptCodeEditor.getValue()) 60 | const input = encodeURIComponent(exampleCodeEditor.getValue()) 61 | location.hash = hashEditorCodePrefix + code + hashEditorInputPrefix + input 62 | } 63 | 64 | 65 | 66 | // run typescript code handlers 67 | 68 | function typeScriptCodeRun(){ 69 | const body = { 70 | input: exampleCodeEditor.getModel().getValue(), 71 | code: typeScriptCodeEditor.getModel().getValue() 72 | } 73 | setWorkingAnimation(true) 74 | fetch('/run', {method: 'post', body: JSON.stringify(body)}) 75 | .then(response=>response.blob()) 76 | .then(blob=>{ 77 | return new Promise(resolve=>{ 78 | const reader = new FileReader() 79 | reader.readAsText(blob) 80 | if(!reader.result && !reader.result.toString()){ 81 | reader.addEventListener("loadend", () => { 82 | resolve(reader.result.toString()) 83 | }) 84 | } 85 | else{ 86 | resolve(reader.result.toString()) 87 | } 88 | }) 89 | }) 90 | .catch(ex=>{ 91 | setWorkingAnimation(false) 92 | alert('Error in the server: ' + ex) 93 | throw ex 94 | }) 95 | .then(responseData=>{ 96 | const {result, text} = formatResult(responseData) 97 | document.getElementById('result').innerText = text 98 | if(result.out && result.out.returnValue && example.replaceInputEditorContentWithReturnValue){ 99 | exampleCodeEditor.setValue(result.out.returnValue) 100 | } 101 | setWorkingAnimation(false) 102 | }) 103 | .catch(ex=>{ 104 | setWorkingAnimation(false) 105 | alert('Error parsing response: ' + ex) 106 | throw ex 107 | }) 108 | 109 | } 110 | 111 | function formatResult(text){ 112 | let result 113 | try { 114 | result = JSON.parse(text) 115 | if(!result.out||result.out.length===0){ 116 | result.out = ['{"log": [], "returnValue": ""}'] 117 | } 118 | result.out=JSON.parse(result.out[0]) 119 | }catch(ex){ 120 | console.log( 'Invalid JSON: **' + text + '**') 121 | throw ex 122 | } 123 | return { 124 | result, 125 | text: `RETURN VALUE: 126 | ${result.out.returnValue} 127 | 128 | STDOUT: 129 | ${result.out.log.join('\n')} 130 | 131 | EXIT CODE: 132 | ${result.code} 133 | 134 | STDERR: 135 | ${result.err.join('\n')} 136 | ` 137 | } 138 | } 139 | 140 | 141 | 142 | // editor creation / configuration 143 | 144 | require(["vs/editor/editor.main"], function () { 145 | 146 | setExampleFromUrlParameter() 147 | 148 | // compiler options 149 | monaco.languages.typescript.typescriptDefaults.setCompilerOptions({ 150 | target: monaco.languages.typescript.ScriptTarget.ES6, 151 | module: "commonjs", 152 | lib: ["es2018"], 153 | allowNonTsExtensions: true , 154 | strict: false, 155 | rootDir: ".", 156 | paths: { 157 | "ts-simple-ast":["libs/ts-simple-ast.d.ts"] // needed for monaco to support ts-simple-ast.d.ts since doesn't declare a module 158 | }, 159 | baseUrl: "." 160 | }) 161 | 162 | // loading libraries 163 | {{#each libs}} 164 | monaco.languages.typescript.typescriptDefaults.addExtraLib.apply( monaco.languages.typescript.typescriptDefaults, {{{this}}}) 165 | {{/each}} 166 | 167 | const editorOptions = { 168 | fontSize: '12px', 169 | language: 'typescript', 170 | minimap: {enabled: false} 171 | } 172 | 173 | const typeScriptCodeContainer = document.getElementById('typeScriptCodeContainer') 174 | typeScriptCodeEditor = monaco.editor.create(typeScriptCodeContainer, Object.assign(editorOptions, {value: example.codeValue})) 175 | installResizeWatcher(typeScriptCodeContainer, typeScriptCodeEditor.layout.bind(typeScriptCodeEditor), 2000) 176 | const exampleCodeContainer = document.getElementById('exampleCodeContainer') 177 | exampleCodeEditor = monaco.editor.create(exampleCodeContainer, Object.assign(editorOptions, {value: example.inputValue})) 178 | installResizeWatcher(exampleCodeContainer, exampleCodeEditor.layout.bind(exampleCodeEditor), 2000) 179 | 180 | if(example.autoRun){ 181 | typeScriptCodeRun() 182 | } 183 | }) 184 | 185 | function installResizeWatcher(el, fn, interval){ 186 | let offset = {width: el.offsetWidth, height: el.offsetHeight} 187 | setInterval(()=>{ 188 | let newOffset = {width: el.offsetWidth, height: el.offsetHeight} 189 | if(offset.height!=newOffset.height||offset.width!=newOffset.width){ 190 | offset = newOffset 191 | fn() 192 | } 193 | }, interval) 194 | } -------------------------------------------------------------------------------- /src/examples.ts: -------------------------------------------------------------------------------- 1 | import { readFileSync } from './readFileSync' 2 | import { mode } from './config'; 3 | 4 | let codeExamples 5 | export function getExamples() { 6 | 7 | if (codeExamples && mode === 'production') { 8 | return codeExamples 9 | } 10 | 11 | codeExamples = [ 12 | { 13 | name: 'TypeScript scanner', 14 | autoRun: true, 15 | description: 'Not very useful but shows Scanned API. Taken from TypeScript book', 16 | inputValue: `class A { 17 | color: string 18 | method (a: number, b: Date[][]): Promise { 19 | return Promise.resolve() 20 | } 21 | } 22 | const a = new A() 23 | `, 24 | codeValue: `import * as ts from 'typescript' 25 | // export a function main like this and the code at the right will be passed as parameter 26 | export function main(code:string, log: (msg:string)=>void) { 27 | const scanner = ts.createScanner(ts.ScriptTarget.Latest, true) 28 | scanner.setText(code) 29 | scanner.setOnError((message: ts.DiagnosticMessage, length: number) => { 30 | log('Error: '+message); 31 | }) 32 | scanner.setScriptTarget(ts.ScriptTarget.ES5); 33 | scanner.setLanguageVariant(ts.LanguageVariant.Standard) 34 | let token = scanner.scan() 35 | while (token != ts.SyntaxKind.EndOfFileToken) { 36 | log( getKindName(token)) 37 | token = scanner.scan() 38 | } 39 | return 'see the logs' 40 | } 41 | function getKindName(kind: ts.SyntaxKind) { 42 | return (ts as any).SyntaxKind[kind]; 43 | } 44 | `}, 45 | 46 | 47 | { 48 | name: 'Simple Transformation', 49 | description: 'Using TypeScript transformation API we change all property access expression like "foo.bar" so when "bar" has the name "accessorToBeRemoved" we leave only "foo". See how the example code changes after run it', 50 | replaceInputEditorContentWithReturnValue: true, 51 | inputValue: `const foo = { 52 | method1(s: any){}, 53 | accessorToBeRemoved: 'red', 54 | otherProperty: [true] 55 | } 56 | foo.method1(foo.otherProperty) 57 | foo.method1(foo.accessorToBeRemoved) 58 | foo.otherProperty = null 59 | foo.accessorToBeRemoved = null 60 | `, 61 | 62 | codeValue: `import * as ts from 'typescript' 63 | function main(source: string, log: (msg:string)=>void){ 64 | const sourceFile: ts.SourceFile = ts.createSourceFile( 65 | 'test.ts', source, ts.ScriptTarget.ES2015, true, ts.ScriptKind.TS 66 | ); 67 | const printer: ts.Printer = ts.createPrinter(); 68 | const result: ts.TransformationResult = ts.transform( 69 | sourceFile, [transformer] 70 | ); 71 | const transformedSourceFile: ts.SourceFile = result.transformed[0]; 72 | const newContent = printer.printFile(transformedSourceFile) 73 | result.dispose() 74 | return newContent 75 | } 76 | const transformer = (context: ts.TransformationContext) => { 77 | return (rootNode: T) => { 78 | function visit(node: ts.Node): ts.Node { 79 | node = ts.visitEachChild(node, visit, context); 80 | // in a property access expression like "foo.bar" "foo" is the expression and "bar" is the name : 81 | // we replace the whole expression with just node.expression in the case name is "accessorToBeRemoved" 82 | if (ts.isPropertyAccessExpression(node) && node.name && 83 | node.name.getText() === 'accessorToBeRemoved') { 84 | return node.expression 85 | } 86 | return node; 87 | } 88 | return ts.visitNode(rootNode, visit); 89 | } 90 | } 91 | ` 92 | }, 93 | 94 | { 95 | name: 'Transformation 2', 96 | description: 'More complex example of using TypeScript Transformation API. See comments in the code for details. Heads up, the example sources changes after run completes.', 97 | replaceInputEditorContentWithReturnValue: true, 98 | inputValue: `class Foo { 99 | magic2(s: number) { 100 | return s + 5 + 50 + 11 + 99 * 8 * 7 / s 101 | } 102 | } 103 | const value = new Foo().magic2(1 + 2 + 3)`, 104 | codeValue: readFileSync('./assets/examples/ts-transformation-2/code.ts').toString() 105 | }, 106 | 107 | 108 | { 109 | name: 'Transformation 3', 110 | description: 'Another Transformation API example that will add new nodes, this time putting a name to functions declared without name', 111 | replaceInputEditorContentWithReturnValue: true, 112 | inputValue: `function(a: number):[number]{ 113 | return [Math.PI*a/2] 114 | } 115 | function named(b:string){ 116 | function():string {return ''} 117 | return 123 118 | } 119 | const alsoWithName = function(){ 120 | return function(){} // let's see what happens with this one 121 | }; 122 | (function (a: number) { return a + 1; })(5); // and with this one 123 | `, 124 | codeValue: `import * as ts from 'typescript'; 125 | // since having function declarations without name is an error in TypeScript this transformation will put them name 126 | function main(source: string, log: (m: string)=>void):string { 127 | let nameCounter = 0 128 | const transformFactory = (context: ts.TransformationContext) => (rootNode: ts.SourceFile): ts.SourceFile => { 129 | const visit = (node: ts.Node) => { 130 | node = ts.visitEachChild(node, visit, context); 131 | if (ts.isFunctionDeclaration(node) && (!node.name || !node.name.escapedText)) { 132 | // we can actually change the node using two techniques, the first one is creating a new mutable 133 | // clone and modify it and return it 134 | const clone = ts.getMutableClone(node) 135 | clone.name = ts.createIdentifier('unnamedFunc'+nameCounter++) 136 | return clone 137 | 138 | // or also we could create a new node using the ts.create* functions : 139 | 140 | // return ts.createFunctionDeclaration(node.decorators, node.modifiers, node.asteriskToken, 141 | // ts.createIdentifier('unnamedFunc'), node.typeParameters, node.parameters, node.type, node.body) 142 | } 143 | return node 144 | } 145 | return ts.visitNode(rootNode, visit) 146 | } 147 | const sourceFile = ts.createSourceFile( 148 | 'test.ts', source, ts.ScriptTarget.ES2015, true, ts.ScriptKind.TS 149 | ) 150 | const result = ts.transform(sourceFile, [transformFactory]) 151 | const transformedContent = ts.createPrinter().printFile(result.transformed[0]) 152 | log('Nodes changed : '+nameCounter) 153 | return transformedContent 154 | } 155 | ` 156 | }, 157 | 158 | { 159 | 160 | name: 'Build and print AST programmatically', 161 | description: 'Using TypeScript Compiler API to "write" code by creating a AST from code data-structures. Prints the result out, in this case, a working factorial function, taken from TypeScript Compiler API docs', 162 | replaceInputEditorContentWithReturnValue: true, 163 | inputValue: ``, 164 | codeValue: readFileSync('./assets/examples/ts-build-and-print-ast/code.ts').toString() 165 | }, 166 | 167 | 168 | { 169 | 170 | name: 'Transpiling-a-single-file', 171 | description: 'Using TypeScript Compiler API To transpile a single file to JavaScript. Tken from TypeScript Compiler API docs', 172 | replaceInputEditorContentWithReturnValue: true, 173 | inputValue: `import {foo} from 'foo' 174 | export const f = (obj: {d: boolean}): {a: number, b: Date, d:boolean} => { 175 | for(let d of [new Date()]){ 176 | foo(d) 177 | } 178 | return {a: 1, b: new Date(), ... obj} 179 | }`, 180 | codeValue: `import * as ts from 'typescript'; 181 | function main(source: string, log: (m: string) => void): string { 182 | var compilerOptions = { module: ts.ModuleKind.System }; 183 | var res1 = ts.transpileModule(source, { compilerOptions: compilerOptions, moduleName: "myModule2" }); 184 | log(res1.outputText); 185 | log("============") 186 | var res2 = ts.transpile(source, compilerOptions, /*fileName*/ undefined, /*diagnostics*/ undefined, /*moduleName*/ "myModule1"); 187 | log(res2); 188 | return res2 189 | }` 190 | }, 191 | 192 | { 193 | name: 'tsquery simple example', 194 | autoRun: true, 195 | description: 'Using tsquery library to count Identifiers with a certain name', 196 | inputValue: `class Animal { 197 | constructor(public name: string) { } 198 | move(distanceInMeters: number = 0) { 199 | console.log( \`\${this.name} moved \${distanceInMeters}m.\`) 200 | } 201 | } 202 | class Snake extends Animal { 203 | constructor(name: string) { super(name); } 204 | move(distanceInMeters = 5) { 205 | console.log("Slithering..."); 206 | super.move(distanceInMeters); 207 | } 208 | }`, 209 | codeValue: `import { tsquery } from '@phenomnomnominal/tsquery'; 210 | function main(source: string, log: (m: string) => void): string | void { 211 | const ast = tsquery.ast(source); 212 | const nodes = tsquery(ast, 'Identifier[name="Animal"]'); 213 | log(\`Identifier[name="Animal"] count: \${nodes.length}\`); 214 | }` 215 | }, 216 | 217 | { 218 | name: 'Creating a ts.Program and SourceFile in memory for testing without file system', 219 | description: 'Ideal for testing or using APIs in memory. Also, a small mostration on how to navegate the AST', 220 | autoRun: true, 221 | inputValue: readFileSync('./assets/examples/ts-create-program-without-fs/input.ts').toString(), 222 | codeValue: readFileSync('./assets/examples/ts-create-program-without-fs/code.ts').toString() 223 | }, 224 | 225 | { 226 | name: 'ts-simple-ast rename a lot', 227 | description: 'Example using ts-simple-ast rename() tool - will rename randomly almost every identifier found in the input. Very crazy and heuristic - don\'t try this at home!', 228 | replaceInputEditorContentWithReturnValue: true, 229 | inputValue: readFileSync('./assets/examples/tsa-rename-test1/input.ts').toString(), 230 | codeValue: readFileSync('./assets/examples/tsa-rename-test1/code.ts').toString() 231 | }, 232 | 233 | { 234 | name: 'ts-type-checking-source', 235 | description: 'walk the AST and use the checker to serialize class information. Use the type checker to get symbol and type information, while grabbing JSDoc comments for exported classes, their constructors, and respective constructor parameters. Example adapted from TypeScript Compiler API docs', 236 | replaceInputEditorContentWithReturnValue: true, 237 | inputValue: readFileSync('./assets/examples/ts-type-checking-source/input.ts').toString(), 238 | codeValue: readFileSync('./assets/examples/ts-type-checking-source/code.ts').toString() 239 | }, 240 | 241 | 242 | { 243 | name: 'tsquery support for ts-simple-ast', 244 | description: 'Using ts-simple-ast and tsquery together : https://gist.github.com/dsherret/826fe77613be22676778b8c4ba7390e7', 245 | // replaceInputEditorContentWithReturnValue: true, 246 | autoRun: true, 247 | inputValue: readFileSync('./assets/examples/tsSimpleAstAndTsQuery/input.ts').toString(), 248 | codeValue: readFileSync('./assets/examples/tsSimpleAstAndTsQuery/code.ts').toString() 249 | }, 250 | ] as Example[] 251 | 252 | return codeExamples 253 | } 254 | 255 | export interface Example { 256 | name: string, 257 | description: string, 258 | inputValue: string, 259 | codeValue: string, 260 | replaceInputEditorContentWithReturnValue?: boolean 261 | autoRun?: boolean 262 | } -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 |
20 |

Code to run

21 | 23 | 25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |

Example Code

35 |
36 |
37 |
38 |
39 | 40 |
41 |
42 |

Program output

43 |

 44 |       
45 |
46 |

Examples

47 |
    48 | {{#each examples}} 49 |
  1. 50 | - {{{description}}}
  2. 51 | {{/each}} 52 |
53 |
54 |
55 |
56 | 57 | 58 | 59 | Fork me on GitHub 60 | 61 | 62 | 124 | 125 | 126 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /src/readFileSync.ts: -------------------------------------------------------------------------------- 1 | import { readFileSync as realReadFileSync } from 'fs' 2 | import { mode } from './config' 3 | 4 | const cache: { [key: string]: string } = {} 5 | export function readFileSync(fileName: string): string { 6 | if (mode === 'development') { 7 | return realReadFileSync(fileName).toString() 8 | } 9 | if (!cache[fileName]) { 10 | cache[fileName] = realReadFileSync(fileName).toString() 11 | } 12 | return cache[fileName] 13 | } -------------------------------------------------------------------------------- /src/runTs.ts: -------------------------------------------------------------------------------- 1 | import {spawn} from 'child_process' 2 | 3 | export function runTs(code, input) { 4 | return new Promise(resolve => { 5 | let s = ` 6 | const __logBuffer = [] 7 | const __log = (m)=>__logBuffer.push(m) 8 | const __input = ${JSON.stringify(input) /* dont change this or you will break it */}; 9 | ${code} 10 | const __result = {returnValue: main(__input, __log), log: __logBuffer} 11 | console.log(JSON.stringify(__result)) 12 | ` 13 | const tsNode = spawn('node', ['node_modules/ts-node/dist/bin', '--project', './tsconfig.json']) 14 | tsNode.stdin.write(s); 15 | tsNode.stdin.end() 16 | const status = { 17 | out: [], 18 | err: [], 19 | code: 0 20 | } 21 | tsNode.stdout.on('data', (data) => { 22 | status.out.push(data.toString()) 23 | }); 24 | 25 | tsNode.stderr.on('data', (data) => { 26 | status.err.push(data.toString()) 27 | console.log('Error Running code: ***' + data + '***'); 28 | console.log('Code was: ***' + s + '***'); 29 | }); 30 | 31 | tsNode.on('close', (code) => { 32 | status.code = code 33 | resolve(status) 34 | }); 35 | }) 36 | } 37 | -------------------------------------------------------------------------------- /src/server.ts: -------------------------------------------------------------------------------- 1 | import http from 'http' 2 | 3 | import { runTs } from './runTs' 4 | import { getTemplates, getTemplatesContext, renderTemplate } from './templates' 5 | import { port, url, mode } from './config' 6 | 7 | console.log('mode is '+mode) 8 | 9 | function onRequest(request, response) { 10 | const templates = getTemplates() 11 | const templatesContext = getTemplatesContext() 12 | if (request.url === '/editor.js') { 13 | const result = renderTemplate('editorJs', templatesContext) 14 | response.writeHead(200, { "Content-Type": "text/javascript" }) 15 | response.write(result) 16 | response.end() 17 | } 18 | else if (request.url === '/run') { 19 | let body = '' 20 | request.on('data', function (chunk) { 21 | body += chunk.toString() 22 | }); 23 | request.on('end', function () { 24 | const { code, input } = JSON.parse(body) 25 | runTs(code, input).then(result => { 26 | response.writeHead(200, "OK", { 'Content-Type': 'text/text' }); 27 | response.write(JSON.stringify(result)) 28 | response.end(); 29 | }) 30 | }); 31 | } 32 | else { 33 | response.writeHead(200, { "Content-Type": "text/html" }) 34 | const result = renderTemplate('indexHtml', templatesContext) 35 | response.write(result) 36 | response.end() 37 | } 38 | } 39 | 40 | console.log('Server listening at ' + url); 41 | 42 | http.createServer(onRequest).listen(port) 43 | -------------------------------------------------------------------------------- /src/templates.ts: -------------------------------------------------------------------------------- 1 | import { readFileSync } from './readFileSync' 2 | import { getExamples } from './examples' 3 | import * as handlebars from 'handlebars' 4 | import { mode } from './config' 5 | import minify from 'minify-fast' 6 | 7 | let templates 8 | export function getTemplates() { 9 | if (!templates || mode === 'development') { 10 | templates = { 11 | editorJs: handlebars.compile(readFileSync('./src/editor.js')), 12 | indexHtml: handlebars.compile(readFileSync('./src/index.html')) 13 | } 14 | const oldEditorJs = templates.editorJs 15 | templates.editorJs = context => minify({code: oldEditorJs(context)}) 16 | } 17 | return templates 18 | } 19 | 20 | let content = {} 21 | export function renderTemplate(template, context) { 22 | if (!content[template] || mode === 'development') { 23 | content[template] = getTemplates()[template](context) 24 | } 25 | return content[template] 26 | } 27 | 28 | let context 29 | const libs = ['typescript.d.ts', 'ts-simple-ast.d.ts', 'node.d.ts', 'tsquery.d.ts'] 30 | export function getTemplatesContext() { 31 | if (!context || mode === 'development') { 32 | const examples = getExamples() 33 | context = { 34 | libs: libs.map(l => JSON.stringify([readFileSync(`./assets/declarations/${l}`), `libs/${l}`])), 35 | examples, 36 | examplesString: JSON.stringify(examples) 37 | } 38 | } 39 | return context 40 | } 41 | -------------------------------------------------------------------------------- /test/compile-with-editor-libraries.ts: -------------------------------------------------------------------------------- 1 | // // we are having problems to load libraries like ts-simple-ast in monaco editor - so let's simulate the same scenario in local typescript project to diagnose what' the problem: 2 | 3 | // import Project from 'ts-simple-ast' 4 | 5 | 6 | // const project = new Project() -------------------------------------------------------------------------------- /test/tsa-rename-test1.ts: -------------------------------------------------------------------------------- 1 | // import Project, { TypeGuards, Node, VariableDeclaration, FunctionDeclaration, ParameterDeclaration, ClassDeclaration, InterfaceDeclaration, MethodSignature, MethodDeclaration, PropertyDeclaration, PropertySignature } from 'ts-simple-ast' 2 | // import * as ts from 'typescript' 3 | 4 | // export function main(code: string, log: (msg: string) => void) { 5 | // const project = new Project({ 6 | // useVirtualFileSystem: true, 7 | // compilerOptions: { target: ts.ScriptTarget.ES2018 } 8 | // }) 9 | // const sourceFile = project.createSourceFile('src/index.ts', code) 10 | // const predicate = (d: Node):boolean => { 11 | // return TypeGuards.isParameterDeclaration(d)|| 12 | // TypeGuards.isFunctionDeclaration(d)|| 13 | // TypeGuards.isVariableDeclaration(d)||TypeGuards.isClassDeclaration(d)||TypeGuards.isInterfaceDeclaration(d)|| 14 | // TypeGuards.isPropertyDeclaration(d)|| 15 | // TypeGuards.isMethodDeclaration(d)|| 16 | // TypeGuards.isPropertySignature(d)|| 17 | // TypeGuards.isMethodSignature(d)|| 18 | // false 19 | // } 20 | // type T = ParameterDeclaration | FunctionDeclaration | VariableDeclaration|ClassDeclaration|InterfaceDeclaration|PropertyDeclaration|PropertySignature|MethodDeclaration|MethodSignature 21 | // let d: T 22 | // const visited = {} 23 | // // heads up - we will be changing the AST radically when calling rename() 24 | // // that's why we need to query the source file each time: 25 | // while((d= sourceFile.getDescendants().find(n=>predicate(n)&&!visited[(n as T).getName()]) as T)){ 26 | // if( 27 | // TypeGuards.isParameterDeclaration(d)|| 28 | // TypeGuards.isFunctionDeclaration(d)|| 29 | // TypeGuards.isVariableDeclaration(d)|| 30 | // TypeGuards.isPropertyDeclaration(d)|| 31 | // TypeGuards.isMethodDeclaration(d)|| 32 | // TypeGuards.isPropertySignature(d)|| 33 | // TypeGuards.isMethodSignature(d)|| 34 | // false 35 | // ){ 36 | // const name= randomName('variable') 37 | // d.rename(name) 38 | // visited[name]=true 39 | // } 40 | // else if(TypeGuards.isClassDeclaration(d)||TypeGuards.isInterfaceDeclaration(d)){ 41 | // const name= randomName('class') 42 | // d.rename(name) 43 | // visited[name]=true 44 | // } 45 | // } 46 | // return sourceFile.getText() 47 | // } 48 | 49 | // // very heuristic identifier random generation - dont try this at home! 50 | // const dic = {} 51 | // function randomName(what: 'variable' | 'class' = 'variable', amountOfWords: number = 2) { 52 | // let v 53 | // while ((v = randomIdentifier(what, amountOfWords)+random(0, 9999)) && dic[v]) { 54 | // } 55 | // dic[v] = true 56 | // return v 57 | // } 58 | // function randomIdentifier(what: 'variable' | 'class' = 'variable', amountOfWords: number = 2): string { 59 | // let w = words[random(0, words.length - 1)] 60 | // return what === 'class' ? camel(w) : w 61 | // } 62 | // function camel(w: string) { 63 | // return w.substring(0, 1).toUpperCase() + w.substring(1, w.length) 64 | // } 65 | // function random(a, b) { 66 | // return Math.floor(Math.random() * b) + a 67 | // } 68 | // const words = `lorem ipsum dolor sit amet consectetuer adipiscing elit fusce tellus odio dapibus id fermentum quis suscipit erat nam sed magna elementum tincidunt praesent vitae arcu tempor neque lacinia pretium etiam dictum diam curabitur sagittis hendrerit ante duis aute irure in reprehenderit voluptate velit esse cillum dolore eu fugiat nulla pariatur pulvinar eleifend sem nibh ut enim ad minima veniam nostrum exercitationem ullam corporis laboriosam nisi aliquid ex ea commodi consequatur aliquam ornare wisi metus turpis cursus a interdum felis autem vel eum iure qui quam nihil molestiae illum dolorem quo voluptas integer bibendum eget vestibulum ullamcorper nec rutrum non nonummy ac volutpat phasellus rhoncus lectus viverra nunc faucibus libero facilisis lacus nemo ipsam voluptatem quia aspernatur aut odit fugit consequuntur magni dolores eos ratione sequi nesciunt aenean placerat imperdiet justo fringilla maecenas pharetra pellentesque massa nullam molestie nisl malesuada lobortis at dui morbi leo mi tristique minim nostrud exercitation ullamco laboris aliquip commodo consequat risus tortor gravida vehicula vivamus orci venenatis pede mauris et harum quidem rerum facilis est expedita distinctio sapien class aptent taciti sociosqu litora torquent per conubia nostra inceptos hymenaeos luctus quisque scelerisque egestas habitant senectus netus fames donec congue vulputate iaculis cum sociis natoque penatibus magnis dis parturient montes nascetur ridiculus mus auctor ligula sollicitudin purus excepteur sint occaecat cupidatat proident sunt culpa officia deserunt mollit anim laborum proin dignissim feugiat condimentum augue semper accumsan varius mollis porro quisquam consectetur adipisci numquam eius modi tempora incidunt labore magnam quaerat ultrices ultricies cras temporibus quibusdam officiis debitis necessitatibus saepe eveniet voluptates repudiandae recusandae posuere porttitor tempore soluta nobis eligendi optio cumque impedit minus quod maxime placeat facere possimus omnis assumenda repellendus suspendisse mattis convallis aliquet euismod tempus laoreet itaque earum hic tenetur sapiente delectus reiciendis voluptatibus maiores alias perferendis doloribus asperiores repellat`.split(/[\n\s]+/).map(w => w && w.toLowerCase().replace(/[\.]/mg, '')).filter((w, i, arr) => arr.indexOf(w) === i) 69 | -------------------------------------------------------------------------------- /test/tsquerytest1.ts: -------------------------------------------------------------------------------- 1 | // import { tsquery } from '@phenomnomnominal/tsquery'; 2 | 3 | // const typescript = ` 4 | 5 | // class Animal { 6 | // constructor(public name: string) { } 7 | // move(distanceInMeters: number = 0) { 8 | // console.log(\`\${this.name} moved \${distanceInMeters}m.\`); 9 | // } 10 | // } 11 | 12 | // class Snake extends Animal { 13 | // constructor(name: string) { super(name); } 14 | // move(distanceInMeters = 5) { 15 | // console.log("Slithering..."); 16 | // super.move(distanceInMeters); 17 | // } 18 | // } 19 | 20 | // `; 21 | 22 | // const ast = tsquery.ast(typescript); 23 | // const nodes = tsquery(ast, 'Identifier[name="Animal"]'); 24 | 25 | // console.log(nodes.length); -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "module": "commonjs", 5 | "lib": ["es2018"], 6 | "outDir": "./dist", 7 | "rootDir": ".", 8 | "strict": false, 9 | "esModuleInterop": true 10 | }, 11 | "exclude": ["assets", "test"] 12 | } --------------------------------------------------------------------------------