diff --git a/.eslintrc b/.eslintrc index 924f0426..8aaf920c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,10 +1,7 @@ { "root": true, "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint", - "prettier" - ], + "plugins": ["@typescript-eslint", "prettier"], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", @@ -12,7 +9,7 @@ "prettier" ], "rules": { - "no-console": 1, // Means warning + "no-console": 1, // Means warning "prettier/prettier": 2 // Means error } -} \ No newline at end of file +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d477077..9cba5003 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,12 +14,12 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 16 - registry-url: 'https://registry.npmjs.org' + registry-url: "https://registry.npmjs.org" - name: Install dependencies and build 🔧 run: npm ci && npm run build - - name: Run lint + - name: Run lint run: npm run lint - - name: Run tests + - name: Run tests run: npm run test - name: Package module run: npm pack @@ -33,4 +33,4 @@ jobs: uses: actions/upload-artifact@v1 with: name: esptool-js-${{ steps.version.outputs.version }}.tgz - path: esptool-js-${{ steps.version.outputs.version }}.tgz \ No newline at end of file + path: esptool-js-${{ steps.version.outputs.version }}.tgz diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 80506a92..6767a8e9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,12 +11,12 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 16 - registry-url: 'https://registry.npmjs.org' + registry-url: "https://registry.npmjs.org" - name: Install dependencies and build 🔧 run: npm ci && npm run build - - name: Run lint + - name: Run lint run: npm run lint - - name: Run tests + - name: Run tests run: npm run test - name: Package module run: npm pack @@ -52,4 +52,4 @@ jobs: - name: Publish package on NPM 📦 run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index e0ba1ce8..76add878 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ node_modules -lib -bundle.js -esptool-js-*.tgz \ No newline at end of file +dist \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index 73e070e8..36b35631 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,3 @@ { - "printWidth": 120, - "trailingComma": "all" -} \ No newline at end of file + "trailingComma": "none" +} diff --git a/package.json b/package.json index 1d48e930..c8139c64 100644 --- a/package.json +++ b/package.json @@ -9,15 +9,10 @@ "bundle.js" ], "scripts": { - "build": "npm run clean && tsc", - "clean": "rimraf lib bundle.js", - "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"", - "lint": "eslint . --ext .ts", - "lintAndFix": "eslint . --ext .ts --fix", - "prepare": "npm run build", - "test": "echo \"Error: no test specified\"", - "prepublishOnly": "npm run test && npm run lint", - "rollup": "npm run build && rollup --config" + "build": "tsc", + "format:check": "prettier --check . && eslint src/**/*.ts", + "format:fix": "prettier --write . && eslint --fix src/**/*.ts", + "rollup": "rollup --config" }, "repository": { "type": "git", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 00000000..f50d98e1 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,2061 @@ +lockfileVersion: 5.4 + +specifiers: + "@rollup/plugin-babel": ^6.0.2 + "@rollup/plugin-commonjs": ^23.0.2 + "@rollup/plugin-node-resolve": ^15.0.1 + "@rollup/plugin-terser": ^0.1.0 + "@types/pako": ^2.0.0 + "@types/w3c-web-serial": ^1.0.3 + "@typescript-eslint/eslint-plugin": ^5.43.0 + "@typescript-eslint/parser": ^5.43.0 + babel-loader: ^9.1.0 + crypto-js: ^4.0.0 + eslint: ^8.28.0 + eslint-config-prettier: ^8.5.0 + eslint-plugin-prettier: ^4.2.1 + pako: ^2.1.0 + prettier: ^2.7.1 + rimraf: ^3.0.2 + rollup: ^3.3.0 + tslib: ^2.4.1 + typescript: ^4.8.4 + xterm: ^4.13.0 + +dependencies: + crypto-js: 4.1.1 + pako: 2.1.0 + tslib: 2.4.1 + xterm: 4.19.0 + +devDependencies: + "@rollup/plugin-babel": 6.0.3_rollup@3.9.1 + "@rollup/plugin-commonjs": 23.0.7_rollup@3.9.1 + "@rollup/plugin-node-resolve": 15.0.1_rollup@3.9.1 + "@rollup/plugin-terser": 0.1.0_rollup@3.9.1 + "@types/pako": 2.0.0 + "@types/w3c-web-serial": 1.0.3 + "@typescript-eslint/eslint-plugin": 5.48.1_3jon24igvnqaqexgwtxk6nkpse + "@typescript-eslint/parser": 5.48.1_iukboom6ndih5an6iafl45j2fe + babel-loader: 9.1.2 + eslint: 8.31.0 + eslint-config-prettier: 8.6.0_eslint@8.31.0 + eslint-plugin-prettier: 4.2.1_iu5s7nk6dw7o3tajefwfiqfmge + prettier: 2.8.2 + rimraf: 3.0.2 + rollup: 3.9.1 + typescript: 4.9.4 + +packages: + /@babel/helper-module-imports/7.18.6: + resolution: + { + integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== + } + engines: { node: ">=6.9.0" } + dependencies: + "@babel/types": 7.20.7 + dev: true + + /@babel/helper-string-parser/7.19.4: + resolution: + { + integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== + } + engines: { node: ">=6.9.0" } + dev: true + + /@babel/helper-validator-identifier/7.19.1: + resolution: + { + integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + } + engines: { node: ">=6.9.0" } + dev: true + + /@babel/types/7.20.7: + resolution: + { + integrity: sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg== + } + engines: { node: ">=6.9.0" } + dependencies: + "@babel/helper-string-parser": 7.19.4 + "@babel/helper-validator-identifier": 7.19.1 + to-fast-properties: 2.0.0 + dev: true + + /@eslint/eslintrc/1.4.1: + resolution: + { + integrity: sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 9.4.1 + globals: 13.19.0 + ignore: 5.2.4 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@humanwhocodes/config-array/0.11.8: + resolution: + { + integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== + } + engines: { node: ">=10.10.0" } + dependencies: + "@humanwhocodes/object-schema": 1.2.1 + debug: 4.3.4 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@humanwhocodes/module-importer/1.0.1: + resolution: + { + integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + } + engines: { node: ">=12.22" } + dev: true + + /@humanwhocodes/object-schema/1.2.1: + resolution: + { + integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + } + dev: true + + /@jridgewell/gen-mapping/0.3.2: + resolution: + { + integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + } + engines: { node: ">=6.0.0" } + dependencies: + "@jridgewell/set-array": 1.1.2 + "@jridgewell/sourcemap-codec": 1.4.14 + "@jridgewell/trace-mapping": 0.3.17 + dev: true + + /@jridgewell/resolve-uri/3.1.0: + resolution: + { + integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + } + engines: { node: ">=6.0.0" } + dev: true + + /@jridgewell/set-array/1.1.2: + resolution: + { + integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + } + engines: { node: ">=6.0.0" } + dev: true + + /@jridgewell/source-map/0.3.2: + resolution: + { + integrity: sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== + } + dependencies: + "@jridgewell/gen-mapping": 0.3.2 + "@jridgewell/trace-mapping": 0.3.17 + dev: true + + /@jridgewell/sourcemap-codec/1.4.14: + resolution: + { + integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + } + dev: true + + /@jridgewell/trace-mapping/0.3.17: + resolution: + { + integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== + } + dependencies: + "@jridgewell/resolve-uri": 3.1.0 + "@jridgewell/sourcemap-codec": 1.4.14 + dev: true + + /@nodelib/fs.scandir/2.1.5: + resolution: + { + integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + } + engines: { node: ">= 8" } + dependencies: + "@nodelib/fs.stat": 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat/2.0.5: + resolution: + { + integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + } + engines: { node: ">= 8" } + dev: true + + /@nodelib/fs.walk/1.2.8: + resolution: + { + integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + } + engines: { node: ">= 8" } + dependencies: + "@nodelib/fs.scandir": 2.1.5 + fastq: 1.15.0 + dev: true + + /@rollup/plugin-babel/6.0.3_rollup@3.9.1: + resolution: + { + integrity: sha512-fKImZKppa1A/gX73eg4JGo+8kQr/q1HBQaCGKECZ0v4YBBv3lFqi14+7xyApECzvkLTHCifx+7ntcrvtBIRcpg== + } + engines: { node: ">=14.0.0" } + peerDependencies: + "@babel/core": ^7.0.0 + "@types/babel__core": ^7.1.9 + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + "@types/babel__core": + optional: true + rollup: + optional: true + dependencies: + "@babel/helper-module-imports": 7.18.6 + "@rollup/pluginutils": 5.0.2_rollup@3.9.1 + rollup: 3.9.1 + dev: true + + /@rollup/plugin-commonjs/23.0.7_rollup@3.9.1: + resolution: + { + integrity: sha512-hsSD5Qzyuat/swzrExGG5l7EuIlPhwTsT7KwKbSCQzIcJWjRxiimi/0tyMYY2bByitNb3i1p+6JWEDGa0NvT0Q== + } + engines: { node: ">=14.0.0" } + peerDependencies: + rollup: ^2.68.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + "@rollup/pluginutils": 5.0.2_rollup@3.9.1 + commondir: 1.0.1 + estree-walker: 2.0.2 + glob: 8.0.3 + is-reference: 1.2.1 + magic-string: 0.27.0 + rollup: 3.9.1 + dev: true + + /@rollup/plugin-node-resolve/15.0.1_rollup@3.9.1: + resolution: + { + integrity: sha512-ReY88T7JhJjeRVbfCyNj+NXAG3IIsVMsX9b5/9jC98dRP8/yxlZdz7mHZbHk5zHr24wZZICS5AcXsFZAXYUQEg== + } + engines: { node: ">=14.0.0" } + peerDependencies: + rollup: ^2.78.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + "@rollup/pluginutils": 5.0.2_rollup@3.9.1 + "@types/resolve": 1.20.2 + deepmerge: 4.2.2 + is-builtin-module: 3.2.0 + is-module: 1.0.0 + resolve: 1.22.1 + rollup: 3.9.1 + dev: true + + /@rollup/plugin-terser/0.1.0_rollup@3.9.1: + resolution: + { + integrity: sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ== + } + engines: { node: ">=14.0.0" } + peerDependencies: + rollup: ^2.x || ^3.x + peerDependenciesMeta: + rollup: + optional: true + dependencies: + rollup: 3.9.1 + terser: 5.16.1 + dev: true + + /@rollup/pluginutils/5.0.2_rollup@3.9.1: + resolution: + { + integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA== + } + engines: { node: ">=14.0.0" } + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + "@types/estree": 1.0.0 + estree-walker: 2.0.2 + picomatch: 2.3.1 + rollup: 3.9.1 + dev: true + + /@types/estree/1.0.0: + resolution: + { + integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== + } + dev: true + + /@types/json-schema/7.0.11: + resolution: + { + integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + } + dev: true + + /@types/pako/2.0.0: + resolution: + { + integrity: sha512-10+iaz93qR5WYxTo+PMifD5TSxiOtdRaxBf7INGGXMQgTCu8Z/7GYWYFUOS3q/G0nE5boj1r4FEB+WSy7s5gbA== + } + dev: true + + /@types/resolve/1.20.2: + resolution: + { + integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== + } + dev: true + + /@types/semver/7.3.13: + resolution: + { + integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== + } + dev: true + + /@types/w3c-web-serial/1.0.3: + resolution: + { + integrity: sha512-R4J/OjqKAUFQoXVIkaUTfzb/sl6hLh/ZhDTfowJTRMa7LhgEmI/jXV4zsL1u8HpNa853BxwNmDIr0pauizzwSQ== + } + dev: true + + /@typescript-eslint/eslint-plugin/5.48.1_3jon24igvnqaqexgwtxk6nkpse: + resolution: + { + integrity: sha512-9nY5K1Rp2ppmpb9s9S2aBiF3xo5uExCehMDmYmmFqqyxgenbHJ3qbarcLt4ITgaD6r/2ypdlcFRdcuVPnks+fQ== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + peerDependencies: + "@typescript-eslint/parser": ^5.0.0 + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: "*" + peerDependenciesMeta: + typescript: + optional: true + dependencies: + "@typescript-eslint/parser": 5.48.1_iukboom6ndih5an6iafl45j2fe + "@typescript-eslint/scope-manager": 5.48.1 + "@typescript-eslint/type-utils": 5.48.1_iukboom6ndih5an6iafl45j2fe + "@typescript-eslint/utils": 5.48.1_iukboom6ndih5an6iafl45j2fe + debug: 4.3.4 + eslint: 8.31.0 + ignore: 5.2.4 + natural-compare-lite: 1.4.0 + regexpp: 3.2.0 + semver: 7.3.8 + tsutils: 3.21.0_typescript@4.9.4 + typescript: 4.9.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser/5.48.1_iukboom6ndih5an6iafl45j2fe: + resolution: + { + integrity: sha512-4yg+FJR/V1M9Xoq56SF9Iygqm+r5LMXvheo6DQ7/yUWynQ4YfCRnsKuRgqH4EQ5Ya76rVwlEpw4Xu+TgWQUcdA== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: "*" + peerDependenciesMeta: + typescript: + optional: true + dependencies: + "@typescript-eslint/scope-manager": 5.48.1 + "@typescript-eslint/types": 5.48.1 + "@typescript-eslint/typescript-estree": 5.48.1_typescript@4.9.4 + debug: 4.3.4 + eslint: 8.31.0 + typescript: 4.9.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/scope-manager/5.48.1: + resolution: + { + integrity: sha512-S035ueRrbxRMKvSTv9vJKIWgr86BD8s3RqoRZmsSh/s8HhIs90g6UlK8ZabUSjUZQkhVxt7nmZ63VJ9dcZhtDQ== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + dependencies: + "@typescript-eslint/types": 5.48.1 + "@typescript-eslint/visitor-keys": 5.48.1 + dev: true + + /@typescript-eslint/type-utils/5.48.1_iukboom6ndih5an6iafl45j2fe: + resolution: + { + integrity: sha512-Hyr8HU8Alcuva1ppmqSYtM/Gp0q4JOp1F+/JH5D1IZm/bUBrV0edoewQZiEc1r6I8L4JL21broddxK8HAcZiqQ== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + peerDependencies: + eslint: "*" + typescript: "*" + peerDependenciesMeta: + typescript: + optional: true + dependencies: + "@typescript-eslint/typescript-estree": 5.48.1_typescript@4.9.4 + "@typescript-eslint/utils": 5.48.1_iukboom6ndih5an6iafl45j2fe + debug: 4.3.4 + eslint: 8.31.0 + tsutils: 3.21.0_typescript@4.9.4 + typescript: 4.9.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/types/5.48.1: + resolution: + { + integrity: sha512-xHyDLU6MSuEEdIlzrrAerCGS3T7AA/L8Hggd0RCYBi0w3JMvGYxlLlXHeg50JI9Tfg5MrtsfuNxbS/3zF1/ATg== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + dev: true + + /@typescript-eslint/typescript-estree/5.48.1_typescript@4.9.4: + resolution: + { + integrity: sha512-Hut+Osk5FYr+sgFh8J/FHjqX6HFcDzTlWLrFqGoK5kVUN3VBHF/QzZmAsIXCQ8T/W9nQNBTqalxi1P3LSqWnRA== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + peerDependencies: + typescript: "*" + peerDependenciesMeta: + typescript: + optional: true + dependencies: + "@typescript-eslint/types": 5.48.1 + "@typescript-eslint/visitor-keys": 5.48.1 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.3.8 + tsutils: 3.21.0_typescript@4.9.4 + typescript: 4.9.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils/5.48.1_iukboom6ndih5an6iafl45j2fe: + resolution: + { + integrity: sha512-SmQuSrCGUOdmGMwivW14Z0Lj8dxG1mOFZ7soeJ0TQZEJcs3n5Ndgkg0A4bcMFzBELqLJ6GTHnEU+iIoaD6hFGA== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + "@types/json-schema": 7.0.11 + "@types/semver": 7.3.13 + "@typescript-eslint/scope-manager": 5.48.1 + "@typescript-eslint/types": 5.48.1 + "@typescript-eslint/typescript-estree": 5.48.1_typescript@4.9.4 + eslint: 8.31.0 + eslint-scope: 5.1.1 + eslint-utils: 3.0.0_eslint@8.31.0 + semver: 7.3.8 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys/5.48.1: + resolution: + { + integrity: sha512-Ns0XBwmfuX7ZknznfXozgnydyR8F6ev/KEGePP4i74uL3ArsKbEhJ7raeKr1JSa997DBDwol/4a0Y+At82c9dA== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + dependencies: + "@typescript-eslint/types": 5.48.1 + eslint-visitor-keys: 3.3.0 + dev: true + + /acorn-jsx/5.3.2_acorn@8.8.1: + resolution: + { + integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + } + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + acorn: 8.8.1 + dev: true + + /acorn/8.8.1: + resolution: + { + integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== + } + engines: { node: ">=0.4.0" } + hasBin: true + dev: true + + /ajv-formats/2.1.1: + resolution: + { + integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== + } + peerDependenciesMeta: + ajv: + optional: true + dependencies: + ajv: 8.12.0 + dev: true + + /ajv-keywords/5.1.0_ajv@8.12.0: + resolution: + { + integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== + } + peerDependencies: + ajv: ^8.8.2 + dependencies: + ajv: 8.12.0 + fast-deep-equal: 3.1.3 + dev: true + + /ajv/6.12.6: + resolution: + { + integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + } + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + dev: true + + /ajv/8.12.0: + resolution: + { + integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + } + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + dev: true + + /ansi-regex/5.0.1: + resolution: + { + integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + } + engines: { node: ">=8" } + dev: true + + /ansi-styles/4.3.0: + resolution: + { + integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + } + engines: { node: ">=8" } + dependencies: + color-convert: 2.0.1 + dev: true + + /argparse/2.0.1: + resolution: + { + integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + } + dev: true + + /array-union/2.1.0: + resolution: + { + integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + } + engines: { node: ">=8" } + dev: true + + /babel-loader/9.1.2: + resolution: + { + integrity: sha512-mN14niXW43tddohGl8HPu5yfQq70iUThvFL/4QzESA7GcZoC0eVOhvWdQ8+3UlSjaDE9MVtsW9mxDY07W7VpVA== + } + engines: { node: ">= 14.15.0" } + peerDependencies: + "@babel/core": ^7.12.0 + webpack: ">=5" + dependencies: + find-cache-dir: 3.3.2 + schema-utils: 4.0.0 + dev: true + + /balanced-match/1.0.2: + resolution: + { + integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + } + dev: true + + /brace-expansion/1.1.11: + resolution: + { + integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + } + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /brace-expansion/2.0.1: + resolution: + { + integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + } + dependencies: + balanced-match: 1.0.2 + dev: true + + /braces/3.0.2: + resolution: + { + integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + } + engines: { node: ">=8" } + dependencies: + fill-range: 7.0.1 + dev: true + + /buffer-from/1.1.2: + resolution: + { + integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + } + dev: true + + /builtin-modules/3.3.0: + resolution: + { + integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== + } + engines: { node: ">=6" } + dev: true + + /callsites/3.1.0: + resolution: + { + integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + } + engines: { node: ">=6" } + dev: true + + /chalk/4.1.2: + resolution: + { + integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + } + engines: { node: ">=10" } + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /color-convert/2.0.1: + resolution: + { + integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + } + engines: { node: ">=7.0.0" } + dependencies: + color-name: 1.1.4 + dev: true + + /color-name/1.1.4: + resolution: + { + integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + } + dev: true + + /commander/2.20.3: + resolution: + { + integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + } + dev: true + + /commondir/1.0.1: + resolution: + { + integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== + } + dev: true + + /concat-map/0.0.1: + resolution: { integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= } + dev: true + + /cross-spawn/7.0.3: + resolution: + { + integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + } + engines: { node: ">= 8" } + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true + + /crypto-js/4.1.1: + resolution: + { + integrity: sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw== + } + dev: false + + /debug/4.3.4: + resolution: + { + integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + } + engines: { node: ">=6.0" } + peerDependencies: + supports-color: "*" + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + + /deep-is/0.1.4: + resolution: + { + integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + } + dev: true + + /deepmerge/4.2.2: + resolution: + { + integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== + } + engines: { node: ">=0.10.0" } + dev: true + + /dir-glob/3.0.1: + resolution: + { + integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + } + engines: { node: ">=8" } + dependencies: + path-type: 4.0.0 + dev: true + + /doctrine/3.0.0: + resolution: + { + integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + } + engines: { node: ">=6.0.0" } + dependencies: + esutils: 2.0.3 + dev: true + + /escape-string-regexp/4.0.0: + resolution: + { + integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + } + engines: { node: ">=10" } + dev: true + + /eslint-config-prettier/8.6.0_eslint@8.31.0: + resolution: + { + integrity: sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA== + } + hasBin: true + peerDependencies: + eslint: ">=7.0.0" + dependencies: + eslint: 8.31.0 + dev: true + + /eslint-plugin-prettier/4.2.1_iu5s7nk6dw7o3tajefwfiqfmge: + resolution: + { + integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== + } + engines: { node: ">=12.0.0" } + peerDependencies: + eslint: ">=7.28.0" + eslint-config-prettier: "*" + prettier: ">=2.0.0" + peerDependenciesMeta: + eslint-config-prettier: + optional: true + dependencies: + eslint: 8.31.0 + eslint-config-prettier: 8.6.0_eslint@8.31.0 + prettier: 2.8.2 + prettier-linter-helpers: 1.0.0 + dev: true + + /eslint-scope/5.1.1: + resolution: + { + integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + } + engines: { node: ">=8.0.0" } + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + dev: true + + /eslint-scope/7.1.1: + resolution: + { + integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true + + /eslint-utils/3.0.0_eslint@8.31.0: + resolution: + { + integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + } + engines: { node: ^10.0.0 || ^12.0.0 || >= 14.0.0 } + peerDependencies: + eslint: ">=5" + dependencies: + eslint: 8.31.0 + eslint-visitor-keys: 2.1.0 + dev: true + + /eslint-visitor-keys/2.1.0: + resolution: + { + integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + } + engines: { node: ">=10" } + dev: true + + /eslint-visitor-keys/3.3.0: + resolution: + { + integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + dev: true + + /eslint/8.31.0: + resolution: + { + integrity: sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + hasBin: true + dependencies: + "@eslint/eslintrc": 1.4.1 + "@humanwhocodes/config-array": 0.11.8 + "@humanwhocodes/module-importer": 1.0.1 + "@nodelib/fs.walk": 1.2.8 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.4 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.1.1 + eslint-utils: 3.0.0_eslint@8.31.0 + eslint-visitor-keys: 3.3.0 + espree: 9.4.1 + esquery: 1.4.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.19.0 + grapheme-splitter: 1.0.4 + ignore: 5.2.4 + import-fresh: 3.3.0 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-sdsl: 4.2.0 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.1 + regexpp: 3.2.0 + strip-ansi: 6.0.1 + strip-json-comments: 3.1.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + dev: true + + /espree/9.4.1: + resolution: + { + integrity: sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + dependencies: + acorn: 8.8.1 + acorn-jsx: 5.3.2_acorn@8.8.1 + eslint-visitor-keys: 3.3.0 + dev: true + + /esquery/1.4.0: + resolution: + { + integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + } + engines: { node: ">=0.10" } + dependencies: + estraverse: 5.3.0 + dev: true + + /esrecurse/4.3.0: + resolution: + { + integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + } + engines: { node: ">=4.0" } + dependencies: + estraverse: 5.3.0 + dev: true + + /estraverse/4.3.0: + resolution: + { + integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + } + engines: { node: ">=4.0" } + dev: true + + /estraverse/5.3.0: + resolution: + { + integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + } + engines: { node: ">=4.0" } + dev: true + + /estree-walker/2.0.2: + resolution: + { + integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + } + dev: true + + /esutils/2.0.3: + resolution: + { + integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + } + engines: { node: ">=0.10.0" } + dev: true + + /fast-deep-equal/3.1.3: + resolution: + { + integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + } + dev: true + + /fast-diff/1.2.0: + resolution: + { + integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + } + dev: true + + /fast-glob/3.2.12: + resolution: + { + integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== + } + engines: { node: ">=8.6.0" } + dependencies: + "@nodelib/fs.stat": 2.0.5 + "@nodelib/fs.walk": 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + + /fast-json-stable-stringify/2.1.0: + resolution: + { + integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + } + dev: true + + /fast-levenshtein/2.0.6: + resolution: + { + integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + } + dev: true + + /fastq/1.15.0: + resolution: + { + integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + } + dependencies: + reusify: 1.0.4 + dev: true + + /file-entry-cache/6.0.1: + resolution: + { + integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + } + engines: { node: ^10.12.0 || >=12.0.0 } + dependencies: + flat-cache: 3.0.4 + dev: true + + /fill-range/7.0.1: + resolution: + { + integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + } + engines: { node: ">=8" } + dependencies: + to-regex-range: 5.0.1 + dev: true + + /find-cache-dir/3.3.2: + resolution: + { + integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== + } + engines: { node: ">=8" } + dependencies: + commondir: 1.0.1 + make-dir: 3.1.0 + pkg-dir: 4.2.0 + dev: true + + /find-up/4.1.0: + resolution: + { + integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + } + engines: { node: ">=8" } + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + dev: true + + /find-up/5.0.0: + resolution: + { + integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + } + engines: { node: ">=10" } + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: true + + /flat-cache/3.0.4: + resolution: + { + integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + } + engines: { node: ^10.12.0 || >=12.0.0 } + dependencies: + flatted: 3.2.7 + rimraf: 3.0.2 + dev: true + + /flatted/3.2.7: + resolution: + { + integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== + } + dev: true + + /fs.realpath/1.0.0: + resolution: + { + integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + } + dev: true + + /fsevents/2.3.2: + resolution: + { + integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + } + engines: { node: ^8.16.0 || ^10.6.0 || >=11.0.0 } + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /function-bind/1.1.1: + resolution: + { + integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + } + dev: true + + /glob-parent/5.1.2: + resolution: + { + integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + } + engines: { node: ">= 6" } + dependencies: + is-glob: 4.0.3 + dev: true + + /glob-parent/6.0.2: + resolution: + { + integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + } + engines: { node: ">=10.13.0" } + dependencies: + is-glob: 4.0.3 + dev: true + + /glob/7.2.3: + resolution: + { + integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + } + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /glob/8.0.3: + resolution: + { + integrity: sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== + } + engines: { node: ">=12" } + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.2 + once: 1.4.0 + dev: true + + /globals/13.19.0: + resolution: + { + integrity: sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ== + } + engines: { node: ">=8" } + dependencies: + type-fest: 0.20.2 + dev: true + + /globby/11.1.0: + resolution: + { + integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + } + engines: { node: ">=10" } + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.2.12 + ignore: 5.2.4 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + + /grapheme-splitter/1.0.4: + resolution: + { + integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + } + dev: true + + /has-flag/4.0.0: + resolution: + { + integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + } + engines: { node: ">=8" } + dev: true + + /has/1.0.3: + resolution: + { + integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + } + engines: { node: ">= 0.4.0" } + dependencies: + function-bind: 1.1.1 + dev: true + + /ignore/5.2.4: + resolution: + { + integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + } + engines: { node: ">= 4" } + dev: true + + /import-fresh/3.3.0: + resolution: + { + integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + } + engines: { node: ">=6" } + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + dev: true + + /imurmurhash/0.1.4: + resolution: + { + integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + } + engines: { node: ">=0.8.19" } + dev: true + + /inflight/1.0.6: + resolution: + { + integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + } + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits/2.0.4: + resolution: + { + integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + } + dev: true + + /is-builtin-module/3.2.0: + resolution: + { + integrity: sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw== + } + engines: { node: ">=6" } + dependencies: + builtin-modules: 3.3.0 + dev: true + + /is-core-module/2.11.0: + resolution: + { + integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== + } + dependencies: + has: 1.0.3 + dev: true + + /is-extglob/2.1.1: + resolution: + { + integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + } + engines: { node: ">=0.10.0" } + dev: true + + /is-glob/4.0.3: + resolution: + { + integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + } + engines: { node: ">=0.10.0" } + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-module/1.0.0: + resolution: + { + integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g== + } + dev: true + + /is-number/7.0.0: + resolution: + { + integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + } + engines: { node: ">=0.12.0" } + dev: true + + /is-path-inside/3.0.3: + resolution: + { + integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + } + engines: { node: ">=8" } + dev: true + + /is-reference/1.2.1: + resolution: + { + integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== + } + dependencies: + "@types/estree": 1.0.0 + dev: true + + /isexe/2.0.0: + resolution: + { + integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + } + dev: true + + /js-sdsl/4.2.0: + resolution: + { + integrity: sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ== + } + dev: true + + /js-yaml/4.1.0: + resolution: + { + integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + } + hasBin: true + dependencies: + argparse: 2.0.1 + dev: true + + /json-schema-traverse/0.4.1: + resolution: + { + integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + } + dev: true + + /json-schema-traverse/1.0.0: + resolution: + { + integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + } + dev: true + + /json-stable-stringify-without-jsonify/1.0.1: + resolution: + { + integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + } + dev: true + + /levn/0.4.1: + resolution: + { + integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + } + engines: { node: ">= 0.8.0" } + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + + /locate-path/5.0.0: + resolution: + { + integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + } + engines: { node: ">=8" } + dependencies: + p-locate: 4.1.0 + dev: true + + /locate-path/6.0.0: + resolution: + { + integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + } + engines: { node: ">=10" } + dependencies: + p-locate: 5.0.0 + dev: true + + /lodash.merge/4.6.2: + resolution: + { + integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + } + dev: true + + /lru-cache/6.0.0: + resolution: + { + integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + } + engines: { node: ">=10" } + dependencies: + yallist: 4.0.0 + dev: true + + /magic-string/0.27.0: + resolution: + { + integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA== + } + engines: { node: ">=12" } + dependencies: + "@jridgewell/sourcemap-codec": 1.4.14 + dev: true + + /make-dir/3.1.0: + resolution: + { + integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + } + engines: { node: ">=8" } + dependencies: + semver: 6.3.0 + dev: true + + /merge2/1.4.1: + resolution: + { + integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + } + engines: { node: ">= 8" } + dev: true + + /micromatch/4.0.5: + resolution: + { + integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + } + engines: { node: ">=8.6" } + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + + /minimatch/3.1.2: + resolution: + { + integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + } + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimatch/5.1.2: + resolution: + { + integrity: sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg== + } + engines: { node: ">=10" } + dependencies: + brace-expansion: 2.0.1 + dev: true + + /ms/2.1.2: + resolution: + { + integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + } + dev: true + + /natural-compare-lite/1.4.0: + resolution: + { + integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + } + dev: true + + /natural-compare/1.4.0: + resolution: + { + integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + } + dev: true + + /once/1.4.0: + resolution: + { + integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + } + dependencies: + wrappy: 1.0.2 + dev: true + + /optionator/0.9.1: + resolution: + { + integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + } + engines: { node: ">= 0.8.0" } + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.3 + dev: true + + /p-limit/2.3.0: + resolution: + { + integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + } + engines: { node: ">=6" } + dependencies: + p-try: 2.2.0 + dev: true + + /p-limit/3.1.0: + resolution: + { + integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + } + engines: { node: ">=10" } + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-locate/4.1.0: + resolution: + { + integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + } + engines: { node: ">=8" } + dependencies: + p-limit: 2.3.0 + dev: true + + /p-locate/5.0.0: + resolution: + { + integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + } + engines: { node: ">=10" } + dependencies: + p-limit: 3.1.0 + dev: true + + /p-try/2.2.0: + resolution: + { + integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + } + engines: { node: ">=6" } + dev: true + + /pako/2.1.0: + resolution: + { + integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== + } + dev: false + + /parent-module/1.0.1: + resolution: + { + integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + } + engines: { node: ">=6" } + dependencies: + callsites: 3.1.0 + dev: true + + /path-exists/4.0.0: + resolution: + { + integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + } + engines: { node: ">=8" } + dev: true + + /path-is-absolute/1.0.1: + resolution: + { + integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + } + engines: { node: ">=0.10.0" } + dev: true + + /path-key/3.1.1: + resolution: + { + integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + } + engines: { node: ">=8" } + dev: true + + /path-parse/1.0.7: + resolution: + { + integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + } + dev: true + + /path-type/4.0.0: + resolution: + { + integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + } + engines: { node: ">=8" } + dev: true + + /picomatch/2.3.1: + resolution: + { + integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + } + engines: { node: ">=8.6" } + dev: true + + /pkg-dir/4.2.0: + resolution: + { + integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + } + engines: { node: ">=8" } + dependencies: + find-up: 4.1.0 + dev: true + + /prelude-ls/1.2.1: + resolution: + { + integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + } + engines: { node: ">= 0.8.0" } + dev: true + + /prettier-linter-helpers/1.0.0: + resolution: + { + integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + } + engines: { node: ">=6.0.0" } + dependencies: + fast-diff: 1.2.0 + dev: true + + /prettier/2.8.2: + resolution: + { + integrity: sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw== + } + engines: { node: ">=10.13.0" } + hasBin: true + dev: true + + /punycode/2.2.0: + resolution: + { + integrity: sha512-LN6QV1IJ9ZhxWTNdktaPClrNfp8xdSAYS0Zk2ddX7XsXZAxckMHPCBcHRo0cTcEIgYPRiGEkmji3Idkh2yFtYw== + } + engines: { node: ">=6" } + dev: true + + /queue-microtask/1.2.3: + resolution: + { + integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + } + dev: true + + /regexpp/3.2.0: + resolution: + { + integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + } + engines: { node: ">=8" } + dev: true + + /require-from-string/2.0.2: + resolution: + { + integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + } + engines: { node: ">=0.10.0" } + dev: true + + /resolve-from/4.0.0: + resolution: + { + integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + } + engines: { node: ">=4" } + dev: true + + /resolve/1.22.1: + resolution: + { + integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + } + hasBin: true + dependencies: + is-core-module: 2.11.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /reusify/1.0.4: + resolution: + { + integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + } + engines: { iojs: ">=1.0.0", node: ">=0.10.0" } + dev: true + + /rimraf/3.0.2: + resolution: + { + integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + } + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /rollup/3.9.1: + resolution: + { + integrity: sha512-GswCYHXftN8ZKGVgQhTFUJB/NBXxrRGgO2NCy6E8s1rwEJ4Q9/VttNqcYfEvx4dTo4j58YqdC3OVztPzlKSX8w== + } + engines: { node: ">=14.18.0", npm: ">=8.0.0" } + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /run-parallel/1.2.0: + resolution: + { + integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + } + dependencies: + queue-microtask: 1.2.3 + dev: true + + /schema-utils/4.0.0: + resolution: + { + integrity: sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== + } + engines: { node: ">= 12.13.0" } + dependencies: + "@types/json-schema": 7.0.11 + ajv: 8.12.0 + ajv-formats: 2.1.1 + ajv-keywords: 5.1.0_ajv@8.12.0 + dev: true + + /semver/6.3.0: + resolution: + { + integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + } + hasBin: true + dev: true + + /semver/7.3.8: + resolution: + { + integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + } + engines: { node: ">=10" } + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + + /shebang-command/2.0.0: + resolution: + { + integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + } + engines: { node: ">=8" } + dependencies: + shebang-regex: 3.0.0 + dev: true + + /shebang-regex/3.0.0: + resolution: + { + integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + } + engines: { node: ">=8" } + dev: true + + /slash/3.0.0: + resolution: + { + integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + } + engines: { node: ">=8" } + dev: true + + /source-map-support/0.5.21: + resolution: + { + integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + } + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map/0.6.1: + resolution: + { + integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + } + engines: { node: ">=0.10.0" } + dev: true + + /strip-ansi/6.0.1: + resolution: + { + integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + } + engines: { node: ">=8" } + dependencies: + ansi-regex: 5.0.1 + dev: true + + /strip-json-comments/3.1.1: + resolution: + { + integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + } + engines: { node: ">=8" } + dev: true + + /supports-color/7.2.0: + resolution: + { + integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + } + engines: { node: ">=8" } + dependencies: + has-flag: 4.0.0 + dev: true + + /supports-preserve-symlinks-flag/1.0.0: + resolution: + { + integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + } + engines: { node: ">= 0.4" } + dev: true + + /terser/5.16.1: + resolution: + { + integrity: sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw== + } + engines: { node: ">=10" } + hasBin: true + dependencies: + "@jridgewell/source-map": 0.3.2 + acorn: 8.8.1 + commander: 2.20.3 + source-map-support: 0.5.21 + dev: true + + /text-table/0.2.0: + resolution: + { + integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + } + dev: true + + /to-fast-properties/2.0.0: + resolution: + { + integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + } + engines: { node: ">=4" } + dev: true + + /to-regex-range/5.0.1: + resolution: + { + integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + } + engines: { node: ">=8.0" } + dependencies: + is-number: 7.0.0 + dev: true + + /tslib/1.14.1: + resolution: + { + integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + } + dev: true + + /tslib/2.4.1: + resolution: + { + integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== + } + dev: false + + /tsutils/3.21.0_typescript@4.9.4: + resolution: + { + integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + } + engines: { node: ">= 6" } + peerDependencies: + typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + dependencies: + tslib: 1.14.1 + typescript: 4.9.4 + dev: true + + /type-check/0.4.0: + resolution: + { + integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + } + engines: { node: ">= 0.8.0" } + dependencies: + prelude-ls: 1.2.1 + dev: true + + /type-fest/0.20.2: + resolution: + { + integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + } + engines: { node: ">=10" } + dev: true + + /typescript/4.9.4: + resolution: + { + integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== + } + engines: { node: ">=4.2.0" } + hasBin: true + dev: true + + /uri-js/4.4.1: + resolution: + { + integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + } + dependencies: + punycode: 2.2.0 + dev: true + + /which/2.0.2: + resolution: + { + integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + } + engines: { node: ">= 8" } + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /word-wrap/1.2.3: + resolution: + { + integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + } + engines: { node: ">=0.10.0" } + dev: true + + /wrappy/1.0.2: + resolution: + { + integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + } + dev: true + + /xterm/4.19.0: + resolution: + { + integrity: sha512-c3Cp4eOVsYY5Q839dR5IejghRPpxciGmLWWaP9g+ppfMeBChMeLa1DCA+pmX/jyDZ+zxFOmlJL/82qVdayVoGQ== + } + dev: false + + /yallist/4.0.0: + resolution: + { + integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + } + dev: true + + /yocto-queue/0.1.0: + resolution: + { + integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + } + engines: { node: ">=10" } + dev: true diff --git a/rollup.config.js b/rollup.config.js index e0a2124f..ea61a28c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,26 +1,30 @@ -const resolve = require('@rollup/plugin-node-resolve'); -const babel = require("@rollup/plugin-babel"); -const commonjs = require('@rollup/plugin-commonjs'); -const terser = require('@rollup/plugin-terser'); +const resolve = require("@rollup/plugin-node-resolve"); +const babel = require("@rollup/plugin-babel"); +const commonjs = require("@rollup/plugin-commonjs"); +const terser = require("@rollup/plugin-terser"); // rollup.config.js /** * @type {import('rollup').RollupOptions} */ const config = { - input: 'lib/index.js', + input: "lib/index.js", output: { name: "esptooljs", - file: 'bundle.js', - format: 'es', + file: "bundle.js", + format: "es", inlineDynamicImports: true }, plugins: [ resolve(), commonjs(), - babel({ exclude: 'node_modules/**', babelHelpers: "runtime", skipPreflightCheck: true }), + babel({ + exclude: "node_modules/**", + babelHelpers: "runtime", + skipPreflightCheck: true + }), terser() - ], + ] }; module.exports.default = config; diff --git a/src/error.ts b/src/error.ts index fe5ec187..836ee0fa 100644 --- a/src/error.ts +++ b/src/error.ts @@ -1,5 +1,3 @@ -class ESPError extends Error {} +export class ESPError extends Error {} -class TimeoutError extends ESPError {} - -export { ESPError, TimeoutError }; +export class TimeoutError extends ESPError {} diff --git a/src/esploader.ts b/src/esploader.ts index db58731c..3eed791f 100644 --- a/src/esploader.ts +++ b/src/esploader.ts @@ -1,34 +1,37 @@ -import { ESPError } from "./error"; -import { inflate, deflate } from "pako"; +import { deflate, inflate } from "pako"; + +import { ESPError } from "./error.js"; +import { ESP32ROM } from "./targets/esp32.js"; +import { ESP32C3ROM } from "./targets/esp32c3.js"; +import { ESP32S2ROM } from "./targets/esp32s2.js"; +import { ESP32S3ROM } from "./targets/esp32s3.js"; +import { ESP8266ROM } from "./targets/esp8266"; +import { ROM } from "./targets/rom.js"; import { Transport } from "./webserial"; -import { ROM } from "./targets/rom"; -async function magic2Chip(magic: number): Promise { - switch (magic) { - case 0x00f01d83: { - const { ESP32ROM } = await import("./targets/esp32"); - return new ESP32ROM(); - } - case 0x6921506f: - case 0x1b31506f: { - const { ESP32C3ROM } = await import("./targets/esp32c3"); - return new ESP32C3ROM(); - } - case 0x09: { - const { ESP32S3ROM } = await import("./targets/esp32s3"); - return new ESP32S3ROM(); - } - case 0x000007c6: { - const { ESP32S2ROM } = await import("./targets/esp32s2"); - return new ESP32S2ROM(); - } - case 0xfff0c101: { - const { ESP8266ROM } = await import("./targets/esp8266"); - return new ESP8266ROM(); - } - default: - return null; - } +const magicToChip = new Map([ + [0x00f01d83, new ESP32ROM()], + [0x6921506f, new ESP32C3ROM()], // ESP32C3 eco 1+2 + [0x1b31506f, new ESP32C3ROM()], // ESP32C3 eco3 + [0x09, new ESP32S3ROM()], // + [0x000007c6, new ESP32S2ROM()], + [0xfff0c101, new ESP8266ROM()] +]); + +export interface fileType { + data: Uint8Array; + address: number; +} + +export enum deviceCmd { + ESP_FLASH_BEGIN = 0x02, + ESP_FLASH_DATA = 0x03, + ESP_FLASH_END = 0x04, + ESP_MEM_BEGIN = 0x05, + ESP_MEM_END = 0x06, + ESP_MEM_DATA = 0x07, + ESP_WRITE_REG = 0x09, + ESP_READ_REG = 0x0a } export interface IEspLoaderTerminal { @@ -39,14 +42,6 @@ export interface IEspLoaderTerminal { export class ESPLoader { ESP_RAM_BLOCK = 0x1800; - ESP_FLASH_BEGIN = 0x02; - ESP_FLASH_DATA = 0x03; - ESP_FLASH_END = 0x04; - ESP_MEM_BEGIN = 0x05; - ESP_MEM_END = 0x06; - ESP_MEM_DATA = 0x07; - ESP_WRITE_REG = 0x09; - ESP_READ_REG = 0x0a; ESP_SPI_ATTACH = 0x0d; ESP_CHANGE_BAUDRATE = 0x0f; @@ -74,15 +69,15 @@ export class ESPLoader { CHIP_DETECT_MAGIC_REG_ADDR = 0x40001000; - DETECTED_FLASH_SIZES: { [key: number]: string } = { - 0x12: "256KB", - 0x13: "512KB", - 0x14: "1MB", - 0x15: "2MB", - 0x16: "4MB", - 0x17: "8MB", - 0x18: "16MB", - }; + public DETECTED_FLASH_SIZES = new Map([ + [0x12, "256KB"], + [0x13, "512KB"], + [0x14, "1MB"], + [0x15, "2MB"], + [0x16, "4MB"], + [0x17, "8MB"], + [0x18, "16MB"] + ]); chip: ROM; IS_STUB: boolean; @@ -92,7 +87,7 @@ export class ESPLoader { public transport: Transport, private baudrate: number, private terminal: IEspLoaderTerminal, - private rom_baudrate = 115200, + private rom_baudrate = 115200 ) { this.IS_STUB = false; this.chip = null; @@ -130,7 +125,12 @@ export class ESPLoader { } _int_to_bytearray(i: number): Uint8Array { - return new Uint8Array([i & 0xff, (i >> 8) & 0xff, (i >> 16) & 0xff, (i >> 24) & 0xff]); + return new Uint8Array([ + i & 0xff, + (i >> 8) & 0xff, + (i >> 16) & 0xff, + (i >> 24) & 0xff + ]); } _bytearray_to_short(i: number, j: number) { @@ -184,7 +184,7 @@ export class ESPLoader { data: Uint8Array = new Uint8Array(0), chk = 0, waitResponse = true, - timeout = 3000, + timeout = 3000 ): Promise<[number, Uint8Array]> { //console.log("command "+ op + " " + wait_response + " " + timeout); if (op != null) { @@ -232,26 +232,48 @@ export class ESPLoader { throw new ESPError("invalid response"); } - async read_reg(addr: number, timeout = 3000) { - const pkt = this._int_to_bytearray(addr); - const val = await this.command(this.ESP_READ_REG, pkt, undefined, undefined, timeout); + async readRegister(address: number, timeout = 3000) { + const pkt = this._int_to_bytearray(address); + const val = await this.command( + deviceCmd.ESP_READ_REG, + pkt, + undefined, + undefined, + timeout + ); return val[0]; } // { addr, value, mask = 0xffffffff, delay_us = 0, delay_after_us = 0 } = {} - async write_reg(addr: number, value: number, mask = 0xffffffff, delay_us = 0, delay_after_us = 0) { - let pkt = this._appendArray(this._int_to_bytearray(addr), this._int_to_bytearray(value)); + async writeRegister( + address: number, + value: number, + mask = 0xffffffff, + delay_us = 0, + delay_after_us = 0 + ) { + let pkt = this._appendArray( + this._int_to_bytearray(address), + this._int_to_bytearray(value) + ); pkt = this._appendArray(pkt, this._int_to_bytearray(mask)); pkt = this._appendArray(pkt, this._int_to_bytearray(delay_us)); if (delay_after_us > 0) { - pkt = this._appendArray(pkt, this._int_to_bytearray(this.chip.UART_DATE_REG_ADDR)); + pkt = this._appendArray( + pkt, + this._int_to_bytearray(this.chip.UART_DATE_REG_ADDR) + ); pkt = this._appendArray(pkt, this._int_to_bytearray(0)); pkt = this._appendArray(pkt, this._int_to_bytearray(0)); pkt = this._appendArray(pkt, this._int_to_bytearray(delay_after_us)); } - await this.check_command("write target memory", this.ESP_WRITE_REG, pkt); + await this.checkCommand( + "write target memory", + deviceCmd.ESP_WRITE_REG, + pkt + ); } async sync() { @@ -356,16 +378,19 @@ export class ESPLoader { await this.flush_input(); if (!detecting) { - const chip_magic_value = (await this.read_reg(0x40001000)) >>> 0; - this.log("Chip Magic " + chip_magic_value.toString(16)); - this.chip = await magic2Chip(chip_magic_value); - if (this.chip === null) { - throw new ESPError(`Unexpected CHIP magic value ${chip_magic_value}. Failed to autodetect chip type.`); + const chipMagicValue = (await this.readRegister(0x40001000)) >>> 0; + this.log("Chip Magic " + chipMagicValue.toString(16)); + if (magicToChip.has(chipMagicValue)) { + this.chip = magicToChip.get(chipMagicValue); + } else { + throw new ESPError( + `Unexpected CHIP magic value ${chipMagicValue}. Failed to autodetect chip type.` + ); } } } - async detect_chip(mode = "default_reset") { + async detectChip(mode = "default_reset") { await this.connect(mode); this.write_char("Detecting chip type... "); if (this.chip != null) { @@ -374,12 +399,12 @@ export class ESPLoader { } // { op_description = "", op = null, data = [], chk = 0, timeout = 3000 } = {} - async check_command( + async checkCommand( op_description = "", op: number | null = null, data: Uint8Array = new Uint8Array(0), chk = 0, - timeout = 3000, + timeout = 3000 ) { this.log("check_command " + op_description); const resp = await this.command(op, data, chk, undefined, timeout); @@ -390,13 +415,34 @@ export class ESPLoader { } } - async mem_begin(size: number, blocks: number, blocksize: number, offset: number) { + async memoryBegin( + size: number, + blocks: number, + blocksize: number, + offset: number + ) { /* XXX: Add check to ensure that STUB is not getting overwritten */ - this.log("mem_begin " + size + " " + blocks + " " + blocksize + " " + offset.toString(16)); - let pkt = this._appendArray(this._int_to_bytearray(size), this._int_to_bytearray(blocks)); + this.log( + "mem_begin " + + size + + " " + + blocks + + " " + + blocksize + + " " + + offset.toString(16) + ); + let pkt = this._appendArray( + this._int_to_bytearray(size), + this._int_to_bytearray(blocks) + ); pkt = this._appendArray(pkt, this._int_to_bytearray(blocksize)); pkt = this._appendArray(pkt, this._int_to_bytearray(offset)); - await this.check_command("enter RAM download mode", this.ESP_MEM_BEGIN, pkt); + await this.checkCommand( + "enter RAM download mode", + deviceCmd.ESP_MEM_BEGIN, + pkt + ); } checksum = function (data: Uint8Array) { @@ -409,27 +455,48 @@ export class ESPLoader { return chk; }; - async mem_block(buffer: Uint8Array, seq: number) { - let pkt = this._appendArray(this._int_to_bytearray(buffer.length), this._int_to_bytearray(seq)); + async memoryBlock(buffer: Uint8Array, seq: number) { + let pkt = this._appendArray( + this._int_to_bytearray(buffer.length), + this._int_to_bytearray(seq) + ); pkt = this._appendArray(pkt, this._int_to_bytearray(0)); pkt = this._appendArray(pkt, this._int_to_bytearray(0)); pkt = this._appendArray(pkt, buffer); const checksum = this.checksum(buffer); - await this.check_command("write to target RAM", this.ESP_MEM_DATA, pkt, checksum); + await this.checkCommand( + "write to target RAM", + deviceCmd.ESP_MEM_DATA, + pkt, + checksum + ); } - async mem_finish(entrypoint: number) { + async memoryFinish(entrypoint: number) { const is_entry = entrypoint === 0 ? 1 : 0; - const pkt = this._appendArray(this._int_to_bytearray(is_entry), this._int_to_bytearray(entrypoint)); - await this.check_command("leave RAM download mode", this.ESP_MEM_END, pkt, undefined, 50); // XXX: handle non-stub with diff timeout + const pkt = this._appendArray( + this._int_to_bytearray(is_entry), + this._int_to_bytearray(entrypoint) + ); + await this.checkCommand( + "leave RAM download mode", + deviceCmd.ESP_MEM_END, + pkt, + undefined, + 50 + ); // XXX: handle non-stub with diff timeout } - async flash_spi_attach(hspi_arg: number) { + async flashSPIAttach(hspi_arg: number) { const pkt = this._int_to_bytearray(hspi_arg); - await this.check_command("configure SPI flash pins", this.ESP_SPI_ATTACH, pkt); + await this.checkCommand( + "configure SPI flash pins", + this.ESP_SPI_ATTACH, + pkt + ); } - timeout_per_mb = function (seconds_per_mb: number, size_bytes: number) { + timeoutPerMb = function (seconds_per_mb: number, size_bytes: number) { const result = seconds_per_mb * (size_bytes / 1000000); if (result < 3000) { return 3000; @@ -438,8 +505,10 @@ export class ESPLoader { } }; - async flash_begin(size: number, offset: number) { - const num_blocks = Math.floor((size + this.FLASH_WRITE_SIZE - 1) / this.FLASH_WRITE_SIZE); + async flashBegin(size: number, offset: number) { + const num_blocks = Math.floor( + (size + this.FLASH_WRITE_SIZE - 1) / this.FLASH_WRITE_SIZE + ); const erase_size = this.chip.get_erase_size(offset, size); const d = new Date(); @@ -447,29 +516,59 @@ export class ESPLoader { let timeout = 3000; if (this.IS_STUB == false) { - timeout = this.timeout_per_mb(this.ERASE_REGION_TIMEOUT_PER_MB, size); + timeout = this.timeoutPerMb(this.ERASE_REGION_TIMEOUT_PER_MB, size); } - this.log("flash begin " + erase_size + " " + num_blocks + " " + this.FLASH_WRITE_SIZE + " " + offset + " " + size); - let pkt = this._appendArray(this._int_to_bytearray(erase_size), this._int_to_bytearray(num_blocks)); + this.log( + "flash begin " + + erase_size + + " " + + num_blocks + + " " + + this.FLASH_WRITE_SIZE + + " " + + offset + + " " + + size + ); + let pkt = this._appendArray( + this._int_to_bytearray(erase_size), + this._int_to_bytearray(num_blocks) + ); pkt = this._appendArray(pkt, this._int_to_bytearray(this.FLASH_WRITE_SIZE)); pkt = this._appendArray(pkt, this._int_to_bytearray(offset)); if (this.IS_STUB == false) { pkt = this._appendArray(pkt, this._int_to_bytearray(0)); // XXX: Support encrypted } - await this.check_command("enter Flash download mode", this.ESP_FLASH_BEGIN, pkt, undefined, timeout); + await this.checkCommand( + "enter Flash download mode", + deviceCmd.ESP_FLASH_BEGIN, + pkt, + undefined, + timeout + ); const t2 = d.getTime(); if (size != 0 && this.IS_STUB == false) { - this.log("Took " + (t2 - t1) / 1000 + "." + ((t2 - t1) % 1000) + "s to erase flash block"); + this.log( + "Took " + + (t2 - t1) / 1000 + + "." + + ((t2 - t1) % 1000) + + "s to erase flash block" + ); } return num_blocks; } - async flash_defl_begin(size: number, compsize: number, offset: number) { - const num_blocks = Math.floor((compsize + this.FLASH_WRITE_SIZE - 1) / this.FLASH_WRITE_SIZE); - const erase_blocks = Math.floor((size + this.FLASH_WRITE_SIZE - 1) / this.FLASH_WRITE_SIZE); + async flashDeflateBegin(size: number, compsize: number, offset: number) { + const num_blocks = Math.floor( + (compsize + this.FLASH_WRITE_SIZE - 1) / this.FLASH_WRITE_SIZE + ); + const erase_blocks = Math.floor( + (size + this.FLASH_WRITE_SIZE - 1) / this.FLASH_WRITE_SIZE + ); const d = new Date(); const t1 = d.getTime(); @@ -480,11 +579,14 @@ export class ESPLoader { timeout = 3000; } else { write_size = erase_blocks * this.FLASH_WRITE_SIZE; - timeout = this.timeout_per_mb(this.ERASE_REGION_TIMEOUT_PER_MB, write_size); + timeout = this.timeoutPerMb(this.ERASE_REGION_TIMEOUT_PER_MB, write_size); } this.log("Compressed " + size + " bytes to " + compsize + "..."); - let pkt = this._appendArray(this._int_to_bytearray(write_size), this._int_to_bytearray(num_blocks)); + let pkt = this._appendArray( + this._int_to_bytearray(write_size), + this._int_to_bytearray(num_blocks) + ); pkt = this._appendArray(pkt, this._int_to_bytearray(this.FLASH_WRITE_SIZE)); pkt = this._appendArray(pkt, this._int_to_bytearray(offset)); @@ -496,58 +598,92 @@ export class ESPLoader { ) { pkt = this._appendArray(pkt, this._int_to_bytearray(0)); } - await this.check_command("enter compressed flash mode", this.ESP_FLASH_DEFL_BEGIN, pkt, undefined, timeout); + await this.checkCommand( + "enter compressed flash mode", + this.ESP_FLASH_DEFL_BEGIN, + pkt, + undefined, + timeout + ); const t2 = d.getTime(); if (size != 0 && this.IS_STUB === false) { - this.log("Took " + (t2 - t1) / 1000 + "." + ((t2 - t1) % 1000) + "s to erase flash block"); + this.log( + "Took " + + (t2 - t1) / 1000 + + "." + + ((t2 - t1) % 1000) + + "s to erase flash block" + ); } return num_blocks; } - async flash_block(data: Uint8Array, seq: number, timeout: number) { - let pkt = this._appendArray(this._int_to_bytearray(data.length), this._int_to_bytearray(seq)); + async flashBlock(data: Uint8Array, seq: number, timeout: number) { + let pkt = this._appendArray( + this._int_to_bytearray(data.length), + this._int_to_bytearray(seq) + ); pkt = this._appendArray(pkt, this._int_to_bytearray(0)); pkt = this._appendArray(pkt, this._int_to_bytearray(0)); pkt = this._appendArray(pkt, data); const checksum = this.checksum(data); - await this.check_command("write to target Flash after seq " + seq, this.ESP_FLASH_DATA, pkt, checksum, timeout); + await this.checkCommand( + "write to target Flash after seq " + seq, + deviceCmd.ESP_FLASH_DATA, + pkt, + checksum, + timeout + ); } - async flash_defl_block(data: Uint8Array, seq: number, timeout: number) { - let pkt = this._appendArray(this._int_to_bytearray(data.length), this._int_to_bytearray(seq)); + async flashFeflateBlock(data: Uint8Array, seq: number, timeout: number) { + let pkt = this._appendArray( + this._int_to_bytearray(data.length), + this._int_to_bytearray(seq) + ); pkt = this._appendArray(pkt, this._int_to_bytearray(0)); pkt = this._appendArray(pkt, this._int_to_bytearray(0)); pkt = this._appendArray(pkt, data); const checksum = this.checksum(data); - this.log("flash_defl_block " + data[0].toString(16) + " " + data[1].toString(16)); + this.log( + "flash_defl_block " + data[0].toString(16) + " " + data[1].toString(16) + ); - await this.check_command( + await this.checkCommand( "write compressed data to flash after seq " + seq, this.ESP_FLASH_DEFL_DATA, pkt, checksum, - timeout, + timeout ); } - async flash_finish(reboot = false) { + async flashFinish(reboot = false) { const val = reboot ? 0 : 1; const pkt = this._int_to_bytearray(val); - await this.check_command("leave Flash mode", this.ESP_FLASH_END, pkt); + await this.checkCommand("leave Flash mode", deviceCmd.ESP_FLASH_END, pkt); } - async flash_defl_finish(reboot = false) { + async flashDeflateFinish(reboot = false) { const val = reboot ? 0 : 1; const pkt = this._int_to_bytearray(val); - await this.check_command("leave compressed flash mode", this.ESP_FLASH_DEFL_END, pkt); + await this.checkCommand( + "leave compressed flash mode", + this.ESP_FLASH_DEFL_END, + pkt + ); } - async run_spiflash_command(spiflash_command: number, data: Uint8Array, read_bits: number) { + async runSPIflashCommand( + spiflash_command: number, + data: Uint8Array, + read_bits: number + ) { // SPI_USR register flags const SPI_USR_COMMAND = 1 << 31; const SPI_USR_MISO = 1 << 28; @@ -561,56 +697,61 @@ export class ESPLoader { const SPI_USR2_REG = base + this.chip.SPI_USR2_OFFS; const SPI_W0_REG = base + this.chip.SPI_W0_OFFS; - let set_data_lengths; + let setDataLengths; if (this.chip.SPI_MOSI_DLEN_OFFS != null) { - set_data_lengths = async (mosi_bits: number, miso_bits: number) => { + setDataLengths = async (mosiBits: number, miso_bits: number) => { const SPI_MOSI_DLEN_REG = base + this.chip.SPI_MOSI_DLEN_OFFS; const SPI_MISO_DLEN_REG = base + this.chip.SPI_MISO_DLEN_OFFS; - if (mosi_bits > 0) { - await this.write_reg(SPI_MOSI_DLEN_REG, mosi_bits - 1); + if (mosiBits > 0) { + await this.writeRegister(SPI_MOSI_DLEN_REG, mosiBits - 1); } if (miso_bits > 0) { - await this.write_reg(SPI_MISO_DLEN_REG, miso_bits - 1); + await this.writeRegister(SPI_MISO_DLEN_REG, miso_bits - 1); } }; } else { - set_data_lengths = async (mosi_bits: number, miso_bits: number) => { + setDataLengths = async (mosi_bits: number, miso_bits: number) => { const SPI_DATA_LEN_REG = SPI_USR1_REG; const SPI_MOSI_BITLEN_S = 17; const SPI_MISO_BITLEN_S = 8; const mosi_mask = mosi_bits === 0 ? 0 : mosi_bits - 1; const miso_mask = miso_bits === 0 ? 0 : miso_bits - 1; - const val = (miso_mask << SPI_MISO_BITLEN_S) | (mosi_mask << SPI_MOSI_BITLEN_S); - await this.write_reg(SPI_DATA_LEN_REG, val); + const val = + (miso_mask << SPI_MISO_BITLEN_S) | (mosi_mask << SPI_MOSI_BITLEN_S); + await this.writeRegister(SPI_DATA_LEN_REG, val); }; } const SPI_CMD_USR = 1 << 18; const SPI_USR2_COMMAND_LEN_SHIFT = 28; if (read_bits > 32) { - throw new ESPError("Reading more than 32 bits back from a SPI flash operation is unsupported"); + throw new ESPError( + "Reading more than 32 bits back from a SPI flash operation is unsupported" + ); } if (data.length > 64) { - throw new ESPError("Writing more than 64 bytes of data with one SPI command is unsupported"); + throw new ESPError( + "Writing more than 64 bytes of data with one SPI command is unsupported" + ); } - const data_bits = data.length * 8; - const old_spi_usr = await this.read_reg(SPI_USR_REG); - const old_spi_usr2 = await this.read_reg(SPI_USR2_REG); + const dataBits = data.length * 8; + const old_spi_usr = await this.readRegister(SPI_USR_REG); + const old_spi_usr2 = await this.readRegister(SPI_USR2_REG); let flags = SPI_USR_COMMAND; let i; if (read_bits > 0) { flags |= SPI_USR_MISO; } - if (data_bits > 0) { + if (dataBits > 0) { flags |= SPI_USR_MOSI; } - await set_data_lengths(data_bits, read_bits); - await this.write_reg(SPI_USR_REG, flags); + await setDataLengths(dataBits, read_bits); + await this.writeRegister(SPI_USR_REG, flags); let val = (7 << SPI_USR2_COMMAND_LEN_SHIFT) | spiflash_command; - await this.write_reg(SPI_USR2_REG, val); - if (data_bits == 0) { - await this.write_reg(SPI_W0_REG, 0); + await this.writeRegister(SPI_USR2_REG, val); + if (dataBits == 0) { + await this.writeRegister(SPI_W0_REG, 0); } else { if (data.length % 4 != 0) { const padding = new Uint8Array(data.length % 4); @@ -618,14 +759,19 @@ export class ESPLoader { } let next_reg = SPI_W0_REG; for (i = 0; i < data.length - 4; i += 4) { - val = this._bytearray_to_int(data[i], data[i + 1], data[i + 2], data[i + 3]); - await this.write_reg(next_reg, val); + val = this._bytearray_to_int( + data[i], + data[i + 1], + data[i + 2], + data[i + 3] + ); + await this.writeRegister(next_reg, val); next_reg += 4; } } - await this.write_reg(SPI_CMD_REG, SPI_CMD_USR); + await this.writeRegister(SPI_CMD_REG, SPI_CMD_USR); for (i = 0; i < 10; i++) { - val = (await this.read_reg(SPI_CMD_REG)) & SPI_CMD_USR; + val = (await this.readRegister(SPI_CMD_REG)) & SPI_CMD_USR; if (val == 0) { break; } @@ -633,28 +779,28 @@ export class ESPLoader { if (i === 10) { throw new ESPError("SPI command did not complete in time"); } - const stat = await this.read_reg(SPI_W0_REG); - await this.write_reg(SPI_USR_REG, old_spi_usr); - await this.write_reg(SPI_USR2_REG, old_spi_usr2); + const stat = await this.readRegister(SPI_W0_REG); + await this.writeRegister(SPI_USR_REG, old_spi_usr); + await this.writeRegister(SPI_USR2_REG, old_spi_usr2); return stat; } - async read_flash_id() { + async readFlashId() { const SPIFLASH_RDID = 0x9f; const pkt = new Uint8Array(0); - return await this.run_spiflash_command(SPIFLASH_RDID, pkt, 24); + return await this.runSPIflashCommand(SPIFLASH_RDID, pkt, 24); } - async erase_flash() { + async eraseFlash() { this.log("Erasing flash (this may take a while)..."); let d = new Date(); const t1 = d.getTime(); - const ret = await this.check_command( + const ret = await this.checkCommand( "erase flash", this.ESP_ERASE_FLASH, undefined, undefined, - this.CHIP_ERASE_TIMEOUT, + this.CHIP_ERASE_TIMEOUT ); d = new Date(); const t2 = d.getTime(); @@ -663,16 +809,27 @@ export class ESPLoader { } toHex(buffer: number | Uint8Array) { - return Array.prototype.map.call(buffer, (x) => ("00" + x.toString(16)).slice(-2)).join(""); + return Array.prototype.map + .call(buffer, (x) => ("00" + x.toString(16)).slice(-2)) + .join(""); } - async flash_md5sum(addr: number, size: number) { - const timeout = this.timeout_per_mb(this.MD5_TIMEOUT_PER_MB, size); - let pkt = this._appendArray(this._int_to_bytearray(addr), this._int_to_bytearray(size)); + async flashMD5Sum(addr: number, size: number) { + const timeout = this.timeoutPerMb(this.MD5_TIMEOUT_PER_MB, size); + let pkt = this._appendArray( + this._int_to_bytearray(addr), + this._int_to_bytearray(size) + ); pkt = this._appendArray(pkt, this._int_to_bytearray(0)); pkt = this._appendArray(pkt, this._int_to_bytearray(0)); - let res = await this.check_command("calculate md5sum", this.ESP_SPI_FLASH_MD5, pkt, undefined, timeout); + let res = await this.checkCommand( + "calculate md5sum", + this.ESP_SPI_FLASH_MD5, + pkt, + undefined, + timeout + ); if (res instanceof Uint8Array && res.length > 16) { res = res.slice(0, 16); } @@ -680,7 +837,7 @@ export class ESPLoader { return strmd5; } - async run_stub() { + async runStub() { this.log("Uploading stub..."); let decoded = atob(this.chip.ROM_TEXT); @@ -696,26 +853,40 @@ export class ESPLoader { }); const data = new Uint8Array(chardata); - let blocks = Math.floor((text.length + this.ESP_RAM_BLOCK - 1) / this.ESP_RAM_BLOCK); + let blocks = Math.floor( + (text.length + this.ESP_RAM_BLOCK - 1) / this.ESP_RAM_BLOCK + ); let i; - await this.mem_begin(text.length, blocks, this.ESP_RAM_BLOCK, this.chip.TEXT_START); + await this.memoryBegin( + text.length, + blocks, + this.ESP_RAM_BLOCK, + this.chip.TEXT_START + ); for (i = 0; i < blocks; i++) { const from_offs = i * this.ESP_RAM_BLOCK; const to_offs = from_offs + this.ESP_RAM_BLOCK; - await this.mem_block(text.slice(from_offs, to_offs), i); + await this.memoryBlock(text.slice(from_offs, to_offs), i); } - blocks = Math.floor((data.length + this.ESP_RAM_BLOCK - 1) / this.ESP_RAM_BLOCK); - await this.mem_begin(data.length, blocks, this.ESP_RAM_BLOCK, this.chip.DATA_START); + blocks = Math.floor( + (data.length + this.ESP_RAM_BLOCK - 1) / this.ESP_RAM_BLOCK + ); + await this.memoryBegin( + data.length, + blocks, + this.ESP_RAM_BLOCK, + this.chip.DATA_START + ); for (i = 0; i < blocks; i++) { const from_offs = i * this.ESP_RAM_BLOCK; const to_offs = from_offs + this.ESP_RAM_BLOCK; - await this.mem_block(data.slice(from_offs, to_offs), i); + await this.memoryBlock(data.slice(from_offs, to_offs), i); } this.log("Running stub..."); - await this.mem_finish(this.chip.ENTRY); + await this.memoryFinish(this.chip.ENTRY); // Check up-to next 100 packets to see if stub is running for (let i = 0; i < 100; i++) { @@ -730,10 +901,13 @@ export class ESPLoader { throw new ESPError("Failed to start stub. Unexpected response"); } - async change_baud() { + async changeBaud() { this.log("Changing baudrate to " + this.baudrate); - const second_arg = this.IS_STUB ? this.transport.baudrate : 0; - const pkt = this._appendArray(this._int_to_bytearray(this.baudrate), this._int_to_bytearray(second_arg)); + const second_arg = this.IS_STUB ? this.transport.baudRate : 0; + const pkt = this._appendArray( + this._int_to_bytearray(this.baudrate), + this._int_to_bytearray(second_arg) + ); const resp = await this.command(this.ESP_CHANGE_BAUDRATE, pkt); this.log(resp[0].toString()); this.log("Changed"); @@ -748,7 +922,7 @@ export class ESPLoader { } async main_fn(mode = "default_reset") { - await this.detect_chip(mode); + await this.detectChip(mode); const chip = await this.chip.get_chip_description(this); this.log("Chip is " + chip); @@ -761,18 +935,20 @@ export class ESPLoader { await this.chip._post_connect(this); } - await this.run_stub(); + await this.runStub(); - await this.change_baud(); + await this.changeBaud(); return chip; } flash_size_bytes = function (flash_size: string) { let flash_size_b = -1; if (flash_size.indexOf("KB") !== -1) { - flash_size_b = parseInt(flash_size.slice(0, flash_size.indexOf("KB"))) * 1024; + flash_size_b = + parseInt(flash_size.slice(0, flash_size.indexOf("KB"))) * 1024; } else if (flash_size.indexOf("MB") !== -1) { - flash_size_b = parseInt(flash_size.slice(0, flash_size.indexOf("MB"))) * 1024 * 1024; + flash_size_b = + parseInt(flash_size.slice(0, flash_size.indexOf("MB"))) * 1024 * 1024; } return flash_size_b; }; @@ -780,7 +956,10 @@ export class ESPLoader { parse_flash_size_arg(flsz: string) { if (typeof this.chip.FLASH_SIZES[flsz] === "undefined") { throw new ESPError( - "Flash size " + flsz + " is not supported by this chip type. Supported sizes: " + this.chip.FLASH_SIZES, + "Flash size " + + flsz + + " is not supported by this chip type. Supported sizes: " + + this.chip.FLASH_SIZES ); } return this.chip.FLASH_SIZES[flsz]; @@ -791,16 +970,27 @@ export class ESPLoader { address: number, flash_size: string, flash_mode: string, - flash_freq: string, + flash_freq: string ) { - this.log("_update_image_flash_params " + flash_size + " " + flash_mode + " " + flash_freq); + this.log( + "_update_image_flash_params " + + flash_size + + " " + + flash_mode + + " " + + flash_freq + ); if (image.length < 8) { return image; } if (address != this.chip.BOOTLOADER_FLASH_OFFSET) { return image; } - if (flash_size === "keep" && flash_mode === "keep" && flash_freq === "keep") { + if ( + flash_size === "keep" && + flash_mode === "keep" && + flash_freq === "keep" + ) { this.log("Not changing the image"); return image; } @@ -812,7 +1002,7 @@ export class ESPLoader { this.log( "Warning: Image file at 0x" + address.toString(16) + - " doesn't look like an image file, so not changing any flash settings.", + " doesn't look like an image file, so not changing any flash settings." ); return image; } @@ -820,12 +1010,22 @@ export class ESPLoader { /* XXX: Yet to implement actual image verification */ if (flash_mode !== "keep") { - const flash_modes: { [key: string]: number } = { qio: 0, qout: 1, dio: 2, dout: 3 }; + const flash_modes: { [key: string]: number } = { + qio: 0, + qout: 1, + dio: 2, + dout: 3 + }; a_flash_mode = flash_modes[flash_mode]; } let a_flash_freq = flash_size_freq & 0x0f; if (flash_freq !== "keep") { - const flash_freqs: { [key: string]: number } = { "40m": 0, "26m": 1, "20m": 2, "80m": 0xf }; + const flash_freqs: { [key: string]: number } = { + "40m": 0, + "26m": 1, + "20m": 2, + "80m": 0xf + }; a_flash_freq = flash_freqs[flash_freq]; } let a_flash_size = flash_size_freq & 0xf0; @@ -837,42 +1037,51 @@ export class ESPLoader { this.log("Flash params set to " + flash_params.toString(16)); if (parseInt(image[2]) !== a_flash_mode << 8) { // image[2] = a_flash_mode << 8; - image = image.substring(0, 2) + (a_flash_mode << 8).toString() + image.substring(2 + 1); + image = + image.substring(0, 2) + + (a_flash_mode << 8).toString() + + image.substring(2 + 1); } if (parseInt(image[3]) !== a_flash_freq + a_flash_size) { // image[3] = a_flash_freq + a_flash_size; - image = image.substring(0, 3) + (a_flash_freq + a_flash_size).toString() + image.substring(3 + 1); + image = + image.substring(0, 3) + + (a_flash_freq + a_flash_size).toString() + + image.substring(3 + 1); } return image; } - async write_flash( - fileArray: { - data: string; - address: number; - }[], + async writeFlash( + fileArray: fileType[], flash_size = "keep", flash_mode = "keep", flash_freq = "keep", erase_all = false, compress = true, /* function(fileIndex, written, total) */ - reportProgress?: (fileIndex: number, written: number, total: number) => void, + reportProgress?: ( + fileIndex: number, + written: number, + total: number + ) => void, /* function(image: string) => string */ - calculateMD5Hash?: (image: string) => string, + calculateMD5Hash?: (image: string) => string ) { this.log("EspLoader program"); if (flash_size !== "keep") { const flash_end = this.flash_size_bytes(flash_size); for (let i = 0; i < fileArray.length; i++) { if (fileArray[i].data.length + fileArray[i].address > flash_end) { - throw new ESPError(`File ${i + 1} doesn"t fit in the available flash`); + throw new ESPError( + `File ${i + 1} doesn"t fit in the available flash` + ); } } } if (this.IS_STUB === true && erase_all === true) { - await this.erase_flash(); + await this.eraseFlash(); } let image: string, address: number; for (let i = 0; i < fileArray.length; i++) { @@ -886,7 +1095,13 @@ export class ESPLoader { this.log("Warning: File is empty"); continue; } - image = this._update_image_flash_params(image, address, flash_size, flash_mode, flash_freq); + image = this._update_image_flash_params( + image, + address, + flash_size, + flash_mode, + flash_freq + ); let calcmd5: string; if (calculateMD5Hash) { calcmd5 = calculateMD5Hash(image); @@ -899,9 +1114,9 @@ export class ESPLoader { image = this.ui8ToBstr(deflate(uncimage, { level: 9 })); this.log("Compressed image "); // this.log(image); - blocks = await this.flash_defl_begin(uncsize, image.length, address); + blocks = await this.flashDeflateBegin(uncsize, image.length, address); } else { - blocks = await this.flash_begin(uncsize, address); + blocks = await this.flashBegin(uncsize, address); } let seq = 0; let bytes_sent = 0; @@ -920,7 +1135,7 @@ export class ESPLoader { (address + seq * this.FLASH_WRITE_SIZE).toString(16) + "... (" + Math.floor((100 * (seq + 1)) / blocks) + - "%)", + "%)" ); const block = this.bstrToUi8(image.slice(0, this.FLASH_WRITE_SIZE)); if (compress) { @@ -937,7 +1152,7 @@ export class ESPLoader { if (this.IS_STUB === false) { timeout = block_timeout; } - await this.flash_defl_block(block, seq, timeout); + await this.flashFeflateBlock(block, seq, timeout); if (this.IS_STUB) { timeout = block_timeout; } @@ -950,7 +1165,7 @@ export class ESPLoader { if (reportProgress) reportProgress(i, bytes_sent, totalBytes); } if (this.IS_STUB) { - await this.read_reg(this.CHIP_DETECT_MAGIC_REG_ADDR, timeout); + await this.readRegister(this.CHIP_DETECT_MAGIC_REG_ADDR, timeout); } d = new Date(); const t = d.getTime() - t1; @@ -964,11 +1179,11 @@ export class ESPLoader { address.toString(16) + " in " + t / 1000 + - " seconds.", + " seconds." ); } if (calculateMD5Hash) { - const res = await this.flash_md5sum(address, uncsize); + const res = await this.flashMD5Sum(address, uncsize); if (new String(res).valueOf() != new String(calcmd5).valueOf()) { this.log("File md5: " + calcmd5); this.log("Flash md5: " + res); @@ -981,37 +1196,45 @@ export class ESPLoader { this.log("Leaving..."); if (this.IS_STUB) { - await this.flash_begin(0, 0); + await this.flashBegin(0, 0); if (compress) { - await this.flash_defl_finish(); + await this.flashDeflateFinish(); } else { - await this.flash_finish(); + await this.flashFinish(); } } } - async flash_id() { + async flashId() { this.log("flash_id"); - const flashid = await this.read_flash_id(); - this.log("Manufacturer: " + (flashid & 0xff).toString(16)); - const flid_lowbyte = (flashid >> 16) & 0xff; - this.log("Device: " + ((flashid >> 8) & 0xff).toString(16) + flid_lowbyte.toString(16)); - this.log("Detected flash size: " + this.DETECTED_FLASH_SIZES[flid_lowbyte]); + const flashId = await this.readFlashId(); + this.log("Manufacturer: " + (flashId & 0xff).toString(16)); + const flashIdLowByte = (flashId >> 16) & 0xff; + this.log( + "Device: " + + ((flashId >> 8) & 0xff).toString(16) + + flashIdLowByte.toString(16) + ); + this.log( + "Detected flash size: " + this.DETECTED_FLASH_SIZES.get(flashIdLowByte) + ); } - async hard_reset() { + async hardReset() { this.transport.setRTS(true); // EN->LOW await this._sleep(100); this.transport.setRTS(false); } - async soft_reset() { + async softReset() { if (!this.IS_STUB) { // "run user code" is as close to a soft reset as we can do - this.flash_begin(0, 0); - this.flash_finish(false); + this.flashBegin(0, 0); + this.flashFinish(false); } else if (this.chip.CHIP_NAME != "ESP8266") { - throw new ESPError("Soft resetting is currently only supported on ESP8266"); + throw new ESPError( + "Soft resetting is currently only supported on ESP8266" + ); } else { // running user code from stub loader requires some hacks // in the stub loader diff --git a/src/targets/esp32.ts b/src/targets/esp32.ts index 2c36fb0b..45da5a52 100644 --- a/src/targets/esp32.ts +++ b/src/targets/esp32.ts @@ -16,7 +16,7 @@ export class ESP32ROM extends ROM { "2MB": 0x10, "4MB": 0x20, "8MB": 0x30, - "16MB": 0x40, + "16MB": 0x40 }; public FLASH_WRITE_SIZE = 0x400; @@ -99,7 +99,7 @@ export class ESP32ROM extends ROM { public async read_efuse(loader: ESPLoader, offset: number) { const addr = this.EFUSE_RD_REG_BASE + 4 * offset; loader.log("Read efuse " + addr); - return await loader.read_reg(addr); + return await loader.readRegister(addr); } public async get_pkg_version(loader: ESPLoader) { @@ -112,7 +112,9 @@ export class ESP32ROM extends ROM { public async get_chip_revision(loader: ESPLoader) { const word3 = await this.read_efuse(loader, 3); const word5 = await this.read_efuse(loader, 5); - const apb_ctl_date = await loader.read_reg(this.DR_REG_SYSCON_BASE + 0x7c); + const apb_ctl_date = await loader.readRegister( + this.DR_REG_SYSCON_BASE + 0x7c + ); const rev_bit0 = (word3 >> 15) & 0x1; const rev_bit1 = (word5 >> 20) & 0x1; @@ -139,7 +141,7 @@ export class ESP32ROM extends ROM { "", "ESP32-U4WDH", "ESP32-PICO-D4", - "ESP32-PICO-V3-02", + "ESP32-PICO-V3-02" ]; let chip_name = ""; const pkg_version = await this.get_pkg_version(loader); @@ -214,15 +216,22 @@ export class ESP32ROM extends ROM { const word6 = await this.read_efuse(loader, 6); const coding_scheme = word6 & 0x3; - const coding_scheme_arr = ["None", "3/4", "Repeat (UNSUPPORTED)", "Invalid"]; + const coding_scheme_arr = [ + "None", + "3/4", + "Repeat (UNSUPPORTED)", + "Invalid" + ]; features.push(" Coding Scheme " + coding_scheme_arr[coding_scheme]); return features; } public async get_crystal_freq(loader: ESPLoader) { - const uart_div = (await loader.read_reg(this.UART_CLKDIV_REG)) & this.UART_CLKDIV_MASK; - const ets_xtal = (loader.transport.baudrate * uart_div) / 1000000 / this.XTAL_CLK_DIVIDER; + const uart_div = + (await loader.readRegister(this.UART_CLKDIV_REG)) & this.UART_CLKDIV_MASK; + const ets_xtal = + (loader.transport.baudrate * uart_div) / 1000000 / this.XTAL_CLK_DIVIDER; let norm_xtal; if (ets_xtal > 33) { norm_xtal = 40; diff --git a/src/targets/esp32c3.ts b/src/targets/esp32c3.ts index 1c1f8048..1e8a9dcb 100644 --- a/src/targets/esp32c3.ts +++ b/src/targets/esp32c3.ts @@ -18,7 +18,7 @@ export class ESP32C3ROM extends ROM { "2MB": 0x10, "4MB": 0x20, "8MB": 0x30, - "16MB": 0x40, + "16MB": 0x40 }; public SPI_REG_BASE = 0x60002000; @@ -98,7 +98,7 @@ export class ESP32C3ROM extends ROM { const num_word = 3; const block1_addr = this.EFUSE_BASE + 0x044; const addr = block1_addr + 4 * num_word; - const word3 = await loader.read_reg(addr); + const word3 = await loader.readRegister(addr); const pkg_version = (word3 >> 21) & 0x07; return pkg_version; } @@ -108,7 +108,7 @@ export class ESP32C3ROM extends ROM { const num_word = 3; const pos = 18; const addr = block1_addr + 4 * num_word; - const ret = ((await loader.read_reg(addr)) & (0x7 << pos)) >> pos; + const ret = ((await loader.readRegister(addr)) & (0x7 << pos)) >> pos; return ret; } @@ -139,9 +139,9 @@ export class ESP32C3ROM extends ROM { } public async read_mac(loader: ESPLoader) { - let mac0 = await loader.read_reg(this.MAC_EFUSE_REG); + let mac0 = await loader.readRegister(this.MAC_EFUSE_REG); mac0 = mac0 >>> 0; - let mac1 = await loader.read_reg(this.MAC_EFUSE_REG + 4); + let mac1 = await loader.readRegister(this.MAC_EFUSE_REG + 4); mac1 = (mac1 >>> 0) & 0x0000ffff; const mac = new Uint8Array(6); mac[0] = (mac1 >> 8) & 0xff; diff --git a/src/targets/esp32s2.ts b/src/targets/esp32s2.ts index 0b220f68..ebd2bed4 100644 --- a/src/targets/esp32s2.ts +++ b/src/targets/esp32s2.ts @@ -18,7 +18,7 @@ export class ESP32S2ROM extends ROM { "2MB": 0x10, "4MB": 0x20, "8MB": 0x30, - "16MB": 0x40, + "16MB": 0x40 }; public SPI_REG_BASE = 0x3f402000; @@ -108,7 +108,7 @@ export class ESP32S2ROM extends ROM { const num_word = 3; const block1_addr = this.EFUSE_BASE + 0x044; const addr = block1_addr + 4 * num_word; - const word3 = await loader.read_reg(addr); + const word3 = await loader.readRegister(addr); const pkg_version = (word3 >> 21) & 0x0f; return pkg_version; } @@ -134,7 +134,7 @@ export class ESP32S2ROM extends ROM { const num_word = 4; const block2_addr = this.EFUSE_BASE + 0x05c; const addr = block2_addr + 4 * num_word; - const word4 = await loader.read_reg(addr); + const word4 = await loader.readRegister(addr); const block2_ver = (word4 >> 4) & 0x07; if (block2_ver == 1) { @@ -151,9 +151,9 @@ export class ESP32S2ROM extends ROM { return h.length === 1 ? "0" + h : h; } public async read_mac(loader: ESPLoader) { - let mac0 = await loader.read_reg(this.MAC_EFUSE_REG); + let mac0 = await loader.readRegister(this.MAC_EFUSE_REG); mac0 = mac0 >>> 0; - let mac1 = await loader.read_reg(this.MAC_EFUSE_REG + 4); + let mac1 = await loader.readRegister(this.MAC_EFUSE_REG + 4); mac1 = (mac1 >>> 0) & 0x0000ffff; const mac = new Uint8Array(6); mac[0] = (mac1 >> 8) & 0xff; diff --git a/src/targets/esp32s3.ts b/src/targets/esp32s3.ts index 2e184a38..be776547 100644 --- a/src/targets/esp32s3.ts +++ b/src/targets/esp32s3.ts @@ -18,7 +18,7 @@ export class ESP32S3ROM extends ROM { "2MB": 0x10, "4MB": 0x20, "8MB": 0x30, - "16MB": 0x40, + "16MB": 0x40 }; public SPI_REG_BASE = 0x60002000; @@ -134,7 +134,7 @@ export class ESP32S3ROM extends ROM { } public async _post_connect(loader: ESPLoader) { - const buf_no = (await loader.read_reg(this.UARTDEV_BUF_NO)) & 0xff; + const buf_no = (await loader.readRegister(this.UARTDEV_BUF_NO)) & 0xff; console.log("In _post_connect " + buf_no); if (buf_no == this.UARTDEV_BUF_NO_USB) { loader.ESP_RAM_BLOCK = this.USB_RAM_BLOCK; @@ -142,9 +142,9 @@ export class ESP32S3ROM extends ROM { } public async read_mac(loader: ESPLoader) { - let mac0 = await loader.read_reg(this.MAC_EFUSE_REG); + let mac0 = await loader.readRegister(this.MAC_EFUSE_REG); mac0 = mac0 >>> 0; - let mac1 = await loader.read_reg(this.MAC_EFUSE_REG + 4); + let mac1 = await loader.readRegister(this.MAC_EFUSE_REG + 4); mac1 = (mac1 >>> 0) & 0x0000ffff; const mac = new Uint8Array(6); mac[0] = (mac1 >> 8) & 0xff; diff --git a/src/targets/esp8266.ts b/src/targets/esp8266.ts index 81a2af45..ddcde598 100644 --- a/src/targets/esp8266.ts +++ b/src/targets/esp8266.ts @@ -24,7 +24,7 @@ export class ESP8266ROM extends ROM { "2MB-c1": 0x50, "4MB-c1": 0x60, "8MB": 0x80, - "16MB": 0x90, + "16MB": 0x90 }; public SPI_REG_BASE = 0x60000200; @@ -188,7 +188,7 @@ export class ESP8266ROM extends ROM { public async read_efuse(loader: ESPLoader, offset: number) { const addr = this.EFUSE_RD_REG_BASE + 4 * offset; loader.log("Read efuse " + addr); - return await loader.read_reg(addr); + return await loader.readRegister(addr); } public async get_chip_description(loader: ESPLoader) { @@ -201,13 +201,16 @@ export class ESP8266ROM extends ROM { public get_chip_features = async (loader: ESPLoader) => { const features = ["WiFi"]; - if ((await this.get_chip_description(loader)) == "ESP8285") features.push("Embedded Flash"); + if ((await this.get_chip_description(loader)) == "ESP8285") + features.push("Embedded Flash"); return features; }; public async get_crystal_freq(loader: ESPLoader) { - const uart_div = (await loader.read_reg(this.UART_CLKDIV_REG)) & this.UART_CLKDIV_MASK; - const ets_xtal = (loader.transport.baudrate * uart_div) / 1000000 / this.XTAL_CLK_DIVIDER; + const uart_div = + (await loader.readRegister(this.UART_CLKDIV_REG)) & this.UART_CLKDIV_MASK; + const ets_xtal = + (loader.transport.baudrate * uart_div) / 1000000 / this.XTAL_CLK_DIVIDER; let norm_xtal; if (ets_xtal > 33) { norm_xtal = 40; @@ -220,7 +223,7 @@ export class ESP8266ROM extends ROM { ets_xtal + "MHz is quite different to normalized freq " + norm_xtal + - "MHz. Unsupported crystal in use?", + "MHz. Unsupported crystal in use?" ); } return norm_xtal; diff --git a/src/webserial.ts b/src/webserial.ts index 26b17c4f..239be2d2 100644 --- a/src/webserial.ts +++ b/src/webserial.ts @@ -1,18 +1,23 @@ -class Transport { - public slip_reader_enabled = false; - public left_over = new Uint8Array(0); - public baudrate = 0; +import { TimeoutError } from "./error.js"; - constructor(public device: SerialPort) {} +export class Transport { + public slip_reader_enabled: boolean; + public left_over: Uint8Array; + public baudRate: number; - get_info() { + constructor(public device: SerialPort) { + this.slip_reader_enabled = false; + this.left_over = new Uint8Array(0); + } + + public get_info() { const info = this.device.getInfo(); - return info.usbVendorId && info.usbProductId - ? `WebSerial VendorID 0x${info.usbVendorId.toString(16)} ProductID 0x${info.usbProductId.toString(16)}` - : ""; + return `WebSerial VendorID 0x${ + info.usbVendorId?.toString(16) ?? "" + } ProductID 0x${info.usbProductId?.toString(16) ?? ""}`; } - slip_writer(data: Uint8Array) { + public slipWriter(data: Uint8Array) { let count_esc = 0; let i = 0, j = 0; @@ -43,17 +48,17 @@ class Transport { return out_data; } - async write(data: Uint8Array) { - const out_data = this.slip_writer(data); + public async write(data: Uint8Array) { + const outputData = this.slipWriter(data); if (this.device.writable) { const writer = this.device.writable.getWriter(); - await writer.write(out_data); + await writer.write(outputData); writer.releaseLock(); } } - _appendBuffer(buffer1: ArrayBuffer, buffer2: ArrayBuffer) { + public _appendBuffer(buffer1: Uint8Array, buffer2: Uint8Array) { const tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength); tmp.set(new Uint8Array(buffer1), 0); tmp.set(new Uint8Array(buffer2), buffer1.byteLength); @@ -62,7 +67,7 @@ class Transport { /* this function expects complete packet (hence reader reads for atleast 8 bytes. This function is * stateless and returns the first wellformed packet only after replacing escape sequence */ - slip_reader(data: Uint8Array) { + public slip_reader(data: Uint8Array) { let i = 0; let data_start = 0, data_end = 0; @@ -102,11 +107,14 @@ class Transport { } temp_pkt[j] = data[i]; } - const packet = temp_pkt.slice(0, j); /* Remove unused bytes due to escape seq */ + const packet = temp_pkt.slice( + 0, + j + ); /* Remove unused bytes due to escape seq */ return packet; } - async read(timeout = 0, min_data = 12) { + public async read(timeout = 0, min_data = 12) { console.log("Read with timeout " + timeout); let t; let packet = this.left_over; @@ -134,9 +142,9 @@ class Transport { const { value, done } = await reader.read(); if (done) { this.left_over = packet; - throw new Error("Timeout"); + throw new TimeoutError("Timeout"); } - const p = new Uint8Array(this._appendBuffer(packet.buffer, value.buffer)); + const p = new Uint8Array(this._appendBuffer(packet, value)); packet = p; } while (packet.length < min_data); } finally { @@ -151,7 +159,7 @@ class Transport { return packet; } - async rawRead(timeout = 0) { + public async rawRead(timeout: number) { if (this.left_over.length != 0) { const p = this.left_over; this.left_over = new Uint8Array(0); @@ -170,7 +178,7 @@ class Transport { } const { value, done } = await reader.read(); if (done) { - throw new Error("Timeout"); + throw new TimeoutError("Timeout"); } return value; } finally { @@ -181,25 +189,24 @@ class Transport { } } - async setRTS(state: boolean) { + public async setRTS(state: boolean) { await this.device.setSignals({ requestToSend: state }); } - async setDTR(state: boolean) { + public async setDTR(state: boolean) { await this.device.setSignals({ dataTerminalReady: state }); } - async connect(baud = 115200) { - await this.device.open({ baudRate: baud }); - this.baudrate = baud; + public async connect(baud?: number) { + await this.device.open({ baudRate: baud ?? 115200 }); this.left_over = new Uint8Array(0); } - async sleep(ms: number) { + public async sleep(ms: number) { return new Promise((resolve) => setTimeout(resolve, ms)); } - async waitForUnlock(timeout: number) { + public async waitForUnlock(timeout: number) { while ( (this.device.readable && this.device.readable.locked) || (this.device.writable && this.device.writable.locked) @@ -208,10 +215,8 @@ class Transport { } } - async disconnect() { + public async disconnect() { await this.waitForUnlock(400); await this.device.close(); } } - -export { Transport }; diff --git a/tsconfig.json b/tsconfig.json index 46d7e86a..bcccc86c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,104 @@ { "compilerOptions": { - "module": "ES2020", - "target": "ES2019", - "declaration": true, - "allowSyntheticDefaultImports": true, - "outDir": "./lib", - "moduleResolution": "node", - "lib": ["ES2020", "DOM"], - "importHelpers": true + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "ESNext" /* Specify what module code is generated. */, + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "NodeNext" /* Specify how TypeScript looks up a file from a given module specifier. */, + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */, + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + "sourceMap": true /* Create source map files for emitted JavaScript files. */, + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + "outDir": "./dist" /* Specify an output folder for all emitted files. */, + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": false /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, + + /* Type Checking */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, "include": ["src/**/*"] -} \ No newline at end of file +}