├── .eslintignore ├── .eslintrc.json ├── .gitignore ├── license ├── macro-acorn-walk ├── acorn-parse.js ├── acorn-walk.js ├── assets │ ├── ast.json │ └── bundle.js ├── index.js └── packages │ ├── acorn-macros │ ├── index.js │ └── jsconfig.json │ └── styletakeout.macro │ ├── implementation │ └── index.js │ └── index.d.ts ├── macro-esbuild-plugin ├── index.ts └── macroPlugin.ts ├── macro-regex ├── index.js └── macros │ ├── ms.macro.js │ └── styletakeout.macro.js ├── macros ├── preval.macro │ └── example.ts └── styletakeout.macro │ ├── example-imported.ts │ ├── example.ts │ └── styletakeout.macro.ts ├── notes.md ├── package-lock.json ├── package.json ├── readme.md └── tsconfig.json /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "@typescript-eslint/parser", 4 | "parserOptions": { 5 | "sourceType": "module", 6 | "ecmaVersion": 2020 7 | }, 8 | // Limit TypeScript linting to TS/TSX 9 | // https://github.com/typescript-eslint/typescript-eslint/issues/1928 10 | "overrides": [ 11 | { 12 | "files": [ 13 | "**/*.{ts,tsx}" 14 | ], 15 | "extends": [ 16 | "plugin:@typescript-eslint/recommended", 17 | "plugin:@typescript-eslint/recommended-requiring-type-checking" 18 | ], 19 | "rules": { 20 | "@typescript-eslint/ban-ts-comment": "off", 21 | "@typescript-eslint/explicit-function-return-type": "off", 22 | "@typescript-eslint/explicit-module-boundary-types": "off", 23 | "@typescript-eslint/no-empty-function": "off", 24 | "@typescript-eslint/no-explicit-any": [ 25 | "error", 26 | { 27 | "fixToUnknown": true, 28 | "ignoreRestArgs": false 29 | } 30 | ], 31 | "@typescript-eslint/no-floating-promises": [ 32 | "error", 33 | { 34 | "ignoreIIFE": true 35 | } 36 | ], 37 | "@typescript-eslint/no-namespace": "off", 38 | "@typescript-eslint/no-unused-vars": "off", 39 | "@typescript-eslint/no-unnecessary-condition": [ 40 | "error", 41 | { 42 | "allowConstantLoopConditions": true 43 | } 44 | ], 45 | "@typescript-eslint/no-unnecessary-type-arguments": "error" 46 | }, 47 | "parser": "@typescript-eslint/parser", 48 | "parserOptions": { 49 | "tsconfigRootDir": "./", 50 | "project": "./tsconfig.json" 51 | } 52 | } 53 | ], 54 | "env": { 55 | "es6": true, 56 | "browser": true, 57 | "node": true 58 | }, 59 | "extends": [ 60 | "eslint:recommended", 61 | "plugin:@typescript-eslint/eslint-recommended" 62 | ], 63 | "rules": { 64 | "block-spacing": "error", 65 | "comma-dangle": [ 66 | "error", 67 | { 68 | "arrays": "always-multiline", 69 | "exports": "never", 70 | "functions": "never", 71 | "imports": "never", 72 | "objects": "always-multiline" 73 | } 74 | ], 75 | "comma-spacing": "error", 76 | "default-param-last": "error", 77 | "eol-last": [ 78 | "error", 79 | "always" 80 | ], 81 | "eqeqeq": "error", 82 | "indent": [ 83 | "error", 84 | 2, 85 | { 86 | "SwitchCase": 1 87 | } 88 | ], 89 | "key-spacing": [ 90 | "error", 91 | { 92 | "mode": "minimum" 93 | } 94 | ], 95 | "keyword-spacing": "error", 96 | "multiline-ternary": [ 97 | "error", 98 | "always-multiline" 99 | ], 100 | "no-console": "off", 101 | "no-fallthrough": "error", 102 | "no-implicit-coercion": "error", 103 | "no-invalid-this": "error", 104 | "no-multi-spaces": [ 105 | "error", 106 | { 107 | "exceptions": { 108 | "Property": true, 109 | "TSTypeAnnotation": true 110 | }, 111 | "ignoreEOLComments": true 112 | } 113 | ], 114 | "no-tabs": "error", 115 | "no-trailing-spaces": "error", 116 | "no-unused-vars": "off", 117 | "no-useless-concat": "error", 118 | "object-curly-spacing": [ 119 | "error", 120 | "always" 121 | ], 122 | "operator-linebreak": [ 123 | "error", 124 | "before" 125 | ], 126 | "prefer-destructuring": "error", 127 | "prefer-template": "off", 128 | "quote-props": [ 129 | "error", 130 | "consistent-as-needed" 131 | ], 132 | "quotes": [ 133 | "error", 134 | "single" 135 | ], 136 | "semi": [ 137 | "error", 138 | "always" 139 | ], 140 | "semi-spacing": "error", 141 | "space-before-blocks": "error", 142 | "space-in-parens": "error", 143 | "space-infix-ops": "error", 144 | "template-curly-spacing": "error", 145 | "template-tag-spacing": "error" 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | **/dist 3 | **/*.test.js 4 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Gen Hames 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 | -------------------------------------------------------------------------------- /macro-acorn-walk/acorn-parse.js: -------------------------------------------------------------------------------- 1 | import * as acorn from 'acorn'; 2 | import { writeFileSync, readFileSync } from 'fs'; 3 | 4 | const bundle = readFileSync('./assets/bundle.js', 'utf-8'); 5 | const ast = acorn.parse(bundle, { 6 | ecmaVersion: 2020, 7 | sourceType: 'module', 8 | // Controls line/column but I only need start/end indices so no thanks 9 | // locations: true, 10 | }); 11 | writeFileSync('./assets/ast.json', JSON.stringify(ast, null, 2)); 12 | -------------------------------------------------------------------------------- /macro-acorn-walk/acorn-walk.js: -------------------------------------------------------------------------------- 1 | import * as acorn from 'acorn'; 2 | import * as walk from 'acorn-walk'; 3 | import { writeFileSync, readFileSync } from 'fs'; 4 | 5 | // From collecting all types in a Set() via walk.full(ast, node => ...) 6 | // 'BinaryExpression' 7 | // 'CallExpression' 8 | // 'ExpressionStatement' 9 | // 'Identifier' 10 | // 'ImportDeclaration' 11 | // 'ImportSpecifier' 12 | // 'Literal' 13 | // 'MemberExpression' 14 | // 'Program' 15 | // 'TaggedTemplateExpression' 16 | // 'TemplateElement' 17 | // 'TemplateLiteral' 18 | // 'VariableDeclaration' 19 | // 'VariableDeclarator' 20 | // Skip esbuild for now since it's not wired up yet 21 | const ast = JSON.parse(readFileSync('./assets/ast.json', 'utf-8')); 22 | 23 | // { "styletakeout.macro": { "decl": ["a1", "d"], "css": ["c", "c1"] }, ... } 24 | const macroSpecifiersToLocals = {}; 25 | // { "a1": { "source": "styletakeout.macro", "specifier": "decl" }, ... } 26 | const macroLocalsToSpecifiers = {}; 27 | 28 | walk.ancestor(ast, { 29 | ImportDeclaration(node) { 30 | const sourceName = node.source.value; 31 | if (!sourceName.endsWith('.macro')) { 32 | console.log(`SKIP Import ${node.start}->${node.end}`); 33 | return; 34 | } 35 | console.log(`Import ${node.start}->${node.end} { ${node.specifiers.map(n => `${n.imported.name} as ${n.local.name}`)} } from ${sourceName}`); 36 | node.specifiers.forEach(n => { 37 | const specImportMap = macroSpecifiersToLocals[sourceName] || (macroSpecifiersToLocals[sourceName] = {}); 38 | const specLocals = specImportMap[n.imported.name] || (specImportMap[n.imported.name] = []); 39 | if (!specLocals.includes(n.local.name)) { 40 | specLocals.push(n.local.name); 41 | macroLocalsToSpecifiers[n.local.name] = { 42 | source: sourceName, 43 | specifier: n.imported.name, 44 | }; 45 | } 46 | }); 47 | }, 48 | // XXX: This is different than `ast.filter(o => o.type === "Indentifier")` 49 | // because it _skips_ identifier nodes that are part of variable declarations, 50 | // import specifiers, and other areas that _define_ an identifier. This walk 51 | // callback is only for the _use_ of identifiers. It's also great because an 52 | // identifier in a member expression like "ok.decl.ok" matching _only_ the 53 | // first "ok" and not "decl" even though "decl" is { type: "Identifier" } too 54 | Identifier(node, state, ancestors) { 55 | const meta = macroLocalsToSpecifiers[node.name]; 56 | if (!meta) { 57 | console.log(`SKIP Identifier ${node.start}->${node.end} ${node.name}`); 58 | return; 59 | } 60 | console.log(`Indentifier ${node.start}->${node.end} ${node.name} from ${meta.source}:${meta.specifier}`); 61 | }, 62 | }); 63 | -------------------------------------------------------------------------------- /macro-acorn-walk/assets/ast.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "Program", 3 | "start": 0, 4 | "end": 1036, 5 | "body": [ 6 | { 7 | "type": "ImportDeclaration", 8 | "start": 62, 9 | "end": 139, 10 | "specifiers": [ 11 | { 12 | "type": "ImportSpecifier", 13 | "start": 69, 14 | "end": 78, 15 | "imported": { 16 | "type": "Identifier", 17 | "start": 69, 18 | "end": 73, 19 | "name": "decl" 20 | }, 21 | "local": { 22 | "type": "Identifier", 23 | "start": 77, 24 | "end": 78, 25 | "name": "l" 26 | } 27 | }, 28 | { 29 | "type": "ImportSpecifier", 30 | "start": 79, 31 | "end": 91, 32 | "imported": { 33 | "type": "Identifier", 34 | "start": 79, 35 | "end": 86, 36 | "name": "colours" 37 | }, 38 | "local": { 39 | "type": "Identifier", 40 | "start": 90, 41 | "end": 91, 42 | "name": "i" 43 | } 44 | }, 45 | { 46 | "type": "ImportSpecifier", 47 | "start": 92, 48 | "end": 100, 49 | "imported": { 50 | "type": "Identifier", 51 | "start": 92, 52 | "end": 95, 53 | "name": "css" 54 | }, 55 | "local": { 56 | "type": "Identifier", 57 | "start": 99, 58 | "end": 100, 59 | "name": "e" 60 | } 61 | }, 62 | { 63 | "type": "ImportSpecifier", 64 | "start": 101, 65 | "end": 113, 66 | "imported": { 67 | "type": "Identifier", 68 | "start": 101, 69 | "end": 108, 70 | "name": "classes" 71 | }, 72 | "local": { 73 | "type": "Identifier", 74 | "start": 112, 75 | "end": 113, 76 | "name": "a" 77 | } 78 | } 79 | ], 80 | "source": { 81 | "type": "Literal", 82 | "start": 118, 83 | "end": 138, 84 | "value": "styletakeout.macro", 85 | "raw": "\"styletakeout.macro\"" 86 | } 87 | }, 88 | { 89 | "type": "ImportDeclaration", 90 | "start": 189, 91 | "end": 251, 92 | "specifiers": [ 93 | { 94 | "type": "ImportSpecifier", 95 | "start": 196, 96 | "end": 205, 97 | "imported": { 98 | "type": "Identifier", 99 | "start": 196, 100 | "end": 200, 101 | "name": "decl" 102 | }, 103 | "local": { 104 | "type": "Identifier", 105 | "start": 204, 106 | "end": 205, 107 | "name": "s" 108 | } 109 | }, 110 | { 111 | "type": "ImportSpecifier", 112 | "start": 206, 113 | "end": 216, 114 | "imported": { 115 | "type": "Identifier", 116 | "start": 206, 117 | "end": 211, 118 | "name": "sizes" 119 | }, 120 | "local": { 121 | "type": "Identifier", 122 | "start": 215, 123 | "end": 216, 124 | "name": "r" 125 | } 126 | }, 127 | { 128 | "type": "ImportSpecifier", 129 | "start": 217, 130 | "end": 225, 131 | "imported": { 132 | "type": "Identifier", 133 | "start": 217, 134 | "end": 220, 135 | "name": "css" 136 | }, 137 | "local": { 138 | "type": "Identifier", 139 | "start": 224, 140 | "end": 225, 141 | "name": "c" 142 | } 143 | } 144 | ], 145 | "source": { 146 | "type": "Literal", 147 | "start": 230, 148 | "end": 250, 149 | "value": "styletakeout.macro", 150 | "raw": "\"styletakeout.macro\"" 151 | } 152 | }, 153 | { 154 | "type": "VariableDeclaration", 155 | "start": 252, 156 | "end": 302, 157 | "declarations": [ 158 | { 159 | "type": "VariableDeclarator", 160 | "start": 256, 161 | "end": 265, 162 | "id": { 163 | "type": "Identifier", 164 | "start": 256, 165 | "end": 257, 166 | "name": "p" 167 | }, 168 | "init": { 169 | "type": "MemberExpression", 170 | "start": 260, 171 | "end": 265, 172 | "object": { 173 | "type": "Identifier", 174 | "start": 260, 175 | "end": 261, 176 | "name": "r" 177 | }, 178 | "property": { 179 | "type": "Identifier", 180 | "start": 262, 181 | "end": 265, 182 | "name": "_04" 183 | }, 184 | "computed": false, 185 | "optional": false 186 | } 187 | }, 188 | { 189 | "type": "VariableDeclarator", 190 | "start": 267, 191 | "end": 301, 192 | "id": { 193 | "type": "Identifier", 194 | "start": 267, 195 | "end": 268, 196 | "name": "t" 197 | }, 198 | "init": { 199 | "type": "TaggedTemplateExpression", 200 | "start": 271, 201 | "end": 301, 202 | "tag": { 203 | "type": "Identifier", 204 | "start": 271, 205 | "end": 272, 206 | "name": "c" 207 | }, 208 | "quasi": { 209 | "type": "TemplateLiteral", 210 | "start": 272, 211 | "end": 301, 212 | "expressions": [ 213 | { 214 | "type": "MemberExpression", 215 | "start": 287, 216 | "end": 297, 217 | "object": { 218 | "type": "MemberExpression", 219 | "start": 287, 220 | "end": 293, 221 | "object": { 222 | "type": "Identifier", 223 | "start": 287, 224 | "end": 288, 225 | "name": "s" 226 | }, 227 | "property": { 228 | "type": "Identifier", 229 | "start": 289, 230 | "end": 293, 231 | "name": "size" 232 | }, 233 | "computed": false, 234 | "optional": false 235 | }, 236 | "property": { 237 | "type": "Identifier", 238 | "start": 294, 239 | "end": 297, 240 | "name": "_05" 241 | }, 242 | "computed": false, 243 | "optional": false 244 | } 245 | ], 246 | "quasis": [ 247 | { 248 | "type": "TemplateElement", 249 | "start": 273, 250 | "end": 285, 251 | "value": { 252 | "raw": "\n padding: ", 253 | "cooked": "\n padding: " 254 | }, 255 | "tail": false 256 | }, 257 | { 258 | "type": "TemplateElement", 259 | "start": 298, 260 | "end": 300, 261 | "value": { 262 | "raw": ";\n", 263 | "cooked": ";\n" 264 | }, 265 | "tail": true 266 | } 267 | ] 268 | } 269 | } 270 | } 271 | ], 272 | "kind": "var" 273 | }, 274 | { 275 | "type": "VariableDeclaration", 276 | "start": 343, 277 | "end": 516, 278 | "declarations": [ 279 | { 280 | "type": "VariableDeclarator", 281 | "start": 347, 282 | "end": 362, 283 | "id": { 284 | "type": "Identifier", 285 | "start": 347, 286 | "end": 348, 287 | "name": "u" 288 | }, 289 | "init": { 290 | "type": "MemberExpression", 291 | "start": 351, 292 | "end": 362, 293 | "object": { 294 | "type": "MemberExpression", 295 | "start": 351, 296 | "end": 357, 297 | "object": { 298 | "type": "Identifier", 299 | "start": 351, 300 | "end": 352, 301 | "name": "i" 302 | }, 303 | "property": { 304 | "type": "Identifier", 305 | "start": 353, 306 | "end": 357, 307 | "name": "blue" 308 | }, 309 | "computed": false, 310 | "optional": false 311 | }, 312 | "property": { 313 | "type": "Identifier", 314 | "start": 358, 315 | "end": 362, 316 | "name": "_800" 317 | }, 318 | "computed": false, 319 | "optional": false 320 | } 321 | }, 322 | { 323 | "type": "VariableDeclarator", 324 | "start": 364, 325 | "end": 515, 326 | "id": { 327 | "type": "Identifier", 328 | "start": 364, 329 | "end": 365, 330 | "name": "o" 331 | }, 332 | "init": { 333 | "type": "TaggedTemplateExpression", 334 | "start": 368, 335 | "end": 515, 336 | "tag": { 337 | "type": "Identifier", 338 | "start": 368, 339 | "end": 369, 340 | "name": "e" 341 | }, 342 | "quasi": { 343 | "type": "TemplateLiteral", 344 | "start": 369, 345 | "end": 515, 346 | "expressions": [ 347 | { 348 | "type": "MemberExpression", 349 | "start": 410, 350 | "end": 421, 351 | "object": { 352 | "type": "MemberExpression", 353 | "start": 410, 354 | "end": 416, 355 | "object": { 356 | "type": "Identifier", 357 | "start": 410, 358 | "end": 411, 359 | "name": "i" 360 | }, 361 | "property": { 362 | "type": "Identifier", 363 | "start": 412, 364 | "end": 416, 365 | "name": "blue" 366 | }, 367 | "computed": false, 368 | "optional": false 369 | }, 370 | "property": { 371 | "type": "Identifier", 372 | "start": 417, 373 | "end": 421, 374 | "name": "_700" 375 | }, 376 | "computed": false, 377 | "optional": false 378 | }, 379 | { 380 | "type": "MemberExpression", 381 | "start": 440, 382 | "end": 450, 383 | "object": { 384 | "type": "MemberExpression", 385 | "start": 440, 386 | "end": 446, 387 | "object": { 388 | "type": "Identifier", 389 | "start": 440, 390 | "end": 441, 391 | "name": "l" 392 | }, 393 | "property": { 394 | "type": "Identifier", 395 | "start": 442, 396 | "end": 446, 397 | "name": "size" 398 | }, 399 | "computed": false, 400 | "optional": false 401 | }, 402 | "property": { 403 | "type": "Identifier", 404 | "start": 447, 405 | "end": 450, 406 | "name": "_05" 407 | }, 408 | "computed": false, 409 | "optional": false 410 | }, 411 | { 412 | "type": "MemberExpression", 413 | "start": 470, 414 | "end": 480, 415 | "object": { 416 | "type": "MemberExpression", 417 | "start": 470, 418 | "end": 476, 419 | "object": { 420 | "type": "Identifier", 421 | "start": 470, 422 | "end": 471, 423 | "name": "l" 424 | }, 425 | "property": { 426 | "type": "Identifier", 427 | "start": 472, 428 | "end": 476, 429 | "name": "size" 430 | }, 431 | "computed": false, 432 | "optional": false 433 | }, 434 | "property": { 435 | "type": "Identifier", 436 | "start": 477, 437 | "end": 480, 438 | "name": "_04" 439 | }, 440 | "computed": false, 441 | "optional": false 442 | }, 443 | { 444 | "type": "MemberExpression", 445 | "start": 501, 446 | "end": 511, 447 | "object": { 448 | "type": "MemberExpression", 449 | "start": 501, 450 | "end": 507, 451 | "object": { 452 | "type": "Identifier", 453 | "start": 501, 454 | "end": 502, 455 | "name": "l" 456 | }, 457 | "property": { 458 | "type": "Identifier", 459 | "start": 503, 460 | "end": 507, 461 | "name": "size" 462 | }, 463 | "computed": false, 464 | "optional": false 465 | }, 466 | "property": { 467 | "type": "Identifier", 468 | "start": 508, 469 | "end": 511, 470 | "name": "_03" 471 | }, 472 | "computed": false, 473 | "optional": false 474 | } 475 | ], 476 | "quasis": [ 477 | { 478 | "type": "TemplateElement", 479 | "start": 370, 480 | "end": 408, 481 | "value": { 482 | "raw": "\n padding: 15px;\n background-color: ", 483 | "cooked": "\n padding: 15px;\n background-color: " 484 | }, 485 | "tail": false 486 | }, 487 | { 488 | "type": "TemplateElement", 489 | "start": 422, 490 | "end": 438, 491 | "value": { 492 | "raw": ";\n margin-top: ", 493 | "cooked": ";\n margin-top: " 494 | }, 495 | "tail": false 496 | }, 497 | { 498 | "type": "TemplateElement", 499 | "start": 451, 500 | "end": 468, 501 | "value": { 502 | "raw": ";\n margin-left: ", 503 | "cooked": ";\n margin-left: " 504 | }, 505 | "tail": false 506 | }, 507 | { 508 | "type": "TemplateElement", 509 | "start": 481, 510 | "end": 499, 511 | "value": { 512 | "raw": ";\n margin-right: ", 513 | "cooked": ";\n margin-right: " 514 | }, 515 | "tail": false 516 | }, 517 | { 518 | "type": "TemplateElement", 519 | "start": 512, 520 | "end": 514, 521 | "value": { 522 | "raw": ";\n", 523 | "cooked": ";\n" 524 | }, 525 | "tail": true 526 | } 527 | ] 528 | } 529 | } 530 | } 531 | ], 532 | "kind": "var" 533 | }, 534 | { 535 | "type": "FunctionDeclaration", 536 | "start": 517, 537 | "end": 543, 538 | "id": { 539 | "type": "Identifier", 540 | "start": 526, 541 | "end": 527, 542 | "name": "d" 543 | }, 544 | "expression": false, 545 | "generator": false, 546 | "async": false, 547 | "params": [ 548 | { 549 | "type": "Identifier", 550 | "start": 528, 551 | "end": 529, 552 | "name": "n" 553 | } 554 | ], 555 | "body": { 556 | "type": "BlockStatement", 557 | "start": 530, 558 | "end": 543, 559 | "body": [ 560 | { 561 | "type": "ReturnStatement", 562 | "start": 531, 563 | "end": 542, 564 | "argument": { 565 | "type": "BinaryExpression", 566 | "start": 538, 567 | "end": 542, 568 | "left": { 569 | "type": "Identifier", 570 | "start": 538, 571 | "end": 539, 572 | "name": "n" 573 | }, 574 | "operator": "+", 575 | "right": { 576 | "type": "Literal", 577 | "start": 540, 578 | "end": 542, 579 | "value": 10, 580 | "raw": "10" 581 | } 582 | } 583 | } 584 | ] 585 | } 586 | }, 587 | { 588 | "type": "ExpressionStatement", 589 | "start": 544, 590 | "end": 563, 591 | "expression": { 592 | "type": "CallExpression", 593 | "start": 544, 594 | "end": 562, 595 | "callee": { 596 | "type": "MemberExpression", 597 | "start": 544, 598 | "end": 555, 599 | "object": { 600 | "type": "Identifier", 601 | "start": 544, 602 | "end": 551, 603 | "name": "console" 604 | }, 605 | "property": { 606 | "type": "Identifier", 607 | "start": 552, 608 | "end": 555, 609 | "name": "log" 610 | }, 611 | "computed": false, 612 | "optional": false 613 | }, 614 | "arguments": [ 615 | { 616 | "type": "CallExpression", 617 | "start": 556, 618 | "end": 561, 619 | "callee": { 620 | "type": "Identifier", 621 | "start": 556, 622 | "end": 557, 623 | "name": "d" 624 | }, 625 | "arguments": [ 626 | { 627 | "type": "Literal", 628 | "start": 558, 629 | "end": 560, 630 | "value": 10, 631 | "raw": "10" 632 | } 633 | ], 634 | "optional": false 635 | } 636 | ], 637 | "optional": false 638 | } 639 | }, 640 | { 641 | "type": "ExpressionStatement", 642 | "start": 564, 643 | "end": 579, 644 | "expression": { 645 | "type": "CallExpression", 646 | "start": 564, 647 | "end": 578, 648 | "callee": { 649 | "type": "MemberExpression", 650 | "start": 564, 651 | "end": 575, 652 | "object": { 653 | "type": "Identifier", 654 | "start": 564, 655 | "end": 571, 656 | "name": "console" 657 | }, 658 | "property": { 659 | "type": "Identifier", 660 | "start": 572, 661 | "end": 575, 662 | "name": "log" 663 | }, 664 | "computed": false, 665 | "optional": false 666 | }, 667 | "arguments": [ 668 | { 669 | "type": "Identifier", 670 | "start": 576, 671 | "end": 577, 672 | "name": "o" 673 | } 674 | ], 675 | "optional": false 676 | } 677 | }, 678 | { 679 | "type": "ExpressionStatement", 680 | "start": 580, 681 | "end": 610, 682 | "expression": { 683 | "type": "CallExpression", 684 | "start": 580, 685 | "end": 609, 686 | "callee": { 687 | "type": "MemberExpression", 688 | "start": 580, 689 | "end": 591, 690 | "object": { 691 | "type": "Identifier", 692 | "start": 580, 693 | "end": 587, 694 | "name": "console" 695 | }, 696 | "property": { 697 | "type": "Identifier", 698 | "start": 588, 699 | "end": 591, 700 | "name": "log" 701 | }, 702 | "computed": false, 703 | "optional": false 704 | }, 705 | "arguments": [ 706 | { 707 | "type": "MemberExpression", 708 | "start": 592, 709 | "end": 608, 710 | "object": { 711 | "type": "Identifier", 712 | "start": 592, 713 | "end": 593, 714 | "name": "l" 715 | }, 716 | "property": { 717 | "type": "Identifier", 718 | "start": 594, 719 | "end": 608, 720 | "name": "pageBackground" 721 | }, 722 | "computed": false, 723 | "optional": false 724 | } 725 | ], 726 | "optional": false 727 | } 728 | }, 729 | { 730 | "type": "ExpressionStatement", 731 | "start": 611, 732 | "end": 626, 733 | "expression": { 734 | "type": "CallExpression", 735 | "start": 611, 736 | "end": 625, 737 | "callee": { 738 | "type": "MemberExpression", 739 | "start": 611, 740 | "end": 622, 741 | "object": { 742 | "type": "Identifier", 743 | "start": 611, 744 | "end": 618, 745 | "name": "console" 746 | }, 747 | "property": { 748 | "type": "Identifier", 749 | "start": 619, 750 | "end": 622, 751 | "name": "log" 752 | }, 753 | "computed": false, 754 | "optional": false 755 | }, 756 | "arguments": [ 757 | { 758 | "type": "Identifier", 759 | "start": 623, 760 | "end": 624, 761 | "name": "t" 762 | } 763 | ], 764 | "optional": false 765 | } 766 | }, 767 | { 768 | "type": "VariableDeclaration", 769 | "start": 627, 770 | "end": 945, 771 | "declarations": [ 772 | { 773 | "type": "VariableDeclarator", 774 | "start": 631, 775 | "end": 705, 776 | "id": { 777 | "type": "Identifier", 778 | "start": 631, 779 | "end": 632, 780 | "name": "_" 781 | }, 782 | "init": { 783 | "type": "TemplateLiteral", 784 | "start": 635, 785 | "end": 705, 786 | "expressions": [ 787 | { 788 | "type": "TaggedTemplateExpression", 789 | "start": 644, 790 | "end": 669, 791 | "tag": { 792 | "type": "Identifier", 793 | "start": 644, 794 | "end": 645, 795 | "name": "e" 796 | }, 797 | "quasi": { 798 | "type": "TemplateLiteral", 799 | "start": 645, 800 | "end": 669, 801 | "expressions": [], 802 | "quasis": [ 803 | { 804 | "type": "TemplateElement", 805 | "start": 646, 806 | "end": 668, 807 | "value": { 808 | "raw": "vertical-align: middle", 809 | "cooked": "vertical-align: middle" 810 | }, 811 | "tail": true 812 | } 813 | ] 814 | } 815 | }, 816 | { 817 | "type": "Identifier", 818 | "start": 686, 819 | "end": 687, 820 | "name": "o" 821 | }, 822 | { 823 | "type": "MemberExpression", 824 | "start": 691, 825 | "end": 703, 826 | "object": { 827 | "type": "MemberExpression", 828 | "start": 691, 829 | "end": 697, 830 | "object": { 831 | "type": "Identifier", 832 | "start": 691, 833 | "end": 692, 834 | "name": "a" 835 | }, 836 | "property": { 837 | "type": "Identifier", 838 | "start": 693, 839 | "end": 697, 840 | "name": "text" 841 | }, 842 | "computed": false, 843 | "optional": false 844 | }, 845 | "property": { 846 | "type": "Identifier", 847 | "start": 698, 848 | "end": 703, 849 | "name": "_0_xs" 850 | }, 851 | "computed": false, 852 | "optional": false 853 | } 854 | ], 855 | "quasis": [ 856 | { 857 | "type": "TemplateElement", 858 | "start": 636, 859 | "end": 642, 860 | "value": { 861 | "raw": "m5 p5 ", 862 | "cooked": "m5 p5 " 863 | }, 864 | "tail": false 865 | }, 866 | { 867 | "type": "TemplateElement", 868 | "start": 670, 869 | "end": 684, 870 | "value": { 871 | "raw": " align-center ", 872 | "cooked": " align-center " 873 | }, 874 | "tail": false 875 | }, 876 | { 877 | "type": "TemplateElement", 878 | "start": 688, 879 | "end": 689, 880 | "value": { 881 | "raw": " ", 882 | "cooked": " " 883 | }, 884 | "tail": false 885 | }, 886 | { 887 | "type": "TemplateElement", 888 | "start": 704, 889 | "end": 704, 890 | "value": { 891 | "raw": "", 892 | "cooked": "" 893 | }, 894 | "tail": true 895 | } 896 | ] 897 | } 898 | }, 899 | { 900 | "type": "VariableDeclarator", 901 | "start": 707, 902 | "end": 760, 903 | "id": { 904 | "type": "Identifier", 905 | "start": 707, 906 | "end": 708, 907 | "name": "x" 908 | }, 909 | "init": { 910 | "type": "TemplateLiteral", 911 | "start": 711, 912 | "end": 760, 913 | "expressions": [ 914 | { 915 | "type": "TaggedTemplateExpression", 916 | "start": 720, 917 | "end": 745, 918 | "tag": { 919 | "type": "Identifier", 920 | "start": 720, 921 | "end": 721, 922 | "name": "e" 923 | }, 924 | "quasi": { 925 | "type": "TemplateLiteral", 926 | "start": 721, 927 | "end": 745, 928 | "expressions": [], 929 | "quasis": [ 930 | { 931 | "type": "TemplateElement", 932 | "start": 722, 933 | "end": 744, 934 | "value": { 935 | "raw": "vertical-align: middle", 936 | "cooked": "vertical-align: middle" 937 | }, 938 | "tail": true 939 | } 940 | ] 941 | } 942 | } 943 | ], 944 | "quasis": [ 945 | { 946 | "type": "TemplateElement", 947 | "start": 712, 948 | "end": 718, 949 | "value": { 950 | "raw": "m5 p5 ", 951 | "cooked": "m5 p5 " 952 | }, 953 | "tail": false 954 | }, 955 | { 956 | "type": "TemplateElement", 957 | "start": 746, 958 | "end": 759, 959 | "value": { 960 | "raw": " align-center", 961 | "cooked": " align-center" 962 | }, 963 | "tail": true 964 | } 965 | ] 966 | } 967 | }, 968 | { 969 | "type": "VariableDeclarator", 970 | "start": 762, 971 | "end": 825, 972 | "id": { 973 | "type": "Identifier", 974 | "start": 762, 975 | "end": 763, 976 | "name": "b" 977 | }, 978 | "init": { 979 | "type": "TemplateLiteral", 980 | "start": 766, 981 | "end": 825, 982 | "expressions": [ 983 | { 984 | "type": "Identifier", 985 | "start": 775, 986 | "end": 776, 987 | "name": "o" 988 | }, 989 | { 990 | "type": "TaggedTemplateExpression", 991 | "start": 780, 992 | "end": 805, 993 | "tag": { 994 | "type": "Identifier", 995 | "start": 780, 996 | "end": 781, 997 | "name": "e" 998 | }, 999 | "quasi": { 1000 | "type": "TemplateLiteral", 1001 | "start": 781, 1002 | "end": 805, 1003 | "expressions": [], 1004 | "quasis": [ 1005 | { 1006 | "type": "TemplateElement", 1007 | "start": 782, 1008 | "end": 804, 1009 | "value": { 1010 | "raw": "vertical-align: middle", 1011 | "cooked": "vertical-align: middle" 1012 | }, 1013 | "tail": true 1014 | } 1015 | ] 1016 | } 1017 | }, 1018 | { 1019 | "type": "Identifier", 1020 | "start": 822, 1021 | "end": 823, 1022 | "name": "o" 1023 | } 1024 | ], 1025 | "quasis": [ 1026 | { 1027 | "type": "TemplateElement", 1028 | "start": 767, 1029 | "end": 773, 1030 | "value": { 1031 | "raw": "m5 p5 ", 1032 | "cooked": "m5 p5 " 1033 | }, 1034 | "tail": false 1035 | }, 1036 | { 1037 | "type": "TemplateElement", 1038 | "start": 777, 1039 | "end": 778, 1040 | "value": { 1041 | "raw": " ", 1042 | "cooked": " " 1043 | }, 1044 | "tail": false 1045 | }, 1046 | { 1047 | "type": "TemplateElement", 1048 | "start": 806, 1049 | "end": 820, 1050 | "value": { 1051 | "raw": " align-center ", 1052 | "cooked": " align-center " 1053 | }, 1054 | "tail": false 1055 | }, 1056 | { 1057 | "type": "TemplateElement", 1058 | "start": 824, 1059 | "end": 824, 1060 | "value": { 1061 | "raw": "", 1062 | "cooked": "" 1063 | }, 1064 | "tail": true 1065 | } 1066 | ] 1067 | } 1068 | }, 1069 | { 1070 | "type": "VariableDeclarator", 1071 | "start": 827, 1072 | "end": 866, 1073 | "id": { 1074 | "type": "Identifier", 1075 | "start": 827, 1076 | "end": 828, 1077 | "name": "f" 1078 | }, 1079 | "init": { 1080 | "type": "TemplateLiteral", 1081 | "start": 831, 1082 | "end": 866, 1083 | "expressions": [ 1084 | { 1085 | "type": "Identifier", 1086 | "start": 834, 1087 | "end": 835, 1088 | "name": "o" 1089 | }, 1090 | { 1091 | "type": "TaggedTemplateExpression", 1092 | "start": 839, 1093 | "end": 864, 1094 | "tag": { 1095 | "type": "Identifier", 1096 | "start": 839, 1097 | "end": 840, 1098 | "name": "e" 1099 | }, 1100 | "quasi": { 1101 | "type": "TemplateLiteral", 1102 | "start": 840, 1103 | "end": 864, 1104 | "expressions": [], 1105 | "quasis": [ 1106 | { 1107 | "type": "TemplateElement", 1108 | "start": 841, 1109 | "end": 863, 1110 | "value": { 1111 | "raw": "vertical-align: middle", 1112 | "cooked": "vertical-align: middle" 1113 | }, 1114 | "tail": true 1115 | } 1116 | ] 1117 | } 1118 | } 1119 | ], 1120 | "quasis": [ 1121 | { 1122 | "type": "TemplateElement", 1123 | "start": 832, 1124 | "end": 832, 1125 | "value": { 1126 | "raw": "", 1127 | "cooked": "" 1128 | }, 1129 | "tail": false 1130 | }, 1131 | { 1132 | "type": "TemplateElement", 1133 | "start": 836, 1134 | "end": 837, 1135 | "value": { 1136 | "raw": " ", 1137 | "cooked": " " 1138 | }, 1139 | "tail": false 1140 | }, 1141 | { 1142 | "type": "TemplateElement", 1143 | "start": 865, 1144 | "end": 865, 1145 | "value": { 1146 | "raw": "", 1147 | "cooked": "" 1148 | }, 1149 | "tail": true 1150 | } 1151 | ] 1152 | } 1153 | }, 1154 | { 1155 | "type": "VariableDeclarator", 1156 | "start": 868, 1157 | "end": 902, 1158 | "id": { 1159 | "type": "Identifier", 1160 | "start": 868, 1161 | "end": 869, 1162 | "name": "h" 1163 | }, 1164 | "init": { 1165 | "type": "TemplateLiteral", 1166 | "start": 872, 1167 | "end": 902, 1168 | "expressions": [ 1169 | { 1170 | "type": "TaggedTemplateExpression", 1171 | "start": 875, 1172 | "end": 900, 1173 | "tag": { 1174 | "type": "Identifier", 1175 | "start": 875, 1176 | "end": 876, 1177 | "name": "e" 1178 | }, 1179 | "quasi": { 1180 | "type": "TemplateLiteral", 1181 | "start": 876, 1182 | "end": 900, 1183 | "expressions": [], 1184 | "quasis": [ 1185 | { 1186 | "type": "TemplateElement", 1187 | "start": 877, 1188 | "end": 899, 1189 | "value": { 1190 | "raw": "vertical-align: middle", 1191 | "cooked": "vertical-align: middle" 1192 | }, 1193 | "tail": true 1194 | } 1195 | ] 1196 | } 1197 | } 1198 | ], 1199 | "quasis": [ 1200 | { 1201 | "type": "TemplateElement", 1202 | "start": 873, 1203 | "end": 873, 1204 | "value": { 1205 | "raw": "", 1206 | "cooked": "" 1207 | }, 1208 | "tail": false 1209 | }, 1210 | { 1211 | "type": "TemplateElement", 1212 | "start": 901, 1213 | "end": 901, 1214 | "value": { 1215 | "raw": "", 1216 | "cooked": "" 1217 | }, 1218 | "tail": true 1219 | } 1220 | ] 1221 | } 1222 | }, 1223 | { 1224 | "type": "VariableDeclarator", 1225 | "start": 904, 1226 | "end": 944, 1227 | "id": { 1228 | "type": "Identifier", 1229 | "start": 904, 1230 | "end": 905, 1231 | "name": "y" 1232 | }, 1233 | "init": { 1234 | "type": "TemplateLiteral", 1235 | "start": 908, 1236 | "end": 944, 1237 | "expressions": [ 1238 | { 1239 | "type": "TaggedTemplateExpression", 1240 | "start": 911, 1241 | "end": 936, 1242 | "tag": { 1243 | "type": "Identifier", 1244 | "start": 911, 1245 | "end": 912, 1246 | "name": "e" 1247 | }, 1248 | "quasi": { 1249 | "type": "TemplateLiteral", 1250 | "start": 912, 1251 | "end": 936, 1252 | "expressions": [], 1253 | "quasis": [ 1254 | { 1255 | "type": "TemplateElement", 1256 | "start": 913, 1257 | "end": 935, 1258 | "value": { 1259 | "raw": "vertical-align: middle", 1260 | "cooked": "vertical-align: middle" 1261 | }, 1262 | "tail": true 1263 | } 1264 | ] 1265 | } 1266 | } 1267 | ], 1268 | "quasis": [ 1269 | { 1270 | "type": "TemplateElement", 1271 | "start": 909, 1272 | "end": 909, 1273 | "value": { 1274 | "raw": "", 1275 | "cooked": "" 1276 | }, 1277 | "tail": false 1278 | }, 1279 | { 1280 | "type": "TemplateElement", 1281 | "start": 937, 1282 | "end": 943, 1283 | "value": { 1284 | "raw": " hello", 1285 | "cooked": " hello" 1286 | }, 1287 | "tail": true 1288 | } 1289 | ] 1290 | } 1291 | } 1292 | ], 1293 | "kind": "var" 1294 | }, 1295 | { 1296 | "type": "ExpressionStatement", 1297 | "start": 1004, 1298 | "end": 1024, 1299 | "expression": { 1300 | "type": "MemberExpression", 1301 | "start": 1004, 1302 | "end": 1023, 1303 | "object": { 1304 | "type": "MemberExpression", 1305 | "start": 1004, 1306 | "end": 1020, 1307 | "object": { 1308 | "type": "MemberExpression", 1309 | "start": 1004, 1310 | "end": 1018, 1311 | "object": { 1312 | "type": "MemberExpression", 1313 | "start": 1004, 1314 | "end": 1010, 1315 | "object": { 1316 | "type": "Identifier", 1317 | "start": 1004, 1318 | "end": 1008, 1319 | "name": "decl" 1320 | }, 1321 | "property": { 1322 | "type": "Identifier", 1323 | "start": 1009, 1324 | "end": 1010, 1325 | "name": "l" 1326 | }, 1327 | "computed": false, 1328 | "optional": false 1329 | }, 1330 | "property": { 1331 | "type": "Identifier", 1332 | "start": 1011, 1333 | "end": 1018, 1334 | "name": "colours" 1335 | }, 1336 | "computed": false, 1337 | "optional": false 1338 | }, 1339 | "property": { 1340 | "type": "Identifier", 1341 | "start": 1019, 1342 | "end": 1020, 1343 | "name": "i" 1344 | }, 1345 | "computed": false, 1346 | "optional": false 1347 | }, 1348 | "property": { 1349 | "type": "Identifier", 1350 | "start": 1021, 1351 | "end": 1023, 1352 | "name": "ok" 1353 | }, 1354 | "computed": false, 1355 | "optional": false 1356 | } 1357 | }, 1358 | { 1359 | "type": "ExpressionStatement", 1360 | "start": 1025, 1361 | "end": 1035, 1362 | "expression": { 1363 | "type": "MemberExpression", 1364 | "start": 1025, 1365 | "end": 1034, 1366 | "object": { 1367 | "type": "MemberExpression", 1368 | "start": 1025, 1369 | "end": 1031, 1370 | "object": { 1371 | "type": "Identifier", 1372 | "start": 1025, 1373 | "end": 1029, 1374 | "name": "decl" 1375 | }, 1376 | "property": { 1377 | "type": "Identifier", 1378 | "start": 1030, 1379 | "end": 1031, 1380 | "name": "s" 1381 | }, 1382 | "computed": false, 1383 | "optional": false 1384 | }, 1385 | "property": { 1386 | "type": "Identifier", 1387 | "start": 1032, 1388 | "end": 1034, 1389 | "name": "ok" 1390 | }, 1391 | "computed": false, 1392 | "optional": false 1393 | } 1394 | } 1395 | ], 1396 | "sourceType": "module" 1397 | } -------------------------------------------------------------------------------- /macro-acorn-walk/assets/bundle.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | // macros/styletakeout.macro/example.ts 4 | import{decl as l,colours as i,css as e,classes as a}from"styletakeout.macro"; 5 | // macros/styletakeout.macro/example-imported.ts 6 | import{decl as s,sizes as r,css as c}from"styletakeout.macro"; 7 | var p = r._04, 8 | t = c` 9 | padding: ${s.size._05}; 10 | `; 11 | // macros/styletakeout.macro/example.ts 12 | var u = i.blue._800, 13 | o = e` 14 | padding: 15px; 15 | background-color: ${i.blue._700}; 16 | margin-top: ${l.size._05}; 17 | margin-left: ${l.size._04}; 18 | margin-right: ${l.size._03}; 19 | `; 20 | function d(n){return n+10} 21 | console.log(d(10)); 22 | console.log(o); 23 | console.log(l.pageBackground); 24 | console.log(t); 25 | var _ = `m5 p5 ${e`vertical-align: middle`} align-center ${o} ${a.text._0_xs}`, 26 | x = `m5 p5 ${e`vertical-align: middle`} align-center`, 27 | b = `m5 p5 ${o} ${e`vertical-align: middle`} align-center ${o}`, 28 | f = `${o} ${e`vertical-align: middle`}`, 29 | h = `${e`vertical-align: middle`}`, 30 | y = `${e`vertical-align: middle`} hello`; 31 | // Does acorn-walk skip similarly named identifiers? YES! 32 | decl.l.colours.i.ok; 33 | decl.s.ok; 34 | -------------------------------------------------------------------------------- /macro-acorn-walk/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-unused-vars */ 2 | import esbuild from 'esbuild'; 3 | import fs from 'fs'; 4 | import path from 'path'; 5 | import { fileURLToPath } from 'url'; 6 | 7 | import { replaceMacros } from './packages/acorn-macros/index.js'; 8 | import { 9 | styletakeoutMacro, 10 | // Alias so VSCode does syntax highlighting 11 | cssImpl as css, 12 | injectGlobalImpl as injectGlobal 13 | } from './packages/styletakeout.macro/implementation/index.js'; 14 | 15 | const __dirname = path.dirname(fileURLToPath(import.meta.url)); 16 | 17 | injectGlobal` 18 | body { 19 | background-color: fuchsia; 20 | } 21 | `; 22 | 23 | async function build() { 24 | const buildResult = await esbuild.build({ 25 | entryPoints: [ 26 | path.join(__dirname, '../macros/styletakeout.macro/example.ts'), 27 | ], 28 | // Pass to buildResult instead 29 | write: false, 30 | format: 'esm', 31 | // XXX: Since I'm steering this into a generic acorn project not tied to 32 | // esbuild, I shouldn't provide this plugin built in. They can write it. 33 | plugins: [ 34 | { 35 | name: 'skip-macros', 36 | setup(build) { 37 | build.onLoad({ filter: /.+\.macro$/ }, args => { 38 | console.log('Skip as external:', args.path); 39 | return { path: args.path, external: true }; 40 | }); 41 | }, 42 | }, 43 | ], 44 | external: [ 45 | 'styletakeout.macro', // Node v16.1.0 doesn't like plugins above? 46 | ], 47 | bundle: true, 48 | minify: true, 49 | }); 50 | const [result] = buildResult.outputFiles; 51 | const bundleA = (new TextDecoder()).decode(result.contents); 52 | // XXX: It makes sense for replaceMacros() to handle template string 53 | // simplification for _all_ macros instead of doing it in only styletakeout 54 | const bundleB = replaceMacros(bundleA, [ 55 | styletakeoutMacro({ 56 | // XXX: This is CODE so use '"..."' to return strings and '...' for others 57 | importObjects: { 58 | value: '2021', 59 | decl: { 60 | pageBackground: '"pageBackground"', 61 | textBackground: '"textBackground"', 62 | textColour: '"textColour"', 63 | }, 64 | colours: { 65 | black: '"#000"', 66 | }, 67 | classes: { 68 | center: css`text-align: center;`, 69 | text: { 70 | _0_xs: css`font-size: 0.75rem;`, 71 | _1_sm: css`font-size: 0.875rem;`, 72 | }, 73 | }, 74 | sizes: { 75 | _03: '"30px"', 76 | _04: '"40px"', 77 | _05: '"50px"', 78 | }, 79 | }, 80 | outputFile: './dist/out.css', 81 | verbose: true, 82 | beautify: true, 83 | }), 84 | // sqlInjectionMacro({ ... }), 85 | // msMacro({ ... }), 86 | ]); 87 | fs.writeFileSync(path.join(__dirname, './dist/out-original.js'), bundleA); 88 | fs.writeFileSync(path.join(__dirname, './dist/out-replaced-macros.js'), bundleB); 89 | } 90 | build(); 91 | -------------------------------------------------------------------------------- /macro-acorn-walk/packages/acorn-macros/index.js: -------------------------------------------------------------------------------- 1 | import * as acorn from 'acorn'; 2 | import * as walk from 'acorn-walk'; 3 | 4 | /** 5 | @typedef {{ 6 | importSource: string 7 | importSpecifierImpls: MacroImpls 8 | importSpecifierRangeFn: MacroRangeFn 9 | hookPre?: (originalCode: string) => void, 10 | hookPost?: (replacedCode: string) => void, 11 | }} Macro */ 12 | /** @typedef {{ [name: string]: any }} MacroImpls */ 13 | /** @typedef {(specifier:string, ancestors:acorn.Node[]) => IntervalRange} MacroRangeFn */ 14 | 15 | /** @typedef {{ start: number, end: number }} IntervalRange */ 16 | /** @typedef {IntervalRange & { macroLocal: string }} OpenMacroRange */ 17 | /** @typedef {IntervalRange & { replacement: string }} ClosedMacroRange */ 18 | 19 | // This is updated every replacement before the eval so macros can access this 20 | // metadata through this object. I don't provide sourcemapped line/col/filename 21 | // info that's lost during esbuild since it's expensive to recover 22 | /** @type {typeof evalMetadataReset} */ 23 | // @ts-ignore 24 | const evalMeta = {}; 25 | // Can be used by macro implementations during their call in eval() 26 | const evalMetadataReset = { 27 | snipRaw: '', 28 | snipRawStart: 0, 29 | snipRawEnd: 0, 30 | snipEval: '', 31 | macroSource: '', 32 | macroSpecifier: '', 33 | }; 34 | 35 | /** @param {string} code; @param {Macro[]} macros; @param {acorn.Node} [ast] */ 36 | const replaceMacros = (code, macros, ast) => { 37 | /** @type {{ [importSource: string]: number }} */ 38 | const macroIndices = {}; 39 | /** @type {{ [importSource: string]: MacroRangeFn }} */ 40 | const macroToSpecifierRangeFns = {}; 41 | /** @type {MacroImpls} */ 42 | const macroToSpecifierImpls = {}; 43 | const macroHooksPre = []; 44 | const macroHooksPost = []; 45 | macros.forEach((macro, i) => { 46 | const name = macro.importSource; 47 | if (macroIndices[name]) { 48 | throw new Error(`Duplicate macro "${name}" at indices ${macroIndices[name]} and ${i}`); 49 | } 50 | macroIndices[name] = i; 51 | macroToSpecifierRangeFns[name] = macro.importSpecifierRangeFn; 52 | macroToSpecifierImpls[name] = macro.importSpecifierImpls; 53 | if (macro.hookPre) macroHooksPre.push(macro.hookPre); 54 | if (macro.hookPost) macroHooksPost.push(macro.hookPost); 55 | }); 56 | /** @type {{ [macro: string]: { [spec: string]: string[] } }} string[] is of local variable names */ 57 | const macroSpecifierToLocals = {}; 58 | /** @type {{ [local: string]: { source: string, specifier: string } }} source is the macro name */ 59 | const macroLocalToSpecifiers = {}; 60 | 61 | // Identifier ranges that could have macros in them. We've started parsing 62 | // their range (given by rangeFromAST) but haven't reached their end yet. 63 | /** @type {OpenMacroRange[]} */ 64 | const openMacroRangeStack = []; 65 | // Identifiers that have been fully processed and eval'd. We've parsed past 66 | // their range end and these are ready to be sliced directly into the code. 67 | /** @type {ClosedMacroRange[]} */ 68 | const closedMacroRangeList = []; 69 | 70 | /** @type {(range: ClosedMacroRange) => void} */ 71 | const insertClosed = (range) => 72 | intervalRangeListInsert(closedMacroRangeList, range); 73 | 74 | /** @type {(start: number, end: number) => ClosedMacroRange[]} */ 75 | const spliceClosed = (start, end) => 76 | // @ts-ignore JSDoc doesn't do ... 77 | intervalRangeListSplice(closedMacroRangeList, start, end); 78 | 79 | // This doesn't have to be a start AST node like node.type === "Program". It 80 | // can be anything. That's useful to someone somewhere. 81 | if (!ast) { 82 | ast = acorn.parse(code, { ecmaVersion: 'latest', sourceType: 'module' }); 83 | } 84 | 85 | // Call macro.hookPre with original code 86 | macroHooksPre.forEach(hook => hook(code)); 87 | 88 | // Import statements must come first as per ECMAScript specification but this 89 | // isn't enforced by Acorn, so throw if an import is after an identifier. 90 | let seenIndentifier = false; 91 | // TODO: Add types https://github.com/acornjs/acorn/issues/946 92 | /** @typedef {{ name: string }} Named */ 93 | /** @typedef {acorn.Node & { name: string }} IdentifierNode */ 94 | /** @typedef {acorn.Node & { source: { value: string }, specifiers: SpecifierNode[] }} ImportNode */ 95 | /** @typedef {acorn.Node & { local: Named, imported: Named }} SpecifierNode */ 96 | walk.ancestor(ast, { 97 | /** @param {ImportNode} node */ 98 | ImportDeclaration(node) { 99 | if (seenIndentifier) { 100 | throw new Error('Import statement found after an identifier'); 101 | } 102 | const sourceName = node.source.value; 103 | console.log(`Found import statement ${node.start}->${node.end} ${sourceName}`); 104 | if (!sourceName.endsWith('.macro') || !(sourceName in macroIndices)) return; 105 | node.specifiers.forEach(n => { 106 | const specImportMap = macroSpecifierToLocals[sourceName] || (macroSpecifierToLocals[sourceName] = {}); 107 | const specLocals = specImportMap[n.imported.name] || (specImportMap[n.imported.name] = []); 108 | if (specLocals.includes(n.local.name)) return; 109 | specLocals.push(n.local.name); 110 | macroLocalToSpecifiers[n.local.name] = { 111 | source: sourceName, 112 | specifier: n.imported.name, 113 | }; 114 | }); 115 | insertClosed({ start: node.start, end: node.end, replacement: '' }); 116 | }, 117 | /** @param {IdentifierNode} node */ 118 | Identifier(node, state, ancestors) { 119 | seenIndentifier = true; 120 | console.log('Identifier', node.name); 121 | const meta = macroLocalToSpecifiers[node.name]; 122 | if (!meta) return; 123 | // Move items from open -> closed _BEFORE_ adding to the open stack 124 | closeOpenIdsUpTo(node.start); 125 | console.log('Identifier matches', meta.source, meta.specifier); 126 | ancestors.forEach((n, i) => { 127 | console.log(` - ${' '.repeat(i)}${n.type} ${p(n)}`); 128 | }); 129 | const resolver = macroToSpecifierRangeFns[meta.source]; 130 | const { start, end } = resolver(meta.specifier, ancestors); 131 | openMacroRangeStack.push({ start, end, macroLocal: node.name }); 132 | }, 133 | }); 134 | // There might be elements on the open stack still so clear them 135 | closeOpenIdsUpTo(ast.end); 136 | 137 | /** @param {number} sourcecodeIndex */ 138 | function closeOpenIdsUpTo(sourcecodeIndex) { 139 | // Walk through the stack backwards 140 | for (let i = openMacroRangeStack.length - 1; i >= 0; i--) { 141 | const open = openMacroRangeStack[i]; 142 | if (open.end > sourcecodeIndex) return; 143 | openMacroRangeStack.pop(); 144 | closeOpenId(open); 145 | } 146 | } 147 | 148 | /** @param {OpenMacroRange} open */ 149 | function closeOpenId(open) { 150 | const { start, end, macroLocal } = open; 151 | console.log(`Closing open macro range: ${p(open)}`); 152 | let evalSnip = code.slice(start, end); 153 | evalMeta.snipRaw = evalSnip; 154 | evalMeta.snipRawStart = start; 155 | evalMeta.snipRawEnd = end; 156 | // Work backwards to not mess up indices 157 | for (const range of spliceClosed(start, end)) { 158 | evalSnip 159 | = evalSnip.slice(0, range.start - start) 160 | + range.replacement 161 | + evalSnip.slice(range.end - start); 162 | } 163 | const { source, specifier } = macroLocalToSpecifiers[macroLocal]; 164 | evalMeta.snipEval = evalSnip; 165 | evalMeta.macroSource = source; 166 | evalMeta.macroSpecifier = specifier; 167 | evalMeta.macroSpecifierLocal = macroLocal; 168 | console.log('Macro eval:', evalMeta); 169 | let evalResult; 170 | // For nicer error messages; only used in eval string below 171 | let macro = macroToSpecifierImpls; 172 | evalSnip = `const ${macroLocal} = macro["${source}"]["${specifier}"]; ${evalSnip}`; 173 | try { 174 | // Running in a new closure so `macroLocal` doesn't conflict with us 175 | { evalResult = eval(evalSnip); } 176 | } catch (err) { 177 | throw new Error(`Macro eval for:\n${evalSnip}\n${err}`); 178 | } 179 | console.log('Macro eval result:', evalResult); 180 | if (typeof evalResult !== 'string') { 181 | throw new Error(`Macro eval returned ${typeof evalResult} instead of a string`); 182 | } 183 | Object.assign(evalMeta, evalMetadataReset); 184 | insertClosed({ start, end, replacement: evalResult }); 185 | } 186 | console.log('macroSpecifierToLocals', macroSpecifierToLocals); 187 | console.log('macroLocalToSpecifiers', macroLocalToSpecifiers); 188 | console.log('openMacroRangeStack', openMacroRangeStack); 189 | console.log('closedMacroRangeList', closedMacroRangeList); 190 | 191 | // Work backwards to not mess up indices 192 | for (const range of closedMacroRangeList.reverse()) { 193 | code 194 | = code.slice(0, range.start) 195 | + range.replacement 196 | + code.slice(range.end); 197 | } 198 | // Call macro.hookPost with macro-replaced code 199 | macroHooksPost.forEach(hook => hook(code)); 200 | return code; 201 | }; 202 | 203 | /** @param {{ start: number, end: number }} x */ 204 | const p = (x) => `[${x.start},${x.end})`; 205 | 206 | /** @param {IntervalRange[]} list; @param {IntervalRange} range */ 207 | function intervalRangeListInsert(list, range) { 208 | if (range.start > range.end) { 209 | throw new Error('Given range start > end'); 210 | } 211 | for (let i = list.length - 1; i >= 0; i--) { 212 | const cursor = list[i]; 213 | // Entirely before cur 214 | if (range.end <= cursor.start) { 215 | console.log(`${p(range)} <= ${p(cursor)}; next`); 216 | continue; 217 | } 218 | // Entirely after cur 219 | if (range.start >= cursor.end) { 220 | console.log(`${p(range)} >= ${p(cursor)}; inserting`); 221 | list.splice(i + 1, 0, range); 222 | return; 223 | } 224 | // Overlapping before (ib) or after (ia) cur 225 | throw new Error(`Overlap of ${p(range)} with ${p(cursor)}`); 226 | } 227 | list.unshift(range); 228 | } 229 | 230 | /** @param {IntervalRange[]} list; @param {number} start; @param {number} end */ 231 | function intervalRangeListSplice(list, start, end) { 232 | if (start > end) { 233 | throw new Error('Given range start > end'); 234 | } 235 | const removeIndices = []; 236 | for (let i = list.length - 1; i >= 0; i--) { 237 | const cursor = list[i]; 238 | // OK 239 | if (cursor.start >= start && cursor.end <= end) { 240 | removeIndices.push(i); 241 | continue; 242 | } 243 | // Entirely before 244 | if (cursor.end <= start) break; 245 | // Entirely after. We're passed the range. Exit. 246 | if (cursor.start >= end) continue; 247 | throw new Error(`Splice partially cuts ${p(cursor)}`); 248 | } 249 | // The indices are valid so it's safe to use [0] 250 | // This array is backwards since the for-loop is backwards 251 | const matches = removeIndices.map(ri => list.splice(ri, 1)[0]); 252 | return matches; 253 | } 254 | 255 | export { replaceMacros, evalMeta }; 256 | -------------------------------------------------------------------------------- /macro-acorn-walk/packages/acorn-macros/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "checkJs": true, 4 | "module": "es2020", 5 | "moduleResolution": "node" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /macro-acorn-walk/packages/styletakeout.macro/implementation/index.js: -------------------------------------------------------------------------------- 1 | // This is the AST processing code used in replaceMacro(). It's looking for tag 2 | // template expressions and objects member expressions. If you're a macro author 3 | // you might want to support other types too, such as unary expressions, 4 | // function calls, etc. 5 | 6 | import fs from 'fs'; 7 | import path from 'path'; 8 | import { fileURLToPath } from 'url'; 9 | import { evalMeta } from '../../acorn-macros/index.js'; 10 | 11 | const __dirname = path.dirname(fileURLToPath(import.meta.url)); 12 | 13 | // TODO: Implement caching via hashing and naming and etc etc like styletakeout 14 | // does in its Babel-version. 15 | 16 | // Side effect: Start a stylesheet immediately 17 | let sheet = ''; 18 | 19 | function interpolateTemplateString(quasis, expressions) { 20 | let string = ''; 21 | for (let i = 0; i < expressions.length; i++) { 22 | string += quasis[i] + expressions[i]; 23 | } 24 | string += quasis[quasis.length - 1]; 25 | return string.replace(/\n?\s*/g, ''); 26 | } 27 | 28 | function cssImpl(statics, ...templateVariables) { 29 | const string = interpolateTemplateString(statics, templateVariables); 30 | sheet += `css: ${string}\n`; 31 | console.log('cssImpl', string); 32 | // Location might not be provided if called outside of replaceMacros() 33 | const location = `[${evalMeta.snipRawStart ?? '?'},${evalMeta.snipRawEnd ?? '?'})`; 34 | // Put back a string. Also! Consider str.replaceAll('"', '\\"') as needed 35 | return `"css-${location}"`; 36 | } 37 | 38 | function injectGlobalImpl(statics, ...templateVariables) { 39 | const string = interpolateTemplateString(statics, templateVariables); 40 | sheet += `injectGlobal: ${string}\n`; 41 | console.log('injectGlobalImpl', string); 42 | // Put literally nothing back 43 | return ''; 44 | } 45 | 46 | /** @typedef {import('../../acorn-macros/index').Macro} Macro */ 47 | 48 | /** @type {(options: {}) => Macro} */ 49 | const styletakeoutMacro = (options) => { 50 | const importObjects = options.importObjects ?? {}; 51 | /** @type {Macro} */ 52 | return { 53 | importSource: 'styletakeout.macro', 54 | importSpecifierImpls: { 55 | css: cssImpl, 56 | injectGlobal: injectGlobalImpl, 57 | ...importObjects, 58 | }, 59 | importSpecifierRangeFn: (importSpecifier, identifierAncestors) => { 60 | const [node, nodeParent, ...nodeRest] = [...identifierAncestors].reverse(); 61 | if ('css' === importSpecifier || 'injectGlobal' === importSpecifier) { 62 | if (nodeParent.type !== 'TaggedTemplateExpression') { 63 | throw new Error('Macros css and injectGlobal must be called as tag template functions'); 64 | } 65 | return { start: nodeParent.start, end: nodeParent.end }; 66 | } 67 | if (importSpecifier in importObjects) { 68 | if (nodeParent.type !== 'MemberExpression') { 69 | throw new Error(`Import object ${importSpecifier} must accessed as an object: ${node.name}.x.y.z`); 70 | } 71 | let top = nodeParent; 72 | for (const node of nodeRest) if (node.type === 'MemberExpression') top = node; 73 | return { start: top.start, end: top.end }; 74 | } 75 | throw new Error(`Unknown import "${importSpecifier}" for styletakeout.macro`); 76 | }, 77 | hookPost() { 78 | const outPath = path.join(__dirname, '../../../', options.outputFile); 79 | console.log(`CSS written to ${outPath}`); 80 | fs.writeFileSync(outPath, sheet); 81 | }, 82 | }; 83 | }; 84 | 85 | export { styletakeoutMacro, cssImpl, injectGlobalImpl }; 86 | -------------------------------------------------------------------------------- /macro-acorn-walk/packages/styletakeout.macro/index.d.ts: -------------------------------------------------------------------------------- 1 | // This is what is imported into source code. It's a stub. The actual imports 2 | // are handled in the macro implementation under ./implementation/index.js 3 | 4 | /** Takeout css`` statement is replaced with a string of a unique classname */ 5 | export declare function css(statics: TemplateStringsArray, ...variables: string[]): string; 6 | /** Takeout injectGlobal`` statement is removed entirely */ 7 | export declare function injectGlobal(statics: TemplateStringsArray, ...variables: string[]): void; 8 | 9 | // Use `declare module 'styletakeout.macro' { const x: { ... } }` to define type 10 | // support for imports set in styletakeoutMacro's `importEvals` option. 11 | -------------------------------------------------------------------------------- /macro-esbuild-plugin/index.ts: -------------------------------------------------------------------------------- 1 | // Ironically esbuild doesn't support native ESM? 2 | // There has to be a better way to do this... 3 | import { createRequire } from 'module'; 4 | const require = createRequire(import.meta.url); 5 | // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-var-requires 6 | const { build } = require('esbuild'); 7 | 8 | import { BuildOptions, BuildResult } from 'esbuild'; 9 | 10 | import { 11 | macroPlugin, 12 | macroSnippets, 13 | macroSnippetsLookup 14 | } from './macroPlugin.js'; 15 | 16 | // import styletakeoutMacro from 'esbuild-macros/styletakeout.macro'; 17 | // import prevalMacro from 'esbuild-macros/preval.macro'; 18 | // import stripIndentMacro from 'esbuild-macros/stripIndent.macro'; 19 | // import msMacro from 'esbuild-macros/ms.macro'; 20 | // import sqlMacro from 'esbuild-macros/sql.macro'; 21 | // import jsonMacro from 'esbuild-macros/json.macro'; 22 | // import yamlMacro from 'esbuild-macros/yaml.macro'; 23 | 24 | (build as (options: BuildOptions) => Promise)({ 25 | // TODO: Process.argv 26 | entryPoints: ['../macros/styletakeout.macro/example.ts'], 27 | outfile: 'dist/styletakeout-example.js', 28 | bundle: true, 29 | format: 'esm', 30 | plugins: [ 31 | macroPlugin, 32 | ], 33 | // macros: { 34 | // 'styletakeout.macro': styletakeoutMacro({ 35 | // importFile: './example/styletakeout.macro.ts', 36 | // outputFile: './dist/takeout.css', 37 | // verbose: true, 38 | // beautify: true, 39 | // }), 40 | // 'preval.macro': prevalMacro({ 41 | // verbose: true, 42 | // }), 43 | // 'stripIndent.macro': stripIndentMacro(), 44 | // 'ms.macro': msMacro(), 45 | // 'sql.macro': sqlMacro(), 46 | // // I know esbuild has loaders for this, but not for subsets of JSON such 47 | // // as calling via `json('../huge.json', o => o.path.slice(0, 100);` 48 | // 'json.macro': jsonMacro({ 49 | // verbose: true, 50 | // }), 51 | // 'yaml.macro': yamlMacro(), 52 | // }, 53 | jsxFactory: 'h', 54 | jsxFragment: 'h', 55 | }) 56 | .then(() => { 57 | console.log(macroSnippets); 58 | console.log(macroSnippetsLookup); 59 | }) 60 | .catch(() => process.exit(1)); 61 | -------------------------------------------------------------------------------- /macro-esbuild-plugin/macroPlugin.ts: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | import type { Plugin } from 'esbuild'; 3 | 4 | type MacroSnippet = { 5 | macroPackage: string 6 | macroImport: string 7 | snipID: string 8 | snipContent: string 9 | filepath: string 10 | // TODO: Convert to a line and column by repeated `indexOf('\n', lastIndex)` 11 | offset: number 12 | } 13 | 14 | type MacroSnippetLookupTable = { 15 | [macroPackage in string]?: { 16 | [macroImport in string]?: MacroSnippet[] 17 | } 18 | } 19 | 20 | const snippets: MacroSnippet[] = []; 21 | const snippetsLookup: MacroSnippetLookupTable = {}; 22 | const importRegex = /^import (.+) from ['"](.+(?:\.|\/)macro)['"];?$/mg; 23 | 24 | const macroPlugin: Plugin = { 25 | name: 'macro-plugin', 26 | setup(build) { 27 | build.onLoad({ filter: /\.(ts|js)x?$/ }, args => { 28 | if (args.path.includes('node_modules')) { 29 | console.log(`${args.path}; library; skipping`); 30 | return; 31 | } 32 | let source = fs.readFileSync(args.path, 'utf-8'); 33 | let match; 34 | const discovered = []; 35 | while ((match = importRegex.exec(source))) { 36 | const [ line, importText, name ] = match; 37 | const { index } = match; 38 | // Remove the import statement 39 | source = source.slice(0, index) + source.slice(index + line.length + 1); 40 | const macros = importText.replace(/(\s+|{|})/g, '').split(','); 41 | 42 | // Regex is /(a|b|c)([`(][\s\S]*?[`)]|(?:\.\w+)*)*/ 43 | // It removes all tag`templates`, func(calls), even in object.dot.paths() 44 | const regex = new RegExp( 45 | `(${macros.join('|')})([\`(][\\s\\S]*?[\`)]|(?:\\.\\w+)*)*`, 'g' 46 | ); 47 | 48 | // Why replace with SNIP_N and not do the real replacement now? Because I 49 | // want esbuild to be able to do all of this step in parallel in Go with 50 | // better extraction via the AST. The one (1) call to Node for macro 51 | // resolution should be after the build and bundling. No plugin needed. 52 | source = source.replace( 53 | regex, 54 | (match, macro: string, content: string, offset: number) => { 55 | const snip: MacroSnippet = { 56 | macroPackage: name, 57 | macroImport: macro, 58 | snipID: `SNIP_${snippets.length}`, 59 | snipContent: content, 60 | filepath: args.path, 61 | offset, 62 | }; 63 | 64 | snippets.push(snip); 65 | // Bind the same snip object into the lookup table 66 | const lookupPackage = snippetsLookup[snip.macroPackage] ?? {}; 67 | const lookupImport = lookupPackage[snip.macroImport] ?? []; 68 | lookupImport.push(snip); 69 | lookupPackage[snip.macroImport] = lookupImport; 70 | snippetsLookup[snip.macroPackage] = lookupPackage; 71 | 72 | return snip.snipID; 73 | }); 74 | discovered.push(`${name}: ${macros.join(',')}`); 75 | } 76 | if (discovered.length === 0) { 77 | console.log(`${args.path}; no macros; skipping`); 78 | return; 79 | } 80 | console.log(`${args.path}; removed ${discovered.length}\n ${discovered.join('\n ')}`); 81 | return { contents: source, loader: 'tsx' }; 82 | }); 83 | }, 84 | }; 85 | 86 | // TODO Macros: StripIndent, Preval, JSON-subset-loader, Millisecond-convert 87 | 88 | export { 89 | macroPlugin, 90 | snippets as macroSnippets, 91 | snippetsLookup as macroSnippetsLookup 92 | }; 93 | -------------------------------------------------------------------------------- /macro-regex/index.js: -------------------------------------------------------------------------------- 1 | // Trying to hash out esbuild macros 2 | 3 | // To handle esbuild minification I can map import aliases and look for t`...` 4 | // instead of css`...`. Was hoping to use esbuild's `define` config to leverage 5 | // its internal AST to replace the import with something very unique and regex 6 | // searchable, i.e `css` to `$@css@$`, since that'd be the one chance to ask 7 | // esbuild to do AST work on a macro's behave... Unfortunately `define` doesn't 8 | // operate on imports :// 9 | 10 | /* eslint-disable no-unused-vars */ 11 | 12 | import fs from 'fs/promises'; 13 | import path from 'path'; 14 | import { fileURLToPath } from 'url'; 15 | import esbuild from 'esbuild'; 16 | 17 | // This is used in eval() later on to do actual macro-defined work 18 | import * as styletakeoutmacro from './macros/styletakeout.macro.js'; 19 | 20 | const __dirname = path.dirname(fileURLToPath(import.meta.url)); 21 | const decoder = new TextDecoder(); 22 | 23 | // This is ordered. Process objects before css and injectGlobal functions 24 | // TODO: Move this into macro-specific work in ./macros/ 25 | const macros = ['decl', 'colours', 'sizes', 'classes', 'css', 'injectGlobal']; 26 | const macroShim = macros.map(k => `export const ${k} = $_MACRO.${k}`).join('\n'); 27 | 28 | esbuild.build({ 29 | entryPoints: [path.join(__dirname, '../macros/styletakeout.macro/example.ts')], 30 | write: false, 31 | format: 'esm', 32 | // plugins: [ 33 | // (plugin) => { 34 | // plugin.setName('external-macro-merge'); 35 | // plugin.addResolver({ filter: /\.macro$/ }, args => { 36 | // console.log('esbuild-macro-resolver', args); 37 | // return { path: args.path, namespace: 'macro-ns' }; 38 | // }); 39 | // plugin.addLoader({ filter: /.*/, namespace: 'macro-ns' }, (args) => { 40 | // console.log('esbuild-macro-load', args); 41 | // return { 42 | // contents: macroShim, 43 | // loader: 'js', 44 | // }; 45 | // }); 46 | // }, 47 | // ], 48 | external: ['styletakeout.macro'], 49 | bundle: true, 50 | minify: true, 51 | }).then(buildResult => { 52 | const [result] = buildResult.outputFiles; 53 | let bundle = decoder.decode(result.contents); 54 | fs.writeFile(path.join(__dirname, 'dist/in.js'), bundle); 55 | 56 | // TODO: Generalize to more than only styletakeout.macro 57 | const names = {}; 58 | let importMatch; 59 | // Don't need to be ambiguous with '" and ;? because esbuild will normalize it 60 | while ((importMatch = bundle.match(/import{(.+?)}from"styletakeout.macro";/))) { 61 | const [full, capture] = importMatch; 62 | const idxStart = importMatch.index; 63 | const idxEnd = idxStart + full.length; 64 | console.log(`Import ${idxStart}->${idxEnd}: "${full}"`); 65 | // Remove import statement 66 | bundle = bundle.slice(0, idxStart) + bundle.slice(idxEnd); 67 | for (const importExpr of capture.split(',')) { 68 | // Safe even if not aliased/minified 69 | const [exportN, aliasN = exportN] = importExpr.split(' as '); 70 | if (!(exportN in names)) { 71 | names[exportN] = []; 72 | } 73 | if (!names[exportN].includes(aliasN)) { 74 | names[exportN].push(aliasN); 75 | } 76 | } 77 | } 78 | if (!Object.keys(names).length) { 79 | console.log('No macro to replace'); 80 | return; 81 | } 82 | 83 | // There are 3 imports; decl, css, and injectGlobal. I don't actually need to 84 | // touch the decl import for ${} in css and injectGlobal because eval could 85 | // handle it, but I need to handle it for global variable declaration? So. 86 | // I'll regex out its object chain... 87 | const regexMemberExpr = head => `([^\\w.])${head}\\.((?:\\w+\\.?)+)`; 88 | const regexTagTemplateExpr = head => `([^\\w.])${head}\`((?:[^\`\\\\]|\\\\.)*)\``; 89 | 90 | for (const name of macros.filter(x => x in names)) { 91 | const isTagTemplateFn = name === 'css' || name === 'injectGlobal'; 92 | const aliases = names[name]; 93 | // This has state; exec keeps moving forward in while(); also 'g' is needed 94 | const regex = new RegExp(( 95 | isTagTemplateFn 96 | ? regexTagTemplateExpr 97 | : regexMemberExpr 98 | )(`(?:${aliases.join('|')})`), 'g'); 99 | console.log(name, regex); 100 | bundle = bundle.replace( 101 | regex, 102 | (match, groupDelimeter, groupContent, index) => { 103 | console.log({ 104 | name, 105 | match, 106 | index, 107 | indexNext: regex.lastIndex, 108 | groupDelimeter, 109 | groupContent, 110 | }); 111 | const macroResponse = isTagTemplateFn 112 | ? eval(`styletakeoutmacro.${name}\`${groupContent}\``) 113 | : eval(`styletakeoutmacro.${name}.${groupContent}`); 114 | if (typeof macroResponse !== 'string') { 115 | throw new Error(`Macro handler "${name}" returned "${macroResponse}" ` 116 | + `when given "${groupContent}" which isn't a string.`); 117 | } 118 | // TODO: Macros won't always return a string, i.e ms.macro 119 | // The above error was written because decl might return an object, but 120 | // that should be handled there? Proxy object? No... 121 | // Oh. 122 | // I mean, ok, I could literally just return the whole thing? Is that 123 | // what they want? It's eval afterall. `const x = decl.colours` might be 124 | // useful in ways the Babel styletakeout.macro couldn't be 125 | return groupDelimeter + `"${macroResponse}"`; 126 | }); 127 | } 128 | fs.writeFile(path.join(__dirname, 'dist/out.js'), bundle); 129 | fs.writeFile(path.join(__dirname, 'dist/out.css'), ''); 130 | }).catch(err => { 131 | console.error(err); 132 | process.exit(1); 133 | }); 134 | -------------------------------------------------------------------------------- /macro-regex/macros/ms.macro.js: -------------------------------------------------------------------------------- 1 | // This is an example but honestly go use the 'ms' package which is exactly what 2 | // the 'ms.macro' Babel macro does 3 | 4 | const s = 1000; 5 | const m = s * 60; 6 | const h = m * 60; 7 | const d = h * 24; 8 | const w = d * 7; 9 | const y = d * 365.25; 10 | const conv = { s, m, h, d, w, y }; 11 | 12 | export function ms(time) { 13 | const match = time.match(/^(\d+)\s*(\w+)$/); 14 | if (!match) { 15 | throw new Error(`ms.macro: "${time}" isn't a valid time format`); 16 | } 17 | const [, amount, unit] = match; 18 | // eslint-disable-next-line prefer-destructuring 19 | const letter = unit.toLowerCase()[0]; 20 | return Number(amount) * conv[letter]; 21 | } 22 | -------------------------------------------------------------------------------- /macro-regex/macros/styletakeout.macro.js: -------------------------------------------------------------------------------- 1 | export const colours = { 2 | black: '#000', 3 | white: '#fff', 4 | gray: { 5 | _600: '#718096', 6 | _700: '#4a5568', 7 | _800: '#2d3748', 8 | }, 9 | red: { 10 | _600: '#e53e3e', 11 | _700: '#c53030', 12 | _800: '#9b2c2c', 13 | }, 14 | orange: { 15 | _600: '#dd6b20', 16 | _700: '#c05621', 17 | _800: '#9c4221', 18 | }, 19 | yellow: { 20 | _600: '#d69e2e', 21 | _700: '#b7791f', 22 | _800: '#975a16', 23 | }, 24 | green: { 25 | _600: '#38a169', 26 | _700: '#2f855a', 27 | _800: '#276749', 28 | }, 29 | teal: { 30 | _600: '#319795', 31 | _700: '#2c7a7b', 32 | _800: '#285e61', 33 | }, 34 | blue: { 35 | _600: '#3182ce', 36 | _700: '#2b6cb0', 37 | _800: '#2c5282', 38 | }, 39 | indigo: { 40 | _600: '#5a67d8', 41 | _700: '#4c51bf', 42 | _800: '#434190', 43 | }, 44 | purple: { 45 | _600: '#805ad5', 46 | _700: '#6b46c1', 47 | _800: '#553c9a', 48 | }, 49 | pink: { 50 | _600: '#d53f8c', 51 | _700: '#b83280', 52 | _800: '#97266d', 53 | }, 54 | }; 55 | export const sizes = { 56 | _00: '0', 57 | _01: '0.25rem', 58 | _02: '0.5rem', 59 | _03: '0.75rem', 60 | _04: '1rem', 61 | _05: '1.25rem', 62 | _06: '1.5rem', 63 | _08: '2rem', 64 | _10: '2.5rem', 65 | _12: '3rem', 66 | _16: '4rem', 67 | _20: '5rem', 68 | _24: '6rem', 69 | _32: '8rem', 70 | _40: '10rem', 71 | _48: '12rem', 72 | _56: '14rem', 73 | _64: '16rem', 74 | }; 75 | export const classes = { 76 | text: { 77 | _0_xs: css`font-size: 0.75rem;`, 78 | _1_sm: css`font-size: 0.875rem;`, 79 | _2_md: css`font-size: 1rem;`, 80 | _3_lg: css`font-size: 1.125rem;`, 81 | _4_xl: css`font-size: 1.25rem;`, 82 | _5_xl: css`font-size: 1.5rem;`, 83 | _6_xl: css`font-size: 1.875rem;`, 84 | _7_xl: css`font-size: 2.25rem;`, 85 | _8_xl: css`font-size: 3rem;`, 86 | _9_xl: css`font-size: 4rem;`, 87 | }, 88 | }; 89 | export const decl = { 90 | pageBackground: colours.purple._700, 91 | bodyBackground: '#eee', 92 | colour: colours, 93 | size: sizes, 94 | classes, 95 | }; 96 | 97 | function interpolateTemplateString(quasis, expressions) { 98 | let string = ''; 99 | for (let i = 0; i < expressions.length; i++) { 100 | const exp = expressions[i]; 101 | if (typeof exp !== 'string') { 102 | throw new Error(`Template expression "\${${exp}}" must be a string`); 103 | } 104 | string += quasis[i]; 105 | string += exp; 106 | } 107 | // There's always one more static string than variable 108 | string += quasis[quasis.length - 1]; 109 | return string; 110 | } 111 | 112 | export function css(statics, ...templateVariables) { 113 | const string = interpolateTemplateString(statics, templateVariables); 114 | console.log('Passing to Stylis:', string); 115 | return '#HASH#'; 116 | } 117 | 118 | export function injectGlobal(statics, ...templateVariables) { 119 | const string = interpolateTemplateString(statics, templateVariables); 120 | console.log('Prepending to stylesheet:', string); 121 | return ''; 122 | } 123 | -------------------------------------------------------------------------------- /macros/preval.macro/example.ts: -------------------------------------------------------------------------------- 1 | // TODO; 2 | -------------------------------------------------------------------------------- /macros/styletakeout.macro/example-imported.ts: -------------------------------------------------------------------------------- 1 | import { decl, sizes, css } from 'styletakeout.macro'; 2 | 3 | /* eslint-disable @typescript-eslint/no-unused-vars */ 4 | 5 | const exportedVariable = sizes._04; 6 | const otherStyles = css` 7 | padding: ${sizes._05}; 8 | `; 9 | 10 | export { otherStyles }; 11 | -------------------------------------------------------------------------------- /macros/styletakeout.macro/example.ts: -------------------------------------------------------------------------------- 1 | import { decl, sizes, colours, css, classes } from 'styletakeout.macro'; 2 | import { otherStyles } from './example-imported.js'; 3 | 4 | /* eslint-disable @typescript-eslint/no-unused-vars */ 5 | 6 | const exportedVariable = colours.black; 7 | const styles = css` 8 | padding: 15px; 9 | background-color: ${colours.black}; 10 | margin-top: ${sizes._05}; 11 | margin-left: ${sizes._04}; 12 | margin-right: ${sizes._03}; 13 | `; 14 | 15 | // TODO: Ask Evan if this is safe for their upcoming lexer rewrite 16 | function shadow(css: number) { 17 | return css + 10; 18 | } 19 | 20 | console.log(shadow(10)); 21 | console.log(styles); 22 | console.log(decl.pageBackground); 23 | console.log(otherStyles); 24 | 25 | // These need to be assigned to a variable else --minify-sytax literally removes 26 | // the string contents (!) since they're unused. 27 | const v1 = `m5 p5 ${css`vertical-align: middle`} align-center ${styles} ${classes.text._0_xs}`; 28 | const v2 = `m5 p5 ${css`vertical-align: middle`} align-center`; 29 | const v3 = `m5 p5 ${styles} ${css`vertical-align: middle`} align-center ${styles}`; 30 | const v4 = `${styles} ${css`vertical-align: middle`}`; 31 | const v5 = `${css`vertical-align: middle`}`; 32 | const v6 = `${css`vertical-align: middle`} hello`; 33 | -------------------------------------------------------------------------------- /macros/styletakeout.macro/styletakeout.macro.ts: -------------------------------------------------------------------------------- 1 | // Macro Styles 2 | 3 | // This macro is specifically built for esbuild which supports tsconfig/jsconfig 4 | // path options. Therefore anyone, even JS-only users, should be able to use the 5 | // bare package-like import {...} from 'styletakeout.macro' and have type 6 | // correctly without errors. I need to double check non-TS though. 7 | 8 | // I'll have to throw an error if someone _doesn't_ override via tsconfig and 9 | // tell them that, unlike other macros, this one requires a local definition 10 | // file since you'll be using your own imports. 11 | 12 | /** Takeout css`` statement is replaced with a string of a unique classname */ 13 | export declare function css(statics: TemplateStringsArray, ...variables: string[]): string; 14 | /** Takeout injectGlobal`` statement is removed entirely */ 15 | export declare function injectGlobal(statics: TemplateStringsArray, ...variables: string[]): void; 16 | 17 | export type ColourNames = 'gray'|'red'|'orange'|'yellow'|'green'|'teal'|'blue'|'indigo'|'purple'|'pink'; 18 | export type Levels = '_100'|'_200'|'_300'|'_400'|'_500'|'_600'|'_700'|'_800'|'_900'; 19 | // ^ Numbers can't be property names so they're prefixed with '_' 20 | export type Colours = 21 | & { black: string, white: string } 22 | & { [colours in ColourNames]: { [level in Levels]: string } }; 23 | 24 | // With `as const` the editor will display the value instead of "string". 25 | // Alternatively, you can not use it and just press Ctrl while hovering. Then 26 | // the editor will show the implementation preview. Unfortunately that means 27 | // this can't be typed as `Colours` 28 | export const colours = { 29 | black: '#000', 30 | white: '#fff', 31 | gray: { 32 | _100: '#f7fafc', 33 | _200: '#edf2f7', 34 | _300: '#e2e8f0', 35 | _400: '#cbd5e0', 36 | _500: '#a0aec0', 37 | _600: '#718096', 38 | _700: '#4a5568', 39 | _800: '#2d3748', 40 | _900: '#1a202c', 41 | } as const, 42 | red: { 43 | _100: '#fff5f5', 44 | _200: '#fed7d7', 45 | _300: '#feb2b2', 46 | _400: '#fc8181', 47 | _500: '#f56565', 48 | _600: '#e53e3e', 49 | _700: '#c53030', 50 | _800: '#9b2c2c', 51 | _900: '#742a2a', 52 | } as const, 53 | orange: { 54 | _100: '#fffaf0', 55 | _200: '#feebc8', 56 | _300: '#fbd38d', 57 | _400: '#f6ad55', 58 | _500: '#ed8936', 59 | _600: '#dd6b20', 60 | _700: '#c05621', 61 | _800: '#9c4221', 62 | _900: '#7b341e', 63 | } as const, 64 | yellow: { 65 | _100: '#fffff0', 66 | _200: '#fefcbf', 67 | _300: '#faf089', 68 | _400: '#f6e05e', 69 | _500: '#ecc94b', 70 | _600: '#d69e2e', 71 | _700: '#b7791f', 72 | _800: '#975a16', 73 | _900: '#744210', 74 | } as const, 75 | green: { 76 | _100: '#f0fff4', 77 | _200: '#c6f6d5', 78 | _300: '#9ae6b4', 79 | _400: '#68d391', 80 | _500: '#48bb78', 81 | _600: '#38a169', 82 | _700: '#2f855a', 83 | _800: '#276749', 84 | _900: '#22543d', 85 | } as const, 86 | teal: { 87 | _100: '#e6fffa', 88 | _200: '#b2f5ea', 89 | _300: '#81e6d9', 90 | _400: '#4fd1c5', 91 | _500: '#38b2ac', 92 | _600: '#319795', 93 | _700: '#2c7a7b', 94 | _800: '#285e61', 95 | _900: '#234e52', 96 | } as const, 97 | blue: { 98 | _100: '#ebf8ff', 99 | _200: '#bee3f8', 100 | _300: '#90cdf4', 101 | _400: '#63b3ed', 102 | _500: '#4299e1', 103 | _600: '#3182ce', 104 | _700: '#2b6cb0', 105 | _800: '#2c5282', 106 | _900: '#2a4365', 107 | } as const, 108 | indigo: { 109 | _100: '#ebf4ff', 110 | _200: '#c3dafe', 111 | _300: '#a3bffa', 112 | _400: '#7f9cf5', 113 | _500: '#667eea', 114 | _600: '#5a67d8', 115 | _700: '#4c51bf', 116 | _800: '#434190', 117 | _900: '#3c366b', 118 | } as const, 119 | purple: { 120 | _100: '#faf5ff', 121 | _200: '#e9d8fd', 122 | _300: '#d6bcfa', 123 | _400: '#b794f4', 124 | _500: '#9f7aea', 125 | _600: '#805ad5', 126 | _700: '#6b46c1', 127 | _800: '#553c9a', 128 | _900: '#44337a', 129 | } as const, 130 | pink: { 131 | _100: '#fff5f7', 132 | _200: '#fed7e2', 133 | _300: '#fbb6ce', 134 | _400: '#f687b3', 135 | _500: '#ed64a6', 136 | _600: '#d53f8c', 137 | _700: '#b83280', 138 | _800: '#97266d', 139 | _900: '#702459', 140 | } as const, 141 | } as const; 142 | 143 | export const sizes = { 144 | // Without the leading 0 autocomplete will order them wrong 145 | _00: '0', 146 | _01: '0.25rem', 147 | _02: '0.5rem', 148 | _03: '0.75rem', 149 | _04: '1rem', 150 | _05: '1.25rem', 151 | _06: '1.5rem', 152 | _08: '2rem', 153 | _10: '2.5rem', 154 | _12: '3rem', 155 | _16: '4rem', 156 | _20: '5rem', 157 | _24: '6rem', 158 | _32: '8rem', 159 | _40: '10rem', 160 | _48: '12rem', 161 | _56: '14rem', 162 | _64: '16rem', 163 | } as const; 164 | 165 | export const classes = { 166 | text: { 167 | _0_xs: css`font-size: 0.75rem;`, 168 | _1_sm: css`font-size: 0.875rem;`, 169 | _2_md: css`font-size: 1rem;`, 170 | _3_lg: css`font-size: 1.125rem;`, 171 | _4_xl: css`font-size: 1.25rem;`, 172 | _5_xl: css`font-size: 1.5rem;`, 173 | _6_xl: css`font-size: 1.875rem;`, 174 | _7_xl: css`font-size: 2.25rem;`, 175 | _8_xl: css`font-size: 3rem;`, 176 | _9_xl: css`font-size: 4rem;`, 177 | }, 178 | } as const; 179 | 180 | export const decl = { 181 | pageBackground: colours.purple._100, 182 | bodyBackground: '#eee', 183 | colour: colours, 184 | size: sizes, 185 | classes: classes, 186 | } as const; 187 | 188 | // This file will be run automatically by the macro, meaning css`` and 189 | // injectGlobal`` are valid functions (the above fake "declare" functions are 190 | // removed) so you can use them here! 191 | 192 | injectGlobal` 193 | body { 194 | /* Styles */ 195 | } 196 | /* Note that there's no reason to define classes here - put your classes in 197 | the "classes" export above and you'll get type checking */ 198 | `; 199 | -------------------------------------------------------------------------------- /notes.md: -------------------------------------------------------------------------------- 1 | There's a lot of open issues and noise about merging source maps. I think it 2 | will work to just do `applySourceMap(...)` but the resolution matters. 3 | 4 | 1. Wanted to use `magic-string` for source mapped bundle replacements like 5 | - https://github.com/luwes/sinuous/blob/master/scripts/rollup-plugin-replace.js 6 | 2. Unfortunately it can't read/input source maps... 7 | - https://github.com/Rich-Harris/magic-string/issues/140 8 | 3. Mention of `sorcery` instead, but unmaintained for 5 years and has this bug 9 | - https://github.com/Rich-Harris/sorcery/issues/67 10 | 4. Similar/same issue in `source-map`: 11 | - https://github.com/mozilla/source-map/issues/216 12 | - https://github.com/mozilla/source-map/issues/351 13 | 5. Mention of merging/reading an existing source map: 14 | - https://github.com/dumberjs/modify-code#join-existing-source-map 15 | 6. The above points to this example using `source-map#applySourceMap()`: 16 | - https://github.com/gulp-sourcemaps/vinyl-sourcemaps-apply/blob/master/index.js 17 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "esbuild-macros", 3 | "version": "0.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "version": "0.0.0", 9 | "license": "MIT", 10 | "devDependencies": { 11 | "@types/node": "^15.0.1", 12 | "@typescript-eslint/eslint-plugin": "^4.22.0", 13 | "@typescript-eslint/parser": "^4.22.0", 14 | "acorn": "^8.2.1", 15 | "acorn-walk": "^8.1.0", 16 | "esbuild": "^0.11.15", 17 | "eslint": "^7.25.0", 18 | "typescript": "^4.2.4" 19 | } 20 | }, 21 | "node_modules/@babel/code-frame": { 22 | "version": "7.12.11", 23 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", 24 | "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", 25 | "dev": true, 26 | "dependencies": { 27 | "@babel/highlight": "^7.10.4" 28 | } 29 | }, 30 | "node_modules/@babel/helper-validator-identifier": { 31 | "version": "7.14.0", 32 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", 33 | "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", 34 | "dev": true 35 | }, 36 | "node_modules/@babel/highlight": { 37 | "version": "7.14.0", 38 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", 39 | "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", 40 | "dev": true, 41 | "dependencies": { 42 | "@babel/helper-validator-identifier": "^7.14.0", 43 | "chalk": "^2.0.0", 44 | "js-tokens": "^4.0.0" 45 | } 46 | }, 47 | "node_modules/@babel/highlight/node_modules/ansi-styles": { 48 | "version": "3.2.1", 49 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 50 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 51 | "dev": true, 52 | "dependencies": { 53 | "color-convert": "^1.9.0" 54 | }, 55 | "engines": { 56 | "node": ">=4" 57 | } 58 | }, 59 | "node_modules/@babel/highlight/node_modules/chalk": { 60 | "version": "2.4.2", 61 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 62 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 63 | "dev": true, 64 | "dependencies": { 65 | "ansi-styles": "^3.2.1", 66 | "escape-string-regexp": "^1.0.5", 67 | "supports-color": "^5.3.0" 68 | }, 69 | "engines": { 70 | "node": ">=4" 71 | } 72 | }, 73 | "node_modules/@babel/highlight/node_modules/color-convert": { 74 | "version": "1.9.3", 75 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 76 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 77 | "dev": true, 78 | "dependencies": { 79 | "color-name": "1.1.3" 80 | } 81 | }, 82 | "node_modules/@babel/highlight/node_modules/color-name": { 83 | "version": "1.1.3", 84 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 85 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 86 | "dev": true 87 | }, 88 | "node_modules/@eslint/eslintrc": { 89 | "version": "0.4.0", 90 | "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", 91 | "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", 92 | "dev": true, 93 | "dependencies": { 94 | "ajv": "^6.12.4", 95 | "debug": "^4.1.1", 96 | "espree": "^7.3.0", 97 | "globals": "^12.1.0", 98 | "ignore": "^4.0.6", 99 | "import-fresh": "^3.2.1", 100 | "js-yaml": "^3.13.1", 101 | "minimatch": "^3.0.4", 102 | "strip-json-comments": "^3.1.1" 103 | }, 104 | "engines": { 105 | "node": "^10.12.0 || >=12.0.0" 106 | } 107 | }, 108 | "node_modules/@eslint/eslintrc/node_modules/globals": { 109 | "version": "12.4.0", 110 | "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", 111 | "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", 112 | "dev": true, 113 | "dependencies": { 114 | "type-fest": "^0.8.1" 115 | }, 116 | "engines": { 117 | "node": ">=8" 118 | }, 119 | "funding": { 120 | "url": "https://github.com/sponsors/sindresorhus" 121 | } 122 | }, 123 | "node_modules/@eslint/eslintrc/node_modules/type-fest": { 124 | "version": "0.8.1", 125 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", 126 | "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", 127 | "dev": true, 128 | "engines": { 129 | "node": ">=8" 130 | } 131 | }, 132 | "node_modules/@nodelib/fs.scandir": { 133 | "version": "2.1.4", 134 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", 135 | "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", 136 | "dev": true, 137 | "dependencies": { 138 | "@nodelib/fs.stat": "2.0.4", 139 | "run-parallel": "^1.1.9" 140 | }, 141 | "engines": { 142 | "node": ">= 8" 143 | } 144 | }, 145 | "node_modules/@nodelib/fs.stat": { 146 | "version": "2.0.4", 147 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", 148 | "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", 149 | "dev": true, 150 | "engines": { 151 | "node": ">= 8" 152 | } 153 | }, 154 | "node_modules/@nodelib/fs.walk": { 155 | "version": "1.2.6", 156 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", 157 | "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", 158 | "dev": true, 159 | "dependencies": { 160 | "@nodelib/fs.scandir": "2.1.4", 161 | "fastq": "^1.6.0" 162 | }, 163 | "engines": { 164 | "node": ">= 8" 165 | } 166 | }, 167 | "node_modules/@types/json-schema": { 168 | "version": "7.0.7", 169 | "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", 170 | "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==", 171 | "dev": true 172 | }, 173 | "node_modules/@types/node": { 174 | "version": "15.0.1", 175 | "resolved": "https://registry.npmjs.org/@types/node/-/node-15.0.1.tgz", 176 | "integrity": "sha512-TMkXt0Ck1y0KKsGr9gJtWGjttxlZnnvDtphxUOSd0bfaR6Q1jle+sPvrzNR1urqYTWMinoKvjKfXUGsumaO1PA==", 177 | "dev": true 178 | }, 179 | "node_modules/@typescript-eslint/eslint-plugin": { 180 | "version": "4.22.0", 181 | "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz", 182 | "integrity": "sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA==", 183 | "dev": true, 184 | "dependencies": { 185 | "@typescript-eslint/experimental-utils": "4.22.0", 186 | "@typescript-eslint/scope-manager": "4.22.0", 187 | "debug": "^4.1.1", 188 | "functional-red-black-tree": "^1.0.1", 189 | "lodash": "^4.17.15", 190 | "regexpp": "^3.0.0", 191 | "semver": "^7.3.2", 192 | "tsutils": "^3.17.1" 193 | }, 194 | "engines": { 195 | "node": "^10.12.0 || >=12.0.0" 196 | }, 197 | "funding": { 198 | "type": "opencollective", 199 | "url": "https://opencollective.com/typescript-eslint" 200 | }, 201 | "peerDependencies": { 202 | "@typescript-eslint/parser": "^4.0.0", 203 | "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" 204 | }, 205 | "peerDependenciesMeta": { 206 | "typescript": { 207 | "optional": true 208 | } 209 | } 210 | }, 211 | "node_modules/@typescript-eslint/experimental-utils": { 212 | "version": "4.22.0", 213 | "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz", 214 | "integrity": "sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg==", 215 | "dev": true, 216 | "dependencies": { 217 | "@types/json-schema": "^7.0.3", 218 | "@typescript-eslint/scope-manager": "4.22.0", 219 | "@typescript-eslint/types": "4.22.0", 220 | "@typescript-eslint/typescript-estree": "4.22.0", 221 | "eslint-scope": "^5.0.0", 222 | "eslint-utils": "^2.0.0" 223 | }, 224 | "engines": { 225 | "node": "^10.12.0 || >=12.0.0" 226 | }, 227 | "funding": { 228 | "type": "opencollective", 229 | "url": "https://opencollective.com/typescript-eslint" 230 | }, 231 | "peerDependencies": { 232 | "eslint": "*" 233 | } 234 | }, 235 | "node_modules/@typescript-eslint/parser": { 236 | "version": "4.22.0", 237 | "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.22.0.tgz", 238 | "integrity": "sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q==", 239 | "dev": true, 240 | "dependencies": { 241 | "@typescript-eslint/scope-manager": "4.22.0", 242 | "@typescript-eslint/types": "4.22.0", 243 | "@typescript-eslint/typescript-estree": "4.22.0", 244 | "debug": "^4.1.1" 245 | }, 246 | "engines": { 247 | "node": "^10.12.0 || >=12.0.0" 248 | }, 249 | "funding": { 250 | "type": "opencollective", 251 | "url": "https://opencollective.com/typescript-eslint" 252 | }, 253 | "peerDependencies": { 254 | "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" 255 | }, 256 | "peerDependenciesMeta": { 257 | "typescript": { 258 | "optional": true 259 | } 260 | } 261 | }, 262 | "node_modules/@typescript-eslint/scope-manager": { 263 | "version": "4.22.0", 264 | "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz", 265 | "integrity": "sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q==", 266 | "dev": true, 267 | "dependencies": { 268 | "@typescript-eslint/types": "4.22.0", 269 | "@typescript-eslint/visitor-keys": "4.22.0" 270 | }, 271 | "engines": { 272 | "node": "^8.10.0 || ^10.13.0 || >=11.10.1" 273 | }, 274 | "funding": { 275 | "type": "opencollective", 276 | "url": "https://opencollective.com/typescript-eslint" 277 | } 278 | }, 279 | "node_modules/@typescript-eslint/types": { 280 | "version": "4.22.0", 281 | "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.22.0.tgz", 282 | "integrity": "sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA==", 283 | "dev": true, 284 | "engines": { 285 | "node": "^8.10.0 || ^10.13.0 || >=11.10.1" 286 | }, 287 | "funding": { 288 | "type": "opencollective", 289 | "url": "https://opencollective.com/typescript-eslint" 290 | } 291 | }, 292 | "node_modules/@typescript-eslint/typescript-estree": { 293 | "version": "4.22.0", 294 | "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz", 295 | "integrity": "sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg==", 296 | "dev": true, 297 | "dependencies": { 298 | "@typescript-eslint/types": "4.22.0", 299 | "@typescript-eslint/visitor-keys": "4.22.0", 300 | "debug": "^4.1.1", 301 | "globby": "^11.0.1", 302 | "is-glob": "^4.0.1", 303 | "semver": "^7.3.2", 304 | "tsutils": "^3.17.1" 305 | }, 306 | "engines": { 307 | "node": "^10.12.0 || >=12.0.0" 308 | }, 309 | "funding": { 310 | "type": "opencollective", 311 | "url": "https://opencollective.com/typescript-eslint" 312 | }, 313 | "peerDependenciesMeta": { 314 | "typescript": { 315 | "optional": true 316 | } 317 | } 318 | }, 319 | "node_modules/@typescript-eslint/visitor-keys": { 320 | "version": "4.22.0", 321 | "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz", 322 | "integrity": "sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw==", 323 | "dev": true, 324 | "dependencies": { 325 | "@typescript-eslint/types": "4.22.0", 326 | "eslint-visitor-keys": "^2.0.0" 327 | }, 328 | "engines": { 329 | "node": "^8.10.0 || ^10.13.0 || >=11.10.1" 330 | }, 331 | "funding": { 332 | "type": "opencollective", 333 | "url": "https://opencollective.com/typescript-eslint" 334 | } 335 | }, 336 | "node_modules/acorn": { 337 | "version": "8.2.2", 338 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.2.tgz", 339 | "integrity": "sha512-VrMS8kxT0e7J1EX0p6rI/E0FbfOVcvBpbIqHThFv+f8YrZIlMfVotYcXKVPmTvPW8sW5miJzfUFrrvthUZg8VQ==", 340 | "dev": true, 341 | "bin": { 342 | "acorn": "bin/acorn" 343 | }, 344 | "engines": { 345 | "node": ">=0.4.0" 346 | } 347 | }, 348 | "node_modules/acorn-jsx": { 349 | "version": "5.3.1", 350 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", 351 | "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", 352 | "dev": true, 353 | "peerDependencies": { 354 | "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" 355 | } 356 | }, 357 | "node_modules/acorn-walk": { 358 | "version": "8.1.0", 359 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.0.tgz", 360 | "integrity": "sha512-mjmzmv12YIG/G8JQdQuz2MUDShEJ6teYpT5bmWA4q7iwoGen8xtt3twF3OvzIUl+Q06aWIjvnwQUKvQ6TtMRjg==", 361 | "dev": true, 362 | "engines": { 363 | "node": ">=0.4.0" 364 | } 365 | }, 366 | "node_modules/ajv": { 367 | "version": "6.12.6", 368 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 369 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 370 | "dev": true, 371 | "dependencies": { 372 | "fast-deep-equal": "^3.1.1", 373 | "fast-json-stable-stringify": "^2.0.0", 374 | "json-schema-traverse": "^0.4.1", 375 | "uri-js": "^4.2.2" 376 | }, 377 | "funding": { 378 | "type": "github", 379 | "url": "https://github.com/sponsors/epoberezkin" 380 | } 381 | }, 382 | "node_modules/ansi-colors": { 383 | "version": "4.1.1", 384 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 385 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 386 | "dev": true, 387 | "engines": { 388 | "node": ">=6" 389 | } 390 | }, 391 | "node_modules/ansi-regex": { 392 | "version": "5.0.0", 393 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 394 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 395 | "dev": true, 396 | "engines": { 397 | "node": ">=8" 398 | } 399 | }, 400 | "node_modules/ansi-styles": { 401 | "version": "4.3.0", 402 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 403 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 404 | "dev": true, 405 | "dependencies": { 406 | "color-convert": "^2.0.1" 407 | }, 408 | "engines": { 409 | "node": ">=8" 410 | }, 411 | "funding": { 412 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 413 | } 414 | }, 415 | "node_modules/argparse": { 416 | "version": "1.0.10", 417 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 418 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 419 | "dev": true, 420 | "dependencies": { 421 | "sprintf-js": "~1.0.2" 422 | } 423 | }, 424 | "node_modules/array-union": { 425 | "version": "2.1.0", 426 | "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", 427 | "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", 428 | "dev": true, 429 | "engines": { 430 | "node": ">=8" 431 | } 432 | }, 433 | "node_modules/astral-regex": { 434 | "version": "2.0.0", 435 | "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", 436 | "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", 437 | "dev": true, 438 | "engines": { 439 | "node": ">=8" 440 | } 441 | }, 442 | "node_modules/balanced-match": { 443 | "version": "1.0.2", 444 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 445 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 446 | "dev": true 447 | }, 448 | "node_modules/brace-expansion": { 449 | "version": "1.1.11", 450 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 451 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 452 | "dev": true, 453 | "dependencies": { 454 | "balanced-match": "^1.0.0", 455 | "concat-map": "0.0.1" 456 | } 457 | }, 458 | "node_modules/braces": { 459 | "version": "3.0.2", 460 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 461 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 462 | "dev": true, 463 | "dependencies": { 464 | "fill-range": "^7.0.1" 465 | }, 466 | "engines": { 467 | "node": ">=8" 468 | } 469 | }, 470 | "node_modules/callsites": { 471 | "version": "3.1.0", 472 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 473 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 474 | "dev": true, 475 | "engines": { 476 | "node": ">=6" 477 | } 478 | }, 479 | "node_modules/chalk": { 480 | "version": "4.1.0", 481 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", 482 | "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", 483 | "dev": true, 484 | "dependencies": { 485 | "ansi-styles": "^4.1.0", 486 | "supports-color": "^7.1.0" 487 | }, 488 | "engines": { 489 | "node": ">=10" 490 | } 491 | }, 492 | "node_modules/chalk/node_modules/has-flag": { 493 | "version": "4.0.0", 494 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 495 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 496 | "dev": true, 497 | "engines": { 498 | "node": ">=8" 499 | } 500 | }, 501 | "node_modules/chalk/node_modules/supports-color": { 502 | "version": "7.2.0", 503 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 504 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 505 | "dev": true, 506 | "dependencies": { 507 | "has-flag": "^4.0.0" 508 | }, 509 | "engines": { 510 | "node": ">=8" 511 | } 512 | }, 513 | "node_modules/color-convert": { 514 | "version": "2.0.1", 515 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 516 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 517 | "dev": true, 518 | "dependencies": { 519 | "color-name": "~1.1.4" 520 | }, 521 | "engines": { 522 | "node": ">=7.0.0" 523 | } 524 | }, 525 | "node_modules/color-name": { 526 | "version": "1.1.4", 527 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 528 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 529 | "dev": true 530 | }, 531 | "node_modules/concat-map": { 532 | "version": "0.0.1", 533 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 534 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 535 | "dev": true 536 | }, 537 | "node_modules/cross-spawn": { 538 | "version": "7.0.3", 539 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", 540 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 541 | "dev": true, 542 | "dependencies": { 543 | "path-key": "^3.1.0", 544 | "shebang-command": "^2.0.0", 545 | "which": "^2.0.1" 546 | }, 547 | "engines": { 548 | "node": ">= 8" 549 | } 550 | }, 551 | "node_modules/debug": { 552 | "version": "4.2.0", 553 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", 554 | "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", 555 | "dev": true, 556 | "dependencies": { 557 | "ms": "2.1.2" 558 | }, 559 | "engines": { 560 | "node": ">=6.0" 561 | } 562 | }, 563 | "node_modules/deep-is": { 564 | "version": "0.1.3", 565 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 566 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 567 | "dev": true 568 | }, 569 | "node_modules/dir-glob": { 570 | "version": "3.0.1", 571 | "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", 572 | "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", 573 | "dev": true, 574 | "dependencies": { 575 | "path-type": "^4.0.0" 576 | }, 577 | "engines": { 578 | "node": ">=8" 579 | } 580 | }, 581 | "node_modules/doctrine": { 582 | "version": "3.0.0", 583 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", 584 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", 585 | "dev": true, 586 | "dependencies": { 587 | "esutils": "^2.0.2" 588 | }, 589 | "engines": { 590 | "node": ">=6.0.0" 591 | } 592 | }, 593 | "node_modules/emoji-regex": { 594 | "version": "8.0.0", 595 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 596 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 597 | "dev": true 598 | }, 599 | "node_modules/enquirer": { 600 | "version": "2.3.6", 601 | "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", 602 | "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", 603 | "dev": true, 604 | "dependencies": { 605 | "ansi-colors": "^4.1.1" 606 | }, 607 | "engines": { 608 | "node": ">=8.6" 609 | } 610 | }, 611 | "node_modules/esbuild": { 612 | "version": "0.11.18", 613 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.11.18.tgz", 614 | "integrity": "sha512-KD7v4N9b5B8bxPUNn/3GA9r0HWo4nJk3iwjZ+2zG1ffg+r8ig+wqj7sW6zgI6Sn4/B2FnbzqWxcAokAGGM5zwQ==", 615 | "dev": true, 616 | "hasInstallScript": true, 617 | "bin": { 618 | "esbuild": "bin/esbuild" 619 | } 620 | }, 621 | "node_modules/escape-string-regexp": { 622 | "version": "1.0.5", 623 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 624 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 625 | "dev": true, 626 | "engines": { 627 | "node": ">=0.8.0" 628 | } 629 | }, 630 | "node_modules/eslint": { 631 | "version": "7.25.0", 632 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.25.0.tgz", 633 | "integrity": "sha512-TVpSovpvCNpLURIScDRB6g5CYu/ZFq9GfX2hLNIV4dSBKxIWojeDODvYl3t0k0VtMxYeR8OXPCFE5+oHMlGfhw==", 634 | "dev": true, 635 | "dependencies": { 636 | "@babel/code-frame": "7.12.11", 637 | "@eslint/eslintrc": "^0.4.0", 638 | "ajv": "^6.10.0", 639 | "chalk": "^4.0.0", 640 | "cross-spawn": "^7.0.2", 641 | "debug": "^4.0.1", 642 | "doctrine": "^3.0.0", 643 | "enquirer": "^2.3.5", 644 | "eslint-scope": "^5.1.1", 645 | "eslint-utils": "^2.1.0", 646 | "eslint-visitor-keys": "^2.0.0", 647 | "espree": "^7.3.1", 648 | "esquery": "^1.4.0", 649 | "esutils": "^2.0.2", 650 | "file-entry-cache": "^6.0.1", 651 | "functional-red-black-tree": "^1.0.1", 652 | "glob-parent": "^5.0.0", 653 | "globals": "^13.6.0", 654 | "ignore": "^4.0.6", 655 | "import-fresh": "^3.0.0", 656 | "imurmurhash": "^0.1.4", 657 | "is-glob": "^4.0.0", 658 | "js-yaml": "^3.13.1", 659 | "json-stable-stringify-without-jsonify": "^1.0.1", 660 | "levn": "^0.4.1", 661 | "lodash": "^4.17.21", 662 | "minimatch": "^3.0.4", 663 | "natural-compare": "^1.4.0", 664 | "optionator": "^0.9.1", 665 | "progress": "^2.0.0", 666 | "regexpp": "^3.1.0", 667 | "semver": "^7.2.1", 668 | "strip-ansi": "^6.0.0", 669 | "strip-json-comments": "^3.1.0", 670 | "table": "^6.0.4", 671 | "text-table": "^0.2.0", 672 | "v8-compile-cache": "^2.0.3" 673 | }, 674 | "bin": { 675 | "eslint": "bin/eslint.js" 676 | }, 677 | "engines": { 678 | "node": "^10.12.0 || >=12.0.0" 679 | }, 680 | "funding": { 681 | "url": "https://opencollective.com/eslint" 682 | } 683 | }, 684 | "node_modules/eslint-scope": { 685 | "version": "5.1.1", 686 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", 687 | "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", 688 | "dev": true, 689 | "dependencies": { 690 | "esrecurse": "^4.3.0", 691 | "estraverse": "^4.1.1" 692 | }, 693 | "engines": { 694 | "node": ">=8.0.0" 695 | } 696 | }, 697 | "node_modules/eslint-utils": { 698 | "version": "2.1.0", 699 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", 700 | "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", 701 | "dev": true, 702 | "dependencies": { 703 | "eslint-visitor-keys": "^1.1.0" 704 | }, 705 | "engines": { 706 | "node": ">=6" 707 | } 708 | }, 709 | "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { 710 | "version": "1.3.0", 711 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", 712 | "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", 713 | "dev": true, 714 | "engines": { 715 | "node": ">=4" 716 | } 717 | }, 718 | "node_modules/eslint-visitor-keys": { 719 | "version": "2.0.0", 720 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", 721 | "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", 722 | "dev": true, 723 | "engines": { 724 | "node": ">=10" 725 | } 726 | }, 727 | "node_modules/espree": { 728 | "version": "7.3.1", 729 | "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", 730 | "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", 731 | "dev": true, 732 | "dependencies": { 733 | "acorn": "^7.4.0", 734 | "acorn-jsx": "^5.3.1", 735 | "eslint-visitor-keys": "^1.3.0" 736 | }, 737 | "engines": { 738 | "node": "^10.12.0 || >=12.0.0" 739 | } 740 | }, 741 | "node_modules/espree/node_modules/acorn": { 742 | "version": "7.4.1", 743 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", 744 | "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", 745 | "dev": true, 746 | "bin": { 747 | "acorn": "bin/acorn" 748 | }, 749 | "engines": { 750 | "node": ">=0.4.0" 751 | } 752 | }, 753 | "node_modules/espree/node_modules/eslint-visitor-keys": { 754 | "version": "1.3.0", 755 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", 756 | "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", 757 | "dev": true, 758 | "engines": { 759 | "node": ">=4" 760 | } 761 | }, 762 | "node_modules/esprima": { 763 | "version": "4.0.1", 764 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 765 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 766 | "dev": true, 767 | "bin": { 768 | "esparse": "bin/esparse.js", 769 | "esvalidate": "bin/esvalidate.js" 770 | }, 771 | "engines": { 772 | "node": ">=4" 773 | } 774 | }, 775 | "node_modules/esquery": { 776 | "version": "1.4.0", 777 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", 778 | "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", 779 | "dev": true, 780 | "dependencies": { 781 | "estraverse": "^5.1.0" 782 | }, 783 | "engines": { 784 | "node": ">=0.10" 785 | } 786 | }, 787 | "node_modules/esquery/node_modules/estraverse": { 788 | "version": "5.2.0", 789 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", 790 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", 791 | "dev": true, 792 | "engines": { 793 | "node": ">=4.0" 794 | } 795 | }, 796 | "node_modules/esrecurse": { 797 | "version": "4.3.0", 798 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", 799 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", 800 | "dev": true, 801 | "dependencies": { 802 | "estraverse": "^5.2.0" 803 | }, 804 | "engines": { 805 | "node": ">=4.0" 806 | } 807 | }, 808 | "node_modules/esrecurse/node_modules/estraverse": { 809 | "version": "5.2.0", 810 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", 811 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", 812 | "dev": true, 813 | "engines": { 814 | "node": ">=4.0" 815 | } 816 | }, 817 | "node_modules/estraverse": { 818 | "version": "4.3.0", 819 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", 820 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", 821 | "dev": true, 822 | "engines": { 823 | "node": ">=4.0" 824 | } 825 | }, 826 | "node_modules/esutils": { 827 | "version": "2.0.3", 828 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 829 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 830 | "dev": true, 831 | "engines": { 832 | "node": ">=0.10.0" 833 | } 834 | }, 835 | "node_modules/fast-deep-equal": { 836 | "version": "3.1.3", 837 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 838 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 839 | "dev": true 840 | }, 841 | "node_modules/fast-glob": { 842 | "version": "3.2.5", 843 | "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", 844 | "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", 845 | "dev": true, 846 | "dependencies": { 847 | "@nodelib/fs.stat": "^2.0.2", 848 | "@nodelib/fs.walk": "^1.2.3", 849 | "glob-parent": "^5.1.0", 850 | "merge2": "^1.3.0", 851 | "micromatch": "^4.0.2", 852 | "picomatch": "^2.2.1" 853 | }, 854 | "engines": { 855 | "node": ">=8" 856 | } 857 | }, 858 | "node_modules/fast-json-stable-stringify": { 859 | "version": "2.1.0", 860 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 861 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 862 | "dev": true 863 | }, 864 | "node_modules/fast-levenshtein": { 865 | "version": "2.0.6", 866 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 867 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", 868 | "dev": true 869 | }, 870 | "node_modules/fastq": { 871 | "version": "1.11.0", 872 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", 873 | "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", 874 | "dev": true, 875 | "dependencies": { 876 | "reusify": "^1.0.4" 877 | } 878 | }, 879 | "node_modules/file-entry-cache": { 880 | "version": "6.0.1", 881 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", 882 | "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", 883 | "dev": true, 884 | "dependencies": { 885 | "flat-cache": "^3.0.4" 886 | }, 887 | "engines": { 888 | "node": "^10.12.0 || >=12.0.0" 889 | } 890 | }, 891 | "node_modules/fill-range": { 892 | "version": "7.0.1", 893 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 894 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 895 | "dev": true, 896 | "dependencies": { 897 | "to-regex-range": "^5.0.1" 898 | }, 899 | "engines": { 900 | "node": ">=8" 901 | } 902 | }, 903 | "node_modules/flat-cache": { 904 | "version": "3.0.4", 905 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", 906 | "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", 907 | "dev": true, 908 | "dependencies": { 909 | "flatted": "^3.1.0", 910 | "rimraf": "^3.0.2" 911 | }, 912 | "engines": { 913 | "node": "^10.12.0 || >=12.0.0" 914 | } 915 | }, 916 | "node_modules/flatted": { 917 | "version": "3.1.1", 918 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", 919 | "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", 920 | "dev": true 921 | }, 922 | "node_modules/fs.realpath": { 923 | "version": "1.0.0", 924 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 925 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 926 | "dev": true 927 | }, 928 | "node_modules/functional-red-black-tree": { 929 | "version": "1.0.1", 930 | "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", 931 | "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", 932 | "dev": true 933 | }, 934 | "node_modules/glob": { 935 | "version": "7.1.6", 936 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 937 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 938 | "dev": true, 939 | "dependencies": { 940 | "fs.realpath": "^1.0.0", 941 | "inflight": "^1.0.4", 942 | "inherits": "2", 943 | "minimatch": "^3.0.4", 944 | "once": "^1.3.0", 945 | "path-is-absolute": "^1.0.0" 946 | }, 947 | "engines": { 948 | "node": "*" 949 | }, 950 | "funding": { 951 | "url": "https://github.com/sponsors/isaacs" 952 | } 953 | }, 954 | "node_modules/glob-parent": { 955 | "version": "5.1.1", 956 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", 957 | "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", 958 | "dev": true, 959 | "dependencies": { 960 | "is-glob": "^4.0.1" 961 | }, 962 | "engines": { 963 | "node": ">= 6" 964 | } 965 | }, 966 | "node_modules/globals": { 967 | "version": "13.8.0", 968 | "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", 969 | "integrity": "sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q==", 970 | "dev": true, 971 | "dependencies": { 972 | "type-fest": "^0.20.2" 973 | }, 974 | "engines": { 975 | "node": ">=8" 976 | }, 977 | "funding": { 978 | "url": "https://github.com/sponsors/sindresorhus" 979 | } 980 | }, 981 | "node_modules/globby": { 982 | "version": "11.0.3", 983 | "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", 984 | "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", 985 | "dev": true, 986 | "dependencies": { 987 | "array-union": "^2.1.0", 988 | "dir-glob": "^3.0.1", 989 | "fast-glob": "^3.1.1", 990 | "ignore": "^5.1.4", 991 | "merge2": "^1.3.0", 992 | "slash": "^3.0.0" 993 | }, 994 | "engines": { 995 | "node": ">=10" 996 | }, 997 | "funding": { 998 | "url": "https://github.com/sponsors/sindresorhus" 999 | } 1000 | }, 1001 | "node_modules/globby/node_modules/ignore": { 1002 | "version": "5.1.8", 1003 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", 1004 | "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", 1005 | "dev": true, 1006 | "engines": { 1007 | "node": ">= 4" 1008 | } 1009 | }, 1010 | "node_modules/has-flag": { 1011 | "version": "3.0.0", 1012 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 1013 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 1014 | "dev": true, 1015 | "engines": { 1016 | "node": ">=4" 1017 | } 1018 | }, 1019 | "node_modules/ignore": { 1020 | "version": "4.0.6", 1021 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", 1022 | "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", 1023 | "dev": true, 1024 | "engines": { 1025 | "node": ">= 4" 1026 | } 1027 | }, 1028 | "node_modules/import-fresh": { 1029 | "version": "3.3.0", 1030 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", 1031 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", 1032 | "dev": true, 1033 | "dependencies": { 1034 | "parent-module": "^1.0.0", 1035 | "resolve-from": "^4.0.0" 1036 | }, 1037 | "engines": { 1038 | "node": ">=6" 1039 | }, 1040 | "funding": { 1041 | "url": "https://github.com/sponsors/sindresorhus" 1042 | } 1043 | }, 1044 | "node_modules/imurmurhash": { 1045 | "version": "0.1.4", 1046 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 1047 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 1048 | "dev": true, 1049 | "engines": { 1050 | "node": ">=0.8.19" 1051 | } 1052 | }, 1053 | "node_modules/inflight": { 1054 | "version": "1.0.6", 1055 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1056 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 1057 | "dev": true, 1058 | "dependencies": { 1059 | "once": "^1.3.0", 1060 | "wrappy": "1" 1061 | } 1062 | }, 1063 | "node_modules/inherits": { 1064 | "version": "2.0.4", 1065 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1066 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1067 | "dev": true 1068 | }, 1069 | "node_modules/is-extglob": { 1070 | "version": "2.1.1", 1071 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1072 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 1073 | "dev": true, 1074 | "engines": { 1075 | "node": ">=0.10.0" 1076 | } 1077 | }, 1078 | "node_modules/is-fullwidth-code-point": { 1079 | "version": "3.0.0", 1080 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1081 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1082 | "dev": true, 1083 | "engines": { 1084 | "node": ">=8" 1085 | } 1086 | }, 1087 | "node_modules/is-glob": { 1088 | "version": "4.0.1", 1089 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 1090 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 1091 | "dev": true, 1092 | "dependencies": { 1093 | "is-extglob": "^2.1.1" 1094 | }, 1095 | "engines": { 1096 | "node": ">=0.10.0" 1097 | } 1098 | }, 1099 | "node_modules/is-number": { 1100 | "version": "7.0.0", 1101 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1102 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1103 | "dev": true, 1104 | "engines": { 1105 | "node": ">=0.12.0" 1106 | } 1107 | }, 1108 | "node_modules/isexe": { 1109 | "version": "2.0.0", 1110 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1111 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 1112 | "dev": true 1113 | }, 1114 | "node_modules/js-tokens": { 1115 | "version": "4.0.0", 1116 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 1117 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 1118 | "dev": true 1119 | }, 1120 | "node_modules/js-yaml": { 1121 | "version": "3.14.1", 1122 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", 1123 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 1124 | "dev": true, 1125 | "dependencies": { 1126 | "argparse": "^1.0.7", 1127 | "esprima": "^4.0.0" 1128 | }, 1129 | "bin": { 1130 | "js-yaml": "bin/js-yaml.js" 1131 | } 1132 | }, 1133 | "node_modules/json-schema-traverse": { 1134 | "version": "0.4.1", 1135 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 1136 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 1137 | "dev": true 1138 | }, 1139 | "node_modules/json-stable-stringify-without-jsonify": { 1140 | "version": "1.0.1", 1141 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 1142 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", 1143 | "dev": true 1144 | }, 1145 | "node_modules/levn": { 1146 | "version": "0.4.1", 1147 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", 1148 | "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", 1149 | "dev": true, 1150 | "dependencies": { 1151 | "prelude-ls": "^1.2.1", 1152 | "type-check": "~0.4.0" 1153 | }, 1154 | "engines": { 1155 | "node": ">= 0.8.0" 1156 | } 1157 | }, 1158 | "node_modules/lodash": { 1159 | "version": "4.17.21", 1160 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 1161 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 1162 | "dev": true 1163 | }, 1164 | "node_modules/lodash.clonedeep": { 1165 | "version": "4.5.0", 1166 | "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", 1167 | "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", 1168 | "dev": true 1169 | }, 1170 | "node_modules/lodash.flatten": { 1171 | "version": "4.4.0", 1172 | "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", 1173 | "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", 1174 | "dev": true 1175 | }, 1176 | "node_modules/lodash.truncate": { 1177 | "version": "4.4.2", 1178 | "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", 1179 | "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", 1180 | "dev": true 1181 | }, 1182 | "node_modules/merge2": { 1183 | "version": "1.4.1", 1184 | "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", 1185 | "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", 1186 | "dev": true, 1187 | "engines": { 1188 | "node": ">= 8" 1189 | } 1190 | }, 1191 | "node_modules/micromatch": { 1192 | "version": "4.0.4", 1193 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", 1194 | "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", 1195 | "dev": true, 1196 | "dependencies": { 1197 | "braces": "^3.0.1", 1198 | "picomatch": "^2.2.3" 1199 | }, 1200 | "engines": { 1201 | "node": ">=8.6" 1202 | } 1203 | }, 1204 | "node_modules/minimatch": { 1205 | "version": "3.0.4", 1206 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 1207 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 1208 | "dev": true, 1209 | "dependencies": { 1210 | "brace-expansion": "^1.1.7" 1211 | }, 1212 | "engines": { 1213 | "node": "*" 1214 | } 1215 | }, 1216 | "node_modules/ms": { 1217 | "version": "2.1.2", 1218 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1219 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1220 | "dev": true 1221 | }, 1222 | "node_modules/natural-compare": { 1223 | "version": "1.4.0", 1224 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 1225 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", 1226 | "dev": true 1227 | }, 1228 | "node_modules/once": { 1229 | "version": "1.4.0", 1230 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1231 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1232 | "dev": true, 1233 | "dependencies": { 1234 | "wrappy": "1" 1235 | } 1236 | }, 1237 | "node_modules/optionator": { 1238 | "version": "0.9.1", 1239 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", 1240 | "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", 1241 | "dev": true, 1242 | "dependencies": { 1243 | "deep-is": "^0.1.3", 1244 | "fast-levenshtein": "^2.0.6", 1245 | "levn": "^0.4.1", 1246 | "prelude-ls": "^1.2.1", 1247 | "type-check": "^0.4.0", 1248 | "word-wrap": "^1.2.3" 1249 | }, 1250 | "engines": { 1251 | "node": ">= 0.8.0" 1252 | } 1253 | }, 1254 | "node_modules/parent-module": { 1255 | "version": "1.0.1", 1256 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 1257 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 1258 | "dev": true, 1259 | "dependencies": { 1260 | "callsites": "^3.0.0" 1261 | }, 1262 | "engines": { 1263 | "node": ">=6" 1264 | } 1265 | }, 1266 | "node_modules/path-is-absolute": { 1267 | "version": "1.0.1", 1268 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1269 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 1270 | "dev": true, 1271 | "engines": { 1272 | "node": ">=0.10.0" 1273 | } 1274 | }, 1275 | "node_modules/path-key": { 1276 | "version": "3.1.1", 1277 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 1278 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 1279 | "dev": true, 1280 | "engines": { 1281 | "node": ">=8" 1282 | } 1283 | }, 1284 | "node_modules/path-type": { 1285 | "version": "4.0.0", 1286 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", 1287 | "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", 1288 | "dev": true, 1289 | "engines": { 1290 | "node": ">=8" 1291 | } 1292 | }, 1293 | "node_modules/picomatch": { 1294 | "version": "2.2.3", 1295 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", 1296 | "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", 1297 | "dev": true, 1298 | "engines": { 1299 | "node": ">=8.6" 1300 | }, 1301 | "funding": { 1302 | "url": "https://github.com/sponsors/jonschlinkert" 1303 | } 1304 | }, 1305 | "node_modules/prelude-ls": { 1306 | "version": "1.2.1", 1307 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", 1308 | "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", 1309 | "dev": true, 1310 | "engines": { 1311 | "node": ">= 0.8.0" 1312 | } 1313 | }, 1314 | "node_modules/progress": { 1315 | "version": "2.0.3", 1316 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", 1317 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", 1318 | "dev": true, 1319 | "engines": { 1320 | "node": ">=0.4.0" 1321 | } 1322 | }, 1323 | "node_modules/punycode": { 1324 | "version": "2.1.1", 1325 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 1326 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 1327 | "dev": true, 1328 | "engines": { 1329 | "node": ">=6" 1330 | } 1331 | }, 1332 | "node_modules/queue-microtask": { 1333 | "version": "1.2.3", 1334 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", 1335 | "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", 1336 | "dev": true, 1337 | "funding": [ 1338 | { 1339 | "type": "github", 1340 | "url": "https://github.com/sponsors/feross" 1341 | }, 1342 | { 1343 | "type": "patreon", 1344 | "url": "https://www.patreon.com/feross" 1345 | }, 1346 | { 1347 | "type": "consulting", 1348 | "url": "https://feross.org/support" 1349 | } 1350 | ] 1351 | }, 1352 | "node_modules/regexpp": { 1353 | "version": "3.1.0", 1354 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", 1355 | "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", 1356 | "dev": true, 1357 | "engines": { 1358 | "node": ">=8" 1359 | } 1360 | }, 1361 | "node_modules/require-from-string": { 1362 | "version": "2.0.2", 1363 | "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", 1364 | "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", 1365 | "dev": true, 1366 | "engines": { 1367 | "node": ">=0.10.0" 1368 | } 1369 | }, 1370 | "node_modules/resolve-from": { 1371 | "version": "4.0.0", 1372 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 1373 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 1374 | "dev": true, 1375 | "engines": { 1376 | "node": ">=4" 1377 | } 1378 | }, 1379 | "node_modules/reusify": { 1380 | "version": "1.0.4", 1381 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", 1382 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", 1383 | "dev": true, 1384 | "engines": { 1385 | "iojs": ">=1.0.0", 1386 | "node": ">=0.10.0" 1387 | } 1388 | }, 1389 | "node_modules/rimraf": { 1390 | "version": "3.0.2", 1391 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", 1392 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", 1393 | "dev": true, 1394 | "dependencies": { 1395 | "glob": "^7.1.3" 1396 | }, 1397 | "bin": { 1398 | "rimraf": "bin.js" 1399 | }, 1400 | "funding": { 1401 | "url": "https://github.com/sponsors/isaacs" 1402 | } 1403 | }, 1404 | "node_modules/run-parallel": { 1405 | "version": "1.2.0", 1406 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", 1407 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", 1408 | "dev": true, 1409 | "funding": [ 1410 | { 1411 | "type": "github", 1412 | "url": "https://github.com/sponsors/feross" 1413 | }, 1414 | { 1415 | "type": "patreon", 1416 | "url": "https://www.patreon.com/feross" 1417 | }, 1418 | { 1419 | "type": "consulting", 1420 | "url": "https://feross.org/support" 1421 | } 1422 | ], 1423 | "dependencies": { 1424 | "queue-microtask": "^1.2.2" 1425 | } 1426 | }, 1427 | "node_modules/semver": { 1428 | "version": "7.3.2", 1429 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", 1430 | "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", 1431 | "dev": true, 1432 | "bin": { 1433 | "semver": "bin/semver.js" 1434 | }, 1435 | "engines": { 1436 | "node": ">=10" 1437 | } 1438 | }, 1439 | "node_modules/shebang-command": { 1440 | "version": "2.0.0", 1441 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 1442 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 1443 | "dev": true, 1444 | "dependencies": { 1445 | "shebang-regex": "^3.0.0" 1446 | }, 1447 | "engines": { 1448 | "node": ">=8" 1449 | } 1450 | }, 1451 | "node_modules/shebang-regex": { 1452 | "version": "3.0.0", 1453 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 1454 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 1455 | "dev": true, 1456 | "engines": { 1457 | "node": ">=8" 1458 | } 1459 | }, 1460 | "node_modules/slash": { 1461 | "version": "3.0.0", 1462 | "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", 1463 | "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", 1464 | "dev": true, 1465 | "engines": { 1466 | "node": ">=8" 1467 | } 1468 | }, 1469 | "node_modules/slice-ansi": { 1470 | "version": "4.0.0", 1471 | "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", 1472 | "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", 1473 | "dev": true, 1474 | "dependencies": { 1475 | "ansi-styles": "^4.0.0", 1476 | "astral-regex": "^2.0.0", 1477 | "is-fullwidth-code-point": "^3.0.0" 1478 | }, 1479 | "engines": { 1480 | "node": ">=10" 1481 | }, 1482 | "funding": { 1483 | "url": "https://github.com/chalk/slice-ansi?sponsor=1" 1484 | } 1485 | }, 1486 | "node_modules/sprintf-js": { 1487 | "version": "1.0.3", 1488 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 1489 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 1490 | "dev": true 1491 | }, 1492 | "node_modules/string-width": { 1493 | "version": "4.2.2", 1494 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1495 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1496 | "dev": true, 1497 | "dependencies": { 1498 | "emoji-regex": "^8.0.0", 1499 | "is-fullwidth-code-point": "^3.0.0", 1500 | "strip-ansi": "^6.0.0" 1501 | }, 1502 | "engines": { 1503 | "node": ">=8" 1504 | } 1505 | }, 1506 | "node_modules/strip-ansi": { 1507 | "version": "6.0.0", 1508 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1509 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1510 | "dev": true, 1511 | "dependencies": { 1512 | "ansi-regex": "^5.0.0" 1513 | }, 1514 | "engines": { 1515 | "node": ">=8" 1516 | } 1517 | }, 1518 | "node_modules/strip-json-comments": { 1519 | "version": "3.1.1", 1520 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1521 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1522 | "dev": true, 1523 | "engines": { 1524 | "node": ">=8" 1525 | }, 1526 | "funding": { 1527 | "url": "https://github.com/sponsors/sindresorhus" 1528 | } 1529 | }, 1530 | "node_modules/supports-color": { 1531 | "version": "5.5.0", 1532 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1533 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1534 | "dev": true, 1535 | "dependencies": { 1536 | "has-flag": "^3.0.0" 1537 | }, 1538 | "engines": { 1539 | "node": ">=4" 1540 | } 1541 | }, 1542 | "node_modules/table": { 1543 | "version": "6.6.0", 1544 | "resolved": "https://registry.npmjs.org/table/-/table-6.6.0.tgz", 1545 | "integrity": "sha512-iZMtp5tUvcnAdtHpZTWLPF0M7AgiQsURR2DwmxnJwSy8I3+cY+ozzVvYha3BOLG2TB+L0CqjIz+91htuj6yCXg==", 1546 | "dev": true, 1547 | "dependencies": { 1548 | "ajv": "^8.0.1", 1549 | "lodash.clonedeep": "^4.5.0", 1550 | "lodash.flatten": "^4.4.0", 1551 | "lodash.truncate": "^4.4.2", 1552 | "slice-ansi": "^4.0.0", 1553 | "string-width": "^4.2.0", 1554 | "strip-ansi": "^6.0.0" 1555 | }, 1556 | "engines": { 1557 | "node": ">=10.0.0" 1558 | } 1559 | }, 1560 | "node_modules/table/node_modules/ajv": { 1561 | "version": "8.2.0", 1562 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.2.0.tgz", 1563 | "integrity": "sha512-WSNGFuyWd//XO8n/m/EaOlNLtO0yL8EXT/74LqT4khdhpZjP7lkj/kT5uwRmGitKEVp/Oj7ZUHeGfPtgHhQ5CA==", 1564 | "dev": true, 1565 | "dependencies": { 1566 | "fast-deep-equal": "^3.1.1", 1567 | "json-schema-traverse": "^1.0.0", 1568 | "require-from-string": "^2.0.2", 1569 | "uri-js": "^4.2.2" 1570 | }, 1571 | "funding": { 1572 | "type": "github", 1573 | "url": "https://github.com/sponsors/epoberezkin" 1574 | } 1575 | }, 1576 | "node_modules/table/node_modules/json-schema-traverse": { 1577 | "version": "1.0.0", 1578 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", 1579 | "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", 1580 | "dev": true 1581 | }, 1582 | "node_modules/text-table": { 1583 | "version": "0.2.0", 1584 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 1585 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", 1586 | "dev": true 1587 | }, 1588 | "node_modules/to-regex-range": { 1589 | "version": "5.0.1", 1590 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1591 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1592 | "dev": true, 1593 | "dependencies": { 1594 | "is-number": "^7.0.0" 1595 | }, 1596 | "engines": { 1597 | "node": ">=8.0" 1598 | } 1599 | }, 1600 | "node_modules/tslib": { 1601 | "version": "1.14.1", 1602 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 1603 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", 1604 | "dev": true 1605 | }, 1606 | "node_modules/tsutils": { 1607 | "version": "3.17.1", 1608 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", 1609 | "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", 1610 | "dev": true, 1611 | "dependencies": { 1612 | "tslib": "^1.8.1" 1613 | }, 1614 | "engines": { 1615 | "node": ">= 6" 1616 | } 1617 | }, 1618 | "node_modules/type-check": { 1619 | "version": "0.4.0", 1620 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", 1621 | "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", 1622 | "dev": true, 1623 | "dependencies": { 1624 | "prelude-ls": "^1.2.1" 1625 | }, 1626 | "engines": { 1627 | "node": ">= 0.8.0" 1628 | } 1629 | }, 1630 | "node_modules/type-fest": { 1631 | "version": "0.20.2", 1632 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", 1633 | "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", 1634 | "dev": true, 1635 | "engines": { 1636 | "node": ">=10" 1637 | }, 1638 | "funding": { 1639 | "url": "https://github.com/sponsors/sindresorhus" 1640 | } 1641 | }, 1642 | "node_modules/typescript": { 1643 | "version": "4.2.4", 1644 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", 1645 | "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", 1646 | "dev": true, 1647 | "bin": { 1648 | "tsc": "bin/tsc", 1649 | "tsserver": "bin/tsserver" 1650 | }, 1651 | "engines": { 1652 | "node": ">=4.2.0" 1653 | } 1654 | }, 1655 | "node_modules/uri-js": { 1656 | "version": "4.4.1", 1657 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 1658 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 1659 | "dev": true, 1660 | "dependencies": { 1661 | "punycode": "^2.1.0" 1662 | } 1663 | }, 1664 | "node_modules/v8-compile-cache": { 1665 | "version": "2.1.1", 1666 | "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", 1667 | "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", 1668 | "dev": true 1669 | }, 1670 | "node_modules/which": { 1671 | "version": "2.0.2", 1672 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 1673 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 1674 | "dev": true, 1675 | "dependencies": { 1676 | "isexe": "^2.0.0" 1677 | }, 1678 | "bin": { 1679 | "node-which": "bin/node-which" 1680 | }, 1681 | "engines": { 1682 | "node": ">= 8" 1683 | } 1684 | }, 1685 | "node_modules/word-wrap": { 1686 | "version": "1.2.3", 1687 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", 1688 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", 1689 | "dev": true, 1690 | "engines": { 1691 | "node": ">=0.10.0" 1692 | } 1693 | }, 1694 | "node_modules/wrappy": { 1695 | "version": "1.0.2", 1696 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1697 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1698 | "dev": true 1699 | } 1700 | }, 1701 | "dependencies": { 1702 | "@babel/code-frame": { 1703 | "version": "7.12.11", 1704 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", 1705 | "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", 1706 | "dev": true, 1707 | "requires": { 1708 | "@babel/highlight": "^7.10.4" 1709 | } 1710 | }, 1711 | "@babel/helper-validator-identifier": { 1712 | "version": "7.14.0", 1713 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", 1714 | "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", 1715 | "dev": true 1716 | }, 1717 | "@babel/highlight": { 1718 | "version": "7.14.0", 1719 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", 1720 | "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", 1721 | "dev": true, 1722 | "requires": { 1723 | "@babel/helper-validator-identifier": "^7.14.0", 1724 | "chalk": "^2.0.0", 1725 | "js-tokens": "^4.0.0" 1726 | }, 1727 | "dependencies": { 1728 | "ansi-styles": { 1729 | "version": "3.2.1", 1730 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 1731 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 1732 | "dev": true, 1733 | "requires": { 1734 | "color-convert": "^1.9.0" 1735 | } 1736 | }, 1737 | "chalk": { 1738 | "version": "2.4.2", 1739 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 1740 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 1741 | "dev": true, 1742 | "requires": { 1743 | "ansi-styles": "^3.2.1", 1744 | "escape-string-regexp": "^1.0.5", 1745 | "supports-color": "^5.3.0" 1746 | } 1747 | }, 1748 | "color-convert": { 1749 | "version": "1.9.3", 1750 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 1751 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 1752 | "dev": true, 1753 | "requires": { 1754 | "color-name": "1.1.3" 1755 | } 1756 | }, 1757 | "color-name": { 1758 | "version": "1.1.3", 1759 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 1760 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 1761 | "dev": true 1762 | } 1763 | } 1764 | }, 1765 | "@eslint/eslintrc": { 1766 | "version": "0.4.0", 1767 | "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", 1768 | "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", 1769 | "dev": true, 1770 | "requires": { 1771 | "ajv": "^6.12.4", 1772 | "debug": "^4.1.1", 1773 | "espree": "^7.3.0", 1774 | "globals": "^12.1.0", 1775 | "ignore": "^4.0.6", 1776 | "import-fresh": "^3.2.1", 1777 | "js-yaml": "^3.13.1", 1778 | "minimatch": "^3.0.4", 1779 | "strip-json-comments": "^3.1.1" 1780 | }, 1781 | "dependencies": { 1782 | "globals": { 1783 | "version": "12.4.0", 1784 | "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", 1785 | "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", 1786 | "dev": true, 1787 | "requires": { 1788 | "type-fest": "^0.8.1" 1789 | } 1790 | }, 1791 | "type-fest": { 1792 | "version": "0.8.1", 1793 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", 1794 | "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", 1795 | "dev": true 1796 | } 1797 | } 1798 | }, 1799 | "@nodelib/fs.scandir": { 1800 | "version": "2.1.4", 1801 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", 1802 | "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", 1803 | "dev": true, 1804 | "requires": { 1805 | "@nodelib/fs.stat": "2.0.4", 1806 | "run-parallel": "^1.1.9" 1807 | } 1808 | }, 1809 | "@nodelib/fs.stat": { 1810 | "version": "2.0.4", 1811 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", 1812 | "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", 1813 | "dev": true 1814 | }, 1815 | "@nodelib/fs.walk": { 1816 | "version": "1.2.6", 1817 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", 1818 | "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", 1819 | "dev": true, 1820 | "requires": { 1821 | "@nodelib/fs.scandir": "2.1.4", 1822 | "fastq": "^1.6.0" 1823 | } 1824 | }, 1825 | "@types/json-schema": { 1826 | "version": "7.0.7", 1827 | "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", 1828 | "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==", 1829 | "dev": true 1830 | }, 1831 | "@types/node": { 1832 | "version": "15.0.1", 1833 | "resolved": "https://registry.npmjs.org/@types/node/-/node-15.0.1.tgz", 1834 | "integrity": "sha512-TMkXt0Ck1y0KKsGr9gJtWGjttxlZnnvDtphxUOSd0bfaR6Q1jle+sPvrzNR1urqYTWMinoKvjKfXUGsumaO1PA==", 1835 | "dev": true 1836 | }, 1837 | "@typescript-eslint/eslint-plugin": { 1838 | "version": "4.22.0", 1839 | "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz", 1840 | "integrity": "sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA==", 1841 | "dev": true, 1842 | "requires": { 1843 | "@typescript-eslint/experimental-utils": "4.22.0", 1844 | "@typescript-eslint/scope-manager": "4.22.0", 1845 | "debug": "^4.1.1", 1846 | "functional-red-black-tree": "^1.0.1", 1847 | "lodash": "^4.17.15", 1848 | "regexpp": "^3.0.0", 1849 | "semver": "^7.3.2", 1850 | "tsutils": "^3.17.1" 1851 | } 1852 | }, 1853 | "@typescript-eslint/experimental-utils": { 1854 | "version": "4.22.0", 1855 | "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz", 1856 | "integrity": "sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg==", 1857 | "dev": true, 1858 | "requires": { 1859 | "@types/json-schema": "^7.0.3", 1860 | "@typescript-eslint/scope-manager": "4.22.0", 1861 | "@typescript-eslint/types": "4.22.0", 1862 | "@typescript-eslint/typescript-estree": "4.22.0", 1863 | "eslint-scope": "^5.0.0", 1864 | "eslint-utils": "^2.0.0" 1865 | } 1866 | }, 1867 | "@typescript-eslint/parser": { 1868 | "version": "4.22.0", 1869 | "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.22.0.tgz", 1870 | "integrity": "sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q==", 1871 | "dev": true, 1872 | "requires": { 1873 | "@typescript-eslint/scope-manager": "4.22.0", 1874 | "@typescript-eslint/types": "4.22.0", 1875 | "@typescript-eslint/typescript-estree": "4.22.0", 1876 | "debug": "^4.1.1" 1877 | } 1878 | }, 1879 | "@typescript-eslint/scope-manager": { 1880 | "version": "4.22.0", 1881 | "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz", 1882 | "integrity": "sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q==", 1883 | "dev": true, 1884 | "requires": { 1885 | "@typescript-eslint/types": "4.22.0", 1886 | "@typescript-eslint/visitor-keys": "4.22.0" 1887 | } 1888 | }, 1889 | "@typescript-eslint/types": { 1890 | "version": "4.22.0", 1891 | "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.22.0.tgz", 1892 | "integrity": "sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA==", 1893 | "dev": true 1894 | }, 1895 | "@typescript-eslint/typescript-estree": { 1896 | "version": "4.22.0", 1897 | "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz", 1898 | "integrity": "sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg==", 1899 | "dev": true, 1900 | "requires": { 1901 | "@typescript-eslint/types": "4.22.0", 1902 | "@typescript-eslint/visitor-keys": "4.22.0", 1903 | "debug": "^4.1.1", 1904 | "globby": "^11.0.1", 1905 | "is-glob": "^4.0.1", 1906 | "semver": "^7.3.2", 1907 | "tsutils": "^3.17.1" 1908 | } 1909 | }, 1910 | "@typescript-eslint/visitor-keys": { 1911 | "version": "4.22.0", 1912 | "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz", 1913 | "integrity": "sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw==", 1914 | "dev": true, 1915 | "requires": { 1916 | "@typescript-eslint/types": "4.22.0", 1917 | "eslint-visitor-keys": "^2.0.0" 1918 | } 1919 | }, 1920 | "acorn": { 1921 | "version": "8.2.2", 1922 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.2.tgz", 1923 | "integrity": "sha512-VrMS8kxT0e7J1EX0p6rI/E0FbfOVcvBpbIqHThFv+f8YrZIlMfVotYcXKVPmTvPW8sW5miJzfUFrrvthUZg8VQ==", 1924 | "dev": true 1925 | }, 1926 | "acorn-jsx": { 1927 | "version": "5.3.1", 1928 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", 1929 | "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", 1930 | "dev": true, 1931 | "requires": {} 1932 | }, 1933 | "acorn-walk": { 1934 | "version": "8.1.0", 1935 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.0.tgz", 1936 | "integrity": "sha512-mjmzmv12YIG/G8JQdQuz2MUDShEJ6teYpT5bmWA4q7iwoGen8xtt3twF3OvzIUl+Q06aWIjvnwQUKvQ6TtMRjg==", 1937 | "dev": true 1938 | }, 1939 | "ajv": { 1940 | "version": "6.12.6", 1941 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 1942 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 1943 | "dev": true, 1944 | "requires": { 1945 | "fast-deep-equal": "^3.1.1", 1946 | "fast-json-stable-stringify": "^2.0.0", 1947 | "json-schema-traverse": "^0.4.1", 1948 | "uri-js": "^4.2.2" 1949 | } 1950 | }, 1951 | "ansi-colors": { 1952 | "version": "4.1.1", 1953 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 1954 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 1955 | "dev": true 1956 | }, 1957 | "ansi-regex": { 1958 | "version": "5.0.0", 1959 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 1960 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 1961 | "dev": true 1962 | }, 1963 | "ansi-styles": { 1964 | "version": "4.3.0", 1965 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1966 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1967 | "dev": true, 1968 | "requires": { 1969 | "color-convert": "^2.0.1" 1970 | } 1971 | }, 1972 | "argparse": { 1973 | "version": "1.0.10", 1974 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 1975 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 1976 | "dev": true, 1977 | "requires": { 1978 | "sprintf-js": "~1.0.2" 1979 | } 1980 | }, 1981 | "array-union": { 1982 | "version": "2.1.0", 1983 | "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", 1984 | "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", 1985 | "dev": true 1986 | }, 1987 | "astral-regex": { 1988 | "version": "2.0.0", 1989 | "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", 1990 | "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", 1991 | "dev": true 1992 | }, 1993 | "balanced-match": { 1994 | "version": "1.0.2", 1995 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 1996 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 1997 | "dev": true 1998 | }, 1999 | "brace-expansion": { 2000 | "version": "1.1.11", 2001 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 2002 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 2003 | "dev": true, 2004 | "requires": { 2005 | "balanced-match": "^1.0.0", 2006 | "concat-map": "0.0.1" 2007 | } 2008 | }, 2009 | "braces": { 2010 | "version": "3.0.2", 2011 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 2012 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 2013 | "dev": true, 2014 | "requires": { 2015 | "fill-range": "^7.0.1" 2016 | } 2017 | }, 2018 | "callsites": { 2019 | "version": "3.1.0", 2020 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 2021 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 2022 | "dev": true 2023 | }, 2024 | "chalk": { 2025 | "version": "4.1.0", 2026 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", 2027 | "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", 2028 | "dev": true, 2029 | "requires": { 2030 | "ansi-styles": "^4.1.0", 2031 | "supports-color": "^7.1.0" 2032 | }, 2033 | "dependencies": { 2034 | "has-flag": { 2035 | "version": "4.0.0", 2036 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 2037 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 2038 | "dev": true 2039 | }, 2040 | "supports-color": { 2041 | "version": "7.2.0", 2042 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 2043 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 2044 | "dev": true, 2045 | "requires": { 2046 | "has-flag": "^4.0.0" 2047 | } 2048 | } 2049 | } 2050 | }, 2051 | "color-convert": { 2052 | "version": "2.0.1", 2053 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 2054 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 2055 | "dev": true, 2056 | "requires": { 2057 | "color-name": "~1.1.4" 2058 | } 2059 | }, 2060 | "color-name": { 2061 | "version": "1.1.4", 2062 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 2063 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 2064 | "dev": true 2065 | }, 2066 | "concat-map": { 2067 | "version": "0.0.1", 2068 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 2069 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 2070 | "dev": true 2071 | }, 2072 | "cross-spawn": { 2073 | "version": "7.0.3", 2074 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", 2075 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 2076 | "dev": true, 2077 | "requires": { 2078 | "path-key": "^3.1.0", 2079 | "shebang-command": "^2.0.0", 2080 | "which": "^2.0.1" 2081 | } 2082 | }, 2083 | "debug": { 2084 | "version": "4.2.0", 2085 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", 2086 | "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", 2087 | "dev": true, 2088 | "requires": { 2089 | "ms": "2.1.2" 2090 | } 2091 | }, 2092 | "deep-is": { 2093 | "version": "0.1.3", 2094 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 2095 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 2096 | "dev": true 2097 | }, 2098 | "dir-glob": { 2099 | "version": "3.0.1", 2100 | "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", 2101 | "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", 2102 | "dev": true, 2103 | "requires": { 2104 | "path-type": "^4.0.0" 2105 | } 2106 | }, 2107 | "doctrine": { 2108 | "version": "3.0.0", 2109 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", 2110 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", 2111 | "dev": true, 2112 | "requires": { 2113 | "esutils": "^2.0.2" 2114 | } 2115 | }, 2116 | "emoji-regex": { 2117 | "version": "8.0.0", 2118 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 2119 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 2120 | "dev": true 2121 | }, 2122 | "enquirer": { 2123 | "version": "2.3.6", 2124 | "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", 2125 | "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", 2126 | "dev": true, 2127 | "requires": { 2128 | "ansi-colors": "^4.1.1" 2129 | } 2130 | }, 2131 | "esbuild": { 2132 | "version": "0.11.18", 2133 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.11.18.tgz", 2134 | "integrity": "sha512-KD7v4N9b5B8bxPUNn/3GA9r0HWo4nJk3iwjZ+2zG1ffg+r8ig+wqj7sW6zgI6Sn4/B2FnbzqWxcAokAGGM5zwQ==", 2135 | "dev": true 2136 | }, 2137 | "escape-string-regexp": { 2138 | "version": "1.0.5", 2139 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 2140 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 2141 | "dev": true 2142 | }, 2143 | "eslint": { 2144 | "version": "7.25.0", 2145 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.25.0.tgz", 2146 | "integrity": "sha512-TVpSovpvCNpLURIScDRB6g5CYu/ZFq9GfX2hLNIV4dSBKxIWojeDODvYl3t0k0VtMxYeR8OXPCFE5+oHMlGfhw==", 2147 | "dev": true, 2148 | "requires": { 2149 | "@babel/code-frame": "7.12.11", 2150 | "@eslint/eslintrc": "^0.4.0", 2151 | "ajv": "^6.10.0", 2152 | "chalk": "^4.0.0", 2153 | "cross-spawn": "^7.0.2", 2154 | "debug": "^4.0.1", 2155 | "doctrine": "^3.0.0", 2156 | "enquirer": "^2.3.5", 2157 | "eslint-scope": "^5.1.1", 2158 | "eslint-utils": "^2.1.0", 2159 | "eslint-visitor-keys": "^2.0.0", 2160 | "espree": "^7.3.1", 2161 | "esquery": "^1.4.0", 2162 | "esutils": "^2.0.2", 2163 | "file-entry-cache": "^6.0.1", 2164 | "functional-red-black-tree": "^1.0.1", 2165 | "glob-parent": "^5.0.0", 2166 | "globals": "^13.6.0", 2167 | "ignore": "^4.0.6", 2168 | "import-fresh": "^3.0.0", 2169 | "imurmurhash": "^0.1.4", 2170 | "is-glob": "^4.0.0", 2171 | "js-yaml": "^3.13.1", 2172 | "json-stable-stringify-without-jsonify": "^1.0.1", 2173 | "levn": "^0.4.1", 2174 | "lodash": "^4.17.21", 2175 | "minimatch": "^3.0.4", 2176 | "natural-compare": "^1.4.0", 2177 | "optionator": "^0.9.1", 2178 | "progress": "^2.0.0", 2179 | "regexpp": "^3.1.0", 2180 | "semver": "^7.2.1", 2181 | "strip-ansi": "^6.0.0", 2182 | "strip-json-comments": "^3.1.0", 2183 | "table": "^6.0.4", 2184 | "text-table": "^0.2.0", 2185 | "v8-compile-cache": "^2.0.3" 2186 | } 2187 | }, 2188 | "eslint-scope": { 2189 | "version": "5.1.1", 2190 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", 2191 | "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", 2192 | "dev": true, 2193 | "requires": { 2194 | "esrecurse": "^4.3.0", 2195 | "estraverse": "^4.1.1" 2196 | } 2197 | }, 2198 | "eslint-utils": { 2199 | "version": "2.1.0", 2200 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", 2201 | "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", 2202 | "dev": true, 2203 | "requires": { 2204 | "eslint-visitor-keys": "^1.1.0" 2205 | }, 2206 | "dependencies": { 2207 | "eslint-visitor-keys": { 2208 | "version": "1.3.0", 2209 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", 2210 | "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", 2211 | "dev": true 2212 | } 2213 | } 2214 | }, 2215 | "eslint-visitor-keys": { 2216 | "version": "2.0.0", 2217 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", 2218 | "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", 2219 | "dev": true 2220 | }, 2221 | "espree": { 2222 | "version": "7.3.1", 2223 | "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", 2224 | "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", 2225 | "dev": true, 2226 | "requires": { 2227 | "acorn": "^7.4.0", 2228 | "acorn-jsx": "^5.3.1", 2229 | "eslint-visitor-keys": "^1.3.0" 2230 | }, 2231 | "dependencies": { 2232 | "acorn": { 2233 | "version": "7.4.1", 2234 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", 2235 | "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", 2236 | "dev": true 2237 | }, 2238 | "eslint-visitor-keys": { 2239 | "version": "1.3.0", 2240 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", 2241 | "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", 2242 | "dev": true 2243 | } 2244 | } 2245 | }, 2246 | "esprima": { 2247 | "version": "4.0.1", 2248 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 2249 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 2250 | "dev": true 2251 | }, 2252 | "esquery": { 2253 | "version": "1.4.0", 2254 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", 2255 | "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", 2256 | "dev": true, 2257 | "requires": { 2258 | "estraverse": "^5.1.0" 2259 | }, 2260 | "dependencies": { 2261 | "estraverse": { 2262 | "version": "5.2.0", 2263 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", 2264 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", 2265 | "dev": true 2266 | } 2267 | } 2268 | }, 2269 | "esrecurse": { 2270 | "version": "4.3.0", 2271 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", 2272 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", 2273 | "dev": true, 2274 | "requires": { 2275 | "estraverse": "^5.2.0" 2276 | }, 2277 | "dependencies": { 2278 | "estraverse": { 2279 | "version": "5.2.0", 2280 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", 2281 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", 2282 | "dev": true 2283 | } 2284 | } 2285 | }, 2286 | "estraverse": { 2287 | "version": "4.3.0", 2288 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", 2289 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", 2290 | "dev": true 2291 | }, 2292 | "esutils": { 2293 | "version": "2.0.3", 2294 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 2295 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 2296 | "dev": true 2297 | }, 2298 | "fast-deep-equal": { 2299 | "version": "3.1.3", 2300 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 2301 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 2302 | "dev": true 2303 | }, 2304 | "fast-glob": { 2305 | "version": "3.2.5", 2306 | "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", 2307 | "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", 2308 | "dev": true, 2309 | "requires": { 2310 | "@nodelib/fs.stat": "^2.0.2", 2311 | "@nodelib/fs.walk": "^1.2.3", 2312 | "glob-parent": "^5.1.0", 2313 | "merge2": "^1.3.0", 2314 | "micromatch": "^4.0.2", 2315 | "picomatch": "^2.2.1" 2316 | } 2317 | }, 2318 | "fast-json-stable-stringify": { 2319 | "version": "2.1.0", 2320 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 2321 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 2322 | "dev": true 2323 | }, 2324 | "fast-levenshtein": { 2325 | "version": "2.0.6", 2326 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 2327 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", 2328 | "dev": true 2329 | }, 2330 | "fastq": { 2331 | "version": "1.11.0", 2332 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", 2333 | "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", 2334 | "dev": true, 2335 | "requires": { 2336 | "reusify": "^1.0.4" 2337 | } 2338 | }, 2339 | "file-entry-cache": { 2340 | "version": "6.0.1", 2341 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", 2342 | "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", 2343 | "dev": true, 2344 | "requires": { 2345 | "flat-cache": "^3.0.4" 2346 | } 2347 | }, 2348 | "fill-range": { 2349 | "version": "7.0.1", 2350 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 2351 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 2352 | "dev": true, 2353 | "requires": { 2354 | "to-regex-range": "^5.0.1" 2355 | } 2356 | }, 2357 | "flat-cache": { 2358 | "version": "3.0.4", 2359 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", 2360 | "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", 2361 | "dev": true, 2362 | "requires": { 2363 | "flatted": "^3.1.0", 2364 | "rimraf": "^3.0.2" 2365 | } 2366 | }, 2367 | "flatted": { 2368 | "version": "3.1.1", 2369 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", 2370 | "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", 2371 | "dev": true 2372 | }, 2373 | "fs.realpath": { 2374 | "version": "1.0.0", 2375 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 2376 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 2377 | "dev": true 2378 | }, 2379 | "functional-red-black-tree": { 2380 | "version": "1.0.1", 2381 | "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", 2382 | "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", 2383 | "dev": true 2384 | }, 2385 | "glob": { 2386 | "version": "7.1.6", 2387 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 2388 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 2389 | "dev": true, 2390 | "requires": { 2391 | "fs.realpath": "^1.0.0", 2392 | "inflight": "^1.0.4", 2393 | "inherits": "2", 2394 | "minimatch": "^3.0.4", 2395 | "once": "^1.3.0", 2396 | "path-is-absolute": "^1.0.0" 2397 | } 2398 | }, 2399 | "glob-parent": { 2400 | "version": "5.1.1", 2401 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", 2402 | "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", 2403 | "dev": true, 2404 | "requires": { 2405 | "is-glob": "^4.0.1" 2406 | } 2407 | }, 2408 | "globals": { 2409 | "version": "13.8.0", 2410 | "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", 2411 | "integrity": "sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q==", 2412 | "dev": true, 2413 | "requires": { 2414 | "type-fest": "^0.20.2" 2415 | } 2416 | }, 2417 | "globby": { 2418 | "version": "11.0.3", 2419 | "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", 2420 | "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", 2421 | "dev": true, 2422 | "requires": { 2423 | "array-union": "^2.1.0", 2424 | "dir-glob": "^3.0.1", 2425 | "fast-glob": "^3.1.1", 2426 | "ignore": "^5.1.4", 2427 | "merge2": "^1.3.0", 2428 | "slash": "^3.0.0" 2429 | }, 2430 | "dependencies": { 2431 | "ignore": { 2432 | "version": "5.1.8", 2433 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", 2434 | "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", 2435 | "dev": true 2436 | } 2437 | } 2438 | }, 2439 | "has-flag": { 2440 | "version": "3.0.0", 2441 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 2442 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 2443 | "dev": true 2444 | }, 2445 | "ignore": { 2446 | "version": "4.0.6", 2447 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", 2448 | "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", 2449 | "dev": true 2450 | }, 2451 | "import-fresh": { 2452 | "version": "3.3.0", 2453 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", 2454 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", 2455 | "dev": true, 2456 | "requires": { 2457 | "parent-module": "^1.0.0", 2458 | "resolve-from": "^4.0.0" 2459 | } 2460 | }, 2461 | "imurmurhash": { 2462 | "version": "0.1.4", 2463 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 2464 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 2465 | "dev": true 2466 | }, 2467 | "inflight": { 2468 | "version": "1.0.6", 2469 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 2470 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 2471 | "dev": true, 2472 | "requires": { 2473 | "once": "^1.3.0", 2474 | "wrappy": "1" 2475 | } 2476 | }, 2477 | "inherits": { 2478 | "version": "2.0.4", 2479 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 2480 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 2481 | "dev": true 2482 | }, 2483 | "is-extglob": { 2484 | "version": "2.1.1", 2485 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 2486 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 2487 | "dev": true 2488 | }, 2489 | "is-fullwidth-code-point": { 2490 | "version": "3.0.0", 2491 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 2492 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 2493 | "dev": true 2494 | }, 2495 | "is-glob": { 2496 | "version": "4.0.1", 2497 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 2498 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 2499 | "dev": true, 2500 | "requires": { 2501 | "is-extglob": "^2.1.1" 2502 | } 2503 | }, 2504 | "is-number": { 2505 | "version": "7.0.0", 2506 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 2507 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 2508 | "dev": true 2509 | }, 2510 | "isexe": { 2511 | "version": "2.0.0", 2512 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 2513 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 2514 | "dev": true 2515 | }, 2516 | "js-tokens": { 2517 | "version": "4.0.0", 2518 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 2519 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 2520 | "dev": true 2521 | }, 2522 | "js-yaml": { 2523 | "version": "3.14.1", 2524 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", 2525 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 2526 | "dev": true, 2527 | "requires": { 2528 | "argparse": "^1.0.7", 2529 | "esprima": "^4.0.0" 2530 | } 2531 | }, 2532 | "json-schema-traverse": { 2533 | "version": "0.4.1", 2534 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 2535 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 2536 | "dev": true 2537 | }, 2538 | "json-stable-stringify-without-jsonify": { 2539 | "version": "1.0.1", 2540 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 2541 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", 2542 | "dev": true 2543 | }, 2544 | "levn": { 2545 | "version": "0.4.1", 2546 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", 2547 | "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", 2548 | "dev": true, 2549 | "requires": { 2550 | "prelude-ls": "^1.2.1", 2551 | "type-check": "~0.4.0" 2552 | } 2553 | }, 2554 | "lodash": { 2555 | "version": "4.17.21", 2556 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 2557 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 2558 | "dev": true 2559 | }, 2560 | "lodash.clonedeep": { 2561 | "version": "4.5.0", 2562 | "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", 2563 | "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", 2564 | "dev": true 2565 | }, 2566 | "lodash.flatten": { 2567 | "version": "4.4.0", 2568 | "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", 2569 | "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", 2570 | "dev": true 2571 | }, 2572 | "lodash.truncate": { 2573 | "version": "4.4.2", 2574 | "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", 2575 | "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", 2576 | "dev": true 2577 | }, 2578 | "merge2": { 2579 | "version": "1.4.1", 2580 | "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", 2581 | "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", 2582 | "dev": true 2583 | }, 2584 | "micromatch": { 2585 | "version": "4.0.4", 2586 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", 2587 | "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", 2588 | "dev": true, 2589 | "requires": { 2590 | "braces": "^3.0.1", 2591 | "picomatch": "^2.2.3" 2592 | } 2593 | }, 2594 | "minimatch": { 2595 | "version": "3.0.4", 2596 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 2597 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 2598 | "dev": true, 2599 | "requires": { 2600 | "brace-expansion": "^1.1.7" 2601 | } 2602 | }, 2603 | "ms": { 2604 | "version": "2.1.2", 2605 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 2606 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 2607 | "dev": true 2608 | }, 2609 | "natural-compare": { 2610 | "version": "1.4.0", 2611 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 2612 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", 2613 | "dev": true 2614 | }, 2615 | "once": { 2616 | "version": "1.4.0", 2617 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 2618 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 2619 | "dev": true, 2620 | "requires": { 2621 | "wrappy": "1" 2622 | } 2623 | }, 2624 | "optionator": { 2625 | "version": "0.9.1", 2626 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", 2627 | "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", 2628 | "dev": true, 2629 | "requires": { 2630 | "deep-is": "^0.1.3", 2631 | "fast-levenshtein": "^2.0.6", 2632 | "levn": "^0.4.1", 2633 | "prelude-ls": "^1.2.1", 2634 | "type-check": "^0.4.0", 2635 | "word-wrap": "^1.2.3" 2636 | } 2637 | }, 2638 | "parent-module": { 2639 | "version": "1.0.1", 2640 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 2641 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 2642 | "dev": true, 2643 | "requires": { 2644 | "callsites": "^3.0.0" 2645 | } 2646 | }, 2647 | "path-is-absolute": { 2648 | "version": "1.0.1", 2649 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 2650 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 2651 | "dev": true 2652 | }, 2653 | "path-key": { 2654 | "version": "3.1.1", 2655 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 2656 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 2657 | "dev": true 2658 | }, 2659 | "path-type": { 2660 | "version": "4.0.0", 2661 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", 2662 | "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", 2663 | "dev": true 2664 | }, 2665 | "picomatch": { 2666 | "version": "2.2.3", 2667 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", 2668 | "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", 2669 | "dev": true 2670 | }, 2671 | "prelude-ls": { 2672 | "version": "1.2.1", 2673 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", 2674 | "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", 2675 | "dev": true 2676 | }, 2677 | "progress": { 2678 | "version": "2.0.3", 2679 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", 2680 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", 2681 | "dev": true 2682 | }, 2683 | "punycode": { 2684 | "version": "2.1.1", 2685 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 2686 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 2687 | "dev": true 2688 | }, 2689 | "queue-microtask": { 2690 | "version": "1.2.3", 2691 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", 2692 | "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", 2693 | "dev": true 2694 | }, 2695 | "regexpp": { 2696 | "version": "3.1.0", 2697 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", 2698 | "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", 2699 | "dev": true 2700 | }, 2701 | "require-from-string": { 2702 | "version": "2.0.2", 2703 | "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", 2704 | "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", 2705 | "dev": true 2706 | }, 2707 | "resolve-from": { 2708 | "version": "4.0.0", 2709 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 2710 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 2711 | "dev": true 2712 | }, 2713 | "reusify": { 2714 | "version": "1.0.4", 2715 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", 2716 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", 2717 | "dev": true 2718 | }, 2719 | "rimraf": { 2720 | "version": "3.0.2", 2721 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", 2722 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", 2723 | "dev": true, 2724 | "requires": { 2725 | "glob": "^7.1.3" 2726 | } 2727 | }, 2728 | "run-parallel": { 2729 | "version": "1.2.0", 2730 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", 2731 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", 2732 | "dev": true, 2733 | "requires": { 2734 | "queue-microtask": "^1.2.2" 2735 | } 2736 | }, 2737 | "semver": { 2738 | "version": "7.3.2", 2739 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", 2740 | "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", 2741 | "dev": true 2742 | }, 2743 | "shebang-command": { 2744 | "version": "2.0.0", 2745 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 2746 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 2747 | "dev": true, 2748 | "requires": { 2749 | "shebang-regex": "^3.0.0" 2750 | } 2751 | }, 2752 | "shebang-regex": { 2753 | "version": "3.0.0", 2754 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 2755 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 2756 | "dev": true 2757 | }, 2758 | "slash": { 2759 | "version": "3.0.0", 2760 | "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", 2761 | "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", 2762 | "dev": true 2763 | }, 2764 | "slice-ansi": { 2765 | "version": "4.0.0", 2766 | "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", 2767 | "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", 2768 | "dev": true, 2769 | "requires": { 2770 | "ansi-styles": "^4.0.0", 2771 | "astral-regex": "^2.0.0", 2772 | "is-fullwidth-code-point": "^3.0.0" 2773 | } 2774 | }, 2775 | "sprintf-js": { 2776 | "version": "1.0.3", 2777 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 2778 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 2779 | "dev": true 2780 | }, 2781 | "string-width": { 2782 | "version": "4.2.2", 2783 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 2784 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 2785 | "dev": true, 2786 | "requires": { 2787 | "emoji-regex": "^8.0.0", 2788 | "is-fullwidth-code-point": "^3.0.0", 2789 | "strip-ansi": "^6.0.0" 2790 | } 2791 | }, 2792 | "strip-ansi": { 2793 | "version": "6.0.0", 2794 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 2795 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 2796 | "dev": true, 2797 | "requires": { 2798 | "ansi-regex": "^5.0.0" 2799 | } 2800 | }, 2801 | "strip-json-comments": { 2802 | "version": "3.1.1", 2803 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 2804 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 2805 | "dev": true 2806 | }, 2807 | "supports-color": { 2808 | "version": "5.5.0", 2809 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 2810 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 2811 | "dev": true, 2812 | "requires": { 2813 | "has-flag": "^3.0.0" 2814 | } 2815 | }, 2816 | "table": { 2817 | "version": "6.6.0", 2818 | "resolved": "https://registry.npmjs.org/table/-/table-6.6.0.tgz", 2819 | "integrity": "sha512-iZMtp5tUvcnAdtHpZTWLPF0M7AgiQsURR2DwmxnJwSy8I3+cY+ozzVvYha3BOLG2TB+L0CqjIz+91htuj6yCXg==", 2820 | "dev": true, 2821 | "requires": { 2822 | "ajv": "^8.0.1", 2823 | "lodash.clonedeep": "^4.5.0", 2824 | "lodash.flatten": "^4.4.0", 2825 | "lodash.truncate": "^4.4.2", 2826 | "slice-ansi": "^4.0.0", 2827 | "string-width": "^4.2.0", 2828 | "strip-ansi": "^6.0.0" 2829 | }, 2830 | "dependencies": { 2831 | "ajv": { 2832 | "version": "8.2.0", 2833 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.2.0.tgz", 2834 | "integrity": "sha512-WSNGFuyWd//XO8n/m/EaOlNLtO0yL8EXT/74LqT4khdhpZjP7lkj/kT5uwRmGitKEVp/Oj7ZUHeGfPtgHhQ5CA==", 2835 | "dev": true, 2836 | "requires": { 2837 | "fast-deep-equal": "^3.1.1", 2838 | "json-schema-traverse": "^1.0.0", 2839 | "require-from-string": "^2.0.2", 2840 | "uri-js": "^4.2.2" 2841 | } 2842 | }, 2843 | "json-schema-traverse": { 2844 | "version": "1.0.0", 2845 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", 2846 | "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", 2847 | "dev": true 2848 | } 2849 | } 2850 | }, 2851 | "text-table": { 2852 | "version": "0.2.0", 2853 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 2854 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", 2855 | "dev": true 2856 | }, 2857 | "to-regex-range": { 2858 | "version": "5.0.1", 2859 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 2860 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 2861 | "dev": true, 2862 | "requires": { 2863 | "is-number": "^7.0.0" 2864 | } 2865 | }, 2866 | "tslib": { 2867 | "version": "1.14.1", 2868 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 2869 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", 2870 | "dev": true 2871 | }, 2872 | "tsutils": { 2873 | "version": "3.17.1", 2874 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", 2875 | "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", 2876 | "dev": true, 2877 | "requires": { 2878 | "tslib": "^1.8.1" 2879 | } 2880 | }, 2881 | "type-check": { 2882 | "version": "0.4.0", 2883 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", 2884 | "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", 2885 | "dev": true, 2886 | "requires": { 2887 | "prelude-ls": "^1.2.1" 2888 | } 2889 | }, 2890 | "type-fest": { 2891 | "version": "0.20.2", 2892 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", 2893 | "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", 2894 | "dev": true 2895 | }, 2896 | "typescript": { 2897 | "version": "4.2.4", 2898 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", 2899 | "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", 2900 | "dev": true 2901 | }, 2902 | "uri-js": { 2903 | "version": "4.4.1", 2904 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 2905 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 2906 | "dev": true, 2907 | "requires": { 2908 | "punycode": "^2.1.0" 2909 | } 2910 | }, 2911 | "v8-compile-cache": { 2912 | "version": "2.1.1", 2913 | "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", 2914 | "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", 2915 | "dev": true 2916 | }, 2917 | "which": { 2918 | "version": "2.0.2", 2919 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 2920 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 2921 | "dev": true, 2922 | "requires": { 2923 | "isexe": "^2.0.0" 2924 | } 2925 | }, 2926 | "word-wrap": { 2927 | "version": "1.2.3", 2928 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", 2929 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", 2930 | "dev": true 2931 | }, 2932 | "wrappy": { 2933 | "version": "1.0.2", 2934 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2935 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 2936 | "dev": true 2937 | } 2938 | } 2939 | } 2940 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "esbuild-macros", 3 | "version": "0.0.0", 4 | "description": "Macro example", 5 | "main": "index.ts", 6 | "type": "module", 7 | "license": "MIT", 8 | "author": "Gen Hames", 9 | "repository": { 10 | "type": "git", 11 | "url": "https://gitlab.com/nthm/esbuild-macros" 12 | }, 13 | "scripts": { 14 | "run-macro-acorn-walk": "cd macro-acorn-walk && node index.js", 15 | "run-macro-esbuild-plugin": "cd macro-esbuild-plugin && esbuild --bundle index.ts --outfile=dist/build.js --external:esbuild --format=esm --platform=node && node dist/build.js", 16 | "run-macro-regex": "cd macro-regex && node index.js" 17 | }, 18 | "devDependencies": { 19 | "@types/node": "^15.0.1", 20 | "@typescript-eslint/eslint-plugin": "^4.22.0", 21 | "@typescript-eslint/parser": "^4.22.0", 22 | "acorn": "^8.2.1", 23 | "acorn-walk": "^8.1.0", 24 | "esbuild": "^0.11.15", 25 | "eslint": "^7.25.0", 26 | "typescript": "^4.2.4" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Using Babel-Macros without Babel 2 | 3 | **Latest attempt is at **./macro-acorn-walk** 4 | 5 | This started as an attempt to port babel-macros to esbuild, but after a few 6 | different attempts I'm now using Acorn to parse a bundle into an AST and doing 7 | tricky find-and-replace using the location indices. It's a single AST pass and 8 | there's no serializaton - only slicing of the original JS code string. 9 | 10 | The idea is to use esbuild to bundle everything and transpile JSX/TS but leave 11 | macros as "external". Then replace the macros in the bundle using Acorn. Lastly 12 | I'll have to patch the source map using magicstring (see notes.md). 13 | 14 | ## Theory of macros and how they intersect with esbuild 15 | 16 | There's no AST API for esbuild, so trying to replace the macro code is either 17 | via reparsing the AST (i.e Babel) or doing using regexes. **Most macros will 18 | need access to a full AST API and are better off using Babel than esbuild**. For 19 | my case, I wanted to port _styletakeout.macro_[1] which extracts CSS-in-JS, and 20 | I figured this wasn't complex enough to require AST operations. Is it possible 21 | to take out CSS via `` css`...` `` tag template extraction? 22 | 23 | There are plugins for esbuild, but to support macros means an `fs.readFile` on 24 | every single file to see if it has an import... That's not great. How expensive 25 | is an AST parse? How efficient can replacing macros be without getting in 26 | esbuild's way (interrupting parallelism by using plugins etc). 27 | 28 | ## Does natively including macro support in esbuild make sense? 29 | 30 | If a general purpose algorithm for doing extraction and replacement of macros 31 | could be realized as a proof-of-concept (in JS via regex) then it could marketed 32 | to esbuild as a feature request - ideally to leverage their AST to do extraction 33 | properly (not regex) and in parallel in Go, then making one (1) call to Node to 34 | have all "snippets" evaluated and dropped into the final bundle. That way, 35 | unlike plugins which have to make one Node/Go call per file, a macro would make 36 | only one (1) call. 37 | 38 | Originally I wrote _./macro-esbuild-plugin_ as an attempt to work as an esbuild 39 | plugin that extracts the macros per-file on import. It was to see if I could 40 | replace macros "generally" via regex. It looked for function calls, tag 41 | templates, and dot-notation of objects (see regex). 42 | 43 | It worked for my case, in _macros/styletakeout.macro/example.ts_, but I got hung 44 | up on the usecases beyond CSS-in-JS (notice how this repo references a handful 45 | of macros that I was trying to convince myself with...). 46 | 47 | I'm not sure if there's a sufficient usecase to warrant a PoC/PR into esbuild 48 | itself. It's _more_ complicated than the existing plugin architecture. 49 | 50 | ## Is there a general case for extracting macros? 51 | 52 | Macros have so many applications, right? Well. Macro authors can go wild with 53 | the AST operations, and that kind of API will never be part of esbuild. Is there 54 | enough demand for macros without an AST API available? Having `` tag`...` `` 55 | would at least support css, preval, ms, sql, gql, etc but all of that is before 56 | you consider `${...}` interpolation and *nesting* oof... 57 | 58 | Imagine `` stripIndent`...` `` macro with ``${() => stripIndent`...`}`` inside 59 | of it. That's... not improbable; in JS that's fine. In macros... How do you even 60 | pass a reference *without* the AST? No way. Then do you pass strings of code 61 | (?!) and their (overlapping) source indices? Do a topological sort on the order 62 | of processing the macros? Devs will also want the filename information, per 63 | file. It's messy :( 64 | 65 | Even without considering nesting there's the issue of "when does a macro end?". 66 | Such as `` tag`...`(1,2,3) `` - Does the macro dev want the (1,2,3)? Or do we 67 | pass it since it's all "part-of-the-same-expression"? In ASTExplorer you'll find 68 | that it's not really possible to say "this is the whole expression". Then people 69 | writing macros will ask (for their extracted code) _"am I in a JSX expression? a 70 | string? a function?"_. There's a real macro for Lavarel-interop that imports a 71 | database model `import { Articles } ...` and does chaining with it: 72 | `Articles.where('...').first()`. There's zero chance of supporting that without 73 | an AST. In Babel that's fine, walk the entire AST, but in esbuild *at most* it 74 | will be passing a substring of code... 75 | 76 | There's no "general purpose" macro extraction with regexes alone, but there's 77 | room between blind regexing and full AST manipulation/serialization - I can use 78 | an AST to provide location indices (starts/ends of JS syntax) to not be so blind 79 | in regex replacements, then find-and-replace sections of the JS code string 80 | without involving the AST. 81 | 82 | ## Regex-only macros 83 | 84 | It's not good to try and support all macros this way, but, there are some simple 85 | macros which might be able to work well with regexes alone. 86 | 87 | Isn't it too easy to trip up any kind of regex-based extraction method? Yes and 88 | that's what parsers are for, but specifically for the case of tag templates with 89 | very basic interpolation support that disallows nesting, it works. 90 | 91 | If I have to do regex-only work then doing it on the bundle from esbuild is much 92 | easier than doing per-file preprocessing which would need to support flexible 93 | code styles (aka linting) and detect broken JS. Working after esbuild also means 94 | the code is already validated and normalized. Yes, the macro code string might 95 | still be broken, but that's per-macro: i.e CSS-in-JS macro would use Stylis' to 96 | parse CSS. Lastly, there's also only one (1) import for the macro (its marked as 97 | external in esbuild). (Edit: Sorry that's not true 98 | https://github.com/evanw/esbuild/issues/475) 99 | 100 | I want it to not be fragile though, so supporting nesting and complex 101 | interpolation is a must. I can do that with an AST and `eval()`... 102 | 103 | ### Regex-only CSS-in-JS 104 | 105 | For CSS tag templates, aside from nesting `${...}`, I think the only case of "`" 106 | is escaped \` in `` css`content: 'abc\`ohno\`xyz';`. ``. Thankfully there's a 107 | regex to handle that. Hmm `` css`...${`...`}...`. `` will break too. (TODO?) 108 | 109 | ### Regex-only failed/partial extraction detection using `eval()` 110 | 111 | You can't just count "{" and "}" characters, and I don't want to write a parser, 112 | but y'know who has a fast parser? JS runtimes. If you `eval()` it in Node with a 113 | defined `` css`...` `` function that throws for broken code (including `${}`) 114 | that's perfect. Ideally it throws _before_ passing to Stylis, because I don't 115 | want Stylis to try and parse a broken template expression that leaks JS - I 116 | don't know Stylis enough to know how it'd throw and in the worst case it would 117 | carry on silently and lead to a debugging nightmare. 118 | 119 | I've never used `eval()` before. 🤞 120 | 121 | ### Regexes 122 | 123 | - `` /css`((?:[^`\\]|\\.)*)`/ `` should handle escaped \`. 124 | - `` /([^\w.])/css`...`/ `` will force "css" to start like `\b` does, but also 125 | with "." to prevent objects like `` some.thing.css`...` ``. 126 | 127 | Notice that these are _incredibly_ macro-specific... 128 | 129 | For esbuild minification, imports will change to something short like "t". Which 130 | is questionable to search for. JS scopes might cause esbuild to reuse the 131 | variable name in a place that doesn't conflict, so there could, in the smallest 132 | edge case, be the use of `` t`...` `` somewhere that does _and_ doesn't refer to 133 | the macro. I wanted to use `define` to make this even less likely, but no luck. 134 | 135 | 1. Carry on as normal and pretend it's not an issue 136 | 2. Use a default import since esbuild doesn't minify propeties on those and the 137 | autocomplete/highlighting in VSCode works for `` styled.xyz`...` `` so I'd be 138 | regexing `` t.css`...` `` or `` t.injectGlobal`...` `` which is maybe safer? 139 | 3. Does injecting eval() might prevent the imports from being minified? 140 | 141 | Actually #3 is ruled out from esbuild docs - kills minification on the whole 142 | file and is very bad. 143 | 144 | I don't want to do #2 prematurely so I'll assume esbuild doesn't reuse 145 | identifiers and try #1. 146 | 147 | Update (months later): It seems esbuild _never_ reuses variables which is very 148 | nice. I'll have to ask Evan if this can be relied upon. It lets me do a single 149 | AST pass in Acorn instead of needing to do one sweep just to get identifiers and 150 | determine who shadows who. 151 | 152 | ## AST+Regex macros 153 | 154 | This is the current attempt, and is in _./macro-acorn-walk_. I'll likely publish 155 | it similar to "acorn-globals" which is a generic string-in-string-out npm 156 | package for detecting global variables from a JS code string. This is 157 | independent of any other tools/bundlers. 158 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "strict": true, 7 | "baseUrl": ".", 8 | "paths": { 9 | "styletakeout.macro": [ 10 | "./macros/styletakeout.macro/styletakeout.macro.ts" 11 | ] 12 | }, 13 | }, 14 | "exclude": [ 15 | "node_modules" 16 | ] 17 | } 18 | --------------------------------------------------------------------------------