From 2f891d3f57a334b4db776e7fa3c2e59cd7cab062 Mon Sep 17 00:00:00 2001 From: Dale Nguyen Date: Sun, 9 Oct 2022 19:38:44 -0400 Subject: [PATCH] change module to ES & update packages --- .mocharc.json | 12 + .npmrc | 2 + CHANGELOG.md | 7 + package.json | 20 +- pnpm-lock.yaml | 584 ++++++++++++++++------------------------- src/export.ts | 12 +- src/import.ts | 21 +- src/index.ts | 18 +- test/firestore.spec.ts | 18 +- test/serviceAccount.ts | 5 +- tsconfig.json | 4 +- 11 files changed, 295 insertions(+), 408 deletions(-) create mode 100644 .mocharc.json create mode 100644 .npmrc diff --git a/.mocharc.json b/.mocharc.json new file mode 100644 index 0000000..efec1e4 --- /dev/null +++ b/.mocharc.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json.schemastore.org/mocharc", + "extension": ["ts"], + "loader": "ts-node/esm", + "spec": ["test/**/*.spec.ts"], + "timeout": 60000, + "exit": true, + "node-option": [ + "experimental-specifier-resolution=node", + "loader=ts-node/esm" + ] + } \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..8051a48 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +auto-install-peers=true +strict-peer-dependencies=false \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e7b005d..3ca2ab2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,13 @@ --- +## [1.3.0] - 2022-10-09 + +#### - :nail_care: [Polish] + +- turn the package to use es module +- update packages + ## [1.2.1] - 2022-08-24 #### - :nail_care: [Polish] diff --git a/package.json b/package.json index 3e777f1..50be2b7 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "firestore-export-import", - "version": "1.2.1", + "version": "1.3.0", "description": "NPM package for backup and restore Firebase Firestore", "main": "dist/index.js", "types": "dist/index.d.ts", + "type": "module", "files": [ "readme.md", "dist/*.*.*", @@ -11,7 +12,7 @@ ], "scripts": { "watch": "tsc -w", - "test": "mocha --timeout 60000 --exit -r ts-node/register test/**/*.spec.ts", + "test": "mocha", "build": "tsc --skipLibCheck && npm run minify", "minify": "jsmin -o dist/index.js dist/index.js && jsmin -o dist/import.js dist/import.js && jsmin -o dist/export.js dist/export.js && jsmin -o dist/helper.js dist/helper.js" }, @@ -27,7 +28,7 @@ "import", "export" ], - "author": "Dale Nguyen (http://dalenguyen.me)", + "author": "Dale Nguyen (http://dalenguyen.me)", "license": "ISC", "bugs": { "url": "https://github.com/dalenguyen/firestore-backup-restore/issues" @@ -37,25 +38,26 @@ "@types/chai": "^4.3.3", "@types/expect": "^24.3.0", "@types/mocha": "^9.1.1", - "@types/node": "^18.7.13", + "@types/node": "^18.8.3", "chai": "^4.3.6", "jsmin": "^1.0.1", - "minimist": "^1.2.6", + "minimist": "1.2.6", "mocha": "^10.0.0", "request": "^2.88.2", "request-promise": "^4.2.6", "ts-node": "^10.9.1", - "typescript": "^4.7.4" + "typescript": "^4.8.4" }, "dependencies": { - "firebase-admin": "^11.0.1", - "google-gax": "^3.2.1", + "firebase-admin": "^11.1.0", + "google-gax": "^3.5.2", "uuid": "^8.3.2" }, "resolutions": { "minimist": "1.2.6" }, "engines": { - "node": ">=16.0.0" + "node": ">=16.0.0", + "pnpm": ">=7" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1094ad6..e1aee9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,37 +7,37 @@ specifiers: '@types/chai': ^4.3.3 '@types/expect': ^24.3.0 '@types/mocha': ^9.1.1 - '@types/node': ^18.7.13 + '@types/node': ^18.8.3 chai: ^4.3.6 - firebase-admin: ^11.0.1 - google-gax: ^3.2.1 + firebase-admin: ^11.1.0 + google-gax: ^3.5.2 jsmin: ^1.0.1 minimist: 1.2.6 mocha: ^10.0.0 request: ^2.88.2 request-promise: ^4.2.6 ts-node: ^10.9.1 - typescript: ^4.7.4 + typescript: ^4.8.4 uuid: ^8.3.2 dependencies: - firebase-admin: 11.0.1 - google-gax: 3.2.1 + firebase-admin: 11.1.0_@firebase+app-types@0.8.0 + google-gax: 3.5.2 uuid: 8.3.2 devDependencies: '@types/chai': 4.3.3 '@types/expect': 24.3.0 '@types/mocha': 9.1.1 - '@types/node': 18.7.13 + '@types/node': 18.8.3 chai: 4.3.6 jsmin: 1.0.1 minimist: 1.2.6 mocha: 10.0.0 request: 2.88.2 request-promise: 4.2.6_request@2.88.2 - ts-node: 10.9.1_57uwcby55h6tzvkj3v5sfcgxoe - typescript: 4.7.4 + ts-node: 10.9.1_xtdkmayvpbwqd3kc4kczaw2zvm + typescript: 4.8.4 packages: @@ -53,33 +53,33 @@ packages: engines: {node: '>=6.9.0'} dev: false - /@babel/helper-validator-identifier/7.18.6: - resolution: {integrity: sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==} + /@babel/helper-validator-identifier/7.19.1: + resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} /@babel/highlight/7.18.6: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.18.6 + '@babel/helper-validator-identifier': 7.19.1 chalk: 2.4.2 js-tokens: 4.0.0 dev: true - /@babel/parser/7.18.13: - resolution: {integrity: sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==} + /@babel/parser/7.19.3: + resolution: {integrity: sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.18.13 + '@babel/types': 7.19.3 dev: false - /@babel/types/7.18.13: - resolution: {integrity: sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==} + /@babel/types/7.19.3: + resolution: {integrity: sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.18.10 - '@babel/helper-validator-identifier': 7.18.6 + '@babel/helper-validator-identifier': 7.19.1 to-fast-properties: 2.0.0 dev: false @@ -97,53 +97,54 @@ packages: text-decoding: 1.0.0 dev: false - /@firebase/app-types/0.7.0: - resolution: {integrity: sha512-6fbHQwDv2jp/v6bXhBw2eSRbNBpxHcd1NBF864UksSMVIqIyri9qpJB1Mn6sGZE+bnDsSQBC5j2TbMxYsJQkQg==} + /@firebase/app-types/0.8.0: + resolution: {integrity: sha512-Lec3VVquUwXPn2UReGSsfTxuMBVRmzGIwA/CJnF0LQuPgv9kOmXk9mVqsDMfHxHtqjai0n6wWHR2TqjdVV/bYA==} dev: false - /@firebase/auth-interop-types/0.1.6_@firebase+util@1.6.3: + /@firebase/auth-interop-types/0.1.6_hc4yn5f4ebzhrwwrb4uuunvgqi: resolution: {integrity: sha512-etIi92fW3CctsmR9e3sYM3Uqnoq861M0Id9mdOPF6PWIg38BXL5k4upCNBggGUpLIS0H1grMOvy/wn1xymwe2g==} peerDependencies: '@firebase/app-types': 0.x '@firebase/util': 1.x dependencies: - '@firebase/util': 1.6.3 + '@firebase/app-types': 0.8.0 + '@firebase/util': 1.7.0 dev: false - /@firebase/component/0.5.17: - resolution: {integrity: sha512-mTM5CBSIlmI+i76qU4+DhuExnWtzcPS3cVgObA3VAjliPPr3GrUlTaaa8KBGfxsD27juQxMsYA0TvCR5X+GQ3Q==} + /@firebase/component/0.5.18: + resolution: {integrity: sha512-worbz6idNWud/Sfpp3Lf9BE9tM8GRHhuQ4Hsqnva6ECdSRKYt8RRPg3UUSwDGa4iFpPo+gF/jKfydYN676+JmQ==} dependencies: - '@firebase/util': 1.6.3 + '@firebase/util': 1.7.0 tslib: 2.4.0 dev: false - /@firebase/database-compat/0.2.5: - resolution: {integrity: sha512-fj88gwtNJMcJBDjcTMbCuYEiVzuGb76rTOaaiAOqxR+unzvvbs2KU5KbFyl83jcpIjY6NIt+xXNrCXpzo7Zp3g==} + /@firebase/database-compat/0.2.7_@firebase+app-types@0.8.0: + resolution: {integrity: sha512-D9nTb8RNb3RbsKtwUFDykIeUbuBgVSDKE+b6dCgVi9PS7sNATdZPpKGjxLIAxCggyRTgfMj5pr0S5fhrMedRNw==} dependencies: - '@firebase/component': 0.5.17 - '@firebase/database': 0.13.5 - '@firebase/database-types': 0.9.13 + '@firebase/component': 0.5.18 + '@firebase/database': 0.13.7_@firebase+app-types@0.8.0 + '@firebase/database-types': 0.9.14 '@firebase/logger': 0.3.3 - '@firebase/util': 1.6.3 + '@firebase/util': 1.7.0 tslib: 2.4.0 transitivePeerDependencies: - '@firebase/app-types' dev: false - /@firebase/database-types/0.9.13: - resolution: {integrity: sha512-dIJ1zGe3EHMhwcvukTOPzYlFYFIG1Et5Znl7s7y/ZTN2/toARRNnsv1qCKvqevIMYKvIrRsYOYfOXDS8l1YIJA==} + /@firebase/database-types/0.9.14: + resolution: {integrity: sha512-utMsusFMr5HuyiKxFyeOXU4hvC7hdJFTiyUWTQpLFODRwhtoPE539Y1I3r/LJhSPyt8dtds2GSjnvIbCvDezLQ==} dependencies: - '@firebase/app-types': 0.7.0 - '@firebase/util': 1.6.3 + '@firebase/app-types': 0.8.0 + '@firebase/util': 1.7.0 dev: false - /@firebase/database/0.13.5: - resolution: {integrity: sha512-QmX73yi8URk36NAbykXeuAcJCjDtx3BzuxKJO3sL9B4CtjNFAfpWawVxoaaThocDWNAyMJxFhiL1kkaVraH7Lg==} + /@firebase/database/0.13.7_@firebase+app-types@0.8.0: + resolution: {integrity: sha512-j72yRxwGMcRnB+KwmyQYpPJHb5oNgbTS17ecAm8cX1GEyRohbZiE9GljbMaoOxSz/r8XuVfe748gEk5HFSEtSA==} dependencies: - '@firebase/auth-interop-types': 0.1.6_@firebase+util@1.6.3 - '@firebase/component': 0.5.17 + '@firebase/auth-interop-types': 0.1.6_hc4yn5f4ebzhrwwrb4uuunvgqi + '@firebase/component': 0.5.18 '@firebase/logger': 0.3.3 - '@firebase/util': 1.6.3 + '@firebase/util': 1.7.0 faye-websocket: 0.11.4 tslib: 2.4.0 transitivePeerDependencies: @@ -156,21 +157,21 @@ packages: tslib: 2.4.0 dev: false - /@firebase/util/1.6.3: - resolution: {integrity: sha512-FujteO6Zjv6v8A4HS+t7c+PjU0Kaxj+rOnka0BsI/twUaCC9t8EQPmXpWZdk7XfszfahJn2pqsflUWUhtUkRlg==} + /@firebase/util/1.7.0: + resolution: {integrity: sha512-n5g1WWd+E5IYQwtKxmTJDlhfT762mk/d7yigeh8QaS46cnvngwguOhNwlS8fniEJ7pAgyZ9v05OQMKdfMnws6g==} dependencies: tslib: 2.4.0 dev: false - /@google-cloud/firestore/5.0.2: - resolution: {integrity: sha512-xlGcNYaW0nvUMzNn2+pLfbEBVt6oysVqtM89faMgZWkWfEtvIQGS0h5PRdLlcqufNzRCX3yIGv29Pb+03ys+VA==} - engines: {node: '>=10.10.0'} + /@google-cloud/firestore/6.3.0: + resolution: {integrity: sha512-EtEOl1A8lDFv+t2X/GyyvCDSWamUfBPVep0y0qHvO7CKD4MH/4MiPKe/+kcq1h8rynX6Ths/E/jtfAiizFCVrA==} + engines: {node: '>=12.0.0'} requiresBuild: true dependencies: fast-deep-equal: 3.1.3 functional-red-black-tree: 1.0.1 - google-gax: 2.30.5 - protobufjs: 6.11.3 + google-gax: 3.5.2 + protobufjs: 7.1.2 transitivePeerDependencies: - encoding - supports-color @@ -192,20 +193,20 @@ packages: dev: false optional: true - /@google-cloud/promisify/3.0.0: - resolution: {integrity: sha512-91ArYvRgXWb73YvEOBMmOcJc0bDRs5yiVHnqkwoG0f3nm7nZuipllz6e7BvFESBvjkDTBC0zMD8QxedUwNLc1A==} + /@google-cloud/promisify/3.0.1: + resolution: {integrity: sha512-z1CjRjtQyBOYL+5Qr9DdYIfrdLBe746jRTYfaYU6MeXkqp7UfYs/jX16lFFVzZ7PGEJvqZNqYUEtb1mvDww4pA==} engines: {node: '>=12'} dev: false optional: true - /@google-cloud/storage/6.4.1: - resolution: {integrity: sha512-lAddmRJ8tvxPykUqJfONBQA5XGwGk0vut1POXublc64+nCdB5aQMxwuBMf7J1zubx19QGpYPQwW6wR7YTWrvLw==} + /@google-cloud/storage/6.5.2: + resolution: {integrity: sha512-n4HVE5bGGFdXlPUN2tP+wEnVH2XbYnv9PVrHirbAJPHk8EM7bm1G86+IhLha8KH4PpHLhjCPML173Sr6PWCXIQ==} engines: {node: '>=12'} requiresBuild: true dependencies: '@google-cloud/paginator': 3.0.7 '@google-cloud/projectify': 3.0.0 - '@google-cloud/promisify': 3.0.0 + '@google-cloud/promisify': 3.0.1 abort-controller: 3.0.0 arrify: 2.0.1 async-retry: 1.3.3 @@ -213,13 +214,13 @@ packages: duplexify: 4.1.2 ent: 2.2.0 extend: 3.0.2 - gaxios: 5.0.1 - google-auth-library: 8.4.0 + gaxios: 5.0.2 + google-auth-library: 8.5.2 mime: 3.0.0 mime-types: 2.1.35 p-limit: 3.1.0 - retry-request: 5.0.1 - teeny-request: 8.0.0 + retry-request: 5.0.2 + teeny-request: 8.0.2 uuid: 8.3.2 transitivePeerDependencies: - encoding @@ -227,62 +228,49 @@ packages: dev: false optional: true - /@grpc/grpc-js/1.6.10: - resolution: {integrity: sha512-XTX5z/P5kH802MDoVm/rqOil0UwYEOEjf9+NPgfmm5UINIxDzwYaXfVR6z8svCBG8Hlbu/FzkXqhP8J5xaWzSQ==} + /@grpc/grpc-js/1.7.1: + resolution: {integrity: sha512-GVtMU4oh/TeKkWGzXUEsyZtyvSUIT1z49RtGH1UnEGeL+sLuxKl8QH3KZTlSB329R1sWJmesm5hQ5CxXdYH9dg==} engines: {node: ^8.13.0 || >=10.10.0} dependencies: - '@grpc/proto-loader': 0.7.2 - '@types/node': 18.7.13 + '@grpc/proto-loader': 0.7.3 + '@types/node': 18.8.3 dev: false - /@grpc/proto-loader/0.6.13: - resolution: {integrity: sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g==} + /@grpc/proto-loader/0.7.3: + resolution: {integrity: sha512-5dAvoZwna2Py3Ef96Ux9jIkp3iZ62TUsV00p3wVBPNX5K178UbNi8Q7gQVqwXT1Yq9RejIGG9G2IPEo93T6RcA==} engines: {node: '>=6'} hasBin: true dependencies: '@types/long': 4.0.2 lodash.camelcase: 4.3.0 long: 4.0.0 - protobufjs: 6.11.3 + protobufjs: 7.1.2 yargs: 16.2.0 dev: false - optional: true - /@grpc/proto-loader/0.7.2: - resolution: {integrity: sha512-jCdyLIT/tdQ1zhrbTQnJNK5nbDf0GoBpy5jVNywBzzMDF+Vs6uEaHnfz46dMtDxkvwrF2hzk5Z67goliceH0sA==} - engines: {node: '>=6'} - hasBin: true + /@jest/expect-utils/29.1.2: + resolution: {integrity: sha512-4a48bhKfGj/KAH39u0ppzNTABXQ8QPccWAFUFobWBaEMSMp+sB31Z2fK/l47c4a/Mu1po2ffmfAIPxXbVTXdtg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/long': 4.0.2 - lodash.camelcase: 4.3.0 - long: 4.0.0 - protobufjs: 7.0.0 - yargs: 16.2.0 - dev: false - - /@jest/expect-utils/28.1.3: - resolution: {integrity: sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} - dependencies: - jest-get-type: 28.0.2 + jest-get-type: 29.0.0 dev: true - /@jest/schemas/28.1.3: - resolution: {integrity: sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + /@jest/schemas/29.0.0: + resolution: {integrity: sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@sinclair/typebox': 0.24.28 + '@sinclair/typebox': 0.24.44 dev: true - /@jest/types/28.1.3: - resolution: {integrity: sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + /@jest/types/29.1.2: + resolution: {integrity: sha512-DcXGtoTykQB5jiwCmVr8H4vdg2OJhQex3qPkG+ISyDO7xQXbt/4R6dowcRyPemRnkH7JoHvZuxPBdlq+9JxFCg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 28.1.3 + '@jest/schemas': 29.0.0 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.7.13 - '@types/yargs': 17.0.11 + '@types/node': 18.8.3 + '@types/yargs': 17.0.13 chalk: 4.1.2 dev: true @@ -350,8 +338,8 @@ packages: resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} dev: false - /@sinclair/typebox/0.24.28: - resolution: {integrity: sha512-dgJd3HLOkLmz4Bw50eZx/zJwtBq65nms3N9VBYu5LTjJ883oBFkTyXRlCB/ZGGwqYpJJHA5zW2Ibhl5ngITfow==} + /@sinclair/typebox/0.24.44: + resolution: {integrity: sha512-ka0W0KN5i6LfrSocduwliMMpqVgohtPFidKdMEOUjoOFCHcOOYkKsPRxfs5f15oPNHTm6ERAm0GV/+/LTKeiWg==} dev: true /@tootallnate/once/2.0.0: @@ -380,7 +368,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 18.7.13 + '@types/node': 18.8.3 dev: false /@types/chai/4.3.3: @@ -390,29 +378,29 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 18.7.13 + '@types/node': 18.8.3 dev: false /@types/expect/24.3.0: resolution: {integrity: sha512-aq5Z+YFBz5o2b6Sp1jigx5nsmoZMK5Ceurjwy6PZmRv7dEi1jLtkARfvB1ME+OXJUG+7TZUDcv3WoCr/aor6dQ==} deprecated: This is a stub types definition. expect provides its own type definitions, so you do not need this installed. dependencies: - expect: 28.1.3 + expect: 29.1.2 dev: true - /@types/express-serve-static-core/4.17.30: - resolution: {integrity: sha512-gstzbTWro2/nFed1WXtf+TtrpwxH7Ggs4RLYTLbeVgIkUQOI3WG/JKjgeOU1zXDvezllupjrf8OPIdvTbIaVOQ==} + /@types/express-serve-static-core/4.17.31: + resolution: {integrity: sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==} dependencies: - '@types/node': 18.7.13 + '@types/node': 18.8.3 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false - /@types/express/4.17.13: - resolution: {integrity: sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==} + /@types/express/4.17.14: + resolution: {integrity: sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==} dependencies: '@types/body-parser': 1.19.2 - '@types/express-serve-static-core': 4.17.30 + '@types/express-serve-static-core': 4.17.31 '@types/qs': 6.9.7 '@types/serve-static': 1.15.0 dev: false @@ -436,7 +424,7 @@ packages: /@types/jsonwebtoken/8.5.9: resolution: {integrity: sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==} dependencies: - '@types/node': 18.7.13 + '@types/node': 18.8.3 dev: false /@types/linkify-it/3.0.2: @@ -466,8 +454,8 @@ packages: resolution: {integrity: sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==} dev: true - /@types/node/18.7.13: - resolution: {integrity: sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==} + /@types/node/18.8.3: + resolution: {integrity: sha512-0os9vz6BpGwxGe9LOhgP/ncvYN5Tx1fNcd2TM3rD/aCGBkysb+ZWpXEocG24h6ZzOi13+VB8HndAQFezsSOw1w==} /@types/qs/6.9.7: resolution: {integrity: sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==} @@ -481,7 +469,7 @@ packages: resolution: {integrity: sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==} dependencies: '@types/mime': 3.0.1 - '@types/node': 18.7.13 + '@types/node': 18.8.3 dev: false /@types/stack-utils/2.0.1: @@ -492,8 +480,8 @@ packages: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} dev: true - /@types/yargs/17.0.11: - resolution: {integrity: sha512-aB4y9UDUXTSMxmM4MH+YnuR0g5Cph3FLQBoWoMB21DSvFVAxRVEHEMx3TLh+zUZYMCQtKiqazz0Q4Rre31f/OA==} + /@types/yargs/17.0.13: + resolution: {integrity: sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==} dependencies: '@types/yargs-parser': 21.0.0 dev: true @@ -741,8 +729,8 @@ packages: fsevents: 2.3.2 dev: true - /ci-info/3.3.2: - resolution: {integrity: sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==} + /ci-info/3.5.0: + resolution: {integrity: sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==} dev: true /cliui/7.0.4: @@ -850,9 +838,9 @@ packages: engines: {node: '>=0.4.0'} dev: true - /diff-sequences/28.1.1: - resolution: {integrity: sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + /diff-sequences/29.0.0: + resolution: {integrity: sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true /diff/4.0.2: @@ -941,8 +929,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: false - /espree/9.3.3: - resolution: {integrity: sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==} + /espree/9.4.0: + resolution: {integrity: sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: acorn: 8.8.0 @@ -976,15 +964,15 @@ packages: engines: {node: '>=6'} dev: false - /expect/28.1.3: - resolution: {integrity: sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + /expect/29.1.2: + resolution: {integrity: sha512-AuAGn1uxva5YBbBlXb+2JPxJRuemZsmlGcapPXWNSBNsQtAULfjioREGBWuI0EOvYUKjDnrCy8PW5Zlr1md5mw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/expect-utils': 28.1.3 - jest-get-type: 28.0.2 - jest-matcher-utils: 28.1.3 - jest-message-util: 28.1.3 - jest-util: 28.1.3 + '@jest/expect-utils': 29.1.2 + jest-get-type: 29.0.0 + jest-matcher-utils: 29.1.2 + jest-message-util: 29.1.2 + jest-util: 29.1.2 dev: true /extend/3.0.2: @@ -1006,8 +994,8 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: false - /fast-text-encoding/1.0.4: - resolution: {integrity: sha512-x6lDDm/tBAzX9kmsPcZsNbvDs3Zey3+scsxaZElS8xWLgUMAg/oFLeewfUz0mu1CblHhhsu15jGkraldkFh8KQ==} + /fast-text-encoding/1.0.6: + resolution: {integrity: sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==} dev: false /faye-websocket/0.11.4: @@ -1032,21 +1020,21 @@ packages: path-exists: 4.0.0 dev: true - /firebase-admin/11.0.1: - resolution: {integrity: sha512-rL3wlZbi2Kb/KJgcmj1YHlD4ZhfmhfgRO2YJialxAllm0tj1IQea878hHuBLGmv4DpbW9t9nLvX9kddNR2Y65Q==} + /firebase-admin/11.1.0_@firebase+app-types@0.8.0: + resolution: {integrity: sha512-c7yzUs8CYdmnkuN5OCHPguDNqqdMJqlrBsCHekYkd8aR3WmhHwOISHru2QL+M/HE7t2VMj3018Ibqu2ja1xfGg==} engines: {node: '>=14'} dependencies: '@fastify/busboy': 1.1.0 - '@firebase/database-compat': 0.2.5 - '@firebase/database-types': 0.9.13 - '@types/node': 18.7.13 + '@firebase/database-compat': 0.2.7_@firebase+app-types@0.8.0 + '@firebase/database-types': 0.9.14 + '@types/node': 18.8.3 jsonwebtoken: 8.5.1 jwks-rsa: 2.1.4 node-forge: 1.3.1 - uuid: 8.3.2 + uuid: 9.0.0 optionalDependencies: - '@google-cloud/firestore': 5.0.2 - '@google-cloud/storage': 6.4.1 + '@google-cloud/firestore': 6.3.0 + '@google-cloud/storage': 6.5.2 transitivePeerDependencies: - '@firebase/app-types' - encoding @@ -1087,23 +1075,8 @@ packages: dev: false optional: true - /gaxios/4.3.3: - resolution: {integrity: sha512-gSaYYIO1Y3wUtdfHmjDUZ8LWaxJQpiavzbF5Kq53akSzvmVg0RfyOcFDbO1KJ/KCGRFz2qG+lS81F0nkr7cRJA==} - engines: {node: '>=10'} - dependencies: - abort-controller: 3.0.0 - extend: 3.0.2 - https-proxy-agent: 5.0.1 - is-stream: 2.0.1 - node-fetch: 2.6.7 - transitivePeerDependencies: - - encoding - - supports-color - dev: false - optional: true - - /gaxios/5.0.1: - resolution: {integrity: sha512-keK47BGKHyyOVQxgcUaSaFvr3ehZYAlvhvpHXy0YB2itzZef+GqZR8TBsfVRWghdwlKrYsn+8L8i3eblF7Oviw==} + /gaxios/5.0.2: + resolution: {integrity: sha512-TjtV2AJOZoMQqRYoy5eM8cCQogYwazWNYLQ72QB0kwa6vHHruYkGmhhyrlzbmgNHK1dNnuP2WSH81urfzyN2Og==} engines: {node: '>=12'} dependencies: extend: 3.0.2 @@ -1115,23 +1088,11 @@ packages: - supports-color dev: false - /gcp-metadata/4.3.1: - resolution: {integrity: sha512-x850LS5N7V1F3UcV7PoupzGsyD6iVwTVvsh3tbXfkctZnBnjW5yu5z1/3k3SehF7TyoTIe78rJs02GMMy+LF+A==} - engines: {node: '>=10'} - dependencies: - gaxios: 4.3.3 - json-bigint: 1.0.0 - transitivePeerDependencies: - - encoding - - supports-color - dev: false - optional: true - - /gcp-metadata/5.0.0: - resolution: {integrity: sha512-gfwuX3yA3nNsHSWUL4KG90UulNiq922Ukj3wLTrcnX33BB7PwB1o0ubR8KVvXu9nJH+P5w1j2SQSNNqto+H0DA==} + /gcp-metadata/5.0.1: + resolution: {integrity: sha512-jiRJ+Fk7e8FH68Z6TLaqwea307OktJpDjmYnU7/li6ziwvVvU2RlrCyQo5vkdeP94chm0kcSCOOszvmuaioq3g==} engines: {node: '>=12'} dependencies: - gaxios: 5.0.1 + gaxios: 5.0.2 json-bigint: 1.0.0 transitivePeerDependencies: - encoding @@ -1192,36 +1153,17 @@ packages: once: 1.4.0 dev: false - /google-auth-library/7.14.1: - resolution: {integrity: sha512-5Rk7iLNDFhFeBYc3s8l1CqzbEBcdhwR193RlD4vSNFajIcINKI8W8P0JLmBpwymHqqWbX34pJDQu39cSy/6RsA==} - engines: {node: '>=10'} - dependencies: - arrify: 2.0.1 - base64-js: 1.5.1 - ecdsa-sig-formatter: 1.0.11 - fast-text-encoding: 1.0.4 - gaxios: 4.3.3 - gcp-metadata: 4.3.1 - gtoken: 5.3.2 - jws: 4.0.0 - lru-cache: 6.0.0 - transitivePeerDependencies: - - encoding - - supports-color - dev: false - optional: true - - /google-auth-library/8.4.0: - resolution: {integrity: sha512-cg/usxyQEmq4PPDBQRt+kGIrfL3k+mOrAoS9Xv1hitQL66AoY7iWvRBcYo3Rb0w4V1t9e/GqW2/D4honlAtMDg==} + /google-auth-library/8.5.2: + resolution: {integrity: sha512-FPfOSaI8n2TVXFHTP8/vAVFCXhyALj7w9/Rgefux3oeKZ/nQDNmfNTJ+lIKcoYT1cKkvMllp1Eood7Y5L+TP+A==} engines: {node: '>=12'} dependencies: arrify: 2.0.1 base64-js: 1.5.1 ecdsa-sig-formatter: 1.0.11 - fast-text-encoding: 1.0.4 - gaxios: 5.0.1 - gcp-metadata: 5.0.0 - gtoken: 6.1.1 + fast-text-encoding: 1.0.6 + gaxios: 5.0.2 + gcp-metadata: 5.0.1 + gtoken: 6.1.2 jws: 4.0.0 lru-cache: 6.0.0 transitivePeerDependencies: @@ -1229,65 +1171,32 @@ packages: - supports-color dev: false - /google-gax/2.30.5: - resolution: {integrity: sha512-Jey13YrAN2hfpozHzbtrwEfEHdStJh1GwaQ2+Akh1k0Tv/EuNVSuBtHZoKSBm5wBMvNsxTsEIZ/152NrYyZgxQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - '@grpc/grpc-js': 1.6.10 - '@grpc/proto-loader': 0.6.13 - '@types/long': 4.0.2 - abort-controller: 3.0.0 - duplexify: 4.1.2 - fast-text-encoding: 1.0.4 - google-auth-library: 7.14.1 - is-stream-ended: 0.1.4 - node-fetch: 2.6.7 - object-hash: 3.0.0 - proto3-json-serializer: 0.1.9 - protobufjs: 6.11.3 - retry-request: 4.2.2 - transitivePeerDependencies: - - encoding - - supports-color - dev: false - optional: true - - /google-gax/3.2.1: - resolution: {integrity: sha512-vWUFzAd/WaEgTOIMuQjjsGC9awlHy5Kl83kO+mVibSTloQjWlfa1k5FklFpnFMCcusMJvGgg0PlzDZS8sl0w8w==} + /google-gax/3.5.2: + resolution: {integrity: sha512-AyP53w0gHcWlzxm+jSgqCR3Xu4Ld7EpSjhtNBnNhzwwWaIUyphH9kBGNIEH+i4UGkTUXOY29K/Re8EiAvkBRGw==} engines: {node: '>=12'} hasBin: true dependencies: - '@grpc/grpc-js': 1.6.10 - '@grpc/proto-loader': 0.7.2 + '@grpc/grpc-js': 1.7.1 + '@grpc/proto-loader': 0.7.3 '@types/long': 4.0.2 abort-controller: 3.0.0 duplexify: 4.1.2 - fast-text-encoding: 1.0.4 - google-auth-library: 8.4.0 + fast-text-encoding: 1.0.6 + google-auth-library: 8.5.2 is-stream-ended: 0.1.4 node-fetch: 2.6.7 object-hash: 3.0.0 - proto3-json-serializer: 1.0.3 - protobufjs: 7.0.0 - protobufjs-cli: 1.0.0_protobufjs@7.0.0 - retry-request: 5.0.1 + proto3-json-serializer: 1.1.0 + protobufjs: 7.1.2 + protobufjs-cli: 1.0.2_protobufjs@7.1.2 + retry-request: 5.0.2 transitivePeerDependencies: - encoding - supports-color dev: false - /google-p12-pem/3.1.4: - resolution: {integrity: sha512-HHuHmkLgwjdmVRngf5+gSmpkyaRI6QmOg77J8tkNBHhNEI62sGHyw4/+UkgyZEI7h84NbWprXDJ+sa3xOYFvTg==} - engines: {node: '>=10'} - hasBin: true - dependencies: - node-forge: 1.3.1 - dev: false - optional: true - - /google-p12-pem/4.0.0: - resolution: {integrity: sha512-lRTMn5ElBdDixv4a86bixejPSRk1boRtUowNepeKEVvYiFlkLuAJUVpEz6PfObDHYEKnZWq/9a2zC98xu62A9w==} + /google-p12-pem/4.0.1: + resolution: {integrity: sha512-WPkN4yGtz05WZ5EhtlxNDWPhC4JIic6G8ePitwUWy4l+XPVYec+a0j0Ts47PDtW59y3RwAhUd9/h9ZZ63px6RQ==} engines: {node: '>=12.0.0'} hasBin: true dependencies: @@ -1297,25 +1206,12 @@ packages: /graceful-fs/4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} - /gtoken/5.3.2: - resolution: {integrity: sha512-gkvEKREW7dXWF8NV8pVrKfW7WqReAmjjkMBh6lNCCGOM4ucS0r0YyXXl0r/9Yj8wcW/32ISkfc8h5mPTDbtifQ==} - engines: {node: '>=10'} - dependencies: - gaxios: 4.3.3 - google-p12-pem: 3.1.4 - jws: 4.0.0 - transitivePeerDependencies: - - encoding - - supports-color - dev: false - optional: true - - /gtoken/6.1.1: - resolution: {integrity: sha512-HPM4VzzPEGxjQ7T2xLrdSYBs+h1c0yHAUiN+8RHPDoiZbndlpg9Sx3SjWcrTt9+N3FHsSABEpjvdQVan5AAuZQ==} + /gtoken/6.1.2: + resolution: {integrity: sha512-4ccGpzz7YAr7lxrT2neugmXQ3hP9ho2gcaityLVkiUecAiwiy60Ii8gRbZeOsXV19fYaRjgBSshs8kXw+NKCPQ==} engines: {node: '>=12.0.0'} dependencies: - gaxios: 5.0.1 - google-p12-pem: 4.0.0 + gaxios: 5.0.2 + google-p12-pem: 4.0.1 jws: 4.0.0 transitivePeerDependencies: - encoding @@ -1449,60 +1345,60 @@ packages: resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} dev: true - /jest-diff/28.1.3: - resolution: {integrity: sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + /jest-diff/29.1.2: + resolution: {integrity: sha512-4GQts0aUopVvecIT4IwD/7xsBaMhKTYoM4/njE/aVw9wpw+pIUVp8Vab/KnSzSilr84GnLBkaP3JLDnQYCKqVQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - diff-sequences: 28.1.1 - jest-get-type: 28.0.2 - pretty-format: 28.1.3 + diff-sequences: 29.0.0 + jest-get-type: 29.0.0 + pretty-format: 29.1.2 dev: true - /jest-get-type/28.0.2: - resolution: {integrity: sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + /jest-get-type/29.0.0: + resolution: {integrity: sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /jest-matcher-utils/28.1.3: - resolution: {integrity: sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + /jest-matcher-utils/29.1.2: + resolution: {integrity: sha512-MV5XrD3qYSW2zZSHRRceFzqJ39B2z11Qv0KPyZYxnzDHFeYZGJlgGi0SW+IXSJfOewgJp/Km/7lpcFT+cgZypw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - jest-diff: 28.1.3 - jest-get-type: 28.0.2 - pretty-format: 28.1.3 + jest-diff: 29.1.2 + jest-get-type: 29.0.0 + pretty-format: 29.1.2 dev: true - /jest-message-util/28.1.3: - resolution: {integrity: sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + /jest-message-util/29.1.2: + resolution: {integrity: sha512-9oJ2Os+Qh6IlxLpmvshVbGUiSkZVc2FK+uGOm6tghafnB2RyjKAxMZhtxThRMxfX1J1SOMhTn9oK3/MutRWQJQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@babel/code-frame': 7.18.6 - '@jest/types': 28.1.3 + '@jest/types': 29.1.2 '@types/stack-utils': 2.0.1 chalk: 4.1.2 graceful-fs: 4.2.10 micromatch: 4.0.5 - pretty-format: 28.1.3 + pretty-format: 29.1.2 slash: 3.0.0 stack-utils: 2.0.5 dev: true - /jest-util/28.1.3: - resolution: {integrity: sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + /jest-util/29.1.2: + resolution: {integrity: sha512-vPCk9F353i0Ymx3WQq3+a4lZ07NXu9Ca8wya6o4Fe4/aO1e1awMMprZ3woPFpKwghEOW+UXgd15vVotuNN9ONQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 28.1.3 - '@types/node': 18.7.13 + '@jest/types': 29.1.2 + '@types/node': 18.8.3 chalk: 4.1.2 - ci-info: 3.3.2 + ci-info: 3.5.0 graceful-fs: 4.2.10 picomatch: 2.3.1 dev: true - /jose/2.0.5: - resolution: {integrity: sha512-BAiDNeDKTMgk4tvD0BbxJ8xHEHBZgpeRZ1zGPPsitSyMgjoMWiLGYAE7H7NpP5h0lPppQajQs871E8NHUrzVPA==} + /jose/2.0.6: + resolution: {integrity: sha512-FVoPY7SflDodE4lknJmbAHSUjLCzE2H1F6MS0RYKMQ8SR+lNccpMf8R4eqkNYyyUjR5qZReOzZo5C5YiHOCjjg==} engines: {node: '>=10.13.0 < 13 || >=13.7.0'} dependencies: '@panva/asn1.js': 1.0.0 @@ -1534,7 +1430,7 @@ packages: engines: {node: '>=12.0.0'} hasBin: true dependencies: - '@babel/parser': 7.18.13 + '@babel/parser': 7.19.3 '@types/markdown-it': 12.2.3 bluebird: 3.7.2 catharsis: 0.9.0 @@ -1542,13 +1438,13 @@ packages: js2xmlparser: 4.0.2 klaw: 3.0.0 markdown-it: 12.3.2 - markdown-it-anchor: 8.6.4_2zb4u3vubltivolgu556vv4aom - marked: 4.0.19 + markdown-it-anchor: 8.6.5_2zb4u3vubltivolgu556vv4aom + marked: 4.1.1 mkdirp: 1.0.4 requizzle: 0.2.3 strip-json-comments: 3.1.1 taffydb: 2.6.2 - underscore: 1.13.4 + underscore: 1.13.6 dev: false /jsmin/1.0.1: @@ -1621,10 +1517,10 @@ packages: resolution: {integrity: sha512-mpArfgPkUpX11lNtGxsF/szkasUcbWHGplZl/uFvFO2NuMHmt0dQXIihh0rkPU2yQd5niQtuUHbXnG/WKiXF6Q==} engines: {node: '>=10 < 13 || >=14'} dependencies: - '@types/express': 4.17.13 + '@types/express': 4.17.14 '@types/jsonwebtoken': 8.5.9 debug: 4.3.4 - jose: 2.0.5 + jose: 2.0.6 limiter: 1.1.5 lru-memoizer: 2.1.4 transitivePeerDependencies: @@ -1762,8 +1658,8 @@ packages: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: true - /markdown-it-anchor/8.6.4_2zb4u3vubltivolgu556vv4aom: - resolution: {integrity: sha512-Ul4YVYZNxMJYALpKtu+ZRdrryYt/GlQ5CK+4l1bp/gWXOG2QWElt6AqF3Mih/wfUKdZbNAZVXGR73/n6U/8img==} + /markdown-it-anchor/8.6.5_2zb4u3vubltivolgu556vv4aom: + resolution: {integrity: sha512-PI1qEHHkTNWT+X6Ip9w+paonfIQ+QZP9sCeMYi47oqhH+EsW8CrJ8J7CzV19QVOj6il8ATGbK2nTECj22ZHGvQ==} peerDependencies: '@types/markdown-it': '*' markdown-it: '*' @@ -1783,8 +1679,8 @@ packages: uc.micro: 1.0.6 dev: false - /marked/4.0.19: - resolution: {integrity: sha512-rgQF/OxOiLcvgUAj1Q1tAf4Bgxn5h5JZTp04Fx4XUkVhs7B+7YA9JEWJhJpoO8eJt8MkZMwqLCNeNqj1bCREZQ==} + /marked/4.1.1: + resolution: {integrity: sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw==} engines: {node: '>= 12'} hasBin: true dev: false @@ -1975,32 +1871,24 @@ packages: engines: {node: '>= 0.8.0'} dev: false - /pretty-format/28.1.3: - resolution: {integrity: sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + /pretty-format/29.1.2: + resolution: {integrity: sha512-CGJ6VVGXVRP2o2Dorl4mAwwvDWT25luIsYhkyVQW32E4nL+TgW939J7LlKT/npq5Cpq6j3s+sy+13yk7xYpBmg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 28.1.3 - ansi-regex: 5.0.1 + '@jest/schemas': 29.0.0 ansi-styles: 5.2.0 react-is: 18.2.0 dev: true - /proto3-json-serializer/0.1.9: - resolution: {integrity: sha512-A60IisqvnuI45qNRygJjrnNjX2TMdQGMY+57tR3nul3ZgO2zXkR9OGR8AXxJhkqx84g0FTnrfi3D5fWMSdANdQ==} - dependencies: - protobufjs: 6.11.3 - dev: false - optional: true - - /proto3-json-serializer/1.0.3: - resolution: {integrity: sha512-4Xo7uzbTfc8ur9R8VgI0pJpI6aHix76cc7DHJEfZKrZ6vOUbOddxBrsMzAGG2s6b3iHknl4Gn50dA2Y3AoCdow==} + /proto3-json-serializer/1.1.0: + resolution: {integrity: sha512-SjXwUWe/vANGs/mJJTbw5++7U67nwsymg7qsoPtw6GiXqw3kUy8ByojrlEdVE2efxAdKreX8WkDafxvYW95ZQg==} engines: {node: '>=12.0.0'} dependencies: - protobufjs: 7.0.0 + protobufjs: 7.1.2 dev: false - /protobufjs-cli/1.0.0_protobufjs@7.0.0: - resolution: {integrity: sha512-7NZEBrFuuU2ZdzlhmAmvh8fdU7A4OFhzYX9AB7a5vXjopAeiks6ZgUSjOlOO7ItCDJQm3y9RWjk7spUbHc4X0w==} + /protobufjs-cli/1.0.2_protobufjs@7.1.2: + resolution: {integrity: sha512-cz9Pq9p/Zs7okc6avH20W7QuyjTclwJPgqXG11jNaulfS3nbVisID8rC+prfgq0gbZE0w9LBFd1OKFF03kgFzg==} engines: {node: '>=12.0.0'} hasBin: true peerDependencies: @@ -2008,40 +1896,19 @@ packages: dependencies: chalk: 4.1.2 escodegen: 1.14.3 - espree: 9.3.3 + espree: 9.4.0 estraverse: 5.3.0 glob: 8.0.3 jsdoc: 3.6.11 minimist: 1.2.6 - protobufjs: 7.0.0 - semver: 7.3.7 + protobufjs: 7.1.2 + semver: 7.3.8 tmp: 0.2.1 - uglify-js: 3.17.0 + uglify-js: 3.17.3 dev: false - /protobufjs/6.11.3: - resolution: {integrity: sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==} - hasBin: true - requiresBuild: true - dependencies: - '@protobufjs/aspromise': 1.1.2 - '@protobufjs/base64': 1.1.2 - '@protobufjs/codegen': 2.0.4 - '@protobufjs/eventemitter': 1.1.0 - '@protobufjs/fetch': 1.1.0 - '@protobufjs/float': 1.0.2 - '@protobufjs/inquire': 1.1.0 - '@protobufjs/path': 1.1.2 - '@protobufjs/pool': 1.1.0 - '@protobufjs/utf8': 1.1.0 - '@types/long': 4.0.2 - '@types/node': 18.7.13 - long: 4.0.0 - dev: false - optional: true - - /protobufjs/7.0.0: - resolution: {integrity: sha512-ffNIEm+quOcYtQvHdW406v1NQmZSuqVklxsXk076BtuFnlYZfigLU+JOMrTD8TUOyqHYbRI/fSVNvgd25YeN3w==} + /protobufjs/7.1.2: + resolution: {integrity: sha512-4ZPTPkXCdel3+L81yw3dG6+Kq3umdWKh7Dc7GW/CpNk4SX3hK58iPCWeCyhVTDrbkNeKrYNZ7EojM5WDaEWTLQ==} engines: {node: '>=12.0.0'} requiresBuild: true dependencies: @@ -2055,8 +1922,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/long': 4.0.2 - '@types/node': 18.7.13 + '@types/node': 18.8.3 long: 5.2.0 dev: false @@ -2165,19 +2031,8 @@ packages: lodash: 4.17.21 dev: false - /retry-request/4.2.2: - resolution: {integrity: sha512-xA93uxUD/rogV7BV59agW/JHPGXeREMWiZc9jhcwY4YdZ7QOtC7qbomYg0n4wyk2lJhggjvKvhNX8wln/Aldhg==} - engines: {node: '>=8.10.0'} - dependencies: - debug: 4.3.4 - extend: 3.0.2 - transitivePeerDependencies: - - supports-color - dev: false - optional: true - - /retry-request/5.0.1: - resolution: {integrity: sha512-lxFKrlBt0OZzCWh/V0uPEN0vlr3OhdeXnpeY5OES+ckslm791Cb1D5P7lJUSnY7J5hiCjcyaUGmzCnIGDCUBig==} + /retry-request/5.0.2: + resolution: {integrity: sha512-wfI3pk7EE80lCIXprqh7ym48IHYdwmAAzESdbU8Q9l7pnRCk9LEhpbOTNKjz6FARLm/Bl5m+4F0ABxOkYUujSQ==} engines: {node: '>=12'} dependencies: debug: 4.3.4 @@ -2211,8 +2066,8 @@ packages: hasBin: true dev: false - /semver/7.3.7: - resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==} + /semver/7.3.8: + resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} engines: {node: '>=10'} hasBin: true dependencies: @@ -2329,15 +2184,15 @@ packages: resolution: {integrity: sha512-y3JaeRSplks6NYQuCOj3ZFMO3j60rTwbuKCvZxsAraGYH2epusatvZ0baZYA01WsGqJBq/Dl6vOrMUJqyMj8kA==} dev: false - /teeny-request/8.0.0: - resolution: {integrity: sha512-6KEYxXI4lQPSDkXzXpPmJPNmo7oqduFFbhOEHf8sfsLbXyCsb+umUjBtMGAKhaSToD8JNCtQutTRefu29K64JA==} + /teeny-request/8.0.2: + resolution: {integrity: sha512-34pe0a4zASseXZCKdeTiIZqSKA8ETHb1EwItZr01PAR3CLPojeAKgSjzeNS4373gi59hNulyDrPKEbh2zO9sCg==} engines: {node: '>=12'} dependencies: http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 node-fetch: 2.6.7 stream-events: 1.0.5 - uuid: 8.3.2 + uuid: 9.0.0 transitivePeerDependencies: - encoding - supports-color @@ -2379,7 +2234,7 @@ packages: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: false - /ts-node/10.9.1_57uwcby55h6tzvkj3v5sfcgxoe: + /ts-node/10.9.1_xtdkmayvpbwqd3kc4kczaw2zvm: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -2398,14 +2253,14 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 - '@types/node': 18.7.13 + '@types/node': 18.8.3 acorn: 8.8.0 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.7.4 + typescript: 4.8.4 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -2436,8 +2291,8 @@ packages: engines: {node: '>=4'} dev: true - /typescript/4.7.4: - resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} + /typescript/4.8.4: + resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} engines: {node: '>=4.2.0'} hasBin: true dev: true @@ -2446,14 +2301,14 @@ packages: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: false - /uglify-js/3.17.0: - resolution: {integrity: sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg==} + /uglify-js/3.17.3: + resolution: {integrity: sha512-JmMFDME3iufZnBpyKL+uS78LRiC+mK55zWfM5f/pWBJfpOttXAqYfdDGRukYhJuyRinvPVAtUhvy7rlDybNtFg==} engines: {node: '>=0.8.0'} hasBin: true dev: false - /underscore/1.13.4: - resolution: {integrity: sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==} + /underscore/1.13.6: + resolution: {integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==} dev: false /uri-js/4.4.1: @@ -2477,6 +2332,11 @@ packages: hasBin: true dev: false + /uuid/9.0.0: + resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==} + hasBin: true + dev: false + /v8-compile-cache-lib/3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: true diff --git a/src/export.ts b/src/export.ts index 76386ba..b8e4dc0 100644 --- a/src/export.ts +++ b/src/export.ts @@ -6,7 +6,7 @@ import { getPath, IExportOptions, traverseObjects } from './helper' * Suggestion from jcummings2 and leningsv * @param {Array} collectionNameArray */ -export const getAllCollections = async ( +export const getAllCollectionsService = async ( collectionNameArray: string[], options?: IExportOptions ): Promise => { @@ -21,7 +21,7 @@ export const getAllCollections = async ( } // fetch in parallel - const promises: Promise[] = paths.map((path) => backup(path, options)) + const promises: Promise[] = paths.map((path) => backupService(path, options)) // assemble the pieces into one object const value = await Promise.all(promises) return Object.assign({}, ...value) @@ -34,7 +34,7 @@ export const getAllCollections = async ( * @param {string} documentName * @returns {Promise} */ -export const backupFromDoc = async ( +export const backupFromDocService = async ( collectionName: string, documentName: string, options?: IExportOptions @@ -82,7 +82,7 @@ export const backupFromDoc = async ( data[collectionName][doc.id]['subCollection'] = {} for (const subCol of subCollections) { - const subColData = await backup( + const subColData = await backupService( `${collectionName}/${documentName}/${subCol.id}`, options ) @@ -143,7 +143,7 @@ export const backUpDocRef = async ( if (subCollections.length > 0) { data['subCollection'] = {} for (const subCol of subCollections) { - const subColData = await backup( + const subColData = await backupService( `${collectionPath}/${doc.id}/${subCol.id}`, options ) @@ -165,7 +165,7 @@ export const backUpDocRef = async ( * @param {string} collectionName * @returns {Promise} */ -export const backup = async ( +export const backupService = async ( collectionName: string, options?: IExportOptions ): Promise => { diff --git a/src/import.ts b/src/import.ts index 0657095..5f7e631 100644 --- a/src/import.ts +++ b/src/import.ts @@ -1,5 +1,5 @@ import { getFirestore } from 'firebase-admin/firestore' -import * as fs from 'fs' +import fs from 'fs' import { v1 as uuidv1 } from 'uuid' import { makeTime, @@ -16,7 +16,7 @@ import { * @param {string} fileName * @param {IImportOptions} options */ -export const restore = ( +export const restoreService = ( fileName: string | Object, options: IImportOptions ): Promise<{ status: boolean; message: string }> => { @@ -75,9 +75,9 @@ const updateCollection = async ( dataObj: object, options: IImportOptions = {} ) => { - for (var index in dataObj) { - var collectionName = index - for (var doc in dataObj[index]) { + for (const index in dataObj) { + let collectionName = index + for (const doc in dataObj[index]) { if (dataObj[index].hasOwnProperty(doc)) { // assign document id for array type let docId = Array.isArray(dataObj[index]) ? uuidv1() : doc @@ -93,7 +93,7 @@ const updateCollection = async ( options ) } catch (error) { - console.log + console.error(error) } if (subCollections) { @@ -171,12 +171,12 @@ const startUpdating = ( } // reference key - if (options.refs && options.refs.length > 0) { + if (options.refs?.length) { options.refs.forEach((ref) => { if (data.hasOwnProperty(ref)) { // check type of the reference if (Array.isArray(data[ref])) { - data[ref] = data[ref].map((ref) => db.doc(ref)) + data[ref] = data[ref].map((dataRef) => db.doc(dataRef)) } else { data[ref] = db.doc(data[ref]) } @@ -205,11 +205,12 @@ const startUpdating = ( ) { // If we have array at seconds transform them in refs prev[curr] = prev[curr].map((e) => db.doc(e)) - } else if (ref.split('.').length === index + 1) { + } else if (ref.split('.').length === index + 1 && prev[curr]) { // Transform in ref if we are at last ref return (prev[curr] = db.doc(prev[curr])) } else { - return (prev[curr] = prev[curr]) + // If pre[curr] is undefined, set it to null + return (prev[curr] = prev[curr] || null) } } }, data) diff --git a/src/index.ts b/src/index.ts index ffcde2a..54d4b6b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,8 @@ import { cert, getApps, initializeApp } from 'firebase-admin/app'; import {getFirestore} from 'firebase-admin/firestore' -import * as restoreService from './import' -import * as backupService from './export' +import { backupFromDocService, getAllCollectionsService, backupService } from './export'; import { IExportOptions, IImportOptions } from './helper' +import { restoreService } from './import'; interface IInitializeAppOptions { firestore?: FirebaseFirestore.Settings @@ -44,8 +44,8 @@ export const initializeFirebaseApp = ( * @param {IExportOptions} options * @return {json} */ -export const backup = (collectionName: string, options?: IExportOptions) => { - return backupService.backup(collectionName, options) +export const backup = (collectionName: string, options?: IExportOptions) => { + return backupService(collectionName, options) } /** @@ -56,8 +56,8 @@ export const backup = (collectionName: string, options?: IExportOptions) => { * @param {IExportOptions} options * @return {json} */ -export const backupFromDoc = (collectionName: string, documentName: string, options?: IExportOptions) => { - return backupService.backupFromDoc(collectionName, documentName, options) +export const backupFromDoc = (collectionName: string, documentName: string, options?: IExportOptions) => { + return backupFromDocService(collectionName, documentName, options) } /** @@ -69,7 +69,7 @@ export const restore = ( fileName: string | Object, options: IImportOptions = {} ) => { - return restoreService.restore(fileName, options) + return restoreService(fileName, options) } /** @@ -77,9 +77,9 @@ export const restore = ( * @param {Array} collectionNameArray * @param {IExportOptions} options */ -export const backups = ( +export const backups = ( collectionNameArray: Array = [], options?: IExportOptions ) => { - return backupService.getAllCollections(collectionNameArray, options) + return getAllCollectionsService(collectionNameArray, options) } diff --git a/test/firestore.spec.ts b/test/firestore.spec.ts index cd57fe6..52e37df 100644 --- a/test/firestore.spec.ts +++ b/test/firestore.spec.ts @@ -1,9 +1,9 @@ import { expect } from 'chai' +import { GeoPoint } from 'firebase-admin/firestore' import request from 'request-promise' -import { parseAndConvertDates, parseAndConvertGeos } from '../src/helper' -import { serviceAccount } from './serviceAccount' import { backup, backupFromDoc, backups, initializeFirebaseApp, restore } from '../dist' -import { firestore } from 'firebase-admin' +import { parseAndConvertDates, parseAndConvertGeos } from '../dist/helper' +import { serviceAccount } from './serviceAccount' const app = initializeFirebaseApp(serviceAccount) const backupAPI = @@ -253,7 +253,7 @@ describe('initializeApp function test', () => { }, } parseAndConvertGeos(data) - expect(data.location).to.be.an.instanceOf(firestore.GeoPoint) + expect(data.location).to.be.an.instanceOf(GeoPoint) }) it('Test auto parse geos option - nested', async () => { @@ -272,8 +272,8 @@ describe('initializeApp function test', () => { }, } parseAndConvertGeos(data) - expect(data.location).to.be.an.instanceOf(firestore.GeoPoint) - expect(data.obj.anotherObj.location).to.be.an.instanceOf(firestore.GeoPoint) + expect(data.location).to.be.an.instanceOf(GeoPoint) + expect(data.obj.anotherObj.location).to.be.an.instanceOf(GeoPoint) }) it('Test auto parse geos option - nested arrays', async () => { @@ -286,7 +286,7 @@ describe('initializeApp function test', () => { ], } parseAndConvertGeos(data) - expect(data.arr[0]).to.be.an.instanceOf(firestore.GeoPoint) + expect(data.arr[0]).to.be.an.instanceOf(GeoPoint) }) it('Test auto parse geos option - nested array objects', async () => { @@ -311,7 +311,7 @@ describe('initializeApp function test', () => { ], } parseAndConvertGeos(data) - expect(data.arr[0].obj.location).to.be.an.instanceOf(firestore.GeoPoint) - expect(data.arr[1].obj.location).to.be.an.instanceOf(firestore.GeoPoint) + expect(data.arr[0].obj.location).to.be.an.instanceOf(GeoPoint) + expect(data.arr[1].obj.location).to.be.an.instanceOf(GeoPoint) }) }) diff --git a/test/serviceAccount.ts b/test/serviceAccount.ts index dadadab..16100ba 100644 --- a/test/serviceAccount.ts +++ b/test/serviceAccount.ts @@ -1,11 +1,12 @@ -const serviceAccountJson = process.env.TYPE === undefined ? require('./serviceAccountKey.json') : {}; +import localServiceAccount from './serviceAccountKey.json' +const serviceAccountJson = process.env.TYPE === undefined ? localServiceAccount : {}; // Windows doesn't recognize source command for setting environment export const serviceAccount = process.env.TYPE === undefined ? serviceAccountJson : { "type": process.env.TYPE, "projectId": process.env.PROJECT_ID, "privateKeyId": process.env.PRIVATE_KEY_ID, - "privateKey": process.env.PRIVATE_KEY.replace(/\\n/g, '\n'), + "privateKey": process.env.PRIVATE_KEY?.replace(/\\n/g, '\n'), "clientEmail": process.env.CLIENT_EMAIL, "clientId": process.env.CLIENT_ID, "authURI": process.env.AUTH_URI, diff --git a/tsconfig.json b/tsconfig.json index b6970b7..79b27dd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,15 @@ { "compilerOptions": { "lib": ["es2020"], - "module": "commonjs", + "module": "ESNext", "noImplicitReturns": true, "esModuleInterop": true, "outDir": "dist", "sourceMap": true, "target": "es5", "declaration": true, + "moduleResolution": "node", + "resolveJsonModule": true, "types": [ "mocha", "node" ]