├── .eslintrc.json ├── .gitignore ├── .vscode ├── extensions.json └── launch.json ├── .vscodeignore ├── LICENSE ├── README.md ├── extension.js ├── icon.png ├── jsconfig.json ├── package-lock.json ├── package.json ├── server.py ├── test ├── runTest.js └── suite │ ├── extension.test.js │ └── index.js └── typst-sympy-calculator.gif /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": false, 4 | "commonjs": true, 5 | "es6": true, 6 | "node": true, 7 | "mocha": true 8 | }, 9 | "parserOptions": { 10 | "ecmaVersion": 2018, 11 | "ecmaFeatures": { 12 | "jsx": true 13 | }, 14 | "sourceType": "module" 15 | }, 16 | "rules": { 17 | "no-const-assign": "warn", 18 | "no-this-before-super": "warn", 19 | "no-undef": "warn", 20 | "no-unreachable": "warn", 21 | "no-unused-vars": "warn", 22 | "constructor-super": "warn", 23 | "valid-typeof": "warn" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .vscode-test/ 3 | *.vsix 4 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "dbaeumer.vscode-eslint" 6 | ] 7 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Run Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}" 14 | ] 15 | }, 16 | { 17 | "name": "Extension Tests", 18 | "type": "extensionHost", 19 | "request": "launch", 20 | "args": [ 21 | "--extensionDevelopmentPath=${workspaceFolder}", 22 | "--extensionTestsPath=${workspaceFolder}/test/suite/index" 23 | ] 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | test/** 4 | .gitignore 5 | .yarnrc 6 | vsc-extension-quickstart.md 7 | **/jsconfig.json 8 | **/*.map 9 | **/.eslintrc.json 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 OrangeX4 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Logo](icon.png) 2 | 3 | # Typst Sympy Calculator 4 | 5 | ## About 6 | 7 | `Typst Sympy Calculator` parses **typst math expressions** and converts it into the equivalent **SymPy form**. Then, **calculate it** and convert to typst result. 8 | 9 | It is designed for providing **people writing in typst** a ability to calculate something when writing math expression. It is based on `Python`, `Sympy` and [`typst-sympy-calculator`](https://github.com/OrangeX4/typst-sympy-calculator) module. 10 | 11 | PS: If you want to install the extension, **PLEASE READ THE INSTALL DESCRIPTION!** 12 | 13 | 14 | ## Features 15 | 16 | ![Demo](https://picgo-1258602555.cos.ap-nanjing.myqcloud.com/typst-sympy-calculator.gif) 17 | 18 | - **Default Math:** 19 | - [x] **Arithmetic:** Add (`+`), Sub (`-`), Dot Mul (`dot`), Cross Mul (`times`), Frac (`/`), Power (`^`), Abs (`|x|`), Sqrt (`sqrt`), etc... 20 | - [x] **Alphabet:** `a - z`, `A - Z`, `alpha - omega`, Subscript (`x_1`), Accent Bar(`hat(x)`), etc... 21 | - [x] **Common Functions:** `gcd`, `lcm`, `floor`, `ceil`, `max`, `min`, `log`, `ln`, `exp`, `sin`, `cos`, `tan`, `csc`, `sec`, `cot`, `arcsin`, `sinh`, `arsinh`, etc... 22 | - [x] **Funcion Symbol:** `f(x)`, `f(x-1,)`, `g(x,y)`, etc... 23 | - [x] **Calculous:** Limit `lim_(x -> oo) 1/x`, Integration `integral_1^2 x dif x`, etc... 24 | - [x] **Calculous:** Derivation (`dif/(dif x) (x^2 + 1)` is not supported, but you can use `derivative(expr, var)` instead), etc... 25 | - [x] **Reduce:** Sum `sum_(k=1)^oo (1/2)^k`, Product `product_(k=1)^oo (1/2)^k`, etc... 26 | - [x] **Eval At:** Evalat `x^2 bar_(x = 2)`, `x^2 "|"_(x = 2)`, etc... 27 | - [x] **Linear Algebra:** Matrix to raw echelon form `rref`, Determinant `det`, Transpose `^T`, Inverse `^(-1)`, etc... 28 | - [x] **Relations:** `==`, `>`, `>=`, `<`, `<=`, etc... 29 | - [x] **Solve Equation:** Single Equation `x + 1 = 2`, Multiple Equations `cases(x + y = 1, x - y = 2)`, etc... 30 | - [ ] **Logical:** `and`, `or`, `not`, etc... 31 | - [ ] **Set Theory:** `in`, `sect`, `union`, `subset`, etc... 32 | - [x] **Other:** Binomial `binom(n, k)` ... 33 | - **Custom Math (in typst file):** 34 | - [x] **Define Accents:** `#let acc(x) = math.accent(x, math.grave)` 35 | - [x] **Define Operators:** `#let add = math.op("add")` 36 | - [x] **Define Symbols:** `#let xy = math.italic("xy")` or `#let mail = symbol("🖂", ("stamped", "🖃"),)` 37 | - [x] **Define Functions:** 38 | ```py 39 | # typst-calculator 40 | @func() 41 | def convert_add(a, b): 42 | return a + b 43 | ``` 44 | - **Typst Math Printer:** 45 | - [x] Complete `TypstMathPrinter` in `TypstConverter.py` 46 | - [ ] Custom Printer for `TypstCalculator.py` and `TypstCalculatorServer.py` 47 | - **VS Code Extension:** 48 | - [x] Develop a VS Code Extension for `Typst Calculator` 49 | 50 | 51 | 52 | ## Install 53 | 54 | **IT IS IMPORTANT!** 55 | 56 | **IT IS IMPORTANT!** 57 | 58 | **IT IS IMPORTANT!** 59 | 60 | Before you use the extension, please install python and two python modules: `typst-sympy-calculator` and `Flask`. 61 | 62 | Install **Python** in [Python.org](https://www.python.org/), and then install **NECESSARY modules** by running: 63 | 64 | ```sh 65 | pip install typst-sympy-calculator 66 | pip install Flask 67 | ``` 68 | 69 | Then import the typst template file [`typst-sympy-calculator.typ`](https://github.com/OrangeX4/typst-sympy-calculator.typ) into your typst file. It will be like: 70 | 71 | ```typst 72 | #import "typst-sympy-calculator.typ": * 73 | ``` 74 | 75 | This step is not necessary, but it can provide you with examples of custom functions. 76 | 77 | 78 | ## Usage 79 | 80 | ![Demo](typst-sympy-calculator.gif) 81 | 82 | ### Typst to Typst 83 | 84 | You can **SELECT** some text, and press `Shift + Ctrl + Alt + E` (equal) to get the result of the selected Typst text. It will be like: 85 | 86 | ```typst 87 | // Before 88 | $ integral x dif x $ 89 | 90 | // After 91 | $ integral x dif x = 1/2 x^2 $ 92 | ``` 93 | 94 | You can **SELECT** some text, and press `Shift + Ctrl + Alt + R` (replace) to get the result of the selected Typst text. It will be like: 95 | 96 | ```typst 97 | // Before 98 | $ integral x dif x $ 99 | 100 | // After 101 | $ 1/2 x^2 $ 102 | ``` 103 | 104 | 105 | ### Factor and Expand 106 | 107 | You can **SELECT** some text, and press `Shift + Ctrl + Alt + F` (factor) to get the factor of the selected Typst text. It will be like: 108 | 109 | ```typst 110 | // Before 111 | $ x^2 + 2 x y + y^2 $ 112 | 113 | // After 114 | $ (x + y)^2 $ 115 | ``` 116 | 117 | If you are using **windows**, the shortcut `Shift + Ctrl + Alt + F` may be invalid, you can set another shortcut for it. 118 | 119 | You can **SELECT** some text, and press `Shift + Ctrl + Alt + X` (expand) to get the expand of the selected Typst text. It will be like: 120 | 121 | ```typst 122 | // Before 123 | $ (x + y)^2 $ 124 | 125 | // After 126 | $ x^2 + 2 x y + y^2 $ 127 | ``` 128 | 129 | ### Typst to Numerical Result 130 | 131 | You can **SELECT** some text, and press `Shift + Ctrl + Alt + N` (numerical) to get the numerical result of the selected Typst text. It will be like: 132 | 133 | ```typst 134 | // Before 135 | sqrt(2) 136 | 137 | // After 138 | 1.41421356237310 139 | ``` 140 | 141 | ### Solve Equations and Inequations 142 | 143 | You can **SELECT** some text, and press `Shift + Ctrl + Alt + S` (solve) to solve the equations of the selected Typst text. It will be like: 144 | 145 | ```typst 146 | // Before 147 | x + y = 1 148 | 149 | // After 150 | y = 1 - x, x = 1 - y 151 | 152 | // Before 153 | cases(x + y = 1, x - y = 1) 154 | 155 | // After 156 | cases(x = 1, y = 0) 157 | 158 | // Before 159 | x + 3 < 1 160 | 161 | // After 162 | -oo < x and x < -2 163 | ``` 164 | 165 | ### Variances 166 | 167 | You can **ASSIGN** variance a value using same assignment form in typst: 168 | 169 | ```typst 170 | #let x = 1 171 | 172 | // Before 173 | $ x $ 174 | 175 | // Shift + Ctrl + E 176 | // After 177 | $ x = 1 $ 178 | ``` 179 | 180 | PS: You can use grammar like `y == x + 1` to describe the relation of equality. 181 | 182 | If you want to see the bonding of variances, you can press `Shift + Ctrl + P`, and input `typst-sympy-calculator: Show Current variances`, then you will get data like: 183 | 184 | ```typst 185 | y = x + 1 186 | z = 2 x 187 | ``` 188 | 189 | ### Functions 190 | 191 | You can **DEFINE** a function using same form in typst: 192 | 193 | ```typst 194 | #let f = math.op("f") 195 | 196 | // Before 197 | $ f(1) + f(1) $ 198 | 199 | // Shift + Ctrl + E 200 | // After 201 | $ f(1) + f(1) = 2 f(1) $ 202 | ``` 203 | 204 | ### Symbols 205 | 206 | You can **DEFINE** a symbol using same form in typst: 207 | 208 | ```typst 209 | #let xy = math.italic("xy") 210 | #let email = symbol("🖂", ("stamped", "🖃"),) 211 | 212 | $ xy + email + email.stamped $ 213 | ``` 214 | 215 | ### Accents 216 | 217 | You can **DEFINE** a accent using same form in typst: 218 | 219 | ```typst 220 | #let acc(x) = math.accent(x, math.grave) 221 | 222 | $ acc(x) $ 223 | ``` 224 | 225 | ### Decorators for Operators 226 | 227 | You can **DEFINE** a operator using same form in typst: 228 | 229 | ```typst 230 | #let add = math.op("+") 231 | 232 | '''typst-calculator 233 | @additive_op() 234 | def convert_add(a, b): 235 | return a + b 236 | ''' 237 | 238 | // Before 239 | $ 1 add 1 $ 240 | 241 | // Shift + Ctrl + E 242 | // After 243 | $ 1 add 1 = 2 $ 244 | ``` 245 | 246 | Or just use `'''typst-sympy-calculator` or `'''python \n # typst-calculator` to define a operator. 247 | 248 | there are some decorators you can use: 249 | 250 | - `@operator(type='ADDITIVE_OP', convert_ast=convert_ast, name=name, ast=False)`: Define a common operator; 251 | - `@func()`: Define a function, receive args list; 252 | - `@func_mat()`: Define a matrix function, receive single arg `matrix`; 253 | - `@constant()`: Define a constant, receive no args but only return a constant value; 254 | - `@relation_op()`: Define a relation operator, receive args `a` and `b`; 255 | - `@additive_op()`: Define a additive operator, receive args `a` and `b`; 256 | - `@mp_op()`: Define a multiplicative operator, receive args `a` and `b`; 257 | - `@postfix_op()`: Define a postfix operator, receive args `a`; 258 | - `@reduce_op()`: Define a reduce operator, receive args `expr` and `args = (symbol, sub, sup)`; 259 | 260 | It is important that the function name MUST be `def convert_{operator_name}`, or you can use decorator arg `@func(name='operator_name')`, and the substring `_dot_` will be replaced by `.`. 261 | 262 | There are some examples (from [DefaultTypstCalculator.py](https://github.com/OrangeX4/typst-sympy-calculator/blob/main/DefaultTypstCalculator.py)): 263 | 264 | ```python 265 | # Functions 266 | @func() 267 | def convert_binom(n, k): 268 | return sympy.binomial(n, k) 269 | 270 | # Matrix 271 | @func_mat() 272 | def convert_mat(mat): 273 | return sympy.Matrix(mat) 274 | 275 | # Constants 276 | @constant() 277 | def convert_oo(): 278 | return sympy.oo 279 | 280 | # Relation Operators 281 | @relation_op() 282 | def convert_eq(a, b): 283 | return sympy.Eq(a, b) 284 | 285 | # Additive Operators 286 | @additive_op() 287 | def convert_plus(a, b): 288 | return a + b 289 | 290 | # Mp Operators 291 | @mp_op() 292 | def convert_times(a, b): 293 | return a * b 294 | 295 | # Postfix Operators 296 | @postfix_op() 297 | def convert_degree(expr): 298 | return expr / 180 * sympy.pi 299 | 300 | # Reduces 301 | @reduce_op() 302 | def convert_sum(expr, args): 303 | # symbol, sub, sup = args 304 | return sympy.Sum(expr, args) 305 | ``` 306 | 307 | 308 | ### Python 309 | 310 | You can calculate a python expression by `Shift + Ctrl + Alt + P`. 311 | 312 | **You can use all sympy expression in it.** 313 | 314 | For example, you can get variances you assigned by: 315 | 316 | ``` python 317 | # Before 318 | typst(var['y']) 319 | 320 | # After 321 | typst(var['y']) = x + 1 322 | ``` 323 | 324 | Calculator the roots of the equation: 325 | 326 | ``` python 327 | # Before 328 | sympy.solve([2 * x - y - 3, 3 * x + y - 7],[x, y]) 329 | 330 | # After 331 | sympy.solve([2 * x - y - 3, 3 * x + y - 7],[x, y]) = {x: 2, y: 1} 332 | ``` 333 | 334 | 335 | ## Thanks 336 | 337 | - [augustt198 / latex2sympy](https://github.com/augustt198/latex2sympy) 338 | - [purdue-tlt / latex2sympy](https://github.com/purdue-tlt/latex2sympy) 339 | - [ANTLR](https://www.antlr.org/) 340 | - [Sympy](https://www.sympy.org/en/index.html) 341 | 342 | 343 | ## License 344 | 345 | This project is licensed under the MIT License. -------------------------------------------------------------------------------- /extension.js: -------------------------------------------------------------------------------- 1 | // The module 'vscode' contains the VS Code extensibility API 2 | // Import the module and reference it with the alias vscode in your code below 3 | const vscode = require('vscode') 4 | 5 | // this method is called when your extension is activated 6 | // your extension is activated the very first time the command is executed 7 | 8 | const os = require('os') 9 | const platform = os.platform() 10 | let py 11 | let is_init = false 12 | 13 | /** 14 | * @param {vscode.ExtensionContext} context 15 | */ 16 | function activate(context) { 17 | const { exec, spawn } = require('child_process') 18 | const http = require('http') 19 | 20 | const port = 7396 21 | 22 | let python_path = '' 23 | 24 | switch (platform) { 25 | case 'darwin': 26 | python_path = vscode.workspace.getConfiguration('vscode-typst-sympy-calculator').get('macos') 27 | break; 28 | case 'linux': 29 | python_path = vscode.workspace.getConfiguration('vscode-typst-sympy-calculator').get('linux') 30 | break; 31 | case 'win32': 32 | python_path = vscode.workspace.getConfiguration('vscode-typst-sympy-calculator').get('windows') 33 | break; 34 | default: 35 | vscode.window.showErrorMessage('Unknown operate system.') 36 | return 37 | } 38 | 39 | // run auto update 40 | exec(python_path + ' -m pip install --upgrade typst-sympy-calculator', (err, stdout, stderr) => { 41 | 42 | if (err) { 43 | console.log(err) 44 | } 45 | 46 | if (stderr) { 47 | console.log(stderr) 48 | } 49 | 50 | if (stdout) { 51 | console.log(stdout) 52 | } 53 | }) 54 | 55 | // run server 56 | py = spawn(python_path, [context.asAbsolutePath("server.py")]) 57 | 58 | py.on('error', (err) => { 59 | console.log(err) 60 | vscode.window.showErrorMessage('Running python failed... Please read the guide and make sure you have install "python", "typst-sympy-calculator" and "Flask"') 61 | }) 62 | 63 | py.on('exit', (code) => { 64 | console.log(`Exit Code: ${code}`) 65 | vscode.window.showErrorMessage('Running python failed... Please make sure you have "typst-sympy-calculator >= 0.4.2" and "Flask"') 66 | vscode.window.showErrorMessage('You can update it by "pip install --upgrade typst-sympy-calculator" and reboot your computer') 67 | }) 68 | 69 | function base64(s) { 70 | return Buffer.from(s).toString('base64') 71 | } 72 | 73 | 74 | /** 75 | * @param {string} data 76 | * @param {string} path 77 | * @param {function} onSuccess 78 | * @param {function} onError 79 | */ 80 | function post(data, path, onSuccess, onError) { 81 | for (let key in data) { 82 | if (typeof data[key] === 'string') { 83 | data[key] = base64(data[key]) 84 | } 85 | } 86 | const _data = JSON.stringify(data) 87 | 88 | const options = { 89 | hostname: '127.0.0.1', 90 | port: port, 91 | path: path, 92 | method: 'POST', 93 | headers: { 94 | 'Content-Type': 'application/json', 95 | 'Content-Length': _data.length 96 | } 97 | } 98 | 99 | const req = http.request(options, res => { 100 | res.on('data', data => { 101 | const result = JSON.parse(data) 102 | if (result.error) { 103 | onError(result.error) 104 | } else { 105 | onSuccess(result.data) 106 | } 107 | }) 108 | }) 109 | 110 | req.on('error', () => { 111 | vscode.window.showInformationMessage('Activating the server...\nPlease retry for a moment later.') 112 | }) 113 | 114 | req.write(_data) 115 | req.end() 116 | } 117 | 118 | /** 119 | * @param {string} path 120 | * @param {function} onSuccess 121 | */ 122 | function get(path, onSuccess, onError) { 123 | const options = { 124 | hostname: '127.0.0.1', 125 | port: port, 126 | path: path, 127 | method: 'GET' 128 | } 129 | 130 | const req = http.request(options, res => { 131 | res.on('data', data => { 132 | const result = JSON.parse(data) 133 | if (result.error) { 134 | onError(result.error) 135 | } else { 136 | onSuccess(result.data) 137 | } 138 | }) 139 | }) 140 | 141 | req.on('error', () => { 142 | vscode.window.showInformationMessage('Activating the server...\r\nPlease retry for a moment later.') 143 | }) 144 | 145 | req.end() 146 | } 147 | 148 | 149 | function init_if_not(typst_file, callback) { 150 | if (is_init) { 151 | callback() 152 | } else { 153 | post({ typst_file: typst_file }, '/init', (data) => { 154 | vscode.window.showInformationMessage('Import files: ' + JSON.stringify(data)) 155 | is_init = true 156 | callback() 157 | }, (err) => { 158 | vscode.window.showErrorMessage(err) 159 | }) 160 | } 161 | } 162 | 163 | 164 | context.subscriptions.push( 165 | vscode.commands.registerCommand('vscode-typst-sympy-calculator.equal', function () { 166 | let editor = vscode.window.activeTextEditor 167 | if (!editor) { return } 168 | let doc = editor.document 169 | let selection = editor.selection 170 | let typst_math = doc.getText(selection) 171 | let typst_file = doc.fileName 172 | 173 | init_if_not(typst_file, () => { 174 | post({ 175 | typst_math: typst_math, 176 | typst_file: typst_file 177 | }, 'simplify', (data) => { 178 | let editor = vscode.window.activeTextEditor 179 | if (!editor) { return } 180 | editor.edit((edit) => { 181 | edit.insert(selection.end, ' = ' + data) 182 | }) 183 | }, (err) => { 184 | vscode.window.showErrorMessage(err) 185 | }) 186 | }) 187 | }) 188 | ) 189 | 190 | context.subscriptions.push( 191 | vscode.commands.registerCommand('vscode-typst-sympy-calculator.numerical', function () { 192 | let editor = vscode.window.activeTextEditor 193 | if (!editor) { return } 194 | let doc = editor.document 195 | let selection = editor.selection 196 | let typst_math = doc.getText(selection) 197 | let typst_file = doc.fileName 198 | 199 | init_if_not(typst_file, () => { 200 | post({ 201 | typst_math: typst_math, 202 | typst_file: typst_file 203 | }, 'evalf', (data) => { 204 | let editor = vscode.window.activeTextEditor 205 | if (!editor) { return } 206 | editor.edit((edit) => { 207 | edit.replace(selection, data) 208 | }) 209 | }, (err) => { 210 | vscode.window.showErrorMessage(err) 211 | }) 212 | }) 213 | }) 214 | ) 215 | 216 | context.subscriptions.push( 217 | vscode.commands.registerCommand('vscode-typst-sympy-calculator.solve', function () { 218 | let editor = vscode.window.activeTextEditor 219 | if (!editor) { return } 220 | let doc = editor.document 221 | let selection = editor.selection 222 | let typst_math = doc.getText(selection) 223 | let typst_file = doc.fileName 224 | 225 | init_if_not(typst_file, () => { 226 | post({ 227 | typst_math: typst_math, 228 | typst_file: typst_file 229 | }, 'solve', (data) => { 230 | let editor = vscode.window.activeTextEditor 231 | if (!editor) { return } 232 | editor.edit((edit) => { 233 | edit.replace(selection, data) 234 | }) 235 | }, (err) => { 236 | vscode.window.showErrorMessage(err) 237 | }) 238 | }) 239 | }) 240 | ) 241 | 242 | 243 | context.subscriptions.push( 244 | vscode.commands.registerCommand('vscode-typst-sympy-calculator.factor', function () { 245 | let editor = vscode.window.activeTextEditor 246 | if (!editor) { return } 247 | let doc = editor.document 248 | let selection = editor.selection 249 | let typst_math = doc.getText(selection) 250 | let typst_file = doc.fileName 251 | 252 | init_if_not(typst_file, () => { 253 | post({ 254 | typst_math: typst_math, 255 | typst_file: typst_file 256 | }, 'factor', (data) => { 257 | let editor = vscode.window.activeTextEditor 258 | if (!editor) { return } 259 | editor.edit((edit) => { 260 | edit.replace(selection, data) 261 | }) 262 | }, (err) => { 263 | vscode.window.showErrorMessage(err) 264 | }) 265 | }) 266 | }) 267 | ) 268 | 269 | 270 | context.subscriptions.push( 271 | vscode.commands.registerCommand('vscode-typst-sympy-calculator.expand', function () { 272 | let editor = vscode.window.activeTextEditor 273 | if (!editor) { return } 274 | let doc = editor.document 275 | let selection = editor.selection 276 | let typst_math = doc.getText(selection) 277 | let typst_file = doc.fileName 278 | 279 | init_if_not(typst_file, () => { 280 | post({ 281 | typst_math: typst_math, 282 | typst_file: typst_file 283 | }, 'expand', (data) => { 284 | let editor = vscode.window.activeTextEditor 285 | if (!editor) { return } 286 | editor.edit((edit) => { 287 | edit.replace(selection, data) 288 | }) 289 | }, (err) => { 290 | vscode.window.showErrorMessage(err) 291 | }) 292 | }) 293 | }) 294 | ) 295 | 296 | context.subscriptions.push( 297 | vscode.commands.registerCommand('vscode-typst-sympy-calculator.replace', function () { 298 | let editor = vscode.window.activeTextEditor 299 | if (!editor) { return } 300 | let doc = editor.document 301 | let selection = editor.selection 302 | let typst_math = doc.getText(selection) 303 | let typst_file = doc.fileName 304 | 305 | init_if_not(typst_file, () => { 306 | post({ 307 | typst_math: typst_math, 308 | typst_file: typst_file 309 | }, 'simplify', (data) => { 310 | let editor = vscode.window.activeTextEditor 311 | if (!editor) { return } 312 | editor.edit((edit) => { 313 | edit.replace(selection, data) 314 | }) 315 | }, (err) => { 316 | vscode.window.showErrorMessage(err) 317 | }) 318 | }) 319 | }) 320 | ) 321 | 322 | context.subscriptions.push( 323 | vscode.commands.registerCommand('vscode-typst-sympy-calculator.reimport', function () { 324 | let editor = vscode.window.activeTextEditor 325 | if (!editor) { return } 326 | let doc = editor.document 327 | let typst_file = doc.fileName 328 | post({ typst_file: typst_file }, '/init', (data) => { 329 | vscode.window.showInformationMessage('Import files: ' + JSON.stringify(data)) 330 | }, (err) => { 331 | vscode.window.showErrorMessage(err) 332 | }) 333 | }) 334 | ) 335 | 336 | context.subscriptions.push( 337 | vscode.commands.registerCommand('vscode-typst-sympy-calculator.variances', function () { 338 | get('/variances', (data) => { 339 | let editor = vscode.window.activeTextEditor 340 | if (!editor) { return } 341 | editor.edit((edit) => { 342 | const result = '\r\n' + Object.keys(data).map((key) => key + ' = ' + data[key]).join('\r\n') 343 | edit.insert(editor.selection.end, result) 344 | }) 345 | }, (err) => { 346 | vscode.window.showErrorMessage(err) 347 | }) 348 | }) 349 | ) 350 | 351 | 352 | context.subscriptions.push( 353 | vscode.commands.registerCommand('vscode-typst-sympy-calculator.python', function () { 354 | let editor = vscode.window.activeTextEditor 355 | if (!editor) { return } 356 | let doc = editor.document 357 | let selection = editor.selection 358 | let code = doc.getText(selection) 359 | 360 | post({code: code}, '/python', (data) => { 361 | let editor = vscode.window.activeTextEditor 362 | if (!editor) { return } 363 | editor.edit((edit) => { 364 | edit.insert(selection.end, ' = ' + data) 365 | }) 366 | }, (err) => { 367 | vscode.window.showErrorMessage(err) 368 | }) 369 | }) 370 | ) 371 | } 372 | 373 | exports.activate = activate 374 | 375 | // this method is called when your extension is deactivated 376 | function deactivate() { 377 | py.kill() 378 | } 379 | 380 | module.exports = { 381 | activate, 382 | deactivate 383 | } 384 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OrangeX4/vscode-typst-sympy-calculator/77569c4f21790ad1cfa6632bef930ad79bd2588c/icon.png -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "checkJs": false, /* Typecheck .js files. */ 6 | "lib": [ 7 | "es6" 8 | ] 9 | }, 10 | "exclude": [ 11 | "node_modules" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vscode-typst-sympy-calculator", 3 | "version": "1.1.3", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@babel/code-frame": { 8 | "version": "7.12.11", 9 | "resolved": "https://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.12.11.tgz?cache=0&sync_timestamp=1612314620252&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcode-frame%2Fdownload%2F%40babel%2Fcode-frame-7.12.11.tgz", 10 | "integrity": "sha1-9K1DWqJj25NbjxDyxVLSP7cWpj8=", 11 | "dev": true, 12 | "requires": { 13 | "@babel/highlight": "^7.10.4" 14 | } 15 | }, 16 | "@babel/helper-validator-identifier": { 17 | "version": "7.14.0", 18 | "resolved": "https://registry.nlark.com/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.14.0.tgz?cache=0&sync_timestamp=1619727412592&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-validator-identifier%2Fdownload%2F%40babel%2Fhelper-validator-identifier-7.14.0.tgz", 19 | "integrity": "sha1-0mytikfGUoaxXfFUcxml0Lzycog=", 20 | "dev": true 21 | }, 22 | "@babel/highlight": { 23 | "version": "7.14.0", 24 | "resolved": "https://registry.nlark.com/@babel/highlight/download/@babel/highlight-7.14.0.tgz?cache=0&sync_timestamp=1619727182056&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhighlight%2Fdownload%2F%40babel%2Fhighlight-7.14.0.tgz", 25 | "integrity": "sha1-MZfjdXEe9r+DTmfQ2uyI5PRhE88=", 26 | "dev": true, 27 | "requires": { 28 | "@babel/helper-validator-identifier": "^7.14.0", 29 | "chalk": "^2.0.0", 30 | "js-tokens": "^4.0.0" 31 | }, 32 | "dependencies": { 33 | "chalk": { 34 | "version": "2.4.2", 35 | "resolved": "https://registry.nlark.com/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1618995297666&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", 36 | "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", 37 | "dev": true, 38 | "requires": { 39 | "ansi-styles": "^3.2.1", 40 | "escape-string-regexp": "^1.0.5", 41 | "supports-color": "^5.3.0" 42 | } 43 | } 44 | } 45 | }, 46 | "@eslint/eslintrc": { 47 | "version": "0.4.1", 48 | "resolved": "https://registry.nlark.com/@eslint/eslintrc/download/@eslint/eslintrc-0.4.1.tgz", 49 | "integrity": "sha1-RCdjuIzsvj7g7Hym1t1haFUMvxQ=", 50 | "dev": true, 51 | "requires": { 52 | "ajv": "^6.12.4", 53 | "debug": "^4.1.1", 54 | "espree": "^7.3.0", 55 | "globals": "^12.1.0", 56 | "ignore": "^4.0.6", 57 | "import-fresh": "^3.2.1", 58 | "js-yaml": "^3.13.1", 59 | "minimatch": "^3.0.4", 60 | "strip-json-comments": "^3.1.1" 61 | }, 62 | "dependencies": { 63 | "globals": { 64 | "version": "12.4.0", 65 | "resolved": "https://registry.npm.taobao.org/globals/download/globals-12.4.0.tgz?cache=0&sync_timestamp=1617957623227&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobals%2Fdownload%2Fglobals-12.4.0.tgz", 66 | "integrity": "sha1-oYgTV2pBsAokqX5/gVkYwuGZJfg=", 67 | "dev": true, 68 | "requires": { 69 | "type-fest": "^0.8.1" 70 | } 71 | } 72 | } 73 | }, 74 | "@tootallnate/once": { 75 | "version": "1.1.2", 76 | "resolved": "https://registry.npm.taobao.org/@tootallnate/once/download/@tootallnate/once-1.1.2.tgz", 77 | "integrity": "sha1-zLkURTYBeaBOf+av94wA/8Hur4I=", 78 | "dev": true 79 | }, 80 | "@types/glob": { 81 | "version": "7.1.3", 82 | "resolved": "https://registry.npm.taobao.org/@types/glob/download/@types/glob-7.1.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fglob%2Fdownload%2F%40types%2Fglob-7.1.3.tgz", 83 | "integrity": "sha1-5rqA82t9qtLGhazZJmOC5omFwYM=", 84 | "dev": true, 85 | "requires": { 86 | "@types/minimatch": "*", 87 | "@types/node": "*" 88 | } 89 | }, 90 | "@types/minimatch": { 91 | "version": "3.0.4", 92 | "resolved": "https://registry.npm.taobao.org/@types/minimatch/download/@types/minimatch-3.0.4.tgz", 93 | "integrity": "sha1-8Owl2/Lw5LGGRzE6wDETTKWySyE=", 94 | "dev": true 95 | }, 96 | "@types/mocha": { 97 | "version": "8.2.2", 98 | "resolved": "https://registry.npm.taobao.org/@types/mocha/download/@types/mocha-8.2.2.tgz", 99 | "integrity": "sha1-kdqiJuuML/Jh5qjL+McwRkHgleA=", 100 | "dev": true 101 | }, 102 | "@types/node": { 103 | "version": "12.20.12", 104 | "resolved": "https://registry.nlark.com/@types/node/download/@types/node-12.20.12.tgz?cache=0&sync_timestamp=1620169720944&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-12.20.12.tgz", 105 | "integrity": "sha1-/ZwcLPq1NqI4PtHvcPlK3qdDoiY=", 106 | "dev": true 107 | }, 108 | "@types/vscode": { 109 | "version": "1.56.0", 110 | "resolved": "https://registry.nlark.com/@types/vscode/download/@types/vscode-1.56.0.tgz", 111 | "integrity": "sha1-KnXubWblKSlWSLC27kOCRWTtnBo=", 112 | "dev": true 113 | }, 114 | "@ungap/promise-all-settled": { 115 | "version": "1.1.2", 116 | "resolved": "https://registry.npm.taobao.org/@ungap/promise-all-settled/download/@ungap/promise-all-settled-1.1.2.tgz", 117 | "integrity": "sha1-qlgEJxHW4ydd033Fl+XTHowpCkQ=", 118 | "dev": true 119 | }, 120 | "acorn": { 121 | "version": "7.4.1", 122 | "resolved": "https://registry.nlark.com/acorn/download/acorn-7.4.1.tgz?cache=0&sync_timestamp=1620134156200&other_urls=https%3A%2F%2Fregistry.nlark.com%2Facorn%2Fdownload%2Facorn-7.4.1.tgz", 123 | "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", 124 | "dev": true 125 | }, 126 | "acorn-jsx": { 127 | "version": "5.3.1", 128 | "resolved": "https://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-5.3.1.tgz", 129 | "integrity": "sha1-/IZh4Rt6wVOcR9v+oucrOvNNJns=", 130 | "dev": true 131 | }, 132 | "agent-base": { 133 | "version": "6.0.2", 134 | "resolved": "https://registry.npm.taobao.org/agent-base/download/agent-base-6.0.2.tgz?cache=0&sync_timestamp=1603480100923&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fagent-base%2Fdownload%2Fagent-base-6.0.2.tgz", 135 | "integrity": "sha1-Sf/1hXfP7j83F2/qtMIuAPhtf3c=", 136 | "dev": true, 137 | "requires": { 138 | "debug": "4" 139 | } 140 | }, 141 | "ajv": { 142 | "version": "6.12.6", 143 | "resolved": "https://registry.nlark.com/ajv/download/ajv-6.12.6.tgz?cache=0&sync_timestamp=1620560113100&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fajv%2Fdownload%2Fajv-6.12.6.tgz", 144 | "integrity": "sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ=", 145 | "dev": true, 146 | "requires": { 147 | "fast-deep-equal": "^3.1.1", 148 | "fast-json-stable-stringify": "^2.0.0", 149 | "json-schema-traverse": "^0.4.1", 150 | "uri-js": "^4.2.2" 151 | } 152 | }, 153 | "ansi-colors": { 154 | "version": "4.1.1", 155 | "resolved": "https://registry.npm.taobao.org/ansi-colors/download/ansi-colors-4.1.1.tgz", 156 | "integrity": "sha1-y7muJWv3UK8eqzRPIpqif+lLo0g=", 157 | "dev": true 158 | }, 159 | "ansi-regex": { 160 | "version": "5.0.0", 161 | "resolved": "https://registry.nlark.com/ansi-regex/download/ansi-regex-5.0.0.tgz", 162 | "integrity": "sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U=", 163 | "dev": true 164 | }, 165 | "ansi-styles": { 166 | "version": "3.2.1", 167 | "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-3.2.1.tgz?cache=0&sync_timestamp=1618995625950&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-3.2.1.tgz", 168 | "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", 169 | "dev": true, 170 | "requires": { 171 | "color-convert": "^1.9.0" 172 | } 173 | }, 174 | "anymatch": { 175 | "version": "3.1.2", 176 | "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-3.1.2.tgz?cache=0&sync_timestamp=1617747670309&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fanymatch%2Fdownload%2Fanymatch-3.1.2.tgz", 177 | "integrity": "sha1-wFV8CWrzLxBhmPT04qODU343hxY=", 178 | "dev": true, 179 | "requires": { 180 | "normalize-path": "^3.0.0", 181 | "picomatch": "^2.0.4" 182 | } 183 | }, 184 | "argparse": { 185 | "version": "1.0.10", 186 | "resolved": "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz", 187 | "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", 188 | "dev": true, 189 | "requires": { 190 | "sprintf-js": "~1.0.2" 191 | } 192 | }, 193 | "astral-regex": { 194 | "version": "2.0.0", 195 | "resolved": "https://registry.npm.taobao.org/astral-regex/download/astral-regex-2.0.0.tgz", 196 | "integrity": "sha1-SDFDxWeu7UeFdZwIZXhtx319LjE=", 197 | "dev": true 198 | }, 199 | "balanced-match": { 200 | "version": "1.0.2", 201 | "resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.2.tgz?cache=0&sync_timestamp=1617714383053&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbalanced-match%2Fdownload%2Fbalanced-match-1.0.2.tgz", 202 | "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=", 203 | "dev": true 204 | }, 205 | "big-integer": { 206 | "version": "1.6.48", 207 | "resolved": "https://registry.npm.taobao.org/big-integer/download/big-integer-1.6.48.tgz", 208 | "integrity": "sha1-j9iL0WMsukocjD49cVnwi7lbS54=", 209 | "dev": true 210 | }, 211 | "binary": { 212 | "version": "0.3.0", 213 | "resolved": "https://registry.npm.taobao.org/binary/download/binary-0.3.0.tgz", 214 | "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", 215 | "dev": true, 216 | "requires": { 217 | "buffers": "~0.1.1", 218 | "chainsaw": "~0.1.0" 219 | } 220 | }, 221 | "binary-extensions": { 222 | "version": "2.2.0", 223 | "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-2.2.0.tgz?cache=0&sync_timestamp=1610299293319&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbinary-extensions%2Fdownload%2Fbinary-extensions-2.2.0.tgz", 224 | "integrity": "sha1-dfUC7q+f/eQvyYgpZFvk6na9ni0=", 225 | "dev": true 226 | }, 227 | "bluebird": { 228 | "version": "3.4.7", 229 | "resolved": "https://registry.npm.taobao.org/bluebird/download/bluebird-3.4.7.tgz", 230 | "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=", 231 | "dev": true 232 | }, 233 | "brace-expansion": { 234 | "version": "1.1.11", 235 | "resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz", 236 | "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", 237 | "dev": true, 238 | "requires": { 239 | "balanced-match": "^1.0.0", 240 | "concat-map": "0.0.1" 241 | } 242 | }, 243 | "braces": { 244 | "version": "3.0.2", 245 | "resolved": "https://registry.npm.taobao.org/braces/download/braces-3.0.2.tgz", 246 | "integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=", 247 | "dev": true, 248 | "requires": { 249 | "fill-range": "^7.0.1" 250 | } 251 | }, 252 | "browser-stdout": { 253 | "version": "1.3.1", 254 | "resolved": "https://registry.npm.taobao.org/browser-stdout/download/browser-stdout-1.3.1.tgz", 255 | "integrity": "sha1-uqVZ7hTO1zRSIputcyZGfGH6vWA=", 256 | "dev": true 257 | }, 258 | "buffer-indexof-polyfill": { 259 | "version": "1.0.2", 260 | "resolved": "https://registry.npm.taobao.org/buffer-indexof-polyfill/download/buffer-indexof-polyfill-1.0.2.tgz", 261 | "integrity": "sha1-0nMhNcWZnGSyd/z5savjSYJUcpw=", 262 | "dev": true 263 | }, 264 | "buffers": { 265 | "version": "0.1.1", 266 | "resolved": "https://registry.npm.taobao.org/buffers/download/buffers-0.1.1.tgz", 267 | "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=", 268 | "dev": true 269 | }, 270 | "callsites": { 271 | "version": "3.1.0", 272 | "resolved": "https://registry.npm.taobao.org/callsites/download/callsites-3.1.0.tgz?cache=0&sync_timestamp=1606706835556&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcallsites%2Fdownload%2Fcallsites-3.1.0.tgz", 273 | "integrity": "sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M=", 274 | "dev": true 275 | }, 276 | "camelcase": { 277 | "version": "6.2.0", 278 | "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-6.2.0.tgz", 279 | "integrity": "sha1-kkr4gcnVJaydh/QNlk5c6pgqGAk=", 280 | "dev": true 281 | }, 282 | "chainsaw": { 283 | "version": "0.1.0", 284 | "resolved": "https://registry.npm.taobao.org/chainsaw/download/chainsaw-0.1.0.tgz", 285 | "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", 286 | "dev": true, 287 | "requires": { 288 | "traverse": ">=0.3.0 <0.4" 289 | } 290 | }, 291 | "chalk": { 292 | "version": "4.1.1", 293 | "resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz?cache=0&sync_timestamp=1618995297666&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.1.tgz", 294 | "integrity": "sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=", 295 | "dev": true, 296 | "requires": { 297 | "ansi-styles": "^4.1.0", 298 | "supports-color": "^7.1.0" 299 | }, 300 | "dependencies": { 301 | "ansi-styles": { 302 | "version": "4.3.0", 303 | "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995625950&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", 304 | "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", 305 | "dev": true, 306 | "requires": { 307 | "color-convert": "^2.0.1" 308 | } 309 | }, 310 | "color-convert": { 311 | "version": "2.0.1", 312 | "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", 313 | "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", 314 | "dev": true, 315 | "requires": { 316 | "color-name": "~1.1.4" 317 | } 318 | }, 319 | "color-name": { 320 | "version": "1.1.4", 321 | "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", 322 | "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", 323 | "dev": true 324 | }, 325 | "has-flag": { 326 | "version": "4.0.0", 327 | "resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1618847009337&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz", 328 | "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", 329 | "dev": true 330 | }, 331 | "supports-color": { 332 | "version": "7.2.0", 333 | "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1618560998281&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", 334 | "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", 335 | "dev": true, 336 | "requires": { 337 | "has-flag": "^4.0.0" 338 | } 339 | } 340 | } 341 | }, 342 | "chokidar": { 343 | "version": "3.5.1", 344 | "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-3.5.1.tgz?cache=0&sync_timestamp=1610719440699&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchokidar%2Fdownload%2Fchokidar-3.5.1.tgz", 345 | "integrity": "sha1-7pznu+vSt59J8wR5nVRo4x4U5oo=", 346 | "dev": true, 347 | "requires": { 348 | "anymatch": "~3.1.1", 349 | "braces": "~3.0.2", 350 | "fsevents": "~2.3.1", 351 | "glob-parent": "~5.1.0", 352 | "is-binary-path": "~2.1.0", 353 | "is-glob": "~4.0.1", 354 | "normalize-path": "~3.0.0", 355 | "readdirp": "~3.5.0" 356 | } 357 | }, 358 | "cliui": { 359 | "version": "7.0.4", 360 | "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-7.0.4.tgz", 361 | "integrity": "sha1-oCZe5lVHb8gHrqnfPfjfd4OAi08=", 362 | "dev": true, 363 | "requires": { 364 | "string-width": "^4.2.0", 365 | "strip-ansi": "^6.0.0", 366 | "wrap-ansi": "^7.0.0" 367 | } 368 | }, 369 | "color-convert": { 370 | "version": "1.9.3", 371 | "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz", 372 | "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", 373 | "dev": true, 374 | "requires": { 375 | "color-name": "1.1.3" 376 | } 377 | }, 378 | "color-name": { 379 | "version": "1.1.3", 380 | "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", 381 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 382 | "dev": true 383 | }, 384 | "concat-map": { 385 | "version": "0.0.1", 386 | "resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz", 387 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 388 | "dev": true 389 | }, 390 | "core-util-is": { 391 | "version": "1.0.2", 392 | "resolved": "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz", 393 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", 394 | "dev": true 395 | }, 396 | "cross-spawn": { 397 | "version": "7.0.3", 398 | "resolved": "https://registry.npm.taobao.org/cross-spawn/download/cross-spawn-7.0.3.tgz", 399 | "integrity": "sha1-9zqFudXUHQRVUcF34ogtSshXKKY=", 400 | "dev": true, 401 | "requires": { 402 | "path-key": "^3.1.0", 403 | "shebang-command": "^2.0.0", 404 | "which": "^2.0.1" 405 | } 406 | }, 407 | "debug": { 408 | "version": "4.3.1", 409 | "resolved": "https://registry.npm.taobao.org/debug/download/debug-4.3.1.tgz?cache=0&sync_timestamp=1607566580543&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.3.1.tgz", 410 | "integrity": "sha1-8NIpxQXgxtjEmsVT0bE9wYP2su4=", 411 | "dev": true, 412 | "requires": { 413 | "ms": "2.1.2" 414 | } 415 | }, 416 | "decamelize": { 417 | "version": "4.0.0", 418 | "resolved": "https://registry.npm.taobao.org/decamelize/download/decamelize-4.0.0.tgz?cache=0&sync_timestamp=1610348706789&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdecamelize%2Fdownload%2Fdecamelize-4.0.0.tgz", 419 | "integrity": "sha1-qkcte/Zg6xXzSU79UxyrfypwmDc=", 420 | "dev": true 421 | }, 422 | "deep-is": { 423 | "version": "0.1.3", 424 | "resolved": "https://registry.npm.taobao.org/deep-is/download/deep-is-0.1.3.tgz", 425 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 426 | "dev": true 427 | }, 428 | "diff": { 429 | "version": "5.0.0", 430 | "resolved": "https://registry.nlark.com/diff/download/diff-5.0.0.tgz", 431 | "integrity": "sha1-ftatdthZ0DB4fsNYVfWx2vMdhSs=", 432 | "dev": true 433 | }, 434 | "doctrine": { 435 | "version": "3.0.0", 436 | "resolved": "https://registry.npm.taobao.org/doctrine/download/doctrine-3.0.0.tgz", 437 | "integrity": "sha1-rd6+rXKmV023g2OdyHoSF3OXOWE=", 438 | "dev": true, 439 | "requires": { 440 | "esutils": "^2.0.2" 441 | } 442 | }, 443 | "duplexer2": { 444 | "version": "0.1.4", 445 | "resolved": "https://registry.npm.taobao.org/duplexer2/download/duplexer2-0.1.4.tgz", 446 | "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", 447 | "dev": true, 448 | "requires": { 449 | "readable-stream": "^2.0.2" 450 | } 451 | }, 452 | "emoji-regex": { 453 | "version": "8.0.0", 454 | "resolved": "https://registry.npm.taobao.org/emoji-regex/download/emoji-regex-8.0.0.tgz?cache=0&sync_timestamp=1614682707048&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Femoji-regex%2Fdownload%2Femoji-regex-8.0.0.tgz", 455 | "integrity": "sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=", 456 | "dev": true 457 | }, 458 | "enquirer": { 459 | "version": "2.3.6", 460 | "resolved": "https://registry.npm.taobao.org/enquirer/download/enquirer-2.3.6.tgz", 461 | "integrity": "sha1-Kn/l3WNKHkElqXXsmU/1RW3Dc00=", 462 | "dev": true, 463 | "requires": { 464 | "ansi-colors": "^4.1.1" 465 | } 466 | }, 467 | "escalade": { 468 | "version": "3.1.1", 469 | "resolved": "https://registry.npm.taobao.org/escalade/download/escalade-3.1.1.tgz", 470 | "integrity": "sha1-2M/ccACWXFoBdLSoLqpcBVJ0LkA=", 471 | "dev": true 472 | }, 473 | "escape-string-regexp": { 474 | "version": "1.0.5", 475 | "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", 476 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 477 | "dev": true 478 | }, 479 | "eslint": { 480 | "version": "7.26.0", 481 | "resolved": "https://registry.nlark.com/eslint/download/eslint-7.26.0.tgz", 482 | "integrity": "sha1-1Bb9zcsyNs2PKCBlMSgT+ME5gvY=", 483 | "dev": true, 484 | "requires": { 485 | "@babel/code-frame": "7.12.11", 486 | "@eslint/eslintrc": "^0.4.1", 487 | "ajv": "^6.10.0", 488 | "chalk": "^4.0.0", 489 | "cross-spawn": "^7.0.2", 490 | "debug": "^4.0.1", 491 | "doctrine": "^3.0.0", 492 | "enquirer": "^2.3.5", 493 | "eslint-scope": "^5.1.1", 494 | "eslint-utils": "^2.1.0", 495 | "eslint-visitor-keys": "^2.0.0", 496 | "espree": "^7.3.1", 497 | "esquery": "^1.4.0", 498 | "esutils": "^2.0.2", 499 | "file-entry-cache": "^6.0.1", 500 | "functional-red-black-tree": "^1.0.1", 501 | "glob-parent": "^5.0.0", 502 | "globals": "^13.6.0", 503 | "ignore": "^4.0.6", 504 | "import-fresh": "^3.0.0", 505 | "imurmurhash": "^0.1.4", 506 | "is-glob": "^4.0.0", 507 | "js-yaml": "^3.13.1", 508 | "json-stable-stringify-without-jsonify": "^1.0.1", 509 | "levn": "^0.4.1", 510 | "lodash": "^4.17.21", 511 | "minimatch": "^3.0.4", 512 | "natural-compare": "^1.4.0", 513 | "optionator": "^0.9.1", 514 | "progress": "^2.0.0", 515 | "regexpp": "^3.1.0", 516 | "semver": "^7.2.1", 517 | "strip-ansi": "^6.0.0", 518 | "strip-json-comments": "^3.1.0", 519 | "table": "^6.0.4", 520 | "text-table": "^0.2.0", 521 | "v8-compile-cache": "^2.0.3" 522 | } 523 | }, 524 | "eslint-scope": { 525 | "version": "5.1.1", 526 | "resolved": "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-5.1.1.tgz?cache=0&sync_timestamp=1600070417656&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-scope%2Fdownload%2Feslint-scope-5.1.1.tgz", 527 | "integrity": "sha1-54blmmbLkrP2wfsNUIqrF0hI9Iw=", 528 | "dev": true, 529 | "requires": { 530 | "esrecurse": "^4.3.0", 531 | "estraverse": "^4.1.1" 532 | } 533 | }, 534 | "eslint-utils": { 535 | "version": "2.1.0", 536 | "resolved": "https://registry.npm.taobao.org/eslint-utils/download/eslint-utils-2.1.0.tgz", 537 | "integrity": "sha1-0t5eA0JOcH3BDHQGjd7a5wh0Gyc=", 538 | "dev": true, 539 | "requires": { 540 | "eslint-visitor-keys": "^1.1.0" 541 | }, 542 | "dependencies": { 543 | "eslint-visitor-keys": { 544 | "version": "1.3.0", 545 | "resolved": "https://registry.nlark.com/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz", 546 | "integrity": "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=", 547 | "dev": true 548 | } 549 | } 550 | }, 551 | "eslint-visitor-keys": { 552 | "version": "2.1.0", 553 | "resolved": "https://registry.nlark.com/eslint-visitor-keys/download/eslint-visitor-keys-2.1.0.tgz", 554 | "integrity": "sha1-9lMoJZMFknOSyTjtROsKXJsr0wM=", 555 | "dev": true 556 | }, 557 | "espree": { 558 | "version": "7.3.1", 559 | "resolved": "https://registry.npm.taobao.org/espree/download/espree-7.3.1.tgz?cache=0&sync_timestamp=1607144055171&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fespree%2Fdownload%2Fespree-7.3.1.tgz", 560 | "integrity": "sha1-8t8zC3Usb1UBn4vYm3ZgA5wbu7Y=", 561 | "dev": true, 562 | "requires": { 563 | "acorn": "^7.4.0", 564 | "acorn-jsx": "^5.3.1", 565 | "eslint-visitor-keys": "^1.3.0" 566 | }, 567 | "dependencies": { 568 | "eslint-visitor-keys": { 569 | "version": "1.3.0", 570 | "resolved": "https://registry.nlark.com/eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz", 571 | "integrity": "sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=", 572 | "dev": true 573 | } 574 | } 575 | }, 576 | "esprima": { 577 | "version": "4.0.1", 578 | "resolved": "https://registry.npm.taobao.org/esprima/download/esprima-4.0.1.tgz", 579 | "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", 580 | "dev": true 581 | }, 582 | "esquery": { 583 | "version": "1.4.0", 584 | "resolved": "https://registry.npm.taobao.org/esquery/download/esquery-1.4.0.tgz?cache=0&sync_timestamp=1612565616129&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fesquery%2Fdownload%2Fesquery-1.4.0.tgz", 585 | "integrity": "sha1-IUj/w4uC6McFff7UhCWz5h8PJKU=", 586 | "dev": true, 587 | "requires": { 588 | "estraverse": "^5.1.0" 589 | }, 590 | "dependencies": { 591 | "estraverse": { 592 | "version": "5.2.0", 593 | "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-5.2.0.tgz", 594 | "integrity": "sha1-MH30JUfmzHMk088DwVXVzbjFOIA=", 595 | "dev": true 596 | } 597 | } 598 | }, 599 | "esrecurse": { 600 | "version": "4.3.0", 601 | "resolved": "https://registry.npm.taobao.org/esrecurse/download/esrecurse-4.3.0.tgz", 602 | "integrity": "sha1-eteWTWeauyi+5yzsY3WLHF0smSE=", 603 | "dev": true, 604 | "requires": { 605 | "estraverse": "^5.2.0" 606 | }, 607 | "dependencies": { 608 | "estraverse": { 609 | "version": "5.2.0", 610 | "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-5.2.0.tgz", 611 | "integrity": "sha1-MH30JUfmzHMk088DwVXVzbjFOIA=", 612 | "dev": true 613 | } 614 | } 615 | }, 616 | "estraverse": { 617 | "version": "4.3.0", 618 | "resolved": "https://registry.npm.taobao.org/estraverse/download/estraverse-4.3.0.tgz", 619 | "integrity": "sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0=", 620 | "dev": true 621 | }, 622 | "esutils": { 623 | "version": "2.0.3", 624 | "resolved": "https://registry.npm.taobao.org/esutils/download/esutils-2.0.3.tgz", 625 | "integrity": "sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=", 626 | "dev": true 627 | }, 628 | "fast-deep-equal": { 629 | "version": "3.1.3", 630 | "resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz", 631 | "integrity": "sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=", 632 | "dev": true 633 | }, 634 | "fast-json-stable-stringify": { 635 | "version": "2.1.0", 636 | "resolved": "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz", 637 | "integrity": "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=", 638 | "dev": true 639 | }, 640 | "fast-levenshtein": { 641 | "version": "2.0.6", 642 | "resolved": "https://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz", 643 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", 644 | "dev": true 645 | }, 646 | "file-entry-cache": { 647 | "version": "6.0.1", 648 | "resolved": "https://registry.npm.taobao.org/file-entry-cache/download/file-entry-cache-6.0.1.tgz?cache=0&sync_timestamp=1613794272556&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffile-entry-cache%2Fdownload%2Ffile-entry-cache-6.0.1.tgz", 649 | "integrity": "sha1-IRst2WWcsDlLBz5zI6w8kz1SICc=", 650 | "dev": true, 651 | "requires": { 652 | "flat-cache": "^3.0.4" 653 | } 654 | }, 655 | "fill-range": { 656 | "version": "7.0.1", 657 | "resolved": "https://registry.npm.taobao.org/fill-range/download/fill-range-7.0.1.tgz", 658 | "integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=", 659 | "dev": true, 660 | "requires": { 661 | "to-regex-range": "^5.0.1" 662 | } 663 | }, 664 | "find-up": { 665 | "version": "5.0.0", 666 | "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-5.0.0.tgz", 667 | "integrity": "sha1-TJKBnstwg1YeT0okCoa+UZj1Nvw=", 668 | "dev": true, 669 | "requires": { 670 | "locate-path": "^6.0.0", 671 | "path-exists": "^4.0.0" 672 | } 673 | }, 674 | "flat": { 675 | "version": "5.0.2", 676 | "resolved": "https://registry.npm.taobao.org/flat/download/flat-5.0.2.tgz", 677 | "integrity": "sha1-jKb+MyBp/6nTJMMnGYxZglnOskE=", 678 | "dev": true 679 | }, 680 | "flat-cache": { 681 | "version": "3.0.4", 682 | "resolved": "https://registry.npm.taobao.org/flat-cache/download/flat-cache-3.0.4.tgz", 683 | "integrity": "sha1-YbAzgwKy/p+Vfcwy/CqH8cMEixE=", 684 | "dev": true, 685 | "requires": { 686 | "flatted": "^3.1.0", 687 | "rimraf": "^3.0.2" 688 | } 689 | }, 690 | "flatted": { 691 | "version": "3.1.1", 692 | "resolved": "https://registry.npm.taobao.org/flatted/download/flatted-3.1.1.tgz?cache=0&sync_timestamp=1611059462226&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fflatted%2Fdownload%2Fflatted-3.1.1.tgz", 693 | "integrity": "sha1-xLSJ6ACW2d8d/JfHmHGup8YXxGk=", 694 | "dev": true 695 | }, 696 | "fs.realpath": { 697 | "version": "1.0.0", 698 | "resolved": "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", 699 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 700 | "dev": true 701 | }, 702 | "fsevents": { 703 | "version": "2.3.2", 704 | "resolved": "https://registry.npm.taobao.org/fsevents/download/fsevents-2.3.2.tgz?cache=0&sync_timestamp=1612536512306&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-2.3.2.tgz", 705 | "integrity": "sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro=", 706 | "dev": true, 707 | "optional": true 708 | }, 709 | "fstream": { 710 | "version": "1.0.12", 711 | "resolved": "https://registry.npm.taobao.org/fstream/download/fstream-1.0.12.tgz", 712 | "integrity": "sha1-Touo7i1Ivk99DeUFRVVI6uWTIEU=", 713 | "dev": true, 714 | "requires": { 715 | "graceful-fs": "^4.1.2", 716 | "inherits": "~2.0.0", 717 | "mkdirp": ">=0.5 0", 718 | "rimraf": "2" 719 | }, 720 | "dependencies": { 721 | "rimraf": { 722 | "version": "2.7.1", 723 | "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-2.7.1.tgz", 724 | "integrity": "sha1-NXl/E6f9rcVmFCwp1PB8ytSD4+w=", 725 | "dev": true, 726 | "requires": { 727 | "glob": "^7.1.3" 728 | } 729 | } 730 | } 731 | }, 732 | "functional-red-black-tree": { 733 | "version": "1.0.1", 734 | "resolved": "https://registry.npm.taobao.org/functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz", 735 | "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", 736 | "dev": true 737 | }, 738 | "get-caller-file": { 739 | "version": "2.0.5", 740 | "resolved": "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-2.0.5.tgz", 741 | "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", 742 | "dev": true 743 | }, 744 | "glob": { 745 | "version": "7.1.7", 746 | "resolved": "https://registry.nlark.com/glob/download/glob-7.1.7.tgz?cache=0&sync_timestamp=1620337382269&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglob%2Fdownload%2Fglob-7.1.7.tgz", 747 | "integrity": "sha1-Oxk+kjPwHULQs/eClLvutBj5SpA=", 748 | "dev": true, 749 | "requires": { 750 | "fs.realpath": "^1.0.0", 751 | "inflight": "^1.0.4", 752 | "inherits": "2", 753 | "minimatch": "^3.0.4", 754 | "once": "^1.3.0", 755 | "path-is-absolute": "^1.0.0" 756 | } 757 | }, 758 | "glob-parent": { 759 | "version": "5.1.2", 760 | "resolved": "https://registry.nlark.com/glob-parent/download/glob-parent-5.1.2.tgz?cache=0&sync_timestamp=1620073671816&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglob-parent%2Fdownload%2Fglob-parent-5.1.2.tgz", 761 | "integrity": "sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ=", 762 | "dev": true, 763 | "requires": { 764 | "is-glob": "^4.0.1" 765 | } 766 | }, 767 | "globals": { 768 | "version": "13.8.0", 769 | "resolved": "https://registry.npm.taobao.org/globals/download/globals-13.8.0.tgz?cache=0&sync_timestamp=1617957623227&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobals%2Fdownload%2Fglobals-13.8.0.tgz", 770 | "integrity": "sha1-PiD1BIEM6HqNcuVa7PhDW1D0wbM=", 771 | "dev": true, 772 | "requires": { 773 | "type-fest": "^0.20.2" 774 | }, 775 | "dependencies": { 776 | "type-fest": { 777 | "version": "0.20.2", 778 | "resolved": "https://registry.nlark.com/type-fest/download/type-fest-0.20.2.tgz", 779 | "integrity": "sha1-G/IH9LKPkVg2ZstfvTJ4hzAc1fQ=", 780 | "dev": true 781 | } 782 | } 783 | }, 784 | "graceful-fs": { 785 | "version": "4.2.6", 786 | "resolved": "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.6.tgz", 787 | "integrity": "sha1-/wQLKwhTsjw9MQJ1I3BvGIXXa+4=", 788 | "dev": true 789 | }, 790 | "growl": { 791 | "version": "1.10.5", 792 | "resolved": "https://registry.npm.taobao.org/growl/download/growl-1.10.5.tgz", 793 | "integrity": "sha1-8nNdwig2dPpnR4sQGBBZNVw2nl4=", 794 | "dev": true 795 | }, 796 | "has-flag": { 797 | "version": "3.0.0", 798 | "resolved": "https://registry.nlark.com/has-flag/download/has-flag-3.0.0.tgz?cache=0&sync_timestamp=1618847009337&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-3.0.0.tgz", 799 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 800 | "dev": true 801 | }, 802 | "he": { 803 | "version": "1.2.0", 804 | "resolved": "https://registry.npm.taobao.org/he/download/he-1.2.0.tgz", 805 | "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=", 806 | "dev": true 807 | }, 808 | "http-proxy-agent": { 809 | "version": "4.0.1", 810 | "resolved": "https://registry.npm.taobao.org/http-proxy-agent/download/http-proxy-agent-4.0.1.tgz", 811 | "integrity": "sha1-ioyO9/WTLM+VPClsqCkblap0qjo=", 812 | "dev": true, 813 | "requires": { 814 | "@tootallnate/once": "1", 815 | "agent-base": "6", 816 | "debug": "4" 817 | } 818 | }, 819 | "https-proxy-agent": { 820 | "version": "5.0.0", 821 | "resolved": "https://registry.npm.taobao.org/https-proxy-agent/download/https-proxy-agent-5.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttps-proxy-agent%2Fdownload%2Fhttps-proxy-agent-5.0.0.tgz", 822 | "integrity": "sha1-4qkFQqu2inYuCghQ9sntrf2FBrI=", 823 | "dev": true, 824 | "requires": { 825 | "agent-base": "6", 826 | "debug": "4" 827 | } 828 | }, 829 | "ignore": { 830 | "version": "4.0.6", 831 | "resolved": "https://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz", 832 | "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", 833 | "dev": true 834 | }, 835 | "import-fresh": { 836 | "version": "3.3.0", 837 | "resolved": "https://registry.npm.taobao.org/import-fresh/download/import-fresh-3.3.0.tgz?cache=0&sync_timestamp=1608469485280&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fimport-fresh%2Fdownload%2Fimport-fresh-3.3.0.tgz", 838 | "integrity": "sha1-NxYsJfy566oublPVtNiM4X2eDCs=", 839 | "dev": true, 840 | "requires": { 841 | "parent-module": "^1.0.0", 842 | "resolve-from": "^4.0.0" 843 | } 844 | }, 845 | "imurmurhash": { 846 | "version": "0.1.4", 847 | "resolved": "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz", 848 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 849 | "dev": true 850 | }, 851 | "inflight": { 852 | "version": "1.0.6", 853 | "resolved": "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz", 854 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 855 | "dev": true, 856 | "requires": { 857 | "once": "^1.3.0", 858 | "wrappy": "1" 859 | } 860 | }, 861 | "inherits": { 862 | "version": "2.0.4", 863 | "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz", 864 | "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=", 865 | "dev": true 866 | }, 867 | "is-binary-path": { 868 | "version": "2.1.0", 869 | "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-2.1.0.tgz", 870 | "integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=", 871 | "dev": true, 872 | "requires": { 873 | "binary-extensions": "^2.0.0" 874 | } 875 | }, 876 | "is-extglob": { 877 | "version": "2.1.1", 878 | "resolved": "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz", 879 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 880 | "dev": true 881 | }, 882 | "is-fullwidth-code-point": { 883 | "version": "3.0.0", 884 | "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz?cache=0&sync_timestamp=1618552489864&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-fullwidth-code-point%2Fdownload%2Fis-fullwidth-code-point-3.0.0.tgz", 885 | "integrity": "sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=", 886 | "dev": true 887 | }, 888 | "is-glob": { 889 | "version": "4.0.1", 890 | "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-4.0.1.tgz", 891 | "integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=", 892 | "dev": true, 893 | "requires": { 894 | "is-extglob": "^2.1.1" 895 | } 896 | }, 897 | "is-number": { 898 | "version": "7.0.0", 899 | "resolved": "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz", 900 | "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=", 901 | "dev": true 902 | }, 903 | "is-plain-obj": { 904 | "version": "2.1.0", 905 | "resolved": "https://registry.npm.taobao.org/is-plain-obj/download/is-plain-obj-2.1.0.tgz", 906 | "integrity": "sha1-ReQuN/zPH0Dajl927iFRWEDAkoc=", 907 | "dev": true 908 | }, 909 | "isarray": { 910 | "version": "1.0.0", 911 | "resolved": "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", 912 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", 913 | "dev": true 914 | }, 915 | "isexe": { 916 | "version": "2.0.0", 917 | "resolved": "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz", 918 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 919 | "dev": true 920 | }, 921 | "js-tokens": { 922 | "version": "4.0.0", 923 | "resolved": "https://registry.nlark.com/js-tokens/download/js-tokens-4.0.0.tgz?cache=0&sync_timestamp=1619345098261&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjs-tokens%2Fdownload%2Fjs-tokens-4.0.0.tgz", 924 | "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=", 925 | "dev": true 926 | }, 927 | "js-yaml": { 928 | "version": "3.14.1", 929 | "resolved": "https://registry.nlark.com/js-yaml/download/js-yaml-3.14.1.tgz?cache=0&sync_timestamp=1618846844115&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjs-yaml%2Fdownload%2Fjs-yaml-3.14.1.tgz", 930 | "integrity": "sha1-2ugS/bOCX6MGYJqHFzg8UMNqBTc=", 931 | "dev": true, 932 | "requires": { 933 | "argparse": "^1.0.7", 934 | "esprima": "^4.0.0" 935 | } 936 | }, 937 | "json-schema-traverse": { 938 | "version": "0.4.1", 939 | "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz?cache=0&sync_timestamp=1608000211395&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson-schema-traverse%2Fdownload%2Fjson-schema-traverse-0.4.1.tgz", 940 | "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", 941 | "dev": true 942 | }, 943 | "json-stable-stringify-without-jsonify": { 944 | "version": "1.0.1", 945 | "resolved": "https://registry.npm.taobao.org/json-stable-stringify-without-jsonify/download/json-stable-stringify-without-jsonify-1.0.1.tgz", 946 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", 947 | "dev": true 948 | }, 949 | "levn": { 950 | "version": "0.4.1", 951 | "resolved": "https://registry.npm.taobao.org/levn/download/levn-0.4.1.tgz", 952 | "integrity": "sha1-rkViwAdHO5MqYgDUAyaN0v/8at4=", 953 | "dev": true, 954 | "requires": { 955 | "prelude-ls": "^1.2.1", 956 | "type-check": "~0.4.0" 957 | } 958 | }, 959 | "listenercount": { 960 | "version": "1.0.1", 961 | "resolved": "https://registry.npm.taobao.org/listenercount/download/listenercount-1.0.1.tgz", 962 | "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=", 963 | "dev": true 964 | }, 965 | "locate-path": { 966 | "version": "6.0.0", 967 | "resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-6.0.0.tgz", 968 | "integrity": "sha1-VTIeswn+u8WcSAHZMackUqaB0oY=", 969 | "dev": true, 970 | "requires": { 971 | "p-locate": "^5.0.0" 972 | } 973 | }, 974 | "lodash": { 975 | "version": "4.17.21", 976 | "resolved": "https://registry.npm.taobao.org/lodash/download/lodash-4.17.21.tgz?cache=0&sync_timestamp=1613835860585&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash%2Fdownload%2Flodash-4.17.21.tgz", 977 | "integrity": "sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw=", 978 | "dev": true 979 | }, 980 | "lodash.clonedeep": { 981 | "version": "4.5.0", 982 | "resolved": "https://registry.npm.taobao.org/lodash.clonedeep/download/lodash.clonedeep-4.5.0.tgz", 983 | "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", 984 | "dev": true 985 | }, 986 | "lodash.truncate": { 987 | "version": "4.4.2", 988 | "resolved": "https://registry.npm.taobao.org/lodash.truncate/download/lodash.truncate-4.4.2.tgz", 989 | "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", 990 | "dev": true 991 | }, 992 | "log-symbols": { 993 | "version": "4.0.0", 994 | "resolved": "https://registry.npm.taobao.org/log-symbols/download/log-symbols-4.0.0.tgz?cache=0&sync_timestamp=1618723146520&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flog-symbols%2Fdownload%2Flog-symbols-4.0.0.tgz", 995 | "integrity": "sha1-abPMRtIPRI7M23XqH6cz2eghySA=", 996 | "dev": true, 997 | "requires": { 998 | "chalk": "^4.0.0" 999 | } 1000 | }, 1001 | "lru-cache": { 1002 | "version": "6.0.0", 1003 | "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-6.0.0.tgz", 1004 | "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", 1005 | "dev": true, 1006 | "requires": { 1007 | "yallist": "^4.0.0" 1008 | } 1009 | }, 1010 | "minimatch": { 1011 | "version": "3.0.4", 1012 | "resolved": "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz", 1013 | "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", 1014 | "dev": true, 1015 | "requires": { 1016 | "brace-expansion": "^1.1.7" 1017 | } 1018 | }, 1019 | "minimist": { 1020 | "version": "1.2.5", 1021 | "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz?cache=0&sync_timestamp=1606706583368&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminimist%2Fdownload%2Fminimist-1.2.5.tgz", 1022 | "integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=", 1023 | "dev": true 1024 | }, 1025 | "mkdirp": { 1026 | "version": "0.5.5", 1027 | "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.5.tgz?cache=0&sync_timestamp=1600349118431&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.5.tgz", 1028 | "integrity": "sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8=", 1029 | "dev": true, 1030 | "requires": { 1031 | "minimist": "^1.2.5" 1032 | } 1033 | }, 1034 | "mocha": { 1035 | "version": "8.4.0", 1036 | "resolved": "https://registry.nlark.com/mocha/download/mocha-8.4.0.tgz", 1037 | "integrity": "sha1-Z3voi/FZgKPK4Dpz4QoPw5l/DP8=", 1038 | "dev": true, 1039 | "requires": { 1040 | "@ungap/promise-all-settled": "1.1.2", 1041 | "ansi-colors": "4.1.1", 1042 | "browser-stdout": "1.3.1", 1043 | "chokidar": "3.5.1", 1044 | "debug": "4.3.1", 1045 | "diff": "5.0.0", 1046 | "escape-string-regexp": "4.0.0", 1047 | "find-up": "5.0.0", 1048 | "glob": "7.1.6", 1049 | "growl": "1.10.5", 1050 | "he": "1.2.0", 1051 | "js-yaml": "4.0.0", 1052 | "log-symbols": "4.0.0", 1053 | "minimatch": "3.0.4", 1054 | "ms": "2.1.3", 1055 | "nanoid": "3.1.20", 1056 | "serialize-javascript": "5.0.1", 1057 | "strip-json-comments": "3.1.1", 1058 | "supports-color": "8.1.1", 1059 | "which": "2.0.2", 1060 | "wide-align": "1.1.3", 1061 | "workerpool": "6.1.0", 1062 | "yargs": "16.2.0", 1063 | "yargs-parser": "20.2.4", 1064 | "yargs-unparser": "2.0.0" 1065 | }, 1066 | "dependencies": { 1067 | "argparse": { 1068 | "version": "2.0.1", 1069 | "resolved": "https://registry.npm.taobao.org/argparse/download/argparse-2.0.1.tgz", 1070 | "integrity": "sha1-JG9Q88p4oyQPbJl+ipvR6sSeSzg=", 1071 | "dev": true 1072 | }, 1073 | "escape-string-regexp": { 1074 | "version": "4.0.0", 1075 | "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-4.0.0.tgz", 1076 | "integrity": "sha1-FLqDpdNz49MR5a/KKc9b+tllvzQ=", 1077 | "dev": true 1078 | }, 1079 | "glob": { 1080 | "version": "7.1.6", 1081 | "resolved": "https://registry.nlark.com/glob/download/glob-7.1.6.tgz?cache=0&sync_timestamp=1620337382269&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglob%2Fdownload%2Fglob-7.1.6.tgz", 1082 | "integrity": "sha1-FB8zuBp8JJLhJVlDB0gMRmeSeKY=", 1083 | "dev": true, 1084 | "requires": { 1085 | "fs.realpath": "^1.0.0", 1086 | "inflight": "^1.0.4", 1087 | "inherits": "2", 1088 | "minimatch": "^3.0.4", 1089 | "once": "^1.3.0", 1090 | "path-is-absolute": "^1.0.0" 1091 | } 1092 | }, 1093 | "has-flag": { 1094 | "version": "4.0.0", 1095 | "resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1618847009337&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz", 1096 | "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", 1097 | "dev": true 1098 | }, 1099 | "js-yaml": { 1100 | "version": "4.0.0", 1101 | "resolved": "https://registry.nlark.com/js-yaml/download/js-yaml-4.0.0.tgz?cache=0&sync_timestamp=1618846844115&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjs-yaml%2Fdownload%2Fjs-yaml-4.0.0.tgz", 1102 | "integrity": "sha1-9Ca8D/S0BRkmzViMcRExg0CaEh8=", 1103 | "dev": true, 1104 | "requires": { 1105 | "argparse": "^2.0.1" 1106 | } 1107 | }, 1108 | "ms": { 1109 | "version": "2.1.3", 1110 | "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.3.tgz?cache=0&sync_timestamp=1607433905701&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.1.3.tgz", 1111 | "integrity": "sha1-V0yBOM4dK1hh8LRFedut1gxmFbI=", 1112 | "dev": true 1113 | }, 1114 | "supports-color": { 1115 | "version": "8.1.1", 1116 | "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-8.1.1.tgz?cache=0&sync_timestamp=1618560998281&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-8.1.1.tgz", 1117 | "integrity": "sha1-zW/BfihQDP9WwbhsCn/UpUpzAFw=", 1118 | "dev": true, 1119 | "requires": { 1120 | "has-flag": "^4.0.0" 1121 | } 1122 | } 1123 | } 1124 | }, 1125 | "ms": { 1126 | "version": "2.1.2", 1127 | "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz?cache=0&sync_timestamp=1607433905701&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.1.2.tgz", 1128 | "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", 1129 | "dev": true 1130 | }, 1131 | "nanoid": { 1132 | "version": "3.1.20", 1133 | "resolved": "https://registry.nlark.com/nanoid/download/nanoid-3.1.20.tgz", 1134 | "integrity": "sha1-utwmPGsdzxS3HvqoX2q0wdbPx4g=", 1135 | "dev": true 1136 | }, 1137 | "natural-compare": { 1138 | "version": "1.4.0", 1139 | "resolved": "https://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz", 1140 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", 1141 | "dev": true 1142 | }, 1143 | "normalize-path": { 1144 | "version": "3.0.0", 1145 | "resolved": "https://registry.npm.taobao.org/normalize-path/download/normalize-path-3.0.0.tgz", 1146 | "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=", 1147 | "dev": true 1148 | }, 1149 | "once": { 1150 | "version": "1.4.0", 1151 | "resolved": "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz", 1152 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1153 | "dev": true, 1154 | "requires": { 1155 | "wrappy": "1" 1156 | } 1157 | }, 1158 | "optionator": { 1159 | "version": "0.9.1", 1160 | "resolved": "https://registry.npm.taobao.org/optionator/download/optionator-0.9.1.tgz", 1161 | "integrity": "sha1-TyNqY3Pa4FZqbUPhMmZ09QwpFJk=", 1162 | "dev": true, 1163 | "requires": { 1164 | "deep-is": "^0.1.3", 1165 | "fast-levenshtein": "^2.0.6", 1166 | "levn": "^0.4.1", 1167 | "prelude-ls": "^1.2.1", 1168 | "type-check": "^0.4.0", 1169 | "word-wrap": "^1.2.3" 1170 | } 1171 | }, 1172 | "p-limit": { 1173 | "version": "3.1.0", 1174 | "resolved": "https://registry.npm.taobao.org/p-limit/download/p-limit-3.1.0.tgz?cache=0&sync_timestamp=1606288549008&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-limit%2Fdownload%2Fp-limit-3.1.0.tgz", 1175 | "integrity": "sha1-4drMvnjQ0TiMoYxk/qOOPlfjcGs=", 1176 | "dev": true, 1177 | "requires": { 1178 | "yocto-queue": "^0.1.0" 1179 | } 1180 | }, 1181 | "p-locate": { 1182 | "version": "5.0.0", 1183 | "resolved": "https://registry.npm.taobao.org/p-locate/download/p-locate-5.0.0.tgz", 1184 | "integrity": "sha1-g8gxXGeFAF470CGDlBHJ4RDm2DQ=", 1185 | "dev": true, 1186 | "requires": { 1187 | "p-limit": "^3.0.2" 1188 | } 1189 | }, 1190 | "parent-module": { 1191 | "version": "1.0.1", 1192 | "resolved": "https://registry.npm.taobao.org/parent-module/download/parent-module-1.0.1.tgz", 1193 | "integrity": "sha1-aR0nCeeMefrjoVZiJFLQB2LKqqI=", 1194 | "dev": true, 1195 | "requires": { 1196 | "callsites": "^3.0.0" 1197 | } 1198 | }, 1199 | "path-exists": { 1200 | "version": "4.0.0", 1201 | "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-4.0.0.tgz", 1202 | "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", 1203 | "dev": true 1204 | }, 1205 | "path-is-absolute": { 1206 | "version": "1.0.1", 1207 | "resolved": "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz", 1208 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 1209 | "dev": true 1210 | }, 1211 | "path-key": { 1212 | "version": "3.1.1", 1213 | "resolved": "https://registry.npm.taobao.org/path-key/download/path-key-3.1.1.tgz?cache=0&sync_timestamp=1617971675964&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-key%2Fdownload%2Fpath-key-3.1.1.tgz", 1214 | "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", 1215 | "dev": true 1216 | }, 1217 | "picomatch": { 1218 | "version": "2.2.3", 1219 | "resolved": "https://registry.npm.taobao.org/picomatch/download/picomatch-2.2.3.tgz?cache=0&sync_timestamp=1618050023150&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpicomatch%2Fdownload%2Fpicomatch-2.2.3.tgz", 1220 | "integrity": "sha1-RlVH81nMwgbTxI5Goby4m/fuYZ0=", 1221 | "dev": true 1222 | }, 1223 | "prelude-ls": { 1224 | "version": "1.2.1", 1225 | "resolved": "https://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.2.1.tgz", 1226 | "integrity": "sha1-3rxkidem5rDnYRiIzsiAM30xY5Y=", 1227 | "dev": true 1228 | }, 1229 | "process-nextick-args": { 1230 | "version": "2.0.1", 1231 | "resolved": "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz", 1232 | "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=", 1233 | "dev": true 1234 | }, 1235 | "progress": { 1236 | "version": "2.0.3", 1237 | "resolved": "https://registry.npm.taobao.org/progress/download/progress-2.0.3.tgz", 1238 | "integrity": "sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=", 1239 | "dev": true 1240 | }, 1241 | "punycode": { 1242 | "version": "2.1.1", 1243 | "resolved": "https://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz", 1244 | "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", 1245 | "dev": true 1246 | }, 1247 | "randombytes": { 1248 | "version": "2.1.0", 1249 | "resolved": "https://registry.npm.taobao.org/randombytes/download/randombytes-2.1.0.tgz", 1250 | "integrity": "sha1-32+ENy8CcNxlzfYpE0mrekc9Tyo=", 1251 | "dev": true, 1252 | "requires": { 1253 | "safe-buffer": "^5.1.0" 1254 | } 1255 | }, 1256 | "readable-stream": { 1257 | "version": "2.3.7", 1258 | "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.7.tgz", 1259 | "integrity": "sha1-Hsoc9xGu+BTAT2IlKjamL2yyO1c=", 1260 | "dev": true, 1261 | "requires": { 1262 | "core-util-is": "~1.0.0", 1263 | "inherits": "~2.0.3", 1264 | "isarray": "~1.0.0", 1265 | "process-nextick-args": "~2.0.0", 1266 | "safe-buffer": "~5.1.1", 1267 | "string_decoder": "~1.1.1", 1268 | "util-deprecate": "~1.0.1" 1269 | }, 1270 | "dependencies": { 1271 | "safe-buffer": { 1272 | "version": "5.1.2", 1273 | "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", 1274 | "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", 1275 | "dev": true 1276 | } 1277 | } 1278 | }, 1279 | "readdirp": { 1280 | "version": "3.5.0", 1281 | "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-3.5.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-3.5.0.tgz", 1282 | "integrity": "sha1-m6dMAZsV02UnjS6Ru4xI17TULJ4=", 1283 | "dev": true, 1284 | "requires": { 1285 | "picomatch": "^2.2.1" 1286 | } 1287 | }, 1288 | "regexpp": { 1289 | "version": "3.1.0", 1290 | "resolved": "https://registry.npm.taobao.org/regexpp/download/regexpp-3.1.0.tgz", 1291 | "integrity": "sha1-IG0K0KVkjP+9uK5GQ489xRyfeOI=", 1292 | "dev": true 1293 | }, 1294 | "require-directory": { 1295 | "version": "2.1.1", 1296 | "resolved": "https://registry.npm.taobao.org/require-directory/download/require-directory-2.1.1.tgz", 1297 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 1298 | "dev": true 1299 | }, 1300 | "require-from-string": { 1301 | "version": "2.0.2", 1302 | "resolved": "https://registry.npm.taobao.org/require-from-string/download/require-from-string-2.0.2.tgz", 1303 | "integrity": "sha1-iaf92TgmEmcxjq/hT5wy5ZjDaQk=", 1304 | "dev": true 1305 | }, 1306 | "resolve-from": { 1307 | "version": "4.0.0", 1308 | "resolved": "https://registry.npm.taobao.org/resolve-from/download/resolve-from-4.0.0.tgz", 1309 | "integrity": "sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=", 1310 | "dev": true 1311 | }, 1312 | "rimraf": { 1313 | "version": "3.0.2", 1314 | "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-3.0.2.tgz", 1315 | "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", 1316 | "dev": true, 1317 | "requires": { 1318 | "glob": "^7.1.3" 1319 | } 1320 | }, 1321 | "safe-buffer": { 1322 | "version": "5.2.1", 1323 | "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.1.tgz", 1324 | "integrity": "sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=", 1325 | "dev": true 1326 | }, 1327 | "semver": { 1328 | "version": "7.3.5", 1329 | "resolved": "https://registry.npm.taobao.org/semver/download/semver-7.3.5.tgz?cache=0&sync_timestamp=1616463603361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-7.3.5.tgz", 1330 | "integrity": "sha1-C2Ich5NI2JmOSw5L6Us/EuYBjvc=", 1331 | "dev": true, 1332 | "requires": { 1333 | "lru-cache": "^6.0.0" 1334 | } 1335 | }, 1336 | "serialize-javascript": { 1337 | "version": "5.0.1", 1338 | "resolved": "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-5.0.1.tgz", 1339 | "integrity": "sha1-eIbshIBJpGJGepfT2Rjrsqr5NPQ=", 1340 | "dev": true, 1341 | "requires": { 1342 | "randombytes": "^2.1.0" 1343 | } 1344 | }, 1345 | "setimmediate": { 1346 | "version": "1.0.5", 1347 | "resolved": "https://registry.npm.taobao.org/setimmediate/download/setimmediate-1.0.5.tgz", 1348 | "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", 1349 | "dev": true 1350 | }, 1351 | "shebang-command": { 1352 | "version": "2.0.0", 1353 | "resolved": "https://registry.npm.taobao.org/shebang-command/download/shebang-command-2.0.0.tgz", 1354 | "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", 1355 | "dev": true, 1356 | "requires": { 1357 | "shebang-regex": "^3.0.0" 1358 | } 1359 | }, 1360 | "shebang-regex": { 1361 | "version": "3.0.0", 1362 | "resolved": "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-3.0.0.tgz", 1363 | "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=", 1364 | "dev": true 1365 | }, 1366 | "slice-ansi": { 1367 | "version": "4.0.0", 1368 | "resolved": "https://registry.nlark.com/slice-ansi/download/slice-ansi-4.0.0.tgz", 1369 | "integrity": "sha1-UA6N0P1VsFgVCGJVsxla3ypF/ms=", 1370 | "dev": true, 1371 | "requires": { 1372 | "ansi-styles": "^4.0.0", 1373 | "astral-regex": "^2.0.0", 1374 | "is-fullwidth-code-point": "^3.0.0" 1375 | }, 1376 | "dependencies": { 1377 | "ansi-styles": { 1378 | "version": "4.3.0", 1379 | "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995625950&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", 1380 | "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", 1381 | "dev": true, 1382 | "requires": { 1383 | "color-convert": "^2.0.1" 1384 | } 1385 | }, 1386 | "color-convert": { 1387 | "version": "2.0.1", 1388 | "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", 1389 | "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", 1390 | "dev": true, 1391 | "requires": { 1392 | "color-name": "~1.1.4" 1393 | } 1394 | }, 1395 | "color-name": { 1396 | "version": "1.1.4", 1397 | "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", 1398 | "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", 1399 | "dev": true 1400 | } 1401 | } 1402 | }, 1403 | "sprintf-js": { 1404 | "version": "1.0.3", 1405 | "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz", 1406 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 1407 | "dev": true 1408 | }, 1409 | "string-width": { 1410 | "version": "4.2.2", 1411 | "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-4.2.2.tgz", 1412 | "integrity": "sha1-2v1PlVmnWFz7pSnGoKT3NIjr1MU=", 1413 | "dev": true, 1414 | "requires": { 1415 | "emoji-regex": "^8.0.0", 1416 | "is-fullwidth-code-point": "^3.0.0", 1417 | "strip-ansi": "^6.0.0" 1418 | } 1419 | }, 1420 | "string_decoder": { 1421 | "version": "1.1.1", 1422 | "resolved": "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", 1423 | "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", 1424 | "dev": true, 1425 | "requires": { 1426 | "safe-buffer": "~5.1.0" 1427 | }, 1428 | "dependencies": { 1429 | "safe-buffer": { 1430 | "version": "5.1.2", 1431 | "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", 1432 | "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", 1433 | "dev": true 1434 | } 1435 | } 1436 | }, 1437 | "strip-ansi": { 1438 | "version": "6.0.0", 1439 | "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-6.0.0.tgz?cache=0&sync_timestamp=1618553299612&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-6.0.0.tgz", 1440 | "integrity": "sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI=", 1441 | "dev": true, 1442 | "requires": { 1443 | "ansi-regex": "^5.0.0" 1444 | } 1445 | }, 1446 | "strip-json-comments": { 1447 | "version": "3.1.1", 1448 | "resolved": "https://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-3.1.1.tgz?cache=0&sync_timestamp=1606706346538&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-json-comments%2Fdownload%2Fstrip-json-comments-3.1.1.tgz", 1449 | "integrity": "sha1-MfEoGzgyYwQ0gxwxDAHMzajL4AY=", 1450 | "dev": true 1451 | }, 1452 | "supports-color": { 1453 | "version": "5.5.0", 1454 | "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1618560998281&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", 1455 | "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", 1456 | "dev": true, 1457 | "requires": { 1458 | "has-flag": "^3.0.0" 1459 | } 1460 | }, 1461 | "table": { 1462 | "version": "6.7.0", 1463 | "resolved": "https://registry.nlark.com/table/download/table-6.7.0.tgz?cache=0&sync_timestamp=1620352845573&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftable%2Fdownload%2Ftable-6.7.0.tgz", 1464 | "integrity": "sha1-JidHUfDuCZxUf2y5HT7/DWHRVbI=", 1465 | "dev": true, 1466 | "requires": { 1467 | "ajv": "^8.0.1", 1468 | "lodash.clonedeep": "^4.5.0", 1469 | "lodash.truncate": "^4.4.2", 1470 | "slice-ansi": "^4.0.0", 1471 | "string-width": "^4.2.0", 1472 | "strip-ansi": "^6.0.0" 1473 | }, 1474 | "dependencies": { 1475 | "ajv": { 1476 | "version": "8.3.0", 1477 | "resolved": "https://registry.nlark.com/ajv/download/ajv-8.3.0.tgz?cache=0&sync_timestamp=1620560113100&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fajv%2Fdownload%2Fajv-8.3.0.tgz", 1478 | "integrity": "sha1-Je5zSOMs3Eoduzgla/a9xFHdV3w=", 1479 | "dev": true, 1480 | "requires": { 1481 | "fast-deep-equal": "^3.1.1", 1482 | "json-schema-traverse": "^1.0.0", 1483 | "require-from-string": "^2.0.2", 1484 | "uri-js": "^4.2.2" 1485 | } 1486 | }, 1487 | "json-schema-traverse": { 1488 | "version": "1.0.0", 1489 | "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-1.0.0.tgz?cache=0&sync_timestamp=1608000211395&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson-schema-traverse%2Fdownload%2Fjson-schema-traverse-1.0.0.tgz", 1490 | "integrity": "sha1-rnvLNlard6c7pcSb9lTzjmtoYOI=", 1491 | "dev": true 1492 | } 1493 | } 1494 | }, 1495 | "text-table": { 1496 | "version": "0.2.0", 1497 | "resolved": "https://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz", 1498 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", 1499 | "dev": true 1500 | }, 1501 | "to-regex-range": { 1502 | "version": "5.0.1", 1503 | "resolved": "https://registry.npm.taobao.org/to-regex-range/download/to-regex-range-5.0.1.tgz", 1504 | "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=", 1505 | "dev": true, 1506 | "requires": { 1507 | "is-number": "^7.0.0" 1508 | } 1509 | }, 1510 | "traverse": { 1511 | "version": "0.3.9", 1512 | "resolved": "https://registry.npm.taobao.org/traverse/download/traverse-0.3.9.tgz", 1513 | "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=", 1514 | "dev": true 1515 | }, 1516 | "type-check": { 1517 | "version": "0.4.0", 1518 | "resolved": "https://registry.npm.taobao.org/type-check/download/type-check-0.4.0.tgz", 1519 | "integrity": "sha1-B7ggO/pwVsBlcFDjzNLDdzC6uPE=", 1520 | "dev": true, 1521 | "requires": { 1522 | "prelude-ls": "^1.2.1" 1523 | } 1524 | }, 1525 | "type-fest": { 1526 | "version": "0.8.1", 1527 | "resolved": "https://registry.nlark.com/type-fest/download/type-fest-0.8.1.tgz", 1528 | "integrity": "sha1-CeJJ696FHTseSNJ8EFREZn8XuD0=", 1529 | "dev": true 1530 | }, 1531 | "typescript": { 1532 | "version": "4.2.4", 1533 | "resolved": "https://registry.nlark.com/typescript/download/typescript-4.2.4.tgz", 1534 | "integrity": "sha1-hhC1l0feAo/aiYqK7w4QPxVtCWE=", 1535 | "dev": true 1536 | }, 1537 | "unzipper": { 1538 | "version": "0.10.11", 1539 | "resolved": "https://registry.npm.taobao.org/unzipper/download/unzipper-0.10.11.tgz", 1540 | "integrity": "sha1-C0mRRGRyy9uS7nQDkJ8mwkGceC4=", 1541 | "dev": true, 1542 | "requires": { 1543 | "big-integer": "^1.6.17", 1544 | "binary": "~0.3.0", 1545 | "bluebird": "~3.4.1", 1546 | "buffer-indexof-polyfill": "~1.0.0", 1547 | "duplexer2": "~0.1.4", 1548 | "fstream": "^1.0.12", 1549 | "graceful-fs": "^4.2.2", 1550 | "listenercount": "~1.0.1", 1551 | "readable-stream": "~2.3.6", 1552 | "setimmediate": "~1.0.4" 1553 | } 1554 | }, 1555 | "uri-js": { 1556 | "version": "4.4.1", 1557 | "resolved": "https://registry.npm.taobao.org/uri-js/download/uri-js-4.4.1.tgz?cache=0&sync_timestamp=1610237586670&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Furi-js%2Fdownload%2Furi-js-4.4.1.tgz", 1558 | "integrity": "sha1-mxpSWVIlhZ5V9mnZKPiMbFfyp34=", 1559 | "dev": true, 1560 | "requires": { 1561 | "punycode": "^2.1.0" 1562 | } 1563 | }, 1564 | "util-deprecate": { 1565 | "version": "1.0.2", 1566 | "resolved": "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz", 1567 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", 1568 | "dev": true 1569 | }, 1570 | "v8-compile-cache": { 1571 | "version": "2.3.0", 1572 | "resolved": "https://registry.npm.taobao.org/v8-compile-cache/download/v8-compile-cache-2.3.0.tgz?cache=0&sync_timestamp=1614993639567&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fv8-compile-cache%2Fdownload%2Fv8-compile-cache-2.3.0.tgz", 1573 | "integrity": "sha1-LeGWGMZtwkfc+2+ZM4A12CRaLO4=", 1574 | "dev": true 1575 | }, 1576 | "vscode-test": { 1577 | "version": "1.5.2", 1578 | "resolved": "https://registry.npm.taobao.org/vscode-test/download/vscode-test-1.5.2.tgz", 1579 | "integrity": "sha1-2ew8qxgVr64dfYGSPjxoXRPTIwM=", 1580 | "dev": true, 1581 | "requires": { 1582 | "http-proxy-agent": "^4.0.1", 1583 | "https-proxy-agent": "^5.0.0", 1584 | "rimraf": "^3.0.2", 1585 | "unzipper": "^0.10.11" 1586 | } 1587 | }, 1588 | "which": { 1589 | "version": "2.0.2", 1590 | "resolved": "https://registry.npm.taobao.org/which/download/which-2.0.2.tgz?cache=0&sync_timestamp=1605134855909&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwhich%2Fdownload%2Fwhich-2.0.2.tgz", 1591 | "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", 1592 | "dev": true, 1593 | "requires": { 1594 | "isexe": "^2.0.0" 1595 | } 1596 | }, 1597 | "wide-align": { 1598 | "version": "1.1.3", 1599 | "resolved": "https://registry.npm.taobao.org/wide-align/download/wide-align-1.1.3.tgz", 1600 | "integrity": "sha1-rgdOa9wMFKQx6ATmJFScYzsABFc=", 1601 | "dev": true, 1602 | "requires": { 1603 | "string-width": "^1.0.2 || 2" 1604 | }, 1605 | "dependencies": { 1606 | "ansi-regex": { 1607 | "version": "3.0.0", 1608 | "resolved": "https://registry.nlark.com/ansi-regex/download/ansi-regex-3.0.0.tgz", 1609 | "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", 1610 | "dev": true 1611 | }, 1612 | "is-fullwidth-code-point": { 1613 | "version": "2.0.0", 1614 | "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz?cache=0&sync_timestamp=1618552489864&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-fullwidth-code-point%2Fdownload%2Fis-fullwidth-code-point-2.0.0.tgz", 1615 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 1616 | "dev": true 1617 | }, 1618 | "string-width": { 1619 | "version": "2.1.1", 1620 | "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz", 1621 | "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", 1622 | "dev": true, 1623 | "requires": { 1624 | "is-fullwidth-code-point": "^2.0.0", 1625 | "strip-ansi": "^4.0.0" 1626 | } 1627 | }, 1628 | "strip-ansi": { 1629 | "version": "4.0.0", 1630 | "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz?cache=0&sync_timestamp=1618553299612&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-4.0.0.tgz", 1631 | "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", 1632 | "dev": true, 1633 | "requires": { 1634 | "ansi-regex": "^3.0.0" 1635 | } 1636 | } 1637 | } 1638 | }, 1639 | "word-wrap": { 1640 | "version": "1.2.3", 1641 | "resolved": "https://registry.npm.taobao.org/word-wrap/download/word-wrap-1.2.3.tgz", 1642 | "integrity": "sha1-YQY29rH3A4kb00dxzLF/uTtHB5w=", 1643 | "dev": true 1644 | }, 1645 | "workerpool": { 1646 | "version": "6.1.0", 1647 | "resolved": "https://registry.npm.taobao.org/workerpool/download/workerpool-6.1.0.tgz?cache=0&sync_timestamp=1617657422252&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fworkerpool%2Fdownload%2Fworkerpool-6.1.0.tgz", 1648 | "integrity": "sha1-qOA4tMlFaVloUt56jqQiju/es3s=", 1649 | "dev": true 1650 | }, 1651 | "wrap-ansi": { 1652 | "version": "7.0.0", 1653 | "resolved": "https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-7.0.0.tgz?cache=0&sync_timestamp=1618558913931&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwrap-ansi%2Fdownload%2Fwrap-ansi-7.0.0.tgz", 1654 | "integrity": "sha1-Z+FFz/UQpqaYS98RUpEdadLrnkM=", 1655 | "dev": true, 1656 | "requires": { 1657 | "ansi-styles": "^4.0.0", 1658 | "string-width": "^4.1.0", 1659 | "strip-ansi": "^6.0.0" 1660 | }, 1661 | "dependencies": { 1662 | "ansi-styles": { 1663 | "version": "4.3.0", 1664 | "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995625950&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", 1665 | "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", 1666 | "dev": true, 1667 | "requires": { 1668 | "color-convert": "^2.0.1" 1669 | } 1670 | }, 1671 | "color-convert": { 1672 | "version": "2.0.1", 1673 | "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", 1674 | "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", 1675 | "dev": true, 1676 | "requires": { 1677 | "color-name": "~1.1.4" 1678 | } 1679 | }, 1680 | "color-name": { 1681 | "version": "1.1.4", 1682 | "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", 1683 | "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", 1684 | "dev": true 1685 | } 1686 | } 1687 | }, 1688 | "wrappy": { 1689 | "version": "1.0.2", 1690 | "resolved": "https://registry.nlark.com/wrappy/download/wrappy-1.0.2.tgz?cache=0&sync_timestamp=1619133505879&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fwrappy%2Fdownload%2Fwrappy-1.0.2.tgz", 1691 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1692 | "dev": true 1693 | }, 1694 | "y18n": { 1695 | "version": "5.0.8", 1696 | "resolved": "https://registry.npm.taobao.org/y18n/download/y18n-5.0.8.tgz", 1697 | "integrity": "sha1-f0k00PfKjFb5UxSTndzS3ZHOHVU=", 1698 | "dev": true 1699 | }, 1700 | "yallist": { 1701 | "version": "4.0.0", 1702 | "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", 1703 | "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=", 1704 | "dev": true 1705 | }, 1706 | "yargs": { 1707 | "version": "16.2.0", 1708 | "resolved": "https://registry.nlark.com/yargs/download/yargs-16.2.0.tgz?cache=0&sync_timestamp=1620086465147&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fyargs%2Fdownload%2Fyargs-16.2.0.tgz", 1709 | "integrity": "sha1-HIK/D2tqZur85+8w43b0mhJHf2Y=", 1710 | "dev": true, 1711 | "requires": { 1712 | "cliui": "^7.0.2", 1713 | "escalade": "^3.1.1", 1714 | "get-caller-file": "^2.0.5", 1715 | "require-directory": "^2.1.1", 1716 | "string-width": "^4.2.0", 1717 | "y18n": "^5.0.5", 1718 | "yargs-parser": "^20.2.2" 1719 | } 1720 | }, 1721 | "yargs-parser": { 1722 | "version": "20.2.4", 1723 | "resolved": "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-20.2.4.tgz?cache=0&sync_timestamp=1615405185480&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs-parser%2Fdownload%2Fyargs-parser-20.2.4.tgz", 1724 | "integrity": "sha1-tCiQ8UVmeW+Fro46JSkNIF8VSlQ=", 1725 | "dev": true 1726 | }, 1727 | "yargs-unparser": { 1728 | "version": "2.0.0", 1729 | "resolved": "https://registry.npm.taobao.org/yargs-unparser/download/yargs-unparser-2.0.0.tgz", 1730 | "integrity": "sha1-8TH5ImkRrl2a04xDL+gJNmwjJes=", 1731 | "dev": true, 1732 | "requires": { 1733 | "camelcase": "^6.0.0", 1734 | "decamelize": "^4.0.0", 1735 | "flat": "^5.0.2", 1736 | "is-plain-obj": "^2.1.0" 1737 | } 1738 | }, 1739 | "yocto-queue": { 1740 | "version": "0.1.0", 1741 | "resolved": "https://registry.npm.taobao.org/yocto-queue/download/yocto-queue-0.1.0.tgz?cache=0&sync_timestamp=1606290282107&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyocto-queue%2Fdownload%2Fyocto-queue-0.1.0.tgz", 1742 | "integrity": "sha1-ApTrPe4FAo0x7hpfosVWpqrxChs=", 1743 | "dev": true 1744 | } 1745 | } 1746 | } 1747 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vscode-typst-sympy-calculator", 3 | "displayName": "Typst Sympy Calculator", 4 | "publisher": "OrangeX4", 5 | "description": "VS Code extension for Typst math calculating, includes Arithmetic, Calculous, Matrix, Custom Variances and Funcions by yourself", 6 | "icon": "icon.png", 7 | "version": "0.5.1", 8 | "engines": { 9 | "vscode": "^1.46.0" 10 | }, 11 | "categories": [ 12 | "Data Science", 13 | "Notebooks" 14 | ], 15 | "activationEvents": [ 16 | "onCommand:vscode-typst-sympy-calculator.reimport", 17 | "onCommand:vscode-typst-sympy-calculator.variances", 18 | "onCommand:vscode-typst-sympy-calculator.equal", 19 | "onCommand:vscode-typst-sympy-calculator.replace", 20 | "onCommand:vscode-typst-sympy-calculator.factor", 21 | "onCommand:vscode-typst-sympy-calculator.expand", 22 | "onCommand:vscode-typst-sympy-calculator.numerical", 23 | "onCommand:vscode-typst-sympy-calculator.solve", 24 | "onCommand:vscode-typst-sympy-calculator.python" 25 | ], 26 | "main": "./extension.js", 27 | "contributes": { 28 | "configuration": [ 29 | { 30 | "title": "Typst-Sympy-Calculator", 31 | "properties": { 32 | "vscode-typst-sympy-calculator.windows": { 33 | "type": "string", 34 | "default": "python", 35 | "description": "Path of python for Windows." 36 | }, 37 | "vscode-typst-sympy-calculator.linux": { 38 | "type": "string", 39 | "default": "python3", 40 | "description": "Path of python for Linux." 41 | }, 42 | "vscode-typst-sympy-calculator.macos": { 43 | "type": "string", 44 | "default": "python3", 45 | "description": "Path of python for Mac OS." 46 | } 47 | } 48 | } 49 | ], 50 | "commands": [ 51 | { 52 | "category": "Typst-Sympy-Calculator", 53 | "command": "vscode-typst-sympy-calculator.reimport", 54 | "title": "Reimport Files for Typst Sympy Calculator" 55 | }, 56 | { 57 | "category": "Typst-Sympy-Calculator", 58 | "command": "vscode-typst-sympy-calculator.variances", 59 | "title": "Show Current Variances" 60 | }, 61 | { 62 | "category": "Typst-Sympy-Calculator", 63 | "command": "vscode-typst-sympy-calculator.equal", 64 | "title": "Append result of selected expression" 65 | }, 66 | { 67 | "category": "Typst-Sympy-Calculator", 68 | "command": "vscode-typst-sympy-calculator.replace", 69 | "title": "Replace expression with its result" 70 | }, 71 | { 72 | "category": "Typst-Sympy-Calculator", 73 | "command": "vscode-typst-sympy-calculator.factor", 74 | "title": "Factor expression" 75 | }, 76 | { 77 | "category": "Typst-Sympy-Calculator", 78 | "command": "vscode-typst-sympy-calculator.expand", 79 | "title": "Expand expression" 80 | }, 81 | { 82 | "category": "Typst-Sympy-Calculator", 83 | "command": "vscode-typst-sympy-calculator.numerical", 84 | "title": "Calculate the numerical expression of selection" 85 | }, 86 | { 87 | "category": "Typst-Sympy-Calculator", 88 | "command": "vscode-typst-sympy-calculator.solve", 89 | "title": "Solve equations of selection" 90 | }, 91 | { 92 | "category": "Typst-Sympy-Calculator", 93 | "command": "vscode-typst-sympy-calculator.python", 94 | "title": "Calculate Python expression" 95 | } 96 | ], 97 | "keybindings": [ 98 | { 99 | "command": "vscode-typst-sympy-calculator.equal", 100 | "key": "Shift+Ctrl+Alt+E", 101 | "mac": "Shift+Cmd+Alt+E", 102 | "when": "editorTextFocus && editorHasSelection" 103 | }, 104 | { 105 | "command": "vscode-typst-sympy-calculator.replace", 106 | "key": "Shift+Ctrl+Alt+R", 107 | "mac": "Shift+Cmd+Alt+R", 108 | "when": "editorTextFocus && editorHasSelection" 109 | }, 110 | { 111 | "command": "vscode-typst-sympy-calculator.factor", 112 | "key": "Shift+Ctrl+Alt+F", 113 | "mac": "Shift+Cmd+Alt+F", 114 | "when": "editorTextFocus && editorHasSelection" 115 | }, 116 | { 117 | "command": "vscode-typst-sympy-calculator.expand", 118 | "key": "Shift+Ctrl+Alt+X", 119 | "mac": "Shift+Cmd+Alt+X", 120 | "when": "editorTextFocus && editorHasSelection" 121 | }, 122 | { 123 | "command": "vscode-typst-sympy-calculator.numerical", 124 | "key": "Shift+Ctrl+Alt+N", 125 | "mac": "Shift+Cmd+Alt+N", 126 | "when": "editorTextFocus && editorHasSelection" 127 | }, 128 | { 129 | "command": "vscode-typst-sympy-calculator.solve", 130 | "key": "Shift+Ctrl+Alt+S", 131 | "mac": "Shift+Cmd+Alt+S", 132 | "when": "editorTextFocus && editorHasSelection" 133 | }, 134 | { 135 | "command": "vscode-typst-sympy-calculator.python", 136 | "key": "Shift+Ctrl+Alt+P", 137 | "mac": "Shift+Cmd+Alt+P", 138 | "when": "editorTextFocus && editorHasSelection" 139 | } 140 | ] 141 | }, 142 | "scripts": { 143 | "lint": "eslint .", 144 | "pretest": "npm run lint", 145 | "test": "node ./test/runTest.js" 146 | }, 147 | "devDependencies": { 148 | "@types/vscode": "^1.46.0", 149 | "@types/glob": "^7.1.3", 150 | "@types/mocha": "^8.0.0", 151 | "@types/node": "^12.11.7", 152 | "eslint": "^7.9.0", 153 | "glob": "^7.1.6", 154 | "mocha": "^8.1.3", 155 | "typescript": "^4.0.2", 156 | "vscode-test": "^1.4.0" 157 | }, 158 | "dependencies": {}, 159 | "license": "MIT", 160 | "bugs": { 161 | "url": "https://github.com/OrangeX4/vscode-typst-sympy-calculator/issues" 162 | }, 163 | "repository": { 164 | "type": "git", 165 | "url": "https://github.com/OrangeX4/vscode-typst-sympy-calculator" 166 | }, 167 | "homepage": "https://orangex4.cool" 168 | } 169 | -------------------------------------------------------------------------------- /server.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, request 2 | import json 3 | import base64 4 | import sympy 5 | from sympy import factor, expand, apart, expand_trig 6 | import math 7 | from TypstCalculatorServer import TypstCalculatorServer, VERSION 8 | 9 | app = Flask(__name__) 10 | 11 | server = TypstCalculatorServer() 12 | calc = server.calculator 13 | 14 | typst = server.typst 15 | typst2sympy = server.sympy 16 | exec_code = server.exec 17 | subs, simplify, evalf, solve = server.subs, server.simplify, server.evalf, server.solve 18 | set_variance, unset_variance, clear_variance = server.set_variance, server.unset_variance, server.clear_variance 19 | operator, relation_op, additive_op, mp_op, postfix_op, reduce_op, func, func_mat, constant = calc.get_decorators() 20 | var = server.var 21 | 22 | 23 | def base64_decode(s: str): 24 | return base64.b64decode(s).decode('utf-8') 25 | 26 | 27 | @app.route('/') 28 | def main(): 29 | return 'Typst Sympy Calculator Server' 30 | 31 | 32 | @app.route('/version', methods=['GET']) 33 | def get_version(): 34 | return { 35 | 'data': VERSION, 36 | 'error': '' 37 | } 38 | 39 | 40 | @app.route('/init', methods=['POST']) 41 | def post_init(): 42 | try: 43 | return { 44 | 'data': server.init(base64_decode(request.json['typst_file'])), 45 | 'error': '' 46 | } 47 | except Exception as e: 48 | return { 49 | 'data': '', 50 | 'error': str(e) 51 | } 52 | 53 | 54 | @app.route('/simplify', methods=['POST']) 55 | def post_simplify(): 56 | try: 57 | return { 58 | 'data': typst(simplify(base64_decode(request.json['typst_math']), base64_decode(request.json['typst_file']))), 59 | 'error': '' 60 | } 61 | except Exception as e: 62 | return { 63 | 'data': '', 64 | 'error': str(e) 65 | } 66 | 67 | 68 | @app.route('/evalf', methods=['POST']) 69 | def post_evalf(): 70 | try: 71 | return { 72 | 'data': typst(evalf(base64_decode(request.json['typst_math']), base64_decode(request.json['typst_file']))), 73 | 'error': '' 74 | } 75 | except Exception as e: 76 | return { 77 | 'data': '', 78 | 'error': str(e) 79 | } 80 | 81 | 82 | @app.route('/solve', methods=['POST']) 83 | def post_solve(): 84 | try: 85 | return { 86 | 'data': typst(solve(base64_decode(request.json['typst_math']), base64_decode(request.json['typst_file']))), 87 | 'error': '' 88 | } 89 | except Exception as e: 90 | return { 91 | 'data': '', 92 | 'error': str(e) 93 | } 94 | 95 | 96 | @app.route('/factor', methods=['POST']) 97 | def post_factor(): 98 | try: 99 | return { 100 | 'data': typst(factor(subs(base64_decode(request.json['typst_math']), base64_decode(request.json['typst_file'])))), 101 | 'error': '' 102 | } 103 | except Exception as e: 104 | return { 105 | 'data': '', 106 | 'error': str(e) 107 | } 108 | 109 | 110 | @app.route('/expand', methods=['POST']) 111 | def post_expand(): 112 | try: 113 | return { 114 | 'data': typst(expand(apart(expand_trig(subs(base64_decode(request.json['typst_math']), base64_decode(request.json['typst_file'])))))), 115 | 'error': '' 116 | } 117 | except Exception as _: 118 | try: 119 | return { 120 | 'data': typst(expand(expand_trig(subs(base64_decode(request.json['typst_math']), base64_decode(request.json['typst_file']))))), 121 | 'error': '' 122 | } 123 | except Exception as e: 124 | return { 125 | 'data': '', 126 | 'error': str(e) 127 | } 128 | 129 | 130 | @app.route('/variances', methods=['GET']) 131 | def get_variances(): 132 | try: 133 | result = {} 134 | for key in var: 135 | result[key] = typst(var[key]) 136 | return { 137 | 'data': result, 138 | 'error': '' 139 | } 140 | except Exception as e: 141 | return { 142 | 'data': '', 143 | 'error': str(e) 144 | } 145 | 146 | 147 | @app.route('/python', methods=['POST']) 148 | def run_python(): 149 | try: 150 | rv = None 151 | try: 152 | rv = eval(base64_decode(request.json['code'])) 153 | except SyntaxError: 154 | # replace all \t with 4 spaces 155 | python_code = base64_decode(request.json['code']).replace('\t', ' ') 156 | # remove leading indent from python code 157 | lines = python_code.split('\n') 158 | indent = len(lines[0]) - len(lines[0].lstrip()) 159 | new_python_code = '' 160 | for line in lines: 161 | assert set(' ' + line[:indent]) == set(' '), 'IndentationError' 162 | new_python_code += line[indent:] + '\n' 163 | exec(new_python_code) 164 | return { 165 | 'data': str(rv), 166 | 'error': '' 167 | } 168 | except Exception as e: 169 | return { 170 | 'data': '', 171 | 'error': str(e) 172 | } 173 | 174 | 175 | if __name__ == '__main__': 176 | app.run(host='127.0.0.1', port=7396) 177 | -------------------------------------------------------------------------------- /test/runTest.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | const { runTests } = require('vscode-test'); 4 | 5 | async function main() { 6 | try { 7 | // The folder containing the Extension Manifest package.json 8 | // Passed to `--extensionDevelopmentPath` 9 | const extensionDevelopmentPath = path.resolve(__dirname, '../'); 10 | 11 | // The path to the extension test script 12 | // Passed to --extensionTestsPath 13 | const extensionTestsPath = path.resolve(__dirname, './suite/index'); 14 | 15 | // Download VS Code, unzip it and run the integration test 16 | await runTests({ extensionDevelopmentPath, extensionTestsPath }); 17 | } catch (err) { 18 | console.error('Failed to run tests'); 19 | process.exit(1); 20 | } 21 | } 22 | 23 | main(); 24 | -------------------------------------------------------------------------------- /test/suite/extension.test.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert'); 2 | 3 | // You can import and use all API from the 'vscode' module 4 | // as well as import your extension to test it 5 | const vscode = require('vscode'); 6 | // const myExtension = require('../extension'); 7 | 8 | suite('Extension Test Suite', () => { 9 | vscode.window.showInformationMessage('Start all tests.'); 10 | 11 | test('Sample test', () => { 12 | assert.equal(-1, [1, 2, 3].indexOf(5)); 13 | assert.equal(-1, [1, 2, 3].indexOf(0)); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /test/suite/index.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const Mocha = require('mocha'); 3 | const glob = require('glob'); 4 | 5 | function run() { 6 | // Create the mocha test 7 | const mocha = new Mocha({ 8 | ui: 'tdd', 9 | color: true 10 | }); 11 | 12 | const testsRoot = path.resolve(__dirname, '..'); 13 | 14 | return new Promise((c, e) => { 15 | glob('**/**.test.js', { cwd: testsRoot }, (err, files) => { 16 | if (err) { 17 | return e(err); 18 | } 19 | 20 | // Add files to the test suite 21 | files.forEach(f => mocha.addFile(path.resolve(testsRoot, f))); 22 | 23 | try { 24 | // Run the mocha test 25 | mocha.run(failures => { 26 | if (failures > 0) { 27 | e(new Error(`${failures} tests failed.`)); 28 | } else { 29 | c(); 30 | } 31 | }); 32 | } catch (err) { 33 | console.error(err); 34 | e(err); 35 | } 36 | }); 37 | }); 38 | } 39 | 40 | module.exports = { 41 | run 42 | }; 43 | -------------------------------------------------------------------------------- /typst-sympy-calculator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OrangeX4/vscode-typst-sympy-calculator/77569c4f21790ad1cfa6632bef930ad79bd2588c/typst-sympy-calculator.gif --------------------------------------------------------------------------------