diff --git a/package.json b/package.json index c57ea48..6f18c40 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "defu": "^6.0.0", "get-port-please": "^2.5.0", "http-shutdown": "^1.2.2", - "selfsigned": "^2.0.1" + "selfsigned": "^2.0.1", + "ufo": "^0.8.4" }, "devDependencies": { "@nuxtjs/eslint-config-typescript": "latest", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2e5dc8d..57dc2b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,6 +16,7 @@ specifiers: selfsigned: ^2.0.1 standard-version: latest typescript: latest + ufo: ^0.8.4 unbuild: latest vitest: ^0.13.1 @@ -26,17 +27,18 @@ dependencies: get-port-please: 2.5.0 http-shutdown: 1.2.2 selfsigned: 2.0.1 + ufo: 0.8.4 devDependencies: - '@nuxtjs/eslint-config-typescript': 10.0.0_xztl6dhthcahlo6akmb2bmjmle + '@nuxtjs/eslint-config-typescript': 10.0.0_ud6rd4xtew5bv4yhvkvu24pzm4 '@types/cheerio': 0.22.31 '@types/flat': 5.0.2 - '@types/node': 17.0.38 + '@types/node': 17.0.42 c8: 7.11.3 - eslint: 8.16.0 + eslint: 8.17.0 jiti: 1.13.0 standard-version: 9.5.0 - typescript: 4.7.2 + typescript: 4.7.3 unbuild: 0.7.4 vitest: 0.13.1_c8@7.11.3 @@ -326,36 +328,36 @@ packages: fastq: 1.13.0 dev: true - /@nuxtjs/eslint-config-typescript/10.0.0_xztl6dhthcahlo6akmb2bmjmle: + /@nuxtjs/eslint-config-typescript/10.0.0_ud6rd4xtew5bv4yhvkvu24pzm4: resolution: {integrity: sha512-DaFjb0IPOq5MhdPs/5h0+kUmjQ6sVSMo3mrEuuAY3r2NUWmVSWEFrlUCqx0S0pHvjBXS4MfwBWS/oWPs41aQeA==} peerDependencies: eslint: ^8.14.0 dependencies: - '@nuxtjs/eslint-config': 10.0.0_ztbftnvu57zhg5cuougx2imeci - '@typescript-eslint/eslint-plugin': 5.26.0_hzuh7e2up357pvq3mkokjvu2lq - '@typescript-eslint/parser': 5.26.0_xztl6dhthcahlo6akmb2bmjmle - eslint: 8.16.0 - eslint-import-resolver-typescript: 2.7.1_btspkuwbqkl4adpiufzbathtpi - eslint-plugin-import: 2.26.0_ztbftnvu57zhg5cuougx2imeci + '@nuxtjs/eslint-config': 10.0.0_ws6ck2gdxspv6ngtwevulm53da + '@typescript-eslint/eslint-plugin': 5.26.0_c75vrstjak6ulzoy6wy5a4ug4i + '@typescript-eslint/parser': 5.26.0_ud6rd4xtew5bv4yhvkvu24pzm4 + eslint: 8.17.0 + eslint-import-resolver-typescript: 2.7.1_3yxiwxzsqipdmy4jwrlv6vgfmy + eslint-plugin-import: 2.26.0_ws6ck2gdxspv6ngtwevulm53da transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color - typescript dev: true - /@nuxtjs/eslint-config/10.0.0_ztbftnvu57zhg5cuougx2imeci: + /@nuxtjs/eslint-config/10.0.0_ws6ck2gdxspv6ngtwevulm53da: resolution: {integrity: sha512-5umb4Nyd/D9azWyFPGe3ru0E5v8SSVzgtZeJwTaCpqjsQDrr51P7QPtBTVdJXIbhdY1lws67x9Emkb7oKwh4zw==} peerDependencies: eslint: ^8.14.0 dependencies: - eslint: 8.16.0 - eslint-config-standard: 17.0.0_a34zldniqa7pmczppzwphgpvau - eslint-plugin-import: 2.26.0_ztbftnvu57zhg5cuougx2imeci - eslint-plugin-n: 15.2.0_eslint@8.16.0 - eslint-plugin-node: 11.1.0_eslint@8.16.0 - eslint-plugin-promise: 6.0.0_eslint@8.16.0 - eslint-plugin-unicorn: 42.0.0_eslint@8.16.0 - eslint-plugin-vue: 8.7.1_eslint@8.16.0 + eslint: 8.17.0 + eslint-config-standard: 17.0.0_njsdw4l22qekzj7guerdgr2yvq + eslint-plugin-import: 2.26.0_ws6ck2gdxspv6ngtwevulm53da + eslint-plugin-n: 15.2.0_eslint@8.17.0 + eslint-plugin-node: 11.1.0_eslint@8.17.0 + eslint-plugin-promise: 6.0.0_eslint@8.17.0 + eslint-plugin-unicorn: 42.0.0_eslint@8.17.0 + eslint-plugin-vue: 8.7.1_eslint@8.17.0 transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-typescript @@ -456,7 +458,7 @@ packages: /@types/cheerio/0.22.31: resolution: {integrity: sha512-Kt7Cdjjdi2XWSfrZ53v4Of0wG3ZcmaegFXjMmz9tfNrZSkzzo36G0AL1YqSdcIA78Etjt6E609pt5h1xnQkPUw==} dependencies: - '@types/node': 17.0.38 + '@types/node': 17.0.42 dev: true /@types/estree/0.0.39: @@ -487,8 +489,8 @@ packages: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true - /@types/node/17.0.38: - resolution: {integrity: sha512-5jY9RhV7c0Z4Jy09G+NIDTsCZ5G0L5n+Z+p+Y7t5VJHM30bgwzSjVtlcBxqAj+6L/swIlvtOSzr8rBk/aNyV2g==} + /@types/node/17.0.42: + resolution: {integrity: sha512-Q5BPGyGKcvQgAMbsr7qEGN/kIPN6zZecYYABeTDBizOsau+2NMdSVTar9UQw21A2+JyA2KRNDYaYrPB0Rpk2oQ==} dev: true /@types/normalize-package-data/2.4.1: @@ -498,10 +500,10 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 17.0.38 + '@types/node': 17.0.42 dev: true - /@typescript-eslint/eslint-plugin/5.26.0_hzuh7e2up357pvq3mkokjvu2lq: + /@typescript-eslint/eslint-plugin/5.26.0_c75vrstjak6ulzoy6wy5a4ug4i: resolution: {integrity: sha512-oGCmo0PqnRZZndr+KwvvAUvD3kNE4AfyoGCwOZpoCncSh4MVD06JTE8XQa2u9u+NX5CsyZMBTEc2C72zx38eYA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -512,23 +514,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.26.0_xztl6dhthcahlo6akmb2bmjmle + '@typescript-eslint/parser': 5.26.0_ud6rd4xtew5bv4yhvkvu24pzm4 '@typescript-eslint/scope-manager': 5.26.0 - '@typescript-eslint/type-utils': 5.26.0_xztl6dhthcahlo6akmb2bmjmle - '@typescript-eslint/utils': 5.26.0_xztl6dhthcahlo6akmb2bmjmle + '@typescript-eslint/type-utils': 5.26.0_ud6rd4xtew5bv4yhvkvu24pzm4 + '@typescript-eslint/utils': 5.26.0_ud6rd4xtew5bv4yhvkvu24pzm4 debug: 4.3.4 - eslint: 8.16.0 + eslint: 8.17.0 functional-red-black-tree: 1.0.1 ignore: 5.2.0 regexpp: 3.2.0 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.7.2 - typescript: 4.7.2 + tsutils: 3.21.0_typescript@4.7.3 + typescript: 4.7.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.26.0_xztl6dhthcahlo6akmb2bmjmle: + /@typescript-eslint/parser/5.26.0_ud6rd4xtew5bv4yhvkvu24pzm4: resolution: {integrity: sha512-n/IzU87ttzIdnAH5vQ4BBDnLPly7rC5VnjN3m0xBG82HK6rhRxnCb3w/GyWbNDghPd+NktJqB/wl6+YkzZ5T5Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -540,10 +542,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.26.0 '@typescript-eslint/types': 5.26.0 - '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.7.2 + '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.7.3 debug: 4.3.4 - eslint: 8.16.0 - typescript: 4.7.2 + eslint: 8.17.0 + typescript: 4.7.3 transitivePeerDependencies: - supports-color dev: true @@ -556,7 +558,7 @@ packages: '@typescript-eslint/visitor-keys': 5.26.0 dev: true - /@typescript-eslint/type-utils/5.26.0_xztl6dhthcahlo6akmb2bmjmle: + /@typescript-eslint/type-utils/5.26.0_ud6rd4xtew5bv4yhvkvu24pzm4: resolution: {integrity: sha512-7ccbUVWGLmcRDSA1+ADkDBl5fP87EJt0fnijsMFTVHXKGduYMgienC/i3QwoVhDADUAPoytgjbZbCOMj4TY55A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -566,11 +568,11 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.26.0_xztl6dhthcahlo6akmb2bmjmle + '@typescript-eslint/utils': 5.26.0_ud6rd4xtew5bv4yhvkvu24pzm4 debug: 4.3.4 - eslint: 8.16.0 - tsutils: 3.21.0_typescript@4.7.2 - typescript: 4.7.2 + eslint: 8.17.0 + tsutils: 3.21.0_typescript@4.7.3 + typescript: 4.7.3 transitivePeerDependencies: - supports-color dev: true @@ -580,7 +582,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.26.0_typescript@4.7.2: + /@typescript-eslint/typescript-estree/5.26.0_typescript@4.7.3: resolution: {integrity: sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -595,13 +597,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.7.2 - typescript: 4.7.2 + tsutils: 3.21.0_typescript@4.7.3 + typescript: 4.7.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.26.0_xztl6dhthcahlo6akmb2bmjmle: + /@typescript-eslint/utils/5.26.0_ud6rd4xtew5bv4yhvkvu24pzm4: resolution: {integrity: sha512-PJFwcTq2Pt4AMOKfe3zQOdez6InIDOjUJJD3v3LyEtxHGVVRK3Vo7Dd923t/4M9hSH2q2CLvcTdxlLPjcIk3eg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -610,10 +612,10 @@ packages: '@types/json-schema': 7.0.11 '@typescript-eslint/scope-manager': 5.26.0 '@typescript-eslint/types': 5.26.0 - '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.7.2 - eslint: 8.16.0 + '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.7.3 + eslint: 8.17.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.16.0 + eslint-utils: 3.0.0_eslint@8.17.0 transitivePeerDependencies: - supports-color - typescript @@ -929,7 +931,7 @@ packages: dev: true /concat-map/0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} dev: true /concat-stream/2.0.0: @@ -1703,7 +1705,7 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-standard/17.0.0_a34zldniqa7pmczppzwphgpvau: + /eslint-config-standard/17.0.0_njsdw4l22qekzj7guerdgr2yvq: resolution: {integrity: sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==} peerDependencies: eslint: ^8.0.1 @@ -1711,10 +1713,10 @@ packages: eslint-plugin-n: ^15.0.0 eslint-plugin-promise: ^6.0.0 dependencies: - eslint: 8.16.0 - eslint-plugin-import: 2.26.0_ztbftnvu57zhg5cuougx2imeci - eslint-plugin-n: 15.2.0_eslint@8.16.0 - eslint-plugin-promise: 6.0.0_eslint@8.16.0 + eslint: 8.17.0 + eslint-plugin-import: 2.26.0_ws6ck2gdxspv6ngtwevulm53da + eslint-plugin-n: 15.2.0_eslint@8.17.0 + eslint-plugin-promise: 6.0.0_eslint@8.17.0 dev: true /eslint-import-resolver-node/0.3.6: @@ -1726,7 +1728,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript/2.7.1_btspkuwbqkl4adpiufzbathtpi: + /eslint-import-resolver-typescript/2.7.1_3yxiwxzsqipdmy4jwrlv6vgfmy: resolution: {integrity: sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ==} engines: {node: '>=4'} peerDependencies: @@ -1734,8 +1736,8 @@ packages: eslint-plugin-import: '*' dependencies: debug: 4.3.4 - eslint: 8.16.0 - eslint-plugin-import: 2.26.0_ztbftnvu57zhg5cuougx2imeci + eslint: 8.17.0 + eslint-plugin-import: 2.26.0_ws6ck2gdxspv6ngtwevulm53da glob: 7.2.0 is-glob: 4.0.3 resolve: 1.22.0 @@ -1762,38 +1764,38 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.26.0_xztl6dhthcahlo6akmb2bmjmle + '@typescript-eslint/parser': 5.26.0_ud6rd4xtew5bv4yhvkvu24pzm4 debug: 3.2.7 eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 2.7.1_btspkuwbqkl4adpiufzbathtpi + eslint-import-resolver-typescript: 2.7.1_3yxiwxzsqipdmy4jwrlv6vgfmy find-up: 2.1.0 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-es/3.0.1_eslint@8.16.0: + /eslint-plugin-es/3.0.1_eslint@8.17.0: resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.16.0 + eslint: 8.17.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-es/4.1.0_eslint@8.16.0: + /eslint-plugin-es/4.1.0_eslint@8.17.0: resolution: {integrity: sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.16.0 + eslint: 8.17.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-import/2.26.0_ztbftnvu57zhg5cuougx2imeci: + /eslint-plugin-import/2.26.0_ws6ck2gdxspv6ngtwevulm53da: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -1803,12 +1805,12 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.26.0_xztl6dhthcahlo6akmb2bmjmle + '@typescript-eslint/parser': 5.26.0_ud6rd4xtew5bv4yhvkvu24pzm4 array-includes: 3.1.4 array.prototype.flat: 1.2.5 debug: 2.6.9 doctrine: 2.1.0 - eslint: 8.16.0 + eslint: 8.17.0 eslint-import-resolver-node: 0.3.6 eslint-module-utils: 2.7.3_yxrttxwxgn5axzfjkhhzgts2eq has: 1.0.3 @@ -1824,16 +1826,16 @@ packages: - supports-color dev: true - /eslint-plugin-n/15.2.0_eslint@8.16.0: + /eslint-plugin-n/15.2.0_eslint@8.17.0: resolution: {integrity: sha512-lWLg++jGwC88GDGGBX3CMkk0GIWq0y41aH51lavWApOKcMQcYoL3Ayd0lEdtD3SnQtR+3qBvWQS3qGbR2BxRWg==} engines: {node: '>=12.22.0'} peerDependencies: eslint: '>=7.0.0' dependencies: builtins: 4.1.0 - eslint: 8.16.0 - eslint-plugin-es: 4.1.0_eslint@8.16.0 - eslint-utils: 3.0.0_eslint@8.16.0 + eslint: 8.17.0 + eslint-plugin-es: 4.1.0_eslint@8.17.0 + eslint-utils: 3.0.0_eslint@8.17.0 ignore: 5.2.0 is-core-module: 2.8.1 minimatch: 3.1.2 @@ -1841,14 +1843,14 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-node/11.1.0_eslint@8.16.0: + /eslint-plugin-node/11.1.0_eslint@8.17.0: resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.16.0 - eslint-plugin-es: 3.0.1_eslint@8.16.0 + eslint: 8.17.0 + eslint-plugin-es: 3.0.1_eslint@8.17.0 eslint-utils: 2.1.0 ignore: 5.2.0 minimatch: 3.1.2 @@ -1856,16 +1858,16 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-promise/6.0.0_eslint@8.16.0: + /eslint-plugin-promise/6.0.0_eslint@8.17.0: resolution: {integrity: sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.16.0 + eslint: 8.17.0 dev: true - /eslint-plugin-unicorn/42.0.0_eslint@8.16.0: + /eslint-plugin-unicorn/42.0.0_eslint@8.17.0: resolution: {integrity: sha512-ixBsbhgWuxVaNlPTT8AyfJMlhyC5flCJFjyK3oKE8TRrwBnaHvUbuIkCM1lqg8ryYrFStL/T557zfKzX4GKSlg==} engines: {node: '>=12'} peerDependencies: @@ -1874,8 +1876,8 @@ packages: '@babel/helper-validator-identifier': 7.16.7 ci-info: 3.3.0 clean-regexp: 1.0.0 - eslint: 8.16.0 - eslint-utils: 3.0.0_eslint@8.16.0 + eslint: 8.17.0 + eslint-utils: 3.0.0_eslint@8.17.0 esquery: 1.4.0 indent-string: 4.0.0 is-builtin-module: 3.1.0 @@ -1888,19 +1890,19 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-vue/8.7.1_eslint@8.16.0: + /eslint-plugin-vue/8.7.1_eslint@8.17.0: resolution: {integrity: sha512-28sbtm4l4cOzoO1LtzQPxfxhQABararUb1JtqusQqObJpWX2e/gmVyeYVfepizPFne0Q5cILkYGiBoV36L12Wg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.16.0 - eslint-utils: 3.0.0_eslint@8.16.0 + eslint: 8.17.0 + eslint-utils: 3.0.0_eslint@8.17.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.0.10 semver: 7.3.7 - vue-eslint-parser: 8.3.0_eslint@8.16.0 + vue-eslint-parser: 8.3.0_eslint@8.17.0 transitivePeerDependencies: - supports-color dev: true @@ -1928,13 +1930,13 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.16.0: + /eslint-utils/3.0.0_eslint@8.17.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.16.0 + eslint: 8.17.0 eslint-visitor-keys: 2.1.0 dev: true @@ -1953,8 +1955,8 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.16.0: - resolution: {integrity: sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA==} + /eslint/8.17.0: + resolution: {integrity: sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: @@ -1967,7 +1969,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.16.0 + eslint-utils: 3.0.0_eslint@8.17.0 eslint-visitor-keys: 3.3.0 espree: 9.3.2 esquery: 1.4.0 @@ -2619,7 +2621,7 @@ packages: dev: true /isexe/2.0.0: - resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=} + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} /istanbul-lib-coverage/3.2.0: resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} @@ -2906,7 +2908,7 @@ packages: hasBin: true dev: true - /mkdist/0.3.10_typescript@4.7.2: + /mkdist/0.3.10_typescript@4.7.3: resolution: {integrity: sha512-Aoc6hjILr2JPUJU2OUvBiD5sZ/CG1FeiXwk6KKPqE0iSTjBCrjrVK/fP5ig+TB3AKHvh2aA2QXXGeXVCJBdSwg==} hasBin: true peerDependencies: @@ -2922,7 +2924,7 @@ packages: jiti: 1.13.0 mri: 1.2.0 pathe: 0.2.0 - typescript: 4.7.2 + typescript: 4.7.3 dev: true /mlly/0.3.19: @@ -3151,7 +3153,7 @@ packages: dev: true /path-exists/3.0.0: - resolution: {integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=} + resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} engines: {node: '>=4'} dev: true @@ -3161,7 +3163,7 @@ packages: dev: true /path-is-absolute/1.0.1: - resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=} + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} dev: true @@ -3203,12 +3205,12 @@ packages: dev: true /pify/2.3.0: - resolution: {integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw=} + resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} dev: true /pify/3.0.0: - resolution: {integrity: sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=} + resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} engines: {node: '>=4'} dev: true @@ -3262,7 +3264,7 @@ packages: dev: true /q/1.5.1: - resolution: {integrity: sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=} + resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} engines: {node: '>=0.6.0', teleport: '>=0.2.0'} dev: true @@ -3276,7 +3278,7 @@ packages: dev: true /read-pkg-up/3.0.0: - resolution: {integrity: sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=} + resolution: {integrity: sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==} engines: {node: '>=4'} dependencies: find-up: 2.1.0 @@ -3293,7 +3295,7 @@ packages: dev: true /read-pkg/3.0.0: - resolution: {integrity: sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=} + resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} engines: {node: '>=4'} dependencies: load-json-file: 4.0.0 @@ -3351,7 +3353,7 @@ packages: dev: true /require-directory/2.1.1: - resolution: {integrity: sha1-jGStX9MNqxyXbiNE/+f3kqam30I=} + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} dev: true @@ -3381,7 +3383,7 @@ packages: glob: 7.2.0 dev: true - /rollup-plugin-dts/4.2.1_hi7fr2j6gi7pnuw5jjyc7kfteq: + /rollup-plugin-dts/4.2.1_l5gb773unvgvobygpan2bw2uzi: resolution: {integrity: sha512-eaxQZNUJ5iQcxNGlpJ1CUgG4OSVqWjDZ3nNSWBIoGrpcote2aNphSe1RJOaSYkb8dwn3o+rYm1vvld/5z3EGSQ==} engines: {node: '>=v12.22.11'} peerDependencies: @@ -3390,7 +3392,7 @@ packages: dependencies: magic-string: 0.26.1 rollup: 2.70.1 - typescript: 4.7.2 + typescript: 4.7.3 optionalDependencies: '@babel/code-frame': 7.16.7 dev: true @@ -3502,7 +3504,7 @@ packages: dev: true /source-map/0.5.7: - resolution: {integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=} + resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} engines: {node: '>=0.10.0'} dev: true @@ -3617,7 +3619,7 @@ packages: dev: true /strip-bom/3.0.0: - resolution: {integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=} + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} dev: true @@ -3672,11 +3674,11 @@ packages: dev: true /text-table/0.2.0: - resolution: {integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=} + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true /through/2.3.8: - resolution: {integrity: sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=} + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true /through2/2.0.5: @@ -3703,7 +3705,7 @@ packages: dev: true /to-fast-properties/2.0.0: - resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=} + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} dev: true @@ -3732,14 +3734,14 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tsutils/3.21.0_typescript@4.7.2: + /tsutils/3.21.0_typescript@4.7.3: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.7.2 + typescript: 4.7.3 dev: true /type-check/0.4.0: @@ -3775,15 +3777,19 @@ packages: dev: true /typedarray/0.0.6: - resolution: {integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=} + resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true - /typescript/4.7.2: - resolution: {integrity: sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==} + /typescript/4.7.3: + resolution: {integrity: sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==} engines: {node: '>=4.2.0'} hasBin: true dev: true + /ufo/0.8.4: + resolution: {integrity: sha512-/+BmBDe8GvlB2nIflWasLLAInjYG0bC9HRnfEpNi4sw77J2AJNnEVnTDReVrehoh825+Q/evF3THXTAweyam2g==} + dev: false + /uglify-js/3.15.3: resolution: {integrity: sha512-6iCVm2omGJbsu3JWac+p6kUiOpg3wFO2f8lIXjfEb8RrmLjzog1wTPMmwKB7swfzzqxj9YM+sGUM++u1qN4qJg==} engines: {node: '>=0.8.0'} @@ -3819,7 +3825,7 @@ packages: jiti: 1.13.0 magic-string: 0.26.1 mkdirp: 1.0.4 - mkdist: 0.3.10_typescript@4.7.2 + mkdist: 0.3.10_typescript@4.7.3 mlly: 0.5.2 mri: 1.2.0 pathe: 0.2.0 @@ -3827,10 +3833,10 @@ packages: pretty-bytes: 6.0.0 rimraf: 3.0.2 rollup: 2.70.1 - rollup-plugin-dts: 4.2.1_hi7fr2j6gi7pnuw5jjyc7kfteq + rollup-plugin-dts: 4.2.1_l5gb773unvgvobygpan2bw2uzi rollup-plugin-esbuild: 4.9.1_sqhbgdqmhbn6g3brwzcefirmfi scule: 0.2.1 - typescript: 4.7.2 + typescript: 4.7.3 untyped: 0.4.4 transitivePeerDependencies: - supports-color @@ -3859,7 +3865,7 @@ packages: dev: true /util-deprecate/1.0.2: - resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true /v8-compile-cache/2.3.0: @@ -3941,14 +3947,14 @@ packages: - supports-color dev: true - /vue-eslint-parser/8.3.0_eslint@8.16.0: + /vue-eslint-parser/8.3.0_eslint@8.17.0: resolution: {integrity: sha512-dzHGG3+sYwSf6zFBa0Gi9ZDshD7+ad14DGOdTLjruRVgZXe2J+DcZ9iUhyR48z5g1PqRa20yt3Njna/veLJL/g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.16.0 + eslint: 8.17.0 eslint-scope: 7.1.1 eslint-visitor-keys: 3.3.0 espree: 9.3.2 @@ -3982,7 +3988,7 @@ packages: dev: true /wordwrap/1.0.0: - resolution: {integrity: sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=} + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} dev: true /wrap-ansi/7.0.0: @@ -3995,7 +4001,7 @@ packages: dev: true /wrappy/1.0.2: - resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=} + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true /xtend/4.0.2: diff --git a/src/index.ts b/src/index.ts index ace048d..8defc76 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,6 +4,7 @@ import https from 'https' import { promisify } from 'util' import { promises as fs } from 'fs' import { networkInterfaces } from 'os' +import { withoutLeadingSlash } from 'ufo' import { cyan, gray, underline, bold } from 'colorette' import type { SelfsignedOptions } from 'selfsigned' import { getPort, GetPortInput } from 'get-port-please' @@ -38,12 +39,17 @@ export interface ListenOptions { autoCloseSignals: string[] } +export interface ShowURLOptions { + baseURL: string + name?: string +} + export interface Listener { url: string, server: http.Server | https.Server, close: () => Promise, open: () => Promise, - showURL: () => void + showURL: (options?: Pick) => void } export async function listen (handle: http.RequestListener, opts: Partial = {}): Promise { @@ -109,13 +115,15 @@ export async function listen (handle: http.RequestListener, opts: Partial { opts.clipboard = false }) } - const showURL = () => { + const showURL = (options?: ShowURLOptions) => { const add = opts.clipboard ? gray('(copied to clipboard)') : '' const lines = [] - lines.push(` > Local: ${formatURL(url)} ${add}`) + const baseURL = withoutLeadingSlash(options?.baseURL || opts.baseURL || '') + const name = options?.name ? ` (${options.name})` : '' + lines.push(` > Local${name}: ${formatURL(url + baseURL)} ${add}`) if (isExternal) { for (const ip of getExternalIps()) { - lines.push(` > Network: ${formatURL(url.replace('localhost', ip))}`) + lines.push(` > Network${name}: ${formatURL(url.replace('localhost', ip) + baseURL)}`) } } // eslint-disable-next-line no-console