From d5071738c36c02813987ab9d9bb3f34c033530a6 Mon Sep 17 00:00:00 2001 From: "Chakhsu.Lau" Date: Thu, 7 Dec 2023 18:38:55 +0800 Subject: [PATCH] chore: adjust code style --- .prettierrc | 2 +- pnpm-lock.yaml | 875 ++++++------------------------ src/index.ts | 193 ++----- src/proxy/clientProxy.ts | 146 +---- src/proxy/serverProxy.ts | 116 +--- src/util/compose.ts | 14 +- src/util/iterator.ts | 21 +- src/util/prefixingDefinition.ts | 6 +- test/client.js | 6 +- test/index.test.js | 40 +- test/server.js | 4 +- test/stream/client-v2.js | 11 +- test/stream/client.js | 15 +- types/index.d.ts | 31 +- types/index.js | 206 ++----- types/proxy/clientProxy.d.ts | 6 +- types/proxy/clientProxy.js | 82 +-- types/proxy/serverProxy.d.ts | 11 +- types/proxy/serverProxy.js | 84 +-- types/util/compose.d.ts | 9 +- types/util/compose.js | 9 +- types/util/iterator.js | 17 +- types/util/prefixingDefinition.js | 6 +- 23 files changed, 378 insertions(+), 1532 deletions(-) diff --git a/.prettierrc b/.prettierrc index d1df35f..a037757 100644 --- a/.prettierrc +++ b/.prettierrc @@ -7,7 +7,7 @@ "htmlWhitespaceSensitivity": "css", "insertPragma": false, "jsxSingleQuote": true, - "printWidth": 80, + "printWidth": 200, "proseWrap": "preserve", "quoteProps": "as-needed", "requirePragma": false, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 495b1b7..092f0e3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,10 +58,7 @@ devDependencies: packages: /@grpc/grpc-js@1.9.12: - resolution: - { - integrity: sha512-Um5MBuge32TS3lAKX02PGCnFM4xPT996yLgZNb5H03pn6NyJ4Iwn5YcPq6Jj9yxGRk7WOgaZFtVRH5iTdYBeUg== - } + resolution: { integrity: sha512-Um5MBuge32TS3lAKX02PGCnFM4xPT996yLgZNb5H03pn6NyJ4Iwn5YcPq6Jj9yxGRk7WOgaZFtVRH5iTdYBeUg== } engines: { node: ^8.13.0 || >=10.10.0 } dependencies: '@grpc/proto-loader': 0.7.10 @@ -69,10 +66,7 @@ packages: dev: false /@grpc/proto-loader@0.7.10: - resolution: - { - integrity: sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ== - } + resolution: { integrity: sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ== } engines: { node: '>=6' } hasBin: true dependencies: @@ -83,194 +77,119 @@ packages: dev: false /@hapi/hoek@9.3.0: - resolution: - { - integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== - } + resolution: { integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== } dev: false /@hapi/topo@5.1.0: - resolution: - { - integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== - } + resolution: { integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== } dependencies: '@hapi/hoek': 9.3.0 dev: false /@protobufjs/aspromise@1.1.2: - resolution: - { - integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== - } + resolution: { integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== } dev: false /@protobufjs/base64@1.1.2: - resolution: - { - integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== - } + resolution: { integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== } dev: false /@protobufjs/codegen@2.0.4: - resolution: - { - integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== - } + resolution: { integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== } dev: false /@protobufjs/eventemitter@1.1.0: - resolution: - { - integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== - } + resolution: { integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== } dev: false /@protobufjs/fetch@1.1.0: - resolution: - { - integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== - } + resolution: { integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== } dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/inquire': 1.1.0 dev: false /@protobufjs/float@1.0.2: - resolution: - { - integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== - } + resolution: { integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== } dev: false /@protobufjs/inquire@1.1.0: - resolution: - { - integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== - } + resolution: { integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== } dev: false /@protobufjs/path@1.1.2: - resolution: - { - integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== - } + resolution: { integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== } dev: false /@protobufjs/pool@1.1.0: - resolution: - { - integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== - } + resolution: { integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== } dev: false /@protobufjs/utf8@1.1.0: - resolution: - { - integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== - } + resolution: { integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== } dev: false /@sideway/address@4.1.4: - resolution: - { - integrity: sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== - } + resolution: { integrity: sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== } dependencies: '@hapi/hoek': 9.3.0 dev: false /@sideway/formula@3.0.1: - resolution: - { - integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== - } + resolution: { integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== } dev: false /@sideway/pinpoint@2.0.0: - resolution: - { - integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== - } + resolution: { integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== } dev: false /@tsconfig/node14@14.1.0: - resolution: - { - integrity: sha512-VmsCG04YR58ciHBeJKBDNMWWfYbyP8FekWVuTlpstaUPlat1D0x/tXzkWP7yCMU0eSz9V4OZU0LBWTFJ3xZf6w== - } + resolution: { integrity: sha512-VmsCG04YR58ciHBeJKBDNMWWfYbyP8FekWVuTlpstaUPlat1D0x/tXzkWP7yCMU0eSz9V4OZU0LBWTFJ3xZf6w== } dev: true /@types/lodash@4.14.202: - resolution: - { - integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ== - } + resolution: { integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ== } dev: true /@types/node@20.10.2: - resolution: - { - integrity: sha512-37MXfxkb0vuIlRKHNxwCkb60PNBpR94u4efQuN4JgIAm66zfCDXGSAFCef9XUWFovX2R1ok6Z7MHhtdVXXkkIw== - } + resolution: { integrity: sha512-37MXfxkb0vuIlRKHNxwCkb60PNBpR94u4efQuN4JgIAm66zfCDXGSAFCef9XUWFovX2R1ok6Z7MHhtdVXXkkIw== } dependencies: undici-types: 5.26.5 /ansi-colors@4.1.1: - resolution: - { - integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - } + resolution: { integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== } engines: { node: '>=6' } dev: true /ansi-escapes@5.0.0: - resolution: - { - integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA== - } + resolution: { integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA== } engines: { node: '>=12' } dependencies: type-fest: 1.4.0 dev: true /ansi-regex@5.0.1: - resolution: - { - integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - } + resolution: { integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== } engines: { node: '>=8' } /ansi-regex@6.0.1: - resolution: - { - integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== - } + resolution: { integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== } engines: { node: '>=12' } dev: true /ansi-styles@4.3.0: - resolution: - { - integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - } + resolution: { integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== } engines: { node: '>=8' } dependencies: color-convert: 2.0.1 /ansi-styles@6.2.1: - resolution: - { - integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== - } + resolution: { integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== } engines: { node: '>=12' } dev: true /anymatch@3.1.3: - resolution: - { - integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - } + resolution: { integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== } engines: { node: '>= 8' } dependencies: normalize-path: 3.0.0 @@ -278,90 +197,57 @@ packages: dev: true /argparse@2.0.1: - resolution: - { - integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - } + resolution: { integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== } dev: true /assertion-error@1.1.0: - resolution: - { - integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - } + resolution: { integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== } dev: true /balanced-match@1.0.2: - resolution: - { - integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - } + resolution: { integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== } dev: true /binary-extensions@2.2.0: - resolution: - { - integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - } + resolution: { integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== } engines: { node: '>=8' } dev: true /brace-expansion@1.1.11: - resolution: - { - integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - } + resolution: { integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== } dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 dev: true /brace-expansion@2.0.1: - resolution: - { - integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - } + resolution: { integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== } dependencies: balanced-match: 1.0.2 dev: true /braces@3.0.2: - resolution: - { - integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - } + resolution: { integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== } engines: { node: '>=8' } dependencies: fill-range: 7.0.1 dev: true /browser-stdout@1.3.1: - resolution: - { - integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - } + resolution: { integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== } dev: true /buffer-from@1.1.2: - resolution: - { - integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - } + resolution: { integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== } dev: true /camelcase@6.3.0: - resolution: - { - integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - } + resolution: { integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== } engines: { node: '>=10' } dev: true /chai@4.3.10: - resolution: - { - integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g== - } + resolution: { integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g== } engines: { node: '>=4' } dependencies: assertion-error: 1.1.0 @@ -374,10 +260,7 @@ packages: dev: true /chalk@4.1.2: - resolution: - { - integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - } + resolution: { integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== } engines: { node: '>=10' } dependencies: ansi-styles: 4.3.0 @@ -385,27 +268,18 @@ packages: dev: true /chalk@5.3.0: - resolution: - { - integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== - } + resolution: { integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== } engines: { node: ^12.17.0 || ^14.13 || >=16.0.0 } dev: true /check-error@1.0.3: - resolution: - { - integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== - } + resolution: { integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== } dependencies: get-func-name: 2.0.2 dev: true /chokidar@3.5.3: - resolution: - { - integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - } + resolution: { integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== } engines: { node: '>= 8.10.0' } dependencies: anymatch: 3.1.3 @@ -420,20 +294,14 @@ packages: dev: true /cli-cursor@4.0.0: - resolution: - { - integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== - } + resolution: { integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== } engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } dependencies: restore-cursor: 4.0.0 dev: true /cli-truncate@3.1.0: - resolution: - { - integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA== - } + resolution: { integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA== } engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } dependencies: slice-ansi: 5.0.0 @@ -441,10 +309,7 @@ packages: dev: true /cliui@7.0.4: - resolution: - { - integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - } + resolution: { integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== } dependencies: string-width: 4.2.3 strip-ansi: 6.0.1 @@ -452,10 +317,7 @@ packages: dev: true /cliui@8.0.1: - resolution: - { - integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - } + resolution: { integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== } engines: { node: '>=12' } dependencies: string-width: 4.2.3 @@ -464,47 +326,29 @@ packages: dev: false /color-convert@2.0.1: - resolution: - { - integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - } + resolution: { integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== } engines: { node: '>=7.0.0' } dependencies: color-name: 1.1.4 /color-name@1.1.4: - resolution: - { - integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - } + resolution: { integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== } /colorette@2.0.20: - resolution: - { - integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== - } + resolution: { integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== } dev: true /commander@11.1.0: - resolution: - { - integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ== - } + resolution: { integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ== } engines: { node: '>=16' } dev: true /concat-map@0.0.1: - resolution: - { - integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - } + resolution: { integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== } dev: true /concat-stream@2.0.0: - resolution: - { - integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A== - } + resolution: { integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A== } engines: { '0': node >= 6.0 } dependencies: buffer-from: 1.1.2 @@ -514,10 +358,7 @@ packages: dev: true /cross-spawn@7.0.3: - resolution: - { - integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - } + resolution: { integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== } engines: { node: '>= 8' } dependencies: path-key: 3.1.1 @@ -526,10 +367,7 @@ packages: dev: true /debug@4.3.4(supports-color@8.1.1): - resolution: - { - integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - } + resolution: { integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== } engines: { node: '>=6.0' } peerDependencies: supports-color: '*' @@ -541,78 +379,48 @@ packages: supports-color: 8.1.1 /decamelize@4.0.0: - resolution: - { - integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - } + resolution: { integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== } engines: { node: '>=10' } dev: true /deep-eql@4.1.3: - resolution: - { - integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== - } + resolution: { integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== } engines: { node: '>=6' } dependencies: type-detect: 4.0.8 dev: true /diff@5.0.0: - resolution: - { - integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - } + resolution: { integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== } engines: { node: '>=0.3.1' } dev: true /eastasianwidth@0.2.0: - resolution: - { - integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== - } + resolution: { integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== } dev: true /emoji-regex@8.0.0: - resolution: - { - integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - } + resolution: { integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== } /emoji-regex@9.2.2: - resolution: - { - integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== - } + resolution: { integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== } dev: true /escalade@3.1.1: - resolution: - { - integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - } + resolution: { integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== } engines: { node: '>=6' } /escape-string-regexp@4.0.0: - resolution: - { - integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - } + resolution: { integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== } engines: { node: '>=10' } dev: true /eventemitter3@5.0.1: - resolution: - { - integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== - } + resolution: { integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== } dev: true /execa@8.0.1: - resolution: - { - integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== - } + resolution: { integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== } engines: { node: '>=16.17' } dependencies: cross-spawn: 7.0.3 @@ -627,20 +435,14 @@ packages: dev: true /fill-range@7.0.1: - resolution: - { - integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - } + resolution: { integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== } engines: { node: '>=8' } dependencies: to-regex-range: 5.0.1 dev: true /find-up@5.0.0: - resolution: - { - integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - } + resolution: { integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== } engines: { node: '>=10' } dependencies: locate-path: 6.0.0 @@ -648,25 +450,16 @@ packages: dev: true /flat@5.0.2: - resolution: - { - integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - } + resolution: { integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== } hasBin: true dev: true /fs.realpath@1.0.0: - resolution: - { - integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - } + resolution: { integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== } dev: true /fsevents@2.3.3: - resolution: - { - integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - } + resolution: { integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== } engines: { node: ^8.16.0 || ^10.6.0 || >=11.0.0 } os: [darwin] requiresBuild: true @@ -674,42 +467,27 @@ packages: optional: true /get-caller-file@2.0.5: - resolution: - { - integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - } + resolution: { integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== } engines: { node: 6.* || 8.* || >= 10.* } /get-func-name@2.0.2: - resolution: - { - integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== - } + resolution: { integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== } dev: true /get-stream@8.0.1: - resolution: - { - integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== - } + resolution: { integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== } engines: { node: '>=16' } dev: true /glob-parent@5.1.2: - resolution: - { - integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - } + resolution: { integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== } engines: { node: '>= 6' } dependencies: is-glob: 4.0.3 dev: true /glob@7.2.0: - resolution: - { - integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== - } + resolution: { integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== } dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -720,141 +498,90 @@ packages: dev: true /has-flag@4.0.0: - resolution: - { - integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - } + resolution: { integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== } engines: { node: '>=8' } /he@1.2.0: - resolution: - { - integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - } + resolution: { integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== } hasBin: true dev: true /human-signals@5.0.0: - resolution: - { - integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== - } + resolution: { integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== } engines: { node: '>=16.17.0' } dev: true /husky@8.0.3: - resolution: - { - integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== - } + resolution: { integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== } engines: { node: '>=14' } hasBin: true dev: true /inflight@1.0.6: - resolution: - { - integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - } + resolution: { integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== } dependencies: once: 1.4.0 wrappy: 1.0.2 dev: true /inherits@2.0.4: - resolution: - { - integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - } + resolution: { integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== } dev: true /is-binary-path@2.1.0: - resolution: - { - integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - } + resolution: { integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== } engines: { node: '>=8' } dependencies: binary-extensions: 2.2.0 dev: true /is-extglob@2.1.1: - resolution: - { - integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - } + resolution: { integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== } engines: { node: '>=0.10.0' } dev: true /is-fullwidth-code-point@3.0.0: - resolution: - { - integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - } + resolution: { integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== } engines: { node: '>=8' } /is-fullwidth-code-point@4.0.0: - resolution: - { - integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== - } + resolution: { integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== } engines: { node: '>=12' } dev: true /is-glob@4.0.3: - resolution: - { - integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - } + resolution: { integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== } engines: { node: '>=0.10.0' } dependencies: is-extglob: 2.1.1 dev: true /is-number@7.0.0: - resolution: - { - integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - } + resolution: { integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== } engines: { node: '>=0.12.0' } dev: true /is-plain-obj@2.1.0: - resolution: - { - integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - } + resolution: { integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== } engines: { node: '>=8' } dev: true /is-stream@3.0.0: - resolution: - { - integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== - } + resolution: { integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== } engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } dev: true /is-unicode-supported@0.1.0: - resolution: - { - integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - } + resolution: { integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== } engines: { node: '>=10' } dev: true /isexe@2.0.0: - resolution: - { - integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - } + resolution: { integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== } dev: true /joi@17.11.0: - resolution: - { - integrity: sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ== - } + resolution: { integrity: sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ== } dependencies: '@hapi/hoek': 9.3.0 '@hapi/topo': 5.1.0 @@ -864,28 +591,19 @@ packages: dev: false /js-yaml@4.1.0: - resolution: - { - integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - } + resolution: { integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== } hasBin: true dependencies: argparse: 2.0.1 dev: true /lilconfig@2.1.0: - resolution: - { - integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== - } + resolution: { integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== } engines: { node: '>=10' } dev: true /lint-staged@15.1.0: - resolution: - { - integrity: sha512-ZPKXWHVlL7uwVpy8OZ7YQjYDAuO5X4kMh0XgZvPNxLcCCngd0PO5jKQyy3+s4TL2EnHoIXIzP1422f/l3nZKMw== - } + resolution: { integrity: sha512-ZPKXWHVlL7uwVpy8OZ7YQjYDAuO5X4kMh0XgZvPNxLcCCngd0PO5jKQyy3+s4TL2EnHoIXIzP1422f/l3nZKMw== } engines: { node: '>=18.12.0' } hasBin: true dependencies: @@ -904,10 +622,7 @@ packages: dev: true /listr2@7.0.2: - resolution: - { - integrity: sha512-rJysbR9GKIalhTbVL2tYbF2hVyDnrf7pFUZBwjPaMIdadYHmeT+EVi/Bu3qd7ETQPahTotg2WRCatXwRBW554g== - } + resolution: { integrity: sha512-rJysbR9GKIalhTbVL2tYbF2hVyDnrf7pFUZBwjPaMIdadYHmeT+EVi/Bu3qd7ETQPahTotg2WRCatXwRBW554g== } engines: { node: '>=16.0.0' } dependencies: cli-truncate: 3.1.0 @@ -919,34 +634,22 @@ packages: dev: true /locate-path@6.0.0: - resolution: - { - integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - } + resolution: { integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== } engines: { node: '>=10' } dependencies: p-locate: 5.0.0 dev: true /lodash.camelcase@4.3.0: - resolution: - { - integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== - } + resolution: { integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== } dev: false /lodash@4.17.21: - resolution: - { - integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - } + resolution: { integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== } dev: false /log-symbols@4.1.0: - resolution: - { - integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - } + resolution: { integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== } engines: { node: '>=10' } dependencies: chalk: 4.1.2 @@ -954,10 +657,7 @@ packages: dev: true /log-update@5.0.1: - resolution: - { - integrity: sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw== - } + resolution: { integrity: sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw== } engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } dependencies: ansi-escapes: 5.0.0 @@ -968,33 +668,21 @@ packages: dev: true /long@5.2.3: - resolution: - { - integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== - } + resolution: { integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== } dev: false /loupe@2.3.7: - resolution: - { - integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== - } + resolution: { integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== } dependencies: get-func-name: 2.0.2 dev: true /merge-stream@2.0.0: - resolution: - { - integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - } + resolution: { integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== } dev: true /micromatch@4.0.5: - resolution: - { - integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - } + resolution: { integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== } engines: { node: '>=8.6' } dependencies: braces: 3.0.2 @@ -1002,52 +690,34 @@ packages: dev: true /mimic-fn@2.1.0: - resolution: - { - integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - } + resolution: { integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== } engines: { node: '>=6' } dev: true /mimic-fn@4.0.0: - resolution: - { - integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== - } + resolution: { integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== } engines: { node: '>=12' } dev: true /minimatch@3.1.2: - resolution: - { - integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - } + resolution: { integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== } dependencies: brace-expansion: 1.1.11 dev: true /minimatch@5.0.1: - resolution: - { - integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - } + resolution: { integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== } engines: { node: '>=10' } dependencies: brace-expansion: 2.0.1 dev: true /minimist@1.2.8: - resolution: - { - integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - } + resolution: { integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== } dev: true /mocha@10.2.0: - resolution: - { - integrity: sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== - } + resolution: { integrity: sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== } engines: { node: '>= 14.0.0' } hasBin: true dependencies: @@ -1075,164 +745,107 @@ packages: dev: true /ms@2.1.2: - resolution: - { - integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - } + resolution: { integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== } /ms@2.1.3: - resolution: - { - integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - } + resolution: { integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== } dev: true /nanoid@3.3.3: - resolution: - { - integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== - } + resolution: { integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== } engines: { node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 } hasBin: true dev: true /normalize-path@3.0.0: - resolution: - { - integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - } + resolution: { integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== } engines: { node: '>=0.10.0' } dev: true /npm-run-path@5.1.0: - resolution: - { - integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== - } + resolution: { integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== } engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } dependencies: path-key: 4.0.0 dev: true /once@1.4.0: - resolution: - { - integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - } + resolution: { integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== } dependencies: wrappy: 1.0.2 dev: true /onetime@5.1.2: - resolution: - { - integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - } + resolution: { integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== } engines: { node: '>=6' } dependencies: mimic-fn: 2.1.0 dev: true /onetime@6.0.0: - resolution: - { - integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== - } + resolution: { integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== } engines: { node: '>=12' } dependencies: mimic-fn: 4.0.0 dev: true /p-limit@3.1.0: - resolution: - { - integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - } + resolution: { integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== } engines: { node: '>=10' } dependencies: yocto-queue: 0.1.0 dev: true /p-locate@5.0.0: - resolution: - { - integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - } + resolution: { integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== } engines: { node: '>=10' } dependencies: p-limit: 3.1.0 dev: true /path-exists@4.0.0: - resolution: - { - integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - } + resolution: { integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== } engines: { node: '>=8' } dev: true /path-is-absolute@1.0.1: - resolution: - { - integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - } + resolution: { integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== } engines: { node: '>=0.10.0' } dev: true /path-key@3.1.1: - resolution: - { - integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - } + resolution: { integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== } engines: { node: '>=8' } dev: true /path-key@4.0.0: - resolution: - { - integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== - } + resolution: { integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== } engines: { node: '>=12' } dev: true /pathval@1.1.1: - resolution: - { - integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - } + resolution: { integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== } dev: true /picomatch@2.3.1: - resolution: - { - integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - } + resolution: { integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== } engines: { node: '>=8.6' } dev: true /pidtree@0.6.0: - resolution: - { - integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== - } + resolution: { integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== } engines: { node: '>=0.10' } hasBin: true dev: true /prettier@3.1.0: - resolution: - { - integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw== - } + resolution: { integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw== } engines: { node: '>=14' } hasBin: true dev: true /protobufjs@7.2.5: - resolution: - { - integrity: sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A== - } + resolution: { integrity: sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A== } engines: { node: '>=12.0.0' } requiresBuild: true dependencies: @@ -1251,19 +864,13 @@ packages: dev: false /randombytes@2.1.0: - resolution: - { - integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - } + resolution: { integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== } dependencies: safe-buffer: 5.2.1 dev: true /readable-stream@3.6.2: - resolution: - { - integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - } + resolution: { integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== } engines: { node: '>= 6' } dependencies: inherits: 2.0.4 @@ -1272,27 +879,18 @@ packages: dev: true /readdirp@3.6.0: - resolution: - { - integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - } + resolution: { integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== } engines: { node: '>=8.10.0' } dependencies: picomatch: 2.3.1 dev: true /require-directory@2.1.1: - resolution: - { - integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - } + resolution: { integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== } engines: { node: '>=0.10.0' } /restore-cursor@4.0.0: - resolution: - { - integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== - } + resolution: { integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== } engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } dependencies: onetime: 5.1.2 @@ -1300,66 +898,42 @@ packages: dev: true /rfdc@1.3.0: - resolution: - { - integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== - } + resolution: { integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== } dev: true /safe-buffer@5.2.1: - resolution: - { - integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - } + resolution: { integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== } dev: true /serialize-javascript@6.0.0: - resolution: - { - integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - } + resolution: { integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== } dependencies: randombytes: 2.1.0 dev: true /shebang-command@2.0.0: - resolution: - { - integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - } + resolution: { integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== } engines: { node: '>=8' } dependencies: shebang-regex: 3.0.0 dev: true /shebang-regex@3.0.0: - resolution: - { - integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - } + resolution: { integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== } engines: { node: '>=8' } dev: true /signal-exit@3.0.7: - resolution: - { - integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - } + resolution: { integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== } dev: true /signal-exit@4.1.0: - resolution: - { - integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== - } + resolution: { integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== } engines: { node: '>=14' } dev: true /slice-ansi@5.0.0: - resolution: - { - integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== - } + resolution: { integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== } engines: { node: '>=12' } dependencies: ansi-styles: 6.2.1 @@ -1367,10 +941,7 @@ packages: dev: true /snazzy@9.0.0: - resolution: - { - integrity: sha512-8QZmJb11OiYaUP90Nnjqcj/LEpO8CLgChnP87Wqjv5tNB4djwHaz27VO2usSRR0NmViapeGW04p0aWAMhxxLXg== - } + resolution: { integrity: sha512-8QZmJb11OiYaUP90Nnjqcj/LEpO8CLgChnP87Wqjv5tNB4djwHaz27VO2usSRR0NmViapeGW04p0aWAMhxxLXg== } hasBin: true dependencies: chalk: 4.1.2 @@ -1383,28 +954,19 @@ packages: dev: true /standard-json@1.1.0: - resolution: - { - integrity: sha512-nkonX+n5g3pyVBvJZmvRlFtT/7JyLbNh4CtrYC3Qfxihgs8PKX52f6ONKQXORStuBWJ5PI83EUrNXme7LKfiTQ== - } + resolution: { integrity: sha512-nkonX+n5g3pyVBvJZmvRlFtT/7JyLbNh4CtrYC3Qfxihgs8PKX52f6ONKQXORStuBWJ5PI83EUrNXme7LKfiTQ== } hasBin: true dependencies: concat-stream: 2.0.0 dev: true /string-argv@0.3.2: - resolution: - { - integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== - } + resolution: { integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== } engines: { node: '>=0.6.19' } dev: true /string-width@4.2.3: - resolution: - { - integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - } + resolution: { integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== } engines: { node: '>=8' } dependencies: emoji-regex: 8.0.0 @@ -1412,10 +974,7 @@ packages: strip-ansi: 6.0.1 /string-width@5.1.2: - resolution: - { - integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== - } + resolution: { integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== } engines: { node: '>=12' } dependencies: eastasianwidth: 0.2.0 @@ -1424,135 +983,87 @@ packages: dev: true /string_decoder@1.3.0: - resolution: - { - integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - } + resolution: { integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== } dependencies: safe-buffer: 5.2.1 dev: true /strip-ansi@6.0.1: - resolution: - { - integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - } + resolution: { integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== } engines: { node: '>=8' } dependencies: ansi-regex: 5.0.1 /strip-ansi@7.1.0: - resolution: - { - integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== - } + resolution: { integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== } engines: { node: '>=12' } dependencies: ansi-regex: 6.0.1 dev: true /strip-final-newline@3.0.0: - resolution: - { - integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== - } + resolution: { integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== } engines: { node: '>=12' } dev: true /strip-json-comments@3.1.1: - resolution: - { - integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - } + resolution: { integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== } engines: { node: '>=8' } dev: true /supports-color@7.2.0: - resolution: - { - integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - } + resolution: { integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== } engines: { node: '>=8' } dependencies: has-flag: 4.0.0 dev: true /supports-color@8.1.1: - resolution: - { - integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - } + resolution: { integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== } engines: { node: '>=10' } dependencies: has-flag: 4.0.0 /text-table@0.2.0: - resolution: - { - integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - } + resolution: { integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== } dev: true /to-regex-range@5.0.1: - resolution: - { - integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - } + resolution: { integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== } engines: { node: '>=8.0' } dependencies: is-number: 7.0.0 dev: true /type-detect@4.0.8: - resolution: - { - integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - } + resolution: { integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== } engines: { node: '>=4' } dev: true /type-fest@1.4.0: - resolution: - { - integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== - } + resolution: { integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== } engines: { node: '>=10' } dev: true /typedarray@0.0.6: - resolution: - { - integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== - } + resolution: { integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== } dev: true /typescript@5.3.2: - resolution: - { - integrity: sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ== - } + resolution: { integrity: sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ== } engines: { node: '>=14.17' } hasBin: true dev: true /undici-types@5.26.5: - resolution: - { - integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== - } + resolution: { integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== } /util-deprecate@1.0.2: - resolution: - { - integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - } + resolution: { integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== } dev: true /which@2.0.2: - resolution: - { - integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - } + resolution: { integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== } engines: { node: '>= 8' } hasBin: true dependencies: @@ -1560,17 +1071,11 @@ packages: dev: true /workerpool@6.2.1: - resolution: - { - integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== - } + resolution: { integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== } dev: true /wrap-ansi@7.0.0: - resolution: - { - integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - } + resolution: { integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== } engines: { node: '>=10' } dependencies: ansi-styles: 4.3.0 @@ -1578,10 +1083,7 @@ packages: strip-ansi: 6.0.1 /wrap-ansi@8.1.0: - resolution: - { - integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== - } + resolution: { integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== } engines: { node: '>=12' } dependencies: ansi-styles: 6.2.1 @@ -1590,48 +1092,30 @@ packages: dev: true /wrappy@1.0.2: - resolution: - { - integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - } + resolution: { integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== } dev: true /y18n@5.0.8: - resolution: - { - integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - } + resolution: { integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== } engines: { node: '>=10' } /yaml@2.3.4: - resolution: - { - integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA== - } + resolution: { integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA== } engines: { node: '>= 14' } dev: true /yargs-parser@20.2.4: - resolution: - { - integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - } + resolution: { integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== } engines: { node: '>=10' } dev: true /yargs-parser@21.1.1: - resolution: - { - integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - } + resolution: { integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== } engines: { node: '>=12' } dev: false /yargs-unparser@2.0.0: - resolution: - { - integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - } + resolution: { integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== } engines: { node: '>=10' } dependencies: camelcase: 6.3.0 @@ -1641,10 +1125,7 @@ packages: dev: true /yargs@16.2.0: - resolution: - { - integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - } + resolution: { integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== } engines: { node: '>=10' } dependencies: cliui: 7.0.4 @@ -1657,10 +1138,7 @@ packages: dev: true /yargs@17.7.2: - resolution: - { - integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - } + resolution: { integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== } engines: { node: '>=12' } dependencies: cliui: 8.0.1 @@ -1673,9 +1151,6 @@ packages: dev: false /yocto-queue@0.1.0: - resolution: - { - integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - } + resolution: { integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== } engines: { node: '>=10' } dev: true diff --git a/src/index.ts b/src/index.ts index f7002e4..0b87924 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,32 +27,15 @@ class GrpcLoader { private _initDefaultClient?: boolean constructor(protoFileOptions: any) { - Joi.assert( - protoFileOptions, - loaderSchemas.constructor, - 'new GrpcLoader() params Error' - ) - - this._protoFiles = Array.isArray(protoFileOptions) - ? protoFileOptions - : [protoFileOptions] + Joi.assert(protoFileOptions, loaderSchemas.constructor, 'new GrpcLoader() params Error') + + this._protoFiles = Array.isArray(protoFileOptions) ? protoFileOptions : [protoFileOptions] this._clientMap = new Map() this._clientAddrMap = new Map() } - async init({ - services = undefined, - isDev = false, - packagePrefix = '', - loadOptions = {}, - channelOptions = {}, - appName - }: any = {}) { - Joi.assert( - { services, loadOptions, isDev, channelOptions, appName }, - loaderSchemas.init, - 'GrpcLoader.init() params Error' - ) + async init({ services = undefined, isDev = false, packagePrefix = '', loadOptions = {}, channelOptions = {}, appName }: any = {}) { + Joi.assert({ services, loadOptions, isDev, channelOptions, appName }, loaderSchemas.init, 'GrpcLoader.init() params Error') if (this._types) { return @@ -64,9 +47,7 @@ class GrpcLoader { this._packagePrefix = packagePrefix this._appName = appName - loadOptions.includeDirs = this._protoFiles - .map((p) => p.location) - .concat(loadOptions.includeDirs || []) + loadOptions.includeDirs = this._protoFiles.map((p) => p.location).concat(loadOptions.includeDirs || []) const files = this._protoFiles.reduce((result, p) => { if (p.files && p.files.length > 0) { result.push(...p.files) @@ -77,10 +58,7 @@ class GrpcLoader { const packageDefinition = await protoLoader.load(files, loadOptions) if (this._packagePrefix) { - this._packageDefinition = prefixingDefinition( - packageDefinition, - packagePrefix - ) + this._packageDefinition = prefixingDefinition(packageDefinition, packagePrefix) } else { this._packageDefinition = packageDefinition } @@ -95,16 +73,8 @@ class GrpcLoader { } } - async initClients({ - services, - channelOptions = {}, - credentials = undefined - }: any) { - Joi.assert( - { services, channelOptions }, - loaderSchemas.initClients, - 'GrpcLoader.initClients() Options Error' - ) + async initClients({ services, channelOptions = {}, credentials = undefined }: any) { + Joi.assert({ services, channelOptions }, loaderSchemas.initClients, 'GrpcLoader.initClients() Options Error') if (this._initDefaultClient) { return @@ -117,9 +87,7 @@ class GrpcLoader { const serviceNames = Object.keys(services) serviceNames.forEach((name) => { const isDefaultClient = true - const addr = _.isString(services[name]) - ? services[name] - : services[name].host + ':' + services[name].port + const addr = _.isString(services[name]) ? services[name] : services[name].host + ':' + services[name].port this._makeClient(isDefaultClient, name, addr, credentials, channelOptions) }) @@ -137,19 +105,9 @@ class GrpcLoader { this._initDefaultClient = false } - makeCredentials( - rootCerts?: any, - privateKey?: any, - certChain?: any, - verifyOptions?: any - ) { + makeCredentials(rootCerts?: any, privateKey?: any, certChain?: any, verifyOptions?: any) { if (rootCerts && privateKey && certChain) { - return grpc.credentials.createSsl( - rootCerts, - privateKey, - certChain, - verifyOptions - ) + return grpc.credentials.createSsl(rootCerts, privateKey, certChain, verifyOptions) } else { if (!this._insecureCredentials) { this._insecureCredentials = grpc.credentials.createInsecure() @@ -159,30 +117,18 @@ class GrpcLoader { } service(name: string) { - assert( - this._types, - 'Must called init() first. proto file has not been loaded.' - ) + assert(this._types, 'Must called init() first. proto file has not been loaded.') const fullName = this._isDev ? `${this._packagePrefix}.${name}` : name const service = _.get(this._types, `${fullName}.service`) - assert( - service, - `Cannot find service with name: ${fullName}, please check if the protos file is configured incorrectly or if the corresponding proto file is missing.` - ) + assert(service, `Cannot find service with name: ${fullName}, please check if the protos file is configured incorrectly or if the corresponding proto file is missing.`) return service } type(name: string) { - assert( - this._types, - 'Must called init() first. proto file has not been loaded.' - ) + assert(this._types, 'Must called init() first. proto file has not been loaded.') const fullName = this._isDev ? `${this._packagePrefix}.${name}` : name const type = _.get(this._types, `${fullName}`) - assert( - type, - `Cannot find type with name: ${fullName}, please check if the protos file is configured incorrectly or if the corresponding proto file is missing.` - ) + assert(type, `Cannot find type with name: ${fullName}, please check if the protos file is configured incorrectly or if the corresponding proto file is missing.`) return type } @@ -196,9 +142,7 @@ class GrpcLoader { } } - const descriptor = this.type(name).fileDescriptorProtos.map((proto: any) => - Descriptor.FileDescriptorProto.decode(proto) - ) + const descriptor = this.type(name).fileDescriptorProtos.map((proto: any) => Descriptor.FileDescriptorProto.decode(proto)) root = (protobuf.Root as protobuf.RootConstructor).fromDescriptor({ file: descriptor }) @@ -208,33 +152,16 @@ class GrpcLoader { return root.lookupType(name) } - client( - name: string, - { - host = undefined, - port = undefined, - timeout = undefined, - credentials = undefined, - channelOptions = {} - }: any = {} - ) { + client(name: string, { host = undefined, port = undefined, timeout = undefined, credentials = undefined, channelOptions = {} }: any = {}) { const isDefaultClient = !(host && port) const addr = `${host}:${port}` - const cacheKeyPrefix = isDefaultClient - ? 'defaultAddr' - : addr.replace(/\./g, '-') + const cacheKeyPrefix = isDefaultClient ? 'defaultAddr' : addr.replace(/\./g, '-') const cacheKey = `proxy.${cacheKeyPrefix}.${name}.${timeout}` if (this._clientMap.has(cacheKey)) { return this._clientMap.get(cacheKey) } else { - const client = this._makeClient( - isDefaultClient, - name, - addr, - credentials, - channelOptions - ) + const client = this._makeClient(isDefaultClient, name, addr, credentials, channelOptions) const appName = this._appName const proxy = clientProxy._proxy(client, { timeout }, appName) this._clientMap.set(cacheKey, proxy) @@ -242,58 +169,22 @@ class GrpcLoader { } } - realClient( - name: string, - { - host = undefined, - port = undefined, - credentials = undefined, - channelOptions = {} - }: any = {} - ) { + realClient(name: string, { host = undefined, port = undefined, credentials = undefined, channelOptions = {} }: any = {}) { const isDefaultClient = !(host && port) - const client = this._makeClient( - isDefaultClient, - name, - `${host}:${port}`, - credentials, - channelOptions - ) + const client = this._makeClient(isDefaultClient, name, `${host}:${port}`, credentials, channelOptions) return client } - clientWithoutCache( - name: string, - { - addr, - timeout = undefined, - credentials = undefined, - channelOptions = {} - }: any = {} - ) { - const client = this._makeClientWithoutCache( - false, - name, - addr, - credentials, - channelOptions - ) + clientWithoutCache(name: string, { addr, timeout = undefined, credentials = undefined, channelOptions = {} }: any = {}) { + const client = this._makeClientWithoutCache(false, name, addr, credentials, channelOptions) const appName = this._appName const proxy = clientProxy._proxy(client, { timeout }, appName) return proxy } - private _makeClient( - isDefaultClient: boolean, - name: string, - addr: string, - credentials: any, - channelOptions: any = {} - ) { + private _makeClient(isDefaultClient: boolean, name: string, addr: string, credentials: any, channelOptions: any = {}) { const ctBool = !!credentials - const cacheKeyPrefix = isDefaultClient - ? 'defaultAddr' - : addr.replace(/\./g, '-') + const cacheKeyPrefix = isDefaultClient ? 'defaultAddr' : addr.replace(/\./g, '-') const cacheKeyWithCt = `${cacheKeyPrefix}.${name}.${ctBool}` const cacheKey = `${cacheKeyPrefix}.${name}` @@ -306,42 +197,23 @@ class GrpcLoader { if (addr === 'undefined:undefined') { cacheAddr = this._clientAddrMap.get(name) || addr } - const client = this._makeClientWithoutCache( - isDefaultClient, - name, - cacheAddr, - credentials, - channelOptions - ) + const client = this._makeClientWithoutCache(isDefaultClient, name, cacheAddr, credentials, channelOptions) this._clientAddrMap.set(name, cacheAddr) this._clientMap.set(cacheKey, client) return client } } - private _makeClientWithoutCache( - isDefaultClient: boolean, - name: string, - addr: string, - credentials: any, - channelOptions: any = {} - ) { + private _makeClientWithoutCache(isDefaultClient: boolean, name: string, addr: string, credentials: any, channelOptions: any = {}) { channelOptions = Object.assign({}, defaultChannelOptions, channelOptions) const ServiceProto = this.type(name) - const client = new ServiceProto( - addr, - credentials || this.makeCredentials(), - channelOptions - ) + const client = new ServiceProto(addr, credentials || this.makeCredentials(), channelOptions) return client } makeMetadata(initialValues: any) { - assert( - this._types, - 'Must called init() first. proto file has not been loaded.' - ) + assert(this._types, 'Must called init() first. proto file has not been loaded.') const meta = new grpc.Metadata() if (typeof initialValues === 'object') { Object.entries(initialValues).forEach(([key, value]: [string, any]) => { @@ -356,10 +228,7 @@ class GrpcLoader { } initServer(...args: any[]) { - assert( - this._types, - 'Must called init() first. proto file has not been loaded.' - ) + assert(this._types, 'Must called init() first. proto file has not been loaded.') const server = new ServerProxy() return server._init(this, ...args) } diff --git a/src/proxy/clientProxy.ts b/src/proxy/clientProxy.ts index eb42dbb..0c95eb5 100644 --- a/src/proxy/clientProxy.ts +++ b/src/proxy/clientProxy.ts @@ -1,8 +1,4 @@ -import { - Metadata, - MetadataValue, - UntypedServiceImplementation -} from '@grpc/grpc-js' +import { Metadata, MetadataValue, UntypedServiceImplementation } from '@grpc/grpc-js' import * as os from 'node:os' import iterator from '../util/iterator' @@ -15,11 +11,7 @@ class ClientProxy { return { requestStream, responseStream } } - private _prepareMetadata( - metadata: Metadata | Record, - options: Record, - basicMeta: Record - ): [Metadata, Record] { + private _prepareMetadata(metadata: Metadata | Record, options: Record, basicMeta: Record): [Metadata, Record] { if (metadata instanceof Metadata) { options = { ...options } } else { @@ -51,21 +43,12 @@ class ClientProxy { newError.message = `${basicMeta.fullServiceName} (${err.message})` const stacks = newError.stack!.split('\n') - newError.stack = [ - stacks[0], - ...stacks.slice(2), - ' ...', - ...(err.stack!.split('\n').slice(1, 3) as string[]) - ].join('\n') + newError.stack = [stacks[0], ...stacks.slice(2), ' ...', ...(err.stack!.split('\n').slice(1, 3) as string[])].join('\n') return newError } - private _setDeadline( - options: { deadline?: Date; timeout?: number }, - defaultOptions: Record, - basicMeta: { fullServiceName?: string } - ): { deadline?: Date } { + private _setDeadline(options: { deadline?: Date; timeout?: number }, defaultOptions: Record, basicMeta: { fullServiceName?: string }): { deadline?: Date } { if (!options.deadline) { const timeout = options.timeout || defaultOptions.timeout const deadline = new Date(Date.now() + (timeout as number)) @@ -75,25 +58,12 @@ class ClientProxy { return options } - private _promisifyUnaryMethod( - client: UntypedServiceImplementation, - func: any, - defaultOptions: Record, - basicMeta: Record - ): any { - const asyncUnaryMethod = async ( - request: any, - metadata: Metadata, - options: Record - ): Promise => { + private _promisifyUnaryMethod(client: UntypedServiceImplementation, func: any, defaultOptions: Record, basicMeta: Record): any { + const asyncUnaryMethod = async (request: any, metadata: Metadata, options: Record): Promise => { if (typeof options === 'function') { - throw new Error( - 'gRPCity: AsyncFunction should not contain a callback function' - ) + throw new Error('gRPCity: AsyncFunction should not contain a callback function') } else if (typeof metadata === 'function') { - throw new Error( - 'gRPCity: AsyncFunction should not contain a callback function' - ) + throw new Error('gRPCity: AsyncFunction should not contain a callback function') } ;[metadata, options] = this._prepareMetadata(metadata, options, basicMeta) @@ -123,24 +93,12 @@ class ClientProxy { return asyncUnaryMethod } - private _promisifyClientStreamMethod( - client: UntypedServiceImplementation, - func: any, - defaultOptions: Record, - basicMeta: Record - ): any { - const clientStreamMethod = ( - metadata: Metadata, - options: Record - ): any => { + private _promisifyClientStreamMethod(client: UntypedServiceImplementation, func: any, defaultOptions: Record, basicMeta: Record): any { + const clientStreamMethod = (metadata: Metadata, options: Record): any => { if (typeof options === 'function') { - throw new Error( - 'gRPCity: asyncStreamFunction should not contain a callback function' - ) + throw new Error('gRPCity: asyncStreamFunction should not contain a callback function') } else if (typeof metadata === 'function') { - throw new Error( - 'gRPCity: asyncStreamFunction should not contain a callback function' - ) + throw new Error('gRPCity: asyncStreamFunction should not contain a callback function') } ;[metadata, options] = this._prepareMetadata(metadata, options, basicMeta) @@ -185,25 +143,12 @@ class ClientProxy { return clientStreamMethod } - private _promisifyServerStreamMethod( - client: UntypedServiceImplementation, - func: any, - defaultOptions: Record, - basicMeta: { fullServiceName?: string } - ): any { - const serverStreamMethod = ( - request: any, - metadata: Metadata, - options: Record - ): any => { + private _promisifyServerStreamMethod(client: UntypedServiceImplementation, func: any, defaultOptions: Record, basicMeta: { fullServiceName?: string }): any { + const serverStreamMethod = (request: any, metadata: Metadata, options: Record): any => { if (typeof options === 'function') { - throw new Error( - 'gRPCity: asyncStreamFunction should not contain a callback function' - ) + throw new Error('gRPCity: asyncStreamFunction should not contain a callback function') } else if (typeof metadata === 'function') { - throw new Error( - 'gRPCity: asyncStreamFunction should not contain a callback function' - ) + throw new Error('gRPCity: asyncStreamFunction should not contain a callback function') } ;[metadata, options] = this._prepareMetadata(metadata, options, basicMeta) @@ -237,24 +182,12 @@ class ClientProxy { return serverStreamMethod } - private _promisifyDuplexStreamMethod( - client: UntypedServiceImplementation, - func: any, - defaultOptions: Record, - basicMeta: { fullServiceName?: string } - ): any { - const duplexStreamMethod = ( - metadata: Metadata, - options: Record - ): any => { + private _promisifyDuplexStreamMethod(client: UntypedServiceImplementation, func: any, defaultOptions: Record, basicMeta: { fullServiceName?: string }): any { + const duplexStreamMethod = (metadata: Metadata, options: Record): any => { if (typeof options === 'function') { - throw new Error( - 'gRPCity: asyncStreamFunction should not contain a callback function' - ) + throw new Error('gRPCity: asyncStreamFunction should not contain a callback function') } else if (typeof metadata === 'function') { - throw new Error( - 'gRPCity: asyncStreamFunction should not contain a callback function' - ) + throw new Error('gRPCity: asyncStreamFunction should not contain a callback function') } ;[metadata, options] = this._prepareMetadata(metadata, options, basicMeta) @@ -297,21 +230,14 @@ class ClientProxy { return duplexStreamMethod } - private _keepCallbackMethod( - client: UntypedServiceImplementation, - func: any - ): (...argumentsList: any[]) => any { + private _keepCallbackMethod(client: UntypedServiceImplementation, func: any): (...argumentsList: any[]) => any { const callbackMethod = (...argumentsList: any[]) => { return func.apply(client, argumentsList) } return callbackMethod } - _proxy( - client: UntypedServiceImplementation, - defaultOptions: Record = {}, - appName?: string - ): any { + _proxy(client: UntypedServiceImplementation, defaultOptions: Record = {}, appName?: string): any { defaultOptions = defaultOptions || {} defaultOptions.timeout = defaultOptions.timeout || 1000 * 10 @@ -338,41 +264,21 @@ class ClientProxy { if (!requestStream && !responseStream) { // promisify unary method - target[name] = this._promisifyUnaryMethod( - client, - func, - defaultOptions, - basicMeta - ) + target[name] = this._promisifyUnaryMethod(client, func, defaultOptions, basicMeta) } // stream if (requestStream && !responseStream) { // promisify only client stream method - target[name] = this._promisifyClientStreamMethod( - client, - func, - defaultOptions, - basicMeta - ) + target[name] = this._promisifyClientStreamMethod(client, func, defaultOptions, basicMeta) } if (!requestStream && responseStream) { // promisify only server stream method - target[name] = this._promisifyServerStreamMethod( - client, - func, - defaultOptions, - basicMeta - ) + target[name] = this._promisifyServerStreamMethod(client, func, defaultOptions, basicMeta) } if (requestStream && responseStream) { // promisify duplex stream method - target[name] = this._promisifyDuplexStreamMethod( - client, - func, - defaultOptions, - basicMeta - ) + target[name] = this._promisifyDuplexStreamMethod(client, func, defaultOptions, basicMeta) } // keep callback method diff --git a/src/proxy/serverProxy.ts b/src/proxy/serverProxy.ts index 8d4c014..b4ae5a6 100644 --- a/src/proxy/serverProxy.ts +++ b/src/proxy/serverProxy.ts @@ -28,20 +28,13 @@ class ServerProxy { return this } - async listen( - addr: any, - credentials: grpc.ServerCredentials | undefined = undefined - ): Promise { + async listen(addr: any, credentials: grpc.ServerCredentials | undefined = undefined): Promise { assert(this._server, 'must be first init() server before server listen()') Joi.assert(addr, serverSchemas.address, 'server listen() params Error') const url = _.isString(addr) ? addr : `${addr.host}:${addr.port}` const bindPort = await new Promise((resolve, reject) => { - this._server!.bindAsync( - url, - credentials || this.makeServerCredentials(), - (err, result) => (err ? reject(err) : resolve(result)) - ) + this._server!.bindAsync(url, credentials || this.makeServerCredentials(), (err, result) => (err ? reject(err) : resolve(result))) }) const port = addr.port ? addr.port : Number(addr.match(/:(\d+)/)![1]) assert(bindPort === port, 'server bind port not to be right') @@ -78,31 +71,18 @@ class ServerProxy { delete this._loader } - makeServerCredentials( - rootCerts?: Buffer, - keyCertPairs?: grpc.KeyCertPair[], - checkClientCertificate?: boolean - ): grpc.ServerCredentials { + makeServerCredentials(rootCerts?: Buffer, keyCertPairs?: grpc.KeyCertPair[], checkClientCertificate?: boolean): grpc.ServerCredentials { if (rootCerts && keyCertPairs) { - return grpc.ServerCredentials.createSsl( - rootCerts, - keyCertPairs, - checkClientCertificate - ) + return grpc.ServerCredentials.createSsl(rootCerts, keyCertPairs, checkClientCertificate) } else { if (!this._insecureServerCredentials) { - this._insecureServerCredentials = - grpc.ServerCredentials.createInsecure() + this._insecureServerCredentials = grpc.ServerCredentials.createInsecure() } return this._insecureServerCredentials } } - addService( - name: string, - implementation: any, - { exclude = [], inherit }: { exclude?: string[]; inherit?: any } = {} - ): void { + addService(name: string, implementation: any, { exclude = [], inherit }: { exclude?: string[]; inherit?: any } = {}): void { const service = this._loader.service(name) const options: any = { exclude, inherit, _implementationType: {} } @@ -114,25 +94,16 @@ class ServerProxy { } }) - this._server!.addService( - service, - this._callbackify(implementation, options) - ) + this._server!.addService(service, this._callbackify(implementation, options)) } removeService(name: string): void { - assert( - this._server, - 'must be first init() server before server removeService()' - ) + assert(this._server, 'must be first init() server before server removeService()') this._server!.removeService(this._loader.service(name)) } addMiddleware(...args: MiddlewareFunction[]): void { - assert( - args.length >= 1, - 'server addMiddleware() takes at least one argument.' - ) + assert(args.length >= 1, 'server addMiddleware() takes at least one argument.') if (args.length === 1) { if (Array.isArray(args[0])) { args[0].forEach((fn) => { @@ -149,56 +120,27 @@ class ServerProxy { } private _use(fn: MiddlewareFunction): void { - if (typeof fn !== 'function') - throw new TypeError( - 'grpcity loader server middleware must be a function!' - ) + if (typeof fn !== 'function') throw new TypeError('grpcity loader server middleware must be a function!') this._middleware.push(fn) } - private _callbackify( - target: any, - { - exclude = [], - inherit, - _implementationType - }: { exclude?: string[]; inherit?: any; _implementationType: any } - ): any { + private _callbackify(target: any, { exclude = [], inherit, _implementationType }: { exclude?: string[]; inherit?: any; _implementationType: any }): any { assert(typeof target === 'object', 'Must callbackify an object') - assert( - Array.isArray(exclude), - 'options.exclude must be an array of strings' - ) - - const protoPropertyNames = Object.getOwnPropertyNames( - Object.getPrototypeOf({}) - ) + assert(Array.isArray(exclude), 'options.exclude must be an array of strings') + + const protoPropertyNames = Object.getOwnPropertyNames(Object.getPrototypeOf({})) exclude.push(...protoPropertyNames) const allPropertyNames = [ - ...new Set([ - ...Object.keys(target), - ...Object.getOwnPropertyNames(Object.getPrototypeOf(target)), - ...(inherit && inherit.prototype - ? Object.getOwnPropertyNames(inherit.prototype) - : []) - ]) + ...new Set([...Object.keys(target), ...Object.getOwnPropertyNames(Object.getPrototypeOf(target)), ...(inherit && inherit.prototype ? Object.getOwnPropertyNames(inherit.prototype) : [])]) ] const methods: { [key: string]: any } = {} for (const key of allPropertyNames) { const fn = target[key] - if ( - typeof fn === 'function' && - key !== 'constructor' && - !exclude.includes(key) - ) { + if (typeof fn === 'function' && key !== 'constructor' && !exclude.includes(key)) { if (util.types.isAsyncFunction(fn)) { - const eglWrapFunction = this._proxy( - target, - key, - _implementationType[key] - ) + const eglWrapFunction = this._proxy(target, key, _implementationType[key]) methods[key] = eglWrapFunction } else { methods[key] = fn @@ -242,11 +184,7 @@ class ServerProxy { } } - private _callUnaryProxyMethod( - target: any, - key: string, - composeFunc: Function - ): grpc.handleUnaryCall { + private _callUnaryProxyMethod(target: any, key: string, composeFunc: Function): grpc.handleUnaryCall { return (call, callback) => { const ctx = this._createContext(call) @@ -262,11 +200,7 @@ class ServerProxy { } } - private _callClientStreamProxyMethod( - target: any, - key: string, - composeFunc: Function - ): any { + private _callClientStreamProxyMethod(target: any, key: string, composeFunc: Function): any { return (call: any, callback: Function) => { const ctx = this._createContext(call) @@ -288,11 +222,7 @@ class ServerProxy { } } - private _callServerStreamProxyMethod( - target: any, - key: string, - composeFunc: Function - ): any { + private _callServerStreamProxyMethod(target: any, key: string, composeFunc: Function): any { return (call: any) => { const ctx = this._createContext(call) @@ -317,11 +247,7 @@ class ServerProxy { } } - private _callDuplexStreamProxyMethod( - target: any, - key: string, - composeFunc: Function - ): any { + private _callDuplexStreamProxyMethod(target: any, key: string, composeFunc: Function): any { return (call: any) => { const ctx = this._createContext(call) diff --git a/src/util/compose.ts b/src/util/compose.ts index 5a90a51..f3e6a60 100644 --- a/src/util/compose.ts +++ b/src/util/compose.ts @@ -1,7 +1,4 @@ -export type MiddlewareFunction = ( - context: any, - next: () => Promise -) => Promise +export type MiddlewareFunction = (context: any, next: () => Promise) => Promise /** * Compose `middleware` returning @@ -13,11 +10,9 @@ export type MiddlewareFunction = ( * @api public */ export const compose = (middleware: MiddlewareFunction[]) => { - if (!Array.isArray(middleware)) - throw new TypeError('Middleware stack must be an array!') + if (!Array.isArray(middleware)) throw new TypeError('Middleware stack must be an array!') for (const fn of middleware) { - if (typeof fn !== 'function') - throw new TypeError('Middleware must be composed of functions!') + if (typeof fn !== 'function') throw new TypeError('Middleware must be composed of functions!') } return function (context: any, next: () => Promise) { @@ -25,8 +20,7 @@ export const compose = (middleware: MiddlewareFunction[]) => { let index = -1 return dispatch(0) function dispatch(i: number): Promise { - if (i <= index) - return Promise.reject(new Error('next() called multiple times')) + if (i <= index) return Promise.reject(new Error('next() called multiple times')) index = i let fn = middleware[i] if (i === middleware.length) fn = next diff --git a/src/util/iterator.ts b/src/util/iterator.ts index c12cbbd..f819745 100644 --- a/src/util/iterator.ts +++ b/src/util/iterator.ts @@ -1,12 +1,8 @@ const symbolAsyncIterator = Symbol.asyncIterator || '@@asyncIterator' -const normalizeEmitter = ( - emitter: any -): { addListener: Function; removeListener: Function } => { - const addListener = - emitter.on || emitter.addListener || emitter.addEventListener - const removeListener = - emitter.off || emitter.removeListener || emitter.removeEventListener +const normalizeEmitter = (emitter: any): { addListener: Function; removeListener: Function } => { + const addListener = emitter.on || emitter.addListener || emitter.addEventListener + const removeListener = emitter.off || emitter.removeListener || emitter.removeEventListener if (!addListener || !removeListener) { throw new TypeError('Emitter is not compatible') @@ -37,12 +33,9 @@ export default (emitter: any, event: string | string[], options: any) => { } const { limit } = options - const isValidLimit = - limit >= 0 && (limit === Infinity || Number.isInteger(limit)) + const isValidLimit = limit >= 0 && (limit === Infinity || Number.isInteger(limit)) if (!isValidLimit) { - throw new TypeError( - 'The `limit` option should be a non-negative integer or Infinity' - ) + throw new TypeError('The `limit` option should be a non-negative integer or Infinity') } if (limit === 0) { @@ -181,9 +174,7 @@ export default (emitter: any, event: string | string[], options: any) => { } } - return new Promise((resolve, reject) => - nextQueue.push({ resolve, reject }) - ) + return new Promise((resolve, reject) => nextQueue.push({ resolve, reject })) }, async return(value: any): Promise<{ done: boolean; value: any }> { cancel() diff --git a/src/util/prefixingDefinition.ts b/src/util/prefixingDefinition.ts index 33654bc..9992ef7 100644 --- a/src/util/prefixingDefinition.ts +++ b/src/util/prefixingDefinition.ts @@ -2,11 +2,7 @@ export default (packageDefinition: any, packagePrefix: any) => { for (const qualifiedName in packageDefinition) { const definition = packageDefinition[qualifiedName] const newPackage = `${packagePrefix}.${qualifiedName}` - if ( - definition.format && - definition.type && - definition.fileDescriptorProtos - ) { + if (definition.format && definition.type && definition.fileDescriptorProtos) { packageDefinition[newPackage] = definition } else { const newDefinition: any = {} diff --git a/test/client.js b/test/client.js index 92f174b..6dc3086 100755 --- a/test/client.js +++ b/test/client.js @@ -36,11 +36,7 @@ const start = async (addr) => { const greeterClient = loader.client('test.helloworld.Greeter', { credentials }) - const { - status, - metadata, - response: result - } = await greeterClient.sayHello({ name: 'greeter' }, meta) + const { status, metadata, response: result } = await greeterClient.sayHello({ name: 'greeter' }, meta) console.log('greeterClient.sayHello', result) console.log('greeterClient.sayHello metadata', metadata) console.log('greeterClient.sayHello status', status) diff --git a/test/index.test.js b/test/index.test.js index 3ec08ed..eaa5fe3 100755 --- a/test/index.test.js +++ b/test/index.test.js @@ -67,10 +67,7 @@ describe('Grpc Loader', () => { expect(result2.message).to.be.eq('hello, grpc') try { - await client2.sayHello( - { name: 'grpc' }, - loader.makeMetadata({ 'x-throw-error': 'true' }) - ) + await client2.sayHello({ name: 'grpc' }, loader.makeMetadata({ 'x-throw-error': 'true' })) expect.fail('should not run here') } catch (err) { expect(/x-throw-error/.test(err.message)).to.be.eq(true) @@ -79,10 +76,7 @@ describe('Grpc Loader', () => { const start = Date.now() try { - await client2.sayHello( - { name: 'grpc' }, - loader.makeMetadata({ 'x-long-delay': 'true' }) - ) + await client2.sayHello({ name: 'grpc' }, loader.makeMetadata({ 'x-long-delay': 'true' })) expect.fail('should not run here') } catch (err) { expect(Date.now() - start).to.be.lte(timeout * 2) @@ -123,28 +117,20 @@ describe('Grpc Loader', () => { 'x-business-id': ['grpcity', 'testing'], 'x-timestamp-client': 'begin=' + timestampClientSend.toISOString() }) - const call = client.call.sayHello( - { name: 'grpc' }, - meta, - (err, result) => { - if (err) { - reject(err) - return - } - expect(result).to.be.an('object') - expect(result.message).to.be.eq('hello, grpc') - - resolve() + const call = client.call.sayHello({ name: 'grpc' }, meta, (err, result) => { + if (err) { + reject(err) + return } - ) + expect(result).to.be.an('object') + expect(result.message).to.be.eq('hello, grpc') + + resolve() + }) call.on('metadata', (metadata) => { - expect(metadata.get('x-cache-control')) - .to.be.an('array') - .deep.eq(['max-age=100']) - expect(metadata.get('x-business-id')) - .to.be.an('array') - .deep.eq(['grpcity, testing']) + expect(metadata.get('x-cache-control')).to.be.an('array').deep.eq(['max-age=100']) + expect(metadata.get('x-business-id')).to.be.an('array').deep.eq(['grpcity, testing']) const timestamps = metadata.get('x-timestamp-server') expect(timestamps).to.be.an('array').with.lengthOf(1) diff --git a/test/server.js b/test/server.js index 86f8f34..854a84e 100755 --- a/test/server.js +++ b/test/server.js @@ -106,9 +106,7 @@ const start = async (addr) => { fs.readFileSync(path.resolve(__dirname, 'certs/ca.crt')), [ { - private_key: fs.readFileSync( - path.resolve(__dirname, 'certs/server.key') - ), + private_key: fs.readFileSync(path.resolve(__dirname, 'certs/server.key')), cert_chain: fs.readFileSync(path.resolve(__dirname, 'certs/server.crt')) } ], diff --git a/test/stream/client-v2.js b/test/stream/client-v2.js index 2628e5c..52604b9 100644 --- a/test/stream/client-v2.js +++ b/test/stream/client-v2.js @@ -37,10 +37,7 @@ const start = async (addr) => { console.log(writeResult) // client to stream server - const serverStreamHelloCall = client.serverStreamHello( - { message: 'Hello! How are you?' }, - meta - ) + const serverStreamHelloCall = client.serverStreamHello({ message: 'Hello! How are you?' }, meta) const serverReadAllResult = serverStreamHelloCall.readAll() for await (const data of serverReadAllResult) { console.log(data) @@ -50,11 +47,7 @@ const start = async (addr) => { // stream client to stream server const mutualStreamHelloCall = client.mutualStreamHello(meta) - mutualStreamHelloCall.writeAll([ - { message: 'Hello!' }, - { message: 'How are you?' }, - { message: 'other thing x' } - ]) + mutualStreamHelloCall.writeAll([{ message: 'Hello!' }, { message: 'How are you?' }, { message: 'other thing x' }]) mutualStreamHelloCall.write({ message: 'maybe' }) const mutualReadAllResult = mutualStreamHelloCall.readAll() diff --git a/test/stream/client.js b/test/stream/client.js index 1a8a66f..f74d58c 100644 --- a/test/stream/client.js +++ b/test/stream/client.js @@ -35,16 +35,13 @@ const start = async (addr) => { }) // stream client to server - const clientStreamHelloCall = client.call.clientStreamHello( - meta, - (err, response) => { - if (err) { - console.log(err) - } else { - console.log(response) - } + const clientStreamHelloCall = client.call.clientStreamHello(meta, (err, response) => { + if (err) { + console.log(err) + } else { + console.log(response) } - ) + }) clientStreamHelloCall.write({ message: 'Hello!' }) clientStreamHelloCall.write({ message: 'How are you?' }) clientStreamHelloCall.end() diff --git a/types/index.d.ts b/types/index.d.ts index 6b08ff7..6438ef3 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -13,37 +13,16 @@ declare class GrpcLoader { private _insecureCredentials? private _initDefaultClient? constructor(protoFileOptions: any) - init({ - services, - isDev, - packagePrefix, - loadOptions, - channelOptions, - appName - }?: any): Promise + init({ services, isDev, packagePrefix, loadOptions, channelOptions, appName }?: any): Promise initClients({ services, channelOptions, credentials }: any): Promise closeClients(): void - makeCredentials( - rootCerts?: any, - privateKey?: any, - certChain?: any, - verifyOptions?: any - ): grpc.ChannelCredentials + makeCredentials(rootCerts?: any, privateKey?: any, certChain?: any, verifyOptions?: any): grpc.ChannelCredentials service(name: string): any type(name: string): any message(name: string): any - client( - name: string, - { host, port, timeout, credentials, channelOptions }?: any - ): any - realClient( - name: string, - { host, port, credentials, channelOptions }?: any - ): any - clientWithoutCache( - name: string, - { addr, timeout, credentials, channelOptions }?: any - ): any + client(name: string, { host, port, timeout, credentials, channelOptions }?: any): any + realClient(name: string, { host, port, credentials, channelOptions }?: any): any + clientWithoutCache(name: string, { addr, timeout, credentials, channelOptions }?: any): any private _makeClient private _makeClientWithoutCache makeMetadata(initialValues: any): grpc.Metadata diff --git a/types/index.js b/types/index.js index e7cb453..949ba87 100644 --- a/types/index.js +++ b/types/index.js @@ -5,10 +5,7 @@ var __createBinding = ? function (o, m, k, k2) { if (k2 === undefined) k2 = k var desc = Object.getOwnPropertyDescriptor(m, k) - if ( - !desc || - ('get' in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { + if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function () { @@ -36,10 +33,7 @@ var __importStar = function (mod) { if (mod && mod.__esModule) return mod var result = {} - if (mod != null) - for (var k in mod) - if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k) + if (mod != null) for (var k in mod) if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k) __setModuleDefault(result, mod) return result } @@ -57,54 +51,29 @@ const Descriptor = __importStar(require('protobufjs/ext/descriptor')) const _ = __importStar(require('lodash')) const Joi = __importStar(require('joi')) const loader_1 = __importDefault(require('./schema/loader')) -const prefixingDefinition_1 = __importDefault( - require('./util/prefixingDefinition') -) +const prefixingDefinition_1 = __importDefault(require('./util/prefixingDefinition')) const defaultChannelOptions_1 = require('./config/defaultChannelOptions') const defaultLoadOptions_1 = require('./config/defaultLoadOptions') const clientProxy_1 = __importDefault(require('./proxy/clientProxy')) const serverProxy_1 = __importDefault(require('./proxy/serverProxy')) class GrpcLoader { constructor(protoFileOptions) { - Joi.assert( - protoFileOptions, - loader_1.default.constructor, - 'new GrpcLoader() params Error' - ) - this._protoFiles = Array.isArray(protoFileOptions) - ? protoFileOptions - : [protoFileOptions] + Joi.assert(protoFileOptions, loader_1.default.constructor, 'new GrpcLoader() params Error') + this._protoFiles = Array.isArray(protoFileOptions) ? protoFileOptions : [protoFileOptions] this._clientMap = new Map() this._clientAddrMap = new Map() } - async init({ - services = undefined, - isDev = false, - packagePrefix = '', - loadOptions = {}, - channelOptions = {}, - appName - } = {}) { - Joi.assert( - { services, loadOptions, isDev, channelOptions, appName }, - loader_1.default.init, - 'GrpcLoader.init() params Error' - ) + async init({ services = undefined, isDev = false, packagePrefix = '', loadOptions = {}, channelOptions = {}, appName } = {}) { + Joi.assert({ services, loadOptions, isDev, channelOptions, appName }, loader_1.default.init, 'GrpcLoader.init() params Error') if (this._types) { return } try { - loadOptions = Object.assign( - {}, - defaultLoadOptions_1.defaultLoadOptions, - loadOptions - ) + loadOptions = Object.assign({}, defaultLoadOptions_1.defaultLoadOptions, loadOptions) this._isDev = isDev this._packagePrefix = packagePrefix this._appName = appName - loadOptions.includeDirs = this._protoFiles - .map((p) => p.location) - .concat(loadOptions.includeDirs || []) + loadOptions.includeDirs = this._protoFiles.map((p) => p.location).concat(loadOptions.includeDirs || []) const files = this._protoFiles.reduce((result, p) => { if (p.files && p.files.length > 0) { result.push(...p.files) @@ -113,10 +82,7 @@ class GrpcLoader { }, []) const packageDefinition = await protoLoader.load(files, loadOptions) if (this._packagePrefix) { - this._packageDefinition = (0, prefixingDefinition_1.default)( - packageDefinition, - packagePrefix - ) + this._packageDefinition = (0, prefixingDefinition_1.default)(packageDefinition, packagePrefix) } else { this._packageDefinition = packageDefinition } @@ -128,16 +94,8 @@ class GrpcLoader { await this.initClients({ services, channelOptions }) } } - async initClients({ - services, - channelOptions = {}, - credentials = undefined - }) { - Joi.assert( - { services, channelOptions }, - loader_1.default.initClients, - 'GrpcLoader.initClients() Options Error' - ) + async initClients({ services, channelOptions = {}, credentials = undefined }) { + Joi.assert({ services, channelOptions }, loader_1.default.initClients, 'GrpcLoader.initClients() Options Error') if (this._initDefaultClient) { return } @@ -147,9 +105,7 @@ class GrpcLoader { const serviceNames = Object.keys(services) serviceNames.forEach((name) => { const isDefaultClient = true - const addr = _.isString(services[name]) - ? services[name] - : services[name].host + ':' + services[name].port + const addr = _.isString(services[name]) ? services[name] : services[name].host + ':' + services[name].port this._makeClient(isDefaultClient, name, addr, credentials, channelOptions) }) this._initDefaultClient = true @@ -166,12 +122,7 @@ class GrpcLoader { } makeCredentials(rootCerts, privateKey, certChain, verifyOptions) { if (rootCerts && privateKey && certChain) { - return grpc.credentials.createSsl( - rootCerts, - privateKey, - certChain, - verifyOptions - ) + return grpc.credentials.createSsl(rootCerts, privateKey, certChain, verifyOptions) } else { if (!this._insecureCredentials) { this._insecureCredentials = grpc.credentials.createInsecure() @@ -180,29 +131,17 @@ class GrpcLoader { } } service(name) { - ;(0, node_assert_1.default)( - this._types, - 'Must called init() first. proto file has not been loaded.' - ) + ;(0, node_assert_1.default)(this._types, 'Must called init() first. proto file has not been loaded.') const fullName = this._isDev ? `${this._packagePrefix}.${name}` : name const service = _.get(this._types, `${fullName}.service`) - ;(0, node_assert_1.default)( - service, - `Cannot find service with name: ${fullName}, please check if the protos file is configured incorrectly or if the corresponding proto file is missing.` - ) + ;(0, node_assert_1.default)(service, `Cannot find service with name: ${fullName}, please check if the protos file is configured incorrectly or if the corresponding proto file is missing.`) return service } type(name) { - ;(0, node_assert_1.default)( - this._types, - 'Must called init() first. proto file has not been loaded.' - ) + ;(0, node_assert_1.default)(this._types, 'Must called init() first. proto file has not been loaded.') const fullName = this._isDev ? `${this._packagePrefix}.${name}` : name const type = _.get(this._types, `${fullName}`) - ;(0, node_assert_1.default)( - type, - `Cannot find type with name: ${fullName}, please check if the protos file is configured incorrectly or if the corresponding proto file is missing.` - ) + ;(0, node_assert_1.default)(type, `Cannot find type with name: ${fullName}, please check if the protos file is configured incorrectly or if the corresponding proto file is missing.`) return type } message(name) { @@ -213,89 +152,42 @@ class GrpcLoader { return found } } - const descriptor = this.type(name).fileDescriptorProtos.map((proto) => - Descriptor.FileDescriptorProto.decode(proto) - ) - root = protobuf.Root.fromDescriptor({ file: descriptor }) + const descriptor = this.type(name).fileDescriptorProtos.map((proto) => Descriptor.FileDescriptorProto.decode(proto)) + root = protobuf.Root.fromDescriptor({ + file: descriptor + }) this._reflectedRoot = root return root.lookupType(name) } - client( - name, - { - host = undefined, - port = undefined, - timeout = undefined, - credentials = undefined, - channelOptions = {} - } = {} - ) { + client(name, { host = undefined, port = undefined, timeout = undefined, credentials = undefined, channelOptions = {} } = {}) { const isDefaultClient = !(host && port) const addr = `${host}:${port}` - const cacheKeyPrefix = isDefaultClient - ? 'defaultAddr' - : addr.replace(/\./g, '-') + const cacheKeyPrefix = isDefaultClient ? 'defaultAddr' : addr.replace(/\./g, '-') const cacheKey = `proxy.${cacheKeyPrefix}.${name}.${timeout}` if (this._clientMap.has(cacheKey)) { return this._clientMap.get(cacheKey) } else { - const client = this._makeClient( - isDefaultClient, - name, - addr, - credentials, - channelOptions - ) + const client = this._makeClient(isDefaultClient, name, addr, credentials, channelOptions) const appName = this._appName const proxy = clientProxy_1.default._proxy(client, { timeout }, appName) this._clientMap.set(cacheKey, proxy) return proxy } } - realClient( - name, - { - host = undefined, - port = undefined, - credentials = undefined, - channelOptions = {} - } = {} - ) { + realClient(name, { host = undefined, port = undefined, credentials = undefined, channelOptions = {} } = {}) { const isDefaultClient = !(host && port) - const client = this._makeClient( - isDefaultClient, - name, - `${host}:${port}`, - credentials, - channelOptions - ) + const client = this._makeClient(isDefaultClient, name, `${host}:${port}`, credentials, channelOptions) return client } - clientWithoutCache( - name, - { - addr, - timeout = undefined, - credentials = undefined, - channelOptions = {} - } = {} - ) { - const client = this._makeClientWithoutCache( - false, - name, - addr, - credentials, - channelOptions - ) + clientWithoutCache(name, { addr, timeout = undefined, credentials = undefined, channelOptions = {} } = {}) { + const client = this._makeClientWithoutCache(false, name, addr, credentials, channelOptions) const appName = this._appName const proxy = clientProxy_1.default._proxy(client, { timeout }, appName) return proxy } _makeClient(isDefaultClient, name, addr, credentials, channelOptions = {}) { const ctBool = !!credentials - const cacheKeyPrefix = isDefaultClient - ? 'defaultAddr' - : addr.replace(/\./g, '-') + const cacheKeyPrefix = isDefaultClient ? 'defaultAddr' : addr.replace(/\./g, '-') const cacheKeyWithCt = `${cacheKeyPrefix}.${name}.${ctBool}` const cacheKey = `${cacheKeyPrefix}.${name}` if (this._clientMap.has(cacheKey)) { @@ -307,43 +199,20 @@ class GrpcLoader { if (addr === 'undefined:undefined') { cacheAddr = this._clientAddrMap.get(name) || addr } - const client = this._makeClientWithoutCache( - isDefaultClient, - name, - cacheAddr, - credentials, - channelOptions - ) + const client = this._makeClientWithoutCache(isDefaultClient, name, cacheAddr, credentials, channelOptions) this._clientAddrMap.set(name, cacheAddr) this._clientMap.set(cacheKey, client) return client } } - _makeClientWithoutCache( - isDefaultClient, - name, - addr, - credentials, - channelOptions = {} - ) { - channelOptions = Object.assign( - {}, - defaultChannelOptions_1.defaultChannelOptions, - channelOptions - ) + _makeClientWithoutCache(isDefaultClient, name, addr, credentials, channelOptions = {}) { + channelOptions = Object.assign({}, defaultChannelOptions_1.defaultChannelOptions, channelOptions) const ServiceProto = this.type(name) - const client = new ServiceProto( - addr, - credentials || this.makeCredentials(), - channelOptions - ) + const client = new ServiceProto(addr, credentials || this.makeCredentials(), channelOptions) return client } makeMetadata(initialValues) { - ;(0, node_assert_1.default)( - this._types, - 'Must called init() first. proto file has not been loaded.' - ) + ;(0, node_assert_1.default)(this._types, 'Must called init() first. proto file has not been loaded.') const meta = new grpc.Metadata() if (typeof initialValues === 'object') { Object.entries(initialValues).forEach(([key, value]) => { @@ -357,10 +226,7 @@ class GrpcLoader { return meta } initServer(...args) { - ;(0, node_assert_1.default)( - this._types, - 'Must called init() first. proto file has not been loaded.' - ) + ;(0, node_assert_1.default)(this._types, 'Must called init() first. proto file has not been loaded.') const server = new serverProxy_1.default() return server._init(this, ...args) } diff --git a/types/proxy/clientProxy.d.ts b/types/proxy/clientProxy.d.ts index e40a53a..83ea610 100644 --- a/types/proxy/clientProxy.d.ts +++ b/types/proxy/clientProxy.d.ts @@ -9,11 +9,7 @@ declare class ClientProxy { private _promisifyServerStreamMethod private _promisifyDuplexStreamMethod private _keepCallbackMethod - _proxy( - client: UntypedServiceImplementation, - defaultOptions?: Record, - appName?: string - ): any + _proxy(client: UntypedServiceImplementation, defaultOptions?: Record, appName?: string): any } declare const _default: ClientProxy export default _default diff --git a/types/proxy/clientProxy.js b/types/proxy/clientProxy.js index 80b9009..4ce56f7 100644 --- a/types/proxy/clientProxy.js +++ b/types/proxy/clientProxy.js @@ -5,10 +5,7 @@ var __createBinding = ? function (o, m, k, k2) { if (k2 === undefined) k2 = k var desc = Object.getOwnPropertyDescriptor(m, k) - if ( - !desc || - ('get' in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { + if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function () { @@ -36,10 +33,7 @@ var __importStar = function (mod) { if (mod && mod.__esModule) return mod var result = {} - if (mod != null) - for (var k in mod) - if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k) + if (mod != null) for (var k in mod) if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k) __setModuleDefault(result, mod) return result } @@ -78,12 +72,7 @@ class ClientProxy { newError.code = err.code newError.message = `${basicMeta.fullServiceName} (${err.message})` const stacks = newError.stack.split('\n') - newError.stack = [ - stacks[0], - ...stacks.slice(2), - ' ...', - ...err.stack.split('\n').slice(1, 3) - ].join('\n') + newError.stack = [stacks[0], ...stacks.slice(2), ' ...', ...err.stack.split('\n').slice(1, 3)].join('\n') return newError } _setDeadline(options, defaultOptions, basicMeta) { @@ -98,13 +87,9 @@ class ClientProxy { _promisifyUnaryMethod(client, func, defaultOptions, basicMeta) { const asyncUnaryMethod = async (request, metadata, options) => { if (typeof options === 'function') { - throw new Error( - 'gRPCity: AsyncFunction should not contain a callback function' - ) + throw new Error('gRPCity: AsyncFunction should not contain a callback function') } else if (typeof metadata === 'function') { - throw new Error( - 'gRPCity: AsyncFunction should not contain a callback function' - ) + throw new Error('gRPCity: AsyncFunction should not contain a callback function') } ;[metadata, options] = this._prepareMetadata(metadata, options, basicMeta) options = this._setDeadline(options, defaultOptions, basicMeta) @@ -132,13 +117,9 @@ class ClientProxy { _promisifyClientStreamMethod(client, func, defaultOptions, basicMeta) { const clientStreamMethod = (metadata, options) => { if (typeof options === 'function') { - throw new Error( - 'gRPCity: asyncStreamFunction should not contain a callback function' - ) + throw new Error('gRPCity: asyncStreamFunction should not contain a callback function') } else if (typeof metadata === 'function') { - throw new Error( - 'gRPCity: asyncStreamFunction should not contain a callback function' - ) + throw new Error('gRPCity: asyncStreamFunction should not contain a callback function') } ;[metadata, options] = this._prepareMetadata(metadata, options, basicMeta) options = this._setDeadline(options, defaultOptions, basicMeta) @@ -178,13 +159,9 @@ class ClientProxy { _promisifyServerStreamMethod(client, func, defaultOptions, basicMeta) { const serverStreamMethod = (request, metadata, options) => { if (typeof options === 'function') { - throw new Error( - 'gRPCity: asyncStreamFunction should not contain a callback function' - ) + throw new Error('gRPCity: asyncStreamFunction should not contain a callback function') } else if (typeof metadata === 'function') { - throw new Error( - 'gRPCity: asyncStreamFunction should not contain a callback function' - ) + throw new Error('gRPCity: asyncStreamFunction should not contain a callback function') } ;[metadata, options] = this._prepareMetadata(metadata, options, basicMeta) options = this._setDeadline(options, defaultOptions, basicMeta) @@ -214,13 +191,9 @@ class ClientProxy { _promisifyDuplexStreamMethod(client, func, defaultOptions, basicMeta) { const duplexStreamMethod = (metadata, options) => { if (typeof options === 'function') { - throw new Error( - 'gRPCity: asyncStreamFunction should not contain a callback function' - ) + throw new Error('gRPCity: asyncStreamFunction should not contain a callback function') } else if (typeof metadata === 'function') { - throw new Error( - 'gRPCity: asyncStreamFunction should not contain a callback function' - ) + throw new Error('gRPCity: asyncStreamFunction should not contain a callback function') } ;[metadata, options] = this._prepareMetadata(metadata, options, basicMeta) options = this._setDeadline(options, defaultOptions, basicMeta) @@ -271,7 +244,10 @@ class ClientProxy { names[key.toUpperCase()] = prototype[key].path return names }, {}) - const basicMeta = { hostname: os.hostname(), appName } + const basicMeta = { + hostname: os.hostname(), + appName + } const target = Object.entries(prototype).reduce( (target, [name, func]) => { if (name !== 'constructor' && typeof func === 'function') { @@ -279,40 +255,20 @@ class ClientProxy { const { requestStream, responseStream } = this._getFuncStreamWay(func) if (!requestStream && !responseStream) { // promisify unary method - target[name] = this._promisifyUnaryMethod( - client, - func, - defaultOptions, - basicMeta - ) + target[name] = this._promisifyUnaryMethod(client, func, defaultOptions, basicMeta) } // stream if (requestStream && !responseStream) { // promisify only client stream method - target[name] = this._promisifyClientStreamMethod( - client, - func, - defaultOptions, - basicMeta - ) + target[name] = this._promisifyClientStreamMethod(client, func, defaultOptions, basicMeta) } if (!requestStream && responseStream) { // promisify only server stream method - target[name] = this._promisifyServerStreamMethod( - client, - func, - defaultOptions, - basicMeta - ) + target[name] = this._promisifyServerStreamMethod(client, func, defaultOptions, basicMeta) } if (requestStream && responseStream) { // promisify duplex stream method - target[name] = this._promisifyDuplexStreamMethod( - client, - func, - defaultOptions, - basicMeta - ) + target[name] = this._promisifyDuplexStreamMethod(client, func, defaultOptions, basicMeta) } // keep callback method target.call[name] = this._keepCallbackMethod(client, func) diff --git a/types/proxy/serverProxy.d.ts b/types/proxy/serverProxy.d.ts index 2b1467b..3da14c6 100644 --- a/types/proxy/serverProxy.d.ts +++ b/types/proxy/serverProxy.d.ts @@ -8,17 +8,10 @@ declare class ServerProxy { private _insecureServerCredentials? constructor() _init(loader: any, ...args: any[]): this - listen( - addr: any, - credentials?: grpc.ServerCredentials | undefined - ): Promise + listen(addr: any, credentials?: grpc.ServerCredentials | undefined): Promise shutdown(): Promise forceShutdown(): void - makeServerCredentials( - rootCerts?: Buffer, - keyCertPairs?: grpc.KeyCertPair[], - checkClientCertificate?: boolean - ): grpc.ServerCredentials + makeServerCredentials(rootCerts?: Buffer, keyCertPairs?: grpc.KeyCertPair[], checkClientCertificate?: boolean): grpc.ServerCredentials addService( name: string, implementation: any, diff --git a/types/proxy/serverProxy.js b/types/proxy/serverProxy.js index 87c2589..6bf0810 100644 --- a/types/proxy/serverProxy.js +++ b/types/proxy/serverProxy.js @@ -5,10 +5,7 @@ var __createBinding = ? function (o, m, k, k2) { if (k2 === undefined) k2 = k var desc = Object.getOwnPropertyDescriptor(m, k) - if ( - !desc || - ('get' in desc ? !m.__esModule : desc.writable || desc.configurable) - ) { + if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function () { @@ -36,10 +33,7 @@ var __importStar = function (mod) { if (mod && mod.__esModule) return mod var result = {} - if (mod != null) - for (var k in mod) - if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k) + if (mod != null) for (var k in mod) if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k) __setModuleDefault(result, mod) return result } @@ -71,24 +65,14 @@ class ServerProxy { return this } async listen(addr, credentials = undefined) { - ;(0, node_assert_1.default)( - this._server, - 'must be first init() server before server listen()' - ) + ;(0, node_assert_1.default)(this._server, 'must be first init() server before server listen()') Joi.assert(addr, server_1.default.address, 'server listen() params Error') const url = _.isString(addr) ? addr : `${addr.host}:${addr.port}` const bindPort = await new Promise((resolve, reject) => { - this._server.bindAsync( - url, - credentials || this.makeServerCredentials(), - (err, result) => (err ? reject(err) : resolve(result)) - ) + this._server.bindAsync(url, credentials || this.makeServerCredentials(), (err, result) => (err ? reject(err) : resolve(result))) }) const port = addr.port ? addr.port : Number(addr.match(/:(\d+)/)[1]) - ;(0, node_assert_1.default)( - bindPort === port, - 'server bind port not to be right' - ) + ;(0, node_assert_1.default)(bindPort === port, 'server bind port not to be right') this._server.start() } async shutdown() { @@ -117,15 +101,10 @@ class ServerProxy { } makeServerCredentials(rootCerts, keyCertPairs, checkClientCertificate) { if (rootCerts && keyCertPairs) { - return grpc.ServerCredentials.createSsl( - rootCerts, - keyCertPairs, - checkClientCertificate - ) + return grpc.ServerCredentials.createSsl(rootCerts, keyCertPairs, checkClientCertificate) } else { if (!this._insecureServerCredentials) { - this._insecureServerCredentials = - grpc.ServerCredentials.createInsecure() + this._insecureServerCredentials = grpc.ServerCredentials.createInsecure() } return this._insecureServerCredentials } @@ -143,17 +122,11 @@ class ServerProxy { this._server.addService(service, this._callbackify(implementation, options)) } removeService(name) { - ;(0, node_assert_1.default)( - this._server, - 'must be first init() server before server removeService()' - ) + ;(0, node_assert_1.default)(this._server, 'must be first init() server before server removeService()') this._server.removeService(this._loader.service(name)) } addMiddleware(...args) { - ;(0, node_assert_1.default)( - args.length >= 1, - 'server addMiddleware() takes at least one argument.' - ) + ;(0, node_assert_1.default)(args.length >= 1, 'server addMiddleware() takes at least one argument.') if (args.length === 1) { if (Array.isArray(args[0])) { args[0].forEach((fn) => { @@ -169,48 +142,23 @@ class ServerProxy { } } _use(fn) { - if (typeof fn !== 'function') - throw new TypeError( - 'grpcity loader server middleware must be a function!' - ) + if (typeof fn !== 'function') throw new TypeError('grpcity loader server middleware must be a function!') this._middleware.push(fn) } _callbackify(target, { exclude = [], inherit, _implementationType }) { - ;(0, node_assert_1.default)( - typeof target === 'object', - 'Must callbackify an object' - ) - ;(0, node_assert_1.default)( - Array.isArray(exclude), - 'options.exclude must be an array of strings' - ) - const protoPropertyNames = Object.getOwnPropertyNames( - Object.getPrototypeOf({}) - ) + ;(0, node_assert_1.default)(typeof target === 'object', 'Must callbackify an object') + ;(0, node_assert_1.default)(Array.isArray(exclude), 'options.exclude must be an array of strings') + const protoPropertyNames = Object.getOwnPropertyNames(Object.getPrototypeOf({})) exclude.push(...protoPropertyNames) const allPropertyNames = [ - ...new Set([ - ...Object.keys(target), - ...Object.getOwnPropertyNames(Object.getPrototypeOf(target)), - ...(inherit && inherit.prototype - ? Object.getOwnPropertyNames(inherit.prototype) - : []) - ]) + ...new Set([...Object.keys(target), ...Object.getOwnPropertyNames(Object.getPrototypeOf(target)), ...(inherit && inherit.prototype ? Object.getOwnPropertyNames(inherit.prototype) : [])]) ] const methods = {} for (const key of allPropertyNames) { const fn = target[key] - if ( - typeof fn === 'function' && - key !== 'constructor' && - !exclude.includes(key) - ) { + if (typeof fn === 'function' && key !== 'constructor' && !exclude.includes(key)) { if (util.types.isAsyncFunction(fn)) { - const eglWrapFunction = this._proxy( - target, - key, - _implementationType[key] - ) + const eglWrapFunction = this._proxy(target, key, _implementationType[key]) methods[key] = eglWrapFunction } else { methods[key] = fn diff --git a/types/util/compose.d.ts b/types/util/compose.d.ts index d300cd6..927f742 100644 --- a/types/util/compose.d.ts +++ b/types/util/compose.d.ts @@ -1,7 +1,4 @@ -export type MiddlewareFunction = ( - context: any, - next: () => Promise -) => Promise +export type MiddlewareFunction = (context: any, next: () => Promise) => Promise /** * Compose `middleware` returning * a fully valid middleware comprised @@ -11,6 +8,4 @@ export type MiddlewareFunction = ( * @return {Function} * @api public */ -export declare const compose: ( - middleware: MiddlewareFunction[] -) => (context: any, next: () => Promise) => Promise +export declare const compose: (middleware: MiddlewareFunction[]) => (context: any, next: () => Promise) => Promise diff --git a/types/util/compose.js b/types/util/compose.js index 2869694..cf0a42f 100644 --- a/types/util/compose.js +++ b/types/util/compose.js @@ -11,19 +11,16 @@ exports.compose = void 0 * @api public */ const compose = (middleware) => { - if (!Array.isArray(middleware)) - throw new TypeError('Middleware stack must be an array!') + if (!Array.isArray(middleware)) throw new TypeError('Middleware stack must be an array!') for (const fn of middleware) { - if (typeof fn !== 'function') - throw new TypeError('Middleware must be composed of functions!') + if (typeof fn !== 'function') throw new TypeError('Middleware must be composed of functions!') } return function (context, next) { // last called middleware # let index = -1 return dispatch(0) function dispatch(i) { - if (i <= index) - return Promise.reject(new Error('next() called multiple times')) + if (i <= index) return Promise.reject(new Error('next() called multiple times')) index = i let fn = middleware[i] if (i === middleware.length) fn = next diff --git a/types/util/iterator.js b/types/util/iterator.js index ceae6ac..c3c4e34 100644 --- a/types/util/iterator.js +++ b/types/util/iterator.js @@ -2,10 +2,8 @@ Object.defineProperty(exports, '__esModule', { value: true }) const symbolAsyncIterator = Symbol.asyncIterator || '@@asyncIterator' const normalizeEmitter = (emitter) => { - const addListener = - emitter.on || emitter.addListener || emitter.addEventListener - const removeListener = - emitter.off || emitter.removeListener || emitter.removeEventListener + const addListener = emitter.on || emitter.addListener || emitter.addEventListener + const removeListener = emitter.off || emitter.removeListener || emitter.removeEventListener if (!addListener || !removeListener) { throw new TypeError('Emitter is not compatible') } @@ -29,12 +27,9 @@ exports.default = (emitter, event, options) => { ...options } const { limit } = options - const isValidLimit = - limit >= 0 && (limit === Infinity || Number.isInteger(limit)) + const isValidLimit = limit >= 0 && (limit === Infinity || Number.isInteger(limit)) if (!isValidLimit) { - throw new TypeError( - 'The `limit` option should be a non-negative integer or Infinity' - ) + throw new TypeError('The `limit` option should be a non-negative integer or Infinity') } if (limit === 0) { // Return an empty async iterator to avoid any further cost @@ -145,9 +140,7 @@ exports.default = (emitter, event, options) => { value: undefined } } - return new Promise((resolve, reject) => - nextQueue.push({ resolve, reject }) - ) + return new Promise((resolve, reject) => nextQueue.push({ resolve, reject })) }, async return(value) { cancel() diff --git a/types/util/prefixingDefinition.js b/types/util/prefixingDefinition.js index 2fa5a97..224836a 100644 --- a/types/util/prefixingDefinition.js +++ b/types/util/prefixingDefinition.js @@ -4,11 +4,7 @@ exports.default = (packageDefinition, packagePrefix) => { for (const qualifiedName in packageDefinition) { const definition = packageDefinition[qualifiedName] const newPackage = `${packagePrefix}.${qualifiedName}` - if ( - definition.format && - definition.type && - definition.fileDescriptorProtos - ) { + if (definition.format && definition.type && definition.fileDescriptorProtos) { packageDefinition[newPackage] = definition } else { const newDefinition = {}