From 1d0a8ae0b295cdce71bf20d9398e96ef862626bf Mon Sep 17 00:00:00 2001 From: Leandro Mendoza Date: Thu, 25 Nov 2021 12:03:16 -0300 Subject: [PATCH] feat: add asset json (#27) * add asset json type for sdk. * replace asset type and move to project folder. * fix (but duplicates) invalid enum * add eslint config * update api * remove comments Co-authored-by: gonpombo8 --- .eslintignore | 1 + .eslintrc.json | 13 + package-lock.json | 2450 ++++++++++++++++- package.json | 3 + report/schemas.api.md | 41 +- src/dapps/bid.ts | 32 +- src/dapps/body-shape.ts | 4 +- src/dapps/chain-id.ts | 4 +- src/dapps/chain-name.ts | 4 +- src/dapps/collection.ts | 26 +- src/dapps/contract.ts | 10 +- src/dapps/item.ts | 39 +- src/dapps/listing-status.ts | 4 +- src/dapps/meta-transactions.ts | 11 +- src/dapps/mint.ts | 28 +- src/dapps/network.ts | 4 +- src/dapps/nft-category.ts | 4 +- src/dapps/nft.ts | 88 +- src/dapps/order.ts | 26 +- src/dapps/rarity.ts | 10 +- src/dapps/sale-type.ts | 4 +- src/dapps/sale.ts | 26 +- src/dapps/wearable-category.ts | 4 +- src/dapps/wearable-gender.ts | 4 +- src/dapps/world.ts | 72 +- src/index.ts | 6 +- src/misc/index.ts | 40 +- src/platform/index.ts | 2 +- src/platform/profile/avatar.ts | 61 +- src/platform/profile/index.ts | 2 +- src/platform/profile/profile.ts | 21 +- src/platform/scene/feature-toggles.ts | 21 +- src/platform/scene/index.ts | 2 +- src/platform/scene/scene-parcels.ts | 38 +- src/platform/scene/scene.ts | 135 +- src/platform/scene/source.ts | 68 +- src/platform/scene/spawn-point.ts | 102 +- src/platform/wearables/i18n.ts | 19 +- src/platform/wearables/index.ts | 2 +- src/platform/wearables/locale.ts | 8 +- src/platform/wearables/metrics.ts | 31 +- src/platform/wearables/representation.ts | 37 +- src/platform/wearables/wearable-body-shape.ts | 13 +- src/platform/wearables/wearable.ts | 33 +- src/sdk/project/asset-json.ts | 63 + src/sdk/project/asset-wearable-gender.ts | 21 + src/sdk/project/index.ts | 3 +- src/sdk/project/type.ts | 15 +- src/sdk/ws/index.ts | 11 +- src/sdk/ws/scene-update.ts | 39 +- src/sdk/ws/update.ts | 24 +- src/validation.ts | 11 +- test/bid.spec.ts | 2 +- test/chain-name.spec.ts | 4 +- test/collection.spec.ts | 2 +- test/contract.spec.ts | 2 +- test/hashing.spec.ts | 3 +- test/item.spec.ts | 9 +- test/meta-transactions.spec.ts | 14 +- test/mint.spec.ts | 2 +- test/miscellaneous.spec.ts | 8 +- test/nft.spec.ts | 40 +- test/order.spec.ts | 2 +- test/platform/profiles/avatar.spec.ts | 20 +- test/platform/profiles/profile.spec.ts | 12 +- test/platform/scenes/feature-toggles.spec.ts | 35 +- test/platform/scenes/scene-parcels.spec.ts | 33 +- test/platform/scenes/scene.spec.ts | 48 +- test/platform/scenes/source.spec.ts | 71 +- test/platform/scenes/spawn-point.spec.ts | 83 +- .../platform/wearables/representation.spec.ts | 52 +- test/platform/wearables/wearable.spec.ts | 104 +- test/sale.spec.ts | 2 +- test/test-utils.ts | 21 +- test/world.spec.ts | 2 +- 75 files changed, 3385 insertions(+), 926 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.json create mode 100644 src/sdk/project/asset-json.ts create mode 100644 src/sdk/project/asset-wearable-gender.ts diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..53c37a16 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +dist \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..bc0ef3fb --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,13 @@ +{ + "extends": "@dcl/eslint-config", + "parserOptions": { + "project": [ + "tsconfig.json", + "test/tsconfig.json" + ] + }, + "rules": { + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-non-null-assertion": "off" + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 438838d3..f7da8631 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "ajv": "^7.1.0" }, "devDependencies": { + "@dcl/eslint-config": "^1.0.0", "@microsoft/api-extractor": "^7.18.19", "@types/mocha": "^8.2.0", "@types/node": "^14.14.25", @@ -109,6 +110,117 @@ "node": ">=4" } }, + "node_modules/@dcl/eslint-config": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@dcl/eslint-config/-/eslint-config-1.0.0.tgz", + "integrity": "sha512-9T0xFSQJVuBdmKqOvs/xYCesOqZSnmjZ2Nc40HBOto2U61VnU90Lz3LXMJAbs/nkij6madfgQyd8+uo1XNjhPg==", + "dev": true, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.3.1", + "@typescript-eslint/parser": "^5.3.1", + "eslint": "^8.2.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-prettier": "^4.0.0", + "prettier": "^2.4.1" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", + "integrity": "sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==", + "dev": true, + "peer": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.0.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "peer": true + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "peer": true + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", + "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "dev": true, + "peer": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true, + "peer": true + }, "node_modules/@jest/types": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", @@ -212,6 +324,44 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@rushstack/node-core-library": { "version": "3.43.2", "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.43.2.tgz", @@ -288,6 +438,13 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true, + "peer": true + }, "node_modules/@types/mocha": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.0.tgz", @@ -321,12 +478,199 @@ "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", "dev": true }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.4.0.tgz", + "integrity": "sha512-9/yPSBlwzsetCsGEn9j24D8vGQgJkOTr4oMLas/w886ZtzKIs1iyoqFrwsX2fqYEeUwsdBpC21gcjRGo57u0eg==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "5.4.0", + "@typescript-eslint/scope-manager": "5.4.0", + "debug": "^4.3.2", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.2.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/experimental-utils": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.4.0.tgz", + "integrity": "sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==", + "dev": true, + "peer": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.4.0", + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/typescript-estree": "5.4.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.4.0.tgz", + "integrity": "sha512-JoB41EmxiYpaEsRwpZEYAJ9XQURPFer8hpkIW9GiaspVLX8oqbqNM8P4EP8HOZg96yaALiLEVWllA2E8vwsIKw==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.4.0", + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/typescript-estree": "5.4.0", + "debug": "^4.3.2" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.4.0.tgz", + "integrity": "sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/visitor-keys": "5.4.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.4.0.tgz", + "integrity": "sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.4.0.tgz", + "integrity": "sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/visitor-keys": "5.4.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.4.0.tgz", + "integrity": "sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/types": "5.4.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "node_modules/acorn": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "dev": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peer": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/ajv": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.0.tgz", @@ -348,9 +692,9 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { "node": ">=8" @@ -396,6 +740,16 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -445,6 +799,16 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -580,6 +944,39 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "peer": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -589,6 +986,13 @@ "node": ">=0.10.0" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "peer": true + }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -604,35 +1008,416 @@ "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", "dev": true, "engines": { - "node": ">= 10.14.2" + "node": ">= 10.14.2" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "peer": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "peer": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.3.0.tgz", + "integrity": "sha512-aIay56Ph6RxOTC7xyr59Kt3ewX185SaGnAr8eWukoPLeriCrvGjvAubxuvaXOfsxhtwV5g0uBOsyhAom4qJdww==", + "dev": true, + "peer": true, + "dependencies": { + "@eslint/eslintrc": "^1.0.4", + "@humanwhocodes/config-array": "^0.6.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.1.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.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.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.2.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", + "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "dev": true, + "peer": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", + "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", + "dev": true, + "peer": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "peer": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "peer": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "dev": true, + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "peer": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "peer": true + }, + "node_modules/eslint/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/espree": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.1.0.tgz", + "integrity": "sha512-ZgYLvCS1wxOczBYGcQT9DDWgicXwJ4dbocr9uYN+/eresBAUuBu+O4WzB21ufQ/JqQT8gyp7hJ3z8SHii32mTQ==", + "dev": true, + "peer": true, + "dependencies": { + "acorn": "^8.6.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.1.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "peer": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "peer": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" } }, - "node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4.0" + } }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, + "peer": true, "engines": { - "node": ">=0.8.0" + "node": ">=4.0" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, + "peer": true, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, "node_modules/expect": { @@ -657,12 +1442,66 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true, + "peer": true + }, + "node_modules/fast-glob": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true, + "peer": true + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "peer": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "peer": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -697,6 +1536,27 @@ "flat": "cli.js" } }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "peer": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", + "dev": true, + "peer": true + }, "node_modules/fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -736,6 +1596,13 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true, + "peer": true + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -763,9 +1630,9 @@ } }, "node_modules/glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { "is-glob": "^4.0.1" @@ -774,6 +1641,43 @@ "node": ">= 6" } }, + "node_modules/globals": { + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "dev": true, + "peer": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "peer": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/graceful-fs": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.5.tgz", @@ -819,6 +1723,33 @@ "he": "bin/he" } }, + "node_modules/ignore": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", + "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "peer": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/import-lazy": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", @@ -828,6 +1759,16 @@ "node": ">=8" } }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.8.19" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -887,9 +1828,9 @@ } }, "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { "is-extglob": "^2.1.1" @@ -1020,6 +1961,13 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true, + "peer": true + }, "node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -1029,6 +1977,20 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -1059,6 +2021,13 @@ "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", "dev": true }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "peer": true + }, "node_modules/log-symbols": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", @@ -1089,17 +2058,27 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, "dependencies": { "braces": "^3.0.1", - "picomatch": "^2.0.5" + "picomatch": "^2.2.3" }, "engines": { - "node": ">=8" + "node": ">=8.6" } }, "node_modules/minimatch": { @@ -1175,7 +2154,7 @@ "node": ">=10" } }, - "node_modules/mocha/node_modules/ms": { + "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", @@ -1193,6 +2172,13 @@ "node": "^10 || ^12 || >=13.7" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true, + "peer": true + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -1211,6 +2197,24 @@ "wrappy": "1" } }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "peer": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -1244,6 +2248,19 @@ "node": ">=6" } }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "peer": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -1262,19 +2279,78 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true, "engines": { "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", + "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==", + "dev": true, + "peer": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "peer": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" } }, "node_modules/pretty-format": { @@ -1292,6 +2368,16 @@ "node": ">= 10" } }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -1300,6 +2386,27 @@ "node": ">=6" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peer": true + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -1327,6 +2434,19 @@ "node": ">=8.10.0" } }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -1362,6 +2482,67 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "peer": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "peer": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peer": true, + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -1398,6 +2579,29 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -1517,6 +2721,13 @@ "node": ">=8" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true, + "peer": true + }, "node_modules/timsort": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", @@ -1558,6 +2769,55 @@ "node": ">=10.0.0" } }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "peer": true + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "peer": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "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" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typescript": { "version": "4.4.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", @@ -1588,6 +2848,13 @@ "punycode": "^2.1.0" } }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true, + "peer": true + }, "node_modules/validator": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/validator/-/validator-8.2.0.tgz", @@ -1627,6 +2894,16 @@ "string-width": "^1.0.2 || 2" } }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/workerpool": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz", @@ -1996,6 +3273,96 @@ } } }, + "@dcl/eslint-config": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@dcl/eslint-config/-/eslint-config-1.0.0.tgz", + "integrity": "sha512-9T0xFSQJVuBdmKqOvs/xYCesOqZSnmjZ2Nc40HBOto2U61VnU90Lz3LXMJAbs/nkij6madfgQyd8+uo1XNjhPg==", + "dev": true, + "requires": {} + }, + "@eslint/eslintrc": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", + "integrity": "sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==", + "dev": true, + "peer": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.0.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "peer": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "peer": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "peer": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "peer": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "peer": true + } + } + }, + "@humanwhocodes/config-array": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", + "integrity": "sha512-JQlEKbcgEUjBFhLIF4iqM7u/9lwgHRBcpHrmUNCALK0Q3amXN6lxdoXLnF0sm11E9VqTmBALR87IlUg1bZ8A9A==", + "dev": true, + "peer": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true, + "peer": true + }, "@jest/types": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", @@ -2088,6 +3455,35 @@ } } }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "peer": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "peer": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "peer": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, "@rushstack/node-core-library": { "version": "3.43.2", "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.43.2.tgz", @@ -2165,6 +3561,13 @@ "@types/istanbul-lib-report": "*" } }, + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true, + "peer": true + }, "@types/mocha": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.0.tgz", @@ -2198,12 +3601,117 @@ "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.4.0.tgz", + "integrity": "sha512-9/yPSBlwzsetCsGEn9j24D8vGQgJkOTr4oMLas/w886ZtzKIs1iyoqFrwsX2fqYEeUwsdBpC21gcjRGo57u0eg==", + "dev": true, + "peer": true, + "requires": { + "@typescript-eslint/experimental-utils": "5.4.0", + "@typescript-eslint/scope-manager": "5.4.0", + "debug": "^4.3.2", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.2.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.4.0.tgz", + "integrity": "sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==", + "dev": true, + "peer": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.4.0", + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/typescript-estree": "5.4.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.4.0.tgz", + "integrity": "sha512-JoB41EmxiYpaEsRwpZEYAJ9XQURPFer8hpkIW9GiaspVLX8oqbqNM8P4EP8HOZg96yaALiLEVWllA2E8vwsIKw==", + "dev": true, + "peer": true, + "requires": { + "@typescript-eslint/scope-manager": "5.4.0", + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/typescript-estree": "5.4.0", + "debug": "^4.3.2" + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.4.0.tgz", + "integrity": "sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==", + "dev": true, + "peer": true, + "requires": { + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/visitor-keys": "5.4.0" + } + }, + "@typescript-eslint/types": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.4.0.tgz", + "integrity": "sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==", + "dev": true, + "peer": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.4.0.tgz", + "integrity": "sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==", + "dev": true, + "peer": true, + "requires": { + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/visitor-keys": "5.4.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.4.0.tgz", + "integrity": "sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==", + "dev": true, + "peer": true, + "requires": { + "@typescript-eslint/types": "5.4.0", + "eslint-visitor-keys": "^3.0.0" + } + }, "@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "acorn": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "dev": true, + "peer": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peer": true, + "requires": {} + }, "ajv": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.0.tgz", @@ -2222,9 +3730,9 @@ "dev": true }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -2261,6 +3769,13 @@ "sprintf-js": "~1.0.2" } }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "peer": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -2304,6 +3819,13 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "peer": true + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -2358,92 +3880,356 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "colors": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", + "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "peer": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "peer": true, + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "peer": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "diff-sequences": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", + "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "peer": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "peer": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "peer": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.3.0.tgz", + "integrity": "sha512-aIay56Ph6RxOTC7xyr59Kt3ewX185SaGnAr8eWukoPLeriCrvGjvAubxuvaXOfsxhtwV5g0uBOsyhAom4qJdww==", + "dev": true, + "peer": true, + "requires": { + "@eslint/eslintrc": "^1.0.4", + "@humanwhocodes/config-array": "^0.6.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.1.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.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.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.2.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "peer": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "peer": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "peer": true + }, + "eslint-scope": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "dev": true, + "peer": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "peer": true + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "peer": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "peer": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "peer": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "peer": true }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "peer": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.1" } } } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "eslint-config-prettier": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", + "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "dev": true, + "peer": true, + "requires": {} + }, + "eslint-plugin-prettier": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz", + "integrity": "sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==", "dev": true, + "peer": true, "requires": { - "color-name": "~1.1.4" + "prettier-linter-helpers": "^1.0.0" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "colors": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", - "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true + "peer": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } }, - "diff-sequences": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", - "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", - "dev": true + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "peer": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "peer": true + } + } }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true + "eslint-visitor-keys": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "dev": true, + "peer": true }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "espree": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.1.0.tgz", + "integrity": "sha512-ZgYLvCS1wxOczBYGcQT9DDWgicXwJ4dbocr9uYN+/eresBAUuBu+O4WzB21ufQ/JqQT8gyp7hJ3z8SHii32mTQ==", + "dev": true, + "peer": true, + "requires": { + "acorn": "^8.6.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.1.0" + } }, "esprima": { "version": "4.0.1", @@ -2451,6 +4237,58 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "peer": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "peer": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "peer": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "peer": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "peer": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "peer": true + }, "expect": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", @@ -2470,12 +4308,60 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true, + "peer": true + }, + "fast-glob": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "dev": true, + "peer": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true, + "peer": true + }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "peer": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "peer": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -2501,6 +4387,24 @@ "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "peer": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", + "dev": true, + "peer": true + }, "fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -2531,6 +4435,13 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true, + "peer": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -2552,14 +4463,39 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" } }, + "globals": { + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "dev": true, + "peer": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "peer": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, "graceful-fs": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.5.tgz", @@ -2593,12 +4529,37 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "ignore": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", + "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "dev": true, + "peer": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "peer": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, "import-lazy": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", "dev": true }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "peer": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -2646,9 +4607,9 @@ "dev": true }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -2752,6 +4713,13 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true, + "peer": true + }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -2761,6 +4729,17 @@ "graceful-fs": "^4.1.6" } }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "peer": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -2788,6 +4767,13 @@ "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", "dev": true }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "peer": true + }, "log-symbols": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", @@ -2812,14 +4798,21 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "peer": true + }, "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "dev": true, "requires": { "braces": "^3.0.1", - "picomatch": "^2.0.5" + "picomatch": "^2.2.3" } }, "minimatch": { @@ -2878,21 +4871,28 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true } } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "nanoid": { "version": "3.1.12", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", "dev": true }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true, + "peer": true + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -2908,6 +4908,21 @@ "wrappy": "1" } }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "peer": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -2932,6 +4947,16 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "peer": true, + "requires": { + "callsites": "^3.0.0" + } + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -2944,18 +4969,56 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "peer": true + }, "path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "peer": true + }, "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "peer": true + }, + "prettier": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", + "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==", + "dev": true, + "peer": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "peer": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, "pretty-format": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", @@ -2968,11 +5031,25 @@ "react-is": "^17.0.1" } }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "peer": true + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "peer": true + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -2997,6 +5074,13 @@ "picomatch": "^2.2.1" } }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "peer": true + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -3023,6 +5107,40 @@ "path-parse": "^1.0.6" } }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "peer": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "peer": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "peer": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "peer": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -3053,6 +5171,23 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "peer": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "peer": true + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -3146,6 +5281,13 @@ "has-flag": "^4.0.0" } }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true, + "peer": true + }, "timsort": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", @@ -3175,6 +5317,40 @@ "yn": "3.1.1" } }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "peer": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "peer": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "peer": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "peer": true + }, "typescript": { "version": "4.4.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", @@ -3195,6 +5371,13 @@ "punycode": "^2.1.0" } }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true, + "peer": true + }, "validator": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/validator/-/validator-8.2.0.tgz", @@ -3225,6 +5408,13 @@ "string-width": "^1.0.2 || 2" } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "peer": true + }, "workerpool": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz", diff --git a/package.json b/package.json index d563ad5f..85ac40b9 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,13 @@ "scripts": { "build": "tsc -p tsconfig.json", "test": "mocha", + "lint": "eslint . --ext .ts", + "lint:fix": "eslint . --ext .ts --fix", "check-api": "api-extractor run --typescript-compiler-folder ./node_modules/typescript", "refresh-api": "api-extractor run --local --verbose --diagnostics --typescript-compiler-folder ./node_modules/typescript" }, "devDependencies": { + "@dcl/eslint-config": "^1.0.0", "@microsoft/api-extractor": "^7.18.19", "@types/mocha": "^8.2.0", "@types/node": "^14.14.25", diff --git a/report/schemas.api.md b/report/schemas.api.md index 86dac657..5ffe1569 100644 --- a/report/schemas.api.md +++ b/report/schemas.api.md @@ -19,6 +19,27 @@ type Actions = typeof SCENE_UPDATE | typeof UPDATE; export { Ajv } +// @alpha (undocumented) +type AssetJson = { + id: string; + assetType: string; + name: string; + description: string; + thumbnail: string; + model: string; + category: WearableCategory; + rarity: Rarity; + bodyShape: AssetWearableGender; +}; + +// @alpha (undocumented) +namespace AssetJson { + const // (undocumented) + schema: JSONSchema; + const // (undocumented) + validate: ValidateFunction; +} + // @alpha export type Avatar = { userId: string; @@ -314,7 +335,7 @@ export namespace EthAddress { } // @alpha (undocumented) -export type FeatureToggles = Record; +export type FeatureToggles = Record; // @alpha (undocumented) export namespace FeatureToggles { @@ -983,7 +1004,8 @@ declare namespace sdk { SceneUpdate, UPDATE, Update, - ProjectType + ProjectType, + AssetJson } } export { sdk } @@ -1013,7 +1035,7 @@ export type Source = { x: number; y: number; }; - rotation?: "north" | "east" | "south" | "west"; + rotation?: 'north' | 'east' | 'south' | 'west'; layout?: { rows: number; cols: number; @@ -1076,7 +1098,7 @@ export interface ValidateFunction { } // @public -export function validateType(theType: Pick, "validate">, value: T): boolean; +export function validateType(theType: Pick, 'validate'>, value: T): boolean; // @alpha export type ValidWorldRange = { @@ -1237,9 +1259,9 @@ export namespace World { // src/dapps/contract.ts:10:3 - (ae-incompatible-release-tags) The symbol "network" is marked as @public, but its signature references "Network" which is marked as @alpha // src/dapps/contract.ts:11:3 - (ae-incompatible-release-tags) The symbol "chainId" is marked as @public, but its signature references "ChainId" which is marked as @alpha // src/dapps/contract.ts:16:3 - (ae-incompatible-release-tags) The symbol "network" is marked as @public, but its signature references "Network" which is marked as @alpha -// src/dapps/item.ts:29:3 - (ae-incompatible-release-tags) The symbol "network" is marked as @public, but its signature references "Network" which is marked as @alpha -// src/dapps/item.ts:30:3 - (ae-incompatible-release-tags) The symbol "chainId" is marked as @public, but its signature references "ChainId" which is marked as @alpha -// src/dapps/item.ts:48:3 - (ae-incompatible-release-tags) The symbol "network" is marked as @public, but its signature references "Network" which is marked as @alpha +// src/dapps/item.ts:28:3 - (ae-incompatible-release-tags) The symbol "network" is marked as @public, but its signature references "Network" which is marked as @alpha +// src/dapps/item.ts:29:3 - (ae-incompatible-release-tags) The symbol "chainId" is marked as @public, but its signature references "ChainId" which is marked as @alpha +// src/dapps/item.ts:47:3 - (ae-incompatible-release-tags) The symbol "network" is marked as @public, but its signature references "Network" which is marked as @alpha // src/dapps/mint.ts:16:3 - (ae-incompatible-release-tags) The symbol "network" is marked as @public, but its signature references "Network" which is marked as @alpha // src/dapps/mint.ts:17:3 - (ae-incompatible-release-tags) The symbol "chainId" is marked as @public, but its signature references "ChainId" which is marked as @alpha // src/dapps/mint.ts:37:3 - (ae-incompatible-release-tags) The symbol "network" is marked as @public, but its signature references "Network" which is marked as @alpha @@ -1252,8 +1274,9 @@ export namespace World { // src/dapps/sale.ts:18:3 - (ae-incompatible-release-tags) The symbol "network" is marked as @public, but its signature references "Network" which is marked as @alpha // src/dapps/sale.ts:19:3 - (ae-incompatible-release-tags) The symbol "chainId" is marked as @public, but its signature references "ChainId" which is marked as @alpha // src/dapps/sale.ts:42:3 - (ae-incompatible-release-tags) The symbol "network" is marked as @public, but its signature references "Network" which is marked as @alpha -// src/platform/scene/spawn-point.ts:6:3 - (ae-forgotten-export) The symbol "SinglePosition" needs to be exported by the entry point index.d.ts -// src/platform/scene/spawn-point.ts:6:3 - (ae-forgotten-export) The symbol "MultiPosition" needs to be exported by the entry point index.d.ts +// src/platform/scene/spawn-point.ts:10:3 - (ae-forgotten-export) The symbol "SinglePosition" needs to be exported by the entry point index.d.ts +// src/platform/scene/spawn-point.ts:10:3 - (ae-forgotten-export) The symbol "MultiPosition" needs to be exported by the entry point index.d.ts +// src/sdk/project/asset-json.ts:24:3 - (ae-forgotten-export) The symbol "AssetWearableGender" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/src/dapps/bid.ts b/src/dapps/bid.ts index 85e3fc3e..eeab16f7 100644 --- a/src/dapps/bid.ts +++ b/src/dapps/bid.ts @@ -24,7 +24,7 @@ export type Bid = { export enum BidSortBy { RECENTLY_OFFERED = 'recently_offered', RECENTLY_UPDATED = 'recently_updated', - MOST_EXPENSIVE = 'most_expensive', + MOST_EXPENSIVE = 'most_expensive' } export type BidFilters = { @@ -44,44 +44,44 @@ export namespace Bid { type: 'object', properties: { id: { - type: 'string', + type: 'string' }, bidder: { - type: 'string', + type: 'string' }, seller: { - type: 'string', + type: 'string' }, price: { - type: 'string', + type: 'string' }, fingerprint: { - type: 'string', + type: 'string' }, status: ListingStatus.schema, blockchainId: { - type: 'string', + type: 'string' }, blockNumber: { - type: 'string', + type: 'string' }, contractAddress: { - type: 'string', + type: 'string' }, tokenId: { - type: 'string', + type: 'string' }, network: Network.schema, chainId: ChainId.schema, expiresAt: { - type: 'integer', + type: 'integer' }, createdAt: { - type: 'integer', + type: 'integer' }, updatedAt: { - type: 'integer', - }, + type: 'integer' + } }, required: [ 'id', @@ -98,8 +98,8 @@ export namespace Bid { 'chainId', 'expiresAt', 'createdAt', - 'updatedAt', - ], + 'updatedAt' + ] } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/dapps/body-shape.ts b/src/dapps/body-shape.ts index 6e2a65ff..e977fc46 100644 --- a/src/dapps/body-shape.ts +++ b/src/dapps/body-shape.ts @@ -2,13 +2,13 @@ import { generateValidator, JSONSchema, ValidateFunction } from '../validation' export enum BodyShape { MALE = 'BaseMale', - FEMALE = 'BaseFemale', + FEMALE = 'BaseFemale' } export namespace BodyShape { export const schema: JSONSchema = { type: 'string', - enum: Object.values(BodyShape), + enum: Object.values(BodyShape) } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/dapps/chain-id.ts b/src/dapps/chain-id.ts index 9f2768c1..0334e623 100644 --- a/src/dapps/chain-id.ts +++ b/src/dapps/chain-id.ts @@ -13,7 +13,7 @@ export enum ChainId { ETHEREUM_GOERLI = 5, ETHEREUM_KOVAN = 42, MATIC_MAINNET = 137, - MATIC_MUMBAI = 80001, + MATIC_MUMBAI = 80001 } /** @@ -70,7 +70,7 @@ export function getURNProtocol(chainId: ChainId): string { export namespace ChainId { export const schema: JSONSchema = { type: 'number', - enum: Object.values(ChainId), + enum: Object.values(ChainId) } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/dapps/chain-name.ts b/src/dapps/chain-name.ts index acd3970a..ed66738d 100644 --- a/src/dapps/chain-name.ts +++ b/src/dapps/chain-name.ts @@ -12,7 +12,7 @@ export enum ChainName { ETHEREUM_GOERLI = 'Goerli', ETHEREUM_KOVAN = 'Kovan', MATIC_MAINNET = 'Polygon', - MATIC_MUMBAI = 'Mumbai', + MATIC_MUMBAI = 'Mumbai' } /** @@ -46,7 +46,7 @@ export function getChainId(chainName: ChainName): ChainId | null { export namespace ChainName { export const schema: JSONSchema = { type: 'string', - enum: Object.values(ChainName), + enum: Object.values(ChainName) } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/dapps/collection.ts b/src/dapps/collection.ts index 2ed0ff1d..2631e525 100644 --- a/src/dapps/collection.ts +++ b/src/dapps/collection.ts @@ -20,7 +20,7 @@ export enum CollectionSortBy { NEWEST = 'newest', NAME = 'name', RECENTLY_REVIEWED = 'recently_reviewed', - SIZE = 'size', + SIZE = 'size' } export type CollectionFilters = { @@ -41,34 +41,34 @@ export namespace Collection { type: 'object', properties: { urn: { - type: 'string', + type: 'string' }, creator: { - type: 'string', + type: 'string' }, name: { - type: 'string', + type: 'string' }, contractAddress: { - type: 'string', + type: 'string' }, size: { - type: 'integer', + type: 'integer' }, isOnSale: { - type: 'boolean', + type: 'boolean' }, createdAt: { - type: 'integer', + type: 'integer' }, updatedAt: { - type: 'integer', + type: 'integer' }, reviewedAt: { - type: 'integer', + type: 'integer' }, network: Network.schema, - chainId: ChainId.schema, + chainId: ChainId.schema }, required: [ 'urn', @@ -81,8 +81,8 @@ export namespace Collection { 'updatedAt', 'reviewedAt', 'network', - 'chainId', - ], + 'chainId' + ] } export const validate: ValidateFunction = diff --git a/src/dapps/contract.ts b/src/dapps/contract.ts index 20995aa0..a5dcd5e1 100644 --- a/src/dapps/contract.ts +++ b/src/dapps/contract.ts @@ -17,7 +17,7 @@ export type ContractFilters = { } export enum ContractSortBy { - NAME = 'name', + NAME = 'name' } export namespace Contract { @@ -25,16 +25,16 @@ export namespace Contract { type: 'object', properties: { name: { - type: 'string', + type: 'string' }, address: { - type: 'string', + type: 'string' }, category: NFTCategory.schema, network: Network.schema, - chainId: ChainId.schema, + chainId: ChainId.schema }, - required: ['name', 'address', 'category', 'network', 'chainId'], + required: ['name', 'address', 'category', 'network', 'chainId'] } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/dapps/item.ts b/src/dapps/item.ts index e38b6b3a..7a9d4303 100644 --- a/src/dapps/item.ts +++ b/src/dapps/item.ts @@ -1,5 +1,4 @@ import { generateValidator, JSONSchema, ValidateFunction } from '../validation' -import { BodyShape } from './body-shape' import { ChainId } from './chain-id' import { Network } from './network' import { NFT } from './nft' @@ -53,7 +52,7 @@ export enum ItemSortBy { NEWEST = 'newest', RECENTLY_REVIEWED = 'recently_reviewed', RECENTLY_SOLD = 'recently_sold', - CHEAPEST = 'cheapest', + CHEAPEST = 'cheapest' } export namespace Item { @@ -61,54 +60,54 @@ export namespace Item { type: 'object', properties: { id: { - type: 'string', + type: 'string' }, name: { - type: 'string', + type: 'string' }, thumbnail: { - type: 'string', + type: 'string' }, url: { - type: 'string', + type: 'string' }, category: NFTCategory.schema, contractAddress: { - type: 'string', + type: 'string' }, itemId: { - type: 'string', + type: 'string' }, rarity: { - type: 'string', + type: 'string' }, price: { - type: 'string', + type: 'string' }, available: { - type: 'integer', + type: 'integer' }, isOnSale: { - type: 'boolean', + type: 'boolean' }, creator: { - type: 'string', + type: 'string' }, data: NFT.schema.properties!.data, network: Network.schema, chainId: ChainId.schema, createdAt: { - type: 'integer', + type: 'integer' }, updatedAt: { - type: 'integer', + type: 'integer' }, reviewedAt: { - type: 'integer', + type: 'integer' }, soldAt: { - type: 'integer', - }, + type: 'integer' + } }, required: [ 'id', @@ -128,8 +127,8 @@ export namespace Item { 'chainId', 'createdAt', 'updatedAt', - 'soldAt', - ], + 'soldAt' + ] } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/dapps/listing-status.ts b/src/dapps/listing-status.ts index 26748144..c2c986be 100644 --- a/src/dapps/listing-status.ts +++ b/src/dapps/listing-status.ts @@ -3,13 +3,13 @@ import { generateValidator, JSONSchema, ValidateFunction } from '../validation' export enum ListingStatus { OPEN = 'open', SOLD = 'sold', - CANCELLED = 'cancelled', + CANCELLED = 'cancelled' } export namespace ListingStatus { export const schema: JSONSchema = { type: 'string', - enum: Object.values(ListingStatus), + enum: Object.values(ListingStatus) } export const validate: ValidateFunction = diff --git a/src/dapps/meta-transactions.ts b/src/dapps/meta-transactions.ts index 6600f606..ccb1ce27 100644 --- a/src/dapps/meta-transactions.ts +++ b/src/dapps/meta-transactions.ts @@ -21,14 +21,13 @@ export namespace MetaTransaction { type: 'array', items: [{ type: 'string' }, { type: 'string' }], additionalItems: false, - minItems: 2, - }, + minItems: 2 + } }, additionalProperties: false, - required: ['from', 'params'], + required: ['from', 'params'] } - export const validate: ValidateFunction = generateValidator( - schema - ) + export const validate: ValidateFunction = + generateValidator(schema) } diff --git a/src/dapps/mint.ts b/src/dapps/mint.ts index fd3a67c3..c3ebfe5a 100644 --- a/src/dapps/mint.ts +++ b/src/dapps/mint.ts @@ -19,7 +19,7 @@ export type Mint = { export enum MintSortBy { RECENTLY_MINTED = 'recently_minted', - MOST_EXPENSIVE = 'most_expensive', + MOST_EXPENSIVE = 'most_expensive' } export type MintFilters = { @@ -42,38 +42,38 @@ export namespace Mint { type: 'object', properties: { id: { - type: 'string', + type: 'string' }, creator: { - type: 'string', + type: 'string' }, beneficiary: { - type: 'string', + type: 'string' }, minter: { - type: 'string', + type: 'string' }, price: { type: 'string', - nullable: true, + nullable: true }, contractAddress: { - type: 'string', + type: 'string' }, tokenId: { - type: 'string', + type: 'string' }, itemId: { - type: 'string', + type: 'string' }, issuedId: { - type: 'string', + type: 'string' }, timestamp: { - type: 'integer', + type: 'integer' }, network: Network.schema, - chainId: ChainId.schema, + chainId: ChainId.schema }, required: [ 'id', @@ -87,8 +87,8 @@ export namespace Mint { 'price', 'timestamp', 'network', - 'chainId', - ], + 'chainId' + ] } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/dapps/network.ts b/src/dapps/network.ts index 5d7e5a3d..764882e5 100644 --- a/src/dapps/network.ts +++ b/src/dapps/network.ts @@ -6,7 +6,7 @@ import { generateValidator, JSONSchema, ValidateFunction } from '../validation' */ export enum Network { ETHEREUM = 'ETHEREUM', - MATIC = 'MATIC', + MATIC = 'MATIC' } /** @@ -15,7 +15,7 @@ export enum Network { export namespace Network { export const schema: JSONSchema = { type: 'string', - enum: Object.values(Network), + enum: Object.values(Network) } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/dapps/nft-category.ts b/src/dapps/nft-category.ts index b9582462..982d1f8e 100644 --- a/src/dapps/nft-category.ts +++ b/src/dapps/nft-category.ts @@ -4,13 +4,13 @@ export enum NFTCategory { PARCEL = 'parcel', ESTATE = 'estate', WEARABLE = 'wearable', - ENS = 'ens', + ENS = 'ens' } export namespace NFTCategory { export const schema: JSONSchema = { type: 'string', - enum: Object.values(NFTCategory), + enum: Object.values(NFTCategory) } export const validate: ValidateFunction = diff --git a/src/dapps/nft.ts b/src/dapps/nft.ts index 2c49e42d..5442f720 100644 --- a/src/dapps/nft.ts +++ b/src/dapps/nft.ts @@ -76,7 +76,7 @@ export enum NFTSortBy { NEWEST = 'newest', RECENTLY_LISTED = 'recently_listed', RECENTLY_SOLD = 'recently_sold', - CHEAPEST = 'cheapest', + CHEAPEST = 'cheapest' } export namespace NFT { @@ -84,29 +84,29 @@ export namespace NFT { type: 'object', properties: { id: { - type: 'string', + type: 'string' }, tokenId: { - type: 'string', + type: 'string' }, contractAddress: { - type: 'string', + type: 'string' }, activeOrderId: { type: ['string'], - nullable: true, + nullable: true }, owner: { - type: 'string', + type: 'string' }, name: { - type: 'string', + type: 'string' }, image: { - type: 'string', + type: 'string' }, url: { - type: 'string', + type: 'string' }, data: { type: 'object', @@ -117,40 +117,40 @@ export namespace NFT { properties: { description: { type: ['string'], - nullable: true, + nullable: true }, x: { - type: 'string', + type: 'string' }, y: { - type: 'string', + type: 'string' }, estate: { type: 'object', properties: { tokenId: { - type: 'string', + type: 'string' }, name: { - type: 'string', - }, + type: 'string' + } }, required: ['tokenId', 'name'], - nullable: true, - }, + nullable: true + } }, required: ['description', 'x', 'y', 'estate'], - nullable: true, + nullable: true }, estate: { type: 'object', properties: { description: { type: ['string'], - nullable: true, + nullable: true }, size: { - type: 'integer', + type: 'integer' }, parcels: { type: 'array', @@ -158,68 +158,68 @@ export namespace NFT { type: 'object', properties: { x: { - type: 'number', + type: 'number' }, y: { - type: 'number', - }, + type: 'number' + } }, - required: ['x', 'y'], - }, - }, + required: ['x', 'y'] + } + } }, required: ['description', 'size', 'parcels'], - nullable: true, + nullable: true }, wearable: { type: 'object', properties: { bodyShapes: { type: 'array', - items: BodyShape.schema, + items: BodyShape.schema }, category: WearableCategory.schema, description: { - type: 'string', + type: 'string' }, - rarity: Rarity.schema, + rarity: Rarity.schema }, required: ['bodyShapes', 'category', 'description', 'rarity'], - nullable: true, + nullable: true }, ens: { type: 'object', properties: { subdomain: { - type: 'string', - }, + type: 'string' + } }, required: ['subdomain'], - nullable: true, - }, + nullable: true + } }, - required: [], + required: [] }, issuedId: { type: 'string', - nullable: true, + nullable: true }, itemId: { type: 'string', - nullable: true, + nullable: true }, category: NFTCategory.schema, network: Network.schema, chainId: ChainId.schema, createdAt: { - type: 'integer', + type: 'integer' }, updatedAt: { - type: 'integer', + type: 'integer' }, soldAt: { - type: 'integer', - }, + type: 'integer' + } }, required: [ 'id', @@ -238,8 +238,8 @@ export namespace NFT { 'chainId', 'createdAt', 'updatedAt', - 'soldAt', - ], + 'soldAt' + ] } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/dapps/order.ts b/src/dapps/order.ts index f37c54ed..744823b5 100644 --- a/src/dapps/order.ts +++ b/src/dapps/order.ts @@ -33,7 +33,7 @@ export type OrderFilters = { export enum OrderSortBy { RECENTLY_LISTED = 'recently_listed', RECENTLY_UPDATED = 'recently_updated', - CHEAPEST = 'cheapest', + CHEAPEST = 'cheapest' } export namespace Order { @@ -41,36 +41,36 @@ export namespace Order { type: 'object', properties: { id: { - type: 'string', + type: 'string' }, contractAddress: { - type: 'string', + type: 'string' }, tokenId: { - type: 'string', + type: 'string' }, owner: { - type: 'string', + type: 'string' }, buyer: { type: ['string'], - nullable: true, + nullable: true }, price: { - type: 'string', + type: 'string' }, status: ListingStatus.schema, network: Network.schema, chainId: ChainId.schema, expiresAt: { - type: 'integer', + type: 'integer' }, createdAt: { - type: 'integer', + type: 'integer' }, updatedAt: { - type: 'integer', - }, + type: 'integer' + } }, required: [ 'id', @@ -84,8 +84,8 @@ export namespace Order { 'chainId', 'expiresAt', 'createdAt', - 'updatedAt', - ], + 'updatedAt' + ] } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/dapps/rarity.ts b/src/dapps/rarity.ts index a1d9b319..109cd96f 100644 --- a/src/dapps/rarity.ts +++ b/src/dapps/rarity.ts @@ -7,13 +7,13 @@ export enum Rarity { EPIC = 'epic', RARE = 'rare', UNCOMMON = 'uncommon', - COMMON = 'common', + COMMON = 'common' } export namespace Rarity { export const schema: JSONSchema = { type: 'string', - enum: Object.values(Rarity), + enum: Object.values(Rarity) } export const validate: ValidateFunction = generateValidator(schema) @@ -25,7 +25,7 @@ export namespace Rarity { [Rarity.EPIC]: 1000, [Rarity.RARE]: 5000, [Rarity.UNCOMMON]: 10000, - [Rarity.COMMON]: 100000, + [Rarity.COMMON]: 100000 } const lightColorByRarity: Record = { @@ -35,7 +35,7 @@ export namespace Rarity { [Rarity.EPIC]: '#6397F2', [Rarity.RARE]: '#3AD682', [Rarity.UNCOMMON]: '#FF8563', - [Rarity.COMMON]: '#D4E0E0', + [Rarity.COMMON]: '#D4E0E0' } const colorByRarity: Record = { @@ -45,7 +45,7 @@ export namespace Rarity { [Rarity.EPIC]: '#3D85E6', [Rarity.RARE]: '#36CF75', [Rarity.UNCOMMON]: '#ED6D4F', - [Rarity.COMMON]: '#ABC1C1', + [Rarity.COMMON]: '#ABC1C1' } export function getMaxSupply(rarity: Rarity): number { diff --git a/src/dapps/sale-type.ts b/src/dapps/sale-type.ts index d8d37125..ebe059b2 100644 --- a/src/dapps/sale-type.ts +++ b/src/dapps/sale-type.ts @@ -3,13 +3,13 @@ import { generateValidator, JSONSchema, ValidateFunction } from '../validation' export enum SaleType { ORDER = 'order', BID = 'bid', - MINT = 'mint', + MINT = 'mint' } export namespace SaleType { export const schema: JSONSchema = { type: 'string', - enum: Object.values(SaleType), + enum: Object.values(SaleType) } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/dapps/sale.ts b/src/dapps/sale.ts index c8f983e0..e0b4569d 100644 --- a/src/dapps/sale.ts +++ b/src/dapps/sale.ts @@ -21,7 +21,7 @@ export type Sale = { export enum SaleSortBy { RECENTLY_SOLD = 'recently_sold', - MOST_EXPENSIVE = 'most_expensive', + MOST_EXPENSIVE = 'most_expensive' } export type SaleFilters = { @@ -47,35 +47,35 @@ export namespace Sale { type: 'object', properties: { id: { - type: 'string', + type: 'string' }, type: SaleType.schema, buyer: { - type: 'string', + type: 'string' }, seller: { - type: 'string', + type: 'string' }, price: { - type: 'string', + type: 'string' }, contractAddress: { - type: 'string', + type: 'string' }, tokenId: { - type: 'string', + type: 'string' }, itemId: { - type: 'string', + type: 'string' }, txHash: { - type: 'string', + type: 'string' }, timestamp: { - type: 'integer', + type: 'integer' }, network: Network.schema, - chainId: ChainId.schema, + chainId: ChainId.schema }, required: [ 'id', @@ -88,8 +88,8 @@ export namespace Sale { 'timestamp', 'txHash', 'network', - 'chainId', - ], + 'chainId' + ] } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/dapps/wearable-category.ts b/src/dapps/wearable-category.ts index 83d1157d..0bef5705 100644 --- a/src/dapps/wearable-category.ts +++ b/src/dapps/wearable-category.ts @@ -15,13 +15,13 @@ export enum WearableCategory { HELMET = 'helmet', MASK = 'mask', TIARA = 'tiara', - TOP_HEAD = 'top_head', + TOP_HEAD = 'top_head' } export namespace WearableCategory { export const schema: JSONSchema = { type: 'string', - enum: Object.values(WearableCategory), + enum: Object.values(WearableCategory) } export const validate: ValidateFunction = diff --git a/src/dapps/wearable-gender.ts b/src/dapps/wearable-gender.ts index 985b2f78..7cf885fe 100644 --- a/src/dapps/wearable-gender.ts +++ b/src/dapps/wearable-gender.ts @@ -2,13 +2,13 @@ import { generateValidator, JSONSchema, ValidateFunction } from '../validation' export enum WearableGender { MALE = 'male', - FEMALE = 'female', + FEMALE = 'female' } export namespace WearableGender { export const schema: JSONSchema = { type: 'string', - enum: Object.values(WearableGender), + enum: Object.values(WearableGender) } export const validate: ValidateFunction = diff --git a/src/dapps/world.ts b/src/dapps/world.ts index 537c4b7b..2acd041a 100644 --- a/src/dapps/world.ts +++ b/src/dapps/world.ts @@ -1,23 +1,23 @@ -import { generateValidator, JSONSchema, ValidateFunction } from "../validation"; +import { generateValidator, JSONSchema, ValidateFunction } from '../validation' /** * World Range * @alpha */ export type ValidWorldRange = { - xMin: number; - yMin: number; - xMax: number; - yMax: number; -}; + xMin: number + yMin: number + xMax: number + yMax: number +} /** * World * @alpha */ export type World = { - validWorldRanges: Array; -}; + validWorldRanges: Array +} /** * Get World @@ -30,28 +30,28 @@ export function getWorld(): World { xMin: -150, yMin: -150, xMax: 150, - yMax: 150, + yMax: 150 }, { xMin: 62, yMin: 151, xMax: 162, - yMax: 158, + yMax: 158 }, { xMin: 151, yMin: 144, xMax: 162, - yMax: 150, + yMax: 150 }, { xMin: 151, yMin: 59, xMax: 163, - yMax: 143, - }, - ], - }; + yMax: 143 + } + ] + } } /** @@ -59,18 +59,18 @@ export function getWorld(): World { * @alpha */ export function isInsideWorldLimits(x: number, y: number) { - const validWorldRanges = getWorld().validWorldRanges; - for (var range of validWorldRanges) { + const validWorldRanges = getWorld().validWorldRanges + for (const range of validWorldRanges) { if ( x >= range.xMin && x <= range.xMax && y >= range.yMin && y <= range.yMax ) { - return true; + return true } } - return false; + return false } /** @@ -78,41 +78,41 @@ export function isInsideWorldLimits(x: number, y: number) { */ export namespace World { export const schema: JSONSchema = { - type: "object", - required: ["validWorldRanges"], + type: 'object', + required: ['validWorldRanges'], properties: { validWorldRanges: { - type: "array", + type: 'array', default: [ { xMin: -150, yMin: -150, xMax: 150, - yMax: 150, - }, + yMax: 150 + } ], items: { - type: "object", - required: ["xMin", "yMin", "xMax", "yMax"], + type: 'object', + required: ['xMin', 'yMin', 'xMax', 'yMax'], properties: { xMin: { - type: "integer", + type: 'integer' }, yMin: { - type: "integer", + type: 'integer' }, xMax: { - type: "integer", + type: 'integer' }, yMax: { - type: "integer", - }, - }, - }, - }, + type: 'integer' + } + } + } + } }, additionalProperties: false - }; + } - export const validate: ValidateFunction = generateValidator(schema); + export const validate: ValidateFunction = generateValidator(schema) } diff --git a/src/index.ts b/src/index.ts index 2ea8e014..4d114d8c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,7 +11,7 @@ export { ChainName, getChainId } from './dapps/chain-name' export { Collection, CollectionFilters, - CollectionSortBy, + CollectionSortBy } from './dapps/collection' export { Contract, ContractFilters, ContractSortBy } from './dapps/contract' export { Item, ItemFilters, ItemSortBy } from './dapps/item' @@ -31,9 +31,9 @@ export { World, ValidWorldRange, getWorld, - isInsideWorldLimits, + isInsideWorldLimits } from './dapps/world' export * from './platform' export * from './misc' -export { sdk } \ No newline at end of file +export { sdk } diff --git a/src/misc/index.ts b/src/misc/index.ts index bf5d6baf..dd57a4a6 100644 --- a/src/misc/index.ts +++ b/src/misc/index.ts @@ -1,14 +1,14 @@ -import { generateValidator, JSONSchema, ValidateFunction } from ".." +import { generateValidator, JSONSchema, ValidateFunction } from '..' /** * Color3 is a data type that describes a color using R, G and B components - * @alpha + * @alpha */ export type Color3 = { r: number; g: number; b: number } /** * Color3 - * @alpha + * @alpha */ export namespace Color3 { export const schema: JSONSchema = { @@ -29,54 +29,58 @@ export namespace Color3 { type: 'number', minimum: 0, maximum: 1 - }, + } } } - const schemaValidator: ValidateFunction = generateValidator(schema); - export const validate: ValidateFunction = (color: any): color is Color3 => - schemaValidator(color) + const schemaValidator: ValidateFunction = generateValidator(schema) + export const validate: ValidateFunction = ( + color: any + ): color is Color3 => schemaValidator(color) } /** - * @alpha + * @alpha */ export type WearableId = string /** * EthAddress is a data type that describes an Ethereum address - * @alpha + * @alpha */ export type EthAddress = string /** * EthAddress - * @alpha + * @alpha */ export namespace EthAddress { export const schema: JSONSchema = { type: 'string', pattern: '^0x[a-fA-F0-9]{40}$' } - const schemaValidator: ValidateFunction = generateValidator(schema); - export const validate: ValidateFunction = (ethAddress: any): ethAddress is EthAddress => - schemaValidator(ethAddress) + const schemaValidator: ValidateFunction = + generateValidator(schema) + export const validate: ValidateFunction = ( + ethAddress: any + ): ethAddress is EthAddress => schemaValidator(ethAddress) } /** * IPFSv2 is a data type that describes an IPFS v2 hash - * @alpha + * @alpha */ export type IPFSv2 = string /** * IPFSv2 - * @alpha + * @alpha */ export namespace IPFSv2 { export const schema: JSONSchema = { type: 'string', pattern: '^(ba)[a-zA-Z0-9]{57}$' } - const schemaValidator: ValidateFunction = generateValidator(schema); - export const validate: ValidateFunction = (hash: any): hash is IPFSv2 => - schemaValidator(hash) + const schemaValidator: ValidateFunction = generateValidator(schema) + export const validate: ValidateFunction = ( + hash: any + ): hash is IPFSv2 => schemaValidator(hash) } diff --git a/src/platform/index.ts b/src/platform/index.ts index 8cce13e1..bebd3605 100644 --- a/src/platform/index.ts +++ b/src/platform/index.ts @@ -1,3 +1,3 @@ export * from './profile' export * from './scene' -export * from './wearables' \ No newline at end of file +export * from './wearables' diff --git a/src/platform/profile/avatar.ts b/src/platform/profile/avatar.ts index 8390428b..2ee19c69 100644 --- a/src/platform/profile/avatar.ts +++ b/src/platform/profile/avatar.ts @@ -1,9 +1,13 @@ -import { Color3, EthAddress, IPFSv2, WearableId } from "../../misc" -import { generateValidator, JSONSchema, ValidateFunction } from "../../validation" +import { Color3, EthAddress, IPFSv2, WearableId } from '../../misc' +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' /** * Snapshots - * @alpha + * @alpha */ export type Snapshots = { face: IPFSv2 @@ -14,7 +18,7 @@ export type Snapshots = { /** * Snapshots - * @alpha + * @alpha */ export namespace Snapshots { export const schema: JSONSchema = { @@ -27,14 +31,15 @@ export namespace Snapshots { body: IPFSv2.schema } } - const schemaValidator: ValidateFunction = generateValidator(schema); - export const validate: ValidateFunction = (snapshots: any): snapshots is Snapshots => - schemaValidator(snapshots) + const schemaValidator: ValidateFunction = generateValidator(schema) + export const validate: ValidateFunction = ( + snapshots: any + ): snapshots is Snapshots => schemaValidator(snapshots) } /** * AvatarInfo - * @alpha + * @alpha */ export type AvatarInfo = { bodyShape: WearableId @@ -47,9 +52,9 @@ export type AvatarInfo = { /** * AvatarInfo - * @alpha + * @alpha */ -export namespace AvatarInfo { +export namespace AvatarInfo { export const schema: JSONSchema = { type: 'object', required: ['bodyShape', 'eyes', 'hair', 'skin'], @@ -88,17 +93,19 @@ export namespace AvatarInfo { }, additionalProperties: true } - const schemaValidator: ValidateFunction = generateValidator(schema); - export const validate: ValidateFunction = (avatarInfo: any): avatarInfo is AvatarInfo => - schemaValidator(avatarInfo) + const schemaValidator: ValidateFunction = + generateValidator(schema) + export const validate: ValidateFunction = ( + avatarInfo: any + ): avatarInfo is AvatarInfo => schemaValidator(avatarInfo) } /** * Avatar represents a profile avatar - * @alpha + * @alpha */ export type Avatar = { - userId: string, + userId: string name: string description: string ethAddress: EthAddress @@ -114,12 +121,19 @@ export type Avatar = { /** * Avatar - * @alpha + * @alpha */ export namespace Avatar { export const schema: JSONSchema = { type: 'object', - required: ['name', 'description', 'ethAddress', 'version', 'tutorialStep', 'avatar'], + required: [ + 'name', + 'description', + 'ethAddress', + 'version', + 'tutorialStep', + 'avatar' + ], properties: { userId: { type: 'string' @@ -166,11 +180,12 @@ export namespace Avatar { type: 'boolean', nullable: true }, - avatar: AvatarInfo.schema, + avatar: AvatarInfo.schema }, - additionalProperties: true, + additionalProperties: true } - const schemaValidator: ValidateFunction = generateValidator(schema); - export const validate: ValidateFunction = (avatar: any): avatar is Avatar => - schemaValidator(avatar) -} \ No newline at end of file + const schemaValidator: ValidateFunction = generateValidator(schema) + export const validate: ValidateFunction = ( + avatar: any + ): avatar is Avatar => schemaValidator(avatar) +} diff --git a/src/platform/profile/index.ts b/src/platform/profile/index.ts index 44f8aa8c..5b86fb7a 100644 --- a/src/platform/profile/index.ts +++ b/src/platform/profile/index.ts @@ -1,2 +1,2 @@ export * from './avatar' -export * from './profile' \ No newline at end of file +export * from './profile' diff --git a/src/platform/profile/profile.ts b/src/platform/profile/profile.ts index 65f3f33f..aa067783 100644 --- a/src/platform/profile/profile.ts +++ b/src/platform/profile/profile.ts @@ -1,9 +1,13 @@ -import { generateValidator, JSONSchema, ValidateFunction } from "../../validation" -import { Avatar } from "./avatar"; +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' +import { Avatar } from './avatar' /** * Profile containing one or multiple avatars - * @alpha + * @alpha */ export type Profile = { avatars: Avatar[] @@ -11,7 +15,7 @@ export type Profile = { /** * Profile - * @alpha + * @alpha */ export namespace Profile { export const schema: JSONSchema = { @@ -25,7 +29,8 @@ export namespace Profile { }, additionalProperties: true } - const schemaValidator: ValidateFunction = generateValidator(schema); - export const validate: ValidateFunction = (profile: any): profile is Profile => - schemaValidator(profile) -} \ No newline at end of file + const schemaValidator: ValidateFunction = generateValidator(schema) + export const validate: ValidateFunction = ( + profile: any + ): profile is Profile => schemaValidator(profile) +} diff --git a/src/platform/scene/feature-toggles.ts b/src/platform/scene/feature-toggles.ts index 3098ee41..27befc63 100644 --- a/src/platform/scene/feature-toggles.ts +++ b/src/platform/scene/feature-toggles.ts @@ -1,17 +1,20 @@ -import { generateValidator, JSONSchema, ValidateFunction } from '../../validation' +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' /** @alpha */ -export type FeatureToggles = Record +export type FeatureToggles = Record /** @alpha */ export namespace FeatureToggles { export const schema: JSONSchema = { - type: 'object', - additionalProperties: { type: "string", enum: ['disabled', 'enabled'] }, - required: [], - } + type: 'object', + additionalProperties: { type: 'string', enum: ['disabled', 'enabled'] }, + required: [] + } - export const validate: ValidateFunction = generateValidator(schema) + export const validate: ValidateFunction = + generateValidator(schema) } - - diff --git a/src/platform/scene/index.ts b/src/platform/scene/index.ts index 92cbb02a..ddd2f216 100644 --- a/src/platform/scene/index.ts +++ b/src/platform/scene/index.ts @@ -2,4 +2,4 @@ export { FeatureToggles } from './feature-toggles' export { SceneParcels } from './scene-parcels' export { Scene } from './scene' export { Source } from './source' -export { SpawnPoint } from './spawn-point' \ No newline at end of file +export { SpawnPoint } from './spawn-point' diff --git a/src/platform/scene/scene-parcels.ts b/src/platform/scene/scene-parcels.ts index 7c4b1895..281fc6e4 100644 --- a/src/platform/scene/scene-parcels.ts +++ b/src/platform/scene/scene-parcels.ts @@ -1,38 +1,44 @@ -import { generateValidator, JSONSchema, ValidateFunction } from "../../validation"; +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' /** @alpha */ export type SceneParcels = { - base: string; - parcels: string[]; -}; + base: string + parcels: string[] +} /** @alpha */ export namespace SceneParcels { export const schema: JSONSchema = { description: 'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.', - type: "object", + type: 'object', properties: { base: { - type: "string", - pattern: "^-?[0-9]+,-?[0-9]+$", + type: 'string', + pattern: '^-?[0-9]+,-?[0-9]+$' }, parcels: { - type: "array", + type: 'array', items: { - type: "string", - pattern: "^-?[0-9]+,-?[0-9]+$", + type: 'string', + pattern: '^-?[0-9]+,-?[0-9]+$' }, - minItems: 1, - }, + minItems: 1 + } }, additionalProperties: false, - required: ["base", "parcels"], - }; + required: ['base', 'parcels'] + } - export const schemaValidator: ValidateFunction = generateValidator(schema); + export const schemaValidator: ValidateFunction = + generateValidator(schema) export const validate: ValidateFunction = ( sceneParcels: any ): sceneParcels is SceneParcels => - schemaValidator(sceneParcels) && sceneParcels.parcels.includes(sceneParcels.base); + schemaValidator(sceneParcels) && + sceneParcels.parcels.includes(sceneParcels.base) } diff --git a/src/platform/scene/scene.ts b/src/platform/scene/scene.ts index 570c798a..1d0cba2b 100644 --- a/src/platform/scene/scene.ts +++ b/src/platform/scene/scene.ts @@ -1,124 +1,129 @@ -import { generateValidator, JSONSchema, ValidateFunction } from "../../validation"; -import { FeatureToggles } from "./feature-toggles"; -import { SceneParcels } from "./scene-parcels"; -import { Source } from "./source"; -import { SpawnPoint } from "./spawn-point"; +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' +import { FeatureToggles } from './feature-toggles' +import { SceneParcels } from './scene-parcels' +import { Source } from './source' +import { SpawnPoint } from './spawn-point' /** @alpha */ export type Scene = { - main: string; - scene: SceneParcels; + main: string + scene: SceneParcels display?: { - title?: string; - favicon?: string; - description?: string; - navmapThumbnail?: string; - }; - owner?: string; + title?: string + favicon?: string + description?: string + navmapThumbnail?: string + } + owner?: string contact?: { - name?: string; - email?: string; - im?: string; - url?: string; - }; - tags?: string[]; - source?: Source; - spawnPoints?: SpawnPoint[]; - requiredPermissions?: string[]; - featureToggles?: FeatureToggles; -}; + name?: string + email?: string + im?: string + url?: string + } + tags?: string[] + source?: Source + spawnPoints?: SpawnPoint[] + requiredPermissions?: string[] + featureToggles?: FeatureToggles +} /** @alpha */ export namespace Scene { export const schema: JSONSchema = { - type: "object", + type: 'object', properties: { main: { description: "File that contains the entry point of the scene's code", - type: "string", - minLength: 1, + type: 'string', + minLength: 1 }, scene: SceneParcels.schema, display: { description: - "Information related to how should this land be displayed apart from the normal rendering of the scene", - type: "object", + 'Information related to how should this land be displayed apart from the normal rendering of the scene', + type: 'object', properties: { title: { description: - "A name so other users can identify what the contents of this land should be", - type: "string", - nullable: true, + 'A name so other users can identify what the contents of this land should be', + type: 'string', + nullable: true }, favicon: { - description: "Allow the land owner to set up a favicon to this land", - type: "string", - nullable: true, + description: + 'Allow the land owner to set up a favicon to this land', + type: 'string', + nullable: true }, description: { description: "A description that will be shown on client's nav map when the scene is selected", - type: "string", - nullable: true, + type: 'string', + nullable: true }, navmapThumbnail: { - type: "string", - nullable: true, - }, + type: 'string', + nullable: true + } }, nullable: true, additionalProperties: false, - required: [], + required: [] }, owner: { - type: "string", - nullable: true, + type: 'string', + nullable: true }, contact: { - description: "Describe different ways of contacting the land owner", - type: "object", + description: 'Describe different ways of contacting the land owner', + type: 'object', properties: { - name: { type: "string", nullable: true }, - email: { type: "string", nullable: true }, - im: { type: "string", nullable: true }, - url: { type: "string", nullable: true }, + name: { type: 'string', nullable: true }, + email: { type: 'string', nullable: true }, + im: { type: 'string', nullable: true }, + url: { type: 'string', nullable: true } }, nullable: true, additionalProperties: false, - required: [], + required: [] }, tags: { - type: "array", + type: 'array', items: { - type: "string", - minLength: 1, + type: 'string', + minLength: 1 }, - nullable: true, + nullable: true }, source: { ...Source.schema, - nullable: true, + nullable: true }, spawnPoints: { - type: "array", + type: 'array', items: SpawnPoint.schema, - nullable: true, + nullable: true }, requiredPermissions: { - type: "array", + type: 'array', items: { - type: "string", + type: 'string' }, - nullable: true, + nullable: true }, featureToggles: { ...FeatureToggles.schema, - nullable: true, - }, + nullable: true + } }, additionalProperties: false, - required: ["main", "scene"], - }; + required: ['main', 'scene'] + } - export const validate: ValidateFunction = generateValidator(schema); + export const validate: ValidateFunction = generateValidator(schema) } diff --git a/src/platform/scene/source.ts b/src/platform/scene/source.ts index a8d99435..70cddad8 100644 --- a/src/platform/scene/source.ts +++ b/src/platform/scene/source.ts @@ -1,68 +1,72 @@ -import { generateValidator, JSONSchema, ValidateFunction } from "../../validation"; +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' /** @alpha */ export type Source = { - version?: number; - origin: string; - projectId: string; - point?: { x: number; y: number }; - rotation?: "north" | "east" | "south" | "west"; - layout?: { rows: number; cols: number }; - isEmpty?: boolean; -}; + version?: number + origin: string + projectId: string + point?: { x: number; y: number } + rotation?: 'north' | 'east' | 'south' | 'west' + layout?: { rows: number; cols: number } + isEmpty?: boolean +} /** @alpha */ export namespace Source { export const schema: JSONSchema = { - type: "object", + type: 'object', properties: { version: { - type: "number", - nullable: true, + type: 'number', + nullable: true }, origin: { - type: "string", + type: 'string' }, projectId: { - type: "string", + type: 'string' }, point: { - type: "object", + type: 'object', properties: { - x: { type: "integer" }, - y: { type: "integer" }, + x: { type: 'integer' }, + y: { type: 'integer' } }, additionalProperties: false, nullable: true, - required: ["x", "y"], + required: ['x', 'y'] }, rotation: { - type: "string", - enum: ["north", "east", "south", "west"], - nullable: true, + type: 'string', + enum: ['north', 'east', 'south', 'west'], + nullable: true }, layout: { - type: "object", + type: 'object', properties: { rows: { - type: "integer", + type: 'integer' }, cols: { - type: "integer", - }, + type: 'integer' + } }, nullable: true, additionalProperties: false, - required: ["rows", "cols"], + required: ['rows', 'cols'] }, isEmpty: { - type: "boolean", - nullable: true, - }, + type: 'boolean', + nullable: true + } }, additionalProperties: false, - required: ["origin", "projectId"], - }; + required: ['origin', 'projectId'] + } - export const validate: ValidateFunction = generateValidator(schema); + export const validate: ValidateFunction = generateValidator(schema) } diff --git a/src/platform/scene/spawn-point.ts b/src/platform/scene/spawn-point.ts index e6b676a6..2b380138 100644 --- a/src/platform/scene/spawn-point.ts +++ b/src/platform/scene/spawn-point.ts @@ -1,84 +1,86 @@ -import { generateValidator, JSONSchema, ValidateFunction } from "../../validation"; +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' /** @alpha */ export type SpawnPoint = { - name?: string; - position: SinglePosition | MultiPosition; - default?: boolean; - cameraTarget?: SinglePosition; -}; + name?: string + position: SinglePosition | MultiPosition + default?: boolean + cameraTarget?: SinglePosition +} type SinglePosition = { - x: number; - y: number; - z: number; -}; + x: number + y: number + z: number +} type MultiPosition = { - x: number[]; - y: number[]; - z: number[]; -}; + x: number[] + y: number[] + z: number[] +} /** @alpha */ export namespace SpawnPoint { export const schema: JSONSchema = { - type: "object", + type: 'object', properties: { name: { - type: "string", - nullable: true, + type: 'string', + nullable: true }, position: { - type: "object", - oneOf: [ - { $ref: "#single-position" }, - { $ref: "#multi-position" } - ], + type: 'object', + oneOf: [{ $ref: '#single-position' }, { $ref: '#multi-position' }], required: ['x', 'y', 'z'] }, default: { - type: "boolean", - nullable: true, + type: 'boolean', + nullable: true }, cameraTarget: { - type: "object", + type: 'object', properties: { - x: { type: "number" }, - y: { type: "number" }, - z: { type: "number" }, + x: { type: 'number' }, + y: { type: 'number' }, + z: { type: 'number' } }, additionalProperties: false, - required: ["x", "y", "z"], - nullable: true, - }, + required: ['x', 'y', 'z'], + nullable: true + } }, additionalProperties: false, - required: ["position"], + required: ['position'], definitions: { - "single-position": { - $id: "#single-position", - type: "object", + 'single-position': { + $id: '#single-position', + type: 'object', properties: { - x: { type: "number" }, - y: { type: "number" }, - z: { type: "number" }, + x: { type: 'number' }, + y: { type: 'number' }, + z: { type: 'number' } }, additionalProperties: false, - required: ["x", "y", "z"], + required: ['x', 'y', 'z'] }, - "multi-position": { - $id: "#multi-position", - type: "object", + 'multi-position': { + $id: '#multi-position', + type: 'object', properties: { - x: { type: "array", items: { type: 'number' }, minItems: 1 }, - y: { type: "array", items: { type: 'number' }, minItems: 1 }, - z: { type: "array", items: { type: 'number' }, minItems: 1 }, + x: { type: 'array', items: { type: 'number' }, minItems: 1 }, + y: { type: 'array', items: { type: 'number' }, minItems: 1 }, + z: { type: 'array', items: { type: 'number' }, minItems: 1 } }, additionalProperties: false, - required: ["x", "y", "z"], - }, - }, - }; + required: ['x', 'y', 'z'] + } + } + } - export const validate: ValidateFunction = generateValidator(schema); + export const validate: ValidateFunction = + generateValidator(schema) } diff --git a/src/platform/wearables/i18n.ts b/src/platform/wearables/i18n.ts index 4e58bbdb..fa2a9d8e 100644 --- a/src/platform/wearables/i18n.ts +++ b/src/platform/wearables/i18n.ts @@ -1,11 +1,15 @@ -import { generateValidator, JSONSchema, ValidateFunction } from '../../validation' +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' import { Locale } from './locale' /** @alpha */ export type I18N = { - code: Locale; - text: string; -}; + code: Locale + text: string +} /** @alpha */ export namespace I18N { @@ -14,12 +18,11 @@ export namespace I18N { properties: { code: Locale.schema, text: { - type: 'string', - }, + type: 'string' + } }, additionalProperties: false, - required: ['code', 'text'], - + required: ['code', 'text'] } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/platform/wearables/index.ts b/src/platform/wearables/index.ts index 50fcb8d4..f12e5c14 100644 --- a/src/platform/wearables/index.ts +++ b/src/platform/wearables/index.ts @@ -3,4 +3,4 @@ export { Locale } from './locale' export { Metrics } from './metrics' export { WearableRepresentation } from './representation' export { WearableBodyShape } from './wearable-body-shape' -export { Wearable } from './wearable' \ No newline at end of file +export { Wearable } from './wearable' diff --git a/src/platform/wearables/locale.ts b/src/platform/wearables/locale.ts index 1629946b..7bcfa401 100644 --- a/src/platform/wearables/locale.ts +++ b/src/platform/wearables/locale.ts @@ -1,4 +1,8 @@ -import { generateValidator, JSONSchema, ValidateFunction } from '../../validation' +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' /** @alpha */ export enum Locale { @@ -10,7 +14,7 @@ export enum Locale { export namespace Locale { export const schema: JSONSchema = { type: 'string', - enum: Object.values(Locale), + enum: Object.values(Locale) } export const validate: ValidateFunction = generateValidator(schema) diff --git a/src/platform/wearables/metrics.ts b/src/platform/wearables/metrics.ts index f24b4033..3e83971c 100644 --- a/src/platform/wearables/metrics.ts +++ b/src/platform/wearables/metrics.ts @@ -1,4 +1,8 @@ -import { generateValidator, JSONSchema, ValidateFunction } from '../../validation' +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' /** @alpha */ export type Metrics = { @@ -16,29 +20,34 @@ export namespace Metrics { type: 'object', properties: { triangles: { - type: 'number', + type: 'number' }, materials: { - type: 'number', + type: 'number' }, textures: { - type: 'number', + type: 'number' }, meshes: { - type: 'number', + type: 'number' }, bodies: { - type: 'number', + type: 'number' }, entities: { - type: 'number', - }, + type: 'number' + } }, additionalProperties: false, - required: ['triangles', 'materials', 'textures', 'meshes', 'bodies', 'entities'], + required: [ + 'triangles', + 'materials', + 'textures', + 'meshes', + 'bodies', + 'entities' + ] } export const validate: ValidateFunction = generateValidator(schema) } - - diff --git a/src/platform/wearables/representation.ts b/src/platform/wearables/representation.ts index 1cbbf2a9..be3dffa2 100644 --- a/src/platform/wearables/representation.ts +++ b/src/platform/wearables/representation.ts @@ -1,13 +1,17 @@ import { WearableCategory } from '../../dapps/wearable-category' -import { generateValidator, JSONSchema, ValidateFunction } from '../../validation' +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' import { WearableBodyShape } from './wearable-body-shape' /** @alpha */ export type WearableRepresentation = { - bodyShapes: WearableBodyShape[], - mainFile: string, - contents: string[], - overrideHides: WearableCategory[], + bodyShapes: WearableBodyShape[] + mainFile: string + contents: string[] + overrideHides: WearableCategory[] overrideReplaces: WearableCategory[] } @@ -24,12 +28,12 @@ export namespace WearableRepresentation { }, mainFile: { type: 'string', - minLength: 1, + minLength: 1 }, contents: { type: 'array', items: { - type: 'string', + type: 'string' }, minItems: 1, uniqueItems: true @@ -44,15 +48,20 @@ export namespace WearableRepresentation { } }, additionalProperties: false, - required: ['bodyShapes', 'mainFile', 'contents', 'overrideHides', 'overrideReplaces'], - + required: [ + 'bodyShapes', + 'mainFile', + 'contents', + 'overrideHides', + 'overrideReplaces' + ] } - const schemaValidator: ValidateFunction = generateValidator(schema) - export const validate: ValidateFunction = (representation: any): representation is WearableRepresentation => + const schemaValidator: ValidateFunction = + generateValidator(schema) + export const validate: ValidateFunction = ( + representation: any + ): representation is WearableRepresentation => schemaValidator(representation) && representation.contents.includes(representation.mainFile) - } - - diff --git a/src/platform/wearables/wearable-body-shape.ts b/src/platform/wearables/wearable-body-shape.ts index 8dad8789..fe608d57 100644 --- a/src/platform/wearables/wearable-body-shape.ts +++ b/src/platform/wearables/wearable-body-shape.ts @@ -1,17 +1,22 @@ -import { generateValidator, JSONSchema, ValidateFunction } from '../../validation' +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' /** @alpha */ export enum WearableBodyShape { MALE = 'urn:decentraland:off-chain:base-avatars:BaseMale', - FEMALE = 'urn:decentraland:off-chain:base-avatars:BaseFemale', + FEMALE = 'urn:decentraland:off-chain:base-avatars:BaseFemale' } /** @alpha */ export namespace WearableBodyShape { export const schema: JSONSchema = { type: 'string', - enum: Object.values(WearableBodyShape), + enum: Object.values(WearableBodyShape) } - export const validate: ValidateFunction = generateValidator(schema) + export const validate: ValidateFunction = + generateValidator(schema) } diff --git a/src/platform/wearables/wearable.ts b/src/platform/wearables/wearable.ts index 55b39c20..bb8b2b39 100644 --- a/src/platform/wearables/wearable.ts +++ b/src/platform/wearables/wearable.ts @@ -1,4 +1,8 @@ -import { generateValidator, JSONSchema, ValidateFunction } from '../../validation' +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' import { Rarity } from '../../dapps/rarity' import { WearableCategory } from '../../dapps/wearable-category' import { I18N } from './i18n' @@ -11,7 +15,7 @@ export type Wearable = { descriptions: I18N[] collectionAddress: string rarity: Rarity - names: I18N[], + names: I18N[] data: { replaces: WearableCategory[] hides: WearableCategory[] @@ -30,7 +34,7 @@ export namespace Wearable { type: 'object', properties: { id: { - type: 'string', + type: 'string' }, descriptions: { type: 'array', @@ -38,7 +42,7 @@ export namespace Wearable { minItems: 1 }, collectionAddress: { - type: 'string', + type: 'string' }, rarity: Rarity.schema, names: { @@ -75,10 +79,10 @@ export namespace Wearable { required: ['replaces', 'hides', 'tags', 'representations', 'category'] }, thumbnail: { - type: 'string', + type: 'string' }, image: { - type: 'string', + type: 'string' }, metrics: { ...Metrics.schema, @@ -94,17 +98,22 @@ export namespace Wearable { 'names', 'data', 'thumbnail', - 'image', - ], + 'image' + ] } - const schemaValidator: ValidateFunction = generateValidator(schema); - export const validate: ValidateFunction = (wearable: any): wearable is Wearable => + const schemaValidator: ValidateFunction = generateValidator(schema) + export const validate: ValidateFunction = ( + wearable: any + ): wearable is Wearable => schemaValidator(wearable) && validateDuplicatedLocales(wearable.descriptions) && - validateDuplicatedLocales(wearable.names); + validateDuplicatedLocales(wearable.names) // Returns true only if there are no entries with the same locale const validateDuplicatedLocales = (i18ns: I18N[]) => - i18ns.every(({ code }, index) => i18ns.findIndex((i18n) => i18n.code === code) === index); + i18ns.every( + ({ code }, index) => + i18ns.findIndex((i18n) => i18n.code === code) === index + ) } diff --git a/src/sdk/project/asset-json.ts b/src/sdk/project/asset-json.ts new file mode 100644 index 00000000..79f3a6a5 --- /dev/null +++ b/src/sdk/project/asset-json.ts @@ -0,0 +1,63 @@ +import { ProjectType } from './../project/type' +import { WearableCategory } from './../../dapps/wearable-category' +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' +import { Rarity } from './../../dapps/rarity' +import { AssetWearableGender } from './asset-wearable-gender' + +/** @alpha */ +export type AssetJson = { + id: string + assetType: string + + name: string + description: string + + thumbnail: string + model: string + + category: WearableCategory + rarity: Rarity + bodyShape: AssetWearableGender +} + +/** @alpha */ +export namespace AssetJson { + export const schema: JSONSchema = { + type: 'object', + properties: { + id: { + description: + 'The ID that you will replace in your collection. Also this ID is used for develop purpose, to identify in the kernel.', + type: 'string' + }, + assetType: ProjectType.schema, + name: { + description: '', + type: 'string' + }, + description: { + description: 'A short text that describes the wearable.`', + type: 'string' + }, + thumbnail: { + description: 'A preview image of your item.', + type: 'string' + }, + model: { + description: 'The main file that should be loaded as wearable.', + type: 'string' + }, + category: WearableCategory.schema, + rarity: Rarity.schema, + bodyShape: AssetWearableGender.schema + }, + additionalProperties: false, + required: ['category', 'rarity', 'bodyShape', 'thumbnail', 'model'] + } + + export const validate: ValidateFunction = generateValidator(schema) +} diff --git a/src/sdk/project/asset-wearable-gender.ts b/src/sdk/project/asset-wearable-gender.ts new file mode 100644 index 00000000..4f02ef46 --- /dev/null +++ b/src/sdk/project/asset-wearable-gender.ts @@ -0,0 +1,21 @@ +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' + +export enum AssetWearableGender { + MALE = 'male', + FEMALE = 'female', + BOTH = 'both' +} + +export namespace AssetWearableGender { + export const schema: JSONSchema = { + type: 'string', + enum: Object.values(AssetWearableGender) + } + + export const validate: ValidateFunction = + generateValidator(schema) +} diff --git a/src/sdk/project/index.ts b/src/sdk/project/index.ts index ccff5fb0..1d951cb8 100644 --- a/src/sdk/project/index.ts +++ b/src/sdk/project/index.ts @@ -1 +1,2 @@ -export * from './type' \ No newline at end of file +export * from './type' +export * from './asset-json' diff --git a/src/sdk/project/type.ts b/src/sdk/project/type.ts index e1dbd456..9216b95e 100644 --- a/src/sdk/project/type.ts +++ b/src/sdk/project/type.ts @@ -1,4 +1,8 @@ -import { generateValidator, JSONSchema, ValidateFunction } from "../../validation"; +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' /* @internal */ export enum ProjectType { @@ -10,9 +14,10 @@ export enum ProjectType { /* @internal */ export namespace ProjectType { export const schema: JSONSchema = { - type: "string", + type: 'string', enum: [ProjectType] - }; + } - export const validate: ValidateFunction = generateValidator(schema); -} \ No newline at end of file + export const validate: ValidateFunction = + generateValidator(schema) +} diff --git a/src/sdk/ws/index.ts b/src/sdk/ws/index.ts index 9377a094..18a61a78 100644 --- a/src/sdk/ws/index.ts +++ b/src/sdk/ws/index.ts @@ -1,12 +1,11 @@ -import { SCENE_UPDATE, SceneUpdate } from "./scene-update"; -import { UPDATE, Update } from "./update"; +import { SCENE_UPDATE, SceneUpdate } from './scene-update' +import { UPDATE, Update } from './update' -export * from "./scene-update" -export * from "./update" +export * from './scene-update' +export * from './update' /** @internal */ -export type Actions = typeof SCENE_UPDATE - | typeof UPDATE +export type Actions = typeof SCENE_UPDATE | typeof UPDATE /** @internal */ export type Messages = SceneUpdate | Update diff --git a/src/sdk/ws/scene-update.ts b/src/sdk/ws/scene-update.ts index 174b2507..cb1641f9 100644 --- a/src/sdk/ws/scene-update.ts +++ b/src/sdk/ws/scene-update.ts @@ -1,42 +1,47 @@ -import { generateValidator, JSONSchema, ValidateFunction } from "../../validation"; +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' /** @internal */ -export const SCENE_UPDATE = "SCENE_UPDATE" +export const SCENE_UPDATE = 'SCENE_UPDATE' /** @internal */ export type SceneUpdate = { - type: typeof SCENE_UPDATE; + type: typeof SCENE_UPDATE payload: { - sceneId: string; - sceneType: string; + sceneId: string + sceneType: string } -}; +} /** @internal */ export namespace SceneUpdate { export const schema: JSONSchema = { - type: "object", + type: 'object', properties: { type: { - type: "string", + type: 'string', enum: [SCENE_UPDATE] }, payload: { - type: "object", + type: 'object', properties: { sceneId: { - type: "string" + type: 'string' }, sceneType: { - type: "string" - }, + type: 'string' + } }, additionalProperties: false, - required: ["sceneId", "sceneType"], - }, + required: ['sceneId', 'sceneType'] + } }, - required: ["payload", "type"] - }; + required: ['payload', 'type'] + } - export const validate: ValidateFunction = generateValidator(schema); + export const validate: ValidateFunction = + generateValidator(schema) } diff --git a/src/sdk/ws/update.ts b/src/sdk/ws/update.ts index 5d900216..9bbb66b2 100644 --- a/src/sdk/ws/update.ts +++ b/src/sdk/ws/update.ts @@ -1,25 +1,29 @@ -import { generateValidator, JSONSchema, ValidateFunction } from "../../validation"; +import { + generateValidator, + JSONSchema, + ValidateFunction +} from '../../validation' /** @internal @deprecated */ -export const UPDATE = "update" +export const UPDATE = 'update' /** @internal @deprecated */ export type Update = { - type: typeof UPDATE; -}; + type: typeof UPDATE +} /** @internal @deprecated */ export namespace Update { export const schema: JSONSchema = { - type: "object", + type: 'object', properties: { type: { - type: "string", + type: 'string', enum: [UPDATE] - }, + } }, - required: ["type"] - }; + required: ['type'] + } - export const validate: ValidateFunction = generateValidator(schema); + export const validate: ValidateFunction = generateValidator(schema) } diff --git a/src/validation.ts b/src/validation.ts index 10eb0b8a..3401f20d 100644 --- a/src/validation.ts +++ b/src/validation.ts @@ -1,4 +1,4 @@ -import Ajv, { ErrorObject, JSONSchemaType } from "ajv" +import Ajv, { ErrorObject, JSONSchemaType } from 'ajv' export { Ajv } /** @@ -31,7 +31,9 @@ export type AbstractTypedSchema = { * Generates a validator for a specific JSON schema of a type T * @public */ -export function generateValidator(schema: JSONSchema): ValidateFunction { +export function generateValidator( + schema: JSONSchema +): ValidateFunction { const ajv = new Ajv() return ajv.compile(schema) } @@ -40,6 +42,9 @@ export function generateValidator(schema: JSONSchema): ValidateFunction * Validates a type with a schema in a functional way. * @public */ -export function validateType(theType: Pick, "validate">, value: T) { +export function validateType( + theType: Pick, 'validate'>, + value: T +) { return theType.validate(value) } diff --git a/test/bid.spec.ts b/test/bid.spec.ts index 90823c11..88b449f4 100644 --- a/test/bid.spec.ts +++ b/test/bid.spec.ts @@ -19,7 +19,7 @@ describe('Bid tests', () => { chainId: ChainId.ETHEREUM_MAINNET, expiresAt: 1627689634000, createdAt: 1626316584000, - updatedAt: 1626316584000, + updatedAt: 1626316584000 } testTypeSignature(Bid, bid) diff --git a/test/chain-name.spec.ts b/test/chain-name.spec.ts index 66348e0e..8885d2d5 100644 --- a/test/chain-name.spec.ts +++ b/test/chain-name.spec.ts @@ -14,7 +14,9 @@ describe('ChainName tests', () => { }) it('Should get a valid chain id', () => { - expect(getChainId(ChainName.ETHEREUM_MAINNET)).toEqual(ChainId.ETHEREUM_MAINNET) + expect(getChainId(ChainName.ETHEREUM_MAINNET)).toEqual( + ChainId.ETHEREUM_MAINNET + ) }) it('Should get null if the chain name is not valid', () => { diff --git a/test/collection.spec.ts b/test/collection.spec.ts index 86fa4e61..3b557f7a 100644 --- a/test/collection.spec.ts +++ b/test/collection.spec.ts @@ -15,7 +15,7 @@ describe('Collection tests', () => { isOnSale: false, size: 1, network: Network.MATIC, - chainId: ChainId.MATIC_MAINNET, + chainId: ChainId.MATIC_MAINNET } testTypeSignature(Collection, collection) diff --git a/test/contract.spec.ts b/test/contract.spec.ts index 1ba22b50..1d6cee3b 100644 --- a/test/contract.spec.ts +++ b/test/contract.spec.ts @@ -8,7 +8,7 @@ describe('Contract tests', () => { address: '0x1286dad1da5233a63a5d55fcf9e834feb14e1d6d', category: NFTCategory.WEARABLE, network: Network.MATIC, - chainId: ChainId.MATIC_MAINNET, + chainId: ChainId.MATIC_MAINNET } testTypeSignature(Contract, contract) diff --git a/test/hashing.spec.ts b/test/hashing.spec.ts index dd0f996e..931bbd6a 100644 --- a/test/hashing.spec.ts +++ b/test/hashing.spec.ts @@ -3,7 +3,8 @@ import { IPFSv2 } from '../src' import { testTypeSignature } from './test-utils' describe('Hashing tests', () => { - const hash: IPFSv2 = 'bafybeiasb5vpmaounyilfuxbd3lryvosl4yefqrfahsb2esg46q6tu6y5q' + const hash: IPFSv2 = + 'bafybeiasb5vpmaounyilfuxbd3lryvosl4yefqrfahsb2esg46q6tu6y5q' testTypeSignature(IPFSv2, hash) diff --git a/test/item.spec.ts b/test/item.spec.ts index 1a23f717..09d940b0 100644 --- a/test/item.spec.ts +++ b/test/item.spec.ts @@ -2,12 +2,11 @@ import expect from 'expect' import { BodyShape, ChainId, - Contract, Item, Network, NFTCategory, Rarity, - WearableCategory, + WearableCategory } from '../src' import { testTypeSignature } from './test-utils' @@ -32,15 +31,15 @@ describe('Item tests', () => { description: 'Wearable by DaddyChang', category: WearableCategory.HELMET, bodyShapes: [BodyShape.MALE, BodyShape.FEMALE], - rarity: Rarity.MYTHIC, - }, + rarity: Rarity.MYTHIC + } }, network: Network.MATIC, chainId: ChainId.MATIC_MAINNET, createdAt: 1625731369000, updatedAt: 1626088534000, reviewedAt: 1626088534000, - soldAt: 1626088534000, + soldAt: 1626088534000 } testTypeSignature(Item, wearable) diff --git a/test/meta-transactions.spec.ts b/test/meta-transactions.spec.ts index 2f30df86..d0d7d841 100644 --- a/test/meta-transactions.spec.ts +++ b/test/meta-transactions.spec.ts @@ -1,16 +1,16 @@ -import expect from "expect" -import { MetaTransaction } from "../src" -import { testTypeSignature } from "./test-utils" +import expect from 'expect' +import { MetaTransaction } from '../src' +import { testTypeSignature } from './test-utils' -describe("MetaTransaction tests", () => { +describe('MetaTransaction tests', () => { const metaTx: MetaTransaction = { - from: "0x1", - params: ["0x2", "0x3"], + from: '0x1', + params: ['0x2', '0x3'] } testTypeSignature(MetaTransaction, metaTx) - it("static tests must pass", () => { + it('static tests must pass', () => { expect(MetaTransaction.validate(metaTx)).toEqual(true) expect(MetaTransaction.validate(null)).toEqual(false) expect(MetaTransaction.validate({})).toEqual(false) diff --git a/test/mint.spec.ts b/test/mint.spec.ts index 7a6a36ee..1ef88365 100644 --- a/test/mint.spec.ts +++ b/test/mint.spec.ts @@ -17,7 +17,7 @@ describe('Mint tests', () => { price: '0', timestamp: 1636057380000, network: Network.MATIC, - chainId: ChainId.MATIC_MAINNET, + chainId: ChainId.MATIC_MAINNET } testTypeSignature(Mint, mint) diff --git a/test/miscellaneous.spec.ts b/test/miscellaneous.spec.ts index 3676b8ce..99391596 100644 --- a/test/miscellaneous.spec.ts +++ b/test/miscellaneous.spec.ts @@ -1,12 +1,12 @@ import expect from 'expect' -import { Color3, EthAddress, generateValidator, ValidateFunction } from '../src' +import { Color3, EthAddress } from '../src' import { testTypeSignature } from './test-utils' describe('EthAddress tests', () => { const ethAddress = '0x87956abC4078a0Cc3b89b419928b857B8AF826ed' testTypeSignature(EthAddress, ethAddress) - it("static tests must pass", () => { + it('static tests must pass', () => { expect(EthAddress.validate(ethAddress)).toEqual(true) expect(EthAddress.validate(null)).toEqual(false) expect(EthAddress.validate({})).toEqual(false) @@ -19,7 +19,7 @@ describe('Color3 tests', () => { testTypeSignature(Color3, color) - it("static tests must pass", () => { + it('static tests must pass', () => { expect(Color3.validate(color)).toEqual(true) expect(Color3.validate(null)).toEqual(false) expect(Color3.validate({})).toEqual(false) @@ -28,4 +28,4 @@ describe('Color3 tests', () => { it('out of range rgb color validation result should be false', () => { expect(Color3.validate(invalidColor)).toBeFalsy() }) -}) \ No newline at end of file +}) diff --git a/test/nft.spec.ts b/test/nft.spec.ts index 9544c378..c488898c 100644 --- a/test/nft.spec.ts +++ b/test/nft.spec.ts @@ -6,7 +6,7 @@ import { NFT, NFTCategory, Rarity, - WearableCategory, + WearableCategory } from '../src' import { testTypeSignature } from './test-utils' @@ -28,8 +28,8 @@ describe('NFT tests', () => { description: 'Get Your Smoke On', x: '-63', y: '-115', - estate: null, - }, + estate: null + } }, issuedId: null, itemId: null, @@ -38,7 +38,7 @@ describe('NFT tests', () => { chainId: ChainId.ETHEREUM_MAINNET, createdAt: 1545579159000, updatedAt: 1619273260000, - soldAt: 1619273260000, + soldAt: 1619273260000 } testTypeSignature(NFT, parcel) @@ -68,30 +68,30 @@ describe('NFT tests', () => { parcels: [ { x: -140, - y: -43, + y: -43 }, { x: -140, - y: -42, + y: -42 }, { x: -139, - y: -43, + y: -43 }, { x: -139, - y: -42, + y: -42 }, { x: -138, - y: -43, + y: -43 }, { x: -138, - y: -42, - }, - ], - }, + y: -42 + } + ] + } }, issuedId: null, itemId: null, @@ -100,7 +100,7 @@ describe('NFT tests', () => { chainId: ChainId.ETHEREUM_MAINNET, createdAt: 1626182617000, updatedAt: 1626246391000, - soldAt: 1626246391000, + soldAt: 1626246391000 } testTypeSignature(NFT, estate) @@ -129,8 +129,8 @@ describe('NFT tests', () => { description: 'Wearable by DaddyChang', category: WearableCategory.HELMET, bodyShapes: [BodyShape.MALE, BodyShape.FEMALE], - rarity: Rarity.MYTHIC, - }, + rarity: Rarity.MYTHIC + } }, issuedId: '16', itemId: '0', @@ -139,7 +139,7 @@ describe('NFT tests', () => { chainId: ChainId.ETHEREUM_MAINNET, createdAt: 1626182617000, updatedAt: 1626246391000, - soldAt: 1626246391000, + soldAt: 1626246391000 } testTypeSignature(NFT, wearable) @@ -165,8 +165,8 @@ describe('NFT tests', () => { url: '/contracts/0x2a187453064356c898cae034eaed119e1663acb8/tokens/20267204986233636871295784595277786190248304170965188964447216591051155494561', data: { ens: { - subdomain: 'Rumors', - }, + subdomain: 'Rumors' + } }, issuedId: null, itemId: null, @@ -175,7 +175,7 @@ describe('NFT tests', () => { chainId: ChainId.ETHEREUM_MAINNET, createdAt: 1626182617000, updatedAt: 1626246391000, - soldAt: 1626246391000, + soldAt: 1626246391000 } testTypeSignature(NFT, ens) diff --git a/test/order.spec.ts b/test/order.spec.ts index c4532983..3611cff9 100644 --- a/test/order.spec.ts +++ b/test/order.spec.ts @@ -15,7 +15,7 @@ describe('Order tests', () => { chainId: ChainId.ETHEREUM_MAINNET, expiresAt: 1640908800000, createdAt: 1626308259000, - updatedAt: 1626310162000, + updatedAt: 1626310162000 } testTypeSignature(Order, order) diff --git a/test/platform/profiles/avatar.spec.ts b/test/platform/profiles/avatar.spec.ts index 5dd8def8..30c014b7 100644 --- a/test/platform/profiles/avatar.spec.ts +++ b/test/platform/profiles/avatar.spec.ts @@ -6,11 +6,9 @@ const AVATAR_INFO = { bodyShape: 'urn:decentraland:off-chain:base-avatars:BaseMale', snapshots: { face: 'bafybeiasb5vpmaounyilfuxbd3lryvosl4yefqrfahsb2esg46q6tu6y5q', - face128: - 'bafybeiasb5vpmaounyilfuxbd3lryvosl4yefqrfahsb2esg46q6tu6y5r', - face256: - 'bafybeiasb5vpmaounyilfuxbd3lryvosl4yefqrfahsb2esg46q6tu6y5s', - body: 'bafybeiasb5vpmaounyilfuxbd3lryvosl4yefqrfahsb2esg46q6tu6y5t', + face128: 'bafybeiasb5vpmaounyilfuxbd3lryvosl4yefqrfahsb2esg46q6tu6y5r', + face256: 'bafybeiasb5vpmaounyilfuxbd3lryvosl4yefqrfahsb2esg46q6tu6y5s', + body: 'bafybeiasb5vpmaounyilfuxbd3lryvosl4yefqrfahsb2esg46q6tu6y5t' }, eyes: { color: { r: 0.23046875, g: 0.625, b: 0.3125 } }, hair: { color: { r: 0.35546875, g: 0.19140625, b: 0.05859375 } }, @@ -23,8 +21,8 @@ const AVATAR_INFO = { 'urn:decentraland:matic:collections-v2:0xf6f601efee04e74cecac02c8c5bdc8cc0fc1c721:0', 'urn:decentraland:off-chain:base-avatars:classic_shoes', 'urn:decentraland:off-chain:base-avatars:red_tshirt', - 'urn:decentraland:off-chain:base-avatars:trash_jean', - ], + 'urn:decentraland:off-chain:base-avatars:trash_jean' + ] } export const AVATAR: Avatar = { @@ -37,12 +35,11 @@ export const AVATAR: Avatar = { version: 44, avatar: AVATAR_INFO, tutorialStep: 355, - interests: [], + interests: [] } describe('Avatar tests', () => { - - testTypeSignature(Avatar, AVATAR); + testTypeSignature(Avatar, AVATAR) it('static tests must pass', () => { expect(Avatar.validate(AVATAR)).toEqual(true) @@ -51,8 +48,7 @@ describe('Avatar tests', () => { }) it('given an invalid ETH address when validating Avatar then result is false', () => { - const avatar: Avatar = {...AVATAR, ethAddress: 'someInvalidAddress' } + const avatar: Avatar = { ...AVATAR, ethAddress: 'someInvalidAddress' } expect(Avatar.validate(avatar)).toEqual(false) }) - }) diff --git a/test/platform/profiles/profile.spec.ts b/test/platform/profiles/profile.spec.ts index 20e52b4d..7e762463 100644 --- a/test/platform/profiles/profile.spec.ts +++ b/test/platform/profiles/profile.spec.ts @@ -1,18 +1,16 @@ import expect from 'expect' -import { Profile } from '../../../src'; -import { testTypeSignature } from '../../test-utils'; +import { Profile } from '../../../src' +import { testTypeSignature } from '../../test-utils' import { AVATAR } from './avatar.spec' describe('Profile tests', () => { const profile = { avatars: [AVATAR] } - - testTypeSignature(Profile, profile); - it("static tests must pass", () => { + testTypeSignature(Profile, profile) + + it('static tests must pass', () => { expect(Profile.validate(profile)).toEqual(true) expect(Profile.validate(null)).toEqual(false) expect(Profile.validate({})).toEqual(false) }) - }) - diff --git a/test/platform/scenes/feature-toggles.spec.ts b/test/platform/scenes/feature-toggles.spec.ts index ae1d3d4d..09829082 100644 --- a/test/platform/scenes/feature-toggles.spec.ts +++ b/test/platform/scenes/feature-toggles.spec.ts @@ -1,35 +1,36 @@ -import expect from "expect"; -import { FeatureToggles } from "../../../src"; -import { testTypeSignature } from "../../test-utils"; +import expect from 'expect' +import { FeatureToggles } from '../../../src' +import { testTypeSignature } from '../../test-utils' -describe("Feature toggles tests", () => { +describe('Feature toggles tests', () => { const toggles: FeatureToggles = { 'voice-chat': 'disabled', 'other-feature': 'enabled' - }; + } - testTypeSignature(FeatureToggles, toggles); + testTypeSignature(FeatureToggles, toggles) - it("static tests must pass", () => { - expect(FeatureToggles.validate(toggles)).toEqual(true); - expect(FeatureToggles.validate({})).toEqual(true); - expect(FeatureToggles.validate(null)).toEqual(false); - }); + it('static tests must pass', () => { + expect(FeatureToggles.validate(toggles)).toEqual(true) + expect(FeatureToggles.validate({})).toEqual(true) + expect(FeatureToggles.validate(null)).toEqual(false) + }) it('feature with number value fails', () => { - expect(FeatureToggles.validate({ 'voice-chat': 1 } )).toEqual(false) + expect(FeatureToggles.validate({ 'voice-chat': 1 })).toEqual(false) }) it('feature with boolean value fails', () => { - expect(FeatureToggles.validate({ 'voice-chat': true } )).toEqual(false) + expect(FeatureToggles.validate({ 'voice-chat': true })).toEqual(false) }) it('feature with object value fails', () => { - expect(FeatureToggles.validate({ 'voice-chat': {} } )).toEqual(false) + expect(FeatureToggles.validate({ 'voice-chat': {} })).toEqual(false) }) it('feature with other string value fails', () => { - expect(FeatureToggles.validate({ 'voice-chat': 'not-valid' } )).toEqual(false) + expect(FeatureToggles.validate({ 'voice-chat': 'not-valid' })).toEqual( + false + ) }) - -}); +}) diff --git a/test/platform/scenes/scene-parcels.spec.ts b/test/platform/scenes/scene-parcels.spec.ts index 45f129cb..e35ec580 100644 --- a/test/platform/scenes/scene-parcels.spec.ts +++ b/test/platform/scenes/scene-parcels.spec.ts @@ -1,31 +1,32 @@ -import expect from "expect"; -import { SceneParcels } from "../../../src"; -import { testTypeSignature } from "../../test-utils"; +import expect from 'expect' +import { SceneParcels } from '../../../src' +import { testTypeSignature } from '../../test-utils' -describe("Scene parcels tests", () => { +describe('Scene parcels tests', () => { const parcels: SceneParcels = { base: '0,0', parcels: ['0,0', '1,0'] - }; + } - testTypeSignature(SceneParcels, parcels); + testTypeSignature(SceneParcels, parcels) - it("static tests must pass", () => { - expect(SceneParcels.validate(parcels)).toEqual(true); - expect(SceneParcels.validate(null)).toEqual(false); - expect(SceneParcels.validate({})).toEqual(false); - }); + it('static tests must pass', () => { + expect(SceneParcels.validate(parcels)).toEqual(true) + expect(SceneParcels.validate(null)).toEqual(false) + expect(SceneParcels.validate({})).toEqual(false) + }) it('non-parcel string fails', () => { - expect(SceneParcels.validate({ base: '1-1', parcels: ['1-1'] })).toEqual(false) + expect(SceneParcels.validate({ base: '1-1', parcels: ['1-1'] })).toEqual( + false + ) }) it('when base is not in parcels fails', () => { - expect(SceneParcels.validate({ ...parcels, base: ['2,0'] } )).toEqual(false) + expect(SceneParcels.validate({ ...parcels, base: ['2,0'] })).toEqual(false) }) it('empty parcels fails', () => { - expect(SceneParcels.validate({ ...parcels, parcels: [] } )).toEqual(false) + expect(SceneParcels.validate({ ...parcels, parcels: [] })).toEqual(false) }) - -}); +}) diff --git a/test/platform/scenes/scene.spec.ts b/test/platform/scenes/scene.spec.ts index 9b821f6e..8f25bc50 100644 --- a/test/platform/scenes/scene.spec.ts +++ b/test/platform/scenes/scene.spec.ts @@ -1,39 +1,39 @@ -import expect from "expect"; -import { Scene } from "../../../src"; -import { testTypeSignature } from "../../test-utils"; +import expect from 'expect' +import { Scene } from '../../../src' +import { testTypeSignature } from '../../test-utils' -describe("Scene tests", () => { +describe('Scene tests', () => { const scene: Scene = { - main: "bin/main.js", + main: 'bin/main.js', scene: { - base: "0,0", - parcels: ["0,0"], - }, - }; + base: '0,0', + parcels: ['0,0'] + } + } - testTypeSignature(Scene, scene); + testTypeSignature(Scene, scene) - it("static tests must pass", () => { - expect(Scene.validate(scene)).toEqual(true); - expect(Scene.validate(null)).toEqual(false); - expect(Scene.validate({})).toEqual(false); - }); + it('static tests must pass', () => { + expect(Scene.validate(scene)).toEqual(true) + expect(Scene.validate(null)).toEqual(false) + expect(Scene.validate({})).toEqual(false) + }) - it("when main is an empty text, fails", () => { + it('when main is an empty text, fails', () => { expect( Scene.validate({ ...scene, - main: "", + main: '' }) - ).toEqual(false); - }); + ).toEqual(false) + }) - it("empty tag fails", () => { + it('empty tag fails', () => { expect( Scene.validate({ ...scene, - tags: [""], + tags: [''] }) - ).toEqual(false); - }); -}); + ).toEqual(false) + }) +}) diff --git a/test/platform/scenes/source.spec.ts b/test/platform/scenes/source.spec.ts index d5764730..f337a48a 100644 --- a/test/platform/scenes/source.spec.ts +++ b/test/platform/scenes/source.spec.ts @@ -1,51 +1,56 @@ -import expect from "expect"; -import { Source } from "../../../src"; -import { testTypeSignature } from "../../test-utils"; +import expect from 'expect' +import { Source } from '../../../src' +import { testTypeSignature } from '../../test-utils' -describe("Source tests", () => { +describe('Source tests', () => { const source: Source = { version: 1, origin: 'origin', projectId: 'some-id', point: { x: 10, y: 20 }, - rotation: "north", + rotation: 'north', layout: { rows: 2, cols: 3 }, - isEmpty: false, - }; + isEmpty: false + } - testTypeSignature(Source, source); + testTypeSignature(Source, source) - it("static tests must pass", () => { - expect(Source.validate(source)).toEqual(true); - expect(Source.validate(null)).toEqual(false); - expect(Source.validate({})).toEqual(false); - }); + it('static tests must pass', () => { + expect(Source.validate(source)).toEqual(true) + expect(Source.validate(null)).toEqual(false) + expect(Source.validate({})).toEqual(false) + }) it('non-integer number fails on point', () => { - expect(Source.validate({ - ...source, - point: { - x: 1.1, - y: 20 - } - })).toEqual(false) + expect( + Source.validate({ + ...source, + point: { + x: 1.1, + y: 20 + } + }) + ).toEqual(false) }) it('non-integer number fails on layout', () => { - expect(Source.validate({ - ...source, - layout: { - rows: 1.1, - cols: 3 - } - })).toEqual(false) + expect( + Source.validate({ + ...source, + layout: { + rows: 1.1, + cols: 3 + } + }) + ).toEqual(false) }) it('invalid string on rotation fails', () => { - expect(Source.validate({ - ...source, - rotation: 'invalid' - } )).toEqual(false) + expect( + Source.validate({ + ...source, + rotation: 'invalid' + }) + ).toEqual(false) }) - -}); +}) diff --git a/test/platform/scenes/spawn-point.spec.ts b/test/platform/scenes/spawn-point.spec.ts index 40edc3d4..ce57781a 100644 --- a/test/platform/scenes/spawn-point.spec.ts +++ b/test/platform/scenes/spawn-point.spec.ts @@ -1,60 +1,65 @@ -import expect from "expect"; -import { SpawnPoint } from "../../../src"; -import { testTypeSignature } from "../../test-utils"; +import expect from 'expect' +import { SpawnPoint } from '../../../src' +import { testTypeSignature } from '../../test-utils' -describe("Spawn point tests", () => { +describe('Spawn point tests', () => { const spawnPoint: SpawnPoint = { - name: "spawn1", + name: 'spawn1', default: true, position: { x: [1, 5], y: [1, 1], - z: [2, 4], + z: [2, 4] }, cameraTarget: { x: 10, y: 1, - z: 4, - }, - }; + z: 4 + } + } - testTypeSignature(SpawnPoint, spawnPoint); + testTypeSignature(SpawnPoint, spawnPoint) - it("static tests must pass", () => { - expect(SpawnPoint.validate(spawnPoint)).toEqual(true); - expect(SpawnPoint.validate(null)).toEqual(false); - expect(SpawnPoint.validate({})).toEqual(false); - }); + it('static tests must pass', () => { + expect(SpawnPoint.validate(spawnPoint)).toEqual(true) + expect(SpawnPoint.validate(null)).toEqual(false) + expect(SpawnPoint.validate({})).toEqual(false) + }) it('position with empty array fails', () => { - expect(SpawnPoint.validate({ - ...spawnPoint, - position: { - ...spawnPoint.position, - x: [] - } - })).toEqual(false) + expect( + SpawnPoint.validate({ + ...spawnPoint, + position: { + ...spawnPoint.position, + x: [] + } + }) + ).toEqual(false) }) it('position with combination of array and number fails', () => { - expect(SpawnPoint.validate({ - ...spawnPoint, - position: { - ...spawnPoint.position, - x: 1 - } - })).toEqual(false) + expect( + SpawnPoint.validate({ + ...spawnPoint, + position: { + ...spawnPoint.position, + x: 1 + } + }) + ).toEqual(false) }) it('position with string only numbers works', () => { - expect(SpawnPoint.validate({ - ...spawnPoint, - position: { - x: 1, - y: 1, - z: 2, - } - })).toEqual(true) + expect( + SpawnPoint.validate({ + ...spawnPoint, + position: { + x: 1, + y: 1, + z: 2 + } + }) + ).toEqual(true) }) - -}); +}) diff --git a/test/platform/wearables/representation.spec.ts b/test/platform/wearables/representation.spec.ts index 37e95e8a..d6a87147 100644 --- a/test/platform/wearables/representation.spec.ts +++ b/test/platform/wearables/representation.spec.ts @@ -20,38 +20,48 @@ describe('Representation tests', () => { }) it('representation without body shape fails', () => { - expect(WearableRepresentation.validate({ - ...representation, - bodyShapes: [] - })).toEqual(false) + expect( + WearableRepresentation.validate({ + ...representation, + bodyShapes: [] + }) + ).toEqual(false) }) it('representation with repeated body shapes fails', () => { - expect(WearableRepresentation.validate({ - ...representation, - bodyShapes: [WearableBodyShape.FEMALE, WearableBodyShape.FEMALE] - })).toEqual(false) + expect( + WearableRepresentation.validate({ + ...representation, + bodyShapes: [WearableBodyShape.FEMALE, WearableBodyShape.FEMALE] + }) + ).toEqual(false) }) it('representation without content fails', () => { - expect(WearableRepresentation.validate({ - ...representation, - contents: [] - })).toEqual(false) + expect( + WearableRepresentation.validate({ + ...representation, + contents: [] + }) + ).toEqual(false) }) it('representation with repeated content fails', () => { - expect(WearableRepresentation.validate({ - ...representation, - contents: ['file1', 'file1'] - })).toEqual(false) + expect( + WearableRepresentation.validate({ + ...representation, + contents: ['file1', 'file1'] + }) + ).toEqual(false) }) it('main file not in contents fails', () => { - expect(WearableRepresentation.validate({ - ...representation, - mainFile: ['file1'], - contents: ['file2', 'file3'] - })).toEqual(false) + expect( + WearableRepresentation.validate({ + ...representation, + mainFile: ['file1'], + contents: ['file2', 'file3'] + }) + ).toEqual(false) }) }) diff --git a/test/platform/wearables/wearable.spec.ts b/test/platform/wearables/wearable.spec.ts index b9004f2b..7de24984 100644 --- a/test/platform/wearables/wearable.spec.ts +++ b/test/platform/wearables/wearable.spec.ts @@ -1,9 +1,15 @@ import expect from 'expect' -import { Locale, Rarity, Wearable, WearableBodyShape, WearableCategory, WearableRepresentation } from '../../../src' +import { + Locale, + Rarity, + Wearable, + WearableBodyShape, + WearableCategory, + WearableRepresentation +} from '../../../src' import { testTypeSignature } from '../../test-utils' describe('Representation tests', () => { - const representation: WearableRepresentation = { bodyShapes: [WearableBodyShape.FEMALE], mainFile: 'file1', @@ -14,32 +20,35 @@ describe('Representation tests', () => { const wearable: Wearable = { id: 'some id', - descriptions: [{ - code: Locale.EN, - text: 'some description' - }, - { - code: Locale.ES, - text: 'una descripcion' - }], + descriptions: [ + { + code: Locale.EN, + text: 'some description' + }, + { + code: Locale.ES, + text: 'una descripcion' + } + ], collectionAddress: '0x...', rarity: Rarity.LEGENDARY, - names: [{ - code: Locale.EN, - text: 'name' - }], + names: [ + { + code: Locale.EN, + text: 'name' + } + ], data: { replaces: [], hides: [], tags: ['tag1'], representations: [representation], - category: WearableCategory.UPPER_BODY, + category: WearableCategory.UPPER_BODY }, thumbnail: 'thumbnail.png', image: 'image.png' } - testTypeSignature(Wearable, wearable) it('static tests must pass', () => { @@ -49,41 +58,56 @@ describe('Representation tests', () => { }) it('wearable with two names with same locale fails', () => { - expect(Wearable.validate({ - ...wearable, - names: [{ code: Locale.ES, text: 'texto' }, { code: Locale.ES, text: 'otro texto' }] - })).toEqual(false) + expect( + Wearable.validate({ + ...wearable, + names: [ + { code: Locale.ES, text: 'texto' }, + { code: Locale.ES, text: 'otro texto' } + ] + }) + ).toEqual(false) }) it('wearable with two descriptions with same locale fails', () => { - expect(Wearable.validate({ - ...wearable, - descriptions: [{ code: Locale.ES, text: 'texto' }, { code: Locale.ES, text: 'otro texto' }] - })).toEqual(false) + expect( + Wearable.validate({ + ...wearable, + descriptions: [ + { code: Locale.ES, text: 'texto' }, + { code: Locale.ES, text: 'otro texto' } + ] + }) + ).toEqual(false) }) it('wearable without representation fails', () => { - expect(Wearable.validate({ - ...wearable, - data: { - ...wearable.data, - representations: [] - } - })).toEqual(false) + expect( + Wearable.validate({ + ...wearable, + data: { + ...wearable.data, + representations: [] + } + }) + ).toEqual(false) }) it('wearable without name fails', () => { - expect(Wearable.validate({ - ...wearable, - name: [] - })).toEqual(false) + expect( + Wearable.validate({ + ...wearable, + name: [] + }) + ).toEqual(false) }) it('wearable without description fails', () => { - expect(Wearable.validate({ - ...wearable, - description: [] - })).toEqual(false) + expect( + Wearable.validate({ + ...wearable, + description: [] + }) + ).toEqual(false) }) - }) diff --git a/test/sale.spec.ts b/test/sale.spec.ts index 68063e8e..179a9dca 100644 --- a/test/sale.spec.ts +++ b/test/sale.spec.ts @@ -18,7 +18,7 @@ describe('Sale tests', () => { txHash: '0x2bfc1458d1ec631bfcd9782e001d93fe0cf95a6e4fede3222e9e5bde7fb47e36', network: Network.MATIC, - chainId: ChainId.MATIC_MAINNET, + chainId: ChainId.MATIC_MAINNET } testTypeSignature(Sale, sale) diff --git a/test/test-utils.ts b/test/test-utils.ts index 9fdc550f..0a6f45a3 100644 --- a/test/test-utils.ts +++ b/test/test-utils.ts @@ -1,25 +1,28 @@ -import expect from "expect" -import { AbstractTypedSchema, validateType } from "../src" +import expect from 'expect' +import { AbstractTypedSchema, validateType } from '../src' -export function testTypeSignature(theType: AbstractTypedSchema, exampleValue: T) { +export function testTypeSignature( + theType: AbstractTypedSchema, + exampleValue: T +) { describe(`verifies that the shape of the type conforms the spec`, () => { it('type has a "schema" object', () => { - expect(typeof theType.schema).toEqual("object") + expect(typeof theType.schema).toEqual('object') }) it('type has a "validate" function', () => { - expect(typeof theType.validate).toEqual("function") + expect(typeof theType.validate).toEqual('function') }) - it("evaluate a valid example", () => { + it('evaluate a valid example', () => { expect(theType.validate(exampleValue)).toEqual(true) expect(validateType(theType, exampleValue)).toEqual(true) }) - it("evaluate an invalid example", () => { + it('evaluate an invalid example', () => { // I hope this is enough of a bad example, don't do this at home expect( theType.validate({ [Math.random()]: Math.random(), - [Math.random() + "asd"]: null, - [Math.random() + "asd"]: { a: null }, + [Math.random() + 'asd']: null, + [Math.random() + 'asd']: { a: null } }) ).toEqual(false) }) diff --git a/test/world.spec.ts b/test/world.spec.ts index b8731c91..bd35c1e6 100644 --- a/test/world.spec.ts +++ b/test/world.spec.ts @@ -12,6 +12,6 @@ describe('World tests', () => { expect(World.validate(world)).toEqual(true) expect(World.validate(null)).toEqual(false) expect(World.validate({})).toEqual(false) - expect(isInsideWorldLimits(63,80)).toEqual(true) + expect(isInsideWorldLimits(63, 80)).toEqual(true) }) })